Commit b12d87aa authored by yxli's avatar yxli
parents d180ec0c 7caf4020
......@@ -159,19 +159,10 @@ def compare_tags(guess_tags, answer_tags):
#同属圣王阵营或灵王阵营但属性没猜对则显示黄色
if key == "属性":
DominusAttr=[
["水","炎","暗"],
["风","地","光"]]
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>'
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 == "种族":
......@@ -206,16 +197,9 @@ def compare_tags(guess_tags, answer_tags):
["机械","炎"],
["恐龙","岩石","不死"],
["龙","恶魔"]]
if val1==val2:
cls="tag-green"
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>'
for CRace in CorrelatedRaces:
if val1 in CRace and val2 in CRace and val1!=val2:
cls="tag-yellow"
# 数值型字段:攻击、守备、等级、刻度
if isinstance(val1, numbers.Number):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment