static void _calc_innate_attacks(void) { if (p_ptr->weapon_ct == 0 && equip_find_empty_hand()) { innate_attack_t a = {0}; int l = _attack_level(); a.dd = 5 + l/5 + l*l/250; a.ds = 5 + l/5 + l*l/250; a.weight = 100 + 8*l; a.to_h = l; a.to_d = l + l*l/50 + l*l*l/2500; if (!equip_find_first(object_is_shield)) { a.to_h += ((int)(adj_str_th[p_ptr->stat_ind[A_STR]]) - 128) + ((int)(adj_dex_th[p_ptr->stat_ind[A_DEX]]) - 128); a.to_d += ((int)(adj_str_td[p_ptr->stat_ind[A_STR]]) - 128) * 3/4; } if (l >= 30) a.effect[1] = GF_STUN; a.blows = 100; a.msg = "You punch."; a.name = "Fist"; p_ptr->innate_attacks[p_ptr->innate_attack_ct++] = a; } }
/********************************************************************** * Utilities **********************************************************************/ static bool _necro_check_touch(void) { int slot; if (p_ptr->afraid) { msg_print("You are too scared to do that!"); return FALSE; } if (!equip_find_empty_hand() && !mut_present(MUT_DRACONIAN_METAMORPHOSIS)) { msg_print("You need a free hand to touch."); return FALSE; } slot = equip_find_obj(TV_GLOVES, SV_ANY); if (slot && equip_obj(slot)->name1 != ART_HAND_OF_VECNA) { msg_print("You can't touch while wielding gloves."); return FALSE; } return TRUE; }
/********************************************************************** * Innate Attacks **********************************************************************/ static void _calc_innate_attacks(void) { if (p_ptr->weapon_ct == 0 && equip_find_empty_hand()) { innate_attack_t a = {0}; int l = p_ptr->lev; a.dd = 1; a.ds = 3 + l / 15; a.weight = 2; a.to_h = p_ptr->lev/5; a.effect[1] = GF_STEAL; calc_innate_blows(&a, 300); a.msg = "You pilfer."; a.name = "Greedy Hands"; p_ptr->innate_attacks[p_ptr->innate_attack_ct++] = a; } }