Mercurial > scrounge
changeset 28:0532cbb323bf
more monsters
| author | Radomir Dopieralski <sheep-devel@sheep.art.pl> |
|---|---|
| date | Mon, 22 Aug 2011 23:44:48 +0200 |
| parents | 69254db89020 |
| children | 6563878f6ed1 |
| files | generator.py monster.py monsters.png |
| diffstat | 3 files changed, 19 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/generator.py Mon Aug 22 22:00:09 2011 +0200 +++ b/generator.py Mon Aug 22 23:44:48 2011 +0200 @@ -44,7 +44,8 @@ if (p not in self.monsters and not isinstance(self.things.get(p), thing.Entrance)): monsters = [monster.Skeleton, monster.Zombie, monster.Jack, - monster.Bat] + monster.Bat, monster.Ghost, monster.Eye, + monster.Jelly] self.monsters[p] = random.choice(monsters)(*p) def make_stairs(self):
--- a/monster.py Mon Aug 22 22:00:09 2011 +0200 +++ b/monster.py Mon Aug 22 23:44:48 2011 +0200 @@ -141,3 +141,20 @@ class Bat(Monster): tx = 3 + + +class Ghost(Monster): + tx = 4 + + def render(self, *args, **kwargs): + super(Ghost, self).render(*args, **kwargs) + for frame in self.sprite.frames[self.tx]: + frame.set_alpha(192) + + +class Eye(Monster): + tx = 5 + + +class Jelly(Ghost): + tx = 6
