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
5
Merge Requests
5
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
ebe5bde7
Commit
ebe5bde7
authored
Jun 16, 2025
by
Vury Leo
Committed by
wind2009
Jun 16, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ブラック・マジシャン and 魔法使い族 to new fusion
parent
a4a308f3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
132 additions
and
371 deletions
+132
-371
c11827244.lua
c11827244.lua
+18
-71
c3078380.lua
c3078380.lua
+29
-81
c58657303.lua
c58657303.lua
+18
-67
c59514116.lua
c59514116.lua
+35
-70
c6172122.lua
c6172122.lua
+32
-82
No files found.
c11827244.lua
View file @
ebe5bde7
--円融魔術
--円融魔術
function
c11827244
.
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_MZONE
|
LOCATION_GRAVE
,
mat_operation_code_map
=
{
{
[
LOCATION_REMOVED
]
=
FusionSpell
.
FUSION_OPERATION_GRAVE
},
{
[
0xff
]
=
FusionSpell
.
FUSION_OPERATION_BANISH
}
},
extra_target
=
s
.
extra_target
})
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
:
SetCountLimit
(
1
,
id
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
11827244
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetTarget
(
c11827244
.
target
)
e1
:
SetOperation
(
c11827244
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c11827244
.
filter0
(
c
)
return
c
:
IsOnField
()
and
c
:
IsAbleToRemove
()
function
s
.
fusfilter
(
c
)
return
c
:
IsRace
(
RACE_SPELLCASTER
)
end
end
function
c11827244
.
filter1
(
c
,
e
)
return
c
:
IsOnField
()
and
c
:
IsAbleToRemove
()
and
not
c
:
IsImmuneToEffect
(
e
)
function
s
.
extra_target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
function
c11827244
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c11827244
.
filter3
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
end
function
c11827244
.
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
(
c11827244
.
filter0
,
nil
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c11827244
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c11827244
.
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
(
c11827244
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg3
,
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_ONFIELD
+
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_ONFIELD
+
LOCATION_GRAVE
)
end
end
function
c11827244
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c11827244
.
filter1
,
nil
,
e
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c11827244
.
filter3
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c11827244
.
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
(
c11827244
.
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
c3078380.lua
View file @
ebe5bde7
--合体竜ティマイオス
--合体竜ティマイオス
function
c3078380
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
46986414
)
aux
.
AddCodeList
(
c
,
46986414
)
--special summon
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
3078380
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCountLimit
(
1
,
3078380
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCost
(
c3078380
.
spcost
)
e1
:
SetCost
(
s
.
spcost
)
e1
:
SetTarget
(
c3078380
.
sptg
)
e1
:
SetTarget
(
s
.
sptg
)
e1
:
SetOperation
(
c3078380
.
spop
)
e1
:
SetOperation
(
s
.
spop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--fusion summon
--fusion summon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
FusionSpell
.
CreateSummonEffect
(
c
,{
e2
:
SetDescription
(
aux
.
Stringid
(
3078380
,
1
))
additional_fcheck
=
s
.
fcheck
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
})
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
,
3078381
)
e2
:
SetCountLimit
(
1
,
id
+
o
)
e2
:
SetTarget
(
c3078380
.
fsptg
)
e2
:
SetOperation
(
c3078380
.
fspop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c3078380
.
cfilter
(
c
,
tp
)
function
s
.
cfilter
(
c
,
tp
)
return
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsFaceup
())
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
and
c
:
IsAbleToGraveAsCost
()
return
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsFaceup
())
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
and
c
:
IsAbleToGraveAsCost
()
and
(
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsType
(
TYPE_MONSTER
)
or
aux
.
IsCodeListed
(
c
,
46986414
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
))
and
(
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsType
(
TYPE_MONSTER
)
or
aux
.
IsCodeListed
(
c
,
46986414
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
))
end
end
function
c3078380
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c3078380
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
,
tp
)
end
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c3078380
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
cfilter
,
tp
,
LOCATION_HAND
+
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
,
tp
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
function
c3078380
.
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
e
:
GetHandler
():
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
if
chk
==
0
then
return
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
c3078380
.
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
c3078380
.
filter1
(
c
,
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
--- @type FUSION_FGCHECK_FUNCTION
end
function
s
.
fcheck
(
tp
,
mg
,
fc
,
mg_all
)
function
c3078380
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
--- Must include a Spellcaster monster
return
c
:
IsType
(
TYPE_FUSION
)
and
(
not
f
or
f
(
c
))
if
not
mg_all
:
IsExists
(
function
(
c
)
return
c
:
IsRace
(
RACE_SPELLCASTER
)
end
,
1
,
nil
)
then
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
return
false
end
function
c3078380
.
fcheck
(
tp
,
sg
,
fc
)
return
sg
:
IsExists
(
Card
.
IsRace
,
1
,
nil
,
RACE_SPELLCASTER
)
end
function
c3078380
.
fsptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
)
aux
.
FCheckAdditional
=
c3078380
.
fcheck
local
res
=
Duel
.
IsExistingMatchingCard
(
c3078380
.
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
(
c3078380
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
aux
.
FCheckAdditional
=
nil
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c3078380
.
fspop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c3078380
.
filter1
,
nil
,
e
)
aux
.
FCheckAdditional
=
c3078380
.
fcheck
local
sg1
=
Duel
.
GetMatchingGroup
(
c3078380
.
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
(
c3078380
.
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
aux
.
FCheckAdditional
=
nil
return
true
end
end
c58657303.lua
View file @
ebe5bde7
--墓守の霊術師
--墓守の霊術師
function
c58657303
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
47355498
)
--fusion summon
--fusion summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
FusionSpell
.
CreateSummonEffect
(
c
,{
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
fusfilter
=
s
.
fusfilter
,
gc
=
s
.
gc
})
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
,
58657303
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
c58657303
.
condition
)
e1
:
SetCondition
(
s
.
condition
)
e1
:
SetTarget
(
c58657303
.
target
)
e1
:
SetOperation
(
c58657303
.
operation
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c58657303
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsEnvironment
(
47355498
)
return
Duel
.
IsEnvironment
(
47355498
)
or
Duel
.
IsExistingMatchingCard
(
function
(
c
)
return
c
:
IsCode
(
47355498
)
and
c
:
IsFaceup
()
end
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
end
function
c58657303
.
filter1
(
c
,
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
function
s
.
fusfilter
(
c
)
return
c
:
IsRace
(
RACE_SPELLCASTER
)
end
end
function
c58657303
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
gc
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
(
not
f
or
f
(
c
))
function
s
.
gc
(
e
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
gc
,
chkf
)
return
e
:
GetHandler
()
end
function
c58657303
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c58657303
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
c
,
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
(
c58657303
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
c
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c58657303
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
chkf
=
tp
if
not
c
:
IsRelateToEffect
(
e
)
or
c
:
IsImmuneToEffect
(
e
)
then
return
end
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c58657303
.
filter1
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c58657303
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
c
,
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
(
c58657303
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
c
,
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
,
c
,
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
,
c
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
end
c59514116.lua
View file @
ebe5bde7
--黒魔術の秘儀
--黒魔術の秘儀
function
c59514116
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
aux
.
AddCodeList
(
c
,
46986414
,
38033121
)
aux
.
AddCodeList
(
c
,
46986414
,
38033121
)
local
e0
=
FusionSpell
.
CreateSummonEffect
(
c
,{
additional_fcheck
=
s
.
fcheck
})
--activate
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
...
@@ -8,106 +12,67 @@ function c59514116.initial_effect(c)
...
@@ -8,106 +12,67 @@ function c59514116.initial_effect(c)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_FUSION_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_FUSION_SUMMON
)
e1
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e1
:
SetTarget
(
c59514116
.
target
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetOperation
(
c59514116
.
activate
)
e1
:
SetOperation
(
s
.
activate
)
e1
:
SetLabelObject
(
e0
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c59514116
.
filter1
(
c
,
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
--- @type FUSION_FGCHECK_FUNCTION
end
function
s
.
fcheck
(
tp
,
mg
,
fc
,
mg_all
)
function
c59514116
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
gc
,
chkf
)
--- Must include "Dark Magician" or "Dark Magician Girl"
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
)
if
not
mg_all
:
IsExists
(
function
(
c
)
return
c
:
IsFusionCode
(
46986414
,
38033121
)
end
,
1
,
nil
)
then
end
return
false
function
c59514116
.
fcheck
(
tp
,
sg
,
fc
)
end
return
sg
:
IsExists
(
Card
.
IsFusionCode
,
1
,
nil
,
46986414
,
38033121
)
return
true
end
end
function
c59514116
.
rcheck
(
tp
,
g
,
c
)
function
s
.
rcheck
(
tp
,
g
,
c
)
return
g
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
46986414
,
38033121
)
return
g
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
46986414
,
38033121
)
end
end
function
c59514116
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
chkf
=
tp
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
)
local
fusion_effect
=
e
:
GetLabelObject
()
aux
.
FCheckAdditional
=
c59514116
.
fcheck
local
res1
=
fusion_effect
:
GetTarget
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
local
res1
=
Duel
.
IsExistingMatchingCard
(
c59514116
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res1
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res1
=
Duel
.
IsExistingMatchingCard
(
c59514116
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
aux
.
FCheckAdditional
=
nil
local
mg3
=
Duel
.
GetRitualMaterial
(
tp
)
local
mg3
=
Duel
.
GetRitualMaterial
(
tp
)
aux
.
RCheckAdditional
=
c59514116
.
rcheck
aux
.
RCheckAdditional
=
s
.
rcheck
local
res2
=
mg3
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
46986414
,
38033121
)
local
res2
=
mg3
:
IsExists
(
Card
.
IsCode
,
1
,
nil
,
46986414
,
38033121
)
and
Duel
.
IsExistingMatchingCard
(
aux
.
RitualUltimateFilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
aux
.
TRUE
,
e
,
tp
,
mg3
,
nil
,
Card
.
GetLevel
,
"Greater"
)
and
Duel
.
IsExistingMatchingCard
(
aux
.
RitualUltimateFilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
aux
.
TRUE
,
e
,
tp
,
mg3
,
nil
,
Card
.
GetLevel
,
"Greater"
)
aux
.
RCheckAdditional
=
nil
aux
.
RCheckAdditional
=
nil
if
chk
==
0
then
return
res1
or
res2
end
if
chk
==
0
then
return
res1
or
res2
end
local
s
=
0
local
op
=
0
if
res1
and
not
res2
then
if
res1
and
not
res2
then
s
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
59514116
,
0
))
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
id
,
0
))
end
end
if
not
res1
and
res2
then
if
not
res1
and
res2
then
s
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
59514116
,
1
))
+
1
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
id
,
1
))
+
1
end
end
if
res1
and
res2
then
if
res1
and
res2
then
s
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
59514116
,
0
),
aux
.
Stringid
(
59514116
,
1
))
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
id
,
0
),
aux
.
Stringid
(
id
,
1
))
end
end
e
:
SetLabel
(
s
)
e
:
SetLabel
(
op
)
if
s
==
0
then
if
op
==
0
then
if
e
:
IsCostChecked
()
then
if
e
:
IsCostChecked
()
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
if
s
==
1
then
if
op
==
1
then
if
e
:
IsCostChecked
()
then
if
e
:
IsCostChecked
()
then
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
end
end
end
function
c59514116
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
()
==
0
then
if
e
:
GetLabel
()
==
0
then
local
chkf
=
tp
local
fusion_effect
=
e
:
GetLabelObject
()
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c59514116
.
filter1
,
nil
,
e
)
fusion_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
aux
.
FCheckAdditional
=
c59514116
.
fcheck
local
sg1
=
Duel
.
GetMatchingGroup
(
c59514116
.
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
(
c59514116
.
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
mat
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat
)
Duel
.
SendtoGrave
(
mat
,
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
aux
.
FCheckAdditional
=
nil
elseif
e
:
GetLabel
()
==
1
then
elseif
e
:
GetLabel
()
==
1
then
::
rcancel
::
::
rcancel
::
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
)
aux
.
RCheckAdditional
=
c59514116
.
rcheck
aux
.
RCheckAdditional
=
s
.
rcheck
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
RitualUltimateFilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
aux
.
TRUE
,
e
,
tp
,
mg
,
nil
,
Card
.
GetLevel
,
"Greater"
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
RitualUltimateFilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
aux
.
TRUE
,
e
,
tp
,
mg
,
nil
,
Card
.
GetLevel
,
"Greater"
)
local
tc
=
tg
:
GetFirst
()
local
tc
=
tg
:
GetFirst
()
...
...
c6172122.lua
View file @
ebe5bde7
--真紅眼融合
--真紅眼融合
function
c6172122
.
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_HAND
|
LOCATION_MZONE
|
LOCATION_DECK
,
additional_fcheck
=
s
.
fcheck
,
stage_x_operation
=
s
.
stage_x_operation
})
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
+
CATEGORY_DECKDES
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
+
CATEGORY_DECKDES
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCountLimit
(
1
,
id
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCost
(
s
.
cost
)
e1
:
SetCountLimit
(
1
,
6172122
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCost
(
c6172122
.
cost
)
e1
:
SetTarget
(
c6172122
.
target
)
e1
:
SetOperation
(
c6172122
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c6172122
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetActivityCount
(
tp
,
ACTIVITY_SUMMON
)
==
0
and
Duel
.
GetActivityCount
(
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
function
s
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetActivityCount
(
tp
,
ACTIVITY_SUMMON
)
==
0
and
Duel
.
GetActivityCount
(
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
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
e1
:
SetCode
(
EFFECT_CANNOT_SUMMON
)
...
@@ -23,90 +28,35 @@ function c6172122.cost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -23,90 +28,35 @@ function c6172122.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local
e2
=
e1
:
Clone
()
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e2
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e2
:
SetLabelObject
(
e
)
e2
:
SetLabelObject
(
e
)
e2
:
SetTarget
(
c6172122
.
splimit
)
e2
:
SetTarget
(
s
.
splimit
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
function
c6172122
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
function
s
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
se
~=
e
:
GetLabelObject
()
return
se
~=
e
:
GetLabelObject
()
end
end
function
c6172122
.
filter0
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToGrave
()
function
s
.
fusfilter
(
c
)
end
return
aux
.
IsMaterialListSetCard
(
c
,
0x3b
)
function
c6172122
.
filter1
(
c
,
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
end
function
c6172122
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
if
not
(
c
:
IsType
(
TYPE_FUSION
)
and
aux
.
IsMaterialListSetCard
(
c
,
0x3b
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
))
then
return
false
end
aux
.
FCheckAdditional
=
c
.
red_eyes_fusion_check
or
c6172122
.
fcheck
local
res
=
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
aux
.
FCheckAdditional
=
nil
return
res
end
end
function
c6172122
.
fcheck
(
tp
,
sg
,
fc
)
return
sg
:
IsExists
(
Card
.
IsFusionSetCard
,
1
,
nil
,
0x3b
)
--- @type FUSION_FGCHECK_FUNCTION
end
function
s
.
fcheck
(
tp
,
mg
,
fc
,
mg_all
)
function
c6172122
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
fc
.
red_eyes_fusion_check
~=
nil
then
if
chk
==
0
then
return
fc
.
red_eyes_fusion_check
(
tp
,
mg_all
,
fc
)
==
true
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c6172122
.
filter0
,
tp
,
LOCATION_DECK
,
0
,
nil
)
mg1
:
Merge
(
mg2
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c6172122
.
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
(
c6172122
.
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
)
return
mg_all
:
IsExists
(
Card
.
IsFusionSetCard
,
1
,
nil
,
0x3b
)
end
end
function
c6172122
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
--- @type FUSION_SPELL_STAGE_X_CALLBACK_FUNCTION
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c6172122
.
filter1
,
nil
,
e
)
function
s
.
stage_x_operation
(
e
,
tc
,
tp
,
stage
)
local
mg2
=
Duel
.
GetMatchingGroup
(
c6172122
.
filter0
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
stage
==
FusionSpell
.
STAGE_BEFORE_SUMMON_COMPLETE
then
mg1
:
Merge
(
mg2
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c6172122
.
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
(
c6172122
.
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
()
aux
.
FCheckAdditional
=
tc
.
red_eyes_fusion_check
or
c6172122
.
fcheck
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
()
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_CHANGE_CODE
)
e1
:
SetCode
(
EFFECT_CHANGE_CODE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetValue
(
74677422
)
e1
:
SetValue
(
74677422
)
--- 真紅眼の黒竜
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterEffect
(
e1
)
end
end
aux
.
FCheckAdditional
=
nil
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment