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
Ai
ygopro-222DIY-cards
Commits
b2b7c9ce
Commit
b2b7c9ce
authored
Mar 15, 2020
by
TanakaKotoha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suit
parent
8104a6f4
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
114 deletions
+81
-114
expansions/script/c33340010.lua
expansions/script/c33340010.lua
+53
-85
expansions/script/c65071030.lua
expansions/script/c65071030.lua
+1
-1
expansions/script/c66915002.lua
expansions/script/c66915002.lua
+7
-12
expansions/script/c66915006.lua
expansions/script/c66915006.lua
+3
-3
expansions/script/c66915007.lua
expansions/script/c66915007.lua
+17
-13
No files found.
expansions/script/c33340010.lua
View file @
b2b7c9ce
--热核污染病毒-Ð
--热核污染病毒-Ð
if
not
pcall
(
function
()
require
(
"expansions/script/c33340004"
)
end
)
then
require
(
"script/c33340004"
)
end
local
m
=
33340010
local
m
=
33340010
local
cm
=
_G
[
"c"
..
m
]
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
function
cm
.
initial_effect
(
c
)
--link summon
--link summon
c
:
EnableReviveLimit
()
c
:
EnableReviveLimit
()
aux
.
AddLinkProcedure
(
c
,
cm
.
matfilter
,
2
,
2
)
aux
.
AddLinkProcedure
(
c
,
rccv
.
IsLinkSet
,
2
,
2
)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetCategory
(
CATEGORY_TODECK
)
e1
:
SetCategory
(
CATEGORY_TODECK
)
...
@@ -14,105 +15,72 @@ function cm.initial_effect(c)
...
@@ -14,105 +15,72 @@ function cm.initial_effect(c)
e1
:
SetTarget
(
cm
.
tdtg
)
e1
:
SetTarget
(
cm
.
tdtg
)
e1
:
SetOperation
(
cm
.
tdop
)
e1
:
SetOperation
(
cm
.
tdop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
--negate
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_REMOVE
+
CATEGORY_TODECK
)
e2
:
SetCategory
(
CATEGORY_SEARCH
+
CATEGORY_TOHAND
)
e2
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e2
:
SetCode
(
EVENT_PHASE
+
PHASE_END
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCountLimit
(
1
,
m
+
100
)
e2
:
SetCountLimit
(
1
)
e2
:
SetTarget
(
cm
.
thtg
)
e2
:
SetCondition
(
cm
.
discon
)
e2
:
SetOperation
(
cm
.
thop
)
e2
:
SetCost
(
cm
.
discost
)
e2
:
SetTarget
(
cm
.
distg
)
e2
:
SetOperation
(
cm
.
disop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
local
e3
=
Effect
.
CreateEffect
(
c
)
local
e6
=
rsef
.
QO
(
c
,
nil
,{
m
,
2
},{
1
,
33341010
},
"sp"
,
nil
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
nil
,
rscost
.
cost
(
cm
.
thfilter
,
"th"
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
),
rsop
.
target
(
rscf
.
spfilter
(),
"sp"
),
cm
.
spop
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e3
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EFFECT_DESTROY_REPLACE
)
e3
:
SetTarget
(
cm
.
reptg
)
e3
:
SetOperation
(
cm
.
repop
)
c
:
RegisterEffect
(
e3
)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
m
,
3
))
e4
:
SetCategory
(
CATEGORY_TOHAND
)
e4
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e4
:
SetCode
(
EVENT_LEAVE_FIELD
)
e4
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DELAY
)
e4
:
SetCondition
(
cm
.
thcon2
)
e4
:
SetTarget
(
cm
.
thtg2
)
e4
:
SetOperation
(
cm
.
thop2
)
c
:
RegisterEffect
(
e4
)
end
end
function
cm
.
thcon2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
cm
.
rssetcode
=
"Thermonuclear"
local
c
=
e
:
GetHandler
()
function
cm
.
tdfilter
(
c
)
return
c
:
IsReason
(
REASON_EFFECT
)
return
c
:
IsAbleToDeck
()
and
rccv
.
IsSet
(
c
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
end
function
cm
.
thfilter2
(
c
)
return
c
.
setcard
==
"Rcore"
and
c
:
IsAbleToHand
()
and
c
:
IsFaceup
()
end
end
function
cm
.
t
htg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
t
dtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
t
hfilter2
,
tp
,
0x3c
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
t
dfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
nil
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TO
HAND
,
nil
,
1
,
tp
,
0x3c
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TO
DECK
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
)
end
end
function
cm
.
t
hop2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
t
dop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_
ATOHAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_
TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
NecroValleyFilter
(
cm
.
thfilter2
),
tp
,
0x3c
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tdfilter
,
tp
,
LOCATION_HAND
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
Sendto
Hand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
Sendto
Deck
(
g
,
1
-
tp
,
0
,
REASON_EFFECT
)
end
end
end
end
function
cm
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
thcfilter
,
tp
,
0x2
,
0
,
1
,
nil
)
end
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
Duel
.
IsChainNegatable
(
ev
)
return
Duel
.
SelectEffectYesNo
(
tp
,
e
:
GetHandler
(),
96
)
end
function
cm
.
thcfilter
(
c
,
tp
)
return
c
.
setcard
==
"Rcore"
end
end
function
cm
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
cfilter
(
c
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
return
not
c
:
IsPublic
()
and
rccv
.
IsSet
(
c
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thcfilter
,
tp
,
0x2
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
1
-
tp
,
REASON_EFFECT
)
end
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
discost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>
2
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
end
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
function
cm
.
milfilter
(
c
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
cfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
return
c
.
setcard
==
"Rcore"
and
c
:
IsAbleToHand
()
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
e
:
SetLabelObject
(
g
:
GetFirst
())
end
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
distg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
<
3
then
return
end
if
chk
==
0
then
return
aux
.
nbcon
(
tp
,
re
)
end
Duel
.
ConfirmDecktop
(
tp
,
3
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
local
g
=
Duel
.
GetDecktopGroup
(
tp
,
3
)
if
re
:
GetHandler
():
IsAbleToRemove
()
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
if
g
:
GetCount
()
>
0
then
Duel
.
SetTargetCard
(
e
:
GetLabelObject
())
Duel
.
DisableShuffleCheck
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_REMOVE
,
eg
,
1
,
0
,
0
)
if
g
:
IsExists
(
cm
.
milfilter
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
2
))
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_HAND
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
sg
=
g
:
FilterSelect
(
tp
,
cm
.
milfilter
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
sg
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
Duel
.
ShuffleHand
(
tp
)
g
:
Sub
(
sg
)
end
end
Duel
.
SortDecktop
(
tp
,
tp
,
g
:
GetCount
())
end
end
function
cm
.
tdfilter
(
c
)
return
c
:
IsAbleToDeck
()
and
c
.
setcard
==
"Rcore"
end
end
function
cm
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
tdfilter
,
tp
,
0x2
,
0
,
1
,
nil
,
tp
)
end
local
c
=
e
:
GetHandler
()
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
0x2
)
local
tc
=
rscf
.
GetTargetCard
()
end
if
Duel
.
NegateActivation
(
ev
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
and
Duel
.
Remove
(
eg
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
function
cm
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
and
tc
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
tdfilter
,
tp
,
0x2
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
SendtoDeck
(
g
,
1
-
tp
,
0
,
REASON_EFFECT
)
end
end
end
end
function
cm
.
matfilter
(
c
)
function
cm
.
thfilter
(
c
)
return
c
.
setcard
==
"Rcore"
return
c
:
IsFaceup
()
and
rccv
.
IsSet
(
c
)
and
c
:
IsAbleToHandAsCost
()
end
function
cm
.
spop
(
e
,
tp
)
local
c
=
rscf
.
GetRelationThisCard
(
e
)
if
c
then
rssf
.
SpecialSummon
(
c
)
end
end
end
\ No newline at end of file
expansions/script/c65071030.lua
View file @
b2b7c9ce
...
@@ -38,7 +38,7 @@ function c65071030.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -38,7 +38,7 @@ function c65071030.operation(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
.
Damage
(
p
,
d
,
REASON_EFFECT
)
Duel
.
Damage
(
p
,
d
,
REASON_EFFECT
)
else
else
local
sg
=
Duel
.
GetMatchingGroup
(
c65071030
.
tgfil
,
0
,
LOCATION_MZONE
,
e
:
GetLabel
())
local
sg
=
Duel
.
GetMatchingGroup
(
c65071030
.
tgfil
,
tp
,
0
,
LOCATION_MZONE
,
nil
,
e
:
GetLabel
())
if
sg
:
GetCount
()
>
0
then
if
sg
:
GetCount
()
>
0
then
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
end
end
...
...
expansions/script/c66915002.lua
View file @
b2b7c9ce
...
@@ -4,7 +4,6 @@ function c66915002.initial_effect(c)
...
@@ -4,7 +4,6 @@ function c66915002.initial_effect(c)
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
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCountLimit
(
1
,
66915002
)
e1
:
SetCountLimit
(
1
,
66915002
)
e1
:
SetTarget
(
c66915002
.
target
)
e1
:
SetTarget
(
c66915002
.
target
)
e1
:
SetOperation
(
c66915002
.
activate
)
e1
:
SetOperation
(
c66915002
.
activate
)
...
@@ -29,18 +28,14 @@ function c66915002.filter(c)
...
@@ -29,18 +28,14 @@ function c66915002.filter(c)
return
((
c
:
GetType
()
==
TYPE_SPELL
+
TYPE_CONTINUOUS
or
c
:
GetType
()
==
TYPE_TRAP
+
TYPE_CONTINUOUS
)
and
c
:
IsSetCard
(
0x374
))
and
c
:
IsSSetable
()
or
c
:
IsCode
(
66915001
)
return
((
c
:
GetType
()
==
TYPE_SPELL
+
TYPE_CONTINUOUS
or
c
:
GetType
()
==
TYPE_TRAP
+
TYPE_CONTINUOUS
)
and
c
:
IsSetCard
(
0x374
))
and
c
:
IsSSetable
()
or
c
:
IsCode
(
66915001
)
end
end
function
c66915002
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c66915002
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_DECK
)
and
chkc
:
IsControler
(
tp
)
and
c66915002
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c66915002
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
local
ct
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
not
e
:
GetHandler
():
IsLocation
(
LOCATION_SZONE
)
then
ct
=
ct
-
1
end
if
chk
==
0
then
return
ct
>
0
and
Duel
.
IsExistingTarget
(
c66915002
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c66915002
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
end
end
function
c66915002
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c66915002
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsSSetable
()
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c66915002
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
Duel
.
SSet
(
tp
,
tc
)
if
g
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
Duel
.
SSet
(
tp
,
g
)
local
tc
=
g
:
GetFirst
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_TRAP_ACT_IN_SET_TURN
)
e1
:
SetCode
(
EFFECT_TRAP_ACT_IN_SET_TURN
)
...
...
expansions/script/c66915006.lua
View file @
b2b7c9ce
...
@@ -33,7 +33,7 @@ function cm.initial_effect(c)
...
@@ -33,7 +33,7 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e111
)
c
:
RegisterEffect
(
e111
)
end
end
function
cm
.
seqfilter
(
c
)
function
cm
.
seqfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x374
)
and
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x374
)
and
c
:
IsType
(
TYPE_CONTINUOUS
)
and
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
)
)
end
end
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
tg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_SZONE
)
and
chkc
:
IsControler
(
tp
)
and
cm
.
seqfilter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_SZONE
)
and
chkc
:
IsControler
(
tp
)
and
cm
.
seqfilter
(
chkc
)
end
...
@@ -52,10 +52,10 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
...
@@ -52,10 +52,10 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end
end
function
cm
.
filter
(
c
,
e
,
tp
)
function
cm
.
filter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x374
)
and
c
:
IsAbleToDeck
()
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x374
)
and
c
:
IsAbleToDeck
()
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
,
c
:
GetCode
())
and
c
:
IsType
(
TYPE_TRAP
+
TYPE_SPELL
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
,
c
:
GetCode
())
and
c
:
IsType
(
TYPE_TRAP
+
TYPE_SPELL
)
and
c
:
IsType
(
TYPE_CONTINUOUS
)
end
end
function
cm
.
spfilter
(
c
,
e
,
tp
,
code
)
function
cm
.
spfilter
(
c
,
e
,
tp
,
code
)
return
c
:
IsSetCard
(
0x374
)
and
not
c
:
IsCode
(
code
)
and
c
:
IsType
(
TYPE_TRAP
+
TYPE_SPELL
)
return
c
:
IsSetCard
(
0x374
)
and
not
c
:
IsCode
(
code
)
and
c
:
IsType
(
TYPE_TRAP
+
TYPE_SPELL
)
and
c
:
IsType
(
TYPE_CONTINUOUS
)
end
end
function
cm
.
targets
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
targets
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_SZONE
)
and
cm
.
filter
(
chkc
,
e
,
tp
)
end
if
chkc
then
return
chkc
:
IsControler
(
tp
)
and
chkc
:
IsLocation
(
LOCATION_SZONE
)
and
cm
.
filter
(
chkc
,
e
,
tp
)
end
...
...
expansions/script/c66915007.lua
View file @
b2b7c9ce
...
@@ -27,15 +27,23 @@ function cm.initial_effect(c)
...
@@ -27,15 +27,23 @@ function cm.initial_effect(c)
e3
:
SetTarget
(
cm
.
tgtg
)
e3
:
SetTarget
(
cm
.
tgtg
)
e3
:
SetOperation
(
cm
.
tgop
)
e3
:
SetOperation
(
cm
.
tgop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
--cannot be link material
local
e33
=
Effect
.
CreateEffect
(
c
)
e33
:
SetType
(
EFFECT_TYPE_SINGLE
)
e33
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e33
:
SetCode
(
EFFECT_CANNOT_BE_LINK_MATERIAL
)
e33
:
SetValue
(
1
)
c
:
RegisterEffect
(
e33
)
end
end
function
cm
.
spfilter
(
c
)
function
cm
.
spfilter
(
c
)
return
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c
:
IsAbleToGraveAsCost
()
and
c
:
IsSetCard
(
0x374
)
and
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
)
return
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c
:
IsAbleToGraveAsCost
()
and
c
:
IsSetCard
(
0x374
)
and
(
c
:
IsType
(
TYPE_SPELL
)
or
c
:
IsType
(
TYPE_TRAP
)
)
end
end
function
cm
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
spcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tp
=
e
:
Get
Control
()
local
tp
=
e
:
Get
Handler
():
GetControler
()
return
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_SZONE
,
0
,
1
,
nil
)
return
not
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_SZONE
,
0
,
1
,
nil
)
end
end
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
function
cm
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
local
tp
=
e
:
GetHandler
():
GetControler
()
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_SZONE
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
spfilter
,
tp
,
LOCATION_HAND
+
LOCATION_SZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
...
@@ -43,18 +51,14 @@ function cm.filter(c)
...
@@ -43,18 +51,14 @@ function cm.filter(c)
return
((
c
:
GetType
()
==
TYPE_SPELL
+
TYPE_CONTINUOUS
or
c
:
GetType
()
==
TYPE_TRAP
+
TYPE_CONTINUOUS
)
and
c
:
IsSetCard
(
0x374
))
and
c
:
IsSSetable
()
or
c
:
IsCode
(
66915001
)
return
((
c
:
GetType
()
==
TYPE_SPELL
+
TYPE_CONTINUOUS
or
c
:
GetType
()
==
TYPE_TRAP
+
TYPE_CONTINUOUS
)
and
c
:
IsSetCard
(
0x374
))
and
c
:
IsSSetable
()
or
c
:
IsCode
(
66915001
)
end
end
function
cm
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
cm
.
tgtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_DECK
)
and
chkc
:
IsControler
(
tp
)
and
cm
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
local
ct
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
not
e
:
GetHandler
():
IsLocation
(
LOCATION_SZONE
)
then
ct
=
ct
-
1
end
if
chk
==
0
then
return
ct
>
0
and
Duel
.
IsExistingTarget
(
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
end
end
function
cm
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
tgop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsSSetable
()
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_DECK
+
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SSet
(
tp
,
tc
)
if
g
:
GetCount
()
>
0
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
Duel
.
SSet
(
tp
,
g
)
local
tc
=
g
:
GetFirst
()
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_TRAP_ACT_IN_SET_TURN
)
e1
:
SetCode
(
EFFECT_TRAP_ACT_IN_SET_TURN
)
...
...
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