fix loss of precision warnings

This commit is contained in:
tonydero 2024-10-21 16:57:48 -06:00
parent a6f704039b
commit 3b408829d1

View File

@ -19,7 +19,7 @@ func _random_mod_health() -> void:
randomize()
# noise factor
var noise_factor = randf_range(7, 10)
self.maxHealth *= noise_factor
self.maxHealth = round(noise_factor * self.maxHealth)
# difficulty factor
match self.npcDifficulty:
NPCDifficulty.MINION:
@ -33,7 +33,7 @@ func _random_mod_health() -> void:
NPCDifficulty.BBEG:
self.maxHealth *= 16
# npcTier factor
self.maxHealth *= exp(self.npcTier)
self.maxHealth = round(exp(self.npcTier) * self.maxHealth)
# fun factor (just additional factor to tweak)
self.maxHealth *= 10