summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Kluyver <takowl@gmail.com>2013-01-28 05:20:22 -0800
committerThomas Kluyver <takowl@gmail.com>2013-01-28 05:20:22 -0800
commit26abad862afefb0e6c598719545572e187fa9033 (patch)
treeecb3abeb12e3f33e7b30d41a5b4d0cb64c86f7dc
parentf19f86792b33beaf2e1e12989a85557ae7fbc29c (diff)
parentfb2bfc0966aac9833a37e44564a35a3c7631dc6f (diff)
Merge pull request #10 from gradi3nt/southern-tiles-1
Southern tiles 1
-rw-r--r--.gitignore1
-rw-r--r--weatbag/tiles/s1.py2
-rw-r--r--weatbag/tiles/s2.py16
-rw-r--r--weatbag/tiles/s3.py93
-rw-r--r--weatbag/words.py1
5 files changed, 112 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 4a4b669..e40b52d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,3 +35,4 @@ nosetests.xml
.mr.developer.cfg
.project
.pydevproject
+
diff --git a/weatbag/tiles/s1.py b/weatbag/tiles/s1.py
index efdc041..4e50936 100644
--- a/weatbag/tiles/s1.py
+++ b/weatbag/tiles/s1.py
@@ -1,6 +1,6 @@
class Tile:
def describe(self):
- print("You push through the undergrowth - there's hardly a path here at all.")
+ print("You push through the undergrowth - the path is overgrown but continues on...")
def action(self, player, do):
# Nothing to do here yet.
diff --git a/weatbag/tiles/s2.py b/weatbag/tiles/s2.py
new file mode 100644
index 0000000..a66aa98
--- /dev/null
+++ b/weatbag/tiles/s2.py
@@ -0,0 +1,16 @@
+
+from weatbag import words
+
+class Tile:
+
+ def describe(self):
+ print("To the South, the foliage begins to thin and the path winds forwards "
+ "up a steep hillside. A rugged granite rockformation tops "
+ "the hill, its centerpiece two slabs of rock leaning together "
+ "to form a crude arch." )
+
+ def action(self, player, do):
+ # Nothing to do here yet.
+ print("Sorry, I don't understand")
+
+
diff --git a/weatbag/tiles/s3.py b/weatbag/tiles/s3.py
new file mode 100644
index 0000000..657f4a3
--- /dev/null
+++ b/weatbag/tiles/s3.py
@@ -0,0 +1,93 @@
+from weatbag import words
+
+class Tile:
+ def __init__(self):
+ self.short_man_here = True
+ self.pants_on_fire = False
+
+ def describe(self):
+ print( "You reach the top of the hill, pass through the arch "
+ "and look around the rock "
+ "formations. You find nothing but dust, a mud puddle, and "
+ "withered shrubs.")
+ if self.short_man_here:
+ self.pants_on_fire = True
+ print( "Just as you are returning to the path, a ball of fire "
+ "hurtles through the air and explodes at your feet, setting "
+ "one of your pant legs on fire. You hear high pitched cackling and "
+ "snorting.")
+ else:
+ print( "You see the charred ground, "
+ "reminding you of your encounter with the short man who set "
+ "your pants on fire. That was a close one. There is a steep "
+ "path leading down the hill to the North. To the south, the "
+ "hiltop path continues.")
+
+
+ def action(self, player, do):
+ if self.pants_on_fire:
+ self.action_pants_on_fire(player, do)
+
+ elif self.short_man_here:
+ self.action_short_man(player, do)
+
+ else:
+ print("I'm sorry, I don't understand.")
+
+ def leave(self, player, direction):
+ if self.pants_on_fire:
+ print("Running now will only feed the fire!")
+ return False
+ elif self.short_man_here:
+ print("This fellow is dangerous. I'd better not turn my back on him.")
+ return False
+ else:
+ return True
+
+
+ def action_pants_on_fire(self, player, do):
+ if 'roll' in do:
+ self.pants_on_fire = False
+ print("Wisely following the teachings of your elders, you freeze, "
+ "drop to the ground and roll around until the fire is "
+ "extinguished. Covered in dirt and pantleg in tatters, you "
+ "stand up and face your assailant, a rather short man "
+ "with pale skin and bushy orange hair."
+ "Do you talk to him or rush him?")
+
+ elif 'puddle' in do:
+ self.pants_on_fire = False
+ print("You dash over the the mud puddle and splash water on your "
+ "legs until the fire is quenched. Covered in mud and pantleg"
+ "in taters, you stand up and face your assailant, a rather short man "
+ "with pale skin and bushy orange hair."
+ "Do you talk to him or attack him?")
+ else:
+ print("You had better find a way to put out this fire. Your legs "
+ "are beginning to burn!")
+
+
+ def action_short_man(self, player, do):
+ if do[0] in words.attack:
+ self.short_man_here = False
+ print("Not one to be played around with, you charge the man. His amusement "
+ "quickly turns to surprise and then fear as your size and "
+ "determination become apparent. The man stumbles backwards and emits "
+ "a yelp. Just before he hits the groud there is a dry popping noise "
+ "a flash of light and the man is gone. ")
+ elif do[0] in words.talk:
+ self.short_man_here = False
+ print("\"What the hell was that?\" you growl.\n"
+ "The man jumps deftly onto a boulder, looks at you over his "
+ "shoulder for just a moment, and then jumps out of sight. "
+ "You quickly climb after him, but he has somehow disappeared.")
+ else:
+ print("I'm sorry, I don't understand.")
+
+
+
+
+
+
+
+
diff --git a/weatbag/words.py b/weatbag/words.py
index 94d2134..adaa012 100644
--- a/weatbag/words.py
+++ b/weatbag/words.py
@@ -16,6 +16,7 @@ take = {'pick', 'take', 'get', 'collect'}
look = {'look', 'inspect', 'examine'}
attack = {'attack', 'swing', 'hit', 'punch', 'fight'}
combine = {'combine', 'join', 'mix'}
+talk = {'talk', 'speak', 'converse'}
# Nouns
inventory = {'inventory', 'possessions', 'belongings', 'bag'}