Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
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
Commits
42ffded1
Commit
42ffded1
authored
May 29, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
674bfdde
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
308 additions
and
594 deletions
+308
-594
c19261966.lua
c19261966.lua
+39
-87
c20366274.lua
c20366274.lua
+39
-87
c22198672.lua
c22198672.lua
+29
-31
c33252803.lua
c33252803.lua
+1
-1
c48424886.lua
c48424886.lua
+40
-88
c73511233.lua
c73511233.lua
+5
-3
c74009824.lua
c74009824.lua
+39
-87
c74822425.lua
c74822425.lua
+39
-87
c86196216.lua
c86196216.lua
+2
-0
c87460579.lua
c87460579.lua
+2
-2
c88482761.lua
c88482761.lua
+16
-13
c88696724.lua
c88696724.lua
+1
-1
c88722973.lua
c88722973.lua
+2
-2
c90812044.lua
c90812044.lua
+15
-18
c94977269.lua
c94977269.lua
+39
-87
No files found.
c19261966.lua
View file @
42ffded1
...
...
@@ -37,118 +37,70 @@ function c19261966.initial_effect(c)
e4
:
SetOperation
(
c19261966
.
thop
)
c
:
RegisterEffect
(
e4
)
end
function
c19261966
.
ffilter
(
c
,
fc
)
return
(
c19261966
.
ffilter1
(
c
)
or
c19261966
.
ffilter2
(
c
))
and
c
:
IsCanBeFusionMaterial
(
fc
)
and
not
c
:
IsHasEffect
(
6205579
)
end
function
c19261966
.
exfilter
(
c
,
fc
)
return
c
:
IsFaceup
()
and
c19261966
.
ffilter
(
c
,
fc
)
end
function
c19261966
.
ffilter1
(
c
)
return
c
:
IsFusionSetCard
(
0x9d
)
and
not
c
:
IsHasEffect
(
6205579
)
return
c
:
IsFusionSetCard
(
0x9d
)
end
function
c19261966
.
ffilter2
(
c
)
return
(
c
:
IsFusionAttribute
(
ATTRIBUTE_WATER
)
or
c
:
IsHasEffect
(
4904633
))
and
not
c
:
IsHasEffect
(
6205579
)
return
c
:
IsFusionAttribute
(
ATTRIBUTE_WATER
)
or
c
:
IsHasEffect
(
4904633
)
end
function
c19261966
.
spfilter1
(
c
,
tp
,
mg
,
exg
)
return
mg
:
IsExists
(
c19261966
.
spfilter2
,
1
,
c
,
tp
,
c
)
or
(
exg
and
exg
:
IsExists
(
c19261966
.
spfilter2
,
1
,
c
,
tp
,
c
))
end
function
c19261966
.
exfilter
(
c
,
g
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeFusionMaterial
()
and
not
g
:
IsContains
(
c
)
function
c19261966
.
spfilter2
(
c
,
tp
,
mc
)
return
(
c19261966
.
ffilter1
(
c
)
and
c19261966
.
ffilter2
(
mc
)
or
c19261966
.
ffilter2
(
c
)
and
c19261966
.
ffilter1
(
mc
))
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
Group
.
FromCards
(
c
,
mc
))
>
0
end
function
c19261966
.
fuscon
(
e
,
g
,
gc
,
chkf
)
if
g
==
nil
then
return
true
end
local
mg
=
g
:
Filter
(
Card
.
IsCanBeFusionMaterial
,
nil
,
e
:
GetHandler
())
local
c
=
e
:
GetHandler
()
local
mg
=
g
:
Filter
(
c19261966
.
ffilter
,
nil
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
local
exg
=
Group
.
CreateGroup
()
local
exg
=
nil
if
fc
and
fc
:
IsHasEffect
(
81788994
)
and
fc
:
IsCanRemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
then
local
sg
=
Duel
.
GetMatchingGroup
(
c19261966
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
mg
)
exg
:
Merge
(
sg
)
exg
=
Duel
.
GetMatchingGroup
(
c19261966
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
mg
,
c
)
end
if
gc
then
if
not
gc
:
IsCanBeFusionMaterial
(
e
:
GetHandler
())
then
return
false
end
return
(
c19261966
.
ffilter1
(
gc
)
and
(
mg
:
IsExists
(
c19261966
.
ffilter2
,
1
,
gc
)
or
exg
:
IsExists
(
c19261966
.
ffilter2
,
1
,
gc
)))
or
(
c19261966
.
ffilter2
(
gc
)
and
(
mg
:
IsExists
(
c19261966
.
ffilter1
,
1
,
gc
)
or
exg
:
IsExists
(
c19261966
.
ffilter1
,
1
,
gc
)))
end
local
g1
=
Group
.
CreateGroup
()
local
g2
=
Group
.
CreateGroup
()
local
g3
=
Group
.
CreateGroup
()
local
g4
=
Group
.
CreateGroup
()
local
tc
=
mg
:
GetFirst
()
while
tc
do
if
c19261966
.
ffilter1
(
tc
)
then
g1
:
AddCard
(
tc
)
if
aux
.
FConditionCheckF
(
tc
,
chkf
)
then
g3
:
AddCard
(
tc
)
end
end
if
c19261966
.
ffilter2
(
tc
)
then
g2
:
AddCard
(
tc
)
if
aux
.
FConditionCheckF
(
tc
,
chkf
)
then
g4
:
AddCard
(
tc
)
end
end
tc
=
mg
:
GetNext
()
end
local
exg1
=
exg
:
Filter
(
c19261966
.
ffilter1
,
nil
)
local
exg2
=
exg
:
Filter
(
c19261966
.
ffilter2
,
nil
)
if
chkf
~=
PLAYER_NONE
then
return
(
g3
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
g2
)
or
g3
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg2
)
or
g4
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
g1
)
or
g4
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg1
))
else
return
(
g1
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
g2
)
or
g1
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg2
)
or
g2
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg1
))
if
not
mg
:
IsContains
(
gc
)
then
return
false
end
return
c19261966
.
spfilter1
(
gc
,
tp
,
mg
,
exg
)
end
return
mg
:
IsExists
(
c19261966
.
spfilter1
,
1
,
nil
,
tp
,
mg
,
exg
)
end
function
c19261966
.
fusop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
gc
,
chkf
)
local
g
=
eg
:
Filter
(
Card
.
IsCanBeFusionMaterial
,
nil
,
e
:
GetHandler
())
local
c
=
e
:
GetHandler
()
local
mg
=
eg
:
Filter
(
c19261966
.
ffilter
,
nil
,
c
)
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
local
exg
=
Group
.
CreateGroup
()
local
exg
=
nil
if
fc
and
fc
:
IsHasEffect
(
81788994
)
and
fc
:
IsCanRemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
then
local
sg
=
Duel
.
GetMatchingGroup
(
c19261966
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
g
)
exg
:
Merge
(
sg
)
exg
=
Duel
.
GetMatchingGroup
(
c19261966
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
mg
,
c
)
end
local
g
=
nil
if
gc
then
local
sg1
=
Group
.
CreateGroup
()
local
sg2
=
Group
.
CreateGroup
()
if
c19261966
.
ffilter1
(
gc
)
then
sg1
:
Merge
(
g
:
Filter
(
c19261966
.
ffilter2
,
gc
))
sg2
:
Merge
(
exg
:
Filter
(
c19261966
.
ffilter2
,
gc
))
end
if
c19261966
.
ffilter2
(
gc
)
then
sg1
:
Merge
(
g
:
Filter
(
c19261966
.
ffilter1
,
gc
))
sg2
:
Merge
(
exg
:
Filter
(
c19261966
.
ffilter1
,
gc
))
end
local
g1
=
nil
if
sg1
:
GetCount
()
==
0
or
(
sg2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
81788994
,
0
)))
then
fc
:
RemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g1
=
sg2
:
Select
(
tp
,
1
,
1
,
nil
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g1
=
sg1
:
Select
(
tp
,
1
,
1
,
nil
)
end
Duel
.
SetFusionMaterial
(
g1
)
return
end
local
sg
=
g
:
Filter
(
aux
.
FConditionFilterF2c
,
nil
,
c19261966
.
ffilter1
,
c19261966
.
ffilter2
)
local
g1
=
nil
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
if
chkf
~=
PLAYER_NONE
then
g1
=
sg
:
FilterSelect
(
tp
,
aux
.
FConditionCheckF
,
1
,
1
,
nil
,
chkf
)
else
g1
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
end
local
tc1
=
g1
:
GetFirst
()
local
sg1
=
Group
.
CreateGroup
()
local
sg2
=
Group
.
CreateGroup
()
if
c19261966
.
ffilter1
(
tc1
)
then
sg1
:
Merge
(
sg
:
Filter
(
c19261966
.
ffilter2
,
tc1
))
sg2
:
Merge
(
exg
:
Filter
(
c19261966
.
ffilter2
,
tc1
))
end
if
c19261966
.
ffilter2
(
tc1
)
then
sg1
:
Merge
(
sg
:
Filter
(
c19261966
.
ffilter1
,
tc1
))
sg2
:
Merge
(
exg
:
Filter
(
c19261966
.
ffilter1
,
tc1
))
g
=
Group
.
FromCards
(
gc
)
mg
:
RemoveCard
(
gc
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g
=
mg
:
FilterSelect
(
tp
,
c19261966
.
spfilter1
,
1
,
1
,
nil
,
tp
,
mg
,
exg
)
mg
:
Sub
(
g
)
end
local
g2
=
nil
if
sg1
:
GetCount
()
==
0
or
(
sg2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
81788994
,
0
)))
then
if
exg
and
(
mg
:
GetCount
()
==
0
or
(
exg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
81788994
,
0
))))
then
fc
:
RemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g2
=
sg2
:
Select
(
tp
,
1
,
1
,
nil
)
local
sg
=
exg
:
FilterSelect
(
tp
,
c19261966
.
spfilter2
,
1
,
1
,
nil
,
tp
,
g
:
GetFirst
())
g
:
Merge
(
sg
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g2
=
sg1
:
Select
(
tp
,
1
,
1
,
nil
)
local
sg
=
mg
:
FilterSelect
(
tp
,
c19261966
.
spfilter2
,
1
,
1
,
nil
,
tp
,
g
:
GetFirst
())
g
:
Merge
(
sg
)
end
g1
:
Merge
(
g2
)
Duel
.
SetFusionMaterial
(
g1
)
Duel
.
SetFusionMaterial
(
g
)
end
function
c19261966
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
...
...
c20366274.lua
View file @
42ffded1
...
...
@@ -48,118 +48,70 @@ function c20366274.initial_effect(c)
e5
:
SetOperation
(
c20366274
.
thop
)
c
:
RegisterEffect
(
e5
)
end
function
c20366274
.
ffilter
(
c
,
fc
)
return
(
c20366274
.
ffilter1
(
c
)
or
c20366274
.
ffilter2
(
c
))
and
c
:
IsCanBeFusionMaterial
(
fc
)
and
not
c
:
IsHasEffect
(
6205579
)
end
function
c20366274
.
exfilter
(
c
,
fc
)
return
c
:
IsFaceup
()
and
c20366274
.
ffilter
(
c
,
fc
)
end
function
c20366274
.
ffilter1
(
c
)
return
c
:
IsFusionSetCard
(
0x9d
)
and
not
c
:
IsHasEffect
(
6205579
)
return
c
:
IsFusionSetCard
(
0x9d
)
end
function
c20366274
.
ffilter2
(
c
)
return
(
c
:
IsFusionAttribute
(
ATTRIBUTE_LIGHT
)
or
c
:
IsHasEffect
(
4904633
))
and
not
c
:
IsHasEffect
(
6205579
)
return
c
:
IsFusionAttribute
(
ATTRIBUTE_LIGHT
)
or
c
:
IsHasEffect
(
4904633
)
end
function
c20366274
.
spfilter1
(
c
,
tp
,
mg
,
exg
)
return
mg
:
IsExists
(
c20366274
.
spfilter2
,
1
,
c
,
tp
,
c
)
or
(
exg
and
exg
:
IsExists
(
c20366274
.
spfilter2
,
1
,
c
,
tp
,
c
))
end
function
c20366274
.
exfilter
(
c
,
g
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeFusionMaterial
()
and
not
g
:
IsContains
(
c
)
function
c20366274
.
spfilter2
(
c
,
tp
,
mc
)
return
(
c20366274
.
ffilter1
(
c
)
and
c20366274
.
ffilter2
(
mc
)
or
c20366274
.
ffilter2
(
c
)
and
c20366274
.
ffilter1
(
mc
))
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
Group
.
FromCards
(
c
,
mc
))
>
0
end
function
c20366274
.
fuscon
(
e
,
g
,
gc
,
chkf
)
if
g
==
nil
then
return
true
end
local
mg
=
g
:
Filter
(
Card
.
IsCanBeFusionMaterial
,
nil
,
e
:
GetHandler
())
local
c
=
e
:
GetHandler
()
local
mg
=
g
:
Filter
(
c20366274
.
ffilter
,
nil
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
local
exg
=
Group
.
CreateGroup
()
local
exg
=
nil
if
fc
and
fc
:
IsHasEffect
(
81788994
)
and
fc
:
IsCanRemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
then
local
sg
=
Duel
.
GetMatchingGroup
(
c20366274
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
mg
)
exg
:
Merge
(
sg
)
exg
=
Duel
.
GetMatchingGroup
(
c20366274
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
mg
,
c
)
end
if
gc
then
if
not
gc
:
IsCanBeFusionMaterial
(
e
:
GetHandler
())
then
return
false
end
return
(
c20366274
.
ffilter1
(
gc
)
and
(
mg
:
IsExists
(
c20366274
.
ffilter2
,
1
,
gc
)
or
exg
:
IsExists
(
c20366274
.
ffilter2
,
1
,
gc
)))
or
(
c20366274
.
ffilter2
(
gc
)
and
(
mg
:
IsExists
(
c20366274
.
ffilter1
,
1
,
gc
)
or
exg
:
IsExists
(
c20366274
.
ffilter1
,
1
,
gc
)))
end
local
g1
=
Group
.
CreateGroup
()
local
g2
=
Group
.
CreateGroup
()
local
g3
=
Group
.
CreateGroup
()
local
g4
=
Group
.
CreateGroup
()
local
tc
=
mg
:
GetFirst
()
while
tc
do
if
c20366274
.
ffilter1
(
tc
)
then
g1
:
AddCard
(
tc
)
if
aux
.
FConditionCheckF
(
tc
,
chkf
)
then
g3
:
AddCard
(
tc
)
end
end
if
c20366274
.
ffilter2
(
tc
)
then
g2
:
AddCard
(
tc
)
if
aux
.
FConditionCheckF
(
tc
,
chkf
)
then
g4
:
AddCard
(
tc
)
end
end
tc
=
mg
:
GetNext
()
end
local
exg1
=
exg
:
Filter
(
c20366274
.
ffilter1
,
nil
)
local
exg2
=
exg
:
Filter
(
c20366274
.
ffilter2
,
nil
)
if
chkf
~=
PLAYER_NONE
then
return
(
g3
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
g2
)
or
g3
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg2
)
or
g4
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
g1
)
or
g4
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg1
))
else
return
(
g1
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
g2
)
or
g1
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg2
)
or
g2
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg1
))
if
not
mg
:
IsContains
(
gc
)
then
return
false
end
return
c20366274
.
spfilter1
(
gc
,
tp
,
mg
,
exg
)
end
return
mg
:
IsExists
(
c20366274
.
spfilter1
,
1
,
nil
,
tp
,
mg
,
exg
)
end
function
c20366274
.
fusop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
gc
,
chkf
)
local
g
=
eg
:
Filter
(
Card
.
IsCanBeFusionMaterial
,
nil
,
e
:
GetHandler
())
local
c
=
e
:
GetHandler
()
local
mg
=
eg
:
Filter
(
c20366274
.
ffilter
,
nil
,
c
)
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
local
exg
=
Group
.
CreateGroup
()
local
exg
=
nil
if
fc
and
fc
:
IsHasEffect
(
81788994
)
and
fc
:
IsCanRemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
then
local
sg
=
Duel
.
GetMatchingGroup
(
c20366274
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
g
)
exg
:
Merge
(
sg
)
exg
=
Duel
.
GetMatchingGroup
(
c20366274
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
mg
,
c
)
end
local
g
=
nil
if
gc
then
local
sg1
=
Group
.
CreateGroup
()
local
sg2
=
Group
.
CreateGroup
()
if
c20366274
.
ffilter1
(
gc
)
then
sg1
:
Merge
(
g
:
Filter
(
c20366274
.
ffilter2
,
gc
))
sg2
:
Merge
(
exg
:
Filter
(
c20366274
.
ffilter2
,
gc
))
end
if
c20366274
.
ffilter2
(
gc
)
then
sg1
:
Merge
(
g
:
Filter
(
c20366274
.
ffilter1
,
gc
))
sg2
:
Merge
(
exg
:
Filter
(
c20366274
.
ffilter1
,
gc
))
end
local
g1
=
nil
if
sg1
:
GetCount
()
==
0
or
(
sg2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
81788994
,
0
)))
then
fc
:
RemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g1
=
sg2
:
Select
(
tp
,
1
,
1
,
nil
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g1
=
sg1
:
Select
(
tp
,
1
,
1
,
nil
)
end
Duel
.
SetFusionMaterial
(
g1
)
return
end
local
sg
=
g
:
Filter
(
aux
.
FConditionFilterF2c
,
nil
,
c20366274
.
ffilter1
,
c20366274
.
ffilter2
)
local
g1
=
nil
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
if
chkf
~=
PLAYER_NONE
then
g1
=
sg
:
FilterSelect
(
tp
,
aux
.
FConditionCheckF
,
1
,
1
,
nil
,
chkf
)
else
g1
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
end
local
tc1
=
g1
:
GetFirst
()
local
sg1
=
Group
.
CreateGroup
()
local
sg2
=
Group
.
CreateGroup
()
if
c20366274
.
ffilter1
(
tc1
)
then
sg1
:
Merge
(
sg
:
Filter
(
c20366274
.
ffilter2
,
tc1
))
sg2
:
Merge
(
exg
:
Filter
(
c20366274
.
ffilter2
,
tc1
))
end
if
c20366274
.
ffilter2
(
tc1
)
then
sg1
:
Merge
(
sg
:
Filter
(
c20366274
.
ffilter1
,
tc1
))
sg2
:
Merge
(
exg
:
Filter
(
c20366274
.
ffilter1
,
tc1
))
g
=
Group
.
FromCards
(
gc
)
mg
:
RemoveCard
(
gc
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g
=
mg
:
FilterSelect
(
tp
,
c20366274
.
spfilter1
,
1
,
1
,
nil
,
tp
,
mg
,
exg
)
mg
:
Sub
(
g
)
end
local
g2
=
nil
if
sg1
:
GetCount
()
==
0
or
(
sg2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
81788994
,
0
)))
then
if
exg
and
(
mg
:
GetCount
()
==
0
or
(
exg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
81788994
,
0
))))
then
fc
:
RemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g2
=
sg2
:
Select
(
tp
,
1
,
1
,
nil
)
local
sg
=
exg
:
FilterSelect
(
tp
,
c20366274
.
spfilter2
,
1
,
1
,
nil
,
tp
,
g
:
GetFirst
())
g
:
Merge
(
sg
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g2
=
sg1
:
Select
(
tp
,
1
,
1
,
nil
)
local
sg
=
mg
:
FilterSelect
(
tp
,
c20366274
.
spfilter2
,
1
,
1
,
nil
,
tp
,
g
:
GetFirst
())
g
:
Merge
(
sg
)
end
g1
:
Merge
(
g2
)
Duel
.
SetFusionMaterial
(
g1
)
Duel
.
SetFusionMaterial
(
g
)
end
function
c20366274
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
...
...
c22198672.lua
View file @
42ffded1
...
...
@@ -25,65 +25,63 @@ function c22198672.initial_effect(c)
e3
:
SetOperation
(
c22198672
.
chop
)
c
:
RegisterEffect
(
e3
)
end
function
c22198672
.
filter
(
c
,
tp
)
if
c
:
IsFacedown
()
or
not
c
:
IsType
(
TYPE_LINK
)
then
return
false
end
local
zone
=
c
:
GetLinkedZone
()
if
c
:
GetSequence
()
>
4
then
zone
=
bit
.
band
(
zone
,
0xfff
)
end
if
c
:
IsControler
(
1
-
tp
)
then
zone
=
bit
.
lshift
(
zone
,
0x10
)
end
return
zone
~=
0
function
c22198672
.
filter
(
c
)
if
not
c
:
IsType
(
TYPE_LINK
)
then
return
false
end
local
p
=
c
:
GetControler
()
local
zone
=
bit
.
band
(
c
:
GetLinkedZone
(),
0x1f
)
return
Duel
.
GetLocationCount
(
p
,
LOCATION_MZONE
,
p
,
LOCATION_REASON_CONTROL
,
zone
)
>
0
end
function
c22198672
.
seqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c22198672
.
filter
(
chkc
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c22198672
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
tp
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c22198672
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c22198672
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
22198672
,
2
))
Duel
.
SelectTarget
(
tp
,
c22198672
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
tp
)
Duel
.
SelectTarget
(
tp
,
c22198672
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
function
c22198672
.
seqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
not
tc
:
IsRelateToEffect
(
e
)
then
return
end
local
zone
=
tc
:
GetLinkedZone
()
if
tc
:
GetSequence
()
>
4
then
zone
=
bit
.
band
(
zone
,
0xfff
)
end
if
tc
:
IsControler
(
1
-
tp
)
then
zone
=
bit
.
lshift
(
zone
,
0x10
)
end
if
zone
~=
0
then
local
flag
=
0
local
p
=
tc
:
GetControler
()
local
zone
=
bit
.
band
(
tc
:
GetLinkedZone
(),
0x1f
)
if
Duel
.
GetLocationCount
(
p
,
LOCATION_MZONE
,
p
,
LOCATION_REASON_CONTROL
,
zone
)
>
0
then
local
s
=
0
if
tc
:
IsControler
(
tp
)
then
flag
=
bit
.
bxor
(
zone
,
0xff
)
local
flag
=
bit
.
bxor
(
zone
,
0xff
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
571
)
s
=
Duel
.
SelectDisableField
(
tp
,
1
,
LOCATION_MZONE
,
0
,
flag
)
else
flag
=
bit
.
bxor
(
zone
,
0xff0000
)
local
flag
=
bit
.
bxor
(
zone
,
0xff
)
*
0x10000
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
571
)
s
=
Duel
.
SelectDisableField
(
tp
,
1
,
0
,
LOCATION_MZONE
,
flag
)
s
=
Duel
.
SelectDisableField
(
tp
,
1
,
0
,
LOCATION_MZONE
,
flag
)
/
0x10000
end
local
nseq
=
0
if
s
==
1
or
s
==
0x10000
then
nseq
=
0
elseif
s
==
2
or
s
==
0x20000
then
nseq
=
1
elseif
s
==
4
or
s
==
0x40000
then
nseq
=
2
elseif
s
==
8
or
s
==
0x80000
then
nseq
=
3
if
s
==
1
then
nseq
=
0
elseif
s
==
2
then
nseq
=
1
elseif
s
==
4
then
nseq
=
2
elseif
s
==
8
then
nseq
=
3
else
nseq
=
4
end
Duel
.
MoveSequence
(
tc
,
nseq
)
end
end
function
c22198672
.
chfilter1
(
c
,
tp
)
return
c
:
GetSequence
()
<
5
and
Duel
.
IsExistingMatchingCard
(
c22198672
.
chfilter2
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
c
,
c
:
GetControler
())
function
c22198672
.
chfilter1
(
c
)
return
c
:
IsType
(
TYPE_LINK
)
and
c
:
GetSequence
()
<
5
and
Duel
.
IsExistingMatchingCard
(
c22198672
.
chfilter2
,
c
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
c
)
end
function
c22198672
.
chfilter2
(
c
,
tp
)
return
c
:
GetSequence
()
<
5
and
c
:
IsControler
(
tp
)
function
c22198672
.
chfilter2
(
c
)
return
c
:
IsType
(
TYPE_LINK
)
and
c
:
GetSequence
()
<
5
end
function
c22198672
.
chtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c22198672
.
chfilter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c22198672
.
chfilter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
)
end
end
function
c22198672
.
chop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
or
not
Duel
.
IsExistingMatchingCard
(
c22198672
.
chfilter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
tp
)
then
return
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONTROL
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c22198672
.
chfilter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
tp
)
Duel
.
HintSelection
(
g1
)
local
g1
=
Duel
.
SelectMatchingCard
(
tp
,
c22198672
.
chfilter1
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
)
local
tc1
=
g1
:
GetFirst
()
if
not
tc1
then
return
end
Duel
.
HintSelection
(
g1
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONTROL
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c22198672
.
chfilter2
,
t
p
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
tc1
,
tc1
:
GetControler
()
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
c22198672
.
chfilter2
,
t
c1
:
GetControler
(),
LOCATION_MZONE
,
0
,
1
,
1
,
tc1
)
Duel
.
HintSelection
(
g2
)
local
tc2
=
g2
:
GetFirst
()
Duel
.
SwapSequence
(
tc1
,
tc2
)
...
...
c33252803.lua
View file @
42ffded1
...
...
@@ -14,11 +14,11 @@ function c33252803.filter1(c,e,tp)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x48
)
and
not
c
:
IsSetCard
(
0x1048
)
and
m
and
Duel
.
IsExistingMatchingCard
(
c33252803
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
c
,
c
:
GetRank
()
+
1
,
m
.
xyz_number
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
)
>
0
end
function
c33252803
.
filter2
(
c
,
e
,
tp
,
mc
,
rk
,
no
)
return
c
:
GetRank
()
==
rk
and
c
:
IsSetCard
(
0x1048
)
and
c
.
xyz_number
==
no
and
mc
:
IsCanBeXyzMaterial
(
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_XYZ
,
tp
,
false
,
false
)
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
c
)
>
0
end
function
c33252803
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c33252803
.
filter1
(
chkc
,
e
,
tp
)
end
...
...
c48424886.lua
View file @
42ffded1
...
...
@@ -40,118 +40,70 @@ function c48424886.initial_effect(c)
e4
:
SetOperation
(
c48424886
.
thop
)
c
:
RegisterEffect
(
e4
)
end
function
c48424886
.
ffilter
(
c
,
fc
)
return
(
c48424886
.
ffilter1
(
c
)
or
c48424886
.
ffilter2
(
c
))
and
c
:
IsCanBeFusionMaterial
(
fc
)
and
not
c
:
IsHasEffect
(
6205579
)
end
function
c48424886
.
exfilter
(
c
,
fc
)
return
c
:
IsFaceup
()
and
c48424886
.
ffilter
(
c
,
fc
)
end
function
c48424886
.
ffilter1
(
c
)
return
c
:
IsFusionSetCard
(
0x9d
)
and
not
c
:
IsHasEffect
(
6205579
)
return
c
:
IsFusionSetCard
(
0x9d
)
end
function
c48424886
.
ffilter2
(
c
)
return
(
c
:
IsFusionAttribute
(
ATTRIBUTE_FIRE
)
or
c
:
IsHasEffect
(
4904633
))
and
not
c
:
IsHasEffect
(
6205579
)
return
c
:
IsFusionAttribute
(
ATTRIBUTE_FIRE
)
or
c
:
IsHasEffect
(
4904633
)
end
function
c48424886
.
spfilter1
(
c
,
tp
,
mg
,
exg
)
return
mg
:
IsExists
(
c48424886
.
spfilter2
,
1
,
c
,
tp
,
c
)
or
(
exg
and
exg
:
IsExists
(
c48424886
.
spfilter2
,
1
,
c
,
tp
,
c
))
end
function
c48424886
.
exfilter
(
c
,
g
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeFusionMaterial
()
and
not
g
:
IsContains
(
c
)
function
c48424886
.
spfilter2
(
c
,
tp
,
mc
)
return
(
c48424886
.
ffilter1
(
c
)
and
c48424886
.
ffilter2
(
mc
)
or
c48424886
.
ffilter2
(
c
)
and
c48424886
.
ffilter1
(
mc
))
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
Group
.
FromCards
(
c
,
mc
))
>
0
end
function
c48424886
.
fuscon
(
e
,
g
,
gc
,
chkf
)
if
g
==
nil
then
return
true
end
local
mg
=
g
:
Filter
(
Card
.
IsCanBeFusionMaterial
,
nil
,
e
:
GetHandler
())
local
c
=
e
:
GetHandler
()
local
mg
=
g
:
Filter
(
c48424886
.
ffilter
,
nil
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
local
exg
=
Group
.
CreateGroup
()
local
exg
=
nil
if
fc
and
fc
:
IsHasEffect
(
81788994
)
and
fc
:
IsCanRemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
then
local
sg
=
Duel
.
GetMatchingGroup
(
c48424886
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
mg
)
exg
:
Merge
(
sg
)
exg
=
Duel
.
GetMatchingGroup
(
c48424886
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
mg
,
c
)
end
if
gc
then
if
not
gc
:
IsCanBeFusionMaterial
(
e
:
GetHandler
())
then
return
false
end
return
(
c48424886
.
ffilter1
(
gc
)
and
(
mg
:
IsExists
(
c48424886
.
ffilter2
,
1
,
gc
)
or
exg
:
IsExists
(
c48424886
.
ffilter2
,
1
,
gc
)))
or
(
c48424886
.
ffilter2
(
gc
)
and
(
mg
:
IsExists
(
c48424886
.
ffilter1
,
1
,
gc
)
or
exg
:
IsExists
(
c48424886
.
ffilter1
,
1
,
gc
)))
end
local
g1
=
Group
.
CreateGroup
()
local
g2
=
Group
.
CreateGroup
()
local
g3
=
Group
.
CreateGroup
()
local
g4
=
Group
.
CreateGroup
()
local
tc
=
mg
:
GetFirst
()
while
tc
do
if
c48424886
.
ffilter1
(
tc
)
then
g1
:
AddCard
(
tc
)
if
aux
.
FConditionCheckF
(
tc
,
chkf
)
then
g3
:
AddCard
(
tc
)
end
end
if
c48424886
.
ffilter2
(
tc
)
then
g2
:
AddCard
(
tc
)
if
aux
.
FConditionCheckF
(
tc
,
chkf
)
then
g4
:
AddCard
(
tc
)
end
end
tc
=
mg
:
GetNext
()
end
local
exg1
=
exg
:
Filter
(
c48424886
.
ffilter1
,
nil
)
local
exg2
=
exg
:
Filter
(
c48424886
.
ffilter2
,
nil
)
if
chkf
~=
PLAYER_NONE
then
return
(
g3
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
g2
)
or
g3
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg2
)
or
g4
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
g1
)
or
g4
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg1
))
else
return
(
g1
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
g2
)
or
g1
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg2
)
or
g2
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg1
))
if
not
mg
:
IsContains
(
gc
)
then
return
false
end
return
c48424886
.
spfilter1
(
gc
,
tp
,
mg
,
exg
)
end
return
mg
:
IsExists
(
c48424886
.
spfilter1
,
1
,
nil
,
tp
,
mg
,
exg
)
end
function
c48424886
.
fusop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
gc
,
chkf
)
local
g
=
eg
:
Filter
(
Card
.
IsCanBeFusionMaterial
,
nil
,
e
:
GetHandler
())
local
c
=
e
:
GetHandler
()
local
mg
=
eg
:
Filter
(
c48424886
.
ffilter
,
nil
,
c
)
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
local
exg
=
Group
.
CreateGroup
()
local
exg
=
nil
if
fc
and
fc
:
IsHasEffect
(
81788994
)
and
fc
:
IsCanRemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
then
local
sg
=
Duel
.
GetMatchingGroup
(
c48424886
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
g
)
exg
:
Merge
(
sg
)
exg
=
Duel
.
GetMatchingGroup
(
c48424886
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
mg
,
c
)
end
local
g
=
nil
if
gc
then
local
sg1
=
Group
.
CreateGroup
()
local
sg2
=
Group
.
CreateGroup
()
if
c48424886
.
ffilter1
(
gc
)
then
sg1
:
Merge
(
g
:
Filter
(
c48424886
.
ffilter2
,
gc
))
sg2
:
Merge
(
exg
:
Filter
(
c48424886
.
ffilter2
,
gc
))
end
if
c48424886
.
ffilter2
(
gc
)
then
sg1
:
Merge
(
g
:
Filter
(
c48424886
.
ffilter1
,
gc
))
sg2
:
Merge
(
exg
:
Filter
(
c48424886
.
ffilter1
,
gc
))
end
local
g1
=
nil
if
sg1
:
GetCount
()
==
0
or
(
sg2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
81788994
,
0
)))
then
fc
:
RemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g1
=
sg2
:
Select
(
tp
,
1
,
1
,
nil
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g1
=
sg1
:
Select
(
tp
,
1
,
1
,
nil
)
end
Duel
.
SetFusionMaterial
(
g1
)
return
end
local
sg
=
g
:
Filter
(
aux
.
FConditionFilterF2c
,
nil
,
c48424886
.
ffilter1
,
c48424886
.
ffilter2
)
local
g1
=
nil
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
if
chkf
~=
PLAYER_NONE
then
g1
=
sg
:
FilterSelect
(
tp
,
aux
.
FConditionCheckF
,
1
,
1
,
nil
,
chkf
)
else
g1
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
end
local
tc1
=
g1
:
GetFirst
()
local
sg1
=
Group
.
CreateGroup
()
local
sg2
=
Group
.
CreateGroup
()
if
c48424886
.
ffilter1
(
tc1
)
then
sg1
:
Merge
(
sg
:
Filter
(
c48424886
.
ffilter2
,
tc1
))
sg2
:
Merge
(
exg
:
Filter
(
c48424886
.
ffilter2
,
tc1
))
end
if
c48424886
.
ffilter2
(
tc1
)
then
sg1
:
Merge
(
sg
:
Filter
(
c48424886
.
ffilter1
,
tc1
))
sg2
:
Merge
(
exg
:
Filter
(
c48424886
.
ffilter1
,
tc1
))
g
=
Group
.
FromCards
(
gc
)
mg
:
RemoveCard
(
gc
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g
=
mg
:
FilterSelect
(
tp
,
c48424886
.
spfilter1
,
1
,
1
,
nil
,
tp
,
mg
,
exg
)
mg
:
Sub
(
g
)
end
local
g2
=
nil
if
sg1
:
GetCount
()
==
0
or
(
sg2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
81788994
,
0
)))
then
if
exg
and
(
mg
:
GetCount
()
==
0
or
(
exg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
81788994
,
0
))))
then
fc
:
RemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g2
=
sg2
:
Select
(
tp
,
1
,
1
,
nil
)
local
sg
=
exg
:
FilterSelect
(
tp
,
c48424886
.
spfilter2
,
1
,
1
,
nil
,
tp
,
g
:
GetFirst
())
g
:
Merge
(
sg
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g2
=
sg1
:
Select
(
tp
,
1
,
1
,
nil
)
local
sg
=
mg
:
FilterSelect
(
tp
,
c48424886
.
spfilter2
,
1
,
1
,
nil
,
tp
,
g
:
GetFirst
())
g
:
Merge
(
sg
)
end
g1
:
Merge
(
g2
)
Duel
.
SetFusionMaterial
(
g1
)
Duel
.
SetFusionMaterial
(
g
)
end
function
c48424886
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
...
...
@@ -167,7 +119,7 @@ function c48424886.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
eg
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
eg
:
GetCount
(),
0
,
0
)
end
function
c48424886
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c48424886
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateSummon
(
eg
)
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
...
...
c73511233.lua
View file @
42ffded1
...
...
@@ -71,10 +71,8 @@ function c73511233.spfilter1(c,e)
return
c73511233
.
spfilter0
(
c
)
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c73511233
.
spfilter2
(
c
,
e
,
tp
,
m
,
f
,
gc
)
local
mg
=
m
:
Clone
()
mg
:
AddCard
(
gc
)
return
c
:
IsType
(
TYPE_FUSION
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
g
,
gc
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
gc
)
end
function
c73511233
.
spfilter3
(
c
)
return
c
:
IsCanBeFusionMaterial
()
and
c
:
IsRace
(
RACE_DRAGON
)
...
...
@@ -83,12 +81,14 @@ function c73511233.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c73511233
.
spfilter0
,
nil
)
mg1
:
AddCard
(
c
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c73511233
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
c
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
):
Filter
(
c73511233
.
spfilter3
,
nil
)
mg2
:
AddCard
(
c
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c73511233
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
c
)
end
...
...
@@ -101,6 +101,7 @@ function c73511233.spop(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
if
c
:
IsFacedown
()
or
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsImmuneToEffect
(
e
)
or
c
:
IsControler
(
1
-
tp
)
then
return
end
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c73511233
.
spfilter1
,
nil
,
e
)
mg1
:
AddCard
(
c
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c73511233
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
c
)
local
mg2
=
nil
local
sg2
=
nil
...
...
@@ -108,6 +109,7 @@ function c73511233.spop(e,tp,eg,ep,ev,re,r,rp)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
):
Filter
(
c73511233
.
spfilter3
,
nil
)
mg2
:
AddCard
(
c
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c73511233
.
spfilter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
c
)
end
...
...
c74009824.lua
View file @
42ffded1
...
...
@@ -39,118 +39,70 @@ function c74009824.initial_effect(c)
e4
:
SetOperation
(
c74009824
.
thop
)
c
:
RegisterEffect
(
e4
)
end
function
c74009824
.
ffilter
(
c
,
fc
)
return
(
c74009824
.
ffilter1
(
c
)
or
c74009824
.
ffilter2
(
c
))
and
c
:
IsCanBeFusionMaterial
(
fc
)
and
not
c
:
IsHasEffect
(
6205579
)
end
function
c74009824
.
exfilter
(
c
,
fc
)
return
c
:
IsFaceup
()
and
c74009824
.
ffilter
(
c
,
fc
)
end
function
c74009824
.
ffilter1
(
c
)
return
c
:
IsFusionSetCard
(
0x9d
)
and
not
c
:
IsHasEffect
(
6205579
)
return
c
:
IsFusionSetCard
(
0x9d
)
end
function
c74009824
.
ffilter2
(
c
)
return
(
c
:
IsFusionAttribute
(
ATTRIBUTE_WIND
)
or
c
:
IsHasEffect
(
4904633
))
and
not
c
:
IsHasEffect
(
6205579
)
return
c
:
IsFusionAttribute
(
ATTRIBUTE_WIND
)
or
c
:
IsHasEffect
(
4904633
)
end
function
c74009824
.
spfilter1
(
c
,
tp
,
mg
,
exg
)
return
mg
:
IsExists
(
c74009824
.
spfilter2
,
1
,
c
,
tp
,
c
)
or
(
exg
and
exg
:
IsExists
(
c74009824
.
spfilter2
,
1
,
c
,
tp
,
c
))
end
function
c74009824
.
exfilter
(
c
,
g
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeFusionMaterial
()
and
not
g
:
IsContains
(
c
)
function
c74009824
.
spfilter2
(
c
,
tp
,
mc
)
return
(
c74009824
.
ffilter1
(
c
)
and
c74009824
.
ffilter2
(
mc
)
or
c74009824
.
ffilter2
(
c
)
and
c74009824
.
ffilter1
(
mc
))
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
Group
.
FromCards
(
c
,
mc
))
>
0
end
function
c74009824
.
fuscon
(
e
,
g
,
gc
,
chkf
)
if
g
==
nil
then
return
true
end
local
mg
=
g
:
Filter
(
Card
.
IsCanBeFusionMaterial
,
nil
,
e
:
GetHandler
())
local
c
=
e
:
GetHandler
()
local
mg
=
g
:
Filter
(
c74009824
.
ffilter
,
nil
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
local
exg
=
Group
.
CreateGroup
()
local
exg
=
nil
if
fc
and
fc
:
IsHasEffect
(
81788994
)
and
fc
:
IsCanRemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
then
local
sg
=
Duel
.
GetMatchingGroup
(
c74009824
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
mg
)
exg
:
Merge
(
sg
)
exg
=
Duel
.
GetMatchingGroup
(
c74009824
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
mg
,
c
)
end
if
gc
then
if
not
gc
:
IsCanBeFusionMaterial
(
e
:
GetHandler
())
then
return
false
end
return
(
c74009824
.
ffilter1
(
gc
)
and
(
mg
:
IsExists
(
c74009824
.
ffilter2
,
1
,
gc
)
or
exg
:
IsExists
(
c74009824
.
ffilter2
,
1
,
gc
)))
or
(
c74009824
.
ffilter2
(
gc
)
and
(
mg
:
IsExists
(
c74009824
.
ffilter1
,
1
,
gc
)
or
exg
:
IsExists
(
c74009824
.
ffilter1
,
1
,
gc
)))
end
local
g1
=
Group
.
CreateGroup
()
local
g2
=
Group
.
CreateGroup
()
local
g3
=
Group
.
CreateGroup
()
local
g4
=
Group
.
CreateGroup
()
local
tc
=
mg
:
GetFirst
()
while
tc
do
if
c74009824
.
ffilter1
(
tc
)
then
g1
:
AddCard
(
tc
)
if
aux
.
FConditionCheckF
(
tc
,
chkf
)
then
g3
:
AddCard
(
tc
)
end
end
if
c74009824
.
ffilter2
(
tc
)
then
g2
:
AddCard
(
tc
)
if
aux
.
FConditionCheckF
(
tc
,
chkf
)
then
g4
:
AddCard
(
tc
)
end
end
tc
=
mg
:
GetNext
()
end
local
exg1
=
exg
:
Filter
(
c74009824
.
ffilter1
,
nil
)
local
exg2
=
exg
:
Filter
(
c74009824
.
ffilter2
,
nil
)
if
chkf
~=
PLAYER_NONE
then
return
(
g3
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
g2
)
or
g3
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg2
)
or
g4
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
g1
)
or
g4
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg1
))
else
return
(
g1
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
g2
)
or
g1
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg2
)
or
g2
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg1
))
if
not
mg
:
IsContains
(
gc
)
then
return
false
end
return
c74009824
.
spfilter1
(
gc
,
tp
,
mg
,
exg
)
end
return
mg
:
IsExists
(
c74009824
.
spfilter1
,
1
,
nil
,
tp
,
mg
,
exg
)
end
function
c74009824
.
fusop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
gc
,
chkf
)
local
g
=
eg
:
Filter
(
Card
.
IsCanBeFusionMaterial
,
nil
,
e
:
GetHandler
())
local
c
=
e
:
GetHandler
()
local
mg
=
eg
:
Filter
(
c74009824
.
ffilter
,
nil
,
c
)
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
local
exg
=
Group
.
CreateGroup
()
local
exg
=
nil
if
fc
and
fc
:
IsHasEffect
(
81788994
)
and
fc
:
IsCanRemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
then
local
sg
=
Duel
.
GetMatchingGroup
(
c74009824
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
g
)
exg
:
Merge
(
sg
)
exg
=
Duel
.
GetMatchingGroup
(
c74009824
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
mg
,
c
)
end
local
g
=
nil
if
gc
then
local
sg1
=
Group
.
CreateGroup
()
local
sg2
=
Group
.
CreateGroup
()
if
c74009824
.
ffilter1
(
gc
)
then
sg1
:
Merge
(
g
:
Filter
(
c74009824
.
ffilter2
,
gc
))
sg2
:
Merge
(
exg
:
Filter
(
c74009824
.
ffilter2
,
gc
))
end
if
c74009824
.
ffilter2
(
gc
)
then
sg1
:
Merge
(
g
:
Filter
(
c74009824
.
ffilter1
,
gc
))
sg2
:
Merge
(
exg
:
Filter
(
c74009824
.
ffilter1
,
gc
))
end
local
g1
=
nil
if
sg1
:
GetCount
()
==
0
or
(
sg2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
81788994
,
0
)))
then
fc
:
RemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g1
=
sg2
:
Select
(
tp
,
1
,
1
,
nil
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g1
=
sg1
:
Select
(
tp
,
1
,
1
,
nil
)
end
Duel
.
SetFusionMaterial
(
g1
)
return
end
local
sg
=
g
:
Filter
(
aux
.
FConditionFilterF2c
,
nil
,
c74009824
.
ffilter1
,
c74009824
.
ffilter2
)
local
g1
=
nil
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
if
chkf
~=
PLAYER_NONE
then
g1
=
sg
:
FilterSelect
(
tp
,
aux
.
FConditionCheckF
,
1
,
1
,
nil
,
chkf
)
else
g1
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
end
local
tc1
=
g1
:
GetFirst
()
local
sg1
=
Group
.
CreateGroup
()
local
sg2
=
Group
.
CreateGroup
()
if
c74009824
.
ffilter1
(
tc1
)
then
sg1
:
Merge
(
sg
:
Filter
(
c74009824
.
ffilter2
,
tc1
))
sg2
:
Merge
(
exg
:
Filter
(
c74009824
.
ffilter2
,
tc1
))
end
if
c74009824
.
ffilter2
(
tc1
)
then
sg1
:
Merge
(
sg
:
Filter
(
c74009824
.
ffilter1
,
tc1
))
sg2
:
Merge
(
exg
:
Filter
(
c74009824
.
ffilter1
,
tc1
))
g
=
Group
.
FromCards
(
gc
)
mg
:
RemoveCard
(
gc
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g
=
mg
:
FilterSelect
(
tp
,
c74009824
.
spfilter1
,
1
,
1
,
nil
,
tp
,
mg
,
exg
)
mg
:
Sub
(
g
)
end
local
g2
=
nil
if
sg1
:
GetCount
()
==
0
or
(
sg2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
81788994
,
0
)))
then
if
exg
and
(
mg
:
GetCount
()
==
0
or
(
exg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
81788994
,
0
))))
then
fc
:
RemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g2
=
sg2
:
Select
(
tp
,
1
,
1
,
nil
)
local
sg
=
exg
:
FilterSelect
(
tp
,
c74009824
.
spfilter2
,
1
,
1
,
nil
,
tp
,
g
:
GetFirst
())
g
:
Merge
(
sg
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g2
=
sg1
:
Select
(
tp
,
1
,
1
,
nil
)
local
sg
=
mg
:
FilterSelect
(
tp
,
c74009824
.
spfilter2
,
1
,
1
,
nil
,
tp
,
g
:
GetFirst
())
g
:
Merge
(
sg
)
end
g1
:
Merge
(
g2
)
Duel
.
SetFusionMaterial
(
g1
)
Duel
.
SetFusionMaterial
(
g
)
end
function
c74009824
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
...
...
c74822425.lua
View file @
42ffded1
...
...
@@ -41,118 +41,70 @@ function c74822425.initial_effect(c)
e4
:
SetOperation
(
c74822425
.
thop
)
c
:
RegisterEffect
(
e4
)
end
function
c74822425
.
ffilter
(
c
,
fc
)
return
(
c74822425
.
ffilter1
(
c
)
or
c74822425
.
ffilter2
(
c
))
and
c
:
IsCanBeFusionMaterial
(
fc
)
and
not
c
:
IsHasEffect
(
6205579
)
end
function
c74822425
.
exfilter
(
c
,
fc
)
return
c
:
IsFaceup
()
and
c74822425
.
ffilter
(
c
,
fc
)
end
function
c74822425
.
ffilter1
(
c
)
return
c
:
IsFusionSetCard
(
0x9d
)
and
not
c
:
IsHasEffect
(
6205579
)
return
c
:
IsFusionSetCard
(
0x9d
)
end
function
c74822425
.
ffilter2
(
c
)
return
(
c
:
IsFusionAttribute
(
ATTRIBUTE_EARTH
)
or
c
:
IsHasEffect
(
4904633
))
and
not
c
:
IsHasEffect
(
6205579
)
return
c
:
IsFusionAttribute
(
ATTRIBUTE_EARTH
)
or
c
:
IsHasEffect
(
4904633
)
end
function
c74822425
.
exfilter
(
c
,
g
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeFusionMaterial
()
and
not
g
:
IsContains
(
c
)
function
c74822425
.
spfilter1
(
c
,
tp
,
mg
,
exg
)
return
mg
:
IsExists
(
c74822425
.
spfilter2
,
1
,
c
,
tp
,
c
)
or
(
exg
and
exg
:
IsExists
(
c74822425
.
spfilter2
,
1
,
c
,
tp
,
c
))
end
function
c74822425
.
spfilter2
(
c
,
tp
,
mc
)
return
(
c74822425
.
ffilter1
(
c
)
and
c74822425
.
ffilter2
(
mc
)
or
c74822425
.
ffilter2
(
c
)
and
c74822425
.
ffilter1
(
mc
))
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
Group
.
FromCards
(
c
,
mc
))
>
0
end
function
c74822425
.
fuscon
(
e
,
g
,
gc
,
chkf
)
if
g
==
nil
then
return
true
end
local
mg
=
g
:
Filter
(
Card
.
IsCanBeFusionMaterial
,
nil
,
e
:
GetHandler
())
local
c
=
e
:
GetHandler
()
local
mg
=
g
:
Filter
(
c74822425
.
ffilter
,
nil
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
local
exg
=
Group
.
CreateGroup
()
local
exg
=
nil
if
fc
and
fc
:
IsHasEffect
(
81788994
)
and
fc
:
IsCanRemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
then
local
sg
=
Duel
.
GetMatchingGroup
(
c74822425
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
mg
)
exg
:
Merge
(
sg
)
exg
=
Duel
.
GetMatchingGroup
(
c74822425
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
mg
,
c
)
end
if
gc
then
if
not
gc
:
IsCanBeFusionMaterial
(
e
:
GetHandler
())
then
return
false
end
return
(
c74822425
.
ffilter1
(
gc
)
and
(
mg
:
IsExists
(
c74822425
.
ffilter2
,
1
,
gc
)
or
exg
:
IsExists
(
c74822425
.
ffilter2
,
1
,
gc
)))
or
(
c74822425
.
ffilter2
(
gc
)
and
(
mg
:
IsExists
(
c74822425
.
ffilter1
,
1
,
gc
)
or
exg
:
IsExists
(
c74822425
.
ffilter1
,
1
,
gc
)))
end
local
g1
=
Group
.
CreateGroup
()
local
g2
=
Group
.
CreateGroup
()
local
g3
=
Group
.
CreateGroup
()
local
g4
=
Group
.
CreateGroup
()
local
tc
=
mg
:
GetFirst
()
while
tc
do
if
c74822425
.
ffilter1
(
tc
)
then
g1
:
AddCard
(
tc
)
if
aux
.
FConditionCheckF
(
tc
,
chkf
)
then
g3
:
AddCard
(
tc
)
end
end
if
c74822425
.
ffilter2
(
tc
)
then
g2
:
AddCard
(
tc
)
if
aux
.
FConditionCheckF
(
tc
,
chkf
)
then
g4
:
AddCard
(
tc
)
end
end
tc
=
mg
:
GetNext
()
end
local
exg1
=
exg
:
Filter
(
c74822425
.
ffilter1
,
nil
)
local
exg2
=
exg
:
Filter
(
c74822425
.
ffilter2
,
nil
)
if
chkf
~=
PLAYER_NONE
then
return
(
g3
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
g2
)
or
g3
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg2
)
or
g4
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
g1
)
or
g4
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg1
))
else
return
(
g1
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
g2
)
or
g1
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg2
)
or
g2
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg1
))
if
not
mg
:
IsContains
(
gc
)
then
return
false
end
return
c74822425
.
spfilter1
(
gc
,
tp
,
mg
,
exg
)
end
return
mg
:
IsExists
(
c74822425
.
spfilter1
,
1
,
nil
,
tp
,
mg
,
exg
)
end
function
c74822425
.
fusop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
gc
,
chkf
)
local
g
=
eg
:
Filter
(
Card
.
IsCanBeFusionMaterial
,
nil
,
e
:
GetHandler
())
local
c
=
e
:
GetHandler
()
local
mg
=
eg
:
Filter
(
c74822425
.
ffilter
,
nil
,
c
)
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
local
exg
=
Group
.
CreateGroup
()
local
exg
=
nil
if
fc
and
fc
:
IsHasEffect
(
81788994
)
and
fc
:
IsCanRemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
then
local
sg
=
Duel
.
GetMatchingGroup
(
c74822425
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
g
)
exg
:
Merge
(
sg
)
exg
=
Duel
.
GetMatchingGroup
(
c74822425
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
mg
,
c
)
end
local
g
=
nil
if
gc
then
local
sg1
=
Group
.
CreateGroup
()
local
sg2
=
Group
.
CreateGroup
()
if
c74822425
.
ffilter1
(
gc
)
then
sg1
:
Merge
(
g
:
Filter
(
c74822425
.
ffilter2
,
gc
))
sg2
:
Merge
(
exg
:
Filter
(
c74822425
.
ffilter2
,
gc
))
end
if
c74822425
.
ffilter2
(
gc
)
then
sg1
:
Merge
(
g
:
Filter
(
c74822425
.
ffilter1
,
gc
))
sg2
:
Merge
(
exg
:
Filter
(
c74822425
.
ffilter1
,
gc
))
end
local
g1
=
nil
if
sg1
:
GetCount
()
==
0
or
(
sg2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
81788994
,
0
)))
then
fc
:
RemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g1
=
sg2
:
Select
(
tp
,
1
,
1
,
nil
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g1
=
sg1
:
Select
(
tp
,
1
,
1
,
nil
)
end
Duel
.
SetFusionMaterial
(
g1
)
return
end
local
sg
=
g
:
Filter
(
aux
.
FConditionFilterF2c
,
nil
,
c74822425
.
ffilter1
,
c74822425
.
ffilter2
)
local
g1
=
nil
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
if
chkf
~=
PLAYER_NONE
then
g1
=
sg
:
FilterSelect
(
tp
,
aux
.
FConditionCheckF
,
1
,
1
,
nil
,
chkf
)
else
g1
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
end
local
tc1
=
g1
:
GetFirst
()
local
sg1
=
Group
.
CreateGroup
()
local
sg2
=
Group
.
CreateGroup
()
if
c74822425
.
ffilter1
(
tc1
)
then
sg1
:
Merge
(
sg
:
Filter
(
c74822425
.
ffilter2
,
tc1
))
sg2
:
Merge
(
exg
:
Filter
(
c74822425
.
ffilter2
,
tc1
))
end
if
c74822425
.
ffilter2
(
tc1
)
then
sg1
:
Merge
(
sg
:
Filter
(
c74822425
.
ffilter1
,
tc1
))
sg2
:
Merge
(
exg
:
Filter
(
c74822425
.
ffilter1
,
tc1
))
g
=
Group
.
FromCards
(
gc
)
mg
:
RemoveCard
(
gc
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g
=
mg
:
FilterSelect
(
tp
,
c74822425
.
spfilter1
,
1
,
1
,
nil
,
tp
,
mg
,
exg
)
mg
:
Sub
(
g
)
end
local
g2
=
nil
if
sg1
:
GetCount
()
==
0
or
(
sg2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
81788994
,
0
)))
then
if
exg
and
(
mg
:
GetCount
()
==
0
or
(
exg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
81788994
,
0
))))
then
fc
:
RemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g2
=
sg2
:
Select
(
tp
,
1
,
1
,
nil
)
local
sg
=
exg
:
FilterSelect
(
tp
,
c74822425
.
spfilter2
,
1
,
1
,
nil
,
tp
,
g
:
GetFirst
())
g
:
Merge
(
sg
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g2
=
sg1
:
Select
(
tp
,
1
,
1
,
nil
)
local
sg
=
mg
:
FilterSelect
(
tp
,
c74822425
.
spfilter2
,
1
,
1
,
nil
,
tp
,
g
:
GetFirst
())
g
:
Merge
(
sg
)
end
g1
:
Merge
(
g2
)
Duel
.
SetFusionMaterial
(
g1
)
Duel
.
SetFusionMaterial
(
g
)
end
function
c74822425
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
...
...
c86196216.lua
View file @
42ffded1
...
...
@@ -40,6 +40,7 @@ function c86196216.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c86196216
.
filter1
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanSpecialSummonCount
(
tp
,
2
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
Duel
.
IsExistingTarget
(
c86196216
.
filter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c86196216
.
filter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
...
...
@@ -50,6 +51,7 @@ function c86196216.activate(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
Duel
.
GetFirstTarget
()
if
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsImmuneToEffect
(
e
)
then
return
end
if
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
==
0
then
return
end
if
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
tc
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c86196216
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
tc
,
tc
:
GetRank
()
*
2
)
local
sc
=
g
:
GetFirst
()
...
...
c87460579.lua
View file @
42ffded1
...
...
@@ -103,12 +103,12 @@ function c87460579.spfilter(c,e,tp)
return
c
:
IsSetCard
(
0xe6
)
and
not
c
:
IsCode
(
87460579
)
and
c
:
IsType
(
TYPE_SYNCHRO
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c87460579
.
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
FromEx
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c87460579
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c87460579
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
FromEx
(
tp
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c87460579
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
...
...
c88482761.lua
View file @
42ffded1
...
...
@@ -28,18 +28,18 @@ function c88482761.condition(e,tp,eg,ep,ev,re,r,rp)
end
function
c88482761
.
rmfilter1
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x2016
)
and
c
:
IsAbleToRemove
()
and
Duel
.
IsExistingMatchingCard
(
c88482761
.
spfilter
,
tp
,
LOCATION_
EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
c
:
GetOriginalLevel
())
and
Duel
.
IsExistingMatchingCard
(
c88482761
.
spfilter
,
tp
,
LOCATION_
HAND
,
0
,
1
,
nil
,
e
,
tp
,
c
:
GetOriginalLevel
())
end
function
c88482761
.
rmfilter2
(
c
,
lv
)
return
c
:
IsSetCard
(
0x2016
)
and
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsAbleToRemove
()
and
c
:
GetOriginalLevel
()
==
lv
function
c88482761
.
rmfilter2
(
c
,
e
,
tp
,
lv
)
return
c
:
IsSetCard
(
0x2016
)
and
c
:
IsType
(
TYPE_TUNER
)
and
c
:
IsAbleToRemove
()
and
Duel
.
IsExistingMatchingCard
(
c88482761
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
c
:
GetOriginalLevel
()
+
lv
)
end
function
c88482761
.
spfilter
(
c
,
e
,
tp
,
lv
)
return
c
:
IsType
(
TYPE_SYNCHRO
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
IsExistingMatchingCard
(
c88482761
.
rmfilter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
c
:
GetLevel
()
-
lv
)
return
c
:
GetLevel
()
==
lv
and
c
:
IsType
(
TYPE_SYNCHRO
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c88482761
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c88482761
.
rmfilter1
(
chkc
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
FromEx
(
tp
)
>
0
and
Duel
.
IsExistingTarget
(
c88482761
.
rmfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c88482761
.
rmfilter1
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
...
...
@@ -49,14 +49,17 @@ end
function
c88482761
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
not
tc
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c88482761
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
tc
:
GetOriginalLevel
())
local
lv
=
tc
:
GetOriginalLevel
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c88482761
.
rmfilter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
lv
)
if
g
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
rg
=
Duel
.
SelectMatchingCard
(
tp
,
c88482761
.
rmfilter2
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
g
:
GetFirst
():
GetLevel
()
-
tc
:
GetOriginalLevel
())
rg
:
AddCard
(
tc
)
if
Duel
.
Remove
(
rg
,
POS_FACEUP
,
REASON_EFFECT
)
==
2
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
lv
=
lv
+
g
:
GetFirst
():
GetOriginalLevel
()
g
:
AddCard
(
tc
)
if
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
==
2
then
if
Duel
.
GetLocationCountFromEx
(
tp
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
c88482761
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
lv
)
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
...
...
c88696724.lua
View file @
42ffded1
...
...
@@ -49,7 +49,7 @@ function c88696724.filter2(c,e,tp,code)
return
c
:
IsCode
(
code
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c88696724
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
FromEx
(
tp
)
<=
0
then
return
end
local
code
=
e
:
GetLabel
()
local
tc
=
Duel
.
GetFirstMatchingCard
(
c88696724
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
code
)
if
tc
then
...
...
c88722973.lua
View file @
42ffded1
...
...
@@ -63,12 +63,12 @@ function c88722973.spfilter(c,e,tp)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c88722973
.
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
FromEx
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c88722973
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c88722973
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
FromEx
(
tp
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c88722973
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
tc
=
g
:
GetFirst
()
...
...
c90812044.lua
View file @
42ffded1
...
...
@@ -11,49 +11,46 @@ function c90812044.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
function
c90812044
.
cfilter
(
c
)
return
c
:
Is
Type
(
TYPE_XYZ
)
and
c
:
IsFaceup
(
)
return
c
:
Is
Faceup
()
and
c
:
IsType
(
TYPE_XYZ
)
end
function
c90812044
.
cfilter2
(
c
,
r
)
return
c
:
IsType
(
TYPE_XYZ
)
and
c
:
GetRank
()
==
r
and
c
:
IsFaceup
()
end
function
c90812044
.
filter
(
c
,
e
,
tp
,
r
)
return
c
:
IsType
(
TYPE_XYZ
)
and
c
:
GetRank
()
<
r
function
c90812044
.
filter
(
c
,
e
,
tp
,
rk
)
return
c
:
IsType
(
TYPE_XYZ
)
and
c
:
GetRank
()
<
rk
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c90812044
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
g
=
Duel
.
GetMatchingGroup
(
c90812044
.
cfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
rg
,
r
=
g
:
GetMinGroup
(
Card
.
GetRank
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c90812044
.
cfilter2
(
chkc
,
r
)
end
local
rg
,
r
k
=
g
:
GetMinGroup
(
Card
.
GetRank
)
if
chkc
then
return
rg
:
IsContains
(
chkc
)
end
if
chk
==
0
then
return
g
:
GetCount
()
>=
2
and
rg
:
IsExists
(
Card
.
IsCanBeEffectTarget
,
1
,
nil
,
e
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c90812044
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
r
)
end
and
Duel
.
GetLocationCount
FromEx
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c90812044
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
r
k
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
sg
=
rg
:
FilterSelect
(
tp
,
Card
.
IsCanBeEffectTarget
,
1
,
1
,
nil
,
e
)
Duel
.
SetTargetCard
(
sg
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c90812044
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
FromEx
(
tp
)
<=
0
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
if
not
tc
:
IsRelateToEffect
(
e
)
or
tc
:
IsFacedown
()
then
return
end
local
r
=
tc
:
GetRank
()
local
r
k
=
tc
:
GetRank
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c90812044
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
r
)
local
t
c
=
g
:
GetFirst
()
if
tc
and
Duel
.
SpecialSummon
(
t
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c90812044
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
,
r
k
)
local
s
c
=
g
:
GetFirst
()
if
sc
and
Duel
.
SpecialSummon
(
s
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_DIRECT_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
t
c
:
RegisterEffect
(
e1
,
true
)
t
c
:
RegisterFlagEffect
(
90812044
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
s
c
:
RegisterEffect
(
e1
,
true
)
s
c
:
RegisterFlagEffect
(
90812044
,
RESET_EVENT
+
0x1fe0000
,
0
,
1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetCountLimit
(
1
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetLabelObject
(
t
c
)
e2
:
SetLabelObject
(
s
c
)
e2
:
SetCondition
(
c90812044
.
retcon
)
e2
:
SetOperation
(
c90812044
.
retop
)
Duel
.
RegisterEffect
(
e2
,
tp
)
...
...
c94977269.lua
View file @
42ffded1
...
...
@@ -46,118 +46,70 @@ function c94977269.initial_effect(c)
e5
:
SetOperation
(
c94977269
.
thop
)
c
:
RegisterEffect
(
e5
)
end
function
c94977269
.
ffilter
(
c
,
fc
)
return
(
c94977269
.
ffilter1
(
c
)
or
c94977269
.
ffilter2
(
c
))
and
c
:
IsCanBeFusionMaterial
(
fc
)
and
not
c
:
IsHasEffect
(
6205579
)
end
function
c94977269
.
exfilter
(
c
,
fc
)
return
c
:
IsFaceup
()
and
c94977269
.
ffilter
(
c
,
fc
)
end
function
c94977269
.
ffilter1
(
c
)
return
c
:
IsFusionSetCard
(
0x9d
)
and
not
c
:
IsHasEffect
(
6205579
)
return
c
:
IsFusionSetCard
(
0x9d
)
end
function
c94977269
.
ffilter2
(
c
)
return
(
c
:
IsFusionAttribute
(
ATTRIBUTE_DARK
)
or
c
:
IsHasEffect
(
4904633
))
and
not
c
:
IsHasEffect
(
6205579
)
return
c
:
IsFusionAttribute
(
ATTRIBUTE_DARK
)
or
c
:
IsHasEffect
(
4904633
)
end
function
c94977269
.
spfilter1
(
c
,
tp
,
mg
,
exg
)
return
mg
:
IsExists
(
c94977269
.
spfilter2
,
1
,
c
,
tp
,
c
)
or
(
exg
and
exg
:
IsExists
(
c94977269
.
spfilter2
,
1
,
c
,
tp
,
c
))
end
function
c94977269
.
exfilter
(
c
,
g
)
return
c
:
IsFaceup
()
and
c
:
IsCanBeFusionMaterial
()
and
not
g
:
IsContains
(
c
)
function
c94977269
.
spfilter2
(
c
,
tp
,
mc
)
return
(
c94977269
.
ffilter1
(
c
)
and
c94977269
.
ffilter2
(
mc
)
or
c94977269
.
ffilter2
(
c
)
and
c94977269
.
ffilter1
(
mc
))
and
Duel
.
GetLocationCountFromEx
(
tp
,
tp
,
Group
.
FromCards
(
c
,
mc
))
>
0
end
function
c94977269
.
fuscon
(
e
,
g
,
gc
,
chkf
)
if
g
==
nil
then
return
true
end
local
mg
=
g
:
Filter
(
Card
.
IsCanBeFusionMaterial
,
nil
,
e
:
GetHandler
())
local
c
=
e
:
GetHandler
()
local
mg
=
g
:
Filter
(
c94977269
.
ffilter
,
nil
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
local
exg
=
Group
.
CreateGroup
()
local
exg
=
nil
if
fc
and
fc
:
IsHasEffect
(
81788994
)
and
fc
:
IsCanRemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
then
local
sg
=
Duel
.
GetMatchingGroup
(
c94977269
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
mg
)
exg
:
Merge
(
sg
)
exg
=
Duel
.
GetMatchingGroup
(
c94977269
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
mg
,
c
)
end
if
gc
then
if
not
gc
:
IsCanBeFusionMaterial
(
e
:
GetHandler
())
then
return
false
end
return
(
c94977269
.
ffilter1
(
gc
)
and
(
mg
:
IsExists
(
c94977269
.
ffilter2
,
1
,
gc
)
or
exg
:
IsExists
(
c94977269
.
ffilter2
,
1
,
gc
)))
or
(
c94977269
.
ffilter2
(
gc
)
and
(
mg
:
IsExists
(
c94977269
.
ffilter1
,
1
,
gc
)
or
exg
:
IsExists
(
c94977269
.
ffilter1
,
1
,
gc
)))
end
local
g1
=
Group
.
CreateGroup
()
local
g2
=
Group
.
CreateGroup
()
local
g3
=
Group
.
CreateGroup
()
local
g4
=
Group
.
CreateGroup
()
local
tc
=
mg
:
GetFirst
()
while
tc
do
if
c94977269
.
ffilter1
(
tc
)
then
g1
:
AddCard
(
tc
)
if
aux
.
FConditionCheckF
(
tc
,
chkf
)
then
g3
:
AddCard
(
tc
)
end
end
if
c94977269
.
ffilter2
(
tc
)
then
g2
:
AddCard
(
tc
)
if
aux
.
FConditionCheckF
(
tc
,
chkf
)
then
g4
:
AddCard
(
tc
)
end
end
tc
=
mg
:
GetNext
()
end
local
exg1
=
exg
:
Filter
(
c94977269
.
ffilter1
,
nil
)
local
exg2
=
exg
:
Filter
(
c94977269
.
ffilter2
,
nil
)
if
chkf
~=
PLAYER_NONE
then
return
(
g3
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
g2
)
or
g3
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg2
)
or
g4
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
g1
)
or
g4
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg1
))
else
return
(
g1
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
g2
)
or
g1
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg2
)
or
g2
:
IsExists
(
aux
.
FConditionFilterF2
,
1
,
nil
,
exg1
))
if
not
mg
:
IsContains
(
gc
)
then
return
false
end
return
c94977269
.
spfilter1
(
gc
,
tp
,
mg
,
exg
)
end
return
mg
:
IsExists
(
c94977269
.
spfilter1
,
1
,
nil
,
tp
,
mg
,
exg
)
end
function
c94977269
.
fusop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
gc
,
chkf
)
local
g
=
eg
:
Filter
(
Card
.
IsCanBeFusionMaterial
,
nil
,
e
:
GetHandler
())
local
c
=
e
:
GetHandler
()
local
mg
=
eg
:
Filter
(
c94977269
.
ffilter
,
nil
,
c
)
local
fc
=
Duel
.
GetFieldCard
(
tp
,
LOCATION_SZONE
,
5
)
local
exg
=
Group
.
CreateGroup
()
local
exg
=
nil
if
fc
and
fc
:
IsHasEffect
(
81788994
)
and
fc
:
IsCanRemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
then
local
sg
=
Duel
.
GetMatchingGroup
(
c94977269
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
g
)
exg
:
Merge
(
sg
)
exg
=
Duel
.
GetMatchingGroup
(
c94977269
.
exfilter
,
tp
,
0
,
LOCATION_MZONE
,
mg
,
c
)
end
local
g
=
nil
if
gc
then
local
sg1
=
Group
.
CreateGroup
()
local
sg2
=
Group
.
CreateGroup
()
if
c94977269
.
ffilter1
(
gc
)
then
sg1
:
Merge
(
g
:
Filter
(
c94977269
.
ffilter2
,
gc
))
sg2
:
Merge
(
exg
:
Filter
(
c94977269
.
ffilter2
,
gc
))
end
if
c94977269
.
ffilter2
(
gc
)
then
sg1
:
Merge
(
g
:
Filter
(
c94977269
.
ffilter1
,
gc
))
sg2
:
Merge
(
exg
:
Filter
(
c94977269
.
ffilter1
,
gc
))
end
local
g1
=
nil
if
sg1
:
GetCount
()
==
0
or
(
sg2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
81788994
,
0
)))
then
fc
:
RemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g1
=
sg2
:
Select
(
tp
,
1
,
1
,
nil
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g1
=
sg1
:
Select
(
tp
,
1
,
1
,
nil
)
end
Duel
.
SetFusionMaterial
(
g1
)
return
end
local
sg
=
g
:
Filter
(
aux
.
FConditionFilterF2c
,
nil
,
c94977269
.
ffilter1
,
c94977269
.
ffilter2
)
local
g1
=
nil
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
if
chkf
~=
PLAYER_NONE
then
g1
=
sg
:
FilterSelect
(
tp
,
aux
.
FConditionCheckF
,
1
,
1
,
nil
,
chkf
)
else
g1
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
end
local
tc1
=
g1
:
GetFirst
()
local
sg1
=
Group
.
CreateGroup
()
local
sg2
=
Group
.
CreateGroup
()
if
c94977269
.
ffilter1
(
tc1
)
then
sg1
:
Merge
(
sg
:
Filter
(
c94977269
.
ffilter2
,
tc1
))
sg2
:
Merge
(
exg
:
Filter
(
c94977269
.
ffilter2
,
tc1
))
end
if
c94977269
.
ffilter2
(
tc1
)
then
sg1
:
Merge
(
sg
:
Filter
(
c94977269
.
ffilter1
,
tc1
))
sg2
:
Merge
(
exg
:
Filter
(
c94977269
.
ffilter1
,
tc1
))
g
=
Group
.
FromCards
(
gc
)
mg
:
RemoveCard
(
gc
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g
=
mg
:
FilterSelect
(
tp
,
c94977269
.
spfilter1
,
1
,
1
,
nil
,
tp
,
mg
,
exg
)
mg
:
Sub
(
g
)
end
local
g2
=
nil
if
sg1
:
GetCount
()
==
0
or
(
sg2
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
81788994
,
0
)))
then
if
exg
and
(
mg
:
GetCount
()
==
0
or
(
exg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
81788994
,
0
))))
then
fc
:
RemoveCounter
(
tp
,
0x16
,
3
,
REASON_EFFECT
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g2
=
sg2
:
Select
(
tp
,
1
,
1
,
nil
)
local
sg
=
exg
:
FilterSelect
(
tp
,
c94977269
.
spfilter2
,
1
,
1
,
nil
,
tp
,
g
:
GetFirst
())
g
:
Merge
(
sg
)
else
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FMATERIAL
)
g2
=
sg1
:
Select
(
tp
,
1
,
1
,
nil
)
local
sg
=
mg
:
FilterSelect
(
tp
,
c94977269
.
spfilter2
,
1
,
1
,
nil
,
tp
,
g
:
GetFirst
())
g
:
Merge
(
sg
)
end
g1
:
Merge
(
g2
)
Duel
.
SetFusionMaterial
(
g1
)
Duel
.
SetFusionMaterial
(
g
)
end
function
c94977269
.
splimit
(
e
,
se
,
sp
,
st
)
return
bit
.
band
(
st
,
SUMMON_TYPE_FUSION
)
==
SUMMON_TYPE_FUSION
...
...
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