# HG changeset patch # User Adrianna Pińska # Date 1302044683 -7200 # Node ID 13e10b877f6cfa14b9c510d7200f800215f45bc9 # Parent aa154c4086cbfffffed79135585ef059d48ece8f dialogue tree for temple guard diff -r aa154c4086cb -r 13e10b877f6c data/npcs/guard.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/npcs/guard.json Wed Apr 06 01:04:43 2011 +0200 @@ -0,0 +1,65 @@ +{ + "start" : { + "text" : "Shoo, filthy fox! How did you get in here?", + "events" : [ + { "matches" : "world.fox_is_shapeshifted()", "next": "state.shapeshifted" }, + { "matches" : "world.fox_is_disguised()", "next": "state.disguised" } + ] + }, + "shapeshifted" : { + "text" : "Excuse me, ma’am. The gate is closed.", + "choices" : [ + { "text": "Why is that?", "next": "state.monks" }, + { "text": "Let me out now!", "next": "state.staycalm" }, + { "text": "Sayonara.", "next": "state.secondtry" } + ], + "events" : [ + { "matches" : "world.fox_is_disguised()", "next": "state.disguised" } + ] + }, + "monks" : { + "text" : "The monks have asked us not to let anybody out.", + "choices" : [ + { "text": "Pretty please?", "next": "state.noexceptions" } + ] + }, + "noexceptions" : { + "text" : "Sorry, no exceptions.", + "auto_next": "state.secondtry" + }, + "staycalm" : { + "text" : "Please stay calm. Perhaps you should go meditate?", + "auto_next": "state.secondtry" + }, + "secondtry" : { + "text" : "The gate is locked, and it’s staying locked.", + "events" : [ + { "matches" : "world.fox_is_disguised()", "next": "state.disguised" } + ] + }, + "disguised" : { + "text" : "Ah, good evening, young lady! I’m afraid the gate is still closed for the night...", + "choices" : [ + { "text": "Even for me?", "next": "state.notsafe" }, + { "text": "Sayonara." } + ] + }, + "notsafe" : { + "text" : "Ah, well, it isn’t safe for pretty young women to be wandering around alone.", + "choices" : [ + { "text": "It’s only for a moment. My house is just across the road.", "next": "state.hmm" } + ] + }, + "hmm" : { + "text" : "Hmm...", + "choices" : [ + { "text": "You could come join me for some sake later.", "next": "state.okay" } + ] + }, + "okay" : { + "text" : "Ah, well, okay! I guess I could make an exception, just this once... Just across the road, you say...", + "auto_next": "state.agreed" + }, + "agreed" : { + } +} \ No newline at end of file diff -r aa154c4086cb -r 13e10b877f6c skaapsteker/dialogue.py --- a/skaapsteker/dialogue.py Wed Apr 06 00:49:16 2011 +0200 +++ b/skaapsteker/dialogue.py Wed Apr 06 01:04:43 2011 +0200 @@ -121,6 +121,15 @@ def __init__(self): self._fox_has_tea = False + self._fox_is_shapeshifted = False + self._fox_is_disguised = False def fox_has_tea(self): return self._fox_has_tea + + def fox_is_shapeshifted(self): + return self._fox_is_shapeshifted + + def fox_is_disguised(self): + return self._fox_is_disguised +