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
05768e53
Commit
05768e53
authored
Nov 02, 2024
by
花桃白音
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tgkwc fear add costself
parent
bab0ffee
Pipeline
#30905
passed with stages
in 30 minutes and 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
34 deletions
+37
-34
expansions/script/c4212320.lua
expansions/script/c4212320.lua
+37
-34
No files found.
expansions/script/c4212320.lua
View file @
05768e53
--
炼金工作室-测试卡
--
手冲魔女-菲雅
local
m
=
4212320
local
cm
=
_G
[
"c"
..
m
]
--増援
function
cm
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -9,12 +8,24 @@ function cm.initial_effect(c)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCountLimit
(
1
,
c
m
)
e1
:
SetCountLimit
(
1
,
m
)
e1
:
SetCost
(
cm
.
discost
)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
activate
)
c
:
RegisterEffect
(
e1
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
cm
.
cache
=
{}
function
cm
.
filter
(
c
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c
:
IsAbleToHand
()
and
cm
.
CheckDiscard
(
c
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
and
not
(
c
:
IsCode
(
e
:
GetHandler
():
GetCode
()))
...
...
@@ -30,7 +41,12 @@ function cm.CheckDiscard(c,e,tp,eg,ep,ev,re,r,rp)
end
return
temp
(
tc
,
te
,
f
)
end
local
tempc
=
cm
.
IgnoreActionCheck
(
Duel
.
CreateToken
,
c
:
GetControler
(),
code
)
local
tempc
=
(
function
(
tp
,
code
)
Duel
.
DisableActionCheck
(
true
)
local
sret
=
Duel
.
CreateToken
(
tp
,
code
)
Duel
.
DisableActionCheck
(
false
)
return
sret
end
)(
c
:
GetControler
(),
code
)
Card
.
RegisterEffect
=
temp
local
found
=
false
for
_
,
te
in
ipairs
(
eset
)
do
...
...
@@ -42,22 +58,29 @@ function cm.CheckDiscard(c,e,tp,eg,ep,ev,re,r,rp)
if
e
==
te
then
return
tempc
end
return
temp_
(
e
)
end
mt
.
IsDiscardable
=
function
(
tc
,
...
)
if
mt
then
mt
.
IsDiscardable
=
function
(
tc
,
...
)
if
tempc
==
tc
then
found
=
true
end
return
Card
.
IsDiscardable
(
tc
,
...
)
end
pcall
(
function
()
cost
(
te
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
end
)
mt
.
IsDiscardable
=
nil
return
Card
.
IsDiscardable
(
tc
,
...
)
end
pcall
(
function
()
cost
(
te
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
0
)
end
)
mt
.
IsDiscardable
=
nil
end
Effect
.
GetHandler
=
temp_
end
end
cm
.
cache
[
code
]
=
(
found
and
1
or
0
)
return
found
end
function
cm
.
IgnoreActionCheck
(
f
,
...
)
Duel
.
DisableActionCheck
(
true
)
function
cm
.
discost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsDiscardable
()
end
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
end
--[[
local cr=coroutine.create(f)
local ret={}
while coroutine.status(cr)~="dead" do
...
...
@@ -65,24 +88,4 @@ function cm.IgnoreActionCheck(f,...)
for i=2,#sret do
table.insert(ret,sret[i])
end
end
Duel
.
DisableActionCheck
(
false
)
return
table.unpack
(
ret
)
end
function
cm
.
discost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsDiscardable
()
end
Duel
.
SendtoGrave
(
c
,
REASON_COST
+
REASON_DISCARD
)
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
end
end
\ No newline at end of file
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