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
nanahira
ygopro-scripts
Commits
325de7ec
Commit
325de7ec
authored
Feb 04, 2026
by
水濑真白
Browse files
Options
Browse Files
Download
Plain Diff
Resolved merge conflicts for selected blocks in scripts
parents
ea1027fe
dd228c7c
Pipeline
#42852
passed with stage
in 45 seconds
Changes
6
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
150 additions
and
113 deletions
+150
-113
c32467459.lua
c32467459.lua
+17
-8
c45675980.lua
c45675980.lua
+8
-2
c77124096.lua
c77124096.lua
+22
-65
c84343351.lua
c84343351.lua
+17
-0
c8852158.lua
c8852158.lua
+8
-2
procedure.lua
procedure.lua
+78
-36
No files found.
c32467459.lua
View file @
325de7ec
...
...
@@ -3,14 +3,23 @@ local s,id,o=GetID()
function
s
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
--fusion
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_FUSION_MATERIAL
)
e0
:
SetCondition
(
s
.
FShaddollCondition
)
e0
:
SetOperation
(
s
.
FShaddollOperation
)
c
:
RegisterEffect
(
e0
)
if
aux
.
AddFusionProcShaddoll
then
--old function
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetCode
(
EFFECT_FUSION_MATERIAL
)
e0
:
SetCondition
(
s
.
FShaddollCondition
)
e0
:
SetOperation
(
s
.
FShaddollOperation
)
c
:
RegisterEffect
(
e0
)
else
--new function
aux
.
AddFusionProcMix
(
c
,
false
,
true
,
function
(
mc
)
return
mc
:
IsFusionSetCard
(
0x9d
)
end
,
function
(
mc
)
return
aux
.
FShaddollFilter2
(
mc
,
ATTRIBUTE_DARK
)
end
,
function
(
mc
)
return
aux
.
FShaddollFilter2
(
mc
,
ATTRIBUTE_EARTH
)
end
)
end
--spsummon condition
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
c45675980.lua
View file @
325de7ec
...
...
@@ -29,13 +29,19 @@ function c45675980.initial_effect(c)
c
:
RegisterEffect
(
e2
)
end
function
c45675980
.
syncheck
(
g
,
tp
,
syncard
)
return
g
:
IsExists
(
Card
.
IsRace
,
1
,
nil
,
RACE_DRAGON
)
and
syncard
:
IsSynchroSummonable
(
nil
,
g
,
#
g
-
1
,
#
g
-
1
)
and
aux
.
SynMixHandCheck
(
g
,
tp
,
syncard
)
return
g
:
IsExists
(
Card
.
IsRace
,
1
,
nil
,
RACE_DRAGON
)
and
aux
.
SynMixHandCheck
(
g
,
tp
,
syncard
)
and
syncard
:
IsSynchroSummonable
(
nil
,
g
,
#
g
-
1
,
#
g
-
1
)
end
function
c45675980
.
spfilter
(
c
,
tp
,
mg
)
return
mg
:
CheckSubGroup
(
c45675980
.
syncheck
,
2
,
#
mg
,
tp
,
c
)
if
not
c
:
IsType
(
TYPE_SYNCHRO
)
then
return
false
end
aux
.
GCheckAdditional
=
aux
.
SynGroupCheckLevelAddition
(
c
)
local
res
=
mg
:
CheckSubGroup
(
c45675980
.
syncheck
,
2
,
#
mg
,
tp
,
c
)
aux
.
GCheckAdditional
=
nil
return
res
end
function
c45675980
.
sctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
not
Duel
.
IsPlayerCanSpecialSummon
(
tp
)
then
return
false
end
local
mg
=
Duel
.
GetSynchroMaterial
(
tp
)
if
mg
:
IsExists
(
Card
.
GetHandSynchro
,
1
,
nil
)
then
local
mg2
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_HAND
,
0
,
nil
)
...
...
c77124096.lua
View file @
325de7ec
...
...
@@ -2,6 +2,16 @@
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
94820406
,
72043279
)
--- fusion effect
local
e0
=
FusionSpell
.
CreateSummonEffect
(
c
,{
fusfilter
=
s
.
fusfilter
,
pre_select_mat_location
=
LOCATION_MZONE
|
LOCATION_GRAVE
|
LOCATION_REMOVED
,
mat_operation_code_map
=
{
{
[
LOCATION_DECK
]
=
FusionSpell
.
FUSION_OPERATION_GRAVE
},
{
[
0xff
]
=
FusionSpell
.
FUSION_OPERATION_SHUFFLE
}
},
sumtype
=
SUMMON_VALUE_DARK_FUSION
})
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
...
...
@@ -9,32 +19,19 @@ function s.initial_effect(c)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_FUSION_SUMMON
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetLabelObject
(
e0
)
e1
:
SetOperation
(
s
.
operation
)
c
:
RegisterEffect
(
e1
)
end
s
.
fusion_effect
=
true
function
s
.
filter1
(
c
,
e
)
return
(
c
:
IsLocation
(
LOCATION_ONFIELD
+
LOCATION_GRAVE
)
or
c
:
IsFaceup
())
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToDeck
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
s
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
.
dark_calling
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_VALUE_DARK_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
function
s
.
fusfilter
(
c
)
return
c
.
dark_calling
==
true
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
chkf
=
tp
local
mg
=
Duel
.
GetMatchingGroup
(
s
.
filter1
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
nil
,
e
)
local
fusion_effect
=
e
:
GetLabelObject
()
local
b0
=
Duel
.
GetFlagEffect
(
tp
,
id
)
==
0
or
not
e
:
IsCostChecked
()
local
b1
=
b0
and
Duel
.
IsExistingMatchingCard
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg
,
nil
,
chkf
)
if
b0
and
not
b1
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
b1
=
Duel
.
IsExistingMatchingCard
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
end
local
b1
=
b0
and
fusion_effect
:
GetTarget
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
local
b2
=
Duel
.
IsExistingMatchingCard
(
s
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
(
Duel
.
GetFlagEffect
(
tp
,
id
+
o
)
==
0
or
not
e
:
IsCostChecked
())
if
chk
==
0
then
return
b1
or
b2
end
...
...
@@ -76,56 +73,16 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
s
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
function
s
.
fsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
s
.
filter1
),
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg
,
nil
,
chkf
)
local
mg3
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
::
cancel
::
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
(
ce
and
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
())))
then
local
mat
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg
,
nil
,
chkf
)
if
#
mat
==
0
then
goto
cancel
end
tc
:
SetMaterial
(
mat
)
if
mat
:
IsExists
(
Card
.
IsFacedown
,
1
,
nil
)
then
local
cg
=
mat
:
Filter
(
Card
.
IsFacedown
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
cg
)
end
if
mat
:
Filter
(
s
.
cfilter
,
nil
):
GetCount
()
>
0
then
local
cg
=
mat
:
Filter
(
s
.
cfilter
,
nil
)
Duel
.
HintSelection
(
cg
)
end
Duel
.
SendtoDeck
(
mat
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_VALUE_DARK_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
elseif
ce
~=
nil
then
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg3
,
nil
,
chkf
)
if
#
mat2
==
0
then
goto
cancel
end
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
,
SUMMON_VALUE_DARK_FUSION
)
end
tc
:
CompleteProcedure
()
end
end
function
s
.
cfilter
(
c
)
return
c
:
IsLocation
(
LOCATION_GRAVE
+
LOCATION_REMOVED
)
or
(
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
())
local
fusion_effect
=
e
:
GetLabelObject
()
fusion_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
function
s
.
thfilter2
(
c
)
return
c
:
IsCode
(
94820406
,
72043279
)
and
c
:
IsAbleToHand
()
end
function
s
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
...
...
c84343351.lua
View file @
325de7ec
...
...
@@ -4,6 +4,12 @@ function s.initial_effect(c)
c
:
EnableReviveLimit
()
--material
aux
.
AddSynchroMixProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsCode
,
82044279
),
nil
,
nil
,
aux
.
Tuner
(
nil
),
1
,
99
,
s
.
syncheck
)
--double tuner check
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e0
:
SetValue
(
s
.
valcheck
)
c
:
RegisterEffect
(
e0
)
--cannot special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
...
...
@@ -36,6 +42,17 @@ function s.initial_effect(c)
e3
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
s
.
valcheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
if
g
:
IsExists
(
Card
.
IsType
,
2
,
nil
,
TYPE_TUNER
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetCode
(
21142671
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TOFIELD
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
end
function
s
.
mfilter2
(
c
,
mg
,
syncard
)
return
c
:
IsCode
(
82044279
)
and
(
mg
:
IsExists
(
Card
.
IsType
,
1
,
c
,
TYPE_SYNCHRO
)
or
#
mg
-
1
>=
2
)
and
not
mg
:
IsExists
(
s
.
chkfilter
,
1
,
c
,
syncard
)
end
...
...
c8852158.lua
View file @
325de7ec
...
...
@@ -3,8 +3,14 @@ local s,id,o=GetID()
function
s
.
initial_effect
(
c
)
--fusion material
c
:
EnableReviveLimit
()
--fusion
aux
.
AddFusionProcShaddoll
(
c
,
ATTRIBUTE_WIND
)
-- using new function
if
aux
.
AddFusionProcShaddoll
then
--old function
aux
.
AddFusionProcShaddoll
(
c
,
ATTRIBUTE_WIND
)
else
--new function
aux
.
AddFusionProcFun2
(
c
,
function
(
mc
)
return
mc
:
IsFusionSetCard
(
0x9d
)
end
,
function
(
mc
)
return
aux
.
FShaddollFilter2
(
mc
,
ATTRIBUTE_WIND
)
end
,
true
)
end
--cannot spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
procedure.lua
View file @
325de7ec
...
...
@@ -58,16 +58,17 @@ end
---@param minc integer
---@param maxc? integer
function
Auxiliary
.
AddSynchroProcedure
(
c
,
f1
,
f2
,
minc
,
maxc
)
if
maxc
==
nil
then
maxc
=
99
end
if
maxc
==
nil
then
maxc
=
c
:
GetLevel
()
-
1
end
local
maxct
=
math.min
(
maxc
,
c
:
GetLevel
()
-
1
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
1164
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCondition
(
Auxiliary
.
SynCondition
(
f1
,
f2
,
minc
,
maxc
))
e1
:
SetTarget
(
Auxiliary
.
SynTarget
(
f1
,
f2
,
minc
,
maxc
))
e1
:
SetOperation
(
Auxiliary
.
SynOperation
(
f1
,
f2
,
minc
,
maxc
))
e1
:
SetCondition
(
Auxiliary
.
SynCondition
(
f1
,
f2
,
minc
,
maxc
t
))
e1
:
SetTarget
(
Auxiliary
.
SynTarget
(
f1
,
f2
,
minc
,
maxc
t
))
e1
:
SetOperation
(
Auxiliary
.
SynOperation
(
f1
,
f2
,
minc
,
maxc
t
))
e1
:
SetValue
(
SUMMON_TYPE_SYNCHRO
)
c
:
RegisterEffect
(
e1
)
end
...
...
@@ -109,7 +110,7 @@ function Auxiliary.SynTarget(f1,f2,minct,maxct)
else
return
false
end
end
end
function
Auxiliary
.
SynOperation
(
f1
,
f2
,
minct
,
maxc
)
function
Auxiliary
.
SynOperation
(
f1
,
f2
,
minct
,
maxc
t
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
smat
,
mg
,
min
,
max
)
local
g
=
e
:
GetLabelObject
()
c
:
SetMaterial
(
g
)
...
...
@@ -132,15 +133,22 @@ end
---@param maxc integer
---@param gc? function
function
Auxiliary
.
AddSynchroMixProcedure
(
c
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
gc
)
local
maxct
=
maxc
if
maxct
>
c
:
GetLevel
()
then
maxct
=
c
:
GetLevel
()
if
f1
then
maxct
=
maxct
-
1
end
if
f2
then
maxct
=
maxct
-
1
end
if
f3
then
maxct
=
maxct
-
1
end
end
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
1164
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCondition
(
Auxiliary
.
SynMixCondition
(
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
gc
))
e1
:
SetTarget
(
Auxiliary
.
SynMixTarget
(
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
gc
))
e1
:
SetOperation
(
Auxiliary
.
SynMixOperation
(
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
gc
))
e1
:
SetCondition
(
Auxiliary
.
SynMixCondition
(
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
t
,
gc
))
e1
:
SetTarget
(
Auxiliary
.
SynMixTarget
(
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
t
,
gc
))
e1
:
SetOperation
(
Auxiliary
.
SynMixOperation
(
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
t
,
gc
))
e1
:
SetValue
(
SUMMON_TYPE_SYNCHRO
)
c
:
RegisterEffect
(
e1
)
end
...
...
@@ -153,6 +161,15 @@ end
function
Auxiliary
.
GetSynchroLevelFlowerCardian
(
c
)
return
2
end
function
Auxiliary
.
GetMinSynchroLevel
(
c
,
syncard
)
local
lv
=
c
:
GetSynchroLevel
(
syncard
)
local
minlv
=
c
:
GetLevel
()
while
lv
&
MAX_PARAMETER
>
0
do
minlv
=
math.min
(
minlv
,
lv
&
MAX_PARAMETER
)
lv
=
lv
>>
16
end
return
minlv
end
function
Auxiliary
.
GetSynMaterials
(
tp
,
syncard
)
local
mg
=
Duel
.
GetSynchroMaterial
(
tp
):
Filter
(
Auxiliary
.
SynMaterialFilter
,
nil
,
syncard
)
if
mg
:
IsExists
(
Card
.
GetHandSynchro
,
1
,
nil
)
then
...
...
@@ -185,14 +202,22 @@ function Auxiliary.SynMixCondition(f1,f2,f3,f4,minct,maxct,gc)
end
local
mg
local
mgchk
=
false
local
goalchk
=
false
if
mg1
then
mg
=
mg1
:
Filter
(
Card
.
IsCanBeSynchroMaterial
,
nil
,
c
)
mgchk
=
true
if
min
and
min
==
max
and
#
mg1
==
min
+
1
then
goalchk
=
Auxiliary
.
SynMixCheckGoal
(
tp
,
mg1
,
0
,
0
,
c
,
Group
.
CreateGroup
(),
smat
,
gc
,
mgchk
,
goalchk
)
if
not
goalchk
then
Duel
.
ResetFlagEffect
(
tp
,
8173184
+
1
)
return
false
end
end
mg
=
mg1
:
Filter
(
Card
.
IsCanBeSynchroMaterial
,
nil
,
c
)
else
mg
=
Auxiliary
.
GetSynMaterials
(
tp
,
c
)
end
if
smat
~=
nil
then
mg
:
AddCard
(
smat
)
end
local
res
=
mg
:
IsExists
(
Auxiliary
.
SynMixFilter1
,
1
,
nil
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
gc
,
mgchk
)
local
res
=
mg
:
IsExists
(
Auxiliary
.
SynMixFilter1
,
1
,
nil
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
gc
,
mgchk
,
goalchk
)
Duel
.
ResetFlagEffect
(
tp
,
8173184
+
1
)
return
res
end
...
...
@@ -216,6 +241,7 @@ function Auxiliary.SynMixTarget(f1,f2,f3,f4,minct,maxct,gc)
local
g
=
Group
.
CreateGroup
()
local
mg
local
mgchk
=
false
local
goalchk
=
false
if
mg1
then
mg
=
mg1
:
Filter
(
Card
.
IsCanBeSynchroMaterial
,
nil
,
c
)
mgchk
=
true
...
...
@@ -229,18 +255,18 @@ function Auxiliary.SynMixTarget(f1,f2,f3,f4,minct,maxct,gc)
local
g4
=
Group
.
CreateGroup
()
local
cancel
=
Duel
.
IsSummonCancelable
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
c1
=
mg
:
Filter
(
Auxiliary
.
SynMixFilter1
,
nil
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
gc
,
mgchk
):
SelectUnselect
(
g
,
tp
,
false
,
cancel
,
1
,
1
)
c1
=
mg
:
Filter
(
Auxiliary
.
SynMixFilter1
,
nil
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
gc
,
mgchk
,
goalchk
):
SelectUnselect
(
g
,
tp
,
false
,
cancel
,
1
,
1
)
if
not
c1
then
goto
SynMixTargetSelectCancel
end
g
:
AddCard
(
c1
)
if
f2
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
c2
=
mg
:
Filter
(
Auxiliary
.
SynMixFilter2
,
g
,
f2
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
c1
,
gc
,
mgchk
):
SelectUnselect
(
g
,
tp
,
false
,
cancel
,
1
,
1
)
c2
=
mg
:
Filter
(
Auxiliary
.
SynMixFilter2
,
g
,
f2
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
c1
,
gc
,
mgchk
,
goalchk
):
SelectUnselect
(
g
,
tp
,
false
,
cancel
,
1
,
1
)
if
not
c2
then
goto
SynMixTargetSelectCancel
end
if
g
:
IsContains
(
c2
)
then
goto
SynMixTargetSelectStart
end
g
:
AddCard
(
c2
)
if
f3
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
c3
=
mg
:
Filter
(
Auxiliary
.
SynMixFilter3
,
g
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
c1
,
c2
,
gc
,
mgchk
):
SelectUnselect
(
g
,
tp
,
false
,
cancel
,
1
,
1
)
c3
=
mg
:
Filter
(
Auxiliary
.
SynMixFilter3
,
g
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
c1
,
c2
,
gc
,
mgchk
,
goalchk
):
SelectUnselect
(
g
,
tp
,
false
,
cancel
,
1
,
1
)
if
not
c3
then
goto
SynMixTargetSelectCancel
end
if
g
:
IsContains
(
c3
)
then
goto
SynMixTargetSelectStart
end
g
:
AddCard
(
c3
)
...
...
@@ -253,9 +279,10 @@ function Auxiliary.SynMixTarget(f1,f2,f3,f4,minct,maxct,gc)
else
mg2
:
Sub
(
g
)
end
local
cg
=
mg2
:
Filter
(
Auxiliary
.
SynMixCheckRecursive
,
g4
,
tp
,
g4
,
mg2
,
i
,
minc
,
maxc
,
c
,
g
,
smat
,
gc
,
mgchk
)
local
fulltraversal
=
mg
:
IsExists
(
Card
.
IsHasEffect
,
1
,
nil
,
89818984
)
local
cg
=
mg2
:
Filter
(
Auxiliary
.
SynMixCheckRecursive
,
g4
,
tp
,
g4
,
mg2
,
i
,
minc
,
maxc
,
c
,
g
,
smat
,
gc
,
mgchk
,
goalchk
,
fulltraversal
)
if
cg
:
GetCount
()
==
0
then
break
end
local
finish
=
Auxiliary
.
SynMixCheckGoal
(
tp
,
g4
,
minc
,
i
,
c
,
g
,
smat
,
gc
,
mgchk
)
local
finish
=
Auxiliary
.
SynMixCheckGoal
(
tp
,
g4
,
minc
,
i
,
c
,
g
,
smat
,
gc
,
mgchk
,
goalchk
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
c4
=
cg
:
SelectUnselect
(
g
+
g4
,
tp
,
finish
,
cancel
,
minc
,
maxc
)
if
not
c4
then
...
...
@@ -285,28 +312,28 @@ function Auxiliary.SynMixOperation(f1,f2,f3,f4,minct,maxct,gc)
g
:
DeleteGroup
()
end
end
function
Auxiliary
.
SynMixFilter1
(
c
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
gc
,
mgchk
)
return
(
not
f1
or
f1
(
c
,
syncard
))
and
mg
:
IsExists
(
Auxiliary
.
SynMixFilter2
,
1
,
c
,
f2
,
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c
,
gc
,
mgchk
)
function
Auxiliary
.
SynMixFilter1
(
c
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
gc
,
mgchk
,
goalchk
)
return
(
not
f1
or
f1
(
c
,
syncard
))
and
mg
:
IsExists
(
Auxiliary
.
SynMixFilter2
,
1
,
c
,
f2
,
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c
,
gc
,
mgchk
,
goalchk
)
end
function
Auxiliary
.
SynMixFilter2
(
c
,
f2
,
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
gc
,
mgchk
)
function
Auxiliary
.
SynMixFilter2
(
c
,
f2
,
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
gc
,
mgchk
,
goalchk
)
if
f2
then
return
f2
(
c
,
syncard
,
c1
)
and
(
mg
:
IsExists
(
Auxiliary
.
SynMixFilter3
,
1
,
Group
.
FromCards
(
c1
,
c
),
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
c
,
gc
,
mgchk
)
or
minc
==
0
and
Auxiliary
.
SynMixFilter4
(
c
,
nil
,
1
,
1
,
syncard
,
mg
,
smat
,
c1
,
nil
,
nil
,
gc
,
mgchk
))
and
(
mg
:
IsExists
(
Auxiliary
.
SynMixFilter3
,
1
,
Group
.
FromCards
(
c1
,
c
),
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
c
,
gc
,
mgchk
,
goalchk
)
or
minc
==
0
and
Auxiliary
.
SynMixFilter4
(
c
,
nil
,
1
,
1
,
syncard
,
mg
,
smat
,
c1
,
nil
,
nil
,
gc
,
mgchk
,
goalchk
))
else
return
mg
:
IsExists
(
Auxiliary
.
SynMixFilter4
,
1
,
c1
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
nil
,
nil
,
gc
,
mgchk
)
return
mg
:
IsExists
(
Auxiliary
.
SynMixFilter4
,
1
,
c1
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
nil
,
nil
,
gc
,
mgchk
,
goalchk
)
end
end
function
Auxiliary
.
SynMixFilter3
(
c
,
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
c2
,
gc
,
mgchk
)
function
Auxiliary
.
SynMixFilter3
(
c
,
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
c2
,
gc
,
mgchk
,
goalchk
)
if
f3
then
return
f3
(
c
,
syncard
,
c1
,
c2
)
and
(
mg
:
IsExists
(
Auxiliary
.
SynMixFilter4
,
1
,
Group
.
FromCards
(
c1
,
c2
,
c
),
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
c2
,
c
,
gc
,
mgchk
)
or
minc
==
0
and
Auxiliary
.
SynMixFilter4
(
c
,
nil
,
1
,
1
,
syncard
,
mg
,
smat
,
c1
,
c2
,
nil
,
gc
,
mgchk
))
and
(
mg
:
IsExists
(
Auxiliary
.
SynMixFilter4
,
1
,
Group
.
FromCards
(
c1
,
c2
,
c
),
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
c2
,
c
,
gc
,
mgchk
,
goalchk
)
or
minc
==
0
and
Auxiliary
.
SynMixFilter4
(
c
,
nil
,
1
,
1
,
syncard
,
mg
,
smat
,
c1
,
c2
,
nil
,
gc
,
mgchk
,
goalchk
))
else
return
mg
:
IsExists
(
Auxiliary
.
SynMixFilter4
,
1
,
Group
.
FromCards
(
c1
,
c2
),
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
c2
,
nil
,
gc
,
mgchk
)
return
mg
:
IsExists
(
Auxiliary
.
SynMixFilter4
,
1
,
Group
.
FromCards
(
c1
,
c2
),
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
c2
,
nil
,
gc
,
mgchk
,
goalchk
)
end
end
function
Auxiliary
.
SynMixFilter4
(
c
,
f4
,
minc
,
maxc
,
syncard
,
mg1
,
smat
,
c1
,
c2
,
c3
,
gc
,
mgchk
)
function
Auxiliary
.
SynMixFilter4
(
c
,
f4
,
minc
,
maxc
,
syncard
,
mg1
,
smat
,
c1
,
c2
,
c3
,
gc
,
mgchk
,
goalchk
)
if
f4
and
not
f4
(
c
,
syncard
,
c1
,
c2
,
c3
)
then
return
false
end
local
sg
=
Group
.
FromCards
(
c1
,
c
)
sg
:
AddCard
(
c1
)
...
...
@@ -318,24 +345,33 @@ function Auxiliary.SynMixFilter4(c,f4,minc,maxc,syncard,mg1,smat,c1,c2,c3,gc,mgc
else
mg
:
Sub
(
sg
)
end
return
Auxiliary
.
SynMixCheck
(
mg
,
sg
,
minc
-
1
,
maxc
-
1
,
syncard
,
smat
,
gc
,
mg
chk
)
return
Auxiliary
.
SynMixCheck
(
mg
,
sg
,
minc
-
1
,
maxc
-
1
,
syncard
,
mg1
,
smat
,
gc
,
mgchk
,
goal
chk
)
end
function
Auxiliary
.
SynMixCheck
(
mg
,
sg1
,
minc
,
maxc
,
syncard
,
smat
,
gc
,
mg
chk
)
function
Auxiliary
.
SynMixCheck
(
mg
,
sg1
,
minc
,
maxc
,
syncard
,
mg1
,
smat
,
gc
,
mgchk
,
goal
chk
)
local
tp
=
syncard
:
GetControler
()
local
sg
=
Group
.
CreateGroup
()
if
minc
<=
0
and
Auxiliary
.
SynMixCheckGoal
(
tp
,
sg1
,
0
,
0
,
syncard
,
sg
,
smat
,
gc
,
mgchk
)
then
return
true
end
if
minc
<=
0
and
Auxiliary
.
SynMixCheckGoal
(
tp
,
sg1
,
0
,
0
,
syncard
,
sg
,
smat
,
gc
,
mgchk
,
goalchk
)
then
return
true
end
if
maxc
==
0
then
return
false
end
return
mg
:
IsExists
(
Auxiliary
.
SynMixCheckRecursive
,
1
,
nil
,
tp
,
sg
,
mg
,
0
,
minc
,
maxc
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
)
local
fulltraversal
=#
mg
<=
5
or
mg1
:
IsExists
(
Card
.
IsHasEffect
,
1
,
nil
,
89818984
)
return
mg
:
IsExists
(
Auxiliary
.
SynMixCheckRecursive
,
1
,
nil
,
tp
,
sg
,
mg
,
0
,
minc
,
maxc
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
,
goalchk
,
fulltraversal
)
end
function
Auxiliary
.
SynMixCheckRecursive
(
c
,
tp
,
sg
,
mg
,
ct
,
minc
,
maxc
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
)
function
Auxiliary
.
SynMixCheckRecursive
(
c
,
tp
,
sg
,
mg
,
ct
,
minc
,
maxc
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
,
goalchk
,
fulltraversal
)
sg
:
AddCard
(
c
)
ct
=
ct
+
1
local
res
=
Auxiliary
.
SynMixCheckGoal
(
tp
,
sg
,
minc
,
ct
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
)
or
(
ct
<
maxc
and
mg
:
IsExists
(
Auxiliary
.
SynMixCheckRecursive
,
1
,
sg
,
tp
,
sg
,
mg
,
ct
,
minc
,
maxc
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
))
local
res
=
Auxiliary
.
SynMixCheckGoal
(
tp
,
sg
,
minc
,
ct
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
,
goalchk
)
if
not
res
and
ct
<
maxc
and
(
fulltraversal
or
not
Auxiliary
.
SynMixCheckPrune
(
sg
,
sg1
,
syncard
))
then
res
=
mg
:
IsExists
(
Auxiliary
.
SynMixCheckRecursive
,
1
,
sg
,
tp
,
sg
,
mg
,
ct
,
minc
,
maxc
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
,
goalchk
,
fulltraversal
)
end
sg
:
RemoveCard
(
c
)
ct
=
ct
-
1
return
res
end
function
Auxiliary
.
SynMixCheckPrune
(
sg
,
sg1
,
syncard
)
local
g
=
sg
+
sg1
local
sumlv
=
g
:
GetSum
(
Auxiliary
.
GetMinSynchroLevel
,
syncard
)
return
sumlv
>=
syncard
:
GetLevel
()
end
-- the material is in hand and don't has extra synchro material effect itself
-- that mean some other tuner added it as material
function
Auxiliary
.
SynMixHandFilter
(
c
,
tp
,
syncard
)
...
...
@@ -368,10 +404,10 @@ function Auxiliary.SynMixHandCheck(g,tp,syncard)
end
return
true
end
function
Auxiliary
.
SynMixCheckGoal
(
tp
,
sg
,
minc
,
ct
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
)
function
Auxiliary
.
SynMixCheckGoal
(
tp
,
sg
,
minc
,
ct
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
,
goalchk
)
if
goalchk
then
return
true
end
if
ct
<
minc
then
return
false
end
local
g
=
sg
:
Clone
()
g
:
Merge
(
sg1
)
local
g
=
sg
+
sg1
if
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
syncard
)
<=
0
then
return
false
end
if
gc
and
not
gc
(
g
,
syncard
,
tp
)
then
return
false
end
if
smat
and
not
g
:
IsContains
(
smat
)
then
return
false
end
...
...
@@ -414,6 +450,12 @@ function Auxiliary.TuneMagicianCheckAdditionalX(ecode)
return
not
g
:
IsExists
(
Auxiliary
.
TuneMagicianCheckX
,
1
,
nil
,
g
,
ecode
)
end
end
function
Auxiliary
.
SynGroupCheckLevelAddition
(
syncard
)
return
function
(
g
)
local
sumlv
=
g
:
GetSum
(
Auxiliary
.
GetMinSynchroLevel
,
syncard
)
return
sumlv
<=
syncard
:
GetLevel
()
end
end
--Xyz Summon
function
Auxiliary
.
XyzAlterFilter
(
c
,
alterf
,
xyzc
,
e
,
tp
,
alterop
)
...
...
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