Mercurial > skaapsteker
changeset 501:9a16483e49cb
Remove 1st set of blocking samuri
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sat, 09 Apr 2011 22:40:25 +0200 |
parents | 906fae3d3688 |
children | e1436dacca69 |
files | data/npcs/hattori.json data/npcs/ichiro.json skaapsteker/sprites/base.py skaapsteker/sprites/npcs.py |
diffstat | 4 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/data/npcs/hattori.json Sat Apr 09 22:58:32 2011 +0200 +++ b/data/npcs/hattori.json Sat Apr 09 22:40:25 2011 +0200 @@ -40,6 +40,6 @@ "auto_next": "state.gone" }, "gone" : { - "on_entry" : "drop_item('tail_sprint')" + "on_entry" : "drop_item('tail_sprint'); npcs.hattori.block = False" } }
--- a/data/npcs/ichiro.json Sat Apr 09 22:58:32 2011 +0200 +++ b/data/npcs/ichiro.json Sat Apr 09 22:40:25 2011 +0200 @@ -35,6 +35,6 @@ "auto_next" : "state.gone", "on_exit" : "switch_to('hattori')" }, - "gone" : { + "gone" : { "on_entry": "npcs.ichiro.block = False" } }
--- a/skaapsteker/sprites/base.py Sat Apr 09 22:58:32 2011 +0200 +++ b/skaapsteker/sprites/base.py Sat Apr 09 22:40:25 2011 +0200 @@ -279,6 +279,10 @@ def player_action(self, player): OpenDialog.post(self) + def remove(self): + self._me.level = '_limbo' + self.kill() + class BlockingNPC(NPC):
--- a/skaapsteker/sprites/npcs.py Sat Apr 09 22:58:32 2011 +0200 +++ b/skaapsteker/sprites/npcs.py Sat Apr 09 22:40:25 2011 +0200 @@ -28,6 +28,11 @@ ('right', lambda x: transform.flip(x, True, False))), } + def update(self): + if not self._me.block: + self.remove() + + class Ichiro(BlockingNPC): @@ -39,6 +44,10 @@ ('right', lambda x: transform.flip(x, True, False))), } + def update(self): + if not self._me.block: + self.remove() + class Kaneda(NPC):