Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
no81cards
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
Nemo Ma
no81cards
Commits
8ac2c8f1
Commit
8ac2c8f1
authored
May 16, 2025
by
POLYMER
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
60610302
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
179 deletions
+18
-179
expansions/script/c53702600.lua
expansions/script/c53702600.lua
+18
-179
No files found.
expansions/script/c53702600.lua
View file @
8ac2c8f1
...
@@ -238,7 +238,8 @@ function cm.Ranclockdfilter(c)
...
@@ -238,7 +238,8 @@ function cm.Ranclockdfilter(c)
end
end
function
cm
.
Ranclocksptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
Ranclocksptg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
Ranclockdfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
c
)
end
if
chk
==
0
then
return
c
:
GetFlagEffect
(
c
:
GetOriginalCode
())
<=
0
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
Ranclockdfilter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
c
)
end
c
:
RegisterFlagEffect
(
c
:
GetOriginalCode
(),
RESET_EVENT
+
RESETS_STANDARD
+
RESET_CHAIN
,
0
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
c
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
nil
,
1
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
)
end
end
...
@@ -2958,6 +2959,22 @@ function cm.Excavated_Check(c)
...
@@ -2958,6 +2959,22 @@ function cm.Excavated_Check(c)
return
f
(
tp
,
ct
)
return
f
(
tp
,
ct
)
end
end
end
end
function
cm
.
DimpthoxExCostFil
(
c
,
tp
)
return
c
:
IsAbleToRemoveAsCost
()
and
c
:
IsHasEffect
(
53766027
,
tp
)
end
function
cm
.
Dimpthox_Grave_Trap_Eff_Cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
DimpthoxExCostFil
,
tp
,
LOCATION_GRAVE
,
0
,
nil
,
tp
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToRemoveAsCost
()
or
#
g
>
0
end
if
#
g
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
53766027
,
3
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_REMOVE
)
local
tc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
local
te
=
tc
:
IsHasEffect
(
53766027
,
tp
)
te
:
UseCountLimit
(
tp
)
Duel
.
Remove
(
tc
,
POS_FACEUP
,
REASON_EFFECT
+
REASON_REPLACE
)
else
Duel
.
Remove
(
e
:
GetHandler
(),
POS_FACEUP
,
REASON_COST
)
end
end
function
cm
.
DimpthoxEregcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
DimpthoxEregcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Dimpthox_E_Check
return
Dimpthox_E_Check
end
end
...
@@ -3423,181 +3440,3 @@ function cm.Whitkinsefilter(att)
...
@@ -3423,181 +3440,3 @@ function cm.Whitkinsefilter(att)
return
te
:
GetOwnerPlayer
()
~=
c
:
GetControler
()
and
te
:
IsActiveType
(
TYPE_MONSTER
)
and
te
:
GetHandler
():
IsAttribute
(
att
)
return
te
:
GetOwnerPlayer
()
~=
c
:
GetControler
()
and
te
:
IsActiveType
(
TYPE_MONSTER
)
and
te
:
GetHandler
():
IsAttribute
(
att
)
end
end
end
end
--written by purplenightfall
function
cm
.
SelectSubGroup
(
g
,
tp
,
f
,
cancelable
,
min
,
max
,
...
)
local
classif
,
sortf
,
passf
,
goalstop
,
check
,
params1
,
params2
=
table.unpack
(
cm
.
SubGroupParams
)
min
=
min
or
1
max
=
max
or
#
g
local
sg
=
Group
.
CreateGroup
()
local
fg
=
Duel
.
GrabSelectedCard
()
if
#
fg
>
max
or
min
>
max
or
#
(
g
+
fg
)
<
min
then
return
nil
end
if
not
check
then
for
tc
in
aux
.
Next
(
fg
)
do
fg
:
SelectUnselect
(
sg
,
tp
,
false
,
false
,
min
,
max
)
end
end
sg
:
Merge
(
fg
)
local
mg
=
g
-
sg
local
iisg
,
tmp
,
stop
,
iter
,
ctab
,
rtab
,
gtab
--main check
local
finish
=
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
...
))
while
#
sg
<
max
do
mg
=
g
-
sg
iisg
=
sg
:
Clone
()
if
passf
then
aux
.
SubGroupCaptured
=
mg
:
Filter
(
passf
,
nil
)
else
aux
.
SubGroupCaptured
=
Group
.
CreateGroup
()
end
ctab
,
rtab
,
gtab
=
{},{},{
1
}
for
tc
in
aux
.
Next
(
mg
)
do
ctab
[
#
ctab
+
1
]
=
tc
end
--high to low
if
sortf
then
for
i
=
1
,
#
ctab
-
1
do
for
j
=
1
,
#
ctab
-
1
-
i
do
if
sortf
(
ctab
[
j
],
table.unpack
(
params2
))
<
sortf
(
ctab
[
j
+
1
],
table.unpack
(
params2
))
then
tmp
=
ctab
[
j
]
ctab
[
j
]
=
ctab
[
j
+
1
]
ctab
[
j
+
1
]
=
tmp
end
end
end
end
--classify
if
classif
then
--make similar cards adjacent
for
i
=
1
,
#
ctab
-
2
do
for
j
=
i
+
2
,
#
ctab
do
if
classif
(
ctab
[
i
],
ctab
[
j
],
table.unpack
(
params1
))
then
tmp
=
ctab
[
j
]
ctab
[
j
]
=
ctab
[
i
+
1
]
ctab
[
i
+
1
]
=
tmp
end
end
end
--rtab[i]: what category does the i-th card belong to
--gtab[i]: What is the first card's number in the i-th category
for
i
=
1
,
#
ctab
-
1
do
rtab
[
i
]
=#
gtab
if
not
classif
(
ctab
[
i
],
ctab
[
i
+
1
],
table.unpack
(
params1
))
then
gtab
[
#
gtab
+
1
]
=
i
+
1
end
end
--iter record all cards' number in sg
iter
=
{
1
}
sg
:
AddCard
(
ctab
[
1
])
while
#
sg
>#
iisg
and
#
aux
.
SubGroupCaptured
<#
mg
do
stop
=
false
--prune if too much cards
if
aux
.
GCheckAdditional
and
not
aux
.
GCheckAdditional
(
sg
,
c
,
g
,
f
,
min
,
max
,
...
)
then
stop
=
true
--skip check if no new cards
elseif
#
(
sg
-
iisg
-
aux
.
SubGroupCaptured
)
>
0
and
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
...
)
then
for
sc
in
aux
.
Next
(
sg
-
iisg
)
do
if
check
then
return
true
end
aux
.
SubGroupCaptured
:
Merge
(
mg
:
Filter
(
classif
,
nil
,
sc
,
table.unpack
(
params1
)))
end
stop
=
goalstop
end
if
#
sg
>=
max
then
stop
=
true
end
local
code
=
iter
[
#
iter
]
--last card isn't in the last category
if
code
and
code
<
gtab
[
#
gtab
]
then
if
stop
then
--backtrack and add 1 card from next category
iter
[
#
iter
]
=
gtab
[
rtab
[
code
]
+
1
]
sg
:
RemoveCard
(
ctab
[
code
])
sg
:
AddCard
(
ctab
[(
iter
[
#
iter
])])
else
--continue searching forward
iter
[
#
iter
+
1
]
=
code
+
1
sg
:
AddCard
(
ctab
[
code
+
1
])
end
--last card is in the last category
elseif
code
then
if
stop
or
code
>=#
ctab
then
--clear all cards in the last category
while
#
iter
>
0
and
iter
[
#
iter
]
>=
gtab
[
#
gtab
]
do
sg
:
RemoveCard
(
ctab
[(
iter
[
#
iter
])])
iter
[
#
iter
]
=
nil
end
--backtrack and add 1 card from next category
local
code2
=
iter
[
#
iter
]
if
code2
then
iter
[
#
iter
]
=
gtab
[
rtab
[
code2
]
+
1
]
sg
:
RemoveCard
(
ctab
[
code2
])
sg
:
AddCard
(
ctab
[(
iter
[
#
iter
])])
end
else
--continue searching forward
iter
[
#
iter
+
1
]
=
code
+
1
sg
:
AddCard
(
ctab
[
code
+
1
])
end
end
end
--classification is essential for efficiency, and this part is only for backup
else
iter
=
{
1
}
sg
:
AddCard
(
ctab
[
1
])
while
#
sg
>#
iisg
and
#
aux
.
SubGroupCaptured
<#
mg
do
stop
=
false
if
aux
.
GCheckAdditional
and
not
aux
.
GCheckAdditional
(
sg
,
c
,
g
,
f
,
min
,
max
,
...
)
then
stop
=
true
elseif
#
(
sg
-
iisg
-
aux
.
SubGroupCaptured
)
>
0
and
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
...
)
then
for
sc
in
aux
.
Next
(
sg
-
iisg
)
do
if
check
then
return
true
end
aux
.
SubGroupCaptured
:
AddCard
(
sc
)
--Merge(mg:Filter(class,nil,sc))
end
stop
=
goalstop
end
if
#
sg
>=
max
then
stop
=
true
end
local
code
=
iter
[
#
iter
]
if
code
<#
ctab
then
if
stop
then
iter
[
#
iter
]
=
nil
sg
:
RemoveCard
(
ctab
[
code
])
end
iter
[
#
iter
+
1
]
=
code
+
1
sg
:
AddCard
(
ctab
[
code
+
1
])
else
local
code2
=
iter
[
#
iter
-
1
]
iter
[
#
iter
]
=
nil
sg
:
RemoveCard
(
ctab
[
code
])
if
code2
and
code2
>
0
then
iter
[
#
iter
]
=
code2
+
1
sg
:
RemoveCard
(
ctab
[
code2
])
sg
:
AddCard
(
ctab
[
code2
+
1
])
end
end
end
end
--finish searching
sg
=
iisg
local
cg
=
aux
.
SubGroupCaptured
:
Clone
()
aux
.
SubGroupCaptured
:
Clear
()
cg
:
Sub
(
sg
)
finish
=
(
#
sg
>=
min
and
#
sg
<=
max
and
f
(
sg
,
...
))
if
#
cg
==
0
then
break
end
local
cancel
=
not
finish
and
cancelable
local
tc
=
cg
:
SelectUnselect
(
sg
,
tp
,
finish
,
cancel
,
min
,
max
)
if
not
tc
then
break
end
if
not
fg
:
IsContains
(
tc
)
then
if
not
sg
:
IsContains
(
tc
)
then
sg
:
AddCard
(
tc
)
if
#
sg
==
max
then
finish
=
true
end
else
sg
:
RemoveCard
(
tc
)
end
elseif
cancelable
then
return
nil
end
end
if
finish
then
return
sg
else
return
nil
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