Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
yugioh-ccb
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
MyCard
yugioh-ccb
Commits
cb51a624
Commit
cb51a624
authored
May 05, 2025
by
yxli
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Yellow Hints for Attr and Race
parent
7866ca90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
data_utils.py
data_utils.py
+45
-0
No files found.
data_utils.py
View file @
cb51a624
...
@@ -156,6 +156,51 @@ def compare_tags(guess_tags, answer_tags):
...
@@ -156,6 +156,51 @@ def compare_tags(guess_tags, answer_tags):
cls
=
"tag-gray"
cls
=
"tag-gray"
pills
.
append
(
f
'<span class="tag {cls}">{sym}</span>'
)
pills
.
append
(
f
'<span class="tag {cls}">{sym}</span>'
)
return
" "
.
join
(
pills
)
return
" "
.
join
(
pills
)
#同属圣王阵营或灵王阵营但属性没猜对则显示黄色
if
key
==
"属性"
:
DominusI
=
[
"水"
,
"炎"
,
"暗"
]
DominusP
=
[
"风"
,
"地"
,
"光"
]
if
((
val1
in
DominusI
and
val2
in
DominusI
)
or
(
val1
in
DominusP
and
val2
in
DominusP
))
and
val1
!=
val2
:
cls
=
"tag-yellow"
#官方全卡池中存在1个效果,其中猜的怪兽的种族与答案种族并列(例如,素材中写魔法师族·战士族,效果文中写兽族·兽战士族·鸟兽族)
if
key
==
"种族"
:
CorrelatedRaces
=
[
[
"龙"
,
"鸟兽"
,
"雷"
],
[
"兽"
,
"兽战士"
,
"鸟兽"
,
"昆虫"
,
"植物"
],
[
"机械"
,
"幻想魔"
],
[
"恶魔"
,
"幻想魔"
,
"兽"
],
[
"魔法师"
,
"幻想魔"
,
"恶魔"
],
[
"天使"
,
"恶魔"
,
"爬虫"
],
[
"龙"
,
"植物"
],
[
"战士"
,
"龙"
,
"魔法师"
],
[
"炎"
,
"雷"
,
"恶魔"
],
[
"鱼"
,
"海龙"
,
"水"
,
"雷"
],
[
"龙"
,
"恐龙"
,
"海龙"
,
"幻龙"
],
[
"念动力"
,
"幻龙"
],
[
"昆虫"
,
"植物"
,
"爬虫类"
],
[
"恶魔"
,
"不死"
],
[
"兽"
,
"植物"
,
"天使"
],
[
"龙"
,
"机械"
,
"电子界"
],
[
"爬虫"
,
"恐龙"
],
[
"机械"
,
"念动力"
,
"电子界"
],
[
"战士"
,
"机械"
],
[
"岩石"
,
"爬虫类"
],
[
"爬虫类"
,
"海龙"
,
"鸟兽"
],
[
"炎"
,
"水"
],
[
"岩石"
,
"机械"
],
[
"战士"
,
"魔法师"
,
"兽战士"
],
[
"战士"
,
"兽"
,
"炎"
],
[
"恐龙"
,
"海龙"
,
"雷"
],
[
"机械"
,
"天使"
,
"恶魔"
],
[
"机械"
,
"炎"
],
[
"恐龙"
,
"岩石"
,
"不死"
],
[
"龙"
,
"恶魔"
]]
for
CRace
in
CorrelatedRaces
:
if
val1
in
CRace
and
val2
in
CRace
and
val1
!=
val2
:
cls
=
"tag-yellow"
# 数值型字段:攻击、守备、等级、刻度
# 数值型字段:攻击、守备、等级、刻度
if
isinstance
(
val1
,
numbers
.
Number
):
if
isinstance
(
val1
,
numbers
.
Number
):
diff
=
abs
(
val1
-
val2
)
diff
=
abs
(
val1
-
val2
)
...
...
nanahira
@nanahira
mentioned in commit
7caf4020
·
May 05, 2025
mentioned in commit
7caf4020
mentioned in commit 7caf402000d55593b8b80ff5b04d5792f7f255b5
Toggle commit list
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