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
1b7523b5
Commit
1b7523b5
authored
Jun 16, 2025
by
Vury Leo
Committed by
wind2009
Jun 16, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add HERO to new fusion + use sumtype instead of SUMMON_TYPE_FUSION
parent
a5706fb3
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
148 additions
and
503 deletions
+148
-503
c12071500.lua
c12071500.lua
+18
-72
c26841274.lua
c26841274.lua
+14
-66
c45906428.lua
c45906428.lua
+16
-72
c52947044.lua
c52947044.lua
+44
-92
c54283059.lua
c54283059.lua
+19
-72
c77124096.lua
c77124096.lua
+22
-65
c94820406.lua
c94820406.lua
+14
-63
procedure.lua
procedure.lua
+1
-1
No files found.
c12071500.lua
View file @
1b7523b5
--ダーク・コーリング
function
c12071500
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
94820406
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c12071500
.
target
)
e1
:
SetOperation
(
c12071500
.
activate
)
c
:
RegisterEffect
(
e1
)
FusionSpell
.
RegisterSummonEffect
(
c
,{
fusfilter
=
s
.
fusfilter
,
pre_select_mat_location
=
LOCATION_HAND
|
LOCATION_GRAVE
,
mat_operation_code_map
=
{
{
[
LOCATION_REMOVED
]
=
FusionSpell
.
FUSION_OPERATION_GRAVE
},
{
[
0xff
]
=
FusionSpell
.
FUSION_OPERATION_BANISH
}
},
extra_target
=
s
.
extra_target
,
sumtype
=
SUMMON_VALUE_DARK_FUSION
})
end
function
c12071500
.
filter0
(
c
)
return
c
:
IsLocation
(
LOCATION_HAND
)
and
c
:
IsAbleToRemove
()
function
s
.
fusfilter
(
c
)
return
c
.
dark_calling
==
true
end
function
c12071500
.
filter1
(
c
,
e
)
return
c
:
IsLocation
(
LOCATION_HAND
)
and
c
:
IsAbleToRemove
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c12071500
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
.
dark_calling
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_VALUE_DARK_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c12071500
.
filter3
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
end
function
c12071500
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
extra_target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c12071500
.
filter0
,
nil
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c12071500
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c12071500
.
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
(
c12071500
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
end
return
res
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
2
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
end
function
c12071500
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c12071500
.
filter1
,
nil
,
e
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c12071500
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c12071500
.
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
(
c12071500
.
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_VALUE_DARK_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
,
SUMMON_VALUE_DARK_FUSION
)
end
tc
:
CompleteProcedure
()
end
end
c26841274.lua
View file @
1b7523b5
--D-フュージョン
function
c26841274
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c26841274
.
target
)
e1
:
SetOperation
(
c26841274
.
activate
)
c
:
RegisterEffect
(
e1
)
FusionSpell
.
RegisterSummonEffect
(
c
,{
matfilter
=
s
.
matfilter
,
pre_select_mat_location
=
LOCATION_MZONE
,
stage_x_operation
=
s
.
stage_x_operation
})
end
function
c26841274
.
filter1
(
c
,
e
)
return
c
:
IsOnField
()
and
c
:
IsSetCard
(
0xc008
)
and
(
not
e
or
not
c
:
IsImmuneToEffect
(
e
))
function
s
.
matfilter
(
c
)
return
c
:
IsSetCard
(
0xc008
)
end
function
c26841274
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c26841274
.
filter3
(
c
)
return
c
:
IsCanBeFusionMaterial
()
and
c
:
IsSetCard
(
0xc008
)
end
function
c26841274
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c26841274
.
filter1
,
nil
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c26841274
.
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
):
Filter
(
c26841274
.
filter3
,
nil
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c26841274
.
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
c26841274
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c26841274
.
filter1
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c26841274
.
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
):
Filter
(
c26841274
.
filter3
,
nil
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c26841274
.
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
--- @type FUSION_SPELL_STAGE_X_CALLBACK_FUNCTION
function
s
.
stage_x_operation
(
e
,
tc
,
tp
,
stage
)
if
stage
==
FusionSpell
.
STAGE_BEFORE_SUMMON_COMPLETE
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
...
...
@@ -76,6 +25,5 @@ function c26841274.activate(e,tp,eg,ep,ev,re,r,rp)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_INDESTRUCTABLE_EFFECT
)
tc
:
RegisterEffect
(
e2
)
tc
:
CompleteProcedure
()
end
end
c45906428.lua
View file @
1b7523b5
--ミラクル・フュージョン
function
c45906428
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_REMOVE
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c45906428
.
target
)
e1
:
SetOperation
(
c45906428
.
activate
)
c
:
RegisterEffect
(
e1
)
FusionSpell
.
RegisterSummonEffect
(
c
,{
fusfilter
=
s
.
fusfilter
,
pre_select_mat_location
=
LOCATION_MZONE
|
LOCATION_GRAVE
,
mat_operation_code_map
=
{
{
[
LOCATION_REMOVED
]
=
FusionSpell
.
FUSION_OPERATION_GRAVE
},
{
[
0xff
]
=
FusionSpell
.
FUSION_OPERATION_BANISH
}
},
extra_target
=
s
.
extra_target
})
end
function
c45906428
.
filter0
(
c
)
return
c
:
Is
OnField
()
and
c
:
IsAbleToRemove
(
)
function
s
.
fusfilter
(
c
)
return
c
:
Is
SetCard
(
0x3008
)
end
function
c45906428
.
filter1
(
c
,
e
)
return
c
:
IsOnField
()
and
c
:
IsAbleToRemove
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c45906428
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x3008
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c45906428
.
filter3
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
end
function
c45906428
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
extra_target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c45906428
.
filter0
,
nil
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c45906428
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c45906428
.
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
(
c45906428
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
end
return
res
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
)
end
function
c45906428
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c45906428
.
filter1
,
nil
,
e
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c45906428
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c45906428
.
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
(
c45906428
.
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
c52947044.lua
View file @
1b7523b5
--フュージョン・デステニー
function
c52947044
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
FusionSpell
.
CreateSummonEffect
(
c
,{
fusfilter
=
s
.
fusfilter
,
pre_select_mat_location
=
LOCATION_HAND
|
LOCATION_DECK
,
stage_x_operation
=
s
.
stage_x_operation
,
additional_fcheck
=
s
.
fcheck
})
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
+
CATEGORY_DECKDES
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
52947044
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c52947044
.
target
)
e1
:
SetOperation
(
c52947044
.
activate
)
e1
:
SetCountLimit
(
1
,
id
+
EFFECT_COUNT_CODE_OATH
)
c
:
RegisterEffect
(
e1
)
end
function
c52947044
.
filter0
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToGrave
()
function
s
.
fusfilter
(
c
)
return
aux
.
IsMaterialListSetCard
(
c
,
0xc008
)
==
true
end
function
c52947044
.
filter1
(
c
,
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
and
c
:
IsLocation
(
LOCATION_HAND
)
end
function
c52947044
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
aux
.
IsMaterialListSetCard
(
c
,
0xc008
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c52947044
.
fcheck
(
tp
,
sg
,
fc
)
return
sg
:
IsExists
(
Card
.
IsFusionSetCard
,
1
,
nil
,
0xc008
)
end
function
c52947044
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsLocation
,
nil
,
LOCATION_HAND
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c52947044
.
filter0
,
tp
,
LOCATION_DECK
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
aux
.
FCheckAdditional
=
c52947044
.
fcheck
local
res
=
Duel
.
IsExistingMatchingCard
(
c52947044
.
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
(
c52947044
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
aux
.
FCheckAdditional
=
nil
return
res
--- @type FUSION_FGCHECK_FUNCTION
function
s
.
fcheck
(
tp
,
mg
,
fc
,
mg_all
)
--- Must include 1 Destiny HERO monster as material
if
not
mg_all
:
IsExists
(
function
(
c
)
return
c
:
IsFusionSetCard
(
0xc008
)
end
,
1
,
nil
)
then
return
false
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
return
true
end
function
c52947044
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c52947044
.
filter1
,
nil
,
e
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c52947044
.
filter0
,
tp
,
LOCATION_DECK
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
aux
.
FCheckAdditional
=
c52947044
.
fcheck
local
sg1
=
Duel
.
GetMatchingGroup
(
c52947044
.
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
(
c52947044
.
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
.
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
,
mg3
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
tc
:
RegisterFlagEffect
(
52947044
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
local
e1
=
Effect
.
CreateEffect
(
c
)
--- @type FUSION_SPELL_STAGE_X_CALLBACK_FUNCTION
function
s
.
stage_x_operation
(
e
,
tc
,
tp
,
stage
)
if
stage
==
FusionSpell
.
STAGE_BEFORE_SUMMON_COMPLETE
then
tc
:
RegisterFlagEffect
(
id
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
0
,
2
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCondition
(
c52947044
.
descon
)
e1
:
SetOperation
(
c52947044
.
desop
)
e1
:
SetCondition
(
s
.
descon
)
e1
:
SetOperation
(
s
.
desop
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
,
2
)
e1
:
SetCountLimit
(
1
)
e1
:
SetLabel
(
Duel
.
GetTurnCount
())
e1
:
SetLabelObject
(
tc
)
Duel
.
RegisterEffect
(
e1
,
tp
)
elseif
stage
==
FusionSpell
.
STAGE_AT_ALL_OPERATION_FINISH
then
if
not
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
return
end
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetTargetRange
(
1
,
0
)
e2
:
SetTarget
(
s
.
splimit
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
aux
.
FCheckAdditional
=
nil
if
not
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
return
end
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetTargetRange
(
1
,
0
)
e2
:
SetTarget
(
c52947044
.
splimit
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
function
c52947044
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
and
tc
:
GetFlagEffect
(
52947044
)
~=
0
return
Duel
.
GetTurnCount
()
~=
e
:
GetLabel
()
and
tc
:
GetFlagEffect
(
id
)
~=
0
end
function
c52947044
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
function
c52947044
.
splimit
(
e
,
c
)
function
s
.
splimit
(
e
,
c
)
return
not
(
c
:
IsAttribute
(
ATTRIBUTE_DARK
)
and
c
:
IsSetCard
(
0x8
))
end
c54283059.lua
View file @
1b7523b5
--平行世界融合
function
c54283059
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCost
(
c54283059
.
cost
)
e1
:
SetTarget
(
c54283059
.
target
)
e1
:
SetOperation
(
c54283059
.
activate
)
local
e1
=
FusionSpell
.
CreateSummonEffect
(
c
,{
fusfilter
=
s
.
fusfilter
,
pre_select_mat_location
=
LOCATION_REMOVED
,
mat_operation_code_map
=
{
{
[
LOCATION_DECK
]
=
FusionSpell
.
FUSION_OPERATION_GRAVE
},
{
[
0xff
]
=
FusionSpell
.
FUSION_OPERATION_SHUFFLE
}
}
})
e1
:
SetCost
(
s
.
cost
)
c
:
RegisterEffect
(
e1
)
end
function
c54283059
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetActivityCount
(
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
...
...
@@ -19,71 +23,14 @@ function c54283059.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetLabelObject
(
e
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c54283059
.
sumlimit
)
e1
:
SetTarget
(
s
.
sumlimit
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c54283059
.
sumlimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
function
s
.
sumlimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
e
:
GetLabelObject
()
~=
se
end
function
c54283059
.
filter0
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToDeck
()
end
function
c54283059
.
filter1
(
c
,
e
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToDeck
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c54283059
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x3008
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c54283059
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg
=
Duel
.
GetMatchingGroup
(
c54283059
.
filter0
,
tp
,
LOCATION_REMOVED
,
0
,
nil
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c54283059
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg
,
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
(
c54283059
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c54283059
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg
=
Duel
.
GetMatchingGroup
(
c54283059
.
filter1
,
tp
,
LOCATION_REMOVED
,
0
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c54283059
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg
,
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
(
c54283059
.
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
mat
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat
)
Duel
.
HintSelection
(
mat
)
Duel
.
SendtoDeck
(
mat
,
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
,
mg3
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
function
s
.
fusfilter
(
c
)
return
c
:
IsSetCard
(
0x3008
)
end
c77124096.lua
View file @
1b7523b5
...
...
@@ -2,37 +2,34 @@
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
94820406
,
72043279
)
--- fusion effect
local
e0
=
FusionSpell
.
CreateSummonEffect
(
c
,{
fusfilter
=
s
.
fusfilter
,
pre_select_mat_location
=
LOCATION_MZONE
|
LOCATION_GRAVE
|
LOCATION_REMOVED
,
mat_operation_code_map
=
{
{
[
LOCATION_DECK
]
=
FusionSpell
.
FUSION_OPERATION_GRAVE
},
{
[
0xff
]
=
FusionSpell
.
FUSION_OPERATION_SHUFFLE
}
},
sumtype
=
SUMMON_VALUE_DARK_FUSION
})
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetLabelObject
(
e0
)
c
:
RegisterEffect
(
e1
)
end
s
.
fusion_effect
=
true
function
s
.
filter1
(
c
,
e
)
return
(
c
:
IsLocation
(
LOCATION_ONFIELD
+
LOCATION_GRAVE
)
or
c
:
IsFaceup
())
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToDeck
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
s
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
.
dark_calling
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_VALUE_DARK_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
function
s
.
fusfilter
(
c
)
return
c
.
dark_calling
==
true
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
chkf
=
tp
local
mg
=
Duel
.
GetMatchingGroup
(
s
.
filter1
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
nil
,
e
)
local
fusion_effect
=
e
:
GetLabelObject
()
local
b0
=
Duel
.
GetFlagEffect
(
tp
,
id
)
==
0
or
not
e
:
IsCostChecked
()
local
b1
=
b0
and
Duel
.
IsExistingMatchingCard
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg
,
nil
,
chkf
)
if
b0
and
not
b1
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg3
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
b1
=
Duel
.
IsExistingMatchingCard
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
mf
,
chkf
)
end
end
local
b1
=
b0
and
fusion_effect
:
GetTarget
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
local
b2
=
Duel
.
IsExistingMatchingCard
(
s
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
(
Duel
.
GetFlagEffect
(
tp
,
id
+
o
)
==
0
or
not
e
:
IsCostChecked
())
if
chk
==
0
then
return
b1
or
b2
end
...
...
@@ -67,56 +64,16 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
e
:
SetOperation
(
s
.
thop
)
end
end
function
s
.
fsop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg
=
Duel
.
GetMatchingGroup
(
aux
.
NecroValleyFilter
(
s
.
filter1
),
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
s
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg
,
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
.
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
::
cancel
::
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
(
ce
and
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
())))
then
local
mat
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg
,
nil
,
chkf
)
if
#
mat
==
0
then
goto
cancel
end
tc
:
SetMaterial
(
mat
)
if
mat
:
IsExists
(
Card
.
IsFacedown
,
1
,
nil
)
then
local
cg
=
mat
:
Filter
(
Card
.
IsFacedown
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
cg
)
end
if
mat
:
Filter
(
s
.
cfilter
,
nil
):
GetCount
()
>
0
then
local
cg
=
mat
:
Filter
(
s
.
cfilter
,
nil
)
Duel
.
HintSelection
(
cg
)
end
Duel
.
SendtoDeck
(
mat
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_VALUE_DARK_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
elseif
ce
~=
nil
then
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg3
,
nil
,
chkf
)
if
#
mat2
==
0
then
goto
cancel
end
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
,
SUMMON_VALUE_DARK_FUSION
)
end
tc
:
CompleteProcedure
()
end
end
function
s
.
cfilter
(
c
)
return
c
:
IsLocation
(
LOCATION_GRAVE
+
LOCATION_REMOVED
)
or
(
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsFaceup
())
local
fusion_effect
=
e
:
GetLabelObject
()
fusion_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
function
s
.
thfilter2
(
c
)
return
c
:
IsCode
(
94820406
,
72043279
)
and
c
:
IsAbleToHand
()
end
function
s
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter2
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
...
...
c94820406.lua
View file @
1b7523b5
--ダーク・フュージョン
function
c94820406
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c94820406
.
target
)
e1
:
SetOperation
(
c94820406
.
activate
)
c
:
RegisterEffect
(
e1
)
FusionSpell
.
RegisterSummonEffect
(
c
,{
fusfilter
=
s
.
fusfilter
,
sumtype
=
SUMMON_VALUE_DARK_FUSION
,
stage_x_operation
=
s
.
stage_x_operation
})
end
function
c94820406
.
filter1
(
c
,
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
function
s
.
fusfilter
(
c
)
return
c
:
IsRace
(
RACE_FIEND
)
end
function
c94820406
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsRace
(
RACE_FIEND
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c94820406
.
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
(
c94820406
.
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
(
c94820406
.
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
c94820406
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c94820406
.
filter1
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c94820406
.
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
(
c94820406
.
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
,
SUMMON_TYPE_FUSION
)
end
tc
:
CompleteProcedure
()
--- @type FUSION_SPELL_STAGE_X_CALLBACK_FUNCTION
function
s
.
stage_x_operation
(
e
,
tc
,
tp
,
stage
)
if
stage
==
FusionSpell
.
STAGE_BEFORE_SUMMON_COMPLETE
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
...
...
procedure.lua
View file @
1b7523b5
...
...
@@ -2702,7 +2702,7 @@ function FusionSpell.GetSummonOperation(
if
fusion_succeeded
==
true
then
Duel
.
BreakEffect
()
Duel
.
SpecialSummonStep
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
sumpos
)
Duel
.
SpecialSummonStep
(
tc
,
sumtype
,
tp
,
tp
,
false
,
false
,
sumpos
)
end
else
--- hint opponent that this effect is applied
...
...
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