Ejemplo n.º 1
0
static void _phase_spider_calc_bonuses(void)
{
    p_ptr->pspeed += 5 + (p_ptr->lev - 25)/5;
    res_add_immune(RES_POIS);
    res_add(RES_NEXUS);
    res_add(RES_CONF);
    res_add_immune(RES_TELEPORT);
    p_ptr->free_act = TRUE;
    p_ptr->see_nocto = TRUE;
}
Ejemplo n.º 2
0
static void _acidic_cytoplasm_calc_bonuses(void)
{
    p_ptr->pspeed += 3;
    p_ptr->free_act = TRUE;
    p_ptr->to_a += p_ptr->lev/3;
    p_ptr->dis_to_a += p_ptr->lev/3;
    res_add_immune(RES_ACID);
    res_add(RES_CONF);
    res_add_immune(RES_FEAR);

    add_flag(p_ptr->weapon_info[0].flags, OF_BRAND_ACID);

    _gelatinous_cube_calc_bonuses();
}
Ejemplo n.º 3
0
static void _balrog_calc_bonuses(void) {
    p_ptr->align -= 200;

    res_add(RES_FIRE);
    res_add(RES_NETHER);

    p_ptr->hold_life = TRUE;
    p_ptr->no_eldritch = TRUE;
    p_ptr->pspeed += p_ptr->lev/8; /* Angels get +7 speed. Demons get +6 speed. */
    p_ptr->sh_fire = TRUE;

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

    if (p_ptr->lev >= 10)
        p_ptr->see_inv = TRUE;

    if (p_ptr->lev >= 30)
    {
        res_add(RES_FIRE);
        res_add(RES_CHAOS);
    }

    if (p_ptr->lev >= 40)
    {
        res_add_immune(RES_FIRE);
        res_add(RES_NETHER);
        p_ptr->kill_wall = TRUE;
        p_ptr->no_charge_drain = TRUE;
    }
}
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.º 5
0
static void _black_ooze_calc_bonuses(void)
{
    res_add(RES_ACID);
    res_add(RES_POIS);
    res_add_immune(RES_BLIND);
    p_ptr->see_nocto = TRUE;
    p_ptr->no_stun = TRUE;
    p_ptr->no_cut = TRUE;
}
Ejemplo n.º 6
0
static void _aranea_calc_bonuses(void)
{
    p_ptr->pspeed += 5;
    res_add_immune(RES_POIS);
    res_add(RES_DARK);
    res_add(RES_CONF);
    res_add(RES_FEAR);

    p_ptr->free_act = TRUE;
    p_ptr->see_nocto = TRUE;
}
Ejemplo n.º 7
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);
    }
}
static void _water_calc_bonuses(void) 
{
    res_add(RES_ACID);
    p_ptr->no_stun = TRUE;

    if (p_ptr->lev >= 25)
    {
        p_ptr->pspeed += 3;
        p_ptr->melt_armor = TRUE;
        res_add(RES_ACID);
    }

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

    _calc_bonuses();
}
Ejemplo n.º 9
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.º 10
0
static void _air_calc_bonuses(void) 
{
    res_add(RES_ELEC);

    p_ptr->pspeed += 2;
    if (p_ptr->lev >= 25)
    {
        p_ptr->pspeed += 3;
        p_ptr->pspeed += (p_ptr->lev - 25) / 5; /* up to +10 speed */
        res_add(RES_ELEC);
        res_add(RES_ACID);
        res_add(RES_FIRE);
        res_add(RES_COLD);
        p_ptr->sh_elec = TRUE;
    }
    if (p_ptr->lev >= 50)
        res_add_immune(RES_ELEC);

    _calc_bonuses();
}
Ejemplo n.º 11
0
static void _calc_bonuses(void)
{
    res_add_immune(RES_FEAR);
    p_ptr->shero = 1;
    p_ptr->sustain_str = TRUE;
    p_ptr->sustain_dex = TRUE;
    p_ptr->sustain_con = TRUE;
    p_ptr->regen += 100;
    p_ptr->free_act = TRUE;
    p_ptr->pspeed += 2;
    if (p_ptr->lev >= 30) p_ptr->pspeed++;
    if (p_ptr->lev >= 40) p_ptr->pspeed++;
    if (p_ptr->lev >= 45) p_ptr->pspeed++;
    if (p_ptr->lev >= 50) p_ptr->pspeed++;
    p_ptr->to_a += 10+p_ptr->lev/2;
    p_ptr->dis_to_a += 10+p_ptr->lev/2;
    p_ptr->skill_dig += 100 + p_ptr->lev*8;
    if (p_ptr->lev > 39) p_ptr->reflect = TRUE;
    if (p_ptr->lev > 34) p_ptr->no_stun = TRUE;
    p_ptr->redraw |= PR_STATUS;
}
Ejemplo n.º 12
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.º 13
0
static void _apollo_calc_bonuses(void)
{
    res_add_immune(RES_LITE);
    res_add(RES_BLIND);
    /* cf calc_torch in xtra1.c for the 'extra light' */
}
Ejemplo n.º 14
0
static void _calc_bonuses(void) 
{
    int i;
    int l = p_ptr->lev;
    int to_a = l + l*l/50 + l*l*l/2500;

    to_a += _calc_amount(_essences[_ESSENCE_AC], 2, 10);
    if (p_ptr->current_r_idx == MON_DEATH_SCYTHE)
        to_a -= 50;
    p_ptr->to_a += to_a;
    p_ptr->dis_to_a += to_a;

    p_ptr->pspeed += 1;
    
    p_ptr->levitation = TRUE;
    p_ptr->no_cut = TRUE;
    res_add(RES_BLIND);
    res_add(RES_POIS);
    p_ptr->hold_life = TRUE;

    if (p_ptr->lev >= 10)
        p_ptr->pspeed += 1;

    if (p_ptr->lev >= 25)
        p_ptr->pspeed += 1;

    if (p_ptr->lev >= 35)
        p_ptr->pspeed += 2;

    if (p_ptr->lev >= 45)
    {
        p_ptr->pspeed += 2;
        p_ptr->sh_retaliation = TRUE;
    }

    for (i = 0; i < 6; i++) /* Assume in order */
        p_ptr->stat_add[A_STR + i] += _calc_stat_bonus(TR_STR + i);

    for (i = 0; i < RES_MAX; i++)
    {
        int j = res_get_object_flag(i);
        int n = _calc_amount(_essences[j], _res_power(i), 1);

        for (; n; --n)
            res_add(i);
    }
    if (_essences[TR_IM_ACID] >= 3)
        res_add_immune(RES_ACID);
    if (_essences[TR_IM_ELEC] >= 3)
        res_add_immune(RES_ELEC);
    if (_essences[TR_IM_FIRE] >= 3)
        res_add_immune(RES_FIRE);
    if (_essences[TR_IM_COLD] >= 3)
        res_add_immune(RES_COLD);

    p_ptr->life += 3*_calc_amount(_essences[TR_LIFE], 7, 1);

    p_ptr->skills.stl += _calc_amount(_essences[TR_STEALTH], 2, 1);
    p_ptr->pspeed += _calc_amount(_essences[TR_SPEED], 1, 10);
    p_ptr->skills.dev += 8*_calc_amount(_essences[TR_MAGIC_MASTERY], 2, 1);
    p_ptr->device_power += _calc_amount(_essences[TR_DEVICE_POWER], 2, 1);
    p_ptr->skills.srh += 5*_calc_amount(_essences[TR_SEARCH], 2, 1);
    p_ptr->skills.fos += 5*_calc_amount(_essences[TR_SEARCH], 2, 1);
    p_ptr->see_infra += _calc_amount(_essences[TR_INFRA], 2, 1);
    p_ptr->skill_dig += 20*_calc_amount(_essences[TR_TUNNEL], 2, 1);

    if (_essences[TR_SUST_STR] >= 5)
        p_ptr->sustain_str = TRUE;
    if (_essences[TR_SUST_INT] >= 5)
        p_ptr->sustain_int = TRUE;
    if (_essences[TR_SUST_WIS] >= 5)
        p_ptr->sustain_wis = TRUE;
    if (_essences[TR_SUST_DEX] >= 5)
        p_ptr->sustain_dex = TRUE;
    if (_essences[TR_SUST_CON] >= 5)
        p_ptr->sustain_con = TRUE;
    if (_essences[TR_SUST_CHR] >= 5)
        p_ptr->sustain_chr = TRUE;

    if (_essences[TR_TELEPATHY] >= 2)
        p_ptr->telepathy = TRUE;
    if (_essences[TR_ESP_ANIMAL] >= 2)
        p_ptr->esp_animal = TRUE;
    if (_essences[TR_ESP_UNDEAD] >= 2)
        p_ptr->esp_undead = TRUE;
    if (_essences[TR_ESP_DEMON] >= 2)
        p_ptr->esp_demon = TRUE;
    if (_essences[TR_ESP_ORC] >= 2)
        p_ptr->esp_orc = TRUE;
    if (_essences[TR_ESP_TROLL] >= 2)
        p_ptr->esp_troll = TRUE;
    if (_essences[TR_ESP_GIANT] >= 2)
        p_ptr->esp_giant = TRUE;
    if (_essences[TR_ESP_DRAGON] >= 2)
        p_ptr->esp_dragon = TRUE;
    if (_essences[TR_ESP_HUMAN] >= 2)
        p_ptr->esp_human = TRUE;
    if (_essences[TR_ESP_EVIL] >= 2)
        p_ptr->esp_evil = TRUE;
    if (_essences[TR_ESP_GOOD] >= 2)
        p_ptr->esp_good = TRUE;
    if (_essences[TR_ESP_NONLIVING] >= 2)
        p_ptr->esp_nonliving = TRUE;
    if (_essences[TR_ESP_UNIQUE] >= 2)
        p_ptr->esp_unique = TRUE;

    if (_essences[TR_NO_MAGIC] >= 5)
        p_ptr->anti_magic = TRUE;
    if (_essences[TR_FREE_ACT] >= 2)
        p_ptr->free_act = TRUE;
    if (_essences[TR_SEE_INVIS] >= 3)
        p_ptr->see_inv = TRUE;
    if (_essences[TR_SLOW_DIGEST] >= 2)
        p_ptr->slow_digest = TRUE;
    if (_essences[TR_REGEN] >= 7)
        p_ptr->regenerate = TRUE;
    if (_essences[TR_REFLECT] >= 3)
        p_ptr->reflect = TRUE;

    if (_essences[TR_SH_FIRE] >= 7)
        p_ptr->sh_fire = TRUE;
    if (_essences[TR_SH_ELEC] >= 7)
        p_ptr->sh_elec = TRUE;
    if (_essences[TR_SH_COLD] >= 7)
        p_ptr->sh_cold = TRUE;
}