Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts-888
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
3
Merge Requests
3
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
MyCard
ygopro-scripts-888
Commits
ab02792f
Commit
ab02792f
authored
Jul 06, 2025
by
Vury Leo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add all accelsynchro
parent
db901fb8
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
567 additions
and
347 deletions
+567
-347
c23512906.lua
c23512906.lua
+13
-3
c30581601.lua
c30581601.lua
+17
-6
c32480825.lua
c32480825.lua
+11
-3
c34800281.lua
c34800281.lua
+52
-39
c36608728.lua
c36608728.lua
+17
-6
c37675907.lua
c37675907.lua
+39
-30
c39931513.lua
c39931513.lua
+12
-4
c41371602.lua
c41371602.lua
+17
-6
c45675980.lua
c45675980.lua
+40
-28
c50091196.lua
c50091196.lua
+4
-37
c5800323.lua
c5800323.lua
+11
-3
c65326118.lua
c65326118.lua
+34
-25
c67694706.lua
c67694706.lua
+11
-3
c68431965.lua
c68431965.lua
+33
-24
c91810826.lua
c91810826.lua
+42
-33
c92744676.lua
c92744676.lua
+11
-3
c98558751.lua
c98558751.lua
+37
-28
c99937842.lua
c99937842.lua
+38
-29
procedure.lua
procedure.lua
+128
-37
No files found.
c23512906.lua
View file @
ab02792f
...
@@ -91,7 +91,17 @@ end
...
@@ -91,7 +91,17 @@ end
function
s
.
sop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
sop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetSynchroMaterial
(
tp
):
Filter
(
Card
.
IsSetCard
,
nil
,
0x192
)
local
g
=
Duel
.
GetSynchroMaterial
(
tp
):
Filter
(
Card
.
IsSetCard
,
nil
,
0x192
)
if
#
g
==
0
then
return
end
if
#
g
==
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
opt
=
Duel
.
SelectOption
(
tp
,
1164
,
1379
)
local
sc
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
nil
,
g
):
GetFirst
()
if
opt
==
0
then
if
sc
then
Duel
.
SynchroSummon
(
tp
,
sc
,
nil
,
g
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sc
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
nil
,
g
):
GetFirst
()
if
sc
then
Duel
.
SynchroSummon
(
tp
,
sc
,
nil
,
g
)
end
else
local
c
=
e
:
GetHandler
()
local
mg
=
Duel
.
GetMatchingGroup
(
function
(
mc
)
return
mc
:
IsSetCard
(
0x192
)
end
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
synchro_effect
=
AccelSynchro
.
CreateSummonEffect
(
c
,{
mg
=
mg
,
})
synchro_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
c30581601.lua
View file @
ab02792f
...
@@ -97,11 +97,22 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -97,11 +97,22 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
end
end
local
g
=
Duel
.
GetMatchingGroup
(
s
.
scfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
tp
,
mg
)
local
g
=
Duel
.
GetMatchingGroup
(
s
.
scfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
tp
,
mg
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
opt
=
Duel
.
SelectOption
(
tp
,
1164
,
1379
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
if
opt
==
0
then
local
sc
=
sg
:
GetFirst
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
local
tg
=
mg
:
SelectSubGroup
(
tp
,
s
.
syncheck
,
false
,
2
,
#
mg
,
tp
,
sc
)
local
sc
=
sg
:
GetFirst
()
Duel
.
SynchroSummon
(
tp
,
sc
,
nil
,
tg
,
#
tg
-
1
,
#
tg
-
1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
tg
=
mg
:
SelectSubGroup
(
tp
,
s
.
syncheck
,
false
,
2
,
#
mg
,
tp
,
sc
)
Duel
.
SynchroSummon
(
tp
,
sc
,
nil
,
tg
,
#
tg
-
1
,
#
tg
-
1
)
else
local
c
=
e
:
GetHandler
()
local
synchro_effect
=
AccelSynchro
.
CreateSummonEffect
(
c
,{
additional_scheck
=
function
(
sg
)
return
sg
:
IsExists
(
function
(
mc
)
return
mc
:
IsSetCard
(
0x1ca
)
end
,
1
,
nil
)
end
,
})
synchro_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
end
end
c32480825.lua
View file @
ab02792f
...
@@ -54,9 +54,17 @@ end
...
@@ -54,9 +54,17 @@ end
function
s
.
sop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
sop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsControler
(
1
-
tp
)
or
c
:
IsFacedown
()
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsControler
(
1
-
tp
)
or
c
:
IsFacedown
()
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
opt
=
Duel
.
SelectOption
(
tp
,
1164
,
1379
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
c
):
GetFirst
()
if
opt
==
0
then
if
tc
then
Duel
.
SynchroSummon
(
tp
,
tc
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tc
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
c
):
GetFirst
()
if
tc
then
Duel
.
SynchroSummon
(
tp
,
tc
,
c
)
end
else
local
synchro_effect
=
AccelSynchro
.
CreateSummonEffect
(
c
,{
gc
=
function
()
return
c
end
,
})
synchro_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
function
s
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
...
...
c34800281.lua
View file @
ab02792f
--メルフィー・ラッシィ
--メルフィー・ラッシィ
function
c34800281
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--synchro summon
--synchro summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
34800281
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
34800281
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetHintTiming
(
0
,
TIMING_CHAIN_END
+
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetHintTiming
(
0
,
TIMING_CHAIN_END
+
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetCondition
(
c34800281
.
syncon
)
e1
:
SetCondition
(
s
.
syncon
)
e1
:
SetTarget
(
c34800281
.
syntg
)
e1
:
SetTarget
(
s
.
syntg
)
e1
:
SetOperation
(
c34800281
.
synop
)
e1
:
SetOperation
(
s
.
synop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--be material
--be material
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
34800281
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
34800282
)
e2
:
SetCountLimit
(
1
,
34800282
)
e2
:
SetCondition
(
c34800281
.
xyzcon
)
e2
:
SetCondition
(
s
.
xyzcon
)
e2
:
SetTarget
(
c34800281
.
xyztg
)
e2
:
SetTarget
(
s
.
xyztg
)
e2
:
SetOperation
(
c34800281
.
xyzop
)
e2
:
SetOperation
(
s
.
xyzop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--
--
if
not
c34800281
.
global_check
then
if
not
s
.
global_check
then
c34800281
.
global_check
=
true
s
.
global_check
=
true
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e0
:
SetCode
(
EVENT_TO_HAND
)
e0
:
SetCode
(
EVENT_TO_HAND
)
e0
:
SetOperation
(
c34800281
.
regop
)
e0
:
SetOperation
(
s
.
regop
)
Duel
.
RegisterEffect
(
e0
,
0
)
Duel
.
RegisterEffect
(
e0
,
0
)
end
end
end
end
function
c34800281
.
cfilter
(
c
,
tp
)
function
s
.
cfilter
(
c
,
tp
)
return
c
:
IsPreviousControler
(
tp
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
return
c
:
IsPreviousControler
(
tp
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
(
c
:
GetPreviousRaceOnField
()
&
RACE_BEAST
)
>
0
and
(
c
:
GetPreviousRaceOnField
()
&
RACE_BEAST
)
>
0
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
not
c
:
IsCode
(
34800281
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
not
c
:
IsCode
(
id
)
end
end
function
c34800281
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
for
p
=
0
,
1
do
for
p
=
0
,
1
do
if
eg
:
IsExists
(
c34800281
.
cfilter
,
1
,
nil
,
p
)
then
if
eg
:
IsExists
(
s
.
cfilter
,
1
,
nil
,
p
)
then
Duel
.
RegisterFlagEffect
(
p
,
34800281
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterFlagEffect
(
p
,
id
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
end
end
end
end
end
function
c34800281
.
syncon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
syncon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
34800281
)
>
0
return
Duel
.
GetFlagEffect
(
tp
,
id
)
>
0
end
end
function
c34800281
.
syntg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
syntg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
end
end
function
c34800281
.
synhfilter
(
c
,
sc
,
tuner
)
function
s
.
synhfilter
(
c
,
sc
,
tuner
)
return
c
:
IsCanBeSynchroMaterial
(
sc
,
tuner
)
and
c
:
IsSetCard
(
0x146
)
return
c
:
IsCanBeSynchroMaterial
(
sc
,
tuner
)
and
c
:
IsSetCard
(
0x146
)
end
end
function
c34800281
.
synfilter
(
c
,
mc
,
tp
)
function
s
.
synfilter
(
c
,
mc
,
tp
)
local
mg
=
Duel
.
GetMatchingGroup
(
c34800281
.
synhfilter
,
tp
,
LOCATION_HAND
,
0
,
nil
,
c
,
mc
)
local
mg
=
Duel
.
GetMatchingGroup
(
s
.
synhfilter
,
tp
,
LOCATION_HAND
,
0
,
nil
,
c
,
mc
)
mg
:
AddCard
(
mc
)
mg
:
AddCard
(
mc
)
return
c
:
IsSynchroSummonable
(
mc
,
mg
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
mc
,
c
)
>
0
return
c
:
IsSynchroSummonable
(
mc
,
mg
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
mc
,
c
)
>
0
end
end
function
c34800281
.
synop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
synop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
==
0
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
or
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
==
0
then
return
end
if
Duel
.
IsExistingMatchingCard
(
c34800281
.
synfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
c
,
tp
)
if
Duel
.
IsExistingMatchingCard
(
s
.
synfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
c
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
34800281
,
2
))
then
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
2
))
then
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
opt
=
Duel
.
SelectOption
(
tp
,
1164
,
1379
)
local
fc
=
Duel
.
SelectMatchingCard
(
tp
,
c34800281
.
synfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
c
,
tp
):
GetFirst
()
if
opt
==
0
then
local
mg
=
Duel
.
GetMatchingGroup
(
c34800281
.
synhfilter
,
tp
,
LOCATION_HAND
,
0
,
nil
,
fc
,
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
mg
:
AddCard
(
c
)
local
fc
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
synfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
c
,
tp
):
GetFirst
()
Duel
.
SynchroSummon
(
tp
,
fc
,
c
,
mg
)
local
mg
=
Duel
.
GetMatchingGroup
(
s
.
synhfilter
,
tp
,
LOCATION_HAND
,
0
,
nil
,
fc
,
c
)
mg
:
AddCard
(
c
)
Duel
.
SynchroSummon
(
tp
,
fc
,
c
,
mg
)
else
local
mg
=
Duel
.
GetMatchingGroup
(
function
(
mc
)
return
mc
:
IsSetCard
(
0x146
)
end
,
tp
,
LOCATION_HAND
,
0
,
nil
)
mg
:
AddCard
(
c
)
local
synchro_effect
=
AccelSynchro
.
CreateSummonEffect
(
c
,{
gc
=
function
()
return
c
end
,
mg
=
mg
,
skip_hand_count_check
=
true
,
})
synchro_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
end
end
function
c34800281
.
xyzcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
xyzcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
return
Duel
.
GetTurnPlayer
()
==
tp
end
end
function
c34800281
.
xyzfilter
(
c
)
function
s
.
xyzfilter
(
c
)
return
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsRace
(
RACE_BEAST
)
and
c
:
IsFaceup
()
return
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsRace
(
RACE_BEAST
)
and
c
:
IsFaceup
()
end
end
function
c34800281
.
xyztg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
s
.
xyztg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c34800281
.
xyzfilter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
s
.
xyzfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c34800281
.
xyzfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
s
.
xyzfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c34800281
.
xyzfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SelectTarget
(
tp
,
s
.
xyzfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_LEAVE_GRAVE
,
c
,
1
,
0
,
0
)
end
end
function
c34800281
.
xyzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
xyzop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
c
:
IsRelateToEffect
(
e
)
and
not
tc
:
IsImmuneToEffect
(
e
)
then
if
tc
:
IsRelateToEffect
(
e
)
and
c
:
IsRelateToEffect
(
e
)
and
not
tc
:
IsImmuneToEffect
(
e
)
then
...
...
c36608728.lua
View file @
ab02792f
...
@@ -100,11 +100,22 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -100,11 +100,22 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
end
end
local
g
=
Duel
.
GetMatchingGroup
(
s
.
scfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
tp
,
mg
)
local
g
=
Duel
.
GetMatchingGroup
(
s
.
scfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
tp
,
mg
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
opt
=
Duel
.
SelectOption
(
tp
,
1164
,
1379
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
if
opt
==
0
then
local
sc
=
sg
:
GetFirst
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
local
tg
=
mg
:
SelectSubGroup
(
tp
,
s
.
syncheck
,
false
,
2
,
#
mg
,
tp
,
sc
)
local
sc
=
sg
:
GetFirst
()
Duel
.
SynchroSummon
(
tp
,
sc
,
nil
,
tg
,
#
tg
-
1
,
#
tg
-
1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
tg
=
mg
:
SelectSubGroup
(
tp
,
s
.
syncheck
,
false
,
2
,
#
mg
,
tp
,
sc
)
Duel
.
SynchroSummon
(
tp
,
sc
,
nil
,
tg
,
#
tg
-
1
,
#
tg
-
1
)
else
local
c
=
e
:
GetHandler
()
local
synchro_effect
=
AccelSynchro
.
CreateSummonEffect
(
c
,{
additional_scheck
=
function
(
sg
)
return
sg
:
IsExists
(
function
(
mc
)
return
mc
:
IsRace
(
RACE_WARRIOR
)
end
,
1
,
nil
)
end
,
})
synchro_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
end
end
c37675907.lua
View file @
ab02792f
--アクセル・シンクロン
--アクセル・シンクロン
function
c37675907
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--synchro summon
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
...
@@ -8,70 +9,70 @@ function c37675907.initial_effect(c)
...
@@ -8,70 +9,70 @@ function c37675907.initial_effect(c)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c37675907
.
regcon
)
e1
:
SetCondition
(
s
.
regcon
)
e1
:
SetOperation
(
c37675907
.
regop
)
e1
:
SetOperation
(
s
.
regop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--lv
--lv
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
37675907
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
c37675907
.
tgcost
)
e2
:
SetCost
(
s
.
tgcost
)
e2
:
SetTarget
(
c37675907
.
tgtg
)
e2
:
SetTarget
(
s
.
tgtg
)
e2
:
SetOperation
(
c37675907
.
tgop
)
e2
:
SetOperation
(
s
.
tgop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--spsummon
--spsummon
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
37675907
,
1
))
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e3
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCondition
(
c37675907
.
spcon
)
e3
:
SetCondition
(
s
.
spcon
)
e3
:
SetTarget
(
c37675907
.
sptg
)
e3
:
SetTarget
(
s
.
sptg
)
e3
:
SetOperation
(
c37675907
.
spop
)
e3
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c37675907
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
end
function
c37675907
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTarget
(
c37675907
.
splimit
)
e1
:
SetTarget
(
s
.
splimit
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
c37675907
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
function
s
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
c
:
IsCode
(
37675907
)
and
bit
.
band
(
sumtype
,
SUMMON_TYPE_SYNCHRO
)
==
SUMMON_TYPE_SYNCHRO
return
c
:
IsCode
(
id
)
and
bit
.
band
(
sumtype
,
SUMMON_TYPE_SYNCHRO
)
==
SUMMON_TYPE_SYNCHRO
end
end
function
c37675907
.
filter
(
c
)
function
s
.
filter
(
c
)
return
c
:
GetLevel
()
>
0
and
c
:
IsSetCard
(
0x1017
)
and
c
:
IsAbleToGraveAsCost
()
return
c
:
GetLevel
()
>
0
and
c
:
IsSetCard
(
0x1017
)
and
c
:
IsAbleToGraveAsCost
()
end
end
function
c37675907
.
tgcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
tgcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c37675907
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c37675907
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
e
:
SetLabelObject
(
g
:
GetFirst
())
e
:
SetLabelObject
(
g
:
GetFirst
())
end
end
function
c37675907
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
lv
=
e
:
GetHandler
():
GetLevel
()
local
lv
=
e
:
GetHandler
():
GetLevel
()
if
chk
==
0
then
return
lv
>
0
end
if
chk
==
0
then
return
lv
>
0
end
local
opt
local
opt
if
e
:
GetLabelObject
():
GetLevel
()
<
lv
then
if
e
:
GetLabelObject
():
GetLevel
()
<
lv
then
opt
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
37675907
,
2
),
aux
.
Stringid
(
37675907
,
3
))
opt
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
id
,
2
),
aux
.
Stringid
(
id
,
3
))
else
else
opt
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
37675907
,
2
))
opt
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
id
,
2
))
end
end
e
:
SetLabel
(
opt
)
e
:
SetLabel
(
opt
)
end
end
function
c37675907
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
lv
=
e
:
GetLabelObject
():
GetLevel
()
local
lv
=
e
:
GetLabelObject
():
GetLevel
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
then
...
@@ -87,22 +88,30 @@ function c37675907.tgop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -87,22 +88,30 @@ function c37675907.tgop(e,tp,eg,ep,ev,re,r,rp)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
end
end
function
c37675907
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
local
ph
=
Duel
.
GetCurrentPhase
()
return
Duel
.
GetTurnPlayer
()
~=
tp
and
(
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
)
return
Duel
.
GetTurnPlayer
()
~=
tp
and
(
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
)
end
end
function
c37675907
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
if
chk
==
0
then
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
:
GetHandler
())
end
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
:
GetHandler
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
function
c37675907
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsControler
(
1
-
tp
)
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
if
c
:
IsControler
(
1
-
tp
)
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
c
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
opt
=
Duel
.
SelectOption
(
tp
,
1164
,
1379
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
if
opt
==
0
then
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
c
)
else
local
synchro_effect
=
AccelSynchro
.
CreateSummonEffect
(
c
,{
gc
=
function
()
return
c
end
,
})
synchro_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
end
end
c39931513.lua
View file @
ab02792f
--天盃龍パイドラ
--天盃龍パイドラ
local
s
,
id
,
o
=
GetID
()
local
s
,
id
,
o
=
GetID
()
function
c39931513
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
--to hand or set
--to hand or set
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
...
@@ -77,8 +77,16 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -77,8 +77,16 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
if
c
:
IsControler
(
1
-
tp
)
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
if
c
:
IsControler
(
1
-
tp
)
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
c
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
opt
=
Duel
.
SelectOption
(
tp
,
1164
,
1379
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
if
opt
==
0
then
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
c
)
else
local
synchro_effect
=
AccelSynchro
.
CreateSummonEffect
(
c
,{
gc
=
function
()
return
c
end
,
})
synchro_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
end
end
c41371602.lua
View file @
ab02792f
...
@@ -118,11 +118,22 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -118,11 +118,22 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
end
end
local
g
=
Duel
.
GetMatchingGroup
(
s
.
scfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
tp
,
mg
)
local
g
=
Duel
.
GetMatchingGroup
(
s
.
scfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
tp
,
mg
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
opt
=
Duel
.
SelectOption
(
tp
,
1164
,
1379
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
if
opt
==
0
then
local
sc
=
sg
:
GetFirst
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
local
tg
=
mg
:
SelectSubGroup
(
tp
,
s
.
syncheck
,
false
,
2
,
#
mg
,
tp
,
sc
)
local
sc
=
sg
:
GetFirst
()
Duel
.
SynchroSummon
(
tp
,
sc
,
nil
,
tg
,
#
tg
-
1
,
#
tg
-
1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
tg
=
mg
:
SelectSubGroup
(
tp
,
s
.
syncheck
,
false
,
2
,
#
mg
,
tp
,
sc
)
Duel
.
SynchroSummon
(
tp
,
sc
,
nil
,
tg
,
#
tg
-
1
,
#
tg
-
1
)
else
local
c
=
e
:
GetHandler
()
local
synchro_effect
=
AccelSynchro
.
CreateSummonEffect
(
c
,{
additional_scheck
=
function
(
sg
)
return
sg
:
IsExists
(
function
(
mc
)
return
mc
:
IsSetCard
(
0x1a2
)
end
,
1
,
nil
)
end
,
})
synchro_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
end
end
c45675980.lua
View file @
ab02792f
--烙印の即凶劇
--烙印の即凶劇
function
c45675980
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--activate
--activate
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
...
@@ -7,15 +8,15 @@ function c45675980.initial_effect(c)
...
@@ -7,15 +8,15 @@ function c45675980.initial_effect(c)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
--Effect 1
--Effect 1
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
45675980
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetCountLimit
(
1
,
45675980
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetTarget
(
c45675980
.
sctg
)
e1
:
SetTarget
(
s
.
sctg
)
e1
:
SetOperation
(
c45675980
.
scop
)
e1
:
SetOperation
(
s
.
scop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--macro cosmos
--macro cosmos
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
...
@@ -24,48 +25,59 @@ function c45675980.initial_effect(c)
...
@@ -24,48 +25,59 @@ function c45675980.initial_effect(c)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCode
(
EFFECT_TO_GRAVE_REDIRECT
)
e2
:
SetCode
(
EFFECT_TO_GRAVE_REDIRECT
)
e2
:
SetValue
(
LOCATION_REMOVED
)
e2
:
SetValue
(
LOCATION_REMOVED
)
e2
:
SetCondition
(
c45675980
.
rmcon
)
e2
:
SetCondition
(
s
.
rmcon
)
e2
:
SetTarget
(
c45675980
.
rmtg
)
e2
:
SetTarget
(
s
.
rmtg
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c45675980
.
syncheck
(
g
,
tp
,
syncard
)
function
s
.
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
syncard
:
IsSynchroSummonable
(
nil
,
g
,
#
g
-
1
,
#
g
-
1
)
and
aux
.
SynMixHandCheck
(
g
,
tp
,
syncard
)
end
end
function
c45675980
.
spfilter
(
c
,
tp
,
mg
)
function
s
.
spfilter
(
c
,
tp
,
mg
)
return
mg
:
CheckSubGroup
(
c45675980
.
syncheck
,
2
,
#
mg
,
tp
,
c
)
return
mg
:
CheckSubGroup
(
s
.
syncheck
,
2
,
#
mg
,
tp
,
c
)
end
end
function
c45675980
.
sctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
sctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
chk
==
0
then
local
mg
=
Duel
.
GetSynchroMaterial
(
tp
)
local
mg
=
Duel
.
GetSynchroMaterial
(
tp
)
if
mg
:
IsExists
(
Card
.
GetHandSynchro
,
1
,
nil
)
then
if
mg
:
IsExists
(
Card
.
GetHandSynchro
,
1
,
nil
)
then
local
mg2
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_HAND
,
0
,
nil
)
local
mg2
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_HAND
,
0
,
nil
)
if
mg2
:
GetCount
()
>
0
then
mg
:
Merge
(
mg2
)
end
if
mg2
:
GetCount
()
>
0
then
mg
:
Merge
(
mg2
)
end
end
end
return
Duel
.
IsExistingMatchingCard
(
c45675980
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
tp
,
mg
)
return
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
tp
,
mg
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
function
c45675980
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
mg
=
Duel
.
GetSynchroMaterial
(
tp
)
local
opt
=
Duel
.
SelectOption
(
tp
,
1164
,
1379
)
if
mg
:
IsExists
(
Card
.
GetHandSynchro
,
1
,
nil
)
then
if
opt
==
0
then
local
mg2
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_HAND
,
0
,
nil
)
local
mg
=
Duel
.
GetSynchroMaterial
(
tp
)
if
mg2
:
GetCount
()
>
0
then
mg
:
Merge
(
mg2
)
end
if
mg
:
IsExists
(
Card
.
GetHandSynchro
,
1
,
nil
)
then
end
local
mg2
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
LOCATION_HAND
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
c45675980
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
tp
,
mg
)
if
mg2
:
GetCount
()
>
0
then
mg
:
Merge
(
mg2
)
end
if
g
:
GetCount
()
>
0
then
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
GetMatchingGroup
(
s
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
tp
,
mg
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
local
sc
=
sg
:
GetFirst
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
local
tg
=
mg
:
SelectSubGroup
(
tp
,
c45675980
.
syncheck
,
false
,
2
,
#
mg
,
tp
,
sc
)
local
sc
=
sg
:
GetFirst
()
Duel
.
SynchroSummon
(
tp
,
sc
,
nil
,
tg
,
#
tg
-
1
,
#
tg
-
1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SMATERIAL
)
local
tg
=
mg
:
SelectSubGroup
(
tp
,
s
.
syncheck
,
false
,
2
,
#
mg
,
tp
,
sc
)
Duel
.
SynchroSummon
(
tp
,
sc
,
nil
,
tg
,
#
tg
-
1
,
#
tg
-
1
)
end
else
local
c
=
e
:
GetHandler
()
local
synchro_effect
=
AccelSynchro
.
CreateSummonEffect
(
c
,{
additional_scheck
=
function
(
sg
)
return
sg
:
IsExists
(
function
(
mc
)
return
mc
:
IsRace
(
RACE_DRAGON
)
end
,
1
,
nil
)
end
,
})
synchro_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
end
function
c45675980
.
rmcon
(
e
)
function
s
.
rmcon
(
e
)
local
tp
=
e
:
GetHandlerPlayer
()
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
IsExistingMatchingCard
(
aux
.
AND
(
Card
.
IsFaceup
,
Card
.
IsSetCard
),
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
0x188
)
return
Duel
.
IsExistingMatchingCard
(
aux
.
AND
(
Card
.
IsFaceup
,
Card
.
IsSetCard
),
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
0x188
)
end
end
function
c45675980
.
rmtg
(
e
,
c
)
function
s
.
rmtg
(
e
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
local
tp
=
e
:
GetHandlerPlayer
()
local
b1
=
c
:
IsReason
(
REASON_RITUAL
)
and
c
:
IsReason
(
REASON_RELEASE
)
local
b1
=
c
:
IsReason
(
REASON_RITUAL
)
and
c
:
IsReason
(
REASON_RELEASE
)
local
b2
=
c
:
IsReason
(
REASON_FUSION
+
REASON_SYNCHRO
+
REASON_LINK
)
local
b2
=
c
:
IsReason
(
REASON_FUSION
+
REASON_SYNCHRO
+
REASON_LINK
)
...
...
c50091196.lua
View file @
ab02792f
...
@@ -63,43 +63,10 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -63,43 +63,10 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
local
tc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
Duel
.
SynchroSummon
(
tp
,
tc
,
c
)
Duel
.
SynchroSummon
(
tp
,
tc
,
c
)
else
else
local
mg
=
Duel
.
GetSynchroMaterial
(
tp
)
local
synchro_effect
=
AccelSynchro
.
CreateSummonEffect
(
c
,{
local
mat
=
Group
.
CreateGroup
()
gc
=
function
()
return
c
end
,
local
tc
=
nil
})
local
selected_proc
=
nil
synchro_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
while
#
mat
==
0
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
tc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
local
procs
=
{
tc
:
IsHasEffect
(
EFFECT_SPSUMMON_PROC
,
tp
)}
local
avaliable_procs
=
{}
for
_
,
proc
in
ipairs
(
procs
)
do
local
con
=
proc
:
GetCondition
()
if
con
(
e
,
tc
,
c
,
mg
,
1
,
math.huge
)
then
table.insert
(
avaliable_procs
,
proc
)
end
end
if
#
avaliable_procs
==
0
then
--- fallback
Duel
.
SynchroSummon
(
tp
,
tc
,
c
)
end
assert
(
#
avaliable_procs
>
0
,
"target card does not support new synchro yet"
)
selected_proc
=
avaliable_procs
[
1
]
if
#
avaliable_procs
>
1
then
local
opts
=
{}
for
_
,
avaliable_proc
in
ipairs
(
avaliable_procs
)
do
table.insert
(
opts
,
avaliable_proc
:
GetDescription
())
end
local
proc_index
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
opts
))
+
1
selected_proc
=
avaliable_procs
[
proc_index
]
end
local
target
=
selected_proc
:
GetTarget
()
if
target
(
selected_proc
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
,
tc
,
c
,
mg
,
1
,
math.huge
)
then
mat
=
selected_proc
:
GetLabelObject
()
end
end
assert
(
tc
~=
nil
)
assert
(
selected_proc
~=
nil
)
Duel
.
SynchroSummon
(
tp
,
tc
,
nil
,
mat
,
#
mat
,
#
mat
)
end
end
end
end
end
end
c5800323.lua
View file @
ab02792f
...
@@ -78,8 +78,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -78,8 +78,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if
c
:
IsControler
(
1
-
tp
)
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
if
c
:
IsControler
(
1
-
tp
)
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
c
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
opt
=
Duel
.
SelectOption
(
tp
,
1164
,
1379
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
if
opt
==
0
then
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
c
)
else
local
synchro_effect
=
AccelSynchro
.
CreateSummonEffect
(
c
,{
gc
=
function
()
return
c
end
,
})
synchro_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
end
end
c65326118.lua
View file @
ab02792f
--天盃龍ファドラ
--天盃龍ファドラ
function
c65326118
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--Special summon from grave
--Special summon from grave
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
65326118
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
65326118
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetTarget
(
c65326118
.
sptg
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
c65326118
.
spop
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
...
@@ -25,62 +26,70 @@ function c65326118.initial_effect(c)
...
@@ -25,62 +26,70 @@ function c65326118.initial_effect(c)
e4
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e4
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetRange
(
LOCATION_MZONE
)
e4
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e4
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e4
:
SetTarget
(
c65326118
.
indtg
)
e4
:
SetTarget
(
s
.
indtg
)
e4
:
SetValue
(
1
)
e4
:
SetValue
(
1
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
--synchro summon
--synchro summon
local
e5
=
Effect
.
CreateEffect
(
c
)
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetDescription
(
aux
.
Stringid
(
65326118
,
2
))
e5
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e5
:
SetCode
(
EVENT_FREE_CHAIN
)
e5
:
SetCode
(
EVENT_FREE_CHAIN
)
e5
:
SetHintTiming
(
0
,
TIMING_BATTLE_START
+
TIMING_BATTLE_STEP_END
+
TIMING_BATTLE_END
)
e5
:
SetHintTiming
(
0
,
TIMING_BATTLE_START
+
TIMING_BATTLE_STEP_END
+
TIMING_BATTLE_END
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetRange
(
LOCATION_MZONE
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCondition
(
c65326118
.
sccon
)
e5
:
SetCondition
(
s
.
sccon
)
e5
:
SetTarget
(
c65326118
.
sctg
)
e5
:
SetTarget
(
s
.
sctg
)
e5
:
SetOperation
(
c65326118
.
scop
)
e5
:
SetOperation
(
s
.
scop
)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
end
end
function
c65326118
.
filter
(
c
,
e
,
tp
)
function
s
.
filter
(
c
,
e
,
tp
)
return
c
:
IsRace
(
RACE_DRAGON
)
and
c
:
IsAttribute
(
ATTRIBUTE_FIRE
)
and
c
:
IsLevelBelow
(
4
)
return
c
:
IsRace
(
RACE_DRAGON
)
and
c
:
IsAttribute
(
ATTRIBUTE_FIRE
)
and
c
:
IsLevelBelow
(
4
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c65326118
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c65326118
.
filter
(
chkc
,
e
,
tp
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
s
.
filter
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingTarget
(
c65326118
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingTarget
(
s
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
aux
.
Stringid
(
65326118
,
0
))
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
aux
.
Stringid
(
id
,
0
))
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c65326118
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectTarget
(
tp
,
s
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
g
,
1
,
0
,
0
)
end
end
function
c65326118
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
function
c65326118
.
indtg
(
e
,
c
)
function
s
.
indtg
(
e
,
c
)
return
c
:
IsRace
(
RACE_DRAGON
)
and
c
:
IsAttribute
(
ATTRIBUTE_FIRE
)
return
c
:
IsRace
(
RACE_DRAGON
)
and
c
:
IsAttribute
(
ATTRIBUTE_FIRE
)
end
end
function
c65326118
.
sccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
sccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
return
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
end
end
function
c65326118
.
sctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
sctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
:
GetHandler
())
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
aux
.
Stringid
(
65326118
,
2
))
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
aux
.
Stringid
(
id
,
2
))
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
function
c65326118
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsControler
(
1
-
tp
)
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
if
c
:
IsControler
(
1
-
tp
)
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
c
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
opt
=
Duel
.
SelectOption
(
tp
,
1164
,
1379
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
if
opt
==
0
then
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
c
)
else
local
synchro_effect
=
AccelSynchro
.
CreateSummonEffect
(
c
,{
gc
=
function
()
return
c
end
,
})
synchro_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
end
end
c67694706.lua
View file @
ab02792f
...
@@ -88,9 +88,17 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -88,9 +88,17 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
if
e
:
GetLabel
()
==
0
then
if
e
:
GetLabel
()
==
0
then
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
c
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
opt
=
Duel
.
SelectOption
(
tp
,
1164
,
1379
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
if
opt
==
0
then
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
c
)
else
local
synchro_effect
=
AccelSynchro
.
CreateSummonEffect
(
c
,{
gc
=
function
()
return
c
end
,
})
synchro_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
else
else
local
mg
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
mg
=
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
...
...
c68431965.lua
View file @
ab02792f
--シューティング・ライザー・ドラゴン
--シューティング・ライザー・ドラゴン
function
c68431965
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--synchro summon
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--lv
--lv
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
68431965
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
68431965
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
c68431965
.
lvlcon
)
e1
:
SetCondition
(
s
.
lvlcon
)
e1
:
SetTarget
(
c68431965
.
lvtg1
)
e1
:
SetTarget
(
s
.
lvtg1
)
e1
:
SetOperation
(
c68431965
.
lvop1
)
e1
:
SetOperation
(
s
.
lvop1
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--synchro effect
--synchro effect
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
68431965
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_CHAIN
)
e2
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_CHAIN
)
e2
:
SetCondition
(
c68431965
.
sccon
)
e2
:
SetCondition
(
s
.
sccon
)
e2
:
SetTarget
(
c68431965
.
sctarg
)
e2
:
SetTarget
(
s
.
sctarg
)
e2
:
SetOperation
(
c68431965
.
scop
)
e2
:
SetOperation
(
s
.
scop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c68431965
.
lvlcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
lvlcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
end
function
c68431965
.
lvtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
lvtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsRelateToEffect
(
e
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsRelateToEffect
(
e
)
and
Duel
.
IsExistingMatchingCard
(
c68431965
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
:
GetHandler
():
GetLevel
())
end
and
Duel
.
IsExistingMatchingCard
(
s
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
:
GetHandler
():
GetLevel
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c68431965
.
tgfilter
(
c
,
lv
)
function
s
.
tgfilter
(
c
,
lv
)
return
c
:
IsLevelBelow
(
lv
-
1
)
and
c
:
IsAbleToGrave
()
return
c
:
IsLevelBelow
(
lv
-
1
)
and
c
:
IsAbleToGrave
()
end
end
function
c68431965
.
lvop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
lvop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
or
c
:
IsImmuneToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
or
c
:
IsImmuneToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c68431965
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
c
:
GetLevel
())
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
c
:
GetLevel
())
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
and
g
:
GetFirst
():
IsLocation
(
LOCATION_GRAVE
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
and
g
:
GetFirst
():
IsLocation
(
LOCATION_GRAVE
)
and
c
:
IsFaceup
()
then
and
c
:
IsFaceup
()
then
local
lv
=
g
:
GetFirst
():
GetLevel
()
local
lv
=
g
:
GetFirst
():
GetLevel
()
...
@@ -59,31 +60,39 @@ function c68431965.lvop1(e,tp,eg,ep,ev,re,r,rp)
...
@@ -59,31 +60,39 @@ function c68431965.lvop1(e,tp,eg,ep,ev,re,r,rp)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e2
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e2
:
SetTargetRange
(
1
,
0
)
e2
:
SetTargetRange
(
1
,
0
)
e2
:
SetValue
(
c68431965
.
aclimit
)
e2
:
SetValue
(
s
.
aclimit
)
e2
:
SetLabel
(
g
:
GetFirst
():
GetCode
())
e2
:
SetLabel
(
g
:
GetFirst
():
GetCode
())
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
end
end
function
c68431965
.
aclimit
(
e
,
re
,
tp
)
function
s
.
aclimit
(
e
,
re
,
tp
)
return
re
:
GetHandler
():
IsCode
(
e
:
GetLabel
())
and
re
:
IsActiveType
(
TYPE_MONSTER
)
return
re
:
GetHandler
():
IsCode
(
e
:
GetLabel
())
and
re
:
IsActiveType
(
TYPE_MONSTER
)
end
end
function
c68431965
.
sccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
sccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
return
Duel
.
GetTurnPlayer
()
~=
tp
and
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
end
end
function
c68431965
.
sctarg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
sctarg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
c
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
c
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
function
c68431965
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsControler
(
1
-
tp
)
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
if
c
:
IsControler
(
1
-
tp
)
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
c
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
opt
=
Duel
.
SelectOption
(
tp
,
1164
,
1379
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
if
opt
==
0
then
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
c
)
else
local
synchro_effect
=
AccelSynchro
.
CreateSummonEffect
(
c
,{
gc
=
function
()
return
c
end
,
})
synchro_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
end
end
c91810826.lua
View file @
ab02792f
--天盃龍チュンドラ
--天盃龍チュンドラ
function
c91810826
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--Self special summon
--Self special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
91810826
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
91810826
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
c91810826
.
spcon
)
e1
:
SetCondition
(
s
.
spcon
)
e1
:
SetTarget
(
c91810826
.
sptg
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
c91810826
.
spop
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--Special summon from deck
--Special summon from deck
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
91810826
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCode
(
EVENT_BATTLE_START
)
e2
:
SetCode
(
EVENT_BATTLE_START
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
91810827
)
e2
:
SetCountLimit
(
1
,
id
+
o
)
e2
:
SetTarget
(
c91810826
.
sptg2
)
e2
:
SetTarget
(
s
.
sptg2
)
e2
:
SetOperation
(
c91810826
.
spop2
)
e2
:
SetOperation
(
s
.
spop2
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--Synchro summon
--Synchro summon
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
91810826
,
2
))
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetHintTiming
(
0
,
TIMING_BATTLE_START
+
TIMING_BATTLE_STEP_END
+
TIMING_BATTLE_END
)
e3
:
SetHintTiming
(
0
,
TIMING_BATTLE_START
+
TIMING_BATTLE_STEP_END
+
TIMING_BATTLE_END
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c91810826
.
sccon
)
e3
:
SetCondition
(
s
.
sccon
)
e3
:
SetTarget
(
c91810826
.
sctg
)
e3
:
SetTarget
(
s
.
sctg
)
e3
:
SetOperation
(
c91810826
.
scop
)
e3
:
SetOperation
(
s
.
scop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c91810826
.
cfilter
(
c
)
function
s
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_DRAGON
)
and
c
:
IsAttribute
(
ATTRIBUTE_FIRE
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_DRAGON
)
and
c
:
IsAttribute
(
ATTRIBUTE_FIRE
)
end
end
function
c91810826
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsExistingMatchingCard
(
c91810826
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
end
function
c91810826
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
c91810826
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c91810826
.
filter
(
c
,
e
,
tp
)
function
s
.
filter
(
c
,
e
,
tp
)
return
c
:
IsRace
(
RACE_DRAGON
)
and
c
:
IsAttribute
(
ATTRIBUTE_FIRE
)
and
c
:
IsLevelBelow
(
4
)
and
not
c
:
IsCode
(
91810826
)
return
c
:
IsRace
(
RACE_DRAGON
)
and
c
:
IsAttribute
(
ATTRIBUTE_FIRE
)
and
c
:
IsLevelBelow
(
4
)
and
not
c
:
IsCode
(
id
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c91810826
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
sptg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c91810826
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
aux
.
Stringid
(
91810826
,
1
))
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
aux
.
Stringid
(
id
,
1
))
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c91810826
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
spop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c91810826
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
function
c91810826
.
sccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
sccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
return
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
end
end
function
c91810826
.
sctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
sctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
:
GetHandler
())
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
aux
.
Stringid
(
91810826
,
2
))
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
aux
.
Stringid
(
id
,
2
))
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
function
c91810826
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsControler
(
1
-
tp
)
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
if
c
:
IsControler
(
1
-
tp
)
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
c
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
opt
=
Duel
.
SelectOption
(
tp
,
1164
,
1379
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
if
opt
==
0
then
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
c
)
else
local
synchro_effect
=
AccelSynchro
.
CreateSummonEffect
(
c
,{
gc
=
function
()
return
c
end
,
})
synchro_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
end
end
c92744676.lua
View file @
ab02792f
...
@@ -65,8 +65,16 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -65,8 +65,16 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp)
if
c
:
IsControler
(
1
-
tp
)
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
if
c
:
IsControler
(
1
-
tp
)
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
c
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
opt
=
Duel
.
SelectOption
(
tp
,
1164
,
1379
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
if
opt
==
0
then
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
c
)
else
local
synchro_effect
=
AccelSynchro
.
CreateSummonEffect
(
c
,{
gc
=
function
()
return
c
end
,
})
synchro_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
end
end
c98558751.lua
View file @
ab02792f
--TG ワンダー・マジシャン
--TG ワンダー・マジシャン
function
c98558751
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--synchro summon
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0x27
),
1
)
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0x27
),
1
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--destroy
--destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
98558751
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCondition
(
c98558751
.
descon
)
e1
:
SetCondition
(
s
.
descon
)
e1
:
SetTarget
(
c98558751
.
destg
)
e1
:
SetTarget
(
s
.
destg
)
e1
:
SetOperation
(
c98558751
.
desop
)
e1
:
SetOperation
(
s
.
desop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--draw
--draw
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
98558751
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetCondition
(
c98558751
.
drcon
)
e2
:
SetCondition
(
s
.
drcon
)
e2
:
SetTarget
(
c98558751
.
drtg
)
e2
:
SetTarget
(
s
.
drtg
)
e2
:
SetOperation
(
c98558751
.
drop
)
e2
:
SetOperation
(
s
.
drop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--synchro effect
--synchro effect
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
98558751
,
2
))
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e3
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_CHAIN
)
e3
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_CHAIN
)
e3
:
SetCondition
(
c98558751
.
sccon
)
e3
:
SetCondition
(
s
.
sccon
)
e3
:
SetTarget
(
c98558751
.
sctg
)
e3
:
SetTarget
(
s
.
sctg
)
e3
:
SetOperation
(
c98558751
.
scop
)
e3
:
SetOperation
(
s
.
scop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c98558751
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
end
function
c98558751
.
filter
(
c
)
function
s
.
filter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
end
function
c98558751
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
s
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
c98558751
.
filter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsOnField
()
and
s
.
filter
(
chkc
)
end
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c98558751
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
s
.
filter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
end
function
c98558751
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
if
tc
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
end
end
function
c98558751
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_DESTROY
)
return
e
:
GetHandler
():
IsReason
(
REASON_DESTROY
)
end
end
function
c98558751
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetTargetParam
(
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
end
function
c98558751
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
end
function
c98558751
.
sccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
sccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
return
Duel
.
GetTurnPlayer
()
~=
tp
and
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
end
end
function
c98558751
.
sctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
sctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
:
GetHandler
())
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
:
GetHandler
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
function
c98558751
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsControler
(
1
-
tp
)
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
if
c
:
IsControler
(
1
-
tp
)
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
c
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
opt
=
Duel
.
SelectOption
(
tp
,
1164
,
1379
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
if
opt
==
0
then
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
c
)
else
local
synchro_effect
=
AccelSynchro
.
CreateSummonEffect
(
c
,{
gc
=
function
()
return
c
end
,
})
synchro_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
end
end
c99937842.lua
View file @
ab02792f
--TG スター・ガーディアン
--TG スター・ガーディアン
function
c99937842
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--synchro summon
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0x27
),
1
)
aux
.
AddSynchroProcedure
(
c
,
nil
,
aux
.
NonTuner
(
Card
.
IsSetCard
,
0x27
),
1
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--tohand
--tohand
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
99937842
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetCategory
(
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
99937842
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetTarget
(
c99937842
.
thtg
)
e1
:
SetTarget
(
s
.
thtg
)
e1
:
SetOperation
(
c99937842
.
thop
)
e1
:
SetOperation
(
s
.
thop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--special summon
--special summon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
99937842
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetCountLimit
(
1
,
99937843
)
e2
:
SetCountLimit
(
1
,
99937843
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetTarget
(
c99937842
.
sptg
)
e2
:
SetTarget
(
s
.
sptg
)
e2
:
SetOperation
(
c99937842
.
spop
)
e2
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--synchro effect
--synchro effect
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
99937842
,
2
))
e3
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e3
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_CHAIN
)
e3
:
SetCountLimit
(
1
,
EFFECT_COUNT_CODE_CHAIN
)
e3
:
SetCondition
(
c99937842
.
sccon
)
e3
:
SetCondition
(
s
.
sccon
)
e3
:
SetTarget
(
c99937842
.
sctg
)
e3
:
SetTarget
(
s
.
sctg
)
e3
:
SetOperation
(
c99937842
.
scop
)
e3
:
SetOperation
(
s
.
scop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c99937842
.
thfilter
(
c
,
tp
)
function
s
.
thfilter
(
c
,
tp
)
return
c
:
IsSetCard
(
0x27
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x27
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
end
function
c99937842
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c99937842
.
thfilter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
s
.
thfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c99937842
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
s
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
Duel
.
SelectTarget
(
tp
,
c99937842
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
sg
=
Duel
.
SelectTarget
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
sg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
sg
,
1
,
0
,
0
)
end
end
function
c99937842
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
tc
,
nil
,
REASON_EFFECT
)
end
end
end
end
function
c99937842
.
spfilter
(
c
,
e
,
tp
)
function
s
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x27
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x27
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c99937842
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c99937842
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
end
function
c99937842
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c99937842
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
spfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
function
c99937842
.
sccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
sccon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
~=
tp
return
Duel
.
GetTurnPlayer
()
~=
tp
and
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
and
(
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
or
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN2
)
end
end
function
c99937842
.
sctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
sctg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
:
GetHandler
())
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
:
GetHandler
())
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
function
c99937842
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
scop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsControler
(
1
-
tp
)
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
if
c
:
IsControler
(
1
-
tp
)
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsFacedown
()
then
return
end
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
c
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
IsSynchroSummonable
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
c
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
opt
=
Duel
.
SelectOption
(
tp
,
1164
,
1379
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
if
opt
==
0
then
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SynchroSummon
(
tp
,
sg
:
GetFirst
(),
c
)
else
local
synchro_effect
=
AccelSynchro
.
CreateSummonEffect
(
c
,{
gc
=
function
()
return
c
end
,
})
synchro_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
end
end
end
end
procedure.lua
View file @
ab02792f
...
@@ -3531,19 +3531,7 @@ function Synchro.FindValidSelection(candidates,target_level,
...
@@ -3531,19 +3531,7 @@ function Synchro.FindValidSelection(candidates,target_level,
level_mapper
,
hand_count_mapper
,
scheck
,
level_mapper
,
hand_count_mapper
,
scheck
,
pre_select
or
{},
pre_select
or
{},
1
,
1
,
state
or
{
-- initial state
state
,
possible_sums
=
{[
0
]
=
true
},
tuner_count
=
0
,
non_tuner_count
=
0
,
level_mapper
=
level_mapper
,
level_mapper_priority
=
0
,
hand_count_mapper
=
hand_count_mapper
,
hand_count_limit
=
0
,
hand_count
=
0
,
genomix_race
=
nil
,
material_limit_filter
=
aux
.
TRUE
,
selected_roles
=
{}
},
{
{
level_prune_index
=
level_prune_index
,
level_prune_index
=
level_prune_index
,
hand_prune_index
=
hand_prune_index
,
hand_prune_index
=
hand_prune_index
,
...
@@ -3692,10 +3680,25 @@ end
...
@@ -3692,10 +3680,25 @@ end
--- Synchro condition generator using tuner/non-tuner min/max counts and filters
--- Synchro condition generator using tuner/non-tuner min/max counts and filters
function
Synchro
.
SynCondition
(
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
level_mapper
,
hand_count_mapper
,
scheck
)
function
Synchro
.
SynCondition
(
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
level_mapper
,
hand_count_mapper
,
scheck
)
--- @param mg Group
--- @param mg Group
return
function
(
e
,
c
,
smat
,
mg
,
min
,
max
)
return
function
(
e
,
c
,
smat
,
mg
,
min
,
max
,
accel_synchro_opts
)
if
c
==
nil
then
return
true
end
if
c
==
nil
then
return
true
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
if
c
:
IsType
(
TYPE_PENDULUM
)
and
c
:
IsFaceup
()
then
return
false
end
--- accel synchro has already selected their materials, skip check
if
mg
~=
nil
and
#
mg
==
min
then
return
true
end
accel_synchro_opts
=
accel_synchro_opts
or
{}
local
skip_hand_count_check
=
accel_synchro_opts
.
skip_hand_count_check
or
false
local
additional_scheck
=
accel_synchro_opts
.
additional_scheck
--- add additional_scheck
if
additional_scheck
~=
nil
then
local
old_scheck
=
scheck
scheck
=
aux
.
AND
(
additional_scheck
,
old_scheck
)
end
-- add リペア・ジェネクス・コントローラー to scheck
-- add リペア・ジェネクス・コントローラー to scheck
if
Duel
.
IsPlayerAffectedByEffect
(
c
:
GetOwner
(),
8173184
)
then
if
Duel
.
IsPlayerAffectedByEffect
(
c
:
GetOwner
(),
8173184
)
then
local
old_scheck
=
scheck
local
old_scheck
=
scheck
...
@@ -3712,9 +3715,6 @@ function Synchro.SynCondition(tuner_race,tuner_filter,non_tuner_race,non_tuner_f
...
@@ -3712,9 +3715,6 @@ function Synchro.SynCondition(tuner_race,tuner_filter,non_tuner_race,non_tuner_f
local
target_level
=
c
:
GetLevel
()
local
target_level
=
c
:
GetLevel
()
mg
=
mg
or
Synchro
.
GetSynchroMaterial
(
c
:
GetControler
(),
c
,
level_mapper
)
mg
=
mg
or
Synchro
.
GetSynchroMaterial
(
c
:
GetControler
(),
c
,
level_mapper
)
local
smat_states
=
nil
local
smat_arr
=
nil
local
candidates
=
{}
local
candidates
=
{}
for
mc
in
aux
.
Next
(
mg
)
do
for
mc
in
aux
.
Next
(
mg
)
do
if
mc
~=
smat
then
if
mc
~=
smat
then
...
@@ -3722,35 +3722,43 @@ function Synchro.SynCondition(tuner_race,tuner_filter,non_tuner_race,non_tuner_f
...
@@ -3722,35 +3722,43 @@ function Synchro.SynCondition(tuner_race,tuner_filter,non_tuner_race,non_tuner_f
end
end
end
end
local
pre_selected_arr
=
{}
if
smat
~=
nil
then
if
smat
~=
nil
then
if
not
mg
:
IsContains
(
smat
)
then
if
not
mg
:
IsContains
(
smat
)
then
return
false
return
false
end
end
smat_arr
=
{}
table.insert
(
pre_selected_arr
,
smat
)
table.insert
(
smat_arr
,
smat
)
end
smat_states
=
Synchro
.
BuildStatesFromSelection
(
smat_arr
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
level_mapper
,
hand_count_mapper
,
c
,
math.huge
)
local
pre_selected_states
=
Synchro
.
BuildStatesFromSelection
(
pre_selected_arr
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
level_mapper
,
hand_count_mapper
,
c
,
math.huge
,
skip_hand_count_check
)
for
_
,
state
in
ipairs
(
smat_states
)
do
for
_
,
state
in
ipairs
(
pre_selected_states
)
do
if
Synchro
.
FindValidSelection
(
candidates
,
target_level
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
c
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
level_mapper
,
hand_count_mapper
,
scheck
,
smat_arr
,
state
)
then
if
Synchro
.
FindValidSelection
(
candidates
,
target_level
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
c
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
level_mapper
,
hand_count_mapper
,
scheck
,
pre_selected_arr
,
state
)
then
return
true
return
true
end
end
end
return
false
else
return
Synchro
.
FindValidSelection
(
candidates
,
target_level
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
c
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
level_mapper
,
hand_count_mapper
,
scheck
)
end
end
end
end
end
end
function
Synchro
.
SynTarget
(
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
level_mapper
,
hand_count_mapper
,
scheck
)
function
Synchro
.
SynTarget
(
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
tuner_min
,
tuner_max
,
non_tuner_min
,
non_tuner_max
,
level_mapper
,
hand_count_mapper
,
scheck
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
tc
,
smat
,
mg
,
min
,
max
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
tc
,
smat
,
mg
,
min
,
max
,
accel_synchro_opts
)
--- accel synchro has already selected their materials, skip material selection step
if
mg
~=
nil
and
#
mg
==
min
then
if
mg
~=
nil
and
#
mg
==
min
then
e
:
SetLabelObject
(
mg
)
e
:
SetLabelObject
(
mg
)
return
true
return
true
end
end
accel_synchro_opts
=
accel_synchro_opts
or
{}
local
skip_hand_count_check
=
accel_synchro_opts
.
skip_hand_count_check
or
false
local
additional_scheck
=
accel_synchro_opts
.
additional_scheck
mg
=
mg
or
Synchro
.
GetSynchroMaterial
(
tp
,
tc
,
level_mapper
)
mg
=
mg
or
Synchro
.
GetSynchroMaterial
(
tp
,
tc
,
level_mapper
)
--- add additional_scheck
if
additional_scheck
~=
nil
then
local
old_scheck
=
scheck
scheck
=
aux
.
AND
(
additional_scheck
,
old_scheck
)
end
-- add リペア・ジェネクス・コントローラー to scheck
-- add リペア・ジェネクス・コントローラー to scheck
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
8173184
)
then
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
8173184
)
then
local
old_scheck
=
scheck
local
old_scheck
=
scheck
...
@@ -3791,7 +3799,7 @@ function Synchro.SynTarget(tuner_race,tuner_filter,non_tuner_race,non_tuner_filt
...
@@ -3791,7 +3799,7 @@ function Synchro.SynTarget(tuner_race,tuner_filter,non_tuner_race,non_tuner_filt
tuner_race
,
tuner_filter
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
level_mapper
,
hand_count_mapper
,
level_mapper
,
hand_count_mapper
,
tc
,
math.huge
tc
,
math.huge
,
skip_hand_count_check
)
)
--- use the min select level as hint
--- use the min select level as hint
for
_
,
state
in
ipairs
(
selected_states
)
do
for
_
,
state
in
ipairs
(
selected_states
)
do
...
@@ -3829,7 +3837,7 @@ function Synchro.SynTarget(tuner_race,tuner_filter,non_tuner_race,non_tuner_filt
...
@@ -3829,7 +3837,7 @@ function Synchro.SynTarget(tuner_race,tuner_filter,non_tuner_race,non_tuner_filt
tuner_race
,
tuner_filter
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
level_mapper
,
hand_count_mapper
,
level_mapper
,
hand_count_mapper
,
tc
,
math.huge
tc
,
math.huge
,
skip_hand_count_check
)
)
for
_
,
init_state
in
ipairs
(
base_states
)
do
for
_
,
init_state
in
ipairs
(
base_states
)
do
...
@@ -4064,7 +4072,7 @@ function Synchro.UpdatepossibleSums(possible_sums,card_levels,prune_level)
...
@@ -4064,7 +4072,7 @@ function Synchro.UpdatepossibleSums(possible_sums,card_levels,prune_level)
return
new_sums
return
new_sums
end
end
function
Synchro
.
BuildStatesFromSelection
(
selection
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
level_mapper
,
hand_count_mapper
,
tc
,
prune_level
)
function
Synchro
.
BuildStatesFromSelection
(
selection
,
tuner_race
,
tuner_filter
,
non_tuner_race
,
non_tuner_filter
,
level_mapper
,
hand_count_mapper
,
tc
,
prune_level
,
skip_hand_count_check
)
local
states
=
{
local
states
=
{
{
{
possible_sums
=
{[
0
]
=
true
},
possible_sums
=
{[
0
]
=
true
},
...
@@ -4081,6 +4089,10 @@ function Synchro.BuildStatesFromSelection(selection,tuner_race,tuner_filter,non_
...
@@ -4081,6 +4089,10 @@ function Synchro.BuildStatesFromSelection(selection,tuner_race,tuner_filter,non_
}
}
}
}
if
skip_hand_count_check
==
true
then
states
[
1
].
hand_count_limit
=
math.huge
end
Synchro
.
SortMaterials
(
selection
,
tc
,
tuner_filter
)
Synchro
.
SortMaterials
(
selection
,
tc
,
tuner_filter
)
local
selected
=
{}
local
selected
=
{}
...
@@ -4200,8 +4212,8 @@ function Synchro.IsMandatory(c)
...
@@ -4200,8 +4212,8 @@ function Synchro.IsMandatory(c)
return
Synchro
.
IsMono
(
c
)
or
Synchro
.
IsGenomix
(
c
)
return
Synchro
.
IsMono
(
c
)
or
Synchro
.
IsGenomix
(
c
)
end
end
function
Synchro
.
IsNoHarm
(
c
)
function
Synchro
.
IsNoHarm
(
c
,
tc
)
return
Synchro
.
IsTatsunoko
(
c
)
or
Synchro
.
IsTatsunecro
(
c
)
return
Synchro
.
IsTatsunoko
(
c
)
or
Synchro
.
IsTatsunecro
(
c
)
or
Synchro
.
IsTGCyberMagician
(
c
,
tc
)
end
end
-- Helper to generate only the variant-specific diffs for a card
-- Helper to generate only the variant-specific diffs for a card
...
@@ -4235,7 +4247,7 @@ function Synchro.GenerateVariantForCard(st,card,selected,tc,tuner_race,tuner_fil
...
@@ -4235,7 +4247,7 @@ function Synchro.GenerateVariantForCard(st,card,selected,tc,tuner_race,tuner_fil
end
end
-- Normal branch
-- Normal branch
if
not
(
Synchro
.
IsMandatory
(
card
)
or
Synchro
.
IsNoHarm
(
card
))
then
if
not
(
Synchro
.
IsMandatory
(
card
)
or
Synchro
.
IsNoHarm
(
card
,
tc
))
then
table.insert
(
base_variants
,{})
table.insert
(
base_variants
,{})
end
end
...
@@ -4250,15 +4262,17 @@ function Synchro.GenerateVariantForCard(st,card,selected,tc,tuner_race,tuner_fil
...
@@ -4250,15 +4262,17 @@ function Synchro.GenerateVariantForCard(st,card,selected,tc,tuner_race,tuner_fil
-- Tatsunoko effect
-- Tatsunoko effect
if
Synchro
.
IsTatsunoko
(
card
)
then
if
Synchro
.
IsTatsunoko
(
card
)
then
local
limit
=
math.max
(
st
.
hand_count_limit
,
1
)
table.insert
(
base_variants
,{
table.insert
(
base_variants
,{
hand_count_limit
=
1
,
hand_count_limit
=
limit
,
})
})
end
end
-- Tatsunecro effect
-- Tatsunecro effect
if
Synchro
.
IsTatsunecro
(
card
)
then
if
Synchro
.
IsTatsunecro
(
card
)
then
local
limit
=
math.max
(
st
.
hand_count_limit
,
1
)
table.insert
(
base_variants
,{
table.insert
(
base_variants
,{
hand_count_limit
=
1
,
hand_count_limit
=
limit
,
})
})
end
end
...
@@ -4427,3 +4441,80 @@ function Synchro.CanIncludeMaterial(mc,state,selected,tc,
...
@@ -4427,3 +4441,80 @@ function Synchro.CanIncludeMaterial(mc,state,selected,tc,
return
true
,
append_material_limit_filter
return
true
,
append_material_limit_filter
end
end
--- Accel Synchro
AccelSynchro
=
{}
function
AccelSynchro
.
CreateSummonEffect
(
c
,
opts
)
local
mg
=
opts
.
mg
or
nil
local
gc
=
opts
.
gc
or
function
()
return
nil
end
local
skip_hand_count_check
=
opts
.
skip_hand_count_check
or
false
local
additional_scheck
=
opts
.
additional_scheck
local
e
=
Effect
.
CreateEffect
(
c
)
-- e:SetDescription(1164)
e
:
SetDescription
(
1379
)
--- 启用扩展卡包调试模式
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e
:
SetCode
(
EVENT_FREE_CHAIN
)
e
:
SetRange
(
LOCATION_MZONE
)
e
:
SetTarget
(
AccelSynchro
.
GetSummonTarget
(
mg
,
gc
,
skip_hand_count_check
,
additional_scheck
))
e
:
SetOperation
(
AccelSynchro
.
GetSummonOperation
(
mg
,
gc
,
skip_hand_count_check
,
additional_scheck
))
return
e
end
function
AccelSynchro
.
GetSummonTarget
(
mg
,
gc
,
skip_hand_count_check
,
additional_scheck
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
mg
=
mg
or
Duel
.
GetSynchroMaterial
(
tp
)
if
chk
==
0
then
--- @param tc Card
return
Duel
.
IsExistingMatchingCard
(
function
(
tc
)
return
tc
:
IsSynchroSummonable
(
gc
(
e
),
mg
)
end
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
function
AccelSynchro
.
GetSummonOperation
(
mg
,
gc
,
skip_hand_count_check
,
additional_scheck
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
mg
=
mg
or
Duel
.
GetSynchroMaterial
(
tp
)
local
g
=
Duel
.
GetMatchingGroup
(
function
(
tc
)
return
tc
:
IsSynchroSummonable
(
gc
(
e
),
mg
)
end
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
local
mat
=
Group
.
CreateGroup
()
local
tc
=
nil
local
selected_proc
=
nil
while
#
mat
==
0
do
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
tc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
local
procs
=
{
tc
:
IsHasEffect
(
EFFECT_SPSUMMON_PROC
,
tp
)}
local
avaliable_procs
=
{}
for
_
,
proc
in
ipairs
(
procs
)
do
local
con
=
proc
:
GetCondition
()
if
con
(
proc
,
tc
,
gc
(
e
),
mg
,
-
1
,
math.huge
,{
skip_hand_count_check
=
skip_hand_count_check
,
additional_scheck
=
additional_scheck
,
})
then
table.insert
(
avaliable_procs
,
proc
)
end
end
assert
(
#
avaliable_procs
>
0
,
"target card does not support new synchro yet"
)
selected_proc
=
avaliable_procs
[
1
]
if
#
avaliable_procs
>
1
then
local
opts
=
{}
for
_
,
avaliable_proc
in
ipairs
(
avaliable_procs
)
do
table.insert
(
opts
,
avaliable_proc
:
GetDescription
())
end
local
proc_index
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
opts
))
+
1
selected_proc
=
avaliable_procs
[
proc_index
]
end
local
target
=
selected_proc
:
GetTarget
()
if
target
(
selected_proc
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
,
tc
,
gc
(
e
),
mg
,
-
1
,
math.huge
,{
skip_hand_count_check
=
skip_hand_count_check
,
additional_scheck
=
additional_scheck
,
})
then
mat
=
selected_proc
:
GetLabelObject
()
end
end
assert
(
tc
~=
nil
)
assert
(
selected_proc
~=
nil
)
Duel
.
SynchroSummon
(
tp
,
tc
,
nil
,
mat
,
#
mat
,
#
mat
)
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