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
4
Issues
4
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
5cecc59b
Commit
5cecc59b
authored
Jan 29, 2023
by
未闻皂名
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2023/1/29 卡名检测修改
parent
41259ddf
Pipeline
#19824
passed with stages
in 5 minutes and 17 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
10 deletions
+34
-10
script/RDBase.lua
script/RDBase.lua
+29
-0
script/RDCode.lua
script/RDCode.lua
+5
-10
No files found.
script/RDBase.lua
View file @
5cecc59b
...
...
@@ -315,3 +315,32 @@ function RushDuel.GetEffectValues(card, code)
end
return
values
end
-- 抹平表
function
RushDuel
.
FlatTable
(
...
)
local
result
=
{}
for
_
,
item
in
ipairs
({
...
})
do
if
type
(
item
)
==
"table"
then
local
datas
=
RushDuel
.
FlatTable
(
table.unpack
(
item
))
for
_
,
data
in
ipairs
(
datas
)
do
table.insert
(
result
,
data
)
end
else
table.insert
(
result
,
item
)
end
end
return
result
end
-- 递归检查表
function
RushDuel
.
FlatCheck
(
check
,
...
)
for
_
,
item
in
ipairs
({
...
})
do
if
type
(
item
)
==
"table"
then
if
RushDuel
.
FlatCheck
(
check
,
table.unpack
(
item
))
then
return
true
end
elseif
check
(
item
)
then
return
true
end
end
return
false
end
\ No newline at end of file
script/RDCode.lua
View file @
5cecc59b
...
...
@@ -32,15 +32,10 @@ end
-- 条件: 是否为传说卡的卡名
function
RushDuel
.
IsLegendCode
(
card
,
...
)
for
_
,
item
in
ipairs
{
...
}
do
local
type
=
aux
.
GetValueType
(
item
)
if
type
==
"number"
and
RushDuel
.
GetCardCode
(
card
)
==
item
then
return
true
elseif
type
==
"table"
and
RushDuel
.
IsLegendCode
(
card
,
table.unpack
(
item
))
then
return
true
end
end
return
false
local
code
=
RushDuel
.
GetCardCode
(
card
)
return
RushDuel
.
FlatCheck
(
function
(
item
)
return
code
==
item
end
,
...
)
end
-- 获取卡牌的密码
...
...
@@ -63,4 +58,4 @@ end
-- 条件: 是否卡名不同
function
RushDuel
.
IsDifferentCode
(
card1
,
card2
)
return
RushDuel
.
GetCardCode
(
card1
)
~=
RushDuel
.
GetCardCode
(
card2
)
end
\ No newline at end of file
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