Ejemplo n.º 1
0
static void _calc_bonuses(void) 
{
    int ac = MIN(p_ptr->au / 250000, 25);

    p_ptr->to_a += ac;
    p_ptr->dis_to_a += ac;

    if (p_ptr->au >= 10 * 1000 * 1000)
    {
        p_ptr->device_power++;
    }
    if (p_ptr->au >= 5 * 1000 * 1000)
    {
        p_ptr->spell_power++;
        p_ptr->spell_cap++;
        p_ptr->device_power++;
    }
    if (p_ptr->au >= 1000 * 1000)
    {
        p_ptr->spell_power++;
        p_ptr->spell_cap++;
    }
    if (p_ptr->au >= 500 * 1000)
        p_ptr->spell_cap++;
    if (p_ptr->au >= 100 * 1000)
        p_ptr->spell_cap++;

    switch (p_ptr->current_r_idx)
    {
    case MON_CHEERFUL_LEPRECHAUN:
        p_ptr->align += 200;
        p_ptr->pspeed += 5;
        break;
    case MON_MALICIOUS_LEPRECHAUN:
        p_ptr->align -= 200;
        p_ptr->pspeed += 7;
        p_ptr->levitation = TRUE;
        res_add_vuln(RES_LITE);
        break;
    case MON_DEATH_LEPRECHAUN:
        p_ptr->align -= 200;
        p_ptr->pspeed += 10;
        p_ptr->levitation = TRUE;
        res_add_vuln(RES_LITE);
        res_add(RES_NETHER);
        break;
    }
}
static void _fire_calc_bonuses(void) 
{
    res_add(RES_FIRE);
    res_add_vuln(RES_COLD);
    p_ptr->sh_fire = TRUE;

    if (p_ptr->lev >= 25)
    {
        p_ptr->pspeed += 2;
        res_add(RES_FIRE);
    }

    if (p_ptr->lev >= 40)
    {
        p_ptr->pspeed += 3;
        p_ptr->pass_wall = TRUE;
        p_ptr->no_passwall_dam = TRUE;
        res_add(RES_FIRE);
        res_add(RES_ELEC);
    }

    if (p_ptr->lev >= 50)
        res_add_immune(RES_FIRE);

    _calc_bonuses();
}
Ejemplo n.º 3
0
static void _cave_spider_calc_bonuses(void)
{
    p_ptr->pspeed += 3;
    res_add(RES_POIS);
    res_add(RES_DARK);
    res_add_vuln(RES_LITE);
    p_ptr->see_nocto = TRUE;
}
Ejemplo n.º 4
0
static void _android_calc_bonuses(void)
{
    int ac = 10 + (p_ptr->lev * 2 / 5);

    p_ptr->to_a += ac;
    p_ptr->dis_to_a += ac;

    p_ptr->slow_digest = TRUE;
    p_ptr->free_act = TRUE;
    res_add(RES_POIS);
    res_add_vuln(RES_ELEC);
    p_ptr->hold_life = TRUE;
}
Ejemplo n.º 5
0
void res_calc_bonuses(u32b flgs[TR_FLAG_SIZE])
{
    int i;
    for (i = RES_BEGIN; i < RES_END; i++)
    {
        _res_info_t m = _resist_map[i];
        if (m.flg != TR_INVALID && have_flag(flgs, m.flg))
            res_add(i);
        if (m.vuln_flg != TR_INVALID && have_flag(flgs, m.vuln_flg))
            res_add_vuln(i);
        if (m.im_flg != TR_INVALID && have_flag(flgs, m.im_flg))
            res_add_immune(i);
    }
}
Ejemplo n.º 6
0
static void _elder_aranea_calc_bonuses(void)
{
    p_ptr->pspeed += 10;

    res_add_immune(RES_POIS);

    res_add(RES_FIRE);
    res_add(RES_NETHER);
    res_add(RES_DISEN);
    res_add(RES_DARK);
    res_add(RES_CONF);
    res_add(RES_FEAR);

    res_add_vuln(RES_LITE);

    p_ptr->free_act = TRUE;
    p_ptr->see_inv = TRUE;
    p_ptr->regen += 100;
    p_ptr->see_nocto = TRUE;
}
Ejemplo n.º 7
0
static void _calc_bonuses(void) 
{
    p_ptr->align -= 200;

    res_add(RES_DARK);
    res_add(RES_NETHER);
    res_add(RES_COLD);
    res_add(RES_POIS);
    res_add_vuln(RES_LITE);
    p_ptr->hold_life = TRUE;
    p_ptr->see_nocto = TRUE;

    if (equip_find_artifact(ART_NIGHT))
    {
        p_ptr->dec_mana = TRUE;
        p_ptr->easy_spell = TRUE;
    }

    if (p_ptr->lev >= 35)
    {
        res_add(RES_DARK);
        p_ptr->levitation = TRUE;
        p_ptr->pspeed += 1;
        p_ptr->regenerate = TRUE;
    }

    if (p_ptr->lev >= 45)
    {
        res_add_immune(RES_DARK);
        p_ptr->pspeed += 2;
    }

    if (_light_penalty)
    {
        p_ptr->to_a -= 5*_light_penalty;
        p_ptr->dis_to_a -= 5*_light_penalty;

        p_ptr->life -= 3*_light_penalty;
    }
}
Ejemplo n.º 8
0
void monk_posture_calc_bonuses(void)
{
    int i;
    if (!heavy_armor() || p_ptr->pclass == CLASS_WILD_TALENT)
    {
        if (p_ptr->special_defense & KAMAE_BYAKKO)
        {
            p_ptr->to_a -= 40;
            p_ptr->dis_to_a -= 40;
            if (p_ptr->pclass == CLASS_WILD_TALENT)
            {
                /* Hack: This should "strengthen your attacks" */
                for (i = 0; i < MAX_HANDS; i++)
                    p_ptr->weapon_info[i].xtra_blow += 100;
            }

            /* Didn't this used to give vulnerabilites?? */
            res_add_vuln(RES_ACID);
            res_add_vuln(RES_FIRE);
            res_add_vuln(RES_ELEC);
            res_add_vuln(RES_COLD);
            res_add_vuln(RES_POIS);
        }
        else if (p_ptr->special_defense & KAMAE_SEIRYU)
        {
            p_ptr->to_a -= 50;
            p_ptr->dis_to_a -= 50;
            res_add(RES_ACID);
            res_add(RES_FIRE);
            res_add(RES_ELEC);
            res_add(RES_COLD);
            res_add(RES_POIS);
            p_ptr->sh_fire = TRUE;
            p_ptr->sh_elec = TRUE;
            p_ptr->sh_cold = TRUE;
            p_ptr->levitation = TRUE;
        }
        else if (p_ptr->special_defense & KAMAE_GENBU)
        {
            p_ptr->to_a += (p_ptr->lev*p_ptr->lev)/50;
            p_ptr->dis_to_a += (p_ptr->lev*p_ptr->lev)/50;
            p_ptr->reflect = TRUE;
            for (i = 0; i < MAX_HANDS; i++)
            {
                p_ptr->weapon_info[i].xtra_blow -= 200;
                if (p_ptr->lev > 42)
                    p_ptr->weapon_info[i].xtra_blow -= 100;
            }
        }
        else if (p_ptr->special_defense & KAMAE_SUZAKU)
        {
            p_ptr->pspeed += 10;
            for (i = 0; i < MAX_HANDS; i++)
            {
                p_ptr->weapon_info[i].to_h -= (p_ptr->lev / 3);
                p_ptr->weapon_info[i].to_d -= (p_ptr->lev / 6);

                p_ptr->weapon_info[i].dis_to_h -= (p_ptr->lev / 3);
                p_ptr->weapon_info[i].dis_to_d -= (p_ptr->lev / 6);
                p_ptr->weapon_info[i].base_blow /= 2;
            }
            p_ptr->levitation = TRUE;
        }
    }
}
Ejemplo n.º 9
0
static void _calc_bonuses(void) {
    int l = p_ptr->lev;
    int to_a = l/10 + l*l/250 + l*l*l/12500;
    int tier = _find_tier(p_ptr->current_r_idx);

    p_ptr->skill_dig += 100;
    p_ptr->to_a += to_a;
    p_ptr->dis_to_a += to_a;

    if (tier > 3)
        p_ptr->pspeed += (tier - 3);

    switch (p_ptr->current_r_idx)
    {
    /* Tier 1 */
    case MON_LIGHT_HOUND:
        res_add(RES_LITE);
        break;
    case MON_SHADOW_HOUND:
        res_add(RES_DARK);
        res_add_vuln(RES_LITE);
        break;
    /* Tier 2 */
    case MON_FIRE_HOUND:
        res_add(RES_FIRE);
        res_add(RES_FIRE);
        res_add_vuln(RES_COLD);
        break;
    case MON_COLD_HOUND:
        res_add(RES_COLD);
        res_add(RES_COLD);
        res_add_vuln(RES_FIRE);
        break;
    case MON_ENERGY_HOUND:
        res_add(RES_ELEC);
        res_add(RES_ELEC);
        break;
    case MON_AIR_HOUND:
        res_add(RES_POIS);
        res_add(RES_POIS);
        break;
    case MON_WATER_HOUND:
        res_add(RES_ACID);
        res_add(RES_ACID);
        break;
    /* Tier 3 */
    case MON_EARTH_HOUND:
        res_add(RES_SHARDS);
        break;
    case MON_VIBRATION_HOUND:
        res_add(RES_SOUND);
        res_add(RES_CONF);
        p_ptr->free_act = TRUE;
        break;
    case MON_NEXUS_HOUND:
        res_add(RES_NEXUS);
        res_add(RES_CONF);
        p_ptr->free_act = TRUE;
        break;
    case MON_MULTI_HUED_HOUND:
        p_ptr->pspeed += 3;
        res_add(RES_FIRE);
        res_add(RES_COLD);
        res_add(RES_ACID);
        res_add(RES_ELEC);
        res_add(RES_POIS);
        res_add(RES_CONF);
        p_ptr->free_act = TRUE;
        break;
    /* Tier 4 */
    case MON_INERTIA_HOUND:
        res_add(RES_CONF);
        p_ptr->free_act = TRUE;
        break;
    case MON_IMPACT_HOUND:
        res_add(RES_CONF);
        p_ptr->free_act = TRUE;
        break;
    case MON_NETHER_HOUND:
        p_ptr->pspeed += 5;
        res_add(RES_NETHER);
        res_add(RES_CONF);
        p_ptr->free_act = TRUE;
        break;
    /* Tier 5 */
    case MON_GRAVITY_HOUND:
        res_add(RES_CONF);
        p_ptr->free_act = TRUE;
        break;
    case MON_TIME_HOUND:
        p_ptr->pspeed += 7;
        res_add(RES_TIME);
        res_add(RES_CONF);
        p_ptr->free_act = TRUE;
        break;
    case MON_PLASMA_HOUND:
        p_ptr->pspeed += 5;
        res_add(RES_ELEC);
        res_add(RES_FIRE);
        res_add(RES_CONF);
        p_ptr->free_act = TRUE;
        break;
    case MON_CHAOS_HOUND:
        p_ptr->pspeed += 5;
        res_add(RES_CHAOS);
        res_add(RES_CONF);
        p_ptr->free_act = TRUE;
        break;
    /* Tier 6 */
    case MON_HOUND_OF_TINDALOS:
        p_ptr->pspeed += 7;
        res_add(RES_NETHER);
        res_add(RES_TIME);
        res_add(RES_CONF);
        p_ptr->free_act = TRUE;
        p_ptr->levitation = TRUE;
        p_ptr->pass_wall = TRUE;
        p_ptr->no_passwall_dam = TRUE;
        break;
    case MON_MANA_HOUND:
        p_ptr->pspeed += 10;
        res_add(RES_CONF);
        p_ptr->free_act = TRUE;
        break;
    case MON_AETHER_HOUND:
        p_ptr->pspeed += 5;
        res_add(RES_FIRE);
        res_add(RES_COLD);
        res_add(RES_ACID);
        res_add(RES_ELEC);
        res_add(RES_POIS);
        res_add(RES_LITE);
        res_add(RES_DARK);
        res_add(RES_CONF);
        res_add(RES_NETHER);
        res_add(RES_NEXUS);
        res_add(RES_SOUND);
        res_add(RES_SHARDS);
        res_add(RES_CHAOS);
        res_add(RES_DISEN);
        res_add(RES_TIME);
        p_ptr->sh_cold = TRUE;
        p_ptr->sh_fire = TRUE;
        p_ptr->sh_elec = TRUE;
        p_ptr->free_act = TRUE;
        break;
    }
}
Ejemplo n.º 10
0
static void _ent_calc_bonuses(void)
{
    res_add_vuln(RES_FIRE);
    if (!equip_find_first(object_is_melee_weapon)) 
        p_ptr->skill_dig += p_ptr->lev * 10;
}
Ejemplo n.º 11
0
/******************************************************************************
 * Troll Bonuses
 ******************************************************************************/
