summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulian Irwin <julian.irwin@gmail.com>2013-01-10 13:48:33 -0600
committerJulian Irwin <julian.irwin@gmail.com>2013-01-10 13:48:33 -0600
commit1bec3009e4d30e7e7c6854103d2688aa2059ebf5 (patch)
treeced8e2bab371fb4fa82a638bac05a5750327f6ba
parent31ee9408bd3f8510ded20755f5a56cd6404aea73 (diff)
Half way done with s3
-rw-r--r--weatbag/tiles/.s3.py.swpbin0 -> 12288 bytes
-rw-r--r--weatbag/tiles/s2.py23
-rw-r--r--weatbag/tiles/s3.py62
3 files changed, 59 insertions, 26 deletions
diff --git a/weatbag/tiles/.s3.py.swp b/weatbag/tiles/.s3.py.swp
new file mode 100644
index 0000000..8438c10
--- /dev/null
+++ b/weatbag/tiles/.s3.py.swp
Binary files differ
diff --git a/weatbag/tiles/s2.py b/weatbag/tiles/s2.py
index 85e94c6..a66aa98 100644
--- a/weatbag/tiles/s2.py
+++ b/weatbag/tiles/s2.py
@@ -4,30 +4,13 @@ from weatbag import words
class Tile:
def describe(self):
- print("The foliage begins to thin and the path winds forwards "
+ 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. Nondescript fields lie to the "
- "East and West.")
+ "to form a crude arch." )
def action(self, player, do):
# Nothing to do here yet.
print("Sorry, I don't understand")
- # Used for more colorfull invisible wall messages in leave.
- wrong_direction_counter = 0
-
- # Only allow movement to south, norht
- def leave(self, player, direction):
- if direction is 'e' or 'w':
- if self.wrong_direction_counter <=1 :
- print("There's nothing but non-descript fields over here. Better "
- "not leave the path.")
- else:
- print("You spend an hour wandering through the field and confirm that "
- "it is indeed nondescript. Upon returning to the path, the hilltop "
- "appears ever more alluring.")
- self.wrong_direction_counter += 1
- return False
- else:
- return True
+
diff --git a/weatbag/tiles/s3.py b/weatbag/tiles/s3.py
index 1f377f1..c44bfc6 100644
--- a/weatbag/tiles/s3.py
+++ b/weatbag/tiles/s3.py
@@ -1,10 +1,60 @@
from weatbag import words
class Tile:
- def describe(self):
- print( "The foliage along the path begins to thin and you "
- "notice that you are now climbing a gentle slope.")
+ def __init__(self):
+ self.short_man_gone = False
+ self.short_man_life = 2
+ self.pants_on_fire = False
- def action(self, player, do):
- # Nothing to do here yet.
- print("Sorry, I don't understand")
+ def describe(self):
+ print( "You reach the top of the hill and look around the rock "
+ "formations. You find nothing but dust, a mud puddle, and"
+ "withered shrubs.\n")
+ if not self.short_man_gone:
+ 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 "
+ "your pants on fire. You hear high pitched cackling and "
+ "snorting.\n")
+ 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.\n")
+
+
+ def action(self, player, do):
+ if self.pants_on_fire:
+ self.action_pants_on_fire(player, do)
+
+ elif not self.short_man_gone:
+ self.action_short_man(player, do)
+
+ elif self.short_man_gone:
+ print("I'm sorry, I don't understand.")
+
+
+
+ def action_pants_on_fire(self, player, do):
+ if do.count('roll') > 0:
+ 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 pants in tatters, you "
+ "stand up and face your assailant, a short man.")
+ elif do.count('puddle') > 0:
+ 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 pants "
+ "in taters, you stand up and face your assailant, a short man.")
+ 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):
+ print("Not done yet.")
+ return
+
+