# HG changeset patch # User Simon Cross # Date 1302302333 -7200 # Node ID 5250c77b352aaf454444f21ce39f006ad376b89e # Parent 50b8c8372ff232726e9ea7a542f68c601208ed08 Hook up kaneda2 and tetsuo converstaion. diff -r 50b8c8372ff2 -r 5250c77b352a data/npcs/kaneda2.json --- a/data/npcs/kaneda2.json Sat Apr 09 00:26:24 2011 +0200 +++ b/data/npcs/kaneda2.json Sat Apr 09 00:38:53 2011 +0200 @@ -1,15 +1,13 @@ { "start" : { "text" : "Tetsuo-san, I would be delighted to conclude our business negotiation!", - "events" : [ - { "matches" : "npcs.tetsuo.state == 'joy'", "next": "state.signing" } - ] + "auto_next" : "state.signing", + "on_exit" : "switch_to('tetsuo')" }, "signing" : { "text" : "Of course, it’s just a matter of me signing the agreement.", - "events" : [ - { "matches" : "npcs.tetsuo.state == 'inspect'", "next": "state.ofcourse" } - ] + "auto_next": "state.ofcourse", + "on_exit" : "switch_to('tetsuo')" }, "ofcourse" : { "text" : "But of course!", @@ -22,21 +20,18 @@ }, "preposterous" : { "text" : "Preposterous terms! What do you take me for, a fool?", - "events" : [ - { "matches" : "npcs.tetsuo.state == 'shoddy'", "next": "state.pah" } - ] + "auto_next" : "state.pah", + "on_exit" : "switch_to('tetsuo')" }, "pah" : { "text" : "Pah, is this how you conduct business in the country?", - "events" : [ - { "matches" : "npcs.tetsuo.state == 'cheat'", "next": "state.insult" } - ] + "auto_next" : "state.insult", + "on_exit" : "switch_to('tetsuo')" }, "insult" : { "text" : "Such insult! The deal is off!", - "events" : [ - { "matches" : "npcs.tetsuo.state == 'riddance'", "next": "state.gone" } - ] + "auto_next": "state.gone", + "on_exit" : "switch_to('tetsuo')" }, "gone" : { } diff -r 50b8c8372ff2 -r 5250c77b352a data/npcs/tetsuo.json --- a/data/npcs/tetsuo.json Sat Apr 09 00:26:24 2011 +0200 +++ b/data/npcs/tetsuo.json Sat Apr 09 00:38:53 2011 +0200 @@ -1,20 +1,18 @@ { "start" : { "events" : [ - { "matches" : "npcs.kaneda2.state == 'start'", "next": "state.joy" } + { "matches" : "npcs.kaneda2.state != 'start'", "next": "state.joy" } ] }, "joy" : { "text" : "Kaneda-san, nothing would bring me more joy.", - "events" : [ - { "matches" : "npcs.kaneda2.state == 'signing'", "next": "state.inspect" } - ] + "auto_next" : "state.inspect", + "on_exit" : "switch_to('kaneda2')" }, "inspect" : { "text" : "Naturally, as soon as I inspect the goods.", - "events" : [ - { "matches" : "npcs.kaneda2.state == 'ofcourse'", "next": "state.inspecting" } - ] + "auto_next" : "state.inspecting", + "on_exit" : "switch_to('kaneda2')" }, "inspecting" : { "events" : [ @@ -23,21 +21,17 @@ }, "shoddy" : { "text" : "You should speak! The shoddy nature of your goods is simply unacceptable.", - "events" : [ - { "matches" : "npcs.kaneda2.state == 'pah'", "next": "state.cheat" } - ] + "auto_next" : "state.cheat", + "on_exit" : "switch_to('kaneda2')" }, "cheat" : { "text" : "At least we don’t cheat our buyers with damaged goods like you city folk!", - "events" : [ - { "matches" : "npcs.kaneda2.state == 'insult'", "next": "state.riddance" } - ] + "auto_next" : "state.riddance", + "on_exit" : "switch_to('kaneda2')" }, "riddance" : { "text" : "Good riddance.", - "events" : [ - { "matches" : "npcs.kaneda2.state == 'gone'", "next": "state.done" } - ] + "auto_next": "state.done" }, "done" : { }