游戏可以运行
This commit is contained in:
@@ -257,8 +257,8 @@ class UI:
|
||||
|
||||
# Line 2: type + stats
|
||||
if card_data["type"] == "unit":
|
||||
icon = {"infantry": "步", "cavalry": "骑", "chariot": "车",
|
||||
"archer": "弓", "siege": "攻"}.get(card_data.get("unit_type"), "?")
|
||||
icon = {"infantry": "步", "cavalry": "骑",
|
||||
"archer": "弓"}.get(card_data.get("unit_type"), "?")
|
||||
stats = f"{icon} 攻{card_data['attack']} 防{card_data['defense']} 血{card_data['max_hp']}"
|
||||
else:
|
||||
stats = f"谋略: {card_data['description'][:12]}"
|
||||
@@ -297,8 +297,8 @@ class UI:
|
||||
self.screen.blit(cs, (x + small_w - cs.get_width() - 4, y + 3))
|
||||
|
||||
if card_data["type"] == "unit":
|
||||
icon = {"infantry": "步", "cavalry": "骑", "chariot": "车",
|
||||
"archer": "弓", "siege": "攻"}.get(card_data.get("unit_type"), "?")
|
||||
icon = {"infantry": "步", "cavalry": "骑",
|
||||
"archer": "弓"}.get(card_data.get("unit_type"), "?")
|
||||
stats = f"{icon} 攻{card_data['attack']} 防{card_data['defense']} 血{card_data['max_hp']}"
|
||||
else:
|
||||
stats = f"谋略: {card_data['description'][:12]}"
|
||||
@@ -492,8 +492,8 @@ class UI:
|
||||
self.screen.blit(name_surf, (x + w // 2 - name_surf.get_width() // 2, y + 3))
|
||||
|
||||
# Unit type icon
|
||||
icon_char = {"infantry": "步", "cavalry": "骑", "chariot": "车",
|
||||
"archer": "弓", "siege": "攻"}.get(unit.unit_type, "?")
|
||||
icon_char = {"infantry": "步", "cavalry": "骑",
|
||||
"archer": "弓"}.get(unit.unit_type, "?")
|
||||
self.screen.blit(self.font_sm.render(icon_char, True, TENG_HUANG), (x + 3, y + 3))
|
||||
|
||||
# Operation cost
|
||||
@@ -564,8 +564,8 @@ class UI:
|
||||
self.screen.blit(name_surf, (x + w // 2 - name_surf.get_width() // 2, y + 28))
|
||||
|
||||
if card.card_type == "unit":
|
||||
icon = {"infantry": "步", "cavalry": "骑", "chariot": "车",
|
||||
"archer": "弓", "siege": "攻"}.get(card.unit_type, "?")
|
||||
icon = {"infantry": "步", "cavalry": "骑",
|
||||
"archer": "弓"}.get(card.unit_type, "?")
|
||||
self.screen.blit(self.font_sm.render(icon, True, TENG_HUANG), (x + 3, y + h - 40))
|
||||
self.screen.blit(self.font_md.render(str(card.attack), True, (200, 80, 60)), (x + 5, y + h - 22))
|
||||
self.screen.blit(self.font_md.render(str(card.defense), True, (60, 80, 160)), (x + w - 15, y + h - 22))
|
||||
|
||||
Reference in New Issue
Block a user