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
Soulgamer
ygopro-222DIY-cards
Commits
6941fa81
Commit
6941fa81
authored
Jun 22, 2019
by
2924713558
Committed by
GitHub
Jun 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add files via upload
parent
6c00111f
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
911 additions
and
920 deletions
+911
-920
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
No files found.
expansions/script/c47530012.lua
View file @
6941fa81
--盖马克
--盖马克
local
m
=
47530012
local
m
=
47530012
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
function
c47530012
.
initial_effect
(
c
)
function
c47530012
.
initial_effect
(
c
)
--link summon
--link summon
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsRace
,
RACE_MACHINE
),
3
,
5
)
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsRace
,
RACE_MACHINE
),
3
,
5
)
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
--todeck
--todeck
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
47530012
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
47530012
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOGRAVE
+
CATEGORY_TOKEN
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOKEN
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCost
(
c47530012
.
cost
)
e1
:
SetCost
(
c47530012
.
tkcost
)
e1
:
SetTarget
(
c47530012
.
tktg
)
e1
:
SetTarget
(
c47530012
.
tktg
)
e1
:
SetOperation
(
c47530012
.
tkop
)
e1
:
SetOperation
(
c47530012
.
tkop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--full fire
--full fire
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetCategory
(
CATEGORY_DESTROY
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
c47530012
.
destg
)
e2
:
SetTarget
(
c47530012
.
destg
)
e2
:
SetOperation
(
c47530012
.
desop
)
e2
:
SetOperation
(
c47530012
.
desop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c47530012
.
cfilter
(
c
)
function
c47530012
.
cfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToDeckAsCost
()
and
c
:
IsRace
(
RACE_MACHINE
)
return
c
:
IsAbleToDeckAsCost
()
and
c
:
IsRace
(
RACE_MACHINE
)
end
end
function
c47530012
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
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
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c47530012
.
cfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
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
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
function
c47530012
.
tktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
end
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
47531012
,
0
,
0x4011
,
0
,
0
,
1
,
RACE_MACHINE
,
ATTRIBUTE_LIGHT
)
end
function
c47530012
.
tktg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
47531012
,
0
,
0x4011
,
0
,
0
,
1
,
RACE_CYBERSE
,
ATTRIBUTE_LIGHT
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOKEN
,
nil
,
1
,
0
,
0
)
function
c47530012
.
tkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
0
,
0
)
local
c
=
e
:
GetHandler
()
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
function
c47530012
.
tkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
47531012
,
0
,
0x4011
,
2000
,
2000
,
1
,
RACE_MACHINE
,
ATTRIBUTE_LIGHT
)
then
local
c
=
e
:
GetHandler
()
local
token
=
Duel
.
CreateToken
(
tp
,
47531012
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
if
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
47531012
,
0
,
0x4011
,
2000
,
2000
,
1
,
RACE_MACHINE
,
ATTRIBUTE_LIGHT
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
local
token
=
Duel
.
CreateToken
(
tp
,
47531012
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
Duel
.
SpecialSummonStep
(
token
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
e1
:
SetCode
(
EFFECT_ATTACK_ALL
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetValue
(
1
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
e1
:
SetCode
(
EFFECT_ATTACK_ALL
)
token
:
RegisterEffect
(
e1
,
true
)
e1
:
SetValue
(
1
)
if
Duel
.
SpecialSummonComplete
()
then
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
local
cg
=
token
:
GetColumnGroup
():
Filter
(
Card
.
IsControler
,
nil
,
1
-
tp
)
token
:
RegisterEffect
(
e1
,
true
)
if
cg
:
GetCount
()
>
0
then
if
Duel
.
SpecialSummonComplete
()
then
Duel
.
HintSelection
(
cg
)
local
cg
=
token
:
GetColumnGroup
():
Filter
(
Card
.
IsControler
,
nil
,
1
-
tp
)
Duel
.
SendtoGrave
(
cg
,
REASON_RULE
)
if
cg
:
GetCount
()
>
0
then
end
Duel
.
HintSelection
(
cg
)
end
Duel
.
SendtoGrave
(
cg
,
REASON_RULE
)
end
end
end
end
function
c47530012
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
end
local
c
=
e
:
GetHandler
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
4
,
c
)
end
function
c47530012
.
destg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
c
=
e
:
GetHandler
()
local
g
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
4
,
4
,
c
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
4
,
c
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
4
,
0
,
0
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
4
,
0
,
0
)
local
g
=
Duel
.
SelectTarget
(
tp
,
nil
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
4
,
4
,
c
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
4
,
0
,
0
)
function
c47530012
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
g
,
4
,
0
,
0
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
end
Duel
.
Destroy
(
g
,
REASON_EFFECT
,
LOCATION_REMOVED
)
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
end
\ No newline at end of file
expansions/script/c47530026.lua
View file @
6941fa81
This diff is collapsed.
Click to expand it.
expansions/script/c47530027.lua
View file @
6941fa81
This diff is collapsed.
Click to expand it.
expansions/script/c65050026.lua
View file @
6941fa81
--残落都市的余影
--残落都市的余影
function
c65050026
.
initial_effect
(
c
)
function
c65050026
.
initial_effect
(
c
)
--Activate
--Activate
local
e0
=
Effect
.
CreateEffect
(
c
)
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
e0
:
SetCode
(
EVENT_FREE_CHAIN
)
c
:
RegisterEffect
(
e0
)
c
:
RegisterEffect
(
e0
)
--indes
--indes
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetCode
(
EFFECT_IMMUNE_EFFECT
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetRange
(
LOCATION_FZONE
)
e1
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e1
:
SetTargetRange
(
LOCATION_ONFIELD
,
0
)
e1
:
SetCondition
(
c65050026
.
econ
)
e1
:
SetCondition
(
c65050026
.
econ
)
e1
:
SetTarget
(
c65050026
.
etg
)
e1
:
SetTarget
(
c65050026
.
etg
)
e1
:
SetValue
(
c65050026
.
efilter
)
e1
:
SetValue
(
c65050026
.
efilter
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--spsummon
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_DAMAGE_STEP
)
e2
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetCode
(
EVENT_LEAVE_FIELD
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCondition
(
c65050026
.
spcon
)
e2
:
SetCondition
(
c65050026
.
spcon
)
e2
:
SetTarget
(
c65050026
.
sptg
)
e2
:
SetTarget
(
c65050026
.
sptg
)
e2
:
SetOperation
(
c65050026
.
spop
)
e2
:
SetOperation
(
c65050026
.
spop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--todeck
--todeck
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetCategory
(
CATEGORY_TODECK
)
e3
:
SetCategory
(
CATEGORY_TODECK
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetType
(
EFFECT_TYPE_IGNITION
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetRange
(
LOCATION_GRAVE
)
e3
:
SetCost
(
c65050026
.
tdcost
)
e3
:
SetCost
(
c65050026
.
tdcost
)
e3
:
SetTarget
(
c65050026
.
tdtg
)
e3
:
SetTarget
(
c65050026
.
tdtg
)
e3
:
SetOperation
(
c65050026
.
tdop
)
e3
:
SetOperation
(
c65050026
.
tdop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c65050026
.
efil
(
c
)
function
c65050026
.
efil
(
c
)
return
not
c
:
IsType
(
TYPE_NORMAL
)
or
not
c
:
IsFaceup
()
return
not
c
:
IsType
(
TYPE_NORMAL
)
or
not
c
:
IsFaceup
()
end
end
function
c65050026
.
econ
(
e
,
c
)
function
c65050026
.
econ
(
e
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
>
0
and
Duel
.
GetMatchingGroupCount
(
c65050026
.
efil
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
==
0
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_MZONE
,
0
)
>
0
and
Duel
.
GetMatchingGroupCount
(
c65050026
.
efil
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
==
0
end
end
function
c65050026
.
etg
(
e
,
c
)
function
c65050026
.
etg
(
e
,
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
end
function
c65050026
.
efilter
(
e
,
re
)
function
c65050026
.
efilter
(
e
,
re
)
return
e
:
GetHandlerPlayer
()
~=
re
:
GetOwnerPlayer
()
and
re
:
IsActiveType
(
TYPE_MONSTER
)
return
e
:
GetHandlerPlayer
()
~=
re
:
GetOwnerPlayer
()
and
re
:
IsActiveType
(
TYPE_MONSTER
)
end
end
function
c65050026
.
confil
(
c
,
tp
)
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
)
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
end
function
c65050026
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050026
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c65050026
.
confil
,
1
,
nil
,
tp
)
return
eg
:
IsExists
(
c65050026
.
confil
,
1
,
nil
,
tp
)
end
end
function
c65050026
.
spfil
(
c
,
e
,
tp
)
function
c65050026
.
spfil
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c65050026
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c65050026
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c65050026
.
spfil
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
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
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
end
function
c65050026
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050026
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050026
.
spfil
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050026
.
spfil
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
function
c65050026
.
tdcostfil
(
c
)
function
c65050026
.
tdcostfil
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
end
function
c65050026
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050026
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050026
.
costfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050026
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
function
c65050026
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c65050026
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
c65050026
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050026
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
end
\ No newline at end of file
expansions/script/c65050027.lua
View file @
6941fa81
--残落都市的锈音
--残落都市的锈音
function
c65050027
.
initial_effect
(
c
)
function
c65050027
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c65050027
.
target
)
e1
:
SetTarget
(
c65050027
.
target
)
e1
:
SetOperation
(
c65050027
.
activate
)
e1
:
SetOperation
(
c65050027
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--todeck
--todeck
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c65050027
.
tdcost
)
e2
:
SetCost
(
c65050027
.
tdcost
)
e2
:
SetTarget
(
c65050027
.
tdtg
)
e2
:
SetTarget
(
c65050027
.
tdtg
)
e2
:
SetOperation
(
c65050027
.
tdop
)
e2
:
SetOperation
(
c65050027
.
tdop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c65050027
.
filter
(
c
,
e
,
tp
)
function
c65050027
.
filter
(
c
,
e
,
tp
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsFaceup
()
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsFaceup
()
end
end
function
c65050027
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c65050027
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
if
chk
==
0
then
return
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c65050027
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
,
e
,
tp
)
end
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
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_EXTRA
)
end
end
function
c65050027
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050027
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c65050027
.
filter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,
e
,
tp
)
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
if
g
:
GetCount
()
>
0
and
Duel
.
GetLocationCountFromEx
(
tp
)
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
function
c65050027
.
tdcostfil
(
c
)
function
c65050027
.
tdcostfil
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
end
function
c65050027
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050027
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050027
.
costfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050027
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
function
c65050027
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c65050027
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
c65050027
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050027
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
end
\ No newline at end of file
expansions/script/c65050028.lua
View file @
6941fa81
--残落都市的遗存
--残落都市的遗存
function
c65050028
.
initial_effect
(
c
)
function
c65050028
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TODECK
)
e1
:
SetCategory
(
CATEGORY_TODECK
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
TIMING_ATTACK
,
0x11e0
)
e1
:
SetHintTiming
(
TIMING_ATTACK
,
0x11e0
)
e1
:
SetCost
(
c65050028
.
cost
)
e1
:
SetCost
(
c65050028
.
cost
)
e1
:
SetTarget
(
c65050028
.
target
)
e1
:
SetTarget
(
c65050028
.
target
)
e1
:
SetOperation
(
c65050028
.
activate
)
e1
:
SetOperation
(
c65050028
.
activate
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--todeck
--todeck
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c65050028
.
tdcost
)
e2
:
SetCost
(
c65050028
.
tdcost
)
e2
:
SetTarget
(
c65050028
.
tdtg
)
e2
:
SetTarget
(
c65050028
.
tdtg
)
e2
:
SetOperation
(
c65050028
.
tdop
)
e2
:
SetOperation
(
c65050028
.
tdop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c65050028
.
costfil
(
c
)
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
()
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsType
(
TYPE_NORMAL
)
and
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsFaceup
())
and
c
:
IsAbleToGraveAsCost
()
end
end
function
c65050028
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
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
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050028
.
costfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
function
c65050028
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
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
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
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
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
e
:
GetHandler
())
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
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
end
end
function
c65050028
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050028
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
end
function
c65050028
.
tdcostfil
(
c
)
function
c65050028
.
tdcostfil
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
end
function
c65050028
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050028
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050028
.
costfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050028
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
function
c65050028
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c65050028
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
c65050028
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050028
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
end
\ No newline at end of file
expansions/script/c65050029.lua
View file @
6941fa81
--于残落都市的流离
--于残落都市的流离
function
c65050029
.
initial_effect
(
c
)
function
c65050029
.
initial_effect
(
c
)
--activate
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
c65050029
.
con
)
e1
:
SetCondition
(
c65050029
.
con
)
e1
:
SetCost
(
c65050029
.
cost
)
e1
:
SetCost
(
c65050029
.
cost
)
e1
:
SetTarget
(
c65050029
.
tg
)
e1
:
SetTarget
(
c65050029
.
tg
)
e1
:
SetOperation
(
c65050029
.
op
)
e1
:
SetOperation
(
c65050029
.
op
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--todeck
--todeck
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c65050029
.
tdcost
)
e2
:
SetCost
(
c65050029
.
tdcost
)
e2
:
SetTarget
(
c65050029
.
tdtg
)
e2
:
SetTarget
(
c65050029
.
tdtg
)
e2
:
SetOperation
(
c65050029
.
tdop
)
e2
:
SetOperation
(
c65050029
.
tdop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--act in hand
--act in hand
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
e3
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
e3
:
SetCondition
(
c65050029
.
actcon
)
e3
:
SetCondition
(
c65050029
.
actcon
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c65050029
.
hdcostfil
(
c
)
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
())
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGraveAsCost
()
and
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsFaceup
())
end
end
function
c65050029
.
actcon
(
e
,
c
)
function
c65050029
.
actcon
(
e
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
IsExistingMatchingCard
(
c65050029
.
hdcostfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c65050029
.
hdcostfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
end
function
c65050029
.
confil
(
c
)
function
c65050029
.
confil
(
c
)
return
c
:
IsFacedown
()
or
not
c
:
IsType
(
TYPE_NORMAL
)
return
c
:
IsFacedown
()
or
not
c
:
IsType
(
TYPE_NORMAL
)
end
end
function
c65050029
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050029
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetMatchingGroupCount
(
c65050029
.
confil
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
==
0
return
Duel
.
GetMatchingGroupCount
(
c65050029
.
confil
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
==
0
end
end
function
c65050029
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c65050029
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
IsStatus
(
STATUS_ACT_FROM_HAND
)
then
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
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050029
.
hdcostfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
end
end
function
c65050029
.
tgfil
(
c
)
function
c65050029
.
tgfil
(
c
)
return
c
:
IsSetCard
(
0xada4
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
not
c
:
IsForbidden
()
return
c
:
IsSetCard
(
0xada4
)
and
c
:
IsType
(
TYPE_PENDULUM
)
and
not
c
:
IsForbidden
()
end
end
function
c65050029
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
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
end
function
c65050029
.
spfil
(
c
,
e
,
tp
)
function
c65050029
.
spfil
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c65050029
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
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
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
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOFIELD
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050029
.
tgfil
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050029
.
tgfil
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
local
tc
=
g
:
GetFirst
()
if
tc
then
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
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
)
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
)
Duel
.
SpecialSummon
(
gg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
end
end
function
c65050029
.
tdcostfil
(
c
)
function
c65050029
.
tdcostfil
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
end
function
c65050029
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050029
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050029
.
costfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050029
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
function
c65050029
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c65050029
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
c65050029
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050029
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
end
\ No newline at end of file
expansions/script/c65050030.lua
View file @
6941fa81
--在残落都市的晚宴
--在残落都市的晚宴
function
c65050030
.
initial_effect
(
c
)
function
c65050030
.
initial_effect
(
c
)
--activate
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetCategory
(
CATEGORY_DRAW
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCost
(
c65050030
.
cost
)
e1
:
SetCost
(
c65050030
.
cost
)
e1
:
SetTarget
(
c65050030
.
tg
)
e1
:
SetTarget
(
c65050030
.
tg
)
e1
:
SetOperation
(
c65050030
.
op
)
e1
:
SetOperation
(
c65050030
.
op
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--todeck
--todeck
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c65050030
.
tdcost
)
e2
:
SetCost
(
c65050030
.
tdcost
)
e2
:
SetTarget
(
c65050030
.
tdtg
)
e2
:
SetTarget
(
c65050030
.
tdtg
)
e2
:
SetOperation
(
c65050030
.
tdop
)
e2
:
SetOperation
(
c65050030
.
tdop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--act in hand
--act in hand
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
e3
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
e3
:
SetCondition
(
c65050030
.
actcon
)
e3
:
SetCondition
(
c65050030
.
actcon
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c65050030
.
hdcostfil
(
c
)
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
())
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGraveAsCost
()
and
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsFaceup
())
end
end
function
c65050030
.
actcon
(
e
,
c
)
function
c65050030
.
actcon
(
e
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
IsExistingMatchingCard
(
c65050030
.
hdcostfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c65050030
.
hdcostfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
end
function
c65050030
.
confil
(
c
)
function
c65050030
.
confil
(
c
)
return
c
:
IsFacedown
()
or
not
c
:
IsType
(
TYPE_NORMAL
)
return
c
:
IsFacedown
()
or
not
c
:
IsType
(
TYPE_NORMAL
)
end
end
function
c65050030
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050030
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetMatchingGroupCount
(
c65050030
.
confil
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
==
0
return
Duel
.
GetMatchingGroupCount
(
c65050030
.
confil
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
==
0
end
end
function
c65050030
.
costfil
(
c
)
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
())
return
c
:
IsAbleToDeckAsCost
()
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsType
(
TYPE_NORMAL
)
and
(
c
:
IsLocation
(
LOCATION_GRAVE
)
or
c
:
IsFaceup
())
end
end
function
c65050030
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
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
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
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050030
.
hdcostfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050030
.
costfil
,
tp
,
LOCATION_GRAVE
+
LOCATION_EXTRA
,
0
,
5
,
5
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050030
.
costfil
,
tp
,
LOCATION_GRAVE
+
LOCATION_EXTRA
,
0
,
5
,
5
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
end
function
c65050030
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c65050030
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
2
)
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
2
)
end
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetPlayer
(
tp
)
Duel
.
SetTargetParam
(
2
)
Duel
.
SetTargetParam
(
2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
2
)
end
end
function
c65050030
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050030
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
end
end
function
c65050030
.
tdcostfil
(
c
)
function
c65050030
.
tdcostfil
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
end
function
c65050030
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050030
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050030
.
costfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050030
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
function
c65050030
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c65050030
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
c65050030
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050030
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
end
expansions/script/c65050031.lua
View file @
6941fa81
--自残落都市的佚页
--自残落都市的佚页
function
c65050031
.
initial_effect
(
c
)
function
c65050031
.
initial_effect
(
c
)
--activate
--activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCountLimit
(
1
,
65050031
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCountLimit
(
1
,
65050031
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetCondition
(
c65050031
.
con
)
e1
:
SetCondition
(
c65050031
.
con
)
e1
:
SetCost
(
c65050031
.
cost
)
e1
:
SetCost
(
c65050031
.
cost
)
e1
:
SetTarget
(
c65050031
.
tg
)
e1
:
SetTarget
(
c65050031
.
tg
)
e1
:
SetOperation
(
c65050031
.
op
)
e1
:
SetOperation
(
c65050031
.
op
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--todeck
--todeck
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCost
(
c65050031
.
tdcost
)
e2
:
SetCost
(
c65050031
.
tdcost
)
e2
:
SetTarget
(
c65050031
.
tdtg
)
e2
:
SetTarget
(
c65050031
.
tdtg
)
e2
:
SetOperation
(
c65050031
.
tdop
)
e2
:
SetOperation
(
c65050031
.
tdop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
--act in hand
--act in hand
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
e3
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
e3
:
SetCondition
(
c65050031
.
actcon
)
e3
:
SetCondition
(
c65050031
.
actcon
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c65050031
.
hdcostfil
(
c
)
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
())
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToGraveAsCost
()
and
(
c
:
IsLocation
(
LOCATION_HAND
)
or
c
:
IsFaceup
())
end
end
function
c65050031
.
actcon
(
e
,
c
)
function
c65050031
.
actcon
(
e
,
c
)
local
tp
=
e
:
GetHandlerPlayer
()
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
IsExistingMatchingCard
(
c65050031
.
hdcostfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c65050031
.
hdcostfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
end
function
c65050031
.
confil
(
c
)
function
c65050031
.
confil
(
c
)
return
c
:
IsFacedown
()
or
not
c
:
IsType
(
TYPE_NORMAL
)
or
c
:
IsType
(
TYPE_TOKEN
)
return
c
:
IsFacedown
()
or
not
c
:
IsType
(
TYPE_NORMAL
)
or
c
:
IsType
(
TYPE_TOKEN
)
end
end
function
c65050031
.
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
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
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
end
function
c65050031
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c65050031
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
chk
==
0
then
return
true
end
if
e
:
GetHandler
():
IsStatus
(
STATUS_ACT_FROM_HAND
)
then
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
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050031
.
hdcostfil
,
tp
,
LOCATION_HAND
+
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
end
end
function
c65050031
.
tgfil
(
c
)
function
c65050031
.
tgfil
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsAbleToHand
()
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsAbleToHand
()
end
end
function
c65050031
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
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_NEGATE
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
eg
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c65050031
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050031
.
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
num
=
0
local
num
=
0
if
Duel
.
NegateActivation
(
ev
)
then
num
=
1
end
if
Duel
.
NegateActivation
(
ev
)
then
num
=
1
end
if
num
==
0
and
Duel
.
NegateEffect
(
ev
)
then
num
=
1
end
if
num
==
0
and
Duel
.
NegateEffect
(
ev
)
then
num
=
1
end
if
num
==
1
then
if
num
==
1
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050031
.
tgfil
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050031
.
tgfil
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
tp
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
tp
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
end
end
function
c65050031
.
tdcostfil
(
c
)
function
c65050031
.
tdcostfil
(
c
)
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
return
c
:
IsAbleToGraveAsCost
()
and
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsFaceup
()
end
end
function
c65050031
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
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
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c65050031
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050031
.
costfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c65050031
.
tdcostfil
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
function
c65050031
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c65050031
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToDeck
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
e
:
GetHandler
(),
1
,
0
,
0
)
end
end
function
c65050031
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65050031
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
if
c
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_EFFECT
)
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment