fix loss of precision warnings
This commit is contained in:
parent
a6f704039b
commit
3b408829d1
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user