Esempio n. 1
0
File: tavern.py Progetto: btdevel/bt
    pass

tavern = TavernHandler("inside/pub.png", location="Tavern")
pub = tavern

tavern_greeting_screen = Screen()
tavern_greeting_screen.add_message("Hail, travelers! Step to the bar and I'll draw you a tankard.")
tavern_greeting_screen.add_message("\nYou can:\n")
tavern_greeting_screen.add_option('Order a drink', 'oO', action.change_screen("order"))
tavern_greeting_screen.add_option('Talk to barkeep', 'tT', action.change_screen("talk"))
tavern_greeting_screen.add_message("\n\n\n")
tavern_greeting_screen.add_option('(EXIT)', 'eE', action.exit_building(), pos= -1, center=True)

tavern_order_screen = Screen()
tavern_order_screen.add_message("Seat thyself, %(charname)s. We've got...\n")
tavern_order_screen.add_option("Ale", "aA", action.message("Not bad!!"))
tavern_order_screen.add_option("Beer", "bB", action.message("Not bad!!"))
tavern_order_screen.add_option("Mead", "mM", action.message("Not bad!!"))
tavern_order_screen.add_option("Foul spirits", "fF", action.message("You don't feel too well."))
tavern_order_screen.add_option("Ginger Ale", "gG", action.message("The girls in the tavern are not impressed."))
tavern_order_screen.add_option("Wine", "wW", action.message("The barkeep says, \"Go down to the cellar and pick out a bottle.\""))
tavern_order_screen.add_message("\n\nWhat'll it be?")
tavern_order_screen.add_option('(CANCEL)', 'cC', action.change_screen("greeting"), pos= -1, center=True)

tavern_talk_screen = Screen()
tavern_talk_screen.add_message("\"Talk ain't cheap,\" the barkeep says.")
tavern_talk_screen.add_message("\nHow much will you tip him?\n\n\n")
tavern_talk_screen.add_option('(CANCEL)', 'cC', action.change_screen("greeting"), pos= -1, center=True)


Esempio n. 2
0
 def __init__(self, filename, message, location=""):
     EventHandler.__init__(self, location=location)
     self.add_key_event("lL", action.turn_back())
     self.add_key_event("aA", action.compose(action.enter_city(), action.message("The statue gives up...")))
     self.filename = filename
     self.message = message