Mercurial > skaapsteker
changeset 559:c4b14a517500
Parital geisha mission
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sun, 10 Apr 2011 01:59:40 +0200 |
parents | aa01ca54dce2 |
children | bad2b38accec |
files | data/npcs/kaneda.json data/npcs/kumiko.json skaapsteker/sprites/items.py skaapsteker/sprites/npcs.py |
diffstat | 4 files changed, 15 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/data/npcs/kaneda.json Sun Apr 10 01:59:29 2011 +0200 +++ b/data/npcs/kaneda.json Sun Apr 10 01:59:40 2011 +0200 @@ -2,7 +2,7 @@ { "start" : { "events" : [ - { "matches" : "npcs.kumiko.state == 'torn'", "next": "state.kumiko" } + { "matches" : "npcs.kumiko.state == 'kaneda'", "next": "state.kumiko" } ] }, "kumiko" : {
--- a/data/npcs/kumiko.json Sun Apr 10 01:59:29 2011 +0200 +++ b/data/npcs/kumiko.json Sun Apr 10 01:59:40 2011 +0200 @@ -6,25 +6,12 @@ "temptingfate" : { "text" : "The room smells fresh, I have my best kimono on and I’ve set out my most magnificent vase. Everything is perfect (just like me)!", "events" : [ - { "matches" : "world.items.vase.broken", "next": "state.broken" } - ] - }, - "broken" : { - "text" : "Oh no, my beautiful vase! What will the businessman think to see it broken on the floor?", - "events" : [ - { "matches" : "world.missions.fish_in_room", "next": "state.badsmell" } + { "matches" : "world.items.vase.broken", "next": "state.complaining" } ] }, - "badsmell" : { - "text" : "Oh my, what is that terrible smell? Rotten fish? Oh, this won’t do at all!", + "complaining" : { "events" : [ - { "matches" : "world.missions.kumikos_kimono_torn", "next": "state.torn" } - ] - }, - "torn" : { - "text" : "What will the businessman think of a ragged dress like this?", - "events" : [ - { "matches" : "npcs.kaneda.state == 'kumiko'", "next": "state.kaneda" } + { "matches" : "world.missions.kumikos_kimono_torn and world.missions.kumikos_kimono_torn and world.missions.fish_in_room", "next": "state.kaneda" } ] }, "kaneda" : {
--- a/skaapsteker/sprites/items.py Sun Apr 10 01:59:29 2011 +0200 +++ b/skaapsteker/sprites/items.py Sun Apr 10 01:59:40 2011 +0200 @@ -222,6 +222,12 @@ liftable = False + def smash(self): + if not self._me.broken: + notify('Oh no, my beautiful vase! What will the businessman think ' + 'to see it broken on the floor?') + super(Vase, self).smash() + class Salmon(Item): image_file = 'props/fish.png'
--- a/skaapsteker/sprites/npcs.py Sun Apr 10 01:59:29 2011 +0200 +++ b/skaapsteker/sprites/npcs.py Sun Apr 10 01:59:40 2011 +0200 @@ -53,6 +53,8 @@ class Kaneda(NPC): image_dir = 'sprites/kaneda' + wants_updates = True + animation_regexes = [ ("standing", r"^.*_standing.png$"), ] @@ -71,11 +73,8 @@ super(Kaneda, self).player_action(player) def update(self): - if not self._me.present and self.alive: - self._all_groups = self.groups() + if self.world.missions.kumiko_disgraced and self.alive: self.remove() - if self._me.present and not self.alive: - self.add(*self._all_groups) super(Kaneda, self).update() @@ -108,7 +107,8 @@ if not self.world.missions.kumikos_kimono_torn: self.world.missions.kumikos_kimono_torn = True notify("Shoo, dirty fox! Oh, look what you've done" - "- you've made a great big tear in my finest silk kimono") + "- you've made a great big tear in my finest silk kimono." + "What will the businessman think of a ragged dress like this?") class FishMonger(NPC):