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
af4fb555
Commit
af4fb555
authored
Mar 31, 2022
by
未闻皂名
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2022/3/31 bug修复,修正王家魔族上级召唤的【条件】
parent
66dc7a7b
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
84 additions
and
94 deletions
+84
-94
script/RDBase.lua
script/RDBase.lua
+34
-1
script/RDFunction.lua
script/RDFunction.lua
+7
-0
script/c120130031.lua
script/c120130031.lua
+8
-17
script/c120140015.lua
script/c120140015.lua
+8
-17
script/c120140016.lua
script/c120140016.lua
+8
-17
script/c120170024.lua
script/c120170024.lua
+8
-20
script/c120203012.lua
script/c120203012.lua
+8
-20
script/c120205047.lua
script/c120205047.lua
+2
-1
script/c120208013.lua
script/c120208013.lua
+1
-1
No files found.
script/RDBase.lua
View file @
af4fb555
...
...
@@ -165,7 +165,8 @@ end
function
RushDuel
.
MultiChooseTarget
(
condition1
,
condition2
,
target
)
return
function
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
(
condition1
==
nil
or
condition1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
false
))
or
(
condition2
==
nil
or
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
false
))
return
(
condition1
==
nil
or
condition1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
false
))
or
(
condition2
==
nil
or
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
false
))
end
if
target
~=
nil
then
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
@@ -194,3 +195,35 @@ function RushDuel.MultiChooseOperation(hint1, condition1, operation1, hint2, con
end
end
end
-- 上级召唤时的解放怪兽检测
function
RushDuel
.
CreateAdvanceCheck
(
card
,
filter
,
count
,
flag
)
local
e1
=
Effect
.
CreateEffect
(
card
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e1
:
SetValue
(
function
(
e
,
c
)
if
c
:
GetMaterial
():
IsExists
(
filter
,
count
,
nil
,
e
)
then
e
:
SetLabel
(
flag
)
else
e
:
SetLabel
(
0
)
end
end
)
card
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
card
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetLabelObject
(
e1
)
e2
:
SetCondition
(
RushDuel
.
AdvanceCheckCondition
)
e2
:
SetOperation
(
RushDuel
.
AdvanceCheckOperation
)
card
:
RegisterEffect
(
e2
)
end
function
RushDuel
.
AdvanceCheckCondition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_ADVANCE
)
end
function
RushDuel
.
AdvanceCheckOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
label
=
e
:
GetLabelObject
():
GetLabel
()
if
label
~=
0
then
e
:
GetHandler
():
RegisterFlagEffect
(
label
,
RESET_EVENT
+
RESETS_STANDARD
,
0
,
1
)
end
end
script/RDFunction.lua
View file @
af4fb555
...
...
@@ -24,6 +24,7 @@ function RushDuel.SetLabelAndObject(effect, target, set_label, set_object)
end
end
end
-- 带有额外参数的过滤器
function
RushDuel
.
Filter
(
filter
,
...
)
local
args
=
{
...
}
...
...
@@ -38,6 +39,7 @@ function RushDuel.Check(check, ...)
return
check
(
g
,
table.unpack
(
args
))
end
end
-- 对卡片组里的全部卡片作位或运算
function
RushDuel
.
GroupBor
(
g
,
func
,
...
)
local
result
=
0
...
...
@@ -47,6 +49,7 @@ function RushDuel.GroupBor(g, func, ...)
end
)
return
result
end
-- 显示选择动画, 或者展示卡片组
function
RushDuel
.
HintOrConfirm
(
group
,
hint_selection
,
confirm
,
target_player
)
if
hint_selection
then
...
...
@@ -55,6 +58,7 @@ function RushDuel.HintOrConfirm(group, hint_selection, confirm, target_player)
Duel
.
ConfirmCards
(
target_player
,
group
)
end
end
-- 将 卡片组/卡片/效果 转化为卡片组, 对于极大怪兽, 其素材也包含其中
function
RushDuel
.
ToMaximunGroup
(
target
)
local
type
=
aux
.
GetValueType
(
target
)
...
...
@@ -75,6 +79,7 @@ function RushDuel.ToMaximunGroup(target)
g
:
Merge
(
overlay
)
return
g
end
-- 获取可用的主要怪兽区域数量
function
RushDuel
.
GetMZoneCount
(
player
,
max
)
local
ct
=
Duel
.
GetLocationCount
(
player
,
LOCATION_MZONE
)
...
...
@@ -88,6 +93,7 @@ function RushDuel.GetSZoneCount(player, max)
local
ct
=
Duel
.
GetLocationCount
(
player
,
LOCATION_SZONE
)
return
math.min
(
ct
,
max
)
end
-- 将玩家卡组最上面的N张卡移到卡组最下面
function
RushDuel
.
SendDeckTopToBottom
(
player
,
count
)
for
i
=
1
,
count
do
...
...
@@ -101,6 +107,7 @@ function RushDuel.SendDeckBottomToTop(player, count)
Duel
.
MoveSequence
(
g
:
GetMinGroup
(
Card
.
GetSequence
):
GetFirst
(),
0
)
end
end
-- 返回卡组并排序
function
RushDuel
.
SendToDeckSort
(
target
,
sequence
,
reason
,
sort_player
,
target_player
)
local
g
=
RushDuel
.
ToMaximunGroup
(
target
)
...
...
script/c120130031.lua
View file @
af4fb555
...
...
@@ -2,6 +2,8 @@ local m=120130031
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"王家魔族·重金属歌手"
function
cm
.
initial_effect
(
c
)
--Tribute
RD
.
CreateAdvanceCheck
(
c
,
cm
.
tricheck
,
1
,
20130031
)
--Destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
...
...
@@ -12,20 +14,18 @@ function cm.initial_effect(c)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
--Tribute
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e2
:
SetLabelObject
(
e1
)
e2
:
SetValue
(
cm
.
tricheck
)
c
:
RegisterEffect
(
e2
)
end
--Tribute
function
cm
.
tricheck
(
c
)
return
c
:
IsLevelAbove
(
5
)
end
--Destroy
function
cm
.
desfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsLevelBelow
(
8
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
RD
.
IsSummonTurn
(
e
:
GetHandler
())
and
e
:
GetLabel
()
==
20130031
local
c
=
e
:
GetHandler
()
return
RD
.
IsSummonTurn
(
c
)
and
c
:
GetFlagEffect
(
20130031
)
~=
0
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
desfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
...
...
@@ -46,13 +46,4 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
end
end
--Tribute
function
cm
.
tricheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
if
g
:
IsExists
(
Card
.
IsLevelAbove
,
1
,
nil
,
5
)
then
e
:
GetLabelObject
():
SetLabel
(
20130031
)
else
e
:
GetLabelObject
():
SetLabel
(
0
)
end
end
\ No newline at end of file
script/c120140015.lua
View file @
af4fb555
...
...
@@ -2,6 +2,8 @@ local m=120140015
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"王家魔族·英伦入侵歌手"
function
cm
.
initial_effect
(
c
)
--Tribute
RD
.
CreateAdvanceCheck
(
c
,
cm
.
tricheck
,
2
,
20140015
)
--Destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
...
...
@@ -12,20 +14,18 @@ function cm.initial_effect(c)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
--Tribute
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e2
:
SetLabelObject
(
e1
)
e2
:
SetValue
(
cm
.
tricheck
)
c
:
RegisterEffect
(
e2
)
end
--Tribute
function
cm
.
tricheck
(
c
)
return
c
:
IsLevelAbove
(
5
)
end
--Destroy
function
cm
.
desfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsLevelBelow
(
4
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
RD
.
IsSummonTurn
(
e
:
GetHandler
())
and
e
:
GetLabel
()
==
20140015
local
c
=
e
:
GetHandler
()
return
RD
.
IsSummonTurn
(
c
)
and
c
:
GetFlagEffect
(
20140015
)
~=
0
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
desfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
...
...
@@ -37,13 +37,4 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if
g
:
GetCount
()
>
0
then
Duel
.
Destroy
(
g
,
REASON_EFFECT
)
end
end
--Tribute
function
cm
.
tricheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
if
g
:
IsExists
(
Card
.
IsLevelAbove
,
2
,
nil
,
5
)
then
e
:
GetLabelObject
():
SetLabel
(
20140015
)
else
e
:
GetLabelObject
():
SetLabel
(
0
)
end
end
\ No newline at end of file
script/c120140016.lua
View file @
af4fb555
...
...
@@ -2,6 +2,8 @@ local m=120140016
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"王家魔族·死吼歌手"
function
cm
.
initial_effect
(
c
)
--Tribute
RD
.
CreateAdvanceCheck
(
c
,
cm
.
tricheck
,
1
,
20140016
)
--Atk & Def Down
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
...
...
@@ -13,20 +15,18 @@ function cm.initial_effect(c)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
--Tribute
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e2
:
SetLabelObject
(
e1
)
e2
:
SetValue
(
cm
.
tricheck
)
c
:
RegisterEffect
(
e2
)
end
--Tribute
function
cm
.
tricheck
(
c
)
return
c
:
IsLevelAbove
(
5
)
end
--Atk & Def Down
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsLevelBelow
(
8
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
RD
.
IsSummonTurn
(
e
:
GetHandler
())
and
e
:
GetLabel
()
==
20140016
local
c
=
e
:
GetHandler
()
return
RD
.
IsSummonTurn
(
c
)
and
c
:
GetFlagEffect
(
20140016
)
~=
0
end
cm
.
cost
=
RD
.
CostSendDeckTopToGrave
(
1
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
...
...
@@ -38,13 +38,4 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local
down
=
tc
:
GetLevel
()
*-
200
RD
.
AttachAtkDef
(
e
,
tc
,
down
,
down
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
end
--Tribute
function
cm
.
tricheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
if
g
:
IsExists
(
Card
.
IsLevelAbove
,
1
,
nil
,
5
)
then
e
:
GetLabelObject
():
SetLabel
(
20140016
)
else
e
:
GetLabelObject
():
SetLabel
(
0
)
end
end
\ No newline at end of file
script/c120170024.lua
View file @
af4fb555
...
...
@@ -2,6 +2,8 @@ local m=120170024
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"王家魔族·死亡厄运歌手"
function
cm
.
initial_effect
(
c
)
--Tribute
RD
.
CreateAdvanceCheck
(
c
,
cm
.
tricheck
,
2
,
20170024
)
--Destroy
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
...
...
@@ -12,17 +14,15 @@ function cm.initial_effect(c)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
--Tribute
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e2
:
SetLabelObject
(
e1
)
e2
:
SetValue
(
cm
.
tricheck
)
c
:
RegisterEffect
(
e2
)
end
--Tribute
function
cm
.
tricheck
(
c
)
return
c
:
IsLevelAbove
(
7
)
and
c
:
IsRace
(
RACE_FIEND
)
end
--Destroy
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
RD
.
IsSummonTurn
(
e
:
GetHandler
())
and
e
:
GetLabel
()
==
20170024
local
c
=
e
:
GetHandler
()
return
RD
.
IsSummonTurn
(
c
)
and
c
:
GetFlagEffect
(
20170024
)
~=
0
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
...
...
@@ -39,16 +39,4 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Damage
(
1
-
tp
,
lv
*
100
,
REASON_EFFECT
)
end
end
end
--Tribute
function
cm
.
trifilter
(
c
)
return
c
:
IsLevelAbove
(
7
)
and
c
:
IsRace
(
RACE_FIEND
)
end
function
cm
.
tricheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
if
g
:
IsExists
(
cm
.
trifilter
,
2
,
nil
)
then
e
:
GetLabelObject
():
SetLabel
(
20170024
)
else
e
:
GetLabelObject
():
SetLabel
(
0
)
end
end
\ No newline at end of file
script/c120203012.lua
View file @
af4fb555
...
...
@@ -2,6 +2,8 @@ local m=120203012
local
cm
=
_G
[
"c"
..
m
]
cm
.
name
=
"王家魔族·硬摇滚歌手"
function
cm
.
initial_effect
(
c
)
--Tribute
RD
.
CreateAdvanceCheck
(
c
,
cm
.
tricheck
,
2
,
20203012
)
--Damage
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
0
))
...
...
@@ -12,20 +14,18 @@ function cm.initial_effect(c)
e1
:
SetTarget
(
cm
.
target
)
e1
:
SetOperation
(
cm
.
operation
)
c
:
RegisterEffect
(
e1
)
--Tribute
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_MATERIAL_CHECK
)
e2
:
SetLabelObject
(
e1
)
e2
:
SetValue
(
cm
.
tricheck
)
c
:
RegisterEffect
(
e2
)
end
--Tribute
function
cm
.
tricheck
(
c
)
return
c
:
IsLevelAbove
(
7
)
and
c
:
IsRace
(
RACE_FIEND
)
end
--Damage
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsLevelAbove
(
7
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
RD
.
IsSummonTurn
(
e
:
GetHandler
())
and
e
:
GetLabel
()
==
20203012
local
c
=
e
:
GetHandler
()
return
RD
.
IsSummonTurn
(
c
)
and
c
:
GetFlagEffect
(
20203012
)
~=
0
end
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
end
...
...
@@ -42,16 +42,4 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD
.
AttachAtkDef
(
e
,
c
,
tc
:
GetAttack
(),
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_DISABLE
+
RESET_PHASE
+
PHASE_END
)
end
)
end
end
--Tribute
function
cm
.
trifilter
(
c
)
return
c
:
IsLevelAbove
(
7
)
and
c
:
IsRace
(
RACE_FIEND
)
end
function
cm
.
tricheck
(
e
,
c
)
local
g
=
c
:
GetMaterial
()
if
g
:
IsExists
(
cm
.
trifilter
,
2
,
nil
)
then
e
:
GetLabelObject
():
SetLabel
(
20203012
)
else
e
:
GetLabelObject
():
SetLabel
(
0
)
end
end
\ No newline at end of file
script/c120205047.lua
View file @
af4fb555
...
...
@@ -13,8 +13,9 @@ function cm.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
--Activate
function
cm
.
costfilter
(
c
)
function
cm
.
costfilter
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_PLANT
)
and
c
:
IsAbleToGraveAsCost
()
and
Duel
.
IsExistingMatchingCard
(
cm
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
c
)
end
function
cm
.
filter
(
c
)
return
c
:
IsDefensePos
()
and
RD
.
IsCanChangePosition
(
c
)
...
...
script/c120208013.lua
View file @
af4fb555
...
...
@@ -26,7 +26,7 @@ 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
(
HINTMSG_TODECK
,
aux
.
NecroValleyFilter
(
Card
.
IsAbleToDeck
),
tp
,
0
,
LOCATION_GRAVE
,
1
,
1
,
nil
,
function
(
g
)
if
RD
.
SendToDeckAndExists
(
g
)
and
Duel
.
IsExistingMatchingCard
(
exfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
then
if
RD
.
SendToDeckAndExists
(
g
)
and
Duel
.
IsExistingMatchingCard
(
cm
.
exfilter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
then
RD
.
CanSelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
HINTMSG_POSCHANGE
,
cm
.
posfilter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
function
(
sg
)
RD
.
ChangePosition
(
sg
,
POS_FACEUP_DEFENSE
)
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