Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts-888
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
3
Merge Requests
3
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
MyCard
ygopro-scripts-888
Commits
728ea03b
Commit
728ea03b
authored
Dec 26, 2024
by
wind2009
Committed by
GitHub
Dec 26, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Duel.GetSZoneCount() (#2788)
* Use Duel.GetSZoneCount() * Add Duel.GetSzoneCount() cards
parent
98176f51
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
25 additions
and
69 deletions
+25
-69
c10024317.lua
c10024317.lua
+1
-6
c18716735.lua
c18716735.lua
+1
-6
c27946124.lua
c27946124.lua
+1
-1
c29223325.lua
c29223325.lua
+6
-20
c33256280.lua
c33256280.lua
+1
-6
c33773528.lua
c33773528.lua
+1
-1
c36346532.lua
c36346532.lua
+2
-1
c47408488.lua
c47408488.lua
+3
-2
c54895237.lua
c54895237.lua
+4
-5
c60473572.lua
c60473572.lua
+1
-6
c63086455.lua
c63086455.lua
+1
-2
c69351984.lua
c69351984.lua
+1
-6
c7868571.lua
c7868571.lua
+1
-6
c91299846.lua
c91299846.lua
+1
-1
No files found.
c10024317.lua
View file @
728ea03b
...
...
@@ -29,12 +29,7 @@ function c10024317.initial_effect(c)
end
function
c10024317
.
desfilter
(
c
,
tp
)
if
c
:
IsFacedown
()
then
return
false
end
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
if
ft
==
0
and
c
:
IsLocation
(
LOCATION_SZONE
)
and
c
:
GetSequence
()
<
5
then
return
Duel
.
IsExistingMatchingCard
(
c10024317
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
true
)
else
return
Duel
.
IsExistingMatchingCard
(
c10024317
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
false
)
end
return
Duel
.
GetSZoneCount
(
tp
,
c
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c10024317
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
true
)
end
function
c10024317
.
filter
(
c
,
ignore
)
return
c
:
IsSetCard
(
0xe1
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSSetable
(
ignore
)
...
...
c18716735.lua
View file @
728ea03b
...
...
@@ -28,12 +28,7 @@ function c18716735.initial_effect(c)
end
function
c18716735
.
desfilter
(
c
,
tp
)
if
c
:
IsFacedown
()
then
return
false
end
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
if
ft
==
0
and
c
:
IsLocation
(
LOCATION_SZONE
)
and
c
:
GetSequence
()
<
5
then
return
Duel
.
IsExistingMatchingCard
(
c18716735
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
true
)
else
return
Duel
.
IsExistingMatchingCard
(
c18716735
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
false
)
end
return
Duel
.
GetSZoneCount
(
tp
,
c
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c18716735
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
true
)
end
function
c18716735
.
filter
(
c
,
ignore
)
return
c
:
IsSetCard
(
0xe1
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSSetable
(
ignore
)
...
...
c27946124.lua
View file @
728ea03b
...
...
@@ -82,7 +82,7 @@ function c27946124.setfilter(c)
end
function
c27946124
.
settg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c27946124
.
setfilter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
Get
LocationCount
(
tp
,
LOCATION_SZONE
)
>-
1
if
chk
==
0
then
return
Duel
.
Get
SZoneCount
(
tp
,
e
:
GetHandler
())
>
0
and
Duel
.
IsExistingTarget
(
c27946124
.
setfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SET
)
local
sg
=
Duel
.
SelectTarget
(
tp
,
c27946124
.
setfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
...
...
c29223325.lua
View file @
728ea03b
...
...
@@ -24,33 +24,19 @@ end
function
c29223325
.
filter
(
c
)
return
c
:
IsSetCard
(
0x97
)
and
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsSSetable
(
true
)
end
function
c29223325
.
desfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
c29223325
.
desfilter2
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
GetSequence
()
<
5
function
c29223325
.
desfilter
(
c
,
tp
,
ft
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
Duel
.
GetSZoneCount
(
tp
,
c
)
>
ft
end
function
c29223325
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsOnField
()
and
c29223325
.
desfilter
(
chkc
)
and
chkc
~=
e
:
GetHandler
()
end
if
chk
==
0
then
if
not
Duel
.
IsExistingMatchingCard
(
c29223325
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
then
return
false
end
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
if
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
)
then
ft
=
ft
-
1
end
if
ft
<
0
then
return
false
elseif
ft
>
0
then
return
Duel
.
IsExistingTarget
(
c29223325
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
())
else
return
Duel
.
IsExistingTarget
(
c29223325
.
desfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
e
:
GetHandler
())
end
local
ft
=
0
if
e
:
GetHandler
():
IsLocation
(
LOCATION_HAND
)
then
ft
=
1
end
return
Duel
.
IsExistingTarget
(
c29223325
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
e
:
GetHandler
(),
tp
,
ft
)
end
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
local
g
=
nil
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
if
ft
>
0
then
g
=
Duel
.
SelectTarget
(
tp
,
c29223325
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
e
:
GetHandler
())
else
g
=
Duel
.
SelectTarget
(
tp
,
c29223325
.
desfilter2
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
e
:
GetHandler
())
end
local
g
=
Duel
.
SelectTarget
(
tp
,
c29223325
.
desfilter
,
tp
,
LOCATION_ONFIELD
,
LOCATION_ONFIELD
,
1
,
1
,
e
:
GetHandler
(),
tp
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c29223325
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
c33256280.lua
View file @
728ea03b
...
...
@@ -16,12 +16,7 @@ function c33256280.initial_effect(c)
end
function
c33256280
.
desfilter
(
c
,
tp
)
if
c
:
IsFacedown
()
then
return
false
end
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
if
ft
==
0
and
c
:
IsLocation
(
LOCATION_SZONE
)
and
c
:
GetSequence
()
<
5
then
return
Duel
.
IsExistingMatchingCard
(
c33256280
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
true
)
else
return
Duel
.
IsExistingMatchingCard
(
c33256280
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
false
)
end
return
Duel
.
GetSZoneCount
(
tp
,
c
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c33256280
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
true
)
end
function
c33256280
.
filter
(
c
,
ignore
)
return
c
:
IsSetCard
(
0xe1
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSSetable
(
ignore
)
...
...
c33773528.lua
View file @
728ea03b
...
...
@@ -36,7 +36,7 @@ function c33773528.actcon(e)
return
Duel
.
GetTurnPlayer
()
==
e
:
GetHandlerPlayer
()
and
(
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
)
end
function
c33773528
.
filter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x15c
)
and
c
:
IsType
(
TYPE_TRAP
)
and
c
:
GetEquipTarget
()
and
c
:
IsAbleToGraveAsCost
()
return
c
:
IsFaceup
()
and
c
:
IsSetCard
(
0x15c
)
and
c
:
IsType
(
TYPE_TRAP
)
and
c
:
GetEquipTarget
()
and
c
:
IsAbleToGraveAsCost
()
and
Duel
.
GetSZoneCount
(
tp
,
c
)
>
0
and
Duel
.
IsExistingTarget
(
c33773528
.
setfilter
,
tp
,
LOCATION_GRAVE
+
LOCATION_REMOVED
,
0
,
1
,
nil
,
c
:
GetCode
())
end
function
c33773528
.
setfilter
(
c
,
code
)
...
...
c36346532.lua
View file @
728ea03b
...
...
@@ -37,7 +37,8 @@ function c36346532.efilter(e,re)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
re
:
GetOwner
()
~=
e
:
GetOwner
()
end
function
c36346532
.
cfilter
(
c
,
tp
)
return
c
:
GetSequence
()
<
5
and
c
:
IsFacedown
()
and
c
:
IsAbleToGrave
()
and
Duel
.
IsExistingMatchingCard
(
c36346532
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
c
,
tp
)
return
c
:
GetSequence
()
<
5
and
c
:
IsFacedown
()
and
c
:
IsAbleToGrave
()
and
Duel
.
GetSZoneCount
(
tp
,
c
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c36346532
.
setfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
c
,
tp
)
end
function
c36346532
.
setfilter
(
c
,
mc
,
tp
)
if
not
(
c
:
IsSetCard
(
0xd4
)
and
c
:
IsType
(
TYPE_TRAP
))
then
return
false
end
...
...
c47408488.lua
View file @
728ea03b
...
...
@@ -71,8 +71,9 @@ function c47408488.plcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function
c47408488
.
pltg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
local
ct
=
e
:
GetHandler
():
GetCounter
(
0x6
)
return
ct
>
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
>=-
1
+
ct
local
c
=
e
:
GetHandler
()
local
ct
=
c
:
GetCounter
(
0x6
)
return
ct
>
0
and
Duel
.
GetSZoneCount
(
tp
,
c
)
>=
ct
and
Duel
.
IsExistingMatchingCard
(
c47408488
.
plfilter
,
tp
,
LOCATION_DECK
,
0
,
ct
,
nil
)
end
end
...
...
c54895237.lua
View file @
728ea03b
...
...
@@ -31,9 +31,9 @@ function c54895237.initial_effect(c)
e3
:
SetLabelObject
(
e2
)
c
:
RegisterEffect
(
e3
)
end
function
c54895237
.
costfilter
(
c
,
tp
,
sft
)
function
c54895237
.
costfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c
:
IsAbleToGraveAsCost
()
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
and
(
sft
>
0
or
c
:
IsLocation
(
LOCATION_SZONE
)
and
sft
>-
1
)
and
Duel
.
GetMZoneCount
(
tp
,
c
)
>
0
and
Duel
.
GetSZoneCount
(
tp
,
c
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c54895237
.
setfilter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
c
,
tp
)
end
function
c54895237
.
setfilter
(
c
,
cc
,
tp
)
...
...
@@ -41,10 +41,9 @@ function c54895237.setfilter(c,cc,tp)
and
not
c
:
IsForbidden
()
and
c
:
CheckUniqueOnField
(
tp
,
LOCATION_ONFIELD
,
cc
)
end
function
c54895237
.
gspcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
sft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c54895237
.
costfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
,
tp
,
sft
)
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c54895237
.
costfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c54895237
.
costfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
,
tp
,
sft
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c54895237
.
costfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
1
,
nil
,
tp
)
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
function
c54895237
.
gsptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
c60473572.lua
View file @
728ea03b
...
...
@@ -16,12 +16,7 @@ function c60473572.initial_effect(c)
end
function
c60473572
.
desfilter
(
c
,
tp
)
if
c
:
IsFacedown
()
then
return
false
end
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
if
ft
==
0
and
c
:
IsLocation
(
LOCATION_SZONE
)
and
c
:
GetSequence
()
<
5
then
return
Duel
.
IsExistingMatchingCard
(
c60473572
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
true
)
else
return
Duel
.
IsExistingMatchingCard
(
c60473572
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
false
)
end
return
Duel
.
GetSZoneCount
(
tp
,
c
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c60473572
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
true
)
end
function
c60473572
.
filter
(
c
,
ignore
)
return
c
:
IsSetCard
(
0xe1
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSSetable
(
ignore
)
...
...
c63086455.lua
View file @
728ea03b
...
...
@@ -17,8 +17,7 @@ function c63086455.tgfilter(c,e,tp)
end
function
c63086455
.
setfilter
(
c
,
cc
,
e
,
tp
)
local
b1
=
Duel
.
GetMZoneCount
(
1
-
tp
,
cc
,
tp
)
>
0
local
st
=
Duel
.
GetLocationCount
(
1
-
tp
,
LOCATION_SZONE
,
tp
)
local
b2
=
st
>
0
or
cc
:
IsLocation
(
LOCATION_SZONE
)
and
cc
:
GetSequence
()
<
5
and
st
>-
1
local
b2
=
Duel
.
GetSZoneCount
(
1
-
tp
,
cc
,
tp
)
>
0
return
b1
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
POS_FACEDOWN_DEFENSE
,
1
-
tp
)
or
(
b2
or
c
:
IsType
(
TYPE_FIELD
))
and
c
:
IsSSetable
(
true
)
end
...
...
c69351984.lua
View file @
728ea03b
...
...
@@ -16,12 +16,7 @@ function c69351984.initial_effect(c)
end
function
c69351984
.
desfilter
(
c
,
tp
)
if
c
:
IsFacedown
()
then
return
false
end
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
if
ft
==
0
and
c
:
IsLocation
(
LOCATION_SZONE
)
and
c
:
GetSequence
()
<
5
then
return
Duel
.
IsExistingMatchingCard
(
c69351984
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
true
)
else
return
Duel
.
IsExistingMatchingCard
(
c69351984
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
false
)
end
return
Duel
.
GetSZoneCount
(
tp
,
c
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c69351984
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
true
)
end
function
c69351984
.
filter
(
c
,
ignore
)
return
c
:
IsSetCard
(
0xe1
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSSetable
(
ignore
)
...
...
c7868571.lua
View file @
728ea03b
...
...
@@ -16,12 +16,7 @@ function c7868571.initial_effect(c)
end
function
c7868571
.
desfilter
(
c
,
tp
)
if
c
:
IsFacedown
()
then
return
false
end
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_SZONE
)
if
ft
==
0
and
c
:
IsLocation
(
LOCATION_SZONE
)
and
c
:
GetSequence
()
<
5
then
return
Duel
.
IsExistingMatchingCard
(
c7868571
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
true
)
else
return
Duel
.
IsExistingMatchingCard
(
c7868571
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
false
)
end
return
Duel
.
GetSZoneCount
(
tp
,
c
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c7868571
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
true
)
end
function
c7868571
.
filter
(
c
,
ignore
)
return
c
:
IsSetCard
(
0xe1
)
and
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
and
c
:
IsSSetable
(
ignore
)
...
...
c91299846.lua
View file @
728ea03b
...
...
@@ -31,7 +31,7 @@ function c91299846.initial_effect(c)
c
:
RegisterEffect
(
e3
)
end
function
c91299846
.
cfilter
(
c
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c
:
IsAbleToGraveAsCost
()
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_CONTINUOUS
)
and
c
:
IsAbleToGraveAsCost
()
and
Duel
.
GetSZoneCount
(
tp
,
c
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c91299846
.
tffilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
c
,
tp
)
end
function
c91299846
.
tffilter
(
c
,
cc
,
tp
)
...
...
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