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
d6fe6ad3
Commit
d6fe6ad3
authored
Oct 31, 2022
by
未闻皂名
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2022/10/31 更改传说卡判断逻辑
parent
635a0066
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
script/RDCode.lua
script/RDCode.lua
+14
-6
No files found.
script/RDCode.lua
View file @
d6fe6ad3
-- Rush Duel 编号
RushDuel
=
RushDuel
or
{}
LEGEND_MONSTER
=
120000000
LEGEND_SPELL
=
120000001
LEGEND_TRAP
=
120000002
LEGEND_DARK_MAGICIAN
=
{
120130000
,
120203015
}
LEGEND_BLUE_EYES_WHITE_DRAGON
=
{
120120000
,
120198001
,
120230001
}
LEGEND_RED_EYES_BLACK_DRAGON
=
{
120125001
,
120203016
,
120229101
}
...
...
@@ -17,13 +20,18 @@ function RushDuel.AddCodeList(card, ...)
end
end
-- 条件: 是否为传说卡
-- 条件: 当前卡名是否为传说卡
function
RushDuel
.
IsLegend
(
card
)
return
card
:
IsCode
(
LEGEND_MONSTER
,
LEGEND_SPELL
,
LEGEND_TRAP
)
end
-- 条件: 是否为传说卡的卡名
function
RushDuel
.
IsLegendCode
(
card
,
...
)
for
_
,
list
in
ipairs
{
...
}
do
local
type
=
aux
.
GetValueType
(
list
)
if
type
==
"number"
and
card
:
GetOriginalCode
()
==
list
and
card
:
IsCode
(
120000000
)
then
for
_
,
item
in
ipairs
{
...
}
do
local
type
=
aux
.
GetValueType
(
item
)
if
type
==
"number"
and
RushDuel
.
IsLegend
(
card
)
and
card
:
GetOriginalCode
()
==
item
then
return
true
elseif
type
==
"table"
and
RushDuel
.
IsLegendCode
(
card
,
table.unpack
(
list
))
then
elseif
type
==
"table"
and
RushDuel
.
IsLegendCode
(
card
,
table.unpack
(
item
))
then
return
true
end
end
...
...
@@ -32,7 +40,7 @@ end
-- 条件: 是否为同名卡
function
RushDuel
.
IsSameCode
(
card1
,
card2
)
if
(
card1
:
IsCode
(
120000000
)
or
card2
:
IsCode
(
120000000
))
then
if
(
RushDuel
.
IsLegend
(
card1
)
or
RushDuel
.
IsLegend
(
card2
))
then
return
card1
:
GetOriginalCode
()
==
card2
:
GetOriginalCode
()
else
return
card1
:
IsCode
(
card2
:
GetCode
())
...
...
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