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
e90b8b72
Commit
e90b8b72
authored
Jun 17, 2023
by
未闻皂名
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2023/6/17 返回卡组操作修改
parent
82c9e353
Pipeline
#22282
passed with stages
in 6 minutes and 37 seconds
Changes
10
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
46 additions
and
51 deletions
+46
-51
script/RDCondition.lua
script/RDCondition.lua
+9
-5
script/RDCost.lua
script/RDCost.lua
+17
-0
script/RDFunction.lua
script/RDFunction.lua
+6
-4
script/RDLegend.lua
script/RDLegend.lua
+1
-1
script/c120140004.lua
script/c120140004.lua
+1
-1
script/c120192011.lua
script/c120192011.lua
+2
-6
script/c120199044.lua
script/c120199044.lua
+3
-16
script/c120231018.lua
script/c120231018.lua
+1
-1
script/c120231042.lua
script/c120231042.lua
+1
-8
script/c120239016.lua
script/c120239016.lua
+5
-9
No files found.
script/RDCondition.lua
View file @
e90b8b72
...
...
@@ -67,17 +67,21 @@ function RushDuel.IsPreviousRace(card, race)
return
(
card
:
GetPreviousRaceOnField
()
&
race
)
~=
0
end
-- 条件:可以攻击
function
RushDuel
.
IsCanAttack
(
card
)
return
not
card
:
IsHasEffect
(
EFFECT_CANNOT_ATTACK
)
end
-- 条件: 可否赋予效果 - 直接攻击
function
RushDuel
.
IsCanAttachDirectAttack
(
card
)
return
not
card
:
IsHasEffect
(
EFFECT_DIRECT_ATTACK
)
and
not
card
:
IsHasEffect
(
EFFECT_CANNO
T_ATTACK
)
and
not
card
:
IsHasEffect
(
EFFECT_CANNOT_DIRECT_ATTACK
)
return
RushDuel
.
IsCanAttack
(
card
)
and
not
card
:
IsHasEffect
(
EFFECT_DIREC
T_ATTACK
)
and
not
card
:
IsHasEffect
(
EFFECT_CANNOT_DIRECT_ATTACK
)
end
-- 条件: 可否赋予效果 - 贯通
function
RushDuel
.
IsCanAttachPierce
(
card
)
return
not
card
:
IsHasEffect
(
EFFECT_PIERCE
)
and
not
card
:
IsHasEffect
(
EFFECT_CANNOT_ATTACK
)
return
RushDuel
.
IsCanAttack
(
card
)
and
not
card
:
IsHasEffect
(
EFFECT_PIERCE
)
end
-- 条件: 可否赋予效果 - 多次攻击
function
RushDuel
.
IsCanAttachExtraAttack
(
card
,
value
)
if
card
:
IsHasEffect
(
EFFECT_CANNOT_ATTACK
)
then
if
not
RushDuel
.
IsCanAttack
(
card
)
then
return
false
end
local
values
=
RushDuel
.
GetEffectValues
(
card
,
EFFECT_EXTRA_ATTACK
)
...
...
@@ -90,7 +94,7 @@ function RushDuel.IsCanAttachExtraAttack(card, value)
end
-- 条件: 可否赋予效果 - 多次攻击 (怪兽限定)
function
RushDuel
.
IsCanAttachExtraAttackMonster
(
card
,
value
)
if
card
:
IsHasEffect
(
EFFECT_CANNOT_ATTACK
)
then
if
not
RushDuel
.
IsCanAttack
(
card
)
then
return
false
end
local
values
=
RushDuel
.
GetEffectValues
(
card
,
EFFECT_EXTRA_ATTACK_MONSTER
)
...
...
@@ -103,7 +107,7 @@ function RushDuel.IsCanAttachExtraAttackMonster(card, value)
end
-- 条件: 可否赋予效果 - 全体攻击
function
RushDuel
.
IsCanAttachAttackAll
(
card
,
value
)
return
not
card
:
IsHasEffect
(
EFFECT_CANNOT_ATTACK
)
return
RushDuel
.
IsCanAttack
(
card
)
end
-- 条件: 可否赋予效果 - 双重解放
function
RushDuel
.
IsCanAttachDoubleTribute
(
card
,
value
)
...
...
script/RDCost.lua
View file @
e90b8b72
...
...
@@ -104,6 +104,11 @@ function RushDuel.CostSendMatchToDeckTopOrBottom(filter, field, min, max, except
local
action
=
RushDuel
.
_private_action_send_deck_top_or_bottom
(
top_desc
,
bottom_desc
,
REASON_COST
,
hint_selection
,
confirm
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
return
RushDuel
.
_private_cost_select_match
(
HINTMSG_TODECK
,
filter
,
field
,
0
,
min
,
max
,
except_self
,
action
)
end
-- 代价: 选择子卡片组, 返回卡组上面或下面
function
RushDuel
.
CostSendGroupToDeckTopOrBottom
(
filter
,
check
,
field
,
min
,
max
,
except_self
,
top_desc
,
bottom_desc
,
hint_selection
,
confirm
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
local
action
=
RushDuel
.
_private_action_send_deck_top_or_bottom
(
top_desc
,
bottom_desc
,
REASON_COST
,
hint_selection
,
confirm
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
return
RushDuel
.
_private_cost_select_group
(
HINTMSG_TODECK
,
filter
,
check
,
field
,
0
,
min
,
max
,
except_self
,
action
)
end
-- 代价: 选择匹配卡片, 返回手卡
function
RushDuel
.
CostSendMatchToHand
(
filter
,
field
,
min
,
max
,
except_self
,
hint_selection
,
confirm
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
local
action
=
RushDuel
.
_private_action_send_hand
(
REASON_COST
,
hint_selection
,
confirm
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
...
...
@@ -197,6 +202,14 @@ end
function
RushDuel
.
CostSendMZoneToDeckBottom
(
filter
,
min
,
max
,
except_self
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
return
RushDuel
.
CostSendMatchToDeckSort
(
filter
,
LOCATION_MZONE
,
min
,
max
,
except_self
,
SEQ_DECKBOTTOM
,
true
,
false
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
end
-- 代价: 让怪兽返回卡组上面或下面
function
RushDuel
.
CostSendMZoneToDeckTopOrBottom
(
filter
,
min
,
max
,
top_desc
,
bottom_desc
,
except_self
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
return
RushDuel
.
CostSendMatchToDeckTopOrBottom
(
filter
,
LOCATION_MZONE
,
min
,
max
,
except_self
,
top_desc
,
bottom_desc
,
true
,
false
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
end
-- 代价: 让场上的卡返回卡组
function
RushDuel
.
CostSendOnFieldToDeck
(
filter
,
min
,
max
,
except_self
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
return
RushDuel
.
CostSendMatchToDeckSort
(
filter
,
LOCATION_ONFIELD
,
min
,
max
,
except_self
,
SEQ_DECKSHUFFLE
,
true
,
false
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
end
-- 代价: 让场上的卡返回卡组下面
function
RushDuel
.
CostSendOnFieldToDeckBottom
(
filter
,
min
,
max
,
except_self
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
return
RushDuel
.
CostSendMatchToDeckSort
(
filter
,
LOCATION_ONFIELD
,
min
,
max
,
except_self
,
SEQ_DECKBOTTOM
,
true
,
false
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
...
...
@@ -241,6 +254,10 @@ end
function
RushDuel
.
CostSendGraveToDeckTopOrBottom
(
filter
,
min
,
max
,
top_desc
,
bottom_desc
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
return
RushDuel
.
CostSendMatchToDeckTopOrBottom
(
filter
,
LOCATION_GRAVE
,
min
,
max
,
false
,
top_desc
,
bottom_desc
,
false
,
true
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
end
-- 代价: 让墓地的卡返回卡组上面或下面 (子卡片组)
function
RushDuel
.
CostSendGraveSubToDeckTopOrBottom
(
filter
,
check
,
min
,
max
,
top_desc
,
bottom_desc
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
return
RushDuel
.
CostSendGroupToDeckTopOrBottom
(
filter
,
check
,
LOCATION_GRAVE
,
min
,
max
,
false
,
top_desc
,
bottom_desc
,
false
,
true
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
end
-- 代价: 把怪兽返回手卡
function
RushDuel
.
CostSendMZoneToHand
(
filter
,
min
,
max
,
except_self
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
return
RushDuel
.
CostSendMatchToHand
(
filter
,
LOCATION_MZONE
,
min
,
max
,
except_self
,
false
,
true
,
set_label_before
,
set_object_before
,
set_label_after
,
set_object_after
)
...
...
script/RDFunction.lua
View file @
e90b8b72
...
...
@@ -121,18 +121,20 @@ end
-- 返回卡组并排序
function
RushDuel
.
SendToDeckSort
(
target
,
sequence
,
reason
,
sort_player
,
target_player
)
local
g
=
RushDuel
.
ToMaximunGroup
(
target
)
if
sequence
==
1
and
g
:
GetCount
()
>
1
then
if
g
:
GetCount
()
>
1
and
sequence
==
SEQ_DECKBOTTOM
then
Duel
.
SendtoDeck
(
g
,
nil
,
SEQ_DECKTOP
,
reason
)
else
Duel
.
SendtoDeck
(
g
,
nil
,
sequence
,
reason
)
end
local
og
=
Duel
.
GetOperatedGroup
()
local
ct
=
og
:
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
if
sequence
~=
2
and
ct
>
1
then
if
sequence
==
SEQ_DECKTOP
and
ct
>
1
then
Duel
.
SortDecktop
(
sort_player
,
target_player
,
ct
)
if
sequence
==
1
then
RushDuel
.
SendDeckTopToBottom
(
target_player
,
ct
)
elseif
sequence
==
SEQ_DECKBOTTOM
then
if
ct
>
1
then
Duel
.
SortDecktop
(
sort_player
,
target_player
,
ct
)
end
RushDuel
.
SendDeckTopToBottom
(
target_player
,
ct
)
end
return
og
,
ct
end
...
...
script/RDLegend.lua
View file @
e90b8b72
...
...
@@ -33,7 +33,7 @@ function RushDuel.InitLegend()
e1
:
SetValue
(
code
)
c
:
RegisterEffect
(
e1
,
true
)
-- 修改卡牌数据 (删除同名卡:传说卡)
c
:
Set
CardData
(
2
,
cod
e
)
c
:
Set
EntityCode
(
code
,
tru
e
)
end
)
end
...
...
script/c120140004.lua
View file @
e90b8b72
...
...
@@ -18,7 +18,7 @@ function cm.costfilter(c)
return
c
:
IsAttack
(
0
)
and
c
:
IsAbleToDeckOrExtraAsCost
()
end
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_WARRIOR
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_WARRIOR
)
and
RD
.
IsCanAttack
(
c
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsAbleToEnterBP
()
...
...
script/c120192011.lua
View file @
e90b8b72
...
...
@@ -16,13 +16,9 @@ function cm.initial_effect(c)
end
--Damage
function
cm
.
costfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsAbleToDeckAsCost
()
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_FZONE
,
0
,
1
,
nil
)
end
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
costfilter
,
tp
,
LOCATION_FZONE
,
0
,
nil
)
Duel
.
SendtoDeck
(
g
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_COST
)
return
c
:
IsFaceup
()
and
c
:
IsLocation
(
LOCATION_FZONE
)
and
c
:
IsAbleToDeckAsCost
()
end
cm
.
cost
=
RD
.
CostSendOnFieldToDeck
(
cm
.
costfilter
,
1
,
1
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
RD
.
TargetDamage
(
1
-
tp
,
600
)
...
...
script/c120199044.lua
View file @
e90b8b72
...
...
@@ -19,24 +19,11 @@ end
function
cm
.
filter
(
c
)
return
c
:
IsType
(
TYPE_NORMAL
)
and
c
:
IsAbleToHand
()
end
function
cm
.
costcheck
(
g
,
tp
)
return
g
:
GetClassCount
(
Card
.
GetRace
,
nil
)
==
g
:
GetCount
()
function
cm
.
costcheck
(
g
,
e
,
tp
)
return
g
:
GetClassCount
(
Card
.
GetRace
)
==
g
:
GetCount
()
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
g
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
if
chk
==
0
then
return
g
:
CheckSubGroup
(
cm
.
costcheck
,
3
,
3
,
tp
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
sg
=
g
:
SelectSubGroup
(
tp
,
cm
.
costcheck
,
false
,
3
,
3
,
tp
)
Duel
.
ConfirmCards
(
1
-
tp
,
sg
)
Duel
.
SendtoDeck
(
sg
,
nil
,
SEQ_DECKTOP
,
REASON_COST
)
local
option
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
1
),
aux
.
Stringid
(
m
,
2
))
local
ct
=
Duel
.
GetOperatedGroup
():
FilterCount
(
Card
.
IsLocation
,
nil
,
LOCATION_DECK
)
Duel
.
SortDecktop
(
tp
,
tp
,
ct
)
if
option
==
1
then
RD
.
SendDeckTopToBottom
(
tp
,
ct
)
end
end
cm
.
cost
=
RD
.
CostSendGraveSubToDeckTopOrBottom
(
cm
.
costfilter
,
cm
.
costcheck
,
3
,
3
,
aux
.
Stringid
(
m
,
1
),
aux
.
Stringid
(
m
,
2
))
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
...
...
script/c120231018.lua
View file @
e90b8b72
...
...
@@ -31,7 +31,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetAttacker
()
if
tc
and
tc
:
IsRelateToBattle
()
and
Duel
.
SendtoDeck
(
tc
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_EFFECT
)
~=
0
if
tc
and
tc
:
IsRelateToBattle
()
and
RD
.
SendToDeckAndExists
(
tc
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
exfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
then
Duel
.
Damage
(
1
-
tp
,
600
,
REASON_EFFECT
)
end
...
...
script/c120231042.lua
View file @
e90b8b72
...
...
@@ -24,14 +24,7 @@ end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetAttacker
():
IsControler
(
1
-
tp
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
cm
.
costfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
local
op
=
Duel
.
SelectOption
(
tp
,
aux
.
Stringid
(
m
,
1
),
aux
.
Stringid
(
m
,
2
))
Duel
.
SendtoDeck
(
g
,
nil
,
op
,
REASON_COST
)
end
cm
.
cost
=
RD
.
CostSendMZoneToDeckTopOrBottom
(
cm
.
costfilter
,
1
,
1
,
aux
.
Stringid
(
m
,
1
),
aux
.
Stringid
(
m
,
2
))
function
cm
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
NegateAttack
()
and
Duel
.
IsExistingMatchingCard
(
cm
.
exfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
then
RD
.
CanSelectAndDoAction
(
aux
.
Stringid
(
m
,
3
),
HINTMSG_DESTROY
,
cm
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
,
function
(
g
)
...
...
script/c120239016.lua
View file @
e90b8b72
...
...
@@ -29,14 +29,9 @@ end
function
cm
.
desfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
function
cm
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
g
=
Duel
.
GetMatchingGroup
(
cm
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
nil
)
if
chk
==
0
then
return
g
:
GetCount
()
>
0
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
sg
=
g
:
Select
(
tp
,
1
,
5
,
nil
)
local
ct
=
Duel
.
SendtoDeck
(
sg
,
nil
,
SEQ_DECKSHUFFLE
,
REASON_COST
)
e
:
SetValue
(
ct
)
end
cm
.
cost
=
RD
.
CostSendGraveToDeck
(
cm
.
costfilter
,
1
,
5
,
nil
,
nil
,
function
(
g
)
return
m
,
g
:
GetCount
()
end
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
if
RD
.
IsMaximumMode
(
e
:
GetHandler
())
then
...
...
@@ -45,7 +40,8 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
RD
.
SelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
Card
.
IsFaceup
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
g
)
local
down
=
e
:
GetValue
()
*-
300
local
_
,
ct
=
e
:
GetLabel
()
local
down
=
ct
*-
300
RD
.
AttachAtkDef
(
e
,
g
:
GetFirst
(),
down
,
down
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
if
RD
.
IsMaximumMode
(
e
:
GetHandler
())
and
not
Duel
.
IsExistingMatchingCard
(
cm
.
exfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
then
RD
.
CanSelectAndDoAction
(
aux
.
Stringid
(
m
,
2
),
HINTMSG_DESTROY
,
cm
.
desfilter
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
,
function
(
sg
)
...
...
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