#coding=utf-8 from map import Room #class ForestRoom(Room): forest_plane = Room("Forest Plane","""Behind the little heal, there is a broomy forest. There are lots of beautiful flowers and big trees. They wave there hands in the wind. In a hug tree, you find a tree room hiding in leaves. There is a ladder you can climbing to the tree room.""") forest_plane.actions=["climb on the ladder","leave away","fire the ladder"] squirrel_room = Room("Squirrel Room","""When you are climbing, a creaking voice goes to you ears. "Wow, it is amazing!" You find a squirrel living in the hole in the tree. You try your best to find the squirrel in the hole, but it is too dark in it. You have to find a way. That is great, you bring the pine nuts out of your bag which you peek on the way coming. And you sing a song to catch the attention of the squirrel. The squirrel comes out, take the pine nuts,and make frinds with you. He tells you there is a mysterious thing in the tree room. You continue to climb with the squirrel. """) squirrel_room.actions=["ignore the squirrel","give pine nuts to the squirrel","bite the squirrel"] tree_room=Room("Tree Room","""Open the door. A wondrous world comes in your eyes. You gradually walk into the room with a hot-bloooded heart. There is a little bed decorated with flowers and leaves, layed on the window. A desk and four bamboo stools stand in the middle of the room. Four little cups lay on the desk. You walk in the room around and around. Oh, you find a wood box on the desk behind the window. It needs a key to open it.""") tree_room.actions=["find the key","ignore the box","open the box with hammer"]
#class SurviveRoom(Room): # ========================================各房间详情================================================ central_corridor = Room( "Central Corridor", """ The Gothons of Planet Percal #25 have invaded your ship and destroyed your entire crew. You are the last surviving member and your last mission is to get the neutron destruct bomb from the Weapons Armory, put it in the bridge, and blow the ship up after getting into an escape pod. You're running down the central corridor to the Weapons Armory when a Gothon jumps out, red scaly skin, dark grimy teeth, and evil clown costume flowing around his hate filled body. He's blocking the door to the Armory and about to pull a weapon to blast you. """) central_corridor.actions = ["tell a joke", "bite him", "run away"] laser_weapon_armory = Room( "Laser Weapon Armory", """ Lucky for you they made you learn Gothon insults in the academy. You tell the one Gothon joke you know: Lbhe zbgure vf fb sng, jura fur fvgf nebhaq gur ubhfr, fur fvgf nebhaq gur ubhfr. The Gothon stops, tries not to laugh, then busts out laughing and can't move. While he's laughing you run up and shoot him square in the head putting him down, the jump through the Weapon Armory door. You do a dive roll into the Weapon Armory, crouch and scan the room for more Gothons that might be hiding. It's dead quiet, too quiet. You stand up and run to the far side of the room and find the neutron bomb in its container. There's a keypad lock on the box and you need the code to get the bomb out. If you get the code