fix loss of precision warnings
This commit is contained in:
parent
a6f704039b
commit
3b408829d1
@ -19,7 +19,7 @@ func _random_mod_health() -> void:
|
|||||||
randomize()
|
randomize()
|
||||||
# noise factor
|
# noise factor
|
||||||
var noise_factor = randf_range(7, 10)
|
var noise_factor = randf_range(7, 10)
|
||||||
self.maxHealth *= noise_factor
|
self.maxHealth = round(noise_factor * self.maxHealth)
|
||||||
# difficulty factor
|
# difficulty factor
|
||||||
match self.npcDifficulty:
|
match self.npcDifficulty:
|
||||||
NPCDifficulty.MINION:
|
NPCDifficulty.MINION:
|
||||||
@ -33,7 +33,7 @@ func _random_mod_health() -> void:
|
|||||||
NPCDifficulty.BBEG:
|
NPCDifficulty.BBEG:
|
||||||
self.maxHealth *= 16
|
self.maxHealth *= 16
|
||||||
# npcTier factor
|
# npcTier factor
|
||||||
self.maxHealth *= exp(self.npcTier)
|
self.maxHealth = round(exp(self.npcTier) * self.maxHealth)
|
||||||
# fun factor (just additional factor to tweak)
|
# fun factor (just additional factor to tweak)
|
||||||
self.maxHealth *= 10
|
self.maxHealth *= 10
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user