int SpellCombat(object ob){

    object env = environment(ob);
    object array *targets;
    
    int chance1, chance2, level;

    chance1 = random(2);
    level = ob->GetLevel();

    
    if(ob && (!ob->GetInCombat() || !ob->GetCurrentEnemy())) return 0;

    targets = filter(get_livings(env), (: !$1->GetInCombat() && !$1->GetSleeping() :));
    tell_room(env, "\nsizeof(targets) is "+sizeof(targets)+"\n", ({ ob }));
Esempio n. 2
0
int CanReceive(object ob){
    int ret, level;
    level = ob->GetLevel();
    if((creatorp(ob) && !archp(ob)) || (userp(ob) && level > 20)){
        write("Sorry. This area is for normal players.");
        return 0;
    }
    ret = room::CanReceive(ob);
    if(ret){
        object *inv = deep_inventory(ob);
        foreach(object element in inv){
            string name = base_name(element);
            level = element->GetLevel();
            if(creatorp(element) && !archp(element)
              || (userp(element) && level > 20)){
                write("Sorry. This is a player-only area.");
                return 0;
            }
            if(!strsrch(name,"/realms/") || !strsrch(name,"/open/")){
                element->eventMove(ROOM_FURNACE);
            }
        }
    }
Esempio n. 3
0
        if(!(i  % mod)) ret++;
    }

    if(neg){
        ret = ret - (ret*2);
    }
    return ret;
}


varargs int ChangeLevel(int i){
    mapping skills, stats, moduli = ([]);
    int current_level, desired_level;
    object subject = this_object();

    current_level = subject->GetLevel();

    if(!i || i < 1) 
        desired_level = current_level + 1;
    else desired_level = i;

    for(i = 1; i < 5; i++){
        moduli[i] = collect_moduli(i, ({ current_level, desired_level }) );
    }

    skills = subject->GetSkillsMap();
    stats = subject->GetStatsMap();

    foreach(mixed key, mixed val in skills){
        if(skills[key]["class"] > 3) skills[key]["class"] = 4;
        subject->SetSkill(key,