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
2591de10
Commit
2591de10
authored
May 23, 2023
by
songtongtong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
329a5f31
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
272 additions
and
198 deletions
+272
-198
expansions/222DIY.cdb
expansions/222DIY.cdb
+0
-0
expansions/script/c33501032.lua
expansions/script/c33501032.lua
+68
-61
expansions/script/c64832035.lua
expansions/script/c64832035.lua
+127
-60
expansions/script/c92900021.lua
expansions/script/c92900021.lua
+77
-77
No files found.
expansions/222DIY.cdb
View file @
2591de10
No preview for this file type
expansions/script/c33501032.lua
View file @
2591de10
--魔女的事后惩罚
local
m
=
33501032
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetLabelObject
(
ge1
)
e1
:
SetTarget
(
cm
.
thtg
)
e1
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e1
)
if
not
cm
.
global_check
then
cm
.
global_check
=
true
Sre_setback
=
{
0
}
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_CHAINING
)
ge1
:
SetOperation
(
cm
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
cm
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
re
:
GetHandler
()
if
tc
:
IsType
(
TYPE_MONSTER
)
then
Sre_setback
[
1
]
=
tc
end
if
tc
:
GetLocation
()
~=
re
:
GetActivateLocation
()
then
Sre_setback
[
1
]
=
0
end
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
res
=
false
if
Sre_setback
[
1
]
~=
0
then
res
=
Sre_setback
[
1
]
end
if
chk
==
0
then
return
res
and
not
res
:
IsDisabled
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
Sre_setback
[
1
],
1
,
0
,
0
)
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Sre_setback
[
1
]
if
tc
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e2
)
end
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsCanTurnSet
()
and
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
Duel
.
BreakEffect
()
c
:
CancelToGrave
()
Duel
.
ChangePosition
(
c
,
POS_FACEDOWN
)
Duel
.
RaiseEvent
(
c
,
EVENT_SSET
,
e
,
REASON_EFFECT
,
tp
,
tp
,
0
)
end
--魔女的事后惩罚
local
m
=
33501032
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetLabelObject
(
ge1
)
e1
:
SetTarget
(
cm
.
thtg
)
e1
:
SetOperation
(
cm
.
thop
)
c
:
RegisterEffect
(
e1
)
if
not
cm
.
global_check
then
cm
.
global_check
=
true
Sre_setback
=
{
0
}
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_CHAINING
)
ge1
:
SetOperation
(
cm
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
cm
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
re
:
GetHandler
()
if
tc
:
IsType
(
TYPE_MONSTER
)
then
Sre_setback
[
1
]
=
tc
end
-- if tc:GetLocation()~=re:GetActivateLocation() then
-- Sre_setback[1]=0
-- end
end
function
cm
.
thtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
res
=
false
if
Sre_setback
[
1
]
~=
0
then
res
=
Sre_setback
[
1
]
end
if
chk
==
0
then
return
res
and
not
res
:
IsDisabled
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
Sre_setback
[
1
],
1
,
0
,
0
)
end
function
cm
.
thop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
Sre_setback
[
1
]
if
tc
and
tc
:
IsType
(
TYPE_MONSTER
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
tc
:
RegisterEffect
(
e2
)
local
num
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_COUNT
)
for
i
=
1
,
num
do
local
te
,
tgp
=
Duel
.
GetChainInfo
(
i
,
CHAININFO_TRIGGERING_EFFECT
,
CHAININFO_TRIGGERING_PLAYER
)
if
(
te
:
IsActiveType
(
TYPE_MONSTER
)
and
te
:
GetHandler
()
==
tc
)
then
Duel
.
NegateActivation
(
i
)
end
end
end
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsCanTurnSet
()
and
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
Duel
.
BreakEffect
()
c
:
CancelToGrave
()
Duel
.
ChangePosition
(
c
,
POS_FACEDOWN
)
Duel
.
RaiseEvent
(
c
,
EVENT_SSET
,
e
,
REASON_EFFECT
,
tp
,
tp
,
0
)
end
end
\ No newline at end of file
expansions/script/c64832035.lua
View file @
2591de10
--星光歌剧 凤满
if
not
pcall
(
function
()
require
(
"expansions/script/c64839999"
)
end
)
then
require
(
"script/c64839999"
)
end
local
m
,
cm
=
rscf
.
DefineCard
(
64832035
)
function
cm
.
initial_effect
(
c
)
local
e2
=
rsef
.
STO
(
c
,
EVENT_SUMMON_SUCCESS
,{
m
,
1
},{
1
,
m
},
"dish,se,th"
,
"de"
,
rscon
.
sumtype
(
"adv"
),
nil
,
rsop
.
target
({
2
,
"dish"
},{
cm
.
thfilter
,
"th"
,
LOCATION_DECK
}),
cm
.
thop
)
local
e3
=
rsef
.
STO
(
c
,
EVENT_SUMMON_SUCCESS
,{
m
,
2
},{
1
,
m
},
"td,des"
,
"de"
,
rscon
.
sumtype
(
"adv"
),
nil
,
rsop
.
target2
(
cm
.
fun
,
cm
.
tdfilter
,
"td"
,
0
,
LOCATION_ONFIELD
),
cm
.
tdop
)
local
e4
=
rsef
.
STO
(
c
,
EVENT_SUMMON_SUCCESS
,{
m
,
3
},{
1
,
m
},
"dish,dr"
,
"de"
,
rscon
.
sumtype
(
"adv"
),
nil
,
rsop
.
target
({
cm
.
dishfilter
,
"dish"
,
LOCATION_HAND
,
0
,
1
},{
1
,
"dr"
}),
cm
.
drop
)
--summon with 1 tribute
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SUMMON_PROC
)
e1
:
SetCondition
(
cm
.
otcon
)
e1
:
SetOperation
(
cm
.
otop
)
e1
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
otfilter
(
c
)
return
c
:
IsSetCard
(
0x6410
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
cm
.
otcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
otfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
return
c
:
IsLevelAbove
(
5
)
and
minc
<=
1
and
#
mg
>
0
end
function
cm
.
otop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
rsop
.
SelectRemove
(
tp
,
cm
.
otfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,{
POS_FACEUP
,
REASON_COST
})
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
end
function
cm
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x6410
)
and
c
:
IsAbleToHand
()
end
function
cm
.
thop
(
e
,
tp
)
if
rsop
.
SelectToGrave
(
tp
,
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
2
,
2
,{
REASON_DISCARD
+
REASON_EFFECT
},
REASON_EFFECT
)
>
0
then
rsop
.
SelectToHand
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
,{})
end
end
function
cm
.
fun
(
g
,
e
,
tp
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
tp
,
LOCATION_ONFIELD
)
end
function
cm
.
tdfilter
(
c
,
e
,
tp
)
return
c
:
IsAbleToDeck
()
and
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
c
:
GetEquipGroup
())
end
function
cm
.
tdop
(
e
,
tp
)
local
ct
,
og
,
tc
=
rsop
.
SelectToDeck
(
tp
,
cm
.
tdfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
,{},
e
,
tp
)
if
tc
and
tc
:
IsLocation
(
LOCATION_DECK
+
LOCATION_EXTRA
)
then
rsop
.
SelectOC
(
nil
,
true
)
rsop
.
SelectDestroy
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
,{})
end
end
function
cm
.
dishfilter
(
c
)
return
c
:
IsDiscardable
(
REASON_EFFECT
)
and
c
:
IsSetCard
(
0x6410
)
end
function
cm
.
drop
(
e
,
tp
)
if
rsop
.
SelectToGrave
(
tp
,
cm
.
dishfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,{
REASON_EFFECT
+
REASON_DISCARD
})
>
0
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
\ No newline at end of file
--星光歌剧 凤满
local
m
=
64832035
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
--summon with 1 tribute
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
+
EFFECT_FLAG_UNCOPYABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SUMMON_PROC
)
e1
:
SetCondition
(
cm
.
otcon
)
e1
:
SetOperation
(
cm
.
otop
)
e1
:
SetValue
(
SUMMON_TYPE_ADVANCE
)
c
:
RegisterEffect
(
e1
)
--Set
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetCountLimit
(
1
,
m
)
e2
:
SetCondition
(
cm
.
setcon
)
e2
:
SetTarget
(
cm
.
settg
)
e2
:
SetOperation
(
cm
.
setop
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
otfilter
(
c
)
return
c
:
IsSetCard
(
0x6410
)
and
c
:
IsAbleToRemoveAsCost
()
end
function
cm
.
otcon
(
e
,
c
,
minc
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
local
mg
=
Duel
.
GetMatchingGroup
(
cm
.
otfilter
,
tp
,
LOCATION_EXTRA
,
0
,
nil
)
return
c
:
IsLevelAbove
(
5
)
and
minc
<=
1
and
#
mg
>
0
end
function
cm
.
otop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
rsop
.
SelectRemove
(
tp
,
cm
.
otfilter
,
tp
,
LOCATION_EXTRA
,
0
,
1
,
1
,
nil
,{
POS_FACEUP
,
REASON_COST
})
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
end
function
cm
.
setcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
function
cm
.
thfilter
(
c
)
return
c
:
IsSetCard
(
0x6410
)
and
c
:
IsAbleToHand
()
end
function
cm
.
disfilter
(
c
)
return
c
:
IsSetCard
(
0x6410
)
and
c
:
IsDiscardable
()
end
function
cm
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
b1
=
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
2
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
local
b2
=
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToDeck
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
local
b3
=
Duel
.
IsExistingMatchingCard
(
cm
.
disfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
if
chk
==
0
then
return
b1
or
b2
or
b3
end
local
off
=
1
local
ops
=
{}
local
opval
=
{}
if
b1
then
ops
[
off
]
=
aux
.
Stringid
(
m
,
1
)
opval
[
off
]
=
0
off
=
off
+
1
end
if
b2
then
ops
[
off
]
=
aux
.
Stringid
(
m
,
2
)
opval
[
off
]
=
1
off
=
off
+
1
end
if
b3
then
ops
[
off
]
=
aux
.
Stringid
(
m
,
3
)
opval
[
off
]
=
2
off
=
off
+
1
end
local
op
=
Duel
.
SelectOption
(
tp
,
table.unpack
(
ops
))
+
1
local
sel
=
opval
[
op
]
e
:
SetLabel
(
sel
)
Duel
.
Hint
(
HINT_OPSELECTED
,
1
-
tp
,
aux
.
Stringid
(
m
,
sel
+
1
))
if
sel
==
0
then
e
:
SetCategory
(
CATEGORY_TOHAND
+
CATEGORY_SEARCH
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
elseif
sel
==
1
then
e
:
SetCategory
(
CATEGORY_DESTROY
+
CATEGORY_TODECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
1
-
tp
,
LOCATION_ONFIELD
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
tp
,
LOCATION_ONFIELD
)
else
e
:
SetCategory
(
CATEGORY_DRAW
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
end
function
cm
.
setop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
sel
=
e
:
GetLabel
()
local
c
=
e
:
GetHandler
()
local
b1
=
Duel
.
IsExistingMatchingCard
(
Card
.
IsDiscardable
,
tp
,
LOCATION_HAND
,
0
,
2
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
local
b2
=
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToDeck
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
local
b3
=
Duel
.
IsExistingMatchingCard
(
cm
.
disfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
)
and
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
if
sel
==
0
then
if
Duel
.
DiscardHand
(
tp
,
Card
.
IsDiscardable
,
2
,
2
,
REASON_EFFECT
+
REASON_DISCARD
,
nil
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
elseif
sel
==
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToDeck
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
if
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESREPLACE
)
local
g2
=
Duel
.
SelectMatchingCard
(
tp
,
nil
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
)
Duel
.
Destroy
(
g2
,
REASON_EFFECT
)
end
else
if
Duel
.
DiscardHand
(
tp
,
cm
.
disfilter
,
1
,
1
,
REASON_EFFECT
+
REASON_DISCARD
,
nil
)
~=
0
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
end
expansions/script/c92900021.lua
View file @
2591de10
--Virtual UP-若白
local
m
=
92900021
local
cm
=
_G
[
"c"
..
m
]
function
c92900021
.
initial_effect
(
c
)
--xyz summon
c
:
EnableReviveLimit
()
aux
.
AddXyzProcedureLevelFree
(
c
,
cm
.
mfilter
,
cm
.
xyzcheck
,
2
,
2
,
cm
.
ovfilter
,
aux
.
Stringid
(
m
,
0
))
--disable spsummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetTargetRange
(
1
,
1
)
e3
:
SetTarget
(
cm
.
splimit
)
c
:
RegisterEffect
(
e3
)
--todeck
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
cm
.
tdcost
)
e2
:
SetTarget
(
cm
.
tdtg
)
e2
:
SetOperation
(
cm
.
tdop
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
xyzcheck
(
g
)
return
g
:
GetClassCount
(
Card
.
GetRace
)
==
g
:
GetCount
()
end
function
cm
.
mfilter
(
c
,
xyzc
)
return
c
:
IsXyzType
(
TYPE_XYZ
)
and
c
:
IsLevel
(
5
)
end
function
cm
.
xyzcheck
(
g
)
return
g
:
GetClassCount
(
Card
.
GetRace
)
==
g
:
GetCount
()
end
function
cm
.
ovfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsSetCard
(
0x9a0
)
and
not
c
:
IsCode
(
m
)
end
function
cm
.
lvcheck
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsLevelAbove
(
1
)
end
function
cm
.
lvfilter
(
c
,
lv
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsLevel
(
lv
)
end
function
cm
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
lvcheck
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
nil
)
local
lv
=
c
:
GetLevel
()
if
lv
>
0
then
return
g
and
#
g
>
0
and
not
g
:
IsExists
(
cm
.
lvfilter
,
1
,
nil
,
lv
,
sump
)
--g:IsExists(cm.lvfilter,1,nil,lv,sump)
else
return
false
end
end
function
cm
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
cm
.
tdfilter
(
c
)
return
c
:
IsAbleToDeck
()
end
function
cm
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
cm
.
tdfilter
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
tdfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
tdfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
end
function
cm
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
end
end
--Virtual UP-若白
local
m
=
92900021
local
cm
=
_G
[
"c"
..
m
]
function
c92900021
.
initial_effect
(
c
)
--xyz summon
c
:
EnableReviveLimit
()
aux
.
AddXyzProcedureLevelFree
(
c
,
cm
.
mfilter
,
cm
.
xyzcheck
,
2
,
2
,
cm
.
ovfilter
,
aux
.
Stringid
(
m
,
0
))
--disable spsummon
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetCode
(
EFFECT_CANNOT_SPECIAL_SUMMON
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetTargetRange
(
1
,
1
)
e3
:
SetTarget
(
cm
.
splimit
)
c
:
RegisterEffect
(
e3
)
--todeck
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
m
,
1
))
e2
:
SetCategory
(
CATEGORY_TODECK
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e2
:
SetCountLimit
(
1
)
e2
:
SetCost
(
cm
.
tdcost
)
e2
:
SetTarget
(
cm
.
tdtg
)
e2
:
SetOperation
(
cm
.
tdop
)
c
:
RegisterEffect
(
e2
)
end
function
cm
.
xyzcheck
(
g
)
return
g
:
GetClassCount
(
Card
.
GetRace
)
==
g
:
GetCount
()
end
function
cm
.
mfilter
(
c
,
xyzc
)
return
c
:
IsXyzType
(
TYPE_XYZ
)
and
c
:
IsLevel
(
5
)
end
function
cm
.
xyzcheck
(
g
)
return
g
:
GetClassCount
(
Card
.
GetRace
)
==
g
:
GetCount
()
end
function
cm
.
ovfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
IsSetCard
(
0x9a0
)
and
not
c
:
IsCode
(
m
)
end
function
cm
.
lvcheck
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsLevelAbove
(
1
)
end
function
cm
.
lvfilter
(
c
,
lv
,
tp
)
return
c
:
IsControler
(
tp
)
and
c
:
IsLevel
(
lv
)
end
function
cm
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
lvcheck
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
lv
=
c
:
GetLevel
()
if
lv
>
0
then
return
g
and
#
g
>
0
and
not
g
:
IsExists
(
cm
.
lvfilter
,
1
,
nil
,
lv
,
sump
)
--g:IsExists(cm.lvfilter,1,nil,lv,sump)
else
return
false
end
end
function
cm
.
tdcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
e
:
GetHandler
():
RemoveOverlayCard
(
tp
,
1
,
1
,
REASON_COST
)
end
function
cm
.
tdfilter
(
c
)
return
c
:
IsAbleToDeck
()
end
function
cm
.
tdtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
cm
.
tdfilter
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
cm
.
tdfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
cm
.
tdfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
e
:
GetHandler
())
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
end
function
cm
.
tdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
SendtoDeck
(
tc
,
nil
,
2
,
REASON_EFFECT
)
end
end
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