mixed can_drive_str(string str) { object vehicle = environment(this_player()); object where; if(vehicle) where = environment(vehicle); if(vehicle && !vehicle->GetMount()) return "You are not mounted."; if( !vehicle ) return "You are nowhere."; if( !where ) return "Your mount is nowhere."; if( vehicle->GetStaminaPoints() <3 ) return "Your vehicle lacks fuel."; if(!stringp(hobbled(vehicle))) return "Your vehicle is incapacitated."; if(str) switch(str){ case "n" : str = "north"; break; case "s" : str = "south"; break; case "e" : str = "east"; break; case "w" : str = "west"; break; case "u" : str = "up"; break; case "d" : str = "down"; break; case "ne" : str = "northeast"; break; case "nw" : str = "northwest"; break; case "se" : str = "southeast"; break; case "sw" : str = "southwest"; break; } return where->CanGo(vehicle, str); }
mixed can_go_into_str(string str){ if( !environment(this_player()) ) return "You are nowhere."; if( this_player()->GetStaminaPoints() <3 ) return "You are too tired right now."; if(!stringp(hobbled(this_player()))) return "Your injuries prevent easy movement. Perhaps you should try crawling."; return environment(this_player())->CanEnter(this_player(), str); }
mixed can_climb_obj() { if( this_player()->GetParalyzed() ) { return "You cannot do anything!"; } if(this_player()->GetPosition() != POSITION_STANDING ) { return "You must be standing in order to climb."; } if(!stringp(hobbled(this_player()))) return "Your injuries prevent that movement."; return this_player()->CanManipulate(); }
mixed can_drive_into_str(string str) { object vehicle = environment(this_player()); object where; if(vehicle) where = environment(vehicle); if(vehicle && !vehicle->GetMount()) return "You are not mounted."; if( !vehicle ) return "You are nowhere."; if( !where ) return "Your mount is nowhere."; if( vehicle->GetStaminaPoints() <3 ) return "Your vehicle has insufficient fuel."; if(!stringp(hobbled(vehicle))) return "Your vehicle is incapacitated."; return where->CanEnter(vehicle, str); }
mixed can_jump_word_word_obj() { if(!stringp(hobbled(this_player()))) { return "Your injuries prevent that movement."; } return 1; }