fixed up some damage number bugs

This commit is contained in:
2025-06-25 22:07:48 +10:00
parent 2bfea6471c
commit 0cd8715468
47 changed files with 6017 additions and 161 deletions

View File

@@ -3,8 +3,13 @@ extends CollisionShape3D
@export var critical_zone: bool = false
signal took_damage(amount: int)
signal took_damage(amount: int, damage_type: Data.DamageIndicationType, pos: Vector3)
signal recieved_effect(effect: StatusEffect)
func damage(amount: int) -> void:
took_damage.emit(amount * 1.5 if critical_zone else amount)
func damage(amount: int, damage_type: Data.DamageIndicationType = Data.DamageIndicationType.PLAYER, pos: Vector3 = global_position) -> void:
took_damage.emit(roundi(amount * 1.5) if critical_zone else amount, damage_type, pos)
func apply_effect(effect: StatusEffect) -> void:
recieved_effect.emit(effect)