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V6EWDXLNSDCWBJWBGVSQFGQC VCG3BRIYRTNNWYC3LOXD6KFGXOX37HAFW2HNV7WXVG2V7EUHLDZQC I7QLYOTE6DLQZM7YWUWYLKHRJRB2A3STQ42ALSRGQICEWKD2QTEQC * called from: ability - spell* *********************************************************************** */void holy_word(int pow, bool silent = false);// last updated 24may2000 {dlb}/* ***********************************************************************
void holy_word(int pow, bool silent){struct monsters *monster;if (!silent)mpr("You speak a Word of immense power!");// doubt this will ever happen, but it's here as a safety -- bwrif (pow > 300)pow = 300;for (int tu = 0; tu < MAX_MONSTERS; tu++){monster = &menv[tu];if (monster->type == -1 || !mons_near(monster))continue;if (mons_holiness(monster) == MH_UNDEAD|| mons_holiness(monster) == MH_DEMONIC){simple_monster_message(monster, " convulses!");behaviour_event( monster, ME_ANNOY, MHITYOU );hurt_monster( monster, roll_dice( 2, 15 ) + (random2(pow) / 3) );if (monster->hit_points < 1){monster_die(monster, KILL_YOU, 0);continue;}if (monster->speed_increment >= 25)monster->speed_increment -= 20;
((temp_rand > 751) ? SCR_IDENTIFY : // 18.26%(temp_rand > 629) ? SCR_REMOVE_CURSE : // 13.26%(temp_rand > 554) ? SCR_TELEPORTATION : // 8.15%(temp_rand > 494) ? SCR_DETECT_CURSE : // 6.52%(temp_rand > 464) ? SCR_FEAR : // 3.26%(temp_rand > 434) ? SCR_NOISE : // 3.26%(temp_rand > 404) ? SCR_MAGIC_MAPPING : // 3.26%(temp_rand > 374) ? SCR_FOG : // 3.26%(temp_rand > 344) ? SCR_RANDOM_USELESSNESS :// 3.26%(temp_rand > 314) ? SCR_CURSE_WEAPON : // 3.26%(temp_rand > 284) ? SCR_CURSE_ARMOUR : // 3.26%(temp_rand > 254) ? SCR_RECHARGING : // 3.26%(temp_rand > 224) ? SCR_BLINKING : // 3.26%(temp_rand > 194) ? SCR_PAPER : // 3.26%(temp_rand > 164) ? SCR_ENCHANT_ARMOUR : // 3.26%(temp_rand > 134) ? SCR_ENCHANT_WEAPON_I : // 3.26%(temp_rand > 104) ? SCR_ENCHANT_WEAPON_II : // 3.26%
((temp_rand > 766) ? SCR_IDENTIFY : // 17.97%(temp_rand > 644) ? SCR_REMOVE_CURSE : // 13.05%(temp_rand > 569) ? SCR_TELEPORTATION : // 8.02%(temp_rand > 509) ? SCR_DETECT_CURSE : // 6.42%(temp_rand > 479) ? SCR_FEAR : // 3.21%(temp_rand > 449) ? SCR_NOISE : // 3.21%(temp_rand > 419) ? SCR_MAGIC_MAPPING : // 3.21%(temp_rand > 389) ? SCR_FOG : // 3.21%(temp_rand > 359) ? SCR_RANDOM_USELESSNESS :// 3.21%(temp_rand > 329) ? SCR_CURSE_WEAPON : // 3.21%(temp_rand > 299) ? SCR_CURSE_ARMOUR : // 3.21%(temp_rand > 269) ? SCR_RECHARGING : // 3.21%(temp_rand > 239) ? SCR_BLINKING : // 3.21%(temp_rand > 209) ? SCR_PAPER : // 3.21%(temp_rand > 179) ? SCR_ENCHANT_ARMOUR : // 3.21%(temp_rand > 149) ? SCR_ENCHANT_WEAPON_I : // 3.21%(temp_rand > 119) ? SCR_ENCHANT_WEAPON_II : // 3.21%
bool holy_word(int pow, int caster, bool silent){bool holy_influenced = false;struct monsters *monster;if (!silent)mpr("You speak a Word of immense power!");// doubt this will ever happen, but it's here as a safety -- bwrif (pow > 300)pow = 300;if (you.is_undead || you.species == SP_DEMONSPAWN){int hploss = you.hp / 2 - 1;if (hploss >= you.hp)hploss = you.hp - 1;if (hploss < 0)hploss = 0;if (hploss){holy_influenced = true;mpr("You are blasted by holy energy!");
const char *aux = "holy word";if (caster < 0){switch (caster){case HOLY_WORD_SCROLL:aux = "scroll of holy word";break;}caster = HOLY_WORD_GENERIC;}ouch(hploss, caster,caster != HOLY_WORD_GENERIC ? KILLED_BY_MONSTER: KILLED_BY_SOMETHING,aux);}}for (int tu = 0; tu < MAX_MONSTERS; tu++){monster = &menv[tu];if (monster->type == -1 || !mons_near(monster))continue;if (mons_holiness(monster) == MH_UNDEAD|| mons_holiness(monster) == MH_DEMONIC){holy_influenced = true;simple_monster_message(monster, " convulses!");behaviour_event( monster, ME_ANNOY, MHITYOU );hurt_monster( monster, roll_dice( 2, 15 ) + (random2(pow) / 3) );if (monster->hit_points < 1){monster_die(monster, KILL_YOU, 0);continue;}if (monster->speed_increment >= 25)monster->speed_increment -= 20;monster->add_ench(ENCH_FEAR);} // end "if mons_holiness"} // end "for tu"return holy_influenced;} // end holy_word()