Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-THC-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
GuGu
ygopro-THC-cards
Commits
09ea2177
Commit
09ea2177
authored
Dec 15, 2021
by
wyykak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix c61122.lua
parent
47f5739b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
86 additions
and
87 deletions
+86
-87
script/c61122.lua
script/c61122.lua
+86
-87
No files found.
script/c61122.lua
View file @
09ea2177
--傲霜的透伞-小雪
function
c61122
.
initial_effect
(
c
)
--umb
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
61122
,
0
))
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCost
(
c61122
.
cost
)
e1
:
SetTarget
(
c61122
.
target
)
e1
:
SetOperation
(
c61122
.
operation
)
c
:
RegisterEffect
(
e1
)
--to grave
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DISABLE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetDescription
(
aux
.
Stringid
(
61122
,
1
))
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
61122
)
e2
:
SetCost
(
c61122
.
drcost
)
e2
:
SetTarget
(
c61122
.
drtg
)
e2
:
SetOperation
(
c61122
.
drop
)
e2
:
SetCountLimit
(
1
)
c
:
RegisterEffect
(
e2
)
end
c61122
.
DescSetName
=
0x229
function
c61122
.
umbfilter
(
c
)
local
code
=
c
:
GetOriginalCode
()
local
mt
=
_G
[
"c"
..
code
]
return
mt
and
mt
.
DescSetName
==
0x229
and
c
:
IsDiscardable
()
end
function
c61122
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
and
Duel
.
IsExistingMatchingCard
(
c61122
.
umbfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c61122
.
umbfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
e
:
GetHandler
())
g
:
AddCard
(
e
:
GetHandler
())
Duel
.
SendtoGrave
(
g
,
REASON_COST
+
REASON_DISCARD
)
end
function
c61122
.
filter
(
c
)
return
aux
.
TRUE
end
function
c61122
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsControler
(
1
-
tp
)
and
c61122
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c61122
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c61122
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
2
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c61122
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
tg
:
GetCount
()
>
0
then
Duel
.
Destroy
(
tg
,
REASON_EFFECT
)
end
end
function
c61122
.
exfilter
(
c
)
return
c
:
IsFaceup
()
and
not
c
:
IsDisabled
()
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
c61122
.
drcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToDeckAsCost
()
end
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_COST
)
end
function
c61122
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c61122
.
exfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c61122
.
exfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c61122
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c61122
.
exfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
local
tc
=
g
:
GetFirst
()
local
c
=
e
:
GetHandler
()
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
tc
=
g
:
GetNext
()
end
end
--傲霜的透伞-小雪
function
c61122
.
initial_effect
(
c
)
--umb
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
61122
,
0
))
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_IGNITION
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCost
(
c61122
.
cost
)
e1
:
SetTarget
(
c61122
.
target
)
e1
:
SetOperation
(
c61122
.
operation
)
c
:
RegisterEffect
(
e1
)
--to grave
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetCategory
(
CATEGORY_DISABLE
)
e2
:
SetType
(
EFFECT_TYPE_IGNITION
)
e2
:
SetDescription
(
aux
.
Stringid
(
61122
,
1
))
e2
:
SetRange
(
LOCATION_GRAVE
)
e2
:
SetCountLimit
(
1
,
61122
)
e2
:
SetCost
(
c61122
.
drcost
)
e2
:
SetTarget
(
c61122
.
drtg
)
e2
:
SetOperation
(
c61122
.
drop
)
c
:
RegisterEffect
(
e2
)
end
c61122
.
DescSetName
=
0x229
function
c61122
.
umbfilter
(
c
)
local
code
=
c
:
GetOriginalCode
()
local
mt
=
_G
[
"c"
..
code
]
return
mt
and
mt
.
DescSetName
==
0x229
and
c
:
IsDiscardable
()
end
function
c61122
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsDiscardable
()
and
Duel
.
IsExistingMatchingCard
(
c61122
.
umbfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
e
:
GetHandler
())
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c61122
.
umbfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
e
:
GetHandler
())
g
:
AddCard
(
e
:
GetHandler
())
Duel
.
SendtoGrave
(
g
,
REASON_COST
+
REASON_DISCARD
)
end
function
c61122
.
filter
(
c
)
return
aux
.
TRUE
end
function
c61122
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_ONFIELD
)
and
c
:
IsControler
(
1
-
tp
)
and
c61122
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c61122
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c61122
.
filter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
2
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c61122
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
tg
:
GetCount
()
>
0
then
Duel
.
Destroy
(
tg
,
REASON_EFFECT
)
end
end
function
c61122
.
exfilter
(
c
)
return
c
:
IsFaceup
()
and
not
c
:
IsDisabled
()
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
c61122
.
drcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToDeckAsCost
()
end
Duel
.
SendtoDeck
(
c
,
nil
,
2
,
REASON_COST
)
end
function
c61122
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c61122
.
exfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
c61122
.
exfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c61122
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c61122
.
exfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
nil
)
local
tc
=
g
:
GetFirst
()
local
c
=
e
:
GetHandler
()
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_DISABLE_EFFECT
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
tc
:
RegisterEffect
(
e2
)
tc
=
g
:
GetNext
()
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