Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
no81cards
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
Nemo Ma
no81cards
Commits
7545becb
Commit
7545becb
authored
Sep 12, 2021
by
Nemo Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
420efab8
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
347 additions
and
233 deletions
+347
-233
expansions/script/c1.lua
expansions/script/c1.lua
+0
-4
expansions/script/c10150030.lua
expansions/script/c10150030.lua
+3
-3
expansions/script/c188801.lua
expansions/script/c188801.lua
+244
-134
expansions/script/c22020840.lua
expansions/script/c22020840.lua
+1
-1
expansions/script/c33400008.lua
expansions/script/c33400008.lua
+4
-3
expansions/script/c33403509.lua
expansions/script/c33403509.lua
+9
-40
expansions/script/c33701323.lua
expansions/script/c33701323.lua
+13
-4
expansions/script/c40006764.lua
expansions/script/c40006764.lua
+23
-9
expansions/script/c40006766.lua
expansions/script/c40006766.lua
+25
-11
expansions/script/c81011002.lua
expansions/script/c81011002.lua
+25
-24
No files found.
expansions/script/c1.lua
deleted
100644 → 0
View file @
420efab8
--
function
c1
.
initial_effect
(
c
)
end
expansions/script/c10150030.lua
View file @
7545becb
...
...
@@ -19,7 +19,7 @@ function c10150030.spfilter(c,e,tp)
return
c
:
IsType
(
TYPE_SYNCHRO
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEUP
)
end
function
c10150030
.
cfilter
(
c
)
return
Duel
.
Get
LocationCountFromEx
(
tp
,
tp
,
c
)
>
0
return
Duel
.
Get
MZoneCount
(
tp
,
c
)
>
0
end
function
c10150030
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
...
...
@@ -40,7 +40,7 @@ function c10150030.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function
c10150030
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
FromEx
(
tp
)
>
0
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
c10150030
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
):
GetFirst
()
if
tc
and
Duel
.
SpecialSummonStep
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
then
...
...
expansions/script/c188801.lua
View file @
7545becb
...
...
@@ -3,19 +3,8 @@ local m=188801
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--synchro summon
c
:
EnableReviveLimit
()
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_SPSUMMON_PROC
)
e1
:
SetProperty
(
EFFECT_FLAG_UNCOPYABLE
+
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetRange
(
LOCATION_EXTRA
)
e1
:
SetCondition
(
cm
.
syncon
)
e1
:
SetTarget
(
cm
.
syntg
)
e1
:
SetOperation
(
cm
.
synop
)
e1
:
SetValue
(
SUMMON_TYPE_SYNCHRO
)
c
:
RegisterEffect
(
e1
)
cm
.
AddSynchroMixProcedure
(
c
,
nil
,
nil
,
nil
,
nil
,
1
,
99
,
nil
)
--atkup
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
@@ -49,145 +38,266 @@ function cm.initial_effect(c)
e6
:
SetValue
(
1
)
c
:
RegisterEffect
(
e6
)
end
function
cm
.
CheckGroup
(
g
,
f
,
cg
,
min
,
max
,
...
)
if
cg
then
Duel
.
SetSelectedCard
(
cg
)
end
return
g
:
CheckSubGroup
(
f
,
min
,
max
,
...
)
end
function
cm
.
SelectGroupNew
(
tp
,
desc
,
cancelable
,
g
,
f
,
cg
,
min
,
max
,
...
)
local
min
=
min
or
1
local
max
=
max
or
#
g
local
ext_params
=
{
...
}
if
cg
then
Duel
.
SetSelectedCard
(
cg
)
end
Duel
.
Hint
(
tp
,
HINT_SELECTMSG
,
desc
)
return
g
:
SelectSubGroup
(
tp
,
f
,
cancelable
,
min
,
max
,
...
)
end
function
cm
.
SelectGroup
(
tp
,
desc
,
g
,
f
,
cg
,
min
,
max
,
...
)
return
cm
.
SelectGroupNew
(
tp
,
desc
,
false
,
g
,
f
,
cg
,
min
,
max
,
...
)
end
function
cm
.
matfilter1
(
c
,
syncard
,
tp
)
if
c
:
IsFacedown
()
then
return
false
end
if
c
:
IsLocation
(
LOCATION_OVERLAY
)
and
c
:
IsLevelAbove
(
1
)
then
return
c
:
IsSetCard
(
0x7e
)
or
c
:
IsSynchroType
(
TYPE_TUNER
)
end
return
c
:
IsSynchroType
(
TYPE_TUNER
)
and
c
:
IsCanBeSynchroMaterial
(
syncard
)
function
cm
.
AddSynchroMixProcedure
(
c
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
gc
)
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
(
cm
.
SynMixCondition
(
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
gc
))
e1
:
SetTarget
(
cm
.
SynMixTarget
(
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
gc
))
e1
:
SetOperation
(
cm
.
SynMixOperation
(
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
gc
))
e1
:
SetValue
(
SUMMON_TYPE_SYNCHRO
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
matfilter2
(
c
,
syncard
)
if
c
:
IsLocation
(
LOCATION_OVERLAY
)
and
c
:
IsLevelAbove
(
1
)
and
c
:
IsNotTuner
(
syncard
)
then
return
true
end
return
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsFaceup
())
and
c
:
IsNotTuner
(
syncard
)
and
c
:
IsCanBeSynchroMaterial
(
syncard
)
function
cm
.
AddSynchroMixProcedure
(
c
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
gc
)
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
(
cm
.
SynMixCondition
(
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
gc
))
e1
:
SetTarget
(
cm
.
SynMixTarget
(
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
gc
))
e1
:
SetOperation
(
cm
.
SynMixOperation
(
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
gc
))
e1
:
SetValue
(
SUMMON_TYPE_SYNCHRO
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
val
(
c
,
syncard
)
return
c
:
GetSynchroLeve
l
(
syncard
)
function
cm
.
SynMaterialFilter
(
c
,
syncard
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeSynchroMateria
l
(
syncard
)
end
function
cm
.
CheckGroupRecursive
(
c
,
sg
,
g
,
f
,
min
,
max
,
ext_params
)
sg
:
AddCard
(
c
)
local
ct
=
sg
:
GetCount
()
local
res
=
(
ct
>=
min
and
f
(
sg
,
table.unpack
(
ext_params
)))
or
(
ct
<
max
and
g
:
IsExists
(
cm
.
CheckGroupRecursive
,
1
,
sg
,
sg
,
g
,
f
,
min
,
max
,
ext_params
))
sg
:
RemoveCard
(
c
)
return
res
function
cm
.
SynLimitFilter
(
c
,
f
,
e
,
syncard
)
return
f
and
not
f
(
e
,
c
,
syncard
)
end
function
cm
.
synfilter
(
c
,
syncard
,
lv
,
g2
,
g3
,
minc
,
maxc
,
tp
)
local
tsg
=
c
:
IsHasEffect
(
EFFECT_HAND_SYNCHRO
)
and
g3
or
g2
local
f
=
c
.
tuner_filter
if
c
.
tuner_filter
then
tsg
=
tsg
:
Filter
(
f
,
nil
)
end
return
cm
.
CheckGroup
(
tsg
,
cm
.
goal
,
Group
.
FromCards
(
c
),
minc
,
maxc
,
tp
,
lv
,
syncard
,
c
)
function
cm
.
GetSynchroLevelFlowerCardian
(
c
)
return
2
end
function
cm
.
goal
(
g
,
tp
,
lv
,
syncard
,
tuc
)
if
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
syncard
)
<=
0
then
return
false
end
if
tuc
:
IsHasEffect
(
EFFECT_HAND_SYNCHRO
)
and
g
:
IsExists
(
Card
.
IsLocation
,
2
,
tuc
,
LOCATION_HAND
)
then
return
false
end
local
ct
=
g
:
GetCount
()
return
g
:
CheckWithSumEqual
(
cm
.
val
,
lv
,
ct
,
ct
,
syncard
)
function
cm
.
GetSynMaterials
(
tp
,
syncard
)
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
SynMaterialFilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
syncard
)
if
mg
:
IsExists
(
Card
.
GetHandSynchro
,
1
,
nil
)
then
local
mg2
=
Duel
.
GetMatchingGroup
(
Card
.
IsCanBeSynchroMaterial
,
tp
,
LOCATION_HAND
,
0
,
nil
,
syncard
)
if
mg2
:
GetCount
()
>
0
then
mg
:
Merge
(
mg2
)
end
end
return
mg
end
function
cm
.
syncon
(
e
,
c
,
tuner
,
mg
)
function
cm
.
SynMixCondition
(
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
gc
)
return
function
(
e
,
c
,
smat
,
mg1
,
min
,
max
)
if
c
==
nil
then
return
true
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
local
minc
=
minc
local
maxc
=
maxc
if
min
then
if
min
>
minc
then
minc
=
min
end
if
max
<
maxc
then
maxc
=
max
end
if
minc
>
maxc
then
return
false
end
end
local
tp
=
c
:
GetControler
()
local
minc
=
2
local
maxc
=
c
:
GetLevel
()
local
g1
=
nil
local
g2
=
nil
local
g3
=
nil
local
sg
=
nil
local
sg1
=
nil
local
sg2
=
nil
if
mg
then
g1
=
mg
:
Filter
(
cm
.
matfilter1
,
nil
,
c
,
tp
)
g2
=
mg
:
Filter
(
cm
.
matfilter2
,
nil
,
c
)
g3
=
g2
:
Clone
()
else
sg
=
Duel
.
GetOverlayGroup
(
tp
,
LOCATION_ONFIELD
,
0
)
sg1
=
sg
:
Filter
(
cm
.
matfilter1
,
nil
,
c
,
tp
)
sg2
=
sg
:
Filter
(
cm
.
matfilter1
,
nil
,
c
,
tp
)
g1
=
Duel
.
GetMatchingGroup
(
cm
.
matfilter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
c
,
tp
)
g2
=
Duel
.
GetMatchingGroup
(
cm
.
matfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
c
)
g3
=
Duel
.
GetMatchingGroup
(
cm
.
matfilter2
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
,
LOCATION_MZONE
,
nil
,
c
)
g1
:
Merge
(
sg1
)
g2
:
Merge
(
sg2
)
end
local
pe
=
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_SMATERIAL
)
local
lv
=
c
:
GetLevel
()
local
sg
=
nil
if
tuner
then
return
cm
.
matfilter1
(
c
,
tp
)
and
cm
.
synfilter
(
tuner
,
c
,
lv
,
g2
,
g3
,
minc
,
maxc
,
tp
)
elseif
pe
then
return
cm
.
matfilter1
(
pe
:
GetOwner
(),
tp
)
and
cm
.
synfilter
(
pe
:
GetOwner
(),
c
,
lv
,
g2
,
g3
,
minc
,
maxc
,
tp
)
else
return
g1
:
IsExists
(
cm
.
synfilter
,
1
,
nil
,
c
,
lv
,
g2
,
g3
,
minc
,
maxc
,
tp
)
end
end
function
cm
.
syntg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
tuner
,
mg
)
local
minc
=
2
local
maxc
=
c
:
GetLevel
()
local
g1
=
nil
local
g2
=
nil
local
g3
=
nil
local
sg
=
nil
local
sg1
=
nil
local
sg2
=
nil
if
mg
then
g1
=
mg
:
Filter
(
cm
.
matfilter1
,
nil
,
c
,
tp
)
g2
=
mg
:
Filter
(
cm
.
matfilter2
,
nil
,
c
)
g3
=
g2
:
Clone
()
local
mg
local
mgchk
=
false
if
mg1
then
mg
=
mg1
mgchk
=
true
else
sg
=
Duel
.
GetOverlayGroup
(
tp
,
LOCATION_ONFIELD
,
0
)
sg1
=
sg
:
Filter
(
cm
.
matfilter1
,
nil
,
c
,
tp
)
sg2
=
sg
:
Filter
(
cm
.
matfilter1
,
nil
,
c
,
tp
)
g1
=
Duel
.
GetMatchingGroup
(
cm
.
matfilter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
c
,
tp
)
g2
=
Duel
.
GetMatchingGroup
(
cm
.
matfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
,
c
)
g3
=
Duel
.
GetMatchingGroup
(
cm
.
matfilter2
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
,
LOCATION_MZONE
,
nil
,
c
)
g1
:
Merge
(
sg1
)
g2
:
Merge
(
sg2
)
end
local
pe
=
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_MUST_BE_SMATERIAL
)
local
lv
=
c
:
GetLevel
()
local
tuc
=
nil
if
tuner
then
tuc
=
tuner
mg
=
cm
.
GetSynMaterials
(
tp
,
c
)
end
if
smat
~=
nil
then
mg
:
AddCard
(
smat
)
end
return
mg
:
IsExists
(
cm
.
SynMixFilter1
,
1
,
nil
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
gc
,
mgchk
)
end
end
function
cm
.
SynMixTarget
(
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
gc
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
c
,
smat
,
mg1
,
min
,
max
)
local
minc
=
minc
local
maxc
=
maxc
if
min
then
if
min
>
minc
then
minc
=
min
end
if
max
<
maxc
then
maxc
=
max
end
if
minc
>
maxc
then
return
false
end
end
local
g
=
Group
.
CreateGroup
()
local
mg
if
mg1
then
mg
=
mg1
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
m
,
2
))
if
not
pe
then
local
t1
=
g1
:
FilterSelect
(
tp
,
cm
.
synfilter
,
1
,
1
,
nil
,
c
,
lv
,
g2
,
g3
,
minc
,
maxc
,
tp
)
tuc
=
t1
:
GetFirst
()
mg
=
cm
.
GetSynMaterials
(
tp
,
c
)
end
if
smat
~=
nil
then
mg
:
AddCard
(
smat
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
c1
=
mg
:
FilterSelect
(
tp
,
cm
.
SynMixFilter1
,
1
,
1
,
nil
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
gc
):
GetFirst
()
g
:
AddCard
(
c1
)
if
f2
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
c2
=
mg
:
FilterSelect
(
tp
,
cm
.
SynMixFilter2
,
1
,
1
,
c1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
c1
,
gc
):
GetFirst
()
g
:
AddCard
(
c2
)
if
f3
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
c3
=
mg
:
FilterSelect
(
tp
,
cm
.
SynMixFilter3
,
1
,
1
,
Group
.
FromCards
(
c1
,
c2
),
f3
,
f4
,
minc
,
maxc
,
c
,
mg
,
smat
,
c1
,
c2
,
gc
):
GetFirst
()
g
:
AddCard
(
c3
)
end
end
local
g4
=
Group
.
CreateGroup
()
for
i
=
0
,
maxc
-
1
do
local
mg2
=
mg
:
Clone
()
if
f4
then
mg2
=
mg2
:
Filter
(
f4
,
g
,
c
)
else
tuc
=
pe
:
GetOwner
()
Group
.
FromCards
(
tuc
):
Select
(
tp
,
1
,
1
,
nil
)
mg2
:
Sub
(
g
)
end
local
cg
=
mg2
:
Filter
(
cm
.
SynMixCheckRecursive
,
g4
,
tp
,
g4
,
mg2
,
i
,
minc
,
maxc
,
c
,
g
,
smat
,
gc
)
if
cg
:
GetCount
()
==
0
then
break
end
local
minct
=
1
if
cm
.
SynMixCheckGoal
(
tp
,
g4
,
minc
,
i
,
c
,
g
,
smat
,
gc
)
then
minct
=
0
end
tuc
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
local
tsg
=
tuc
:
IsHasEffect
(
EFFECT_HAND_SYNCHRO
)
and
g3
or
g2
local
f
=
tuc
.
tuner_filter
if
tuc
.
tuner_filter
then
tsg
=
tsg
:
Filter
(
f
,
nil
)
end
local
g
=
cm
.
SelectGroup
(
tp
,
HINTMSG_SMATERIAL
,
tsg
,
cm
.
goal
,
Group
.
FromCards
(
tuc
),
minc
,
maxc
,
tp
,
lv
,
c
,
tuc
)
if
g
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
tg
=
cg
:
Select
(
tp
,
minct
,
1
,
nil
)
if
tg
:
GetCount
()
==
0
then
break
end
g4
:
Merge
(
tg
)
end
g
:
Merge
(
g4
)
if
g
:
GetCount
()
>
0
then
g
:
KeepAlive
()
e
:
SetLabelObject
(
g
)
return
true
else
return
false
end
end
end
function
cm
.
synop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
tuner
,
mg
)
function
cm
.
SynMixOperation
(
f1
,
f2
,
f3
,
f4
,
minct
,
maxc
,
gc
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
,
smat
,
mg
,
min
,
max
)
local
g
=
e
:
GetLabelObject
()
c
:
SetMaterial
(
g
)
Duel
.
SendtoGrave
(
g
,
REASON_MATERIAL
+
REASON_SYNCHRO
)
g
:
DeleteGroup
()
Duel
.
Hint
(
HINT_MUSIC
,
0
,
m
*
16
+
2
)
end
end
function
cm
.
SynMixFilter1
(
c
,
f1
,
f2
,
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
gc
,
mgchk
)
return
(
not
f1
or
f1
(
c
,
syncard
))
and
mg
:
IsExists
(
cm
.
SynMixFilter2
,
1
,
c
,
f2
,
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c
,
gc
,
mgchk
)
end
function
cm
.
SynMixFilter2
(
c
,
f2
,
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
gc
,
mgchk
)
if
f2
then
return
f2
(
c
,
syncard
,
c1
)
and
mg
:
IsExists
(
cm
.
SynMixFilter3
,
1
,
Group
.
FromCards
(
c1
,
c
),
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
c
,
gc
,
mgchk
)
else
return
mg
:
IsExists
(
cm
.
SynMixFilter4
,
1
,
c1
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
nil
,
nil
,
gc
,
mgchk
)
end
end
function
cm
.
SynMixFilter3
(
c
,
f3
,
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
c2
,
gc
,
mgchk
)
if
f3
then
return
f3
(
c
,
syncard
,
c1
,
c2
)
and
mg
:
IsExists
(
cm
.
SynMixFilter4
,
1
,
Group
.
FromCards
(
c1
,
c2
,
c
),
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
c2
,
c
,
gc
,
mgchk
)
else
return
mg
:
IsExists
(
cm
.
SynMixFilter4
,
1
,
Group
.
FromCards
(
c1
,
c2
),
f4
,
minc
,
maxc
,
syncard
,
mg
,
smat
,
c1
,
c2
,
nil
,
gc
,
mgchk
)
end
end
function
cm
.
SynMixFilter4
(
c
,
f4
,
minc
,
maxc
,
syncard
,
mg1
,
smat
,
c1
,
c2
,
c3
,
gc
,
mgchk
)
if
f4
and
not
f4
(
c
,
syncard
,
c1
,
c2
,
c3
)
then
return
false
end
local
sg
=
Group
.
FromCards
(
c1
,
c
)
sg
:
AddCard
(
c1
)
if
c2
then
sg
:
AddCard
(
c2
)
end
if
c3
then
sg
:
AddCard
(
c3
)
end
local
mg
=
mg1
:
Clone
()
if
f4
then
mg
=
mg
:
Filter
(
f4
,
sg
,
syncard
)
else
mg
:
Sub
(
sg
)
end
return
cm
.
SynMixCheck
(
mg
,
sg
,
minc
-
1
,
maxc
-
1
,
syncard
,
smat
,
gc
,
mgchk
)
end
function
cm
.
SynMixCheck
(
mg
,
sg1
,
minc
,
maxc
,
syncard
,
smat
,
gc
,
mgchk
)
local
tp
=
syncard
:
GetControler
()
local
sg
=
Group
.
CreateGroup
()
if
minc
==
0
and
cm
.
SynMixCheckGoal
(
tp
,
sg1
,
0
,
0
,
syncard
,
sg
,
smat
,
gc
,
mgchk
)
then
return
true
end
if
maxc
==
0
then
return
false
end
return
mg
:
IsExists
(
cm
.
SynMixCheckRecursive
,
1
,
nil
,
tp
,
sg
,
mg
,
0
,
minc
,
maxc
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
)
end
function
cm
.
SynMixCheckRecursive
(
c
,
tp
,
sg
,
mg
,
ct
,
minc
,
maxc
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
)
sg
:
AddCard
(
c
)
ct
=
ct
+
1
local
res
=
cm
.
SynMixCheckGoal
(
tp
,
sg
,
minc
,
ct
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
)
or
(
ct
<
maxc
and
mg
:
IsExists
(
cm
.
SynMixCheckRecursive
,
1
,
sg
,
tp
,
sg
,
mg
,
ct
,
minc
,
maxc
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
))
sg
:
RemoveCard
(
c
)
ct
=
ct
-
1
return
res
end
function
cm
.
SynMixCheckGoal
(
tp
,
sg
,
minc
,
ct
,
syncard
,
sg1
,
smat
,
gc
,
mgchk
)
if
ct
<
minc
then
return
false
end
local
g
=
sg
:
Clone
()
g
:
Merge
(
sg1
)
if
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
syncard
)
<=
0
then
return
false
end
if
gc
and
not
gc
(
g
)
then
return
false
end
if
smat
and
not
g
:
IsContains
(
smat
)
then
return
false
end
if
not
aux
.
MustMaterialCheck
(
g
,
tp
,
EFFECT_MUST_BE_SMATERIAL
)
then
return
false
end
if
not
g
:
CheckWithSumEqual
(
Card
.
GetSynchroLevel
,
syncard
:
GetLevel
(),
g
:
GetCount
(),
g
:
GetCount
(),
syncard
)
and
(
not
g
:
IsExists
(
Card
.
IsHasEffect
,
1
,
nil
,
89818984
)
or
not
g
:
CheckWithSumEqual
(
cm
.
GetSynchroLevelFlowerCardian
,
syncard
:
GetLevel
(),
g
:
GetCount
(),
g
:
GetCount
(),
syncard
))
then
return
false
end
local
hg
=
g
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
)
local
hct
=
hg
:
GetCount
()
if
hct
>
0
and
not
mgchk
then
local
found
=
false
for
c
in
aux
.
Next
(
g
)
do
local
he
,
hf
,
hmin
,
hmax
=
c
:
GetHandSynchro
()
if
he
then
found
=
true
if
hf
and
hg
:
IsExists
(
cm
.
SynLimitFilter
,
1
,
c
,
hf
,
he
,
syncard
)
then
return
false
end
if
(
hmin
and
hct
<
hmin
)
or
(
hmax
and
hct
>
hmax
)
then
return
false
end
end
end
if
not
found
then
return
false
end
end
for
c
in
aux
.
Next
(
g
)
do
if
c
:
IsLocation
(
LOCATION_OVERLAY
)
and
c
:
IsSetCard
(
0x7e
)
then
if
not
c
:
IsSynchroType
(
TYPE_TUNER
)
and
g
:
IsExists
(
Card
.
IsSynchroType
,
2
,
nil
,
TYPE_TUNER
)
then
return
false
end
if
c
:
IsSynchroType
(
TYPE_TUNER
)
and
g
:
IsExists
(
Card
.
IsSynchroType
,
1
,
c
,
TYPE_TUNER
)
then
return
false
end
end
if
c
:
IsLocation
(
LOCATION_OVERLAY
)
and
not
c
:
IsSetCard
(
0x7e
)
then
if
c
:
IsSynchroType
(
TYPE_TUNER
)
and
g
:
IsExists
(
Card
.
IsSynchroType
,
1
,
c
,
TYPE_TUNER
)
then
return
false
end
if
not
c
:
IsSynchroType
(
TYPE_TUNER
)
and
g
:
IsExists
(
Card
.
IsSynchroType
,
2
,
nil
,
TYPE_TUNER
)
then
return
false
end
end
if
g
:
FilterCount
(
Card
.
IsSynchroType
,
nil
,
TYPE_TUNER
)
==
0
and
not
g
:
IsExists
(
Card
.
IsLocation
,
1
,
nil
,
LOCATION_OVERLAY
)
then
return
false
end
local
le
,
lf
,
lloc
,
lmin
,
lmax
=
c
:
GetTunerLimit
()
if
le
then
local
lct
=
g
:
GetCount
()
-
1
if
lloc
then
local
llct
=
g
:
FilterCount
(
Card
.
IsLocation
,
c
,
lloc
)
if
llct
~=
lct
then
return
false
end
end
if
lf
and
g
:
IsExists
(
cm
.
SynLimitFilter
,
1
,
c
,
lf
,
le
,
syncard
)
then
return
false
end
if
(
lmin
and
lct
<
lmin
)
or
(
lmax
and
lct
>
lmax
)
then
return
false
end
end
end
return
true
end
function
cm
.
SynMaterialFilter
(
c
,
syncard
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeSynchroMaterial
(
syncard
)
end
function
cm
.
SynLimitFilter
(
c
,
f
,
e
,
syncard
)
return
f
and
not
f
(
e
,
c
,
syncard
)
end
function
cm
.
GetSynchroLevelFlowerCardian
(
c
)
return
2
end
function
cm
.
filtersyn
(
c
,
syncard
)
return
c
:
IsCanBeSynchroMaterial
(
syncard
)
end
function
cm
.
GetSynMaterials
(
tp
,
syncard
)
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
SynMaterialFilter
,
tp
,
LOCATION_MZONE
+
LOCATION_OVERLAY
,
LOCATION_MZONE
,
nil
,
syncard
)
if
mg
:
IsExists
(
Card
.
GetHandSynchro
,
1
,
nil
)
then
local
mg2
=
Duel
.
GetMatchingGroup
(
Card
.
IsCanBeSynchroMaterial
,
tp
,
LOCATION_HAND
,
0
,
nil
,
syncard
)
if
mg2
:
GetCount
()
>
0
then
mg
:
Merge
(
mg2
)
end
end
local
sg
=
Duel
.
GetOverlayGroup
(
tp
,
LOCATION_ONFIELD
,
0
)
sg
:
Filter
(
cm
.
filtersyn
,
nil
,
syncard
)
mg
:
Merge
(
sg
)
return
mg
end
function
cm
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsSetCard
(
0x107f
)
and
c
:
GetOverlayCount
()
>
0
...
...
expansions/script/c22020840.lua
View file @
7545becb
...
...
@@ -64,7 +64,7 @@ function c22020840.splimit(e,c)
return
not
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
end
function
c22020840
.
filter
(
c
,
e
,
tp
)
return
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
and
c
:
IsRace
(
RACE_DRAGON
)
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
and
c
:
IsRace
(
RACE_DRAGON
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c22020840
.
sptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c22020840
.
filter
(
chkc
,
e
,
tp
)
end
...
...
expansions/script/c33400008.lua
View file @
7545becb
--时崎狂三---时之战士
function
c33400008
.
initial_effect
(
c
)
c
:
EnableCounterPermit
(
0x34f
)
aux
.
AddLinkProcedure
(
c
,
c33400008
.
mfilter
,
2
)
c
:
EnableReviveLimit
()
--activate from hand
...
...
@@ -14,7 +15,7 @@ function c33400008.initial_effect(c)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e2
:
SetCountLimit
(
1
,
33400008
)
e2
:
SetRange
(
LOCATION_MZONE
)
...
...
@@ -75,9 +76,9 @@ end
function
c33400008
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
:
IsFaceup
()
and
chkc
~=
c
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
c
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsFaceup
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
c
)
local
g
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
c
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c33400008
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
expansions/script/c33403509.lua
View file @
7545becb
...
...
@@ -17,7 +17,8 @@ function cm.initial_effect(c)
end
function
cm
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
33413501
)
<
(
Duel
.
GetFlagEffect
(
tp
,
33403501
)
/
2
+
1
)
and
Duel
.
GetFlagEffect
(
tp
,
m
+
30000
)
==
0
and
Duel
.
GetFlagEffect
(
tp
,
33443500
)
==
0
local
ss
=
Duel
.
GetTurnCount
()
return
Duel
.
GetFlagEffect
(
tp
,
33413501
)
<
ss
and
Duel
.
GetFlagEffect
(
tp
,
m
+
30000
)
==
0
and
Duel
.
GetFlagEffect
(
tp
,
33443500
)
==
0
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
...
...
@@ -35,52 +36,18 @@ function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return
not
se
:
GetHandler
():
IsSetCard
(
0x5349
)
and
not
c
:
IsCode
(
33403500
)
end
function
cm
.
filter
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsAbleToHand
()
or
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
))
return
c
:
IsType
(
TYPE_MONSTER
)
and
(
c
:
IsAbleToHand
()
or
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
))
and
(
c
:
IsFaceup
()
or
c
:
IsLocation
(
LOCATION_GRAVE
))
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
GetLocation
()
==
LOCATION_GRAVE
+
LOCATION_REMOVED
and
cm
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
if
e
:
GetLabel
()
==
1
then
local
c
=
e
:
GetHandler
()
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAIN_NEGATED
)
e2
:
SetCondition
(
cm
.
regcon
)
e2
:
SetOperation
(
cm
.
regop2
)
e2
:
SetReset
(
RESET_EVENT
+
RESET_CHAIN
+
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
RegisterFlagEffect
(
tp
,
m
+
20000
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
--t2
Duel
.
RegisterFlagEffect
(
tp
,
33413501
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
--t1
Duel
.
RegisterFlagEffect
(
tp
,
33403501
,
0
,
0
,
0
)
--duel 1
e
:
SetLabel
(
2
)
end
end
function
cm
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
re
:
GetHandler
():
IsSetCard
(
0x5349
)
and
rp
==
tp
end
function
cm
.
regop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
n1
=
Duel
.
GetFlagEffect
(
tp
,
33413501
)
local
n2
=
Duel
.
GetFlagEffect
(
tp
,
33403501
)
local
n3
=
Duel
.
GetFlagEffect
(
tp
,
m
+
20000
)
Duel
.
ResetFlagEffect
(
tp
,
33413501
)
Duel
.
ResetFlagEffect
(
tp
,
33403501
)
Duel
.
ResetFlagEffect
(
tp
,
m
+
20000
)
if
n1
>=
2
then
for
i
=
1
,
n1
-
1
do
Duel
.
RegisterFlagEffect
(
tp
,
33413501
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
if
n2
>=
2
then
for
i
=
1
,
n2
-
1
do
if
e
:
GetLabel
()
==
1
then
Duel
.
RegisterFlagEffect
(
tp
,
m
+
20000
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
--t1
Duel
.
RegisterFlagEffect
(
tp
,
33413501
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
--t1+t2
Duel
.
RegisterFlagEffect
(
tp
,
33403501
,
0
,
0
,
0
)
end
end
if
n3
>=
2
then
for
i
=
1
,
n3
do
Duel
.
RegisterFlagEffect
(
tp
,
m
+
20000
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
e
:
SetLabel
(
2
)
end
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
@@ -98,6 +65,8 @@ local c=e:GetHandler()
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
--indes
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e3
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
e3
:
SetRange
(
LOCATION_MZONE
)
...
...
expansions/script/c33701323.lua
View file @
7545becb
...
...
@@ -11,13 +11,22 @@ function c33701323.initial_effect(c)
e1
:
SetCondition
(
c33701323
.
spcon
)
e1
:
SetOperation
(
c33701323
.
spop
)
c
:
RegisterEffect
(
e1
)
--
--
cannot be material
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e2
:
SetCode
(
EFFECT_CANNOT_BE_FUSION_MATERIAL
)
e2
:
SetValue
(
c33701323
.
synlimit
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e2
:
Clone
()
e4
:
SetCode
(
EFFECT_CANNOT_BE_XYZ_MATERIAL
)
c
:
RegisterEffect
(
e4
)
local
e5
=
e2
:
Clone
()
e5
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
c
:
RegisterEffect
(
e5
)
end
function
c33701323
.
spfil
(
c
)
return
c
:
IsCanBeLinkMaterial
(
nil
)
and
(
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
or
c
:
IsRace
(
RACE_CYBERSE
))
...
...
expansions/script/c40006764.lua
View file @
7545becb
...
...
@@ -42,20 +42,34 @@ function cm.initial_effect(c)
e4
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e4
)
end
function
cm
.
mat
filter
(
c
)
return
c
:
Is
CanOverlay
()
and
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsLevelAbove
(
1
)
and
c
:
IsFaceup
()
function
cm
.
tgr
filter
(
c
)
return
c
:
Is
Faceup
()
and
c
:
IsLevelAbove
(
1
)
and
c
:
IsCanOverlay
()
end
function
cm
.
gcheck
(
g
,
tp
,
c
)
return
g
:
CheckWithSumEqual
(
Card
.
GetLevel
,
8
,
2
,
2
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
c
)
>
0
function
cm
.
tgrfilter1
(
c
)
return
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsLevelAbove
(
1
)
end
function
cm
.
con
(
e
,
c
,
tp
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
matfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
return
g
:
CheckSubGroup
(
cm
.
gcheck
,
2
,
2
,
tp
,
c
)
function
cm
.
mnfilter
(
c
,
g
)
return
g
:
IsExists
(
cm
.
mnfilter2
,
1
,
c
,
c
)
end
function
cm
.
mnfilter2
(
c
,
mc
)
return
c
:
GetLevel
()
+
mc
:
GetLevel
()
==
8
end
function
cm
.
fselect
(
g
,
tp
,
sc
)
return
g
:
GetCount
()
==
2
and
g
:
IsExists
(
cm
.
tgrfilter1
,
2
,
nil
)
and
g
:
IsExists
(
cm
.
mnfilter
,
1
,
nil
,
g
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
sc
)
>
0
end
function
cm
.
con
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
tgrfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
return
g
:
CheckSubGroup
(
cm
.
fselect
,
2
,
2
,
tp
,
c
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
mat
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
tgr
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
matg
=
g
:
SelectSubGroup
(
tp
,
cm
.
gcheck
,
false
,
2
,
2
,
tp
,
c
)
local
matg
=
g
:
SelectSubGroup
(
tp
,
cm
.
fselect
,
false
,
2
,
2
,
tp
,
c
)
local
og
=
Group
.
CreateGroup
()
for
tc
in
aux
.
Next
(
matg
)
do
og
:
Merge
(
tc
:
GetOverlayGroup
())
...
...
expansions/script/c40006766.lua
View file @
7545becb
...
...
@@ -38,20 +38,34 @@ function cm.initial_effect(c)
e4
:
SetOperation
(
cm
.
rmop
)
c
:
RegisterEffect
(
e4
)
end
function
cm
.
mat
filter
(
c
)
return
c
:
Is
CanOverlay
()
and
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsLevelAbove
(
1
)
and
c
:
IsFaceup
()
function
cm
.
tgr
filter
(
c
)
return
c
:
Is
Faceup
()
and
c
:
IsLevelAbove
(
1
)
and
c
:
IsCanOverlay
()
end
function
cm
.
gcheck
(
g
,
tp
,
c
)
return
g
:
CheckWithSumEqual
(
Card
.
GetLevel
,
11
,
2
,
2
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
c
)
>
0
function
cm
.
tgrfilter1
(
c
)
return
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsLevelAbove
(
1
)
end
function
cm
.
con
(
e
,
c
,
tp
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
matfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
return
g
:
CheckSubGroup
(
cm
.
gcheck
,
2
,
2
,
tp
,
c
)
function
cm
.
mnfilter
(
c
,
g
)
return
g
:
IsExists
(
cm
.
mnfilter2
,
1
,
c
,
c
)
end
function
cm
.
mnfilter2
(
c
,
mc
)
return
c
:
GetLevel
()
+
mc
:
GetLevel
()
==
11
end
function
cm
.
fselect
(
g
,
tp
,
sc
)
return
g
:
GetCount
()
==
2
and
g
:
IsExists
(
cm
.
tgrfilter1
,
2
,
nil
)
and
g
:
IsExists
(
cm
.
mnfilter
,
1
,
nil
,
g
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
g
,
sc
)
>
0
end
function
cm
.
con
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
tgrfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
return
g
:
CheckSubGroup
(
cm
.
fselect
,
2
,
2
,
tp
,
c
)
end
function
cm
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
mat
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
tgr
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_XMATERIAL
)
local
matg
=
g
:
SelectSubGroup
(
tp
,
cm
.
gcheck
,
false
,
2
,
2
,
tp
,
c
)
local
matg
=
g
:
SelectSubGroup
(
tp
,
cm
.
fselect
,
false
,
2
,
2
,
tp
,
c
)
local
og
=
Group
.
CreateGroup
()
for
tc
in
aux
.
Next
(
matg
)
do
og
:
Merge
(
tc
:
GetOverlayGroup
())
...
...
@@ -81,7 +95,7 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
sc
=
g
:
GetFirst
()
if
sc
:
IsLocation
(
LOCATION_REMOVED
)
and
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
sc
:
IsFaceup
()
and
c
:
IsControler
(
tp
)
and
c
:
IsCanBeXyzMaterial
(
sc
)
and
sc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
fals
e
)
and
c
:
IsCanBeXyzMaterial
(
sc
)
and
sc
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
true
,
tru
e
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
,
sc
)
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
BreakEffect
()
...
...
@@ -91,7 +105,7 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
end
sc
:
SetMaterial
(
Group
.
FromCards
(
c
))
Duel
.
Overlay
(
sc
,
Group
.
FromCards
(
c
))
Duel
.
SpecialSummon
(
sc
,
0
,
tp
,
tp
,
true
,
fals
e
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
sc
,
0
,
tp
,
tp
,
true
,
tru
e
,
POS_FACEUP
)
sc
:
CompleteProcedure
()
end
end
expansions/script/c81011002.lua
View file @
7545becb
--克里斯汀·罗森塔尔
local
m
=
81011002
local
cm
=
_G
[
"c"
..
m
]
xpcall
(
function
()
require
(
"expansions/script/c81000000"
)
end
,
function
()
require
(
"script/c81000000"
)
end
)
function
cm
.
initial_effect
(
c
)
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
...
...
@@ -11,23 +9,26 @@ function cm.initial_effect(c)
e1
:
SetHintTiming
(
0
,
TIMING_REMOVE
+
TIMING_END_PHASE
)
e1
:
SetRange
(
LOCATION_REMOVED
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
mg
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToDeckOrExtraAsCost
,
tp
,
LOCATION_REMOVED
,
LOCATION_REMOVED
,
e
:
GetHandler
())
if
chk
==
0
then
return
mg
:
GetCount
()
>=
10
end
local
g
=
mg
:
Select
(
tp
,
10
,
10
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
)
e1
:
SetCost
(
cm
.
cost
)
e1
:
SetTarget
(
cm
.
sptg
)
e1
:
SetOperation
(
cm
.
spop
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetMatchingGroupCount
(
Card
.
IsAbleToDeckOrExtraAsCost
,
tp
,
LOCATION_REMOVED
,
LOCATION_REMOVED
,
e
:
GetHandler
())
>=
10
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToDeckOrExtraAsCost
,
tp
,
LOCATION_REMOVED
,
LOCATION_REMOVED
,
10
,
10
,
e
:
GetHandler
())
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
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