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_ffall = 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 m_list[p_ptr->riding].fast = 0;
223 m_list[p_ptr->riding].slow = 0;
224 m_list[p_ptr->riding].invulner = 0;
227 if (p_ptr->pclass == CLASS_BARD)
229 p_ptr->magic_num1[0] = 0;
230 p_ptr->magic_num2[0] = 0;
236 * Set "p_ptr->tim_mimic", and "p_ptr->mimic_form",
237 * notice observable changes
239 bool set_mimic(int v, int p, bool do_dec)
243 /* Hack -- Force good values */
244 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
246 if (p_ptr->is_dead) return FALSE;
251 if (p_ptr->tim_mimic && (p_ptr->mimic_form == p) && !do_dec)
253 if (p_ptr->tim_mimic > v) return FALSE;
255 else if ((!p_ptr->tim_mimic) || (p_ptr->mimic_form != p))
258 msg_print("¼«Ê¬¤ÎÂΤ¬ÊѤï¤Ã¤Æ¤æ¤¯¤Î¤ò´¶¤¸¤¿¡£");
260 msg_print("You feel that your body changes.");
270 if (p_ptr->tim_mimic)
273 msg_print("ÊѿȤ¬²ò¤±¤¿¡£");
275 msg_print("You are no longer transformed.");
277 if (p_ptr->mimic_form == MIMIC_DEMON) set_oppose_fire(0, TRUE);
285 p_ptr->tim_mimic = v;
287 /* Nothing to notice */
296 p_ptr->redraw |= (PR_BASIC | PR_STATUS);
298 /* Recalculate bonuses */
299 p_ptr->update |= (PU_BONUS | PU_HP);
308 * Set "p_ptr->blind", notice observable changes
310 * Note the use of "PU_UN_LITE" and "PU_UN_VIEW", which is needed to
311 * memorize any terrain features which suddenly become "visible".
312 * Note that blindness is currently the only thing which can affect
313 * "player_can_see_bold()".
315 bool set_blind(int v)
319 /* Hack -- Force good values */
320 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
322 if (p_ptr->is_dead) return FALSE;
329 if (p_ptr->prace == RACE_ANDROID)
332 msg_print("¥»¥ó¥µ¡¼¤ò¤ä¤é¤ì¤¿¡ª");
334 msg_print("You are blind!");
340 msg_print("Ìܤ¬¸«¤¨¤Ê¤¯¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¡ª");
342 msg_print("You are blind!");
347 chg_virtue(V_ENLIGHTEN, -1);
356 if (p_ptr->prace == RACE_ANDROID)
359 msg_print("¥»¥ó¥µ¡¼¤¬Éüµì¤·¤¿¡£");
361 msg_print("You can see again.");
367 msg_print("¤ä¤Ã¤ÈÌܤ¬¸«¤¨¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£");
369 msg_print("You can see again.");
380 /* Redraw status bar */
381 p_ptr->redraw |= (PR_STATUS);
383 /* Nothing to notice */
384 if (!notice) return (FALSE);
387 if (disturb_state) disturb(0, 0);
389 /* Fully update the visuals */
390 p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE | PU_VIEW | PU_LITE | PU_MONSTERS | PU_MON_LITE);
393 p_ptr->redraw |= (PR_MAP);
396 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
407 * Set "p_ptr->confused", notice observable changes
409 bool set_confused(int v)
413 /* Hack -- Force good values */
414 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
416 if (p_ptr->is_dead) return FALSE;
421 if (!p_ptr->confused)
424 msg_print("¤¢¤Ê¤¿¤Ïº®Í𤷤¿¡ª");
426 msg_print("You are confused!");
429 if (p_ptr->action == ACTION_LEARN)
432 msg_print("³Ø½¬¤¬Â³¤±¤é¤ì¤Ê¤¤¡ª");
434 msg_print("You cannot continue Learning!");
438 p_ptr->redraw |= (PR_STATE);
439 p_ptr->action = ACTION_NONE;
441 if (p_ptr->action == ACTION_KAMAE)
444 msg_print("¹½¤¨¤¬¤È¤±¤¿¡£");
446 msg_print("Your posture gets loose.");
448 p_ptr->special_defense &= ~(KAMAE_MASK);
449 p_ptr->update |= (PU_BONUS);
450 p_ptr->redraw |= (PR_STATE);
451 p_ptr->action = ACTION_NONE;
453 else if (p_ptr->action == ACTION_KATA)
456 msg_print("·¿¤¬Êø¤ì¤¿¡£");
458 msg_print("Your posture gets loose.");
460 p_ptr->special_defense &= ~(KATA_MASK);
461 p_ptr->update |= (PU_BONUS);
462 p_ptr->update |= (PU_MONSTERS);
463 p_ptr->redraw |= (PR_STATE);
464 p_ptr->redraw |= (PR_STATUS);
465 p_ptr->action = ACTION_NONE;
469 p_ptr->counter = FALSE;
470 chg_virtue(V_HARMONY, -1);
480 msg_print("¤ä¤Ã¤Èº®Í𤬤ª¤µ¤Þ¤Ã¤¿¡£");
482 msg_print("You feel less confused now.");
485 p_ptr->special_attack &= ~(ATTACK_SUIKEN);
493 /* Redraw status bar */
494 p_ptr->redraw |= (PR_STATUS);
496 /* Nothing to notice */
497 if (!notice) return (FALSE);
500 if (disturb_state) disturb(0, 0);
511 * Set "p_ptr->poisoned", notice observable changes
513 bool set_poisoned(int v)
517 /* Hack -- Force good values */
518 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
520 if (p_ptr->is_dead) return FALSE;
525 if (!p_ptr->poisoned)
528 msg_print("ÆǤ˿¯¤µ¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª");
530 msg_print("You are poisoned!");
543 msg_print("¤ä¤Ã¤ÈÆǤÎÄˤߤ¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
545 msg_print("You are no longer poisoned.");
555 /* Redraw status bar */
556 p_ptr->redraw |= (PR_STATUS);
558 /* Nothing to notice */
559 if (!notice) return (FALSE);
562 if (disturb_state) disturb(0, 0);
573 * Set "p_ptr->afraid", notice observable changes
575 bool set_afraid(int v)
579 /* Hack -- Force good values */
580 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
582 if (p_ptr->is_dead) return FALSE;
590 msg_print("²¿¤â¤«¤â¶²¤¯¤Ê¤Ã¤Æ¤¤¿¡ª");
592 msg_print("You are terrified!");
595 if (p_ptr->special_defense & KATA_MASK)
598 msg_print("·¿¤¬Êø¤ì¤¿¡£");
600 msg_print("Your posture gets loose.");
602 p_ptr->special_defense &= ~(KATA_MASK);
603 p_ptr->update |= (PU_BONUS);
604 p_ptr->update |= (PU_MONSTERS);
605 p_ptr->redraw |= (PR_STATE);
606 p_ptr->redraw |= (PR_STATUS);
607 p_ptr->action = ACTION_NONE;
611 p_ptr->counter = FALSE;
612 chg_virtue(V_VALOUR, -1);
622 msg_print("¤ä¤Ã¤È¶²Éݤò¿¶¤êʧ¤Ã¤¿¡£");
624 msg_print("You feel bolder now.");
634 /* Redraw status bar */
635 p_ptr->redraw |= (PR_STATUS);
637 /* Nothing to notice */
638 if (!notice) return (FALSE);
641 if (disturb_state) disturb(0, 0);
652 * Set "p_ptr->paralyzed", notice observable changes
654 bool set_paralyzed(int v)
658 /* Hack -- Force good values */
659 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
661 if (p_ptr->is_dead) return FALSE;
666 if (!p_ptr->paralyzed)
669 msg_print("ÂΤ¬Ëãá㤷¤Æ¤·¤Þ¤Ã¤¿¡ª");
671 msg_print("You are paralyzed!");
674 p_ptr->counter = FALSE;
682 if (p_ptr->paralyzed)
685 msg_print("¤ä¤Ã¤ÈÆ°¤±¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£");
687 msg_print("You can move again.");
695 p_ptr->paralyzed = v;
697 /* Redraw status bar */
698 p_ptr->redraw |= (PR_STATUS);
700 /* Nothing to notice */
701 if (!notice) return (FALSE);
704 if (disturb_state) disturb(0, 0);
706 /* Redraw the state */
707 p_ptr->redraw |= (PR_STATE);
718 * Set "p_ptr->image", notice observable changes
720 * Note that we must redraw the map when hallucination changes.
722 bool set_image(int v)
726 /* Hack -- Force good values */
727 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
729 if (p_ptr->is_dead) return FALSE;
735 set_tsuyoshi(0, TRUE);
739 msg_print("¥ï¡¼¥ª¡ª²¿¤â¤«¤âÆú¿§¤Ë¸«¤¨¤ë¡ª");
741 msg_print("Oh, wow! Everything looks so cosmic now!");
744 p_ptr->counter = FALSE;
755 msg_print("¤ä¤Ã¤È¤Ï¤Ã¤¤ê¤Èʪ¤¬¸«¤¨¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£");
757 msg_print("You can see clearly again.");
767 /* Redraw status bar */
768 p_ptr->redraw |= (PR_STATUS);
770 /* Nothing to notice */
771 if (!notice) return (FALSE);
774 if (disturb_state) disturb(0, 0);
777 p_ptr->redraw |= (PR_MAP);
779 /* Update monsters */
780 p_ptr->update |= (PU_MONSTERS);
783 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
794 * Set "p_ptr->fast", notice observable changes
796 bool set_fast(int v, bool do_dec)
800 /* Hack -- Force good values */
801 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
803 if (p_ptr->is_dead) return FALSE;
808 if (p_ptr->fast && !do_dec)
810 if (p_ptr->fast > v) return FALSE;
812 else if (!IS_FAST() && !p_ptr->lightspeed)
815 msg_print("ÁÇÁ᤯ư¤±¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡ª");
817 msg_print("You feel yourself moving much faster!");
821 chg_virtue(V_PATIENCE, -1);
822 chg_virtue(V_DILIGENCE, 1);
829 if (p_ptr->fast && !p_ptr->lightspeed && !music_singing(MUSIC_SPEED) && !music_singing(MUSIC_SHERO))
832 msg_print("Æ°¤¤ÎÁÇÁᤵ¤¬¤Ê¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£");
834 msg_print("You feel yourself slow down.");
844 /* Nothing to notice */
845 if (!notice) return (FALSE);
848 if (disturb_state) disturb(0, 0);
850 /* Recalculate bonuses */
851 p_ptr->update |= (PU_BONUS);
862 * Set "p_ptr->lightspeed", notice observable changes
864 bool set_lightspeed(int v, bool do_dec)
868 /* Hack -- Force good values */
869 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
871 if (p_ptr->is_dead) return FALSE;
876 if (p_ptr->lightspeed && !do_dec)
878 if (p_ptr->lightspeed > v) return FALSE;
880 else if (!p_ptr->lightspeed)
883 msg_print("Èó¾ï¤ËÁÇÁ᤯ư¤±¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡ª");
885 msg_print("You feel yourself moving extremely faster!");
889 chg_virtue(V_PATIENCE, -1);
890 chg_virtue(V_DILIGENCE, 1);
897 if (p_ptr->lightspeed)
900 msg_print("Æ°¤¤ÎÁÇÁᤵ¤¬¤Ê¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£");
902 msg_print("You feel yourself slow down.");
910 p_ptr->lightspeed = v;
912 /* Nothing to notice */
913 if (!notice) return (FALSE);
916 if (disturb_state) disturb(0, 0);
918 /* Recalculate bonuses */
919 p_ptr->update |= (PU_BONUS);
930 * Set "p_ptr->slow", notice observable changes
932 bool set_slow(int v, bool do_dec)
936 /* Hack -- Force good values */
937 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
939 if (p_ptr->is_dead) return FALSE;
944 if (p_ptr->slow && !do_dec)
946 if (p_ptr->slow > v) return FALSE;
948 else if (!p_ptr->slow)
951 msg_print("ÂΤÎÆ°¤¤¬ÃÙ¤¯¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¡ª");
953 msg_print("You feel yourself moving slower!");
966 msg_print("Æ°¤¤ÎÃÙ¤µ¤¬¤Ê¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£");
968 msg_print("You feel yourself speed up.");
978 /* Nothing to notice */
979 if (!notice) return (FALSE);
982 if (disturb_state) disturb(0, 0);
984 /* Recalculate bonuses */
985 p_ptr->update |= (PU_BONUS);
996 * Set "p_ptr->shield", notice observable changes
998 bool set_shield(int v, bool do_dec)
1000 bool notice = FALSE;
1002 /* Hack -- Force good values */
1003 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1005 if (p_ptr->is_dead) return FALSE;
1010 if (p_ptr->shield && !do_dec)
1012 if (p_ptr->shield > v) return FALSE;
1014 else if (!p_ptr->shield)
1017 msg_print("È©¤¬ÀФˤʤä¿¡£");
1019 msg_print("Your skin turns to stone.");
1032 msg_print("È©¤¬¸µ¤ËÌá¤Ã¤¿¡£");
1034 msg_print("Your skin returns to normal.");
1044 /* Redraw status bar */
1045 p_ptr->redraw |= (PR_STATUS);
1047 /* Nothing to notice */
1048 if (!notice) return (FALSE);
1051 if (disturb_state) disturb(0, 0);
1053 /* Recalculate bonuses */
1054 p_ptr->update |= (PU_BONUS);
1066 * Set "p_ptr->tsubureru", notice observable changes
1068 bool set_tsubureru(int v, bool do_dec)
1070 bool notice = FALSE;
1072 /* Hack -- Force good values */
1073 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1075 if (p_ptr->is_dead) return FALSE;
1080 if (p_ptr->tsubureru && !do_dec)
1082 if (p_ptr->tsubureru > v) return FALSE;
1084 else if (!p_ptr->tsubureru)
1087 msg_print("²£¤Ë¿¤Ó¤¿¡£");
1089 msg_print("Your body expands horizontally.");
1099 if (p_ptr->tsubureru)
1102 msg_print("¤â¤¦²£¤Ë¿¤Ó¤Æ¤¤¤Ê¤¤¡£");
1104 msg_print("Your body returns to normal.");
1112 p_ptr->tsubureru = v;
1114 /* Redraw status bar */
1115 p_ptr->redraw |= (PR_STATUS);
1117 /* Nothing to notice */
1118 if (!notice) return (FALSE);
1121 if (disturb_state) disturb(0, 0);
1123 /* Recalculate bonuses */
1124 p_ptr->update |= (PU_BONUS);
1136 * Set "p_ptr->magicdef", notice observable changes
1138 bool set_magicdef(int v, bool do_dec)
1140 bool notice = FALSE;
1142 /* Hack -- Force good values */
1143 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1145 if (p_ptr->is_dead) return FALSE;
1150 if (p_ptr->magicdef && !do_dec)
1152 if (p_ptr->magicdef > v) return FALSE;
1154 else if (!p_ptr->magicdef)
1157 msg_print("ËâË¡¤ÎËɸæÎϤ¬Áý¤·¤¿¤è¤¦¤Êµ¤¤¬¤¹¤ë¡£");
1159 msg_print("You feel more resistant to magic.");
1169 if (p_ptr->magicdef)
1172 msg_print("ËâË¡¤ÎËɸæÎϤ¬¸µ¤ËÌá¤Ã¤¿¡£");
1174 msg_print("You feel less resistant to magic.");
1182 p_ptr->magicdef = v;
1184 /* Redraw status bar */
1185 p_ptr->redraw |= (PR_STATUS);
1187 /* Nothing to notice */
1188 if (!notice) return (FALSE);
1191 if (disturb_state) disturb(0, 0);
1193 /* Recalculate bonuses */
1194 p_ptr->update |= (PU_BONUS);
1206 * Set "p_ptr->blessed", notice observable changes
1208 bool set_blessed(int v, bool do_dec)
1210 bool notice = FALSE;
1212 /* Hack -- Force good values */
1213 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1215 if (p_ptr->is_dead) return FALSE;
1220 if (p_ptr->blessed && !do_dec)
1222 if (p_ptr->blessed > v) return FALSE;
1224 else if (!IS_BLESSED())
1227 msg_print("¹â·é¤Êµ¤Ê¬¤Ë¤Ê¤Ã¤¿¡ª");
1229 msg_print("You feel righteous!");
1239 if (p_ptr->blessed && !music_singing(MUSIC_BLESS))
1242 msg_print("¹â·é¤Êµ¤Ê¬¤¬¾Ã¤¨¼º¤»¤¿¡£");
1244 msg_print("The prayer has expired.");
1254 /* Redraw status bar */
1255 p_ptr->redraw |= (PR_STATUS);
1257 /* Nothing to notice */
1258 if (!notice) return (FALSE);
1261 if (disturb_state) disturb(0, 0);
1263 /* Recalculate bonuses */
1264 p_ptr->update |= (PU_BONUS);
1275 * Set "p_ptr->hero", notice observable changes
1277 bool set_hero(int v, bool do_dec)
1279 bool notice = FALSE;
1281 /* Hack -- Force good values */
1282 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1284 if (p_ptr->is_dead) return FALSE;
1289 if (p_ptr->hero && !do_dec)
1291 if (p_ptr->hero > v) return FALSE;
1293 else if (!IS_HERO())
1296 msg_print("¥Ò¡¼¥í¡¼¤Ë¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡ª");
1298 msg_print("You feel like a hero!");
1308 if (p_ptr->hero && !music_singing(MUSIC_HERO) && !music_singing(MUSIC_SHERO))
1311 msg_print("¥Ò¡¼¥í¡¼¤Îµ¤Ê¬¤¬¾Ã¤¨¼º¤»¤¿¡£");
1313 msg_print("The heroism wears off.");
1323 /* Redraw status bar */
1324 p_ptr->redraw |= (PR_STATUS);
1326 /* Nothing to notice */
1327 if (!notice) return (FALSE);
1330 if (disturb_state) disturb(0, 0);
1332 /* Recalculate bonuses */
1333 p_ptr->update |= (PU_BONUS);
1335 /* Recalculate hitpoints */
1336 p_ptr->update |= (PU_HP);
1347 * Set "p_ptr->shero", notice observable changes
1349 bool set_shero(int v, bool do_dec)
1351 bool notice = FALSE;
1353 /* Hack -- Force good values */
1354 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1356 if (p_ptr->is_dead) return FALSE;
1358 if (p_ptr->pclass == CLASS_BERSERKER) v = 1;
1362 if (p_ptr->shero && !do_dec)
1364 if (p_ptr->shero > v) return FALSE;
1366 else if (!p_ptr->shero)
1369 msg_print("»¦Ù¤¥Þ¥·¡¼¥ó¤Ë¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡ª");
1371 msg_print("You feel like a killing machine!");
1384 msg_print("ÌîÈڤʵ¤»ý¤Á¤¬¾Ã¤¨¼º¤»¤¿¡£");
1386 msg_print("You feel less Berserk.");
1396 /* Redraw status bar */
1397 p_ptr->redraw |= (PR_STATUS);
1399 /* Nothing to notice */
1400 if (!notice) return (FALSE);
1403 if (disturb_state) disturb(0, 0);
1405 /* Recalculate bonuses */
1406 p_ptr->update |= (PU_BONUS);
1408 /* Recalculate hitpoints */
1409 p_ptr->update |= (PU_HP);
1420 * Set "p_ptr->protevil", notice observable changes
1422 bool set_protevil(int v, bool do_dec)
1424 bool notice = FALSE;
1426 /* Hack -- Force good values */
1427 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1429 if (p_ptr->is_dead) return FALSE;
1434 if (p_ptr->protevil && !do_dec)
1436 if (p_ptr->protevil > v) return FALSE;
1438 else if (!p_ptr->protevil)
1441 msg_print("¼Ù°¤Ê¤ë¸ºß¤«¤é¼é¤é¤ì¤Æ¤¤¤ë¤è¤¦¤Ê´¶¤¸¤¬¤¹¤ë¡ª");
1443 msg_print("You feel safe from evil!");
1453 if (p_ptr->protevil)
1456 msg_print("¼Ù°¤Ê¤ë¸ºß¤«¤é¼é¤é¤ì¤Æ¤¤¤ë´¶¤¸¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
1458 msg_print("You no longer feel safe from evil.");
1466 p_ptr->protevil = v;
1468 /* Redraw status bar */
1469 p_ptr->redraw |= (PR_STATUS);
1471 /* Nothing to notice */
1472 if (!notice) return (FALSE);
1475 if (disturb_state) disturb(0, 0);
1485 * Set "p_ptr->wraith_form", notice observable changes
1487 bool set_wraith_form(int v, bool do_dec)
1489 bool notice = FALSE;
1491 /* Hack -- Force good values */
1492 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1494 if (p_ptr->is_dead) return FALSE;
1499 if (p_ptr->wraith_form && !do_dec)
1501 if (p_ptr->wraith_form > v) return FALSE;
1503 else if (!p_ptr->wraith_form)
1506 msg_print("ʪ¼Á³¦¤òÎ¥¤ì¤ÆÍ©µ´¤Î¤è¤¦¤Ê¸ºß¤Ë¤Ê¤Ã¤¿¡ª");
1508 msg_print("You leave the physical world and turn into a wraith-being!");
1513 chg_virtue(V_UNLIFE, 3);
1514 chg_virtue(V_HONOUR, -2);
1515 chg_virtue(V_SACRIFICE, -2);
1516 chg_virtue(V_VALOUR, -5);
1519 p_ptr->redraw |= (PR_MAP);
1521 /* Update monsters */
1522 p_ptr->update |= (PU_MONSTERS);
1525 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1532 if (p_ptr->wraith_form)
1535 msg_print("ÉÔÆ©ÌÀ¤Ë¤Ê¤Ã¤¿´¶¤¸¤¬¤¹¤ë¡£");
1537 msg_print("You feel opaque.");
1543 p_ptr->redraw |= (PR_MAP);
1545 /* Update monsters */
1546 p_ptr->update |= (PU_MONSTERS);
1549 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1554 p_ptr->wraith_form = v;
1556 /* Redraw status bar */
1557 p_ptr->redraw |= (PR_STATUS);
1559 /* Nothing to notice */
1560 if (!notice) return (FALSE);
1563 if (disturb_state) disturb(0, 0);
1565 /* Recalculate bonuses */
1566 p_ptr->update |= (PU_BONUS);
1581 * Set "p_ptr->invuln", notice observable changes
1583 bool set_invuln(int v, bool do_dec)
1585 bool notice = FALSE;
1587 /* Hack -- Force good values */
1588 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1590 if (p_ptr->is_dead) return FALSE;
1595 if (p_ptr->invuln && !do_dec)
1597 if (p_ptr->invuln > v) return FALSE;
1599 else if (!IS_INVULN())
1602 msg_print("̵Ũ¤À¡ª");
1604 msg_print("Invulnerability!");
1609 chg_virtue(V_UNLIFE, -2);
1610 chg_virtue(V_HONOUR, -2);
1611 chg_virtue(V_SACRIFICE, -3);
1612 chg_virtue(V_VALOUR, -5);
1615 p_ptr->redraw |= (PR_MAP);
1617 /* Update monsters */
1618 p_ptr->update |= (PU_MONSTERS);
1621 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1628 if (p_ptr->invuln && !music_singing(MUSIC_INVULN))
1631 msg_print("̵Ũ¤Ç¤Ï¤Ê¤¯¤Ê¤Ã¤¿¡£");
1633 msg_print("The invulnerability wears off.");
1639 p_ptr->redraw |= (PR_MAP);
1641 /* Update monsters */
1642 p_ptr->update |= (PU_MONSTERS);
1645 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1647 p_ptr->energy_need += ENERGY_NEED();
1654 /* Redraw status bar */
1655 p_ptr->redraw |= (PR_STATUS);
1657 /* Nothing to notice */
1658 if (!notice) return (FALSE);
1661 if (disturb_state) disturb(0, 0);
1663 /* Recalculate bonuses */
1664 p_ptr->update |= (PU_BONUS);
1675 * Set "p_ptr->tim_esp", notice observable changes
1677 bool set_tim_esp(int v, bool do_dec)
1679 bool notice = FALSE;
1681 /* Hack -- Force good values */
1682 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1684 if (p_ptr->is_dead) return FALSE;
1689 if (p_ptr->tim_esp && !do_dec)
1691 if (p_ptr->tim_esp > v) return FALSE;
1693 else if (!IS_TIM_ESP())
1696 msg_print("°Õ¼±¤¬¹¤¬¤Ã¤¿µ¤¤¬¤¹¤ë¡ª");
1698 msg_print("You feel your consciousness expand!");
1708 if (p_ptr->tim_esp && !music_singing(MUSIC_MIND))
1711 msg_print("°Õ¼±¤Ï¸µ¤ËÌá¤Ã¤¿¡£");
1713 msg_print("Your consciousness contracts again.");
1723 /* Redraw status bar */
1724 p_ptr->redraw |= (PR_STATUS);
1726 /* Nothing to notice */
1727 if (!notice) return (FALSE);
1730 if (disturb_state) disturb(0, 0);
1732 /* Recalculate bonuses */
1733 p_ptr->update |= (PU_BONUS);
1735 /* Update the monsters */
1736 p_ptr->update |= (PU_MONSTERS);
1747 * Set "p_ptr->tim_invis", notice observable changes
1749 bool set_tim_invis(int v, bool do_dec)
1751 bool notice = FALSE;
1753 /* Hack -- Force good values */
1754 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1756 if (p_ptr->is_dead) return FALSE;
1761 if (p_ptr->tim_invis && !do_dec)
1763 if (p_ptr->tim_invis > v) return FALSE;
1765 else if (!p_ptr->tim_invis)
1768 msg_print("Ìܤ¬Èó¾ï¤ËÉÒ´¶¤Ë¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡ª");
1770 msg_print("Your eyes feel very sensitive!");
1780 if (p_ptr->tim_invis)
1783 msg_print("ÌܤÎÉÒ´¶¤µ¤¬¤Ê¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£");
1785 msg_print("Your eyes feel less sensitive.");
1793 p_ptr->tim_invis = v;
1795 /* Redraw status bar */
1796 p_ptr->redraw |= (PR_STATUS);
1798 /* Nothing to notice */
1799 if (!notice) return (FALSE);
1802 if (disturb_state) disturb(0, 0);
1804 /* Recalculate bonuses */
1805 p_ptr->update |= (PU_BONUS);
1807 /* Update the monsters */
1808 p_ptr->update |= (PU_MONSTERS);
1819 * Set "p_ptr->tim_infra", notice observable changes
1821 bool set_tim_infra(int v, bool do_dec)
1823 bool notice = FALSE;
1825 /* Hack -- Force good values */
1826 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1828 if (p_ptr->is_dead) return FALSE;
1833 if (p_ptr->tim_infra && !do_dec)
1835 if (p_ptr->tim_infra > v) return FALSE;
1837 else if (!p_ptr->tim_infra)
1840 msg_print("Ìܤ¬¥é¥ó¥é¥ó¤Èµ±¤»Ï¤á¤¿¡ª");
1842 msg_print("Your eyes begin to tingle!");
1852 if (p_ptr->tim_infra)
1855 msg_print("Ìܤ層¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
1857 msg_print("Your eyes stop tingling.");
1865 p_ptr->tim_infra = v;
1867 /* Redraw status bar */
1868 p_ptr->redraw |= (PR_STATUS);
1870 /* Nothing to notice */
1871 if (!notice) return (FALSE);
1874 if (disturb_state) disturb(0, 0);
1876 /* Recalculate bonuses */
1877 p_ptr->update |= (PU_BONUS);
1879 /* Update the monsters */
1880 p_ptr->update |= (PU_MONSTERS);
1891 * Set "p_ptr->tim_regen", notice observable changes
1893 bool set_tim_regen(int v, bool do_dec)
1895 bool notice = FALSE;
1897 /* Hack -- Force good values */
1898 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1900 if (p_ptr->is_dead) return FALSE;
1905 if (p_ptr->tim_regen && !do_dec)
1907 if (p_ptr->tim_regen > v) return FALSE;
1909 else if (!p_ptr->tim_regen)
1912 msg_print("²óÉüÎϤ¬¾å¤¬¤Ã¤¿¡ª");
1914 msg_print("You feel yourself regenerating quickly!");
1924 if (p_ptr->tim_regen)
1927 msg_print("ÁÇÁ᤯²óÉü¤¹¤ë´¶¤¸¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
1929 msg_print("You feel yourself regenerating slowly.");
1937 p_ptr->tim_regen = v;
1939 /* Redraw status bar */
1940 p_ptr->redraw |= (PR_STATUS);
1942 /* Nothing to notice */
1943 if (!notice) return (FALSE);
1946 if (disturb_state) disturb(0, 0);
1948 /* Recalculate bonuses */
1949 p_ptr->update |= (PU_BONUS);
1960 * Set "p_ptr->tim_stealth", notice observable changes
1962 bool set_tim_stealth(int v, bool do_dec)
1964 bool notice = FALSE;
1966 /* Hack -- Force good values */
1967 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1969 if (p_ptr->is_dead) return FALSE;
1974 if (p_ptr->tim_stealth && !do_dec)
1976 if (p_ptr->tim_stealth > v) return FALSE;
1978 else if (!IS_TIM_STEALTH())
1981 msg_print("²»¤¬¾®¤µ¤¯¤Ê¤Ã¤¿¡ª");
1983 msg_print("You begin to walk silently!");
1993 if (p_ptr->tim_stealth && !music_singing(MUSIC_STEALTH))
1996 msg_print("²»¤¬Â礤¯¤Ê¤Ã¤¿¡£");
1998 msg_print("You no longer walk silently.");
2006 p_ptr->tim_stealth = v;
2008 /* Redraw status bar */
2009 p_ptr->redraw |= (PR_STATUS);
2011 /* Nothing to notice */
2012 if (!notice) return (FALSE);
2015 if (disturb_state) disturb(0, 0);
2017 /* Recalculate bonuses */
2018 p_ptr->update |= (PU_BONUS);
2028 bool set_superstealth(bool set)
2030 bool notice = FALSE;
2032 if (p_ptr->is_dead) return FALSE;
2037 if (!(p_ptr->special_defense & NINJA_S_STEALTH))
2039 if (cave[py][px].info & CAVE_MNLT)
2042 msg_print("Ũ¤ÎÌܤ«¤éÇö¤¤±Æ¤ÎÃæ¤Ëʤ¤¤±£¤µ¤ì¤¿¡£");
2044 msg_print("You are mantled in weak shadow from ordinary eyes.");
2046 p_ptr->monlite = p_ptr->old_monlite = TRUE;
2051 msg_print("Ũ¤ÎÌܤ«¤é±Æ¤ÎÃæ¤Ëʤ¤¤±£¤µ¤ì¤¿¡ª");
2053 msg_print("You are mantled in shadow from ordinary eyes!");
2055 p_ptr->monlite = p_ptr->old_monlite = FALSE;
2061 p_ptr->special_defense |= NINJA_S_STEALTH;
2068 if (p_ptr->special_defense & NINJA_S_STEALTH)
2071 msg_print("ºÆ¤ÓŨ¤ÎÌܤˤµ¤é¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£");
2073 msg_print("You are exposed to common sight once more.");
2079 p_ptr->special_defense &= ~(NINJA_S_STEALTH);
2083 /* Nothing to notice */
2084 if (!notice) return (FALSE);
2086 /* Redraw status bar */
2087 p_ptr->redraw |= (PR_STATUS);
2090 if (disturb_state) disturb(0, 0);
2098 * Set "p_ptr->tim_ffall", notice observable changes
2100 bool set_tim_ffall(int v, bool do_dec)
2102 bool notice = FALSE;
2104 /* Hack -- Force good values */
2105 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2107 if (p_ptr->is_dead) return FALSE;
2112 if (p_ptr->tim_ffall && !do_dec)
2114 if (p_ptr->tim_ffall > v) return FALSE;
2116 else if (!p_ptr->tim_ffall)
2119 msg_print("ÂΤ¬Ãè¤ËÉ⤻Ϥ᤿¡£");
2121 msg_print("You begin to fly!");
2131 if (p_ptr->tim_ffall)
2134 msg_print("¤â¤¦Ãè¤ËÉ⤫¤Ù¤Ê¤¯¤Ê¤Ã¤¿¡£");
2136 msg_print("You stop flying.");
2144 p_ptr->tim_ffall = v;
2146 /* Redraw status bar */
2147 p_ptr->redraw |= (PR_STATUS);
2149 /* Nothing to notice */
2150 if (!notice) return (FALSE);
2153 if (disturb_state) disturb(0, 0);
2155 /* Recalculate bonuses */
2156 p_ptr->update |= (PU_BONUS);
2167 * Set "p_ptr->tim_sh_touki", notice observable changes
2169 bool set_tim_sh_touki(int v, bool do_dec)
2171 bool notice = FALSE;
2173 /* Hack -- Force good values */
2174 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2176 if (p_ptr->is_dead) return FALSE;
2181 if (p_ptr->tim_sh_touki && !do_dec)
2183 if (p_ptr->tim_sh_touki > v) return FALSE;
2185 else if (!p_ptr->tim_sh_touki)
2188 msg_print("ÂΤ¬Æ®µ¤¤Î¥ª¡¼¥é¤Çʤ¤ï¤ì¤¿¡£");
2190 msg_print("You have enveloped by the aura of the Force!");
2200 if (p_ptr->tim_sh_touki)
2203 msg_print("Æ®µ¤¤¬¾Ã¤¨¤¿¡£");
2205 msg_print("Aura of the Force disappeared.");
2213 p_ptr->tim_sh_touki = v;
2215 /* Redraw status bar */
2216 p_ptr->redraw |= (PR_STATUS);
2218 /* Nothing to notice */
2219 if (!notice) return (FALSE);
2222 if (disturb_state) disturb(0, 0);
2233 * Set "p_ptr->tim_sh_fire", notice observable changes
2235 bool set_tim_sh_fire(int v, bool do_dec)
2237 bool notice = FALSE;
2239 /* Hack -- Force good values */
2240 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2242 if (p_ptr->is_dead) return FALSE;
2247 if (p_ptr->tim_sh_fire && !do_dec)
2249 if (p_ptr->tim_sh_fire > v) return FALSE;
2251 else if (!p_ptr->tim_sh_fire)
2254 msg_print("ÂΤ¬±ê¤Î¥ª¡¼¥é¤Çʤ¤ï¤ì¤¿¡£");
2256 msg_print("You have enveloped by fiery aura!");
2266 if (p_ptr->tim_sh_fire)
2269 msg_print("±ê¤Î¥ª¡¼¥é¤¬¾Ã¤¨¤¿¡£");
2271 msg_print("Fiery aura disappeared.");
2279 p_ptr->tim_sh_fire = v;
2281 /* Redraw status bar */
2282 p_ptr->redraw |= (PR_STATUS);
2284 /* Nothing to notice */
2285 if (!notice) return (FALSE);
2288 if (disturb_state) disturb(0, 0);
2290 /* Recalculate bonuses */
2291 p_ptr->update |= (PU_BONUS);
2302 * Set "p_ptr->tim_sh_holy", notice observable changes
2304 bool set_tim_sh_holy(int v, bool do_dec)
2306 bool notice = FALSE;
2308 /* Hack -- Force good values */
2309 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2311 if (p_ptr->is_dead) return FALSE;
2316 if (p_ptr->tim_sh_holy && !do_dec)
2318 if (p_ptr->tim_sh_holy > v) return FALSE;
2320 else if (!p_ptr->tim_sh_holy)
2323 msg_print("ÂΤ¬À»¤Ê¤ë¥ª¡¼¥é¤Çʤ¤ï¤ì¤¿¡£");
2325 msg_print("You have enveloped by holy aura!");
2335 if (p_ptr->tim_sh_holy)
2338 msg_print("À»¤Ê¤ë¥ª¡¼¥é¤¬¾Ã¤¨¤¿¡£");
2340 msg_print("Holy aura disappeared.");
2348 p_ptr->tim_sh_holy = v;
2350 /* Redraw status bar */
2351 p_ptr->redraw |= (PR_STATUS);
2353 /* Nothing to notice */
2354 if (!notice) return (FALSE);
2357 if (disturb_state) disturb(0, 0);
2359 /* Recalculate bonuses */
2360 p_ptr->update |= (PU_BONUS);
2372 * Set "p_ptr->tim_eyeeye", notice observable changes
2374 bool set_tim_eyeeye(int v, bool do_dec)
2376 bool notice = FALSE;
2378 /* Hack -- Force good values */
2379 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2381 if (p_ptr->is_dead) return FALSE;
2386 if (p_ptr->tim_eyeeye && !do_dec)
2388 if (p_ptr->tim_eyeeye > v) return FALSE;
2390 else if (!p_ptr->tim_eyeeye)
2393 msg_print("Ë¡¤Î¼é¤ê¼ê¤Ë¤Ê¤Ã¤¿µ¤¤¬¤·¤¿¡ª");
2395 msg_print("You feel like a keeper of commandments!");
2405 if (p_ptr->tim_eyeeye)
2408 msg_print("Ĩȳ¤ò¼¹¹Ô¤¹¤ë¤³¤È¤¬¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2410 msg_print("You no longer feel like a keeper.");
2418 p_ptr->tim_eyeeye = v;
2420 /* Redraw status bar */
2421 p_ptr->redraw |= (PR_STATUS);
2423 /* Nothing to notice */
2424 if (!notice) return (FALSE);
2427 if (disturb_state) disturb(0, 0);
2429 /* Recalculate bonuses */
2430 p_ptr->update |= (PU_BONUS);
2442 * Set "p_ptr->resist_magic", notice observable changes
2444 bool set_resist_magic(int v, bool do_dec)
2446 bool notice = FALSE;
2448 /* Hack -- Force good values */
2449 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2451 if (p_ptr->is_dead) return FALSE;
2456 if (p_ptr->resist_magic && !do_dec)
2458 if (p_ptr->resist_magic > v) return FALSE;
2460 else if (!p_ptr->resist_magic)
2463 msg_print("ËâË¡¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿¡£");
2465 msg_print("You have been protected from magic!");
2475 if (p_ptr->resist_magic)
2478 msg_print("ËâË¡¤Ë¼å¤¯¤Ê¤Ã¤¿¡£");
2480 msg_print("You are no longer protected from magic.");
2488 p_ptr->resist_magic = v;
2490 /* Redraw status bar */
2491 p_ptr->redraw |= (PR_STATUS);
2493 /* Nothing to notice */
2494 if (!notice) return (FALSE);
2497 if (disturb_state) disturb(0, 0);
2499 /* Recalculate bonuses */
2500 p_ptr->update |= (PU_BONUS);
2511 * Set "p_ptr->tim_reflect", notice observable changes
2513 bool set_tim_reflect(int v, bool do_dec)
2515 bool notice = FALSE;
2517 /* Hack -- Force good values */
2518 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2520 if (p_ptr->is_dead) return FALSE;
2525 if (p_ptr->tim_reflect && !do_dec)
2527 if (p_ptr->tim_reflect > v) return FALSE;
2529 else if (!p_ptr->tim_reflect)
2532 msg_print("ÂΤÎɽÌ̤¬³ê¤«¤Ë¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£");
2534 msg_print("Your body becames smooth.");
2544 if (p_ptr->tim_reflect)
2547 msg_print("ÂΤÎɽÌ̤¬³ê¤«¤Ç¤Ê¤¯¤Ê¤Ã¤¿¡£");
2549 msg_print("Your body is no longer smooth.");
2557 p_ptr->tim_reflect = v;
2559 /* Redraw status bar */
2560 p_ptr->redraw |= (PR_STATUS);
2562 /* Nothing to notice */
2563 if (!notice) return (FALSE);
2566 if (disturb_state) disturb(0, 0);
2568 /* Recalculate bonuses */
2569 p_ptr->update |= (PU_BONUS);
2580 * Set "p_ptr->multishadow", notice observable changes
2582 bool set_multishadow(int v, bool do_dec)
2584 bool notice = FALSE;
2586 /* Hack -- Force good values */
2587 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2589 if (p_ptr->is_dead) return FALSE;
2594 if (p_ptr->multishadow && !do_dec)
2596 if (p_ptr->multishadow > v) return FALSE;
2598 else if (!p_ptr->multishadow)
2601 msg_print("¤¢¤Ê¤¿¤Î¼þ¤ê¤Ë¸¸±Æ¤¬À¸¤Þ¤ì¤¿¡£");
2603 msg_print("Your Shadow enveloped you.");
2613 if (p_ptr->multishadow)
2616 msg_print("¸¸±Æ¤¬¾Ã¤¨¤¿¡£");
2618 msg_print("Your Shadow disappears.");
2626 p_ptr->multishadow = v;
2628 /* Redraw status bar */
2629 p_ptr->redraw |= (PR_STATUS);
2631 /* Nothing to notice */
2632 if (!notice) return (FALSE);
2635 if (disturb_state) disturb(0, 0);
2637 /* Recalculate bonuses */
2638 p_ptr->update |= (PU_BONUS);
2649 * Set "p_ptr->dustrobe", notice observable changes
2651 bool set_dustrobe(int v, bool do_dec)
2653 bool notice = FALSE;
2655 /* Hack -- Force good values */
2656 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2658 if (p_ptr->is_dead) return FALSE;
2663 if (p_ptr->dustrobe && !do_dec)
2665 if (p_ptr->dustrobe > v) return FALSE;
2667 else if (!p_ptr->dustrobe)
2670 msg_print("ÂΤ¬¶À¤Î¥ª¡¼¥é¤Çʤ¤ï¤ì¤¿¡£");
2672 msg_print("You were enveloped by mirror shards.");
2682 if (p_ptr->dustrobe)
2685 msg_print("¶À¤Î¥ª¡¼¥é¤¬¾Ã¤¨¤¿¡£");
2687 msg_print("The mirror shards disappear.");
2695 p_ptr->dustrobe = v;
2697 /* Redraw status bar */
2698 p_ptr->redraw |= (PR_STATUS);
2700 /* Nothing to notice */
2701 if (!notice) return (FALSE);
2704 if (disturb_state) disturb(0, 0);
2706 /* Recalculate bonuses */
2707 p_ptr->update |= (PU_BONUS);
2718 * Set "p_ptr->tim_regen", notice observable changes
2720 bool set_kabenuke(int v, bool do_dec)
2722 bool notice = FALSE;
2724 /* Hack -- Force good values */
2725 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2727 if (p_ptr->is_dead) return FALSE;
2732 if (p_ptr->kabenuke && !do_dec)
2734 if (p_ptr->kabenuke > v) return FALSE;
2736 else if (!p_ptr->kabenuke)
2739 msg_print("ÂΤ¬È¾Êª¼Á¤Î¾õÂ֤ˤʤä¿¡£");
2741 msg_print("You became ethereal form.");
2751 if (p_ptr->kabenuke)
2754 msg_print("ÂΤ¬Êª¼Á²½¤·¤¿¡£");
2756 msg_print("You are no longer in an ethereal form.");
2764 p_ptr->kabenuke = v;
2766 /* Redraw status bar */
2767 p_ptr->redraw |= (PR_STATUS);
2769 /* Nothing to notice */
2770 if (!notice) return (FALSE);
2773 if (disturb_state) disturb(0, 0);
2783 bool set_tsuyoshi(int v, bool do_dec)
2785 bool notice = FALSE;
2787 /* Hack -- Force good values */
2788 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2790 if (p_ptr->is_dead) return FALSE;
2795 if (p_ptr->tsuyoshi && !do_dec)
2797 if (p_ptr->tsuyoshi > v) return FALSE;
2799 else if (!p_ptr->tsuyoshi)
2802 msg_print("¡Ö¥ª¥¯¥ì·»¤µ¤ó¡ª¡×");
2804 msg_print("Brother OKURE!");
2808 chg_virtue(V_VITALITY, 2);
2815 if (p_ptr->tsuyoshi)
2818 msg_print("ÆùÂΤ¬µÞ®¤Ë¤·¤Ü¤ó¤Ç¤¤¤Ã¤¿¡£");
2820 msg_print("Your body had quickly shriveled.");
2823 (void)dec_stat(A_CON, 20, TRUE);
2824 (void)dec_stat(A_STR, 20, TRUE);
2827 chg_virtue(V_VITALITY, -3);
2832 p_ptr->tsuyoshi = v;
2834 /* Redraw status bar */
2835 p_ptr->redraw |= (PR_STATUS);
2837 /* Nothing to notice */
2838 if (!notice) return (FALSE);
2841 if (disturb_state) disturb(0, 0);
2843 /* Recalculate bonuses */
2844 p_ptr->update |= (PU_BONUS);
2846 /* Recalculate hitpoints */
2847 p_ptr->update |= (PU_HP);
2858 * Set a temporary elemental brand. Clear all other brands. Print status
2861 bool set_ele_attack(u32b attack_type, int v)
2863 /* Hack -- Force good values */
2864 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2866 /* Clear all elemental attacks (only one is allowed at a time). */
2867 if ((p_ptr->special_attack & (ATTACK_ACID)) && (attack_type != ATTACK_ACID))
2869 p_ptr->special_attack &= ~(ATTACK_ACID);
2871 msg_print("»À¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2873 msg_print("Your temporary acidic brand fades away.");
2876 if ((p_ptr->special_attack & (ATTACK_ELEC)) && (attack_type != ATTACK_ELEC))
2878 p_ptr->special_attack &= ~(ATTACK_ELEC);
2880 msg_print("ÅÅ·â¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2882 msg_print("Your temporary electrical brand fades away.");
2885 if ((p_ptr->special_attack & (ATTACK_FIRE)) && (attack_type != ATTACK_FIRE))
2887 p_ptr->special_attack &= ~(ATTACK_FIRE);
2889 msg_print("²Ð±ê¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2891 msg_print("Your temporary fiery brand fades away.");
2894 if ((p_ptr->special_attack & (ATTACK_COLD)) && (attack_type != ATTACK_COLD))
2896 p_ptr->special_attack &= ~(ATTACK_COLD);
2898 msg_print("Î䵤¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2900 msg_print("Your temporary frost brand fades away.");
2903 if ((p_ptr->special_attack & (ATTACK_POIS)) && (attack_type != ATTACK_POIS))
2905 p_ptr->special_attack &= ~(ATTACK_POIS);
2907 msg_print("ÆǤǹ¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2909 msg_print("Your temporary poison brand fades away.");
2913 if ((v) && (attack_type))
2915 /* Set attack type. */
2916 p_ptr->special_attack |= (attack_type);
2919 p_ptr->ele_attack = v;
2923 msg_format("%s¤Ç¹¶·â¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡ª",
2924 ((attack_type == ATTACK_ACID) ? "»À" :
2925 ((attack_type == ATTACK_ELEC) ? "ÅÅ·â" :
2926 ((attack_type == ATTACK_FIRE) ? "²Ð±ê" :
2927 ((attack_type == ATTACK_COLD) ? "Î䵤" :
2928 ((attack_type == ATTACK_POIS) ? "ÆÇ" :
2931 msg_format("For a while, the blows you deal will %s",
2932 ((attack_type == ATTACK_ACID) ? "melt with acid!" :
2933 ((attack_type == ATTACK_ELEC) ? "shock your foes!" :
2934 ((attack_type == ATTACK_FIRE) ? "burn with fire!" :
2935 ((attack_type == ATTACK_COLD) ? "chill to the bone!" :
2936 ((attack_type == ATTACK_POIS) ? "poison your enemies!" :
2937 "do nothing special."))))));
2942 if (disturb_state) disturb(0, 0);
2944 /* Redraw status bar */
2945 p_ptr->redraw |= (PR_STATUS);
2947 p_ptr->update |= (PU_BONUS);
2957 * Set a temporary elemental brand. Clear all other brands. Print status
2960 bool set_ele_immune(u32b immune_type, int v)
2962 /* Hack -- Force good values */
2963 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2965 /* Clear all elemental attacks (only one is allowed at a time). */
2966 if ((p_ptr->special_defense & (DEFENSE_ACID)) && (immune_type != DEFENSE_ACID))
2968 p_ptr->special_defense &= ~(DEFENSE_ACID);
2970 msg_print("»À¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
2972 msg_print("You are no longer immune to acid.");
2975 if ((p_ptr->special_defense & (DEFENSE_ELEC)) && (immune_type != DEFENSE_ELEC))
2977 p_ptr->special_defense &= ~(DEFENSE_ELEC);
2979 msg_print("ÅÅ·â¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
2981 msg_print("You are no longer immune to electricity.");
2984 if ((p_ptr->special_defense & (DEFENSE_FIRE)) && (immune_type != DEFENSE_FIRE))
2986 p_ptr->special_defense &= ~(DEFENSE_FIRE);
2988 msg_print("²Ð±ê¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
2990 msg_print("You are no longer immune to fire.");
2993 if ((p_ptr->special_defense & (DEFENSE_COLD)) && (immune_type != DEFENSE_COLD))
2995 p_ptr->special_defense &= ~(DEFENSE_COLD);
2997 msg_print("Î䵤¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
2999 msg_print("You are no longer immune to cold.");
3002 if ((p_ptr->special_defense & (DEFENSE_POIS)) && (immune_type != DEFENSE_POIS))
3004 p_ptr->special_defense &= ~(DEFENSE_POIS);
3006 msg_print("ÆǤι¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3008 msg_print("You are no longer immune to poison.");
3012 if ((v) && (immune_type))
3014 /* Set attack type. */
3015 p_ptr->special_defense |= (immune_type);
3018 p_ptr->ele_immune = v;
3022 msg_format("%s¤Î¹¶·â¤ò¼õ¤±¤Ä¤±¤Ê¤¯¤Ê¤Ã¤¿¡ª",
3023 ((immune_type == DEFENSE_ACID) ? "»À" :
3024 ((immune_type == DEFENSE_ELEC) ? "ÅÅ·â" :
3025 ((immune_type == DEFENSE_FIRE) ? "²Ð±ê" :
3026 ((immune_type == DEFENSE_COLD) ? "Î䵤" :
3027 ((immune_type == DEFENSE_POIS) ? "ÆÇ" :
3030 msg_format("For a while, You are immune to %s",
3031 ((immune_type == DEFENSE_ACID) ? "acid!" :
3032 ((immune_type == DEFENSE_ELEC) ? "electricity!" :
3033 ((immune_type == DEFENSE_FIRE) ? "fire!" :
3034 ((immune_type == DEFENSE_COLD) ? "cold!" :
3035 ((immune_type == DEFENSE_POIS) ? "poison!" :
3036 "do nothing special."))))));
3041 if (disturb_state) disturb(0, 0);
3043 /* Redraw status bar */
3044 p_ptr->redraw |= (PR_STATUS);
3046 p_ptr->update |= (PU_BONUS);
3056 * Set "p_ptr->oppose_acid", notice observable changes
3058 bool set_oppose_acid(int v, bool do_dec)
3060 bool notice = FALSE;
3062 /* Hack -- Force good values */
3063 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3065 if (p_ptr->is_dead) return FALSE;
3070 if (p_ptr->oppose_acid && !do_dec)
3072 if (p_ptr->oppose_acid > v) return FALSE;
3074 else if (!IS_OPPOSE_ACID())
3077 msg_print("»À¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3079 msg_print("You feel resistant to acid!");
3089 if (p_ptr->oppose_acid && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3092 msg_print("»À¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3094 msg_print("You feel less resistant to acid.");
3102 p_ptr->oppose_acid = v;
3104 /* Nothing to notice */
3105 if (!notice) return (FALSE);
3107 /* Redraw status bar */
3108 p_ptr->redraw |= (PR_STATUS);
3111 if (disturb_state) disturb(0, 0);
3122 * Set "p_ptr->oppose_elec", notice observable changes
3124 bool set_oppose_elec(int v, bool do_dec)
3126 bool notice = FALSE;
3128 /* Hack -- Force good values */
3129 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3131 if (p_ptr->is_dead) return FALSE;
3136 if (p_ptr->oppose_elec && !do_dec)
3138 if (p_ptr->oppose_elec > v) return FALSE;
3140 else if (!IS_OPPOSE_ELEC())
3143 msg_print("ÅÅ·â¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3145 msg_print("You feel resistant to electricity!");
3155 if (p_ptr->oppose_elec && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3158 msg_print("ÅÅ·â¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3160 msg_print("You feel less resistant to electricity.");
3168 p_ptr->oppose_elec = v;
3170 /* Nothing to notice */
3171 if (!notice) return (FALSE);
3173 /* Redraw status bar */
3174 p_ptr->redraw |= (PR_STATUS);
3177 if (disturb_state) disturb(0, 0);
3188 * Set "p_ptr->oppose_fire", notice observable changes
3190 bool set_oppose_fire(int v, bool do_dec)
3192 bool notice = FALSE;
3194 /* Hack -- Force good values */
3195 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3197 if (p_ptr->is_dead) return FALSE;
3199 if ((prace_is_(RACE_DEMON) && (p_ptr->lev > 44)) || (p_ptr->mimic_form == MIMIC_DEMON)) v = 1;
3203 if (p_ptr->oppose_fire && !do_dec)
3205 if (p_ptr->oppose_fire > v) return FALSE;
3207 else if (!IS_OPPOSE_FIRE())
3210 msg_print("²Ð¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3212 msg_print("You feel resistant to fire!");
3222 if (p_ptr->oppose_fire && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3225 msg_print("²Ð¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3227 msg_print("You feel less resistant to fire.");
3235 p_ptr->oppose_fire = v;
3237 /* Nothing to notice */
3238 if (!notice) return (FALSE);
3240 /* Redraw status bar */
3241 p_ptr->redraw |= (PR_STATUS);
3244 if (disturb_state) disturb(0, 0);
3255 * Set "p_ptr->oppose_cold", notice observable changes
3257 bool set_oppose_cold(int v, bool do_dec)
3259 bool notice = FALSE;
3261 /* Hack -- Force good values */
3262 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3264 if (p_ptr->is_dead) return FALSE;
3269 if (p_ptr->oppose_cold && !do_dec)
3271 if (p_ptr->oppose_cold > v) return FALSE;
3273 else if (!IS_OPPOSE_COLD())
3276 msg_print("Î䵤¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3278 msg_print("You feel resistant to cold!");
3288 if (p_ptr->oppose_cold && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3291 msg_print("Î䵤¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3293 msg_print("You feel less resistant to cold.");
3301 p_ptr->oppose_cold = v;
3303 /* Nothing to notice */
3304 if (!notice) return (FALSE);
3306 /* Redraw status bar */
3307 p_ptr->redraw |= (PR_STATUS);
3310 if (disturb_state) disturb(0, 0);
3321 * Set "p_ptr->oppose_pois", notice observable changes
3323 bool set_oppose_pois(int v, bool do_dec)
3325 bool notice = FALSE;
3327 /* Hack -- Force good values */
3328 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3330 if ((p_ptr->pclass == CLASS_NINJA) && (p_ptr->lev > 44)) v = 1;
3331 if (p_ptr->is_dead) return FALSE;
3336 if (p_ptr->oppose_pois && !do_dec)
3338 if (p_ptr->oppose_pois > v) return FALSE;
3340 else if (!IS_OPPOSE_POIS())
3343 msg_print("ÆǤؤÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3345 msg_print("You feel resistant to poison!");
3355 if (p_ptr->oppose_pois && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3358 msg_print("ÆǤؤÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3360 msg_print("You feel less resistant to poison.");
3368 p_ptr->oppose_pois = v;
3370 /* Nothing to notice */
3371 if (!notice) return (FALSE);
3373 /* Redraw status bar */
3374 p_ptr->redraw |= (PR_STATUS);
3377 if (disturb_state) disturb(0, 0);
3388 * Set "p_ptr->stun", notice observable changes
3390 * Note the special code to only notice "range" changes.
3392 bool set_stun(int v)
3394 int old_aux, new_aux;
3395 bool notice = FALSE;
3398 /* Hack -- Force good values */
3399 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3401 if (p_ptr->is_dead) return FALSE;
3403 if (prace_is_(RACE_GOLEM) || ((p_ptr->pclass == CLASS_BERSERKER) && (p_ptr->lev > 34))) v = 0;
3406 if (p_ptr->stun > 100)
3412 else if (p_ptr->stun > 50)
3418 else if (p_ptr->stun > 0)
3454 if (new_aux > old_aux)
3456 /* Describe the state */
3462 msg_print("°Õ¼±¤¬¤â¤¦¤í¤¦¤È¤·¤Æ¤¤¿¡£");
3464 msg_print("You have been stunned.");
3472 msg_print("°Õ¼±¤¬¤Ò¤É¤¯¤â¤¦¤í¤¦¤È¤·¤Æ¤¤¿¡£");
3474 msg_print("You have been heavily stunned.");
3482 msg_print("Ƭ¤¬¥¯¥é¥¯¥é¤·¤Æ°Õ¼±¤¬±ó¤Î¤¤¤Æ¤¤¿¡£");
3484 msg_print("You have been knocked out.");
3490 if (randint1(1000) < v || one_in_(16))
3493 msg_print("³ä¤ì¤ë¤è¤¦¤ÊƬÄˤ¬¤¹¤ë¡£");
3495 msg_print("A vicious blow hits your head.");
3500 if (!p_ptr->sustain_int) (void)do_dec_stat(A_INT);
3501 if (!p_ptr->sustain_wis) (void)do_dec_stat(A_WIS);
3503 else if (one_in_(2))
3505 if (!p_ptr->sustain_int) (void)do_dec_stat(A_INT);
3509 if (!p_ptr->sustain_wis) (void)do_dec_stat(A_WIS);
3512 if (p_ptr->special_defense & KATA_MASK)
3515 msg_print("·¿¤¬Êø¤ì¤¿¡£");
3517 msg_print("Your posture gets loose.");
3519 p_ptr->special_defense &= ~(KATA_MASK);
3520 p_ptr->update |= (PU_BONUS);
3521 p_ptr->update |= (PU_MONSTERS);
3522 p_ptr->redraw |= (PR_STATE);
3523 p_ptr->redraw |= (PR_STATUS);
3524 p_ptr->action = ACTION_NONE;
3532 else if (new_aux < old_aux)
3534 /* Describe the state */
3540 msg_print("¤ä¤Ã¤ÈÛ¯Û°¾õÂÖ¤«¤é²óÉü¤·¤¿¡£");
3542 msg_print("You are no longer stunned.");
3545 if (disturb_state) disturb(0, 0);
3557 if (!notice) return (FALSE);
3560 if (disturb_state) disturb(0, 0);
3562 /* Recalculate bonuses */
3563 p_ptr->update |= (PU_BONUS);
3565 /* Redraw the "stun" */
3566 p_ptr->redraw |= (PR_STUN);
3577 * Set "p_ptr->cut", notice observable changes
3579 * Note the special code to only notice "range" changes.
3583 int old_aux, new_aux;
3584 bool notice = FALSE;
3586 /* Hack -- Force good values */
3587 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3589 if (p_ptr->is_dead) return FALSE;
3591 if ((p_ptr->prace == RACE_GOLEM ||
3592 p_ptr->prace == RACE_SKELETON ||
3593 p_ptr->prace == RACE_SPECTRE ||
3594 (p_ptr->prace == RACE_ZOMBIE && p_ptr->lev > 11)) &&
3599 if (p_ptr->cut > 1000)
3605 else if (p_ptr->cut > 200)
3611 else if (p_ptr->cut > 100)
3617 else if (p_ptr->cut > 50)
3623 else if (p_ptr->cut > 25)
3629 else if (p_ptr->cut > 10)
3635 else if (p_ptr->cut > 0)
3695 if (new_aux > old_aux)
3697 /* Describe the state */
3703 msg_print("¤«¤¹¤ê½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3705 msg_print("You have been given a graze.");
3713 msg_print("·Ú¤¤½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3715 msg_print("You have been given a light cut.");
3723 msg_print("¤Ò¤É¤¤½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3725 msg_print("You have been given a bad cut.");
3733 msg_print("ÂçÊѤʽý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3735 msg_print("You have been given a nasty cut.");
3743 msg_print("½ÅÂç¤Ê½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3745 msg_print("You have been given a severe cut.");
3753 msg_print("¤Ò¤É¤¤¿¼¼ê¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3755 msg_print("You have been given a deep gash.");
3763 msg_print("Ã×̿Ū¤Ê½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3765 msg_print("You have been given a mortal wound.");
3774 if (randint1(1000) < v || one_in_(16))
3776 if (!p_ptr->sustain_chr)
3779 msg_print("¤Ò¤É¤¤½ýÀפ¬»Ä¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3781 msg_print("You have been horribly scarred.");
3791 else if (new_aux < old_aux)
3793 /* Describe the state */
3799 msg_format("¤ä¤Ã¤È%s¡£", p_ptr->prace == RACE_ANDROID ? "²ø²æ¤¬Ä¾¤Ã¤¿" : "½Ð·ì¤¬»ß¤Þ¤Ã¤¿");
3801 msg_print("You are no longer bleeding.");
3804 if (disturb_state) disturb(0, 0);
3816 if (!notice) return (FALSE);
3819 if (disturb_state) disturb(0, 0);
3821 /* Recalculate bonuses */
3822 p_ptr->update |= (PU_BONUS);
3824 /* Redraw the "cut" */
3825 p_ptr->redraw |= (PR_CUT);
3836 * Set "p_ptr->food", notice observable changes
3838 * The "p_ptr->food" variable can get as large as 20000, allowing the
3839 * addition of the most "filling" item, Elvish Waybread, which adds
3840 * 7500 food units, without overflowing the 32767 maximum limit.
3842 * Perhaps we should disturb the player with various messages,
3843 * especially messages about hunger status changes. XXX XXX XXX
3845 * Digestion of food is handled in "dungeon.c", in which, normally,
3846 * the player digests about 20 food units per 100 game turns, more
3847 * when "fast", more when "regenerating", less with "slow digestion",
3848 * but when the player is "gorged", he digests 100 food units per 10
3849 * game turns, or a full 1000 food units per 100 game turns.
3851 * Note that the player's speed is reduced by 10 units while gorged,
3852 * so if the player eats a single food ration (5000 food units) when
3853 * full (15000 food units), he will be gorged for (5000/100)*10 = 500
3854 * game turns, or 500/(100/5) = 25 player turns (if nothing else is
3855 * affecting the player speed).
3857 bool set_food(int v)
3859 int old_aux, new_aux;
3861 bool notice = FALSE;
3863 /* Hack -- Force good values */
3864 v = (v > 20000) ? 20000 : (v < 0) ? 0 : v;
3866 /* Fainting / Starving */
3867 if (p_ptr->food < PY_FOOD_FAINT)
3873 else if (p_ptr->food < PY_FOOD_WEAK)
3879 else if (p_ptr->food < PY_FOOD_ALERT)
3885 else if (p_ptr->food < PY_FOOD_FULL)
3891 else if (p_ptr->food < PY_FOOD_MAX)
3902 /* Fainting / Starving */
3903 if (v < PY_FOOD_FAINT)
3909 else if (v < PY_FOOD_WEAK)
3915 else if (v < PY_FOOD_ALERT)
3921 else if (v < PY_FOOD_FULL)
3927 else if (v < PY_FOOD_MAX)
3938 if (old_aux < 1 && new_aux > 0)
3939 chg_virtue(V_PATIENCE, 2);
3940 else if (old_aux < 3 && (old_aux != new_aux))
3941 chg_virtue(V_PATIENCE, 1);
3943 chg_virtue(V_TEMPERANCE, 1);
3945 chg_virtue(V_TEMPERANCE, -1);
3948 if (new_aux > old_aux)
3950 /* Describe the state */
3956 msg_print("¤Þ¤À¶õÊ¢¤ÇÅݤ줽¤¦¤À¡£");
3958 msg_print("You are still weak.");
3966 msg_print("¤Þ¤À¶õÊ¢¤À¡£");
3968 msg_print("You are still hungry.");
3976 msg_print("¶õÊ¢´¶¤¬¤ª¤µ¤Þ¤Ã¤¿¡£");
3978 msg_print("You are no longer hungry.");
3986 msg_print("ËþÊ¢¤À¡ª");
3988 msg_print("You are full!");
3996 msg_print("¿©¤Ù²á¤®¤À¡ª");
3998 msg_print("You have gorged yourself!");
4000 chg_virtue(V_HARMONY, -1);
4001 chg_virtue(V_PATIENCE, -1);
4002 chg_virtue(V_TEMPERANCE, -2);
4012 else if (new_aux < old_aux)
4014 /* Describe the state */
4017 /* Fainting / Starving */
4020 msg_print("¤¢¤Þ¤ê¤Ë¤â¶õÊ¢¤Çµ¤¤ò¼º¤Ã¤Æ¤·¤Þ¤Ã¤¿¡ª");
4022 msg_print("You are getting faint from hunger!");
4030 msg_print("¤ªÊ¢¤¬¶õ¤¤¤ÆÅݤ줽¤¦¤À¡£");
4032 msg_print("You are getting weak from hunger!");
4040 msg_print("¤ªÊ¢¤¬¶õ¤¤¤Æ¤¤¿¡£");
4042 msg_print("You are getting hungry.");
4050 msg_print("ËþÊ¢´¶¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
4052 msg_print("You are no longer full.");
4060 msg_print("¤ä¤Ã¤È¤ªÊ¢¤¬¤¤Ä¤¯¤Ê¤¯¤Ê¤Ã¤¿¡£");
4062 msg_print("You are no longer gorged.");
4068 if (p_ptr->wild_mode && (new_aux < 2))
4080 /* Nothing to notice */
4081 if (!notice) return (FALSE);
4084 if (disturb_state) disturb(0, 0);
4086 /* Recalculate bonuses */
4087 p_ptr->update |= (PU_BONUS);
4090 p_ptr->redraw |= (PR_HUNGER);
4100 * Increases a stat by one randomized level -RAK-
4102 * Note that this function (used by stat potions) now restores
4103 * the stat BEFORE increasing it.
4105 bool inc_stat(int stat)
4109 /* Then augment the current/max stat */
4110 value = p_ptr->stat_cur[stat];
4112 /* Cannot go above 18/100 */
4113 if (value < p_ptr->stat_max_max[stat])
4115 /* Gain one (sometimes two) points */
4118 gain = ((randint0(100) < 75) ? 1 : 2);
4122 /* Gain 1/6 to 1/3 of distance to 18/100 */
4123 else if (value < (p_ptr->stat_max_max[stat]-2))
4125 /* Approximate gain value */
4126 gain = (((p_ptr->stat_max_max[stat]) - value) / 2 + 3) / 2;
4129 if (gain < 1) gain = 1;
4131 /* Apply the bonus */
4132 value += randint1(gain) + gain / 2;
4135 if (value > (p_ptr->stat_max_max[stat]-1)) value = p_ptr->stat_max_max[stat]-1;
4138 /* Gain one point at a time */
4144 /* Save the new value */
4145 p_ptr->stat_cur[stat] = value;
4147 /* Bring up the maximum too */
4148 if (value > p_ptr->stat_max[stat])
4150 p_ptr->stat_max[stat] = value;
4153 /* Recalculate bonuses */
4154 p_ptr->update |= (PU_BONUS);
4160 /* Nothing to gain */
4167 * Decreases a stat by an amount indended to vary from 0 to 100 percent.
4169 * Amount could be a little higher in extreme cases to mangle very high
4170 * stats from massive assaults. -CWS
4172 * Note that "permanent" means that the *given* amount is permanent,
4173 * not that the new value becomes permanent. This may not work exactly
4174 * as expected, due to "weirdness" in the algorithm, but in general,
4175 * if your stat is already drained, the "max" value will not drop all
4176 * the way down to the "cur" value.
4178 bool dec_stat(int stat, int amount, int permanent)
4180 int cur, max, loss, same, res = FALSE;
4183 /* Acquire current value */
4184 cur = p_ptr->stat_cur[stat];
4185 max = p_ptr->stat_max[stat];
4187 /* Note when the values are identical */
4188 same = (cur == max);
4190 /* Damage "current" value */
4193 /* Handle "low" values */
4196 if (amount > 90) cur--;
4197 if (amount > 50) cur--;
4198 if (amount > 20) cur--;
4202 /* Handle "high" values */
4205 /* Hack -- Decrement by a random amount between one-quarter */
4206 /* and one-half of the stat bonus times the percentage, with a */
4207 /* minimum damage of half the percentage. -CWS */
4208 loss = (((cur-18) / 2 + 1) / 2 + 1);
4211 if (loss < 1) loss = 1;
4213 /* Randomize the loss */
4214 loss = ((randint1(loss) + loss) * amount) / 100;
4217 if (loss < amount/2) loss = amount/2;
4219 /* Lose some points */
4222 /* Hack -- Only reduce stat to 17 sometimes */
4223 if (cur < 18) cur = (amount <= 20) ? 18 : 17;
4226 /* Prevent illegal values */
4227 if (cur < 3) cur = 3;
4229 /* Something happened */
4230 if (cur != p_ptr->stat_cur[stat]) res = TRUE;
4233 /* Damage "max" value */
4234 if (permanent && (max > 3))
4236 chg_virtue(V_SACRIFICE, 1);
4237 if (stat == A_WIS || stat == A_INT)
4238 chg_virtue(V_ENLIGHTEN, -2);
4240 /* Handle "low" values */
4243 if (amount > 90) max--;
4244 if (amount > 50) max--;
4245 if (amount > 20) max--;
4249 /* Handle "high" values */
4252 /* Hack -- Decrement by a random amount between one-quarter */
4253 /* and one-half of the stat bonus times the percentage, with a */
4254 /* minimum damage of half the percentage. -CWS */
4255 loss = (((max-18) / 2 + 1) / 2 + 1);
4256 loss = ((randint1(loss) + loss) * amount) / 100;
4257 if (loss < amount/2) loss = amount/2;
4259 /* Lose some points */
4262 /* Hack -- Only reduce stat to 17 sometimes */
4263 if (max < 18) max = (amount <= 20) ? 18 : 17;
4266 /* Hack -- keep it clean */
4267 if (same || (max < cur)) max = cur;
4269 /* Something happened */
4270 if (max != p_ptr->stat_max[stat]) res = TRUE;
4276 /* Actually set the stat to its new value. */
4277 p_ptr->stat_cur[stat] = cur;
4278 p_ptr->stat_max[stat] = max;
4280 /* Redisplay the stats later */
4281 p_ptr->redraw |= (PR_STATS);
4283 /* Recalculate bonuses */
4284 p_ptr->update |= (PU_BONUS);
4293 * Restore a stat. Return TRUE only if this actually makes a difference.
4295 bool res_stat(int stat)
4297 /* Restore if needed */
4298 if (p_ptr->stat_cur[stat] != p_ptr->stat_max[stat])
4301 p_ptr->stat_cur[stat] = p_ptr->stat_max[stat];
4303 /* Recalculate bonuses */
4304 p_ptr->update |= (PU_BONUS);
4306 /* Redisplay the stats later */
4307 p_ptr->redraw |= (PR_STATS);
4313 /* Nothing to restore */
4319 * Increase players hit points, notice effects
4321 bool hp_player(int num)
4324 vir = virtue_number(V_VITALITY);
4327 num = num * (p_ptr->virtues[vir - 1] + 1250) / 1250;
4329 /* Healing needed */
4330 if (p_ptr->chp < p_ptr->mhp)
4332 if ((num > 0) && (p_ptr->chp < (p_ptr->mhp/3)))
4333 chg_virtue(V_TEMPERANCE, 1);
4334 /* Gain hitpoints */
4337 /* Enforce maximum */
4338 if (p_ptr->chp >= p_ptr->mhp)
4340 p_ptr->chp = p_ptr->mhp;
4341 p_ptr->chp_frac = 0;
4345 p_ptr->redraw |= (PR_HP);
4348 p_ptr->window |= (PW_PLAYER);
4354 msg_print("¾¯¤·µ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4356 msg_print("You feel a little better.");
4365 msg_print("µ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4367 msg_print("You feel better.");
4376 msg_print("¤È¤Æ¤âµ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4378 msg_print("You feel much better.");
4387 msg_print("¤Ò¤¸¤ç¤¦¤Ëµ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4389 msg_print("You feel very good.");
4404 * Array of stat "descriptions"
4406 static cptr desc_stat_pos[] =
4448 * Array of stat "descriptions"
4450 static cptr desc_stat_neg[] =
4474 bool do_dec_stat(int stat)
4478 /* Access the "sustain" */
4481 case A_STR: if (p_ptr->sustain_str) sust = TRUE; break;
4482 case A_INT: if (p_ptr->sustain_int) sust = TRUE; break;
4483 case A_WIS: if (p_ptr->sustain_wis) sust = TRUE; break;
4484 case A_DEX: if (p_ptr->sustain_dex) sust = TRUE; break;
4485 case A_CON: if (p_ptr->sustain_con) sust = TRUE; break;
4486 case A_CHR: if (p_ptr->sustain_chr) sust = TRUE; break;
4490 if (sust && (!ironman_nightmare || randint0(13)))
4494 msg_format("%s¤Ê¤Ã¤¿µ¤¤¬¤·¤¿¤¬¡¢¤¹¤°¤Ë¸µ¤ËÌá¤Ã¤¿¡£",
4496 msg_format("You feel %s for a moment, but the feeling passes.",
4499 desc_stat_neg[stat]);
4505 /* Attempt to reduce the stat */
4506 if (dec_stat(stat, 10, (ironman_nightmare && !randint0(13))))
4510 msg_format("¤Ò¤É¤¯%s¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£", desc_stat_neg[stat]);
4512 msg_format("You feel very %s.", desc_stat_neg[stat]);
4520 /* Nothing obvious */
4526 * Restore lost "points" in a stat
4528 bool do_res_stat(int stat)
4530 /* Attempt to increase */
4535 msg_format("¸µÄ̤ê¤Ë%s¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£", desc_stat_pos[stat]);
4537 msg_format("You feel less %s.", desc_stat_neg[stat]);
4545 /* Nothing obvious */
4551 * Gain a "point" in a stat
4553 bool do_inc_stat(int stat)
4557 /* Restore strength */
4558 res = res_stat(stat);
4560 /* Attempt to increase */
4565 chg_virtue(V_ENLIGHTEN, 1);
4566 chg_virtue(V_FAITH, 1);
4568 else if (stat == A_INT)
4570 chg_virtue(V_KNOWLEDGE, 1);
4571 chg_virtue(V_ENLIGHTEN, 1);
4573 else if (stat == A_CON)
4574 chg_virtue(V_VITALITY, 1);
4578 msg_format("¥ï¡¼¥ª¡ª¤È¤Æ¤â%s¤Ê¤Ã¤¿¡ª", desc_stat_pos[stat]);
4580 msg_format("Wow! You feel very %s!", desc_stat_pos[stat]);
4588 /* Restoration worked */
4593 msg_format("¸µÄ̤ê¤Ë%s¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£", desc_stat_pos[stat]);
4595 msg_format("You feel less %s.", desc_stat_neg[stat]);
4603 /* Nothing obvious */
4609 * Restores any drained experience
4611 bool restore_level(void)
4613 /* Restore experience */
4614 if (p_ptr->exp < p_ptr->max_exp)
4618 msg_print("À¸Ì¿ÎϤ¬Ìá¤Ã¤Æ¤¤¿µ¤¤¬¤¹¤ë¡£");
4620 msg_print("You feel your life energies returning.");
4624 /* Restore the experience */
4625 p_ptr->exp = p_ptr->max_exp;
4627 /* Check the experience */
4642 bool lose_all_info(void)
4646 chg_virtue(V_KNOWLEDGE, -5);
4647 chg_virtue(V_ENLIGHTEN, -5);
4649 /* Forget info about objects */
4650 for (i = 0; i < INVEN_TOTAL; i++)
4652 object_type *o_ptr = &inventory[i];
4654 /* Skip non-objects */
4655 if (!o_ptr->k_idx) continue;
4657 /* Allow "protection" by the MENTAL flag */
4658 if (o_ptr->ident & (IDENT_MENTAL)) continue;
4660 /* Remove "default inscriptions" */
4661 o_ptr->feeling = FEEL_NONE;
4663 /* Hack -- Clear the "empty" flag */
4664 o_ptr->ident &= ~(IDENT_EMPTY);
4666 /* Hack -- Clear the "known" flag */
4667 o_ptr->ident &= ~(IDENT_KNOWN);
4669 /* Hack -- Clear the "felt" flag */
4670 o_ptr->ident &= ~(IDENT_SENSE);
4673 /* Recalculate bonuses */
4674 p_ptr->update |= (PU_BONUS);
4676 /* Combine / Reorder the pack (later) */
4677 p_ptr->notice |= (PN_COMBINE | PN_REORDER);
4680 p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
4682 /* Mega-Hack -- Forget the map */
4690 void do_poly_wounds(void)
4692 /* Changed to always provide at least _some_ healing */
4693 s16b wounds = p_ptr->cut;
4694 s16b hit_p = (p_ptr->mhp - p_ptr->chp);
4695 s16b change = damroll(p_ptr->lev, 5);
4696 bool Nasty_effect = one_in_(5);
4698 if (!(wounds || hit_p || Nasty_effect)) return;
4701 msg_print("½ý¤¬¤è¤ê·Ú¤¤¤â¤Î¤ËÊѲ½¤·¤¿¡£");
4703 msg_print("Your wounds are polymorphed into less serious ones.");
4710 msg_print("¿·¤¿¤Ê½ý¤¬¤Ç¤¤¿¡ª");
4711 take_hit(DAMAGE_LOSELIFE, change / 2, "ÊѲ½¤·¤¿½ý", -1);
4713 msg_print("A new wound was created!");
4714 take_hit(DAMAGE_LOSELIFE, change / 2, "a polymorphed wound", -1);
4721 set_cut(p_ptr->cut - (change / 2));
4727 * Change player race
4729 void change_race(int new_race, cptr effect_msg)
4731 cptr title = race_info[new_race].title;
4734 msg_format("¤¢¤Ê¤¿¤Ï%s%s¤ËÊѲ½¤·¤¿¡ª", effect_msg, title);
4736 msg_format("You turn into %s %s%s!", (!effect_msg[0] && is_a_vowel(title[0]) ? "an" : "a"), effect_msg, title);
4739 chg_virtue(V_CHANCE, 2);
4741 if (p_ptr->prace < 32)
4743 p_ptr->old_race1 |= 1L << p_ptr->prace;
4747 p_ptr->old_race2 |= 1L << (p_ptr->prace-32);
4749 p_ptr->prace = new_race;
4750 rp_ptr = &race_info[p_ptr->prace];
4752 /* Experience factor */
4753 p_ptr->expfact = rp_ptr->r_exp + cp_ptr->c_exp;
4756 * The speed bonus of Klackons and Sprites are disabled
4757 * and the experience penalty is decreased.
4759 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)))
4760 p_ptr->expfact -= 15;
4762 /* Get character's height and weight */
4763 get_height_weight();
4766 if (p_ptr->pclass == CLASS_SORCERER)
4767 p_ptr->hitdie = rp_ptr->r_mhp/2 + cp_ptr->c_mhp + ap_ptr->a_mhp;
4769 p_ptr->hitdie = rp_ptr->r_mhp + cp_ptr->c_mhp + ap_ptr->a_mhp;
4771 do_cmd_rerate(FALSE);
4773 /* The experience level may be modified */
4776 p_ptr->redraw |= (PR_BASIC);
4778 p_ptr->update |= (PU_BONUS);
4782 /* Player's graphic tile may change */
4787 void do_poly_self(void)
4789 int power = p_ptr->lev;
4792 msg_print("¤¢¤Ê¤¿¤ÏÊѲ½¤Îˬ¤ì¤ò´¶¤¸¤¿...");
4794 msg_print("You feel a change coming over you...");
4797 chg_virtue(V_CHANCE, 1);
4799 if ((power > randint0(20)) && one_in_(3) && (p_ptr->prace != RACE_ANDROID))
4801 char effect_msg[80] = "";
4802 int new_race, expfact, goalexpfact;
4804 /* Some form of racial polymorph... */
4807 if ((power > randint0(5)) && one_in_(4))
4812 if (p_ptr->psex == SEX_MALE)
4814 p_ptr->psex = SEX_FEMALE;
4815 sp_ptr = &sex_info[p_ptr->psex];
4817 sprintf(effect_msg, "½÷À¤Î");
4819 sprintf(effect_msg, "female ");
4825 p_ptr->psex = SEX_MALE;
4826 sp_ptr = &sex_info[p_ptr->psex];
4828 sprintf(effect_msg, "ÃËÀ¤Î");
4830 sprintf(effect_msg, "male ");
4836 if ((power > randint0(30)) && one_in_(5))
4840 /* Harmful deformity */
4847 (void)dec_stat(tmp, randint1(6) + 6, one_in_(3));
4853 /* Deformities are discriminated against! */
4854 (void)dec_stat(A_CHR, randint1(6), TRUE);
4860 sprintf(tmp_msg,"%s",effect_msg);
4861 sprintf(effect_msg,"´ñ·Á¤Î%s",tmp_msg);
4863 sprintf(tmp_msg,"%s ",effect_msg);
4864 sprintf(effect_msg,"deformed %s ",tmp_msg);
4871 sprintf(effect_msg,"´ñ·Á¤Î");
4873 sprintf(effect_msg,"deformed ");
4879 while ((power > randint0(20)) && one_in_(10))
4881 /* Polymorph into a less mutated form */
4884 if (!lose_mutation(0))
4886 msg_print("´ñ̯¤Ê¤¯¤é¤¤ÉáÄ̤ˤʤ俵¤¤¬¤¹¤ë¡£");
4888 msg_print("You feel oddly normal.");
4894 * Restrict the race choices by exp penalty so
4895 * weak polymorph always means weak race
4900 goalexpfact = 100 + 3 * randint0(power);
4904 new_race = randint0(MAX_RACES);
4905 expfact = race_info[new_race].r_exp;
4907 while (((new_race == p_ptr->prace) && (expfact > goalexpfact)) || (new_race == RACE_ANDROID));
4909 change_race(new_race, effect_msg);
4912 if ((power > randint0(30)) && one_in_(6))
4920 msg_format("%s¤Î¹½À®¤¬ÊѲ½¤·¤¿¡ª", p_ptr->prace == RACE_ANDROID ? "µ¡³£" : "Æâ¡");
4922 msg_print("Your internal organs are rearranged!");
4927 (void)dec_stat(tmp, randint1(6) + 6, one_in_(3));
4933 msg_print("¸½ºß¤Î»Ñ¤ÇÀ¸¤¤Æ¤¤¤¯¤Î¤Ïº¤Æñ¤Ê¤è¤¦¤À¡ª");
4934 take_hit(DAMAGE_LOSELIFE, damroll(randint1(10), p_ptr->lev), "Ã×̿Ū¤ÊÆÍÁ³ÊÑ°Û", -1);
4936 msg_print("You find living difficult in your present form!");
4937 take_hit(DAMAGE_LOSELIFE, damroll(randint1(10), p_ptr->lev), "a lethal mutation", -1);
4944 if ((power > randint0(20)) && one_in_(4))
4949 do_cmd_rerate(FALSE);
4952 while ((power > randint0(15)) && one_in_(3))
4955 (void)gain_random_mutation(0);
4958 if (power > randint0(5))
4964 /* Note: earlier deductions may have left power < 0 already. */
4974 * Decreases players hit points and sets death flag if necessary
4976 * XXX XXX XXX Invulnerability needs to be changed into a "shield"
4978 * XXX XXX XXX Hack -- this function allows the user to save (or quit)
4979 * the game when he dies, since the "You die." message is shown before
4980 * setting the player to "dead".
4983 int take_hit(int damage_type, int damage, cptr hit_from, int monspell)
4985 int old_chp = p_ptr->chp;
4987 char death_message[1024];
4990 int warning = (p_ptr->mhp * hitpoint_warn / 10);
4993 if (p_ptr->is_dead) return 0;
4995 if (p_ptr->sutemi) damage *= 2;
4996 if (p_ptr->special_defense & KATA_IAI) damage += (damage + 4) / 5;
4998 if (easy_band) damage = (damage+1)/2;
5000 if (damage_type != DAMAGE_USELIFE)
5010 if (monspell >= 0) learn_spell(monspell);
5012 /* Mega-Hack -- Apply "invulnerability" */
5013 if ((damage_type != DAMAGE_USELIFE) && (damage_type != DAMAGE_LOSELIFE))
5015 if (IS_INVULN() && (damage < 9000))
5017 if (damage_type == DAMAGE_FORCE)
5020 msg_print("¥Ð¥ê¥¢¤¬ÀÚ¤êÎö¤«¤ì¤¿¡ª");
5022 msg_print("The attack cuts your shield of invulnerability open!");
5025 else if (one_in_(PENETRATE_INVULNERABILITY))
5028 msg_print("̵Ũ¤Î¥Ð¥ê¥¢¤òÇˤäƹ¶·â¤µ¤ì¤¿¡ª");
5030 msg_print("The attack penetrates your shield of invulnerability!");
5039 /* Multishadow effects is determined by turn */
5040 if (p_ptr->multishadow && (turn & 1))
5042 if (damage_type == DAMAGE_FORCE)
5045 msg_print("¸¸±Æ¤â¤í¤È¤âÂΤ¬ÀÚ¤êÎö¤«¤ì¤¿¡ª");
5047 msg_print("The attack hits Shadow together with you!");
5050 else if (damage_type == DAMAGE_ATTACK)
5053 msg_print("¹¶·â¤Ï¸¸±Æ¤ËÌ¿Ã椷¡¢¤¢¤Ê¤¿¤Ë¤ÏÆϤ«¤Ê¤«¤Ã¤¿¡£");
5055 msg_print("The attack hits Shadow, you are unharmed!");
5061 if (p_ptr->wraith_form)
5063 if (damage_type == DAMAGE_FORCE)
5066 msg_print("Ⱦʪ¼Á¤ÎÂΤ¬ÀÚ¤êÎö¤«¤ì¤¿¡ª");
5068 msg_print("The attack cuts through your ethereal body!");
5074 if ((damage == 0) && one_in_(2)) damage = 1;
5078 if (p_ptr->special_defense & KATA_MUSOU)
5081 if ((damage == 0) && one_in_(2)) damage = 1;
5083 } /* not if LOSELIFE USELIFE */
5085 /* Hurt the player */
5086 p_ptr->chp -= damage;
5087 if(damage_type == DAMAGE_GENO && p_ptr->chp < 0)
5089 damage += p_ptr->chp;
5093 /* Display the hitpoints */
5094 p_ptr->redraw |= (PR_HP);
5097 p_ptr->window |= (PW_PLAYER);
5101 if (damage_type != DAMAGE_GENO && p_ptr->chp == 0)
5103 chg_virtue(V_SACRIFICE, 1);
5104 chg_virtue(V_CHANCE, 2);
5111 bool android = (p_ptr->prace == RACE_ANDROID ? TRUE : FALSE);
5113 #ifdef JP /* »à¤ó¤À»þ¤Ë¶¯À©½ªÎ»¤·¤Æ»à¤ò²óÈò¤Ç¤¤Ê¤¯¤·¤Æ¤ß¤¿ by Habu */
5115 if(!save_player()) msg_print("¥»¡¼¥Ö¼ºÇÔ¡ª");
5121 chg_virtue(V_SACRIFICE, 10);
5124 p_ptr->leaving = TRUE;
5127 p_ptr->is_dead = TRUE;
5129 if (p_ptr->inside_arena)
5131 cptr m_name = r_name+r_info[arena_info[p_ptr->arena_number].r_idx].name;
5133 msg_format("¤¢¤Ê¤¿¤Ï%s¤ÎÁ°¤ËÇÔ¤ìµî¤Ã¤¿¡£", m_name);
5135 msg_format("You are beaten by %s.", m_name);
5138 if (record_arena) do_cmd_write_nikki(NIKKI_ARENA, -1 - p_ptr->arena_number, m_name);
5142 int q_idx = quest_number(dun_level);
5145 /* Make screen dump */
5146 screen_dump = make_screen_dump();
5149 /* Note cause of death */
5151 sprintf(p_ptr->died_from, "%s%s%s", !p_ptr->paralyzed ? "" : p_ptr->free_act ? "ĦÁü¾õÂÖ¤Ç":"Ëãáã¾õÂÖ¤Ç", p_ptr->image ? "¸¸³Ð¤ËÏĤó¤À" : "", hit_from);
5153 sprintf(p_ptr->died_from, "%s%s", hit_from, !p_ptr->paralyzed ? "" : " while helpless");
5156 /* No longer a winner */
5157 p_ptr->total_winner = FALSE;
5159 if (p_ptr->inside_arena)
5161 strcpy(buf,"¥¢¥ê¡¼¥Ê");
5163 strcpy(buf,"in the Arena");
5165 else if (!dun_level)
5169 strcpy(buf,"on the surface");
5171 else if (q_idx && (is_fixed_quest_idx(q_idx) &&
5172 !((q_idx == QUEST_OBERON) || (q_idx == QUEST_SERPENT))))
5174 strcpy(buf,"¥¯¥¨¥¹¥È");
5176 strcpy(buf,"in a quest");
5180 sprintf(buf,"%d³¬", dun_level);
5182 sprintf(buf,"level %d", dun_level);
5185 sprintf(tmp,"%s¤Ç%s¤Ë»¦¤µ¤ì¤¿¡£",buf, p_ptr->died_from);
5187 sprintf(tmp,"killed by %s %s.", p_ptr->died_from, buf);
5189 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, tmp);
5191 do_cmd_write_nikki(NIKKI_GAMESTART, 1, "-------- ¥²¡¼¥à¥ª¡¼¥Ð¡¼ --------");
5193 do_cmd_write_nikki(NIKKI_GAMESTART, 1, "-------- Game Over --------");
5195 do_cmd_write_nikki(NIKKI_BUNSHOU, 1, "\n\n\n\n");
5200 if (get_check_strict("²èÌ̤òÊݸ¤·¤Þ¤¹¤«¡©", CHECK_NO_HISTORY))
5202 if (get_check_strict("Dump the screen? ", CHECK_NO_HISTORY))
5206 do_cmd_save_screen();
5211 /* Initialize "last message" buffer */
5212 if (p_ptr->last_message) string_free(p_ptr->last_message);
5213 p_ptr->last_message = NULL;
5215 /* Hack -- Note death */
5219 msg_format("¤¢¤Ê¤¿¤Ï%s¤Þ¤·¤¿¡£", android ? "²õ¤ì" : "»à¤Ë");
5221 msg_print(android ? "You are broken." : "You die.");
5228 if (streq(p_ptr->died_from, "Seppuku"))
5231 get_rnd_line("seppuku_j.txt", 0, death_message);
5233 get_rnd_line("seppuku.txt", 0, death_message);
5239 get_rnd_line("death_j.txt", 0, death_message);
5241 get_rnd_line("death.txt", 0, death_message);
5245 while (!get_string(streq(p_ptr->died_from, "Seppuku") ? "¼À¤¤Î¶ç: " : "ÃÇËöËâ¤Î¶«¤Ó: ", death_message, 1024)) ;
5247 while (!get_string("Last word: ", death_message, 1024)) ;
5249 if (death_message[0] == '\0')
5252 strcpy(death_message, format("¤¢¤Ê¤¿¤Ï%s¤Þ¤·¤¿¡£", android ? "²õ¤ì" : "»à¤Ë"));
5254 strcpy(death_message, android ? "You are broken." : "You die.");
5257 else p_ptr->last_message = string_make(death_message);
5259 if (streq(p_ptr->died_from, "Seppuku"))
5265 int msg_pos_x[9] = { 5, 7, 9, 12, 14, 17, 19, 21, 23};
5266 int msg_pos_y[9] = { 3, 4, 5, 4, 5, 4, 5, 6, 4};
5273 for (i = 0; i < 40; i++)
5274 Term_putstr(randint0(w / 2) * 2, randint0(h), 2, TERM_VIOLET, "¦Ô");
5276 str = death_message;
5277 if (strncmp(str, "¡Ö", 2) == 0) str += 2;
5279 str2 = my_strstr(str, "¡×");
5280 if (str2 != NULL) *str2 = '\0';
5285 str2 = my_strstr(str, " ");
5286 if (str2 == NULL) len = strlen(str);
5287 else len = str2 - str;
5291 Term_putstr_v(w * 3 / 4 - 2 - msg_pos_x[i] * 2, msg_pos_y[i], len,
5293 if (str2 == NULL) break;
5297 if (*str == 0) break;
5301 Term_putstr(w-1, h-1, 1, TERM_WHITE, " ");
5305 /* Make screen dump */
5306 screen_dump = make_screen_dump();
5309 /* Wait a key press */
5312 msg_print(death_message);
5316 msg_print(death_message);
5324 /* Hitpoint warning */
5325 if (p_ptr->chp < warning)
5327 /* Hack -- bell on first notice */
5328 if (old_chp > warning) bell();
5332 if (record_danger && (old_chp > warning))
5334 if (p_ptr->image && damage_type == DAMAGE_ATTACK)
5338 hit_from = "something";
5342 sprintf(tmp,"%s¤Ë¤è¤Ã¤Æ¥Ô¥ó¥Á¤Ë´Ù¤¤¤Ã¤¿¡£",hit_from);
5344 sprintf(tmp,"A critical situation because of %s.",hit_from);
5346 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, tmp);
5351 /* stop auto_more even if DAMAGE_USELIFE */
5357 msg_print("*** ·Ù¹ð:Äã¥Ò¥Ã¥È¡¦¥Ý¥¤¥ó¥È¡ª ***");
5359 msg_print("*** LOW HITPOINT WARNING! ***");
5365 if (p_ptr->wild_mode && !p_ptr->leaving && (p_ptr->chp < MAX(warning, p_ptr->mhp/5)))
5376 void gain_exp_64(s32b amount, u32b amount_frac)
5378 if (p_ptr->is_dead) return;
5380 if (p_ptr->prace == RACE_ANDROID) return;
5382 /* Gain some experience */
5383 s64b_add(&(p_ptr->exp), &(p_ptr->exp_frac), amount, amount_frac);
5385 /* Slowly recover from experience drainage */
5386 if (p_ptr->exp < p_ptr->max_exp)
5388 /* Gain max experience (20%) (was 10%) */
5389 p_ptr->max_exp += amount / 5;
5392 /* Check Experience */
5400 void gain_exp(s32b amount)
5402 gain_exp_64(amount, 0L);
5406 void calc_android_exp(void)
5410 if (p_ptr->is_dead) return;
5412 if (p_ptr->prace != RACE_ANDROID) return;
5414 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
5416 object_type *o_ptr = &inventory[i];
5418 object_type *q_ptr = &forge;
5420 int level = MAX(get_object_level(o_ptr) - 8, 1);
5422 if ((i == INVEN_RIGHT) || (i == INVEN_LEFT) || (i == INVEN_NECK) || (i == INVEN_LITE)) continue;
5423 if (!o_ptr->k_idx) continue;
5425 /* Wipe the object */
5428 object_copy(q_ptr, o_ptr);
5429 q_ptr->discount = 0;
5430 q_ptr->curse_flags = 0L;
5434 level = (level + MAX(a_info[o_ptr->name1].level - 8, 5)) / 2;
5435 level += MIN(20, a_info[o_ptr->name1].rarity/(a_info[o_ptr->name1].gen_flags & TRG_INSTA_ART ? 10 : 3));
5437 else if (o_ptr->name2)
5439 level += MAX(3, (e_info[o_ptr->name2].rating - 5)/2);
5441 else if (o_ptr->art_name)
5443 s32b total_flags = flag_cost(o_ptr, o_ptr->pval);
5446 if (o_ptr->tval >= TV_ARMOR_BEGIN)
5449 if (total_flags < 15000) fake_level = 10;
5450 else if (total_flags < 35000) fake_level = 25;
5451 else fake_level = 40;
5456 if (total_flags < 20000) fake_level = 10;
5457 else if (total_flags < 45000) fake_level = 25;
5458 else fake_level = 40;
5461 level = MAX(level, (level + MAX(fake_level - 8, 5)) / 2 + 3);
5464 value = object_value_real(q_ptr);
5466 if (value <= 0) continue;
5467 if ((o_ptr->tval == TV_SOFT_ARMOR) && (o_ptr->sval == SV_ABUNAI_MIZUGI) && (p_ptr->pseikaku != SEIKAKU_SEXY)) value /= 32;
5468 if (value > 5000000L) value = 5000000L;
5469 if ((o_ptr->tval == TV_DRAG_ARMOR) || (o_ptr->tval == TV_CARD)) level /= 2;
5471 if (o_ptr->name1 || o_ptr->name2 || o_ptr->art_name ||
5472 (o_ptr->tval == TV_DRAG_ARMOR) ||
5473 ((o_ptr->tval == TV_HELM) && (o_ptr->sval == SV_DRAGON_HELM)) ||
5474 ((o_ptr->tval == TV_SHIELD) && (o_ptr->sval == SV_DRAGON_SHIELD)) ||
5475 ((o_ptr->tval == TV_GLOVES) && (o_ptr->sval == SV_SET_OF_DRAGON_GLOVES)) ||
5476 ((o_ptr->tval == TV_BOOTS) && (o_ptr->sval == SV_PAIR_OF_DRAGON_GREAVE)) ||
5477 ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DIAMOND_EDGE)))
5479 if (level > 65) level = 35 + (level - 65) / 5;
5480 else if (level > 35) level = 25 + (level - 35) / 3;
5481 else if (level > 15) level = 15 + (level - 15) / 2;
5482 exp = MIN(100000L, value) * level * level / 2;
5483 if (value > 100000L)
5484 exp += (value - 100000L) * level * level / 8;
5488 exp = MIN(100000L, value) * level;
5489 if (value > 100000L)
5490 exp += (value - 100000L) * level / 4;
5492 if ((((i == INVEN_RARM) || (i == INVEN_LARM)) && (buki_motteruka(i))) || (i == INVEN_BOW)) total_exp += exp / 48;
5493 else total_exp += exp / 16;
5494 if (i == INVEN_BODY) total_exp += exp / 32;
5496 p_ptr->exp = p_ptr->max_exp = total_exp;
5498 /* Check Experience */
5506 void lose_exp(s32b amount)
5508 if (p_ptr->prace == RACE_ANDROID) return;
5510 /* Never drop below zero experience */
5511 if (amount > p_ptr->exp) amount = p_ptr->exp;
5513 /* Lose some experience */
5514 p_ptr->exp -= amount;
5516 /* Check Experience */
5523 * If resisted to draining, return FALSE
5525 bool drain_exp(s32b drain, s32b slip, int hold_life_prob)
5527 /* Androids and their mimics are never drained */
5528 if (p_ptr->prace == RACE_ANDROID) return FALSE;
5530 if (p_ptr->hold_life && (randint0(100) < hold_life_prob))
5532 /* Hold experience */
5534 msg_print("¤·¤«¤·¼«¸Ê¤ÎÀ¸Ì¿ÎϤò¼é¤ê¤¤Ã¤¿¡ª");
5536 msg_print("You keep hold of your life force!");
5541 /* Hold experience failed */
5542 if (p_ptr->hold_life)
5545 msg_print("À¸Ì¿ÎϤò¾¯¤·µÛ¤¤¼è¤é¤ì¤¿µ¤¤¬¤¹¤ë¡ª");
5547 msg_print("You feel your life slipping away!");
5554 msg_print("À¸Ì¿ÎϤ¬ÂΤ«¤éµÛ¤¤¼è¤é¤ì¤¿µ¤¤¬¤¹¤ë¡ª");
5556 msg_print("You feel your life draining away!");
5565 bool set_ultimate_res(int v, bool do_dec)
5567 bool notice = FALSE;
5569 /* Hack -- Force good values */
5570 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
5572 if (p_ptr->is_dead) return FALSE;
5577 if (p_ptr->ult_res && !do_dec)
5579 if (p_ptr->ult_res > v) return FALSE;
5581 else if (!p_ptr->ult_res)
5584 msg_print("¤¢¤é¤æ¤ë¤³¤È¤ËÂФ·¤ÆÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
5586 msg_print("You feel resistant!");
5599 msg_print("¤¢¤é¤æ¤ë¤³¤È¤ËÂФ¹¤ëÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
5601 msg_print("You feel less resistant");
5611 /* Redraw status bar */
5612 p_ptr->redraw |= (PR_STATUS);
5614 /* Nothing to notice */
5615 if (!notice) return (FALSE);
5618 if (disturb_state) disturb(0, 0);
5620 /* Recalculate bonuses */
5621 p_ptr->update |= (PU_BONUS);
5630 bool set_tim_res_nether(int v, bool do_dec)
5632 bool notice = FALSE;
5634 /* Hack -- Force good values */
5635 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
5637 if (p_ptr->is_dead) return FALSE;
5642 if (p_ptr->tim_res_nether && !do_dec)
5644 if (p_ptr->tim_res_nether > v) return FALSE;
5646 else if (!p_ptr->tim_res_nether)
5649 msg_print("ÃϹö¤ÎÎϤËÂФ·¤ÆÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
5651 msg_print("You feel nether resistant!");
5661 if (p_ptr->tim_res_nether)
5664 msg_print("ÃϹö¤ÎÎϤËÂФ¹¤ëÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
5666 msg_print("You feel less nether resistant");
5674 p_ptr->tim_res_nether = v;
5676 /* Redraw status bar */
5677 p_ptr->redraw |= (PR_STATUS);
5679 /* Nothing to notice */
5680 if (!notice) return (FALSE);
5683 if (disturb_state) disturb(0, 0);
5685 /* Recalculate bonuses */
5686 p_ptr->update |= (PU_BONUS);
5695 bool set_tim_res_time(int v, bool do_dec)
5697 bool notice = FALSE;
5699 /* Hack -- Force good values */
5700 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
5702 if (p_ptr->is_dead) return FALSE;
5707 if (p_ptr->tim_res_time && !do_dec)
5709 if (p_ptr->tim_res_time > v) return FALSE;
5711 else if (!p_ptr->tim_res_time)
5714 msg_print("»þ´ÖµÕž¤ÎÎϤËÂФ·¤ÆÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
5716 msg_print("You feel time resistant!");
5726 if (p_ptr->tim_res_time)
5729 msg_print("»þ´ÖµÕž¤ÎÎϤËÂФ¹¤ëÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
5731 msg_print("You feel less time resistant");
5739 p_ptr->tim_res_time = v;
5741 /* Redraw status bar */
5742 p_ptr->redraw |= (PR_STATUS);
5744 /* Nothing to notice */
5745 if (!notice) return (FALSE);
5748 if (disturb_state) disturb(0, 0);
5750 /* Recalculate bonuses */
5751 p_ptr->update |= (PU_BONUS);
5762 * Choose a warrior-mage elemental attack. -LM-
5764 bool choose_ele_attack(void)
5770 if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM))
5773 msg_format("Éð´ï¤ò»ý¤¿¤Ê¤¤¤ÈËâË¡·õ¤Ï»È¤¨¤Ê¤¤¡£");
5775 msg_format("You cannot use temporary branding with no weapon.");
5783 num = (p_ptr->lev - 20) / 5;
5786 c_prt(TERM_RED, " a) ¾Æ´þ", 2, 14);
5788 c_prt(TERM_RED, " a) Fire Brand", 2, 14);
5792 if (num >= 2) c_prt(TERM_L_WHITE," b) Åà·ë", 3, 14);
5794 if (num >= 2) c_prt(TERM_L_WHITE," b) Cold Brand", 3, 14);
5796 else prt("", 3, 14);
5799 if (num >= 3) c_prt(TERM_GREEN, " c) ÆÇ»¦", 4, 14);
5801 if (num >= 3) c_prt(TERM_GREEN, " c) Poison Brand", 4, 14);
5803 else prt("", 4, 14);
5806 if (num >= 4) c_prt(TERM_L_DARK, " d) Íϲò", 5, 14);
5808 if (num >= 4) c_prt(TERM_L_DARK, " d) Acid Brand", 5, 14);
5810 else prt("", 5, 14);
5813 if (num >= 5) c_prt(TERM_BLUE, " e) ÅÅ·â", 6, 14);
5815 if (num >= 5) c_prt(TERM_BLUE, " e) Elec Brand", 6, 14);
5817 else prt("", 6, 14);
5825 prt(" ¤É¤Î¸µÁǹ¶·â¤ò¤·¤Þ¤¹¤«¡©", 1, 14);
5827 prt(" Choose a temporary elemental brand ", 1, 14);
5832 if ((choice == 'a') || (choice == 'A'))
5833 set_ele_attack(ATTACK_FIRE, p_ptr->lev/2 + randint1(p_ptr->lev/2));
5834 else if (((choice == 'b') || (choice == 'B')) && (num >= 2))
5835 set_ele_attack(ATTACK_COLD, p_ptr->lev/2 + randint1(p_ptr->lev/2));
5836 else if (((choice == 'c') || (choice == 'C')) && (num >= 3))
5837 set_ele_attack(ATTACK_POIS, p_ptr->lev/2 + randint1(p_ptr->lev/2));
5838 else if (((choice == 'd') || (choice == 'D')) && (num >= 4))
5839 set_ele_attack(ATTACK_ACID, p_ptr->lev/2 + randint1(p_ptr->lev/2));
5840 else if (((choice == 'e') || (choice == 'E')) && (num >= 5))
5841 set_ele_attack(ATTACK_ELEC, p_ptr->lev/2 + randint1(p_ptr->lev/2));
5845 msg_print("ËâË¡·õ¤ò»È¤¦¤Î¤ò¤ä¤á¤¿¡£");
5847 msg_print("You cancel the temporary branding.");
5859 * Choose a elemental immune. -LM-
5861 bool choose_ele_immune(int turn)
5869 c_prt(TERM_RED, " a) ²Ð±ê", 2, 14);
5871 c_prt(TERM_RED, " a) Immune Fire", 2, 14);
5875 c_prt(TERM_L_WHITE," b) Î䵤", 3, 14);
5877 c_prt(TERM_L_WHITE," b) Immune Cold", 3, 14);
5881 c_prt(TERM_L_DARK, " c) »À", 4, 14);
5883 c_prt(TERM_L_DARK, " c) Immune Acid", 4, 14);
5887 c_prt(TERM_BLUE, " d) ÅÅ·â", 5, 14);
5889 c_prt(TERM_BLUE, " d) Immune Elec", 5, 14);
5900 prt(" ¤É¤Î¸µÁǤÎÌȱ֤ò¤Ä¤±¤Þ¤¹¤«¡©", 1, 14);
5902 prt(" Choose a temporary elemental immune ", 1, 14);
5907 if ((choice == 'a') || (choice == 'A'))
5908 set_ele_immune(DEFENSE_FIRE, turn);
5909 else if ((choice == 'b') || (choice == 'B'))
5910 set_ele_immune(DEFENSE_COLD, turn);
5911 else if ((choice == 'c') || (choice == 'C'))
5912 set_ele_immune(DEFENSE_ACID, turn);
5913 else if ((choice == 'd') || (choice == 'D'))
5914 set_ele_immune(DEFENSE_ELEC, turn);
5918 msg_print("Ìȱ֤òÉÕ¤±¤ë¤Î¤ò¤ä¤á¤¿¡£");
5920 msg_print("You cancel the temporary immune.");