static void _calc_weapon_bonuses(object_type *o_ptr, weapon_info_t *info_ptr) { if (_weapon_check()) { /* CL1: Mighty */ if (p_ptr->lev >= 1) { int w = o_ptr->weight; int h = (w - 150)/20; int d = (w - 150)/10; if (w > 200) d += ((int)(adj_str_td[p_ptr->stat_ind[A_STR]]) - 128); info_ptr->to_h += h; info_ptr->dis_to_h += h; info_ptr->to_d += d; info_ptr->dis_to_d += d; } /* CL25: Impact 20lb +1d0 25lb +1d1 30lb +2d1 40lb +2d2 50lb +3d2 60lb +3d3 Stagger in bonuses with level. Also, I'm debating > rather than >= for cutoffs. */ if (p_ptr->lev >= 25 ) { int w = o_ptr->weight; if (w >= 200) info_ptr->to_dd++; if (p_ptr->lev >= 30 && w >= 250) info_ptr->to_ds++; if (p_ptr->lev >= 35 && w >= 300) info_ptr->to_dd++; if (p_ptr->lev >= 40 && w >= 400) info_ptr->to_ds++; if (p_ptr->lev >= 45 && w >= 500) info_ptr->to_dd++; if (p_ptr->lev >= 50 && w >= 600) info_ptr->to_ds++; } /* Destroyer is handled as a hack in cmd1.c critical_norm() and now scales with level */ if (_get_toggle() == MAULER_TOGGLE_MAUL) { info_ptr->to_dd += 1; info_ptr->to_ds += 1; } } }
static void _character_dump(doc_ptr doc) { if (_weapon_check() && p_ptr->lev >= 5) { spell_info spells[MAX_SPELLS]; int ct = _get_spells(spells, MAX_SPELLS); py_display_spells(doc, spells, ct); } }
int mauler_get_toggle(void) { /* exposed for prtstatus() in xtra1.c this is easier than rewriting the status code so that classes can maintain it! */ int result = TOGGLE_NONE; if (p_ptr->pclass == CLASS_MAULER && _weapon_check()) result = _get_toggle(); return result; }
static void _character_dump(FILE* file) { if (_weapon_check() && p_ptr->lev >= 5) { spell_info spells[MAX_SPELLS]; int ct = _get_spells(spells, MAX_SPELLS); dump_spells_aux(file, spells, ct); } }
static int _get_spells(spell_info* spells, int max) { int ct; if (!_weapon_check()) { msg_print("Rargh! You need to wield a single weapon with both hands to properly maul stuff!"); return 0; } ct = get_spells_aux(spells, max, _spells); if (ct == 0) msg_print("Rargh! Go maul something for more experience!"); return ct; }
static void _calc_bonuses(void) { int w = equip_weight(object_is_melee_weapon); if (_weapon_check()) { if (_get_toggle() == MAULER_TOGGLE_BLOCK) { int a = w/20 + (w/100)*(w/100); p_ptr->to_a += a; p_ptr->dis_to_a += a; } /* TODO: This should cost more energy too ... */ if (_get_toggle() == MAULER_TOGGLE_TUNNEL) p_ptr->kill_wall = TRUE; } }