def enter(exit, room, player): newRoom = None if exit > room.exits: print "That is not a valid door." elif player.roomCt + mechanics.roll20() > 75: newRoom = endRoom(player) elif exit == 1: newRoom = miscRoom(room.doorDiffs[0]) elif exit == 2: newRoom = miscRoom(room.doorDiffs[1]) elif exit == 3: newRoom = miscRoom(room.doorDiffs[2]) elif exit == 4: newRoom = miscRoom(room.doorDiffs[3]) return newRoom
def __init__(self, exit, room, player): super(enter, self).__init__( name = "enter", desc = "Enter the next room via the indicated door.", helpTxt = "[enter] <#>: enter the door associated with the number. The word enter is optional. ex: enter 1 OR 1." ) if exit > room.exits: print "That is not a valid door." elif player.roomCt + mechanics.roll20() > 40: self.newRoom = endRoom(player) elif exit == 1: self.newRoom = miscRoom(room.doorDiffs[0]) elif exit == 2: self.newRoom = miscRoom(room.doorDiffs[1]) elif exit == 3: self.newRoom = miscRoom(room.doorDiffs[2]) elif exit == 4: self.newRoom = miscRoom(room.doorDiffs[3])
def __init__(self, exit, room, player): super(enter, self).__init__( name="enter", desc="Enter the next room via the indicated door.", helpTxt= "[enter] <#>: enter the door associated with the number. The word enter is optional. ex: enter 1 OR 1." ) if exit > room.exits: print "That is not a valid door." elif player.roomCt + mechanics.roll20() > 40: self.newRoom = endRoom(player) elif exit == 1: self.newRoom = miscRoom(room.doorDiffs[0]) elif exit == 2: self.newRoom = miscRoom(room.doorDiffs[1]) elif exit == 3: self.newRoom = miscRoom(room.doorDiffs[2]) elif exit == 4: self.newRoom = miscRoom(room.doorDiffs[3])