Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from room import Room
- from item import Item
- kitchen = Room("Kitchen")
- kitchen.set_description("a dark and dirty room buzzing with flies.")
- kitchen.get_description()
- # kitchen.describe(kitchen)
- dining_room = Room("Dinig room")
- dining_room.set_description("a well illuminated room with a long table and 12 chairs.")
- dining_room.get_description()
- # dining_room.describe(dining_room)
- ballroom = Room("Ball room")
- ballroom.set_description("a vast room with a shiny wooden floor. Huge candlesticks guard the entrance.")
- ballroom.get_description()
- # ballroom.describe(dining_room)
- kitchen.linked_room(dining_room, "south")
- dining_room.linked_room(kitchen, "north")
- dining_room.linked_room(ballroom, "west")
- ballroom.linked_room(dining_room, "east")
- dining_room.get_details()
- kitchen.get_details()
- ballroom.get_details()
- current_room = kitchen
- '''
- sword = Item("Sword")
- sword.set_description("a five inches long, razor sharp blade")
- sword.get_description()
- sword.set_item_action("stab")
- sword.set_item_action("hit")
- sword.set_item_action("block")
- sword.set_item_action("split")
- club = Item("Club")
- club.set_description("a 15 cm thick wooden stick with a nail through it")
- club.get_description()
- club.set_item_action("hit")
- club.set_item_action("block")
- club.set_item_action("push")
- shield = Item("Shield")
- shield.set_description("a disc of wooden boards surrounded by a steel girth")
- shield.get_description()
- shield.set_item_action("hit")
- shield.set_item_action("block")
- shield.set_item_action("push")
- sword.get_details_item()
- club.get_details_item()
- shield.get_details_item()
- '''
- from character import Enemy
- dave = Enemy("Dave", "A smelly zombie")
- dave.describe()
- dave.set_conversation("Brrlgrh... rgrhl... brains...!!!")
- dave.talk()
- dave.set_weakness("cheese")
- dining_room.set_character(dave)
- print("What will you fight with?")
- fight_with = input()
- dave.fight(fight_with)
- while True:
- print("\n")
- current_room.get_details()
- command = input("> ")
- current_room = current_room.move(command)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement