3 * @brief ¥×¥ì¥¤¥ä¡¼¤Î¥¹¥Æ¡¼¥¿¥¹´ÉÍý / effects of various "objects"
6 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke\n
8 * This software may be copied and distributed for educational, research,\n
9 * and not for profit purposes provided that this copyright and statement\n
10 * are included in all such copies. Other copyrights may also apply.\n
12 * 2013 Deskull rearranged comment for Doxygen.\n
19 * @brief ¥×¥ì¥¤¥ä¡¼¤Î·Ñ³¹ÔÆ°¤òÀßÄꤹ¤ë¡£
20 * @param typ ·Ñ³¹ÔÆ°¤ÎID\n
21 * #ACTION_NONE / #ACTION_SEARCH / #ACTION_REST / #ACTION_LEARN / #ACTION_FISH / #ACTION_KAMAE / #ACTION_KATA / #ACTION_SING / #ACTION_HAYAGAKE / #ACTION_SPELL ¤«¤éÁªÂò¡£
24 void set_action(int typ)
26 int prev_typ = p_ptr->action;
39 msg_print("õº÷¤ò¤ä¤á¤¿¡£");
41 msg_print("You no longer walk carefully.");
43 p_ptr->redraw |= (PR_SPEED);
54 msg_print("³Ø½¬¤ò¤ä¤á¤¿¡£");
56 msg_print("You stop Learning");
64 msg_print("¹½¤¨¤ò¤È¤¤¤¿¡£");
66 msg_print("You stop assuming the posture.");
68 p_ptr->special_defense &= ~(KAMAE_MASK);
74 msg_print("·¿¤òÊø¤·¤¿¡£");
76 msg_print("You stop assuming the posture.");
78 p_ptr->special_defense &= ~(KATA_MASK);
79 p_ptr->update |= (PU_MONSTERS);
80 p_ptr->redraw |= (PR_STATUS);
86 msg_print("²Î¤¦¤Î¤ò¤ä¤á¤¿¡£");
88 msg_print("You stop singing.");
95 msg_print("¤¬½Å¤¯¤Ê¤Ã¤¿¡£");
97 msg_print("You are no longer walking extremely fast.");
105 msg_print("¼öʸ¤Î±Ó¾§¤òÃæÃǤ·¤¿¡£");
107 msg_print("You stopped spelling all spells.");
116 /* If we are requested other action, stop singing */
117 if (prev_typ == ACTION_SING) stop_singing();
118 if (prev_typ == ACTION_SPELL) stop_hex_spell();
120 switch (p_ptr->action)
125 msg_print("Ãí°Õ¿¼¤¯Ê⤻Ϥ᤿¡£");
127 msg_print("You begin to walk carefully.");
129 p_ptr->redraw |= (PR_SPEED);
135 msg_print("³Ø½¬¤ò»Ï¤á¤¿¡£");
137 msg_print("You begin Learning");
144 msg_print("¿åÌ̤˻å¤ò¿â¤é¤·¤¿¡¥¡¥¡¥");
146 msg_print("You begin fishing...");
150 case ACTION_HAYAGAKE:
153 msg_print("¤¬±©¤Î¤è¤¦¤Ë·Ú¤¯¤Ê¤Ã¤¿¡£");
155 msg_print("You begin to walk extremely fast.");
165 /* Recalculate bonuses */
166 p_ptr->update |= (PU_BONUS);
168 /* Redraw the state */
169 p_ptr->redraw |= (PR_STATE);
173 * @brief ¥×¥ì¥¤¥ä¡¼¤ÎÁ´¤Æ¤Î»þ¸Â¸ú²Ì¤ò¥ê¥»¥Ã¥È¤¹¤ë¡£ / reset timed flags
176 void reset_tim_flags(void)
178 p_ptr->fast = 0; /* Timed -- Fast */
179 p_ptr->lightspeed = 0;
180 p_ptr->slow = 0; /* Timed -- Slow */
181 p_ptr->blind = 0; /* Timed -- Blindness */
182 p_ptr->paralyzed = 0; /* Timed -- Paralysis */
183 p_ptr->confused = 0; /* Timed -- Confusion */
184 p_ptr->afraid = 0; /* Timed -- Fear */
185 p_ptr->image = 0; /* Timed -- Hallucination */
186 p_ptr->poisoned = 0; /* Timed -- Poisoned */
187 p_ptr->cut = 0; /* Timed -- Cut */
188 p_ptr->stun = 0; /* Timed -- Stun */
190 p_ptr->protevil = 0; /* Timed -- Protection */
191 p_ptr->invuln = 0; /* Timed -- Invulnerable */
193 p_ptr->hero = 0; /* Timed -- Heroism */
194 p_ptr->shero = 0; /* Timed -- Super Heroism */
195 p_ptr->shield = 0; /* Timed -- Shield Spell */
196 p_ptr->blessed = 0; /* Timed -- Blessed */
197 p_ptr->tim_invis = 0; /* Timed -- Invisibility */
198 p_ptr->tim_infra = 0; /* Timed -- Infra Vision */
199 p_ptr->tim_regen = 0; /* Timed -- Regeneration */
200 p_ptr->tim_stealth = 0; /* Timed -- Stealth */
202 p_ptr->wraith_form = 0; /* Timed -- Wraith Form */
203 p_ptr->tim_levitation = 0;
204 p_ptr->tim_sh_touki = 0;
205 p_ptr->tim_sh_fire = 0;
206 p_ptr->tim_sh_holy = 0;
207 p_ptr->tim_eyeeye = 0;
209 p_ptr->resist_magic = 0;
212 p_ptr->tim_res_nether = 0;
213 p_ptr->tim_res_time = 0;
214 p_ptr->tim_mimic = 0;
215 p_ptr->mimic_form = 0;
216 p_ptr->tim_reflect = 0;
217 p_ptr->multishadow = 0;
219 p_ptr->action = ACTION_NONE;
222 p_ptr->oppose_acid = 0; /* Timed -- oppose acid */
223 p_ptr->oppose_elec = 0; /* Timed -- oppose lightning */
224 p_ptr->oppose_fire = 0; /* Timed -- oppose heat */
225 p_ptr->oppose_cold = 0; /* Timed -- oppose cold */
226 p_ptr->oppose_pois = 0; /* Timed -- oppose poison */
228 p_ptr->word_recall = 0;
229 p_ptr->alter_reality = 0;
230 p_ptr->sutemi = FALSE;
231 p_ptr->counter = FALSE;
232 p_ptr->ele_attack = 0;
233 p_ptr->ele_immune = 0;
234 p_ptr->special_attack = 0L;
235 p_ptr->special_defense = 0L;
237 while(p_ptr->energy_need < 0) p_ptr->energy_need += ENERGY_NEED();
238 world_player = FALSE;
240 if (prace_is_(RACE_DEMON) && (p_ptr->lev > 44)) p_ptr->oppose_fire = 1;
241 if ((p_ptr->pclass == CLASS_NINJA) && (p_ptr->lev > 44)) p_ptr->oppose_pois = 1;
242 if (p_ptr->pclass == CLASS_BERSERKER) p_ptr->shero = 1;
246 (void)set_monster_fast(p_ptr->riding, 0);
247 (void)set_monster_slow(p_ptr->riding, 0);
248 (void)set_monster_invulner(p_ptr->riding, 0, FALSE);
251 if (p_ptr->pclass == CLASS_BARD)
253 p_ptr->magic_num1[0] = 0;
254 p_ptr->magic_num2[0] = 0;
259 * @brief ¥×¥ì¥¤¥ä¡¼¤ËËâÎϾõî¸ú²Ì¤òÍ¿¤¨¤ë¡£
262 void dispel_player(void)
264 (void)set_fast(0, TRUE);
265 (void)set_lightspeed(0, TRUE);
266 (void)set_slow(0, TRUE);
267 (void)set_shield(0, TRUE);
268 (void)set_blessed(0, TRUE);
269 (void)set_tsuyoshi(0, TRUE);
270 (void)set_hero(0, TRUE);
271 (void)set_shero(0, TRUE);
272 (void)set_protevil(0, TRUE);
273 (void)set_invuln(0, TRUE);
274 (void)set_wraith_form(0, TRUE);
275 (void)set_kabenuke(0, TRUE);
276 (void)set_tim_res_nether(0, TRUE);
277 (void)set_tim_res_time(0, TRUE);
279 (void)set_tim_reflect(0,TRUE);
280 (void)set_multishadow(0,TRUE);
281 (void)set_dustrobe(0,TRUE);
283 (void)set_tim_invis(0, TRUE);
284 (void)set_tim_infra(0, TRUE);
285 (void)set_tim_esp(0, TRUE);
286 (void)set_tim_regen(0, TRUE);
287 (void)set_tim_stealth(0, TRUE);
288 (void)set_tim_levitation(0, TRUE);
289 (void)set_tim_sh_touki(0, TRUE);
290 (void)set_tim_sh_fire(0, TRUE);
291 (void)set_tim_sh_holy(0, TRUE);
292 (void)set_tim_eyeeye(0, TRUE);
293 (void)set_magicdef(0, TRUE);
294 (void)set_resist_magic(0, TRUE);
295 (void)set_oppose_acid(0, TRUE);
296 (void)set_oppose_elec(0, TRUE);
297 (void)set_oppose_fire(0, TRUE);
298 (void)set_oppose_cold(0, TRUE);
299 (void)set_oppose_pois(0, TRUE);
300 (void)set_ultimate_res(0, TRUE);
301 (void)set_mimic(0, 0, TRUE);
302 (void)set_ele_attack(0, 0);
303 (void)set_ele_immune(0, 0);
305 /* Cancel glowing hands */
306 if (p_ptr->special_attack & ATTACK_CONFUSE)
308 p_ptr->special_attack &= ~(ATTACK_CONFUSE);
310 msg_print("¼ê¤Îµ±¤¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
312 msg_print("Your hands stop glowing.");
316 if (music_singing_any() || hex_spelling_any())
319 cptr str = (music_singing_any()) ? "²Î" : "¼öʸ";
321 cptr str = (music_singing_any()) ? "singing" : "spelling";
323 p_ptr->magic_num1[1] = p_ptr->magic_num1[0];
324 p_ptr->magic_num1[0] = 0;
326 msg_format("%s¤¬ÅÓÀڤ줿¡£", str);
328 msg_format("Your %s is interrupted.", str);
330 p_ptr->action = ACTION_NONE;
332 /* Recalculate bonuses */
333 p_ptr->update |= (PU_BONUS | PU_HP);
336 p_ptr->redraw |= (PR_MAP | PR_STATUS | PR_STATE);
338 /* Update monsters */
339 p_ptr->update |= (PU_MONSTERS);
342 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
344 p_ptr->energy_need += ENERGY_NEED();
350 * @brief Êѿȸú²Ì¤Î·Ñ³»þ´Ö¤ÈÊÑ¿ÈÀè¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_mimic", and "p_ptr->mimic_form", notice observable changes
353 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
354 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
356 bool set_mimic(int v, int p, bool do_dec)
360 /* Hack -- Force good values */
361 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
363 if (p_ptr->is_dead) return FALSE;
368 if (p_ptr->tim_mimic && (p_ptr->mimic_form == p) && !do_dec)
370 if (p_ptr->tim_mimic > v) return FALSE;
372 else if ((!p_ptr->tim_mimic) || (p_ptr->mimic_form != p))
375 msg_print("¼«Ê¬¤ÎÂΤ¬ÊѤï¤Ã¤Æ¤æ¤¯¤Î¤ò´¶¤¸¤¿¡£");
377 msg_print("You feel that your body changes.");
387 if (p_ptr->tim_mimic)
390 msg_print("ÊѿȤ¬²ò¤±¤¿¡£");
392 msg_print("You are no longer transformed.");
394 if (p_ptr->mimic_form == MIMIC_DEMON) set_oppose_fire(0, TRUE);
402 p_ptr->tim_mimic = v;
404 /* Nothing to notice */
409 if (disturb_state) disturb(0, 1);
412 p_ptr->redraw |= (PR_BASIC | PR_STATUS);
414 /* Recalculate bonuses */
415 p_ptr->update |= (PU_BONUS | PU_HP);
424 * @brief ÌÕÌܤηѳ»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->blind", notice observable changes
426 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
428 * Note the use of "PU_UN_LITE" and "PU_UN_VIEW", which is needed to\n
429 * memorize any terrain features which suddenly become "visible".\n
430 * Note that blindness is currently the only thing which can affect\n
431 * "player_can_see_bold()".\noo
433 bool set_blind(int v)
437 /* Hack -- Force good values */
438 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
440 if (p_ptr->is_dead) return FALSE;
447 if (p_ptr->prace == RACE_ANDROID)
450 msg_print("¥»¥ó¥µ¡¼¤ò¤ä¤é¤ì¤¿¡ª");
452 msg_print("You are blind!");
458 msg_print("Ìܤ¬¸«¤¨¤Ê¤¯¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¡ª");
460 msg_print("You are blind!");
465 chg_virtue(V_ENLIGHTEN, -1);
474 if (p_ptr->prace == RACE_ANDROID)
477 msg_print("¥»¥ó¥µ¡¼¤¬Éüµì¤·¤¿¡£");
479 msg_print("You can see again.");
485 msg_print("¤ä¤Ã¤ÈÌܤ¬¸«¤¨¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£");
487 msg_print("You can see again.");
498 /* Redraw status bar */
499 p_ptr->redraw |= (PR_STATUS);
501 /* Nothing to notice */
502 if (!notice) return (FALSE);
505 if (disturb_state) disturb(0, 0);
507 /* Fully update the visuals */
508 p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE | PU_VIEW | PU_LITE | PU_MONSTERS | PU_MON_LITE);
511 p_ptr->redraw |= (PR_MAP);
514 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
525 * @brief º®Íð¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->confused", notice observable changes
527 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
529 bool set_confused(int v)
533 /* Hack -- Force good values */
534 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
536 if (p_ptr->is_dead) return FALSE;
541 if (!p_ptr->confused)
544 msg_print("¤¢¤Ê¤¿¤Ïº®Í𤷤¿¡ª");
546 msg_print("You are confused!");
549 if (p_ptr->action == ACTION_LEARN)
552 msg_print("³Ø½¬¤¬Â³¤±¤é¤ì¤Ê¤¤¡ª");
554 msg_print("You cannot continue Learning!");
558 p_ptr->redraw |= (PR_STATE);
559 p_ptr->action = ACTION_NONE;
561 if (p_ptr->action == ACTION_KAMAE)
564 msg_print("¹½¤¨¤¬¤È¤±¤¿¡£");
566 msg_print("Your posture gets loose.");
568 p_ptr->special_defense &= ~(KAMAE_MASK);
569 p_ptr->update |= (PU_BONUS);
570 p_ptr->redraw |= (PR_STATE);
571 p_ptr->action = ACTION_NONE;
573 else if (p_ptr->action == ACTION_KATA)
576 msg_print("·¿¤¬Êø¤ì¤¿¡£");
578 msg_print("Your posture gets loose.");
580 p_ptr->special_defense &= ~(KATA_MASK);
581 p_ptr->update |= (PU_BONUS);
582 p_ptr->update |= (PU_MONSTERS);
583 p_ptr->redraw |= (PR_STATE);
584 p_ptr->redraw |= (PR_STATUS);
585 p_ptr->action = ACTION_NONE;
589 if (p_ptr->concent) reset_concentration(TRUE);
592 if (hex_spelling_any()) stop_hex_spell_all();
595 p_ptr->counter = FALSE;
596 chg_virtue(V_HARMONY, -1);
606 msg_print("¤ä¤Ã¤Èº®Í𤬤ª¤µ¤Þ¤Ã¤¿¡£");
608 msg_print("You feel less confused now.");
611 p_ptr->special_attack &= ~(ATTACK_SUIKEN);
619 /* Redraw status bar */
620 p_ptr->redraw |= (PR_STATUS);
622 /* Nothing to notice */
623 if (!notice) return (FALSE);
626 if (disturb_state) disturb(0, 0);
637 * @brief ÆǤηѳ»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->poisoned", notice observable changes
639 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
641 bool set_poisoned(int v)
645 /* Hack -- Force good values */
646 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
648 if (p_ptr->is_dead) return FALSE;
653 if (!p_ptr->poisoned)
656 msg_print("ÆǤ˿¯¤µ¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª");
658 msg_print("You are poisoned!");
671 msg_print("¤ä¤Ã¤ÈÆǤÎÄˤߤ¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
673 msg_print("You are no longer poisoned.");
683 /* Redraw status bar */
684 p_ptr->redraw |= (PR_STATUS);
686 /* Nothing to notice */
687 if (!notice) return (FALSE);
690 if (disturb_state) disturb(0, 0);
701 * @brief ¶²Éݤηѳ»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->afraid", notice observable changes
703 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
705 bool set_afraid(int v)
709 /* Hack -- Force good values */
710 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
712 if (p_ptr->is_dead) return FALSE;
720 msg_print("²¿¤â¤«¤â¶²¤¯¤Ê¤Ã¤Æ¤¤¿¡ª");
722 msg_print("You are terrified!");
725 if (p_ptr->special_defense & KATA_MASK)
728 msg_print("·¿¤¬Êø¤ì¤¿¡£");
730 msg_print("Your posture gets loose.");
732 p_ptr->special_defense &= ~(KATA_MASK);
733 p_ptr->update |= (PU_BONUS);
734 p_ptr->update |= (PU_MONSTERS);
735 p_ptr->redraw |= (PR_STATE);
736 p_ptr->redraw |= (PR_STATUS);
737 p_ptr->action = ACTION_NONE;
741 p_ptr->counter = FALSE;
742 chg_virtue(V_VALOUR, -1);
752 msg_print("¤ä¤Ã¤È¶²Éݤò¿¶¤êʧ¤Ã¤¿¡£");
754 msg_print("You feel bolder now.");
764 /* Redraw status bar */
765 p_ptr->redraw |= (PR_STATUS);
767 /* Nothing to notice */
768 if (!notice) return (FALSE);
771 if (disturb_state) disturb(0, 0);
781 * @brief Ëãáã¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->paralyzed", notice observable changes
783 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
785 bool set_paralyzed(int v)
789 /* Hack -- Force good values */
790 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
792 if (p_ptr->is_dead) return FALSE;
797 if (!p_ptr->paralyzed)
800 msg_print("ÂΤ¬Ëãá㤷¤Æ¤·¤Þ¤Ã¤¿¡ª");
802 msg_print("You are paralyzed!");
806 if (p_ptr->concent) reset_concentration(TRUE);
809 if (hex_spelling_any()) stop_hex_spell_all();
811 p_ptr->counter = FALSE;
819 if (p_ptr->paralyzed)
822 msg_print("¤ä¤Ã¤ÈÆ°¤±¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£");
824 msg_print("You can move again.");
832 p_ptr->paralyzed = v;
834 /* Redraw status bar */
835 p_ptr->redraw |= (PR_STATUS);
837 /* Nothing to notice */
838 if (!notice) return (FALSE);
841 if (disturb_state) disturb(0, 0);
843 /* Redraw the state */
844 p_ptr->redraw |= (PR_STATE);
854 * @brief ¸¸³Ð¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->image", notice observable changes
856 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
857 * @details Note that we must redraw the map when hallucination changes.
859 bool set_image(int v)
863 /* Hack -- Force good values */
864 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
866 if (p_ptr->is_dead) return FALSE;
872 set_tsuyoshi(0, TRUE);
876 msg_print("¥ï¡¼¥ª¡ª²¿¤â¤«¤âÆú¿§¤Ë¸«¤¨¤ë¡ª");
878 msg_print("Oh, wow! Everything looks so cosmic now!");
882 if (p_ptr->concent) reset_concentration(TRUE);
884 p_ptr->counter = FALSE;
895 msg_print("¤ä¤Ã¤È¤Ï¤Ã¤¤ê¤Èʪ¤¬¸«¤¨¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£");
897 msg_print("You can see clearly again.");
907 /* Redraw status bar */
908 p_ptr->redraw |= (PR_STATUS);
910 /* Nothing to notice */
911 if (!notice) return (FALSE);
914 if (disturb_state) disturb(0, 1);
917 p_ptr->redraw |= (PR_MAP);
919 /* Update the health bar */
920 p_ptr->redraw |= (PR_HEALTH | PR_UHEALTH);
922 /* Update monsters */
923 p_ptr->update |= (PU_MONSTERS);
926 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
936 * @brief ²Ã®¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->fast", notice observable changes
938 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
939 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
941 bool set_fast(int v, bool do_dec)
945 /* Hack -- Force good values */
946 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
948 if (p_ptr->is_dead) return FALSE;
953 if (p_ptr->fast && !do_dec)
955 if (p_ptr->fast > v) return FALSE;
957 else if (!IS_FAST() && !p_ptr->lightspeed)
960 msg_print("ÁÇÁ᤯ư¤±¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡ª");
962 msg_print("You feel yourself moving much faster!");
966 chg_virtue(V_PATIENCE, -1);
967 chg_virtue(V_DILIGENCE, 1);
974 if (p_ptr->fast && !p_ptr->lightspeed && !music_singing(MUSIC_SPEED) && !music_singing(MUSIC_SHERO))
977 msg_print("Æ°¤¤ÎÁÇÁᤵ¤¬¤Ê¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£");
979 msg_print("You feel yourself slow down.");
989 /* Nothing to notice */
990 if (!notice) return (FALSE);
993 if (disturb_state) disturb(0, 0);
995 /* Recalculate bonuses */
996 p_ptr->update |= (PU_BONUS);
1006 * @brief ¸÷®°ÜÆ°¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->lightspeed", notice observable changes
1008 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
1009 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
1011 bool set_lightspeed(int v, bool do_dec)
1013 bool notice = FALSE;
1015 /* Hack -- Force good values */
1016 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1018 if (p_ptr->is_dead) return FALSE;
1020 if (p_ptr->wild_mode) v = 0;
1025 if (p_ptr->lightspeed && !do_dec)
1027 if (p_ptr->lightspeed > v) return FALSE;
1029 else if (!p_ptr->lightspeed)
1032 msg_print("Èó¾ï¤ËÁÇÁ᤯ư¤±¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡ª");
1034 msg_print("You feel yourself moving extremely faster!");
1038 chg_virtue(V_PATIENCE, -1);
1039 chg_virtue(V_DILIGENCE, 1);
1046 if (p_ptr->lightspeed)
1049 msg_print("Æ°¤¤ÎÁÇÁᤵ¤¬¤Ê¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£");
1051 msg_print("You feel yourself slow down.");
1059 p_ptr->lightspeed = v;
1061 /* Nothing to notice */
1062 if (!notice) return (FALSE);
1065 if (disturb_state) disturb(0, 0);
1067 /* Recalculate bonuses */
1068 p_ptr->update |= (PU_BONUS);
1078 * @brief ¸ºÂ®¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->slow", notice observable changes
1080 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
1081 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
1083 bool set_slow(int v, bool do_dec)
1085 bool notice = FALSE;
1087 /* Hack -- Force good values */
1088 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1090 if (p_ptr->is_dead) return FALSE;
1095 if (p_ptr->slow && !do_dec)
1097 if (p_ptr->slow > v) return FALSE;
1099 else if (!p_ptr->slow)
1102 msg_print("ÂΤÎÆ°¤¤¬ÃÙ¤¯¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¡ª");
1104 msg_print("You feel yourself moving slower!");
1117 msg_print("Æ°¤¤ÎÃÙ¤µ¤¬¤Ê¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£");
1119 msg_print("You feel yourself speed up.");
1129 /* Nothing to notice */
1130 if (!notice) return (FALSE);
1133 if (disturb_state) disturb(0, 0);
1135 /* Recalculate bonuses */
1136 p_ptr->update |= (PU_BONUS);
1147 * @brief È©Àв½¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->shield", notice observable changes
1149 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
1150 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
1152 bool set_shield(int v, bool do_dec)
1154 bool notice = FALSE;
1156 /* Hack -- Force good values */
1157 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1159 if (p_ptr->is_dead) return FALSE;
1164 if (p_ptr->shield && !do_dec)
1166 if (p_ptr->shield > v) return FALSE;
1168 else if (!p_ptr->shield)
1171 msg_print("È©¤¬ÀФˤʤä¿¡£");
1173 msg_print("Your skin turns to stone.");
1186 msg_print("È©¤¬¸µ¤ËÌá¤Ã¤¿¡£");
1188 msg_print("Your skin returns to normal.");
1198 /* Redraw status bar */
1199 p_ptr->redraw |= (PR_STATUS);
1201 /* Nothing to notice */
1202 if (!notice) return (FALSE);
1205 if (disturb_state) disturb(0, 0);
1207 /* Recalculate bonuses */
1208 p_ptr->update |= (PU_BONUS);
1219 * @brief ¤Ä¤Ö¤ì¤ë¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tsubureru", notice observable changes
1221 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
1222 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
1224 bool set_tsubureru(int v, bool do_dec)
1226 bool notice = FALSE;
1228 /* Hack -- Force good values */
1229 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1231 if (p_ptr->is_dead) return FALSE;
1236 if (p_ptr->tsubureru && !do_dec)
1238 if (p_ptr->tsubureru > v) return FALSE;
1240 else if (!p_ptr->tsubureru)
1243 msg_print("²£¤Ë¿¤Ó¤¿¡£");
1245 msg_print("Your body expands horizontally.");
1255 if (p_ptr->tsubureru)
1258 msg_print("¤â¤¦²£¤Ë¿¤Ó¤Æ¤¤¤Ê¤¤¡£");
1260 msg_print("Your body returns to normal.");
1268 p_ptr->tsubureru = v;
1270 /* Redraw status bar */
1271 p_ptr->redraw |= (PR_STATUS);
1273 /* Nothing to notice */
1274 if (!notice) return (FALSE);
1277 if (disturb_state) disturb(0, 0);
1279 /* Recalculate bonuses */
1280 p_ptr->update |= (PU_BONUS);
1291 * @brief ËâË¡¤Î³»¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->magicdef", notice observable changes
1293 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
1294 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
1296 bool set_magicdef(int v, bool do_dec)
1298 bool notice = FALSE;
1300 /* Hack -- Force good values */
1301 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1303 if (p_ptr->is_dead) return FALSE;
1308 if (p_ptr->magicdef && !do_dec)
1310 if (p_ptr->magicdef > v) return FALSE;
1312 else if (!p_ptr->magicdef)
1315 msg_print("ËâË¡¤ÎËɸæÎϤ¬Áý¤·¤¿¤è¤¦¤Êµ¤¤¬¤¹¤ë¡£");
1317 msg_print("You feel more resistant to magic.");
1327 if (p_ptr->magicdef)
1330 msg_print("ËâË¡¤ÎËɸæÎϤ¬¸µ¤ËÌá¤Ã¤¿¡£");
1332 msg_print("You feel less resistant to magic.");
1340 p_ptr->magicdef = v;
1342 /* Redraw status bar */
1343 p_ptr->redraw |= (PR_STATUS);
1345 /* Nothing to notice */
1346 if (!notice) return (FALSE);
1349 if (disturb_state) disturb(0, 0);
1351 /* Recalculate bonuses */
1352 p_ptr->update |= (PU_BONUS);
1362 * @brief ½ËÊ¡¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->blessed", notice observable changes
1364 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
1365 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
1367 bool set_blessed(int v, bool do_dec)
1369 bool notice = FALSE;
1371 /* Hack -- Force good values */
1372 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1374 if (p_ptr->is_dead) return FALSE;
1379 if (p_ptr->blessed && !do_dec)
1381 if (p_ptr->blessed > v) return FALSE;
1383 else if (!IS_BLESSED())
1386 msg_print("¹â·é¤Êµ¤Ê¬¤Ë¤Ê¤Ã¤¿¡ª");
1388 msg_print("You feel righteous!");
1398 if (p_ptr->blessed && !music_singing(MUSIC_BLESS))
1401 msg_print("¹â·é¤Êµ¤Ê¬¤¬¾Ã¤¨¼º¤»¤¿¡£");
1403 msg_print("The prayer has expired.");
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);
1434 * @brief »Îµ¤¹âÍȤηѳ»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->hero", notice observable changes
1436 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
1437 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
1439 bool set_hero(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->hero && !do_dec)
1453 if (p_ptr->hero > v) return FALSE;
1455 else if (!IS_HERO())
1458 msg_print("¥Ò¡¼¥í¡¼¤Ë¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡ª");
1460 msg_print("You feel like a hero!");
1470 if (p_ptr->hero && !music_singing(MUSIC_HERO) && !music_singing(MUSIC_SHERO))
1473 msg_print("¥Ò¡¼¥í¡¼¤Îµ¤Ê¬¤¬¾Ã¤¨¼º¤»¤¿¡£");
1475 msg_print("The heroism wears off.");
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);
1494 /* Recalculate bonuses */
1495 p_ptr->update |= (PU_BONUS);
1497 /* Recalculate hitpoints */
1498 p_ptr->update |= (PU_HP);
1508 * @brief ¶¸Àï»Î²½¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->shero", notice observable changes
1510 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
1511 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
1513 bool set_shero(int v, bool do_dec)
1515 bool notice = FALSE;
1517 /* Hack -- Force good values */
1518 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1520 if (p_ptr->is_dead) return FALSE;
1522 if (p_ptr->pclass == CLASS_BERSERKER) v = 1;
1526 if (p_ptr->shero && !do_dec)
1528 if (p_ptr->shero > v) return FALSE;
1530 else if (!p_ptr->shero)
1533 msg_print("»¦Ù¤¥Þ¥·¡¼¥ó¤Ë¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡ª");
1535 msg_print("You feel like a killing machine!");
1548 msg_print("ÌîÈڤʵ¤»ý¤Á¤¬¾Ã¤¨¼º¤»¤¿¡£");
1550 msg_print("You feel less Berserk.");
1560 /* Redraw status bar */
1561 p_ptr->redraw |= (PR_STATUS);
1563 /* Nothing to notice */
1564 if (!notice) return (FALSE);
1567 if (disturb_state) disturb(0, 0);
1569 /* Recalculate bonuses */
1570 p_ptr->update |= (PU_BONUS);
1572 /* Recalculate hitpoints */
1573 p_ptr->update |= (PU_HP);
1583 * @brief Âмٰ·ë³¦¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->protevil", notice observable changes
1585 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
1586 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
1588 bool set_protevil(int v, bool do_dec)
1590 bool notice = FALSE;
1592 /* Hack -- Force good values */
1593 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1595 if (p_ptr->is_dead) return FALSE;
1600 if (p_ptr->protevil && !do_dec)
1602 if (p_ptr->protevil > v) return FALSE;
1604 else if (!p_ptr->protevil)
1607 msg_print("¼Ù°¤Ê¤ë¸ºß¤«¤é¼é¤é¤ì¤Æ¤¤¤ë¤è¤¦¤Ê´¶¤¸¤¬¤¹¤ë¡ª");
1609 msg_print("You feel safe from evil!");
1619 if (p_ptr->protevil)
1622 msg_print("¼Ù°¤Ê¤ë¸ºß¤«¤é¼é¤é¤ì¤Æ¤¤¤ë´¶¤¸¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
1624 msg_print("You no longer feel safe from evil.");
1632 p_ptr->protevil = v;
1634 /* Redraw status bar */
1635 p_ptr->redraw |= (PR_STATUS);
1637 /* Nothing to notice */
1638 if (!notice) return (FALSE);
1641 if (disturb_state) disturb(0, 0);
1651 * @brief Í©Âβ½¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->wraith_form", notice observable changes
1653 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
1654 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
1656 bool set_wraith_form(int v, bool do_dec)
1658 bool notice = FALSE;
1660 /* Hack -- Force good values */
1661 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1663 if (p_ptr->is_dead) return FALSE;
1668 if (p_ptr->wraith_form && !do_dec)
1670 if (p_ptr->wraith_form > v) return FALSE;
1672 else if (!p_ptr->wraith_form)
1675 msg_print("ʪ¼Á³¦¤òÎ¥¤ì¤ÆÍ©µ´¤Î¤è¤¦¤Ê¸ºß¤Ë¤Ê¤Ã¤¿¡ª");
1677 msg_print("You leave the physical world and turn into a wraith-being!");
1682 chg_virtue(V_UNLIFE, 3);
1683 chg_virtue(V_HONOUR, -2);
1684 chg_virtue(V_SACRIFICE, -2);
1685 chg_virtue(V_VALOUR, -5);
1688 p_ptr->redraw |= (PR_MAP);
1690 /* Update monsters */
1691 p_ptr->update |= (PU_MONSTERS);
1694 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1701 if (p_ptr->wraith_form)
1704 msg_print("ÉÔÆ©ÌÀ¤Ë¤Ê¤Ã¤¿´¶¤¸¤¬¤¹¤ë¡£");
1706 msg_print("You feel opaque.");
1712 p_ptr->redraw |= (PR_MAP);
1714 /* Update monsters */
1715 p_ptr->update |= (PU_MONSTERS);
1718 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1723 p_ptr->wraith_form = v;
1725 /* Redraw status bar */
1726 p_ptr->redraw |= (PR_STATUS);
1728 /* Nothing to notice */
1729 if (!notice) return (FALSE);
1732 if (disturb_state) disturb(0, 0);
1734 /* Recalculate bonuses */
1735 p_ptr->update |= (PU_BONUS);
1746 * @brief ̵½ýµå¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->invuln", notice observable changes
1748 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
1749 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
1751 bool set_invuln(int v, bool do_dec)
1753 bool notice = FALSE;
1755 /* Hack -- Force good values */
1756 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1758 if (p_ptr->is_dead) return FALSE;
1763 if (p_ptr->invuln && !do_dec)
1765 if (p_ptr->invuln > v) return FALSE;
1767 else if (!IS_INVULN())
1770 msg_print("̵Ũ¤À¡ª");
1772 msg_print("Invulnerability!");
1777 chg_virtue(V_UNLIFE, -2);
1778 chg_virtue(V_HONOUR, -2);
1779 chg_virtue(V_SACRIFICE, -3);
1780 chg_virtue(V_VALOUR, -5);
1783 p_ptr->redraw |= (PR_MAP);
1785 /* Update monsters */
1786 p_ptr->update |= (PU_MONSTERS);
1789 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1796 if (p_ptr->invuln && !music_singing(MUSIC_INVULN))
1799 msg_print("̵Ũ¤Ç¤Ï¤Ê¤¯¤Ê¤Ã¤¿¡£");
1801 msg_print("The invulnerability wears off.");
1807 p_ptr->redraw |= (PR_MAP);
1809 /* Update monsters */
1810 p_ptr->update |= (PU_MONSTERS);
1813 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1815 p_ptr->energy_need += ENERGY_NEED();
1822 /* Redraw status bar */
1823 p_ptr->redraw |= (PR_STATUS);
1825 /* Nothing to notice */
1826 if (!notice) return (FALSE);
1829 if (disturb_state) disturb(0, 0);
1831 /* Recalculate bonuses */
1832 p_ptr->update |= (PU_BONUS);
1842 * @brief »þ¸ÂESP¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_esp", notice observable changes
1844 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
1845 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
1847 bool set_tim_esp(int v, bool do_dec)
1849 bool notice = FALSE;
1851 /* Hack -- Force good values */
1852 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1854 if (p_ptr->is_dead) return FALSE;
1859 if (p_ptr->tim_esp && !do_dec)
1861 if (p_ptr->tim_esp > v) return FALSE;
1863 else if (!IS_TIM_ESP())
1866 msg_print("°Õ¼±¤¬¹¤¬¤Ã¤¿µ¤¤¬¤¹¤ë¡ª");
1868 msg_print("You feel your consciousness expand!");
1878 if (p_ptr->tim_esp && !music_singing(MUSIC_MIND))
1881 msg_print("°Õ¼±¤Ï¸µ¤ËÌá¤Ã¤¿¡£");
1883 msg_print("Your consciousness contracts again.");
1893 /* Redraw status bar */
1894 p_ptr->redraw |= (PR_STATUS);
1896 /* Nothing to notice */
1897 if (!notice) return (FALSE);
1900 if (disturb_state) disturb(0, 0);
1902 /* Recalculate bonuses */
1903 p_ptr->update |= (PU_BONUS);
1905 /* Update the monsters */
1906 p_ptr->update |= (PU_MONSTERS);
1916 * @brief »þ¸ÂÆ©ÌÀ»ë¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_invis", notice observable changes
1918 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
1919 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
1921 bool set_tim_invis(int v, bool do_dec)
1923 bool notice = FALSE;
1925 /* Hack -- Force good values */
1926 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1928 if (p_ptr->is_dead) return FALSE;
1933 if (p_ptr->tim_invis && !do_dec)
1935 if (p_ptr->tim_invis > v) return FALSE;
1937 else if (!p_ptr->tim_invis)
1940 msg_print("Ìܤ¬Èó¾ï¤ËÉÒ´¶¤Ë¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡ª");
1942 msg_print("Your eyes feel very sensitive!");
1952 if (p_ptr->tim_invis)
1955 msg_print("ÌܤÎÉÒ´¶¤µ¤¬¤Ê¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£");
1957 msg_print("Your eyes feel less sensitive.");
1965 p_ptr->tim_invis = v;
1967 /* Redraw status bar */
1968 p_ptr->redraw |= (PR_STATUS);
1970 /* Nothing to notice */
1971 if (!notice) return (FALSE);
1974 if (disturb_state) disturb(0, 0);
1976 /* Recalculate bonuses */
1977 p_ptr->update |= (PU_BONUS);
1979 /* Update the monsters */
1980 p_ptr->update |= (PU_MONSTERS);
1990 * @brief »þ¸ÂÀÖ³°Àþ»ëÎϤηѳ»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_infra", notice observable changes
1992 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
1993 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
1995 bool set_tim_infra(int v, bool do_dec)
1997 bool notice = FALSE;
1999 /* Hack -- Force good values */
2000 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2002 if (p_ptr->is_dead) return FALSE;
2007 if (p_ptr->tim_infra && !do_dec)
2009 if (p_ptr->tim_infra > v) return FALSE;
2011 else if (!p_ptr->tim_infra)
2014 msg_print("Ìܤ¬¥é¥ó¥é¥ó¤Èµ±¤»Ï¤á¤¿¡ª");
2016 msg_print("Your eyes begin to tingle!");
2026 if (p_ptr->tim_infra)
2029 msg_print("Ìܤ層¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
2031 msg_print("Your eyes stop tingling.");
2039 p_ptr->tim_infra = v;
2041 /* Redraw status bar */
2042 p_ptr->redraw |= (PR_STATUS);
2044 /* Nothing to notice */
2045 if (!notice) return (FALSE);
2048 if (disturb_state) disturb(0, 0);
2050 /* Recalculate bonuses */
2051 p_ptr->update |= (PU_BONUS);
2053 /* Update the monsters */
2054 p_ptr->update |= (PU_MONSTERS);
2064 * @brief »þ¸ÂµÞ²óÉü¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_regen", notice observable changes
2066 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
2067 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
2069 bool set_tim_regen(int v, bool do_dec)
2071 bool notice = FALSE;
2073 /* Hack -- Force good values */
2074 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2076 if (p_ptr->is_dead) return FALSE;
2081 if (p_ptr->tim_regen && !do_dec)
2083 if (p_ptr->tim_regen > v) return FALSE;
2085 else if (!p_ptr->tim_regen)
2088 msg_print("²óÉüÎϤ¬¾å¤¬¤Ã¤¿¡ª");
2090 msg_print("You feel yourself regenerating quickly!");
2100 if (p_ptr->tim_regen)
2103 msg_print("ÁÇÁ᤯²óÉü¤¹¤ë´¶¤¸¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
2105 msg_print("You feel yourself regenerating slowly.");
2113 p_ptr->tim_regen = v;
2115 /* Redraw status bar */
2116 p_ptr->redraw |= (PR_STATUS);
2118 /* Nothing to notice */
2119 if (!notice) return (FALSE);
2122 if (disturb_state) disturb(0, 0);
2124 /* Recalculate bonuses */
2125 p_ptr->update |= (PU_BONUS);
2135 * @brief ±£Ì©¤Î²Î¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_stealth", notice observable changes
2137 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
2138 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
2140 bool set_tim_stealth(int v, bool do_dec)
2142 bool notice = FALSE;
2144 /* Hack -- Force good values */
2145 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2147 if (p_ptr->is_dead) return FALSE;
2152 if (p_ptr->tim_stealth && !do_dec)
2154 if (p_ptr->tim_stealth > v) return FALSE;
2156 else if (!IS_TIM_STEALTH())
2159 msg_print("²»¤¬¾®¤µ¤¯¤Ê¤Ã¤¿¡ª");
2161 msg_print("You begin to walk silently!");
2171 if (p_ptr->tim_stealth && !music_singing(MUSIC_STEALTH))
2174 msg_print("²»¤¬Â礤¯¤Ê¤Ã¤¿¡£");
2176 msg_print("You no longer walk silently.");
2184 p_ptr->tim_stealth = v;
2186 /* Redraw status bar */
2187 p_ptr->redraw |= (PR_STATUS);
2189 /* Nothing to notice */
2190 if (!notice) return (FALSE);
2193 if (disturb_state) disturb(0, 0);
2195 /* Recalculate bonuses */
2196 p_ptr->update |= (PU_BONUS);
2206 * @brief Ķ±£Ì©¾õÂÖ¤ò¥»¥Ã¥È¤¹¤ë
2207 * @set TRUE¤Ê¤é¤ÐĶ±£Ì©¾õÂ֤ˤʤ롣
2208 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
2210 bool set_superstealth(bool set)
2212 bool notice = FALSE;
2214 if (p_ptr->is_dead) return FALSE;
2219 if (!(p_ptr->special_defense & NINJA_S_STEALTH))
2221 if (cave[py][px].info & CAVE_MNLT)
2224 msg_print("Ũ¤ÎÌܤ«¤éÇö¤¤±Æ¤ÎÃæ¤Ëʤ¤¤±£¤µ¤ì¤¿¡£");
2226 msg_print("You are mantled in weak shadow from ordinary eyes.");
2228 p_ptr->monlite = p_ptr->old_monlite = TRUE;
2233 msg_print("Ũ¤ÎÌܤ«¤é±Æ¤ÎÃæ¤Ëʤ¤¤±£¤µ¤ì¤¿¡ª");
2235 msg_print("You are mantled in shadow from ordinary eyes!");
2237 p_ptr->monlite = p_ptr->old_monlite = FALSE;
2243 p_ptr->special_defense |= NINJA_S_STEALTH;
2250 if (p_ptr->special_defense & NINJA_S_STEALTH)
2253 msg_print("ºÆ¤ÓŨ¤ÎÌܤˤµ¤é¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£");
2255 msg_print("You are exposed to common sight once more.");
2261 p_ptr->special_defense &= ~(NINJA_S_STEALTH);
2265 /* Nothing to notice */
2266 if (!notice) return (FALSE);
2268 /* Redraw status bar */
2269 p_ptr->redraw |= (PR_STATUS);
2272 if (disturb_state) disturb(0, 0);
2279 * @brief °ì»þŪÉâÍ·¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_levitation", notice observable changes
2281 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
2282 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
2284 bool set_tim_levitation(int v, bool do_dec)
2286 bool notice = FALSE;
2288 /* Hack -- Force good values */
2289 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2291 if (p_ptr->is_dead) return FALSE;
2296 if (p_ptr->tim_levitation && !do_dec)
2298 if (p_ptr->tim_levitation > v) return FALSE;
2300 else if (!p_ptr->tim_levitation)
2303 msg_print("ÂΤ¬Ãè¤ËÉ⤻Ϥ᤿¡£");
2305 msg_print("You begin to fly!");
2315 if (p_ptr->tim_levitation)
2318 msg_print("¤â¤¦Ãè¤ËÉ⤫¤Ù¤Ê¤¯¤Ê¤Ã¤¿¡£");
2320 msg_print("You stop flying.");
2328 p_ptr->tim_levitation = v;
2330 /* Redraw status bar */
2331 p_ptr->redraw |= (PR_STATUS);
2333 /* Nothing to notice */
2334 if (!notice) return (FALSE);
2337 if (disturb_state) disturb(0, 0);
2339 /* Recalculate bonuses */
2340 p_ptr->update |= (PU_BONUS);
2350 * @brief °ì»þŪƮµ¤¤Î¥ª¡¼¥é¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_sh_touki", notice observable changes
2352 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
2353 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
2355 bool set_tim_sh_touki(int v, bool do_dec)
2357 bool notice = FALSE;
2359 /* Hack -- Force good values */
2360 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2362 if (p_ptr->is_dead) return FALSE;
2367 if (p_ptr->tim_sh_touki && !do_dec)
2369 if (p_ptr->tim_sh_touki > v) return FALSE;
2371 else if (!p_ptr->tim_sh_touki)
2374 msg_print("ÂΤ¬Æ®µ¤¤Î¥ª¡¼¥é¤Çʤ¤ï¤ì¤¿¡£");
2376 msg_print("You have enveloped by the aura of the Force!");
2386 if (p_ptr->tim_sh_touki)
2389 msg_print("Æ®µ¤¤¬¾Ã¤¨¤¿¡£");
2391 msg_print("Aura of the Force disappeared.");
2399 p_ptr->tim_sh_touki = v;
2401 /* Redraw status bar */
2402 p_ptr->redraw |= (PR_STATUS);
2404 /* Nothing to notice */
2405 if (!notice) return (FALSE);
2408 if (disturb_state) disturb(0, 0);
2418 * @brief °ì»þŪ²Ð±ê¤Î¥ª¡¼¥é¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_sh_fire", notice observable changes
2420 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
2421 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
2423 bool set_tim_sh_fire(int v, bool do_dec)
2425 bool notice = FALSE;
2427 /* Hack -- Force good values */
2428 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2430 if (p_ptr->is_dead) return FALSE;
2435 if (p_ptr->tim_sh_fire && !do_dec)
2437 if (p_ptr->tim_sh_fire > v) return FALSE;
2439 else if (!p_ptr->tim_sh_fire)
2442 msg_print("ÂΤ¬±ê¤Î¥ª¡¼¥é¤Çʤ¤ï¤ì¤¿¡£");
2444 msg_print("You have enveloped by fiery aura!");
2454 if (p_ptr->tim_sh_fire)
2457 msg_print("±ê¤Î¥ª¡¼¥é¤¬¾Ã¤¨¤¿¡£");
2459 msg_print("Fiery aura disappeared.");
2467 p_ptr->tim_sh_fire = v;
2469 /* Redraw status bar */
2470 p_ptr->redraw |= (PR_STATUS);
2472 /* Nothing to notice */
2473 if (!notice) return (FALSE);
2476 if (disturb_state) disturb(0, 0);
2478 /* Recalculate bonuses */
2479 p_ptr->update |= (PU_BONUS);
2489 * @brief °ì»þŪÀ»¤Ê¤ë¤Î¥ª¡¼¥é¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_sh_holy", notice observable changes
2491 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
2492 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
2494 bool set_tim_sh_holy(int v, bool do_dec)
2496 bool notice = FALSE;
2498 /* Hack -- Force good values */
2499 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2501 if (p_ptr->is_dead) return FALSE;
2506 if (p_ptr->tim_sh_holy && !do_dec)
2508 if (p_ptr->tim_sh_holy > v) return FALSE;
2510 else if (!p_ptr->tim_sh_holy)
2513 msg_print("ÂΤ¬À»¤Ê¤ë¥ª¡¼¥é¤Çʤ¤ï¤ì¤¿¡£");
2515 msg_print("You have enveloped by holy aura!");
2525 if (p_ptr->tim_sh_holy)
2528 msg_print("À»¤Ê¤ë¥ª¡¼¥é¤¬¾Ã¤¨¤¿¡£");
2530 msg_print("Holy aura disappeared.");
2538 p_ptr->tim_sh_holy = v;
2540 /* Redraw status bar */
2541 p_ptr->redraw |= (PR_STATUS);
2543 /* Nothing to notice */
2544 if (!notice) return (FALSE);
2547 if (disturb_state) disturb(0, 0);
2549 /* Recalculate bonuses */
2550 p_ptr->update |= (PU_BONUS);
2560 * @brief ÌܤˤÏÌܤò¤Î»Ä¤ê»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_eyeeye", notice observable changes
2562 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
2563 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
2565 bool set_tim_eyeeye(int v, bool do_dec)
2567 bool notice = FALSE;
2569 /* Hack -- Force good values */
2570 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2572 if (p_ptr->is_dead) return FALSE;
2577 if (p_ptr->tim_eyeeye && !do_dec)
2579 if (p_ptr->tim_eyeeye > v) return FALSE;
2581 else if (!p_ptr->tim_eyeeye)
2584 msg_print("Ë¡¤Î¼é¤ê¼ê¤Ë¤Ê¤Ã¤¿µ¤¤¬¤·¤¿¡ª");
2586 msg_print("You feel like a keeper of commandments!");
2596 if (p_ptr->tim_eyeeye)
2599 msg_print("Ĩȳ¤ò¼¹¹Ô¤¹¤ë¤³¤È¤¬¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2601 msg_print("You no longer feel like a keeper.");
2609 p_ptr->tim_eyeeye = v;
2611 /* Redraw status bar */
2612 p_ptr->redraw |= (PR_STATUS);
2614 /* Nothing to notice */
2615 if (!notice) return (FALSE);
2618 if (disturb_state) disturb(0, 0);
2620 /* Recalculate bonuses */
2621 p_ptr->update |= (PU_BONUS);
2632 * @brief °ì»þŪËâË¡Ëɸæ¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->resist_magic", notice observable changes
2634 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
2635 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
2637 bool set_resist_magic(int v, bool do_dec)
2639 bool notice = FALSE;
2641 /* Hack -- Force good values */
2642 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2644 if (p_ptr->is_dead) return FALSE;
2649 if (p_ptr->resist_magic && !do_dec)
2651 if (p_ptr->resist_magic > v) return FALSE;
2653 else if (!p_ptr->resist_magic)
2656 msg_print("ËâË¡¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿¡£");
2658 msg_print("You have been protected from magic!");
2668 if (p_ptr->resist_magic)
2671 msg_print("ËâË¡¤Ë¼å¤¯¤Ê¤Ã¤¿¡£");
2673 msg_print("You are no longer protected from magic.");
2681 p_ptr->resist_magic = v;
2683 /* Redraw status bar */
2684 p_ptr->redraw |= (PR_STATUS);
2686 /* Nothing to notice */
2687 if (!notice) return (FALSE);
2690 if (disturb_state) disturb(0, 0);
2692 /* Recalculate bonuses */
2693 p_ptr->update |= (PU_BONUS);
2703 * @brief °ì»þŪȿ¼Í¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_reflect", notice observable changes
2705 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
2706 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
2708 bool set_tim_reflect(int v, bool do_dec)
2710 bool notice = FALSE;
2712 /* Hack -- Force good values */
2713 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2715 if (p_ptr->is_dead) return FALSE;
2720 if (p_ptr->tim_reflect && !do_dec)
2722 if (p_ptr->tim_reflect > v) return FALSE;
2724 else if (!p_ptr->tim_reflect)
2727 msg_print("ÂΤÎɽÌ̤¬³ê¤«¤Ë¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£");
2729 msg_print("Your body becames smooth.");
2739 if (p_ptr->tim_reflect)
2742 msg_print("ÂΤÎɽÌ̤¬³ê¤«¤Ç¤Ê¤¯¤Ê¤Ã¤¿¡£");
2744 msg_print("Your body is no longer smooth.");
2752 p_ptr->tim_reflect = v;
2754 /* Redraw status bar */
2755 p_ptr->redraw |= (PR_STATUS);
2757 /* Nothing to notice */
2758 if (!notice) return (FALSE);
2761 if (disturb_state) disturb(0, 0);
2763 /* Recalculate bonuses */
2764 p_ptr->update |= (PU_BONUS);
2775 * Set "p_ptr->multishadow", notice observable changes
2777 bool set_multishadow(int v, bool do_dec)
2779 bool notice = FALSE;
2781 /* Hack -- Force good values */
2782 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2784 if (p_ptr->is_dead) return FALSE;
2789 if (p_ptr->multishadow && !do_dec)
2791 if (p_ptr->multishadow > v) return FALSE;
2793 else if (!p_ptr->multishadow)
2796 msg_print("¤¢¤Ê¤¿¤Î¼þ¤ê¤Ë¸¸±Æ¤¬À¸¤Þ¤ì¤¿¡£");
2798 msg_print("Your Shadow enveloped you.");
2808 if (p_ptr->multishadow)
2811 msg_print("¸¸±Æ¤¬¾Ã¤¨¤¿¡£");
2813 msg_print("Your Shadow disappears.");
2821 p_ptr->multishadow = v;
2823 /* Redraw status bar */
2824 p_ptr->redraw |= (PR_STATUS);
2826 /* Nothing to notice */
2827 if (!notice) return (FALSE);
2830 if (disturb_state) disturb(0, 0);
2832 /* Recalculate bonuses */
2833 p_ptr->update |= (PU_BONUS);
2843 * @brief °ì»þŪÇËÊҤΥª¡¼¥é¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->dustrobe", notice observable changes
2845 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
2846 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
2848 bool set_dustrobe(int v, bool do_dec)
2850 bool notice = FALSE;
2852 /* Hack -- Force good values */
2853 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2855 if (p_ptr->is_dead) return FALSE;
2860 if (p_ptr->dustrobe && !do_dec)
2862 if (p_ptr->dustrobe > v) return FALSE;
2864 else if (!p_ptr->dustrobe)
2867 msg_print("ÂΤ¬¶À¤Î¥ª¡¼¥é¤Çʤ¤ï¤ì¤¿¡£");
2869 msg_print("You were enveloped by mirror shards.");
2879 if (p_ptr->dustrobe)
2882 msg_print("¶À¤Î¥ª¡¼¥é¤¬¾Ã¤¨¤¿¡£");
2884 msg_print("The mirror shards disappear.");
2892 p_ptr->dustrobe = v;
2894 /* Redraw status bar */
2895 p_ptr->redraw |= (PR_STATUS);
2897 /* Nothing to notice */
2898 if (!notice) return (FALSE);
2901 if (disturb_state) disturb(0, 0);
2903 /* Recalculate bonuses */
2904 p_ptr->update |= (PU_BONUS);
2914 * @brief °ì»þŪÊÉÈ´¤±¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->kabenuke", notice observable changes
2916 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
2917 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
2919 bool set_kabenuke(int v, bool do_dec)
2921 bool notice = FALSE;
2923 /* Hack -- Force good values */
2924 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2926 if (p_ptr->is_dead) return FALSE;
2931 if (p_ptr->kabenuke && !do_dec)
2933 if (p_ptr->kabenuke > v) return FALSE;
2935 else if (!p_ptr->kabenuke)
2938 msg_print("ÂΤ¬È¾Êª¼Á¤Î¾õÂ֤ˤʤä¿¡£");
2940 msg_print("You became ethereal form.");
2950 if (p_ptr->kabenuke)
2953 msg_print("ÂΤ¬Êª¼Á²½¤·¤¿¡£");
2955 msg_print("You are no longer in an ethereal form.");
2963 p_ptr->kabenuke = v;
2965 /* Redraw status bar */
2966 p_ptr->redraw |= (PR_STATUS);
2968 /* Nothing to notice */
2969 if (!notice) return (FALSE);
2972 if (disturb_state) disturb(0, 0);
2974 /* Recalculate bonuses */
2975 p_ptr->update |= (PU_BONUS);
2985 * @brief ¥ª¥¯¥ì·»¤µ¤ó¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tsuyoshi", notice observable changes
2987 * @do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
2988 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
2990 bool set_tsuyoshi(int v, bool do_dec)
2992 bool notice = FALSE;
2994 /* Hack -- Force good values */
2995 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2997 if (p_ptr->is_dead) return FALSE;
3002 if (p_ptr->tsuyoshi && !do_dec)
3004 if (p_ptr->tsuyoshi > v) return FALSE;
3006 else if (!p_ptr->tsuyoshi)
3009 msg_print("¡Ö¥ª¥¯¥ì·»¤µ¤ó¡ª¡×");
3011 msg_print("Brother OKURE!");
3015 chg_virtue(V_VITALITY, 2);
3022 if (p_ptr->tsuyoshi)
3025 msg_print("ÆùÂΤ¬µÞ®¤Ë¤·¤Ü¤ó¤Ç¤¤¤Ã¤¿¡£");
3027 msg_print("Your body had quickly shriveled.");
3030 (void)dec_stat(A_CON, 20, TRUE);
3031 (void)dec_stat(A_STR, 20, TRUE);
3034 chg_virtue(V_VITALITY, -3);
3039 p_ptr->tsuyoshi = v;
3041 /* Redraw status bar */
3042 p_ptr->redraw |= (PR_STATUS);
3044 /* Nothing to notice */
3045 if (!notice) return (FALSE);
3048 if (disturb_state) disturb(0, 0);
3050 /* Recalculate bonuses */
3051 p_ptr->update |= (PU_BONUS);
3053 /* Recalculate hitpoints */
3054 p_ptr->update |= (PU_HP);
3065 * Set a temporary elemental brand. Clear all other brands. Print status
3068 bool set_ele_attack(u32b attack_type, int v)
3070 /* Hack -- Force good values */
3071 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3073 /* Clear all elemental attacks (only one is allowed at a time). */
3074 if ((p_ptr->special_attack & (ATTACK_ACID)) && (attack_type != ATTACK_ACID))
3076 p_ptr->special_attack &= ~(ATTACK_ACID);
3078 msg_print("»À¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
3080 msg_print("Your temporary acidic brand fades away.");
3083 if ((p_ptr->special_attack & (ATTACK_ELEC)) && (attack_type != ATTACK_ELEC))
3085 p_ptr->special_attack &= ~(ATTACK_ELEC);
3087 msg_print("ÅÅ·â¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
3089 msg_print("Your temporary electrical brand fades away.");
3092 if ((p_ptr->special_attack & (ATTACK_FIRE)) && (attack_type != ATTACK_FIRE))
3094 p_ptr->special_attack &= ~(ATTACK_FIRE);
3096 msg_print("²Ð±ê¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
3098 msg_print("Your temporary fiery brand fades away.");
3101 if ((p_ptr->special_attack & (ATTACK_COLD)) && (attack_type != ATTACK_COLD))
3103 p_ptr->special_attack &= ~(ATTACK_COLD);
3105 msg_print("Î䵤¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
3107 msg_print("Your temporary frost brand fades away.");
3110 if ((p_ptr->special_attack & (ATTACK_POIS)) && (attack_type != ATTACK_POIS))
3112 p_ptr->special_attack &= ~(ATTACK_POIS);
3114 msg_print("ÆǤǹ¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
3116 msg_print("Your temporary poison brand fades away.");
3120 if ((v) && (attack_type))
3122 /* Set attack type. */
3123 p_ptr->special_attack |= (attack_type);
3126 p_ptr->ele_attack = v;
3130 msg_format("%s¤Ç¹¶·â¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡ª",
3131 ((attack_type == ATTACK_ACID) ? "»À" :
3132 ((attack_type == ATTACK_ELEC) ? "ÅÅ·â" :
3133 ((attack_type == ATTACK_FIRE) ? "²Ð±ê" :
3134 ((attack_type == ATTACK_COLD) ? "Î䵤" :
3135 ((attack_type == ATTACK_POIS) ? "ÆÇ" :
3138 msg_format("For a while, the blows you deal will %s",
3139 ((attack_type == ATTACK_ACID) ? "melt with acid!" :
3140 ((attack_type == ATTACK_ELEC) ? "shock your foes!" :
3141 ((attack_type == ATTACK_FIRE) ? "burn with fire!" :
3142 ((attack_type == ATTACK_COLD) ? "chill to the bone!" :
3143 ((attack_type == ATTACK_POIS) ? "poison your enemies!" :
3144 "do nothing special."))))));
3149 if (disturb_state) disturb(0, 0);
3151 /* Redraw status bar */
3152 p_ptr->redraw |= (PR_STATUS);
3154 p_ptr->update |= (PU_BONUS);
3164 * Set a temporary elemental brand. Clear all other brands. Print status
3167 bool set_ele_immune(u32b immune_type, int v)
3169 /* Hack -- Force good values */
3170 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3172 /* Clear all elemental attacks (only one is allowed at a time). */
3173 if ((p_ptr->special_defense & (DEFENSE_ACID)) && (immune_type != DEFENSE_ACID))
3175 p_ptr->special_defense &= ~(DEFENSE_ACID);
3177 msg_print("»À¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3179 msg_print("You are no longer immune to acid.");
3182 if ((p_ptr->special_defense & (DEFENSE_ELEC)) && (immune_type != DEFENSE_ELEC))
3184 p_ptr->special_defense &= ~(DEFENSE_ELEC);
3186 msg_print("ÅÅ·â¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3188 msg_print("You are no longer immune to electricity.");
3191 if ((p_ptr->special_defense & (DEFENSE_FIRE)) && (immune_type != DEFENSE_FIRE))
3193 p_ptr->special_defense &= ~(DEFENSE_FIRE);
3195 msg_print("²Ð±ê¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3197 msg_print("You are no longer immune to fire.");
3200 if ((p_ptr->special_defense & (DEFENSE_COLD)) && (immune_type != DEFENSE_COLD))
3202 p_ptr->special_defense &= ~(DEFENSE_COLD);
3204 msg_print("Î䵤¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3206 msg_print("You are no longer immune to cold.");
3209 if ((p_ptr->special_defense & (DEFENSE_POIS)) && (immune_type != DEFENSE_POIS))
3211 p_ptr->special_defense &= ~(DEFENSE_POIS);
3213 msg_print("ÆǤι¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3215 msg_print("You are no longer immune to poison.");
3219 if ((v) && (immune_type))
3221 /* Set attack type. */
3222 p_ptr->special_defense |= (immune_type);
3225 p_ptr->ele_immune = v;
3229 msg_format("%s¤Î¹¶·â¤ò¼õ¤±¤Ä¤±¤Ê¤¯¤Ê¤Ã¤¿¡ª",
3230 ((immune_type == DEFENSE_ACID) ? "»À" :
3231 ((immune_type == DEFENSE_ELEC) ? "ÅÅ·â" :
3232 ((immune_type == DEFENSE_FIRE) ? "²Ð±ê" :
3233 ((immune_type == DEFENSE_COLD) ? "Î䵤" :
3234 ((immune_type == DEFENSE_POIS) ? "ÆÇ" :
3237 msg_format("For a while, You are immune to %s",
3238 ((immune_type == DEFENSE_ACID) ? "acid!" :
3239 ((immune_type == DEFENSE_ELEC) ? "electricity!" :
3240 ((immune_type == DEFENSE_FIRE) ? "fire!" :
3241 ((immune_type == DEFENSE_COLD) ? "cold!" :
3242 ((immune_type == DEFENSE_POIS) ? "poison!" :
3243 "do nothing special."))))));
3248 if (disturb_state) disturb(0, 0);
3250 /* Redraw status bar */
3251 p_ptr->redraw |= (PR_STATUS);
3253 p_ptr->update |= (PU_BONUS);
3263 * Set "p_ptr->oppose_acid", notice observable changes
3265 bool set_oppose_acid(int v, bool do_dec)
3267 bool notice = FALSE;
3269 /* Hack -- Force good values */
3270 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3272 if (p_ptr->is_dead) return FALSE;
3277 if (p_ptr->oppose_acid && !do_dec)
3279 if (p_ptr->oppose_acid > v) return FALSE;
3281 else if (!IS_OPPOSE_ACID())
3284 msg_print("»À¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3286 msg_print("You feel resistant to acid!");
3296 if (p_ptr->oppose_acid && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3299 msg_print("»À¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3301 msg_print("You feel less resistant to acid.");
3309 p_ptr->oppose_acid = v;
3311 /* Nothing to notice */
3312 if (!notice) return (FALSE);
3314 /* Redraw status bar */
3315 p_ptr->redraw |= (PR_STATUS);
3318 if (disturb_state) disturb(0, 0);
3329 * Set "p_ptr->oppose_elec", notice observable changes
3331 bool set_oppose_elec(int v, bool do_dec)
3333 bool notice = FALSE;
3335 /* Hack -- Force good values */
3336 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3338 if (p_ptr->is_dead) return FALSE;
3343 if (p_ptr->oppose_elec && !do_dec)
3345 if (p_ptr->oppose_elec > v) return FALSE;
3347 else if (!IS_OPPOSE_ELEC())
3350 msg_print("ÅÅ·â¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3352 msg_print("You feel resistant to electricity!");
3362 if (p_ptr->oppose_elec && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3365 msg_print("ÅÅ·â¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3367 msg_print("You feel less resistant to electricity.");
3375 p_ptr->oppose_elec = v;
3377 /* Nothing to notice */
3378 if (!notice) return (FALSE);
3380 /* Redraw status bar */
3381 p_ptr->redraw |= (PR_STATUS);
3384 if (disturb_state) disturb(0, 0);
3395 * Set "p_ptr->oppose_fire", notice observable changes
3397 bool set_oppose_fire(int v, bool do_dec)
3399 bool notice = FALSE;
3401 /* Hack -- Force good values */
3402 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3404 if (p_ptr->is_dead) return FALSE;
3406 if ((prace_is_(RACE_DEMON) && (p_ptr->lev > 44)) || (p_ptr->mimic_form == MIMIC_DEMON)) v = 1;
3410 if (p_ptr->oppose_fire && !do_dec)
3412 if (p_ptr->oppose_fire > v) return FALSE;
3414 else if (!IS_OPPOSE_FIRE())
3417 msg_print("²Ð¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3419 msg_print("You feel resistant to fire!");
3429 if (p_ptr->oppose_fire && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3432 msg_print("²Ð¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3434 msg_print("You feel less resistant to fire.");
3442 p_ptr->oppose_fire = v;
3444 /* Nothing to notice */
3445 if (!notice) return (FALSE);
3447 /* Redraw status bar */
3448 p_ptr->redraw |= (PR_STATUS);
3451 if (disturb_state) disturb(0, 0);
3462 * Set "p_ptr->oppose_cold", notice observable changes
3464 bool set_oppose_cold(int v, bool do_dec)
3466 bool notice = FALSE;
3468 /* Hack -- Force good values */
3469 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3471 if (p_ptr->is_dead) return FALSE;
3476 if (p_ptr->oppose_cold && !do_dec)
3478 if (p_ptr->oppose_cold > v) return FALSE;
3480 else if (!IS_OPPOSE_COLD())
3483 msg_print("Î䵤¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3485 msg_print("You feel resistant to cold!");
3495 if (p_ptr->oppose_cold && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3498 msg_print("Î䵤¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3500 msg_print("You feel less resistant to cold.");
3508 p_ptr->oppose_cold = v;
3510 /* Nothing to notice */
3511 if (!notice) return (FALSE);
3513 /* Redraw status bar */
3514 p_ptr->redraw |= (PR_STATUS);
3517 if (disturb_state) disturb(0, 0);
3528 * Set "p_ptr->oppose_pois", notice observable changes
3530 bool set_oppose_pois(int v, bool do_dec)
3532 bool notice = FALSE;
3534 /* Hack -- Force good values */
3535 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3537 if ((p_ptr->pclass == CLASS_NINJA) && (p_ptr->lev > 44)) v = 1;
3538 if (p_ptr->is_dead) return FALSE;
3543 if (p_ptr->oppose_pois && !do_dec)
3545 if (p_ptr->oppose_pois > v) return FALSE;
3547 else if (!IS_OPPOSE_POIS())
3550 msg_print("ÆǤؤÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3552 msg_print("You feel resistant to poison!");
3562 if (p_ptr->oppose_pois && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3565 msg_print("ÆǤؤÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3567 msg_print("You feel less resistant to poison.");
3575 p_ptr->oppose_pois = v;
3577 /* Nothing to notice */
3578 if (!notice) return (FALSE);
3580 /* Redraw status bar */
3581 p_ptr->redraw |= (PR_STATUS);
3584 if (disturb_state) disturb(0, 0);
3595 * Set "p_ptr->stun", notice observable changes
3597 * Note the special code to only notice "range" changes.
3599 bool set_stun(int v)
3601 int old_aux, new_aux;
3602 bool notice = FALSE;
3605 /* Hack -- Force good values */
3606 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3608 if (p_ptr->is_dead) return FALSE;
3610 if (prace_is_(RACE_GOLEM) || ((p_ptr->pclass == CLASS_BERSERKER) && (p_ptr->lev > 34))) v = 0;
3613 if (p_ptr->stun > 100)
3619 else if (p_ptr->stun > 50)
3625 else if (p_ptr->stun > 0)
3661 if (new_aux > old_aux)
3663 /* Describe the state */
3669 msg_print("°Õ¼±¤¬¤â¤¦¤í¤¦¤È¤·¤Æ¤¤¿¡£");
3671 msg_print("You have been stunned.");
3679 msg_print("°Õ¼±¤¬¤Ò¤É¤¯¤â¤¦¤í¤¦¤È¤·¤Æ¤¤¿¡£");
3681 msg_print("You have been heavily stunned.");
3689 msg_print("Ƭ¤¬¥¯¥é¥¯¥é¤·¤Æ°Õ¼±¤¬±ó¤Î¤¤¤Æ¤¤¿¡£");
3691 msg_print("You have been knocked out.");
3697 if (randint1(1000) < v || one_in_(16))
3700 msg_print("³ä¤ì¤ë¤è¤¦¤ÊƬÄˤ¬¤¹¤ë¡£");
3702 msg_print("A vicious blow hits your head.");
3707 if (!p_ptr->sustain_int) (void)do_dec_stat(A_INT);
3708 if (!p_ptr->sustain_wis) (void)do_dec_stat(A_WIS);
3710 else if (one_in_(2))
3712 if (!p_ptr->sustain_int) (void)do_dec_stat(A_INT);
3716 if (!p_ptr->sustain_wis) (void)do_dec_stat(A_WIS);
3719 if (p_ptr->special_defense & KATA_MASK)
3722 msg_print("·¿¤¬Êø¤ì¤¿¡£");
3724 msg_print("Your posture gets loose.");
3726 p_ptr->special_defense &= ~(KATA_MASK);
3727 p_ptr->update |= (PU_BONUS);
3728 p_ptr->update |= (PU_MONSTERS);
3729 p_ptr->redraw |= (PR_STATE);
3730 p_ptr->redraw |= (PR_STATUS);
3731 p_ptr->action = ACTION_NONE;
3735 if (p_ptr->concent) reset_concentration(TRUE);
3738 if (hex_spelling_any()) stop_hex_spell_all();
3745 else if (new_aux < old_aux)
3747 /* Describe the state */
3753 msg_print("¤ä¤Ã¤ÈÛ¯Û°¾õÂÖ¤«¤é²óÉü¤·¤¿¡£");
3755 msg_print("You are no longer stunned.");
3758 if (disturb_state) disturb(0, 0);
3770 if (!notice) return (FALSE);
3773 if (disturb_state) disturb(0, 0);
3775 /* Recalculate bonuses */
3776 p_ptr->update |= (PU_BONUS);
3778 /* Redraw the "stun" */
3779 p_ptr->redraw |= (PR_STUN);
3790 * Set "p_ptr->cut", notice observable changes
3792 * Note the special code to only notice "range" changes.
3796 int old_aux, new_aux;
3797 bool notice = FALSE;
3799 /* Hack -- Force good values */
3800 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3802 if (p_ptr->is_dead) return FALSE;
3804 if ((p_ptr->prace == RACE_GOLEM ||
3805 p_ptr->prace == RACE_SKELETON ||
3806 p_ptr->prace == RACE_SPECTRE ||
3807 (p_ptr->prace == RACE_ZOMBIE && p_ptr->lev > 11)) &&
3812 if (p_ptr->cut > 1000)
3818 else if (p_ptr->cut > 200)
3824 else if (p_ptr->cut > 100)
3830 else if (p_ptr->cut > 50)
3836 else if (p_ptr->cut > 25)
3842 else if (p_ptr->cut > 10)
3848 else if (p_ptr->cut > 0)
3908 if (new_aux > old_aux)
3910 /* Describe the state */
3916 msg_print("¤«¤¹¤ê½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3918 msg_print("You have been given a graze.");
3926 msg_print("·Ú¤¤½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3928 msg_print("You have been given a light cut.");
3936 msg_print("¤Ò¤É¤¤½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3938 msg_print("You have been given a bad cut.");
3946 msg_print("ÂçÊѤʽý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3948 msg_print("You have been given a nasty cut.");
3956 msg_print("½ÅÂç¤Ê½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3958 msg_print("You have been given a severe cut.");
3966 msg_print("¤Ò¤É¤¤¿¼¼ê¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3968 msg_print("You have been given a deep gash.");
3976 msg_print("Ã×̿Ū¤Ê½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3978 msg_print("You have been given a mortal wound.");
3987 if (randint1(1000) < v || one_in_(16))
3989 if (!p_ptr->sustain_chr)
3992 msg_print("¤Ò¤É¤¤½ýÀפ¬»Ä¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3994 msg_print("You have been horribly scarred.");
4004 else if (new_aux < old_aux)
4006 /* Describe the state */
4012 msg_format("¤ä¤Ã¤È%s¡£", p_ptr->prace == RACE_ANDROID ? "²ø²æ¤¬Ä¾¤Ã¤¿" : "½Ð·ì¤¬»ß¤Þ¤Ã¤¿");
4014 msg_print("You are no longer bleeding.");
4017 if (disturb_state) disturb(0, 0);
4029 if (!notice) return (FALSE);
4032 if (disturb_state) disturb(0, 0);
4034 /* Recalculate bonuses */
4035 p_ptr->update |= (PU_BONUS);
4037 /* Redraw the "cut" */
4038 p_ptr->redraw |= (PR_CUT);
4049 * Set "p_ptr->food", notice observable changes
4051 * The "p_ptr->food" variable can get as large as 20000, allowing the
4052 * addition of the most "filling" item, Elvish Waybread, which adds
4053 * 7500 food units, without overflowing the 32767 maximum limit.
4055 * Perhaps we should disturb the player with various messages,
4056 * especially messages about hunger status changes. XXX XXX XXX
4058 * Digestion of food is handled in "dungeon.c", in which, normally,
4059 * the player digests about 20 food units per 100 game turns, more
4060 * when "fast", more when "regenerating", less with "slow digestion",
4061 * but when the player is "gorged", he digests 100 food units per 10
4062 * game turns, or a full 1000 food units per 100 game turns.
4064 * Note that the player's speed is reduced by 10 units while gorged,
4065 * so if the player eats a single food ration (5000 food units) when
4066 * full (15000 food units), he will be gorged for (5000/100)*10 = 500
4067 * game turns, or 500/(100/5) = 25 player turns (if nothing else is
4068 * affecting the player speed).
4070 bool set_food(int v)
4072 int old_aux, new_aux;
4074 bool notice = FALSE;
4076 /* Hack -- Force good values */
4077 v = (v > 20000) ? 20000 : (v < 0) ? 0 : v;
4079 /* Fainting / Starving */
4080 if (p_ptr->food < PY_FOOD_FAINT)
4086 else if (p_ptr->food < PY_FOOD_WEAK)
4092 else if (p_ptr->food < PY_FOOD_ALERT)
4098 else if (p_ptr->food < PY_FOOD_FULL)
4104 else if (p_ptr->food < PY_FOOD_MAX)
4115 /* Fainting / Starving */
4116 if (v < PY_FOOD_FAINT)
4122 else if (v < PY_FOOD_WEAK)
4128 else if (v < PY_FOOD_ALERT)
4134 else if (v < PY_FOOD_FULL)
4140 else if (v < PY_FOOD_MAX)
4151 if (old_aux < 1 && new_aux > 0)
4152 chg_virtue(V_PATIENCE, 2);
4153 else if (old_aux < 3 && (old_aux != new_aux))
4154 chg_virtue(V_PATIENCE, 1);
4156 chg_virtue(V_TEMPERANCE, 1);
4158 chg_virtue(V_TEMPERANCE, -1);
4161 if (new_aux > old_aux)
4163 /* Describe the state */
4169 msg_print("¤Þ¤À¶õÊ¢¤ÇÅݤ줽¤¦¤À¡£");
4171 msg_print("You are still weak.");
4179 msg_print("¤Þ¤À¶õÊ¢¤À¡£");
4181 msg_print("You are still hungry.");
4189 msg_print("¶õÊ¢´¶¤¬¤ª¤µ¤Þ¤Ã¤¿¡£");
4191 msg_print("You are no longer hungry.");
4199 msg_print("ËþÊ¢¤À¡ª");
4201 msg_print("You are full!");
4209 msg_print("¿©¤Ù²á¤®¤À¡ª");
4211 msg_print("You have gorged yourself!");
4213 chg_virtue(V_HARMONY, -1);
4214 chg_virtue(V_PATIENCE, -1);
4215 chg_virtue(V_TEMPERANCE, -2);
4225 else if (new_aux < old_aux)
4227 /* Describe the state */
4230 /* Fainting / Starving */
4233 msg_print("¤¢¤Þ¤ê¤Ë¤â¶õÊ¢¤Çµ¤¤ò¼º¤Ã¤Æ¤·¤Þ¤Ã¤¿¡ª");
4235 msg_print("You are getting faint from hunger!");
4243 msg_print("¤ªÊ¢¤¬¶õ¤¤¤ÆÅݤ줽¤¦¤À¡£");
4245 msg_print("You are getting weak from hunger!");
4253 msg_print("¤ªÊ¢¤¬¶õ¤¤¤Æ¤¤¿¡£");
4255 msg_print("You are getting hungry.");
4263 msg_print("ËþÊ¢´¶¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
4265 msg_print("You are no longer full.");
4273 msg_print("¤ä¤Ã¤È¤ªÊ¢¤¬¤¤Ä¤¯¤Ê¤¯¤Ê¤Ã¤¿¡£");
4275 msg_print("You are no longer gorged.");
4281 if (p_ptr->wild_mode && (new_aux < 2))
4293 /* Nothing to notice */
4294 if (!notice) return (FALSE);
4297 if (disturb_state) disturb(0, 0);
4299 /* Recalculate bonuses */
4300 p_ptr->update |= (PU_BONUS);
4303 p_ptr->redraw |= (PR_HUNGER);
4313 * Increases a stat by one randomized level -RAK-
4315 * Note that this function (used by stat potions) now restores
4316 * the stat BEFORE increasing it.
4318 bool inc_stat(int stat)
4322 /* Then augment the current/max stat */
4323 value = p_ptr->stat_cur[stat];
4325 /* Cannot go above 18/100 */
4326 if (value < p_ptr->stat_max_max[stat])
4328 /* Gain one (sometimes two) points */
4331 gain = ((randint0(100) < 75) ? 1 : 2);
4335 /* Gain 1/6 to 1/3 of distance to 18/100 */
4336 else if (value < (p_ptr->stat_max_max[stat]-2))
4338 /* Approximate gain value */
4339 gain = (((p_ptr->stat_max_max[stat]) - value) / 2 + 3) / 2;
4342 if (gain < 1) gain = 1;
4344 /* Apply the bonus */
4345 value += randint1(gain) + gain / 2;
4348 if (value > (p_ptr->stat_max_max[stat]-1)) value = p_ptr->stat_max_max[stat]-1;
4351 /* Gain one point at a time */
4357 /* Save the new value */
4358 p_ptr->stat_cur[stat] = value;
4360 /* Bring up the maximum too */
4361 if (value > p_ptr->stat_max[stat])
4363 p_ptr->stat_max[stat] = value;
4366 /* Recalculate bonuses */
4367 p_ptr->update |= (PU_BONUS);
4373 /* Nothing to gain */
4380 * Decreases a stat by an amount indended to vary from 0 to 100 percent.
4382 * Amount could be a little higher in extreme cases to mangle very high
4383 * stats from massive assaults. -CWS
4385 * Note that "permanent" means that the *given* amount is permanent,
4386 * not that the new value becomes permanent. This may not work exactly
4387 * as expected, due to "weirdness" in the algorithm, but in general,
4388 * if your stat is already drained, the "max" value will not drop all
4389 * the way down to the "cur" value.
4391 bool dec_stat(int stat, int amount, int permanent)
4393 int cur, max, loss, same, res = FALSE;
4396 /* Acquire current value */
4397 cur = p_ptr->stat_cur[stat];
4398 max = p_ptr->stat_max[stat];
4400 /* Note when the values are identical */
4401 same = (cur == max);
4403 /* Damage "current" value */
4406 /* Handle "low" values */
4409 if (amount > 90) cur--;
4410 if (amount > 50) cur--;
4411 if (amount > 20) cur--;
4415 /* Handle "high" values */
4418 /* Hack -- Decrement by a random amount between one-quarter */
4419 /* and one-half of the stat bonus times the percentage, with a */
4420 /* minimum damage of half the percentage. -CWS */
4421 loss = (((cur-18) / 2 + 1) / 2 + 1);
4424 if (loss < 1) loss = 1;
4426 /* Randomize the loss */
4427 loss = ((randint1(loss) + loss) * amount) / 100;
4430 if (loss < amount/2) loss = amount/2;
4432 /* Lose some points */
4435 /* Hack -- Only reduce stat to 17 sometimes */
4436 if (cur < 18) cur = (amount <= 20) ? 18 : 17;
4439 /* Prevent illegal values */
4440 if (cur < 3) cur = 3;
4442 /* Something happened */
4443 if (cur != p_ptr->stat_cur[stat]) res = TRUE;
4446 /* Damage "max" value */
4447 if (permanent && (max > 3))
4449 chg_virtue(V_SACRIFICE, 1);
4450 if (stat == A_WIS || stat == A_INT)
4451 chg_virtue(V_ENLIGHTEN, -2);
4453 /* Handle "low" values */
4456 if (amount > 90) max--;
4457 if (amount > 50) max--;
4458 if (amount > 20) max--;
4462 /* Handle "high" values */
4465 /* Hack -- Decrement by a random amount between one-quarter */
4466 /* and one-half of the stat bonus times the percentage, with a */
4467 /* minimum damage of half the percentage. -CWS */
4468 loss = (((max-18) / 2 + 1) / 2 + 1);
4469 loss = ((randint1(loss) + loss) * amount) / 100;
4470 if (loss < amount/2) loss = amount/2;
4472 /* Lose some points */
4475 /* Hack -- Only reduce stat to 17 sometimes */
4476 if (max < 18) max = (amount <= 20) ? 18 : 17;
4479 /* Hack -- keep it clean */
4480 if (same || (max < cur)) max = cur;
4482 /* Something happened */
4483 if (max != p_ptr->stat_max[stat]) res = TRUE;
4489 /* Actually set the stat to its new value. */
4490 p_ptr->stat_cur[stat] = cur;
4491 p_ptr->stat_max[stat] = max;
4493 /* Redisplay the stats later */
4494 p_ptr->redraw |= (PR_STATS);
4496 /* Recalculate bonuses */
4497 p_ptr->update |= (PU_BONUS);
4506 * Restore a stat. Return TRUE only if this actually makes a difference.
4508 bool res_stat(int stat)
4510 /* Restore if needed */
4511 if (p_ptr->stat_cur[stat] != p_ptr->stat_max[stat])
4514 p_ptr->stat_cur[stat] = p_ptr->stat_max[stat];
4516 /* Recalculate bonuses */
4517 p_ptr->update |= (PU_BONUS);
4519 /* Redisplay the stats later */
4520 p_ptr->redraw |= (PR_STATS);
4526 /* Nothing to restore */
4532 * Increase players hit points, notice effects
4534 bool hp_player(int num)
4537 vir = virtue_number(V_VITALITY);
4540 num = num * (p_ptr->virtues[vir - 1] + 1250) / 1250;
4542 /* Healing needed */
4543 if (p_ptr->chp < p_ptr->mhp)
4545 if ((num > 0) && (p_ptr->chp < (p_ptr->mhp/3)))
4546 chg_virtue(V_TEMPERANCE, 1);
4547 /* Gain hitpoints */
4550 /* Enforce maximum */
4551 if (p_ptr->chp >= p_ptr->mhp)
4553 p_ptr->chp = p_ptr->mhp;
4554 p_ptr->chp_frac = 0;
4558 p_ptr->redraw |= (PR_HP);
4561 p_ptr->window |= (PW_PLAYER);
4567 msg_print("¾¯¤·µ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4569 msg_print("You feel a little better.");
4578 msg_print("µ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4580 msg_print("You feel better.");
4589 msg_print("¤È¤Æ¤âµ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4591 msg_print("You feel much better.");
4600 msg_print("¤Ò¤¸¤ç¤¦¤Ëµ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4602 msg_print("You feel very good.");
4617 * Array of stat "descriptions"
4619 static cptr desc_stat_pos[] =
4661 * Array of stat "descriptions"
4663 static cptr desc_stat_neg[] =
4687 bool do_dec_stat(int stat)
4691 /* Access the "sustain" */
4694 case A_STR: if (p_ptr->sustain_str) sust = TRUE; break;
4695 case A_INT: if (p_ptr->sustain_int) sust = TRUE; break;
4696 case A_WIS: if (p_ptr->sustain_wis) sust = TRUE; break;
4697 case A_DEX: if (p_ptr->sustain_dex) sust = TRUE; break;
4698 case A_CON: if (p_ptr->sustain_con) sust = TRUE; break;
4699 case A_CHR: if (p_ptr->sustain_chr) sust = TRUE; break;
4703 if (sust && (!ironman_nightmare || randint0(13)))
4707 msg_format("%s¤Ê¤Ã¤¿µ¤¤¬¤·¤¿¤¬¡¢¤¹¤°¤Ë¸µ¤ËÌá¤Ã¤¿¡£",
4709 msg_format("You feel %s for a moment, but the feeling passes.",
4712 desc_stat_neg[stat]);
4718 /* Attempt to reduce the stat */
4719 if (dec_stat(stat, 10, (ironman_nightmare && !randint0(13))))
4723 msg_format("¤Ò¤É¤¯%s¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£", desc_stat_neg[stat]);
4725 msg_format("You feel very %s.", desc_stat_neg[stat]);
4733 /* Nothing obvious */
4739 * Restore lost "points" in a stat
4741 bool do_res_stat(int stat)
4743 /* Attempt to increase */
4748 msg_format("¸µÄ̤ê¤Ë%s¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£", desc_stat_pos[stat]);
4750 msg_format("You feel less %s.", desc_stat_neg[stat]);
4758 /* Nothing obvious */
4764 * Gain a "point" in a stat
4766 bool do_inc_stat(int stat)
4770 /* Restore strength */
4771 res = res_stat(stat);
4773 /* Attempt to increase */
4778 chg_virtue(V_ENLIGHTEN, 1);
4779 chg_virtue(V_FAITH, 1);
4781 else if (stat == A_INT)
4783 chg_virtue(V_KNOWLEDGE, 1);
4784 chg_virtue(V_ENLIGHTEN, 1);
4786 else if (stat == A_CON)
4787 chg_virtue(V_VITALITY, 1);
4791 msg_format("¥ï¡¼¥ª¡ª¤È¤Æ¤â%s¤Ê¤Ã¤¿¡ª", desc_stat_pos[stat]);
4793 msg_format("Wow! You feel very %s!", desc_stat_pos[stat]);
4801 /* Restoration worked */
4806 msg_format("¸µÄ̤ê¤Ë%s¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£", desc_stat_pos[stat]);
4808 msg_format("You feel less %s.", desc_stat_neg[stat]);
4816 /* Nothing obvious */
4822 * Restores any drained experience
4824 bool restore_level(void)
4826 /* Restore experience */
4827 if (p_ptr->exp < p_ptr->max_exp)
4831 msg_print("À¸Ì¿ÎϤ¬Ìá¤Ã¤Æ¤¤¿µ¤¤¬¤¹¤ë¡£");
4833 msg_print("You feel your life energies returning.");
4837 /* Restore the experience */
4838 p_ptr->exp = p_ptr->max_exp;
4840 /* Check the experience */
4855 bool lose_all_info(void)
4859 chg_virtue(V_KNOWLEDGE, -5);
4860 chg_virtue(V_ENLIGHTEN, -5);
4862 /* Forget info about objects */
4863 for (i = 0; i < INVEN_TOTAL; i++)
4865 object_type *o_ptr = &inventory[i];
4867 /* Skip non-objects */
4868 if (!o_ptr->k_idx) continue;
4870 /* Allow "protection" by the MENTAL flag */
4871 if (o_ptr->ident & (IDENT_MENTAL)) continue;
4873 /* Remove "default inscriptions" */
4874 o_ptr->feeling = FEEL_NONE;
4876 /* Hack -- Clear the "empty" flag */
4877 o_ptr->ident &= ~(IDENT_EMPTY);
4879 /* Hack -- Clear the "known" flag */
4880 o_ptr->ident &= ~(IDENT_KNOWN);
4882 /* Hack -- Clear the "felt" flag */
4883 o_ptr->ident &= ~(IDENT_SENSE);
4886 /* Recalculate bonuses */
4887 p_ptr->update |= (PU_BONUS);
4889 /* Combine / Reorder the pack (later) */
4890 p_ptr->notice |= (PN_COMBINE | PN_REORDER);
4893 p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
4895 /* Mega-Hack -- Forget the map */
4903 void do_poly_wounds(void)
4905 /* Changed to always provide at least _some_ healing */
4906 s16b wounds = p_ptr->cut;
4907 s16b hit_p = (p_ptr->mhp - p_ptr->chp);
4908 s16b change = damroll(p_ptr->lev, 5);
4909 bool Nasty_effect = one_in_(5);
4911 if (!(wounds || hit_p || Nasty_effect)) return;
4914 msg_print("½ý¤¬¤è¤ê·Ú¤¤¤â¤Î¤ËÊѲ½¤·¤¿¡£");
4916 msg_print("Your wounds are polymorphed into less serious ones.");
4923 msg_print("¿·¤¿¤Ê½ý¤¬¤Ç¤¤¿¡ª");
4924 take_hit(DAMAGE_LOSELIFE, change / 2, "ÊѲ½¤·¤¿½ý", -1);
4926 msg_print("A new wound was created!");
4927 take_hit(DAMAGE_LOSELIFE, change / 2, "a polymorphed wound", -1);
4934 set_cut(p_ptr->cut - (change / 2));
4940 * Change player race
4942 void change_race(int new_race, cptr effect_msg)
4944 cptr title = race_info[new_race].title;
4945 int old_race = p_ptr->prace;
4948 msg_format("¤¢¤Ê¤¿¤Ï%s%s¤ËÊѲ½¤·¤¿¡ª", effect_msg, title);
4950 msg_format("You turn into %s %s%s!", (!effect_msg[0] && is_a_vowel(title[0]) ? "an" : "a"), effect_msg, title);
4953 chg_virtue(V_CHANCE, 2);
4955 if (p_ptr->prace < 32)
4957 p_ptr->old_race1 |= 1L << p_ptr->prace;
4961 p_ptr->old_race2 |= 1L << (p_ptr->prace-32);
4963 p_ptr->prace = new_race;
4964 rp_ptr = &race_info[p_ptr->prace];
4966 /* Experience factor */
4967 p_ptr->expfact = rp_ptr->r_exp + cp_ptr->c_exp;
4970 * The speed bonus of Klackons and Sprites are disabled
4971 * and the experience penalty is decreased.
4973 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)))
4974 p_ptr->expfact -= 15;
4976 /* Get character's height and weight */
4977 get_height_weight();
4980 if (p_ptr->pclass == CLASS_SORCERER)
4981 p_ptr->hitdie = rp_ptr->r_mhp/2 + cp_ptr->c_mhp + ap_ptr->a_mhp;
4983 p_ptr->hitdie = rp_ptr->r_mhp + cp_ptr->c_mhp + ap_ptr->a_mhp;
4985 do_cmd_rerate(FALSE);
4987 /* The experience level may be modified */
4990 p_ptr->redraw |= (PR_BASIC);
4992 p_ptr->update |= (PU_BONUS);
4996 /* Load an autopick preference file */
4997 if (old_race != p_ptr->prace) autopick_load_pref(FALSE);
4999 /* Player's graphic tile may change */
5004 void do_poly_self(void)
5006 int power = p_ptr->lev;
5009 msg_print("¤¢¤Ê¤¿¤ÏÊѲ½¤Îˬ¤ì¤ò´¶¤¸¤¿...");
5011 msg_print("You feel a change coming over you...");
5014 chg_virtue(V_CHANCE, 1);
5016 if ((power > randint0(20)) && one_in_(3) && (p_ptr->prace != RACE_ANDROID))
5018 char effect_msg[80] = "";
5021 /* Some form of racial polymorph... */
5024 if ((power > randint0(5)) && one_in_(4))
5029 if (p_ptr->psex == SEX_MALE)
5031 p_ptr->psex = SEX_FEMALE;
5032 sp_ptr = &sex_info[p_ptr->psex];
5034 sprintf(effect_msg, "½÷À¤Î");
5036 sprintf(effect_msg, "female ");
5042 p_ptr->psex = SEX_MALE;
5043 sp_ptr = &sex_info[p_ptr->psex];
5045 sprintf(effect_msg, "ÃËÀ¤Î");
5047 sprintf(effect_msg, "male ");
5053 if ((power > randint0(30)) && one_in_(5))
5057 /* Harmful deformity */
5064 (void)dec_stat(tmp, randint1(6) + 6, one_in_(3));
5070 /* Deformities are discriminated against! */
5071 (void)dec_stat(A_CHR, randint1(6), TRUE);
5077 sprintf(tmp_msg,"%s",effect_msg);
5078 sprintf(effect_msg,"´ñ·Á¤Î%s",tmp_msg);
5080 sprintf(tmp_msg,"%s ",effect_msg);
5081 sprintf(effect_msg,"deformed %s ",tmp_msg);
5088 sprintf(effect_msg,"´ñ·Á¤Î");
5090 sprintf(effect_msg,"deformed ");
5096 while ((power > randint0(20)) && one_in_(10))
5098 /* Polymorph into a less mutated form */
5101 if (!lose_mutation(0))
5103 msg_print("´ñ̯¤Ê¤¯¤é¤¤ÉáÄ̤ˤʤ俵¤¤¬¤¹¤ë¡£");
5105 msg_print("You feel oddly normal.");
5112 new_race = randint0(MAX_RACES);
5114 while ((new_race == p_ptr->prace) || (new_race == RACE_ANDROID));
5116 change_race(new_race, effect_msg);
5119 if ((power > randint0(30)) && one_in_(6))
5127 msg_format("%s¤Î¹½À®¤¬ÊѲ½¤·¤¿¡ª", p_ptr->prace == RACE_ANDROID ? "µ¡³£" : "Æâ¡");
5129 msg_print("Your internal organs are rearranged!");
5134 (void)dec_stat(tmp, randint1(6) + 6, one_in_(3));
5140 msg_print("¸½ºß¤Î»Ñ¤ÇÀ¸¤¤Æ¤¤¤¯¤Î¤Ïº¤Æñ¤Ê¤è¤¦¤À¡ª");
5141 take_hit(DAMAGE_LOSELIFE, damroll(randint1(10), p_ptr->lev), "Ã×̿Ū¤ÊÆÍÁ³ÊÑ°Û", -1);
5143 msg_print("You find living difficult in your present form!");
5144 take_hit(DAMAGE_LOSELIFE, damroll(randint1(10), p_ptr->lev), "a lethal mutation", -1);
5151 if ((power > randint0(20)) && one_in_(4))
5156 do_cmd_rerate(FALSE);
5159 while ((power > randint0(15)) && one_in_(3))
5162 (void)gain_random_mutation(0);
5165 if (power > randint0(5))
5171 /* Note: earlier deductions may have left power < 0 already. */
5181 * Decreases players hit points and sets death flag if necessary
5183 * XXX XXX XXX Invulnerability needs to be changed into a "shield"
5185 * XXX XXX XXX Hack -- this function allows the user to save (or quit)
5186 * the game when he dies, since the "You die." message is shown before
5187 * setting the player to "dead".
5190 int take_hit(int damage_type, int damage, cptr hit_from, int monspell)
5192 int old_chp = p_ptr->chp;
5194 char death_message[1024];
5197 int warning = (p_ptr->mhp * hitpoint_warn / 10);
5200 if (p_ptr->is_dead) return 0;
5202 if (p_ptr->sutemi) damage *= 2;
5203 if (p_ptr->special_defense & KATA_IAI) damage += (damage + 4) / 5;
5205 if (easy_band) damage = (damage+1)/2;
5207 if (damage_type != DAMAGE_USELIFE)
5217 if (monspell >= 0) learn_spell(monspell);
5219 /* Mega-Hack -- Apply "invulnerability" */
5220 if ((damage_type != DAMAGE_USELIFE) && (damage_type != DAMAGE_LOSELIFE))
5222 if (IS_INVULN() && (damage < 9000))
5224 if (damage_type == DAMAGE_FORCE)
5227 msg_print("¥Ð¥ê¥¢¤¬ÀÚ¤êÎö¤«¤ì¤¿¡ª");
5229 msg_print("The attack cuts your shield of invulnerability open!");
5232 else if (one_in_(PENETRATE_INVULNERABILITY))
5235 msg_print("̵Ũ¤Î¥Ð¥ê¥¢¤òÇˤäƹ¶·â¤µ¤ì¤¿¡ª");
5237 msg_print("The attack penetrates your shield of invulnerability!");
5246 if (CHECK_MULTISHADOW())
5248 if (damage_type == DAMAGE_FORCE)
5251 msg_print("¸¸±Æ¤â¤í¤È¤âÂΤ¬ÀÚ¤êÎö¤«¤ì¤¿¡ª");
5253 msg_print("The attack hits Shadow together with you!");
5256 else if (damage_type == DAMAGE_ATTACK)
5259 msg_print("¹¶·â¤Ï¸¸±Æ¤ËÌ¿Ã椷¡¢¤¢¤Ê¤¿¤Ë¤ÏÆϤ«¤Ê¤«¤Ã¤¿¡£");
5261 msg_print("The attack hits Shadow, you are unharmed!");
5267 if (p_ptr->wraith_form)
5269 if (damage_type == DAMAGE_FORCE)
5272 msg_print("Ⱦʪ¼Á¤ÎÂΤ¬ÀÚ¤êÎö¤«¤ì¤¿¡ª");
5274 msg_print("The attack cuts through your ethereal body!");
5280 if ((damage == 0) && one_in_(2)) damage = 1;
5284 if (p_ptr->special_defense & KATA_MUSOU)
5287 if ((damage == 0) && one_in_(2)) damage = 1;
5289 } /* not if LOSELIFE USELIFE */
5291 /* Hurt the player */
5292 p_ptr->chp -= damage;
5293 if(damage_type == DAMAGE_GENO && p_ptr->chp < 0)
5295 damage += p_ptr->chp;
5299 /* Display the hitpoints */
5300 p_ptr->redraw |= (PR_HP);
5303 p_ptr->window |= (PW_PLAYER);
5305 if (damage_type != DAMAGE_GENO && p_ptr->chp == 0)
5307 chg_virtue(V_SACRIFICE, 1);
5308 chg_virtue(V_CHANCE, 2);
5314 bool android = (p_ptr->prace == RACE_ANDROID ? TRUE : FALSE);
5316 #ifdef JP /* »à¤ó¤À»þ¤Ë¶¯À©½ªÎ»¤·¤Æ»à¤ò²óÈò¤Ç¤¤Ê¤¯¤·¤Æ¤ß¤¿ by Habu */
5318 if(!save_player()) msg_print("¥»¡¼¥Ö¼ºÇÔ¡ª");
5324 chg_virtue(V_SACRIFICE, 10);
5329 p_ptr->leaving = TRUE;
5332 p_ptr->is_dead = TRUE;
5334 if (p_ptr->inside_arena)
5336 cptr m_name = r_name+r_info[arena_info[p_ptr->arena_number].r_idx].name;
5338 msg_format("¤¢¤Ê¤¿¤Ï%s¤ÎÁ°¤ËÇÔ¤ìµî¤Ã¤¿¡£", m_name);
5340 msg_format("You are beaten by %s.", m_name);
5343 if (record_arena) do_cmd_write_nikki(NIKKI_ARENA, -1 - p_ptr->arena_number, m_name);
5347 int q_idx = quest_number(dun_level);
5348 bool seppuku = streq(hit_from, "Seppuku");
5349 bool winning_seppuku = p_ptr->total_winner && seppuku;
5352 /* Make screen dump */
5353 screen_dump = make_screen_dump();
5356 /* Note cause of death */
5359 strcpy(p_ptr->died_from, hit_from);
5361 if (!winning_seppuku) strcpy(p_ptr->died_from, "ÀÚÊ¢");
5368 sprintf(dummy, "%s%s%s", !p_ptr->paralyzed ? "" : p_ptr->free_act ? "ĦÁü¾õÂÖ¤Ç" : "Ëãáã¾õÂÖ¤Ç", p_ptr->image ? "¸¸³Ð¤ËÏĤó¤À" : "", hit_from);
5370 sprintf(dummy, "%s%s", hit_from, !p_ptr->paralyzed ? "" : " while helpless");
5372 my_strcpy(p_ptr->died_from, dummy, sizeof p_ptr->died_from);
5375 /* No longer a winner */
5376 p_ptr->total_winner = FALSE;
5378 if (winning_seppuku)
5381 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "¾¡Íø¤Î¸åÀÚÊ¢¤·¤¿¡£");
5383 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "did Seppuku after the winning.");
5390 if (p_ptr->inside_arena)
5392 strcpy(buf,"¥¢¥ê¡¼¥Ê");
5394 strcpy(buf,"in the Arena");
5396 else if (!dun_level)
5400 strcpy(buf,"on the surface");
5402 else if (q_idx && (is_fixed_quest_idx(q_idx) &&
5403 !((q_idx == QUEST_OBERON) || (q_idx == QUEST_SERPENT))))
5405 strcpy(buf,"¥¯¥¨¥¹¥È");
5407 strcpy(buf,"in a quest");
5411 sprintf(buf,"%d³¬", dun_level);
5413 sprintf(buf,"level %d", dun_level);
5417 sprintf(tmp, "%s¤Ç%s¤Ë»¦¤µ¤ì¤¿¡£", buf, p_ptr->died_from);
5419 sprintf(tmp, "killed by %s %s.", p_ptr->died_from, buf);
5421 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, tmp);
5425 do_cmd_write_nikki(NIKKI_GAMESTART, 1, "-------- ¥²¡¼¥à¥ª¡¼¥Ð¡¼ --------");
5427 do_cmd_write_nikki(NIKKI_GAMESTART, 1, "-------- Game Over --------");
5429 do_cmd_write_nikki(NIKKI_BUNSHOU, 1, "\n\n\n\n");
5434 if (get_check_strict("²èÌ̤òÊݸ¤·¤Þ¤¹¤«¡©", CHECK_NO_HISTORY))
5436 if (get_check_strict("Dump the screen? ", CHECK_NO_HISTORY))
5439 do_cmd_save_screen();
5444 /* Initialize "last message" buffer */
5445 if (p_ptr->last_message) string_free(p_ptr->last_message);
5446 p_ptr->last_message = NULL;
5448 /* Hack -- Note death */
5452 msg_format("¤¢¤Ê¤¿¤Ï%s¤Þ¤·¤¿¡£", android ? "²õ¤ì" : "»à¤Ë");
5454 msg_print(android ? "You are broken." : "You die.");
5461 if (winning_seppuku)
5464 get_rnd_line("seppuku_j.txt", 0, death_message);
5466 get_rnd_line("seppuku.txt", 0, death_message);
5472 get_rnd_line("death_j.txt", 0, death_message);
5474 get_rnd_line("death.txt", 0, death_message);
5481 while (!get_string(winning_seppuku ? "¼À¤¤Î¶ç: " : "ÃÇËöËâ¤Î¶«¤Ó: ", death_message, 1024)) ;
5483 while (!get_string("Last word: ", death_message, 1024)) ;
5487 while (winning_seppuku && !get_check_strict("¤è¤í¤·¤¤¤Ç¤¹¤«¡©", CHECK_NO_HISTORY));
5489 while (winning_seppuku && !get_check_strict("Are you sure? ", CHECK_NO_HISTORY));
5492 if (death_message[0] == '\0')
5495 strcpy(death_message, format("¤¢¤Ê¤¿¤Ï%s¤Þ¤·¤¿¡£", android ? "²õ¤ì" : "»à¤Ë"));
5497 strcpy(death_message, android ? "You are broken." : "You die.");
5500 else p_ptr->last_message = string_make(death_message);
5503 if (winning_seppuku)
5508 int msg_pos_x[9] = { 5, 7, 9, 12, 14, 17, 19, 21, 23};
5509 int msg_pos_y[9] = { 3, 4, 5, 4, 5, 4, 5, 6, 4};
5516 for (i = 0; i < 40; i++)
5517 Term_putstr(randint0(w / 2) * 2, randint0(h), 2, TERM_VIOLET, "¦Ô");
5519 str = death_message;
5520 if (strncmp(str, "¡Ö", 2) == 0) str += 2;
5522 str2 = my_strstr(str, "¡×");
5523 if (str2 != NULL) *str2 = '\0';
5528 str2 = my_strstr(str, " ");
5529 if (str2 == NULL) len = strlen(str);
5530 else len = str2 - str;
5534 Term_putstr_v(w * 3 / 4 - 2 - msg_pos_x[i] * 2, msg_pos_y[i], len,
5536 if (str2 == NULL) break;
5540 if (*str == 0) break;
5544 Term_putstr(w-1, h-1, 1, TERM_WHITE, " ");
5548 /* Make screen dump */
5549 screen_dump = make_screen_dump();
5552 /* Wait a key press */
5557 msg_print(death_message);
5567 /* Hitpoint warning */
5568 if (p_ptr->chp < warning)
5570 /* Hack -- bell on first notice */
5571 if (old_chp > warning) bell();
5575 if (record_danger && (old_chp > warning))
5577 if (p_ptr->image && damage_type == DAMAGE_ATTACK)
5581 hit_from = "something";
5585 sprintf(tmp,"%s¤Ë¤è¤Ã¤Æ¥Ô¥ó¥Á¤Ë´Ù¤Ã¤¿¡£",hit_from);
5587 sprintf(tmp,"A critical situation because of %s.",hit_from);
5589 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, tmp);
5594 /* stop auto_more even if DAMAGE_USELIFE */
5600 msg_print("*** ·Ù¹ð:Äã¥Ò¥Ã¥È¡¦¥Ý¥¤¥ó¥È¡ª ***");
5602 msg_print("*** LOW HITPOINT WARNING! ***");
5608 if (p_ptr->wild_mode && !p_ptr->leaving && (p_ptr->chp < MAX(warning, p_ptr->mhp/5)))
5619 void gain_exp_64(s32b amount, u32b amount_frac)
5621 if (p_ptr->is_dead) return;
5623 if (p_ptr->prace == RACE_ANDROID) return;
5625 /* Gain some experience */
5626 s64b_add(&(p_ptr->exp), &(p_ptr->exp_frac), amount, amount_frac);
5628 /* Slowly recover from experience drainage */
5629 if (p_ptr->exp < p_ptr->max_exp)
5631 /* Gain max experience (20%) (was 10%) */
5632 p_ptr->max_exp += amount / 5;
5635 /* Check Experience */
5643 void gain_exp(s32b amount)
5645 gain_exp_64(amount, 0L);
5649 void calc_android_exp(void)
5653 if (p_ptr->is_dead) return;
5655 if (p_ptr->prace != RACE_ANDROID) return;
5657 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
5659 object_type *o_ptr = &inventory[i];
5661 object_type *q_ptr = &forge;
5663 int level = MAX(k_info[o_ptr->k_idx].level - 8, 1);
5665 if ((i == INVEN_RIGHT) || (i == INVEN_LEFT) || (i == INVEN_NECK) || (i == INVEN_LITE)) continue;
5666 if (!o_ptr->k_idx) continue;
5668 /* Wipe the object */
5671 object_copy(q_ptr, o_ptr);
5672 q_ptr->discount = 0;
5673 q_ptr->curse_flags = 0L;
5675 if (object_is_fixed_artifact(o_ptr))
5677 level = (level + MAX(a_info[o_ptr->name1].level - 8, 5)) / 2;
5678 level += MIN(20, a_info[o_ptr->name1].rarity/(a_info[o_ptr->name1].gen_flags & TRG_INSTA_ART ? 10 : 3));
5680 else if (object_is_ego(o_ptr))
5682 level += MAX(3, (e_info[o_ptr->name2].rating - 5)/2);
5684 else if (o_ptr->art_name)
5686 s32b total_flags = flag_cost(o_ptr, o_ptr->pval);
5689 if (!object_is_weapon_ammo(o_ptr))
5692 if (total_flags < 15000) fake_level = 10;
5693 else if (total_flags < 35000) fake_level = 25;
5694 else fake_level = 40;
5699 if (total_flags < 20000) fake_level = 10;
5700 else if (total_flags < 45000) fake_level = 25;
5701 else fake_level = 40;
5704 level = MAX(level, (level + MAX(fake_level - 8, 5)) / 2 + 3);
5707 value = object_value_real(q_ptr);
5709 if (value <= 0) continue;
5710 if ((o_ptr->tval == TV_SOFT_ARMOR) && (o_ptr->sval == SV_ABUNAI_MIZUGI) && (p_ptr->pseikaku != SEIKAKU_SEXY)) value /= 32;
5711 if (value > 5000000L) value = 5000000L;
5712 if ((o_ptr->tval == TV_DRAG_ARMOR) || (o_ptr->tval == TV_CARD)) level /= 2;
5714 if (object_is_artifact(o_ptr) || object_is_ego(o_ptr) ||
5715 (o_ptr->tval == TV_DRAG_ARMOR) ||
5716 ((o_ptr->tval == TV_HELM) && (o_ptr->sval == SV_DRAGON_HELM)) ||
5717 ((o_ptr->tval == TV_SHIELD) && (o_ptr->sval == SV_DRAGON_SHIELD)) ||
5718 ((o_ptr->tval == TV_GLOVES) && (o_ptr->sval == SV_SET_OF_DRAGON_GLOVES)) ||
5719 ((o_ptr->tval == TV_BOOTS) && (o_ptr->sval == SV_PAIR_OF_DRAGON_GREAVE)) ||
5720 ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DIAMOND_EDGE)))
5722 if (level > 65) level = 35 + (level - 65) / 5;
5723 else if (level > 35) level = 25 + (level - 35) / 3;
5724 else if (level > 15) level = 15 + (level - 15) / 2;
5725 exp = MIN(100000L, value) * level * level / 2;
5726 if (value > 100000L)
5727 exp += (value - 100000L) * level * level / 8;
5731 exp = MIN(100000L, value) * level;
5732 if (value > 100000L)
5733 exp += (value - 100000L) * level / 4;
5735 if ((((i == INVEN_RARM) || (i == INVEN_LARM)) && (buki_motteruka(i))) || (i == INVEN_BOW)) total_exp += exp / 48;
5736 else total_exp += exp / 16;
5737 if (i == INVEN_BODY) total_exp += exp / 32;
5739 p_ptr->exp = p_ptr->max_exp = total_exp;
5741 /* Check Experience */
5749 void lose_exp(s32b amount)
5751 if (p_ptr->prace == RACE_ANDROID) return;
5753 /* Never drop below zero experience */
5754 if (amount > p_ptr->exp) amount = p_ptr->exp;
5756 /* Lose some experience */
5757 p_ptr->exp -= amount;
5759 /* Check Experience */
5766 * If resisted to draining, return FALSE
5768 bool drain_exp(s32b drain, s32b slip, int hold_life_prob)
5770 /* Androids and their mimics are never drained */
5771 if (p_ptr->prace == RACE_ANDROID) return FALSE;
5773 if (p_ptr->hold_life && (randint0(100) < hold_life_prob))
5775 /* Hold experience */
5777 msg_print("¤·¤«¤·¼«¸Ê¤ÎÀ¸Ì¿ÎϤò¼é¤ê¤¤Ã¤¿¡ª");
5779 msg_print("You keep hold of your life force!");
5784 /* Hold experience failed */
5785 if (p_ptr->hold_life)
5788 msg_print("À¸Ì¿ÎϤò¾¯¤·µÛ¤¤¼è¤é¤ì¤¿µ¤¤¬¤¹¤ë¡ª");
5790 msg_print("You feel your life slipping away!");
5797 msg_print("À¸Ì¿ÎϤ¬ÂΤ«¤éµÛ¤¤¼è¤é¤ì¤¿µ¤¤¬¤¹¤ë¡ª");
5799 msg_print("You feel your life draining away!");
5808 bool set_ultimate_res(int v, bool do_dec)
5810 bool notice = FALSE;
5812 /* Hack -- Force good values */
5813 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
5815 if (p_ptr->is_dead) return FALSE;
5820 if (p_ptr->ult_res && !do_dec)
5822 if (p_ptr->ult_res > v) return FALSE;
5824 else if (!p_ptr->ult_res)
5827 msg_print("¤¢¤é¤æ¤ë¤³¤È¤ËÂФ·¤ÆÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
5829 msg_print("You feel resistant!");
5842 msg_print("¤¢¤é¤æ¤ë¤³¤È¤ËÂФ¹¤ëÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
5844 msg_print("You feel less resistant");
5854 /* Redraw status bar */
5855 p_ptr->redraw |= (PR_STATUS);
5857 /* Nothing to notice */
5858 if (!notice) return (FALSE);
5861 if (disturb_state) disturb(0, 0);
5863 /* Recalculate bonuses */
5864 p_ptr->update |= (PU_BONUS);
5873 bool set_tim_res_nether(int v, bool do_dec)
5875 bool notice = FALSE;
5877 /* Hack -- Force good values */
5878 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
5880 if (p_ptr->is_dead) return FALSE;
5885 if (p_ptr->tim_res_nether && !do_dec)
5887 if (p_ptr->tim_res_nether > v) return FALSE;
5889 else if (!p_ptr->tim_res_nether)
5892 msg_print("ÃϹö¤ÎÎϤËÂФ·¤ÆÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
5894 msg_print("You feel nether resistant!");
5904 if (p_ptr->tim_res_nether)
5907 msg_print("ÃϹö¤ÎÎϤËÂФ¹¤ëÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
5909 msg_print("You feel less nether resistant");
5917 p_ptr->tim_res_nether = v;
5919 /* Redraw status bar */
5920 p_ptr->redraw |= (PR_STATUS);
5922 /* Nothing to notice */
5923 if (!notice) return (FALSE);
5926 if (disturb_state) disturb(0, 0);
5928 /* Recalculate bonuses */
5929 p_ptr->update |= (PU_BONUS);
5938 bool set_tim_res_time(int v, bool do_dec)
5940 bool notice = FALSE;
5942 /* Hack -- Force good values */
5943 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
5945 if (p_ptr->is_dead) return FALSE;
5950 if (p_ptr->tim_res_time && !do_dec)
5952 if (p_ptr->tim_res_time > v) return FALSE;
5954 else if (!p_ptr->tim_res_time)
5957 msg_print("»þ´ÖµÕž¤ÎÎϤËÂФ·¤ÆÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
5959 msg_print("You feel time resistant!");
5969 if (p_ptr->tim_res_time)
5972 msg_print("»þ´ÖµÕž¤ÎÎϤËÂФ¹¤ëÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
5974 msg_print("You feel less time resistant");
5982 p_ptr->tim_res_time = v;
5984 /* Redraw status bar */
5985 p_ptr->redraw |= (PR_STATUS);
5987 /* Nothing to notice */
5988 if (!notice) return (FALSE);
5991 if (disturb_state) disturb(0, 0);
5993 /* Recalculate bonuses */
5994 p_ptr->update |= (PU_BONUS);
6005 * Choose a warrior-mage elemental attack. -LM-
6007 bool choose_ele_attack(void)
6013 if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM))
6016 msg_format("Éð´ï¤ò»ý¤¿¤Ê¤¤¤ÈËâË¡·õ¤Ï»È¤¨¤Ê¤¤¡£");
6018 msg_format("You cannot use temporary branding with no weapon.");
6026 num = (p_ptr->lev - 20) / 5;
6029 c_prt(TERM_RED, " a) ¾Æ´þ", 2, 14);
6031 c_prt(TERM_RED, " a) Fire Brand", 2, 14);
6035 if (num >= 2) c_prt(TERM_L_WHITE," b) Åà·ë", 3, 14);
6037 if (num >= 2) c_prt(TERM_L_WHITE," b) Cold Brand", 3, 14);
6039 else prt("", 3, 14);
6042 if (num >= 3) c_prt(TERM_GREEN, " c) ÆÇ»¦", 4, 14);
6044 if (num >= 3) c_prt(TERM_GREEN, " c) Poison Brand", 4, 14);
6046 else prt("", 4, 14);
6049 if (num >= 4) c_prt(TERM_L_DARK, " d) Íϲò", 5, 14);
6051 if (num >= 4) c_prt(TERM_L_DARK, " d) Acid Brand", 5, 14);
6053 else prt("", 5, 14);
6056 if (num >= 5) c_prt(TERM_BLUE, " e) ÅÅ·â", 6, 14);
6058 if (num >= 5) c_prt(TERM_BLUE, " e) Elec Brand", 6, 14);
6060 else prt("", 6, 14);
6068 prt(" ¤É¤Î¸µÁǹ¶·â¤ò¤·¤Þ¤¹¤«¡©", 1, 14);
6070 prt(" Choose a temporary elemental brand ", 1, 14);
6075 if ((choice == 'a') || (choice == 'A'))
6076 set_ele_attack(ATTACK_FIRE, p_ptr->lev/2 + randint1(p_ptr->lev/2));
6077 else if (((choice == 'b') || (choice == 'B')) && (num >= 2))
6078 set_ele_attack(ATTACK_COLD, p_ptr->lev/2 + randint1(p_ptr->lev/2));
6079 else if (((choice == 'c') || (choice == 'C')) && (num >= 3))
6080 set_ele_attack(ATTACK_POIS, p_ptr->lev/2 + randint1(p_ptr->lev/2));
6081 else if (((choice == 'd') || (choice == 'D')) && (num >= 4))
6082 set_ele_attack(ATTACK_ACID, p_ptr->lev/2 + randint1(p_ptr->lev/2));
6083 else if (((choice == 'e') || (choice == 'E')) && (num >= 5))
6084 set_ele_attack(ATTACK_ELEC, p_ptr->lev/2 + randint1(p_ptr->lev/2));
6088 msg_print("ËâË¡·õ¤ò»È¤¦¤Î¤ò¤ä¤á¤¿¡£");
6090 msg_print("You cancel the temporary branding.");
6102 * Choose a elemental immune. -LM-
6104 bool choose_ele_immune(int turn)
6112 c_prt(TERM_RED, " a) ²Ð±ê", 2, 14);
6114 c_prt(TERM_RED, " a) Immune Fire", 2, 14);
6118 c_prt(TERM_L_WHITE," b) Î䵤", 3, 14);
6120 c_prt(TERM_L_WHITE," b) Immune Cold", 3, 14);
6124 c_prt(TERM_L_DARK, " c) »À", 4, 14);
6126 c_prt(TERM_L_DARK, " c) Immune Acid", 4, 14);
6130 c_prt(TERM_BLUE, " d) ÅÅ·â", 5, 14);
6132 c_prt(TERM_BLUE, " d) Immune Elec", 5, 14);
6143 prt(" ¤É¤Î¸µÁǤÎÌȱ֤ò¤Ä¤±¤Þ¤¹¤«¡©", 1, 14);
6145 prt(" Choose a temporary elemental immune ", 1, 14);
6150 if ((choice == 'a') || (choice == 'A'))
6151 set_ele_immune(DEFENSE_FIRE, turn);
6152 else if ((choice == 'b') || (choice == 'B'))
6153 set_ele_immune(DEFENSE_COLD, turn);
6154 else if ((choice == 'c') || (choice == 'C'))
6155 set_ele_immune(DEFENSE_ACID, turn);
6156 else if ((choice == 'd') || (choice == 'D'))
6157 set_ele_immune(DEFENSE_ELEC, turn);
6161 msg_print("Ìȱ֤òÉÕ¤±¤ë¤Î¤ò¤ä¤á¤¿¡£");
6163 msg_print("You cancel the temporary immune.");