Fixed a bug with the timer initialization of the invulnerable code. Being lazy and setting it to 0 as a place holder came back to bite me lol.

This commit is contained in:
Storm Dragon
2025-02-17 13:16:33 -05:00
parent bd2e8d3fec
commit 4de969496d

View File

@@ -50,7 +50,7 @@ class Enemy(Object):
self.hasVulnerabilitySystem = kwargs.get('has_vulnerability', False)
if self.hasVulnerabilitySystem:
self.isVulnerable = kwargs.get('is_vulnerable', False) # For enemies with vulnerability, default to invulnerable
self.vulnerabilityTimer = 0
self.vulnerabilityTimer = pygame.time.get_ticks()
self.vulnerabilityDuration = kwargs.get('vulnerability_duration', 1000)
self.invulnerabilityDuration = kwargs.get('invulnerability_duration', 5000)
else: