Update asset loading to include transparent color and adjust white flash timing; enhance nuclear bomb scoring and gas unit die method

This commit is contained in:
2025-08-21 19:00:32 +02:00
parent 59258258c4
commit c004edef8f
7 changed files with 12 additions and 11 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ class NuclearBomb(Unit):
if random.random() < 0.7: # 70% chance to kill each rat
rats_to_kill.append(unit)
for unit in rats_to_kill:
unit.die(score=None)
unit.die(score=5)
print(f"Nuclear explosion killed {len(rats_to_kill)} rats!")
+2 -2
View File
@@ -47,8 +47,8 @@ class Gas(Unit):
self.game.spawn_unit(Gas, (new_x, new_y), parent_id=self.parent_id if self.parent_id else self.id)
def collisions(self):
pass
def die(self, unit=None):
def die(self, unit=None, score=None):
if not unit:
unit = self
self.game.units.pop(unit.id)