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
3
Merge Requests
3
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
dd3882cc
Commit
dd3882cc
authored
Jun 15, 2025
by
Vury Leo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first gem knights
parent
59187a7a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
210 additions
and
415 deletions
+210
-415
c24484270.lua
c24484270.lua
+42
-75
c34933456.lua
c34933456.lua
+28
-1
c39261576.lua
c39261576.lua
+33
-79
c40597694.lua
c40597694.lua
+33
-76
c55824220.lua
c55824220.lua
+8
-65
c71422989.lua
c71422989.lua
+36
-52
c72029628.lua
c72029628.lua
+30
-67
No files found.
c24484270.lua
View file @
dd3882cc
--ジェムナイト・ファントムルーツ
--ジェムナイト・ファントムルーツ
function
c24484270
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--link summon
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkSetCard
,
0x47
),
2
,
2
)
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkSetCard
,
0x47
),
2
,
2
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--special summon
--special summon
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
24484270
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetCountLimit
(
1
,
24484270
)
e1
:
SetCountLimit
(
1
,
id
)
e1
:
SetCondition
(
c24484270
.
thcon
)
e1
:
SetCondition
(
s
.
thcon
)
e1
:
SetTarget
(
c24484270
.
thtg
)
e1
:
SetTarget
(
s
.
thtg
)
e1
:
SetOperation
(
c24484270
.
thop
)
e1
:
SetOperation
(
s
.
thop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--fusion summon
--fusion summon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
FusionSpell
.
CreateSummonEffect
(
c
,{
e2
:
SetDescription
(
aux
.
Stringid
(
24484270
,
1
))
fusfilter
=
s
.
fusfilter
,
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
pre_select_mat_location
=
LOCATION_GRAVE
|
LOCATION_REMOVED
,
mat_operation_code_map
=
{
[
LOCATION_DECK
]
=
FusionSpell
.
FUSION_OPERATION_GRAVE
,
[
0xff
]
=
FusionSpell
.
FUSION_OPERATION_SHUFFLE
},
extra_target
=
s
.
extra_target
,
stage_x_operation
=
s
.
stage_x_operation
})
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
1
))
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
24484271
)
e2
:
SetCountLimit
(
1
,
id
+
o
)
e2
:
SetCost
(
c24484270
.
spcost
)
e2
:
SetCost
(
s
.
spcost
)
e2
:
SetTarget
(
c24484270
.
sptg
)
e2
:
SetOperation
(
c24484270
.
spop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c24484270
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
end
end
function
c24484270
.
thfilter
(
c
)
function
s
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x1047
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x1047
)
and
c
:
IsAbleToHand
()
end
end
function
c24484270
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c24484270
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
s
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c24484270
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c24484270
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
function
c24484270
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
1000
)
end
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
1000
)
end
Duel
.
PayLPCost
(
tp
,
1000
)
Duel
.
PayLPCost
(
tp
,
1000
)
end
end
function
c24484270
.
filter0
(
c
)
return
(
c
:
IsLocation
(
LOCATION_GRAVE
)
or
c
:
IsFaceup
())
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeck
()
function
s
.
fusfilter
(
c
)
return
c
:
IsSetCard
(
0x1047
)
end
end
function
c24484270
.
filter1
(
c
,
e
)
return
(
c
:
IsLocation
(
LOCATION_GRAVE
)
or
c
:
IsFaceup
())
and
c
:
IsType
(
TYPE_MONSTER
)
and
not
c
:
IsImmuneToEffect
(
e
)
and
c
:
IsAbleToDeck
()
function
s
.
extra_target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
function
c24484270
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x1047
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c24484270
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
chk
==
0
then
local
chkf
=
tp
return
true
local
mg1
=
Duel
.
GetMatchingGroup
(
c24484270
.
filter0
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
nil
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c24484270
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c24484270
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
return
res
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
)
end
end
function
c24484270
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
--- @type FUSION_SPELL_STAGE_X_CALLBACK_FUNCTION
local
mg1
=
Duel
.
GetMatchingGroup
(
c24484270
.
filter1
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
nil
,
e
)
function
s
.
stage_x_operation
(
e
,
tc
,
tp
,
stage
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c24484270
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
stage
==
FusionSpell
.
STAGE_AT_SUMMON_OPERATION_FINISH
then
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c24484270
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
HintSelection
(
mat1
)
Duel
.
SendtoDeck
(
mat1
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
...
...
c34933456.lua
View file @
dd3882cc
...
@@ -10,7 +10,34 @@ function c34933456.initial_effect(c)
...
@@ -10,7 +10,34 @@ function c34933456.initial_effect(c)
e1
:
SetOperation
(
c34933456
.
activate
)
e1
:
SetOperation
(
c34933456
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c34933456
.
mttg
(
e
,
c
)
---@type FUSION_SPELL_PRE_SELECT_MAT_LOCATION_FUNCTION
function
s
.
pre_select_mat_location
(
tc
,
tp
)
local
location
=
LOCATION_HAND
|
LOCATION_MZONE
--- If Summoning a "Magistus" Fusion Monster, you can also use monsters in your Spell & Trap Zones
if
tc
:
IsSetCard
(
0x150
)
then
location
=
location
|
LOCATION_SZONE
end
return
location
end
---@type FUSION_FGCHECK_FUNCTION
function
s
.
fcheck
(
tp
,
mg
,
tc
,
mg_all
)
--- materials must include a Spellcaster monster
--- @param c Card
if
not
mg_all
:
IsExists
(
function
(
c
)
return
c
:
IsRace
(
RACE_SPELLCASTER
)
end
,
1
,
nil
)
then
return
false
end
--- when we have mg in SZONE, we already know tc is Magistus
--- you can only use monsters in your Spell & Trap Zones that are equipped to a "Magistus" monster.
local
mg_szone
=
mg
:
Filter
(
function
(
c
)
return
c
:
IsLocation
(
LOCATION_SZONE
)
end
,
nil
)
if
mg_szone
:
IsExists
(
function
(
c
)
return
not
s
.
mttg
(
c
)
end
,
1
,
nil
)
then
return
false
end
return
true
end
function
s
.
mttg
(
c
)
local
tc
=
c
:
GetEquipTarget
()
local
tc
=
c
:
GetEquipTarget
()
return
tc
and
tc
:
IsSetCard
(
0x150
)
and
c
:
GetOriginalType
()
&
TYPE_MONSTER
~=
0
return
tc
and
tc
:
IsSetCard
(
0x150
)
and
c
:
GetOriginalType
()
&
TYPE_MONSTER
~=
0
end
end
...
...
c39261576.lua
View file @
dd3882cc
--パーティカル・フュージョン
--パーティカル・フュージョン
function
c39261576
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
FusionSpell
.
RegisterSummonEffect
(
c
,{
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
fusfilter
=
s
.
fusfilter
,
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
pre_select_mat_location
=
LOCATION_MZONE
,
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
stage_x_operation
=
s
.
stage_x_operation
e1
:
SetTarget
(
c39261576
.
target
)
})
e1
:
SetOperation
(
c39261576
.
activate
)
c
:
RegisterEffect
(
e1
)
--atk up
--atk up
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e2
:
SetDescription
(
aux
.
Stringid
(
39261576
,
0
))
e2
:
SetDescription
(
aux
.
Stringid
(
id
,
0
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_F
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCode
(
EVENT_CUSTOM
+
39261576
)
e2
:
SetCode
(
EVENT_CUSTOM
+
id
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCondition
(
c39261576
.
atkcon
)
e2
:
SetCondition
(
s
.
atkcon
)
e2
:
SetCost
(
c39261576
.
atkcost
)
e2
:
SetCost
(
s
.
atkcost
)
e2
:
SetTarget
(
c39261576
.
atktg
)
e2
:
SetTarget
(
s
.
atktg
)
e2
:
SetOperation
(
c39261576
.
atkop
)
e2
:
SetOperation
(
s
.
atkop
)
e2
:
SetLabelObject
(
e1
)
e2
:
SetLabelObject
(
e1
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c39261576
.
filter1
(
c
,
e
)
return
c
:
IsOnField
()
and
not
c
:
IsImmuneToEffect
(
e
)
function
s
.
fusfilter
(
c
)
return
c
:
IsSetCard
(
0x1047
)
end
end
function
c39261576
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x1047
)
and
(
not
f
or
f
(
c
))
--- @type FUSION_SPELL_STAGE_X_CALLBACK_FUNCTION
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
function
s
.
stage_x_operation
(
e
,
tc
,
tp
,
stage
)
end
if
stage
==
FusionSpell
.
STAGE_AT_SUMMON_OPERATION_FINISH
then
function
c39261576
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsOnField
,
nil
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c39261576
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c39261576
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c39261576
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c39261576
.
filter1
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c39261576
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c39261576
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
e
:
SetLabelObject
(
tc
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
e
:
SetLabelObject
(
tc
)
end
tc
:
CompleteProcedure
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_CHAIN_END
)
e1
:
SetCode
(
EVENT_CHAIN_END
)
e1
:
SetOperation
(
c39261576
.
evop
)
e1
:
SetOperation
(
s
.
evop
)
e1
:
SetLabelObject
(
e
)
e1
:
SetLabelObject
(
e
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
end
end
function
c39261576
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
re
==
e
:
GetLabelObject
()
return
re
==
e
:
GetLabelObject
()
end
end
function
c39261576
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
s
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemove
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemove
()
end
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
end
function
c39261576
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
s
.
atktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
tc
=
eg
:
GetFirst
()
local
tc
=
eg
:
GetFirst
()
local
mat
=
tc
:
GetMaterial
()
local
mat
=
tc
:
GetMaterial
()
if
chkc
then
return
chkc
:
IsSetCard
(
0x1047
)
and
mat
:
IsContains
(
chkc
)
end
if
chkc
then
return
chkc
:
IsSetCard
(
0x1047
)
and
mat
:
IsContains
(
chkc
)
end
if
chk
==
0
then
return
mat
:
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0x1047
)
end
if
chk
==
0
then
return
mat
:
IsExists
(
Card
.
IsSetCard
,
1
,
nil
,
0x1047
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
39261576
,
1
))
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
aux
.
Stringid
(
id
,
1
))
local
g
=
mat
:
FilterSelect
(
tp
,
Card
.
IsSetCard
,
1
,
1
,
nil
,
0x1047
)
local
g
=
mat
:
FilterSelect
(
tp
,
Card
.
IsSetCard
,
1
,
1
,
nil
,
0x1047
)
tc
:
CreateEffectRelation
(
e
)
tc
:
CreateEffectRelation
(
e
)
Duel
.
SetTargetCard
(
g
)
Duel
.
SetTargetCard
(
g
)
end
end
function
c39261576
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sc
=
eg
:
GetFirst
()
local
sc
=
eg
:
GetFirst
()
if
not
sc
:
IsRelateToEffect
(
e
)
or
sc
:
IsFacedown
()
then
return
end
if
not
sc
:
IsRelateToEffect
(
e
)
or
sc
:
IsFacedown
()
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
...
@@ -118,10 +71,11 @@ function c39261576.atkop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -118,10 +71,11 @@ function c39261576.atkop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
sc
:
RegisterEffect
(
e1
)
sc
:
RegisterEffect
(
e1
)
end
end
function
c39261576
.
evop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
evop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
te
=
e
:
GetLabelObject
()
local
te
=
e
:
GetLabelObject
()
local
tc
=
te
:
GetLabelObject
()
local
tc
=
te
:
GetLabelObject
()
Duel
.
RaiseEvent
(
tc
,
EVENT_CUSTOM
+
39261576
,
te
,
0
,
tp
,
tp
,
0
)
Duel
.
RaiseEvent
(
tc
,
EVENT_CUSTOM
+
id
,
te
,
0
,
tp
,
tp
,
0
)
te
:
SetLabelObject
(
nil
)
te
:
SetLabelObject
(
nil
)
e
:
Reset
()
e
:
Reset
()
end
end
c40597694.lua
View file @
dd3882cc
--スキャッター・フュージョン
--スキャッター・フュージョン
function
c40597694
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--activate
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--fusion
--fusion
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
FusionSpell
.
CreateSummonEffect
(
c
,{
fusfilter
=
s
.
fusfilter
,
pre_select_mat_location
=
LOCATION_DECK
,
stage_x_operation
=
s
.
stage_x_operation
})
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
+
CATEGORY_DECKDES
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
+
CATEGORY_DECKDES
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCountLimit
(
1
,
40597694
)
e2
:
SetCountLimit
(
1
,
id
)
e2
:
SetCondition
(
c40597694
.
condition
)
e2
:
SetCondition
(
s
.
condition
)
e2
:
SetTarget
(
c40597694
.
target
)
e2
:
SetOperation
(
c40597694
.
operation
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--destroy
--destroy
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD
)
e3
:
SetCode
(
EVENT_LEAVE_FIELD
)
e3
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e3
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e3
:
SetOperation
(
c40597694
.
desop
)
e3
:
SetOperation
(
s
.
desop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c40597694
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
>
0
return
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
>
0
end
end
function
c40597694
.
filter0
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToGrave
()
function
s
.
fusfilter
(
c
)
return
c
:
IsSetCard
(
0x1047
)
and
not
c
:
IsRace
(
RACE_ROCK
)
end
end
function
c40597694
.
filter1
(
c
,
e
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToGrave
()
and
not
c
:
IsImmuneToEffect
(
e
)
--- @type FUSION_SPELL_STAGE_X_CALLBACK_FUNCTION
end
function
s
.
stage_x_operation
(
e
,
tc
,
tp
,
stage
)
function
c40597694
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
if
stage
==
FusionSpell
.
STAGE_AT_SUMMON_OPERATION_FINISH
then
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x1047
)
and
not
c
:
IsRace
(
RACE_ROCK
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c40597694
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetMatchingGroup
(
c40597694
.
filter0
,
tp
,
LOCATION_DECK
,
0
,
nil
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c40597694
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c40597694
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c40597694
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetMatchingGroup
(
c40597694
.
filter1
,
tp
,
LOCATION_DECK
,
0
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c40597694
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c40597694
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
e
:
GetHandler
():
SetCardTarget
(
tc
)
e
:
GetHandler
():
SetCardTarget
(
tc
)
elseif
stage
==
FusionSpell
.
STAGE_AT_ALL_OPERATION_FINISH
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
s
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c40597694
.
splimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
c40597694
.
splimit
(
e
,
c
)
function
s
.
splimit
(
e
,
c
)
return
not
c
:
IsSetCard
(
0x1047
)
and
c
:
IsLocation
(
LOCATION_EXTRA
)
return
not
c
:
IsSetCard
(
0x1047
)
and
c
:
IsLocation
(
LOCATION_EXTRA
)
end
end
function
c40597694
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetHandler
():
GetFirstCardTarget
()
local
tc
=
e
:
GetHandler
():
GetFirstCardTarget
()
if
tc
and
tc
:
IsLocation
(
LOCATION_MZONE
)
then
if
tc
and
tc
:
IsLocation
(
LOCATION_MZONE
)
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
...
...
c55824220.lua
View file @
dd3882cc
--輝石融合
--輝石融合
function
c55824220
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
FusionSpell
.
RegisterSummonEffect
(
c
,{
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
fusfilter
=
s
.
fusfilter
,
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
})
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c55824220
.
target
)
e1
:
SetOperation
(
c55824220
.
activate
)
c
:
RegisterEffect
(
e1
)
end
end
function
c55824220
.
filter1
(
c
,
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
function
s
.
fusfilter
(
c
)
end
return
c
:
IsSetCard
(
0x1047
)
function
c55824220
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x1047
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c55824220
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c55824220
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c55824220
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
return
res
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c55824220
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c55824220
.
filter1
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c55824220
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c55824220
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
SendtoGrave
(
mat1
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
end
c71422989.lua
View file @
dd3882cc
--吸光融合
--吸光融合
function
c71422989
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
-- fusion
local
e0
=
FusionSpell
.
CreateSummonEffect
(
c
,{
fusfilter
=
s
.
fusfilter
,
matfilter
=
aux
.
NecroValleyFilter
()
})
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
71422989
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCountLimit
(
1
,
id
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCost
(
c71422989
.
cost
)
e1
:
SetCost
(
s
.
cost
)
e1
:
SetTarget
(
c71422989
.
target
)
e1
:
SetTarget
(
s
.
target
)
e1
:
SetOperation
(
c71422989
.
activate
)
e1
:
SetOperation
(
s
.
activate
)
e1
:
SetLabelObject
(
e0
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
Duel
.
AddCustomActivityCounter
(
71422989
,
ACTIVITY_SPSUMMON
,
c71422989
.
counterfilter
)
Duel
.
AddCustomActivityCounter
(
id
,
ACTIVITY_SPSUMMON
,
s
.
counterfilter
)
end
end
function
c71422989
.
counterfilter
(
c
)
function
s
.
counterfilter
(
c
)
return
c
:
IsSetCard
(
0x1047
)
return
c
:
IsSetCard
(
0x1047
)
end
end
function
c71422989
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
71422989
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
function
s
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetCustomActivityCount
(
id
,
tp
,
ACTIVITY_SPSUMMON
)
==
0
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_OATH
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c71422989
.
splimit
)
e1
:
SetTarget
(
s
.
splimit
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
c71422989
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
function
s
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
not
c
:
IsSetCard
(
0x1047
)
return
not
c
:
IsSetCard
(
0x1047
)
end
end
function
c71422989
.
filter
(
c
)
function
s
.
filter
(
c
)
return
c
:
IsSetCard
(
0x1047
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x1047
)
and
c
:
IsAbleToHand
()
end
end
function
c71422989
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c71422989
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
s
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c71422989
.
filter1
(
c
,
e
)
return
c
:
IsAbleToRemove
()
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
s
.
fusfilter
(
c
)
function
c71422989
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsSetCard
(
0x1047
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x1047
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
end
function
c71422989
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c71422989
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
s
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
local
chkf
=
tp
local
fusion_effect
=
e
:
GetLabelObject
()
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c71422989
.
filter1
,
nil
,
e
)
if
fusion_effect
:
GetTarget
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
false
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
id
,
0
))
then
local
sg1
=
Duel
.
GetMatchingGroup
(
c71422989
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c71422989
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
(
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
))
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
71422989
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
local
sg
=
sg1
:
Clone
()
fusion_effect
:
GetOperation
()(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
Remove
(
mat1
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
end
end
end
end
end
end
c72029628.lua
View file @
dd3882cc
--廃石融合
--廃石融合
function
c72029628
.
initial_effect
(
c
)
local
s
,
id
,
o
=
GetID
()
function
s
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
FusionSpell
.
CreateSummonEffect
(
c
,{
fusfilter
=
s
.
fusfilter
,
pre_select_mat_location
=
LOCATION_GRAVE
,
mat_operation_code_map
=
{
[
LOCATION_REMOVED
]
=
FusionSpell
.
FUSION_OPERATION_GRAVE
,
[
0xff
]
=
FusionSpell
.
FUSION_OPERATION_BANISH
},
extra_target
=
s
.
extra_target
,
stage_x_operation
=
s
.
stage_x_operation
})
e1
:
SetCategory
(
CATEGORY_REMOVE
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetCategory
(
CATEGORY_REMOVE
+
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c72029628
.
target
)
e1
:
SetOperation
(
c72029628
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c72029628
.
filter0
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
function
s
.
fusfilter
(
c
)
return
c
:
IsSetCard
(
0x1047
)
end
end
function
c72029628
.
filter1
(
c
,
e
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsCanBeFusionMaterial
()
and
c
:
IsAbleToRemove
()
and
not
c
:
IsImmuneToEffect
(
e
)
function
s
.
extra_target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
function
c72029628
.
filter2
(
c
,
e
,
tp
,
m
,
f
,
chkf
)
return
c
:
IsType
(
TYPE_FUSION
)
and
c
:
IsSetCard
(
0x1047
)
and
(
not
f
or
f
(
c
))
and
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_FUSION
,
tp
,
false
,
false
)
and
c
:
CheckFusionMaterial
(
m
,
nil
,
chkf
)
end
function
c72029628
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
chk
==
0
then
local
chkf
=
tp
return
true
local
mg1
=
Duel
.
GetMatchingGroup
(
c72029628
.
filter0
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c72029628
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
not
res
then
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
local
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c72029628
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
end
return
res
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
end
function
c72029628
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
--- @type FUSION_SPELL_STAGE_X_CALLBACK_FUNCTION
local
mg1
=
Duel
.
GetMatchingGroup
(
c72029628
.
filter1
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
e
)
function
s
.
stage_x_operation
(
e
,
tc
,
tp
,
stage
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c72029628
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg1
,
nil
,
chkf
)
if
stage
==
FusionSpell
.
STAGE_AT_SUMMON_OPERATION_FINISH
then
local
mg2
=
nil
local
sg2
=
nil
local
ce
=
Duel
.
GetChainMaterial
(
tp
)
if
ce
~=
nil
then
local
fgroup
=
ce
:
GetTarget
()
mg2
=
fgroup
(
ce
,
e
,
tp
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c72029628
.
filter2
,
tp
,
LOCATION_EXTRA
,
0
,
nil
,
e
,
tp
,
mg2
,
mf
,
chkf
)
end
if
sg1
:
GetCount
()
>
0
or
(
sg2
~=
nil
and
sg2
:
GetCount
()
>
0
)
then
local
sg
=
sg1
:
Clone
()
if
sg2
then
sg
:
Merge
(
sg2
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
sg
:
Select
(
tp
,
1
,
1
,
nil
)
local
tc
=
tg
:
GetFirst
()
if
sg1
:
IsContains
(
tc
)
and
(
sg2
==
nil
or
not
sg2
:
IsContains
(
tc
)
or
not
Duel
.
SelectYesNo
(
tp
,
ce
:
GetDescription
()))
then
local
mat1
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg1
,
nil
,
chkf
)
tc
:
SetMaterial
(
mat1
)
Duel
.
Remove
(
mat1
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_MATERIAL
+
REASON_FUSION
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
tc
,
SUMMON_TYPE_FUSION
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
else
local
mat2
=
Duel
.
SelectFusionMaterial
(
tp
,
tc
,
mg2
,
nil
,
chkf
)
local
fop
=
ce
:
GetOperation
()
fop
(
ce
,
e
,
tp
,
tc
,
mat2
)
end
tc
:
CompleteProcedure
()
local
fid
=
e
:
GetHandler
():
GetFieldID
()
local
fid
=
e
:
GetHandler
():
GetFieldID
()
tc
:
RegisterFlagEffect
(
72029628
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
fid
)
tc
:
RegisterFlagEffect
(
id
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
fid
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e1
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
...
@@ -78,18 +39,20 @@ function c72029628.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -78,18 +39,20 @@ function c72029628.activate(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetLabel
(
fid
)
e1
:
SetLabel
(
fid
)
e1
:
SetLabelObject
(
tc
)
e1
:
SetLabelObject
(
tc
)
e1
:
SetCondition
(
c72029628
.
descon
)
e1
:
SetCondition
(
s
.
descon
)
e1
:
SetOperation
(
c72029628
.
desop
)
e1
:
SetOperation
(
s
.
desop
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
end
end
function
c72029628
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
e
:
GetLabelObject
()
local
tc
=
e
:
GetLabelObject
()
if
tc
:
GetFlagEffectLabel
(
72029628
)
~=
e
:
GetLabel
()
then
if
tc
:
GetFlagEffectLabel
(
id
)
~=
e
:
GetLabel
()
then
e
:
Reset
()
e
:
Reset
()
return
false
return
false
else
return
true
end
else
return
true
end
end
end
function
c72029628
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
s
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Destroy
(
e
:
GetLabelObject
(),
REASON_EFFECT
)
Duel
.
Destroy
(
e
:
GetLabelObject
(),
REASON_EFFECT
)
end
end
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