static void _calc_bonuses(void) 
{
    int l = p_ptr->lev;
    int to_a = l/10 + l*l/250 + l*l*l/12500;

    p_ptr->to_a += to_a;
    p_ptr->dis_to_a += to_a;

    p_ptr->regenerate = TRUE; /* cf process_world_aux_hp_and_sp() in dungeon.c for the troll's special regeneration */
    switch (p_ptr->current_r_idx)
    {
    case MON_FOREST_TROLL:
        res_add_vuln(RES_LITE);
        break;
    case MON_STONE_TROLL:
        res_add_vuln(RES_LITE);
        break;
    case MON_ICE_TROLL:
        res_add_vuln(RES_LITE);
        res_add_vuln(RES_FIRE);
        res_add(RES_COLD);
        res_add(RES_COLD);
        break;
    case MON_FIRE_TROLL:
        res_add_vuln(RES_LITE);
        res_add_vuln(RES_COLD);
        res_add(RES_FIRE);
        res_add(RES_FIRE);
        break;
    case MON_ALGROTH:
        break;
    case MON_AKLASH:
        res_add(RES_POIS);
        res_add(RES_ACID);
        break;
    case MON_OLOG:
        res_add(RES_POIS);
        break;
    case MON_ETTIN:
        p_ptr->free_act = TRUE;
        res_add(RES_POIS);
        res_add(RES_CONF);
        break;
    case MON_SPIRIT_TROLL:
        p_ptr->pass_wall = TRUE;
        p_ptr->no_passwall_dam = TRUE;
        p_ptr->free_act = TRUE;
        p_ptr->see_inv = TRUE;
        p_ptr->levitation = TRUE;
        res_add(RES_COLD);
        res_add(RES_ELEC);
        res_add(RES_POIS);
        res_add(RES_CONF);
        break;
    case MON_STORM_TROLL:
        p_ptr->pspeed += 5;
        res_add(RES_COLD);
        res_add(RES_ELEC);
        res_add(RES_ACID);
        break;
    case MON_TROLL_KING:
        p_ptr->pspeed += 7;
        p_ptr->free_act = TRUE;
        res_add(RES_POIS);
        res_add(RES_CONF);
        break;
    }
}