Mercurial > mamba
diff mamba/sprites.py @ 255:59166ae6e864
fire works
author | Adrianna Pińska <adrianna.pinska@gmail.com> |
---|---|
date | Thu, 15 Sep 2011 01:32:50 +0200 |
parents | 2a969e3445ae |
children | c7c9d71ac6ea |
line wrap: on
line diff
--- a/mamba/sprites.py Thu Sep 15 01:28:45 2011 +0200 +++ b/mamba/sprites.py Thu Sep 15 01:32:50 2011 +0200 @@ -268,6 +268,16 @@ super(FireSprite, self).__init__(**kw) self.image = self.load_image(*self.get_variant(*variant)) + def get_solid(self, snake, segment): + if snake.flame_retardant(): + return False + print "Burninated. :-(" + return True + + def interact(self, world, segment): + segment.set_colour(segment.GREEN) + super(FireSprite, self).interact(world, segment) + class EdibleTile(SingleImageTileSprite): def interact(self, world, segment): @@ -322,7 +332,8 @@ image_name = "salamander" def eat(self, snake): - print "Burninate!" + print "Fireproofed!" + snake.mutate('flame-retardant') class Painter(TileSprite):