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
d2c4df64
Commit
d2c4df64
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
79158a8f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
160 additions
and
326 deletions
+160
-326
c50042011.lua
c50042011.lua
+16
-62
c59419719.lua
c59419719.lua
+63
-90
c66518509.lua
c66518509.lua
+44
-88
c78063197.lua
c78063197.lua
+36
-85
procedure.lua
procedure.lua
+1
-1
No files found.
c50042011.lua
View file @
d2c4df64
...
@@ -23,15 +23,15 @@ function s.initial_effect(c)
...
@@ -23,15 +23,15 @@ function s.initial_effect(c)
Duel
.
RegisterEffect
(
ge1
,
0
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
--fusion summon
--fusion summon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
FusionSpell
.
CreateSummonEffect
(
c
,{
fusfilter
=
s
.
fusfilter
})
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
id
+
o
)
e2
:
SetCountLimit
(
1
,
id
+
o
)
e2
:
SetTarget
(
s
.
fstg
)
e2
:
SetOperation
(
s
.
fsop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e2
:
Clone
()
local
e3
=
e2
:
Clone
()
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e3
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
...
@@ -49,12 +49,13 @@ function s.initial_effect(c)
...
@@ -49,12 +49,13 @@ function s.initial_effect(c)
e4
:
SetOperation
(
s
.
tgop
)
e4
:
SetOperation
(
s
.
tgop
)
c
:
RegisterEffect
(
e4
)
c
:
RegisterEffect
(
e4
)
end
end
s
.
fusion_effect
=
true
function
s
.
cfilter
(
c
,
tp
)
function
s
.
cfilter
(
c
,
tp
)
return
c
:
IsPreviousControler
(
tp
)
and
not
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
return
c
:
IsPreviousControler
(
tp
)
and
not
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
and
(
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
or
c
:
GetOriginalType
()
&
TYPE_MONSTER
~=
0
)
and
(
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
or
c
:
GetOriginalType
()
&
TYPE_MONSTER
~=
0
)
and
c
:
IsReason
(
REASON_EFFECT
)
and
c
:
IsReason
(
REASON_EFFECT
)
end
end
function
s
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
for
p
=
0
,
1
do
for
p
=
0
,
1
do
if
eg
:
IsExists
(
s
.
cfilter
,
1
,
nil
,
p
)
then
if
eg
:
IsExists
(
s
.
cfilter
,
1
,
nil
,
p
)
then
...
@@ -62,87 +63,40 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -62,87 +63,40 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end
end
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFlagEffect
(
tp
,
id
)
>
0
return
Duel
.
GetFlagEffect
(
tp
,
id
)
>
0
end
end
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
and
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
s
.
filter1
(
c
,
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
function
s
.
fusfilter
(
c
)
end
return
c
:
IsSetCard
(
0x1a1
)
function
s
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x1a1
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
s
.
fstg
(
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
(
s
.
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
(
s
.
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
s
.
fsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
s
.
filter1
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
s
.
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
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
#
sg1
>
0
or
(
sg2
~=
nil
and
#
sg2
>
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
function
s
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
bit
.
band
(
r
,
REASON_EFFECT
+
REASON_BATTLE
)
~=
0
return
bit
.
band
(
r
,
REASON_EFFECT
+
REASON_BATTLE
)
~=
0
end
end
function
s
.
tgfilter
(
c
)
function
s
.
tgfilter
(
c
)
return
not
c
:
IsCode
(
id
)
and
c
:
IsSetCard
(
0x1a1
)
and
c
:
IsAbleToGrave
()
return
not
c
:
IsCode
(
id
)
and
c
:
IsSetCard
(
0x1a1
)
and
c
:
IsAbleToGrave
()
end
end
function
s
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
s
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
...
...
c59419719.lua
View file @
d2c4df64
--化石融合-フォッシル・フュージョン
--化石融合-フォッシル・フュージョン
function
c59419719
.
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
(
59419719
,
0
))
fusfilter
=
s
.
fusfilter
,
e1
:
SetCategory
(
CATEGORY_REMOVE
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
pre_select_mat_location
=
LOCATION_GRAVE
,
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
pre_select_mat_opponent_location
=
LOCATION_GRAVE
,
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
mat_operation_code_map
=
{
e1
:
SetTarget
(
c59419719
.
target
)
{
[
LOCATION_REMOVED
]
=
FusionSpell
.
FUSION_OPERATION_GRAVE
},
e1
:
SetOperation
(
c59419719
.
activate
)
{
[
0xff
]
=
FusionSpell
.
FUSION_OPERATION_BANISH
}
c
:
RegisterEffect
(
e1
)
},
extra_target
=
s
.
extra_target
,
stage_x_operation
=
s
.
stage_x_operation
})
--to hand
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
59419719
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetCategory
(
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_CUSTOM
+
59419719
)
e2
:
SetCode
(
EVENT_CUSTOM
+
id
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
59419719
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCondition
(
c59419719
.
thcon
)
e2
:
SetCondition
(
s
.
thcon
)
e2
:
SetTarget
(
c59419719
.
thtg
)
e2
:
SetTarget
(
s
.
thtg
)
e2
:
SetOperation
(
c59419719
.
thop
)
e2
:
SetOperation
(
s
.
thop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
if
not
c59419719
.
global_check
then
if
not
s
.
global_check
then
c59419719
.
global_check
=
true
s
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_DESTROYED
)
ge1
:
SetCode
(
EVENT_DESTROYED
)
ge1
:
SetCondition
(
c59419719
.
regcon
)
ge1
:
SetCondition
(
s
.
regcon
)
ge1
:
SetOperation
(
c59419719
.
regop
)
ge1
:
SetOperation
(
s
.
regop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
end
end
function
c59419719
.
cfilter
(
c
,
tp
)
function
s
.
cfilter
(
c
,
tp
)
return
c
:
IsPreviousSetCard
(
0x149
)
and
c
:
GetPreviousTypeOnField
()
&
TYPE_FUSION
~=
0
return
c
:
IsPreviousSetCard
(
0x149
)
and
c
:
GetPreviousTypeOnField
()
&
TYPE_FUSION
~=
0
and
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
c
:
IsPreviousControler
(
tp
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
IsReason
(
REASON_BATTLE
+
REASON_EFFECT
)
and
c
:
IsPreviousControler
(
tp
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
end
end
function
c59419719
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
v
=
0
local
v
=
0
if
eg
:
IsExists
(
c59419719
.
cfilter
,
1
,
nil
,
0
)
then
v
=
v
+
1
end
if
eg
:
IsExists
(
s
.
cfilter
,
1
,
nil
,
0
)
then
v
=
v
+
1
end
if
eg
:
IsExists
(
c59419719
.
cfilter
,
1
,
nil
,
1
)
then
v
=
v
+
2
end
if
eg
:
IsExists
(
s
.
cfilter
,
1
,
nil
,
1
)
then
v
=
v
+
2
end
if
v
==
0
then
return
false
end
if
v
==
0
then
return
false
end
e
:
SetLabel
(({
0
,
1
,
PLAYER_ALL
})[
v
])
e
:
SetLabel
(({
0
,
1
,
PLAYER_ALL
})[
v
])
return
true
return
true
end
end
function
c59419719
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RaiseEvent
(
eg
,
EVENT_CUSTOM
+
59419719
,
re
,
r
,
rp
,
ep
,
e
:
GetLabel
())
function
s
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
RaiseEvent
(
eg
,
EVENT_CUSTOM
+
id
,
re
,
r
,
rp
,
ep
,
e
:
GetLabel
())
end
end
function
c59419719
.
filter1
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
function
s
.
fusfilter
(
c
)
return
c
:
IsSetCard
(
0x149
)
end
end
function
c59419719
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x149
)
and
(
not
f
or
f
(
c
))
function
s
.
extra_target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c59419719
.
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
(
c59419719
.
filter1
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
nil
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c59419719
.
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
(
c59419719
.
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
c59419719
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
--- @type FUSION_SPELL_STAGE_X_CALLBACK_FUNCTION
local
mg1
=
Duel
.
GetMatchingGroup
(
c59419719
.
filter1
,
tp
,
LOCATION_GRAVE
,
LOCATION_GRAVE
,
nil
)
function
s
.
stage_x_operation
(
e
,
tc
,
tp
,
stage
,
mg_fuison_spell
,
mg_all
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c59419719
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
stage
==
FusionSpell
.
STAGE_BEFORE_MOVE_MATERIAL
then
local
mg2
=
nil
local
mg_grave
=
mg_all
:
Filter
(
function
(
c
)
return
c
:
IsLocation
(
LOCATION_GRAVE
)
end
,
nil
)
local
sg2
=
nil
if
mg_grave
:
IsExists
(
function
(
c
)
return
c
:
IsControler
(
tp
)
end
,
1
,
nil
)
and
mg_grave
:
IsExists
(
function
(
c
)
return
c
:
IsControler
(
1
-
tp
)
end
,
1
,
nil
)
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
e
:
SetLabel
(
1
)
if
ce
~=
nil
then
else
local
fgroup
=
ce
:
GetTarget
()
e
:
SetLabel
(
0
)
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c59419719
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
elseif
stage
==
FusionSpell
.
STAGE_BEFORE_SUMMON_COMPLETE
and
e
:
GetLabel
()
==
1
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
)
local
res
=
mat1
:
IsExists
(
Card
.
IsControler
,
1
,
nil
,
tp
)
and
mat1
:
IsExists
(
Card
.
IsControler
,
1
,
nil
,
1
-
tp
)
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
)
if
res
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
aux
.
Stringid
(
59419719
,
2
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
2
))
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetValue
(
c59419719
.
efilter
)
e1
:
SetValue
(
s
.
efilter
)
tc
:
RegisterEffect
(
e1
,
true
)
tc
:
RegisterEffect
(
e1
,
true
)
end
end
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
function
c59419719
.
efilter
(
e
,
re
,
rp
)
function
s
.
efilter
(
e
,
re
,
rp
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
end
end
function
c59419719
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ev
==
tp
or
ev
==
PLAYER_ALL
return
ev
==
tp
or
ev
==
PLAYER_ALL
end
end
function
c59419719
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToHand
()
end
if
chk
==
0
then
return
c
:
IsAbleToHand
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
c
,
1
,
0
,
0
)
end
end
function
c59419719
.
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
)
...
...
c66518509.lua
View file @
d2c4df64
--冥骸融合-メメント・フュージョン
--冥骸融合-メメント・フュージョン
local
s
,
id
,
o
=
GetID
()
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
function
s
.
initial_effect
(
c
)
--
-- fusion summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
FusionSpell
.
CreateSummonEffect
(
c
,{
pre_select_mat_location
=
s
.
pre_select_mat_location
,
mat_operation_code_map
=
{
{
[
LOCATION_GRAVE
]
=
FusionSpell
.
FUSION_OPERATION_SHUFFLE
},
{
[
0xff
]
=
FusionSpell
.
FUSION_OPERATION_GRAVE
}
},
extra_target
=
s
.
extra_target
,
fusion_spell_matfilter
=
s
.
fusion_spell_matfilter
})
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
+
CATEGORY_TODECK
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
+
CATEGORY_TODECK
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
s
.
condition
)
e1
:
SetCondition
(
s
.
condition
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetOperation
(
s
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--
--
destroy and search
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e2
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
...
@@ -33,14 +40,16 @@ function s.initial_effect(c)
...
@@ -33,14 +40,16 @@ function s.initial_effect(c)
Duel
.
RegisterEffect
(
ge1
,
0
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
end
end
s
.
fusion_effect
=
true
function
s
.
spcfilter
(
c
)
function
s
.
spcfilter
(
c
)
return
c
:
IsReason
(
REASON_EFFECT
)
and
(
c
:
IsType
(
TYPE_MONSTER
)
or
c
:
IsPreviousLocation
(
LOCATION_MZONE
))
return
c
:
IsReason
(
REASON_EFFECT
)
and
(
c
:
IsType
(
TYPE_MONSTER
)
or
c
:
IsPreviousLocation
(
LOCATION_MZONE
))
and
not
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
and
not
c
:
IsPreviousLocation
(
LOCATION_SZONE
)
end
end
function
s
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
s
.
spcfilter
,
1
,
nil
)
return
eg
:
IsExists
(
s
.
spcfilter
,
1
,
nil
)
end
end
function
s
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
eg
:
Filter
(
s
.
spcfilter
,
nil
)
local
g
=
eg
:
Filter
(
s
.
spcfilter
,
nil
)
if
g
:
IsExists
(
Card
.
IsPreviousControler
,
1
,
nil
,
0
)
then
if
g
:
IsExists
(
Card
.
IsPreviousControler
,
1
,
nil
,
0
)
then
...
@@ -50,109 +59,56 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -50,109 +59,56 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
RegisterFlagEffect
(
1
,
id
,
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_OATH
,
1
)
Duel
.
RegisterFlagEffect
(
1
,
id
,
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_OATH
,
1
)
end
end
end
end
function
s
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
condition
(
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
.
filter1
(
c
,
e
)
return
c
:
IsSetCard
(
0x1a1
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeck
()
and
c
:
IsCanBeFusionMaterial
()
and
not
c
:
IsImmuneToEffect
(
e
)
--- @type FUSION_SPELL_PRE_SELECT_MAT_LOCATION_FUNCTION
end
function
s
.
pre_select_mat_location
(
tc
,
tp
)
function
s
.
filter2
(
c
,
e
)
local
location
=
LOCATION_HAND
|
LOCATION_MZONE
return
not
c
:
IsImmuneToEffect
(
e
)
end
function
s
.
spfilter
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
s
.
exfilter
(
c
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsLocation
(
LOCATION_GRAVE
)
end
function
s
.
fcheck
(
tp
,
sg
,
fc
)
if
Duel
.
GetFlagEffect
(
tp
,
id
)
~=
0
then
if
Duel
.
GetFlagEffect
(
tp
,
id
)
~=
0
then
return
sg
:
IsExists
(
Card
.
IsFusionSetCard
,
1
,
nil
,
0x1a1
)
location
=
location
|
LOCATION_GRAVE
else
return
sg
:
IsExists
(
Card
.
IsFusionSetCard
,
1
,
nil
,
0x1a1
)
and
not
sg
:
IsExists
(
s
.
exfilter
,
1
,
nil
,
tp
)
end
end
return
location
end
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
function
s
.
fusion_spell_matfilter
(
c
)
local
chkf
=
tp
--- materials from grave must be メメント monster
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
s
.
filter2
,
nil
,
e
)
if
c
:
IsLocation
(
LOCATION_GRAVE
)
and
not
c
:
IsFusionSetCard
(
0x1a1
)
then
local
mg2
=
Duel
.
GetMatchingGroup
(
s
.
filter1
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
)
return
false
if
Duel
.
GetFlagEffect
(
tp
,
id
)
~=
0
then
mg1
:
Merge
(
mg2
)
end
aux
.
FCheckAdditional
=
s
.
fcheck
local
res
=
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
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
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
s
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
end
aux
.
FCheckAdditional
=
nil
return
res
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
return
true
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
0
,
tp
,
LOCATION_GRAVE
)
end
end
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
--- @type FUSION_FGCHECK_FUNCTION
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
s
.
filter2
,
nil
,
e
)
function
s
.
fcheck
(
tp
,
mg
,
fc
,
mg_all
)
local
mg2
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
s
.
filter1
),
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
)
--- Must include 1 メメント monster
if
Duel
.
GetFlagEffect
(
tp
,
id
)
~=
0
then
if
not
mg_all
:
IsExists
(
function
(
c
)
return
c
:
IsFusionSetCard
(
0x1a1
)
end
,
1
,
nil
)
then
mg1
:
Merge
(
mg2
)
return
false
end
aux
.
FCheckAdditional
=
s
.
fcheck
local
sg1
=
Duel
.
GetMatchingGroup
(
s
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg3
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
s
.
spfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
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
)
local
mat2
=
mat1
:
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_GRAVE
)
mat1
:
Sub
(
mat2
)
if
#
mat2
>
0
then
Duel
.
HintSelection
(
mat2
)
end
end
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
return
true
Duel
.
SendtoDeck
(
mat2
,
nil
,
2
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
end
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
function
s
.
extra_target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
else
if
chk
==
0
then
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg3
,
nil
,
chkf
)
return
true
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
aux
.
FCheckAdditional
=
nil
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
0
,
tp
,
LOCATION_GRAVE
)
end
end
function
s
.
filter
(
c
)
function
s
.
filter
(
c
)
return
c
:
IsSetCard
(
0x1a1
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x1a1
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsAbleToHand
()
end
end
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
if
chk
==
0
then
return
#
g
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
#
g
>
0
and
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
s
.
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_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
...
...
c78063197.lua
View file @
d2c4df64
--サクリファイス・フュージョン
--サクリファイス・フュージョン
function
c78063197
.
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
)
fusfilter
=
s
.
fusfilter
,
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
pre_select_mat_location
=
LOCATION_HAND
|
LOCATION_MZONE
|
LOCATION_GRAVE
,
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
mat_operation_code_map
=
{
e1
:
SetCountLimit
(
1
,
78063197
)
{
[
LOCATION_REMOVED
]
=
FusionSpell
.
FUSION_OPERATION_GRAVE
},
e1
:
SetTarget
(
c78063197
.
target
)
{
[
0xff
]
=
FusionSpell
.
FUSION_OPERATION_BANISH
}
e1
:
SetOperation
(
c78063197
.
activate
)
},
extra_target
=
s
.
extra_target
})
e1
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetCountLimit
(
1
,
id
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--equip
--equip
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
78063197
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e2
:
SetCategory
(
CATEGORY_EQUIP
)
e2
:
SetCategory
(
CATEGORY_EQUIP
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
78063198
)
e2
:
SetCountLimit
(
1
,
id
+
o
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetCost
(
aux
.
bfgcost
)
e2
:
SetTarget
(
c78063197
.
eqtg
)
e2
:
SetTarget
(
s
.
eqtg
)
e2
:
SetOperation
(
c78063197
.
eqop
)
e2
:
SetOperation
(
s
.
eqop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c78063197
.
filter0
(
c
)
return
c
:
IsAbleToRemove
()
function
s
.
fusfilter
(
c
)
return
c
:
IsSetCard
(
0x1110
)
end
end
function
c78063197
.
filter1
(
c
,
e
)
return
c
:
IsAbleToRemove
()
and
not
c
:
IsImmuneToEffect
(
e
)
function
s
.
extra_target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
function
c78063197
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
(
not
f
or
f
(
c
))
and
c
:
IsSetCard
(
0x1110
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c78063197
.
filter3
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
end
function
c78063197
.
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
.
GetFusionMaterial
(
tp
):
Filter
(
c78063197
.
filter0
,
nil
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c78063197
.
filter3
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c78063197
.
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
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c78063197
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
end
return
res
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c78063197
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c78063197
.
filter1
,
nil
,
e
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c78063197
.
filter3
,
tp
,
LOCATION_MZONE
+
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c78063197
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg3
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c78063197
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
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
,
mg3
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
end
function
c78063197
.
filter
(
c
)
function
s
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsAbleToChangeControler
()
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsAbleToChangeControler
()
end
end
function
c78063197
.
eqfilter
(
c
)
function
s
.
eqfilter
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
c
:
IsFaceup
()
and
((
c
:
IsSetCard
(
0x1110
)
and
c
:
IsType
(
TYPE_FUSION
))
or
c
:
IsCode
(
64631466
))
return
m
and
c
:
IsFaceup
()
and
((
c
:
IsSetCard
(
0x1110
)
and
c
:
IsType
(
TYPE_FUSION
))
or
c
:
IsCode
(
64631466
))
and
not
c
:
IsDisabled
()
and
m
.
can_equip_monster
and
m
.
can_equip_monster
(
c
)
and
not
c
:
IsDisabled
()
and
m
.
can_equip_monster
and
m
.
can_equip_monster
(
c
)
end
end
function
c78063197
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c78063197
.
filter
(
chkc
)
end
function
s
.
eqtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c78063197
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
s
.
filter
(
chkc
)
end
and
Duel
.
IsExistingMatchingCard
(
c78063197
.
eqfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
s
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
s
.
eqfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_EQUIP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c78063197
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectTarget
(
tp
,
s
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_EQUIP
,
g
,
1
,
0
,
0
)
end
end
function
c78063197
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
eqop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
tc1
=
Duel
.
GetFirstTarget
()
local
tc1
=
Duel
.
GetFirstTarget
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c78063197
.
eqfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
eqfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
local
tc2
=
g
:
GetFirst
()
local
tc2
=
g
:
GetFirst
()
local
m
=
_G
[
"c"
..
tc2
:
GetCode
()]
local
m
=
_G
[
"c"
..
tc2
:
GetCode
()]
...
...
procedure.lua
View file @
d2c4df64
...
@@ -2296,7 +2296,7 @@ end
...
@@ -2296,7 +2296,7 @@ end
--- Get possible materials from opponent locations, must be face-up
--- Get possible materials from opponent locations, must be face-up
function
FusionSpell
.
GetFusionMaterialFromOpponentLocation
(
tp
,
locations
)
function
FusionSpell
.
GetFusionMaterialFromOpponentLocation
(
tp
,
locations
)
return
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
,
tp
,
0
,
locations
,
nil
)
return
Duel
.
GetMatchingGroup
(
Card
.
IsFaceup
Ex
,
tp
,
0
,
locations
,
nil
)
end
end
--- Registers a Fusion Summon effect to a card.
--- Registers a Fusion Summon effect to a card.
...
...
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