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
2
Merge Requests
2
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
adad86e7
Commit
adad86e7
authored
Jun 28, 2025
by
Vury Leo
Committed by
wind2009
Jun 28, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ジェムナイト to new fusion
parent
8ce4ec24
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
296 additions
and
655 deletions
+296
-655
c1264319.lua
c1264319.lua
+22
-76
c24220368.lua
c24220368.lua
+49
-82
c24484270.lua
c24484270.lua
+42
-76
c39261576.lua
c39261576.lua
+34
-79
c40597694.lua
c40597694.lua
+36
-79
c55824220.lua
c55824220.lua
+8
-65
c71422989.lua
c71422989.lua
+40
-52
c72029628.lua
c72029628.lua
+30
-67
c7394770.lua
c7394770.lua
+35
-79
No files found.
c1264319.lua
View file @
adad86e7
--ジェムナイト・フュージョン
--ジェムナイト・フュージョン
function
c1264319
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
FusionSpell
.
RegisterSummonEffect
(
c
,{
e1
:
SetDescription
(
aux
.
Stringid
(
1264319
,
0
))
fusfilter
=
s
.
fusfilter
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
})
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c1264319
.
target
)
e1
:
SetOperation
(
c1264319
.
activate
)
c
:
RegisterEffect
(
e1
)
--salvage
--salvage
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetDescription
(
aux
.
Stringid
(
1264319
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c1264319
.
thcost
)
e2
:
SetCost
(
s
.
thcost
)
e2
:
SetTarget
(
c1264319
.
thtg
)
e2
:
SetTarget
(
s
.
thtg
)
e2
:
SetOperation
(
c1264319
.
thop
)
e2
:
SetOperation
(
s
.
thop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c1264319
.
filter1
(
c
,
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
function
s
.
fusfilter
(
c
)
return
c
:
IsSetCard
(
0x1047
)
end
end
function
c1264319
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x1047
)
and
(
not
f
or
f
(
c
))
function
s
.
thfilter
(
c
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c1264319
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c1264319
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c1264319
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c1264319
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c1264319
.
filter1
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c1264319
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c1264319
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
function
c1264319
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x1047
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemoveAsCost
()
return
c
:
IsSetCard
(
0x1047
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemoveAsCost
()
end
end
function
c1264319
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c1264319
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
function
s
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1264319
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
end
function
c1264319
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToHand
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToHand
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
c1264319
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
c
,
nil
,
REASON_EFFECT
)
...
...
c24220368.lua
View file @
adad86e7
...
@@ -2,6 +2,12 @@
...
@@ -2,6 +2,12 @@
local
s
,
id
,
o
=
GetID
()
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
1264319
)
aux
.
AddCodeList
(
c
,
1264319
)
local
e0
=
FusionSpell
.
CreateSummonEffect
(
c
,{
fusfilter
=
s
.
fusfilter
,
pre_select_mat_location
=
s
.
pre_select_mat_location
,
fusion_spell_matfilter
=
s
.
fusion_spell_matfilter
,
additional_fcheck
=
s
.
fcheck
})
--Activate 1
--Activate 1
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
...
@@ -10,49 +16,57 @@ function s.initial_effect(c)
...
@@ -10,49 +16,57 @@ function s.initial_effect(c)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetOperation
(
s
.
activate
)
e1
:
SetOperation
(
s
.
activate
)
e1
:
SetLabelObject
(
e0
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
s
.
filter0
(
c
)
function
s
.
filter0
(
c
)
return
c
:
IsSetCard
(
0x1047
)
and
not
c
:
IsRace
(
RACE_ROCK
)
return
c
:
IsSetCard
(
0x1047
)
and
not
c
:
IsRace
(
RACE_ROCK
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToGrave
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToGrave
()
end
end
function
s
.
filter1
(
c
,
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
function
s
.
fusfilter
(
c
)
return
c
:
IsSetCard
(
0x1047
)
end
end
function
s
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x1047
)
and
(
not
f
or
f
(
c
))
--- @type FUSION_SPELL_PRE_SELECT_MAT_LOCATION_FUNCTION
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
function
s
.
pre_select_mat_location
(
tc
,
tp
)
local
location
=
LOCATION_HAND
|
LOCATION_MZONE
if
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
1264319
)
then
location
=
location
|
LOCATION_DECK
|
LOCATION_EXTRA
end
return
location
end
function
s
.
fusion_spell_matfilter
(
c
)
--- materials from deck/extra must be ジェムナイト
if
c
:
IsLocation
(
LOCATION_DECK
|
LOCATION_EXTRA
)
and
not
c
:
IsFusionSetCard
(
0x1047
)
then
return
false
end
return
true
end
end
function
s
.
thfilter
(
c
)
function
s
.
thfilter
(
c
)
return
c
:
IsFaceupEx
()
and
c
:
IsSetCard
(
0x47
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
return
c
:
IsFaceupEx
()
and
c
:
IsSetCard
(
0x47
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToHand
()
end
end
function
s
.
fcheck
(
tp
,
sg
,
fc
)
return
sg
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
+
LOCATION_EXTRA
)
<=
2
--- @type FUSION_FGCHECK_FUNCTION
end
function
s
.
fcheck
(
tp
,
mg
,
fc
,
all_mg
)
function
s
.
gcheck
(
sg
)
--- if we have this, we already know there is ジェムナイト・フュージョン in GY
return
sg
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
+
LOCATION_EXTRA
)
<=
2
local
mg_deck
=
mg
:
Filter
(
function
(
c
)
return
c
:
IsLocation
(
LOCATION_DECK
|
LOCATION_EXTRA
)
end
,
nil
)
end
--- Up to 2 monsters from your Deck/Extra Deck can be used,
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
#
mg_deck
>
2
then
local
chkf
=
tp
return
false
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
s
.
filter1
,
nil
,
e
)
if
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
1264319
)
then
local
sg
=
Duel
.
GetMatchingGroup
(
s
.
filter0
,
tp
,
LOCATION_DECK
+
LOCATION_EXTRA
,
0
,
nil
)
mg1
:
Merge
(
sg
)
aux
.
FCheckAdditional
=
s
.
fcheck
aux
.
GCheckAdditional
=
s
.
gcheck
end
end
local
res
=
Duel
.
IsExistingMatchingCard
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
--- Only if they are non-Rock "Gem-Knight" monsters
aux
.
FCheckAdditional
=
nil
if
mg_deck
:
IsExists
(
function
(
c
)
return
c
:
IsRace
(
RACE_ROCK
)
end
,
1
,
nil
)
then
aux
.
GCheckAdditional
=
nil
return
false
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
end
return
true
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
fusion_effect
=
e
:
GetLabelObject
()
local
res
=
fusion_effect
:
GetTarget
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
local
b1
=
res
and
(
Duel
.
GetFlagEffect
(
tp
,
id
)
==
0
or
not
e
:
IsCostChecked
())
local
b1
=
res
and
(
Duel
.
GetFlagEffect
(
tp
,
id
)
==
0
or
not
e
:
IsCostChecked
())
local
b2
=
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
0
,
1
,
nil
)
local
b2
=
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
0
,
1
,
nil
)
and
(
Duel
.
GetFlagEffect
(
tp
,
id
+
o
)
==
0
or
not
e
:
IsCostChecked
())
and
(
Duel
.
GetFlagEffect
(
tp
,
id
+
o
)
==
0
or
not
e
:
IsCostChecked
())
...
@@ -86,60 +100,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -86,60 +100,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
)
end
end
end
end
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
()
==
1
then
if
e
:
GetLabel
()
==
1
then
local
chkf
=
tp
local
fusion_effect
=
e
:
GetLabelObject
()
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
s
.
filter1
,
nil
,
e
)
fusion_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
exmat
=
false
if
Duel
.
IsExistingMatchingCard
(
Card
.
IsCode
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
1264319
)
then
local
sg
=
Duel
.
GetMatchingGroup
(
s
.
filter0
,
tp
,
LOCATION_DECK
+
LOCATION_EXTRA
,
0
,
nil
,
e
)
if
sg
:
GetCount
()
>
0
then
mg1
:
Merge
(
sg
)
exmat
=
true
end
end
if
exmat
then
aux
.
FCheckAdditional
=
s
.
fcheck
aux
.
GCheckAdditional
=
s
.
gcheck
end
local
sg1
=
Duel
.
GetMatchingGroup
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
aux
.
FCheckAdditional
=
nil
aux
.
GCheckAdditional
=
nil
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
mg1
:
RemoveCard
(
tc
)
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
ce
and
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
if
exmat
then
aux
.
FCheckAdditional
=
s
.
fcheck
aux
.
GCheckAdditional
=
s
.
gcheck
end
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
aux
.
FCheckAdditional
=
nil
aux
.
GCheckAdditional
=
nil
tc
:
SetMaterial
(
mat1
)
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
elseif
ce
~=
nil
then
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
elseif
e
:
GetLabel
()
==
2
then
elseif
e
:
GetLabel
()
==
2
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_DECK
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
...
@@ -161,10 +126,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -161,10 +126,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end
end
function
s
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ph
=
Duel
.
GetCurrentPhase
()
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
return
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
end
end
function
s
.
damval
(
e
,
re
,
val
,
r
,
rp
,
rc
)
function
s
.
damval
(
e
,
re
,
val
,
r
,
rp
,
rc
)
if
r
&
REASON_EFFECT
==
REASON_EFFECT
then
if
r
&
REASON_EFFECT
==
REASON_EFFECT
then
return
math.ceil
(
val
/
2
)
return
math.ceil
(
val
/
2
)
...
...
c24484270.lua
View file @
adad86e7
--ジェムナイト・ファントムルーツ
--ジェムナイト・ファントムルーツ
function
c24484270
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--link summon
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkSetCard
,
0x47
),
2
,
2
)
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkSetCard
,
0x47
),
2
,
2
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--special summon
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
24484270
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
24484270
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
c24484270
.
thcon
)
e1
:
SetCondition
(
s
.
thcon
)
e1
:
SetTarget
(
c24484270
.
thtg
)
e1
:
SetTarget
(
s
.
thtg
)
e1
:
SetOperation
(
c24484270
.
thop
)
e1
:
SetOperation
(
s
.
thop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--fusion summon
--fusion summon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
FusionSpell
.
CreateSummonEffect
(
c
,{
e2
:
SetDescription
(
aux
.
Stringid
(
24484270
,
1
))
fusfilter
=
s
.
fusfilter
,
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
pre_select_mat_location
=
LOCATION_GRAVE
|
LOCATION_REMOVED
,
mat_operation_code_map
=
{
{
[
LOCATION_DECK
]
=
FusionSpell
.
FUSION_OPERATION_GRAVE
},
{
[
0xff
]
=
FusionSpell
.
FUSION_OPERATION_SHUFFLE
}
},
extra_target
=
s
.
extra_target
,
stage_x_operation
=
s
.
stage_x_operation
})
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
24484271
)
e2
:
SetCountLimit
(
1
,
id
+
o
)
e2
:
SetCost
(
c24484270
.
spcost
)
e2
:
SetCost
(
s
.
spcost
)
e2
:
SetTarget
(
c24484270
.
sptg
)
e2
:
SetOperation
(
c24484270
.
spop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c24484270
.
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_LINK
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
end
end
function
c24484270
.
thfilter
(
c
)
function
s
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x1047
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x1047
)
and
c
:
IsAbleToHand
()
end
end
function
c24484270
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c24484270
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c24484270
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c24484270
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
function
c24484270
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
1000
)
end
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
1000
)
end
Duel
.
PayLPCost
(
tp
,
1000
)
Duel
.
PayLPCost
(
tp
,
1000
)
end
end
function
c24484270
.
filter0
(
c
)
return
(
c
:
IsLocation
(
LOCATION_GRAVE
)
or
c
:
IsFaceup
())
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeck
()
function
s
.
fusfilter
(
c
)
return
c
:
IsSetCard
(
0x1047
)
end
end
function
c24484270
.
filter1
(
c
,
e
)
return
(
c
:
IsLocation
(
LOCATION_GRAVE
)
or
c
:
IsFaceup
())
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsImmuneToEffect
(
e
)
and
c
:
IsAbleToDeck
()
function
s
.
extra_target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
function
c24484270
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x1047
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c24484270
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
chk
==
0
then
local
chkf
=
tp
return
true
local
mg1
=
Duel
.
GetMatchingGroup
(
c24484270
.
filter0
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
nil
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c24484270
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c24484270
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
return
res
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
)
end
end
function
c24484270
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
--- @type FUSION_SPELL_STAGE_X_CALLBACK_FUNCTION
local
mg1
=
Duel
.
GetMatchingGroup
(
c24484270
.
filter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
nil
,
e
)
function
s
.
stage_x_operation
(
e
,
tc
,
tp
,
stage
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c24484270
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
stage
==
FusionSpell
.
STAGE_BEFORE_PROCEDURE_COMPLETE
then
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c24484270
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
HintSelection
(
mat1
)
Duel
.
SendtoDeck
(
mat1
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_CANNOT_DIRECT_ATTACK
)
e1
:
SetCode
(
EFFECT_CANNOT_DIRECT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
tc
:
CompleteProcedure
()
end
end
end
end
c39261576.lua
View file @
adad86e7
--パーティカル・フュージョン
--パーティカル・フュージョン
function
c39261576
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
FusionSpell
.
RegisterSummonEffect
(
c
,{
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
fusfilter
=
s
.
fusfilter
,
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
pre_select_mat_location
=
LOCATION_MZONE
,
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
stage_x_operation
=
s
.
stage_x_operation
e1
:
SetTarget
(
c39261576
.
target
)
})
e1
:
SetOperation
(
c39261576
.
activate
)
c
:
RegisterEffect
(
e1
)
--atk up
--atk up
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetDescription
(
aux
.
Stringid
(
39261576
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCode
(
EVENT_CUSTOM
+
39261576
)
e2
:
SetCode
(
EVENT_CUSTOM
+
id
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCondition
(
c39261576
.
atkcon
)
e2
:
SetCondition
(
s
.
atkcon
)
e2
:
SetCost
(
c39261576
.
atkcost
)
e2
:
SetCost
(
s
.
atkcost
)
e2
:
SetTarget
(
c39261576
.
atktg
)
e2
:
SetTarget
(
s
.
atktg
)
e2
:
SetOperation
(
c39261576
.
atkop
)
e2
:
SetOperation
(
s
.
atkop
)
e2
:
SetLabelObject
(
e1
)
e2
:
SetLabelObject
(
e1
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c39261576
.
filter1
(
c
,
e
)
return
c
:
IsOnField
()
and
not
c
:
IsImmuneToEffect
(
e
)
function
s
.
fusfilter
(
c
)
return
c
:
IsSetCard
(
0x1047
)
end
end
function
c39261576
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x1047
)
and
(
not
f
or
f
(
c
))
--- @type FUSION_SPELL_STAGE_X_CALLBACK_FUNCTION
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
function
s
.
stage_x_operation
(
e
,
tc
,
tp
,
stage
)
end
if
stage
==
FusionSpell
.
STAGE_AT_SUMMON_OPERATION_FINISH
then
function
c39261576
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
e
:
SetLabelObject
(
tc
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsOnField
,
nil
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c39261576
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c39261576
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c39261576
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c39261576
.
filter1
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c39261576
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c39261576
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
e
:
SetLabelObject
(
tc
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
e
:
SetLabelObject
(
tc
)
end
tc
:
CompleteProcedure
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_CHAIN_END
)
e1
:
SetCode
(
EVENT_CHAIN_END
)
e1
:
SetOperation
(
c39261576
.
evop
)
e1
:
SetOperation
(
s
.
evop
)
e1
:
SetLabelObject
(
e
)
e1
:
SetLabelObject
(
e
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
end
end
function
c39261576
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
==
e
:
GetLabelObject
()
return
re
==
e
:
GetLabelObject
()
end
end
function
c39261576
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemove
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemove
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
end
function
c39261576
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
s
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
tc
=
eg
:
GetFirst
()
local
tc
=
eg
:
GetFirst
()
local
mat
=
tc
:
GetMaterial
()
local
mat
=
tc
:
GetMaterial
()
if
chkc
then
return
chkc
:
IsSetCard
(
0x1047
)
and
mat
:
IsContains
(
chkc
)
end
if
chkc
then
return
chkc
:
IsSetCard
(
0x1047
)
and
mat
:
IsContains
(
chkc
)
end
if
chk
==
0
then
return
mat
:
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0x1047
)
end
if
chk
==
0
then
return
mat
:
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0x1047
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
39261576
,
1
))
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
id
,
1
))
local
g
=
mat
:
FilterSelect
(
tp
,
Card
.
IsSetCard
,
1
,
1
,
nil
,
0x1047
)
local
g
=
mat
:
FilterSelect
(
tp
,
Card
.
IsSetCard
,
1
,
1
,
nil
,
0x1047
)
tc
:
CreateEffectRelation
(
e
)
tc
:
CreateEffectRelation
(
e
)
Duel
.
SetTargetCard
(
g
)
Duel
.
SetTargetCard
(
g
)
end
end
function
c39261576
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sc
=
eg
:
GetFirst
()
local
sc
=
eg
:
GetFirst
()
if
not
sc
:
IsRelateToEffect
(
e
)
or
sc
:
IsFacedown
()
then
return
end
if
not
sc
:
IsRelateToEffect
(
e
)
or
sc
:
IsFacedown
()
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
...
@@ -118,10 +72,11 @@ function c39261576.atkop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -118,10 +72,11 @@ function c39261576.atkop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
sc
:
RegisterEffect
(
e1
)
sc
:
RegisterEffect
(
e1
)
end
end
function
c39261576
.
evop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
evop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
te
=
e
:
GetLabelObject
()
local
te
=
e
:
GetLabelObject
()
local
tc
=
te
:
GetLabelObject
()
local
tc
=
te
:
GetLabelObject
()
Duel
.
RaiseEvent
(
tc
,
EVENT_CUSTOM
+
39261576
,
te
,
0
,
tp
,
tp
,
0
)
Duel
.
RaiseEvent
(
tc
,
EVENT_CUSTOM
+
id
,
te
,
0
,
tp
,
tp
,
0
)
te
:
SetLabelObject
(
nil
)
te
:
SetLabelObject
(
nil
)
e
:
Reset
()
e
:
Reset
()
end
end
c40597694.lua
View file @
adad86e7
--スキャッター・フュージョン
--スキャッター・フュージョン
function
c40597694
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--activate
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--fusion
--fusion
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
FusionSpell
.
CreateSummonEffect
(
c
,{
fusfilter
=
s
.
fusfilter
,
pre_select_mat_location
=
LOCATION_DECK
,
stage_x_operation
=
s
.
stage_x_operation
})
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
+
CATEGORY_DECKDES
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
+
CATEGORY_DECKDES
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
40597694
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCondition
(
c40597694
.
condition
)
e2
:
SetCondition
(
s
.
condition
)
e2
:
SetTarget
(
c40597694
.
target
)
e2
:
SetOperation
(
c40597694
.
operation
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--destroy
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD
)
e3
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e3
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e3
:
SetOperation
(
c40597694
.
desop
)
e3
:
SetOperation
(
s
.
desop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c40597694
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
>
0
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
>
0
end
end
function
c40597694
.
filter0
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToGrave
()
function
s
.
fusfilter
(
c
)
return
c
:
IsSetCard
(
0x1047
)
and
not
c
:
IsRace
(
RACE_ROCK
)
end
end
function
c40597694
.
filter1
(
c
,
e
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToGrave
()
and
not
c
:
IsImmuneToEffect
(
e
)
--- @type FUSION_SPELL_STAGE_X_CALLBACK_FUNCTION
end
function
s
.
stage_x_operation
(
e
,
tc
,
tp
,
stage
)
function
c40597694
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
if
stage
==
FusionSpell
.
STAGE_AT_SUMMON_OPERATION_FINISH
then
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x1047
)
and
not
c
:
IsRace
(
RACE_ROCK
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c40597694
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetMatchingGroup
(
c40597694
.
filter0
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c40597694
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c40597694
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c40597694
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetMatchingGroup
(
c40597694
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c40597694
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c40597694
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
e
:
GetHandler
():
SetCardTarget
(
tc
)
e
:
GetHandler
():
SetCardTarget
(
tc
)
elseif
stage
==
FusionSpell
.
STAGE_AT_ALL_OPERATION_FINISH
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
s
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c40597694
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
c40597694
.
splimit
(
e
,
c
)
function
s
.
splimit
(
e
,
c
)
return
not
c
:
IsSetCard
(
0x1047
)
and
c
:
IsLocation
(
LOCATION_EXTRA
)
return
not
c
:
IsSetCard
(
0x1047
)
and
c
:
IsLocation
(
LOCATION_EXTRA
)
end
end
function
c40597694
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetHandler
():
GetFirstCardTarget
()
function
s
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
tc
and
tc
:
IsLocation
(
LOCATION_MZONE
)
then
local
tg
=
e
:
GetHandler
():
GetCardTarget
()
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
if
tg
then
tg
=
tg
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_MZONE
)
Duel
.
Destroy
(
tg
,
REASON_EFFECT
)
end
end
end
end
c55824220.lua
View file @
adad86e7
--輝石融合
--輝石融合
function
c55824220
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
FusionSpell
.
RegisterSummonEffect
(
c
,{
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
fusfilter
=
s
.
fusfilter
,
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
})
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c55824220
.
target
)
e1
:
SetOperation
(
c55824220
.
activate
)
c
:
RegisterEffect
(
e1
)
end
end
function
c55824220
.
filter1
(
c
,
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
function
s
.
fusfilter
(
c
)
end
return
c
:
IsSetCard
(
0x1047
)
function
c55824220
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x1047
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c55824220
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c55824220
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c55824220
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c55824220
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c55824220
.
filter1
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c55824220
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c55824220
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
end
c71422989.lua
View file @
adad86e7
--吸光融合
--吸光融合
function
c71422989
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
-- fusion
local
e0
=
FusionSpell
.
CreateSummonEffect
(
c
,{
fusfilter
=
s
.
fusfilter
,
matfilter
=
aux
.
NecroValleyFilter
(),
mat_operation_code_map
=
{
{
[
LOCATION_REMOVED
]
=
FusionSpell
.
FUSION_OPERATION_GRAVE
},
{
[
0xff
]
=
FusionSpell
.
FUSION_OPERATION_BANISH
}
},
})
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
71422989
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCountLimit
(
1
,
id
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCost
(
c71422989
.
cost
)
e1
:
SetCost
(
s
.
cost
)
e1
:
SetTarget
(
c71422989
.
target
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetOperation
(
c71422989
.
activate
)
e1
:
SetOperation
(
s
.
activate
)
e1
:
SetLabelObject
(
e0
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
Duel
.
AddCustomActivityCounter
(
71422989
,
ACTIVITY_SPSUMMON
,
c71422989
.
counterfilter
)
Duel
.
AddCustomActivityCounter
(
id
,
ACTIVITY_SPSUMMON
,
s
.
counterfilter
)
end
end
function
c71422989
.
counterfilter
(
c
)
function
s
.
counterfilter
(
c
)
return
c
:
IsSetCard
(
0x1047
)
return
c
:
IsSetCard
(
0x1047
)
end
end
function
c71422989
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
71422989
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
function
s
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
id
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c71422989
.
splimit
)
e1
:
SetTarget
(
s
.
splimit
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
c71422989
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
function
s
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
not
c
:
IsSetCard
(
0x1047
)
return
not
c
:
IsSetCard
(
0x1047
)
end
end
function
c71422989
.
filter
(
c
)
function
s
.
filter
(
c
)
return
c
:
IsSetCard
(
0x1047
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x1047
)
and
c
:
IsAbleToHand
()
end
end
function
c71422989
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c71422989
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c71422989
.
filter1
(
c
,
e
)
return
c
:
IsAbleToRemove
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
s
.
fusfilter
(
c
)
function
c71422989
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsSetCard
(
0x1047
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x1047
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
end
function
c71422989
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c71422989
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
local
chkf
=
tp
local
fusion_effect
=
e
:
GetLabelObject
()
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c71422989
.
filter1
,
nil
,
e
)
if
fusion_effect
:
GetTarget
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
0
))
then
local
sg1
=
Duel
.
GetMatchingGroup
(
c71422989
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c71422989
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
(
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
))
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
71422989
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
local
sg
=
sg1
:
Clone
()
fusion_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
Remove
(
mat1
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
end
end
end
end
c72029628.lua
View file @
adad86e7
--廃石融合
--廃石融合
function
c72029628
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
FusionSpell
.
CreateSummonEffect
(
c
,{
fusfilter
=
s
.
fusfilter
,
pre_select_mat_location
=
LOCATION_GRAVE
,
mat_operation_code_map
=
{
{
[
LOCATION_REMOVED
]
=
FusionSpell
.
FUSION_OPERATION_GRAVE
},
{
[
0xff
]
=
FusionSpell
.
FUSION_OPERATION_BANISH
}
},
extra_target
=
s
.
extra_target
,
stage_x_operation
=
s
.
stage_x_operation
})
e1
:
SetCategory
(
CATEGORY_REMOVE
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetCategory
(
CATEGORY_REMOVE
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c72029628
.
target
)
e1
:
SetOperation
(
c72029628
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c72029628
.
filter0
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
function
s
.
fusfilter
(
c
)
return
c
:
IsSetCard
(
0x1047
)
end
end
function
c72029628
.
filter1
(
c
,
e
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
and
not
c
:
IsImmuneToEffect
(
e
)
function
s
.
extra_target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
function
c72029628
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x1047
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c72029628
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
chk
==
0
then
local
chkf
=
tp
return
true
local
mg1
=
Duel
.
GetMatchingGroup
(
c72029628
.
filter0
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c72029628
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c72029628
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
return
res
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
end
function
c72029628
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
--- @type FUSION_SPELL_STAGE_X_CALLBACK_FUNCTION
local
mg1
=
Duel
.
GetMatchingGroup
(
c72029628
.
filter1
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
)
function
s
.
stage_x_operation
(
e
,
tc
,
tp
,
stage
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c72029628
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
stage
==
FusionSpell
.
STAGE_AT_SUMMON_OPERATION_FINISH
then
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c72029628
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
Remove
(
mat1
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
local
fid
=
e
:
GetHandler
():
GetFieldID
()
local
fid
=
e
:
GetHandler
():
GetFieldID
()
tc
:
RegisterFlagEffect
(
72029628
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
fid
)
tc
:
RegisterFlagEffect
(
id
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
fid
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
...
@@ -78,18 +39,20 @@ function c72029628.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -78,18 +39,20 @@ function c72029628.activate(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetLabel
(
fid
)
e1
:
SetLabel
(
fid
)
e1
:
SetLabelObject
(
tc
)
e1
:
SetLabelObject
(
tc
)
e1
:
SetCondition
(
c72029628
.
descon
)
e1
:
SetCondition
(
s
.
descon
)
e1
:
SetOperation
(
c72029628
.
desop
)
e1
:
SetOperation
(
s
.
desop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
end
end
function
c72029628
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
local
tc
=
e
:
GetLabelObject
()
if
tc
:
GetFlagEffectLabel
(
72029628
)
~=
e
:
GetLabel
()
then
if
tc
:
GetFlagEffectLabel
(
id
)
~=
e
:
GetLabel
()
then
e
:
Reset
()
e
:
Reset
()
return
false
return
false
else
return
true
end
else
return
true
end
end
end
function
c72029628
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Destroy
(
e
:
GetLabelObject
(),
REASON_EFFECT
)
Duel
.
Destroy
(
e
:
GetLabelObject
(),
REASON_EFFECT
)
end
end
c7394770.lua
View file @
adad86e7
--ブリリアント・フュージョン
--ブリリアント・フュージョン
function
c7394770
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--activate
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
FusionSpell
.
CreateSummonEffect
(
c
,{
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
+
CATEGORY_DECKDES
)
fusfilter
=
s
.
fusfilter
,
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
pre_select_mat_location
=
LOCATION_DECK
,
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
stage_x_operation
=
s
.
stage_x_operation
e1
:
SetCountLimit
(
1
,
7394770
+
EFFECT_COUNT_CODE_OATH
)
})
e1
:
SetTarget
(
c7394770
.
target
)
e1
:
SetCountLimit
(
1
,
id
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetOperation
(
c7394770
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--Destroy
--Destroy
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e2
:
SetOperation
(
c7394770
.
desop
)
e2
:
SetOperation
(
s
.
desop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--atk
--atk
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
...
@@ -22,59 +22,20 @@ function c7394770.initial_effect(c)
...
@@ -22,59 +22,20 @@ function c7394770.initial_effect(c)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCountLimit
(
1
)
e3
:
SetCondition
(
c7394770
.
atkcon
)
e3
:
SetCondition
(
s
.
atkcon
)
e3
:
SetCost
(
c7394770
.
atkcost
)
e3
:
SetCost
(
s
.
atkcost
)
e3
:
SetTarget
(
c7394770
.
atktg
)
e3
:
SetTarget
(
s
.
atktg
)
e3
:
SetOperation
(
c7394770
.
atkop
)
e3
:
SetOperation
(
s
.
atkop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c7394770
.
filter0
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToGrave
()
function
s
.
fusfilter
(
c
)
return
c
:
IsSetCard
(
0x1047
)
end
end
function
c7394770
.
filter1
(
c
,
e
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToGrave
()
and
not
c
:
IsImmuneToEffect
(
e
)
---@type FUSION_SPELL_STAGE_X_CALLBACK_FUNCTION
end
function
s
.
stage_x_operation
(
e
,
tc
,
tp
,
stage
)
function
c7394770
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
if
stage
==
FusionSpell
.
STAGE_BEFORE_SUMMON_COMPLETE
then
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x1047
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c7394770
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetMatchingGroup
(
c7394770
.
filter0
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c7394770
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c7394770
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c7394770
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetMatchingGroup
(
c7394770
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c7394770
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c7394770
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
...
@@ -84,41 +45,36 @@ function c7394770.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -84,41 +45,36 @@ function c7394770.activate(e,tp,eg,ep,ev,re,r,rp)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_SET_DEFENSE_FINAL
)
e2
:
SetCode
(
EFFECT_SET_DEFENSE_FINAL
)
tc
:
RegisterEffect
(
e2
)
tc
:
RegisterEffect
(
e2
)
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
elseif
stage
==
FusionSpell
.
STAGE_AT_SUMMON_OPERATION_FINISH
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
e
:
GetHandler
():
SetCardTarget
(
tc
)
e
:
GetHandler
():
SetCardTarget
(
tc
)
end
end
end
end
function
c7394770
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetHandler
():
GetFirstCardTarget
()
local
tc
=
e
:
GetHandler
():
GetFirstCardTarget
()
if
tc
and
tc
:
IsLocation
(
LOCATION_MZONE
)
then
if
tc
and
tc
:
IsLocation
(
LOCATION_MZONE
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
end
end
function
c7394770
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetFirstCardTarget
()
return
e
:
GetHandler
():
GetFirstCardTarget
()
end
end
function
c7394770
.
cfilter
(
c
)
function
s
.
cfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsDiscardable
()
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsDiscardable
()
end
end
function
c7394770
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c7394770
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
function
s
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
DiscardHand
(
tp
,
c7394770
.
cfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
,
nil
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
Duel
.
DiscardHand
(
tp
,
s
.
cfilter
,
1
,
1
,
REASON_COST
+
REASON_DISCARD
,
nil
)
end
end
function
c7394770
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetFirstCardTarget
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
GetFirstCardTarget
()
end
end
end
function
c7394770
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetHandler
():
GetFirstCardTarget
()
local
tc
=
e
:
GetHandler
():
GetFirstCardTarget
()
if
not
tc
then
return
end
if
not
tc
then
return
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
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