updated to 4.4, fixed levelup
This commit is contained in:
parent
ce5d12df95
commit
cd62e12389
64 changed files with 178 additions and 60 deletions
1
entities/healing_station/healing_station.gd.uid
Normal file
1
entities/healing_station/healing_station.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://clkrhqgx1qviq
|
||||
1
entities/monster/monster.gd.uid
Normal file
1
entities/monster/monster.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bx1hupx44tdsd
|
||||
1
entities/monster_spawnpoint/monster_spawnpoint.gd.uid
Normal file
1
entities/monster_spawnpoint/monster_spawnpoint.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://db7inrm6xdmc5
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://b44bktvws5v3s
|
||||
|
|
@ -153,17 +153,22 @@ func handle_battle() -> void:
|
|||
UI.battle_ui.set_message("You won!")
|
||||
await get_tree().create_timer(2.0).timeout
|
||||
|
||||
|
||||
var gained_xp: int = player_monster.data.calculate_gained_xp(enemy.data)
|
||||
player_monster.data.add_xp(gained_xp)
|
||||
UI.battle_ui.set_message("%s gained %s XP!" % [player_monster.data.name, str(gained_xp)])
|
||||
print("You gained %s xp!" % str(gained_xp))
|
||||
await get_tree().create_timer(2.0).timeout
|
||||
|
||||
# End the battle and reset some states
|
||||
# TODO: Maybe add a cooldown of 1.5s after the battle ended
|
||||
battle_state = Enums.BattleState.NOT_IN_BATTLE
|
||||
enemy.queue_free()
|
||||
player_monster.queue_free()
|
||||
enemy.queue_free()
|
||||
|
||||
UI.ingame_menu.update()
|
||||
UI.show_battle_ui(false)
|
||||
UI.show_ingame_controls(true)
|
||||
var gained_xp: int = player_monster.data.calculate_gained_xp(enemy.data)
|
||||
player_monster.data.add_xp(gained_xp)
|
||||
print("You gained %s xp!" % str(gained_xp))
|
||||
battle_state = Enums.BattleState.NOT_IN_BATTLE
|
||||
|
||||
Enums.BattleState.LOSE:
|
||||
SoundManager.play_sound_effect("Lost Battle")
|
||||
|
|
|
|||
1
entities/player/player.gd.uid
Normal file
1
entities/player/player.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://be00fdjdehq03
|
||||
Loading…
Add table
Add a link
Reference in a new issue