feat: win-lose-tie at game end #4

Merged
ahsan.istamar merged 3 commits from win-lose-tie into main 2025-01-26 11:33:26 +07:00
2 changed files with 11 additions and 13 deletions
Showing only changes of commit 728d848e5b - Show all commits

View file

@ -146,13 +146,12 @@ layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -83.5
offset_top = 300.0
offset_right = 83.5
offset_bottom = 323.0
offset_left = 84.0
offset_top = 24.0
offset_right = 251.0
offset_bottom = 47.0
grow_horizontal = 2
text = "Incoming Damage: 0"
horizontal_alignment = 1
text = "HP: +0"
[node name="HBoxContainer" type="HBoxContainer" parent="Own"]
visible = false
@ -268,14 +267,13 @@ anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -83.5
offset_top = -325.0
offset_right = 83.5
offset_bottom = -302.0
offset_left = 84.0
offset_top = -52.0
offset_right = 251.0
offset_bottom = -29.0
grow_horizontal = 2
grow_vertical = 0
text = "Incoming Damage: 0"
horizontal_alignment = 1
text = "HP: +0"
[node name="StartGameButton" type="Button" parent="."]
layout_mode = 1

View file

@ -80,7 +80,7 @@ func _on_update(transition):
if monster:
monster_card_ui.visible = true
monster_card_ui.show_monster(monster)
incoming_damage_label.text = "Incoming Damage: " + str(monster.health_delta)
incoming_damage_label.text = "HP " + ("+0" if monster.health_delta == 0 else str(monster.health_delta))
else:
monster_card_ui.visible = false