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 * @param 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()".\n
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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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 * @param 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);
3064 * @brief °ì»þŪ¸µÁÇ¥¹¥ì¥¤¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set a temporary elemental brand. Clear all other brands. Print status messages. -LM-
3065 * @param attack_type ¥¹¥ì¥¤¤Î¥¿¥¤¥×ID
3067 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
3069 bool set_ele_attack(u32b attack_type, int v)
3071 /* Hack -- Force good values */
3072 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3074 /* Clear all elemental attacks (only one is allowed at a time). */
3075 if ((p_ptr->special_attack & (ATTACK_ACID)) && (attack_type != ATTACK_ACID))
3077 p_ptr->special_attack &= ~(ATTACK_ACID);
3079 msg_print("»À¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
3081 msg_print("Your temporary acidic brand fades away.");
3084 if ((p_ptr->special_attack & (ATTACK_ELEC)) && (attack_type != ATTACK_ELEC))
3086 p_ptr->special_attack &= ~(ATTACK_ELEC);
3088 msg_print("ÅÅ·â¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
3090 msg_print("Your temporary electrical brand fades away.");
3093 if ((p_ptr->special_attack & (ATTACK_FIRE)) && (attack_type != ATTACK_FIRE))
3095 p_ptr->special_attack &= ~(ATTACK_FIRE);
3097 msg_print("²Ð±ê¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
3099 msg_print("Your temporary fiery brand fades away.");
3102 if ((p_ptr->special_attack & (ATTACK_COLD)) && (attack_type != ATTACK_COLD))
3104 p_ptr->special_attack &= ~(ATTACK_COLD);
3106 msg_print("Î䵤¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
3108 msg_print("Your temporary frost brand fades away.");
3111 if ((p_ptr->special_attack & (ATTACK_POIS)) && (attack_type != ATTACK_POIS))
3113 p_ptr->special_attack &= ~(ATTACK_POIS);
3115 msg_print("ÆǤǹ¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
3117 msg_print("Your temporary poison brand fades away.");
3121 if ((v) && (attack_type))
3123 /* Set attack type. */
3124 p_ptr->special_attack |= (attack_type);
3127 p_ptr->ele_attack = v;
3131 msg_format("%s¤Ç¹¶·â¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡ª",
3132 ((attack_type == ATTACK_ACID) ? "»À" :
3133 ((attack_type == ATTACK_ELEC) ? "ÅÅ·â" :
3134 ((attack_type == ATTACK_FIRE) ? "²Ð±ê" :
3135 ((attack_type == ATTACK_COLD) ? "Î䵤" :
3136 ((attack_type == ATTACK_POIS) ? "ÆÇ" :
3139 msg_format("For a while, the blows you deal will %s",
3140 ((attack_type == ATTACK_ACID) ? "melt with acid!" :
3141 ((attack_type == ATTACK_ELEC) ? "shock your foes!" :
3142 ((attack_type == ATTACK_FIRE) ? "burn with fire!" :
3143 ((attack_type == ATTACK_COLD) ? "chill to the bone!" :
3144 ((attack_type == ATTACK_POIS) ? "poison your enemies!" :
3145 "do nothing special."))))));
3150 if (disturb_state) disturb(0, 0);
3152 /* Redraw status bar */
3153 p_ptr->redraw |= (PR_STATUS);
3155 p_ptr->update |= (PU_BONUS);
3164 * @brief °ì»þŪ¸µÁÇÌȱ֤ηѳ»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set a temporary elemental brand. Clear all other brands. Print status messages. -LM-
3165 * @param immune_type Ìȱ֤Υ¿¥¤¥×ID
3167 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
3169 bool set_ele_immune(u32b immune_type, int v)
3171 /* Hack -- Force good values */
3172 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3174 /* Clear all elemental attacks (only one is allowed at a time). */
3175 if ((p_ptr->special_defense & (DEFENSE_ACID)) && (immune_type != DEFENSE_ACID))
3177 p_ptr->special_defense &= ~(DEFENSE_ACID);
3179 msg_print("»À¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3181 msg_print("You are no longer immune to acid.");
3184 if ((p_ptr->special_defense & (DEFENSE_ELEC)) && (immune_type != DEFENSE_ELEC))
3186 p_ptr->special_defense &= ~(DEFENSE_ELEC);
3188 msg_print("ÅÅ·â¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3190 msg_print("You are no longer immune to electricity.");
3193 if ((p_ptr->special_defense & (DEFENSE_FIRE)) && (immune_type != DEFENSE_FIRE))
3195 p_ptr->special_defense &= ~(DEFENSE_FIRE);
3197 msg_print("²Ð±ê¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3199 msg_print("You are no longer immune to fire.");
3202 if ((p_ptr->special_defense & (DEFENSE_COLD)) && (immune_type != DEFENSE_COLD))
3204 p_ptr->special_defense &= ~(DEFENSE_COLD);
3206 msg_print("Î䵤¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3208 msg_print("You are no longer immune to cold.");
3211 if ((p_ptr->special_defense & (DEFENSE_POIS)) && (immune_type != DEFENSE_POIS))
3213 p_ptr->special_defense &= ~(DEFENSE_POIS);
3215 msg_print("ÆǤι¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3217 msg_print("You are no longer immune to poison.");
3221 if ((v) && (immune_type))
3223 /* Set attack type. */
3224 p_ptr->special_defense |= (immune_type);
3227 p_ptr->ele_immune = v;
3231 msg_format("%s¤Î¹¶·â¤ò¼õ¤±¤Ä¤±¤Ê¤¯¤Ê¤Ã¤¿¡ª",
3232 ((immune_type == DEFENSE_ACID) ? "»À" :
3233 ((immune_type == DEFENSE_ELEC) ? "ÅÅ·â" :
3234 ((immune_type == DEFENSE_FIRE) ? "²Ð±ê" :
3235 ((immune_type == DEFENSE_COLD) ? "Î䵤" :
3236 ((immune_type == DEFENSE_POIS) ? "ÆÇ" :
3239 msg_format("For a while, You are immune to %s",
3240 ((immune_type == DEFENSE_ACID) ? "acid!" :
3241 ((immune_type == DEFENSE_ELEC) ? "electricity!" :
3242 ((immune_type == DEFENSE_FIRE) ? "fire!" :
3243 ((immune_type == DEFENSE_COLD) ? "cold!" :
3244 ((immune_type == DEFENSE_POIS) ? "poison!" :
3245 "do nothing special."))))));
3250 if (disturb_state) disturb(0, 0);
3252 /* Redraw status bar */
3253 p_ptr->redraw |= (PR_STATUS);
3255 p_ptr->update |= (PU_BONUS);
3264 * @brief °ì»þŪ»ÀÂÑÀ¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->oppose_acid", notice observable changes
3266 * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
3267 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
3269 bool set_oppose_acid(int v, bool do_dec)
3271 bool notice = FALSE;
3273 /* Hack -- Force good values */
3274 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3276 if (p_ptr->is_dead) return FALSE;
3281 if (p_ptr->oppose_acid && !do_dec)
3283 if (p_ptr->oppose_acid > v) return FALSE;
3285 else if (!IS_OPPOSE_ACID())
3288 msg_print("»À¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3290 msg_print("You feel resistant to acid!");
3300 if (p_ptr->oppose_acid && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3303 msg_print("»À¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3305 msg_print("You feel less resistant to acid.");
3313 p_ptr->oppose_acid = v;
3315 /* Nothing to notice */
3316 if (!notice) return (FALSE);
3318 /* Redraw status bar */
3319 p_ptr->redraw |= (PR_STATUS);
3322 if (disturb_state) disturb(0, 0);
3332 * @brief °ì»þŪÅÅ·âÂÑÀ¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->oppose_elec", notice observable changes
3334 * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
3335 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
3337 bool set_oppose_elec(int v, bool do_dec)
3339 bool notice = FALSE;
3341 /* Hack -- Force good values */
3342 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3344 if (p_ptr->is_dead) return FALSE;
3349 if (p_ptr->oppose_elec && !do_dec)
3351 if (p_ptr->oppose_elec > v) return FALSE;
3353 else if (!IS_OPPOSE_ELEC())
3356 msg_print("ÅÅ·â¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3358 msg_print("You feel resistant to electricity!");
3368 if (p_ptr->oppose_elec && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3371 msg_print("ÅÅ·â¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3373 msg_print("You feel less resistant to electricity.");
3381 p_ptr->oppose_elec = v;
3383 /* Nothing to notice */
3384 if (!notice) return (FALSE);
3386 /* Redraw status bar */
3387 p_ptr->redraw |= (PR_STATUS);
3390 if (disturb_state) disturb(0, 0);
3400 * @brief °ì»þŪ²Ð±êÂÑÀ¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->oppose_fire", notice observable changes
3402 * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
3403 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
3405 bool set_oppose_fire(int v, bool do_dec)
3407 bool notice = FALSE;
3409 /* Hack -- Force good values */
3410 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3412 if (p_ptr->is_dead) return FALSE;
3414 if ((prace_is_(RACE_DEMON) && (p_ptr->lev > 44)) || (p_ptr->mimic_form == MIMIC_DEMON)) v = 1;
3418 if (p_ptr->oppose_fire && !do_dec)
3420 if (p_ptr->oppose_fire > v) return FALSE;
3422 else if (!IS_OPPOSE_FIRE())
3425 msg_print("²Ð¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3427 msg_print("You feel resistant to fire!");
3437 if (p_ptr->oppose_fire && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3440 msg_print("²Ð¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3442 msg_print("You feel less resistant to fire.");
3450 p_ptr->oppose_fire = v;
3452 /* Nothing to notice */
3453 if (!notice) return (FALSE);
3455 /* Redraw status bar */
3456 p_ptr->redraw |= (PR_STATUS);
3459 if (disturb_state) disturb(0, 0);
3469 * @brief °ì»þŪÎ䵤ÂÑÀ¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->oppose_cold", notice observable changes
3471 * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
3472 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
3474 bool set_oppose_cold(int v, bool do_dec)
3476 bool notice = FALSE;
3478 /* Hack -- Force good values */
3479 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3481 if (p_ptr->is_dead) return FALSE;
3486 if (p_ptr->oppose_cold && !do_dec)
3488 if (p_ptr->oppose_cold > v) return FALSE;
3490 else if (!IS_OPPOSE_COLD())
3493 msg_print("Î䵤¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3495 msg_print("You feel resistant to cold!");
3505 if (p_ptr->oppose_cold && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3508 msg_print("Î䵤¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3510 msg_print("You feel less resistant to cold.");
3518 p_ptr->oppose_cold = v;
3520 /* Nothing to notice */
3521 if (!notice) return (FALSE);
3523 /* Redraw status bar */
3524 p_ptr->redraw |= (PR_STATUS);
3527 if (disturb_state) disturb(0, 0);
3537 * @brief °ì»þŪÆÇÂÑÀ¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->oppose_pois", notice observable changes
3539 * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
3540 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
3542 bool set_oppose_pois(int v, bool do_dec)
3544 bool notice = FALSE;
3546 /* Hack -- Force good values */
3547 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3549 if ((p_ptr->pclass == CLASS_NINJA) && (p_ptr->lev > 44)) v = 1;
3550 if (p_ptr->is_dead) return FALSE;
3555 if (p_ptr->oppose_pois && !do_dec)
3557 if (p_ptr->oppose_pois > v) return FALSE;
3559 else if (!IS_OPPOSE_POIS())
3562 msg_print("ÆǤؤÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3564 msg_print("You feel resistant to poison!");
3574 if (p_ptr->oppose_pois && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3577 msg_print("ÆǤؤÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3579 msg_print("You feel less resistant to poison.");
3587 p_ptr->oppose_pois = v;
3589 /* Nothing to notice */
3590 if (!notice) return (FALSE);
3592 /* Redraw status bar */
3593 p_ptr->redraw |= (PR_STATUS);
3596 if (disturb_state) disturb(0, 0);
3606 * @brief Û¯Û°¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->stun", notice observable changes
3608 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
3610 * Note the special code to only notice "range" changes.
3612 bool set_stun(int v)
3614 int old_aux, new_aux;
3615 bool notice = FALSE;
3618 /* Hack -- Force good values */
3619 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3621 if (p_ptr->is_dead) return FALSE;
3623 if (prace_is_(RACE_GOLEM) || ((p_ptr->pclass == CLASS_BERSERKER) && (p_ptr->lev > 34))) v = 0;
3626 if (p_ptr->stun > 100)
3632 else if (p_ptr->stun > 50)
3638 else if (p_ptr->stun > 0)
3674 if (new_aux > old_aux)
3676 /* Describe the state */
3682 msg_print("°Õ¼±¤¬¤â¤¦¤í¤¦¤È¤·¤Æ¤¤¿¡£");
3684 msg_print("You have been stunned.");
3692 msg_print("°Õ¼±¤¬¤Ò¤É¤¯¤â¤¦¤í¤¦¤È¤·¤Æ¤¤¿¡£");
3694 msg_print("You have been heavily stunned.");
3702 msg_print("Ƭ¤¬¥¯¥é¥¯¥é¤·¤Æ°Õ¼±¤¬±ó¤Î¤¤¤Æ¤¤¿¡£");
3704 msg_print("You have been knocked out.");
3710 if (randint1(1000) < v || one_in_(16))
3713 msg_print("³ä¤ì¤ë¤è¤¦¤ÊƬÄˤ¬¤¹¤ë¡£");
3715 msg_print("A vicious blow hits your head.");
3720 if (!p_ptr->sustain_int) (void)do_dec_stat(A_INT);
3721 if (!p_ptr->sustain_wis) (void)do_dec_stat(A_WIS);
3723 else if (one_in_(2))
3725 if (!p_ptr->sustain_int) (void)do_dec_stat(A_INT);
3729 if (!p_ptr->sustain_wis) (void)do_dec_stat(A_WIS);
3732 if (p_ptr->special_defense & KATA_MASK)
3735 msg_print("·¿¤¬Êø¤ì¤¿¡£");
3737 msg_print("Your posture gets loose.");
3739 p_ptr->special_defense &= ~(KATA_MASK);
3740 p_ptr->update |= (PU_BONUS);
3741 p_ptr->update |= (PU_MONSTERS);
3742 p_ptr->redraw |= (PR_STATE);
3743 p_ptr->redraw |= (PR_STATUS);
3744 p_ptr->action = ACTION_NONE;
3748 if (p_ptr->concent) reset_concentration(TRUE);
3751 if (hex_spelling_any()) stop_hex_spell_all();
3758 else if (new_aux < old_aux)
3760 /* Describe the state */
3766 msg_print("¤ä¤Ã¤ÈÛ¯Û°¾õÂÖ¤«¤é²óÉü¤·¤¿¡£");
3768 msg_print("You are no longer stunned.");
3771 if (disturb_state) disturb(0, 0);
3783 if (!notice) return (FALSE);
3786 if (disturb_state) disturb(0, 0);
3788 /* Recalculate bonuses */
3789 p_ptr->update |= (PU_BONUS);
3791 /* Redraw the "stun" */
3792 p_ptr->redraw |= (PR_STUN);
3803 * @brief ½Ð·ì¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->cut", notice observable changes
3805 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
3807 * Note the special code to only notice "range" changes.
3811 int old_aux, new_aux;
3812 bool notice = FALSE;
3814 /* Hack -- Force good values */
3815 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3817 if (p_ptr->is_dead) return FALSE;
3819 if ((p_ptr->prace == RACE_GOLEM ||
3820 p_ptr->prace == RACE_SKELETON ||
3821 p_ptr->prace == RACE_SPECTRE ||
3822 (p_ptr->prace == RACE_ZOMBIE && p_ptr->lev > 11)) &&
3827 if (p_ptr->cut > 1000)
3833 else if (p_ptr->cut > 200)
3839 else if (p_ptr->cut > 100)
3845 else if (p_ptr->cut > 50)
3851 else if (p_ptr->cut > 25)
3857 else if (p_ptr->cut > 10)
3863 else if (p_ptr->cut > 0)
3923 if (new_aux > old_aux)
3925 /* Describe the state */
3931 msg_print("¤«¤¹¤ê½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3933 msg_print("You have been given a graze.");
3941 msg_print("·Ú¤¤½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3943 msg_print("You have been given a light cut.");
3951 msg_print("¤Ò¤É¤¤½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3953 msg_print("You have been given a bad cut.");
3961 msg_print("ÂçÊѤʽý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3963 msg_print("You have been given a nasty cut.");
3971 msg_print("½ÅÂç¤Ê½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3973 msg_print("You have been given a severe cut.");
3981 msg_print("¤Ò¤É¤¤¿¼¼ê¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3983 msg_print("You have been given a deep gash.");
3991 msg_print("Ã×̿Ū¤Ê½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3993 msg_print("You have been given a mortal wound.");
4002 if (randint1(1000) < v || one_in_(16))
4004 if (!p_ptr->sustain_chr)
4007 msg_print("¤Ò¤É¤¤½ýÀפ¬»Ä¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
4009 msg_print("You have been horribly scarred.");
4019 else if (new_aux < old_aux)
4021 /* Describe the state */
4027 msg_format("¤ä¤Ã¤È%s¡£", p_ptr->prace == RACE_ANDROID ? "²ø²æ¤¬Ä¾¤Ã¤¿" : "½Ð·ì¤¬»ß¤Þ¤Ã¤¿");
4029 msg_print("You are no longer bleeding.");
4032 if (disturb_state) disturb(0, 0);
4044 if (!notice) return (FALSE);
4047 if (disturb_state) disturb(0, 0);
4049 /* Recalculate bonuses */
4050 p_ptr->update |= (PU_BONUS);
4052 /* Redraw the "cut" */
4053 p_ptr->redraw |= (PR_CUT);
4063 * @brief ¶õÊ¢¾õÂÖ¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->food", notice observable changes
4065 * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
4067 * Set "", notice observable changes\n
4069 * The "p_ptr->food" variable can get as large as 20000, allowing the
4070 * addition of the most "filling" item, Elvish Waybread, which adds
4071 * 7500 food units, without overflowing the 32767 maximum limit.\n
4073 * Perhaps we should disturb the player with various messages,
4074 * especially messages about hunger status changes. XXX XXX XXX\n
4076 * Digestion of food is handled in "dungeon.c", in which, normally,
4077 * the player digests about 20 food units per 100 game turns, more
4078 * when "fast", more when "regenerating", less with "slow digestion",
4079 * but when the player is "gorged", he digests 100 food units per 10
4080 * game turns, or a full 1000 food units per 100 game turns.\n
4082 * Note that the player's speed is reduced by 10 units while gorged,
4083 * so if the player eats a single food ration (5000 food units) when
4084 * full (15000 food units), he will be gorged for (5000/100)*10 = 500
4085 * game turns, or 500/(100/5) = 25 player turns (if nothing else is
4086 * affecting the player speed).\n
4088 bool set_food(int v)
4090 int old_aux, new_aux;
4092 bool notice = FALSE;
4094 /* Hack -- Force good values */
4095 v = (v > 20000) ? 20000 : (v < 0) ? 0 : v;
4097 /* Fainting / Starving */
4098 if (p_ptr->food < PY_FOOD_FAINT)
4104 else if (p_ptr->food < PY_FOOD_WEAK)
4110 else if (p_ptr->food < PY_FOOD_ALERT)
4116 else if (p_ptr->food < PY_FOOD_FULL)
4122 else if (p_ptr->food < PY_FOOD_MAX)
4133 /* Fainting / Starving */
4134 if (v < PY_FOOD_FAINT)
4140 else if (v < PY_FOOD_WEAK)
4146 else if (v < PY_FOOD_ALERT)
4152 else if (v < PY_FOOD_FULL)
4158 else if (v < PY_FOOD_MAX)
4169 if (old_aux < 1 && new_aux > 0)
4170 chg_virtue(V_PATIENCE, 2);
4171 else if (old_aux < 3 && (old_aux != new_aux))
4172 chg_virtue(V_PATIENCE, 1);
4174 chg_virtue(V_TEMPERANCE, 1);
4176 chg_virtue(V_TEMPERANCE, -1);
4179 if (new_aux > old_aux)
4181 /* Describe the state */
4187 msg_print("¤Þ¤À¶õÊ¢¤ÇÅݤ줽¤¦¤À¡£");
4189 msg_print("You are still weak.");
4197 msg_print("¤Þ¤À¶õÊ¢¤À¡£");
4199 msg_print("You are still hungry.");
4207 msg_print("¶õÊ¢´¶¤¬¤ª¤µ¤Þ¤Ã¤¿¡£");
4209 msg_print("You are no longer hungry.");
4217 msg_print("ËþÊ¢¤À¡ª");
4219 msg_print("You are full!");
4227 msg_print("¿©¤Ù²á¤®¤À¡ª");
4229 msg_print("You have gorged yourself!");
4231 chg_virtue(V_HARMONY, -1);
4232 chg_virtue(V_PATIENCE, -1);
4233 chg_virtue(V_TEMPERANCE, -2);
4243 else if (new_aux < old_aux)
4245 /* Describe the state */
4248 /* Fainting / Starving */
4251 msg_print("¤¢¤Þ¤ê¤Ë¤â¶õÊ¢¤Çµ¤¤ò¼º¤Ã¤Æ¤·¤Þ¤Ã¤¿¡ª");
4253 msg_print("You are getting faint from hunger!");
4261 msg_print("¤ªÊ¢¤¬¶õ¤¤¤ÆÅݤ줽¤¦¤À¡£");
4263 msg_print("You are getting weak from hunger!");
4271 msg_print("¤ªÊ¢¤¬¶õ¤¤¤Æ¤¤¿¡£");
4273 msg_print("You are getting hungry.");
4281 msg_print("ËþÊ¢´¶¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
4283 msg_print("You are no longer full.");
4291 msg_print("¤ä¤Ã¤È¤ªÊ¢¤¬¤¤Ä¤¯¤Ê¤¯¤Ê¤Ã¤¿¡£");
4293 msg_print("You are no longer gorged.");
4299 if (p_ptr->wild_mode && (new_aux < 2))
4311 /* Nothing to notice */
4312 if (!notice) return (FALSE);
4315 if (disturb_state) disturb(0, 0);
4317 /* Recalculate bonuses */
4318 p_ptr->update |= (PU_BONUS);
4321 p_ptr->redraw |= (PR_HUNGER);
4331 * @brief ¥×¥ì¥¤¥ä¡¼¤Î´ðËÜǽÎÏÃͤòÁý²Ã¤µ¤»¤ë / Increases a stat by one randomized level -RAK-
4332 * @param stat ¾å¾º¤µ¤»¤ë¥¹¥Æ¡¼¥¿¥¹ID
4333 * @return ¼ÂºÝ¤Ë¾å¾º¤·¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
4335 * Note that this function (used by stat potions) now restores\n
4336 * the stat BEFORE increasing it.\n
4338 bool inc_stat(int stat)
4342 /* Then augment the current/max stat */
4343 value = p_ptr->stat_cur[stat];
4345 /* Cannot go above 18/100 */
4346 if (value < p_ptr->stat_max_max[stat])
4348 /* Gain one (sometimes two) points */
4351 gain = ((randint0(100) < 75) ? 1 : 2);
4355 /* Gain 1/6 to 1/3 of distance to 18/100 */
4356 else if (value < (p_ptr->stat_max_max[stat]-2))
4358 /* Approximate gain value */
4359 gain = (((p_ptr->stat_max_max[stat]) - value) / 2 + 3) / 2;
4362 if (gain < 1) gain = 1;
4364 /* Apply the bonus */
4365 value += randint1(gain) + gain / 2;
4368 if (value > (p_ptr->stat_max_max[stat]-1)) value = p_ptr->stat_max_max[stat]-1;
4371 /* Gain one point at a time */
4377 /* Save the new value */
4378 p_ptr->stat_cur[stat] = value;
4380 /* Bring up the maximum too */
4381 if (value > p_ptr->stat_max[stat])
4383 p_ptr->stat_max[stat] = value;
4386 /* Recalculate bonuses */
4387 p_ptr->update |= (PU_BONUS);
4393 /* Nothing to gain */
4398 * @brief ¥×¥ì¥¤¥ä¡¼¤Î´ðËÜǽÎÏÃͤò¸º¾¯¤µ¤»¤ë / Decreases a stat by an amount indended to vary from 0 to 100 percent.
4399 * @param stat ¸º¾¯¤µ¤»¤ë¥¹¥Æ¡¼¥¿¥¹ID
4400 * @param amount ¸º¾¯¤µ¤»¤ë´ðËÜÎÌ
4401 * @param permanent TRUE¤Ê¤é¤Ð¸½ºß¤ÎºÇÂçÃͤò¸º¾¯¤µ¤»¤ë
4402 * @return ¼ÂºÝ¤Ë¸º¾¯¤·¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
4405 * Amount could be a little higher in extreme cases to mangle very high\n
4406 * stats from massive assaults. -CWS\n
4408 * Note that "permanent" means that the *given* amount is permanent,\n
4409 * not that the new value becomes permanent. This may not work exactly\n
4410 * as expected, due to "weirdness" in the algorithm, but in general,\n
4411 * if your stat is already drained, the "max" value will not drop all\n
4412 * the way down to the "cur" value.\n
4414 bool dec_stat(int stat, int amount, int permanent)
4416 int cur, max, loss, same, res = FALSE;
4419 /* Acquire current value */
4420 cur = p_ptr->stat_cur[stat];
4421 max = p_ptr->stat_max[stat];
4423 /* Note when the values are identical */
4424 same = (cur == max);
4426 /* Damage "current" value */
4429 /* Handle "low" values */
4432 if (amount > 90) cur--;
4433 if (amount > 50) cur--;
4434 if (amount > 20) cur--;
4438 /* Handle "high" values */
4441 /* Hack -- Decrement by a random amount between one-quarter */
4442 /* and one-half of the stat bonus times the percentage, with a */
4443 /* minimum damage of half the percentage. -CWS */
4444 loss = (((cur-18) / 2 + 1) / 2 + 1);
4447 if (loss < 1) loss = 1;
4449 /* Randomize the loss */
4450 loss = ((randint1(loss) + loss) * amount) / 100;
4453 if (loss < amount/2) loss = amount/2;
4455 /* Lose some points */
4458 /* Hack -- Only reduce stat to 17 sometimes */
4459 if (cur < 18) cur = (amount <= 20) ? 18 : 17;
4462 /* Prevent illegal values */
4463 if (cur < 3) cur = 3;
4465 /* Something happened */
4466 if (cur != p_ptr->stat_cur[stat]) res = TRUE;
4469 /* Damage "max" value */
4470 if (permanent && (max > 3))
4472 chg_virtue(V_SACRIFICE, 1);
4473 if (stat == A_WIS || stat == A_INT)
4474 chg_virtue(V_ENLIGHTEN, -2);
4476 /* Handle "low" values */
4479 if (amount > 90) max--;
4480 if (amount > 50) max--;
4481 if (amount > 20) max--;
4485 /* Handle "high" values */
4488 /* Hack -- Decrement by a random amount between one-quarter */
4489 /* and one-half of the stat bonus times the percentage, with a */
4490 /* minimum damage of half the percentage. -CWS */
4491 loss = (((max-18) / 2 + 1) / 2 + 1);
4492 loss = ((randint1(loss) + loss) * amount) / 100;
4493 if (loss < amount/2) loss = amount/2;
4495 /* Lose some points */
4498 /* Hack -- Only reduce stat to 17 sometimes */
4499 if (max < 18) max = (amount <= 20) ? 18 : 17;
4502 /* Hack -- keep it clean */
4503 if (same || (max < cur)) max = cur;
4505 /* Something happened */
4506 if (max != p_ptr->stat_max[stat]) res = TRUE;
4512 /* Actually set the stat to its new value. */
4513 p_ptr->stat_cur[stat] = cur;
4514 p_ptr->stat_max[stat] = max;
4516 /* Redisplay the stats later */
4517 p_ptr->redraw |= (PR_STATS);
4519 /* Recalculate bonuses */
4520 p_ptr->update |= (PU_BONUS);
4529 * @brief ¥×¥ì¥¤¥ä¡¼¤Î´ðËÜǽÎÏÃͤò²óÉü¤µ¤»¤ë / Restore a stat. Return TRUE only if this actually makes a difference.
4530 * @param stat ²óÉü¥¹¥Æ¡¼¥¿¥¹ID
4531 * @return ¼ÂºÝ¤Ë²óÉü¤·¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
4533 bool res_stat(int stat)
4535 /* Restore if needed */
4536 if (p_ptr->stat_cur[stat] != p_ptr->stat_max[stat])
4539 p_ptr->stat_cur[stat] = p_ptr->stat_max[stat];
4541 /* Recalculate bonuses */
4542 p_ptr->update |= (PU_BONUS);
4544 /* Redisplay the stats later */
4545 p_ptr->redraw |= (PR_STATS);
4551 /* Nothing to restore */
4557 * Increase players hit points, notice effects
4559 bool hp_player(int num)
4562 vir = virtue_number(V_VITALITY);
4565 num = num * (p_ptr->virtues[vir - 1] + 1250) / 1250;
4567 /* Healing needed */
4568 if (p_ptr->chp < p_ptr->mhp)
4570 if ((num > 0) && (p_ptr->chp < (p_ptr->mhp/3)))
4571 chg_virtue(V_TEMPERANCE, 1);
4572 /* Gain hitpoints */
4575 /* Enforce maximum */
4576 if (p_ptr->chp >= p_ptr->mhp)
4578 p_ptr->chp = p_ptr->mhp;
4579 p_ptr->chp_frac = 0;
4583 p_ptr->redraw |= (PR_HP);
4586 p_ptr->window |= (PW_PLAYER);
4592 msg_print("¾¯¤·µ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4594 msg_print("You feel a little better.");
4603 msg_print("µ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4605 msg_print("You feel better.");
4614 msg_print("¤È¤Æ¤âµ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4616 msg_print("You feel much better.");
4625 msg_print("¤Ò¤¸¤ç¤¦¤Ëµ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4627 msg_print("You feel very good.");
4642 * Array of stat "descriptions"
4644 static cptr desc_stat_pos[] =
4686 * Array of stat "descriptions"
4688 static cptr desc_stat_neg[] =
4712 bool do_dec_stat(int stat)
4716 /* Access the "sustain" */
4719 case A_STR: if (p_ptr->sustain_str) sust = TRUE; break;
4720 case A_INT: if (p_ptr->sustain_int) sust = TRUE; break;
4721 case A_WIS: if (p_ptr->sustain_wis) sust = TRUE; break;
4722 case A_DEX: if (p_ptr->sustain_dex) sust = TRUE; break;
4723 case A_CON: if (p_ptr->sustain_con) sust = TRUE; break;
4724 case A_CHR: if (p_ptr->sustain_chr) sust = TRUE; break;
4728 if (sust && (!ironman_nightmare || randint0(13)))
4732 msg_format("%s¤Ê¤Ã¤¿µ¤¤¬¤·¤¿¤¬¡¢¤¹¤°¤Ë¸µ¤ËÌá¤Ã¤¿¡£",
4734 msg_format("You feel %s for a moment, but the feeling passes.",
4737 desc_stat_neg[stat]);
4743 /* Attempt to reduce the stat */
4744 if (dec_stat(stat, 10, (ironman_nightmare && !randint0(13))))
4748 msg_format("¤Ò¤É¤¯%s¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£", desc_stat_neg[stat]);
4750 msg_format("You feel very %s.", desc_stat_neg[stat]);
4758 /* Nothing obvious */
4764 * Restore lost "points" in a stat
4766 bool do_res_stat(int stat)
4768 /* Attempt to increase */
4773 msg_format("¸µÄ̤ê¤Ë%s¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£", desc_stat_pos[stat]);
4775 msg_format("You feel less %s.", desc_stat_neg[stat]);
4783 /* Nothing obvious */
4789 * Gain a "point" in a stat
4791 bool do_inc_stat(int stat)
4795 /* Restore strength */
4796 res = res_stat(stat);
4798 /* Attempt to increase */
4803 chg_virtue(V_ENLIGHTEN, 1);
4804 chg_virtue(V_FAITH, 1);
4806 else if (stat == A_INT)
4808 chg_virtue(V_KNOWLEDGE, 1);
4809 chg_virtue(V_ENLIGHTEN, 1);
4811 else if (stat == A_CON)
4812 chg_virtue(V_VITALITY, 1);
4816 msg_format("¥ï¡¼¥ª¡ª¤È¤Æ¤â%s¤Ê¤Ã¤¿¡ª", desc_stat_pos[stat]);
4818 msg_format("Wow! You feel very %s!", desc_stat_pos[stat]);
4826 /* Restoration worked */
4831 msg_format("¸µÄ̤ê¤Ë%s¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£", desc_stat_pos[stat]);
4833 msg_format("You feel less %s.", desc_stat_neg[stat]);
4841 /* Nothing obvious */
4847 * Restores any drained experience
4849 bool restore_level(void)
4851 /* Restore experience */
4852 if (p_ptr->exp < p_ptr->max_exp)
4856 msg_print("·Ð¸³Ãͤ¬Ìá¤Ã¤Æ¤¤¿µ¤¤¬¤¹¤ë¡£");
4858 msg_print("You feel your experience returning.");
4862 /* Restore the experience */
4863 p_ptr->exp = p_ptr->max_exp;
4865 /* Check the experience */
4880 bool lose_all_info(void)
4884 chg_virtue(V_KNOWLEDGE, -5);
4885 chg_virtue(V_ENLIGHTEN, -5);
4887 /* Forget info about objects */
4888 for (i = 0; i < INVEN_TOTAL; i++)
4890 object_type *o_ptr = &inventory[i];
4892 /* Skip non-objects */
4893 if (!o_ptr->k_idx) continue;
4895 /* Allow "protection" by the MENTAL flag */
4896 if (o_ptr->ident & (IDENT_MENTAL)) continue;
4898 /* Remove "default inscriptions" */
4899 o_ptr->feeling = FEEL_NONE;
4901 /* Hack -- Clear the "empty" flag */
4902 o_ptr->ident &= ~(IDENT_EMPTY);
4904 /* Hack -- Clear the "known" flag */
4905 o_ptr->ident &= ~(IDENT_KNOWN);
4907 /* Hack -- Clear the "felt" flag */
4908 o_ptr->ident &= ~(IDENT_SENSE);
4911 /* Recalculate bonuses */
4912 p_ptr->update |= (PU_BONUS);
4914 /* Combine / Reorder the pack (later) */
4915 p_ptr->notice |= (PN_COMBINE | PN_REORDER);
4918 p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
4920 /* Mega-Hack -- Forget the map */
4928 void do_poly_wounds(void)
4930 /* Changed to always provide at least _some_ healing */
4931 s16b wounds = p_ptr->cut;
4932 s16b hit_p = (p_ptr->mhp - p_ptr->chp);
4933 s16b change = damroll(p_ptr->lev, 5);
4934 bool Nasty_effect = one_in_(5);
4936 if (!(wounds || hit_p || Nasty_effect)) return;
4939 msg_print("½ý¤¬¤è¤ê·Ú¤¤¤â¤Î¤ËÊѲ½¤·¤¿¡£");
4941 msg_print("Your wounds are polymorphed into less serious ones.");
4948 msg_print("¿·¤¿¤Ê½ý¤¬¤Ç¤¤¿¡ª");
4949 take_hit(DAMAGE_LOSELIFE, change / 2, "ÊѲ½¤·¤¿½ý", -1);
4951 msg_print("A new wound was created!");
4952 take_hit(DAMAGE_LOSELIFE, change / 2, "a polymorphed wound", -1);
4959 set_cut(p_ptr->cut - (change / 2));
4965 * Change player race
4967 void change_race(int new_race, cptr effect_msg)
4969 cptr title = race_info[new_race].title;
4970 int old_race = p_ptr->prace;
4973 msg_format("¤¢¤Ê¤¿¤Ï%s%s¤ËÊѲ½¤·¤¿¡ª", effect_msg, title);
4975 msg_format("You turn into %s %s%s!", (!effect_msg[0] && is_a_vowel(title[0]) ? "an" : "a"), effect_msg, title);
4978 chg_virtue(V_CHANCE, 2);
4980 if (p_ptr->prace < 32)
4982 p_ptr->old_race1 |= 1L << p_ptr->prace;
4986 p_ptr->old_race2 |= 1L << (p_ptr->prace-32);
4988 p_ptr->prace = new_race;
4989 rp_ptr = &race_info[p_ptr->prace];
4991 /* Experience factor */
4992 p_ptr->expfact = rp_ptr->r_exp + cp_ptr->c_exp;
4995 * The speed bonus of Klackons and Sprites are disabled
4996 * and the experience penalty is decreased.
4998 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)))
4999 p_ptr->expfact -= 15;
5001 /* Get character's height and weight */
5002 get_height_weight();
5005 if (p_ptr->pclass == CLASS_SORCERER)
5006 p_ptr->hitdie = rp_ptr->r_mhp/2 + cp_ptr->c_mhp + ap_ptr->a_mhp;
5008 p_ptr->hitdie = rp_ptr->r_mhp + cp_ptr->c_mhp + ap_ptr->a_mhp;
5010 do_cmd_rerate(FALSE);
5012 /* The experience level may be modified */
5015 p_ptr->redraw |= (PR_BASIC);
5017 p_ptr->update |= (PU_BONUS);
5021 /* Load an autopick preference file */
5022 if (old_race != p_ptr->prace) autopick_load_pref(FALSE);
5024 /* Player's graphic tile may change */
5029 void do_poly_self(void)
5031 int power = p_ptr->lev;
5034 msg_print("¤¢¤Ê¤¿¤ÏÊѲ½¤Îˬ¤ì¤ò´¶¤¸¤¿...");
5036 msg_print("You feel a change coming over you...");
5039 chg_virtue(V_CHANCE, 1);
5041 if ((power > randint0(20)) && one_in_(3) && (p_ptr->prace != RACE_ANDROID))
5043 char effect_msg[80] = "";
5046 /* Some form of racial polymorph... */
5049 if ((power > randint0(5)) && one_in_(4))
5054 if (p_ptr->psex == SEX_MALE)
5056 p_ptr->psex = SEX_FEMALE;
5057 sp_ptr = &sex_info[p_ptr->psex];
5059 sprintf(effect_msg, "½÷À¤Î");
5061 sprintf(effect_msg, "female ");
5067 p_ptr->psex = SEX_MALE;
5068 sp_ptr = &sex_info[p_ptr->psex];
5070 sprintf(effect_msg, "ÃËÀ¤Î");
5072 sprintf(effect_msg, "male ");
5078 if ((power > randint0(30)) && one_in_(5))
5082 /* Harmful deformity */
5089 (void)dec_stat(tmp, randint1(6) + 6, one_in_(3));
5095 /* Deformities are discriminated against! */
5096 (void)dec_stat(A_CHR, randint1(6), TRUE);
5102 sprintf(tmp_msg,"%s",effect_msg);
5103 sprintf(effect_msg,"´ñ·Á¤Î%s",tmp_msg);
5105 sprintf(tmp_msg,"%s ",effect_msg);
5106 sprintf(effect_msg,"deformed %s ",tmp_msg);
5113 sprintf(effect_msg,"´ñ·Á¤Î");
5115 sprintf(effect_msg,"deformed ");
5121 while ((power > randint0(20)) && one_in_(10))
5123 /* Polymorph into a less mutated form */
5126 if (!lose_mutation(0))
5128 msg_print("´ñ̯¤Ê¤¯¤é¤¤ÉáÄ̤ˤʤ俵¤¤¬¤¹¤ë¡£");
5130 msg_print("You feel oddly normal.");
5137 new_race = randint0(MAX_RACES);
5139 while ((new_race == p_ptr->prace) || (new_race == RACE_ANDROID));
5141 change_race(new_race, effect_msg);
5144 if ((power > randint0(30)) && one_in_(6))
5152 msg_format("%s¤Î¹½À®¤¬ÊѲ½¤·¤¿¡ª", p_ptr->prace == RACE_ANDROID ? "µ¡³£" : "Æâ¡");
5154 msg_print("Your internal organs are rearranged!");
5159 (void)dec_stat(tmp, randint1(6) + 6, one_in_(3));
5165 msg_print("¸½ºß¤Î»Ñ¤ÇÀ¸¤¤Æ¤¤¤¯¤Î¤Ïº¤Æñ¤Ê¤è¤¦¤À¡ª");
5166 take_hit(DAMAGE_LOSELIFE, damroll(randint1(10), p_ptr->lev), "Ã×̿Ū¤ÊÆÍÁ³ÊÑ°Û", -1);
5168 msg_print("You find living difficult in your present form!");
5169 take_hit(DAMAGE_LOSELIFE, damroll(randint1(10), p_ptr->lev), "a lethal mutation", -1);
5176 if ((power > randint0(20)) && one_in_(4))
5181 do_cmd_rerate(FALSE);
5184 while ((power > randint0(15)) && one_in_(3))
5187 (void)gain_random_mutation(0);
5190 if (power > randint0(5))
5196 /* Note: earlier deductions may have left power < 0 already. */
5206 * Decreases players hit points and sets death flag if necessary
5208 * XXX XXX XXX Invulnerability needs to be changed into a "shield"
5210 * XXX XXX XXX Hack -- this function allows the user to save (or quit)
5211 * the game when he dies, since the "You die." message is shown before
5212 * setting the player to "dead".
5215 int take_hit(int damage_type, int damage, cptr hit_from, int monspell)
5217 int old_chp = p_ptr->chp;
5219 char death_message[1024];
5222 int warning = (p_ptr->mhp * hitpoint_warn / 10);
5225 if (p_ptr->is_dead) return 0;
5227 if (p_ptr->sutemi) damage *= 2;
5228 if (p_ptr->special_defense & KATA_IAI) damage += (damage + 4) / 5;
5230 if (easy_band) damage = (damage+1)/2;
5232 if (damage_type != DAMAGE_USELIFE)
5242 if (monspell >= 0) learn_spell(monspell);
5244 /* Mega-Hack -- Apply "invulnerability" */
5245 if ((damage_type != DAMAGE_USELIFE) && (damage_type != DAMAGE_LOSELIFE))
5247 if (IS_INVULN() && (damage < 9000))
5249 if (damage_type == DAMAGE_FORCE)
5252 msg_print("¥Ð¥ê¥¢¤¬ÀÚ¤êÎö¤«¤ì¤¿¡ª");
5254 msg_print("The attack cuts your shield of invulnerability open!");
5257 else if (one_in_(PENETRATE_INVULNERABILITY))
5260 msg_print("̵Ũ¤Î¥Ð¥ê¥¢¤òÇˤäƹ¶·â¤µ¤ì¤¿¡ª");
5262 msg_print("The attack penetrates your shield of invulnerability!");
5271 if (CHECK_MULTISHADOW())
5273 if (damage_type == DAMAGE_FORCE)
5276 msg_print("¸¸±Æ¤â¤í¤È¤âÂΤ¬ÀÚ¤êÎö¤«¤ì¤¿¡ª");
5278 msg_print("The attack hits Shadow together with you!");
5281 else if (damage_type == DAMAGE_ATTACK)
5284 msg_print("¹¶·â¤Ï¸¸±Æ¤ËÌ¿Ã椷¡¢¤¢¤Ê¤¿¤Ë¤ÏÆϤ«¤Ê¤«¤Ã¤¿¡£");
5286 msg_print("The attack hits Shadow, you are unharmed!");
5292 if (p_ptr->wraith_form)
5294 if (damage_type == DAMAGE_FORCE)
5297 msg_print("Ⱦʪ¼Á¤ÎÂΤ¬ÀÚ¤êÎö¤«¤ì¤¿¡ª");
5299 msg_print("The attack cuts through your ethereal body!");
5305 if ((damage == 0) && one_in_(2)) damage = 1;
5309 if (p_ptr->special_defense & KATA_MUSOU)
5312 if ((damage == 0) && one_in_(2)) damage = 1;
5314 } /* not if LOSELIFE USELIFE */
5316 /* Hurt the player */
5317 p_ptr->chp -= damage;
5318 if(damage_type == DAMAGE_GENO && p_ptr->chp < 0)
5320 damage += p_ptr->chp;
5324 /* Display the hitpoints */
5325 p_ptr->redraw |= (PR_HP);
5328 p_ptr->window |= (PW_PLAYER);
5330 if (damage_type != DAMAGE_GENO && p_ptr->chp == 0)
5332 chg_virtue(V_SACRIFICE, 1);
5333 chg_virtue(V_CHANCE, 2);
5339 bool android = (p_ptr->prace == RACE_ANDROID ? TRUE : FALSE);
5341 #ifdef JP /* »à¤ó¤À»þ¤Ë¶¯À©½ªÎ»¤·¤Æ»à¤ò²óÈò¤Ç¤¤Ê¤¯¤·¤Æ¤ß¤¿ by Habu */
5343 if(!save_player()) msg_print("¥»¡¼¥Ö¼ºÇÔ¡ª");
5349 chg_virtue(V_SACRIFICE, 10);
5354 p_ptr->leaving = TRUE;
5357 p_ptr->is_dead = TRUE;
5359 if (p_ptr->inside_arena)
5361 cptr m_name = r_name+r_info[arena_info[p_ptr->arena_number].r_idx].name;
5363 msg_format("¤¢¤Ê¤¿¤Ï%s¤ÎÁ°¤ËÇÔ¤ìµî¤Ã¤¿¡£", m_name);
5365 msg_format("You are beaten by %s.", m_name);
5368 if (record_arena) do_cmd_write_nikki(NIKKI_ARENA, -1 - p_ptr->arena_number, m_name);
5372 int q_idx = quest_number(dun_level);
5373 bool seppuku = streq(hit_from, "Seppuku");
5374 bool winning_seppuku = p_ptr->total_winner && seppuku;
5376 play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_GAMEOVER);
5379 /* Make screen dump */
5380 screen_dump = make_screen_dump();
5383 /* Note cause of death */
5386 strcpy(p_ptr->died_from, hit_from);
5388 if (!winning_seppuku) strcpy(p_ptr->died_from, "ÀÚÊ¢");
5395 sprintf(dummy, "%s%s%s", !p_ptr->paralyzed ? "" : p_ptr->free_act ? "ĦÁü¾õÂÖ¤Ç" : "Ëãáã¾õÂÖ¤Ç", p_ptr->image ? "¸¸³Ð¤ËÏĤó¤À" : "", hit_from);
5397 sprintf(dummy, "%s%s", hit_from, !p_ptr->paralyzed ? "" : " while helpless");
5399 my_strcpy(p_ptr->died_from, dummy, sizeof p_ptr->died_from);
5402 /* No longer a winner */
5403 p_ptr->total_winner = FALSE;
5405 if (winning_seppuku)
5408 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "¾¡Íø¤Î¸åÀÚÊ¢¤·¤¿¡£");
5410 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "did Seppuku after the winning.");
5417 if (p_ptr->inside_arena)
5419 strcpy(buf,"¥¢¥ê¡¼¥Ê");
5421 strcpy(buf,"in the Arena");
5423 else if (!dun_level)
5427 strcpy(buf,"on the surface");
5429 else if (q_idx && (is_fixed_quest_idx(q_idx) &&
5430 !((q_idx == QUEST_OBERON) || (q_idx == QUEST_SERPENT))))
5432 strcpy(buf,"¥¯¥¨¥¹¥È");
5434 strcpy(buf,"in a quest");
5438 sprintf(buf,"%d³¬", dun_level);
5440 sprintf(buf,"level %d", dun_level);
5444 sprintf(tmp, "%s¤Ç%s¤Ë»¦¤µ¤ì¤¿¡£", buf, p_ptr->died_from);
5446 sprintf(tmp, "killed by %s %s.", p_ptr->died_from, buf);
5448 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, tmp);
5452 do_cmd_write_nikki(NIKKI_GAMESTART, 1, "-------- ¥²¡¼¥à¥ª¡¼¥Ð¡¼ --------");
5454 do_cmd_write_nikki(NIKKI_GAMESTART, 1, "-------- Game Over --------");
5456 do_cmd_write_nikki(NIKKI_BUNSHOU, 1, "\n\n\n\n");
5461 if (get_check_strict("²èÌ̤òÊݸ¤·¤Þ¤¹¤«¡©", CHECK_NO_HISTORY))
5463 if (get_check_strict("Dump the screen? ", CHECK_NO_HISTORY))
5466 do_cmd_save_screen();
5471 /* Initialize "last message" buffer */
5472 if (p_ptr->last_message) string_free(p_ptr->last_message);
5473 p_ptr->last_message = NULL;
5475 /* Hack -- Note death */
5479 msg_format("¤¢¤Ê¤¿¤Ï%s¤Þ¤·¤¿¡£", android ? "²õ¤ì" : "»à¤Ë");
5481 msg_print(android ? "You are broken." : "You die.");
5488 if (winning_seppuku)
5491 get_rnd_line("seppuku_j.txt", 0, death_message);
5493 get_rnd_line("seppuku.txt", 0, death_message);
5499 get_rnd_line("death_j.txt", 0, death_message);
5501 get_rnd_line("death.txt", 0, death_message);
5508 while (!get_string(winning_seppuku ? "¼À¤¤Î¶ç: " : "ÃÇËöËâ¤Î¶«¤Ó: ", death_message, 1024)) ;
5510 while (!get_string("Last word: ", death_message, 1024)) ;
5514 while (winning_seppuku && !get_check_strict("¤è¤í¤·¤¤¤Ç¤¹¤«¡©", CHECK_NO_HISTORY));
5516 while (winning_seppuku && !get_check_strict("Are you sure? ", CHECK_NO_HISTORY));
5519 if (death_message[0] == '\0')
5522 strcpy(death_message, format("¤¢¤Ê¤¿¤Ï%s¤Þ¤·¤¿¡£", android ? "²õ¤ì" : "»à¤Ë"));
5524 strcpy(death_message, android ? "You are broken." : "You die.");
5527 else p_ptr->last_message = string_make(death_message);
5530 if (winning_seppuku)
5535 int msg_pos_x[9] = { 5, 7, 9, 12, 14, 17, 19, 21, 23};
5536 int msg_pos_y[9] = { 3, 4, 5, 4, 5, 4, 5, 6, 4};
5543 for (i = 0; i < 40; i++)
5544 Term_putstr(randint0(w / 2) * 2, randint0(h), 2, TERM_VIOLET, "¦Ô");
5546 str = death_message;
5547 if (strncmp(str, "¡Ö", 2) == 0) str += 2;
5549 str2 = my_strstr(str, "¡×");
5550 if (str2 != NULL) *str2 = '\0';
5555 str2 = my_strstr(str, " ");
5556 if (str2 == NULL) len = strlen(str);
5557 else len = str2 - str;
5561 Term_putstr_v(w * 3 / 4 - 2 - msg_pos_x[i] * 2, msg_pos_y[i], len,
5563 if (str2 == NULL) break;
5567 if (*str == 0) break;
5571 Term_putstr(w-1, h-1, 1, TERM_WHITE, " ");
5575 /* Make screen dump */
5576 screen_dump = make_screen_dump();
5579 /* Wait a key press */
5584 msg_print(death_message);
5594 /* Hitpoint warning */
5595 if (p_ptr->chp < warning)
5597 /* Hack -- bell on first notice */
5598 if (old_chp > warning) bell();
5602 if (record_danger && (old_chp > warning))
5604 if (p_ptr->image && damage_type == DAMAGE_ATTACK)
5608 hit_from = "something";
5612 sprintf(tmp,"%s¤Ë¤è¤Ã¤Æ¥Ô¥ó¥Á¤Ë´Ù¤Ã¤¿¡£",hit_from);
5614 sprintf(tmp,"A critical situation because of %s.",hit_from);
5616 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, tmp);
5621 /* stop auto_more even if DAMAGE_USELIFE */
5627 msg_print("*** ·Ù¹ð:Äã¥Ò¥Ã¥È¡¦¥Ý¥¤¥ó¥È¡ª ***");
5629 msg_print("*** LOW HITPOINT WARNING! ***");
5635 if (p_ptr->wild_mode && !p_ptr->leaving && (p_ptr->chp < MAX(warning, p_ptr->mhp/5)))
5646 void gain_exp_64(s32b amount, u32b amount_frac)
5648 if (p_ptr->is_dead) return;
5650 if (p_ptr->prace == RACE_ANDROID) return;
5652 /* Gain some experience */
5653 s64b_add(&(p_ptr->exp), &(p_ptr->exp_frac), amount, amount_frac);
5655 /* Slowly recover from experience drainage */
5656 if (p_ptr->exp < p_ptr->max_exp)
5658 /* Gain max experience (20%) (was 10%) */
5659 p_ptr->max_exp += amount / 5;
5662 /* Check Experience */
5670 void gain_exp(s32b amount)
5672 gain_exp_64(amount, 0L);
5676 void calc_android_exp(void)
5680 if (p_ptr->is_dead) return;
5682 if (p_ptr->prace != RACE_ANDROID) return;
5684 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
5686 object_type *o_ptr = &inventory[i];
5688 object_type *q_ptr = &forge;
5690 int level = MAX(k_info[o_ptr->k_idx].level - 8, 1);
5692 if ((i == INVEN_RIGHT) || (i == INVEN_LEFT) || (i == INVEN_NECK) || (i == INVEN_LITE)) continue;
5693 if (!o_ptr->k_idx) continue;
5695 /* Wipe the object */
5698 object_copy(q_ptr, o_ptr);
5699 q_ptr->discount = 0;
5700 q_ptr->curse_flags = 0L;
5702 if (object_is_fixed_artifact(o_ptr))
5704 level = (level + MAX(a_info[o_ptr->name1].level - 8, 5)) / 2;
5705 level += MIN(20, a_info[o_ptr->name1].rarity/(a_info[o_ptr->name1].gen_flags & TRG_INSTA_ART ? 10 : 3));
5707 else if (object_is_ego(o_ptr))
5709 level += MAX(3, (e_info[o_ptr->name2].rating - 5)/2);
5711 else if (o_ptr->art_name)
5713 s32b total_flags = flag_cost(o_ptr, o_ptr->pval);
5716 if (!object_is_weapon_ammo(o_ptr))
5719 if (total_flags < 15000) fake_level = 10;
5720 else if (total_flags < 35000) fake_level = 25;
5721 else fake_level = 40;
5726 if (total_flags < 20000) fake_level = 10;
5727 else if (total_flags < 45000) fake_level = 25;
5728 else fake_level = 40;
5731 level = MAX(level, (level + MAX(fake_level - 8, 5)) / 2 + 3);
5734 value = object_value_real(q_ptr);
5736 if (value <= 0) continue;
5737 if ((o_ptr->tval == TV_SOFT_ARMOR) && (o_ptr->sval == SV_ABUNAI_MIZUGI) && (p_ptr->pseikaku != SEIKAKU_SEXY)) value /= 32;
5738 if (value > 5000000L) value = 5000000L;
5739 if ((o_ptr->tval == TV_DRAG_ARMOR) || (o_ptr->tval == TV_CARD)) level /= 2;
5741 if (object_is_artifact(o_ptr) || object_is_ego(o_ptr) ||
5742 (o_ptr->tval == TV_DRAG_ARMOR) ||
5743 ((o_ptr->tval == TV_HELM) && (o_ptr->sval == SV_DRAGON_HELM)) ||
5744 ((o_ptr->tval == TV_SHIELD) && (o_ptr->sval == SV_DRAGON_SHIELD)) ||
5745 ((o_ptr->tval == TV_GLOVES) && (o_ptr->sval == SV_SET_OF_DRAGON_GLOVES)) ||
5746 ((o_ptr->tval == TV_BOOTS) && (o_ptr->sval == SV_PAIR_OF_DRAGON_GREAVE)) ||
5747 ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DIAMOND_EDGE)))
5749 if (level > 65) level = 35 + (level - 65) / 5;
5750 else if (level > 35) level = 25 + (level - 35) / 3;
5751 else if (level > 15) level = 15 + (level - 15) / 2;
5752 exp = MIN(100000L, value) * level * level / 2;
5753 if (value > 100000L)
5754 exp += (value - 100000L) * level * level / 8;
5758 exp = MIN(100000L, value) * level;
5759 if (value > 100000L)
5760 exp += (value - 100000L) * level / 4;
5762 if ((((i == INVEN_RARM) || (i == INVEN_LARM)) && (buki_motteruka(i))) || (i == INVEN_BOW)) total_exp += exp / 48;
5763 else total_exp += exp / 16;
5764 if (i == INVEN_BODY) total_exp += exp / 32;
5766 p_ptr->exp = p_ptr->max_exp = total_exp;
5768 /* Check Experience */
5776 void lose_exp(s32b amount)
5778 if (p_ptr->prace == RACE_ANDROID) return;
5780 /* Never drop below zero experience */
5781 if (amount > p_ptr->exp) amount = p_ptr->exp;
5783 /* Lose some experience */
5784 p_ptr->exp -= amount;
5786 /* Check Experience */
5793 * If resisted to draining, return FALSE
5795 bool drain_exp(s32b drain, s32b slip, int hold_exp_prob)
5797 /* Androids and their mimics are never drained */
5798 if (p_ptr->prace == RACE_ANDROID) return FALSE;
5800 if (p_ptr->hold_exp && (randint0(100) < hold_exp_prob))
5802 /* Hold experience */
5804 msg_print("¤·¤«¤·¼«¸Ê¤Î·Ð¸³Ãͤò¼é¤ê¤¤Ã¤¿¡ª");
5806 msg_print("You keep hold of your experience!");
5811 /* Hold experience failed */
5812 if (p_ptr->hold_exp)
5815 msg_print("·Ð¸³Ãͤò¾¯¤·µÛ¤¤¼è¤é¤ì¤¿µ¤¤¬¤¹¤ë¡ª");
5817 msg_print("You feel your experience slipping away!");
5824 msg_print("·Ð¸³Ãͤ¬ÂΤ«¤éµÛ¤¤¼è¤é¤ì¤¿µ¤¤¬¤¹¤ë¡ª");
5826 msg_print("You feel your experience draining away!");
5835 bool set_ultimate_res(int v, bool do_dec)
5837 bool notice = FALSE;
5839 /* Hack -- Force good values */
5840 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
5842 if (p_ptr->is_dead) return FALSE;
5847 if (p_ptr->ult_res && !do_dec)
5849 if (p_ptr->ult_res > v) return FALSE;
5851 else if (!p_ptr->ult_res)
5854 msg_print("¤¢¤é¤æ¤ë¤³¤È¤ËÂФ·¤ÆÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
5856 msg_print("You feel resistant!");
5869 msg_print("¤¢¤é¤æ¤ë¤³¤È¤ËÂФ¹¤ëÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
5871 msg_print("You feel less resistant");
5881 /* Redraw status bar */
5882 p_ptr->redraw |= (PR_STATUS);
5884 /* Nothing to notice */
5885 if (!notice) return (FALSE);
5888 if (disturb_state) disturb(0, 0);
5890 /* Recalculate bonuses */
5891 p_ptr->update |= (PU_BONUS);
5900 bool set_tim_res_nether(int v, bool do_dec)
5902 bool notice = FALSE;
5904 /* Hack -- Force good values */
5905 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
5907 if (p_ptr->is_dead) return FALSE;
5912 if (p_ptr->tim_res_nether && !do_dec)
5914 if (p_ptr->tim_res_nether > v) return FALSE;
5916 else if (!p_ptr->tim_res_nether)
5919 msg_print("ÃϹö¤ÎÎϤËÂФ·¤ÆÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
5921 msg_print("You feel nether resistant!");
5931 if (p_ptr->tim_res_nether)
5934 msg_print("ÃϹö¤ÎÎϤËÂФ¹¤ëÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
5936 msg_print("You feel less nether resistant");
5944 p_ptr->tim_res_nether = v;
5946 /* Redraw status bar */
5947 p_ptr->redraw |= (PR_STATUS);
5949 /* Nothing to notice */
5950 if (!notice) return (FALSE);
5953 if (disturb_state) disturb(0, 0);
5955 /* Recalculate bonuses */
5956 p_ptr->update |= (PU_BONUS);
5965 bool set_tim_res_time(int v, bool do_dec)
5967 bool notice = FALSE;
5969 /* Hack -- Force good values */
5970 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
5972 if (p_ptr->is_dead) return FALSE;
5977 if (p_ptr->tim_res_time && !do_dec)
5979 if (p_ptr->tim_res_time > v) return FALSE;
5981 else if (!p_ptr->tim_res_time)
5984 msg_print("»þ´ÖµÕž¤ÎÎϤËÂФ·¤ÆÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
5986 msg_print("You feel time resistant!");
5996 if (p_ptr->tim_res_time)
5999 msg_print("»þ´ÖµÕž¤ÎÎϤËÂФ¹¤ëÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
6001 msg_print("You feel less time resistant");
6009 p_ptr->tim_res_time = v;
6011 /* Redraw status bar */
6012 p_ptr->redraw |= (PR_STATUS);
6014 /* Nothing to notice */
6015 if (!notice) return (FALSE);
6018 if (disturb_state) disturb(0, 0);
6020 /* Recalculate bonuses */
6021 p_ptr->update |= (PU_BONUS);
6032 * Choose a warrior-mage elemental attack. -LM-
6034 bool choose_ele_attack(void)
6040 if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM))
6043 msg_format("Éð´ï¤ò»ý¤¿¤Ê¤¤¤ÈËâË¡·õ¤Ï»È¤¨¤Ê¤¤¡£");
6045 msg_format("You cannot use temporary branding with no weapon.");
6053 num = (p_ptr->lev - 20) / 5;
6056 c_prt(TERM_RED, " a) ¾Æ´þ", 2, 14);
6058 c_prt(TERM_RED, " a) Fire Brand", 2, 14);
6062 if (num >= 2) c_prt(TERM_L_WHITE," b) Åà·ë", 3, 14);
6064 if (num >= 2) c_prt(TERM_L_WHITE," b) Cold Brand", 3, 14);
6066 else prt("", 3, 14);
6069 if (num >= 3) c_prt(TERM_GREEN, " c) ÆÇ»¦", 4, 14);
6071 if (num >= 3) c_prt(TERM_GREEN, " c) Poison Brand", 4, 14);
6073 else prt("", 4, 14);
6076 if (num >= 4) c_prt(TERM_L_DARK, " d) Íϲò", 5, 14);
6078 if (num >= 4) c_prt(TERM_L_DARK, " d) Acid Brand", 5, 14);
6080 else prt("", 5, 14);
6083 if (num >= 5) c_prt(TERM_BLUE, " e) ÅÅ·â", 6, 14);
6085 if (num >= 5) c_prt(TERM_BLUE, " e) Elec Brand", 6, 14);
6087 else prt("", 6, 14);
6095 prt(" ¤É¤Î¸µÁǹ¶·â¤ò¤·¤Þ¤¹¤«¡©", 1, 14);
6097 prt(" Choose a temporary elemental brand ", 1, 14);
6102 if ((choice == 'a') || (choice == 'A'))
6103 set_ele_attack(ATTACK_FIRE, p_ptr->lev/2 + randint1(p_ptr->lev/2));
6104 else if (((choice == 'b') || (choice == 'B')) && (num >= 2))
6105 set_ele_attack(ATTACK_COLD, p_ptr->lev/2 + randint1(p_ptr->lev/2));
6106 else if (((choice == 'c') || (choice == 'C')) && (num >= 3))
6107 set_ele_attack(ATTACK_POIS, p_ptr->lev/2 + randint1(p_ptr->lev/2));
6108 else if (((choice == 'd') || (choice == 'D')) && (num >= 4))
6109 set_ele_attack(ATTACK_ACID, p_ptr->lev/2 + randint1(p_ptr->lev/2));
6110 else if (((choice == 'e') || (choice == 'E')) && (num >= 5))
6111 set_ele_attack(ATTACK_ELEC, p_ptr->lev/2 + randint1(p_ptr->lev/2));
6115 msg_print("ËâË¡·õ¤ò»È¤¦¤Î¤ò¤ä¤á¤¿¡£");
6117 msg_print("You cancel the temporary branding.");
6129 * Choose a elemental immune. -LM-
6131 bool choose_ele_immune(int turn)
6139 c_prt(TERM_RED, " a) ²Ð±ê", 2, 14);
6141 c_prt(TERM_RED, " a) Immune Fire", 2, 14);
6145 c_prt(TERM_L_WHITE," b) Î䵤", 3, 14);
6147 c_prt(TERM_L_WHITE," b) Immune Cold", 3, 14);
6151 c_prt(TERM_L_DARK, " c) »À", 4, 14);
6153 c_prt(TERM_L_DARK, " c) Immune Acid", 4, 14);
6157 c_prt(TERM_BLUE, " d) ÅÅ·â", 5, 14);
6159 c_prt(TERM_BLUE, " d) Immune Elec", 5, 14);
6170 prt(" ¤É¤Î¸µÁǤÎÌȱ֤ò¤Ä¤±¤Þ¤¹¤«¡©", 1, 14);
6172 prt(" Choose a temporary elemental immune ", 1, 14);
6177 if ((choice == 'a') || (choice == 'A'))
6178 set_ele_immune(DEFENSE_FIRE, turn);
6179 else if ((choice == 'b') || (choice == 'B'))
6180 set_ele_immune(DEFENSE_COLD, turn);
6181 else if ((choice == 'c') || (choice == 'C'))
6182 set_ele_immune(DEFENSE_ACID, turn);
6183 else if ((choice == 'd') || (choice == 'D'))
6184 set_ele_immune(DEFENSE_ELEC, turn);
6188 msg_print("Ìȱ֤òÉÕ¤±¤ë¤Î¤ò¤ä¤á¤¿¡£");
6190 msg_print("You cancel the temporary immune.");