Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
fallenstardust
YGOMobile
Commits
58b26b91
Commit
58b26b91
authored
Dec 12, 2025
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正没有信用分但被常规禁止的卡牌可以被加入卡组的问题
parent
d00c4c69
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
Classes/gframe/deck_con.cpp
Classes/gframe/deck_con.cpp
+12
-6
No files found.
Classes/gframe/deck_con.cpp
View file @
58b26b91
...
@@ -1883,22 +1883,28 @@ bool DeckBuilder::check_limit(code_pointer pointer) {
...
@@ -1883,22 +1883,28 @@ bool DeckBuilder::check_limit(code_pointer pointer) {
// Lambda 函数:尝试消费某张卡所需的信用点数,若超限则返回false
// Lambda 函数:尝试消费某张卡所需的信用点数,若超限则返回false
auto
spend_credit
=
[
&
](
uint32_t
code
)
{
auto
spend_credit
=
[
&
](
uint32_t
code
)
{
// 查找该卡所需信用点配置
// 查找该卡所需信用点配置
auto
code_credit_it
=
filterList
->
credits
.
find
(
code
);
auto
code_credit_it
=
filterList
->
credits
.
find
(
code
);
if
(
code_credit_it
==
filterList
->
credits
.
end
())
if
(
code_credit_it
==
filterList
->
credits
.
end
())
{
return
true
;
// 若无信用要求,默认通过
if
(
limit
==
0
)
{
return
false
;
// 若在为常规禁止卡,则不通过,用于实现指定ID被单独禁止(如列出的全部灵摆、连接卡}
}
else
{
return
true
;
// 若无信用要求,默认通过
}
}
auto
code_credit
=
code_credit_it
->
second
;
auto
code_credit
=
code_credit_it
->
second
;
//过滤一遍卡组中所有卡的信用分,把有信用分的卡归集一起
auto
valid
=
true
;
auto
valid
=
true
;
// 遍历所有需要扣除的信用类型与数值
// 遍历所有需要扣除的信用类型与数值
for
(
auto
&
credit_it
:
code_credit
)
{
for
(
auto
&
credit_it
:
code_credit
)
{
auto
key
=
credit_it
.
first
;
auto
key
=
credit_it
.
first
;
//一般得到的是“genesys”这个识别字符串
auto
credit_limit_it
=
filterList
->
credit_limits
.
find
(
key
);
auto
credit_limit_it
=
filterList
->
credit_limits
.
find
(
key
);
//按lflist中的“$genesys”识别字符串得到信用分上限,一般是100
if
(
credit_limit_it
==
filterList
->
credit_limits
.
end
())
if
(
credit_limit_it
==
filterList
->
credit_limits
.
end
())
continue
;
// 若没有设定上限,则跳过
continue
;
// 若没有设定上限,则跳过
auto
credit_limit
=
credit_limit_it
->
second
;
auto
credit_limit
=
credit_limit_it
->
second
;
//按lflist中的“genesys”识别字符串得到信用分上限,一般是100
// 初始化该信用类型的已用量
// 初始化该信用类型的已用量
if
(
credit_used
.
find
(
key
)
==
credit_used
.
end
())
if
(
credit_used
.
find
(
key
)
==
credit_used
.
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