4 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
6 * This software may be copied and distributed for educational, research,
7 * and not for profit purposes provided that this copyright and statement
8 * are included in all such copies. Other copyrights may also apply.
11 /* Purpose: effects of various "objects" */
15 void set_action(int typ)
17 int prev_typ = p_ptr->action;
30 msg_print("õº÷¤ò¤ä¤á¤¿¡£");
32 msg_print("You no longer walk carefully.");
34 p_ptr->redraw |= (PR_SPEED);
45 msg_print("³Ø½¬¤ò¤ä¤á¤¿¡£");
47 msg_print("You stop Learning");
55 msg_print("¹½¤¨¤ò¤È¤¤¤¿¡£");
57 msg_print("You stop assuming the posture.");
59 p_ptr->special_defense &= ~(KAMAE_MASK);
65 msg_print("·¿¤òÊø¤·¤¿¡£");
67 msg_print("You stop assuming the posture.");
69 p_ptr->special_defense &= ~(KATA_MASK);
70 p_ptr->update |= (PU_MONSTERS);
71 p_ptr->redraw |= (PR_STATUS);
77 msg_print("²Î¤¦¤Î¤ò¤ä¤á¤¿¡£");
79 msg_print("You stop singing.");
86 msg_print("¤¬½Å¤¯¤Ê¤Ã¤¿¡£");
88 msg_print("You are no longer walking extremely fast.");
97 /* If we are requested other action, stop singing */
98 if (prev_typ == ACTION_SING) stop_singing();
100 switch (p_ptr->action)
105 msg_print("Ãí°Õ¿¼¤¯Ê⤻Ϥ᤿¡£");
107 msg_print("You begin to walk carefully.");
109 p_ptr->redraw |= (PR_SPEED);
115 msg_print("³Ø½¬¤ò»Ï¤á¤¿¡£");
117 msg_print("You begin Learning");
124 msg_print("¿åÌ̤˻å¤ò¿â¤é¤·¤¿¡¥¡¥¡¥");
126 msg_print("You begin fishing...");
130 case ACTION_HAYAGAKE:
133 msg_print("¤¬±©¤Î¤è¤¦¤Ë·Ú¤¯¤Ê¤Ã¤¿¡£");
135 msg_print("You begin to walk extremely fast.");
145 /* Recalculate bonuses */
146 p_ptr->update |= (PU_BONUS);
148 /* Redraw the state */
149 p_ptr->redraw |= (PR_STATE);
152 /* reset timed flags */
153 void reset_tim_flags(void)
155 p_ptr->fast = 0; /* Timed -- Fast */
156 p_ptr->lightspeed = 0;
157 p_ptr->slow = 0; /* Timed -- Slow */
158 p_ptr->blind = 0; /* Timed -- Blindness */
159 p_ptr->paralyzed = 0; /* Timed -- Paralysis */
160 p_ptr->confused = 0; /* Timed -- Confusion */
161 p_ptr->afraid = 0; /* Timed -- Fear */
162 p_ptr->image = 0; /* Timed -- Hallucination */
163 p_ptr->poisoned = 0; /* Timed -- Poisoned */
164 p_ptr->cut = 0; /* Timed -- Cut */
165 p_ptr->stun = 0; /* Timed -- Stun */
167 p_ptr->protevil = 0; /* Timed -- Protection */
168 p_ptr->invuln = 0; /* Timed -- Invulnerable */
170 p_ptr->hero = 0; /* Timed -- Heroism */
171 p_ptr->shero = 0; /* Timed -- Super Heroism */
172 p_ptr->shield = 0; /* Timed -- Shield Spell */
173 p_ptr->blessed = 0; /* Timed -- Blessed */
174 p_ptr->tim_invis = 0; /* Timed -- Invisibility */
175 p_ptr->tim_infra = 0; /* Timed -- Infra Vision */
176 p_ptr->tim_regen = 0; /* Timed -- Regeneration */
177 p_ptr->tim_stealth = 0; /* Timed -- Stealth */
179 p_ptr->wraith_form = 0; /* Timed -- Wraith Form */
180 p_ptr->tim_levitation = 0;
181 p_ptr->tim_sh_touki = 0;
182 p_ptr->tim_sh_fire = 0;
183 p_ptr->tim_sh_holy = 0;
184 p_ptr->tim_eyeeye = 0;
185 p_ptr->resist_magic = 0;
188 p_ptr->tim_res_nether = 0;
189 p_ptr->tim_res_time = 0;
190 p_ptr->tim_mimic = 0;
191 p_ptr->mimic_form = 0;
192 p_ptr->tim_reflect = 0;
193 p_ptr->multishadow = 0;
195 p_ptr->action = ACTION_NONE;
198 p_ptr->oppose_acid = 0; /* Timed -- oppose acid */
199 p_ptr->oppose_elec = 0; /* Timed -- oppose lightning */
200 p_ptr->oppose_fire = 0; /* Timed -- oppose heat */
201 p_ptr->oppose_cold = 0; /* Timed -- oppose cold */
202 p_ptr->oppose_pois = 0; /* Timed -- oppose poison */
204 p_ptr->word_recall = 0;
205 p_ptr->alter_reality = 0;
206 p_ptr->sutemi = FALSE;
207 p_ptr->counter = FALSE;
208 p_ptr->ele_attack = 0;
209 p_ptr->ele_immune = 0;
210 p_ptr->special_attack = 0L;
211 p_ptr->special_defense = 0L;
213 while(p_ptr->energy_need < 0) p_ptr->energy_need += ENERGY_NEED();
214 world_player = FALSE;
216 if (prace_is_(RACE_DEMON) && (p_ptr->lev > 44)) p_ptr->oppose_fire = 1;
217 if ((p_ptr->pclass == CLASS_NINJA) && (p_ptr->lev > 44)) p_ptr->oppose_pois = 1;
218 if (p_ptr->pclass == CLASS_BERSERKER) p_ptr->shero = 1;
222 monster_type *m_ptr = &m_list[p_ptr->riding];
227 mproc_remove(p_ptr->riding, m_ptr->mproc_idx[MPROC_FAST], MPROC_FAST);
232 mproc_remove(p_ptr->riding, m_ptr->mproc_idx[MPROC_SLOW], MPROC_SLOW);
237 mproc_remove(p_ptr->riding, m_ptr->mproc_idx[MPROC_INVULNER], MPROC_INVULNER);
241 if (p_ptr->pclass == CLASS_BARD)
243 p_ptr->magic_num1[0] = 0;
244 p_ptr->magic_num2[0] = 0;
250 * Set "p_ptr->tim_mimic", and "p_ptr->mimic_form",
251 * notice observable changes
253 bool set_mimic(int v, int p, bool do_dec)
257 /* Hack -- Force good values */
258 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
260 if (p_ptr->is_dead) return FALSE;
265 if (p_ptr->tim_mimic && (p_ptr->mimic_form == p) && !do_dec)
267 if (p_ptr->tim_mimic > v) return FALSE;
269 else if ((!p_ptr->tim_mimic) || (p_ptr->mimic_form != p))
272 msg_print("¼«Ê¬¤ÎÂΤ¬ÊѤï¤Ã¤Æ¤æ¤¯¤Î¤ò´¶¤¸¤¿¡£");
274 msg_print("You feel that your body changes.");
284 if (p_ptr->tim_mimic)
287 msg_print("ÊѿȤ¬²ò¤±¤¿¡£");
289 msg_print("You are no longer transformed.");
291 if (p_ptr->mimic_form == MIMIC_DEMON) set_oppose_fire(0, TRUE);
299 p_ptr->tim_mimic = v;
301 /* Nothing to notice */
310 p_ptr->redraw |= (PR_BASIC | PR_STATUS);
312 /* Recalculate bonuses */
313 p_ptr->update |= (PU_BONUS | PU_HP);
322 * Set "p_ptr->blind", notice observable changes
324 * Note the use of "PU_UN_LITE" and "PU_UN_VIEW", which is needed to
325 * memorize any terrain features which suddenly become "visible".
326 * Note that blindness is currently the only thing which can affect
327 * "player_can_see_bold()".
329 bool set_blind(int v)
333 /* Hack -- Force good values */
334 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
336 if (p_ptr->is_dead) return FALSE;
343 if (p_ptr->prace == RACE_ANDROID)
346 msg_print("¥»¥ó¥µ¡¼¤ò¤ä¤é¤ì¤¿¡ª");
348 msg_print("You are blind!");
354 msg_print("Ìܤ¬¸«¤¨¤Ê¤¯¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¡ª");
356 msg_print("You are blind!");
361 chg_virtue(V_ENLIGHTEN, -1);
370 if (p_ptr->prace == RACE_ANDROID)
373 msg_print("¥»¥ó¥µ¡¼¤¬Éüµì¤·¤¿¡£");
375 msg_print("You can see again.");
381 msg_print("¤ä¤Ã¤ÈÌܤ¬¸«¤¨¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£");
383 msg_print("You can see again.");
394 /* Redraw status bar */
395 p_ptr->redraw |= (PR_STATUS);
397 /* Nothing to notice */
398 if (!notice) return (FALSE);
401 if (disturb_state) disturb(0, 0);
403 /* Fully update the visuals */
404 p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE | PU_VIEW | PU_LITE | PU_MONSTERS | PU_MON_LITE);
407 p_ptr->redraw |= (PR_MAP);
410 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
421 * Set "p_ptr->confused", notice observable changes
423 bool set_confused(int v)
427 /* Hack -- Force good values */
428 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
430 if (p_ptr->is_dead) return FALSE;
435 if (!p_ptr->confused)
438 msg_print("¤¢¤Ê¤¿¤Ïº®Í𤷤¿¡ª");
440 msg_print("You are confused!");
443 if (p_ptr->action == ACTION_LEARN)
446 msg_print("³Ø½¬¤¬Â³¤±¤é¤ì¤Ê¤¤¡ª");
448 msg_print("You cannot continue Learning!");
452 p_ptr->redraw |= (PR_STATE);
453 p_ptr->action = ACTION_NONE;
455 if (p_ptr->action == ACTION_KAMAE)
458 msg_print("¹½¤¨¤¬¤È¤±¤¿¡£");
460 msg_print("Your posture gets loose.");
462 p_ptr->special_defense &= ~(KAMAE_MASK);
463 p_ptr->update |= (PU_BONUS);
464 p_ptr->redraw |= (PR_STATE);
465 p_ptr->action = ACTION_NONE;
467 else if (p_ptr->action == ACTION_KATA)
470 msg_print("·¿¤¬Êø¤ì¤¿¡£");
472 msg_print("Your posture gets loose.");
474 p_ptr->special_defense &= ~(KATA_MASK);
475 p_ptr->update |= (PU_BONUS);
476 p_ptr->update |= (PU_MONSTERS);
477 p_ptr->redraw |= (PR_STATE);
478 p_ptr->redraw |= (PR_STATUS);
479 p_ptr->action = ACTION_NONE;
483 p_ptr->counter = FALSE;
484 chg_virtue(V_HARMONY, -1);
494 msg_print("¤ä¤Ã¤Èº®Í𤬤ª¤µ¤Þ¤Ã¤¿¡£");
496 msg_print("You feel less confused now.");
499 p_ptr->special_attack &= ~(ATTACK_SUIKEN);
507 /* Redraw status bar */
508 p_ptr->redraw |= (PR_STATUS);
510 /* Nothing to notice */
511 if (!notice) return (FALSE);
514 if (disturb_state) disturb(0, 0);
525 * Set "p_ptr->poisoned", notice observable changes
527 bool set_poisoned(int v)
531 /* Hack -- Force good values */
532 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
534 if (p_ptr->is_dead) return FALSE;
539 if (!p_ptr->poisoned)
542 msg_print("ÆǤ˿¯¤µ¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª");
544 msg_print("You are poisoned!");
557 msg_print("¤ä¤Ã¤ÈÆǤÎÄˤߤ¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
559 msg_print("You are no longer poisoned.");
569 /* Redraw status bar */
570 p_ptr->redraw |= (PR_STATUS);
572 /* Nothing to notice */
573 if (!notice) return (FALSE);
576 if (disturb_state) disturb(0, 0);
587 * Set "p_ptr->afraid", notice observable changes
589 bool set_afraid(int v)
593 /* Hack -- Force good values */
594 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
596 if (p_ptr->is_dead) return FALSE;
604 msg_print("²¿¤â¤«¤â¶²¤¯¤Ê¤Ã¤Æ¤¤¿¡ª");
606 msg_print("You are terrified!");
609 if (p_ptr->special_defense & KATA_MASK)
612 msg_print("·¿¤¬Êø¤ì¤¿¡£");
614 msg_print("Your posture gets loose.");
616 p_ptr->special_defense &= ~(KATA_MASK);
617 p_ptr->update |= (PU_BONUS);
618 p_ptr->update |= (PU_MONSTERS);
619 p_ptr->redraw |= (PR_STATE);
620 p_ptr->redraw |= (PR_STATUS);
621 p_ptr->action = ACTION_NONE;
625 p_ptr->counter = FALSE;
626 chg_virtue(V_VALOUR, -1);
636 msg_print("¤ä¤Ã¤È¶²Éݤò¿¶¤êʧ¤Ã¤¿¡£");
638 msg_print("You feel bolder now.");
648 /* Redraw status bar */
649 p_ptr->redraw |= (PR_STATUS);
651 /* Nothing to notice */
652 if (!notice) return (FALSE);
655 if (disturb_state) disturb(0, 0);
666 * Set "p_ptr->paralyzed", notice observable changes
668 bool set_paralyzed(int v)
672 /* Hack -- Force good values */
673 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
675 if (p_ptr->is_dead) return FALSE;
680 if (!p_ptr->paralyzed)
683 msg_print("ÂΤ¬Ëãá㤷¤Æ¤·¤Þ¤Ã¤¿¡ª");
685 msg_print("You are paralyzed!");
688 p_ptr->counter = FALSE;
696 if (p_ptr->paralyzed)
699 msg_print("¤ä¤Ã¤ÈÆ°¤±¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£");
701 msg_print("You can move again.");
709 p_ptr->paralyzed = v;
711 /* Redraw status bar */
712 p_ptr->redraw |= (PR_STATUS);
714 /* Nothing to notice */
715 if (!notice) return (FALSE);
718 if (disturb_state) disturb(0, 0);
720 /* Redraw the state */
721 p_ptr->redraw |= (PR_STATE);
732 * Set "p_ptr->image", notice observable changes
734 * Note that we must redraw the map when hallucination changes.
736 bool set_image(int v)
740 /* Hack -- Force good values */
741 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
743 if (p_ptr->is_dead) return FALSE;
749 set_tsuyoshi(0, TRUE);
753 msg_print("¥ï¡¼¥ª¡ª²¿¤â¤«¤âÆú¿§¤Ë¸«¤¨¤ë¡ª");
755 msg_print("Oh, wow! Everything looks so cosmic now!");
758 p_ptr->counter = FALSE;
769 msg_print("¤ä¤Ã¤È¤Ï¤Ã¤¤ê¤Èʪ¤¬¸«¤¨¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£");
771 msg_print("You can see clearly again.");
781 /* Redraw status bar */
782 p_ptr->redraw |= (PR_STATUS);
784 /* Nothing to notice */
785 if (!notice) return (FALSE);
788 if (disturb_state) disturb(0, 0);
791 p_ptr->redraw |= (PR_MAP);
793 /* Update monsters */
794 p_ptr->update |= (PU_MONSTERS);
797 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
808 * Set "p_ptr->fast", notice observable changes
810 bool set_fast(int v, bool do_dec)
814 /* Hack -- Force good values */
815 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
817 if (p_ptr->is_dead) return FALSE;
822 if (p_ptr->fast && !do_dec)
824 if (p_ptr->fast > v) return FALSE;
826 else if (!IS_FAST() && !p_ptr->lightspeed)
829 msg_print("ÁÇÁ᤯ư¤±¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡ª");
831 msg_print("You feel yourself moving much faster!");
835 chg_virtue(V_PATIENCE, -1);
836 chg_virtue(V_DILIGENCE, 1);
843 if (p_ptr->fast && !p_ptr->lightspeed && !music_singing(MUSIC_SPEED) && !music_singing(MUSIC_SHERO))
846 msg_print("Æ°¤¤ÎÁÇÁᤵ¤¬¤Ê¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£");
848 msg_print("You feel yourself slow down.");
858 /* Nothing to notice */
859 if (!notice) return (FALSE);
862 if (disturb_state) disturb(0, 0);
864 /* Recalculate bonuses */
865 p_ptr->update |= (PU_BONUS);
876 * Set "p_ptr->lightspeed", notice observable changes
878 bool set_lightspeed(int v, bool do_dec)
882 /* Hack -- Force good values */
883 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
885 if (p_ptr->is_dead) return FALSE;
890 if (p_ptr->lightspeed && !do_dec)
892 if (p_ptr->lightspeed > v) return FALSE;
894 else if (!p_ptr->lightspeed)
897 msg_print("Èó¾ï¤ËÁÇÁ᤯ư¤±¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡ª");
899 msg_print("You feel yourself moving extremely faster!");
903 chg_virtue(V_PATIENCE, -1);
904 chg_virtue(V_DILIGENCE, 1);
911 if (p_ptr->lightspeed)
914 msg_print("Æ°¤¤ÎÁÇÁᤵ¤¬¤Ê¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£");
916 msg_print("You feel yourself slow down.");
924 p_ptr->lightspeed = v;
926 /* Nothing to notice */
927 if (!notice) return (FALSE);
930 if (disturb_state) disturb(0, 0);
932 /* Recalculate bonuses */
933 p_ptr->update |= (PU_BONUS);
944 * Set "p_ptr->slow", notice observable changes
946 bool set_slow(int v, bool do_dec)
950 /* Hack -- Force good values */
951 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
953 if (p_ptr->is_dead) return FALSE;
958 if (p_ptr->slow && !do_dec)
960 if (p_ptr->slow > v) return FALSE;
962 else if (!p_ptr->slow)
965 msg_print("ÂΤÎÆ°¤¤¬ÃÙ¤¯¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¡ª");
967 msg_print("You feel yourself moving slower!");
980 msg_print("Æ°¤¤ÎÃÙ¤µ¤¬¤Ê¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£");
982 msg_print("You feel yourself speed up.");
992 /* Nothing to notice */
993 if (!notice) return (FALSE);
996 if (disturb_state) disturb(0, 0);
998 /* Recalculate bonuses */
999 p_ptr->update |= (PU_BONUS);
1010 * Set "p_ptr->shield", notice observable changes
1012 bool set_shield(int v, bool do_dec)
1014 bool notice = FALSE;
1016 /* Hack -- Force good values */
1017 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1019 if (p_ptr->is_dead) return FALSE;
1024 if (p_ptr->shield && !do_dec)
1026 if (p_ptr->shield > v) return FALSE;
1028 else if (!p_ptr->shield)
1031 msg_print("È©¤¬ÀФˤʤä¿¡£");
1033 msg_print("Your skin turns to stone.");
1046 msg_print("È©¤¬¸µ¤ËÌá¤Ã¤¿¡£");
1048 msg_print("Your skin returns to normal.");
1058 /* Redraw status bar */
1059 p_ptr->redraw |= (PR_STATUS);
1061 /* Nothing to notice */
1062 if (!notice) return (FALSE);
1065 if (disturb_state) disturb(0, 0);
1067 /* Recalculate bonuses */
1068 p_ptr->update |= (PU_BONUS);
1080 * Set "p_ptr->tsubureru", notice observable changes
1082 bool set_tsubureru(int v, bool do_dec)
1084 bool notice = FALSE;
1086 /* Hack -- Force good values */
1087 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1089 if (p_ptr->is_dead) return FALSE;
1094 if (p_ptr->tsubureru && !do_dec)
1096 if (p_ptr->tsubureru > v) return FALSE;
1098 else if (!p_ptr->tsubureru)
1101 msg_print("²£¤Ë¿¤Ó¤¿¡£");
1103 msg_print("Your body expands horizontally.");
1113 if (p_ptr->tsubureru)
1116 msg_print("¤â¤¦²£¤Ë¿¤Ó¤Æ¤¤¤Ê¤¤¡£");
1118 msg_print("Your body returns to normal.");
1126 p_ptr->tsubureru = v;
1128 /* Redraw status bar */
1129 p_ptr->redraw |= (PR_STATUS);
1131 /* Nothing to notice */
1132 if (!notice) return (FALSE);
1135 if (disturb_state) disturb(0, 0);
1137 /* Recalculate bonuses */
1138 p_ptr->update |= (PU_BONUS);
1150 * Set "p_ptr->magicdef", notice observable changes
1152 bool set_magicdef(int v, bool do_dec)
1154 bool notice = FALSE;
1156 /* Hack -- Force good values */
1157 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1159 if (p_ptr->is_dead) return FALSE;
1164 if (p_ptr->magicdef && !do_dec)
1166 if (p_ptr->magicdef > v) return FALSE;
1168 else if (!p_ptr->magicdef)
1171 msg_print("ËâË¡¤ÎËɸæÎϤ¬Áý¤·¤¿¤è¤¦¤Êµ¤¤¬¤¹¤ë¡£");
1173 msg_print("You feel more resistant to magic.");
1183 if (p_ptr->magicdef)
1186 msg_print("ËâË¡¤ÎËɸæÎϤ¬¸µ¤ËÌá¤Ã¤¿¡£");
1188 msg_print("You feel less resistant to magic.");
1196 p_ptr->magicdef = v;
1198 /* Redraw status bar */
1199 p_ptr->redraw |= (PR_STATUS);
1201 /* Nothing to notice */
1202 if (!notice) return (FALSE);
1205 if (disturb_state) disturb(0, 0);
1207 /* Recalculate bonuses */
1208 p_ptr->update |= (PU_BONUS);
1220 * Set "p_ptr->blessed", notice observable changes
1222 bool set_blessed(int v, bool do_dec)
1224 bool notice = FALSE;
1226 /* Hack -- Force good values */
1227 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1229 if (p_ptr->is_dead) return FALSE;
1234 if (p_ptr->blessed && !do_dec)
1236 if (p_ptr->blessed > v) return FALSE;
1238 else if (!IS_BLESSED())
1241 msg_print("¹â·é¤Êµ¤Ê¬¤Ë¤Ê¤Ã¤¿¡ª");
1243 msg_print("You feel righteous!");
1253 if (p_ptr->blessed && !music_singing(MUSIC_BLESS))
1256 msg_print("¹â·é¤Êµ¤Ê¬¤¬¾Ã¤¨¼º¤»¤¿¡£");
1258 msg_print("The prayer has expired.");
1268 /* Redraw status bar */
1269 p_ptr->redraw |= (PR_STATUS);
1271 /* Nothing to notice */
1272 if (!notice) return (FALSE);
1275 if (disturb_state) disturb(0, 0);
1277 /* Recalculate bonuses */
1278 p_ptr->update |= (PU_BONUS);
1289 * Set "p_ptr->hero", notice observable changes
1291 bool set_hero(int v, bool do_dec)
1293 bool notice = FALSE;
1295 /* Hack -- Force good values */
1296 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1298 if (p_ptr->is_dead) return FALSE;
1303 if (p_ptr->hero && !do_dec)
1305 if (p_ptr->hero > v) return FALSE;
1307 else if (!IS_HERO())
1310 msg_print("¥Ò¡¼¥í¡¼¤Ë¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡ª");
1312 msg_print("You feel like a hero!");
1322 if (p_ptr->hero && !music_singing(MUSIC_HERO) && !music_singing(MUSIC_SHERO))
1325 msg_print("¥Ò¡¼¥í¡¼¤Îµ¤Ê¬¤¬¾Ã¤¨¼º¤»¤¿¡£");
1327 msg_print("The heroism wears off.");
1337 /* Redraw status bar */
1338 p_ptr->redraw |= (PR_STATUS);
1340 /* Nothing to notice */
1341 if (!notice) return (FALSE);
1344 if (disturb_state) disturb(0, 0);
1346 /* Recalculate bonuses */
1347 p_ptr->update |= (PU_BONUS);
1349 /* Recalculate hitpoints */
1350 p_ptr->update |= (PU_HP);
1361 * Set "p_ptr->shero", notice observable changes
1363 bool set_shero(int v, bool do_dec)
1365 bool notice = FALSE;
1367 /* Hack -- Force good values */
1368 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1370 if (p_ptr->is_dead) return FALSE;
1372 if (p_ptr->pclass == CLASS_BERSERKER) v = 1;
1376 if (p_ptr->shero && !do_dec)
1378 if (p_ptr->shero > v) return FALSE;
1380 else if (!p_ptr->shero)
1383 msg_print("»¦Ù¤¥Þ¥·¡¼¥ó¤Ë¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡ª");
1385 msg_print("You feel like a killing machine!");
1398 msg_print("ÌîÈڤʵ¤»ý¤Á¤¬¾Ã¤¨¼º¤»¤¿¡£");
1400 msg_print("You feel less Berserk.");
1410 /* Redraw status bar */
1411 p_ptr->redraw |= (PR_STATUS);
1413 /* Nothing to notice */
1414 if (!notice) return (FALSE);
1417 if (disturb_state) disturb(0, 0);
1419 /* Recalculate bonuses */
1420 p_ptr->update |= (PU_BONUS);
1422 /* Recalculate hitpoints */
1423 p_ptr->update |= (PU_HP);
1434 * Set "p_ptr->protevil", notice observable changes
1436 bool set_protevil(int v, bool do_dec)
1438 bool notice = FALSE;
1440 /* Hack -- Force good values */
1441 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1443 if (p_ptr->is_dead) return FALSE;
1448 if (p_ptr->protevil && !do_dec)
1450 if (p_ptr->protevil > v) return FALSE;
1452 else if (!p_ptr->protevil)
1455 msg_print("¼Ù°¤Ê¤ë¸ºß¤«¤é¼é¤é¤ì¤Æ¤¤¤ë¤è¤¦¤Ê´¶¤¸¤¬¤¹¤ë¡ª");
1457 msg_print("You feel safe from evil!");
1467 if (p_ptr->protevil)
1470 msg_print("¼Ù°¤Ê¤ë¸ºß¤«¤é¼é¤é¤ì¤Æ¤¤¤ë´¶¤¸¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
1472 msg_print("You no longer feel safe from evil.");
1480 p_ptr->protevil = v;
1482 /* Redraw status bar */
1483 p_ptr->redraw |= (PR_STATUS);
1485 /* Nothing to notice */
1486 if (!notice) return (FALSE);
1489 if (disturb_state) disturb(0, 0);
1499 * Set "p_ptr->wraith_form", notice observable changes
1501 bool set_wraith_form(int v, bool do_dec)
1503 bool notice = FALSE;
1505 /* Hack -- Force good values */
1506 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1508 if (p_ptr->is_dead) return FALSE;
1513 if (p_ptr->wraith_form && !do_dec)
1515 if (p_ptr->wraith_form > v) return FALSE;
1517 else if (!p_ptr->wraith_form)
1520 msg_print("ʪ¼Á³¦¤òÎ¥¤ì¤ÆÍ©µ´¤Î¤è¤¦¤Ê¸ºß¤Ë¤Ê¤Ã¤¿¡ª");
1522 msg_print("You leave the physical world and turn into a wraith-being!");
1527 chg_virtue(V_UNLIFE, 3);
1528 chg_virtue(V_HONOUR, -2);
1529 chg_virtue(V_SACRIFICE, -2);
1530 chg_virtue(V_VALOUR, -5);
1533 p_ptr->redraw |= (PR_MAP);
1535 /* Update monsters */
1536 p_ptr->update |= (PU_MONSTERS);
1539 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1546 if (p_ptr->wraith_form)
1549 msg_print("ÉÔÆ©ÌÀ¤Ë¤Ê¤Ã¤¿´¶¤¸¤¬¤¹¤ë¡£");
1551 msg_print("You feel opaque.");
1557 p_ptr->redraw |= (PR_MAP);
1559 /* Update monsters */
1560 p_ptr->update |= (PU_MONSTERS);
1563 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1568 p_ptr->wraith_form = v;
1570 /* Redraw status bar */
1571 p_ptr->redraw |= (PR_STATUS);
1573 /* Nothing to notice */
1574 if (!notice) return (FALSE);
1577 if (disturb_state) disturb(0, 0);
1579 /* Recalculate bonuses */
1580 p_ptr->update |= (PU_BONUS);
1592 * Set "p_ptr->invuln", notice observable changes
1594 bool set_invuln(int v, bool do_dec)
1596 bool notice = FALSE;
1598 /* Hack -- Force good values */
1599 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1601 if (p_ptr->is_dead) return FALSE;
1606 if (p_ptr->invuln && !do_dec)
1608 if (p_ptr->invuln > v) return FALSE;
1610 else if (!IS_INVULN())
1613 msg_print("̵Ũ¤À¡ª");
1615 msg_print("Invulnerability!");
1620 chg_virtue(V_UNLIFE, -2);
1621 chg_virtue(V_HONOUR, -2);
1622 chg_virtue(V_SACRIFICE, -3);
1623 chg_virtue(V_VALOUR, -5);
1626 p_ptr->redraw |= (PR_MAP);
1628 /* Update monsters */
1629 p_ptr->update |= (PU_MONSTERS);
1632 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1639 if (p_ptr->invuln && !music_singing(MUSIC_INVULN))
1642 msg_print("̵Ũ¤Ç¤Ï¤Ê¤¯¤Ê¤Ã¤¿¡£");
1644 msg_print("The invulnerability wears off.");
1650 p_ptr->redraw |= (PR_MAP);
1652 /* Update monsters */
1653 p_ptr->update |= (PU_MONSTERS);
1656 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1658 p_ptr->energy_need += ENERGY_NEED();
1665 /* Redraw status bar */
1666 p_ptr->redraw |= (PR_STATUS);
1668 /* Nothing to notice */
1669 if (!notice) return (FALSE);
1672 if (disturb_state) disturb(0, 0);
1674 /* Recalculate bonuses */
1675 p_ptr->update |= (PU_BONUS);
1686 * Set "p_ptr->tim_esp", notice observable changes
1688 bool set_tim_esp(int v, bool do_dec)
1690 bool notice = FALSE;
1692 /* Hack -- Force good values */
1693 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1695 if (p_ptr->is_dead) return FALSE;
1700 if (p_ptr->tim_esp && !do_dec)
1702 if (p_ptr->tim_esp > v) return FALSE;
1704 else if (!IS_TIM_ESP())
1707 msg_print("°Õ¼±¤¬¹¤¬¤Ã¤¿µ¤¤¬¤¹¤ë¡ª");
1709 msg_print("You feel your consciousness expand!");
1719 if (p_ptr->tim_esp && !music_singing(MUSIC_MIND))
1722 msg_print("°Õ¼±¤Ï¸µ¤ËÌá¤Ã¤¿¡£");
1724 msg_print("Your consciousness contracts again.");
1734 /* Redraw status bar */
1735 p_ptr->redraw |= (PR_STATUS);
1737 /* Nothing to notice */
1738 if (!notice) return (FALSE);
1741 if (disturb_state) disturb(0, 0);
1743 /* Recalculate bonuses */
1744 p_ptr->update |= (PU_BONUS);
1746 /* Update the monsters */
1747 p_ptr->update |= (PU_MONSTERS);
1758 * Set "p_ptr->tim_invis", notice observable changes
1760 bool set_tim_invis(int v, bool do_dec)
1762 bool notice = FALSE;
1764 /* Hack -- Force good values */
1765 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1767 if (p_ptr->is_dead) return FALSE;
1772 if (p_ptr->tim_invis && !do_dec)
1774 if (p_ptr->tim_invis > v) return FALSE;
1776 else if (!p_ptr->tim_invis)
1779 msg_print("Ìܤ¬Èó¾ï¤ËÉÒ´¶¤Ë¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡ª");
1781 msg_print("Your eyes feel very sensitive!");
1791 if (p_ptr->tim_invis)
1794 msg_print("ÌܤÎÉÒ´¶¤µ¤¬¤Ê¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£");
1796 msg_print("Your eyes feel less sensitive.");
1804 p_ptr->tim_invis = v;
1806 /* Redraw status bar */
1807 p_ptr->redraw |= (PR_STATUS);
1809 /* Nothing to notice */
1810 if (!notice) return (FALSE);
1813 if (disturb_state) disturb(0, 0);
1815 /* Recalculate bonuses */
1816 p_ptr->update |= (PU_BONUS);
1818 /* Update the monsters */
1819 p_ptr->update |= (PU_MONSTERS);
1830 * Set "p_ptr->tim_infra", notice observable changes
1832 bool set_tim_infra(int v, bool do_dec)
1834 bool notice = FALSE;
1836 /* Hack -- Force good values */
1837 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1839 if (p_ptr->is_dead) return FALSE;
1844 if (p_ptr->tim_infra && !do_dec)
1846 if (p_ptr->tim_infra > v) return FALSE;
1848 else if (!p_ptr->tim_infra)
1851 msg_print("Ìܤ¬¥é¥ó¥é¥ó¤Èµ±¤»Ï¤á¤¿¡ª");
1853 msg_print("Your eyes begin to tingle!");
1863 if (p_ptr->tim_infra)
1866 msg_print("Ìܤ層¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
1868 msg_print("Your eyes stop tingling.");
1876 p_ptr->tim_infra = v;
1878 /* Redraw status bar */
1879 p_ptr->redraw |= (PR_STATUS);
1881 /* Nothing to notice */
1882 if (!notice) return (FALSE);
1885 if (disturb_state) disturb(0, 0);
1887 /* Recalculate bonuses */
1888 p_ptr->update |= (PU_BONUS);
1890 /* Update the monsters */
1891 p_ptr->update |= (PU_MONSTERS);
1902 * Set "p_ptr->tim_regen", notice observable changes
1904 bool set_tim_regen(int v, bool do_dec)
1906 bool notice = FALSE;
1908 /* Hack -- Force good values */
1909 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1911 if (p_ptr->is_dead) return FALSE;
1916 if (p_ptr->tim_regen && !do_dec)
1918 if (p_ptr->tim_regen > v) return FALSE;
1920 else if (!p_ptr->tim_regen)
1923 msg_print("²óÉüÎϤ¬¾å¤¬¤Ã¤¿¡ª");
1925 msg_print("You feel yourself regenerating quickly!");
1935 if (p_ptr->tim_regen)
1938 msg_print("ÁÇÁ᤯²óÉü¤¹¤ë´¶¤¸¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
1940 msg_print("You feel yourself regenerating slowly.");
1948 p_ptr->tim_regen = v;
1950 /* Redraw status bar */
1951 p_ptr->redraw |= (PR_STATUS);
1953 /* Nothing to notice */
1954 if (!notice) return (FALSE);
1957 if (disturb_state) disturb(0, 0);
1959 /* Recalculate bonuses */
1960 p_ptr->update |= (PU_BONUS);
1971 * Set "p_ptr->tim_stealth", notice observable changes
1973 bool set_tim_stealth(int v, bool do_dec)
1975 bool notice = FALSE;
1977 /* Hack -- Force good values */
1978 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1980 if (p_ptr->is_dead) return FALSE;
1985 if (p_ptr->tim_stealth && !do_dec)
1987 if (p_ptr->tim_stealth > v) return FALSE;
1989 else if (!IS_TIM_STEALTH())
1992 msg_print("²»¤¬¾®¤µ¤¯¤Ê¤Ã¤¿¡ª");
1994 msg_print("You begin to walk silently!");
2004 if (p_ptr->tim_stealth && !music_singing(MUSIC_STEALTH))
2007 msg_print("²»¤¬Â礤¯¤Ê¤Ã¤¿¡£");
2009 msg_print("You no longer walk silently.");
2017 p_ptr->tim_stealth = v;
2019 /* Redraw status bar */
2020 p_ptr->redraw |= (PR_STATUS);
2022 /* Nothing to notice */
2023 if (!notice) return (FALSE);
2026 if (disturb_state) disturb(0, 0);
2028 /* Recalculate bonuses */
2029 p_ptr->update |= (PU_BONUS);
2039 bool set_superstealth(bool set)
2041 bool notice = FALSE;
2043 if (p_ptr->is_dead) return FALSE;
2048 if (!(p_ptr->special_defense & NINJA_S_STEALTH))
2050 if (cave[py][px].info & CAVE_MNLT)
2053 msg_print("Ũ¤ÎÌܤ«¤éÇö¤¤±Æ¤ÎÃæ¤Ëʤ¤¤±£¤µ¤ì¤¿¡£");
2055 msg_print("You are mantled in weak shadow from ordinary eyes.");
2057 p_ptr->monlite = p_ptr->old_monlite = TRUE;
2062 msg_print("Ũ¤ÎÌܤ«¤é±Æ¤ÎÃæ¤Ëʤ¤¤±£¤µ¤ì¤¿¡ª");
2064 msg_print("You are mantled in shadow from ordinary eyes!");
2066 p_ptr->monlite = p_ptr->old_monlite = FALSE;
2072 p_ptr->special_defense |= NINJA_S_STEALTH;
2079 if (p_ptr->special_defense & NINJA_S_STEALTH)
2082 msg_print("ºÆ¤ÓŨ¤ÎÌܤˤµ¤é¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£");
2084 msg_print("You are exposed to common sight once more.");
2090 p_ptr->special_defense &= ~(NINJA_S_STEALTH);
2094 /* Nothing to notice */
2095 if (!notice) return (FALSE);
2097 /* Redraw status bar */
2098 p_ptr->redraw |= (PR_STATUS);
2101 if (disturb_state) disturb(0, 0);
2109 * Set "p_ptr->tim_levitation", notice observable changes
2111 bool set_tim_levitation(int v, bool do_dec)
2113 bool notice = FALSE;
2115 /* Hack -- Force good values */
2116 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2118 if (p_ptr->is_dead) return FALSE;
2123 if (p_ptr->tim_levitation && !do_dec)
2125 if (p_ptr->tim_levitation > v) return FALSE;
2127 else if (!p_ptr->tim_levitation)
2130 msg_print("ÂΤ¬Ãè¤ËÉ⤻Ϥ᤿¡£");
2132 msg_print("You begin to fly!");
2142 if (p_ptr->tim_levitation)
2145 msg_print("¤â¤¦Ãè¤ËÉ⤫¤Ù¤Ê¤¯¤Ê¤Ã¤¿¡£");
2147 msg_print("You stop flying.");
2155 p_ptr->tim_levitation = v;
2157 /* Redraw status bar */
2158 p_ptr->redraw |= (PR_STATUS);
2160 /* Nothing to notice */
2161 if (!notice) return (FALSE);
2164 if (disturb_state) disturb(0, 0);
2166 /* Recalculate bonuses */
2167 p_ptr->update |= (PU_BONUS);
2178 * Set "p_ptr->tim_sh_touki", notice observable changes
2180 bool set_tim_sh_touki(int v, bool do_dec)
2182 bool notice = FALSE;
2184 /* Hack -- Force good values */
2185 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2187 if (p_ptr->is_dead) return FALSE;
2192 if (p_ptr->tim_sh_touki && !do_dec)
2194 if (p_ptr->tim_sh_touki > v) return FALSE;
2196 else if (!p_ptr->tim_sh_touki)
2199 msg_print("ÂΤ¬Æ®µ¤¤Î¥ª¡¼¥é¤Çʤ¤ï¤ì¤¿¡£");
2201 msg_print("You have enveloped by the aura of the Force!");
2211 if (p_ptr->tim_sh_touki)
2214 msg_print("Æ®µ¤¤¬¾Ã¤¨¤¿¡£");
2216 msg_print("Aura of the Force disappeared.");
2224 p_ptr->tim_sh_touki = v;
2226 /* Redraw status bar */
2227 p_ptr->redraw |= (PR_STATUS);
2229 /* Nothing to notice */
2230 if (!notice) return (FALSE);
2233 if (disturb_state) disturb(0, 0);
2244 * Set "p_ptr->tim_sh_fire", notice observable changes
2246 bool set_tim_sh_fire(int v, bool do_dec)
2248 bool notice = FALSE;
2250 /* Hack -- Force good values */
2251 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2253 if (p_ptr->is_dead) return FALSE;
2258 if (p_ptr->tim_sh_fire && !do_dec)
2260 if (p_ptr->tim_sh_fire > v) return FALSE;
2262 else if (!p_ptr->tim_sh_fire)
2265 msg_print("ÂΤ¬±ê¤Î¥ª¡¼¥é¤Çʤ¤ï¤ì¤¿¡£");
2267 msg_print("You have enveloped by fiery aura!");
2277 if (p_ptr->tim_sh_fire)
2280 msg_print("±ê¤Î¥ª¡¼¥é¤¬¾Ã¤¨¤¿¡£");
2282 msg_print("Fiery aura disappeared.");
2290 p_ptr->tim_sh_fire = v;
2292 /* Redraw status bar */
2293 p_ptr->redraw |= (PR_STATUS);
2295 /* Nothing to notice */
2296 if (!notice) return (FALSE);
2299 if (disturb_state) disturb(0, 0);
2301 /* Recalculate bonuses */
2302 p_ptr->update |= (PU_BONUS);
2313 * Set "p_ptr->tim_sh_holy", notice observable changes
2315 bool set_tim_sh_holy(int v, bool do_dec)
2317 bool notice = FALSE;
2319 /* Hack -- Force good values */
2320 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2322 if (p_ptr->is_dead) return FALSE;
2327 if (p_ptr->tim_sh_holy && !do_dec)
2329 if (p_ptr->tim_sh_holy > v) return FALSE;
2331 else if (!p_ptr->tim_sh_holy)
2334 msg_print("ÂΤ¬À»¤Ê¤ë¥ª¡¼¥é¤Çʤ¤ï¤ì¤¿¡£");
2336 msg_print("You have enveloped by holy aura!");
2346 if (p_ptr->tim_sh_holy)
2349 msg_print("À»¤Ê¤ë¥ª¡¼¥é¤¬¾Ã¤¨¤¿¡£");
2351 msg_print("Holy aura disappeared.");
2359 p_ptr->tim_sh_holy = v;
2361 /* Redraw status bar */
2362 p_ptr->redraw |= (PR_STATUS);
2364 /* Nothing to notice */
2365 if (!notice) return (FALSE);
2368 if (disturb_state) disturb(0, 0);
2370 /* Recalculate bonuses */
2371 p_ptr->update |= (PU_BONUS);
2383 * Set "p_ptr->tim_eyeeye", notice observable changes
2385 bool set_tim_eyeeye(int v, bool do_dec)
2387 bool notice = FALSE;
2389 /* Hack -- Force good values */
2390 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2392 if (p_ptr->is_dead) return FALSE;
2397 if (p_ptr->tim_eyeeye && !do_dec)
2399 if (p_ptr->tim_eyeeye > v) return FALSE;
2401 else if (!p_ptr->tim_eyeeye)
2404 msg_print("Ë¡¤Î¼é¤ê¼ê¤Ë¤Ê¤Ã¤¿µ¤¤¬¤·¤¿¡ª");
2406 msg_print("You feel like a keeper of commandments!");
2416 if (p_ptr->tim_eyeeye)
2419 msg_print("Ĩȳ¤ò¼¹¹Ô¤¹¤ë¤³¤È¤¬¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2421 msg_print("You no longer feel like a keeper.");
2429 p_ptr->tim_eyeeye = v;
2431 /* Redraw status bar */
2432 p_ptr->redraw |= (PR_STATUS);
2434 /* Nothing to notice */
2435 if (!notice) return (FALSE);
2438 if (disturb_state) disturb(0, 0);
2440 /* Recalculate bonuses */
2441 p_ptr->update |= (PU_BONUS);
2453 * Set "p_ptr->resist_magic", notice observable changes
2455 bool set_resist_magic(int v, bool do_dec)
2457 bool notice = FALSE;
2459 /* Hack -- Force good values */
2460 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2462 if (p_ptr->is_dead) return FALSE;
2467 if (p_ptr->resist_magic && !do_dec)
2469 if (p_ptr->resist_magic > v) return FALSE;
2471 else if (!p_ptr->resist_magic)
2474 msg_print("ËâË¡¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿¡£");
2476 msg_print("You have been protected from magic!");
2486 if (p_ptr->resist_magic)
2489 msg_print("ËâË¡¤Ë¼å¤¯¤Ê¤Ã¤¿¡£");
2491 msg_print("You are no longer protected from magic.");
2499 p_ptr->resist_magic = v;
2501 /* Redraw status bar */
2502 p_ptr->redraw |= (PR_STATUS);
2504 /* Nothing to notice */
2505 if (!notice) return (FALSE);
2508 if (disturb_state) disturb(0, 0);
2510 /* Recalculate bonuses */
2511 p_ptr->update |= (PU_BONUS);
2522 * Set "p_ptr->tim_reflect", notice observable changes
2524 bool set_tim_reflect(int v, bool do_dec)
2526 bool notice = FALSE;
2528 /* Hack -- Force good values */
2529 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2531 if (p_ptr->is_dead) return FALSE;
2536 if (p_ptr->tim_reflect && !do_dec)
2538 if (p_ptr->tim_reflect > v) return FALSE;
2540 else if (!p_ptr->tim_reflect)
2543 msg_print("ÂΤÎɽÌ̤¬³ê¤«¤Ë¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£");
2545 msg_print("Your body becames smooth.");
2555 if (p_ptr->tim_reflect)
2558 msg_print("ÂΤÎɽÌ̤¬³ê¤«¤Ç¤Ê¤¯¤Ê¤Ã¤¿¡£");
2560 msg_print("Your body is no longer smooth.");
2568 p_ptr->tim_reflect = v;
2570 /* Redraw status bar */
2571 p_ptr->redraw |= (PR_STATUS);
2573 /* Nothing to notice */
2574 if (!notice) return (FALSE);
2577 if (disturb_state) disturb(0, 0);
2579 /* Recalculate bonuses */
2580 p_ptr->update |= (PU_BONUS);
2591 * Set "p_ptr->multishadow", notice observable changes
2593 bool set_multishadow(int v, bool do_dec)
2595 bool notice = FALSE;
2597 /* Hack -- Force good values */
2598 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2600 if (p_ptr->is_dead) return FALSE;
2605 if (p_ptr->multishadow && !do_dec)
2607 if (p_ptr->multishadow > v) return FALSE;
2609 else if (!p_ptr->multishadow)
2612 msg_print("¤¢¤Ê¤¿¤Î¼þ¤ê¤Ë¸¸±Æ¤¬À¸¤Þ¤ì¤¿¡£");
2614 msg_print("Your Shadow enveloped you.");
2624 if (p_ptr->multishadow)
2627 msg_print("¸¸±Æ¤¬¾Ã¤¨¤¿¡£");
2629 msg_print("Your Shadow disappears.");
2637 p_ptr->multishadow = v;
2639 /* Redraw status bar */
2640 p_ptr->redraw |= (PR_STATUS);
2642 /* Nothing to notice */
2643 if (!notice) return (FALSE);
2646 if (disturb_state) disturb(0, 0);
2648 /* Recalculate bonuses */
2649 p_ptr->update |= (PU_BONUS);
2660 * Set "p_ptr->dustrobe", notice observable changes
2662 bool set_dustrobe(int v, bool do_dec)
2664 bool notice = FALSE;
2666 /* Hack -- Force good values */
2667 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2669 if (p_ptr->is_dead) return FALSE;
2674 if (p_ptr->dustrobe && !do_dec)
2676 if (p_ptr->dustrobe > v) return FALSE;
2678 else if (!p_ptr->dustrobe)
2681 msg_print("ÂΤ¬¶À¤Î¥ª¡¼¥é¤Çʤ¤ï¤ì¤¿¡£");
2683 msg_print("You were enveloped by mirror shards.");
2693 if (p_ptr->dustrobe)
2696 msg_print("¶À¤Î¥ª¡¼¥é¤¬¾Ã¤¨¤¿¡£");
2698 msg_print("The mirror shards disappear.");
2706 p_ptr->dustrobe = v;
2708 /* Redraw status bar */
2709 p_ptr->redraw |= (PR_STATUS);
2711 /* Nothing to notice */
2712 if (!notice) return (FALSE);
2715 if (disturb_state) disturb(0, 0);
2717 /* Recalculate bonuses */
2718 p_ptr->update |= (PU_BONUS);
2729 * Set "p_ptr->tim_regen", notice observable changes
2731 bool set_kabenuke(int v, bool do_dec)
2733 bool notice = FALSE;
2735 /* Hack -- Force good values */
2736 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2738 if (p_ptr->is_dead) return FALSE;
2743 if (p_ptr->kabenuke && !do_dec)
2745 if (p_ptr->kabenuke > v) return FALSE;
2747 else if (!p_ptr->kabenuke)
2750 msg_print("ÂΤ¬È¾Êª¼Á¤Î¾õÂ֤ˤʤä¿¡£");
2752 msg_print("You became ethereal form.");
2762 if (p_ptr->kabenuke)
2765 msg_print("ÂΤ¬Êª¼Á²½¤·¤¿¡£");
2767 msg_print("You are no longer in an ethereal form.");
2775 p_ptr->kabenuke = v;
2777 /* Redraw status bar */
2778 p_ptr->redraw |= (PR_STATUS);
2780 /* Nothing to notice */
2781 if (!notice) return (FALSE);
2784 if (disturb_state) disturb(0, 0);
2786 /* Recalculate bonuses */
2787 p_ptr->update |= (PU_BONUS);
2797 bool set_tsuyoshi(int v, bool do_dec)
2799 bool notice = FALSE;
2801 /* Hack -- Force good values */
2802 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2804 if (p_ptr->is_dead) return FALSE;
2809 if (p_ptr->tsuyoshi && !do_dec)
2811 if (p_ptr->tsuyoshi > v) return FALSE;
2813 else if (!p_ptr->tsuyoshi)
2816 msg_print("¡Ö¥ª¥¯¥ì·»¤µ¤ó¡ª¡×");
2818 msg_print("Brother OKURE!");
2822 chg_virtue(V_VITALITY, 2);
2829 if (p_ptr->tsuyoshi)
2832 msg_print("ÆùÂΤ¬µÞ®¤Ë¤·¤Ü¤ó¤Ç¤¤¤Ã¤¿¡£");
2834 msg_print("Your body had quickly shriveled.");
2837 (void)dec_stat(A_CON, 20, TRUE);
2838 (void)dec_stat(A_STR, 20, TRUE);
2841 chg_virtue(V_VITALITY, -3);
2846 p_ptr->tsuyoshi = v;
2848 /* Redraw status bar */
2849 p_ptr->redraw |= (PR_STATUS);
2851 /* Nothing to notice */
2852 if (!notice) return (FALSE);
2855 if (disturb_state) disturb(0, 0);
2857 /* Recalculate bonuses */
2858 p_ptr->update |= (PU_BONUS);
2860 /* Recalculate hitpoints */
2861 p_ptr->update |= (PU_HP);
2872 * Set a temporary elemental brand. Clear all other brands. Print status
2875 bool set_ele_attack(u32b attack_type, int v)
2877 /* Hack -- Force good values */
2878 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2880 /* Clear all elemental attacks (only one is allowed at a time). */
2881 if ((p_ptr->special_attack & (ATTACK_ACID)) && (attack_type != ATTACK_ACID))
2883 p_ptr->special_attack &= ~(ATTACK_ACID);
2885 msg_print("»À¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2887 msg_print("Your temporary acidic brand fades away.");
2890 if ((p_ptr->special_attack & (ATTACK_ELEC)) && (attack_type != ATTACK_ELEC))
2892 p_ptr->special_attack &= ~(ATTACK_ELEC);
2894 msg_print("ÅÅ·â¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2896 msg_print("Your temporary electrical brand fades away.");
2899 if ((p_ptr->special_attack & (ATTACK_FIRE)) && (attack_type != ATTACK_FIRE))
2901 p_ptr->special_attack &= ~(ATTACK_FIRE);
2903 msg_print("²Ð±ê¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2905 msg_print("Your temporary fiery brand fades away.");
2908 if ((p_ptr->special_attack & (ATTACK_COLD)) && (attack_type != ATTACK_COLD))
2910 p_ptr->special_attack &= ~(ATTACK_COLD);
2912 msg_print("Î䵤¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2914 msg_print("Your temporary frost brand fades away.");
2917 if ((p_ptr->special_attack & (ATTACK_POIS)) && (attack_type != ATTACK_POIS))
2919 p_ptr->special_attack &= ~(ATTACK_POIS);
2921 msg_print("ÆǤǹ¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2923 msg_print("Your temporary poison brand fades away.");
2927 if ((v) && (attack_type))
2929 /* Set attack type. */
2930 p_ptr->special_attack |= (attack_type);
2933 p_ptr->ele_attack = v;
2937 msg_format("%s¤Ç¹¶·â¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡ª",
2938 ((attack_type == ATTACK_ACID) ? "»À" :
2939 ((attack_type == ATTACK_ELEC) ? "ÅÅ·â" :
2940 ((attack_type == ATTACK_FIRE) ? "²Ð±ê" :
2941 ((attack_type == ATTACK_COLD) ? "Î䵤" :
2942 ((attack_type == ATTACK_POIS) ? "ÆÇ" :
2945 msg_format("For a while, the blows you deal will %s",
2946 ((attack_type == ATTACK_ACID) ? "melt with acid!" :
2947 ((attack_type == ATTACK_ELEC) ? "shock your foes!" :
2948 ((attack_type == ATTACK_FIRE) ? "burn with fire!" :
2949 ((attack_type == ATTACK_COLD) ? "chill to the bone!" :
2950 ((attack_type == ATTACK_POIS) ? "poison your enemies!" :
2951 "do nothing special."))))));
2956 if (disturb_state) disturb(0, 0);
2958 /* Redraw status bar */
2959 p_ptr->redraw |= (PR_STATUS);
2961 p_ptr->update |= (PU_BONUS);
2971 * Set a temporary elemental brand. Clear all other brands. Print status
2974 bool set_ele_immune(u32b immune_type, int v)
2976 /* Hack -- Force good values */
2977 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2979 /* Clear all elemental attacks (only one is allowed at a time). */
2980 if ((p_ptr->special_defense & (DEFENSE_ACID)) && (immune_type != DEFENSE_ACID))
2982 p_ptr->special_defense &= ~(DEFENSE_ACID);
2984 msg_print("»À¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
2986 msg_print("You are no longer immune to acid.");
2989 if ((p_ptr->special_defense & (DEFENSE_ELEC)) && (immune_type != DEFENSE_ELEC))
2991 p_ptr->special_defense &= ~(DEFENSE_ELEC);
2993 msg_print("ÅÅ·â¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
2995 msg_print("You are no longer immune to electricity.");
2998 if ((p_ptr->special_defense & (DEFENSE_FIRE)) && (immune_type != DEFENSE_FIRE))
3000 p_ptr->special_defense &= ~(DEFENSE_FIRE);
3002 msg_print("²Ð±ê¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3004 msg_print("You are no longer immune to fire.");
3007 if ((p_ptr->special_defense & (DEFENSE_COLD)) && (immune_type != DEFENSE_COLD))
3009 p_ptr->special_defense &= ~(DEFENSE_COLD);
3011 msg_print("Î䵤¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3013 msg_print("You are no longer immune to cold.");
3016 if ((p_ptr->special_defense & (DEFENSE_POIS)) && (immune_type != DEFENSE_POIS))
3018 p_ptr->special_defense &= ~(DEFENSE_POIS);
3020 msg_print("ÆǤι¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3022 msg_print("You are no longer immune to poison.");
3026 if ((v) && (immune_type))
3028 /* Set attack type. */
3029 p_ptr->special_defense |= (immune_type);
3032 p_ptr->ele_immune = v;
3036 msg_format("%s¤Î¹¶·â¤ò¼õ¤±¤Ä¤±¤Ê¤¯¤Ê¤Ã¤¿¡ª",
3037 ((immune_type == DEFENSE_ACID) ? "»À" :
3038 ((immune_type == DEFENSE_ELEC) ? "ÅÅ·â" :
3039 ((immune_type == DEFENSE_FIRE) ? "²Ð±ê" :
3040 ((immune_type == DEFENSE_COLD) ? "Î䵤" :
3041 ((immune_type == DEFENSE_POIS) ? "ÆÇ" :
3044 msg_format("For a while, You are immune to %s",
3045 ((immune_type == DEFENSE_ACID) ? "acid!" :
3046 ((immune_type == DEFENSE_ELEC) ? "electricity!" :
3047 ((immune_type == DEFENSE_FIRE) ? "fire!" :
3048 ((immune_type == DEFENSE_COLD) ? "cold!" :
3049 ((immune_type == DEFENSE_POIS) ? "poison!" :
3050 "do nothing special."))))));
3055 if (disturb_state) disturb(0, 0);
3057 /* Redraw status bar */
3058 p_ptr->redraw |= (PR_STATUS);
3060 p_ptr->update |= (PU_BONUS);
3070 * Set "p_ptr->oppose_acid", notice observable changes
3072 bool set_oppose_acid(int v, bool do_dec)
3074 bool notice = FALSE;
3076 /* Hack -- Force good values */
3077 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3079 if (p_ptr->is_dead) return FALSE;
3084 if (p_ptr->oppose_acid && !do_dec)
3086 if (p_ptr->oppose_acid > v) return FALSE;
3088 else if (!IS_OPPOSE_ACID())
3091 msg_print("»À¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3093 msg_print("You feel resistant to acid!");
3103 if (p_ptr->oppose_acid && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3106 msg_print("»À¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3108 msg_print("You feel less resistant to acid.");
3116 p_ptr->oppose_acid = v;
3118 /* Nothing to notice */
3119 if (!notice) return (FALSE);
3121 /* Redraw status bar */
3122 p_ptr->redraw |= (PR_STATUS);
3125 if (disturb_state) disturb(0, 0);
3136 * Set "p_ptr->oppose_elec", notice observable changes
3138 bool set_oppose_elec(int v, bool do_dec)
3140 bool notice = FALSE;
3142 /* Hack -- Force good values */
3143 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3145 if (p_ptr->is_dead) return FALSE;
3150 if (p_ptr->oppose_elec && !do_dec)
3152 if (p_ptr->oppose_elec > v) return FALSE;
3154 else if (!IS_OPPOSE_ELEC())
3157 msg_print("ÅÅ·â¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3159 msg_print("You feel resistant to electricity!");
3169 if (p_ptr->oppose_elec && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3172 msg_print("ÅÅ·â¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3174 msg_print("You feel less resistant to electricity.");
3182 p_ptr->oppose_elec = v;
3184 /* Nothing to notice */
3185 if (!notice) return (FALSE);
3187 /* Redraw status bar */
3188 p_ptr->redraw |= (PR_STATUS);
3191 if (disturb_state) disturb(0, 0);
3202 * Set "p_ptr->oppose_fire", notice observable changes
3204 bool set_oppose_fire(int v, bool do_dec)
3206 bool notice = FALSE;
3208 /* Hack -- Force good values */
3209 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3211 if (p_ptr->is_dead) return FALSE;
3213 if ((prace_is_(RACE_DEMON) && (p_ptr->lev > 44)) || (p_ptr->mimic_form == MIMIC_DEMON)) v = 1;
3217 if (p_ptr->oppose_fire && !do_dec)
3219 if (p_ptr->oppose_fire > v) return FALSE;
3221 else if (!IS_OPPOSE_FIRE())
3224 msg_print("²Ð¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3226 msg_print("You feel resistant to fire!");
3236 if (p_ptr->oppose_fire && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3239 msg_print("²Ð¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3241 msg_print("You feel less resistant to fire.");
3249 p_ptr->oppose_fire = v;
3251 /* Nothing to notice */
3252 if (!notice) return (FALSE);
3254 /* Redraw status bar */
3255 p_ptr->redraw |= (PR_STATUS);
3258 if (disturb_state) disturb(0, 0);
3269 * Set "p_ptr->oppose_cold", notice observable changes
3271 bool set_oppose_cold(int v, bool do_dec)
3273 bool notice = FALSE;
3275 /* Hack -- Force good values */
3276 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3278 if (p_ptr->is_dead) return FALSE;
3283 if (p_ptr->oppose_cold && !do_dec)
3285 if (p_ptr->oppose_cold > v) return FALSE;
3287 else if (!IS_OPPOSE_COLD())
3290 msg_print("Î䵤¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3292 msg_print("You feel resistant to cold!");
3302 if (p_ptr->oppose_cold && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3305 msg_print("Î䵤¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3307 msg_print("You feel less resistant to cold.");
3315 p_ptr->oppose_cold = v;
3317 /* Nothing to notice */
3318 if (!notice) return (FALSE);
3320 /* Redraw status bar */
3321 p_ptr->redraw |= (PR_STATUS);
3324 if (disturb_state) disturb(0, 0);
3335 * Set "p_ptr->oppose_pois", notice observable changes
3337 bool set_oppose_pois(int v, bool do_dec)
3339 bool notice = FALSE;
3341 /* Hack -- Force good values */
3342 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3344 if ((p_ptr->pclass == CLASS_NINJA) && (p_ptr->lev > 44)) v = 1;
3345 if (p_ptr->is_dead) return FALSE;
3350 if (p_ptr->oppose_pois && !do_dec)
3352 if (p_ptr->oppose_pois > v) return FALSE;
3354 else if (!IS_OPPOSE_POIS())
3357 msg_print("ÆǤؤÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3359 msg_print("You feel resistant to poison!");
3369 if (p_ptr->oppose_pois && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3372 msg_print("ÆǤؤÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3374 msg_print("You feel less resistant to poison.");
3382 p_ptr->oppose_pois = v;
3384 /* Nothing to notice */
3385 if (!notice) return (FALSE);
3387 /* Redraw status bar */
3388 p_ptr->redraw |= (PR_STATUS);
3391 if (disturb_state) disturb(0, 0);
3402 * Set "p_ptr->stun", notice observable changes
3404 * Note the special code to only notice "range" changes.
3406 bool set_stun(int v)
3408 int old_aux, new_aux;
3409 bool notice = FALSE;
3412 /* Hack -- Force good values */
3413 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3415 if (p_ptr->is_dead) return FALSE;
3417 if (prace_is_(RACE_GOLEM) || ((p_ptr->pclass == CLASS_BERSERKER) && (p_ptr->lev > 34))) v = 0;
3420 if (p_ptr->stun > 100)
3426 else if (p_ptr->stun > 50)
3432 else if (p_ptr->stun > 0)
3468 if (new_aux > old_aux)
3470 /* Describe the state */
3476 msg_print("°Õ¼±¤¬¤â¤¦¤í¤¦¤È¤·¤Æ¤¤¿¡£");
3478 msg_print("You have been stunned.");
3486 msg_print("°Õ¼±¤¬¤Ò¤É¤¯¤â¤¦¤í¤¦¤È¤·¤Æ¤¤¿¡£");
3488 msg_print("You have been heavily stunned.");
3496 msg_print("Ƭ¤¬¥¯¥é¥¯¥é¤·¤Æ°Õ¼±¤¬±ó¤Î¤¤¤Æ¤¤¿¡£");
3498 msg_print("You have been knocked out.");
3504 if (randint1(1000) < v || one_in_(16))
3507 msg_print("³ä¤ì¤ë¤è¤¦¤ÊƬÄˤ¬¤¹¤ë¡£");
3509 msg_print("A vicious blow hits your head.");
3514 if (!p_ptr->sustain_int) (void)do_dec_stat(A_INT);
3515 if (!p_ptr->sustain_wis) (void)do_dec_stat(A_WIS);
3517 else if (one_in_(2))
3519 if (!p_ptr->sustain_int) (void)do_dec_stat(A_INT);
3523 if (!p_ptr->sustain_wis) (void)do_dec_stat(A_WIS);
3526 if (p_ptr->special_defense & KATA_MASK)
3529 msg_print("·¿¤¬Êø¤ì¤¿¡£");
3531 msg_print("Your posture gets loose.");
3533 p_ptr->special_defense &= ~(KATA_MASK);
3534 p_ptr->update |= (PU_BONUS);
3535 p_ptr->update |= (PU_MONSTERS);
3536 p_ptr->redraw |= (PR_STATE);
3537 p_ptr->redraw |= (PR_STATUS);
3538 p_ptr->action = ACTION_NONE;
3546 else if (new_aux < old_aux)
3548 /* Describe the state */
3554 msg_print("¤ä¤Ã¤ÈÛ¯Û°¾õÂÖ¤«¤é²óÉü¤·¤¿¡£");
3556 msg_print("You are no longer stunned.");
3559 if (disturb_state) disturb(0, 0);
3571 if (!notice) return (FALSE);
3574 if (disturb_state) disturb(0, 0);
3576 /* Recalculate bonuses */
3577 p_ptr->update |= (PU_BONUS);
3579 /* Redraw the "stun" */
3580 p_ptr->redraw |= (PR_STUN);
3591 * Set "p_ptr->cut", notice observable changes
3593 * Note the special code to only notice "range" changes.
3597 int old_aux, new_aux;
3598 bool notice = FALSE;
3600 /* Hack -- Force good values */
3601 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3603 if (p_ptr->is_dead) return FALSE;
3605 if ((p_ptr->prace == RACE_GOLEM ||
3606 p_ptr->prace == RACE_SKELETON ||
3607 p_ptr->prace == RACE_SPECTRE ||
3608 (p_ptr->prace == RACE_ZOMBIE && p_ptr->lev > 11)) &&
3613 if (p_ptr->cut > 1000)
3619 else if (p_ptr->cut > 200)
3625 else if (p_ptr->cut > 100)
3631 else if (p_ptr->cut > 50)
3637 else if (p_ptr->cut > 25)
3643 else if (p_ptr->cut > 10)
3649 else if (p_ptr->cut > 0)
3709 if (new_aux > old_aux)
3711 /* Describe the state */
3717 msg_print("¤«¤¹¤ê½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3719 msg_print("You have been given a graze.");
3727 msg_print("·Ú¤¤½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3729 msg_print("You have been given a light cut.");
3737 msg_print("¤Ò¤É¤¤½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3739 msg_print("You have been given a bad cut.");
3747 msg_print("ÂçÊѤʽý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3749 msg_print("You have been given a nasty cut.");
3757 msg_print("½ÅÂç¤Ê½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3759 msg_print("You have been given a severe cut.");
3767 msg_print("¤Ò¤É¤¤¿¼¼ê¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3769 msg_print("You have been given a deep gash.");
3777 msg_print("Ã×̿Ū¤Ê½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3779 msg_print("You have been given a mortal wound.");
3788 if (randint1(1000) < v || one_in_(16))
3790 if (!p_ptr->sustain_chr)
3793 msg_print("¤Ò¤É¤¤½ýÀפ¬»Ä¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3795 msg_print("You have been horribly scarred.");
3805 else if (new_aux < old_aux)
3807 /* Describe the state */
3813 msg_format("¤ä¤Ã¤È%s¡£", p_ptr->prace == RACE_ANDROID ? "²ø²æ¤¬Ä¾¤Ã¤¿" : "½Ð·ì¤¬»ß¤Þ¤Ã¤¿");
3815 msg_print("You are no longer bleeding.");
3818 if (disturb_state) disturb(0, 0);
3830 if (!notice) return (FALSE);
3833 if (disturb_state) disturb(0, 0);
3835 /* Recalculate bonuses */
3836 p_ptr->update |= (PU_BONUS);
3838 /* Redraw the "cut" */
3839 p_ptr->redraw |= (PR_CUT);
3850 * Set "p_ptr->food", notice observable changes
3852 * The "p_ptr->food" variable can get as large as 20000, allowing the
3853 * addition of the most "filling" item, Elvish Waybread, which adds
3854 * 7500 food units, without overflowing the 32767 maximum limit.
3856 * Perhaps we should disturb the player with various messages,
3857 * especially messages about hunger status changes. XXX XXX XXX
3859 * Digestion of food is handled in "dungeon.c", in which, normally,
3860 * the player digests about 20 food units per 100 game turns, more
3861 * when "fast", more when "regenerating", less with "slow digestion",
3862 * but when the player is "gorged", he digests 100 food units per 10
3863 * game turns, or a full 1000 food units per 100 game turns.
3865 * Note that the player's speed is reduced by 10 units while gorged,
3866 * so if the player eats a single food ration (5000 food units) when
3867 * full (15000 food units), he will be gorged for (5000/100)*10 = 500
3868 * game turns, or 500/(100/5) = 25 player turns (if nothing else is
3869 * affecting the player speed).
3871 bool set_food(int v)
3873 int old_aux, new_aux;
3875 bool notice = FALSE;
3877 /* Hack -- Force good values */
3878 v = (v > 20000) ? 20000 : (v < 0) ? 0 : v;
3880 /* Fainting / Starving */
3881 if (p_ptr->food < PY_FOOD_FAINT)
3887 else if (p_ptr->food < PY_FOOD_WEAK)
3893 else if (p_ptr->food < PY_FOOD_ALERT)
3899 else if (p_ptr->food < PY_FOOD_FULL)
3905 else if (p_ptr->food < PY_FOOD_MAX)
3916 /* Fainting / Starving */
3917 if (v < PY_FOOD_FAINT)
3923 else if (v < PY_FOOD_WEAK)
3929 else if (v < PY_FOOD_ALERT)
3935 else if (v < PY_FOOD_FULL)
3941 else if (v < PY_FOOD_MAX)
3952 if (old_aux < 1 && new_aux > 0)
3953 chg_virtue(V_PATIENCE, 2);
3954 else if (old_aux < 3 && (old_aux != new_aux))
3955 chg_virtue(V_PATIENCE, 1);
3957 chg_virtue(V_TEMPERANCE, 1);
3959 chg_virtue(V_TEMPERANCE, -1);
3962 if (new_aux > old_aux)
3964 /* Describe the state */
3970 msg_print("¤Þ¤À¶õÊ¢¤ÇÅݤ줽¤¦¤À¡£");
3972 msg_print("You are still weak.");
3980 msg_print("¤Þ¤À¶õÊ¢¤À¡£");
3982 msg_print("You are still hungry.");
3990 msg_print("¶õÊ¢´¶¤¬¤ª¤µ¤Þ¤Ã¤¿¡£");
3992 msg_print("You are no longer hungry.");
4000 msg_print("ËþÊ¢¤À¡ª");
4002 msg_print("You are full!");
4010 msg_print("¿©¤Ù²á¤®¤À¡ª");
4012 msg_print("You have gorged yourself!");
4014 chg_virtue(V_HARMONY, -1);
4015 chg_virtue(V_PATIENCE, -1);
4016 chg_virtue(V_TEMPERANCE, -2);
4026 else if (new_aux < old_aux)
4028 /* Describe the state */
4031 /* Fainting / Starving */
4034 msg_print("¤¢¤Þ¤ê¤Ë¤â¶õÊ¢¤Çµ¤¤ò¼º¤Ã¤Æ¤·¤Þ¤Ã¤¿¡ª");
4036 msg_print("You are getting faint from hunger!");
4044 msg_print("¤ªÊ¢¤¬¶õ¤¤¤ÆÅݤ줽¤¦¤À¡£");
4046 msg_print("You are getting weak from hunger!");
4054 msg_print("¤ªÊ¢¤¬¶õ¤¤¤Æ¤¤¿¡£");
4056 msg_print("You are getting hungry.");
4064 msg_print("ËþÊ¢´¶¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
4066 msg_print("You are no longer full.");
4074 msg_print("¤ä¤Ã¤È¤ªÊ¢¤¬¤¤Ä¤¯¤Ê¤¯¤Ê¤Ã¤¿¡£");
4076 msg_print("You are no longer gorged.");
4082 if (p_ptr->wild_mode && (new_aux < 2))
4094 /* Nothing to notice */
4095 if (!notice) return (FALSE);
4098 if (disturb_state) disturb(0, 0);
4100 /* Recalculate bonuses */
4101 p_ptr->update |= (PU_BONUS);
4104 p_ptr->redraw |= (PR_HUNGER);
4114 * Increases a stat by one randomized level -RAK-
4116 * Note that this function (used by stat potions) now restores
4117 * the stat BEFORE increasing it.
4119 bool inc_stat(int stat)
4123 /* Then augment the current/max stat */
4124 value = p_ptr->stat_cur[stat];
4126 /* Cannot go above 18/100 */
4127 if (value < p_ptr->stat_max_max[stat])
4129 /* Gain one (sometimes two) points */
4132 gain = ((randint0(100) < 75) ? 1 : 2);
4136 /* Gain 1/6 to 1/3 of distance to 18/100 */
4137 else if (value < (p_ptr->stat_max_max[stat]-2))
4139 /* Approximate gain value */
4140 gain = (((p_ptr->stat_max_max[stat]) - value) / 2 + 3) / 2;
4143 if (gain < 1) gain = 1;
4145 /* Apply the bonus */
4146 value += randint1(gain) + gain / 2;
4149 if (value > (p_ptr->stat_max_max[stat]-1)) value = p_ptr->stat_max_max[stat]-1;
4152 /* Gain one point at a time */
4158 /* Save the new value */
4159 p_ptr->stat_cur[stat] = value;
4161 /* Bring up the maximum too */
4162 if (value > p_ptr->stat_max[stat])
4164 p_ptr->stat_max[stat] = value;
4167 /* Recalculate bonuses */
4168 p_ptr->update |= (PU_BONUS);
4174 /* Nothing to gain */
4181 * Decreases a stat by an amount indended to vary from 0 to 100 percent.
4183 * Amount could be a little higher in extreme cases to mangle very high
4184 * stats from massive assaults. -CWS
4186 * Note that "permanent" means that the *given* amount is permanent,
4187 * not that the new value becomes permanent. This may not work exactly
4188 * as expected, due to "weirdness" in the algorithm, but in general,
4189 * if your stat is already drained, the "max" value will not drop all
4190 * the way down to the "cur" value.
4192 bool dec_stat(int stat, int amount, int permanent)
4194 int cur, max, loss, same, res = FALSE;
4197 /* Acquire current value */
4198 cur = p_ptr->stat_cur[stat];
4199 max = p_ptr->stat_max[stat];
4201 /* Note when the values are identical */
4202 same = (cur == max);
4204 /* Damage "current" value */
4207 /* Handle "low" values */
4210 if (amount > 90) cur--;
4211 if (amount > 50) cur--;
4212 if (amount > 20) cur--;
4216 /* Handle "high" values */
4219 /* Hack -- Decrement by a random amount between one-quarter */
4220 /* and one-half of the stat bonus times the percentage, with a */
4221 /* minimum damage of half the percentage. -CWS */
4222 loss = (((cur-18) / 2 + 1) / 2 + 1);
4225 if (loss < 1) loss = 1;
4227 /* Randomize the loss */
4228 loss = ((randint1(loss) + loss) * amount) / 100;
4231 if (loss < amount/2) loss = amount/2;
4233 /* Lose some points */
4236 /* Hack -- Only reduce stat to 17 sometimes */
4237 if (cur < 18) cur = (amount <= 20) ? 18 : 17;
4240 /* Prevent illegal values */
4241 if (cur < 3) cur = 3;
4243 /* Something happened */
4244 if (cur != p_ptr->stat_cur[stat]) res = TRUE;
4247 /* Damage "max" value */
4248 if (permanent && (max > 3))
4250 chg_virtue(V_SACRIFICE, 1);
4251 if (stat == A_WIS || stat == A_INT)
4252 chg_virtue(V_ENLIGHTEN, -2);
4254 /* Handle "low" values */
4257 if (amount > 90) max--;
4258 if (amount > 50) max--;
4259 if (amount > 20) max--;
4263 /* Handle "high" values */
4266 /* Hack -- Decrement by a random amount between one-quarter */
4267 /* and one-half of the stat bonus times the percentage, with a */
4268 /* minimum damage of half the percentage. -CWS */
4269 loss = (((max-18) / 2 + 1) / 2 + 1);
4270 loss = ((randint1(loss) + loss) * amount) / 100;
4271 if (loss < amount/2) loss = amount/2;
4273 /* Lose some points */
4276 /* Hack -- Only reduce stat to 17 sometimes */
4277 if (max < 18) max = (amount <= 20) ? 18 : 17;
4280 /* Hack -- keep it clean */
4281 if (same || (max < cur)) max = cur;
4283 /* Something happened */
4284 if (max != p_ptr->stat_max[stat]) res = TRUE;
4290 /* Actually set the stat to its new value. */
4291 p_ptr->stat_cur[stat] = cur;
4292 p_ptr->stat_max[stat] = max;
4294 /* Redisplay the stats later */
4295 p_ptr->redraw |= (PR_STATS);
4297 /* Recalculate bonuses */
4298 p_ptr->update |= (PU_BONUS);
4307 * Restore a stat. Return TRUE only if this actually makes a difference.
4309 bool res_stat(int stat)
4311 /* Restore if needed */
4312 if (p_ptr->stat_cur[stat] != p_ptr->stat_max[stat])
4315 p_ptr->stat_cur[stat] = p_ptr->stat_max[stat];
4317 /* Recalculate bonuses */
4318 p_ptr->update |= (PU_BONUS);
4320 /* Redisplay the stats later */
4321 p_ptr->redraw |= (PR_STATS);
4327 /* Nothing to restore */
4333 * Increase players hit points, notice effects
4335 bool hp_player(int num)
4338 vir = virtue_number(V_VITALITY);
4341 num = num * (p_ptr->virtues[vir - 1] + 1250) / 1250;
4343 /* Healing needed */
4344 if (p_ptr->chp < p_ptr->mhp)
4346 if ((num > 0) && (p_ptr->chp < (p_ptr->mhp/3)))
4347 chg_virtue(V_TEMPERANCE, 1);
4348 /* Gain hitpoints */
4351 /* Enforce maximum */
4352 if (p_ptr->chp >= p_ptr->mhp)
4354 p_ptr->chp = p_ptr->mhp;
4355 p_ptr->chp_frac = 0;
4359 p_ptr->redraw |= (PR_HP);
4362 p_ptr->window |= (PW_PLAYER);
4368 msg_print("¾¯¤·µ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4370 msg_print("You feel a little better.");
4379 msg_print("µ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4381 msg_print("You feel better.");
4390 msg_print("¤È¤Æ¤âµ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4392 msg_print("You feel much better.");
4401 msg_print("¤Ò¤¸¤ç¤¦¤Ëµ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4403 msg_print("You feel very good.");
4418 * Array of stat "descriptions"
4420 static cptr desc_stat_pos[] =
4462 * Array of stat "descriptions"
4464 static cptr desc_stat_neg[] =
4488 bool do_dec_stat(int stat)
4492 /* Access the "sustain" */
4495 case A_STR: if (p_ptr->sustain_str) sust = TRUE; break;
4496 case A_INT: if (p_ptr->sustain_int) sust = TRUE; break;
4497 case A_WIS: if (p_ptr->sustain_wis) sust = TRUE; break;
4498 case A_DEX: if (p_ptr->sustain_dex) sust = TRUE; break;
4499 case A_CON: if (p_ptr->sustain_con) sust = TRUE; break;
4500 case A_CHR: if (p_ptr->sustain_chr) sust = TRUE; break;
4504 if (sust && (!ironman_nightmare || randint0(13)))
4508 msg_format("%s¤Ê¤Ã¤¿µ¤¤¬¤·¤¿¤¬¡¢¤¹¤°¤Ë¸µ¤ËÌá¤Ã¤¿¡£",
4510 msg_format("You feel %s for a moment, but the feeling passes.",
4513 desc_stat_neg[stat]);
4519 /* Attempt to reduce the stat */
4520 if (dec_stat(stat, 10, (ironman_nightmare && !randint0(13))))
4524 msg_format("¤Ò¤É¤¯%s¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£", desc_stat_neg[stat]);
4526 msg_format("You feel very %s.", desc_stat_neg[stat]);
4534 /* Nothing obvious */
4540 * Restore lost "points" in a stat
4542 bool do_res_stat(int stat)
4544 /* Attempt to increase */
4549 msg_format("¸µÄ̤ê¤Ë%s¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£", desc_stat_pos[stat]);
4551 msg_format("You feel less %s.", desc_stat_neg[stat]);
4559 /* Nothing obvious */
4565 * Gain a "point" in a stat
4567 bool do_inc_stat(int stat)
4571 /* Restore strength */
4572 res = res_stat(stat);
4574 /* Attempt to increase */
4579 chg_virtue(V_ENLIGHTEN, 1);
4580 chg_virtue(V_FAITH, 1);
4582 else if (stat == A_INT)
4584 chg_virtue(V_KNOWLEDGE, 1);
4585 chg_virtue(V_ENLIGHTEN, 1);
4587 else if (stat == A_CON)
4588 chg_virtue(V_VITALITY, 1);
4592 msg_format("¥ï¡¼¥ª¡ª¤È¤Æ¤â%s¤Ê¤Ã¤¿¡ª", desc_stat_pos[stat]);
4594 msg_format("Wow! You feel very %s!", desc_stat_pos[stat]);
4602 /* Restoration worked */
4607 msg_format("¸µÄ̤ê¤Ë%s¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£", desc_stat_pos[stat]);
4609 msg_format("You feel less %s.", desc_stat_neg[stat]);
4617 /* Nothing obvious */
4623 * Restores any drained experience
4625 bool restore_level(void)
4627 /* Restore experience */
4628 if (p_ptr->exp < p_ptr->max_exp)
4632 msg_print("À¸Ì¿ÎϤ¬Ìá¤Ã¤Æ¤¤¿µ¤¤¬¤¹¤ë¡£");
4634 msg_print("You feel your life energies returning.");
4638 /* Restore the experience */
4639 p_ptr->exp = p_ptr->max_exp;
4641 /* Check the experience */
4656 bool lose_all_info(void)
4660 chg_virtue(V_KNOWLEDGE, -5);
4661 chg_virtue(V_ENLIGHTEN, -5);
4663 /* Forget info about objects */
4664 for (i = 0; i < INVEN_TOTAL; i++)
4666 object_type *o_ptr = &inventory[i];
4668 /* Skip non-objects */
4669 if (!o_ptr->k_idx) continue;
4671 /* Allow "protection" by the MENTAL flag */
4672 if (o_ptr->ident & (IDENT_MENTAL)) continue;
4674 /* Remove "default inscriptions" */
4675 o_ptr->feeling = FEEL_NONE;
4677 /* Hack -- Clear the "empty" flag */
4678 o_ptr->ident &= ~(IDENT_EMPTY);
4680 /* Hack -- Clear the "known" flag */
4681 o_ptr->ident &= ~(IDENT_KNOWN);
4683 /* Hack -- Clear the "felt" flag */
4684 o_ptr->ident &= ~(IDENT_SENSE);
4687 /* Recalculate bonuses */
4688 p_ptr->update |= (PU_BONUS);
4690 /* Combine / Reorder the pack (later) */
4691 p_ptr->notice |= (PN_COMBINE | PN_REORDER);
4694 p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
4696 /* Mega-Hack -- Forget the map */
4704 void do_poly_wounds(void)
4706 /* Changed to always provide at least _some_ healing */
4707 s16b wounds = p_ptr->cut;
4708 s16b hit_p = (p_ptr->mhp - p_ptr->chp);
4709 s16b change = damroll(p_ptr->lev, 5);
4710 bool Nasty_effect = one_in_(5);
4712 if (!(wounds || hit_p || Nasty_effect)) return;
4715 msg_print("½ý¤¬¤è¤ê·Ú¤¤¤â¤Î¤ËÊѲ½¤·¤¿¡£");
4717 msg_print("Your wounds are polymorphed into less serious ones.");
4724 msg_print("¿·¤¿¤Ê½ý¤¬¤Ç¤¤¿¡ª");
4725 take_hit(DAMAGE_LOSELIFE, change / 2, "ÊѲ½¤·¤¿½ý", -1);
4727 msg_print("A new wound was created!");
4728 take_hit(DAMAGE_LOSELIFE, change / 2, "a polymorphed wound", -1);
4735 set_cut(p_ptr->cut - (change / 2));
4741 * Change player race
4743 void change_race(int new_race, cptr effect_msg)
4745 cptr title = race_info[new_race].title;
4746 int old_race = p_ptr->prace;
4749 msg_format("¤¢¤Ê¤¿¤Ï%s%s¤ËÊѲ½¤·¤¿¡ª", effect_msg, title);
4751 msg_format("You turn into %s %s%s!", (!effect_msg[0] && is_a_vowel(title[0]) ? "an" : "a"), effect_msg, title);
4754 chg_virtue(V_CHANCE, 2);
4756 if (p_ptr->prace < 32)
4758 p_ptr->old_race1 |= 1L << p_ptr->prace;
4762 p_ptr->old_race2 |= 1L << (p_ptr->prace-32);
4764 p_ptr->prace = new_race;
4765 rp_ptr = &race_info[p_ptr->prace];
4767 /* Experience factor */
4768 p_ptr->expfact = rp_ptr->r_exp + cp_ptr->c_exp;
4771 * The speed bonus of Klackons and Sprites are disabled
4772 * and the experience penalty is decreased.
4774 if (((p_ptr->pclass == CLASS_MONK) || (p_ptr->pclass == CLASS_FORCETRAINER) || (p_ptr->pclass == CLASS_NINJA)) && ((p_ptr->prace == RACE_KLACKON) || (p_ptr->prace == RACE_SPRITE)))
4775 p_ptr->expfact -= 15;
4777 /* Get character's height and weight */
4778 get_height_weight();
4781 if (p_ptr->pclass == CLASS_SORCERER)
4782 p_ptr->hitdie = rp_ptr->r_mhp/2 + cp_ptr->c_mhp + ap_ptr->a_mhp;
4784 p_ptr->hitdie = rp_ptr->r_mhp + cp_ptr->c_mhp + ap_ptr->a_mhp;
4786 do_cmd_rerate(FALSE);
4788 /* The experience level may be modified */
4791 p_ptr->redraw |= (PR_BASIC);
4793 p_ptr->update |= (PU_BONUS);
4797 /* Load an autopick preference file */
4798 if (old_race != p_ptr->prace) autopick_load_pref(FALSE);
4800 /* Player's graphic tile may change */
4805 void do_poly_self(void)
4807 int power = p_ptr->lev;
4810 msg_print("¤¢¤Ê¤¿¤ÏÊѲ½¤Îˬ¤ì¤ò´¶¤¸¤¿...");
4812 msg_print("You feel a change coming over you...");
4815 chg_virtue(V_CHANCE, 1);
4817 if ((power > randint0(20)) && one_in_(3) && (p_ptr->prace != RACE_ANDROID))
4819 char effect_msg[80] = "";
4820 int new_race, expfact, goalexpfact;
4822 /* Some form of racial polymorph... */
4825 if ((power > randint0(5)) && one_in_(4))
4830 if (p_ptr->psex == SEX_MALE)
4832 p_ptr->psex = SEX_FEMALE;
4833 sp_ptr = &sex_info[p_ptr->psex];
4835 sprintf(effect_msg, "½÷À¤Î");
4837 sprintf(effect_msg, "female ");
4843 p_ptr->psex = SEX_MALE;
4844 sp_ptr = &sex_info[p_ptr->psex];
4846 sprintf(effect_msg, "ÃËÀ¤Î");
4848 sprintf(effect_msg, "male ");
4854 if ((power > randint0(30)) && one_in_(5))
4858 /* Harmful deformity */
4865 (void)dec_stat(tmp, randint1(6) + 6, one_in_(3));
4871 /* Deformities are discriminated against! */
4872 (void)dec_stat(A_CHR, randint1(6), TRUE);
4878 sprintf(tmp_msg,"%s",effect_msg);
4879 sprintf(effect_msg,"´ñ·Á¤Î%s",tmp_msg);
4881 sprintf(tmp_msg,"%s ",effect_msg);
4882 sprintf(effect_msg,"deformed %s ",tmp_msg);
4889 sprintf(effect_msg,"´ñ·Á¤Î");
4891 sprintf(effect_msg,"deformed ");
4897 while ((power > randint0(20)) && one_in_(10))
4899 /* Polymorph into a less mutated form */
4902 if (!lose_mutation(0))
4904 msg_print("´ñ̯¤Ê¤¯¤é¤¤ÉáÄ̤ˤʤ俵¤¤¬¤¹¤ë¡£");
4906 msg_print("You feel oddly normal.");
4912 * Restrict the race choices by exp penalty so
4913 * weak polymorph always means weak race
4918 goalexpfact = 100 + 3 * randint0(power);
4922 new_race = randint0(MAX_RACES);
4923 expfact = race_info[new_race].r_exp;
4925 while (((new_race == p_ptr->prace) && (expfact > goalexpfact)) || (new_race == RACE_ANDROID));
4927 change_race(new_race, effect_msg);
4930 if ((power > randint0(30)) && one_in_(6))
4938 msg_format("%s¤Î¹½À®¤¬ÊѲ½¤·¤¿¡ª", p_ptr->prace == RACE_ANDROID ? "µ¡³£" : "Æâ¡");
4940 msg_print("Your internal organs are rearranged!");
4945 (void)dec_stat(tmp, randint1(6) + 6, one_in_(3));
4951 msg_print("¸½ºß¤Î»Ñ¤ÇÀ¸¤¤Æ¤¤¤¯¤Î¤Ïº¤Æñ¤Ê¤è¤¦¤À¡ª");
4952 take_hit(DAMAGE_LOSELIFE, damroll(randint1(10), p_ptr->lev), "Ã×̿Ū¤ÊÆÍÁ³ÊÑ°Û", -1);
4954 msg_print("You find living difficult in your present form!");
4955 take_hit(DAMAGE_LOSELIFE, damroll(randint1(10), p_ptr->lev), "a lethal mutation", -1);
4962 if ((power > randint0(20)) && one_in_(4))
4967 do_cmd_rerate(FALSE);
4970 while ((power > randint0(15)) && one_in_(3))
4973 (void)gain_random_mutation(0);
4976 if (power > randint0(5))
4982 /* Note: earlier deductions may have left power < 0 already. */
4992 * Decreases players hit points and sets death flag if necessary
4994 * XXX XXX XXX Invulnerability needs to be changed into a "shield"
4996 * XXX XXX XXX Hack -- this function allows the user to save (or quit)
4997 * the game when he dies, since the "You die." message is shown before
4998 * setting the player to "dead".
5001 int take_hit(int damage_type, int damage, cptr hit_from, int monspell)
5003 int old_chp = p_ptr->chp;
5005 char death_message[1024];
5008 int warning = (p_ptr->mhp * hitpoint_warn / 10);
5011 if (p_ptr->is_dead) return 0;
5013 if (p_ptr->sutemi) damage *= 2;
5014 if (p_ptr->special_defense & KATA_IAI) damage += (damage + 4) / 5;
5016 if (easy_band) damage = (damage+1)/2;
5018 if (damage_type != DAMAGE_USELIFE)
5028 if (monspell >= 0) learn_spell(monspell);
5030 /* Mega-Hack -- Apply "invulnerability" */
5031 if ((damage_type != DAMAGE_USELIFE) && (damage_type != DAMAGE_LOSELIFE))
5033 if (IS_INVULN() && (damage < 9000))
5035 if (damage_type == DAMAGE_FORCE)
5038 msg_print("¥Ð¥ê¥¢¤¬ÀÚ¤êÎö¤«¤ì¤¿¡ª");
5040 msg_print("The attack cuts your shield of invulnerability open!");
5043 else if (one_in_(PENETRATE_INVULNERABILITY))
5046 msg_print("̵Ũ¤Î¥Ð¥ê¥¢¤òÇˤäƹ¶·â¤µ¤ì¤¿¡ª");
5048 msg_print("The attack penetrates your shield of invulnerability!");
5057 /* Multishadow effects is determined by turn */
5058 if (p_ptr->multishadow && (turn & 1))
5060 if (damage_type == DAMAGE_FORCE)
5063 msg_print("¸¸±Æ¤â¤í¤È¤âÂΤ¬ÀÚ¤êÎö¤«¤ì¤¿¡ª");
5065 msg_print("The attack hits Shadow together with you!");
5068 else if (damage_type == DAMAGE_ATTACK)
5071 msg_print("¹¶·â¤Ï¸¸±Æ¤ËÌ¿Ã椷¡¢¤¢¤Ê¤¿¤Ë¤ÏÆϤ«¤Ê¤«¤Ã¤¿¡£");
5073 msg_print("The attack hits Shadow, you are unharmed!");
5079 if (p_ptr->wraith_form)
5081 if (damage_type == DAMAGE_FORCE)
5084 msg_print("Ⱦʪ¼Á¤ÎÂΤ¬ÀÚ¤êÎö¤«¤ì¤¿¡ª");
5086 msg_print("The attack cuts through your ethereal body!");
5092 if ((damage == 0) && one_in_(2)) damage = 1;
5096 if (p_ptr->special_defense & KATA_MUSOU)
5099 if ((damage == 0) && one_in_(2)) damage = 1;
5101 } /* not if LOSELIFE USELIFE */
5103 /* Hurt the player */
5104 p_ptr->chp -= damage;
5105 if(damage_type == DAMAGE_GENO && p_ptr->chp < 0)
5107 damage += p_ptr->chp;
5111 /* Display the hitpoints */
5112 p_ptr->redraw |= (PR_HP);
5115 p_ptr->window |= (PW_PLAYER);
5119 if (damage_type != DAMAGE_GENO && p_ptr->chp == 0)
5121 chg_virtue(V_SACRIFICE, 1);
5122 chg_virtue(V_CHANCE, 2);
5129 bool android = (p_ptr->prace == RACE_ANDROID ? TRUE : FALSE);
5131 #ifdef JP /* »à¤ó¤À»þ¤Ë¶¯À©½ªÎ»¤·¤Æ»à¤ò²óÈò¤Ç¤¤Ê¤¯¤·¤Æ¤ß¤¿ by Habu */
5133 if(!save_player()) msg_print("¥»¡¼¥Ö¼ºÇÔ¡ª");
5139 chg_virtue(V_SACRIFICE, 10);
5142 p_ptr->leaving = TRUE;
5145 p_ptr->is_dead = TRUE;
5147 if (p_ptr->inside_arena)
5149 cptr m_name = r_name+r_info[arena_info[p_ptr->arena_number].r_idx].name;
5151 msg_format("¤¢¤Ê¤¿¤Ï%s¤ÎÁ°¤ËÇÔ¤ìµî¤Ã¤¿¡£", m_name);
5153 msg_format("You are beaten by %s.", m_name);
5156 if (record_arena) do_cmd_write_nikki(NIKKI_ARENA, -1 - p_ptr->arena_number, m_name);
5160 int q_idx = quest_number(dun_level);
5163 /* Make screen dump */
5164 screen_dump = make_screen_dump();
5167 /* Note cause of death */
5169 sprintf(p_ptr->died_from, "%s%s%s", !p_ptr->paralyzed ? "" : p_ptr->free_act ? "ĦÁü¾õÂÖ¤Ç":"Ëãáã¾õÂÖ¤Ç", p_ptr->image ? "¸¸³Ð¤ËÏĤó¤À" : "", hit_from);
5171 sprintf(p_ptr->died_from, "%s%s", hit_from, !p_ptr->paralyzed ? "" : " while helpless");
5174 /* No longer a winner */
5175 p_ptr->total_winner = FALSE;
5177 if (p_ptr->inside_arena)
5179 strcpy(buf,"¥¢¥ê¡¼¥Ê");
5181 strcpy(buf,"in the Arena");
5183 else if (!dun_level)
5187 strcpy(buf,"on the surface");
5189 else if (q_idx && (is_fixed_quest_idx(q_idx) &&
5190 !((q_idx == QUEST_OBERON) || (q_idx == QUEST_SERPENT))))
5192 strcpy(buf,"¥¯¥¨¥¹¥È");
5194 strcpy(buf,"in a quest");
5198 sprintf(buf,"%d³¬", dun_level);
5200 sprintf(buf,"level %d", dun_level);
5203 sprintf(tmp,"%s¤Ç%s¤Ë»¦¤µ¤ì¤¿¡£",buf, p_ptr->died_from);
5205 sprintf(tmp,"killed by %s %s.", p_ptr->died_from, buf);
5207 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, tmp);
5209 do_cmd_write_nikki(NIKKI_GAMESTART, 1, "-------- ¥²¡¼¥à¥ª¡¼¥Ð¡¼ --------");
5211 do_cmd_write_nikki(NIKKI_GAMESTART, 1, "-------- Game Over --------");
5213 do_cmd_write_nikki(NIKKI_BUNSHOU, 1, "\n\n\n\n");
5218 if (get_check_strict("²èÌ̤òÊݸ¤·¤Þ¤¹¤«¡©", CHECK_NO_HISTORY))
5220 if (get_check_strict("Dump the screen? ", CHECK_NO_HISTORY))
5224 do_cmd_save_screen();
5229 /* Initialize "last message" buffer */
5230 if (p_ptr->last_message) string_free(p_ptr->last_message);
5231 p_ptr->last_message = NULL;
5233 /* Hack -- Note death */
5237 msg_format("¤¢¤Ê¤¿¤Ï%s¤Þ¤·¤¿¡£", android ? "²õ¤ì" : "»à¤Ë");
5239 msg_print(android ? "You are broken." : "You die.");
5246 if (streq(p_ptr->died_from, "Seppuku"))
5249 get_rnd_line("seppuku_j.txt", 0, death_message);
5251 get_rnd_line("seppuku.txt", 0, death_message);
5257 get_rnd_line("death_j.txt", 0, death_message);
5259 get_rnd_line("death.txt", 0, death_message);
5263 while (!get_string(streq(p_ptr->died_from, "Seppuku") ? "¼À¤¤Î¶ç: " : "ÃÇËöËâ¤Î¶«¤Ó: ", death_message, 1024)) ;
5265 while (!get_string("Last word: ", death_message, 1024)) ;
5267 if (death_message[0] == '\0')
5270 strcpy(death_message, format("¤¢¤Ê¤¿¤Ï%s¤Þ¤·¤¿¡£", android ? "²õ¤ì" : "»à¤Ë"));
5272 strcpy(death_message, android ? "You are broken." : "You die.");
5275 else p_ptr->last_message = string_make(death_message);
5277 if (streq(p_ptr->died_from, "Seppuku"))
5283 int msg_pos_x[9] = { 5, 7, 9, 12, 14, 17, 19, 21, 23};
5284 int msg_pos_y[9] = { 3, 4, 5, 4, 5, 4, 5, 6, 4};
5291 for (i = 0; i < 40; i++)
5292 Term_putstr(randint0(w / 2) * 2, randint0(h), 2, TERM_VIOLET, "¦Ô");
5294 str = death_message;
5295 if (strncmp(str, "¡Ö", 2) == 0) str += 2;
5297 str2 = my_strstr(str, "¡×");
5298 if (str2 != NULL) *str2 = '\0';
5303 str2 = my_strstr(str, " ");
5304 if (str2 == NULL) len = strlen(str);
5305 else len = str2 - str;
5309 Term_putstr_v(w * 3 / 4 - 2 - msg_pos_x[i] * 2, msg_pos_y[i], len,
5311 if (str2 == NULL) break;
5315 if (*str == 0) break;
5319 Term_putstr(w-1, h-1, 1, TERM_WHITE, " ");
5323 /* Make screen dump */
5324 screen_dump = make_screen_dump();
5327 /* Wait a key press */
5330 msg_print(death_message);
5334 msg_print(death_message);
5342 /* Hitpoint warning */
5343 if (p_ptr->chp < warning)
5345 /* Hack -- bell on first notice */
5346 if (old_chp > warning) bell();
5350 if (record_danger && (old_chp > warning))
5352 if (p_ptr->image && damage_type == DAMAGE_ATTACK)
5356 hit_from = "something";
5360 sprintf(tmp,"%s¤Ë¤è¤Ã¤Æ¥Ô¥ó¥Á¤Ë´Ù¤¤¤Ã¤¿¡£",hit_from);
5362 sprintf(tmp,"A critical situation because of %s.",hit_from);
5364 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, tmp);
5369 /* stop auto_more even if DAMAGE_USELIFE */
5375 msg_print("*** ·Ù¹ð:Äã¥Ò¥Ã¥È¡¦¥Ý¥¤¥ó¥È¡ª ***");
5377 msg_print("*** LOW HITPOINT WARNING! ***");
5383 if (p_ptr->wild_mode && !p_ptr->leaving && (p_ptr->chp < MAX(warning, p_ptr->mhp/5)))
5394 void gain_exp_64(s32b amount, u32b amount_frac)
5396 if (p_ptr->is_dead) return;
5398 if (p_ptr->prace == RACE_ANDROID) return;
5400 /* Gain some experience */
5401 s64b_add(&(p_ptr->exp), &(p_ptr->exp_frac), amount, amount_frac);
5403 /* Slowly recover from experience drainage */
5404 if (p_ptr->exp < p_ptr->max_exp)
5406 /* Gain max experience (20%) (was 10%) */
5407 p_ptr->max_exp += amount / 5;
5410 /* Check Experience */
5418 void gain_exp(s32b amount)
5420 gain_exp_64(amount, 0L);
5424 void calc_android_exp(void)
5428 if (p_ptr->is_dead) return;
5430 if (p_ptr->prace != RACE_ANDROID) return;
5432 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
5434 object_type *o_ptr = &inventory[i];
5436 object_type *q_ptr = &forge;
5438 int level = MAX(k_info[o_ptr->k_idx].level - 8, 1);
5440 if ((i == INVEN_RIGHT) || (i == INVEN_LEFT) || (i == INVEN_NECK) || (i == INVEN_LITE)) continue;
5441 if (!o_ptr->k_idx) continue;
5443 /* Wipe the object */
5446 object_copy(q_ptr, o_ptr);
5447 q_ptr->discount = 0;
5448 q_ptr->curse_flags = 0L;
5450 if (object_is_fixed_artifact(o_ptr))
5452 level = (level + MAX(a_info[o_ptr->name1].level - 8, 5)) / 2;
5453 level += MIN(20, a_info[o_ptr->name1].rarity/(a_info[o_ptr->name1].gen_flags & TRG_INSTA_ART ? 10 : 3));
5455 else if (object_is_ego(o_ptr))
5457 level += MAX(3, (e_info[o_ptr->name2].rating - 5)/2);
5459 else if (o_ptr->art_name)
5461 s32b total_flags = flag_cost(o_ptr, o_ptr->pval);
5464 if (!object_is_weapon_ammo(o_ptr))
5467 if (total_flags < 15000) fake_level = 10;
5468 else if (total_flags < 35000) fake_level = 25;
5469 else fake_level = 40;
5474 if (total_flags < 20000) fake_level = 10;
5475 else if (total_flags < 45000) fake_level = 25;
5476 else fake_level = 40;
5479 level = MAX(level, (level + MAX(fake_level - 8, 5)) / 2 + 3);
5482 value = object_value_real(q_ptr);
5484 if (value <= 0) continue;
5485 if ((o_ptr->tval == TV_SOFT_ARMOR) && (o_ptr->sval == SV_ABUNAI_MIZUGI) && (p_ptr->pseikaku != SEIKAKU_SEXY)) value /= 32;
5486 if (value > 5000000L) value = 5000000L;
5487 if ((o_ptr->tval == TV_DRAG_ARMOR) || (o_ptr->tval == TV_CARD)) level /= 2;
5489 if (object_is_artifact(o_ptr) || object_is_ego(o_ptr) ||
5490 (o_ptr->tval == TV_DRAG_ARMOR) ||
5491 ((o_ptr->tval == TV_HELM) && (o_ptr->sval == SV_DRAGON_HELM)) ||
5492 ((o_ptr->tval == TV_SHIELD) && (o_ptr->sval == SV_DRAGON_SHIELD)) ||
5493 ((o_ptr->tval == TV_GLOVES) && (o_ptr->sval == SV_SET_OF_DRAGON_GLOVES)) ||
5494 ((o_ptr->tval == TV_BOOTS) && (o_ptr->sval == SV_PAIR_OF_DRAGON_GREAVE)) ||
5495 ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DIAMOND_EDGE)))
5497 if (level > 65) level = 35 + (level - 65) / 5;
5498 else if (level > 35) level = 25 + (level - 35) / 3;
5499 else if (level > 15) level = 15 + (level - 15) / 2;
5500 exp = MIN(100000L, value) * level * level / 2;
5501 if (value > 100000L)
5502 exp += (value - 100000L) * level * level / 8;
5506 exp = MIN(100000L, value) * level;
5507 if (value > 100000L)
5508 exp += (value - 100000L) * level / 4;
5510 if ((((i == INVEN_RARM) || (i == INVEN_LARM)) && (buki_motteruka(i))) || (i == INVEN_BOW)) total_exp += exp / 48;
5511 else total_exp += exp / 16;
5512 if (i == INVEN_BODY) total_exp += exp / 32;
5514 p_ptr->exp = p_ptr->max_exp = total_exp;
5516 /* Check Experience */
5524 void lose_exp(s32b amount)
5526 if (p_ptr->prace == RACE_ANDROID) return;
5528 /* Never drop below zero experience */
5529 if (amount > p_ptr->exp) amount = p_ptr->exp;
5531 /* Lose some experience */
5532 p_ptr->exp -= amount;
5534 /* Check Experience */
5541 * If resisted to draining, return FALSE
5543 bool drain_exp(s32b drain, s32b slip, int hold_life_prob)
5545 /* Androids and their mimics are never drained */
5546 if (p_ptr->prace == RACE_ANDROID) return FALSE;
5548 if (p_ptr->hold_life && (randint0(100) < hold_life_prob))
5550 /* Hold experience */
5552 msg_print("¤·¤«¤·¼«¸Ê¤ÎÀ¸Ì¿ÎϤò¼é¤ê¤¤Ã¤¿¡ª");
5554 msg_print("You keep hold of your life force!");
5559 /* Hold experience failed */
5560 if (p_ptr->hold_life)
5563 msg_print("À¸Ì¿ÎϤò¾¯¤·µÛ¤¤¼è¤é¤ì¤¿µ¤¤¬¤¹¤ë¡ª");
5565 msg_print("You feel your life slipping away!");
5572 msg_print("À¸Ì¿ÎϤ¬ÂΤ«¤éµÛ¤¤¼è¤é¤ì¤¿µ¤¤¬¤¹¤ë¡ª");
5574 msg_print("You feel your life draining away!");
5583 bool set_ultimate_res(int v, bool do_dec)
5585 bool notice = FALSE;
5587 /* Hack -- Force good values */
5588 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
5590 if (p_ptr->is_dead) return FALSE;
5595 if (p_ptr->ult_res && !do_dec)
5597 if (p_ptr->ult_res > v) return FALSE;
5599 else if (!p_ptr->ult_res)
5602 msg_print("¤¢¤é¤æ¤ë¤³¤È¤ËÂФ·¤ÆÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
5604 msg_print("You feel resistant!");
5617 msg_print("¤¢¤é¤æ¤ë¤³¤È¤ËÂФ¹¤ëÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
5619 msg_print("You feel less resistant");
5629 /* Redraw status bar */
5630 p_ptr->redraw |= (PR_STATUS);
5632 /* Nothing to notice */
5633 if (!notice) return (FALSE);
5636 if (disturb_state) disturb(0, 0);
5638 /* Recalculate bonuses */
5639 p_ptr->update |= (PU_BONUS);
5648 bool set_tim_res_nether(int v, bool do_dec)
5650 bool notice = FALSE;
5652 /* Hack -- Force good values */
5653 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
5655 if (p_ptr->is_dead) return FALSE;
5660 if (p_ptr->tim_res_nether && !do_dec)
5662 if (p_ptr->tim_res_nether > v) return FALSE;
5664 else if (!p_ptr->tim_res_nether)
5667 msg_print("ÃϹö¤ÎÎϤËÂФ·¤ÆÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
5669 msg_print("You feel nether resistant!");
5679 if (p_ptr->tim_res_nether)
5682 msg_print("ÃϹö¤ÎÎϤËÂФ¹¤ëÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
5684 msg_print("You feel less nether resistant");
5692 p_ptr->tim_res_nether = v;
5694 /* Redraw status bar */
5695 p_ptr->redraw |= (PR_STATUS);
5697 /* Nothing to notice */
5698 if (!notice) return (FALSE);
5701 if (disturb_state) disturb(0, 0);
5703 /* Recalculate bonuses */
5704 p_ptr->update |= (PU_BONUS);
5713 bool set_tim_res_time(int v, bool do_dec)
5715 bool notice = FALSE;
5717 /* Hack -- Force good values */
5718 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
5720 if (p_ptr->is_dead) return FALSE;
5725 if (p_ptr->tim_res_time && !do_dec)
5727 if (p_ptr->tim_res_time > v) return FALSE;
5729 else if (!p_ptr->tim_res_time)
5732 msg_print("»þ´ÖµÕž¤ÎÎϤËÂФ·¤ÆÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
5734 msg_print("You feel time resistant!");
5744 if (p_ptr->tim_res_time)
5747 msg_print("»þ´ÖµÕž¤ÎÎϤËÂФ¹¤ëÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
5749 msg_print("You feel less time resistant");
5757 p_ptr->tim_res_time = v;
5759 /* Redraw status bar */
5760 p_ptr->redraw |= (PR_STATUS);
5762 /* Nothing to notice */
5763 if (!notice) return (FALSE);
5766 if (disturb_state) disturb(0, 0);
5768 /* Recalculate bonuses */
5769 p_ptr->update |= (PU_BONUS);
5780 * Choose a warrior-mage elemental attack. -LM-
5782 bool choose_ele_attack(void)
5788 if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM))
5791 msg_format("Éð´ï¤ò»ý¤¿¤Ê¤¤¤ÈËâË¡·õ¤Ï»È¤¨¤Ê¤¤¡£");
5793 msg_format("You cannot use temporary branding with no weapon.");
5801 num = (p_ptr->lev - 20) / 5;
5804 c_prt(TERM_RED, " a) ¾Æ´þ", 2, 14);
5806 c_prt(TERM_RED, " a) Fire Brand", 2, 14);
5810 if (num >= 2) c_prt(TERM_L_WHITE," b) Åà·ë", 3, 14);
5812 if (num >= 2) c_prt(TERM_L_WHITE," b) Cold Brand", 3, 14);
5814 else prt("", 3, 14);
5817 if (num >= 3) c_prt(TERM_GREEN, " c) ÆÇ»¦", 4, 14);
5819 if (num >= 3) c_prt(TERM_GREEN, " c) Poison Brand", 4, 14);
5821 else prt("", 4, 14);
5824 if (num >= 4) c_prt(TERM_L_DARK, " d) Íϲò", 5, 14);
5826 if (num >= 4) c_prt(TERM_L_DARK, " d) Acid Brand", 5, 14);
5828 else prt("", 5, 14);
5831 if (num >= 5) c_prt(TERM_BLUE, " e) ÅÅ·â", 6, 14);
5833 if (num >= 5) c_prt(TERM_BLUE, " e) Elec Brand", 6, 14);
5835 else prt("", 6, 14);
5843 prt(" ¤É¤Î¸µÁǹ¶·â¤ò¤·¤Þ¤¹¤«¡©", 1, 14);
5845 prt(" Choose a temporary elemental brand ", 1, 14);
5850 if ((choice == 'a') || (choice == 'A'))
5851 set_ele_attack(ATTACK_FIRE, p_ptr->lev/2 + randint1(p_ptr->lev/2));
5852 else if (((choice == 'b') || (choice == 'B')) && (num >= 2))
5853 set_ele_attack(ATTACK_COLD, p_ptr->lev/2 + randint1(p_ptr->lev/2));
5854 else if (((choice == 'c') || (choice == 'C')) && (num >= 3))
5855 set_ele_attack(ATTACK_POIS, p_ptr->lev/2 + randint1(p_ptr->lev/2));
5856 else if (((choice == 'd') || (choice == 'D')) && (num >= 4))
5857 set_ele_attack(ATTACK_ACID, p_ptr->lev/2 + randint1(p_ptr->lev/2));
5858 else if (((choice == 'e') || (choice == 'E')) && (num >= 5))
5859 set_ele_attack(ATTACK_ELEC, p_ptr->lev/2 + randint1(p_ptr->lev/2));
5863 msg_print("ËâË¡·õ¤ò»È¤¦¤Î¤ò¤ä¤á¤¿¡£");
5865 msg_print("You cancel the temporary branding.");
5877 * Choose a elemental immune. -LM-
5879 bool choose_ele_immune(int turn)
5887 c_prt(TERM_RED, " a) ²Ð±ê", 2, 14);
5889 c_prt(TERM_RED, " a) Immune Fire", 2, 14);
5893 c_prt(TERM_L_WHITE," b) Î䵤", 3, 14);
5895 c_prt(TERM_L_WHITE," b) Immune Cold", 3, 14);
5899 c_prt(TERM_L_DARK, " c) »À", 4, 14);
5901 c_prt(TERM_L_DARK, " c) Immune Acid", 4, 14);
5905 c_prt(TERM_BLUE, " d) ÅÅ·â", 5, 14);
5907 c_prt(TERM_BLUE, " d) Immune Elec", 5, 14);
5918 prt(" ¤É¤Î¸µÁǤÎÌȱ֤ò¤Ä¤±¤Þ¤¹¤«¡©", 1, 14);
5920 prt(" Choose a temporary elemental immune ", 1, 14);
5925 if ((choice == 'a') || (choice == 'A'))
5926 set_ele_immune(DEFENSE_FIRE, turn);
5927 else if ((choice == 'b') || (choice == 'B'))
5928 set_ele_immune(DEFENSE_COLD, turn);
5929 else if ((choice == 'c') || (choice == 'C'))
5930 set_ele_immune(DEFENSE_ACID, turn);
5931 else if ((choice == 'd') || (choice == 'D'))
5932 set_ele_immune(DEFENSE_ELEC, turn);
5936 msg_print("Ìȱ֤òÉÕ¤±¤ë¤Î¤ò¤ä¤á¤¿¡£");
5938 msg_print("You cancel the temporary immune.");