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
adc67645
Commit
adc67645
authored
Aug 30, 2020
by
TanakaKotoha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wadashimo
parent
a2b5875f
Pipeline
#657
passed with stages
in 40 minutes and 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
39 deletions
+41
-39
expansions/script/c4212205.lua
expansions/script/c4212205.lua
+41
-39
No files found.
expansions/script/c4212205.lua
View file @
adc67645
...
...
@@ -2,51 +2,53 @@
local
m
=
4212205
local
cm
=
_G
[
"c"
..
m
]
function
cm
.
initial_effect
(
c
)
iFunc
(
c
).
c
(
"RegisterEffect"
,
iFunc
(
c
)
.
e
(
"SetCategory"
,
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
.
e
(
"SetType"
,
EFFECT_TYPE_QUICK_O
)
.
e
(
"SetCode"
,
EVENT_CHAINING
)
.
e
(
"SetRange"
,
LOCATION_HAND
)
.
e
(
"SetCondition"
,
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
~=
ep
and
Duel
.
GetCurrentChain
()
==
0
end
)
.
e
(
"SetCost"
,
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToGraveAsCost
()
and
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_SZONE
,
0
,
1
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_SZONE
,
0
,
1
,
1
,
c
)
g
:
AddCard
(
c
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
)
.
e
(
"SetTarget"
,
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
eg
:
GetCount
(),
0
,
0
)
if
Duel
.
IsExistingMatchingCard
(
cm
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
0
,
0
)
end
end
)
.
e
(
"SetOperation"
,
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateSummon
(
eg
)
and
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
and
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
if
Duel
.
IsExistingMatchingCard
(
cm
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
)
.
Return
())
iFunc
(
c
).
c
(
"RegisterEffect"
,
iFunc
(
c
)
.
e
(
"SetCategory"
,
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
.
e
(
"SetType"
,
EFFECT_TYPE_QUICK_O
)
.
e
(
"SetCode"
,
EVENT_SPSUMMON
)
.
e
(
"SetRange"
,
LOCATION_HAND
)
.
e
(
"SetCondition"
,
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
~=
ep
and
Duel
.
GetCurrentChain
()
==
0
end
)
.
e
(
"SetCost"
,
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToGraveAsCost
()
and
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_SZONE
,
0
,
1
,
c
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_HAND
+
LOCATION_SZONE
,
0
,
1
,
1
,
c
)
g
:
AddCard
(
c
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
)
.
e
(
"SetTarget"
,
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DISABLE_SUMMON
,
eg
,
eg
:
GetCount
(),
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
eg
:
GetCount
(),
0
,
0
)
if
Duel
.
IsExistingMatchingCard
(
cm
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
0
,
0
)
end
end
)
.
e
(
"SetOperation"
,
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateSummon
(
eg
)
if
Duel
.
Destroy
(
eg
,
REASON_EFFECT
)
~=
0
then
if
Duel
.
IsExistingMatchingCard
(
cm
.
mfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
then
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
thfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
end
end
)
.
Return
())
end
function
cm
.
mfilter
(
c
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsFaceup
()
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsFaceup
()
end
function
cm
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsType
(
TYPE_RITUAL
)
and
c
:
IsAbleToHand
()
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsType
(
TYPE_RITUAL
)
and
c
:
IsAbleToHand
()
end
function
cm
.
costfilter
(
c
)
return
c
:
IsType
(
TYPE_EQUIP
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToGraveAsCost
()
return
c
:
IsType
(
TYPE_EQUIP
)
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToGraveAsCost
()
end
function
iFunc
(
c
,
x
)
local
__this
=
(
aux
.
GetValueType
(
c
)
==
"Card"
and
{(
x
==
nil
and
{
Effect
.
CreateEffect
(
c
)}
or
{
x
})[
1
]}
or
{
x
})[
1
]
local
fe
=
function
(
name
,
...
)
(
type
(
__this
[
name
])
==
"function"
and
{
__this
[
name
]}
or
{
""
})[
1
](
__this
,
...
)
return
iFunc
(
c
,
__this
)
end
local
fc
=
function
(
name
,
...
)
this
=
(
type
(
c
[
name
])
==
"function"
and
{
c
[
name
]}
or
{
""
})[
1
](
c
,
...
)
return
iFunc
(
c
,
c
)
end
local
func
=
{
e
=
fe
,
c
=
fc
,
g
=
fc
,
v
=
function
()
return
this
end
,
Return
=
function
()
return
__this
:
Clone
()
end
}
return
func
local
__this
=
(
aux
.
GetValueType
(
c
)
==
"Card"
and
{(
x
==
nil
and
{
Effect
.
CreateEffect
(
c
)}
or
{
x
})[
1
]}
or
{
x
})[
1
]
local
fe
=
function
(
name
,
...
)
(
type
(
__this
[
name
])
==
"function"
and
{
__this
[
name
]}
or
{
""
})[
1
](
__this
,
...
)
return
iFunc
(
c
,
__this
)
end
local
fc
=
function
(
name
,
...
)
this
=
(
type
(
c
[
name
])
==
"function"
and
{
c
[
name
]}
or
{
""
})[
1
](
c
,
...
)
return
iFunc
(
c
,
c
)
end
local
func
=
{
e
=
fe
,
c
=
fc
,
g
=
fc
,
v
=
function
()
return
this
end
,
Return
=
function
()
return
__this
:
Clone
()
end
}
return
func
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