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:
+1
-1
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user