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
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
Clara Grace Paulsen
ygopro-rush-duel
Commits
4f049723
Commit
4f049723
authored
Feb 23, 2022
by
未闻皂名
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2022/2/23 模块化扩展函数,未完成
parent
f18c9cd6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
401 additions
and
0 deletions
+401
-0
script/RDExpand.lua
script/RDExpand.lua
+401
-0
No files found.
script/RDExpand.lua
0 → 100644
View file @
4f049723
-- Expand
RushDuel
=
RushDuel
or
{}
RD
=
RushDuel
-- Hint (LP Label)
function
RushDuel
.
CreateHintEffect
(
e
,
desc
,
tp
,
s
,
o
,
reset
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
desc
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetTargetRange
(
s
,
o
)
e1
:
SetReset
(
reset
)
Duel
.
RegisterEffect
(
e1
,
tp
)
return
e1
end
-- Can not Attack (Promise)
function
RushDuel
.
CreateAttackLimitEffect
(
e
,
target
,
tp
,
s
,
o
,
reset
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e1
:
SetProperty
(
EFFECT_FLAG_IGNORE_IMMUNE
)
e1
:
SetTargetRange
(
s
,
o
)
e1
:
SetTarget
(
target
)
e1
:
SetReset
(
reset
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
-- Check: Is in Maximum Mode
function
RushDuel
.
IsMaximunMode
(
c
)
return
c
:
IsSummonType
(
SUMMON_TYPE_MAXIMUM
)
and
c
:
GetOverlayCount
()
>
0
end
-- Check: Is Summon this Turn
function
RushDuel
.
IsSummonTurn
(
c
)
return
c
:
IsReason
(
REASON_SUMMON
)
and
c
:
IsStatus
(
STATUS_SUMMON_TURN
)
end
-- Check: Is Special Summon this Turn
function
RushDuel
.
IsSpecialSummonTurn
(
c
)
return
c
:
IsReason
(
REASON_SPSUMMON
)
and
c
:
IsStatus
(
STATUS_SPSUMMON_TURN
)
end
-- Check: Is can Change Def
function
RushDuel
.
IsCanChangeDef
(
c
)
return
c
:
IsDefenseAbove
(
0
)
and
not
RushDuel
.
IsMaximunMode
(
c
)
end
-- Check: Is can Change Position
function
RushDuel
.
IsCanChangePosition
(
c
)
return
c
:
IsCanChangePosition
()
and
not
RushDuel
.
IsMaximunMode
(
c
)
end
-- Check: Is can be Special Summoned
function
RushDuel
.
IsCanBeSpecialSummoned
(
c
,
e
,
tp
,
pos
)
return
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
,
pos
)
end
-- Check: Is can Attach Effect (Direct Attack)
function
RushDuel
.
IsCanAttachDirectAttack
(
c
)
return
not
c
:
IsHasEffect
(
EFFECT_DIRECT_ATTACK
)
and
not
c
:
IsHasEffect
(
EFFECT_CANNOT_ATTACK
)
and
not
c
:
IsHasEffect
(
EFFECT_CANNOT_DIRECT_ATTACK
)
end
-- Check: Is can Attach Effect (Pierce)
function
RushDuel
.
IsCanAttachPierce
(
c
)
return
not
c
:
IsHasEffect
(
EFFECT_CANNOT_ATTACK
)
end
-- Check: Is can Attach Effect (Double Tribute)
function
RushDuel
.
IsCanAttachDoubleTribute
(
c
)
return
not
c
:
IsHasEffect
(
EFFECT_UNRELEASABLE_SUM
)
end
-- Check: Is Operated Group Exists Card(s)
function
RushDuel
.
IsOperatedGroupExists
(
filter
,
count
,
expect
)
return
filter
~=
nil
and
Duel
.
GetOperatedGroup
():
IsExists
(
filter
,
count
,
expect
)
end
-- Cost: Pay LP
function
RushDuel
.
CostPayLP
(
lp
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
lp
)
end
Duel
.
PayLPCost
(
tp
,
lp
)
end
end
-- Cost: Show Hand Card(s) to Opponent
function
RushDuel
.
CostShowHand
(
filter
,
min
,
max
,
set_label
,
set_object
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
filter
,
tp
,
LOCATION_HAND
,
0
,
min
,
e
:
GetHandler
(),
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_CONFIRM
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
filter
,
tp
,
LOCATION_HAND
,
0
,
min
,
max
,
e
:
GetHandler
(),
e
,
tp
)
if
set_label
~=
nil
then
e
:
SetLabel
(
set_label
(
g
))
end
if
set_object
~=
nil
then
e
:
SetLabelObject
(
set_object
(
g
))
end
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
end
end
-- Cost: Send Deck Top Card(s) to Grave
function
RushDuel
.
CostSendDeckTopToGrave
(
count
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsPlayerCanDiscardDeckAsCost
(
tp
,
count
)
end
Duel
.
DiscardDeck
(
tp
,
count
,
REASON_COST
)
end
end
-- Cost: Send Hand Card(s) to Grave
function
RushDuel
.
CostSendHandToGrave
(
filter
,
min
,
max
,
set_label
,
set_object
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
filter
,
tp
,
LOCATION_HAND
,
0
,
min
,
e
:
GetHandler
(),
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TOGRAVE
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
filter
,
tp
,
LOCATION_HAND
,
0
,
min
,
max
,
e
:
GetHandler
(),
e
,
tp
)
if
set_label
~=
nil
then
e
:
SetLabel
(
set_label
(
g
))
end
if
set_object
~=
nil
then
e
:
SetLabelObject
(
set_object
(
g
))
end
Duel
.
SendtoGrave
(
g
,
REASON_COST
)
end
end
-- Cost: Send Self to Grave
function
RushDuel
.
CostSendSelfToGrave
()
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAbleToGraveAsCost
()
end
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
)
end
end
-- Cost: Send Grave to Deck
function
RushDuel
.
CostSendGraveToDeck
(
filter
,
min
,
max
,
set_label
,
set_object
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
filter
,
tp
,
LOCATION_GRAVE
,
0
,
min
,
nil
,
e
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
filter
,
tp
,
LOCATION_GRAVE
,
0
,
min
,
max
,
nil
,
e
,
tp
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
if
set_label
~=
nil
then
e
:
SetLabel
(
set_label
(
g
))
end
if
set_object
~=
nil
then
e
:
SetLabelObject
(
set_object
(
g
))
end
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_COST
)
end
end
-- Target: Draw
function
RushDuel
.
TargetDraw
(
player
,
count
)
Duel
.
SetTargetPlayer
(
player
)
Duel
.
SetTargetParam
(
count
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
player
,
count
)
end
-- Target: Recover
function
RushDuel
.
TargetRecover
(
player
,
recover
)
Duel
.
SetTargetPlayer
(
player
)
Duel
.
SetTargetParam
(
recover
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_RECOVER
,
nil
,
0
,
player
,
recover
)
end
-- Target: Damage
function
RushDuel
.
TargetDamage
(
player
,
damage
)
Duel
.
SetTargetPlayer
(
player
)
Duel
.
SetTargetParam
(
damage
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DAMAGE
,
nil
,
0
,
player
,
damage
)
end
-- Action: Draw
function
RushDuel
.
Draw
(
player
,
count
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
return
Duel
.
Draw
(
player
or
p
,
count
or
d
,
REASON_EFFECT
)
end
-- Action: Recover
function
RushDuel
.
Recover
(
player
,
recover
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
return
Duel
.
Recover
(
player
or
p
,
recover
or
d
,
REASON_EFFECT
)
end
-- Action: Damage
function
RushDuel
.
Damage
(
player
,
damage
)
local
p
,
d
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
,
CHAININFO_TARGET_PARAM
)
return
Duel
.
Damage
(
player
or
p
,
damage
or
d
,
REASON_EFFECT
)
end
-- Action: Select Card(s) and Do Action
function
RushDuel
.
SelectAndDoAction
(
hint
,
filter
,
tp
,
s
,
o
,
min
,
max
,
expect
,
action
)
if
min
<
2
or
Duel
.
IsExistingMatchingCard
(
filter
,
tp
,
s
,
o
,
min
,
expect
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
hint
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
filter
,
tp
,
s
,
o
,
min
,
max
,
expect
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
action
(
g
)
end
end
end
-- Action: Can Select Card(s) and Do Action (Select Yes No)
function
RushDuel
.
CanSelectAndDoAction
(
desc
,
hint
,
filter
,
tp
,
s
,
o
,
min
,
max
,
expect
,
action
)
if
Duel
.
IsExistingMatchingCard
(
filter
,
tp
,
s
,
o
,
min
,
expect
)
and
Duel
.
SelectYesNo
(
tp
,
desc
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
hint
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
filter
,
tp
,
s
,
o
,
min
,
max
,
expect
)
if
g
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
g
)
action
(
g
)
end
end
end
-- Action: Select Card(s) by Group Sub Check and Do Action
function
RushDuel
.
SelectGroupAndDoAction
(
hint
,
filter
,
check
,
tp
,
s
,
o
,
min
,
max
,
expect
,
action
)
local
g
=
Duel
.
GetMatchingGroup
(
filter
,
tp
,
s
,
o
,
expect
)
if
g
:
CheckSubGroup
(
check
,
min
,
max
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
hint
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
check
,
false
,
min
,
max
)
if
sg
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
sg
)
action
(
sg
)
end
end
end
-- Action: Can Select Card(s) by Group Sub Check and Do Action
function
RushDuel
.
CanSelectGroupAndDoAction
(
desc
,
hint
,
filter
,
check
,
tp
,
s
,
o
,
min
,
max
,
expect
,
action
)
local
g
=
Duel
.
GetMatchingGroup
(
filter
,
tp
,
s
,
o
,
expect
)
if
g
:
CheckSubGroup
(
check
,
min
,
max
)
and
Duel
.
SelectYesNo
(
tp
,
desc
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
hint
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
check
,
false
,
min
,
max
)
if
sg
:
GetCount
()
>
0
then
Duel
.
HintSelection
(
sg
)
action
(
sg
)
end
end
end
-- Action: Select Card(s) and Special Summon
function
RushDuel
.
SelectAndSpecialSummon
(
filter
,
e
,
tp
,
s
,
o
,
min
,
max
,
expect
,
pos
,
break_effect
)
local
ct
=
Duel
.
GetMZoneCount
(
tp
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ct
=
1
end
if
ct
>=
min
and
(
min
<
2
or
Duel
.
IsExistingMatchingCard
(
filter
,
tp
,
s
,
o
,
min
,
expect
,
e
,
tp
))
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
filter
,
tp
,
s
,
o
,
min
,
math.min
(
max
,
ct
),
expect
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
break_effect
then
Duel
.
BreakEffect
()
end
return
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
pos
)
end
end
return
0
end
-- Action: Can Select Card(s) and Special Summon (Select Yes No)
function
RushDuel
.
CanSelectAndSpecialSummon
(
desc
,
filter
,
e
,
tp
,
s
,
o
,
min
,
max
,
expect
,
pos
,
break_effect
)
local
ct
=
Duel
.
GetMZoneCount
(
tp
)
if
Duel
.
IsPlayerAffectedByEffect
(
tp
,
59822133
)
then
ct
=
1
end
if
ct
>=
min
and
Duel
.
IsExistingMatchingCard
(
filter
,
tp
,
s
,
o
,
min
,
expect
,
e
,
tp
)
and
Duel
.
SelectYesNo
(
tp
,
desc
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
filter
,
tp
,
s
,
o
,
min
,
math.min
(
max
,
ct
),
expect
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
if
break_effect
then
Duel
.
BreakEffect
()
end
return
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
pos
)
end
end
return
0
end
-- Action: Attach a Buff Effect
function
RushDuel
.
AttachSingleEffect
(
e
,
c
,
code
,
value
,
desc
,
reset
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
code
)
if
code
~=
nil
then
e1
:
SetValue
(
value
)
end
if
desc
~=
nil
then
e1
:
SetDescription
(
desc
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
end
if
reset
~=
nil
then
e1
:
SetReset
(
reset
)
end
c
:
RegisterEffect
(
e1
)
return
e1
end
-- Action: Attach Atk and Def Up/Down Buff
function
RushDuel
.
AttachAtkDef
(
e
,
c
,
atk
,
def
,
reset
)
if
atk
and
atk
~=
0
then
RushDuel
.
AttachSingleEffect
(
e
,
c
,
EFFECT_UPDATE_ATTACK
,
atk
,
nil
,
reset
)
end
if
def
and
def
~=
0
and
RushDuel
.
IsCanChangeDef
(
c
)
then
RushDuel
.
AttachSingleEffect
(
e
,
c
,
EFFECT_UPDATE_DEFENSE
,
def
,
nil
,
reset
)
end
end
-- Action: Attach Direct Attack
function
RushDuel
.
AttachDirectAttack
(
e
,
c
,
desc
,
reset
)
return
RushDuel
.
AttachSingleEffect
(
e
,
c
,
EFFECT_DIRECT_ATTACK
,
nil
,
desc
,
reset
)
end
-- Action: Attach Pierce
function
RushDuel
.
AttachPierce
(
e
,
c
,
desc
,
reset
)
return
RushDuel
.
AttachSingleEffect
(
e
,
c
,
EFFECT_PIERCE
,
nil
,
desc
,
reset
)
end
-- Action: Attach Extra Attack
function
RushDuel
.
AttachExtraAttack
(
e
,
c
,
value
,
desc
,
reset
)
return
RushDuel
.
AttachSingleEffect
(
e
,
c
,
EFFECT_EXTRA_ATTACK
,
value
,
desc
,
reset
)
end
-- Action: Attach Double Tribute
function
RushDuel
.
AttachDoubleTribute
(
e
,
c
,
value
,
desc
,
reset
)
return
RushDuel
.
AttachSingleEffect
(
e
,
c
,
EFFECT_DOUBLE_TRIBUTE
,
value
,
desc
,
reset
)
end
-- Action: Attach Effect Indestructible
function
RushDuel
.
AttachEffectIndes
(
e
,
c
,
value
,
desc
,
reset
)
return
RushDuel
.
AttachSingleEffect
(
e
,
c
,
EFFECT_INDESTRUCTABLE_EFFECT
,
value
,
desc
,
reset
)
end
-- Action: Attach Cannot Direct Attack
function
RD
.
AttachCannotDirectAttack
(
e
,
c
,
desc
,
reset
)
return
RushDuel
.
AttachSingleEffect
(
e
,
c
,
EFFECT_CANNOT_DIRECT_ATTACK
,
nil
,
desc
,
reset
)
end
-- Action: Attach Cannot Select Battle Target
function
RD
.
AttachCannotSelectBattleTarget
(
e
,
c
,
value
,
desc
,
reset
)
return
RushDuel
.
AttachSingleEffect
(
e
,
c
,
EFFECT_CANNOT_SELECT_BATTLE_TARGET
,
value
,
desc
,
reset
)
end
-- Action: Set Base Atk and Def
function
RushDuel
.
SetBaseAtkDef
(
e
,
c
,
atk
,
def
,
reset
)
if
atk
and
atk
~=
0
then
RushDuel
.
AttachSingleEffect
(
e
,
c
,
EFFECT_SET_BASE_ATTACK
,
atk
,
nil
,
reset
)
end
if
def
and
def
~=
0
and
RushDuel
.
IsCanChangeDef
(
c
)
then
RushDuel
.
AttachSingleEffect
(
e
,
c
,
EFFECT_SET_BASE_DEFENSE
,
def
,
nil
,
reset
)
end
end
-- Action: Change Attribute
function
RushDuel
.
ChangeAttribute
(
e
,
c
,
attribute
,
reset
)
return
RushDuel
.
AttachSingleEffect
(
e
,
c
,
EFFECT_CHANGE_ATTRIBUTE
,
attribute
,
nil
,
reset
)
end
-- Action: Change Position
function
RushDuel
.
ChangePosition
(
g
,
pos
)
if
pos
==
nil
then
return
Duel
.
ChangePosition
(
g
,
POS_FACEUP_DEFENSE
,
POS_FACEUP_DEFENSE
,
POS_FACEUP_ATTACK
,
POS_FACEUP_ATTACK
)
else
return
Duel
.
ChangePosition
(
g
,
pos
)
end
end
-- Action: Send Opponent's Hand to Grave
function
RushDuel
.
SendOpponentHandToGrave
(
tp
,
desc
,
min
,
max
)
local
g
=
Duel
.
GetFieldGroup
(
tp
,
0
,
LOCATION_HAND
)
local
ct
=
g
:
GetCount
()
if
ct
<
min
then
return
0
end
local
ops
=
{}
for
i
=
math.min
(
max
,
ct
),
min
,
-
1
do
table.insert
(
ops
,
i
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
desc
)
local
ac
=
Duel
.
AnnounceNumber
(
tp
,
table.unpack
(
ops
))
local
sg
=
g
:
RandomSelect
(
tp
,
ac
)
return
Duel
.
SendtoGrave
(
sg
,
REASON_EFFECT
)
end
-- Action: Send to Hand and Exists (Confirm To player)
function
RushDuel
.
SendToHandAndExists
(
g
,
confirm_player
,
filter
,
count
,
expect
)
if
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
==
0
then
return
false
end
Duel
.
ConfirmCards
(
confirm_player
,
g
)
return
RushDuel
.
IsOperatedGroupExists
(
filter
,
count
,
expect
)
end
-- Action: Send to Deck and Exists
function
RushDuel
.
SendToDeckAndExists
(
g
,
filter
,
count
,
expect
)
return
Duel
.
SendtoDeck
(
g
,
nil
,
2
,
REASON_EFFECT
)
~=
0
and
RushDuel
.
IsOperatedGroupExists
(
filter
,
count
,
expect
)
end
-- Action: Send to Deck Top (Sort)
function
RushDuel
.
SendToDeckTop
(
g
,
sort_player
,
target_player
,
sort
)
if
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_EFFECT
)
~=
0
and
sort
then
local
ct
=
Duel
.
GetOperatedGroup
():
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
if
ct
>
1
then
Duel
.
SortDecktop
(
sort_player
,
target_player
,
ct
)
end
end
end
-- Action: Send to Deck Bottom (Sort)
function
RushDuel
.
SendToDeckBottom
(
g
,
sort_player
,
target_player
,
sort
)
if
not
sort
then
Duel
.
SendtoDeck
(
g
,
nil
,
1
,
REASON_EFFECT
)
elseif
Duel
.
SendtoDeck
(
g
,
nil
,
0
,
REASON_EFFECT
)
~=
0
then
local
ct
=
Duel
.
GetOperatedGroup
():
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
if
ct
>
1
then
Duel
.
SortDecktop
(
sort_player
,
target_player
,
ct
)
for
i
=
1
,
ct
do
local
tc
=
Duel
.
GetDecktopGroup
(
target_player
,
1
):
GetFirst
()
Duel
.
MoveSequence
(
tc
,
1
)
end
end
end
end
-- Action: Send to Grave and Exists
function
RushDuel
.
SendToGraveAndExists
(
g
,
filter
,
count
,
expect
)
return
Duel
.
SendtoGrave
(
g
,
REASON_EFFECT
)
~=
0
and
RushDuel
.
IsOperatedGroupExists
(
filter
,
count
,
expect
)
end
-- Action: Send Deck Top Card(s) to Grave and Exists
function
RushDuel
.
SendDeckTopToGraveAndExists
(
player
,
card_count
,
filter
,
count
,
expect
)
return
Duel
.
DiscardDeck
(
player
,
card_count
,
REASON_EFFECT
)
~=
0
and
RushDuel
.
IsOperatedGroupExists
(
filter
,
count
,
expect
)
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