game: add levelups

This commit is contained in:
2025-08-20 01:59:45 +02:00
parent eec0e6a50f
commit c3f49c885a
13 changed files with 265 additions and 3 deletions

View File

@@ -93,6 +93,7 @@ func _on_attack_area_body_entered(body: Node2D) -> void:
return
if body.is_in_group(GlobalConst.GROUP_ENEMY) and body.is_in_group(GlobalConst.GROUP_DAMAGEABLE):
var crit_chance = player.player_stats.get_final("crit_chance", player.modifiers)
print_debug("crit_chance: %s" % crit_chance)
var damage_dealt = base_damage
var is_crit = randf() >= 1 - crit_chance
if is_crit: