Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-rush-duel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
5
Issues
5
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
MyCard
ygopro-rush-duel
Commits
1879dc58
Commit
1879dc58
authored
Jan 02, 2024
by
未闻皂名
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024/1/2 添加通用方法:从卡组顶把卡送去墓地,并从那些卡之中选择卡片
parent
38e0147b
Pipeline
#24772
passed with stages
in 15 minutes and 45 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
57 deletions
+57
-57
script/RDAction.lua
script/RDAction.lua
+25
-1
script/c120231054.lua
script/c120231054.lua
+5
-11
script/c120235021.lua
script/c120235021.lua
+6
-8
script/c120238020.lua
script/c120238020.lua
+6
-9
script/c120246054.lua
script/c120246054.lua
+6
-9
script/c120253008.lua
script/c120253008.lua
+4
-8
script/c120253019.lua
script/c120253019.lua
+5
-11
No files found.
script/RDAction.lua
View file @
1879dc58
...
@@ -368,7 +368,7 @@ function RushDuel.RevealDeckTopAndCanSelectGroup(player, count, desc, hint, filt
...
@@ -368,7 +368,7 @@ function RushDuel.RevealDeckTopAndCanSelectGroup(player, count, desc, hint, filt
Duel
.
ConfirmDecktop
(
player
,
count
)
Duel
.
ConfirmDecktop
(
player
,
count
)
local
g
=
Duel
.
GetDecktopGroup
(
player
,
count
)
local
g
=
Duel
.
GetDecktopGroup
(
player
,
count
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
local
mg
=
g
:
Filter
(
filter
,
nil
)
local
mg
=
g
:
Filter
(
filter
,
nil
)
if
mg
:
CheckSubGroup
(
check
,
min
,
max
,
...
)
then
if
mg
:
CheckSubGroup
(
check
,
min
,
max
,
...
)
then
::
cancel
::
::
cancel
::
if
Duel
.
SelectYesNo
(
player
,
desc
)
then
if
Duel
.
SelectYesNo
(
player
,
desc
)
then
...
@@ -385,6 +385,30 @@ function RushDuel.RevealDeckTopAndCanSelectGroup(player, count, desc, hint, filt
...
@@ -385,6 +385,30 @@ function RushDuel.RevealDeckTopAndCanSelectGroup(player, count, desc, hint, filt
end
end
return
Group
.
CreateGroup
(),
g
return
Group
.
CreateGroup
(),
g
end
end
-- 可选操作: 从卡组上面把卡送去墓地, 并选择被送去墓地的卡片
function
RushDuel
.
SendDeckTopToGraveAndCanSelect
(
player
,
count
,
desc
,
hint
,
filter
,
min
,
max
,
...
)
if
Duel
.
DiscardDeck
(
player
,
count
,
REASON_EFFECT
)
~=
0
then
local
g
=
Duel
.
GetOperatedGroup
()
if
g
:
GetCount
()
>
0
then
local
mg
=
g
:
Filter
(
filter
,
nil
,
...
)
if
mg
:
GetCount
()
>=
min
then
::
cancel
::
if
Duel
.
SelectYesNo
(
player
,
desc
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
player
,
hint
)
local
sg
=
RushDuel
.
SelectGroup
(
player
,
mg
,
min
,
max
)
if
sg
==
nil
then
goto
cancel
elseif
sg
:
GetCount
()
>
0
then
g
:
Sub
(
sg
)
return
sg
,
g
end
end
end
end
return
Group
.
CreateGroup
(),
g
end
return
Group
.
CreateGroup
(),
Group
.
CreateGroup
()
end
-- 可选操作: 抽卡
-- 可选操作: 抽卡
function
RushDuel
.
CanDraw
(
desc
,
player
,
count
,
break_effect
)
function
RushDuel
.
CanDraw
(
desc
,
player
,
count
,
break_effect
)
...
...
script/c120231054.lua
View file @
1879dc58
...
@@ -19,7 +19,7 @@ function cm.costfilter(c)
...
@@ -19,7 +19,7 @@ function cm.costfilter(c)
return
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
c
:
IsAbleToDeckOrExtraAsCost
()
return
c
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
c
:
IsAbleToDeckOrExtraAsCost
()
end
end
function
cm
.
thfilter
(
c
)
function
cm
.
thfilter
(
c
)
return
c
:
IsType
(
TYPE_EQUIP
)
and
c
:
IsAbleToHand
()
return
c
:
IsType
(
TYPE_EQUIP
)
and
c
:
Is
Location
(
LOCATION_GRAVE
)
and
c
:
Is
AbleToHand
()
end
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
RD
.
IsSummonTurn
(
e
:
GetHandler
())
return
RD
.
IsSummonTurn
(
e
:
GetHandler
())
...
@@ -30,15 +30,9 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -30,15 +30,9 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DECKDES
,
nil
,
0
,
tp
,
3
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DECKDES
,
nil
,
0
,
tp
,
3
)
end
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
RD
.
SendDeckTopToGraveAndExists
(
tp
,
3
)
then
local
sg
,
og
=
RD
.
SendDeckTopToGraveAndCanSelect
(
tp
,
3
,
aux
.
Stringid
(
m
,
1
),
HINTMSG_ATOHAND
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
1
,
1
)
local
og
=
Duel
.
GetOperatedGroup
():
Filter
(
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
nil
)
if
sg
:
GetCount
()
>
0
then
if
og
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
RD
.
SendToHandAndExists
(
sg
,
1
-
tp
)
local
g
=
og
:
Select
(
tp
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
BreakEffect
()
RD
.
SendToHandAndExists
(
g
,
1
-
tp
)
end
end
end
end
end
end
\ No newline at end of file
script/c120235021.lua
View file @
1879dc58
...
@@ -21,7 +21,7 @@ function cm.costfilter(c,e,tp)
...
@@ -21,7 +21,7 @@ function cm.costfilter(c,e,tp)
return
not
c
:
IsPublic
()
and
c
:
IsRace
(
RACE_WARRIOR
)
return
not
c
:
IsPublic
()
and
c
:
IsRace
(
RACE_WARRIOR
)
end
end
function
cm
.
thfilter
(
c
)
function
cm
.
thfilter
(
c
)
return
c
:
IsCode
(
list
[
2
])
and
c
:
IsAbleToHand
()
return
c
:
IsCode
(
list
[
2
])
and
c
:
Is
Location
(
LOCATION_GRAVE
)
and
c
:
Is
AbleToHand
()
end
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
not
e
:
GetHandler
():
IsCode
(
list
[
1
])
return
not
e
:
GetHandler
():
IsCode
(
list
[
1
])
...
@@ -35,14 +35,12 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -35,14 +35,12 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
RD
.
ChangeCode
(
e
,
c
,
list
[
1
],
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
RD
.
ChangeCode
(
e
,
c
,
list
[
1
],
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
if
not
Duel
.
IsPlayerCanDiscardDeck
(
tp
,
1
)
then
return
end
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
if
RD
.
SendDeckTopToGraveAndExists
(
tp
,
3
)
then
local
sg
,
og
=
RD
.
SendDeckTopToGraveAndCanSelect
(
tp
,
3
,
aux
.
Stringid
(
m
,
1
),
HINTMSG_ATOHAND
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
1
,
1
)
local
og
=
Duel
.
GetOperatedGroup
()
if
sg
:
GetCount
()
>
0
then
if
og
:
IsExists
(
cm
.
thfilter
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
RD
.
SendToHandAndExists
(
sg
,
1
-
tp
)
local
sg
=
og
:
FilterSelect
(
tp
,
cm
.
thfilter
,
1
,
1
,
nil
)
RD
.
SendToHandAndExists
(
sg
,
1
-
tp
)
end
end
end
end
end
end
end
\ No newline at end of file
script/c120238020.lua
View file @
1879dc58
...
@@ -17,7 +17,8 @@ function cm.initial_effect(c)
...
@@ -17,7 +17,8 @@ function cm.initial_effect(c)
end
end
--Discard Deck
--Discard Deck
function
cm
.
spfilter
(
c
,
e
,
tp
)
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsCode
(
list
[
1
])
and
c
:
IsLocation
(
LOCATION_GRAVE
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
return
c
:
IsCode
(
list
[
1
])
and
c
:
IsLocation
(
LOCATION_GRAVE
)
and
Duel
.
GetMZoneCount
(
tp
)
>
0
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
RD
.
IsSummonTurn
(
e
:
GetHandler
())
and
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
>
0
return
RD
.
IsSummonTurn
(
e
:
GetHandler
())
and
Duel
.
GetFieldGroupCount
(
tp
,
0
,
LOCATION_MZONE
)
>
0
...
@@ -27,13 +28,9 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -27,13 +28,9 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DECKDES
,
nil
,
0
,
tp
,
3
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DECKDES
,
nil
,
0
,
tp
,
3
)
end
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
RD
.
SendDeckTopToGraveAndExists
(
tp
,
3
)
and
Duel
.
GetMZoneCount
(
tp
)
>
0
then
local
sg
,
og
=
RD
.
SendDeckTopToGraveAndCanSelect
(
tp
,
3
,
aux
.
Stringid
(
m
,
1
),
HINTMSG_SPSUMMON
,
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
1
,
1
,
e
,
tp
)
local
og
=
Duel
.
GetOperatedGroup
()
if
sg
:
GetCount
()
>
0
then
if
og
:
IsExists
(
cm
.
spfilter
,
1
,
nil
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
sg
=
og
:
FilterSelect
(
tp
,
cm
.
spfilter
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
end
\ No newline at end of file
script/c120246054.lua
View file @
1879dc58
...
@@ -14,7 +14,8 @@ function cm.initial_effect(c)
...
@@ -14,7 +14,8 @@ function cm.initial_effect(c)
end
end
--Activate
--Activate
function
cm
.
spfilter
(
c
,
e
,
tp
)
function
cm
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsAttack
(
2500
)
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
return
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsAttack
(
2500
)
and
c
:
IsLocation
(
LOCATION_GRAVE
)
and
Duel
.
GetMZoneCount
(
tp
)
>
0
and
RD
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
POS_FACEUP
)
end
end
cm
.
cost
=
RD
.
CostPayLP
(
1500
)
cm
.
cost
=
RD
.
CostPayLP
(
1500
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
@@ -22,13 +23,9 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -22,13 +23,9 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DECKDES
,
nil
,
0
,
tp
,
3
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DECKDES
,
nil
,
0
,
tp
,
3
)
end
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
RD
.
SendDeckTopToGraveAndExists
(
tp
,
3
)
and
Duel
.
GetMZoneCount
(
tp
)
>
0
then
local
sg
,
og
=
RD
.
SendDeckTopToGraveAndCanSelect
(
tp
,
3
,
aux
.
Stringid
(
m
,
1
),
HINTMSG_SPSUMMON
,
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
1
,
1
,
e
,
tp
)
local
og
=
Duel
.
GetOperatedGroup
()
if
sg
:
GetCount
()
>
0
then
if
og
:
IsExists
(
cm
.
spfilter
,
1
,
nil
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
local
sg
=
og
:
FilterSelect
(
tp
,
cm
.
spfilter
,
1
,
1
,
nil
,
e
,
tp
)
Duel
.
BreakEffect
()
Duel
.
SpecialSummon
(
sg
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
end
\ No newline at end of file
script/c120253008.lua
View file @
1879dc58
...
@@ -32,13 +32,9 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -32,13 +32,9 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DECKDES
,
nil
,
0
,
tp
,
4
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DECKDES
,
nil
,
0
,
tp
,
4
)
end
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
RD
.
SendDeckTopToGraveAndExists
(
tp
,
4
)
then
local
sg
,
og
=
RD
.
SendDeckTopToGraveAndCanSelect
(
tp
,
4
,
aux
.
Stringid
(
m
,
1
),
HINTMSG_ATOHAND
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
1
,
1
)
local
og
=
Duel
.
GetOperatedGroup
()
if
sg
:
GetCount
()
>
0
then
if
og
:
IsExists
(
cm
.
thfilter
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
RD
.
SendToHandAndExists
(
sg
,
1
-
tp
)
local
sg
=
og
:
FilterSelect
(
tp
,
cm
.
thfilter
,
1
,
1
,
nil
)
Duel
.
BreakEffect
()
RD
.
SendToHandAndExists
(
sg
,
1
-
tp
)
end
end
end
end
end
\ No newline at end of file
script/c120253019.lua
View file @
1879dc58
...
@@ -17,7 +17,7 @@ function cm.initial_effect(c)
...
@@ -17,7 +17,7 @@ function cm.initial_effect(c)
end
end
--Discard Deck
--Discard Deck
function
cm
.
thfilter
(
c
)
function
cm
.
thfilter
(
c
)
return
c
:
IsCode
(
list
[
1
],
list
[
2
])
and
c
:
IsAbleToHand
()
return
c
:
IsCode
(
list
[
1
],
list
[
2
])
and
c
:
Is
Location
(
LOCATION_GRAVE
)
and
c
:
Is
AbleToHand
()
end
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
RD
.
IsSummonTurn
(
e
:
GetHandler
())
return
RD
.
IsSummonTurn
(
e
:
GetHandler
())
...
@@ -27,15 +27,9 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -27,15 +27,9 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DECKDES
,
nil
,
0
,
tp
,
2
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DECKDES
,
nil
,
0
,
tp
,
2
)
end
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
RD
.
SendDeckTopToGraveAndExists
(
tp
,
2
)
then
local
sg
,
og
=
RD
.
SendDeckTopToGraveAndCanSelect
(
tp
,
2
,
aux
.
Stringid
(
m
,
1
),
HINTMSG_ATOHAND
,
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
1
,
1
)
local
og
=
Duel
.
GetOperatedGroup
():
Filter
(
aux
.
NecroValleyFilter
(
cm
.
thfilter
),
nil
)
if
sg
:
GetCount
()
>
0
then
if
og
:
GetCount
()
>
0
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
m
,
1
))
then
Duel
.
BreakEffect
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_ATOHAND
)
RD
.
SendToHandAndExists
(
sg
,
1
-
tp
)
local
g
=
og
:
Select
(
tp
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
Duel
.
BreakEffect
()
RD
.
SendToHandAndExists
(
g
,
1
-
tp
)
end
end
end
end
end
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