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];
223 bool need_mproc_remove = FALSE;
228 need_mproc_remove = TRUE;
233 need_mproc_remove = TRUE;
238 need_mproc_remove = TRUE;
241 if (need_mproc_remove && !need_mproc(m_ptr)) mproc_remove(m_ptr->mproc_idx);
244 if (p_ptr->pclass == CLASS_BARD)
246 p_ptr->magic_num1[0] = 0;
247 p_ptr->magic_num2[0] = 0;
253 * Set "p_ptr->tim_mimic", and "p_ptr->mimic_form",
254 * notice observable changes
256 bool set_mimic(int v, int p, bool do_dec)
260 /* Hack -- Force good values */
261 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
263 if (p_ptr->is_dead) return FALSE;
268 if (p_ptr->tim_mimic && (p_ptr->mimic_form == p) && !do_dec)
270 if (p_ptr->tim_mimic > v) return FALSE;
272 else if ((!p_ptr->tim_mimic) || (p_ptr->mimic_form != p))
275 msg_print("¼«Ê¬¤ÎÂΤ¬ÊѤï¤Ã¤Æ¤æ¤¯¤Î¤ò´¶¤¸¤¿¡£");
277 msg_print("You feel that your body changes.");
287 if (p_ptr->tim_mimic)
290 msg_print("ÊѿȤ¬²ò¤±¤¿¡£");
292 msg_print("You are no longer transformed.");
294 if (p_ptr->mimic_form == MIMIC_DEMON) set_oppose_fire(0, TRUE);
302 p_ptr->tim_mimic = v;
304 /* Nothing to notice */
313 p_ptr->redraw |= (PR_BASIC | PR_STATUS);
315 /* Recalculate bonuses */
316 p_ptr->update |= (PU_BONUS | PU_HP);
325 * Set "p_ptr->blind", notice observable changes
327 * Note the use of "PU_UN_LITE" and "PU_UN_VIEW", which is needed to
328 * memorize any terrain features which suddenly become "visible".
329 * Note that blindness is currently the only thing which can affect
330 * "player_can_see_bold()".
332 bool set_blind(int v)
336 /* Hack -- Force good values */
337 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
339 if (p_ptr->is_dead) return FALSE;
346 if (p_ptr->prace == RACE_ANDROID)
349 msg_print("¥»¥ó¥µ¡¼¤ò¤ä¤é¤ì¤¿¡ª");
351 msg_print("You are blind!");
357 msg_print("Ìܤ¬¸«¤¨¤Ê¤¯¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¡ª");
359 msg_print("You are blind!");
364 chg_virtue(V_ENLIGHTEN, -1);
373 if (p_ptr->prace == RACE_ANDROID)
376 msg_print("¥»¥ó¥µ¡¼¤¬Éüµì¤·¤¿¡£");
378 msg_print("You can see again.");
384 msg_print("¤ä¤Ã¤ÈÌܤ¬¸«¤¨¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£");
386 msg_print("You can see again.");
397 /* Redraw status bar */
398 p_ptr->redraw |= (PR_STATUS);
400 /* Nothing to notice */
401 if (!notice) return (FALSE);
404 if (disturb_state) disturb(0, 0);
406 /* Fully update the visuals */
407 p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE | PU_VIEW | PU_LITE | PU_MONSTERS | PU_MON_LITE);
410 p_ptr->redraw |= (PR_MAP);
413 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
424 * Set "p_ptr->confused", notice observable changes
426 bool set_confused(int v)
430 /* Hack -- Force good values */
431 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
433 if (p_ptr->is_dead) return FALSE;
438 if (!p_ptr->confused)
441 msg_print("¤¢¤Ê¤¿¤Ïº®Í𤷤¿¡ª");
443 msg_print("You are confused!");
446 if (p_ptr->action == ACTION_LEARN)
449 msg_print("³Ø½¬¤¬Â³¤±¤é¤ì¤Ê¤¤¡ª");
451 msg_print("You cannot continue Learning!");
455 p_ptr->redraw |= (PR_STATE);
456 p_ptr->action = ACTION_NONE;
458 if (p_ptr->action == ACTION_KAMAE)
461 msg_print("¹½¤¨¤¬¤È¤±¤¿¡£");
463 msg_print("Your posture gets loose.");
465 p_ptr->special_defense &= ~(KAMAE_MASK);
466 p_ptr->update |= (PU_BONUS);
467 p_ptr->redraw |= (PR_STATE);
468 p_ptr->action = ACTION_NONE;
470 else if (p_ptr->action == ACTION_KATA)
473 msg_print("·¿¤¬Êø¤ì¤¿¡£");
475 msg_print("Your posture gets loose.");
477 p_ptr->special_defense &= ~(KATA_MASK);
478 p_ptr->update |= (PU_BONUS);
479 p_ptr->update |= (PU_MONSTERS);
480 p_ptr->redraw |= (PR_STATE);
481 p_ptr->redraw |= (PR_STATUS);
482 p_ptr->action = ACTION_NONE;
486 p_ptr->counter = FALSE;
487 chg_virtue(V_HARMONY, -1);
497 msg_print("¤ä¤Ã¤Èº®Í𤬤ª¤µ¤Þ¤Ã¤¿¡£");
499 msg_print("You feel less confused now.");
502 p_ptr->special_attack &= ~(ATTACK_SUIKEN);
510 /* Redraw status bar */
511 p_ptr->redraw |= (PR_STATUS);
513 /* Nothing to notice */
514 if (!notice) return (FALSE);
517 if (disturb_state) disturb(0, 0);
528 * Set "p_ptr->poisoned", notice observable changes
530 bool set_poisoned(int v)
534 /* Hack -- Force good values */
535 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
537 if (p_ptr->is_dead) return FALSE;
542 if (!p_ptr->poisoned)
545 msg_print("ÆǤ˿¯¤µ¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª");
547 msg_print("You are poisoned!");
560 msg_print("¤ä¤Ã¤ÈÆǤÎÄˤߤ¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
562 msg_print("You are no longer poisoned.");
572 /* Redraw status bar */
573 p_ptr->redraw |= (PR_STATUS);
575 /* Nothing to notice */
576 if (!notice) return (FALSE);
579 if (disturb_state) disturb(0, 0);
590 * Set "p_ptr->afraid", notice observable changes
592 bool set_afraid(int v)
596 /* Hack -- Force good values */
597 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
599 if (p_ptr->is_dead) return FALSE;
607 msg_print("²¿¤â¤«¤â¶²¤¯¤Ê¤Ã¤Æ¤¤¿¡ª");
609 msg_print("You are terrified!");
612 if (p_ptr->special_defense & KATA_MASK)
615 msg_print("·¿¤¬Êø¤ì¤¿¡£");
617 msg_print("Your posture gets loose.");
619 p_ptr->special_defense &= ~(KATA_MASK);
620 p_ptr->update |= (PU_BONUS);
621 p_ptr->update |= (PU_MONSTERS);
622 p_ptr->redraw |= (PR_STATE);
623 p_ptr->redraw |= (PR_STATUS);
624 p_ptr->action = ACTION_NONE;
628 p_ptr->counter = FALSE;
629 chg_virtue(V_VALOUR, -1);
639 msg_print("¤ä¤Ã¤È¶²Éݤò¿¶¤êʧ¤Ã¤¿¡£");
641 msg_print("You feel bolder now.");
651 /* Redraw status bar */
652 p_ptr->redraw |= (PR_STATUS);
654 /* Nothing to notice */
655 if (!notice) return (FALSE);
658 if (disturb_state) disturb(0, 0);
669 * Set "p_ptr->paralyzed", notice observable changes
671 bool set_paralyzed(int v)
675 /* Hack -- Force good values */
676 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
678 if (p_ptr->is_dead) return FALSE;
683 if (!p_ptr->paralyzed)
686 msg_print("ÂΤ¬Ëãá㤷¤Æ¤·¤Þ¤Ã¤¿¡ª");
688 msg_print("You are paralyzed!");
691 p_ptr->counter = FALSE;
699 if (p_ptr->paralyzed)
702 msg_print("¤ä¤Ã¤ÈÆ°¤±¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£");
704 msg_print("You can move again.");
712 p_ptr->paralyzed = v;
714 /* Redraw status bar */
715 p_ptr->redraw |= (PR_STATUS);
717 /* Nothing to notice */
718 if (!notice) return (FALSE);
721 if (disturb_state) disturb(0, 0);
723 /* Redraw the state */
724 p_ptr->redraw |= (PR_STATE);
735 * Set "p_ptr->image", notice observable changes
737 * Note that we must redraw the map when hallucination changes.
739 bool set_image(int v)
743 /* Hack -- Force good values */
744 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
746 if (p_ptr->is_dead) return FALSE;
752 set_tsuyoshi(0, TRUE);
756 msg_print("¥ï¡¼¥ª¡ª²¿¤â¤«¤âÆú¿§¤Ë¸«¤¨¤ë¡ª");
758 msg_print("Oh, wow! Everything looks so cosmic now!");
761 p_ptr->counter = FALSE;
772 msg_print("¤ä¤Ã¤È¤Ï¤Ã¤¤ê¤Èʪ¤¬¸«¤¨¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£");
774 msg_print("You can see clearly again.");
784 /* Redraw status bar */
785 p_ptr->redraw |= (PR_STATUS);
787 /* Nothing to notice */
788 if (!notice) return (FALSE);
791 if (disturb_state) disturb(0, 0);
794 p_ptr->redraw |= (PR_MAP);
796 /* Update monsters */
797 p_ptr->update |= (PU_MONSTERS);
800 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
811 * Set "p_ptr->fast", notice observable changes
813 bool set_fast(int v, bool do_dec)
817 /* Hack -- Force good values */
818 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
820 if (p_ptr->is_dead) return FALSE;
825 if (p_ptr->fast && !do_dec)
827 if (p_ptr->fast > v) return FALSE;
829 else if (!IS_FAST() && !p_ptr->lightspeed)
832 msg_print("ÁÇÁ᤯ư¤±¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡ª");
834 msg_print("You feel yourself moving much faster!");
838 chg_virtue(V_PATIENCE, -1);
839 chg_virtue(V_DILIGENCE, 1);
846 if (p_ptr->fast && !p_ptr->lightspeed && !music_singing(MUSIC_SPEED) && !music_singing(MUSIC_SHERO))
849 msg_print("Æ°¤¤ÎÁÇÁᤵ¤¬¤Ê¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£");
851 msg_print("You feel yourself slow down.");
861 /* Nothing to notice */
862 if (!notice) return (FALSE);
865 if (disturb_state) disturb(0, 0);
867 /* Recalculate bonuses */
868 p_ptr->update |= (PU_BONUS);
879 * Set "p_ptr->lightspeed", notice observable changes
881 bool set_lightspeed(int v, bool do_dec)
885 /* Hack -- Force good values */
886 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
888 if (p_ptr->is_dead) return FALSE;
893 if (p_ptr->lightspeed && !do_dec)
895 if (p_ptr->lightspeed > v) return FALSE;
897 else if (!p_ptr->lightspeed)
900 msg_print("Èó¾ï¤ËÁÇÁ᤯ư¤±¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡ª");
902 msg_print("You feel yourself moving extremely faster!");
906 chg_virtue(V_PATIENCE, -1);
907 chg_virtue(V_DILIGENCE, 1);
914 if (p_ptr->lightspeed)
917 msg_print("Æ°¤¤ÎÁÇÁᤵ¤¬¤Ê¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£");
919 msg_print("You feel yourself slow down.");
927 p_ptr->lightspeed = v;
929 /* Nothing to notice */
930 if (!notice) return (FALSE);
933 if (disturb_state) disturb(0, 0);
935 /* Recalculate bonuses */
936 p_ptr->update |= (PU_BONUS);
947 * Set "p_ptr->slow", notice observable changes
949 bool set_slow(int v, bool do_dec)
953 /* Hack -- Force good values */
954 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
956 if (p_ptr->is_dead) return FALSE;
961 if (p_ptr->slow && !do_dec)
963 if (p_ptr->slow > v) return FALSE;
965 else if (!p_ptr->slow)
968 msg_print("ÂΤÎÆ°¤¤¬ÃÙ¤¯¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¡ª");
970 msg_print("You feel yourself moving slower!");
983 msg_print("Æ°¤¤ÎÃÙ¤µ¤¬¤Ê¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£");
985 msg_print("You feel yourself speed up.");
995 /* Nothing to notice */
996 if (!notice) return (FALSE);
999 if (disturb_state) disturb(0, 0);
1001 /* Recalculate bonuses */
1002 p_ptr->update |= (PU_BONUS);
1013 * Set "p_ptr->shield", notice observable changes
1015 bool set_shield(int v, bool do_dec)
1017 bool notice = FALSE;
1019 /* Hack -- Force good values */
1020 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1022 if (p_ptr->is_dead) return FALSE;
1027 if (p_ptr->shield && !do_dec)
1029 if (p_ptr->shield > v) return FALSE;
1031 else if (!p_ptr->shield)
1034 msg_print("È©¤¬ÀФˤʤä¿¡£");
1036 msg_print("Your skin turns to stone.");
1049 msg_print("È©¤¬¸µ¤ËÌá¤Ã¤¿¡£");
1051 msg_print("Your skin returns to normal.");
1061 /* Redraw status bar */
1062 p_ptr->redraw |= (PR_STATUS);
1064 /* Nothing to notice */
1065 if (!notice) return (FALSE);
1068 if (disturb_state) disturb(0, 0);
1070 /* Recalculate bonuses */
1071 p_ptr->update |= (PU_BONUS);
1083 * Set "p_ptr->tsubureru", notice observable changes
1085 bool set_tsubureru(int v, bool do_dec)
1087 bool notice = FALSE;
1089 /* Hack -- Force good values */
1090 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1092 if (p_ptr->is_dead) return FALSE;
1097 if (p_ptr->tsubureru && !do_dec)
1099 if (p_ptr->tsubureru > v) return FALSE;
1101 else if (!p_ptr->tsubureru)
1104 msg_print("²£¤Ë¿¤Ó¤¿¡£");
1106 msg_print("Your body expands horizontally.");
1116 if (p_ptr->tsubureru)
1119 msg_print("¤â¤¦²£¤Ë¿¤Ó¤Æ¤¤¤Ê¤¤¡£");
1121 msg_print("Your body returns to normal.");
1129 p_ptr->tsubureru = v;
1131 /* Redraw status bar */
1132 p_ptr->redraw |= (PR_STATUS);
1134 /* Nothing to notice */
1135 if (!notice) return (FALSE);
1138 if (disturb_state) disturb(0, 0);
1140 /* Recalculate bonuses */
1141 p_ptr->update |= (PU_BONUS);
1153 * Set "p_ptr->magicdef", notice observable changes
1155 bool set_magicdef(int v, bool do_dec)
1157 bool notice = FALSE;
1159 /* Hack -- Force good values */
1160 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1162 if (p_ptr->is_dead) return FALSE;
1167 if (p_ptr->magicdef && !do_dec)
1169 if (p_ptr->magicdef > v) return FALSE;
1171 else if (!p_ptr->magicdef)
1174 msg_print("ËâË¡¤ÎËɸæÎϤ¬Áý¤·¤¿¤è¤¦¤Êµ¤¤¬¤¹¤ë¡£");
1176 msg_print("You feel more resistant to magic.");
1186 if (p_ptr->magicdef)
1189 msg_print("ËâË¡¤ÎËɸæÎϤ¬¸µ¤ËÌá¤Ã¤¿¡£");
1191 msg_print("You feel less resistant to magic.");
1199 p_ptr->magicdef = v;
1201 /* Redraw status bar */
1202 p_ptr->redraw |= (PR_STATUS);
1204 /* Nothing to notice */
1205 if (!notice) return (FALSE);
1208 if (disturb_state) disturb(0, 0);
1210 /* Recalculate bonuses */
1211 p_ptr->update |= (PU_BONUS);
1223 * Set "p_ptr->blessed", notice observable changes
1225 bool set_blessed(int v, bool do_dec)
1227 bool notice = FALSE;
1229 /* Hack -- Force good values */
1230 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1232 if (p_ptr->is_dead) return FALSE;
1237 if (p_ptr->blessed && !do_dec)
1239 if (p_ptr->blessed > v) return FALSE;
1241 else if (!IS_BLESSED())
1244 msg_print("¹â·é¤Êµ¤Ê¬¤Ë¤Ê¤Ã¤¿¡ª");
1246 msg_print("You feel righteous!");
1256 if (p_ptr->blessed && !music_singing(MUSIC_BLESS))
1259 msg_print("¹â·é¤Êµ¤Ê¬¤¬¾Ã¤¨¼º¤»¤¿¡£");
1261 msg_print("The prayer has expired.");
1271 /* Redraw status bar */
1272 p_ptr->redraw |= (PR_STATUS);
1274 /* Nothing to notice */
1275 if (!notice) return (FALSE);
1278 if (disturb_state) disturb(0, 0);
1280 /* Recalculate bonuses */
1281 p_ptr->update |= (PU_BONUS);
1292 * Set "p_ptr->hero", notice observable changes
1294 bool set_hero(int v, bool do_dec)
1296 bool notice = FALSE;
1298 /* Hack -- Force good values */
1299 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1301 if (p_ptr->is_dead) return FALSE;
1306 if (p_ptr->hero && !do_dec)
1308 if (p_ptr->hero > v) return FALSE;
1310 else if (!IS_HERO())
1313 msg_print("¥Ò¡¼¥í¡¼¤Ë¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡ª");
1315 msg_print("You feel like a hero!");
1325 if (p_ptr->hero && !music_singing(MUSIC_HERO) && !music_singing(MUSIC_SHERO))
1328 msg_print("¥Ò¡¼¥í¡¼¤Îµ¤Ê¬¤¬¾Ã¤¨¼º¤»¤¿¡£");
1330 msg_print("The heroism wears off.");
1340 /* Redraw status bar */
1341 p_ptr->redraw |= (PR_STATUS);
1343 /* Nothing to notice */
1344 if (!notice) return (FALSE);
1347 if (disturb_state) disturb(0, 0);
1349 /* Recalculate bonuses */
1350 p_ptr->update |= (PU_BONUS);
1352 /* Recalculate hitpoints */
1353 p_ptr->update |= (PU_HP);
1364 * Set "p_ptr->shero", notice observable changes
1366 bool set_shero(int v, bool do_dec)
1368 bool notice = FALSE;
1370 /* Hack -- Force good values */
1371 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1373 if (p_ptr->is_dead) return FALSE;
1375 if (p_ptr->pclass == CLASS_BERSERKER) v = 1;
1379 if (p_ptr->shero && !do_dec)
1381 if (p_ptr->shero > v) return FALSE;
1383 else if (!p_ptr->shero)
1386 msg_print("»¦Ù¤¥Þ¥·¡¼¥ó¤Ë¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡ª");
1388 msg_print("You feel like a killing machine!");
1401 msg_print("ÌîÈڤʵ¤»ý¤Á¤¬¾Ã¤¨¼º¤»¤¿¡£");
1403 msg_print("You feel less Berserk.");
1413 /* Redraw status bar */
1414 p_ptr->redraw |= (PR_STATUS);
1416 /* Nothing to notice */
1417 if (!notice) return (FALSE);
1420 if (disturb_state) disturb(0, 0);
1422 /* Recalculate bonuses */
1423 p_ptr->update |= (PU_BONUS);
1425 /* Recalculate hitpoints */
1426 p_ptr->update |= (PU_HP);
1437 * Set "p_ptr->protevil", notice observable changes
1439 bool set_protevil(int v, bool do_dec)
1441 bool notice = FALSE;
1443 /* Hack -- Force good values */
1444 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1446 if (p_ptr->is_dead) return FALSE;
1451 if (p_ptr->protevil && !do_dec)
1453 if (p_ptr->protevil > v) return FALSE;
1455 else if (!p_ptr->protevil)
1458 msg_print("¼Ù°¤Ê¤ë¸ºß¤«¤é¼é¤é¤ì¤Æ¤¤¤ë¤è¤¦¤Ê´¶¤¸¤¬¤¹¤ë¡ª");
1460 msg_print("You feel safe from evil!");
1470 if (p_ptr->protevil)
1473 msg_print("¼Ù°¤Ê¤ë¸ºß¤«¤é¼é¤é¤ì¤Æ¤¤¤ë´¶¤¸¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
1475 msg_print("You no longer feel safe from evil.");
1483 p_ptr->protevil = v;
1485 /* Redraw status bar */
1486 p_ptr->redraw |= (PR_STATUS);
1488 /* Nothing to notice */
1489 if (!notice) return (FALSE);
1492 if (disturb_state) disturb(0, 0);
1502 * Set "p_ptr->wraith_form", notice observable changes
1504 bool set_wraith_form(int v, bool do_dec)
1506 bool notice = FALSE;
1508 /* Hack -- Force good values */
1509 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1511 if (p_ptr->is_dead) return FALSE;
1516 if (p_ptr->wraith_form && !do_dec)
1518 if (p_ptr->wraith_form > v) return FALSE;
1520 else if (!p_ptr->wraith_form)
1523 msg_print("ʪ¼Á³¦¤òÎ¥¤ì¤ÆÍ©µ´¤Î¤è¤¦¤Ê¸ºß¤Ë¤Ê¤Ã¤¿¡ª");
1525 msg_print("You leave the physical world and turn into a wraith-being!");
1530 chg_virtue(V_UNLIFE, 3);
1531 chg_virtue(V_HONOUR, -2);
1532 chg_virtue(V_SACRIFICE, -2);
1533 chg_virtue(V_VALOUR, -5);
1536 p_ptr->redraw |= (PR_MAP);
1538 /* Update monsters */
1539 p_ptr->update |= (PU_MONSTERS);
1542 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1549 if (p_ptr->wraith_form)
1552 msg_print("ÉÔÆ©ÌÀ¤Ë¤Ê¤Ã¤¿´¶¤¸¤¬¤¹¤ë¡£");
1554 msg_print("You feel opaque.");
1560 p_ptr->redraw |= (PR_MAP);
1562 /* Update monsters */
1563 p_ptr->update |= (PU_MONSTERS);
1566 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1571 p_ptr->wraith_form = v;
1573 /* Redraw status bar */
1574 p_ptr->redraw |= (PR_STATUS);
1576 /* Nothing to notice */
1577 if (!notice) return (FALSE);
1580 if (disturb_state) disturb(0, 0);
1582 /* Recalculate bonuses */
1583 p_ptr->update |= (PU_BONUS);
1595 * Set "p_ptr->invuln", notice observable changes
1597 bool set_invuln(int v, bool do_dec)
1599 bool notice = FALSE;
1601 /* Hack -- Force good values */
1602 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1604 if (p_ptr->is_dead) return FALSE;
1609 if (p_ptr->invuln && !do_dec)
1611 if (p_ptr->invuln > v) return FALSE;
1613 else if (!IS_INVULN())
1616 msg_print("̵Ũ¤À¡ª");
1618 msg_print("Invulnerability!");
1623 chg_virtue(V_UNLIFE, -2);
1624 chg_virtue(V_HONOUR, -2);
1625 chg_virtue(V_SACRIFICE, -3);
1626 chg_virtue(V_VALOUR, -5);
1629 p_ptr->redraw |= (PR_MAP);
1631 /* Update monsters */
1632 p_ptr->update |= (PU_MONSTERS);
1635 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1642 if (p_ptr->invuln && !music_singing(MUSIC_INVULN))
1645 msg_print("̵Ũ¤Ç¤Ï¤Ê¤¯¤Ê¤Ã¤¿¡£");
1647 msg_print("The invulnerability wears off.");
1653 p_ptr->redraw |= (PR_MAP);
1655 /* Update monsters */
1656 p_ptr->update |= (PU_MONSTERS);
1659 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1661 p_ptr->energy_need += ENERGY_NEED();
1668 /* Redraw status bar */
1669 p_ptr->redraw |= (PR_STATUS);
1671 /* Nothing to notice */
1672 if (!notice) return (FALSE);
1675 if (disturb_state) disturb(0, 0);
1677 /* Recalculate bonuses */
1678 p_ptr->update |= (PU_BONUS);
1689 * Set "p_ptr->tim_esp", notice observable changes
1691 bool set_tim_esp(int v, bool do_dec)
1693 bool notice = FALSE;
1695 /* Hack -- Force good values */
1696 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1698 if (p_ptr->is_dead) return FALSE;
1703 if (p_ptr->tim_esp && !do_dec)
1705 if (p_ptr->tim_esp > v) return FALSE;
1707 else if (!IS_TIM_ESP())
1710 msg_print("°Õ¼±¤¬¹¤¬¤Ã¤¿µ¤¤¬¤¹¤ë¡ª");
1712 msg_print("You feel your consciousness expand!");
1722 if (p_ptr->tim_esp && !music_singing(MUSIC_MIND))
1725 msg_print("°Õ¼±¤Ï¸µ¤ËÌá¤Ã¤¿¡£");
1727 msg_print("Your consciousness contracts again.");
1737 /* Redraw status bar */
1738 p_ptr->redraw |= (PR_STATUS);
1740 /* Nothing to notice */
1741 if (!notice) return (FALSE);
1744 if (disturb_state) disturb(0, 0);
1746 /* Recalculate bonuses */
1747 p_ptr->update |= (PU_BONUS);
1749 /* Update the monsters */
1750 p_ptr->update |= (PU_MONSTERS);
1761 * Set "p_ptr->tim_invis", notice observable changes
1763 bool set_tim_invis(int v, bool do_dec)
1765 bool notice = FALSE;
1767 /* Hack -- Force good values */
1768 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1770 if (p_ptr->is_dead) return FALSE;
1775 if (p_ptr->tim_invis && !do_dec)
1777 if (p_ptr->tim_invis > v) return FALSE;
1779 else if (!p_ptr->tim_invis)
1782 msg_print("Ìܤ¬Èó¾ï¤ËÉÒ´¶¤Ë¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡ª");
1784 msg_print("Your eyes feel very sensitive!");
1794 if (p_ptr->tim_invis)
1797 msg_print("ÌܤÎÉÒ´¶¤µ¤¬¤Ê¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£");
1799 msg_print("Your eyes feel less sensitive.");
1807 p_ptr->tim_invis = v;
1809 /* Redraw status bar */
1810 p_ptr->redraw |= (PR_STATUS);
1812 /* Nothing to notice */
1813 if (!notice) return (FALSE);
1816 if (disturb_state) disturb(0, 0);
1818 /* Recalculate bonuses */
1819 p_ptr->update |= (PU_BONUS);
1821 /* Update the monsters */
1822 p_ptr->update |= (PU_MONSTERS);
1833 * Set "p_ptr->tim_infra", notice observable changes
1835 bool set_tim_infra(int v, bool do_dec)
1837 bool notice = FALSE;
1839 /* Hack -- Force good values */
1840 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1842 if (p_ptr->is_dead) return FALSE;
1847 if (p_ptr->tim_infra && !do_dec)
1849 if (p_ptr->tim_infra > v) return FALSE;
1851 else if (!p_ptr->tim_infra)
1854 msg_print("Ìܤ¬¥é¥ó¥é¥ó¤Èµ±¤»Ï¤á¤¿¡ª");
1856 msg_print("Your eyes begin to tingle!");
1866 if (p_ptr->tim_infra)
1869 msg_print("Ìܤ層¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
1871 msg_print("Your eyes stop tingling.");
1879 p_ptr->tim_infra = v;
1881 /* Redraw status bar */
1882 p_ptr->redraw |= (PR_STATUS);
1884 /* Nothing to notice */
1885 if (!notice) return (FALSE);
1888 if (disturb_state) disturb(0, 0);
1890 /* Recalculate bonuses */
1891 p_ptr->update |= (PU_BONUS);
1893 /* Update the monsters */
1894 p_ptr->update |= (PU_MONSTERS);
1905 * Set "p_ptr->tim_regen", notice observable changes
1907 bool set_tim_regen(int v, bool do_dec)
1909 bool notice = FALSE;
1911 /* Hack -- Force good values */
1912 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1914 if (p_ptr->is_dead) return FALSE;
1919 if (p_ptr->tim_regen && !do_dec)
1921 if (p_ptr->tim_regen > v) return FALSE;
1923 else if (!p_ptr->tim_regen)
1926 msg_print("²óÉüÎϤ¬¾å¤¬¤Ã¤¿¡ª");
1928 msg_print("You feel yourself regenerating quickly!");
1938 if (p_ptr->tim_regen)
1941 msg_print("ÁÇÁ᤯²óÉü¤¹¤ë´¶¤¸¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
1943 msg_print("You feel yourself regenerating slowly.");
1951 p_ptr->tim_regen = v;
1953 /* Redraw status bar */
1954 p_ptr->redraw |= (PR_STATUS);
1956 /* Nothing to notice */
1957 if (!notice) return (FALSE);
1960 if (disturb_state) disturb(0, 0);
1962 /* Recalculate bonuses */
1963 p_ptr->update |= (PU_BONUS);
1974 * Set "p_ptr->tim_stealth", notice observable changes
1976 bool set_tim_stealth(int v, bool do_dec)
1978 bool notice = FALSE;
1980 /* Hack -- Force good values */
1981 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1983 if (p_ptr->is_dead) return FALSE;
1988 if (p_ptr->tim_stealth && !do_dec)
1990 if (p_ptr->tim_stealth > v) return FALSE;
1992 else if (!IS_TIM_STEALTH())
1995 msg_print("²»¤¬¾®¤µ¤¯¤Ê¤Ã¤¿¡ª");
1997 msg_print("You begin to walk silently!");
2007 if (p_ptr->tim_stealth && !music_singing(MUSIC_STEALTH))
2010 msg_print("²»¤¬Â礤¯¤Ê¤Ã¤¿¡£");
2012 msg_print("You no longer walk silently.");
2020 p_ptr->tim_stealth = v;
2022 /* Redraw status bar */
2023 p_ptr->redraw |= (PR_STATUS);
2025 /* Nothing to notice */
2026 if (!notice) return (FALSE);
2029 if (disturb_state) disturb(0, 0);
2031 /* Recalculate bonuses */
2032 p_ptr->update |= (PU_BONUS);
2042 bool set_superstealth(bool set)
2044 bool notice = FALSE;
2046 if (p_ptr->is_dead) return FALSE;
2051 if (!(p_ptr->special_defense & NINJA_S_STEALTH))
2053 if (cave[py][px].info & CAVE_MNLT)
2056 msg_print("Ũ¤ÎÌܤ«¤éÇö¤¤±Æ¤ÎÃæ¤Ëʤ¤¤±£¤µ¤ì¤¿¡£");
2058 msg_print("You are mantled in weak shadow from ordinary eyes.");
2060 p_ptr->monlite = p_ptr->old_monlite = TRUE;
2065 msg_print("Ũ¤ÎÌܤ«¤é±Æ¤ÎÃæ¤Ëʤ¤¤±£¤µ¤ì¤¿¡ª");
2067 msg_print("You are mantled in shadow from ordinary eyes!");
2069 p_ptr->monlite = p_ptr->old_monlite = FALSE;
2075 p_ptr->special_defense |= NINJA_S_STEALTH;
2082 if (p_ptr->special_defense & NINJA_S_STEALTH)
2085 msg_print("ºÆ¤ÓŨ¤ÎÌܤˤµ¤é¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£");
2087 msg_print("You are exposed to common sight once more.");
2093 p_ptr->special_defense &= ~(NINJA_S_STEALTH);
2097 /* Nothing to notice */
2098 if (!notice) return (FALSE);
2100 /* Redraw status bar */
2101 p_ptr->redraw |= (PR_STATUS);
2104 if (disturb_state) disturb(0, 0);
2112 * Set "p_ptr->tim_levitation", notice observable changes
2114 bool set_tim_levitation(int v, bool do_dec)
2116 bool notice = FALSE;
2118 /* Hack -- Force good values */
2119 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2121 if (p_ptr->is_dead) return FALSE;
2126 if (p_ptr->tim_levitation && !do_dec)
2128 if (p_ptr->tim_levitation > v) return FALSE;
2130 else if (!p_ptr->tim_levitation)
2133 msg_print("ÂΤ¬Ãè¤ËÉ⤻Ϥ᤿¡£");
2135 msg_print("You begin to fly!");
2145 if (p_ptr->tim_levitation)
2148 msg_print("¤â¤¦Ãè¤ËÉ⤫¤Ù¤Ê¤¯¤Ê¤Ã¤¿¡£");
2150 msg_print("You stop flying.");
2158 p_ptr->tim_levitation = v;
2160 /* Redraw status bar */
2161 p_ptr->redraw |= (PR_STATUS);
2163 /* Nothing to notice */
2164 if (!notice) return (FALSE);
2167 if (disturb_state) disturb(0, 0);
2169 /* Recalculate bonuses */
2170 p_ptr->update |= (PU_BONUS);
2181 * Set "p_ptr->tim_sh_touki", notice observable changes
2183 bool set_tim_sh_touki(int v, bool do_dec)
2185 bool notice = FALSE;
2187 /* Hack -- Force good values */
2188 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2190 if (p_ptr->is_dead) return FALSE;
2195 if (p_ptr->tim_sh_touki && !do_dec)
2197 if (p_ptr->tim_sh_touki > v) return FALSE;
2199 else if (!p_ptr->tim_sh_touki)
2202 msg_print("ÂΤ¬Æ®µ¤¤Î¥ª¡¼¥é¤Çʤ¤ï¤ì¤¿¡£");
2204 msg_print("You have enveloped by the aura of the Force!");
2214 if (p_ptr->tim_sh_touki)
2217 msg_print("Æ®µ¤¤¬¾Ã¤¨¤¿¡£");
2219 msg_print("Aura of the Force disappeared.");
2227 p_ptr->tim_sh_touki = v;
2229 /* Redraw status bar */
2230 p_ptr->redraw |= (PR_STATUS);
2232 /* Nothing to notice */
2233 if (!notice) return (FALSE);
2236 if (disturb_state) disturb(0, 0);
2247 * Set "p_ptr->tim_sh_fire", notice observable changes
2249 bool set_tim_sh_fire(int v, bool do_dec)
2251 bool notice = FALSE;
2253 /* Hack -- Force good values */
2254 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2256 if (p_ptr->is_dead) return FALSE;
2261 if (p_ptr->tim_sh_fire && !do_dec)
2263 if (p_ptr->tim_sh_fire > v) return FALSE;
2265 else if (!p_ptr->tim_sh_fire)
2268 msg_print("ÂΤ¬±ê¤Î¥ª¡¼¥é¤Çʤ¤ï¤ì¤¿¡£");
2270 msg_print("You have enveloped by fiery aura!");
2280 if (p_ptr->tim_sh_fire)
2283 msg_print("±ê¤Î¥ª¡¼¥é¤¬¾Ã¤¨¤¿¡£");
2285 msg_print("Fiery aura disappeared.");
2293 p_ptr->tim_sh_fire = v;
2295 /* Redraw status bar */
2296 p_ptr->redraw |= (PR_STATUS);
2298 /* Nothing to notice */
2299 if (!notice) return (FALSE);
2302 if (disturb_state) disturb(0, 0);
2304 /* Recalculate bonuses */
2305 p_ptr->update |= (PU_BONUS);
2316 * Set "p_ptr->tim_sh_holy", notice observable changes
2318 bool set_tim_sh_holy(int v, bool do_dec)
2320 bool notice = FALSE;
2322 /* Hack -- Force good values */
2323 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2325 if (p_ptr->is_dead) return FALSE;
2330 if (p_ptr->tim_sh_holy && !do_dec)
2332 if (p_ptr->tim_sh_holy > v) return FALSE;
2334 else if (!p_ptr->tim_sh_holy)
2337 msg_print("ÂΤ¬À»¤Ê¤ë¥ª¡¼¥é¤Çʤ¤ï¤ì¤¿¡£");
2339 msg_print("You have enveloped by holy aura!");
2349 if (p_ptr->tim_sh_holy)
2352 msg_print("À»¤Ê¤ë¥ª¡¼¥é¤¬¾Ã¤¨¤¿¡£");
2354 msg_print("Holy aura disappeared.");
2362 p_ptr->tim_sh_holy = v;
2364 /* Redraw status bar */
2365 p_ptr->redraw |= (PR_STATUS);
2367 /* Nothing to notice */
2368 if (!notice) return (FALSE);
2371 if (disturb_state) disturb(0, 0);
2373 /* Recalculate bonuses */
2374 p_ptr->update |= (PU_BONUS);
2386 * Set "p_ptr->tim_eyeeye", notice observable changes
2388 bool set_tim_eyeeye(int v, bool do_dec)
2390 bool notice = FALSE;
2392 /* Hack -- Force good values */
2393 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2395 if (p_ptr->is_dead) return FALSE;
2400 if (p_ptr->tim_eyeeye && !do_dec)
2402 if (p_ptr->tim_eyeeye > v) return FALSE;
2404 else if (!p_ptr->tim_eyeeye)
2407 msg_print("Ë¡¤Î¼é¤ê¼ê¤Ë¤Ê¤Ã¤¿µ¤¤¬¤·¤¿¡ª");
2409 msg_print("You feel like a keeper of commandments!");
2419 if (p_ptr->tim_eyeeye)
2422 msg_print("Ĩȳ¤ò¼¹¹Ô¤¹¤ë¤³¤È¤¬¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2424 msg_print("You no longer feel like a keeper.");
2432 p_ptr->tim_eyeeye = v;
2434 /* Redraw status bar */
2435 p_ptr->redraw |= (PR_STATUS);
2437 /* Nothing to notice */
2438 if (!notice) return (FALSE);
2441 if (disturb_state) disturb(0, 0);
2443 /* Recalculate bonuses */
2444 p_ptr->update |= (PU_BONUS);
2456 * Set "p_ptr->resist_magic", notice observable changes
2458 bool set_resist_magic(int v, bool do_dec)
2460 bool notice = FALSE;
2462 /* Hack -- Force good values */
2463 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2465 if (p_ptr->is_dead) return FALSE;
2470 if (p_ptr->resist_magic && !do_dec)
2472 if (p_ptr->resist_magic > v) return FALSE;
2474 else if (!p_ptr->resist_magic)
2477 msg_print("ËâË¡¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿¡£");
2479 msg_print("You have been protected from magic!");
2489 if (p_ptr->resist_magic)
2492 msg_print("ËâË¡¤Ë¼å¤¯¤Ê¤Ã¤¿¡£");
2494 msg_print("You are no longer protected from magic.");
2502 p_ptr->resist_magic = v;
2504 /* Redraw status bar */
2505 p_ptr->redraw |= (PR_STATUS);
2507 /* Nothing to notice */
2508 if (!notice) return (FALSE);
2511 if (disturb_state) disturb(0, 0);
2513 /* Recalculate bonuses */
2514 p_ptr->update |= (PU_BONUS);
2525 * Set "p_ptr->tim_reflect", notice observable changes
2527 bool set_tim_reflect(int v, bool do_dec)
2529 bool notice = FALSE;
2531 /* Hack -- Force good values */
2532 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2534 if (p_ptr->is_dead) return FALSE;
2539 if (p_ptr->tim_reflect && !do_dec)
2541 if (p_ptr->tim_reflect > v) return FALSE;
2543 else if (!p_ptr->tim_reflect)
2546 msg_print("ÂΤÎɽÌ̤¬³ê¤«¤Ë¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£");
2548 msg_print("Your body becames smooth.");
2558 if (p_ptr->tim_reflect)
2561 msg_print("ÂΤÎɽÌ̤¬³ê¤«¤Ç¤Ê¤¯¤Ê¤Ã¤¿¡£");
2563 msg_print("Your body is no longer smooth.");
2571 p_ptr->tim_reflect = v;
2573 /* Redraw status bar */
2574 p_ptr->redraw |= (PR_STATUS);
2576 /* Nothing to notice */
2577 if (!notice) return (FALSE);
2580 if (disturb_state) disturb(0, 0);
2582 /* Recalculate bonuses */
2583 p_ptr->update |= (PU_BONUS);
2594 * Set "p_ptr->multishadow", notice observable changes
2596 bool set_multishadow(int v, bool do_dec)
2598 bool notice = FALSE;
2600 /* Hack -- Force good values */
2601 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2603 if (p_ptr->is_dead) return FALSE;
2608 if (p_ptr->multishadow && !do_dec)
2610 if (p_ptr->multishadow > v) return FALSE;
2612 else if (!p_ptr->multishadow)
2615 msg_print("¤¢¤Ê¤¿¤Î¼þ¤ê¤Ë¸¸±Æ¤¬À¸¤Þ¤ì¤¿¡£");
2617 msg_print("Your Shadow enveloped you.");
2627 if (p_ptr->multishadow)
2630 msg_print("¸¸±Æ¤¬¾Ã¤¨¤¿¡£");
2632 msg_print("Your Shadow disappears.");
2640 p_ptr->multishadow = v;
2642 /* Redraw status bar */
2643 p_ptr->redraw |= (PR_STATUS);
2645 /* Nothing to notice */
2646 if (!notice) return (FALSE);
2649 if (disturb_state) disturb(0, 0);
2651 /* Recalculate bonuses */
2652 p_ptr->update |= (PU_BONUS);
2663 * Set "p_ptr->dustrobe", notice observable changes
2665 bool set_dustrobe(int v, bool do_dec)
2667 bool notice = FALSE;
2669 /* Hack -- Force good values */
2670 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2672 if (p_ptr->is_dead) return FALSE;
2677 if (p_ptr->dustrobe && !do_dec)
2679 if (p_ptr->dustrobe > v) return FALSE;
2681 else if (!p_ptr->dustrobe)
2684 msg_print("ÂΤ¬¶À¤Î¥ª¡¼¥é¤Çʤ¤ï¤ì¤¿¡£");
2686 msg_print("You were enveloped by mirror shards.");
2696 if (p_ptr->dustrobe)
2699 msg_print("¶À¤Î¥ª¡¼¥é¤¬¾Ã¤¨¤¿¡£");
2701 msg_print("The mirror shards disappear.");
2709 p_ptr->dustrobe = v;
2711 /* Redraw status bar */
2712 p_ptr->redraw |= (PR_STATUS);
2714 /* Nothing to notice */
2715 if (!notice) return (FALSE);
2718 if (disturb_state) disturb(0, 0);
2720 /* Recalculate bonuses */
2721 p_ptr->update |= (PU_BONUS);
2732 * Set "p_ptr->tim_regen", notice observable changes
2734 bool set_kabenuke(int v, bool do_dec)
2736 bool notice = FALSE;
2738 /* Hack -- Force good values */
2739 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2741 if (p_ptr->is_dead) return FALSE;
2746 if (p_ptr->kabenuke && !do_dec)
2748 if (p_ptr->kabenuke > v) return FALSE;
2750 else if (!p_ptr->kabenuke)
2753 msg_print("ÂΤ¬È¾Êª¼Á¤Î¾õÂ֤ˤʤä¿¡£");
2755 msg_print("You became ethereal form.");
2765 if (p_ptr->kabenuke)
2768 msg_print("ÂΤ¬Êª¼Á²½¤·¤¿¡£");
2770 msg_print("You are no longer in an ethereal form.");
2778 p_ptr->kabenuke = v;
2780 /* Redraw status bar */
2781 p_ptr->redraw |= (PR_STATUS);
2783 /* Nothing to notice */
2784 if (!notice) return (FALSE);
2787 if (disturb_state) disturb(0, 0);
2789 /* Recalculate bonuses */
2790 p_ptr->update |= (PU_BONUS);
2800 bool set_tsuyoshi(int v, bool do_dec)
2802 bool notice = FALSE;
2804 /* Hack -- Force good values */
2805 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2807 if (p_ptr->is_dead) return FALSE;
2812 if (p_ptr->tsuyoshi && !do_dec)
2814 if (p_ptr->tsuyoshi > v) return FALSE;
2816 else if (!p_ptr->tsuyoshi)
2819 msg_print("¡Ö¥ª¥¯¥ì·»¤µ¤ó¡ª¡×");
2821 msg_print("Brother OKURE!");
2825 chg_virtue(V_VITALITY, 2);
2832 if (p_ptr->tsuyoshi)
2835 msg_print("ÆùÂΤ¬µÞ®¤Ë¤·¤Ü¤ó¤Ç¤¤¤Ã¤¿¡£");
2837 msg_print("Your body had quickly shriveled.");
2840 (void)dec_stat(A_CON, 20, TRUE);
2841 (void)dec_stat(A_STR, 20, TRUE);
2844 chg_virtue(V_VITALITY, -3);
2849 p_ptr->tsuyoshi = v;
2851 /* Redraw status bar */
2852 p_ptr->redraw |= (PR_STATUS);
2854 /* Nothing to notice */
2855 if (!notice) return (FALSE);
2858 if (disturb_state) disturb(0, 0);
2860 /* Recalculate bonuses */
2861 p_ptr->update |= (PU_BONUS);
2863 /* Recalculate hitpoints */
2864 p_ptr->update |= (PU_HP);
2875 * Set a temporary elemental brand. Clear all other brands. Print status
2878 bool set_ele_attack(u32b attack_type, int v)
2880 /* Hack -- Force good values */
2881 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2883 /* Clear all elemental attacks (only one is allowed at a time). */
2884 if ((p_ptr->special_attack & (ATTACK_ACID)) && (attack_type != ATTACK_ACID))
2886 p_ptr->special_attack &= ~(ATTACK_ACID);
2888 msg_print("»À¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2890 msg_print("Your temporary acidic brand fades away.");
2893 if ((p_ptr->special_attack & (ATTACK_ELEC)) && (attack_type != ATTACK_ELEC))
2895 p_ptr->special_attack &= ~(ATTACK_ELEC);
2897 msg_print("ÅÅ·â¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2899 msg_print("Your temporary electrical brand fades away.");
2902 if ((p_ptr->special_attack & (ATTACK_FIRE)) && (attack_type != ATTACK_FIRE))
2904 p_ptr->special_attack &= ~(ATTACK_FIRE);
2906 msg_print("²Ð±ê¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2908 msg_print("Your temporary fiery brand fades away.");
2911 if ((p_ptr->special_attack & (ATTACK_COLD)) && (attack_type != ATTACK_COLD))
2913 p_ptr->special_attack &= ~(ATTACK_COLD);
2915 msg_print("Î䵤¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2917 msg_print("Your temporary frost brand fades away.");
2920 if ((p_ptr->special_attack & (ATTACK_POIS)) && (attack_type != ATTACK_POIS))
2922 p_ptr->special_attack &= ~(ATTACK_POIS);
2924 msg_print("ÆǤǹ¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2926 msg_print("Your temporary poison brand fades away.");
2930 if ((v) && (attack_type))
2932 /* Set attack type. */
2933 p_ptr->special_attack |= (attack_type);
2936 p_ptr->ele_attack = v;
2940 msg_format("%s¤Ç¹¶·â¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡ª",
2941 ((attack_type == ATTACK_ACID) ? "»À" :
2942 ((attack_type == ATTACK_ELEC) ? "ÅÅ·â" :
2943 ((attack_type == ATTACK_FIRE) ? "²Ð±ê" :
2944 ((attack_type == ATTACK_COLD) ? "Î䵤" :
2945 ((attack_type == ATTACK_POIS) ? "ÆÇ" :
2948 msg_format("For a while, the blows you deal will %s",
2949 ((attack_type == ATTACK_ACID) ? "melt with acid!" :
2950 ((attack_type == ATTACK_ELEC) ? "shock your foes!" :
2951 ((attack_type == ATTACK_FIRE) ? "burn with fire!" :
2952 ((attack_type == ATTACK_COLD) ? "chill to the bone!" :
2953 ((attack_type == ATTACK_POIS) ? "poison your enemies!" :
2954 "do nothing special."))))));
2959 if (disturb_state) disturb(0, 0);
2961 /* Redraw status bar */
2962 p_ptr->redraw |= (PR_STATUS);
2964 p_ptr->update |= (PU_BONUS);
2974 * Set a temporary elemental brand. Clear all other brands. Print status
2977 bool set_ele_immune(u32b immune_type, int v)
2979 /* Hack -- Force good values */
2980 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2982 /* Clear all elemental attacks (only one is allowed at a time). */
2983 if ((p_ptr->special_defense & (DEFENSE_ACID)) && (immune_type != DEFENSE_ACID))
2985 p_ptr->special_defense &= ~(DEFENSE_ACID);
2987 msg_print("»À¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
2989 msg_print("You are no longer immune to acid.");
2992 if ((p_ptr->special_defense & (DEFENSE_ELEC)) && (immune_type != DEFENSE_ELEC))
2994 p_ptr->special_defense &= ~(DEFENSE_ELEC);
2996 msg_print("ÅÅ·â¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
2998 msg_print("You are no longer immune to electricity.");
3001 if ((p_ptr->special_defense & (DEFENSE_FIRE)) && (immune_type != DEFENSE_FIRE))
3003 p_ptr->special_defense &= ~(DEFENSE_FIRE);
3005 msg_print("²Ð±ê¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3007 msg_print("You are no longer immune to fire.");
3010 if ((p_ptr->special_defense & (DEFENSE_COLD)) && (immune_type != DEFENSE_COLD))
3012 p_ptr->special_defense &= ~(DEFENSE_COLD);
3014 msg_print("Î䵤¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3016 msg_print("You are no longer immune to cold.");
3019 if ((p_ptr->special_defense & (DEFENSE_POIS)) && (immune_type != DEFENSE_POIS))
3021 p_ptr->special_defense &= ~(DEFENSE_POIS);
3023 msg_print("ÆǤι¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3025 msg_print("You are no longer immune to poison.");
3029 if ((v) && (immune_type))
3031 /* Set attack type. */
3032 p_ptr->special_defense |= (immune_type);
3035 p_ptr->ele_immune = v;
3039 msg_format("%s¤Î¹¶·â¤ò¼õ¤±¤Ä¤±¤Ê¤¯¤Ê¤Ã¤¿¡ª",
3040 ((immune_type == DEFENSE_ACID) ? "»À" :
3041 ((immune_type == DEFENSE_ELEC) ? "ÅÅ·â" :
3042 ((immune_type == DEFENSE_FIRE) ? "²Ð±ê" :
3043 ((immune_type == DEFENSE_COLD) ? "Î䵤" :
3044 ((immune_type == DEFENSE_POIS) ? "ÆÇ" :
3047 msg_format("For a while, You are immune to %s",
3048 ((immune_type == DEFENSE_ACID) ? "acid!" :
3049 ((immune_type == DEFENSE_ELEC) ? "electricity!" :
3050 ((immune_type == DEFENSE_FIRE) ? "fire!" :
3051 ((immune_type == DEFENSE_COLD) ? "cold!" :
3052 ((immune_type == DEFENSE_POIS) ? "poison!" :
3053 "do nothing special."))))));
3058 if (disturb_state) disturb(0, 0);
3060 /* Redraw status bar */
3061 p_ptr->redraw |= (PR_STATUS);
3063 p_ptr->update |= (PU_BONUS);
3073 * Set "p_ptr->oppose_acid", notice observable changes
3075 bool set_oppose_acid(int v, bool do_dec)
3077 bool notice = FALSE;
3079 /* Hack -- Force good values */
3080 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3082 if (p_ptr->is_dead) return FALSE;
3087 if (p_ptr->oppose_acid && !do_dec)
3089 if (p_ptr->oppose_acid > v) return FALSE;
3091 else if (!IS_OPPOSE_ACID())
3094 msg_print("»À¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3096 msg_print("You feel resistant to acid!");
3106 if (p_ptr->oppose_acid && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3109 msg_print("»À¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3111 msg_print("You feel less resistant to acid.");
3119 p_ptr->oppose_acid = v;
3121 /* Nothing to notice */
3122 if (!notice) return (FALSE);
3124 /* Redraw status bar */
3125 p_ptr->redraw |= (PR_STATUS);
3128 if (disturb_state) disturb(0, 0);
3139 * Set "p_ptr->oppose_elec", notice observable changes
3141 bool set_oppose_elec(int v, bool do_dec)
3143 bool notice = FALSE;
3145 /* Hack -- Force good values */
3146 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3148 if (p_ptr->is_dead) return FALSE;
3153 if (p_ptr->oppose_elec && !do_dec)
3155 if (p_ptr->oppose_elec > v) return FALSE;
3157 else if (!IS_OPPOSE_ELEC())
3160 msg_print("ÅÅ·â¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3162 msg_print("You feel resistant to electricity!");
3172 if (p_ptr->oppose_elec && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3175 msg_print("ÅÅ·â¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3177 msg_print("You feel less resistant to electricity.");
3185 p_ptr->oppose_elec = v;
3187 /* Nothing to notice */
3188 if (!notice) return (FALSE);
3190 /* Redraw status bar */
3191 p_ptr->redraw |= (PR_STATUS);
3194 if (disturb_state) disturb(0, 0);
3205 * Set "p_ptr->oppose_fire", notice observable changes
3207 bool set_oppose_fire(int v, bool do_dec)
3209 bool notice = FALSE;
3211 /* Hack -- Force good values */
3212 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3214 if (p_ptr->is_dead) return FALSE;
3216 if ((prace_is_(RACE_DEMON) && (p_ptr->lev > 44)) || (p_ptr->mimic_form == MIMIC_DEMON)) v = 1;
3220 if (p_ptr->oppose_fire && !do_dec)
3222 if (p_ptr->oppose_fire > v) return FALSE;
3224 else if (!IS_OPPOSE_FIRE())
3227 msg_print("²Ð¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3229 msg_print("You feel resistant to fire!");
3239 if (p_ptr->oppose_fire && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3242 msg_print("²Ð¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3244 msg_print("You feel less resistant to fire.");
3252 p_ptr->oppose_fire = v;
3254 /* Nothing to notice */
3255 if (!notice) return (FALSE);
3257 /* Redraw status bar */
3258 p_ptr->redraw |= (PR_STATUS);
3261 if (disturb_state) disturb(0, 0);
3272 * Set "p_ptr->oppose_cold", notice observable changes
3274 bool set_oppose_cold(int v, bool do_dec)
3276 bool notice = FALSE;
3278 /* Hack -- Force good values */
3279 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3281 if (p_ptr->is_dead) return FALSE;
3286 if (p_ptr->oppose_cold && !do_dec)
3288 if (p_ptr->oppose_cold > v) return FALSE;
3290 else if (!IS_OPPOSE_COLD())
3293 msg_print("Î䵤¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3295 msg_print("You feel resistant to cold!");
3305 if (p_ptr->oppose_cold && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3308 msg_print("Î䵤¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3310 msg_print("You feel less resistant to cold.");
3318 p_ptr->oppose_cold = v;
3320 /* Nothing to notice */
3321 if (!notice) return (FALSE);
3323 /* Redraw status bar */
3324 p_ptr->redraw |= (PR_STATUS);
3327 if (disturb_state) disturb(0, 0);
3338 * Set "p_ptr->oppose_pois", notice observable changes
3340 bool set_oppose_pois(int v, bool do_dec)
3342 bool notice = FALSE;
3344 /* Hack -- Force good values */
3345 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3347 if ((p_ptr->pclass == CLASS_NINJA) && (p_ptr->lev > 44)) v = 1;
3348 if (p_ptr->is_dead) return FALSE;
3353 if (p_ptr->oppose_pois && !do_dec)
3355 if (p_ptr->oppose_pois > v) return FALSE;
3357 else if (!IS_OPPOSE_POIS())
3360 msg_print("ÆǤؤÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3362 msg_print("You feel resistant to poison!");
3372 if (p_ptr->oppose_pois && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3375 msg_print("ÆǤؤÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3377 msg_print("You feel less resistant to poison.");
3385 p_ptr->oppose_pois = v;
3387 /* Nothing to notice */
3388 if (!notice) return (FALSE);
3390 /* Redraw status bar */
3391 p_ptr->redraw |= (PR_STATUS);
3394 if (disturb_state) disturb(0, 0);
3405 * Set "p_ptr->stun", notice observable changes
3407 * Note the special code to only notice "range" changes.
3409 bool set_stun(int v)
3411 int old_aux, new_aux;
3412 bool notice = FALSE;
3415 /* Hack -- Force good values */
3416 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3418 if (p_ptr->is_dead) return FALSE;
3420 if (prace_is_(RACE_GOLEM) || ((p_ptr->pclass == CLASS_BERSERKER) && (p_ptr->lev > 34))) v = 0;
3423 if (p_ptr->stun > 100)
3429 else if (p_ptr->stun > 50)
3435 else if (p_ptr->stun > 0)
3471 if (new_aux > old_aux)
3473 /* Describe the state */
3479 msg_print("°Õ¼±¤¬¤â¤¦¤í¤¦¤È¤·¤Æ¤¤¿¡£");
3481 msg_print("You have been stunned.");
3489 msg_print("°Õ¼±¤¬¤Ò¤É¤¯¤â¤¦¤í¤¦¤È¤·¤Æ¤¤¿¡£");
3491 msg_print("You have been heavily stunned.");
3499 msg_print("Ƭ¤¬¥¯¥é¥¯¥é¤·¤Æ°Õ¼±¤¬±ó¤Î¤¤¤Æ¤¤¿¡£");
3501 msg_print("You have been knocked out.");
3507 if (randint1(1000) < v || one_in_(16))
3510 msg_print("³ä¤ì¤ë¤è¤¦¤ÊƬÄˤ¬¤¹¤ë¡£");
3512 msg_print("A vicious blow hits your head.");
3517 if (!p_ptr->sustain_int) (void)do_dec_stat(A_INT);
3518 if (!p_ptr->sustain_wis) (void)do_dec_stat(A_WIS);
3520 else if (one_in_(2))
3522 if (!p_ptr->sustain_int) (void)do_dec_stat(A_INT);
3526 if (!p_ptr->sustain_wis) (void)do_dec_stat(A_WIS);
3529 if (p_ptr->special_defense & KATA_MASK)
3532 msg_print("·¿¤¬Êø¤ì¤¿¡£");
3534 msg_print("Your posture gets loose.");
3536 p_ptr->special_defense &= ~(KATA_MASK);
3537 p_ptr->update |= (PU_BONUS);
3538 p_ptr->update |= (PU_MONSTERS);
3539 p_ptr->redraw |= (PR_STATE);
3540 p_ptr->redraw |= (PR_STATUS);
3541 p_ptr->action = ACTION_NONE;
3549 else if (new_aux < old_aux)
3551 /* Describe the state */
3557 msg_print("¤ä¤Ã¤ÈÛ¯Û°¾õÂÖ¤«¤é²óÉü¤·¤¿¡£");
3559 msg_print("You are no longer stunned.");
3562 if (disturb_state) disturb(0, 0);
3574 if (!notice) return (FALSE);
3577 if (disturb_state) disturb(0, 0);
3579 /* Recalculate bonuses */
3580 p_ptr->update |= (PU_BONUS);
3582 /* Redraw the "stun" */
3583 p_ptr->redraw |= (PR_STUN);
3594 * Set "p_ptr->cut", notice observable changes
3596 * Note the special code to only notice "range" changes.
3600 int old_aux, new_aux;
3601 bool notice = FALSE;
3603 /* Hack -- Force good values */
3604 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3606 if (p_ptr->is_dead) return FALSE;
3608 if ((p_ptr->prace == RACE_GOLEM ||
3609 p_ptr->prace == RACE_SKELETON ||
3610 p_ptr->prace == RACE_SPECTRE ||
3611 (p_ptr->prace == RACE_ZOMBIE && p_ptr->lev > 11)) &&
3616 if (p_ptr->cut > 1000)
3622 else if (p_ptr->cut > 200)
3628 else if (p_ptr->cut > 100)
3634 else if (p_ptr->cut > 50)
3640 else if (p_ptr->cut > 25)
3646 else if (p_ptr->cut > 10)
3652 else if (p_ptr->cut > 0)
3712 if (new_aux > old_aux)
3714 /* Describe the state */
3720 msg_print("¤«¤¹¤ê½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3722 msg_print("You have been given a graze.");
3730 msg_print("·Ú¤¤½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3732 msg_print("You have been given a light cut.");
3740 msg_print("¤Ò¤É¤¤½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3742 msg_print("You have been given a bad cut.");
3750 msg_print("ÂçÊѤʽý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3752 msg_print("You have been given a nasty cut.");
3760 msg_print("½ÅÂç¤Ê½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3762 msg_print("You have been given a severe cut.");
3770 msg_print("¤Ò¤É¤¤¿¼¼ê¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3772 msg_print("You have been given a deep gash.");
3780 msg_print("Ã×̿Ū¤Ê½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3782 msg_print("You have been given a mortal wound.");
3791 if (randint1(1000) < v || one_in_(16))
3793 if (!p_ptr->sustain_chr)
3796 msg_print("¤Ò¤É¤¤½ýÀפ¬»Ä¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3798 msg_print("You have been horribly scarred.");
3808 else if (new_aux < old_aux)
3810 /* Describe the state */
3816 msg_format("¤ä¤Ã¤È%s¡£", p_ptr->prace == RACE_ANDROID ? "²ø²æ¤¬Ä¾¤Ã¤¿" : "½Ð·ì¤¬»ß¤Þ¤Ã¤¿");
3818 msg_print("You are no longer bleeding.");
3821 if (disturb_state) disturb(0, 0);
3833 if (!notice) return (FALSE);
3836 if (disturb_state) disturb(0, 0);
3838 /* Recalculate bonuses */
3839 p_ptr->update |= (PU_BONUS);
3841 /* Redraw the "cut" */
3842 p_ptr->redraw |= (PR_CUT);
3853 * Set "p_ptr->food", notice observable changes
3855 * The "p_ptr->food" variable can get as large as 20000, allowing the
3856 * addition of the most "filling" item, Elvish Waybread, which adds
3857 * 7500 food units, without overflowing the 32767 maximum limit.
3859 * Perhaps we should disturb the player with various messages,
3860 * especially messages about hunger status changes. XXX XXX XXX
3862 * Digestion of food is handled in "dungeon.c", in which, normally,
3863 * the player digests about 20 food units per 100 game turns, more
3864 * when "fast", more when "regenerating", less with "slow digestion",
3865 * but when the player is "gorged", he digests 100 food units per 10
3866 * game turns, or a full 1000 food units per 100 game turns.
3868 * Note that the player's speed is reduced by 10 units while gorged,
3869 * so if the player eats a single food ration (5000 food units) when
3870 * full (15000 food units), he will be gorged for (5000/100)*10 = 500
3871 * game turns, or 500/(100/5) = 25 player turns (if nothing else is
3872 * affecting the player speed).
3874 bool set_food(int v)
3876 int old_aux, new_aux;
3878 bool notice = FALSE;
3880 /* Hack -- Force good values */
3881 v = (v > 20000) ? 20000 : (v < 0) ? 0 : v;
3883 /* Fainting / Starving */
3884 if (p_ptr->food < PY_FOOD_FAINT)
3890 else if (p_ptr->food < PY_FOOD_WEAK)
3896 else if (p_ptr->food < PY_FOOD_ALERT)
3902 else if (p_ptr->food < PY_FOOD_FULL)
3908 else if (p_ptr->food < PY_FOOD_MAX)
3919 /* Fainting / Starving */
3920 if (v < PY_FOOD_FAINT)
3926 else if (v < PY_FOOD_WEAK)
3932 else if (v < PY_FOOD_ALERT)
3938 else if (v < PY_FOOD_FULL)
3944 else if (v < PY_FOOD_MAX)
3955 if (old_aux < 1 && new_aux > 0)
3956 chg_virtue(V_PATIENCE, 2);
3957 else if (old_aux < 3 && (old_aux != new_aux))
3958 chg_virtue(V_PATIENCE, 1);
3960 chg_virtue(V_TEMPERANCE, 1);
3962 chg_virtue(V_TEMPERANCE, -1);
3965 if (new_aux > old_aux)
3967 /* Describe the state */
3973 msg_print("¤Þ¤À¶õÊ¢¤ÇÅݤ줽¤¦¤À¡£");
3975 msg_print("You are still weak.");
3983 msg_print("¤Þ¤À¶õÊ¢¤À¡£");
3985 msg_print("You are still hungry.");
3993 msg_print("¶õÊ¢´¶¤¬¤ª¤µ¤Þ¤Ã¤¿¡£");
3995 msg_print("You are no longer hungry.");
4003 msg_print("ËþÊ¢¤À¡ª");
4005 msg_print("You are full!");
4013 msg_print("¿©¤Ù²á¤®¤À¡ª");
4015 msg_print("You have gorged yourself!");
4017 chg_virtue(V_HARMONY, -1);
4018 chg_virtue(V_PATIENCE, -1);
4019 chg_virtue(V_TEMPERANCE, -2);
4029 else if (new_aux < old_aux)
4031 /* Describe the state */
4034 /* Fainting / Starving */
4037 msg_print("¤¢¤Þ¤ê¤Ë¤â¶õÊ¢¤Çµ¤¤ò¼º¤Ã¤Æ¤·¤Þ¤Ã¤¿¡ª");
4039 msg_print("You are getting faint from hunger!");
4047 msg_print("¤ªÊ¢¤¬¶õ¤¤¤ÆÅݤ줽¤¦¤À¡£");
4049 msg_print("You are getting weak from hunger!");
4057 msg_print("¤ªÊ¢¤¬¶õ¤¤¤Æ¤¤¿¡£");
4059 msg_print("You are getting hungry.");
4067 msg_print("ËþÊ¢´¶¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
4069 msg_print("You are no longer full.");
4077 msg_print("¤ä¤Ã¤È¤ªÊ¢¤¬¤¤Ä¤¯¤Ê¤¯¤Ê¤Ã¤¿¡£");
4079 msg_print("You are no longer gorged.");
4085 if (p_ptr->wild_mode && (new_aux < 2))
4097 /* Nothing to notice */
4098 if (!notice) return (FALSE);
4101 if (disturb_state) disturb(0, 0);
4103 /* Recalculate bonuses */
4104 p_ptr->update |= (PU_BONUS);
4107 p_ptr->redraw |= (PR_HUNGER);
4117 * Increases a stat by one randomized level -RAK-
4119 * Note that this function (used by stat potions) now restores
4120 * the stat BEFORE increasing it.
4122 bool inc_stat(int stat)
4126 /* Then augment the current/max stat */
4127 value = p_ptr->stat_cur[stat];
4129 /* Cannot go above 18/100 */
4130 if (value < p_ptr->stat_max_max[stat])
4132 /* Gain one (sometimes two) points */
4135 gain = ((randint0(100) < 75) ? 1 : 2);
4139 /* Gain 1/6 to 1/3 of distance to 18/100 */
4140 else if (value < (p_ptr->stat_max_max[stat]-2))
4142 /* Approximate gain value */
4143 gain = (((p_ptr->stat_max_max[stat]) - value) / 2 + 3) / 2;
4146 if (gain < 1) gain = 1;
4148 /* Apply the bonus */
4149 value += randint1(gain) + gain / 2;
4152 if (value > (p_ptr->stat_max_max[stat]-1)) value = p_ptr->stat_max_max[stat]-1;
4155 /* Gain one point at a time */
4161 /* Save the new value */
4162 p_ptr->stat_cur[stat] = value;
4164 /* Bring up the maximum too */
4165 if (value > p_ptr->stat_max[stat])
4167 p_ptr->stat_max[stat] = value;
4170 /* Recalculate bonuses */
4171 p_ptr->update |= (PU_BONUS);
4177 /* Nothing to gain */
4184 * Decreases a stat by an amount indended to vary from 0 to 100 percent.
4186 * Amount could be a little higher in extreme cases to mangle very high
4187 * stats from massive assaults. -CWS
4189 * Note that "permanent" means that the *given* amount is permanent,
4190 * not that the new value becomes permanent. This may not work exactly
4191 * as expected, due to "weirdness" in the algorithm, but in general,
4192 * if your stat is already drained, the "max" value will not drop all
4193 * the way down to the "cur" value.
4195 bool dec_stat(int stat, int amount, int permanent)
4197 int cur, max, loss, same, res = FALSE;
4200 /* Acquire current value */
4201 cur = p_ptr->stat_cur[stat];
4202 max = p_ptr->stat_max[stat];
4204 /* Note when the values are identical */
4205 same = (cur == max);
4207 /* Damage "current" value */
4210 /* Handle "low" values */
4213 if (amount > 90) cur--;
4214 if (amount > 50) cur--;
4215 if (amount > 20) cur--;
4219 /* Handle "high" values */
4222 /* Hack -- Decrement by a random amount between one-quarter */
4223 /* and one-half of the stat bonus times the percentage, with a */
4224 /* minimum damage of half the percentage. -CWS */
4225 loss = (((cur-18) / 2 + 1) / 2 + 1);
4228 if (loss < 1) loss = 1;
4230 /* Randomize the loss */
4231 loss = ((randint1(loss) + loss) * amount) / 100;
4234 if (loss < amount/2) loss = amount/2;
4236 /* Lose some points */
4239 /* Hack -- Only reduce stat to 17 sometimes */
4240 if (cur < 18) cur = (amount <= 20) ? 18 : 17;
4243 /* Prevent illegal values */
4244 if (cur < 3) cur = 3;
4246 /* Something happened */
4247 if (cur != p_ptr->stat_cur[stat]) res = TRUE;
4250 /* Damage "max" value */
4251 if (permanent && (max > 3))
4253 chg_virtue(V_SACRIFICE, 1);
4254 if (stat == A_WIS || stat == A_INT)
4255 chg_virtue(V_ENLIGHTEN, -2);
4257 /* Handle "low" values */
4260 if (amount > 90) max--;
4261 if (amount > 50) max--;
4262 if (amount > 20) max--;
4266 /* Handle "high" values */
4269 /* Hack -- Decrement by a random amount between one-quarter */
4270 /* and one-half of the stat bonus times the percentage, with a */
4271 /* minimum damage of half the percentage. -CWS */
4272 loss = (((max-18) / 2 + 1) / 2 + 1);
4273 loss = ((randint1(loss) + loss) * amount) / 100;
4274 if (loss < amount/2) loss = amount/2;
4276 /* Lose some points */
4279 /* Hack -- Only reduce stat to 17 sometimes */
4280 if (max < 18) max = (amount <= 20) ? 18 : 17;
4283 /* Hack -- keep it clean */
4284 if (same || (max < cur)) max = cur;
4286 /* Something happened */
4287 if (max != p_ptr->stat_max[stat]) res = TRUE;
4293 /* Actually set the stat to its new value. */
4294 p_ptr->stat_cur[stat] = cur;
4295 p_ptr->stat_max[stat] = max;
4297 /* Redisplay the stats later */
4298 p_ptr->redraw |= (PR_STATS);
4300 /* Recalculate bonuses */
4301 p_ptr->update |= (PU_BONUS);
4310 * Restore a stat. Return TRUE only if this actually makes a difference.
4312 bool res_stat(int stat)
4314 /* Restore if needed */
4315 if (p_ptr->stat_cur[stat] != p_ptr->stat_max[stat])
4318 p_ptr->stat_cur[stat] = p_ptr->stat_max[stat];
4320 /* Recalculate bonuses */
4321 p_ptr->update |= (PU_BONUS);
4323 /* Redisplay the stats later */
4324 p_ptr->redraw |= (PR_STATS);
4330 /* Nothing to restore */
4336 * Increase players hit points, notice effects
4338 bool hp_player(int num)
4341 vir = virtue_number(V_VITALITY);
4344 num = num * (p_ptr->virtues[vir - 1] + 1250) / 1250;
4346 /* Healing needed */
4347 if (p_ptr->chp < p_ptr->mhp)
4349 if ((num > 0) && (p_ptr->chp < (p_ptr->mhp/3)))
4350 chg_virtue(V_TEMPERANCE, 1);
4351 /* Gain hitpoints */
4354 /* Enforce maximum */
4355 if (p_ptr->chp >= p_ptr->mhp)
4357 p_ptr->chp = p_ptr->mhp;
4358 p_ptr->chp_frac = 0;
4362 p_ptr->redraw |= (PR_HP);
4365 p_ptr->window |= (PW_PLAYER);
4371 msg_print("¾¯¤·µ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4373 msg_print("You feel a little better.");
4382 msg_print("µ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4384 msg_print("You feel better.");
4393 msg_print("¤È¤Æ¤âµ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4395 msg_print("You feel much better.");
4404 msg_print("¤Ò¤¸¤ç¤¦¤Ëµ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4406 msg_print("You feel very good.");
4421 * Array of stat "descriptions"
4423 static cptr desc_stat_pos[] =
4465 * Array of stat "descriptions"
4467 static cptr desc_stat_neg[] =
4491 bool do_dec_stat(int stat)
4495 /* Access the "sustain" */
4498 case A_STR: if (p_ptr->sustain_str) sust = TRUE; break;
4499 case A_INT: if (p_ptr->sustain_int) sust = TRUE; break;
4500 case A_WIS: if (p_ptr->sustain_wis) sust = TRUE; break;
4501 case A_DEX: if (p_ptr->sustain_dex) sust = TRUE; break;
4502 case A_CON: if (p_ptr->sustain_con) sust = TRUE; break;
4503 case A_CHR: if (p_ptr->sustain_chr) sust = TRUE; break;
4507 if (sust && (!ironman_nightmare || randint0(13)))
4511 msg_format("%s¤Ê¤Ã¤¿µ¤¤¬¤·¤¿¤¬¡¢¤¹¤°¤Ë¸µ¤ËÌá¤Ã¤¿¡£",
4513 msg_format("You feel %s for a moment, but the feeling passes.",
4516 desc_stat_neg[stat]);
4522 /* Attempt to reduce the stat */
4523 if (dec_stat(stat, 10, (ironman_nightmare && !randint0(13))))
4527 msg_format("¤Ò¤É¤¯%s¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£", desc_stat_neg[stat]);
4529 msg_format("You feel very %s.", desc_stat_neg[stat]);
4537 /* Nothing obvious */
4543 * Restore lost "points" in a stat
4545 bool do_res_stat(int stat)
4547 /* Attempt to increase */
4552 msg_format("¸µÄ̤ê¤Ë%s¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£", desc_stat_pos[stat]);
4554 msg_format("You feel less %s.", desc_stat_neg[stat]);
4562 /* Nothing obvious */
4568 * Gain a "point" in a stat
4570 bool do_inc_stat(int stat)
4574 /* Restore strength */
4575 res = res_stat(stat);
4577 /* Attempt to increase */
4582 chg_virtue(V_ENLIGHTEN, 1);
4583 chg_virtue(V_FAITH, 1);
4585 else if (stat == A_INT)
4587 chg_virtue(V_KNOWLEDGE, 1);
4588 chg_virtue(V_ENLIGHTEN, 1);
4590 else if (stat == A_CON)
4591 chg_virtue(V_VITALITY, 1);
4595 msg_format("¥ï¡¼¥ª¡ª¤È¤Æ¤â%s¤Ê¤Ã¤¿¡ª", desc_stat_pos[stat]);
4597 msg_format("Wow! You feel very %s!", desc_stat_pos[stat]);
4605 /* Restoration worked */
4610 msg_format("¸µÄ̤ê¤Ë%s¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£", desc_stat_pos[stat]);
4612 msg_format("You feel less %s.", desc_stat_neg[stat]);
4620 /* Nothing obvious */
4626 * Restores any drained experience
4628 bool restore_level(void)
4630 /* Restore experience */
4631 if (p_ptr->exp < p_ptr->max_exp)
4635 msg_print("À¸Ì¿ÎϤ¬Ìá¤Ã¤Æ¤¤¿µ¤¤¬¤¹¤ë¡£");
4637 msg_print("You feel your life energies returning.");
4641 /* Restore the experience */
4642 p_ptr->exp = p_ptr->max_exp;
4644 /* Check the experience */
4659 bool lose_all_info(void)
4663 chg_virtue(V_KNOWLEDGE, -5);
4664 chg_virtue(V_ENLIGHTEN, -5);
4666 /* Forget info about objects */
4667 for (i = 0; i < INVEN_TOTAL; i++)
4669 object_type *o_ptr = &inventory[i];
4671 /* Skip non-objects */
4672 if (!o_ptr->k_idx) continue;
4674 /* Allow "protection" by the MENTAL flag */
4675 if (o_ptr->ident & (IDENT_MENTAL)) continue;
4677 /* Remove "default inscriptions" */
4678 o_ptr->feeling = FEEL_NONE;
4680 /* Hack -- Clear the "empty" flag */
4681 o_ptr->ident &= ~(IDENT_EMPTY);
4683 /* Hack -- Clear the "known" flag */
4684 o_ptr->ident &= ~(IDENT_KNOWN);
4686 /* Hack -- Clear the "felt" flag */
4687 o_ptr->ident &= ~(IDENT_SENSE);
4690 /* Recalculate bonuses */
4691 p_ptr->update |= (PU_BONUS);
4693 /* Combine / Reorder the pack (later) */
4694 p_ptr->notice |= (PN_COMBINE | PN_REORDER);
4697 p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
4699 /* Mega-Hack -- Forget the map */
4707 void do_poly_wounds(void)
4709 /* Changed to always provide at least _some_ healing */
4710 s16b wounds = p_ptr->cut;
4711 s16b hit_p = (p_ptr->mhp - p_ptr->chp);
4712 s16b change = damroll(p_ptr->lev, 5);
4713 bool Nasty_effect = one_in_(5);
4715 if (!(wounds || hit_p || Nasty_effect)) return;
4718 msg_print("½ý¤¬¤è¤ê·Ú¤¤¤â¤Î¤ËÊѲ½¤·¤¿¡£");
4720 msg_print("Your wounds are polymorphed into less serious ones.");
4727 msg_print("¿·¤¿¤Ê½ý¤¬¤Ç¤¤¿¡ª");
4728 take_hit(DAMAGE_LOSELIFE, change / 2, "ÊѲ½¤·¤¿½ý", -1);
4730 msg_print("A new wound was created!");
4731 take_hit(DAMAGE_LOSELIFE, change / 2, "a polymorphed wound", -1);
4738 set_cut(p_ptr->cut - (change / 2));
4744 * Change player race
4746 void change_race(int new_race, cptr effect_msg)
4748 cptr title = race_info[new_race].title;
4749 int old_race = p_ptr->prace;
4752 msg_format("¤¢¤Ê¤¿¤Ï%s%s¤ËÊѲ½¤·¤¿¡ª", effect_msg, title);
4754 msg_format("You turn into %s %s%s!", (!effect_msg[0] && is_a_vowel(title[0]) ? "an" : "a"), effect_msg, title);
4757 chg_virtue(V_CHANCE, 2);
4759 if (p_ptr->prace < 32)
4761 p_ptr->old_race1 |= 1L << p_ptr->prace;
4765 p_ptr->old_race2 |= 1L << (p_ptr->prace-32);
4767 p_ptr->prace = new_race;
4768 rp_ptr = &race_info[p_ptr->prace];
4770 /* Experience factor */
4771 p_ptr->expfact = rp_ptr->r_exp + cp_ptr->c_exp;
4774 * The speed bonus of Klackons and Sprites are disabled
4775 * and the experience penalty is decreased.
4777 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)))
4778 p_ptr->expfact -= 15;
4780 /* Get character's height and weight */
4781 get_height_weight();
4784 if (p_ptr->pclass == CLASS_SORCERER)
4785 p_ptr->hitdie = rp_ptr->r_mhp/2 + cp_ptr->c_mhp + ap_ptr->a_mhp;
4787 p_ptr->hitdie = rp_ptr->r_mhp + cp_ptr->c_mhp + ap_ptr->a_mhp;
4789 do_cmd_rerate(FALSE);
4791 /* The experience level may be modified */
4794 p_ptr->redraw |= (PR_BASIC);
4796 p_ptr->update |= (PU_BONUS);
4800 /* Load an autopick preference file */
4801 if (old_race != p_ptr->prace) autopick_load_pref(FALSE);
4803 /* Player's graphic tile may change */
4808 void do_poly_self(void)
4810 int power = p_ptr->lev;
4813 msg_print("¤¢¤Ê¤¿¤ÏÊѲ½¤Îˬ¤ì¤ò´¶¤¸¤¿...");
4815 msg_print("You feel a change coming over you...");
4818 chg_virtue(V_CHANCE, 1);
4820 if ((power > randint0(20)) && one_in_(3) && (p_ptr->prace != RACE_ANDROID))
4822 char effect_msg[80] = "";
4823 int new_race, expfact, goalexpfact;
4825 /* Some form of racial polymorph... */
4828 if ((power > randint0(5)) && one_in_(4))
4833 if (p_ptr->psex == SEX_MALE)
4835 p_ptr->psex = SEX_FEMALE;
4836 sp_ptr = &sex_info[p_ptr->psex];
4838 sprintf(effect_msg, "½÷À¤Î");
4840 sprintf(effect_msg, "female ");
4846 p_ptr->psex = SEX_MALE;
4847 sp_ptr = &sex_info[p_ptr->psex];
4849 sprintf(effect_msg, "ÃËÀ¤Î");
4851 sprintf(effect_msg, "male ");
4857 if ((power > randint0(30)) && one_in_(5))
4861 /* Harmful deformity */
4868 (void)dec_stat(tmp, randint1(6) + 6, one_in_(3));
4874 /* Deformities are discriminated against! */
4875 (void)dec_stat(A_CHR, randint1(6), TRUE);
4881 sprintf(tmp_msg,"%s",effect_msg);
4882 sprintf(effect_msg,"´ñ·Á¤Î%s",tmp_msg);
4884 sprintf(tmp_msg,"%s ",effect_msg);
4885 sprintf(effect_msg,"deformed %s ",tmp_msg);
4892 sprintf(effect_msg,"´ñ·Á¤Î");
4894 sprintf(effect_msg,"deformed ");
4900 while ((power > randint0(20)) && one_in_(10))
4902 /* Polymorph into a less mutated form */
4905 if (!lose_mutation(0))
4907 msg_print("´ñ̯¤Ê¤¯¤é¤¤ÉáÄ̤ˤʤ俵¤¤¬¤¹¤ë¡£");
4909 msg_print("You feel oddly normal.");
4915 * Restrict the race choices by exp penalty so
4916 * weak polymorph always means weak race
4921 goalexpfact = 100 + 3 * randint0(power);
4925 new_race = randint0(MAX_RACES);
4926 expfact = race_info[new_race].r_exp;
4928 while (((new_race == p_ptr->prace) && (expfact > goalexpfact)) || (new_race == RACE_ANDROID));
4930 change_race(new_race, effect_msg);
4933 if ((power > randint0(30)) && one_in_(6))
4941 msg_format("%s¤Î¹½À®¤¬ÊѲ½¤·¤¿¡ª", p_ptr->prace == RACE_ANDROID ? "µ¡³£" : "Æâ¡");
4943 msg_print("Your internal organs are rearranged!");
4948 (void)dec_stat(tmp, randint1(6) + 6, one_in_(3));
4954 msg_print("¸½ºß¤Î»Ñ¤ÇÀ¸¤¤Æ¤¤¤¯¤Î¤Ïº¤Æñ¤Ê¤è¤¦¤À¡ª");
4955 take_hit(DAMAGE_LOSELIFE, damroll(randint1(10), p_ptr->lev), "Ã×̿Ū¤ÊÆÍÁ³ÊÑ°Û", -1);
4957 msg_print("You find living difficult in your present form!");
4958 take_hit(DAMAGE_LOSELIFE, damroll(randint1(10), p_ptr->lev), "a lethal mutation", -1);
4965 if ((power > randint0(20)) && one_in_(4))
4970 do_cmd_rerate(FALSE);
4973 while ((power > randint0(15)) && one_in_(3))
4976 (void)gain_random_mutation(0);
4979 if (power > randint0(5))
4985 /* Note: earlier deductions may have left power < 0 already. */
4995 * Decreases players hit points and sets death flag if necessary
4997 * XXX XXX XXX Invulnerability needs to be changed into a "shield"
4999 * XXX XXX XXX Hack -- this function allows the user to save (or quit)
5000 * the game when he dies, since the "You die." message is shown before
5001 * setting the player to "dead".
5004 int take_hit(int damage_type, int damage, cptr hit_from, int monspell)
5006 int old_chp = p_ptr->chp;
5008 char death_message[1024];
5011 int warning = (p_ptr->mhp * hitpoint_warn / 10);
5014 if (p_ptr->is_dead) return 0;
5016 if (p_ptr->sutemi) damage *= 2;
5017 if (p_ptr->special_defense & KATA_IAI) damage += (damage + 4) / 5;
5019 if (easy_band) damage = (damage+1)/2;
5021 if (damage_type != DAMAGE_USELIFE)
5031 if (monspell >= 0) learn_spell(monspell);
5033 /* Mega-Hack -- Apply "invulnerability" */
5034 if ((damage_type != DAMAGE_USELIFE) && (damage_type != DAMAGE_LOSELIFE))
5036 if (IS_INVULN() && (damage < 9000))
5038 if (damage_type == DAMAGE_FORCE)
5041 msg_print("¥Ð¥ê¥¢¤¬ÀÚ¤êÎö¤«¤ì¤¿¡ª");
5043 msg_print("The attack cuts your shield of invulnerability open!");
5046 else if (one_in_(PENETRATE_INVULNERABILITY))
5049 msg_print("̵Ũ¤Î¥Ð¥ê¥¢¤òÇˤäƹ¶·â¤µ¤ì¤¿¡ª");
5051 msg_print("The attack penetrates your shield of invulnerability!");
5060 /* Multishadow effects is determined by turn */
5061 if (p_ptr->multishadow && (turn & 1))
5063 if (damage_type == DAMAGE_FORCE)
5066 msg_print("¸¸±Æ¤â¤í¤È¤âÂΤ¬ÀÚ¤êÎö¤«¤ì¤¿¡ª");
5068 msg_print("The attack hits Shadow together with you!");
5071 else if (damage_type == DAMAGE_ATTACK)
5074 msg_print("¹¶·â¤Ï¸¸±Æ¤ËÌ¿Ã椷¡¢¤¢¤Ê¤¿¤Ë¤ÏÆϤ«¤Ê¤«¤Ã¤¿¡£");
5076 msg_print("The attack hits Shadow, you are unharmed!");
5082 if (p_ptr->wraith_form)
5084 if (damage_type == DAMAGE_FORCE)
5087 msg_print("Ⱦʪ¼Á¤ÎÂΤ¬ÀÚ¤êÎö¤«¤ì¤¿¡ª");
5089 msg_print("The attack cuts through your ethereal body!");
5095 if ((damage == 0) && one_in_(2)) damage = 1;
5099 if (p_ptr->special_defense & KATA_MUSOU)
5102 if ((damage == 0) && one_in_(2)) damage = 1;
5104 } /* not if LOSELIFE USELIFE */
5106 /* Hurt the player */
5107 p_ptr->chp -= damage;
5108 if(damage_type == DAMAGE_GENO && p_ptr->chp < 0)
5110 damage += p_ptr->chp;
5114 /* Display the hitpoints */
5115 p_ptr->redraw |= (PR_HP);
5118 p_ptr->window |= (PW_PLAYER);
5122 if (damage_type != DAMAGE_GENO && p_ptr->chp == 0)
5124 chg_virtue(V_SACRIFICE, 1);
5125 chg_virtue(V_CHANCE, 2);
5132 bool android = (p_ptr->prace == RACE_ANDROID ? TRUE : FALSE);
5134 #ifdef JP /* »à¤ó¤À»þ¤Ë¶¯À©½ªÎ»¤·¤Æ»à¤ò²óÈò¤Ç¤¤Ê¤¯¤·¤Æ¤ß¤¿ by Habu */
5136 if(!save_player()) msg_print("¥»¡¼¥Ö¼ºÇÔ¡ª");
5142 chg_virtue(V_SACRIFICE, 10);
5145 p_ptr->leaving = TRUE;
5148 p_ptr->is_dead = TRUE;
5150 if (p_ptr->inside_arena)
5152 cptr m_name = r_name+r_info[arena_info[p_ptr->arena_number].r_idx].name;
5154 msg_format("¤¢¤Ê¤¿¤Ï%s¤ÎÁ°¤ËÇÔ¤ìµî¤Ã¤¿¡£", m_name);
5156 msg_format("You are beaten by %s.", m_name);
5159 if (record_arena) do_cmd_write_nikki(NIKKI_ARENA, -1 - p_ptr->arena_number, m_name);
5163 int q_idx = quest_number(dun_level);
5166 /* Make screen dump */
5167 screen_dump = make_screen_dump();
5170 /* Note cause of death */
5172 sprintf(p_ptr->died_from, "%s%s%s", !p_ptr->paralyzed ? "" : p_ptr->free_act ? "ĦÁü¾õÂÖ¤Ç":"Ëãáã¾õÂÖ¤Ç", p_ptr->image ? "¸¸³Ð¤ËÏĤó¤À" : "", hit_from);
5174 sprintf(p_ptr->died_from, "%s%s", hit_from, !p_ptr->paralyzed ? "" : " while helpless");
5177 /* No longer a winner */
5178 p_ptr->total_winner = FALSE;
5180 if (p_ptr->inside_arena)
5182 strcpy(buf,"¥¢¥ê¡¼¥Ê");
5184 strcpy(buf,"in the Arena");
5186 else if (!dun_level)
5190 strcpy(buf,"on the surface");
5192 else if (q_idx && (is_fixed_quest_idx(q_idx) &&
5193 !((q_idx == QUEST_OBERON) || (q_idx == QUEST_SERPENT))))
5195 strcpy(buf,"¥¯¥¨¥¹¥È");
5197 strcpy(buf,"in a quest");
5201 sprintf(buf,"%d³¬", dun_level);
5203 sprintf(buf,"level %d", dun_level);
5206 sprintf(tmp,"%s¤Ç%s¤Ë»¦¤µ¤ì¤¿¡£",buf, p_ptr->died_from);
5208 sprintf(tmp,"killed by %s %s.", p_ptr->died_from, buf);
5210 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, tmp);
5212 do_cmd_write_nikki(NIKKI_GAMESTART, 1, "-------- ¥²¡¼¥à¥ª¡¼¥Ð¡¼ --------");
5214 do_cmd_write_nikki(NIKKI_GAMESTART, 1, "-------- Game Over --------");
5216 do_cmd_write_nikki(NIKKI_BUNSHOU, 1, "\n\n\n\n");
5221 if (get_check_strict("²èÌ̤òÊݸ¤·¤Þ¤¹¤«¡©", CHECK_NO_HISTORY))
5223 if (get_check_strict("Dump the screen? ", CHECK_NO_HISTORY))
5227 do_cmd_save_screen();
5232 /* Initialize "last message" buffer */
5233 if (p_ptr->last_message) string_free(p_ptr->last_message);
5234 p_ptr->last_message = NULL;
5236 /* Hack -- Note death */
5240 msg_format("¤¢¤Ê¤¿¤Ï%s¤Þ¤·¤¿¡£", android ? "²õ¤ì" : "»à¤Ë");
5242 msg_print(android ? "You are broken." : "You die.");
5249 if (streq(p_ptr->died_from, "Seppuku"))
5252 get_rnd_line("seppuku_j.txt", 0, death_message);
5254 get_rnd_line("seppuku.txt", 0, death_message);
5260 get_rnd_line("death_j.txt", 0, death_message);
5262 get_rnd_line("death.txt", 0, death_message);
5266 while (!get_string(streq(p_ptr->died_from, "Seppuku") ? "¼À¤¤Î¶ç: " : "ÃÇËöËâ¤Î¶«¤Ó: ", death_message, 1024)) ;
5268 while (!get_string("Last word: ", death_message, 1024)) ;
5270 if (death_message[0] == '\0')
5273 strcpy(death_message, format("¤¢¤Ê¤¿¤Ï%s¤Þ¤·¤¿¡£", android ? "²õ¤ì" : "»à¤Ë"));
5275 strcpy(death_message, android ? "You are broken." : "You die.");
5278 else p_ptr->last_message = string_make(death_message);
5280 if (streq(p_ptr->died_from, "Seppuku"))
5286 int msg_pos_x[9] = { 5, 7, 9, 12, 14, 17, 19, 21, 23};
5287 int msg_pos_y[9] = { 3, 4, 5, 4, 5, 4, 5, 6, 4};
5294 for (i = 0; i < 40; i++)
5295 Term_putstr(randint0(w / 2) * 2, randint0(h), 2, TERM_VIOLET, "¦Ô");
5297 str = death_message;
5298 if (strncmp(str, "¡Ö", 2) == 0) str += 2;
5300 str2 = my_strstr(str, "¡×");
5301 if (str2 != NULL) *str2 = '\0';
5306 str2 = my_strstr(str, " ");
5307 if (str2 == NULL) len = strlen(str);
5308 else len = str2 - str;
5312 Term_putstr_v(w * 3 / 4 - 2 - msg_pos_x[i] * 2, msg_pos_y[i], len,
5314 if (str2 == NULL) break;
5318 if (*str == 0) break;
5322 Term_putstr(w-1, h-1, 1, TERM_WHITE, " ");
5326 /* Make screen dump */
5327 screen_dump = make_screen_dump();
5330 /* Wait a key press */
5333 msg_print(death_message);
5337 msg_print(death_message);
5345 /* Hitpoint warning */
5346 if (p_ptr->chp < warning)
5348 /* Hack -- bell on first notice */
5349 if (old_chp > warning) bell();
5353 if (record_danger && (old_chp > warning))
5355 if (p_ptr->image && damage_type == DAMAGE_ATTACK)
5359 hit_from = "something";
5363 sprintf(tmp,"%s¤Ë¤è¤Ã¤Æ¥Ô¥ó¥Á¤Ë´Ù¤¤¤Ã¤¿¡£",hit_from);
5365 sprintf(tmp,"A critical situation because of %s.",hit_from);
5367 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, tmp);
5372 /* stop auto_more even if DAMAGE_USELIFE */
5378 msg_print("*** ·Ù¹ð:Äã¥Ò¥Ã¥È¡¦¥Ý¥¤¥ó¥È¡ª ***");
5380 msg_print("*** LOW HITPOINT WARNING! ***");
5386 if (p_ptr->wild_mode && !p_ptr->leaving && (p_ptr->chp < MAX(warning, p_ptr->mhp/5)))
5397 void gain_exp_64(s32b amount, u32b amount_frac)
5399 if (p_ptr->is_dead) return;
5401 if (p_ptr->prace == RACE_ANDROID) return;
5403 /* Gain some experience */
5404 s64b_add(&(p_ptr->exp), &(p_ptr->exp_frac), amount, amount_frac);
5406 /* Slowly recover from experience drainage */
5407 if (p_ptr->exp < p_ptr->max_exp)
5409 /* Gain max experience (20%) (was 10%) */
5410 p_ptr->max_exp += amount / 5;
5413 /* Check Experience */
5421 void gain_exp(s32b amount)
5423 gain_exp_64(amount, 0L);
5427 void calc_android_exp(void)
5431 if (p_ptr->is_dead) return;
5433 if (p_ptr->prace != RACE_ANDROID) return;
5435 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
5437 object_type *o_ptr = &inventory[i];
5439 object_type *q_ptr = &forge;
5441 int level = MAX(k_info[o_ptr->k_idx].level - 8, 1);
5443 if ((i == INVEN_RIGHT) || (i == INVEN_LEFT) || (i == INVEN_NECK) || (i == INVEN_LITE)) continue;
5444 if (!o_ptr->k_idx) continue;
5446 /* Wipe the object */
5449 object_copy(q_ptr, o_ptr);
5450 q_ptr->discount = 0;
5451 q_ptr->curse_flags = 0L;
5453 if (object_is_fixed_artifact(o_ptr))
5455 level = (level + MAX(a_info[o_ptr->name1].level - 8, 5)) / 2;
5456 level += MIN(20, a_info[o_ptr->name1].rarity/(a_info[o_ptr->name1].gen_flags & TRG_INSTA_ART ? 10 : 3));
5458 else if (object_is_ego(o_ptr))
5460 level += MAX(3, (e_info[o_ptr->name2].rating - 5)/2);
5462 else if (o_ptr->art_name)
5464 s32b total_flags = flag_cost(o_ptr, o_ptr->pval);
5467 if (!object_is_weapon_ammo(o_ptr))
5470 if (total_flags < 15000) fake_level = 10;
5471 else if (total_flags < 35000) fake_level = 25;
5472 else fake_level = 40;
5477 if (total_flags < 20000) fake_level = 10;
5478 else if (total_flags < 45000) fake_level = 25;
5479 else fake_level = 40;
5482 level = MAX(level, (level + MAX(fake_level - 8, 5)) / 2 + 3);
5485 value = object_value_real(q_ptr);
5487 if (value <= 0) continue;
5488 if ((o_ptr->tval == TV_SOFT_ARMOR) && (o_ptr->sval == SV_ABUNAI_MIZUGI) && (p_ptr->pseikaku != SEIKAKU_SEXY)) value /= 32;
5489 if (value > 5000000L) value = 5000000L;
5490 if ((o_ptr->tval == TV_DRAG_ARMOR) || (o_ptr->tval == TV_CARD)) level /= 2;
5492 if (object_is_artifact(o_ptr) || object_is_ego(o_ptr) ||
5493 (o_ptr->tval == TV_DRAG_ARMOR) ||
5494 ((o_ptr->tval == TV_HELM) && (o_ptr->sval == SV_DRAGON_HELM)) ||
5495 ((o_ptr->tval == TV_SHIELD) && (o_ptr->sval == SV_DRAGON_SHIELD)) ||
5496 ((o_ptr->tval == TV_GLOVES) && (o_ptr->sval == SV_SET_OF_DRAGON_GLOVES)) ||
5497 ((o_ptr->tval == TV_BOOTS) && (o_ptr->sval == SV_PAIR_OF_DRAGON_GREAVE)) ||
5498 ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DIAMOND_EDGE)))
5500 if (level > 65) level = 35 + (level - 65) / 5;
5501 else if (level > 35) level = 25 + (level - 35) / 3;
5502 else if (level > 15) level = 15 + (level - 15) / 2;
5503 exp = MIN(100000L, value) * level * level / 2;
5504 if (value > 100000L)
5505 exp += (value - 100000L) * level * level / 8;
5509 exp = MIN(100000L, value) * level;
5510 if (value > 100000L)
5511 exp += (value - 100000L) * level / 4;
5513 if ((((i == INVEN_RARM) || (i == INVEN_LARM)) && (buki_motteruka(i))) || (i == INVEN_BOW)) total_exp += exp / 48;
5514 else total_exp += exp / 16;
5515 if (i == INVEN_BODY) total_exp += exp / 32;
5517 p_ptr->exp = p_ptr->max_exp = total_exp;
5519 /* Check Experience */
5527 void lose_exp(s32b amount)
5529 if (p_ptr->prace == RACE_ANDROID) return;
5531 /* Never drop below zero experience */
5532 if (amount > p_ptr->exp) amount = p_ptr->exp;
5534 /* Lose some experience */
5535 p_ptr->exp -= amount;
5537 /* Check Experience */
5544 * If resisted to draining, return FALSE
5546 bool drain_exp(s32b drain, s32b slip, int hold_life_prob)
5548 /* Androids and their mimics are never drained */
5549 if (p_ptr->prace == RACE_ANDROID) return FALSE;
5551 if (p_ptr->hold_life && (randint0(100) < hold_life_prob))
5553 /* Hold experience */
5555 msg_print("¤·¤«¤·¼«¸Ê¤ÎÀ¸Ì¿ÎϤò¼é¤ê¤¤Ã¤¿¡ª");
5557 msg_print("You keep hold of your life force!");
5562 /* Hold experience failed */
5563 if (p_ptr->hold_life)
5566 msg_print("À¸Ì¿ÎϤò¾¯¤·µÛ¤¤¼è¤é¤ì¤¿µ¤¤¬¤¹¤ë¡ª");
5568 msg_print("You feel your life slipping away!");
5575 msg_print("À¸Ì¿ÎϤ¬ÂΤ«¤éµÛ¤¤¼è¤é¤ì¤¿µ¤¤¬¤¹¤ë¡ª");
5577 msg_print("You feel your life draining away!");
5586 bool set_ultimate_res(int v, bool do_dec)
5588 bool notice = FALSE;
5590 /* Hack -- Force good values */
5591 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
5593 if (p_ptr->is_dead) return FALSE;
5598 if (p_ptr->ult_res && !do_dec)
5600 if (p_ptr->ult_res > v) return FALSE;
5602 else if (!p_ptr->ult_res)
5605 msg_print("¤¢¤é¤æ¤ë¤³¤È¤ËÂФ·¤ÆÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
5607 msg_print("You feel resistant!");
5620 msg_print("¤¢¤é¤æ¤ë¤³¤È¤ËÂФ¹¤ëÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
5622 msg_print("You feel less resistant");
5632 /* Redraw status bar */
5633 p_ptr->redraw |= (PR_STATUS);
5635 /* Nothing to notice */
5636 if (!notice) return (FALSE);
5639 if (disturb_state) disturb(0, 0);
5641 /* Recalculate bonuses */
5642 p_ptr->update |= (PU_BONUS);
5651 bool set_tim_res_nether(int v, bool do_dec)
5653 bool notice = FALSE;
5655 /* Hack -- Force good values */
5656 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
5658 if (p_ptr->is_dead) return FALSE;
5663 if (p_ptr->tim_res_nether && !do_dec)
5665 if (p_ptr->tim_res_nether > v) return FALSE;
5667 else if (!p_ptr->tim_res_nether)
5670 msg_print("ÃϹö¤ÎÎϤËÂФ·¤ÆÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
5672 msg_print("You feel nether resistant!");
5682 if (p_ptr->tim_res_nether)
5685 msg_print("ÃϹö¤ÎÎϤËÂФ¹¤ëÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
5687 msg_print("You feel less nether resistant");
5695 p_ptr->tim_res_nether = v;
5697 /* Redraw status bar */
5698 p_ptr->redraw |= (PR_STATUS);
5700 /* Nothing to notice */
5701 if (!notice) return (FALSE);
5704 if (disturb_state) disturb(0, 0);
5706 /* Recalculate bonuses */
5707 p_ptr->update |= (PU_BONUS);
5716 bool set_tim_res_time(int v, bool do_dec)
5718 bool notice = FALSE;
5720 /* Hack -- Force good values */
5721 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
5723 if (p_ptr->is_dead) return FALSE;
5728 if (p_ptr->tim_res_time && !do_dec)
5730 if (p_ptr->tim_res_time > v) return FALSE;
5732 else if (!p_ptr->tim_res_time)
5735 msg_print("»þ´ÖµÕž¤ÎÎϤËÂФ·¤ÆÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
5737 msg_print("You feel time resistant!");
5747 if (p_ptr->tim_res_time)
5750 msg_print("»þ´ÖµÕž¤ÎÎϤËÂФ¹¤ëÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
5752 msg_print("You feel less time resistant");
5760 p_ptr->tim_res_time = v;
5762 /* Redraw status bar */
5763 p_ptr->redraw |= (PR_STATUS);
5765 /* Nothing to notice */
5766 if (!notice) return (FALSE);
5769 if (disturb_state) disturb(0, 0);
5771 /* Recalculate bonuses */
5772 p_ptr->update |= (PU_BONUS);
5783 * Choose a warrior-mage elemental attack. -LM-
5785 bool choose_ele_attack(void)
5791 if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM))
5794 msg_format("Éð´ï¤ò»ý¤¿¤Ê¤¤¤ÈËâË¡·õ¤Ï»È¤¨¤Ê¤¤¡£");
5796 msg_format("You cannot use temporary branding with no weapon.");
5804 num = (p_ptr->lev - 20) / 5;
5807 c_prt(TERM_RED, " a) ¾Æ´þ", 2, 14);
5809 c_prt(TERM_RED, " a) Fire Brand", 2, 14);
5813 if (num >= 2) c_prt(TERM_L_WHITE," b) Åà·ë", 3, 14);
5815 if (num >= 2) c_prt(TERM_L_WHITE," b) Cold Brand", 3, 14);
5817 else prt("", 3, 14);
5820 if (num >= 3) c_prt(TERM_GREEN, " c) ÆÇ»¦", 4, 14);
5822 if (num >= 3) c_prt(TERM_GREEN, " c) Poison Brand", 4, 14);
5824 else prt("", 4, 14);
5827 if (num >= 4) c_prt(TERM_L_DARK, " d) Íϲò", 5, 14);
5829 if (num >= 4) c_prt(TERM_L_DARK, " d) Acid Brand", 5, 14);
5831 else prt("", 5, 14);
5834 if (num >= 5) c_prt(TERM_BLUE, " e) ÅÅ·â", 6, 14);
5836 if (num >= 5) c_prt(TERM_BLUE, " e) Elec Brand", 6, 14);
5838 else prt("", 6, 14);
5846 prt(" ¤É¤Î¸µÁǹ¶·â¤ò¤·¤Þ¤¹¤«¡©", 1, 14);
5848 prt(" Choose a temporary elemental brand ", 1, 14);
5853 if ((choice == 'a') || (choice == 'A'))
5854 set_ele_attack(ATTACK_FIRE, p_ptr->lev/2 + randint1(p_ptr->lev/2));
5855 else if (((choice == 'b') || (choice == 'B')) && (num >= 2))
5856 set_ele_attack(ATTACK_COLD, p_ptr->lev/2 + randint1(p_ptr->lev/2));
5857 else if (((choice == 'c') || (choice == 'C')) && (num >= 3))
5858 set_ele_attack(ATTACK_POIS, p_ptr->lev/2 + randint1(p_ptr->lev/2));
5859 else if (((choice == 'd') || (choice == 'D')) && (num >= 4))
5860 set_ele_attack(ATTACK_ACID, p_ptr->lev/2 + randint1(p_ptr->lev/2));
5861 else if (((choice == 'e') || (choice == 'E')) && (num >= 5))
5862 set_ele_attack(ATTACK_ELEC, p_ptr->lev/2 + randint1(p_ptr->lev/2));
5866 msg_print("ËâË¡·õ¤ò»È¤¦¤Î¤ò¤ä¤á¤¿¡£");
5868 msg_print("You cancel the temporary branding.");
5880 * Choose a elemental immune. -LM-
5882 bool choose_ele_immune(int turn)
5890 c_prt(TERM_RED, " a) ²Ð±ê", 2, 14);
5892 c_prt(TERM_RED, " a) Immune Fire", 2, 14);
5896 c_prt(TERM_L_WHITE," b) Î䵤", 3, 14);
5898 c_prt(TERM_L_WHITE," b) Immune Cold", 3, 14);
5902 c_prt(TERM_L_DARK, " c) »À", 4, 14);
5904 c_prt(TERM_L_DARK, " c) Immune Acid", 4, 14);
5908 c_prt(TERM_BLUE, " d) ÅÅ·â", 5, 14);
5910 c_prt(TERM_BLUE, " d) Immune Elec", 5, 14);
5921 prt(" ¤É¤Î¸µÁǤÎÌȱ֤ò¤Ä¤±¤Þ¤¹¤«¡©", 1, 14);
5923 prt(" Choose a temporary elemental immune ", 1, 14);
5928 if ((choice == 'a') || (choice == 'A'))
5929 set_ele_immune(DEFENSE_FIRE, turn);
5930 else if ((choice == 'b') || (choice == 'B'))
5931 set_ele_immune(DEFENSE_COLD, turn);
5932 else if ((choice == 'c') || (choice == 'C'))
5933 set_ele_immune(DEFENSE_ACID, turn);
5934 else if ((choice == 'd') || (choice == 'D'))
5935 set_ele_immune(DEFENSE_ELEC, turn);
5939 msg_print("Ìȱ֤òÉÕ¤±¤ë¤Î¤ò¤ä¤á¤¿¡£");
5941 msg_print("You cancel the temporary immune.");