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
a0efbc77
Commit
a0efbc77
authored
May 05, 2025
by
yxli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Yellow Hints for Attr and Race
parent
b12d87aa
Pipeline
#35942
passed with stages
in 1 minute and 52 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
7 deletions
+26
-7
data_utils.py
data_utils.py
+26
-7
No files found.
data_utils.py
View file @
a0efbc77
...
@@ -156,13 +156,23 @@ def compare_tags(guess_tags, answer_tags):
...
@@ -156,13 +156,23 @@ 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
)
<<<<<<<
HEAD
#同属圣王阵营或灵王阵营但属性没猜对则显示黄色
#同属圣王阵营或灵王阵营但属性没猜对则显示黄色
if
key
==
"属性"
:
if
key
==
"属性"
:
DominusI
=
[
"水"
,
"炎"
,
"暗"
]
DominusAttr
=
[
DominusP
=
[
"风"
,
"地"
,
"光"
]
[
"水"
,
"炎"
,
"暗"
],
if
((
val1
in
DominusI
and
val2
in
DominusI
)
or
(
val1
in
DominusP
and
val2
in
DominusP
))
and
val1
!=
val2
:
[
"风"
,
"地"
,
"光"
]]
cls
=
"tag-yellow"
if
val1
==
val2
:
cls
=
"tag-green"
else
:
for
AttrList
in
DominusAttr
:
if
val1
in
AttrList
and
val2
in
AttrList
:
cls
=
"tag-yellow"
break
else
:
cls
=
"tag-grey"
return
f
'<span class="tag {cls}">{val1}</span>'
#官方全卡池中存在1个效果,其中猜的怪兽的种族与答案种族并列(例如,素材中写魔法师族·战士族,效果文中写兽族·兽战士族·鸟兽族)
#官方全卡池中存在1个效果,其中猜的怪兽的种族与答案种族并列(例如,素材中写魔法师族·战士族,效果文中写兽族·兽战士族·鸟兽族)
if
key
==
"种族"
:
if
key
==
"种族"
:
...
@@ -197,10 +207,19 @@ def compare_tags(guess_tags, answer_tags):
...
@@ -197,10 +207,19 @@ def compare_tags(guess_tags, answer_tags):
[
"机械"
,
"炎"
],
[
"机械"
,
"炎"
],
[
"恐龙"
,
"岩石"
,
"不死"
],
[
"恐龙"
,
"岩石"
,
"不死"
],
[
"龙"
,
"恶魔"
]]
[
"龙"
,
"恶魔"
]]
for
CRace
in
CorrelatedRaces
:
if
val1
==
val2
:
if
val1
in
CRace
and
val2
in
CRace
and
val1
!=
val2
:
cls
=
"tag-green"
cls
=
"tag-yellow"
else
:
for
CRace
in
CorrelatedRaces
:
if
val1
in
CRace
and
val2
in
CRace
:
cls
=
"tag-yellow"
break
else
:
cls
=
"tag-grey"
return
f
'<span class="tag {cls}">{val1}</span>'
=======
>>>>>>>
7
caf402000d55593b8b80ff5b04d5792f7f255b5
# 数值型字段:攻击、守备、等级、刻度
# 数值型字段:攻击、守备、等级、刻度
if
isinstance
(
val1
,
numbers
.
Number
):
if
isinstance
(
val1
,
numbers
.
Number
):
diff
=
abs
(
val1
-
val2
)
diff
=
abs
(
val1
-
val2
)
...
...
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