Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-222DIY-cards
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
0
Merge Requests
0
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
xiaoye
ygopro-222DIY-cards
Commits
7246385a
Commit
7246385a
authored
Jun 22, 2019
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:purerosefallen/ygopro-222DIY-cards
parents
2821437d
2d6d9217
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1089 additions
and
1088 deletions
+1089
-1088
expansions/lflist.conf
expansions/lflist.conf
+10
-1
expansions/script/c12011017.lua
expansions/script/c12011017.lua
+164
-163
expansions/script/c47530012.lua
expansions/script/c47530012.lua
+77
-80
expansions/script/c47530026.lua
expansions/script/c47530026.lua
+187
-187
expansions/script/c47530027.lua
expansions/script/c47530027.lua
+189
-195
expansions/script/c65050026.lua
expansions/script/c65050026.lua
+91
-91
expansions/script/c65050027.lua
expansions/script/c65050027.lua
+52
-52
expansions/script/c65050028.lua
expansions/script/c65050028.lua
+61
-61
expansions/script/c65050029.lua
expansions/script/c65050029.lua
+85
-85
expansions/script/c65050030.lua
expansions/script/c65050030.lua
+81
-81
expansions/script/c65050031.lua
expansions/script/c65050031.lua
+88
-88
expansions/script/c75646502.lua
expansions/script/c75646502.lua
+1
-1
update/filelist.txt
update/filelist.txt
+2
-2
update/version.txt
update/version.txt
+1
-1
No files found.
expansions/lflist.conf
View file @
7246385a
...
...
@@ -92,6 +92,13 @@
09980276
1
--不死姬·吸血姬
09980312
2
--是非曲直厅之主
09980518
1
--石头巨像·加里奥
09980251
0
--异界女神动员
09980266
0
--不死姬·羽衣之狐
09980431
0
--
Agit
Ω·骑士踢
09980439
0
--降临卡片·最终降临
09980440
0
--降临卡片·防御降临
09980444
0
--降临卡片·抢夺降临
#101
10102004
1
--圣谕舞姬 珍妮丝
...
...
@@ -206,7 +213,7 @@
14801375
0
--光之国
14801377
0
--奥特竞技场
14801389
0
--奥特战士 父子的牵绊
17082102
0
--路西法
#150
#154
...
...
@@ -238,6 +245,7 @@
17050908
1
--戈耳工的试炼
17050901
0
--斯忒诺
#180
18004008
0
--性感手枪拔枪术
18005010
0
--封锁的拟魂
...
...
@@ -589,6 +597,7 @@
77702001
0
--初音未来的暴走
#77702007 1 --楽園図
#77709006 1 --Figure
77765910
0
--难题 龙颈之玉 五色的弹丸
#800
#810
...
...
expansions/script/c12011017.lua
View file @
7246385a
--黑姬的养成所
function
c12011017
.
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
(
c12011017
.
target
)
e1
:
SetOperation
(
c12011017
.
activate
)
c
:
RegisterEffect
(
e1
)
--fusion summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
12011017
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCost
(
aux
.
bfgcost
)
e3
:
SetTarget
(
c12011017
.
sptg
)
e3
:
SetOperation
(
c12011017
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c12011017
.
filter1
(
c
,
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
and
c
:
IsSetCard
(
0x3fbe
)
end
function
c12011017
.
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
c12011017
.
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
(
c12011017
.
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
(
c12011017
.
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
c12011017
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c12011017
.
filter1
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c12011017
.
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
(
c12011017
.
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
()
Duel
.
BreakEffect
()
local
cs
=
mat1
:
GetCount
()
local
sg
=
Duel
.
GetMatchingGroup
(
c12011017
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
(
not
tc
:
IsType
(
TYPE_EFFECT
)
)
and
sg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
12011017
,
3
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
sg
=
sg
:
Select
(
tp
,
cs
,
cs
,
nil
)
Duel
.
BreakEffect
()
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
Duel
.
ShuffleDeck
(
tp
)
end
end
end
function
c12011017
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x3fbe
)
and
c
:
IsAbleToHand
()
end
function
c12011017
.
spfilter1
(
c
,
e
)
return
c
:
IsSetCard
(
0x3fbe
)
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c12011017
.
spfilter2
(
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
c12011017
.
spfilter3
(
c
)
return
c
:
IsCanBeFusionMaterial
()
and
c
:
IsSetCard
(
0x10f3
)
end
function
c12011017
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsSetCard
,
nil
,
0x3fbe
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c12011017
.
spfilter2
,
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
(
c12011017
.
spfilter3
,
nil
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c12011017
.
spfilter2
,
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
c12011017
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c12011017
.
spfilter1
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c12011017
.
spfilter2
,
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
(
c12011017
.
spfilter3
,
nil
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c12011017
.
spfilter2
,
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
()
local
sg
=
Duel
.
GetMatchingGroup
(
c12011017
.
thfilter1
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
if
(
not
tc
:
IsType
(
TYPE_EFFECT
)
)
and
sg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
12011017
,
4
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
sg
=
sg
:
Select
(
tp
,
1
,
2
,
nil
)
Duel
.
BreakEffect
()
Duel
.
SendtoGrave
(
sg
,
nil
,
REASON_EFFECT
)
end
end
end
function
c12011017
.
thfilter1
(
c
)
return
c
:
IsSetCard
(
0x3fbe
)
and
c
:
IsAbleToGrave
()
and
c
:
IsFaceup
()
--黑姬的养成所
function
c12011017
.
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
(
c12011017
.
target
)
e1
:
SetOperation
(
c12011017
.
activate
)
c
:
RegisterEffect
(
e1
)
--fusion summon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
12011017
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_FUSION_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCost
(
aux
.
bfgcost
)
e3
:
SetTarget
(
c12011017
.
sptg
)
e3
:
SetOperation
(
c12011017
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c12011017
.
filter1
(
c
,
e
)
return
not
c
:
IsImmuneToEffect
(
e
)
and
c
:
IsSetCard
(
0x3fbe
)
end
function
c12011017
.
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
c12011017
.
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
(
c12011017
.
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
(
c12011017
.
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
c12011017
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c12011017
.
filter1
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c12011017
.
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
(
c12011017
.
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
)
e
:
SetLabel
(
mat1
:
GetCount
())
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
()
Duel
.
BreakEffect
()
local
cs
=
e
:
GetLabel
()
local
sg
=
Duel
.
GetMatchingGroup
(
c12011017
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
(
not
tc
:
IsType
(
TYPE_EFFECT
)
)
and
sg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
12011017
,
3
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
sg
=
sg
:
Select
(
tp
,
cs
,
cs
,
nil
)
Duel
.
BreakEffect
()
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
Duel
.
ShuffleDeck
(
tp
)
end
end
end
function
c12011017
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x3fbe
)
and
c
:
IsAbleToHand
()
end
function
c12011017
.
spfilter1
(
c
,
e
)
return
c
:
IsSetCard
(
0x3fbe
)
and
not
c
:
IsImmuneToEffect
(
e
)
end
function
c12011017
.
spfilter2
(
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
c12011017
.
spfilter3
(
c
)
return
c
:
IsCanBeFusionMaterial
()
and
c
:
IsSetCard
(
0x10f3
)
end
function
c12011017
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
Card
.
IsSetCard
,
nil
,
0x3fbe
)
local
res
=
Duel
.
IsExistingMatchingCard
(
c12011017
.
spfilter2
,
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
(
c12011017
.
spfilter3
,
nil
)
local
mf
=
ce
:
GetValue
()
res
=
Duel
.
IsExistingMatchingCard
(
c12011017
.
spfilter2
,
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
c12011017
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
chkf
=
tp
local
mg1
=
Duel
.
GetFusionMaterial
(
tp
):
Filter
(
c12011017
.
spfilter1
,
nil
,
e
)
local
sg1
=
Duel
.
GetMatchingGroup
(
c12011017
.
spfilter2
,
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
(
c12011017
.
spfilter3
,
nil
)
local
mf
=
ce
:
GetValue
()
sg2
=
Duel
.
GetMatchingGroup
(
c12011017
.
spfilter2
,
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
()
local
sg
=
Duel
.
GetMatchingGroup
(
c12011017
.
thfilter1
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
if
(
not
tc
:
IsType
(
TYPE_EFFECT
)
)
and
sg
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
12011017
,
4
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
sg
=
sg
:
Select
(
tp
,
1
,
2
,
nil
)
Duel
.
BreakEffect
()
Duel
.
SendtoGrave
(
sg
,
nil
,
REASON_EFFECT
)
end
end
end
function
c12011017
.
thfilter1
(
c
)
return
c
:
IsSetCard
(
0x3fbe
)
and
c
:
IsAbleToGrave
()
and
c
:
IsFaceup
()
end
\ No newline at end of file
expansions/script/c47530012.lua
View file @
7246385a
--盖马克
local
m
=
47530012
local
cm
=
_G
[
"c"
..
m
]
function
c47530012
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsRace
,
RACE_MACHINE
),
3
,
5
)
c
:
EnableReviveLimit
()
--todeck
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
47530012
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOGRAVE
+
CATEGORY_TOKEN
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
c47530012
.
cost
)
e1
:
SetTarget
(
c47530012
.
tktg
)
e1
:
SetOperation
(
c47530012
.
tkop
)
c
:
RegisterEffect
(
e1
)
--full fire
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
c47530012
.
destg
)
e2
:
SetOperation
(
c47530012
.
desop
)
c
:
RegisterEffect
(
e2
)
end
function
c47530012
.
cfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeckAsCost
()
and
c
:
IsRace
(
RACE_MACHINE
)
end
function
c47530012
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c47530012
.
cfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c47530012
.
cfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
if
g
:
GetFirst
():
IsLocation
(
LOCATION_REMOVED
)
and
g
:
GetFirst
():
IsFacedown
()
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
function
c47530012
.
tktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
47531012
,
0
,
0x4011
,
0
,
0
,
1
,
RACE_CYBERSE
,
ATTRIBUTE_LIGHT
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c47530012
.
tkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
47531012
,
0
,
0x4011
,
2000
,
2000
,
1
,
RACE_MACHINE
,
ATTRIBUTE_LIGHT
)
then
local
token
=
Duel
.
CreateToken
(
tp
,
47531012
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_ATTACK_ALL
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
token
:
RegisterEffect
(
e1
,
true
)
if
Duel
.
SpecialSummonComplete
()
then
local
cg
=
token
:
GetColumnGroup
():
Filter
(
Card
.
IsControler
,
nil
,
1
-
tp
)
if
cg
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
cg
)
Duel
.
SendtoGrave
(
cg
,
REASON_RULE
)
end
end
end
end
function
c47530012
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
4
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
4
,
4
,
c
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
4
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
4
,
0
,
0
)
end
function
c47530012
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
,
LOCATION_REMOVED
)
--盖马克
local
m
=
47530012
local
cm
=
_G
[
"c"
..
m
]
function
c47530012
.
initial_effect
(
c
)
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsRace
,
RACE_MACHINE
),
3
,
5
)
c
:
EnableReviveLimit
()
--todeck
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
47530012
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
c47530012
.
tkcost
)
e1
:
SetTarget
(
c47530012
.
tktg
)
e1
:
SetOperation
(
c47530012
.
tkop
)
c
:
RegisterEffect
(
e1
)
--full fire
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
c47530012
.
destg
)
e2
:
SetOperation
(
c47530012
.
desop
)
c
:
RegisterEffect
(
e2
)
end
function
c47530012
.
cfilter
(
c
)
return
c
:
IsAbleToDeckAsCost
()
and
c
:
IsRace
(
RACE_MACHINE
)
end
function
c47530012
.
tkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c47530012
.
cfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c47530012
.
cfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
function
c47530012
.
tktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
47531012
,
0
,
0x4011
,
0
,
0
,
1
,
RACE_MACHINE
,
ATTRIBUTE_LIGHT
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c47530012
.
tkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
47531012
,
0
,
0x4011
,
2000
,
2000
,
1
,
RACE_MACHINE
,
ATTRIBUTE_LIGHT
)
then
local
token
=
Duel
.
CreateToken
(
tp
,
47531012
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_ATTACK_ALL
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
token
:
RegisterEffect
(
e1
,
true
)
if
Duel
.
SpecialSummonComplete
()
then
local
cg
=
token
:
GetColumnGroup
():
Filter
(
Card
.
IsControler
,
nil
,
1
-
tp
)
if
cg
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
cg
)
Duel
.
SendtoGrave
(
cg
,
REASON_RULE
)
end
end
end
end
function
c47530012
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
4
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
4
,
4
,
c
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
4
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
4
,
0
,
0
)
end
function
c47530012
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
Duel
.
Destroy
(
g
,
REASON_EFFECT
,
LOCATION_REMOVED
)
end
\ No newline at end of file
expansions/script/c47530026.lua
View file @
7246385a
--吉姆强袭型改
function
c47530026
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c47530026
.
psplimit
)
c
:
RegisterEffect
(
e1
)
--summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
47530026
,
1
))
e2
:
SetCategory
(
CATEGORY_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCountLimit
(
1
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e2
:
SetTarget
(
c47530026
.
sumtg
)
e2
:
SetOperation
(
c47530026
.
sumop
)
c
:
RegisterEffect
(
e2
)
--spsummon proc
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
47530026
,
0
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetCode
(
EFFECT_SUMMON_PROC
)
e3
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
e3
:
SetCondition
(
c47530026
.
otcon
)
e3
:
SetOperation
(
c47530026
.
otop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EFFECT_SET_PROC
)
c
:
RegisterEffect
(
e4
)
--tribute check
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e5
:
SetValue
(
c47530026
.
valcheck
)
c
:
RegisterEffect
(
e5
)
--buff
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e6
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCondition
(
c47530026
.
advcon
)
e6
:
SetValue
(
1
)
c
:
RegisterEffect
(
e6
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
)
e7
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e7
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e7
:
SetRange
(
LOCATION_MZONE
)
e7
:
SetCondition
(
c47530026
.
advcon
)
e7
:
SetValue
(
c47530026
.
efilter
)
c
:
RegisterEffect
(
e7
)
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
)
e8
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e8
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e8
:
SetRange
(
LOCATION_MZONE
)
e8
:
SetCondition
(
c47530026
.
advcon
)
e8
:
SetValue
(
1
)
c
:
RegisterEffect
(
e8
)
--actlimit
local
e9
=
Effect
.
CreateEffect
(
c
)
e9
:
SetType
(
EFFECT_TYPE_FIELD
)
e9
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e9
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e9
:
SetRange
(
LOCATION_MZONE
)
e9
:
SetTargetRange
(
0
,
1
)
e9
:
SetValue
(
c47530026
.
aclimit
)
e9
:
SetCondition
(
c47530026
.
actcon
)
c
:
RegisterEffect
(
e9
)
--remove
local
e10
=
Effect
.
CreateEffect
(
c
)
e10
:
SetDescription
(
aux
.
Stringid
(
47530026
,
0
))
e10
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e10
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e10
:
SetCondition
(
c47530026
.
rmcon
)
e10
:
SetOperation
(
c47530026
.
rmop
)
c
:
RegisterEffect
(
e10
)
end
function
c47530026
.
IsEFSF
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
is_named_with_EFSF
end
function
c47530026
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
e
:
SetLabelObject
(
bc
)
return
c
==
Duel
.
GetAttacker
()
and
bc
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
and
bc
:
IsOnField
()
and
bc
:
IsRelateToBattle
()
end
function
c47530026
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
e
:
GetLabelObject
()
local
atk1
=
bc
:
GetAttack
()
local
atk2
=
c
:
GetAttack
()
local
atk
=
atk1
+
atk2
if
bc
:
IsRelateToBattle
()
then
local
lp
=
Duel
.
GetLP
(
1
-
tp
)
Duel
.
SetLP
(
1
-
tp
,
lp
-
atk
)
end
end
function
c47530026
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
function
c47530026
.
actcon
(
e
)
return
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
or
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
()
and
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
function
c47530026
.
efilter
(
e
,
te
)
return
te
:
IsActiveType
(
TYPE_MONSTER
)
and
te
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
end
function
c47530026
.
advcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
function
c47530026
.
psplimit
(
e
,
c
)
return
not
c
:
IsRace
(
RACE_MACHINE
)
end
function
c47530026
.
setfilter
(
c
)
return
c47530026
.
IsEFSF
(
c
)
and
c
:
IsType
(
TYPE_TRAP
)
and
c
:
IsType
(
TYPE_COUNTER
)
end
function
c47530026
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsSummonable
(
true
,
nil
,
1
)
or
c
:
IsMSetable
(
true
,
nil
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
c
,
1
,
0
,
0
)
end
function
c47530026
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
Summon
(
tp
,
c
,
true
,
nil
,
1
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c47530026
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
false
)
if
g
:
GetCount
()
>
0
then
Duel
.
SSet
(
tp
,
g
:
GetFirst
())
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
function
c47530026
.
otfilter
(
c
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
and
c
:
IsRace
(
RACE_MACHINE
)
end
function
c47530026
.
otcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
local
mg
=
Duel
.
GetMatchingGroup
(
c47530026
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
return
c
:
IsLevelAbove
(
7
)
and
minc
<=
1
and
Duel
.
CheckTribute
(
c
,
1
,
1
,
mg
)
end
function
c47530026
.
otop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
c47530026
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
sg
=
Duel
.
SelectTribute
(
tp
,
c
,
1
,
1
,
mg
)
c
:
SetMaterial
(
sg
)
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
end
function
c47530026
.
valcheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
local
tc
=
g
:
GetFirst
()
local
atk
=
0
local
def
=
0
while
tc
do
local
catk
=
tc
:
GetTextAttack
()
local
cdef
=
tc
:
GetTextDefense
()
atk
=
atk
+
(
catk
>=
0
and
catk
or
0
)
def
=
def
+
(
cdef
>=
0
and
cdef
or
0
)
tc
=
g
:
GetNext
()
end
if
e
:
GetLabel
()
==
1
then
e
:
SetLabel
(
0
)
--atk continuous effect
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
0xff0000
)
c
:
RegisterEffect
(
e1
)
--def continuous effect
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2
:
SetValue
(
def
)
c
:
RegisterEffect
(
e2
)
end
--吉姆强袭型改
function
c47530026
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c47530026
.
psplimit
)
c
:
RegisterEffect
(
e1
)
--summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
47530026
,
1
))
e2
:
SetCategory
(
CATEGORY_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCountLimit
(
1
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e2
:
SetTarget
(
c47530026
.
sumtg
)
e2
:
SetOperation
(
c47530026
.
sumop
)
c
:
RegisterEffect
(
e2
)
--spsummon proc
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
47530026
,
0
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetCode
(
EFFECT_SUMMON_PROC
)
e3
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
e3
:
SetCondition
(
c47530026
.
otcon
)
e3
:
SetOperation
(
c47530026
.
otop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EFFECT_SET_PROC
)
c
:
RegisterEffect
(
e4
)
--tribute check
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e5
:
SetValue
(
c47530026
.
valcheck
)
c
:
RegisterEffect
(
e5
)
--buff
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e6
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCondition
(
c47530026
.
advcon
)
e6
:
SetValue
(
1
)
c
:
RegisterEffect
(
e6
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
)
e7
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e7
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e7
:
SetRange
(
LOCATION_MZONE
)
e7
:
SetCondition
(
c47530026
.
advcon
)
e7
:
SetValue
(
c47530026
.
efilter
)
c
:
RegisterEffect
(
e7
)
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
)
e8
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e8
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e8
:
SetRange
(
LOCATION_MZONE
)
e8
:
SetCondition
(
c47530026
.
advcon
)
e8
:
SetValue
(
1
)
c
:
RegisterEffect
(
e8
)
--actlimit
local
e9
=
Effect
.
CreateEffect
(
c
)
e9
:
SetType
(
EFFECT_TYPE_FIELD
)
e9
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e9
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e9
:
SetRange
(
LOCATION_MZONE
)
e9
:
SetTargetRange
(
0
,
1
)
e9
:
SetValue
(
c47530026
.
aclimit
)
e9
:
SetCondition
(
c47530026
.
actcon
)
c
:
RegisterEffect
(
e9
)
--remove
local
e10
=
Effect
.
CreateEffect
(
c
)
e10
:
SetDescription
(
aux
.
Stringid
(
47530026
,
0
))
e10
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e10
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e10
:
SetCondition
(
c47530026
.
rmcon
)
e10
:
SetOperation
(
c47530026
.
rmop
)
c
:
RegisterEffect
(
e10
)
end
function
c47530026
.
IsEFSF
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
is_named_with_EFSF
end
function
c47530026
.
rmcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
e
:
SetLabelObject
(
bc
)
return
c
==
Duel
.
GetAttacker
()
and
bc
and
c
:
IsStatus
(
STATUS_OPPO_BATTLE
)
and
bc
:
IsOnField
()
and
bc
:
IsRelateToBattle
()
end
function
c47530026
.
rmop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
e
:
GetLabelObject
()
local
atk1
=
bc
:
GetAttack
()
local
atk2
=
c
:
GetAttack
()
local
atk
=
atk1
+
atk2
if
bc
:
IsRelateToBattle
()
then
local
lp
=
Duel
.
GetLP
(
1
-
tp
)
Duel
.
SetLP
(
1
-
tp
,
lp
-
atk
)
end
end
function
c47530026
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
function
c47530026
.
actcon
(
e
)
return
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
or
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
()
and
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
function
c47530026
.
efilter
(
e
,
te
)
return
te
:
IsActiveType
(
TYPE_MONSTER
)
and
te
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
end
function
c47530026
.
advcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
function
c47530026
.
psplimit
(
e
,
c
)
return
not
c
:
IsRace
(
RACE_MACHINE
)
end
function
c47530026
.
setfilter
(
c
)
return
c47530026
.
IsEFSF
(
c
)
and
c
:
IsType
(
TYPE_TRAP
)
and
c
:
IsType
(
TYPE_COUNTER
)
end
function
c47530026
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsSummonable
(
true
,
nil
,
1
)
and
Duel
.
IsExistingMatchingCard
(
c47530026
.
setfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
c
,
1
,
0
,
0
)
end
function
c47530026
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
Summon
(
tp
,
c
,
true
,
nil
,
1
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c47530026
.
setfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
false
)
if
g
:
GetCount
()
>
0
then
Duel
.
SSet
(
tp
,
g
:
GetFirst
())
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
function
c47530026
.
otfilter
(
c
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
and
c
:
IsRace
(
RACE_MACHINE
)
end
function
c47530026
.
otcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
local
mg
=
Duel
.
GetMatchingGroup
(
c47530026
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
return
c
:
IsLevelAbove
(
7
)
and
minc
<=
1
and
Duel
.
CheckTribute
(
c
,
1
,
1
,
mg
)
end
function
c47530026
.
otop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
c47530026
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
sg
=
Duel
.
SelectTribute
(
tp
,
c
,
1
,
1
,
mg
)
c
:
SetMaterial
(
sg
)
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
end
function
c47530026
.
valcheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
local
tc
=
g
:
GetFirst
()
local
atk
=
0
local
def
=
0
while
tc
do
local
catk
=
tc
:
GetTextAttack
()
local
cdef
=
tc
:
GetTextDefense
()
atk
=
atk
+
(
catk
>=
0
and
catk
or
0
)
def
=
def
+
(
cdef
>=
0
and
cdef
or
0
)
tc
=
g
:
GetNext
()
end
if
e
:
GetLabel
()
==
1
then
e
:
SetLabel
(
0
)
--atk continuous effect
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
0xff0000
)
c
:
RegisterEffect
(
e1
)
--def continuous effect
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2
:
SetValue
(
def
)
c
:
RegisterEffect
(
e2
)
end
end
\ No newline at end of file
expansions/script/c47530027.lua
View file @
7246385a
function
c47530027
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c47530027
.
psplimit
)
c
:
RegisterEffect
(
e1
)
--summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
47530027
,
1
))
e2
:
SetCategory
(
CATEGORY_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e2
:
SetTarget
(
c47530027
.
sumtg
)
e2
:
SetOperation
(
c47530027
.
sumop
)
c
:
RegisterEffect
(
e2
)
--spsummon proc
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
47530027
,
0
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetCode
(
EFFECT_SUMMON_PROC
)
e3
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
e3
:
SetCondition
(
c47530027
.
otcon
)
e3
:
SetOperation
(
c47530027
.
otop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EFFECT_SET_PROC
)
c
:
RegisterEffect
(
e4
)
--tribute check
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e5
:
SetValue
(
c47530027
.
valcheck
)
c
:
RegisterEffect
(
e5
)
--buff
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e6
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCondition
(
c47530027
.
advcon
)
e6
:
SetValue
(
1
)
c
:
RegisterEffect
(
e6
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
)
e7
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e7
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e7
:
SetRange
(
LOCATION_MZONE
)
e7
:
SetCondition
(
c47530027
.
advcon
)
e7
:
SetValue
(
c47530027
.
efilter
)
c
:
RegisterEffect
(
e7
)
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
)
e8
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e8
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e8
:
SetRange
(
LOCATION_MZONE
)
e8
:
SetCondition
(
c47530027
.
advcon
)
e8
:
SetValue
(
1
)
c
:
RegisterEffect
(
e8
)
--actlimit
local
e9
=
Effect
.
CreateEffect
(
c
)
e9
:
SetType
(
EFFECT_TYPE_FIELD
)
e9
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e9
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e9
:
SetRange
(
LOCATION_MZONE
)
e9
:
SetTargetRange
(
0
,
1
)
e9
:
SetValue
(
c47530027
.
aclimit
)
e9
:
SetCondition
(
c47530027
.
actcon
)
c
:
RegisterEffect
(
e9
)
--remove
local
e10
=
Effect
.
CreateEffect
(
c
)
e10
:
SetDescription
(
aux
.
Stringid
(
47530027
,
0
))
e10
:
SetCategory
(
CATEGORY_REMOVE
)
e10
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e10
:
SetCode
(
EVENT_BATTLE_START
)
e10
:
SetCondition
(
c47530027
.
descon
)
e10
:
SetTarget
(
c47530027
.
destg
)
e10
:
SetOperation
(
c47530027
.
desop
)
c
:
RegisterEffect
(
e10
)
end
function
c47530027
.
IsZEON
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
is_named_with_ZEON
end
function
c47530027
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
c
:
IsDualState
()
and
Duel
.
GetAttacker
()
==
c
and
bc
and
bc
:
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
and
bc
:
IsAbleToRemove
()
end
function
c47530027
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
e
:
GetHandler
():
GetBattleTarget
(),
1
,
0
,
0
)
end
function
c47530027
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
bc
=
e
:
GetHandler
():
GetBattleTarget
()
if
bc
:
IsRelateToBattle
()
and
Duel
.
GetControl
(
bc
,
tp
)
==
0
then
local
atk
=
bc
:
GetAttack
()
local
lp
=
Duel
.
GetLP
(
1
-
tp
)
Duel
.
SetLP
(
1
-
tp
,
lp
-
atk
)
end
end
function
c47530027
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
function
c47530027
.
actcon
(
e
)
return
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
or
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
()
and
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
function
c47530027
.
efilter
(
e
,
te
)
return
te
:
IsActiveType
(
TYPE_MONSTER
)
and
te
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
end
function
c47530027
.
advcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
function
c47530027
.
psplimit
(
e
,
c
)
return
not
c
:
IsRace
(
RACE_MACHINE
)
end
function
c47530027
.
setfilter
(
c
)
return
c47530027
.
IsZEON
(
c
)
and
c
:
IsType
(
TYPE_TRAP
)
and
c
:
IsType
(
TYPE_COUNTER
)
end
function
c47530027
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsSummonable
(
true
,
nil
,
1
)
or
c
:
IsMSetable
(
true
,
nil
,
1
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
c
,
1
,
0
,
0
)
end
function
c47530027
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
local
pos
=
0
if
c
:
IsSummonable
(
true
,
nil
,
1
)
then
pos
=
pos
+
POS_FACEUP_ATTACK
end
if
c
:
IsMSetable
(
true
,
nil
,
1
)
then
pos
=
pos
+
POS_FACEDOWN_DEFENSE
end
if
pos
==
0
then
return
end
if
Duel
.
SelectPosition
(
tp
,
c
,
pos
)
==
POS_FACEUP_ATTACK
then
Duel
.
Summon
(
tp
,
c
,
true
,
nil
,
1
)
else
Duel
.
MSet
(
tp
,
c
,
true
,
nil
,
1
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c47530027
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,
false
)
if
g
:
GetCount
()
>
0
then
Duel
.
SSet
(
tp
,
g
:
GetFirst
())
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c47530027
.
otfilter
(
c
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
and
c
:
IsRace
(
RACE_MACHINE
)
end
function
c47530027
.
otcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
local
mg
=
Duel
.
GetMatchingGroup
(
c47530027
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
return
c
:
IsLevelAbove
(
7
)
and
minc
<=
1
and
Duel
.
CheckTribute
(
c
,
1
,
1
,
mg
)
end
function
c47530027
.
otop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
c47530027
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
sg
=
Duel
.
SelectTribute
(
tp
,
c
,
1
,
1
,
mg
)
c
:
SetMaterial
(
sg
)
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
end
function
c47530027
.
valcheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
local
tc
=
g
:
GetFirst
()
local
atk
=
0
local
def
=
0
while
tc
do
local
catk
=
tc
:
GetTextAttack
()
local
cdef
=
tc
:
GetTextDefense
()
atk
=
atk
+
(
catk
>=
0
and
catk
or
0
)
def
=
def
+
(
cdef
>=
0
and
cdef
or
0
)
tc
=
g
:
GetNext
()
end
if
e
:
GetLabel
()
==
1
then
e
:
SetLabel
(
0
)
--atk continuous effect
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
0xff0000
)
c
:
RegisterEffect
(
e1
)
--def continuous effect
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2
:
SetValue
(
def
)
c
:
RegisterEffect
(
e2
)
end
function
c47530027
.
initial_effect
(
c
)
--pendulum summon
aux
.
EnablePendulumAttribute
(
c
)
--splimit
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_PZONE
)
e1
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_CANNOT_NEGATE
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c47530027
.
psplimit
)
c
:
RegisterEffect
(
e1
)
--summon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
47530027
,
1
))
e2
:
SetCategory
(
CATEGORY_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetRange
(
LOCATION_PZONE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCountLimit
(
1
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_MAIN_END
)
e2
:
SetTarget
(
c47530027
.
sumtg
)
e2
:
SetOperation
(
c47530027
.
sumop
)
c
:
RegisterEffect
(
e2
)
--spsummon proc
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
47530027
,
0
))
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e3
:
SetCode
(
EFFECT_SUMMON_PROC
)
e3
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
e3
:
SetCondition
(
c47530027
.
otcon
)
e3
:
SetOperation
(
c47530027
.
otop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
e3
:
Clone
()
e4
:
SetCode
(
EFFECT_SET_PROC
)
c
:
RegisterEffect
(
e4
)
--tribute check
local
e5
=
Effect
.
CreateEffect
(
c
)
e5
:
SetType
(
EFFECT_TYPE_SINGLE
)
e5
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e5
:
SetValue
(
c47530027
.
valcheck
)
c
:
RegisterEffect
(
e5
)
--buff
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e6
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e6
:
SetRange
(
LOCATION_MZONE
)
e6
:
SetCondition
(
c47530027
.
advcon
)
e6
:
SetValue
(
1
)
c
:
RegisterEffect
(
e6
)
local
e7
=
Effect
.
CreateEffect
(
c
)
e7
:
SetType
(
EFFECT_TYPE_SINGLE
)
e7
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e7
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e7
:
SetRange
(
LOCATION_MZONE
)
e7
:
SetCondition
(
c47530027
.
advcon
)
e7
:
SetValue
(
c47530027
.
efilter
)
c
:
RegisterEffect
(
e7
)
local
e8
=
Effect
.
CreateEffect
(
c
)
e8
:
SetType
(
EFFECT_TYPE_SINGLE
)
e8
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e8
:
SetCode
(
EFFECT_EXTRA_ATTACK
)
e8
:
SetRange
(
LOCATION_MZONE
)
e8
:
SetCondition
(
c47530027
.
advcon
)
e8
:
SetValue
(
1
)
c
:
RegisterEffect
(
e8
)
--actlimit
local
e9
=
Effect
.
CreateEffect
(
c
)
e9
:
SetType
(
EFFECT_TYPE_FIELD
)
e9
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e9
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e9
:
SetRange
(
LOCATION_MZONE
)
e9
:
SetTargetRange
(
0
,
1
)
e9
:
SetValue
(
c47530027
.
aclimit
)
e9
:
SetCondition
(
c47530027
.
actcon
)
c
:
RegisterEffect
(
e9
)
--remove
local
e10
=
Effect
.
CreateEffect
(
c
)
e10
:
SetDescription
(
aux
.
Stringid
(
47530027
,
0
))
e10
:
SetCategory
(
CATEGORY_REMOVE
)
e10
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e10
:
SetCode
(
EVENT_BATTLE_START
)
e10
:
SetCondition
(
c47530027
.
descon
)
e10
:
SetTarget
(
c47530027
.
destg
)
e10
:
SetOperation
(
c47530027
.
desop
)
c
:
RegisterEffect
(
e10
)
end
function
c47530027
.
IsZEON
(
c
)
local
m
=
_G
[
"c"
..
c
:
GetCode
()]
return
m
and
m
.
is_named_with_ZEON
end
function
c47530027
.
descon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
return
c
:
IsDualState
()
and
Duel
.
GetAttacker
()
==
c
and
bc
and
bc
:
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
and
bc
:
IsAbleToRemove
()
end
function
c47530027
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
e
:
GetHandler
():
GetBattleTarget
(),
1
,
0
,
0
)
end
function
c47530027
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
bc
=
e
:
GetHandler
():
GetBattleTarget
()
if
bc
:
IsRelateToBattle
()
and
Duel
.
GetControl
(
bc
,
tp
)
==
0
then
local
atk
=
bc
:
GetAttack
()
local
lp
=
Duel
.
GetLP
(
1
-
tp
)
Duel
.
SetLP
(
1
-
tp
,
lp
-
atk
)
end
end
function
c47530027
.
aclimit
(
e
,
re
,
tp
)
return
not
re
:
GetHandler
():
IsImmuneToEffect
(
e
)
end
function
c47530027
.
actcon
(
e
)
return
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
or
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
()
and
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
function
c47530027
.
efilter
(
e
,
te
)
return
te
:
IsActiveType
(
TYPE_MONSTER
)
and
te
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SPECIAL
)
end
function
c47530027
.
advcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
function
c47530027
.
psplimit
(
e
,
c
)
return
not
c
:
IsRace
(
RACE_MACHINE
)
end
function
c47530027
.
setfilter
(
c
)
return
c47530027
.
IsZEON
(
c
)
and
c
:
IsType
(
TYPE_TRAP
)
and
c
:
IsType
(
TYPE_COUNTER
)
and
c
:
IsSSetable
()
end
function
c47530027
.
sumtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsSummonable
(
true
,
nil
,
1
)
and
Duel
.
IsExistingMatchingCard
(
c47530027
.
setfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
c
,
1
,
0
,
0
)
end
function
c47530027
.
sumop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
Duel
.
Summon
(
tp
,
c
,
true
,
nil
,
1
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c47530027
.
setfilter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
false
)
if
g
:
GetCount
()
>
0
then
Duel
.
SSet
(
tp
,
g
:
GetFirst
())
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
function
c47530027
.
otfilter
(
c
)
return
c
:
GetSummonLocation
()
==
LOCATION_EXTRA
and
c
:
IsRace
(
RACE_MACHINE
)
end
function
c47530027
.
otcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
local
mg
=
Duel
.
GetMatchingGroup
(
c47530027
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
return
c
:
IsLevelAbove
(
7
)
and
minc
<=
1
and
Duel
.
CheckTribute
(
c
,
1
,
1
,
mg
)
end
function
c47530027
.
otop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
mg
=
Duel
.
GetMatchingGroup
(
c47530027
.
otfilter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
sg
=
Duel
.
SelectTribute
(
tp
,
c
,
1
,
1
,
mg
)
c
:
SetMaterial
(
sg
)
Duel
.
Release
(
sg
,
REASON_SUMMON
+
REASON_MATERIAL
)
end
function
c47530027
.
valcheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
local
tc
=
g
:
GetFirst
()
local
atk
=
0
local
def
=
0
while
tc
do
local
catk
=
tc
:
GetTextAttack
()
local
cdef
=
tc
:
GetTextDefense
()
atk
=
atk
+
(
catk
>=
0
and
catk
or
0
)
def
=
def
+
(
cdef
>=
0
and
cdef
or
0
)
tc
=
g
:
GetNext
()
end
if
e
:
GetLabel
()
==
1
then
e
:
SetLabel
(
0
)
--atk continuous effect
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
atk
)
e1
:
SetReset
(
RESET_EVENT
+
0xff0000
)
c
:
RegisterEffect
(
e1
)
--def continuous effect
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EFFECT_UPDATE_DEFENSE
)
e2
:
SetValue
(
def
)
c
:
RegisterEffect
(
e2
)
end
end
\ No newline at end of file
expansions/script/c65050026.lua
View file @
7246385a
--残落都市的余影
function
c65050026
.
initial_effect
(
c
)
--Activate
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e0
)
--indes
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e1
:
SetCondition
(
c65050026
.
econ
)
e1
:
SetTarget
(
c65050026
.
etg
)
e1
:
SetValue
(
c65050026
.
efilter
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c65050026
.
spcon
)
e2
:
SetTarget
(
c65050026
.
sptg
)
e2
:
SetOperation
(
c65050026
.
spop
)
c
:
RegisterEffect
(
e2
)
--todeck
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TODECK
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCost
(
c65050026
.
tdcost
)
e3
:
SetTarget
(
c65050026
.
tdtg
)
e3
:
SetOperation
(
c65050026
.
tdop
)
c
:
RegisterEffect
(
e3
)
end
function
c65050026
.
efil
(
c
)
return
not
c
:
IsType
(
TYPE_NORMAL
)
or
not
c
:
IsFaceup
()
end
function
c65050026
.
econ
(
e
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
>
0
and
Duel
.
GetMatchingGroupCount
(
c65050026
.
efil
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
==
0
end
function
c65050026
.
etg
(
e
,
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
c65050026
.
efilter
(
e
,
re
)
return
e
:
GetHandlerPlayer
()
~=
re
:
GetOwnerPlayer
()
and
re
:
IsActiveType
(
TYPE_MONSTER
)
end
function
c65050026
.
confil
(
c
,
tp
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
GetPreviousControler
()
==
tp
and
not
c
:
IsType
(
TYPE_TOKEN
)
end
function
c65050026
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c65050026
.
confil
,
1
,
nil
,
tp
)
end
function
c65050026
.
spfil
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c65050026
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c65050026
.
spfil
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c65050026
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050026
.
spfil
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c65050026
.
tdcostfil
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
function
c65050026
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050026
.
costfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050026
.
costfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c65050026
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c65050026
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
end
--残落都市的余影
function
c65050026
.
initial_effect
(
c
)
--Activate
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e0
)
--indes
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e1
:
SetCondition
(
c65050026
.
econ
)
e1
:
SetTarget
(
c65050026
.
etg
)
e1
:
SetValue
(
c65050026
.
efilter
)
c
:
RegisterEffect
(
e1
)
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c65050026
.
spcon
)
e2
:
SetTarget
(
c65050026
.
sptg
)
e2
:
SetOperation
(
c65050026
.
spop
)
c
:
RegisterEffect
(
e2
)
--todeck
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TODECK
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCost
(
c65050026
.
tdcost
)
e3
:
SetTarget
(
c65050026
.
tdtg
)
e3
:
SetOperation
(
c65050026
.
tdop
)
c
:
RegisterEffect
(
e3
)
end
function
c65050026
.
efil
(
c
)
return
not
c
:
IsType
(
TYPE_NORMAL
)
or
not
c
:
IsFaceup
()
end
function
c65050026
.
econ
(
e
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
>
0
and
Duel
.
GetMatchingGroupCount
(
c65050026
.
efil
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
==
0
end
function
c65050026
.
etg
(
e
,
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
c65050026
.
efilter
(
e
,
re
)
return
e
:
GetHandlerPlayer
()
~=
re
:
GetOwnerPlayer
()
and
re
:
IsActiveType
(
TYPE_MONSTER
)
end
function
c65050026
.
confil
(
c
,
tp
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
and
c
:
GetPreviousControler
()
==
tp
and
not
c
:
IsType
(
TYPE_TOKEN
)
end
function
c65050026
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c65050026
.
confil
,
1
,
nil
,
tp
)
end
function
c65050026
.
spfil
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c65050026
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c65050026
.
spfil
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
function
c65050026
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050026
.
spfil
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c65050026
.
tdcostfil
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
function
c65050026
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050026
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050026
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c65050026
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c65050026
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c65050027.lua
View file @
7246385a
--残落都市的锈音
function
c65050027
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c65050027
.
target
)
e1
:
SetOperation
(
c65050027
.
activate
)
c
:
RegisterEffect
(
e1
)
--todeck
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c65050027
.
tdcost
)
e2
:
SetTarget
(
c65050027
.
tdtg
)
e2
:
SetOperation
(
c65050027
.
tdop
)
c
:
RegisterEffect
(
e2
)
end
function
c65050027
.
filter
(
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsFaceup
()
end
function
c65050027
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c65050027
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c65050027
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c65050027
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
and
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c65050027
.
tdcostfil
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
function
c65050027
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050027
.
costfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050027
.
costfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c65050027
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c65050027
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
end
--残落都市的锈音
function
c65050027
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c65050027
.
target
)
e1
:
SetOperation
(
c65050027
.
activate
)
c
:
RegisterEffect
(
e1
)
--todeck
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c65050027
.
tdcost
)
e2
:
SetTarget
(
c65050027
.
tdtg
)
e2
:
SetOperation
(
c65050027
.
tdop
)
c
:
RegisterEffect
(
e2
)
end
function
c65050027
.
filter
(
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsFaceup
()
end
function
c65050027
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c65050027
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
function
c65050027
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c65050027
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
and
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
function
c65050027
.
tdcostfil
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
function
c65050027
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050027
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050027
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c65050027
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c65050027
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c65050028.lua
View file @
7246385a
--残落都市的遗存
function
c65050028
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TODECK
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_ATTACK
,
0x11e0
)
e1
:
SetCost
(
c65050028
.
cost
)
e1
:
SetTarget
(
c65050028
.
target
)
e1
:
SetOperation
(
c65050028
.
activate
)
c
:
RegisterEffect
(
e1
)
--todeck
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c65050028
.
tdcost
)
e2
:
SetTarget
(
c65050028
.
tdtg
)
e2
:
SetOperation
(
c65050028
.
tdop
)
c
:
RegisterEffect
(
e2
)
end
function
c65050028
.
costfil
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsType
(
TYPE_NORMAL
)
and
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsFaceup
())
and
c
:
IsAbleToGraveAsCost
()
end
function
c65050028
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050028
.
costfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050028
.
costfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c65050028
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
~=
e
:
GetHandler
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
end
function
c65050028
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
end
end
function
c65050028
.
tdcostfil
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
function
c65050028
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050028
.
costfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050028
.
costfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c65050028
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c65050028
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
end
--残落都市的遗存
function
c65050028
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TODECK
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_ATTACK
,
0x11e0
)
e1
:
SetCost
(
c65050028
.
cost
)
e1
:
SetTarget
(
c65050028
.
target
)
e1
:
SetOperation
(
c65050028
.
activate
)
c
:
RegisterEffect
(
e1
)
--todeck
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c65050028
.
tdcost
)
e2
:
SetTarget
(
c65050028
.
tdtg
)
e2
:
SetOperation
(
c65050028
.
tdop
)
c
:
RegisterEffect
(
e2
)
end
function
c65050028
.
costfil
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsType
(
TYPE_NORMAL
)
and
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsFaceup
())
and
c
:
IsAbleToGraveAsCost
()
end
function
c65050028
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050028
.
costfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050028
.
costfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c65050028
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
chkc
~=
e
:
GetHandler
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
end
function
c65050028
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
end
end
function
c65050028
.
tdcostfil
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
function
c65050028
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050028
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050028
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c65050028
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c65050028
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c65050029.lua
View file @
7246385a
--于残落都市的流离
function
c65050029
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
c65050029
.
con
)
e1
:
SetCost
(
c65050029
.
cost
)
e1
:
SetTarget
(
c65050029
.
tg
)
e1
:
SetOperation
(
c65050029
.
op
)
c
:
RegisterEffect
(
e1
)
--todeck
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c65050029
.
tdcost
)
e2
:
SetTarget
(
c65050029
.
tdtg
)
e2
:
SetOperation
(
c65050029
.
tdop
)
c
:
RegisterEffect
(
e2
)
--act in hand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
e3
:
SetCondition
(
c65050029
.
actcon
)
c
:
RegisterEffect
(
e3
)
end
function
c65050029
.
hdcostfil
(
c
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGraveAsCost
()
and
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsFaceup
())
end
function
c65050029
.
actcon
(
e
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
IsExistingMatchingCard
(
c65050029
.
hdcostfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
function
c65050029
.
confil
(
c
)
return
c
:
IsFacedown
()
or
not
c
:
IsType
(
TYPE_NORMAL
)
end
function
c65050029
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetMatchingGroupCount
(
c65050029
.
confil
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
==
0
end
function
c65050029
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
IsStatus
(
STATUS_ACT_FROM_HAND
)
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050029
.
hdcostfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
function
c65050029
.
tgfil
(
c
)
return
c
:
IsSetCard
(
0xada4
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
not
c
:
IsForbidden
()
end
function
c65050029
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050029
.
tgfil
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
(
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
1
end
end
function
c65050029
.
spfil
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c65050029
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
(
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050029
.
tgfil
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
then
if
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
and
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
==
0
and
Duel
.
IsExistingMatchingCard
(
c65050029
.
spfil
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
65050029
,
0
))
then
local
gg
=
Duel
.
SelectMatchingCard
(
tp
,
c65050029
.
spfil
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SpecialSummon
(
gg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
function
c65050029
.
tdcostfil
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
function
c65050029
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050029
.
costfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050029
.
costfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c65050029
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c65050029
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
end
--于残落都市的流离
function
c65050029
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
c65050029
.
con
)
e1
:
SetCost
(
c65050029
.
cost
)
e1
:
SetTarget
(
c65050029
.
tg
)
e1
:
SetOperation
(
c65050029
.
op
)
c
:
RegisterEffect
(
e1
)
--todeck
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c65050029
.
tdcost
)
e2
:
SetTarget
(
c65050029
.
tdtg
)
e2
:
SetOperation
(
c65050029
.
tdop
)
c
:
RegisterEffect
(
e2
)
--act in hand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
e3
:
SetCondition
(
c65050029
.
actcon
)
c
:
RegisterEffect
(
e3
)
end
function
c65050029
.
hdcostfil
(
c
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGraveAsCost
()
and
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsFaceup
())
end
function
c65050029
.
actcon
(
e
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
IsExistingMatchingCard
(
c65050029
.
hdcostfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
function
c65050029
.
confil
(
c
)
return
c
:
IsFacedown
()
or
not
c
:
IsType
(
TYPE_NORMAL
)
end
function
c65050029
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetMatchingGroupCount
(
c65050029
.
confil
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
==
0
end
function
c65050029
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
IsStatus
(
STATUS_ACT_FROM_HAND
)
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050029
.
hdcostfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
function
c65050029
.
tgfil
(
c
)
return
c
:
IsSetCard
(
0xada4
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
not
c
:
IsForbidden
()
end
function
c65050029
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050029
.
tgfil
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
and
(
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>
1
end
end
function
c65050029
.
spfil
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c65050029
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
(
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
0
)
or
Duel
.
CheckLocation
(
tp
,
LOCATION_PZONE
,
1
))
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050029
.
tgfil
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
then
if
Duel
.
MoveToField
(
tc
,
tp
,
tp
,
LOCATION_SZONE
,
POS_FACEUP
,
true
)
and
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
==
0
and
Duel
.
IsExistingMatchingCard
(
c65050029
.
spfil
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
65050029
,
0
))
then
local
gg
=
Duel
.
SelectMatchingCard
(
tp
,
c65050029
.
spfil
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
SpecialSummon
(
gg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
function
c65050029
.
tdcostfil
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
function
c65050029
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050029
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050029
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c65050029
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c65050029
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
end
end
\ No newline at end of file
expansions/script/c65050030.lua
View file @
7246385a
--在残落都市的晚宴
function
c65050030
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCost
(
c65050030
.
cost
)
e1
:
SetTarget
(
c65050030
.
tg
)
e1
:
SetOperation
(
c65050030
.
op
)
c
:
RegisterEffect
(
e1
)
--todeck
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c65050030
.
tdcost
)
e2
:
SetTarget
(
c65050030
.
tdtg
)
e2
:
SetOperation
(
c65050030
.
tdop
)
c
:
RegisterEffect
(
e2
)
--act in hand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
e3
:
SetCondition
(
c65050030
.
actcon
)
c
:
RegisterEffect
(
e3
)
end
function
c65050030
.
hdcostfil
(
c
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGraveAsCost
()
and
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsFaceup
())
end
function
c65050030
.
actcon
(
e
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
IsExistingMatchingCard
(
c65050030
.
hdcostfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
function
c65050030
.
confil
(
c
)
return
c
:
IsFacedown
()
or
not
c
:
IsType
(
TYPE_NORMAL
)
end
function
c65050030
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetMatchingGroupCount
(
c65050030
.
confil
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
==
0
end
function
c65050030
.
costfil
(
c
)
return
c
:
IsAbleToDeckAsCost
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsType
(
TYPE_NORMAL
)
and
(
c
:
IsLocation
(
LOCATION_GRAVE
)
or
c
:
IsFaceup
())
end
function
c65050030
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050030
.
costfil
,
tp
,
LOCATION_GRAVE
+
LOCATION_EXTRA
,
0
,
5
,
nil
)
end
if
e
:
GetHandler
():
IsStatus
(
STATUS_ACT_FROM_HAND
)
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050030
.
hdcostfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050030
.
costfil
,
tp
,
LOCATION_GRAVE
+
LOCATION_EXTRA
,
0
,
5
,
5
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
function
c65050030
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
2
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
2
)
end
function
c65050030
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
function
c65050030
.
tdcostfil
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
function
c65050030
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050030
.
costfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050030
.
costfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c65050030
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c65050030
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
end
end
--在残落都市的晚宴
function
c65050030
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCost
(
c65050030
.
cost
)
e1
:
SetTarget
(
c65050030
.
tg
)
e1
:
SetOperation
(
c65050030
.
op
)
c
:
RegisterEffect
(
e1
)
--todeck
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c65050030
.
tdcost
)
e2
:
SetTarget
(
c65050030
.
tdtg
)
e2
:
SetOperation
(
c65050030
.
tdop
)
c
:
RegisterEffect
(
e2
)
--act in hand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
e3
:
SetCondition
(
c65050030
.
actcon
)
c
:
RegisterEffect
(
e3
)
end
function
c65050030
.
hdcostfil
(
c
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGraveAsCost
()
and
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsFaceup
())
end
function
c65050030
.
actcon
(
e
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
IsExistingMatchingCard
(
c65050030
.
hdcostfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
function
c65050030
.
confil
(
c
)
return
c
:
IsFacedown
()
or
not
c
:
IsType
(
TYPE_NORMAL
)
end
function
c65050030
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetMatchingGroupCount
(
c65050030
.
confil
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
==
0
end
function
c65050030
.
costfil
(
c
)
return
c
:
IsAbleToDeckAsCost
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsType
(
TYPE_NORMAL
)
and
(
c
:
IsLocation
(
LOCATION_GRAVE
)
or
c
:
IsFaceup
())
end
function
c65050030
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050030
.
costfil
,
tp
,
LOCATION_GRAVE
+
LOCATION_EXTRA
,
0
,
5
,
nil
)
end
if
e
:
GetHandler
():
IsStatus
(
STATUS_ACT_FROM_HAND
)
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050030
.
hdcostfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050030
.
costfil
,
tp
,
LOCATION_GRAVE
+
LOCATION_EXTRA
,
0
,
5
,
5
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
function
c65050030
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
2
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
2
)
end
function
c65050030
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
function
c65050030
.
tdcostfil
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
function
c65050030
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050030
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050030
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c65050030
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c65050030
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
end
end
expansions/script/c65050031.lua
View file @
7246385a
--自残落都市的佚页
function
c65050031
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCountLimit
(
1
,
65050031
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
c65050031
.
con
)
e1
:
SetCost
(
c65050031
.
cost
)
e1
:
SetTarget
(
c65050031
.
tg
)
e1
:
SetOperation
(
c65050031
.
op
)
c
:
RegisterEffect
(
e1
)
--todeck
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c65050031
.
tdcost
)
e2
:
SetTarget
(
c65050031
.
tdtg
)
e2
:
SetOperation
(
c65050031
.
tdop
)
c
:
RegisterEffect
(
e2
)
--act in hand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
e3
:
SetCondition
(
c65050031
.
actcon
)
c
:
RegisterEffect
(
e3
)
end
function
c65050031
.
hdcostfil
(
c
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGraveAsCost
()
and
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsFaceup
())
end
function
c65050031
.
actcon
(
e
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
IsExistingMatchingCard
(
c65050031
.
hdcostfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
function
c65050031
.
confil
(
c
)
return
c
:
IsFacedown
()
or
not
c
:
IsType
(
TYPE_NORMAL
)
or
c
:
IsType
(
TYPE_TOKEN
)
end
function
c65050031
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetMatchingGroupCount
(
c65050031
.
confil
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
==
0
and
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
>
0
and
(
Duel
.
IsChainNegatable
(
ev
)
or
Duel
.
IsChainDisablable
(
ev
))
and
re
:
GetHandlerPlayer
()
~=
tp
end
function
c65050031
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
IsStatus
(
STATUS_ACT_FROM_HAND
)
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050031
.
hdcostfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
function
c65050031
.
tgfil
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsAbleToHand
()
end
function
c65050031
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050031
.
tgfil
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c65050031
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
num
=
0
if
Duel
.
NegateActivation
(
ev
)
then
num
=
1
end
if
num
==
0
and
Duel
.
NegateEffect
(
ev
)
then
num
=
1
end
if
num
==
1
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050031
.
tgfil
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
tp
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
function
c65050031
.
tdcostfil
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
function
c65050031
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050031
.
costfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050031
.
costfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c65050031
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c65050031
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
end
end
--自残落都市的佚页
function
c65050031
.
initial_effect
(
c
)
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCountLimit
(
1
,
65050031
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
c65050031
.
con
)
e1
:
SetCost
(
c65050031
.
cost
)
e1
:
SetTarget
(
c65050031
.
tg
)
e1
:
SetOperation
(
c65050031
.
op
)
c
:
RegisterEffect
(
e1
)
--todeck
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c65050031
.
tdcost
)
e2
:
SetTarget
(
c65050031
.
tdtg
)
e2
:
SetOperation
(
c65050031
.
tdop
)
c
:
RegisterEffect
(
e2
)
--act in hand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
e3
:
SetCondition
(
c65050031
.
actcon
)
c
:
RegisterEffect
(
e3
)
end
function
c65050031
.
hdcostfil
(
c
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGraveAsCost
()
and
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsFaceup
())
end
function
c65050031
.
actcon
(
e
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
IsExistingMatchingCard
(
c65050031
.
hdcostfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
function
c65050031
.
confil
(
c
)
return
c
:
IsFacedown
()
or
not
c
:
IsType
(
TYPE_NORMAL
)
or
c
:
IsType
(
TYPE_TOKEN
)
end
function
c65050031
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetMatchingGroupCount
(
c65050031
.
confil
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
==
0
and
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
>
0
and
(
Duel
.
IsChainNegatable
(
ev
)
or
Duel
.
IsChainDisablable
(
ev
))
and
re
:
GetHandlerPlayer
()
~=
tp
end
function
c65050031
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
IsStatus
(
STATUS_ACT_FROM_HAND
)
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050031
.
hdcostfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
function
c65050031
.
tgfil
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsAbleToHand
()
end
function
c65050031
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050031
.
tgfil
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c65050031
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
num
=
0
if
Duel
.
NegateActivation
(
ev
)
then
num
=
1
end
if
num
==
0
and
Duel
.
NegateEffect
(
ev
)
then
num
=
1
end
if
num
==
1
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050031
.
tgfil
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
tp
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
function
c65050031
.
tdcostfil
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
function
c65050031
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050031
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050031
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c65050031
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
function
c65050031
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
end
end
expansions/script/c75646502.lua
View file @
7246385a
...
...
@@ -11,7 +11,7 @@ function c75646502.initial_effect(c)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
75646502
)
e1
:
SetCondition
(
c
18940556
.
condition
)
e1
:
SetCondition
(
c
75646502
.
condition
)
e1
:
SetTarget
(
c75646502
.
target
)
e1
:
SetOperation
(
c75646502
.
operation
)
c
:
RegisterEffect
(
e1
)
...
...
update/filelist.txt
View file @
7246385a
ygopro.exe 44e30d7dddeffa0acba31435632a7c80
ygopro.exe 44e30d7dddeffa0acba31435632a7c80
deck/2019.6.8_new_card1.ydk 6112722b7b9a6b4618c6923786fa7b49
deck/2019.6.8_new_card2.ydk b7b42b082ea473bb3934982ae9cf6a7d
deck/2019.6.8_new_card3.ydk 042b34e4671b1e326082460f68a5590f
...
...
@@ -7,7 +7,7 @@ deck/2019.6.8_new_card5.ydk 3552c713927f7c4e38e0c883210d63bd
deck/2019.6.8_new_card6.ydk cb6d0fa9ffd37fa9be52ba48b41b0992
deck/2019.6.8_new_card7.ydk 5511a5f23236c723140693cf3cd0cf01
expansions/222DIY.cdb 7d5a270ea6aa44fe56866dc7ac9c5351
expansions/lflist.conf
db8f62dadd719d43cb79cc136a15f980
expansions/lflist.conf
a0e5c8c0aa96a7169324d5bf7eab2c5f
expansions/strings.conf ffdc5173327cd91803c7345f5d1c62fc
expansions/pics/08209710.jpg ed0e60085631bfa641ffeebd6abbd910
expansions/pics/1000360.jpg d1aa6f44fcd413402141a6bf4b886c2a
...
...
update/version.txt
View file @
7246385a
2019/6/9 14:19:06
\ No newline at end of file
2019/6/17 20:16:06
\ No newline at end of file
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