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
alstroemeria-silentlove
ygopro-222DIY-cards
Commits
5c223ea4
Commit
5c223ea4
authored
Oct 16, 2023
by
songtongtong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
file update
parent
c1818e5e
Pipeline
#23763
passed with stages
in 27 minutes and 43 seconds
Changes
7
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
362 additions
and
80 deletions
+362
-80
expansions/pics/16400097.jpg
expansions/pics/16400097.jpg
+0
-0
expansions/pics/16400098.jpg
expansions/pics/16400098.jpg
+0
-0
expansions/pics/16400099.jpg
expansions/pics/16400099.jpg
+0
-0
expansions/script/c16400081.lua
expansions/script/c16400081.lua
+63
-80
expansions/script/c16400097.lua
expansions/script/c16400097.lua
+104
-0
expansions/script/c16400098.lua
expansions/script/c16400098.lua
+99
-0
expansions/script/c16400099.lua
expansions/script/c16400099.lua
+96
-0
No files found.
expansions/pics/16400097.jpg
0 → 100644
View file @
5c223ea4
43.1 KB
expansions/pics/16400098.jpg
0 → 100644
View file @
5c223ea4
55 KB
expansions/pics/16400099.jpg
0 → 100644
View file @
5c223ea4
49.8 KB
expansions/script/c16400081.lua
View file @
5c223ea4
local
m
=
16400081
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--零之镇魂曲
function
c16400081
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
m
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetOperation
(
c
m
.
activate
)
e1
:
SetCountLimit
(
1
,
16400081
+
EFFECT_COUNT_CODE_OATH
)
e1
:
SetOperation
(
c
16400081
.
activate
)
c
:
RegisterEffect
(
e1
)
--DRAW
--spsummon
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DRAW
)
e2
:
SetDescription
(
aux
.
Stringid
(
16400081
,
1
))
e2
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_TOGRAVE
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetRange
(
LOCATION_FZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
m
+
100
)
e2
:
SetCondition
(
cm
.
spcon
)
e2
:
SetCost
(
cm
.
spcost
)
e2
:
SetTarget
(
cm
.
sptg
)
e2
:
SetOperation
(
cm
.
spop
)
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetCountLimit
(
1
,
16400181
)
e2
:
SetCondition
(
c16400081
.
spcon
)
e2
:
SetTarget
(
c16400081
.
sptg
)
e2
:
SetOperation
(
c16400081
.
spop
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
thfilter
(
c
)
--activate
function
c16400081
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xce2
)
and
c
:
IsAbleToHand
()
end
function
c
m
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c
m
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
function
c
16400081
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c
16400081
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
16400081
,
0
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
end
end
function
cm
.
check
(
c
,
tp
)
return
c
:
IsSetCard
(
0xce2
)
and
c
:
IsControler
(
tp
)
and
c
:
IsFaceup
()
end
function
cm
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
cm
.
check
,
1
,
nil
,
1
-
tp
)
--spsummon
function
c16400081
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsControler
(
1
-
tp
)
end
function
c
m
.
tdfilter
(
c
)
return
c
:
IsSetCard
(
0xce2
)
and
c
:
IsAbleToDeckAsCost
()
function
c
16400081
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c16400081
.
cfilter
,
1
,
nil
)
end
function
cm
.
spcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tdfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
function
c16400081
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xce2
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0xce2
)
and
c
:
IsFaceup
()
function
c16400081
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ct
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_ONFIELD
,
0
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c16400081
.
spfilter
,
tp
,
LOCATION_REMOVED
+
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
)
and
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
ct
)
and
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>
ct
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DECKDES
,
nil
,
0
,
tp
,
ct
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_REMOVED
+
LOCATION_HAND
+
LOCATION_GRAVE
)
end
function
cm
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
count
=
Duel
.
GetMatchingGroupCount
(
cm
.
spfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
count
)
and
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_HAND
)
>
0
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
1
-
tp
,
count
)
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
count
=
Duel
.
GetMatchingGroupCount
(
cm
.
spfilter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
nil
,
tp
,
0
,
LOCATION_HAND
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
tp
,
g
)
if
Duel
.
Draw
(
1
-
tp
,
count
,
REASON_EFFECT
)
>
0
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetValue
(
cm
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c16400081
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
false
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
sg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
c16400081
.
spfilter
),
tp
,
LOCATION_REMOVED
+
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
):
GetFirst
()
if
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
local
ct
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_ONFIELD
,
0
)
Duel
.
DiscardDeck
(
tp
,
ct
,
REASON_EFFECT
)
end
end
function
cm
.
aclimit
(
e
,
re
,
tp
)
return
re
:
GetHandler
():
IsType
(
TYPE_SPELL
)
and
re
:
GetHandler
():
IsLocation
(
LOCATION_HAND
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
end
\ No newline at end of file
expansions/script/c16400097.lua
0 → 100644
View file @
5c223ea4
--短暂的时间-罗洛·兰佩路基
function
c16400097
.
initial_effect
(
c
)
--synchro summon
aux
.
AddSynchroProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0xce2
),
aux
.
NonTuner
(
nil
),
1
)
c
:
EnableReviveLimit
()
--cannot special summon
local
e0
=
Effect
.
CreateEffect
(
c
)
e0
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e0
:
SetType
(
EFFECT_TYPE_SINGLE
)
e0
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
e0
:
SetValue
(
aux
.
synlimit
)
c
:
RegisterEffect
(
e0
)
--todeck
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_TODECK
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e1
:
SetCountLimit
(
1
,
16400097
)
e1
:
SetCondition
(
c16400097
.
tdcon
)
e1
:
SetTarget
(
c16400097
.
tdtg
)
e1
:
SetOperation
(
c16400097
.
tdop
)
c
:
RegisterEffect
(
e1
)
--atk up
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetValue
(
c16400097
.
atkval
)
c
:
RegisterEffect
(
e2
)
--tohand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
16400097
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
16400197
)
e3
:
SetCondition
(
c16400097
.
spcon
)
e3
:
SetTarget
(
c16400097
.
sptg
)
e3
:
SetOperation
(
c16400097
.
spop
)
c
:
RegisterEffect
(
e3
)
end
function
c16400097
.
tdcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_SYNCHRO
)
end
function
c16400097
.
filter
(
c
)
return
c
:
IsSetCard
(
0xce2
)
and
c
:
IsAbleToDeck
()
end
function
c16400097
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c67169062
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c67169062
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
4
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c16400097
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
4
,
4
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c16400097
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tg
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
if
not
tg
or
tg
:
FilterCount
(
Card
.
IsRelateToEffect
,
nil
,
e
)
~=
4
then
return
end
Duel
.
SendtoDeck
(
tg
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
)
local
g
=
Duel
.
GetOperatedGroup
()
if
g
:
IsExists
(
Card
.
IsLocation
,
1
,
nil
,
LOCATION_DECK
)
then
Duel
.
ShuffleDeck
(
tp
)
end
local
ct
=
g
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
+
LOCATION_EXTRA
)
if
ct
==
4
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetCode
(
EFFECT_CANNOT_BE_EFFECT_TARGET
)
e1
:
SetTargetRange
(
LOCATION_MZONE
,
0
)
e1
:
SetTarget
(
aux
.
TargetBoolFunction
(
Card
.
IsSetCard
,
0x36c2
))
e1
:
SetValue
(
aux
.
tgoval
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
,
2
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
--atk
function
c16400097
.
filter1
(
c
)
return
c
:
IsSetCard
(
0xce2
)
and
c
:
IsFaceup
()
end
function
c16400097
.
atkval
(
e
,
c
)
return
Duel
.
GetMatchingGroupCount
(
c16400097
.
filter1
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
nil
)
*
100
end
--special
function
c16400097
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
c16400097
.
spfilter
(
c
)
return
c
:
IsSetCard
(
0xce2
)
and
not
c
:
IsCode
(
16400097
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
function
c16400097
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c16400097
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
c16400097
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
false
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c16400097
.
spfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
\ No newline at end of file
expansions/script/c16400098.lua
0 → 100644
View file @
5c223ea4
--向导兵器-兰斯洛特
function
c16400098
.
initial_effect
(
c
)
aux
.
AddLinkProcedure
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsLinkSetCard
,
0xce1
),
2
,
4
)
c
:
EnableReviveLimit
()
--to grave
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
16400098
,
0
))
e1
:
SetCategory
(
CATEGORY_TOGRAVE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCountLimit
(
1
,
16400098
)
e1
:
SetCondition
(
c16400098
.
thcon
)
e1
:
SetTarget
(
c16400098
.
thtg
)
e1
:
SetOperation
(
c16400098
.
thop
)
c
:
RegisterEffect
(
e1
)
--todeck
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
16400098
,
2
))
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetHintTiming
(
0
,
TIMINGS_CHECK_MONSTER
+
TIMING_END_PHASE
)
e2
:
SetCost
(
c16400098
.
tdcost
)
e2
:
SetTarget
(
c16400098
.
tdtg
)
e2
:
SetOperation
(
c16400098
.
tdop
)
c
:
RegisterEffect
(
e2
)
--tohand
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
16400098
,
1
))
e3
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCountLimit
(
1
,
16400198
)
e3
:
SetCondition
(
c16400098
.
thcon1
)
e3
:
SetTarget
(
c16400098
.
thtg1
)
e3
:
SetOperation
(
c16400098
.
thop1
)
c
:
RegisterEffect
(
e3
)
end
function
c16400098
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_LINK
)
end
function
c16400098
.
tgfilter
(
c
)
return
c
:
IsSetCard
(
0xce2
)
and
c
:
IsAbleToGrave
()
end
function
c16400098
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOGRAVE
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
function
c16400098
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c16400098
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
end
end
--todeck
function
c16400098
.
cfilter
(
c
,
ft
)
return
c
:
IsFaceup
()
and
c
:
IsAbleToHandAsCost
()
end
function
c16400098
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_REMOVED
)
if
chk
==
0
then
return
ft
>
1
and
Duel
.
IsExistingMatchingCard
(
c16400098
.
cfilter
,
tp
,
LOCATION_REMOVED
,
0
,
2
,
nil
,
ft
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_RTOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c16400098
.
cfilter
,
tp
,
LOCATION_REMOVED
,
0
,
2
,
2
,
nil
,
ft
)
Duel
.
SendtoHand
(
g
,
1
-
tp
,
REASON_COST
)
end
function
c16400098
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsOnField
()
and
chkc
:
IsAbleToDeck
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsAbleToDeck
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c16400098
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToDeck
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoDeck
(
g
,
nil
,
SEQ_DECKBOTTOM
,
REASON_EFFECT
)
end
end
--tohand
function
c16400098
.
thcon1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsPreviousLocation
(
LOCATION_ONFIELD
)
end
function
c16400098
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0xce2
)
and
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
))
and
c
:
IsAbleToHand
()
end
function
c16400098
.
thtg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c16400098
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_REMOVED
)
end
function
c16400098
.
thop1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c16400098
.
thfilter
,
tp
,
LOCATION_REMOVED
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
\ No newline at end of file
expansions/script/c16400099.lua
0 → 100644
View file @
5c223ea4
--Geass-身份的更替
function
c16400099
.
initial_effect
(
c
)
--copy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
c16400099
,
1
))
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_SZONE
)
e1
:
SetCountLimit
(
1
,
c16400099
)
e1
:
SetCost
(
c16400099
.
cpcost
)
e1
:
SetTarget
(
c16400099
.
cptg
)
e1
:
SetOperation
(
c16400099
.
cpop
)
c
:
RegisterEffect
(
e1
)
--rtohand
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DRAW
+
CATEGORY_REMOVE
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCode
(
EVENT_FREE_CHAIN
)
e2
:
SetCountLimit
(
1
,
c16400199
)
e2
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e2
:
SetTarget
(
c16400099
.
thtg
)
e2
:
SetOperation
(
c16400099
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
c16400099
.
cpfilter
(
c
,
exc
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
te
=
c
:
CheckActivateEffect
(
true
,
true
,
false
)
if
not
(
c
:
IsSetCard
(
0xce2
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToRemoveAsCost
()
and
te
and
te
:
GetOperation
())
then
return
false
end
local
tg
=
te
:
GetTarget
()
return
(
not
tg
)
or
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
,
nil
,
exc
)
end
function
c16400099
.
cpcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToRemoveAsCost
()
and
Duel
.
IsExistingMatchingCard
(
c16400099
.
cpfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
c
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c16400099
.
cpfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
c
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
te
=
g
:
GetFirst
():
CheckActivateEffect
(
true
,
true
,
false
)
e
:
SetLabelObject
(
te
)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c16400099
.
cptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
local
c
=
e
:
GetHandler
()
local
te
=
e
:
GetLabelObject
()
if
chkc
then
local
tg
=
te
:
GetTarget
()
return
tg
and
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
,
chkc
,
c
)
end
if
chk
==
0
then
return
true
end
e
:
SetProperty
(
te
:
GetProperty
())
e
:
SetLabel
(
te
:
GetLabel
())
e
:
SetLabelObject
(
te
:
GetLabelObject
())
local
tg
=
te
:
GetTarget
()
if
tg
then
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
1
)
end
te
:
SetLabel
(
e
:
GetLabel
())
te
:
SetLabelObject
(
e
:
GetLabelObject
())
e
:
SetLabelObject
(
te
)
Duel
.
ClearOperationInfo
(
0
)
end
function
c16400099
.
cpop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
te
=
e
:
GetLabelObject
()
e
:
SetLabel
(
te
:
GetLabel
())
e
:
SetLabelObject
(
te
:
GetLabelObject
())
local
op
=
te
:
GetOperation
()
if
op
then
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
te
:
SetLabel
(
e
:
GetLabel
())
te
:
SetLabelObject
(
e
:
GetLabelObject
())
end
--draw
function
c16400099
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
ct
=
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_ONFIELD
,
0
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
1
-
tp
,
ct
)
and
Duel
.
GetFieldGroupCount
(
1
-
tp
,
LOCATION_DECK
,
0
)
>=
ct
and
e
:
GetHandler
():
IsAbleToRemove
(
tp
,
POS_FACEUP
,
REASON_EFFECT
)
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
Duel
.
SetTargetParam
(
ct
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
e
:
GetHandler
(),
1
,
tp
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
ct
)
end
function
c16400099
.
activate
(
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
)
if
Duel
.
Draw
(
p
,
d
,
REASON_EFFECT
)
==
ct
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_AVOID_BATTLE_DAMAGE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
1
-
tp
)
Duel
.
BreakEffect
()
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
tp
)
end
end
\ 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