void monk_posture_calc_stats(s16b stats[MAX_STATS]) { if (!heavy_armor() || p_ptr->pclass == CLASS_WILD_TALENT) { if (p_ptr->special_defense & KAMAE_BYAKKO) { stats[A_STR] += 2; stats[A_DEX] += 2; stats[A_CON] -= 3; } else if (p_ptr->special_defense & KAMAE_SEIRYU) { } else if (p_ptr->special_defense & KAMAE_GENBU) { stats[A_INT] -= 1; stats[A_WIS] -= 1; stats[A_DEX] -= 2; stats[A_CON] += 3; } else if (p_ptr->special_defense & KAMAE_SUZAKU) { stats[A_STR] -= 2; stats[A_INT] += 1; stats[A_WIS] += 1; stats[A_DEX] += 2; stats[A_CON] -= 2; } } }
int mystic_get_toggle(void) { int result = TOGGLE_NONE; if (p_ptr->pclass == CLASS_MYSTIC && !heavy_armor()) result = _get_toggle(); return result; }
static void _calc_bonuses(void) { if (!heavy_armor()) { p_ptr->pspeed += p_ptr->lev/10; if (p_ptr->lev >= 25) p_ptr->free_act = TRUE; switch (_get_toggle()) { case MYSTIC_TOGGLE_STEALTH: p_ptr->skills.stl += 2 + 3 * p_ptr->lev/50; break; case MYSTIC_TOGGLE_FAST: p_ptr->quick_walk = TRUE; break; case MYSTIC_TOGGLE_DEFENSE: { int bonus = 10 + 40*p_ptr->lev/50; p_ptr->to_a += bonus; p_ptr->dis_to_a += bonus; break; } case MYSTIC_TOGGLE_OFFENSE: { int penalty = 10 + 40*p_ptr->lev/50; p_ptr->to_a -= penalty; p_ptr->dis_to_a -= penalty; break; } } } monk_ac_bonus(); }
static void _character_dump(doc_ptr doc) { int ct = _count_open_terrain(); bool disrupt = heavy_armor(); if (!disrupt && p_ptr->lev >= 5) { spell_info spells[MAX_SPELLS]; int ct = _get_spells(spells, MAX_SPELLS); py_display_spells(doc, spells, ct); } doc_printf(doc, "<topic:Abilities>================================== <color:keypress>A</color>bilities ==================================\n\n"); /* Hack: Heavy Armor negates advantages of being in the open, and actually incurs penalties for being entrenched! */ if (disrupt) { doc_printf(doc, " * Your talents are disrupted by the weight of your armor.\n"); ct = 0; } else { if (ct >= 6) doc_printf(doc, " * You are out in the open (%d adjacent open squares).\n", ct); else if (ct >= 3) doc_printf(doc, " * You are somewhat confined (%d adjacent open squares).\n", ct); else doc_printf(doc, " * You are very confined (%d adjacent open squares).\n", ct); } /* Unfettered Body */ if (p_ptr->lev >= 1) { int amt = _unfettered_body(ct); if (amt > 0) doc_printf(doc, " * You gain %+d to your AC being out in the open.\n", amt); else if (amt < 0) doc_printf(doc, " * You lose %+d to your AC being so confined.\n", amt); } /* Unfettered Mind */ if (p_ptr->lev >= 1) { int amt = _unfettered_mind(ct); if (amt > 0) doc_printf(doc, " * You gain %+d to your Saving Throws being out in the open.\n", amt); else if (amt < 0) doc_printf(doc, " * You lose %+d to your Saving Throws being so confined.\n", amt); } if (!disrupt && p_ptr->lev >= 20) doc_printf(doc, " * You ambush sleeping monsters for extra damage.\n"); if (!disrupt && p_ptr->lev >= 50) doc_printf(doc, " * You have Peerless Stealth and will never aggravate monsters.\n"); doc_newline(doc); }
static void _calc_bonuses(void) { int ct = _count_open_terrain(); bool disrupt = heavy_armor(); /* Hack: Heavy Armor negates advantages of being in the open, and actually incurs penalties for being entrenched! */ if (disrupt) ct = 0; p_ptr->open_terrain_ct = ct; /* Nimble Dodge needs this information! */ /* Unfettered Body */ if (p_ptr->lev >= 1) { int amt = _unfettered_body(ct); p_ptr->to_a += amt; p_ptr->dis_to_a += amt; } /* Unfettered Mind */ if (p_ptr->lev >= 1) { p_ptr->skills.sav += _unfettered_mind(ct); } if (!disrupt && p_ptr->lev >= 20) p_ptr->ambush = TRUE; if (!disrupt && p_ptr->lev >= 50) p_ptr->peerless_stealth = TRUE; }
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; } } 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; } } }
static void _get_flags(u32b flgs[OF_ARRAY_SIZE]) { if (!heavy_armor()) { if (p_ptr->lev >= 10) add_flag(flgs, OF_SPEED); if (p_ptr->lev >= 25) add_flag(flgs, OF_FREE_ACT); } }
static void _get_flags(u32b flgs[TR_FLAG_SIZE]) { if (!heavy_armor()) { if (p_ptr->lev >= 10) add_flag(flgs, TR_SPEED); if (p_ptr->lev >= 25) add_flag(flgs, TR_FREE_ACT); } }
static void _calc_shooter_bonuses(object_type *o_ptr, shooter_info_t *info_ptr) { if ( !p_ptr->shooter_info.heavy_shoot && !heavy_armor() && p_ptr->shooter_info.tval_ammo <= TV_BOLT && p_ptr->shooter_info.tval_ammo >= TV_SHOT ) { p_ptr->shooter_info.num_fire += p_ptr->lev * 150 / 50; } }
static void _get_flags(u32b flgs[OF_ARRAY_SIZE]) { monk_posture_get_flags(flgs); if (!heavy_armor()) { add_flag(flgs, OF_AURA_REVENGE); if (p_ptr->lev >= 10) add_flag(flgs, OF_SPEED); if (p_ptr->lev >= 25) add_flag(flgs, OF_FREE_ACT); } }
static void _calc_bonuses(void) { monk_posture_calc_bonuses(); if (!heavy_armor()) { p_ptr->pspeed += p_ptr->lev/10; p_ptr->sh_retaliation = TRUE; if (p_ptr->lev >= 25) p_ptr->free_act = TRUE; } monk_ac_bonus(); }
static void _get_flags(u32b flgs[TR_FLAG_SIZE]) { monk_posture_get_flags(flgs); if (!heavy_armor()) { add_flag(flgs, TR_SH_REVENGE); if (p_ptr->lev >= 10) add_flag(flgs, TR_SPEED); if (p_ptr->lev >= 25) add_flag(flgs, TR_FREE_ACT); } }
static int _get_spells(spell_info* spells, int max) { int ct = 0; if (heavy_armor()) { msg_print("Your talents are disrupted!"); return 0; } ct = get_spells_aux(spells, max, _spells); if (ct == 0) msg_print("You have no powers yet! Why not go kill stuff?"); return ct; }
void monk_ac_bonus(void) { if (!(heavy_armor())) equip_for_each_slot(_ac_bonus_imp); }