*/
void sanity_blast(monster_type *m_ptr, bool necro)
{
- bool happened = FALSE;
int power = 100;
if (p_ptr->inside_battle || !character_dungeon) return;
msg_print(_("ネクロノミコンを読んで正気を失った!", "Your sanity is shaken by reading the Necronomicon!"));
}
- if (!saving_throw(p_ptr->skill_sav - power)) /* Mind blast */
+ if (saving_throw(p_ptr->skill_sav - power))
{
- if (!p_ptr->resist_conf)
- {
- (void)set_confused(p_ptr->confused + randint0(4) + 4);
- }
- if (!p_ptr->resist_chaos && one_in_(3))
- {
- (void)set_image(p_ptr->image + randint0(250) + 150);
- }
return;
}
- if (!saving_throw(p_ptr->skill_sav - power)) /* Lose int & wis */
- {
- do_dec_stat(A_INT);
- do_dec_stat(A_WIS);
- return;
- }
+ do {
+ (void)do_dec_stat(A_INT);
+ } while (randint0(100) > p_ptr->skill_sav && one_in_(2));
- if (!saving_throw(p_ptr->skill_sav - power)) /* Brain smash */
+ do {
+ (void)do_dec_stat(A_WIS);
+ } while (randint0(100) > p_ptr->skill_sav && one_in_(2));
+
+ switch (randint1(21))
{
+ case 1:
+ if (!(p_ptr->muta3 & MUT3_MORONIC) && one_in_(5))
+ {
+ if ((p_ptr->stat_use[A_INT] < 4) && (p_ptr->stat_use[A_WIS] < 4))
+ {
+ msg_print(_("あなたは完璧な馬鹿になったような気がした。しかしそれは元々だった。", "You turn into an utter moron!"));
+ }
+ else
+ {
+ msg_print(_("あなたは完璧な馬鹿になった!", "You turn into an utter moron!"));
+ }
+
+ if (p_ptr->muta3 & MUT3_HYPER_INT)
+ {
+ msg_print(_("あなたの脳は生体コンピュータではなくなった。", "Your brain is no longer a living computer."));
+ p_ptr->muta3 &= ~(MUT3_HYPER_INT);
+ }
+ p_ptr->muta3 |= MUT3_MORONIC;
+ }
+ break;
+ case 2:
+ case 3:
+ case 4:
+ if (!(p_ptr->muta2 & MUT2_COWARDICE) && !p_ptr->resist_fear)
+ {
+ msg_print(_("あなたはパラノイアになった!", "You become paranoid!"));
+
+ /* Duh, the following should never happen, but anyway... */
+ if (p_ptr->muta3 & MUT3_FEARLESS)
+ {
+ msg_print(_("あなたはもう恐れ知らずではなくなった。", "You are no longer fearless."));
+ p_ptr->muta3 &= ~(MUT3_FEARLESS);
+ }
+
+ p_ptr->muta2 |= MUT2_COWARDICE;
+ }
+ break;
+ case 5:
+ case 6:
+ case 7:
+ if (!(p_ptr->muta2 & MUT2_HALLU) && !p_ptr->resist_chaos)
+ {
+ msg_print(_("幻覚をひき起こす精神錯乱に陥った!", "You are afflicted by a hallucinatory insanity!"));
+ p_ptr->muta2 |= MUT2_HALLU;
+ }
+ break;
+ case 8:
+ case 9:
+ case 10:
+ if (!(p_ptr->muta2 & MUT2_BERS_RAGE))
+ {
+ msg_print(_("激烈な感情の発作におそわれるようになった!", "You become subject to fits of berserk rage!"));
+ p_ptr->muta2 |= MUT2_BERS_RAGE;
+ }
+ break;
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ case 16:
+ /* Brain smash */
if (!p_ptr->resist_conf)
{
(void)set_confused(p_ptr->confused + randint0(4) + 4);
{
(void)set_paralyzed(p_ptr->paralyzed + randint0(4) + 4);
}
- while (randint0(100) > p_ptr->skill_sav)
- (void)do_dec_stat(A_INT);
- while (randint0(100) > p_ptr->skill_sav)
- (void)do_dec_stat(A_WIS);
if (!p_ptr->resist_chaos)
{
(void)set_image(p_ptr->image + randint0(250) + 150);
}
- return;
- }
-
- if (!saving_throw(p_ptr->skill_sav - power)) /* Amnesia */
- {
-
+ break;
+ case 17:
+ case 18:
+ case 19:
+ case 20:
+ case 21:
+ /* Amnesia */
if (lose_all_info())
msg_print(_("あまりの恐怖に全てのことを忘れてしまった!", "You forget everything in your utmost terror!"));
-
- return;
- }
-
- if (saving_throw(p_ptr->skill_sav - power))
- {
- return;
- }
-
- /* Else gain permanent insanity */
- if ((p_ptr->muta3 & MUT3_MORONIC) && /*(p_ptr->muta2 & MUT2_BERS_RAGE) &&*/
- ((p_ptr->muta2 & MUT2_COWARDICE) || (p_ptr->resist_fear)) &&
- ((p_ptr->muta2 & MUT2_HALLU) || (p_ptr->resist_chaos)))
- {
- /* The poor bastard already has all possible insanities! */
- return;
- }
-
- while (!happened)
- {
- switch (randint1(21))
- {
- case 1:
- if (!(p_ptr->muta3 & MUT3_MORONIC) && one_in_(5))
- {
- if ((p_ptr->stat_use[A_INT] < 4) && (p_ptr->stat_use[A_WIS] < 4))
- {
- msg_print(_("あなたは完璧な馬鹿になったような気がした。しかしそれは元々だった。", "You turn into an utter moron!"));
- }
- else
- {
- msg_print(_("あなたは完璧な馬鹿になった!", "You turn into an utter moron!"));
- }
-
- if (p_ptr->muta3 & MUT3_HYPER_INT)
- {
- msg_print(_("あなたの脳は生体コンピュータではなくなった。", "Your brain is no longer a living computer."));
- p_ptr->muta3 &= ~(MUT3_HYPER_INT);
- }
- p_ptr->muta3 |= MUT3_MORONIC;
- happened = TRUE;
- }
- break;
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 10:
- case 11:
- if (!(p_ptr->muta2 & MUT2_COWARDICE) && !p_ptr->resist_fear)
- {
- msg_print(_("あなたはパラノイアになった!", "You become paranoid!"));
-
- /* Duh, the following should never happen, but anyway... */
- if (p_ptr->muta3 & MUT3_FEARLESS)
- {
- msg_print(_("あなたはもう恐れ知らずではなくなった。", "You are no longer fearless."));
- p_ptr->muta3 &= ~(MUT3_FEARLESS);
- }
-
- p_ptr->muta2 |= MUT2_COWARDICE;
- happened = TRUE;
- }
- break;
- case 12:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- case 20:
- case 21:
- if (!(p_ptr->muta2 & MUT2_HALLU) && !p_ptr->resist_chaos)
- {
- msg_print(_("幻覚をひき起こす精神錯乱に陥った!", "You are afflicted by a hallucinatory insanity!"));
- p_ptr->muta2 |= MUT2_HALLU;
- happened = TRUE;
- }
- break;
- default:
- if (!(p_ptr->muta2 & MUT2_BERS_RAGE))
- {
- msg_print(_("激烈な感情の発作におそわれるようになった!", "You become subject to fits of berserk rage!"));
- p_ptr->muta2 |= MUT2_BERS_RAGE;
- happened = TRUE;
- }
- break;
- }
+ break;
}
p_ptr->update |= PU_BONUS;