コード例 #1
0
ファイル: drive.c プロジェクト: arylwen/terebi
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);
}
コード例 #2
0
ファイル: go.c プロジェクト: Elohim/FGmud
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);
}
コード例 #3
0
ファイル: climb.c プロジェクト: arylwen/terebi
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();
}
コード例 #4
0
ファイル: drive.c プロジェクト: arylwen/terebi
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);
}
コード例 #5
0
ファイル: jump.c プロジェクト: RandolfShanksCarter/DeadStars
mixed can_jump_word_word_obj() {
    if(!stringp(hobbled(this_player()))) {
        return "Your injuries prevent that movement.";
    }
    return 1;
}