Mercurial > rinkhals
comparison gamelib/gameboard.py @ 158:baf857805867
armour works now
author | Adrianna Pińska <adrianna.pinska@gmail.com> |
---|---|
date | Thu, 03 Sep 2009 21:50:49 +0000 |
parents | 3afdefacb07f |
children | fa57868123d7 |
comparison
equal
deleted
inserted
replaced
157:e3572b907028 | 158:baf857805867 |
---|---|
474 print "Building full." | 474 print "Building full." |
475 self.toolbar.update_egg_counter(self.eggs) | 475 self.toolbar.update_egg_counter(self.eggs) |
476 | 476 |
477 def kill_fox(self, fox): | 477 def kill_fox(self, fox): |
478 if fox in self.foxes: | 478 if fox in self.foxes: |
479 self.killed_foxes += 1 | 479 fox.lives -= 1 |
480 self.toolbar.update_fox_counter(self.killed_foxes) | 480 if not fox.lives > 0: |
481 self.add_cash(constants.SELL_PRICE_DEAD_FOX) | 481 self.killed_foxes += 1 |
482 self.remove_fox(fox) | 482 self.toolbar.update_fox_counter(self.killed_foxes) |
483 self.add_cash(constants.SELL_PRICE_DEAD_FOX) | |
484 self.remove_fox(fox) | |
483 | 485 |
484 def remove_fox(self, fox): | 486 def remove_fox(self, fox): |
485 self.foxes.discard(fox) | 487 self.foxes.discard(fox) |
486 if fox in self.tv.sprites: | 488 if fox in self.tv.sprites: |
487 self.tv.sprites.remove(fox) | 489 self.tv.sprites.remove(fox) |