Mercurial > skaapsteker
changeset 181:77228c101cfc
kumiko and kaneda
author | Adrianna Pińska <adrianna.pinska@gmail.com> |
---|---|
date | Wed, 06 Apr 2011 20:22:28 +0200 |
parents | 7ccf365e28ea |
children | c9a7ab87e0d4 |
files | data/npcs/kaneda.json data/npcs/kumiko.json skaapsteker/dialogue.py |
diffstat | 3 files changed, 132 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/npcs/kaneda.json Wed Apr 06 20:22:28 2011 +0200 @@ -0,0 +1,50 @@ +{ + "start" : { + "events" : [ + { "matches" : "world.npc_is('kumiko', 'torn')", "next": "state.kumiko" } + ] + }, + "kumiko" : { + "text" : "Ah, here is the fabled beauty, Kumiko.", + "auto_next": "state." + "events" : [ + { "matches" : "world.npc_is('kumiko', 'kaneda')", "next": "state.tear" } + ] + }, + "tear" : { + "text" : "When I heard of your legendary charm, I rushed to your home right away. It is true what they say about your radiant glow. Ah, but what’s this? A tear?", + "events" : [ + { "matches" : "world.npc_is('kumiko', 'jumped')", "next": "state.vase" } + ] + }, + "vase" : { + "text" : "Hmm, well, never mind that. Do show me around your charming home. Hmm? Is that a broken vase I see?", + "events" : [ + { "matches" : "world.npc_is('kumiko', 'fallen')", "next": "state.hmm" } + ] + }, + "hmm" : { + "text" : "Hmm.", + "events" : [ + { "matches" : "world.npc_is('kumiko', 'shallwe')", "next": "state.smell" } + ] + }, + "smell" : { + "text" : "Yes. But only if you explain that horrible smell!", + "events" : [ + { "matches" : "world.npc_is('kumiko', 'dropped')", "next": "state.wontstand" } + ] + }, + "wontstand" : { + "text" : "Kumiko-san, I won’t stand for this! A torn kimono, a house in disarray, dirt everywhere and that pungent stench. You are clearly no home maker! And to blame it all on a fox?", + "events" : [ + { "matches" : "world.npc_is('kumiko', 'but')", "next": "state.wonthear" } + ] + }, + "wonthear" : { + "text" : "I won’t hear any more from you.", + "auto_next": "state.gone" + }, + "gone" : { + }, +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/npcs/kumiko.json Wed Apr 06 20:22:28 2011 +0200 @@ -0,0 +1,69 @@ +{ + "start" : { + "text" : "I’m so pretty, oh so pretty! Who could ever resist my charms? My delicate grace! My sharp wit! And today, the richest businessman in Edo is coming to our town. If I can impress him – and I am so fabulous, I have no doubt I will – I will marry him and live in a giant palace and have hundreds of servants. Oh, nothing can go wrong today!", + "auto_next": "state.temptingfate" + }, + "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.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.fish_in_house()", "next": "state.badsmell" } + ] + }, + "badsmell" : { + "text" : "Oh my, what is that terrible smell? Rotten fish? Oh, this won’t do at all!", + "events" : [ + { "matches" : "world.torn_kimono()", "next": "state.torn" } + ] + }, + "torn" : { + "text" : "Shoo, dirty fox! Oh, look what you’ve done – you’ve made a great big tear in my finest silk kimono. What will the businessman think of a ragged dress like this?", + "events" : [ + { "matches" : "world.npc_is('kaneda','kumiko')", "next": "state.kaneda" } + ] + }, + "kaneda" : { + "text" : "Kaneda-san! I have been waiting for you.", + "events" : [ + { "matches" : "world.npc_is('kaneda','tear')", "next": "state.jumped" } + ] + }, + "jumped" : { + "text" : "Oh, Kaneda-san, a dirty little fox jumped on me just as you were approaching and ripped my kimono.", + "events" : [ + { "matches" : "world.npc_is('kaneda','vase')", "next": "state.fallen" } + ] + }, + "fallen" : { + "text" : "I am sorry, Kaneda-san, it must just have fallen over. It was probably pushed by that mean-spirited fox.", + "events" : [ + { "matches" : "world.npc_is('kaneda','hmm')", "next": "state.shallwe" } + ] + }, + "shallwe" : { + "text" : "Shall we- go on?", + "events" : [ + { "matches" : "world.npc_is('kaneda','smell')", "next": "state.dropped" } + ] + }, + "dropped" : { + "text" : "I- A fox came in and dropped an old fish?", + "events" : [ + { "matches" : "world.npc_is('kaneda','wontstand')", "next": "state.but" } + ] + }, + "but" : { + "text" : "But-", + "events" : [ + { "matches" : "world.npc_is('kaneda','wonthear')", "next": "state.curse" } + ] + }, + "curse" : { + "text" : "Curse you, fox! I’ll be doomed to a peasant life forever!" + } +}
--- a/skaapsteker/dialogue.py Wed Apr 06 19:52:50 2011 +0200 +++ b/skaapsteker/dialogue.py Wed Apr 06 20:22:28 2011 +0200 @@ -128,6 +128,10 @@ self._fire_started = False self._cannon_destroyed = False + self._vase_broken = False + self._fish_in_house = False + self._torn_kimono = False + self.npcs = {} def npc_is(self, npc_name, state): @@ -147,3 +151,12 @@ def cannon_destroyed(self): return self._cannon_destroyed + + def vase_broken(self): + return self._vase_broken + + def fish_in_house(self): + return self._fish_in_house + + def torn_kimono(self): + return self._torn_kimono