Mercurial > skaapsteker
changeset 180:7ccf365e28ea
Sasuke
author | Adrianna Pińska <adrianna.pinska@gmail.com> |
---|---|
date | Wed, 06 Apr 2011 19:52:50 +0200 |
parents | a7cdf8458edd |
children | 77228c101cfc |
files | data/npcs/sasuke.json skaapsteker/dialogue.py |
diffstat | 2 files changed, 23 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/npcs/sasuke.json Wed Apr 06 19:52:50 2011 +0200 @@ -0,0 +1,17 @@ +{ + "start" : { + "text" : "Grumble... “Sasuke, fetch this! Sasuke, get that!” What do they think I am, some sort of servant? I’m a samurai in my own right! And this cannon is so heavy! Not like those two would lend a hand – they’re probably taking a nap. Speaking of which... yaaawn... maybe forty winks wouldn’t be a bad idea. If I’m lucky, this cannon will just roll down the path and off the cliff. Good riddance...", + "auto_next": "state.napping" + }, + "napping" : { + "events" : [ + { "matches" : "world.cannon_destroyed()", "next": "state.huh" } + ] + }, + "huh" : { + "text" : "Huh? What was that noise? Did I hear a- AI! What’s this? My cannon – destroyed! When Hattori hears about this, he’s going to be livid. Erm, it might be best if I, uh, hide out for a bit...", + "auto_next": "state.gone", + }, + "gone" : { + } +}
--- a/skaapsteker/dialogue.py Wed Apr 06 19:39:46 2011 +0200 +++ b/skaapsteker/dialogue.py Wed Apr 06 19:52:50 2011 +0200 @@ -126,9 +126,13 @@ self._fox_is_disguised = False self._fire_started = False + self._cannon_destroyed = False self.npcs = {} + def npc_is(self, npc_name, state): + return self.npcs[npc_name].state == state + def fox_has_tea(self): return self._fox_has_tea @@ -141,5 +145,5 @@ def fire_started(self): return self._fire_started - def npc_is(self, npc_name, state): - return self.npcs[npc_name].state == state + def cannon_destroyed(self): + return self._cannon_destroyed