Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
八宫一月
ygopro-scripts
Commits
ed9e1688
Commit
ed9e1688
authored
Dec 18, 2015
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
7c45873b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
25 deletions
+18
-25
utility.lua
utility.lua
+18
-25
No files found.
utility.lua
View file @
ed9e1688
...
@@ -394,41 +394,35 @@ function Auxiliary.FConditionCode2(code1,code2,sub,insf)
...
@@ -394,41 +394,35 @@ function Auxiliary.FConditionCode2(code1,code2,sub,insf)
if
gc
:
IsFusionCode
(
code2
)
then
b2
=
1
end
if
gc
:
IsFusionCode
(
code2
)
then
b2
=
1
end
if
sub
and
gc
:
IsHasEffect
(
EFFECT_FUSION_SUBSTITUTE
)
then
bw
=
1
end
if
sub
and
gc
:
IsHasEffect
(
EFFECT_FUSION_SUBSTITUTE
)
then
bw
=
1
end
if
b1
+
b2
+
bw
==
0
then
return
false
end
if
b1
+
b2
+
bw
==
0
then
return
false
end
if
b1
+
b2
+
bw
==
1
then
b1
=
b1
*
2
b2
=
b2
*
2
bw
=
bw
*
2
end
if
chkf
~=
PLAYER_NONE
and
not
Auxiliary
.
FConditionCheckF
(
gc
,
chkf
)
then
if
chkf
~=
PLAYER_NONE
and
not
Auxiliary
.
FConditionCheckF
(
gc
,
chkf
)
then
mg
=
mg
:
Filter
(
Auxiliary
.
FConditionCheckF
,
nil
,
chkf
)
mg
=
mg
:
Filter
(
Auxiliary
.
FConditionCheckF
,
nil
,
chkf
)
end
end
if
b1
==
2
then
if
b1
+
b2
+
bw
>
1
then
return
mg
:
IsExists
(
Auxiliary
.
FConditionFilter22
,
1
,
nil
,
code1
,
code2
,
sub
)
elseif
b1
==
1
then
return
mg
:
IsExists
(
Auxiliary
.
FConditionFilter12
,
1
,
nil
,
code2
,
sub
)
return
mg
:
IsExists
(
Auxiliary
.
FConditionFilter12
,
1
,
nil
,
code2
,
sub
)
elseif
b2
==
2
then
elseif
b2
==
1
then
return
mg
:
IsExists
(
Auxiliary
.
FConditionFilter12
,
1
,
nil
,
code1
,
sub
)
return
mg
:
IsExists
(
Auxiliary
.
FConditionFilter12
,
1
,
nil
,
code1
,
sub
)
elseif
bw
==
2
then
return
mg
:
IsExists
(
Auxiliary
.
FConditionFilter21
,
1
,
nil
,
code1
,
code2
)
else
else
return
mg
:
IsExists
(
Auxiliary
.
FConditionFilter2
2
,
1
,
nil
,
code1
,
code2
,
sub
)
return
mg
:
IsExists
(
Auxiliary
.
FConditionFilter2
1
,
1
,
nil
,
code1
,
code2
)
end
end
end
end
local
b1
=
0
local
b2
=
0
local
bw
=
0
local
b1
=
0
local
b2
=
0
local
bw
=
0
local
ct
=
0
local
fs
=
chkf
==
PLAYER_NONE
local
fs
=
chkf
==
PLAYER_NONE
local
tc
=
mg
:
GetFirst
()
local
tc
=
mg
:
GetFirst
()
while
tc
do
while
tc
do
local
c1
=
0
local
c2
=
0
local
cw
=
0
local
match
=
false
if
tc
:
IsFusionCode
(
code1
)
then
c1
=
1
end
if
tc
:
IsFusionCode
(
code1
)
then
b1
=
1
match
=
true
end
if
tc
:
IsFusionCode
(
code2
)
then
c2
=
1
end
if
tc
:
IsFusionCode
(
code2
)
then
b2
=
1
match
=
true
end
if
sub
and
tc
:
IsHasEffect
(
EFFECT_FUSION_SUBSTITUTE
)
then
cw
=
1
end
if
sub
and
tc
:
IsHasEffect
(
EFFECT_FUSION_SUBSTITUTE
)
then
bw
=
1
match
=
true
end
if
c1
+
c2
+
cw
>
0
then
if
match
then
if
Auxiliary
.
FConditionCheckF
(
tc
,
chkf
)
then
fs
=
true
end
if
Auxiliary
.
FConditionCheckF
(
tc
,
chkf
)
then
fs
=
true
end
if
c1
+
c2
+
cw
>
1
then
b1
=
b1
+
c1
b2
=
b2
+
c2
bw
=
bw
+
cw
ct
=
ct
+
1
else
b1
=
b1
+
c1
*
2
b2
=
b2
+
c2
*
2
bw
=
bw
+
cw
*
2
end
end
end
tc
=
mg
:
GetNext
()
tc
=
mg
:
GetNext
()
end
end
local
c1
=
0
local
c2
=
0
return
ct
>
1
and
b1
+
b2
+
bw
>
1
and
fs
if
b1
==
1
then
c1
=
c1
+
1
elseif
b1
>
1
then
c2
=
c2
+
1
end
if
b2
==
1
then
c1
=
c1
+
1
elseif
b2
>
1
then
c2
=
c2
+
1
end
if
bw
==
1
then
c1
=
c1
+
1
elseif
bw
>
1
then
c2
=
c2
+
1
end
return
c2
>
0
and
c1
+
c2
>
1
and
fs
end
end
end
end
function
Auxiliary
.
FOperationCode2
(
code1
,
code2
,
sub
,
insf
)
function
Auxiliary
.
FOperationCode2
(
code1
,
code2
,
sub
,
insf
)
...
@@ -452,17 +446,16 @@ function Auxiliary.FOperationCode2(code1,code2,sub,insf)
...
@@ -452,17 +446,16 @@ function Auxiliary.FOperationCode2(code1,code2,sub,insf)
if
tc
:
IsFusionCode
(
code1
)
then
b1
=
1
end
if
tc
:
IsFusionCode
(
code1
)
then
b1
=
1
end
if
tc
:
IsFusionCode
(
code2
)
then
b2
=
1
end
if
tc
:
IsFusionCode
(
code2
)
then
b2
=
1
end
if
sub
and
tc
:
IsHasEffect
(
EFFECT_FUSION_SUBSTITUTE
)
then
bw
=
1
end
if
sub
and
tc
:
IsHasEffect
(
EFFECT_FUSION_SUBSTITUTE
)
then
bw
=
1
end
if
b1
+
b2
+
bw
==
1
then
b1
=
b1
*
2
b2
=
b2
*
2
bw
=
bw
*
2
end
local
g2
=
nil
local
g2
=
nil
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
if
b1
==
2
then
if
b1
+
b2
+
bw
>
1
then
g2
=
g
:
FilterSelect
(
tp
,
Auxiliary
.
FConditionFilter22
,
1
,
1
,
nil
,
code1
,
code2
,
sub
)
elseif
b1
==
1
then
g2
=
g
:
FilterSelect
(
tp
,
Auxiliary
.
FConditionFilter12
,
1
,
1
,
nil
,
code2
,
sub
)
g2
=
g
:
FilterSelect
(
tp
,
Auxiliary
.
FConditionFilter12
,
1
,
1
,
nil
,
code2
,
sub
)
elseif
b2
==
2
then
elseif
b2
==
1
then
g2
=
g
:
FilterSelect
(
tp
,
Auxiliary
.
FConditionFilter12
,
1
,
1
,
nil
,
code1
,
sub
)
g2
=
g
:
FilterSelect
(
tp
,
Auxiliary
.
FConditionFilter12
,
1
,
1
,
nil
,
code1
,
sub
)
elseif
bw
==
2
then
g2
=
g
:
FilterSelect
(
tp
,
Auxiliary
.
FConditionFilter21
,
1
,
1
,
nil
,
code1
,
code2
)
else
else
g2
=
g
:
FilterSelect
(
tp
,
Auxiliary
.
FConditionFilter2
2
,
1
,
1
,
nil
,
code1
,
code2
,
sub
)
g2
=
g
:
FilterSelect
(
tp
,
Auxiliary
.
FConditionFilter2
1
,
1
,
1
,
nil
,
code1
,
code2
)
end
end
if
g1
then
g2
:
Merge
(
g1
)
end
if
g1
then
g2
:
Merge
(
g1
)
end
Duel
.
SetFusionMaterial
(
g2
)
Duel
.
SetFusionMaterial
(
g2
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment