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
Nguyễn Anh Kiệt
ygopro-222DIY-cards
Commits
6090c272
Commit
6090c272
authored
Apr 29, 2024
by
花桃白音
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix operation
parent
b1becd0b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
36 deletions
+41
-36
expansions/script/c4260601.lua
expansions/script/c4260601.lua
+40
-35
expansions/script/c4260614.lua
expansions/script/c4260614.lua
+1
-1
No files found.
expansions/script/c4260601.lua
View file @
6090c272
...
...
@@ -24,42 +24,47 @@ function cm.initial_effect(c)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
)
.
e
(
"SetOperation"
,
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
local
setg
=
Duel
.
GetMatchingGroup
(
Card
.
IsSSetable
,
tp
,
LOCATION_HAND
,
0
,
g
):
Filter
(
Card
.
IsType
,
nil
,
TYPE_TRAP
)
if
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
and
Duel
.
Destroy
(
tg
,
REASON_EFFECT
)
~=
0
and
setg
:
GetCount
()
>
0
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
tc
=
setg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
if
Duel
.
SSet
(
tp
,
tc
,
tp
,
false
)
~=
0
then
local
c
=
e
:
GetHandler
()
local
fid
=
c
:
GetFieldID
()
tc
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
fid
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e1
:
SetCountLimit
(
1
)
e1
:
SetLabel
(
fid
)
e1
:
SetLabelObject
(
tc
)
e1
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Group
.
FromCards
(
e
:
GetLabelObject
())
return
g
:
IsContains
(
re
:
GetHandler
())
and
tc
:
GetFlagEffectLabel
(
m
)
==
e
:
GetLabel
()
end
)
e1
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
end
)
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
Destroy
(
tg
,
REASON_EFFECT
)
local
exc
=
nil
if
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
then
exc
=
e
:
GetHandler
()
end
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToRemove
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
)
if
g
and
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_EFFECT
)
~=
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
exc
)
if
tg
and
Duel
.
Destroy
(
tg
,
REASON_EFFECT
)
~=
0
then
local
setg
=
Duel
.
GetMatchingGroup
(
Card
.
IsSSetable
,
tp
,
LOCATION_HAND
,
0
,
g
):
Filter
(
Card
.
IsType
,
nil
,
TYPE_TRAP
)
if
setg
:
GetCount
()
>
0
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
<=
0
then
return
end
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
0
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
tc
=
setg
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
if
Duel
.
SSet
(
tp
,
tc
,
tp
,
false
)
~=
0
then
local
c
=
e
:
GetHandler
()
local
fid
=
c
:
GetFieldID
()
tc
:
RegisterFlagEffect
(
m
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
,
fid
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_CHAIN_SOLVED
)
e1
:
SetCountLimit
(
1
)
e1
:
SetLabel
(
fid
)
e1
:
SetLabelObject
(
tc
)
e1
:
SetCondition
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Group
.
FromCards
(
e
:
GetLabelObject
())
return
g
:
IsContains
(
re
:
GetHandler
())
and
tc
:
GetFlagEffectLabel
(
m
)
==
e
:
GetLabel
()
end
)
e1
:
SetTarget
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
nil
)
end
end
)
e1
:
SetOperation
(
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
aux
.
TRUE
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
Destroy
(
tg
,
REASON_EFFECT
)
end
end
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
)
e1
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
end
end
...
...
expansions/script/c4260614.lua
View file @
6090c272
...
...
@@ -10,7 +10,7 @@ function cm.initial_effect(c)
.
e
(
"SetCountLimit"
,
1
,
4260609
)
.
e
(
"SetCost"
,
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
c
:
IsAbleToRemove
()
end
if
chk
==
0
then
return
c
:
IsAbleToRemove
AsCost
()
end
Duel
.
Remove
(
c
,
POS_FACEUP
,
REASON_COST
)
end
)
.
e
(
"SetTarget"
,
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetFieldGroupCount
(
tp
,
LOCATION_DECK
,
0
)
>=
5
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