# HG changeset patch # User Neil Muller # Date 1302393580 -7200 # Node ID c4b14a517500ba58a5b118421d7e541edfa3300b # Parent aa01ca54dce2a647ffa6cda141642e5198a63688 Parital geisha mission diff -r aa01ca54dce2 -r c4b14a517500 data/npcs/kaneda.json --- 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" : { diff -r aa01ca54dce2 -r c4b14a517500 data/npcs/kumiko.json --- 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" : { diff -r aa01ca54dce2 -r c4b14a517500 skaapsteker/sprites/items.py --- 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' diff -r aa01ca54dce2 -r c4b14a517500 skaapsteker/sprites/npcs.py --- 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):