making more sense now.

thx to eraosbeta for telling me the better way to it.
the previous way technically works, but I guess his way of doing makes more sense.
This commit is contained in:
rabbitboom 2024-04-10 16:27:42 +01:00 committed by GitHub
parent 903cbfd145
commit e0d918a2b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -68,8 +68,8 @@ class Spaz(bs.Actor):
default_bomb_type = 'normal'
default_boxing_gloves = False
default_shields = False
hitpoints = 1000
hitpoints_max = 1000
default_hitpoints = 1000
default_hitpoints_max = 1000
def __init__(
self,
@ -176,6 +176,8 @@ class Spaz(bs.Actor):
setattr(node, attr, val)
bs.timer(1.0, bs.Call(_safesetattr, self.node, 'invincible', False))
self.hitpoints = self.default_hitpoints
self.hitpoints_max = self.default_hitpoints_max
self.shield_hitpoints: int | None = None
self.shield_hitpoints_max = 650
self.shield_decay_rate = 0