4 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
6 * This software may be copied and distributed for educational, research,
7 * and not for profit purposes provided that this copyright and statement
8 * are included in all such copies. Other copyrights may also apply.
11 /* Purpose: effects of various "objects" */
15 void set_action(int typ)
17 int prev_typ = p_ptr->action;
30 msg_print("õº÷¤ò¤ä¤á¤¿¡£");
32 msg_print("You no longer walk carefully.");
34 p_ptr->redraw |= (PR_SPEED);
45 msg_print("³Ø½¬¤ò¤ä¤á¤¿¡£");
47 msg_print("You stop Learning");
55 msg_print("¹½¤¨¤ò¤È¤¤¤¿¡£");
57 msg_print("You stop assuming the posture.");
59 p_ptr->special_defense &= ~(KAMAE_MASK);
65 msg_print("·¿¤òÊø¤·¤¿¡£");
67 msg_print("You stop assuming the posture.");
69 p_ptr->special_defense &= ~(KATA_MASK);
70 p_ptr->update |= (PU_MONSTERS);
71 p_ptr->redraw |= (PR_STATUS);
77 msg_print("²Î¤¦¤Î¤ò¤ä¤á¤¿¡£");
79 msg_print("You stop singing.");
86 msg_print("¤¬½Å¤¯¤Ê¤Ã¤¿¡£");
88 msg_print("You are no longer walking extremely fast.");
97 /* If we are requested other action, stop singing */
98 if (prev_typ == ACTION_SING) stop_singing();
100 switch (p_ptr->action)
105 msg_print("Ãí°Õ¿¼¤¯Ê⤻Ϥ᤿¡£");
107 msg_print("You begin to walk carefully.");
109 p_ptr->redraw |= (PR_SPEED);
115 msg_print("³Ø½¬¤ò»Ï¤á¤¿¡£");
117 msg_print("You begin Learning");
124 msg_print("¿åÌ̤˻å¤ò¿â¤é¤·¤¿¡¥¡¥¡¥");
126 msg_print("You begin fishing...");
130 case ACTION_HAYAGAKE:
133 msg_print("¤¬±©¤Î¤è¤¦¤Ë·Ú¤¯¤Ê¤Ã¤¿¡£");
135 msg_print("You begin to walk extremely fast.");
145 /* Recalculate bonuses */
146 p_ptr->update |= (PU_BONUS);
148 /* Redraw the state */
149 p_ptr->redraw |= (PR_STATE);
152 /* reset timed flags */
153 void reset_tim_flags(void)
155 p_ptr->fast = 0; /* Timed -- Fast */
156 p_ptr->lightspeed = 0;
157 p_ptr->slow = 0; /* Timed -- Slow */
158 p_ptr->blind = 0; /* Timed -- Blindness */
159 p_ptr->paralyzed = 0; /* Timed -- Paralysis */
160 p_ptr->confused = 0; /* Timed -- Confusion */
161 p_ptr->afraid = 0; /* Timed -- Fear */
162 p_ptr->image = 0; /* Timed -- Hallucination */
163 p_ptr->poisoned = 0; /* Timed -- Poisoned */
164 p_ptr->cut = 0; /* Timed -- Cut */
165 p_ptr->stun = 0; /* Timed -- Stun */
167 p_ptr->protevil = 0; /* Timed -- Protection */
168 p_ptr->invuln = 0; /* Timed -- Invulnerable */
170 p_ptr->hero = 0; /* Timed -- Heroism */
171 p_ptr->shero = 0; /* Timed -- Super Heroism */
172 p_ptr->shield = 0; /* Timed -- Shield Spell */
173 p_ptr->blessed = 0; /* Timed -- Blessed */
174 p_ptr->tim_invis = 0; /* Timed -- Invisibility */
175 p_ptr->tim_infra = 0; /* Timed -- Infra Vision */
176 p_ptr->tim_regen = 0; /* Timed -- Regeneration */
177 p_ptr->tim_stealth = 0; /* Timed -- Stealth */
179 p_ptr->wraith_form = 0; /* Timed -- Wraith Form */
180 p_ptr->tim_levitation = 0;
181 p_ptr->tim_sh_touki = 0;
182 p_ptr->tim_sh_fire = 0;
183 p_ptr->tim_sh_holy = 0;
184 p_ptr->tim_eyeeye = 0;
185 p_ptr->resist_magic = 0;
188 p_ptr->tim_res_nether = 0;
189 p_ptr->tim_res_time = 0;
190 p_ptr->tim_mimic = 0;
191 p_ptr->mimic_form = 0;
192 p_ptr->tim_reflect = 0;
193 p_ptr->multishadow = 0;
195 p_ptr->action = ACTION_NONE;
198 p_ptr->oppose_acid = 0; /* Timed -- oppose acid */
199 p_ptr->oppose_elec = 0; /* Timed -- oppose lightning */
200 p_ptr->oppose_fire = 0; /* Timed -- oppose heat */
201 p_ptr->oppose_cold = 0; /* Timed -- oppose cold */
202 p_ptr->oppose_pois = 0; /* Timed -- oppose poison */
204 p_ptr->word_recall = 0;
205 p_ptr->alter_reality = 0;
206 p_ptr->sutemi = FALSE;
207 p_ptr->counter = FALSE;
208 p_ptr->ele_attack = 0;
209 p_ptr->ele_immune = 0;
210 p_ptr->special_attack = 0L;
211 p_ptr->special_defense = 0L;
213 while(p_ptr->energy_need < 0) p_ptr->energy_need += ENERGY_NEED();
214 world_player = FALSE;
216 if (prace_is_(RACE_DEMON) && (p_ptr->lev > 44)) p_ptr->oppose_fire = 1;
217 if ((p_ptr->pclass == CLASS_NINJA) && (p_ptr->lev > 44)) p_ptr->oppose_pois = 1;
218 if (p_ptr->pclass == CLASS_BERSERKER) p_ptr->shero = 1;
222 (void)set_monster_fast(p_ptr->riding, 0);
223 (void)set_monster_slow(p_ptr->riding, 0);
224 (void)set_monster_invulner(p_ptr->riding, 0, FALSE);
227 if (p_ptr->pclass == CLASS_BARD)
229 p_ptr->magic_num1[0] = 0;
230 p_ptr->magic_num2[0] = 0;
235 void dispel_player(void)
237 (void)set_fast(0, TRUE);
238 (void)set_lightspeed(0, TRUE);
239 (void)set_slow(0, TRUE);
240 (void)set_shield(0, TRUE);
241 (void)set_blessed(0, TRUE);
242 (void)set_tsuyoshi(0, TRUE);
243 (void)set_hero(0, TRUE);
244 (void)set_shero(0, TRUE);
245 (void)set_protevil(0, TRUE);
246 (void)set_invuln(0, TRUE);
247 (void)set_wraith_form(0, TRUE);
248 (void)set_kabenuke(0, TRUE);
249 (void)set_tim_res_nether(0, TRUE);
250 (void)set_tim_res_time(0, TRUE);
252 (void)set_tim_reflect(0,TRUE);
253 (void)set_multishadow(0,TRUE);
254 (void)set_dustrobe(0,TRUE);
256 (void)set_tim_invis(0, TRUE);
257 (void)set_tim_infra(0, TRUE);
258 (void)set_tim_esp(0, TRUE);
259 (void)set_tim_regen(0, TRUE);
260 (void)set_tim_stealth(0, TRUE);
261 (void)set_tim_levitation(0, TRUE);
262 (void)set_tim_sh_touki(0, TRUE);
263 (void)set_tim_sh_fire(0, TRUE);
264 (void)set_tim_sh_holy(0, TRUE);
265 (void)set_tim_eyeeye(0, TRUE);
266 (void)set_magicdef(0, TRUE);
267 (void)set_resist_magic(0, TRUE);
268 (void)set_oppose_acid(0, TRUE);
269 (void)set_oppose_elec(0, TRUE);
270 (void)set_oppose_fire(0, TRUE);
271 (void)set_oppose_cold(0, TRUE);
272 (void)set_oppose_pois(0, TRUE);
273 (void)set_ultimate_res(0, TRUE);
274 (void)set_mimic(0, 0, TRUE);
275 (void)set_ele_attack(0, 0);
276 (void)set_ele_immune(0, 0);
278 /* Cancel glowing hands */
279 if (p_ptr->special_attack & ATTACK_CONFUSE)
281 p_ptr->special_attack &= ~(ATTACK_CONFUSE);
283 msg_print("¼ê¤Îµ±¤¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
285 msg_print("Your hands stop glowing.");
289 if (music_singing_any())
291 p_ptr->magic_num1[1] = p_ptr->magic_num1[0];
292 p_ptr->magic_num1[0] = 0;
294 msg_print("²Î¤¬ÅÓÀڤ줿¡£");
296 msg_print("Your singing is interrupted.");
298 p_ptr->action = ACTION_NONE;
300 /* Recalculate bonuses */
301 p_ptr->update |= (PU_BONUS | PU_HP);
304 p_ptr->redraw |= (PR_MAP | PR_STATUS | PR_STATE);
306 /* Update monsters */
307 p_ptr->update |= (PU_MONSTERS);
310 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
312 p_ptr->energy_need += ENERGY_NEED();
318 * Set "p_ptr->tim_mimic", and "p_ptr->mimic_form",
319 * notice observable changes
321 bool set_mimic(int v, int p, bool do_dec)
325 /* Hack -- Force good values */
326 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
328 if (p_ptr->is_dead) return FALSE;
333 if (p_ptr->tim_mimic && (p_ptr->mimic_form == p) && !do_dec)
335 if (p_ptr->tim_mimic > v) return FALSE;
337 else if ((!p_ptr->tim_mimic) || (p_ptr->mimic_form != p))
340 msg_print("¼«Ê¬¤ÎÂΤ¬ÊѤï¤Ã¤Æ¤æ¤¯¤Î¤ò´¶¤¸¤¿¡£");
342 msg_print("You feel that your body changes.");
352 if (p_ptr->tim_mimic)
355 msg_print("ÊѿȤ¬²ò¤±¤¿¡£");
357 msg_print("You are no longer transformed.");
359 if (p_ptr->mimic_form == MIMIC_DEMON) set_oppose_fire(0, TRUE);
367 p_ptr->tim_mimic = v;
369 /* Nothing to notice */
378 p_ptr->redraw |= (PR_BASIC | PR_STATUS);
380 /* Recalculate bonuses */
381 p_ptr->update |= (PU_BONUS | PU_HP);
390 * Set "p_ptr->blind", notice observable changes
392 * Note the use of "PU_UN_LITE" and "PU_UN_VIEW", which is needed to
393 * memorize any terrain features which suddenly become "visible".
394 * Note that blindness is currently the only thing which can affect
395 * "player_can_see_bold()".
397 bool set_blind(int v)
401 /* Hack -- Force good values */
402 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
404 if (p_ptr->is_dead) return FALSE;
411 if (p_ptr->prace == RACE_ANDROID)
414 msg_print("¥»¥ó¥µ¡¼¤ò¤ä¤é¤ì¤¿¡ª");
416 msg_print("You are blind!");
422 msg_print("Ìܤ¬¸«¤¨¤Ê¤¯¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¡ª");
424 msg_print("You are blind!");
429 chg_virtue(V_ENLIGHTEN, -1);
438 if (p_ptr->prace == RACE_ANDROID)
441 msg_print("¥»¥ó¥µ¡¼¤¬Éüµì¤·¤¿¡£");
443 msg_print("You can see again.");
449 msg_print("¤ä¤Ã¤ÈÌܤ¬¸«¤¨¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£");
451 msg_print("You can see again.");
462 /* Redraw status bar */
463 p_ptr->redraw |= (PR_STATUS);
465 /* Nothing to notice */
466 if (!notice) return (FALSE);
469 if (disturb_state) disturb(0, 0);
471 /* Fully update the visuals */
472 p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE | PU_VIEW | PU_LITE | PU_MONSTERS | PU_MON_LITE);
475 p_ptr->redraw |= (PR_MAP);
478 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
489 * Set "p_ptr->confused", notice observable changes
491 bool set_confused(int v)
495 /* Hack -- Force good values */
496 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
498 if (p_ptr->is_dead) return FALSE;
503 if (!p_ptr->confused)
506 msg_print("¤¢¤Ê¤¿¤Ïº®Í𤷤¿¡ª");
508 msg_print("You are confused!");
511 if (p_ptr->action == ACTION_LEARN)
514 msg_print("³Ø½¬¤¬Â³¤±¤é¤ì¤Ê¤¤¡ª");
516 msg_print("You cannot continue Learning!");
520 p_ptr->redraw |= (PR_STATE);
521 p_ptr->action = ACTION_NONE;
523 if (p_ptr->action == ACTION_KAMAE)
526 msg_print("¹½¤¨¤¬¤È¤±¤¿¡£");
528 msg_print("Your posture gets loose.");
530 p_ptr->special_defense &= ~(KAMAE_MASK);
531 p_ptr->update |= (PU_BONUS);
532 p_ptr->redraw |= (PR_STATE);
533 p_ptr->action = ACTION_NONE;
535 else if (p_ptr->action == ACTION_KATA)
538 msg_print("·¿¤¬Êø¤ì¤¿¡£");
540 msg_print("Your posture gets loose.");
542 p_ptr->special_defense &= ~(KATA_MASK);
543 p_ptr->update |= (PU_BONUS);
544 p_ptr->update |= (PU_MONSTERS);
545 p_ptr->redraw |= (PR_STATE);
546 p_ptr->redraw |= (PR_STATUS);
547 p_ptr->action = ACTION_NONE;
551 p_ptr->counter = FALSE;
552 chg_virtue(V_HARMONY, -1);
562 msg_print("¤ä¤Ã¤Èº®Í𤬤ª¤µ¤Þ¤Ã¤¿¡£");
564 msg_print("You feel less confused now.");
567 p_ptr->special_attack &= ~(ATTACK_SUIKEN);
575 /* Redraw status bar */
576 p_ptr->redraw |= (PR_STATUS);
578 /* Nothing to notice */
579 if (!notice) return (FALSE);
582 if (disturb_state) disturb(0, 0);
593 * Set "p_ptr->poisoned", notice observable changes
595 bool set_poisoned(int v)
599 /* Hack -- Force good values */
600 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
602 if (p_ptr->is_dead) return FALSE;
607 if (!p_ptr->poisoned)
610 msg_print("ÆǤ˿¯¤µ¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª");
612 msg_print("You are poisoned!");
625 msg_print("¤ä¤Ã¤ÈÆǤÎÄˤߤ¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
627 msg_print("You are no longer poisoned.");
637 /* Redraw status bar */
638 p_ptr->redraw |= (PR_STATUS);
640 /* Nothing to notice */
641 if (!notice) return (FALSE);
644 if (disturb_state) disturb(0, 0);
655 * Set "p_ptr->afraid", notice observable changes
657 bool set_afraid(int v)
661 /* Hack -- Force good values */
662 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
664 if (p_ptr->is_dead) return FALSE;
672 msg_print("²¿¤â¤«¤â¶²¤¯¤Ê¤Ã¤Æ¤¤¿¡ª");
674 msg_print("You are terrified!");
677 if (p_ptr->special_defense & KATA_MASK)
680 msg_print("·¿¤¬Êø¤ì¤¿¡£");
682 msg_print("Your posture gets loose.");
684 p_ptr->special_defense &= ~(KATA_MASK);
685 p_ptr->update |= (PU_BONUS);
686 p_ptr->update |= (PU_MONSTERS);
687 p_ptr->redraw |= (PR_STATE);
688 p_ptr->redraw |= (PR_STATUS);
689 p_ptr->action = ACTION_NONE;
693 p_ptr->counter = FALSE;
694 chg_virtue(V_VALOUR, -1);
704 msg_print("¤ä¤Ã¤È¶²Éݤò¿¶¤êʧ¤Ã¤¿¡£");
706 msg_print("You feel bolder now.");
716 /* Redraw status bar */
717 p_ptr->redraw |= (PR_STATUS);
719 /* Nothing to notice */
720 if (!notice) return (FALSE);
723 if (disturb_state) disturb(0, 0);
734 * Set "p_ptr->paralyzed", notice observable changes
736 bool set_paralyzed(int v)
740 /* Hack -- Force good values */
741 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
743 if (p_ptr->is_dead) return FALSE;
748 if (!p_ptr->paralyzed)
751 msg_print("ÂΤ¬Ëãá㤷¤Æ¤·¤Þ¤Ã¤¿¡ª");
753 msg_print("You are paralyzed!");
756 p_ptr->counter = FALSE;
764 if (p_ptr->paralyzed)
767 msg_print("¤ä¤Ã¤ÈÆ°¤±¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£");
769 msg_print("You can move again.");
777 p_ptr->paralyzed = v;
779 /* Redraw status bar */
780 p_ptr->redraw |= (PR_STATUS);
782 /* Nothing to notice */
783 if (!notice) return (FALSE);
786 if (disturb_state) disturb(0, 0);
788 /* Redraw the state */
789 p_ptr->redraw |= (PR_STATE);
800 * Set "p_ptr->image", notice observable changes
802 * Note that we must redraw the map when hallucination changes.
804 bool set_image(int v)
808 /* Hack -- Force good values */
809 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
811 if (p_ptr->is_dead) return FALSE;
817 set_tsuyoshi(0, TRUE);
821 msg_print("¥ï¡¼¥ª¡ª²¿¤â¤«¤âÆú¿§¤Ë¸«¤¨¤ë¡ª");
823 msg_print("Oh, wow! Everything looks so cosmic now!");
826 p_ptr->counter = FALSE;
837 msg_print("¤ä¤Ã¤È¤Ï¤Ã¤¤ê¤Èʪ¤¬¸«¤¨¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£");
839 msg_print("You can see clearly again.");
849 /* Redraw status bar */
850 p_ptr->redraw |= (PR_STATUS);
852 /* Nothing to notice */
853 if (!notice) return (FALSE);
856 if (disturb_state) disturb(0, 0);
859 p_ptr->redraw |= (PR_MAP);
861 /* Update monsters */
862 p_ptr->update |= (PU_MONSTERS);
865 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
876 * Set "p_ptr->fast", notice observable changes
878 bool set_fast(int v, bool do_dec)
882 /* Hack -- Force good values */
883 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
885 if (p_ptr->is_dead) return FALSE;
890 if (p_ptr->fast && !do_dec)
892 if (p_ptr->fast > v) return FALSE;
894 else if (!IS_FAST() && !p_ptr->lightspeed)
897 msg_print("ÁÇÁ᤯ư¤±¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡ª");
899 msg_print("You feel yourself moving much faster!");
903 chg_virtue(V_PATIENCE, -1);
904 chg_virtue(V_DILIGENCE, 1);
911 if (p_ptr->fast && !p_ptr->lightspeed && !music_singing(MUSIC_SPEED) && !music_singing(MUSIC_SHERO))
914 msg_print("Æ°¤¤ÎÁÇÁᤵ¤¬¤Ê¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£");
916 msg_print("You feel yourself slow down.");
926 /* Nothing to notice */
927 if (!notice) return (FALSE);
930 if (disturb_state) disturb(0, 0);
932 /* Recalculate bonuses */
933 p_ptr->update |= (PU_BONUS);
944 * Set "p_ptr->lightspeed", notice observable changes
946 bool set_lightspeed(int v, bool do_dec)
950 /* Hack -- Force good values */
951 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
953 if (p_ptr->is_dead) return FALSE;
958 if (p_ptr->lightspeed && !do_dec)
960 if (p_ptr->lightspeed > v) return FALSE;
962 else if (!p_ptr->lightspeed)
965 msg_print("Èó¾ï¤ËÁÇÁ᤯ư¤±¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡ª");
967 msg_print("You feel yourself moving extremely faster!");
971 chg_virtue(V_PATIENCE, -1);
972 chg_virtue(V_DILIGENCE, 1);
979 if (p_ptr->lightspeed)
982 msg_print("Æ°¤¤ÎÁÇÁᤵ¤¬¤Ê¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£");
984 msg_print("You feel yourself slow down.");
992 p_ptr->lightspeed = v;
994 /* Nothing to notice */
995 if (!notice) return (FALSE);
998 if (disturb_state) disturb(0, 0);
1000 /* Recalculate bonuses */
1001 p_ptr->update |= (PU_BONUS);
1012 * Set "p_ptr->slow", notice observable changes
1014 bool set_slow(int v, bool do_dec)
1016 bool notice = FALSE;
1018 /* Hack -- Force good values */
1019 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1021 if (p_ptr->is_dead) return FALSE;
1026 if (p_ptr->slow && !do_dec)
1028 if (p_ptr->slow > v) return FALSE;
1030 else if (!p_ptr->slow)
1033 msg_print("ÂΤÎÆ°¤¤¬ÃÙ¤¯¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¡ª");
1035 msg_print("You feel yourself moving slower!");
1048 msg_print("Æ°¤¤ÎÃÙ¤µ¤¬¤Ê¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£");
1050 msg_print("You feel yourself speed up.");
1060 /* Nothing to notice */
1061 if (!notice) return (FALSE);
1064 if (disturb_state) disturb(0, 0);
1066 /* Recalculate bonuses */
1067 p_ptr->update |= (PU_BONUS);
1078 * Set "p_ptr->shield", notice observable changes
1080 bool set_shield(int v, bool do_dec)
1082 bool notice = FALSE;
1084 /* Hack -- Force good values */
1085 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1087 if (p_ptr->is_dead) return FALSE;
1092 if (p_ptr->shield && !do_dec)
1094 if (p_ptr->shield > v) return FALSE;
1096 else if (!p_ptr->shield)
1099 msg_print("È©¤¬ÀФˤʤä¿¡£");
1101 msg_print("Your skin turns to stone.");
1114 msg_print("È©¤¬¸µ¤ËÌá¤Ã¤¿¡£");
1116 msg_print("Your skin returns to normal.");
1126 /* Redraw status bar */
1127 p_ptr->redraw |= (PR_STATUS);
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);
1148 * Set "p_ptr->tsubureru", notice observable changes
1150 bool set_tsubureru(int v, bool do_dec)
1152 bool notice = FALSE;
1154 /* Hack -- Force good values */
1155 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1157 if (p_ptr->is_dead) return FALSE;
1162 if (p_ptr->tsubureru && !do_dec)
1164 if (p_ptr->tsubureru > v) return FALSE;
1166 else if (!p_ptr->tsubureru)
1169 msg_print("²£¤Ë¿¤Ó¤¿¡£");
1171 msg_print("Your body expands horizontally.");
1181 if (p_ptr->tsubureru)
1184 msg_print("¤â¤¦²£¤Ë¿¤Ó¤Æ¤¤¤Ê¤¤¡£");
1186 msg_print("Your body returns to normal.");
1194 p_ptr->tsubureru = v;
1196 /* Redraw status bar */
1197 p_ptr->redraw |= (PR_STATUS);
1199 /* Nothing to notice */
1200 if (!notice) return (FALSE);
1203 if (disturb_state) disturb(0, 0);
1205 /* Recalculate bonuses */
1206 p_ptr->update |= (PU_BONUS);
1218 * Set "p_ptr->magicdef", notice observable changes
1220 bool set_magicdef(int v, bool do_dec)
1222 bool notice = FALSE;
1224 /* Hack -- Force good values */
1225 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1227 if (p_ptr->is_dead) return FALSE;
1232 if (p_ptr->magicdef && !do_dec)
1234 if (p_ptr->magicdef > v) return FALSE;
1236 else if (!p_ptr->magicdef)
1239 msg_print("ËâË¡¤ÎËɸæÎϤ¬Áý¤·¤¿¤è¤¦¤Êµ¤¤¬¤¹¤ë¡£");
1241 msg_print("You feel more resistant to magic.");
1251 if (p_ptr->magicdef)
1254 msg_print("ËâË¡¤ÎËɸæÎϤ¬¸µ¤ËÌá¤Ã¤¿¡£");
1256 msg_print("You feel less resistant to magic.");
1264 p_ptr->magicdef = v;
1266 /* Redraw status bar */
1267 p_ptr->redraw |= (PR_STATUS);
1269 /* Nothing to notice */
1270 if (!notice) return (FALSE);
1273 if (disturb_state) disturb(0, 0);
1275 /* Recalculate bonuses */
1276 p_ptr->update |= (PU_BONUS);
1288 * Set "p_ptr->blessed", notice observable changes
1290 bool set_blessed(int v, bool do_dec)
1292 bool notice = FALSE;
1294 /* Hack -- Force good values */
1295 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1297 if (p_ptr->is_dead) return FALSE;
1302 if (p_ptr->blessed && !do_dec)
1304 if (p_ptr->blessed > v) return FALSE;
1306 else if (!IS_BLESSED())
1309 msg_print("¹â·é¤Êµ¤Ê¬¤Ë¤Ê¤Ã¤¿¡ª");
1311 msg_print("You feel righteous!");
1321 if (p_ptr->blessed && !music_singing(MUSIC_BLESS))
1324 msg_print("¹â·é¤Êµ¤Ê¬¤¬¾Ã¤¨¼º¤»¤¿¡£");
1326 msg_print("The prayer has expired.");
1336 /* Redraw status bar */
1337 p_ptr->redraw |= (PR_STATUS);
1339 /* Nothing to notice */
1340 if (!notice) return (FALSE);
1343 if (disturb_state) disturb(0, 0);
1345 /* Recalculate bonuses */
1346 p_ptr->update |= (PU_BONUS);
1357 * Set "p_ptr->hero", notice observable changes
1359 bool set_hero(int v, bool do_dec)
1361 bool notice = FALSE;
1363 /* Hack -- Force good values */
1364 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1366 if (p_ptr->is_dead) return FALSE;
1371 if (p_ptr->hero && !do_dec)
1373 if (p_ptr->hero > v) return FALSE;
1375 else if (!IS_HERO())
1378 msg_print("¥Ò¡¼¥í¡¼¤Ë¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡ª");
1380 msg_print("You feel like a hero!");
1390 if (p_ptr->hero && !music_singing(MUSIC_HERO) && !music_singing(MUSIC_SHERO))
1393 msg_print("¥Ò¡¼¥í¡¼¤Îµ¤Ê¬¤¬¾Ã¤¨¼º¤»¤¿¡£");
1395 msg_print("The heroism wears off.");
1405 /* Redraw status bar */
1406 p_ptr->redraw |= (PR_STATUS);
1408 /* Nothing to notice */
1409 if (!notice) return (FALSE);
1412 if (disturb_state) disturb(0, 0);
1414 /* Recalculate bonuses */
1415 p_ptr->update |= (PU_BONUS);
1417 /* Recalculate hitpoints */
1418 p_ptr->update |= (PU_HP);
1429 * Set "p_ptr->shero", notice observable changes
1431 bool set_shero(int v, bool do_dec)
1433 bool notice = FALSE;
1435 /* Hack -- Force good values */
1436 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1438 if (p_ptr->is_dead) return FALSE;
1440 if (p_ptr->pclass == CLASS_BERSERKER) v = 1;
1444 if (p_ptr->shero && !do_dec)
1446 if (p_ptr->shero > v) return FALSE;
1448 else if (!p_ptr->shero)
1451 msg_print("»¦Ù¤¥Þ¥·¡¼¥ó¤Ë¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡ª");
1453 msg_print("You feel like a killing machine!");
1466 msg_print("ÌîÈڤʵ¤»ý¤Á¤¬¾Ã¤¨¼º¤»¤¿¡£");
1468 msg_print("You feel less Berserk.");
1478 /* Redraw status bar */
1479 p_ptr->redraw |= (PR_STATUS);
1481 /* Nothing to notice */
1482 if (!notice) return (FALSE);
1485 if (disturb_state) disturb(0, 0);
1487 /* Recalculate bonuses */
1488 p_ptr->update |= (PU_BONUS);
1490 /* Recalculate hitpoints */
1491 p_ptr->update |= (PU_HP);
1502 * Set "p_ptr->protevil", notice observable changes
1504 bool set_protevil(int v, bool do_dec)
1506 bool notice = FALSE;
1508 /* Hack -- Force good values */
1509 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1511 if (p_ptr->is_dead) return FALSE;
1516 if (p_ptr->protevil && !do_dec)
1518 if (p_ptr->protevil > v) return FALSE;
1520 else if (!p_ptr->protevil)
1523 msg_print("¼Ù°¤Ê¤ë¸ºß¤«¤é¼é¤é¤ì¤Æ¤¤¤ë¤è¤¦¤Ê´¶¤¸¤¬¤¹¤ë¡ª");
1525 msg_print("You feel safe from evil!");
1535 if (p_ptr->protevil)
1538 msg_print("¼Ù°¤Ê¤ë¸ºß¤«¤é¼é¤é¤ì¤Æ¤¤¤ë´¶¤¸¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
1540 msg_print("You no longer feel safe from evil.");
1548 p_ptr->protevil = v;
1550 /* Redraw status bar */
1551 p_ptr->redraw |= (PR_STATUS);
1553 /* Nothing to notice */
1554 if (!notice) return (FALSE);
1557 if (disturb_state) disturb(0, 0);
1567 * Set "p_ptr->wraith_form", notice observable changes
1569 bool set_wraith_form(int v, bool do_dec)
1571 bool notice = FALSE;
1573 /* Hack -- Force good values */
1574 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1576 if (p_ptr->is_dead) return FALSE;
1581 if (p_ptr->wraith_form && !do_dec)
1583 if (p_ptr->wraith_form > v) return FALSE;
1585 else if (!p_ptr->wraith_form)
1588 msg_print("ʪ¼Á³¦¤òÎ¥¤ì¤ÆÍ©µ´¤Î¤è¤¦¤Ê¸ºß¤Ë¤Ê¤Ã¤¿¡ª");
1590 msg_print("You leave the physical world and turn into a wraith-being!");
1595 chg_virtue(V_UNLIFE, 3);
1596 chg_virtue(V_HONOUR, -2);
1597 chg_virtue(V_SACRIFICE, -2);
1598 chg_virtue(V_VALOUR, -5);
1601 p_ptr->redraw |= (PR_MAP);
1603 /* Update monsters */
1604 p_ptr->update |= (PU_MONSTERS);
1607 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1614 if (p_ptr->wraith_form)
1617 msg_print("ÉÔÆ©ÌÀ¤Ë¤Ê¤Ã¤¿´¶¤¸¤¬¤¹¤ë¡£");
1619 msg_print("You feel opaque.");
1625 p_ptr->redraw |= (PR_MAP);
1627 /* Update monsters */
1628 p_ptr->update |= (PU_MONSTERS);
1631 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1636 p_ptr->wraith_form = v;
1638 /* Redraw status bar */
1639 p_ptr->redraw |= (PR_STATUS);
1641 /* Nothing to notice */
1642 if (!notice) return (FALSE);
1645 if (disturb_state) disturb(0, 0);
1647 /* Recalculate bonuses */
1648 p_ptr->update |= (PU_BONUS);
1660 * Set "p_ptr->invuln", notice observable changes
1662 bool set_invuln(int v, bool do_dec)
1664 bool notice = FALSE;
1666 /* Hack -- Force good values */
1667 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1669 if (p_ptr->is_dead) return FALSE;
1674 if (p_ptr->invuln && !do_dec)
1676 if (p_ptr->invuln > v) return FALSE;
1678 else if (!IS_INVULN())
1681 msg_print("̵Ũ¤À¡ª");
1683 msg_print("Invulnerability!");
1688 chg_virtue(V_UNLIFE, -2);
1689 chg_virtue(V_HONOUR, -2);
1690 chg_virtue(V_SACRIFICE, -3);
1691 chg_virtue(V_VALOUR, -5);
1694 p_ptr->redraw |= (PR_MAP);
1696 /* Update monsters */
1697 p_ptr->update |= (PU_MONSTERS);
1700 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1707 if (p_ptr->invuln && !music_singing(MUSIC_INVULN))
1710 msg_print("̵Ũ¤Ç¤Ï¤Ê¤¯¤Ê¤Ã¤¿¡£");
1712 msg_print("The invulnerability wears off.");
1718 p_ptr->redraw |= (PR_MAP);
1720 /* Update monsters */
1721 p_ptr->update |= (PU_MONSTERS);
1724 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1726 p_ptr->energy_need += ENERGY_NEED();
1733 /* Redraw status bar */
1734 p_ptr->redraw |= (PR_STATUS);
1736 /* Nothing to notice */
1737 if (!notice) return (FALSE);
1740 if (disturb_state) disturb(0, 0);
1742 /* Recalculate bonuses */
1743 p_ptr->update |= (PU_BONUS);
1754 * Set "p_ptr->tim_esp", notice observable changes
1756 bool set_tim_esp(int v, bool do_dec)
1758 bool notice = FALSE;
1760 /* Hack -- Force good values */
1761 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1763 if (p_ptr->is_dead) return FALSE;
1768 if (p_ptr->tim_esp && !do_dec)
1770 if (p_ptr->tim_esp > v) return FALSE;
1772 else if (!IS_TIM_ESP())
1775 msg_print("°Õ¼±¤¬¹¤¬¤Ã¤¿µ¤¤¬¤¹¤ë¡ª");
1777 msg_print("You feel your consciousness expand!");
1787 if (p_ptr->tim_esp && !music_singing(MUSIC_MIND))
1790 msg_print("°Õ¼±¤Ï¸µ¤ËÌá¤Ã¤¿¡£");
1792 msg_print("Your consciousness contracts again.");
1802 /* Redraw status bar */
1803 p_ptr->redraw |= (PR_STATUS);
1805 /* Nothing to notice */
1806 if (!notice) return (FALSE);
1809 if (disturb_state) disturb(0, 0);
1811 /* Recalculate bonuses */
1812 p_ptr->update |= (PU_BONUS);
1814 /* Update the monsters */
1815 p_ptr->update |= (PU_MONSTERS);
1826 * Set "p_ptr->tim_invis", notice observable changes
1828 bool set_tim_invis(int v, bool do_dec)
1830 bool notice = FALSE;
1832 /* Hack -- Force good values */
1833 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1835 if (p_ptr->is_dead) return FALSE;
1840 if (p_ptr->tim_invis && !do_dec)
1842 if (p_ptr->tim_invis > v) return FALSE;
1844 else if (!p_ptr->tim_invis)
1847 msg_print("Ìܤ¬Èó¾ï¤ËÉÒ´¶¤Ë¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡ª");
1849 msg_print("Your eyes feel very sensitive!");
1859 if (p_ptr->tim_invis)
1862 msg_print("ÌܤÎÉÒ´¶¤µ¤¬¤Ê¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£");
1864 msg_print("Your eyes feel less sensitive.");
1872 p_ptr->tim_invis = v;
1874 /* Redraw status bar */
1875 p_ptr->redraw |= (PR_STATUS);
1877 /* Nothing to notice */
1878 if (!notice) return (FALSE);
1881 if (disturb_state) disturb(0, 0);
1883 /* Recalculate bonuses */
1884 p_ptr->update |= (PU_BONUS);
1886 /* Update the monsters */
1887 p_ptr->update |= (PU_MONSTERS);
1898 * Set "p_ptr->tim_infra", notice observable changes
1900 bool set_tim_infra(int v, bool do_dec)
1902 bool notice = FALSE;
1904 /* Hack -- Force good values */
1905 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1907 if (p_ptr->is_dead) return FALSE;
1912 if (p_ptr->tim_infra && !do_dec)
1914 if (p_ptr->tim_infra > v) return FALSE;
1916 else if (!p_ptr->tim_infra)
1919 msg_print("Ìܤ¬¥é¥ó¥é¥ó¤Èµ±¤»Ï¤á¤¿¡ª");
1921 msg_print("Your eyes begin to tingle!");
1931 if (p_ptr->tim_infra)
1934 msg_print("Ìܤ層¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
1936 msg_print("Your eyes stop tingling.");
1944 p_ptr->tim_infra = v;
1946 /* Redraw status bar */
1947 p_ptr->redraw |= (PR_STATUS);
1949 /* Nothing to notice */
1950 if (!notice) return (FALSE);
1953 if (disturb_state) disturb(0, 0);
1955 /* Recalculate bonuses */
1956 p_ptr->update |= (PU_BONUS);
1958 /* Update the monsters */
1959 p_ptr->update |= (PU_MONSTERS);
1970 * Set "p_ptr->tim_regen", notice observable changes
1972 bool set_tim_regen(int v, bool do_dec)
1974 bool notice = FALSE;
1976 /* Hack -- Force good values */
1977 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
1979 if (p_ptr->is_dead) return FALSE;
1984 if (p_ptr->tim_regen && !do_dec)
1986 if (p_ptr->tim_regen > v) return FALSE;
1988 else if (!p_ptr->tim_regen)
1991 msg_print("²óÉüÎϤ¬¾å¤¬¤Ã¤¿¡ª");
1993 msg_print("You feel yourself regenerating quickly!");
2003 if (p_ptr->tim_regen)
2006 msg_print("ÁÇÁ᤯²óÉü¤¹¤ë´¶¤¸¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
2008 msg_print("You feel yourself regenerating slowly.");
2016 p_ptr->tim_regen = v;
2018 /* Redraw status bar */
2019 p_ptr->redraw |= (PR_STATUS);
2021 /* Nothing to notice */
2022 if (!notice) return (FALSE);
2025 if (disturb_state) disturb(0, 0);
2027 /* Recalculate bonuses */
2028 p_ptr->update |= (PU_BONUS);
2039 * Set "p_ptr->tim_stealth", notice observable changes
2041 bool set_tim_stealth(int v, bool do_dec)
2043 bool notice = FALSE;
2045 /* Hack -- Force good values */
2046 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2048 if (p_ptr->is_dead) return FALSE;
2053 if (p_ptr->tim_stealth && !do_dec)
2055 if (p_ptr->tim_stealth > v) return FALSE;
2057 else if (!IS_TIM_STEALTH())
2060 msg_print("²»¤¬¾®¤µ¤¯¤Ê¤Ã¤¿¡ª");
2062 msg_print("You begin to walk silently!");
2072 if (p_ptr->tim_stealth && !music_singing(MUSIC_STEALTH))
2075 msg_print("²»¤¬Â礤¯¤Ê¤Ã¤¿¡£");
2077 msg_print("You no longer walk silently.");
2085 p_ptr->tim_stealth = v;
2087 /* Redraw status bar */
2088 p_ptr->redraw |= (PR_STATUS);
2090 /* Nothing to notice */
2091 if (!notice) return (FALSE);
2094 if (disturb_state) disturb(0, 0);
2096 /* Recalculate bonuses */
2097 p_ptr->update |= (PU_BONUS);
2107 bool set_superstealth(bool set)
2109 bool notice = FALSE;
2111 if (p_ptr->is_dead) return FALSE;
2116 if (!(p_ptr->special_defense & NINJA_S_STEALTH))
2118 if (cave[py][px].info & CAVE_MNLT)
2121 msg_print("Ũ¤ÎÌܤ«¤éÇö¤¤±Æ¤ÎÃæ¤Ëʤ¤¤±£¤µ¤ì¤¿¡£");
2123 msg_print("You are mantled in weak shadow from ordinary eyes.");
2125 p_ptr->monlite = p_ptr->old_monlite = TRUE;
2130 msg_print("Ũ¤ÎÌܤ«¤é±Æ¤ÎÃæ¤Ëʤ¤¤±£¤µ¤ì¤¿¡ª");
2132 msg_print("You are mantled in shadow from ordinary eyes!");
2134 p_ptr->monlite = p_ptr->old_monlite = FALSE;
2140 p_ptr->special_defense |= NINJA_S_STEALTH;
2147 if (p_ptr->special_defense & NINJA_S_STEALTH)
2150 msg_print("ºÆ¤ÓŨ¤ÎÌܤˤµ¤é¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£");
2152 msg_print("You are exposed to common sight once more.");
2158 p_ptr->special_defense &= ~(NINJA_S_STEALTH);
2162 /* Nothing to notice */
2163 if (!notice) return (FALSE);
2165 /* Redraw status bar */
2166 p_ptr->redraw |= (PR_STATUS);
2169 if (disturb_state) disturb(0, 0);
2177 * Set "p_ptr->tim_levitation", notice observable changes
2179 bool set_tim_levitation(int v, bool do_dec)
2181 bool notice = FALSE;
2183 /* Hack -- Force good values */
2184 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2186 if (p_ptr->is_dead) return FALSE;
2191 if (p_ptr->tim_levitation && !do_dec)
2193 if (p_ptr->tim_levitation > v) return FALSE;
2195 else if (!p_ptr->tim_levitation)
2198 msg_print("ÂΤ¬Ãè¤ËÉ⤻Ϥ᤿¡£");
2200 msg_print("You begin to fly!");
2210 if (p_ptr->tim_levitation)
2213 msg_print("¤â¤¦Ãè¤ËÉ⤫¤Ù¤Ê¤¯¤Ê¤Ã¤¿¡£");
2215 msg_print("You stop flying.");
2223 p_ptr->tim_levitation = v;
2225 /* Redraw status bar */
2226 p_ptr->redraw |= (PR_STATUS);
2228 /* Nothing to notice */
2229 if (!notice) return (FALSE);
2232 if (disturb_state) disturb(0, 0);
2234 /* Recalculate bonuses */
2235 p_ptr->update |= (PU_BONUS);
2246 * Set "p_ptr->tim_sh_touki", notice observable changes
2248 bool set_tim_sh_touki(int v, bool do_dec)
2250 bool notice = FALSE;
2252 /* Hack -- Force good values */
2253 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2255 if (p_ptr->is_dead) return FALSE;
2260 if (p_ptr->tim_sh_touki && !do_dec)
2262 if (p_ptr->tim_sh_touki > v) return FALSE;
2264 else if (!p_ptr->tim_sh_touki)
2267 msg_print("ÂΤ¬Æ®µ¤¤Î¥ª¡¼¥é¤Çʤ¤ï¤ì¤¿¡£");
2269 msg_print("You have enveloped by the aura of the Force!");
2279 if (p_ptr->tim_sh_touki)
2282 msg_print("Æ®µ¤¤¬¾Ã¤¨¤¿¡£");
2284 msg_print("Aura of the Force disappeared.");
2292 p_ptr->tim_sh_touki = v;
2294 /* Redraw status bar */
2295 p_ptr->redraw |= (PR_STATUS);
2297 /* Nothing to notice */
2298 if (!notice) return (FALSE);
2301 if (disturb_state) disturb(0, 0);
2312 * Set "p_ptr->tim_sh_fire", notice observable changes
2314 bool set_tim_sh_fire(int v, bool do_dec)
2316 bool notice = FALSE;
2318 /* Hack -- Force good values */
2319 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2321 if (p_ptr->is_dead) return FALSE;
2326 if (p_ptr->tim_sh_fire && !do_dec)
2328 if (p_ptr->tim_sh_fire > v) return FALSE;
2330 else if (!p_ptr->tim_sh_fire)
2333 msg_print("ÂΤ¬±ê¤Î¥ª¡¼¥é¤Çʤ¤ï¤ì¤¿¡£");
2335 msg_print("You have enveloped by fiery aura!");
2345 if (p_ptr->tim_sh_fire)
2348 msg_print("±ê¤Î¥ª¡¼¥é¤¬¾Ã¤¨¤¿¡£");
2350 msg_print("Fiery aura disappeared.");
2358 p_ptr->tim_sh_fire = v;
2360 /* Redraw status bar */
2361 p_ptr->redraw |= (PR_STATUS);
2363 /* Nothing to notice */
2364 if (!notice) return (FALSE);
2367 if (disturb_state) disturb(0, 0);
2369 /* Recalculate bonuses */
2370 p_ptr->update |= (PU_BONUS);
2381 * Set "p_ptr->tim_sh_holy", notice observable changes
2383 bool set_tim_sh_holy(int v, bool do_dec)
2385 bool notice = FALSE;
2387 /* Hack -- Force good values */
2388 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2390 if (p_ptr->is_dead) return FALSE;
2395 if (p_ptr->tim_sh_holy && !do_dec)
2397 if (p_ptr->tim_sh_holy > v) return FALSE;
2399 else if (!p_ptr->tim_sh_holy)
2402 msg_print("ÂΤ¬À»¤Ê¤ë¥ª¡¼¥é¤Çʤ¤ï¤ì¤¿¡£");
2404 msg_print("You have enveloped by holy aura!");
2414 if (p_ptr->tim_sh_holy)
2417 msg_print("À»¤Ê¤ë¥ª¡¼¥é¤¬¾Ã¤¨¤¿¡£");
2419 msg_print("Holy aura disappeared.");
2427 p_ptr->tim_sh_holy = v;
2429 /* Redraw status bar */
2430 p_ptr->redraw |= (PR_STATUS);
2432 /* Nothing to notice */
2433 if (!notice) return (FALSE);
2436 if (disturb_state) disturb(0, 0);
2438 /* Recalculate bonuses */
2439 p_ptr->update |= (PU_BONUS);
2451 * Set "p_ptr->tim_eyeeye", notice observable changes
2453 bool set_tim_eyeeye(int v, bool do_dec)
2455 bool notice = FALSE;
2457 /* Hack -- Force good values */
2458 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2460 if (p_ptr->is_dead) return FALSE;
2465 if (p_ptr->tim_eyeeye && !do_dec)
2467 if (p_ptr->tim_eyeeye > v) return FALSE;
2469 else if (!p_ptr->tim_eyeeye)
2472 msg_print("Ë¡¤Î¼é¤ê¼ê¤Ë¤Ê¤Ã¤¿µ¤¤¬¤·¤¿¡ª");
2474 msg_print("You feel like a keeper of commandments!");
2484 if (p_ptr->tim_eyeeye)
2487 msg_print("Ĩȳ¤ò¼¹¹Ô¤¹¤ë¤³¤È¤¬¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2489 msg_print("You no longer feel like a keeper.");
2497 p_ptr->tim_eyeeye = v;
2499 /* Redraw status bar */
2500 p_ptr->redraw |= (PR_STATUS);
2502 /* Nothing to notice */
2503 if (!notice) return (FALSE);
2506 if (disturb_state) disturb(0, 0);
2508 /* Recalculate bonuses */
2509 p_ptr->update |= (PU_BONUS);
2521 * Set "p_ptr->resist_magic", notice observable changes
2523 bool set_resist_magic(int v, bool do_dec)
2525 bool notice = FALSE;
2527 /* Hack -- Force good values */
2528 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2530 if (p_ptr->is_dead) return FALSE;
2535 if (p_ptr->resist_magic && !do_dec)
2537 if (p_ptr->resist_magic > v) return FALSE;
2539 else if (!p_ptr->resist_magic)
2542 msg_print("ËâË¡¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿¡£");
2544 msg_print("You have been protected from magic!");
2554 if (p_ptr->resist_magic)
2557 msg_print("ËâË¡¤Ë¼å¤¯¤Ê¤Ã¤¿¡£");
2559 msg_print("You are no longer protected from magic.");
2567 p_ptr->resist_magic = v;
2569 /* Redraw status bar */
2570 p_ptr->redraw |= (PR_STATUS);
2572 /* Nothing to notice */
2573 if (!notice) return (FALSE);
2576 if (disturb_state) disturb(0, 0);
2578 /* Recalculate bonuses */
2579 p_ptr->update |= (PU_BONUS);
2590 * Set "p_ptr->tim_reflect", notice observable changes
2592 bool set_tim_reflect(int v, bool do_dec)
2594 bool notice = FALSE;
2596 /* Hack -- Force good values */
2597 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2599 if (p_ptr->is_dead) return FALSE;
2604 if (p_ptr->tim_reflect && !do_dec)
2606 if (p_ptr->tim_reflect > v) return FALSE;
2608 else if (!p_ptr->tim_reflect)
2611 msg_print("ÂΤÎɽÌ̤¬³ê¤«¤Ë¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£");
2613 msg_print("Your body becames smooth.");
2623 if (p_ptr->tim_reflect)
2626 msg_print("ÂΤÎɽÌ̤¬³ê¤«¤Ç¤Ê¤¯¤Ê¤Ã¤¿¡£");
2628 msg_print("Your body is no longer smooth.");
2636 p_ptr->tim_reflect = v;
2638 /* Redraw status bar */
2639 p_ptr->redraw |= (PR_STATUS);
2641 /* Nothing to notice */
2642 if (!notice) return (FALSE);
2645 if (disturb_state) disturb(0, 0);
2647 /* Recalculate bonuses */
2648 p_ptr->update |= (PU_BONUS);
2659 * Set "p_ptr->multishadow", notice observable changes
2661 bool set_multishadow(int v, bool do_dec)
2663 bool notice = FALSE;
2665 /* Hack -- Force good values */
2666 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2668 if (p_ptr->is_dead) return FALSE;
2673 if (p_ptr->multishadow && !do_dec)
2675 if (p_ptr->multishadow > v) return FALSE;
2677 else if (!p_ptr->multishadow)
2680 msg_print("¤¢¤Ê¤¿¤Î¼þ¤ê¤Ë¸¸±Æ¤¬À¸¤Þ¤ì¤¿¡£");
2682 msg_print("Your Shadow enveloped you.");
2692 if (p_ptr->multishadow)
2695 msg_print("¸¸±Æ¤¬¾Ã¤¨¤¿¡£");
2697 msg_print("Your Shadow disappears.");
2705 p_ptr->multishadow = v;
2707 /* Redraw status bar */
2708 p_ptr->redraw |= (PR_STATUS);
2710 /* Nothing to notice */
2711 if (!notice) return (FALSE);
2714 if (disturb_state) disturb(0, 0);
2716 /* Recalculate bonuses */
2717 p_ptr->update |= (PU_BONUS);
2728 * Set "p_ptr->dustrobe", notice observable changes
2730 bool set_dustrobe(int v, bool do_dec)
2732 bool notice = FALSE;
2734 /* Hack -- Force good values */
2735 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2737 if (p_ptr->is_dead) return FALSE;
2742 if (p_ptr->dustrobe && !do_dec)
2744 if (p_ptr->dustrobe > v) return FALSE;
2746 else if (!p_ptr->dustrobe)
2749 msg_print("ÂΤ¬¶À¤Î¥ª¡¼¥é¤Çʤ¤ï¤ì¤¿¡£");
2751 msg_print("You were enveloped by mirror shards.");
2761 if (p_ptr->dustrobe)
2764 msg_print("¶À¤Î¥ª¡¼¥é¤¬¾Ã¤¨¤¿¡£");
2766 msg_print("The mirror shards disappear.");
2774 p_ptr->dustrobe = v;
2776 /* Redraw status bar */
2777 p_ptr->redraw |= (PR_STATUS);
2779 /* Nothing to notice */
2780 if (!notice) return (FALSE);
2783 if (disturb_state) disturb(0, 0);
2785 /* Recalculate bonuses */
2786 p_ptr->update |= (PU_BONUS);
2797 * Set "p_ptr->tim_regen", notice observable changes
2799 bool set_kabenuke(int v, bool do_dec)
2801 bool notice = FALSE;
2803 /* Hack -- Force good values */
2804 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2806 if (p_ptr->is_dead) return FALSE;
2811 if (p_ptr->kabenuke && !do_dec)
2813 if (p_ptr->kabenuke > v) return FALSE;
2815 else if (!p_ptr->kabenuke)
2818 msg_print("ÂΤ¬È¾Êª¼Á¤Î¾õÂ֤ˤʤä¿¡£");
2820 msg_print("You became ethereal form.");
2830 if (p_ptr->kabenuke)
2833 msg_print("ÂΤ¬Êª¼Á²½¤·¤¿¡£");
2835 msg_print("You are no longer in an ethereal form.");
2843 p_ptr->kabenuke = v;
2845 /* Redraw status bar */
2846 p_ptr->redraw |= (PR_STATUS);
2848 /* Nothing to notice */
2849 if (!notice) return (FALSE);
2852 if (disturb_state) disturb(0, 0);
2854 /* Recalculate bonuses */
2855 p_ptr->update |= (PU_BONUS);
2865 bool set_tsuyoshi(int v, bool do_dec)
2867 bool notice = FALSE;
2869 /* Hack -- Force good values */
2870 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2872 if (p_ptr->is_dead) return FALSE;
2877 if (p_ptr->tsuyoshi && !do_dec)
2879 if (p_ptr->tsuyoshi > v) return FALSE;
2881 else if (!p_ptr->tsuyoshi)
2884 msg_print("¡Ö¥ª¥¯¥ì·»¤µ¤ó¡ª¡×");
2886 msg_print("Brother OKURE!");
2890 chg_virtue(V_VITALITY, 2);
2897 if (p_ptr->tsuyoshi)
2900 msg_print("ÆùÂΤ¬µÞ®¤Ë¤·¤Ü¤ó¤Ç¤¤¤Ã¤¿¡£");
2902 msg_print("Your body had quickly shriveled.");
2905 (void)dec_stat(A_CON, 20, TRUE);
2906 (void)dec_stat(A_STR, 20, TRUE);
2909 chg_virtue(V_VITALITY, -3);
2914 p_ptr->tsuyoshi = v;
2916 /* Redraw status bar */
2917 p_ptr->redraw |= (PR_STATUS);
2919 /* Nothing to notice */
2920 if (!notice) return (FALSE);
2923 if (disturb_state) disturb(0, 0);
2925 /* Recalculate bonuses */
2926 p_ptr->update |= (PU_BONUS);
2928 /* Recalculate hitpoints */
2929 p_ptr->update |= (PU_HP);
2940 * Set a temporary elemental brand. Clear all other brands. Print status
2943 bool set_ele_attack(u32b attack_type, int v)
2945 /* Hack -- Force good values */
2946 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
2948 /* Clear all elemental attacks (only one is allowed at a time). */
2949 if ((p_ptr->special_attack & (ATTACK_ACID)) && (attack_type != ATTACK_ACID))
2951 p_ptr->special_attack &= ~(ATTACK_ACID);
2953 msg_print("»À¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2955 msg_print("Your temporary acidic brand fades away.");
2958 if ((p_ptr->special_attack & (ATTACK_ELEC)) && (attack_type != ATTACK_ELEC))
2960 p_ptr->special_attack &= ~(ATTACK_ELEC);
2962 msg_print("ÅÅ·â¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2964 msg_print("Your temporary electrical brand fades away.");
2967 if ((p_ptr->special_attack & (ATTACK_FIRE)) && (attack_type != ATTACK_FIRE))
2969 p_ptr->special_attack &= ~(ATTACK_FIRE);
2971 msg_print("²Ð±ê¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2973 msg_print("Your temporary fiery brand fades away.");
2976 if ((p_ptr->special_attack & (ATTACK_COLD)) && (attack_type != ATTACK_COLD))
2978 p_ptr->special_attack &= ~(ATTACK_COLD);
2980 msg_print("Î䵤¤Ç¹¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2982 msg_print("Your temporary frost brand fades away.");
2985 if ((p_ptr->special_attack & (ATTACK_POIS)) && (attack_type != ATTACK_POIS))
2987 p_ptr->special_attack &= ~(ATTACK_POIS);
2989 msg_print("ÆǤǹ¶·â¤Ç¤¤Ê¤¯¤Ê¤Ã¤¿¡£");
2991 msg_print("Your temporary poison brand fades away.");
2995 if ((v) && (attack_type))
2997 /* Set attack type. */
2998 p_ptr->special_attack |= (attack_type);
3001 p_ptr->ele_attack = v;
3005 msg_format("%s¤Ç¹¶·â¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡ª",
3006 ((attack_type == ATTACK_ACID) ? "»À" :
3007 ((attack_type == ATTACK_ELEC) ? "ÅÅ·â" :
3008 ((attack_type == ATTACK_FIRE) ? "²Ð±ê" :
3009 ((attack_type == ATTACK_COLD) ? "Î䵤" :
3010 ((attack_type == ATTACK_POIS) ? "ÆÇ" :
3013 msg_format("For a while, the blows you deal will %s",
3014 ((attack_type == ATTACK_ACID) ? "melt with acid!" :
3015 ((attack_type == ATTACK_ELEC) ? "shock your foes!" :
3016 ((attack_type == ATTACK_FIRE) ? "burn with fire!" :
3017 ((attack_type == ATTACK_COLD) ? "chill to the bone!" :
3018 ((attack_type == ATTACK_POIS) ? "poison your enemies!" :
3019 "do nothing special."))))));
3024 if (disturb_state) disturb(0, 0);
3026 /* Redraw status bar */
3027 p_ptr->redraw |= (PR_STATUS);
3029 p_ptr->update |= (PU_BONUS);
3039 * Set a temporary elemental brand. Clear all other brands. Print status
3042 bool set_ele_immune(u32b immune_type, int v)
3044 /* Hack -- Force good values */
3045 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3047 /* Clear all elemental attacks (only one is allowed at a time). */
3048 if ((p_ptr->special_defense & (DEFENSE_ACID)) && (immune_type != DEFENSE_ACID))
3050 p_ptr->special_defense &= ~(DEFENSE_ACID);
3052 msg_print("»À¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3054 msg_print("You are no longer immune to acid.");
3057 if ((p_ptr->special_defense & (DEFENSE_ELEC)) && (immune_type != DEFENSE_ELEC))
3059 p_ptr->special_defense &= ~(DEFENSE_ELEC);
3061 msg_print("ÅÅ·â¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3063 msg_print("You are no longer immune to electricity.");
3066 if ((p_ptr->special_defense & (DEFENSE_FIRE)) && (immune_type != DEFENSE_FIRE))
3068 p_ptr->special_defense &= ~(DEFENSE_FIRE);
3070 msg_print("²Ð±ê¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3072 msg_print("You are no longer immune to fire.");
3075 if ((p_ptr->special_defense & (DEFENSE_COLD)) && (immune_type != DEFENSE_COLD))
3077 p_ptr->special_defense &= ~(DEFENSE_COLD);
3079 msg_print("Î䵤¤Î¹¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3081 msg_print("You are no longer immune to cold.");
3084 if ((p_ptr->special_defense & (DEFENSE_POIS)) && (immune_type != DEFENSE_POIS))
3086 p_ptr->special_defense &= ~(DEFENSE_POIS);
3088 msg_print("ÆǤι¶·â¤Ç½ý¤Ä¤±¤é¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£¡£");
3090 msg_print("You are no longer immune to poison.");
3094 if ((v) && (immune_type))
3096 /* Set attack type. */
3097 p_ptr->special_defense |= (immune_type);
3100 p_ptr->ele_immune = v;
3104 msg_format("%s¤Î¹¶·â¤ò¼õ¤±¤Ä¤±¤Ê¤¯¤Ê¤Ã¤¿¡ª",
3105 ((immune_type == DEFENSE_ACID) ? "»À" :
3106 ((immune_type == DEFENSE_ELEC) ? "ÅÅ·â" :
3107 ((immune_type == DEFENSE_FIRE) ? "²Ð±ê" :
3108 ((immune_type == DEFENSE_COLD) ? "Î䵤" :
3109 ((immune_type == DEFENSE_POIS) ? "ÆÇ" :
3112 msg_format("For a while, You are immune to %s",
3113 ((immune_type == DEFENSE_ACID) ? "acid!" :
3114 ((immune_type == DEFENSE_ELEC) ? "electricity!" :
3115 ((immune_type == DEFENSE_FIRE) ? "fire!" :
3116 ((immune_type == DEFENSE_COLD) ? "cold!" :
3117 ((immune_type == DEFENSE_POIS) ? "poison!" :
3118 "do nothing special."))))));
3123 if (disturb_state) disturb(0, 0);
3125 /* Redraw status bar */
3126 p_ptr->redraw |= (PR_STATUS);
3128 p_ptr->update |= (PU_BONUS);
3138 * Set "p_ptr->oppose_acid", notice observable changes
3140 bool set_oppose_acid(int v, bool do_dec)
3142 bool notice = FALSE;
3144 /* Hack -- Force good values */
3145 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3147 if (p_ptr->is_dead) return FALSE;
3152 if (p_ptr->oppose_acid && !do_dec)
3154 if (p_ptr->oppose_acid > v) return FALSE;
3156 else if (!IS_OPPOSE_ACID())
3159 msg_print("»À¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3161 msg_print("You feel resistant to acid!");
3171 if (p_ptr->oppose_acid && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3174 msg_print("»À¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3176 msg_print("You feel less resistant to acid.");
3184 p_ptr->oppose_acid = v;
3186 /* Nothing to notice */
3187 if (!notice) return (FALSE);
3189 /* Redraw status bar */
3190 p_ptr->redraw |= (PR_STATUS);
3193 if (disturb_state) disturb(0, 0);
3204 * Set "p_ptr->oppose_elec", notice observable changes
3206 bool set_oppose_elec(int v, bool do_dec)
3208 bool notice = FALSE;
3210 /* Hack -- Force good values */
3211 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3213 if (p_ptr->is_dead) return FALSE;
3218 if (p_ptr->oppose_elec && !do_dec)
3220 if (p_ptr->oppose_elec > v) return FALSE;
3222 else if (!IS_OPPOSE_ELEC())
3225 msg_print("ÅÅ·â¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3227 msg_print("You feel resistant to electricity!");
3237 if (p_ptr->oppose_elec && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3240 msg_print("ÅÅ·â¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3242 msg_print("You feel less resistant to electricity.");
3250 p_ptr->oppose_elec = v;
3252 /* Nothing to notice */
3253 if (!notice) return (FALSE);
3255 /* Redraw status bar */
3256 p_ptr->redraw |= (PR_STATUS);
3259 if (disturb_state) disturb(0, 0);
3270 * Set "p_ptr->oppose_fire", notice observable changes
3272 bool set_oppose_fire(int v, bool do_dec)
3274 bool notice = FALSE;
3276 /* Hack -- Force good values */
3277 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3279 if (p_ptr->is_dead) return FALSE;
3281 if ((prace_is_(RACE_DEMON) && (p_ptr->lev > 44)) || (p_ptr->mimic_form == MIMIC_DEMON)) v = 1;
3285 if (p_ptr->oppose_fire && !do_dec)
3287 if (p_ptr->oppose_fire > v) return FALSE;
3289 else if (!IS_OPPOSE_FIRE())
3292 msg_print("²Ð¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3294 msg_print("You feel resistant to fire!");
3304 if (p_ptr->oppose_fire && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3307 msg_print("²Ð¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3309 msg_print("You feel less resistant to fire.");
3317 p_ptr->oppose_fire = v;
3319 /* Nothing to notice */
3320 if (!notice) return (FALSE);
3322 /* Redraw status bar */
3323 p_ptr->redraw |= (PR_STATUS);
3326 if (disturb_state) disturb(0, 0);
3337 * Set "p_ptr->oppose_cold", notice observable changes
3339 bool set_oppose_cold(int v, bool do_dec)
3341 bool notice = FALSE;
3343 /* Hack -- Force good values */
3344 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3346 if (p_ptr->is_dead) return FALSE;
3351 if (p_ptr->oppose_cold && !do_dec)
3353 if (p_ptr->oppose_cold > v) return FALSE;
3355 else if (!IS_OPPOSE_COLD())
3358 msg_print("Î䵤¤Ø¤ÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3360 msg_print("You feel resistant to cold!");
3370 if (p_ptr->oppose_cold && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3373 msg_print("Î䵤¤Ø¤ÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3375 msg_print("You feel less resistant to cold.");
3383 p_ptr->oppose_cold = v;
3385 /* Nothing to notice */
3386 if (!notice) return (FALSE);
3388 /* Redraw status bar */
3389 p_ptr->redraw |= (PR_STATUS);
3392 if (disturb_state) disturb(0, 0);
3403 * Set "p_ptr->oppose_pois", notice observable changes
3405 bool set_oppose_pois(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->pclass == CLASS_NINJA) && (p_ptr->lev > 44)) v = 1;
3413 if (p_ptr->is_dead) return FALSE;
3418 if (p_ptr->oppose_pois && !do_dec)
3420 if (p_ptr->oppose_pois > v) return FALSE;
3422 else if (!IS_OPPOSE_POIS())
3425 msg_print("ÆǤؤÎÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
3427 msg_print("You feel resistant to poison!");
3437 if (p_ptr->oppose_pois && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
3440 msg_print("ÆǤؤÎÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
3442 msg_print("You feel less resistant to poison.");
3450 p_ptr->oppose_pois = 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);
3470 * Set "p_ptr->stun", notice observable changes
3472 * Note the special code to only notice "range" changes.
3474 bool set_stun(int v)
3476 int old_aux, new_aux;
3477 bool notice = FALSE;
3480 /* Hack -- Force good values */
3481 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3483 if (p_ptr->is_dead) return FALSE;
3485 if (prace_is_(RACE_GOLEM) || ((p_ptr->pclass == CLASS_BERSERKER) && (p_ptr->lev > 34))) v = 0;
3488 if (p_ptr->stun > 100)
3494 else if (p_ptr->stun > 50)
3500 else if (p_ptr->stun > 0)
3536 if (new_aux > old_aux)
3538 /* Describe the state */
3544 msg_print("°Õ¼±¤¬¤â¤¦¤í¤¦¤È¤·¤Æ¤¤¿¡£");
3546 msg_print("You have been stunned.");
3554 msg_print("°Õ¼±¤¬¤Ò¤É¤¯¤â¤¦¤í¤¦¤È¤·¤Æ¤¤¿¡£");
3556 msg_print("You have been heavily stunned.");
3564 msg_print("Ƭ¤¬¥¯¥é¥¯¥é¤·¤Æ°Õ¼±¤¬±ó¤Î¤¤¤Æ¤¤¿¡£");
3566 msg_print("You have been knocked out.");
3572 if (randint1(1000) < v || one_in_(16))
3575 msg_print("³ä¤ì¤ë¤è¤¦¤ÊƬÄˤ¬¤¹¤ë¡£");
3577 msg_print("A vicious blow hits your head.");
3582 if (!p_ptr->sustain_int) (void)do_dec_stat(A_INT);
3583 if (!p_ptr->sustain_wis) (void)do_dec_stat(A_WIS);
3585 else if (one_in_(2))
3587 if (!p_ptr->sustain_int) (void)do_dec_stat(A_INT);
3591 if (!p_ptr->sustain_wis) (void)do_dec_stat(A_WIS);
3594 if (p_ptr->special_defense & KATA_MASK)
3597 msg_print("·¿¤¬Êø¤ì¤¿¡£");
3599 msg_print("Your posture gets loose.");
3601 p_ptr->special_defense &= ~(KATA_MASK);
3602 p_ptr->update |= (PU_BONUS);
3603 p_ptr->update |= (PU_MONSTERS);
3604 p_ptr->redraw |= (PR_STATE);
3605 p_ptr->redraw |= (PR_STATUS);
3606 p_ptr->action = ACTION_NONE;
3614 else if (new_aux < old_aux)
3616 /* Describe the state */
3622 msg_print("¤ä¤Ã¤ÈÛ¯Û°¾õÂÖ¤«¤é²óÉü¤·¤¿¡£");
3624 msg_print("You are no longer stunned.");
3627 if (disturb_state) disturb(0, 0);
3639 if (!notice) return (FALSE);
3642 if (disturb_state) disturb(0, 0);
3644 /* Recalculate bonuses */
3645 p_ptr->update |= (PU_BONUS);
3647 /* Redraw the "stun" */
3648 p_ptr->redraw |= (PR_STUN);
3659 * Set "p_ptr->cut", notice observable changes
3661 * Note the special code to only notice "range" changes.
3665 int old_aux, new_aux;
3666 bool notice = FALSE;
3668 /* Hack -- Force good values */
3669 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
3671 if (p_ptr->is_dead) return FALSE;
3673 if ((p_ptr->prace == RACE_GOLEM ||
3674 p_ptr->prace == RACE_SKELETON ||
3675 p_ptr->prace == RACE_SPECTRE ||
3676 (p_ptr->prace == RACE_ZOMBIE && p_ptr->lev > 11)) &&
3681 if (p_ptr->cut > 1000)
3687 else if (p_ptr->cut > 200)
3693 else if (p_ptr->cut > 100)
3699 else if (p_ptr->cut > 50)
3705 else if (p_ptr->cut > 25)
3711 else if (p_ptr->cut > 10)
3717 else if (p_ptr->cut > 0)
3777 if (new_aux > old_aux)
3779 /* Describe the state */
3785 msg_print("¤«¤¹¤ê½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3787 msg_print("You have been given a graze.");
3795 msg_print("·Ú¤¤½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3797 msg_print("You have been given a light cut.");
3805 msg_print("¤Ò¤É¤¤½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3807 msg_print("You have been given a bad cut.");
3815 msg_print("ÂçÊѤʽý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3817 msg_print("You have been given a nasty cut.");
3825 msg_print("½ÅÂç¤Ê½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3827 msg_print("You have been given a severe cut.");
3835 msg_print("¤Ò¤É¤¤¿¼¼ê¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3837 msg_print("You have been given a deep gash.");
3845 msg_print("Ã×̿Ū¤Ê½ý¤òÉé¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3847 msg_print("You have been given a mortal wound.");
3856 if (randint1(1000) < v || one_in_(16))
3858 if (!p_ptr->sustain_chr)
3861 msg_print("¤Ò¤É¤¤½ýÀפ¬»Ä¤Ã¤Æ¤·¤Þ¤Ã¤¿¡£");
3863 msg_print("You have been horribly scarred.");
3873 else if (new_aux < old_aux)
3875 /* Describe the state */
3881 msg_format("¤ä¤Ã¤È%s¡£", p_ptr->prace == RACE_ANDROID ? "²ø²æ¤¬Ä¾¤Ã¤¿" : "½Ð·ì¤¬»ß¤Þ¤Ã¤¿");
3883 msg_print("You are no longer bleeding.");
3886 if (disturb_state) disturb(0, 0);
3898 if (!notice) return (FALSE);
3901 if (disturb_state) disturb(0, 0);
3903 /* Recalculate bonuses */
3904 p_ptr->update |= (PU_BONUS);
3906 /* Redraw the "cut" */
3907 p_ptr->redraw |= (PR_CUT);
3918 * Set "p_ptr->food", notice observable changes
3920 * The "p_ptr->food" variable can get as large as 20000, allowing the
3921 * addition of the most "filling" item, Elvish Waybread, which adds
3922 * 7500 food units, without overflowing the 32767 maximum limit.
3924 * Perhaps we should disturb the player with various messages,
3925 * especially messages about hunger status changes. XXX XXX XXX
3927 * Digestion of food is handled in "dungeon.c", in which, normally,
3928 * the player digests about 20 food units per 100 game turns, more
3929 * when "fast", more when "regenerating", less with "slow digestion",
3930 * but when the player is "gorged", he digests 100 food units per 10
3931 * game turns, or a full 1000 food units per 100 game turns.
3933 * Note that the player's speed is reduced by 10 units while gorged,
3934 * so if the player eats a single food ration (5000 food units) when
3935 * full (15000 food units), he will be gorged for (5000/100)*10 = 500
3936 * game turns, or 500/(100/5) = 25 player turns (if nothing else is
3937 * affecting the player speed).
3939 bool set_food(int v)
3941 int old_aux, new_aux;
3943 bool notice = FALSE;
3945 /* Hack -- Force good values */
3946 v = (v > 20000) ? 20000 : (v < 0) ? 0 : v;
3948 /* Fainting / Starving */
3949 if (p_ptr->food < PY_FOOD_FAINT)
3955 else if (p_ptr->food < PY_FOOD_WEAK)
3961 else if (p_ptr->food < PY_FOOD_ALERT)
3967 else if (p_ptr->food < PY_FOOD_FULL)
3973 else if (p_ptr->food < PY_FOOD_MAX)
3984 /* Fainting / Starving */
3985 if (v < PY_FOOD_FAINT)
3991 else if (v < PY_FOOD_WEAK)
3997 else if (v < PY_FOOD_ALERT)
4003 else if (v < PY_FOOD_FULL)
4009 else if (v < PY_FOOD_MAX)
4020 if (old_aux < 1 && new_aux > 0)
4021 chg_virtue(V_PATIENCE, 2);
4022 else if (old_aux < 3 && (old_aux != new_aux))
4023 chg_virtue(V_PATIENCE, 1);
4025 chg_virtue(V_TEMPERANCE, 1);
4027 chg_virtue(V_TEMPERANCE, -1);
4030 if (new_aux > old_aux)
4032 /* Describe the state */
4038 msg_print("¤Þ¤À¶õÊ¢¤ÇÅݤ줽¤¦¤À¡£");
4040 msg_print("You are still weak.");
4048 msg_print("¤Þ¤À¶õÊ¢¤À¡£");
4050 msg_print("You are still hungry.");
4058 msg_print("¶õÊ¢´¶¤¬¤ª¤µ¤Þ¤Ã¤¿¡£");
4060 msg_print("You are no longer hungry.");
4068 msg_print("ËþÊ¢¤À¡ª");
4070 msg_print("You are full!");
4078 msg_print("¿©¤Ù²á¤®¤À¡ª");
4080 msg_print("You have gorged yourself!");
4082 chg_virtue(V_HARMONY, -1);
4083 chg_virtue(V_PATIENCE, -1);
4084 chg_virtue(V_TEMPERANCE, -2);
4094 else if (new_aux < old_aux)
4096 /* Describe the state */
4099 /* Fainting / Starving */
4102 msg_print("¤¢¤Þ¤ê¤Ë¤â¶õÊ¢¤Çµ¤¤ò¼º¤Ã¤Æ¤·¤Þ¤Ã¤¿¡ª");
4104 msg_print("You are getting faint from hunger!");
4112 msg_print("¤ªÊ¢¤¬¶õ¤¤¤ÆÅݤ줽¤¦¤À¡£");
4114 msg_print("You are getting weak from hunger!");
4122 msg_print("¤ªÊ¢¤¬¶õ¤¤¤Æ¤¤¿¡£");
4124 msg_print("You are getting hungry.");
4132 msg_print("ËþÊ¢´¶¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
4134 msg_print("You are no longer full.");
4142 msg_print("¤ä¤Ã¤È¤ªÊ¢¤¬¤¤Ä¤¯¤Ê¤¯¤Ê¤Ã¤¿¡£");
4144 msg_print("You are no longer gorged.");
4150 if (p_ptr->wild_mode && (new_aux < 2))
4162 /* Nothing to notice */
4163 if (!notice) return (FALSE);
4166 if (disturb_state) disturb(0, 0);
4168 /* Recalculate bonuses */
4169 p_ptr->update |= (PU_BONUS);
4172 p_ptr->redraw |= (PR_HUNGER);
4182 * Increases a stat by one randomized level -RAK-
4184 * Note that this function (used by stat potions) now restores
4185 * the stat BEFORE increasing it.
4187 bool inc_stat(int stat)
4191 /* Then augment the current/max stat */
4192 value = p_ptr->stat_cur[stat];
4194 /* Cannot go above 18/100 */
4195 if (value < p_ptr->stat_max_max[stat])
4197 /* Gain one (sometimes two) points */
4200 gain = ((randint0(100) < 75) ? 1 : 2);
4204 /* Gain 1/6 to 1/3 of distance to 18/100 */
4205 else if (value < (p_ptr->stat_max_max[stat]-2))
4207 /* Approximate gain value */
4208 gain = (((p_ptr->stat_max_max[stat]) - value) / 2 + 3) / 2;
4211 if (gain < 1) gain = 1;
4213 /* Apply the bonus */
4214 value += randint1(gain) + gain / 2;
4217 if (value > (p_ptr->stat_max_max[stat]-1)) value = p_ptr->stat_max_max[stat]-1;
4220 /* Gain one point at a time */
4226 /* Save the new value */
4227 p_ptr->stat_cur[stat] = value;
4229 /* Bring up the maximum too */
4230 if (value > p_ptr->stat_max[stat])
4232 p_ptr->stat_max[stat] = value;
4235 /* Recalculate bonuses */
4236 p_ptr->update |= (PU_BONUS);
4242 /* Nothing to gain */
4249 * Decreases a stat by an amount indended to vary from 0 to 100 percent.
4251 * Amount could be a little higher in extreme cases to mangle very high
4252 * stats from massive assaults. -CWS
4254 * Note that "permanent" means that the *given* amount is permanent,
4255 * not that the new value becomes permanent. This may not work exactly
4256 * as expected, due to "weirdness" in the algorithm, but in general,
4257 * if your stat is already drained, the "max" value will not drop all
4258 * the way down to the "cur" value.
4260 bool dec_stat(int stat, int amount, int permanent)
4262 int cur, max, loss, same, res = FALSE;
4265 /* Acquire current value */
4266 cur = p_ptr->stat_cur[stat];
4267 max = p_ptr->stat_max[stat];
4269 /* Note when the values are identical */
4270 same = (cur == max);
4272 /* Damage "current" value */
4275 /* Handle "low" values */
4278 if (amount > 90) cur--;
4279 if (amount > 50) cur--;
4280 if (amount > 20) cur--;
4284 /* Handle "high" values */
4287 /* Hack -- Decrement by a random amount between one-quarter */
4288 /* and one-half of the stat bonus times the percentage, with a */
4289 /* minimum damage of half the percentage. -CWS */
4290 loss = (((cur-18) / 2 + 1) / 2 + 1);
4293 if (loss < 1) loss = 1;
4295 /* Randomize the loss */
4296 loss = ((randint1(loss) + loss) * amount) / 100;
4299 if (loss < amount/2) loss = amount/2;
4301 /* Lose some points */
4304 /* Hack -- Only reduce stat to 17 sometimes */
4305 if (cur < 18) cur = (amount <= 20) ? 18 : 17;
4308 /* Prevent illegal values */
4309 if (cur < 3) cur = 3;
4311 /* Something happened */
4312 if (cur != p_ptr->stat_cur[stat]) res = TRUE;
4315 /* Damage "max" value */
4316 if (permanent && (max > 3))
4318 chg_virtue(V_SACRIFICE, 1);
4319 if (stat == A_WIS || stat == A_INT)
4320 chg_virtue(V_ENLIGHTEN, -2);
4322 /* Handle "low" values */
4325 if (amount > 90) max--;
4326 if (amount > 50) max--;
4327 if (amount > 20) max--;
4331 /* Handle "high" values */
4334 /* Hack -- Decrement by a random amount between one-quarter */
4335 /* and one-half of the stat bonus times the percentage, with a */
4336 /* minimum damage of half the percentage. -CWS */
4337 loss = (((max-18) / 2 + 1) / 2 + 1);
4338 loss = ((randint1(loss) + loss) * amount) / 100;
4339 if (loss < amount/2) loss = amount/2;
4341 /* Lose some points */
4344 /* Hack -- Only reduce stat to 17 sometimes */
4345 if (max < 18) max = (amount <= 20) ? 18 : 17;
4348 /* Hack -- keep it clean */
4349 if (same || (max < cur)) max = cur;
4351 /* Something happened */
4352 if (max != p_ptr->stat_max[stat]) res = TRUE;
4358 /* Actually set the stat to its new value. */
4359 p_ptr->stat_cur[stat] = cur;
4360 p_ptr->stat_max[stat] = max;
4362 /* Redisplay the stats later */
4363 p_ptr->redraw |= (PR_STATS);
4365 /* Recalculate bonuses */
4366 p_ptr->update |= (PU_BONUS);
4375 * Restore a stat. Return TRUE only if this actually makes a difference.
4377 bool res_stat(int stat)
4379 /* Restore if needed */
4380 if (p_ptr->stat_cur[stat] != p_ptr->stat_max[stat])
4383 p_ptr->stat_cur[stat] = p_ptr->stat_max[stat];
4385 /* Recalculate bonuses */
4386 p_ptr->update |= (PU_BONUS);
4388 /* Redisplay the stats later */
4389 p_ptr->redraw |= (PR_STATS);
4395 /* Nothing to restore */
4401 * Increase players hit points, notice effects
4403 bool hp_player(int num)
4406 vir = virtue_number(V_VITALITY);
4409 num = num * (p_ptr->virtues[vir - 1] + 1250) / 1250;
4411 /* Healing needed */
4412 if (p_ptr->chp < p_ptr->mhp)
4414 if ((num > 0) && (p_ptr->chp < (p_ptr->mhp/3)))
4415 chg_virtue(V_TEMPERANCE, 1);
4416 /* Gain hitpoints */
4419 /* Enforce maximum */
4420 if (p_ptr->chp >= p_ptr->mhp)
4422 p_ptr->chp = p_ptr->mhp;
4423 p_ptr->chp_frac = 0;
4427 p_ptr->redraw |= (PR_HP);
4430 p_ptr->window |= (PW_PLAYER);
4436 msg_print("¾¯¤·µ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4438 msg_print("You feel a little better.");
4447 msg_print("µ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4449 msg_print("You feel better.");
4458 msg_print("¤È¤Æ¤âµ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4460 msg_print("You feel much better.");
4469 msg_print("¤Ò¤¸¤ç¤¦¤Ëµ¤Ê¬¤¬Îɤ¯¤Ê¤Ã¤¿¡£");
4471 msg_print("You feel very good.");
4486 * Array of stat "descriptions"
4488 static cptr desc_stat_pos[] =
4530 * Array of stat "descriptions"
4532 static cptr desc_stat_neg[] =
4556 bool do_dec_stat(int stat)
4560 /* Access the "sustain" */
4563 case A_STR: if (p_ptr->sustain_str) sust = TRUE; break;
4564 case A_INT: if (p_ptr->sustain_int) sust = TRUE; break;
4565 case A_WIS: if (p_ptr->sustain_wis) sust = TRUE; break;
4566 case A_DEX: if (p_ptr->sustain_dex) sust = TRUE; break;
4567 case A_CON: if (p_ptr->sustain_con) sust = TRUE; break;
4568 case A_CHR: if (p_ptr->sustain_chr) sust = TRUE; break;
4572 if (sust && (!ironman_nightmare || randint0(13)))
4576 msg_format("%s¤Ê¤Ã¤¿µ¤¤¬¤·¤¿¤¬¡¢¤¹¤°¤Ë¸µ¤ËÌá¤Ã¤¿¡£",
4578 msg_format("You feel %s for a moment, but the feeling passes.",
4581 desc_stat_neg[stat]);
4587 /* Attempt to reduce the stat */
4588 if (dec_stat(stat, 10, (ironman_nightmare && !randint0(13))))
4592 msg_format("¤Ò¤É¤¯%s¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£", desc_stat_neg[stat]);
4594 msg_format("You feel very %s.", desc_stat_neg[stat]);
4602 /* Nothing obvious */
4608 * Restore lost "points" in a stat
4610 bool do_res_stat(int stat)
4612 /* Attempt to increase */
4617 msg_format("¸µÄ̤ê¤Ë%s¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£", desc_stat_pos[stat]);
4619 msg_format("You feel less %s.", desc_stat_neg[stat]);
4627 /* Nothing obvious */
4633 * Gain a "point" in a stat
4635 bool do_inc_stat(int stat)
4639 /* Restore strength */
4640 res = res_stat(stat);
4642 /* Attempt to increase */
4647 chg_virtue(V_ENLIGHTEN, 1);
4648 chg_virtue(V_FAITH, 1);
4650 else if (stat == A_INT)
4652 chg_virtue(V_KNOWLEDGE, 1);
4653 chg_virtue(V_ENLIGHTEN, 1);
4655 else if (stat == A_CON)
4656 chg_virtue(V_VITALITY, 1);
4660 msg_format("¥ï¡¼¥ª¡ª¤È¤Æ¤â%s¤Ê¤Ã¤¿¡ª", desc_stat_pos[stat]);
4662 msg_format("Wow! You feel very %s!", desc_stat_pos[stat]);
4670 /* Restoration worked */
4675 msg_format("¸µÄ̤ê¤Ë%s¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£", desc_stat_pos[stat]);
4677 msg_format("You feel less %s.", desc_stat_neg[stat]);
4685 /* Nothing obvious */
4691 * Restores any drained experience
4693 bool restore_level(void)
4695 /* Restore experience */
4696 if (p_ptr->exp < p_ptr->max_exp)
4700 msg_print("À¸Ì¿ÎϤ¬Ìá¤Ã¤Æ¤¤¿µ¤¤¬¤¹¤ë¡£");
4702 msg_print("You feel your life energies returning.");
4706 /* Restore the experience */
4707 p_ptr->exp = p_ptr->max_exp;
4709 /* Check the experience */
4724 bool lose_all_info(void)
4728 chg_virtue(V_KNOWLEDGE, -5);
4729 chg_virtue(V_ENLIGHTEN, -5);
4731 /* Forget info about objects */
4732 for (i = 0; i < INVEN_TOTAL; i++)
4734 object_type *o_ptr = &inventory[i];
4736 /* Skip non-objects */
4737 if (!o_ptr->k_idx) continue;
4739 /* Allow "protection" by the MENTAL flag */
4740 if (o_ptr->ident & (IDENT_MENTAL)) continue;
4742 /* Remove "default inscriptions" */
4743 o_ptr->feeling = FEEL_NONE;
4745 /* Hack -- Clear the "empty" flag */
4746 o_ptr->ident &= ~(IDENT_EMPTY);
4748 /* Hack -- Clear the "known" flag */
4749 o_ptr->ident &= ~(IDENT_KNOWN);
4751 /* Hack -- Clear the "felt" flag */
4752 o_ptr->ident &= ~(IDENT_SENSE);
4755 /* Recalculate bonuses */
4756 p_ptr->update |= (PU_BONUS);
4758 /* Combine / Reorder the pack (later) */
4759 p_ptr->notice |= (PN_COMBINE | PN_REORDER);
4762 p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
4764 /* Mega-Hack -- Forget the map */
4772 void do_poly_wounds(void)
4774 /* Changed to always provide at least _some_ healing */
4775 s16b wounds = p_ptr->cut;
4776 s16b hit_p = (p_ptr->mhp - p_ptr->chp);
4777 s16b change = damroll(p_ptr->lev, 5);
4778 bool Nasty_effect = one_in_(5);
4780 if (!(wounds || hit_p || Nasty_effect)) return;
4783 msg_print("½ý¤¬¤è¤ê·Ú¤¤¤â¤Î¤ËÊѲ½¤·¤¿¡£");
4785 msg_print("Your wounds are polymorphed into less serious ones.");
4792 msg_print("¿·¤¿¤Ê½ý¤¬¤Ç¤¤¿¡ª");
4793 take_hit(DAMAGE_LOSELIFE, change / 2, "ÊѲ½¤·¤¿½ý", -1);
4795 msg_print("A new wound was created!");
4796 take_hit(DAMAGE_LOSELIFE, change / 2, "a polymorphed wound", -1);
4803 set_cut(p_ptr->cut - (change / 2));
4809 * Change player race
4811 void change_race(int new_race, cptr effect_msg)
4813 cptr title = race_info[new_race].title;
4814 int old_race = p_ptr->prace;
4817 msg_format("¤¢¤Ê¤¿¤Ï%s%s¤ËÊѲ½¤·¤¿¡ª", effect_msg, title);
4819 msg_format("You turn into %s %s%s!", (!effect_msg[0] && is_a_vowel(title[0]) ? "an" : "a"), effect_msg, title);
4822 chg_virtue(V_CHANCE, 2);
4824 if (p_ptr->prace < 32)
4826 p_ptr->old_race1 |= 1L << p_ptr->prace;
4830 p_ptr->old_race2 |= 1L << (p_ptr->prace-32);
4832 p_ptr->prace = new_race;
4833 rp_ptr = &race_info[p_ptr->prace];
4835 /* Experience factor */
4836 p_ptr->expfact = rp_ptr->r_exp + cp_ptr->c_exp;
4839 * The speed bonus of Klackons and Sprites are disabled
4840 * and the experience penalty is decreased.
4842 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)))
4843 p_ptr->expfact -= 15;
4845 /* Get character's height and weight */
4846 get_height_weight();
4849 if (p_ptr->pclass == CLASS_SORCERER)
4850 p_ptr->hitdie = rp_ptr->r_mhp/2 + cp_ptr->c_mhp + ap_ptr->a_mhp;
4852 p_ptr->hitdie = rp_ptr->r_mhp + cp_ptr->c_mhp + ap_ptr->a_mhp;
4854 do_cmd_rerate(FALSE);
4856 /* The experience level may be modified */
4859 p_ptr->redraw |= (PR_BASIC);
4861 p_ptr->update |= (PU_BONUS);
4865 /* Load an autopick preference file */
4866 if (old_race != p_ptr->prace) autopick_load_pref(FALSE);
4868 /* Player's graphic tile may change */
4873 void do_poly_self(void)
4875 int power = p_ptr->lev;
4878 msg_print("¤¢¤Ê¤¿¤ÏÊѲ½¤Îˬ¤ì¤ò´¶¤¸¤¿...");
4880 msg_print("You feel a change coming over you...");
4883 chg_virtue(V_CHANCE, 1);
4885 if ((power > randint0(20)) && one_in_(3) && (p_ptr->prace != RACE_ANDROID))
4887 char effect_msg[80] = "";
4888 int new_race, expfact, goalexpfact;
4890 /* Some form of racial polymorph... */
4893 if ((power > randint0(5)) && one_in_(4))
4898 if (p_ptr->psex == SEX_MALE)
4900 p_ptr->psex = SEX_FEMALE;
4901 sp_ptr = &sex_info[p_ptr->psex];
4903 sprintf(effect_msg, "½÷À¤Î");
4905 sprintf(effect_msg, "female ");
4911 p_ptr->psex = SEX_MALE;
4912 sp_ptr = &sex_info[p_ptr->psex];
4914 sprintf(effect_msg, "ÃËÀ¤Î");
4916 sprintf(effect_msg, "male ");
4922 if ((power > randint0(30)) && one_in_(5))
4926 /* Harmful deformity */
4933 (void)dec_stat(tmp, randint1(6) + 6, one_in_(3));
4939 /* Deformities are discriminated against! */
4940 (void)dec_stat(A_CHR, randint1(6), TRUE);
4946 sprintf(tmp_msg,"%s",effect_msg);
4947 sprintf(effect_msg,"´ñ·Á¤Î%s",tmp_msg);
4949 sprintf(tmp_msg,"%s ",effect_msg);
4950 sprintf(effect_msg,"deformed %s ",tmp_msg);
4957 sprintf(effect_msg,"´ñ·Á¤Î");
4959 sprintf(effect_msg,"deformed ");
4965 while ((power > randint0(20)) && one_in_(10))
4967 /* Polymorph into a less mutated form */
4970 if (!lose_mutation(0))
4972 msg_print("´ñ̯¤Ê¤¯¤é¤¤ÉáÄ̤ˤʤ俵¤¤¬¤¹¤ë¡£");
4974 msg_print("You feel oddly normal.");
4980 * Restrict the race choices by exp penalty so
4981 * weak polymorph always means weak race
4986 goalexpfact = 100 + 3 * randint0(power);
4990 new_race = randint0(MAX_RACES);
4991 expfact = race_info[new_race].r_exp;
4993 while (((new_race == p_ptr->prace) && (expfact > goalexpfact)) || (new_race == RACE_ANDROID));
4995 change_race(new_race, effect_msg);
4998 if ((power > randint0(30)) && one_in_(6))
5006 msg_format("%s¤Î¹½À®¤¬ÊѲ½¤·¤¿¡ª", p_ptr->prace == RACE_ANDROID ? "µ¡³£" : "Æâ¡");
5008 msg_print("Your internal organs are rearranged!");
5013 (void)dec_stat(tmp, randint1(6) + 6, one_in_(3));
5019 msg_print("¸½ºß¤Î»Ñ¤ÇÀ¸¤¤Æ¤¤¤¯¤Î¤Ïº¤Æñ¤Ê¤è¤¦¤À¡ª");
5020 take_hit(DAMAGE_LOSELIFE, damroll(randint1(10), p_ptr->lev), "Ã×̿Ū¤ÊÆÍÁ³ÊÑ°Û", -1);
5022 msg_print("You find living difficult in your present form!");
5023 take_hit(DAMAGE_LOSELIFE, damroll(randint1(10), p_ptr->lev), "a lethal mutation", -1);
5030 if ((power > randint0(20)) && one_in_(4))
5035 do_cmd_rerate(FALSE);
5038 while ((power > randint0(15)) && one_in_(3))
5041 (void)gain_random_mutation(0);
5044 if (power > randint0(5))
5050 /* Note: earlier deductions may have left power < 0 already. */
5060 * Decreases players hit points and sets death flag if necessary
5062 * XXX XXX XXX Invulnerability needs to be changed into a "shield"
5064 * XXX XXX XXX Hack -- this function allows the user to save (or quit)
5065 * the game when he dies, since the "You die." message is shown before
5066 * setting the player to "dead".
5069 int take_hit(int damage_type, int damage, cptr hit_from, int monspell)
5071 int old_chp = p_ptr->chp;
5073 char death_message[1024];
5076 int warning = (p_ptr->mhp * hitpoint_warn / 10);
5079 if (p_ptr->is_dead) return 0;
5081 if (p_ptr->sutemi) damage *= 2;
5082 if (p_ptr->special_defense & KATA_IAI) damage += (damage + 4) / 5;
5084 if (easy_band) damage = (damage+1)/2;
5086 if (damage_type != DAMAGE_USELIFE)
5096 if (monspell >= 0) learn_spell(monspell);
5098 /* Mega-Hack -- Apply "invulnerability" */
5099 if ((damage_type != DAMAGE_USELIFE) && (damage_type != DAMAGE_LOSELIFE))
5101 if (IS_INVULN() && (damage < 9000))
5103 if (damage_type == DAMAGE_FORCE)
5106 msg_print("¥Ð¥ê¥¢¤¬ÀÚ¤êÎö¤«¤ì¤¿¡ª");
5108 msg_print("The attack cuts your shield of invulnerability open!");
5111 else if (one_in_(PENETRATE_INVULNERABILITY))
5114 msg_print("̵Ũ¤Î¥Ð¥ê¥¢¤òÇˤäƹ¶·â¤µ¤ì¤¿¡ª");
5116 msg_print("The attack penetrates your shield of invulnerability!");
5125 /* Multishadow effects is determined by turn */
5126 if (p_ptr->multishadow && (turn & 1))
5128 if (damage_type == DAMAGE_FORCE)
5131 msg_print("¸¸±Æ¤â¤í¤È¤âÂΤ¬ÀÚ¤êÎö¤«¤ì¤¿¡ª");
5133 msg_print("The attack hits Shadow together with you!");
5136 else if (damage_type == DAMAGE_ATTACK)
5139 msg_print("¹¶·â¤Ï¸¸±Æ¤ËÌ¿Ã椷¡¢¤¢¤Ê¤¿¤Ë¤ÏÆϤ«¤Ê¤«¤Ã¤¿¡£");
5141 msg_print("The attack hits Shadow, you are unharmed!");
5147 if (p_ptr->wraith_form)
5149 if (damage_type == DAMAGE_FORCE)
5152 msg_print("Ⱦʪ¼Á¤ÎÂΤ¬ÀÚ¤êÎö¤«¤ì¤¿¡ª");
5154 msg_print("The attack cuts through your ethereal body!");
5160 if ((damage == 0) && one_in_(2)) damage = 1;
5164 if (p_ptr->special_defense & KATA_MUSOU)
5167 if ((damage == 0) && one_in_(2)) damage = 1;
5169 } /* not if LOSELIFE USELIFE */
5171 /* Hurt the player */
5172 p_ptr->chp -= damage;
5173 if(damage_type == DAMAGE_GENO && p_ptr->chp < 0)
5175 damage += p_ptr->chp;
5179 /* Display the hitpoints */
5180 p_ptr->redraw |= (PR_HP);
5183 p_ptr->window |= (PW_PLAYER);
5187 if (damage_type != DAMAGE_GENO && p_ptr->chp == 0)
5189 chg_virtue(V_SACRIFICE, 1);
5190 chg_virtue(V_CHANCE, 2);
5196 bool android = (p_ptr->prace == RACE_ANDROID ? TRUE : FALSE);
5198 #ifdef JP /* »à¤ó¤À»þ¤Ë¶¯À©½ªÎ»¤·¤Æ»à¤ò²óÈò¤Ç¤¤Ê¤¯¤·¤Æ¤ß¤¿ by Habu */
5200 if(!save_player()) msg_print("¥»¡¼¥Ö¼ºÇÔ¡ª");
5206 chg_virtue(V_SACRIFICE, 10);
5209 p_ptr->leaving = TRUE;
5212 p_ptr->is_dead = TRUE;
5214 if (p_ptr->inside_arena)
5216 cptr m_name = r_name+r_info[arena_info[p_ptr->arena_number].r_idx].name;
5218 msg_format("¤¢¤Ê¤¿¤Ï%s¤ÎÁ°¤ËÇÔ¤ìµî¤Ã¤¿¡£", m_name);
5220 msg_format("You are beaten by %s.", m_name);
5223 if (record_arena) do_cmd_write_nikki(NIKKI_ARENA, -1 - p_ptr->arena_number, m_name);
5227 int q_idx = quest_number(dun_level);
5228 bool seppuku = streq(hit_from, "Seppuku");
5229 bool winning_seppuku = p_ptr->total_winner && seppuku;
5232 /* Make screen dump */
5233 screen_dump = make_screen_dump();
5236 /* Note cause of death */
5239 strcpy(p_ptr->died_from, hit_from);
5241 if (!winning_seppuku) strcpy(p_ptr->died_from, "ÀÚÊ¢");
5248 sprintf(dummy, "%s%s%s", !p_ptr->paralyzed ? "" : p_ptr->free_act ? "ĦÁü¾õÂÖ¤Ç" : "Ëãáã¾õÂÖ¤Ç", p_ptr->image ? "¸¸³Ð¤ËÏĤó¤À" : "", hit_from);
5250 sprintf(dummy, "%s%s", hit_from, !p_ptr->paralyzed ? "" : " while helpless");
5252 my_strcpy(p_ptr->died_from, dummy, sizeof p_ptr->died_from);
5255 /* No longer a winner */
5256 p_ptr->total_winner = FALSE;
5258 if (winning_seppuku)
5261 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "¾¡Íø¤Î¸åÀÚÊ¢¤·¤¿¡£");
5263 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "did Seppuku after the winning.");
5270 if (p_ptr->inside_arena)
5272 strcpy(buf,"¥¢¥ê¡¼¥Ê");
5274 strcpy(buf,"in the Arena");
5276 else if (!dun_level)
5280 strcpy(buf,"on the surface");
5282 else if (q_idx && (is_fixed_quest_idx(q_idx) &&
5283 !((q_idx == QUEST_OBERON) || (q_idx == QUEST_SERPENT))))
5285 strcpy(buf,"¥¯¥¨¥¹¥È");
5287 strcpy(buf,"in a quest");
5291 sprintf(buf,"%d³¬", dun_level);
5293 sprintf(buf,"level %d", dun_level);
5297 sprintf(tmp, "%s¤Ç%s¤Ë»¦¤µ¤ì¤¿¡£", buf, p_ptr->died_from);
5299 sprintf(tmp, "killed by %s %s.", p_ptr->died_from, buf);
5301 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, tmp);
5305 do_cmd_write_nikki(NIKKI_GAMESTART, 1, "-------- ¥²¡¼¥à¥ª¡¼¥Ð¡¼ --------");
5307 do_cmd_write_nikki(NIKKI_GAMESTART, 1, "-------- Game Over --------");
5309 do_cmd_write_nikki(NIKKI_BUNSHOU, 1, "\n\n\n\n");
5314 if (get_check_strict("²èÌ̤òÊݸ¤·¤Þ¤¹¤«¡©", CHECK_NO_HISTORY))
5316 if (get_check_strict("Dump the screen? ", CHECK_NO_HISTORY))
5319 do_cmd_save_screen();
5324 /* Initialize "last message" buffer */
5325 if (p_ptr->last_message) string_free(p_ptr->last_message);
5326 p_ptr->last_message = NULL;
5328 /* Hack -- Note death */
5332 msg_format("¤¢¤Ê¤¿¤Ï%s¤Þ¤·¤¿¡£", android ? "²õ¤ì" : "»à¤Ë");
5334 msg_print(android ? "You are broken." : "You die.");
5341 if (winning_seppuku)
5344 get_rnd_line("seppuku_j.txt", 0, death_message);
5346 get_rnd_line("seppuku.txt", 0, death_message);
5352 get_rnd_line("death_j.txt", 0, death_message);
5354 get_rnd_line("death.txt", 0, death_message);
5358 while (!get_string(winning_seppuku ? "¼À¤¤Î¶ç: " : "ÃÇËöËâ¤Î¶«¤Ó: ", death_message, 1024)) ;
5360 while (!get_string("Last word: ", death_message, 1024)) ;
5362 if (death_message[0] == '\0')
5365 strcpy(death_message, format("¤¢¤Ê¤¿¤Ï%s¤Þ¤·¤¿¡£", android ? "²õ¤ì" : "»à¤Ë"));
5367 strcpy(death_message, android ? "You are broken." : "You die.");
5370 else p_ptr->last_message = string_make(death_message);
5373 if (winning_seppuku)
5378 int msg_pos_x[9] = { 5, 7, 9, 12, 14, 17, 19, 21, 23};
5379 int msg_pos_y[9] = { 3, 4, 5, 4, 5, 4, 5, 6, 4};
5386 for (i = 0; i < 40; i++)
5387 Term_putstr(randint0(w / 2) * 2, randint0(h), 2, TERM_VIOLET, "¦Ô");
5389 str = death_message;
5390 if (strncmp(str, "¡Ö", 2) == 0) str += 2;
5392 str2 = my_strstr(str, "¡×");
5393 if (str2 != NULL) *str2 = '\0';
5398 str2 = my_strstr(str, " ");
5399 if (str2 == NULL) len = strlen(str);
5400 else len = str2 - str;
5404 Term_putstr_v(w * 3 / 4 - 2 - msg_pos_x[i] * 2, msg_pos_y[i], len,
5406 if (str2 == NULL) break;
5410 if (*str == 0) break;
5414 Term_putstr(w-1, h-1, 1, TERM_WHITE, " ");
5418 /* Make screen dump */
5419 screen_dump = make_screen_dump();
5422 /* Wait a key press */
5427 msg_print(death_message);
5435 /* Hitpoint warning */
5436 if (p_ptr->chp < warning)
5438 /* Hack -- bell on first notice */
5439 if (old_chp > warning) bell();
5443 if (record_danger && (old_chp > warning))
5445 if (p_ptr->image && damage_type == DAMAGE_ATTACK)
5449 hit_from = "something";
5453 sprintf(tmp,"%s¤Ë¤è¤Ã¤Æ¥Ô¥ó¥Á¤Ë´Ù¤Ã¤¿¡£",hit_from);
5455 sprintf(tmp,"A critical situation because of %s.",hit_from);
5457 do_cmd_write_nikki(NIKKI_BUNSHOU, 0, tmp);
5462 /* stop auto_more even if DAMAGE_USELIFE */
5468 msg_print("*** ·Ù¹ð:Äã¥Ò¥Ã¥È¡¦¥Ý¥¤¥ó¥È¡ª ***");
5470 msg_print("*** LOW HITPOINT WARNING! ***");
5476 if (p_ptr->wild_mode && !p_ptr->leaving && (p_ptr->chp < MAX(warning, p_ptr->mhp/5)))
5487 void gain_exp_64(s32b amount, u32b amount_frac)
5489 if (p_ptr->is_dead) return;
5491 if (p_ptr->prace == RACE_ANDROID) return;
5493 /* Gain some experience */
5494 s64b_add(&(p_ptr->exp), &(p_ptr->exp_frac), amount, amount_frac);
5496 /* Slowly recover from experience drainage */
5497 if (p_ptr->exp < p_ptr->max_exp)
5499 /* Gain max experience (20%) (was 10%) */
5500 p_ptr->max_exp += amount / 5;
5503 /* Check Experience */
5511 void gain_exp(s32b amount)
5513 gain_exp_64(amount, 0L);
5517 void calc_android_exp(void)
5521 if (p_ptr->is_dead) return;
5523 if (p_ptr->prace != RACE_ANDROID) return;
5525 for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
5527 object_type *o_ptr = &inventory[i];
5529 object_type *q_ptr = &forge;
5531 int level = MAX(k_info[o_ptr->k_idx].level - 8, 1);
5533 if ((i == INVEN_RIGHT) || (i == INVEN_LEFT) || (i == INVEN_NECK) || (i == INVEN_LITE)) continue;
5534 if (!o_ptr->k_idx) continue;
5536 /* Wipe the object */
5539 object_copy(q_ptr, o_ptr);
5540 q_ptr->discount = 0;
5541 q_ptr->curse_flags = 0L;
5543 if (object_is_fixed_artifact(o_ptr))
5545 level = (level + MAX(a_info[o_ptr->name1].level - 8, 5)) / 2;
5546 level += MIN(20, a_info[o_ptr->name1].rarity/(a_info[o_ptr->name1].gen_flags & TRG_INSTA_ART ? 10 : 3));
5548 else if (object_is_ego(o_ptr))
5550 level += MAX(3, (e_info[o_ptr->name2].rating - 5)/2);
5552 else if (o_ptr->art_name)
5554 s32b total_flags = flag_cost(o_ptr, o_ptr->pval);
5557 if (!object_is_weapon_ammo(o_ptr))
5560 if (total_flags < 15000) fake_level = 10;
5561 else if (total_flags < 35000) fake_level = 25;
5562 else fake_level = 40;
5567 if (total_flags < 20000) fake_level = 10;
5568 else if (total_flags < 45000) fake_level = 25;
5569 else fake_level = 40;
5572 level = MAX(level, (level + MAX(fake_level - 8, 5)) / 2 + 3);
5575 value = object_value_real(q_ptr);
5577 if (value <= 0) continue;
5578 if ((o_ptr->tval == TV_SOFT_ARMOR) && (o_ptr->sval == SV_ABUNAI_MIZUGI) && (p_ptr->pseikaku != SEIKAKU_SEXY)) value /= 32;
5579 if (value > 5000000L) value = 5000000L;
5580 if ((o_ptr->tval == TV_DRAG_ARMOR) || (o_ptr->tval == TV_CARD)) level /= 2;
5582 if (object_is_artifact(o_ptr) || object_is_ego(o_ptr) ||
5583 (o_ptr->tval == TV_DRAG_ARMOR) ||
5584 ((o_ptr->tval == TV_HELM) && (o_ptr->sval == SV_DRAGON_HELM)) ||
5585 ((o_ptr->tval == TV_SHIELD) && (o_ptr->sval == SV_DRAGON_SHIELD)) ||
5586 ((o_ptr->tval == TV_GLOVES) && (o_ptr->sval == SV_SET_OF_DRAGON_GLOVES)) ||
5587 ((o_ptr->tval == TV_BOOTS) && (o_ptr->sval == SV_PAIR_OF_DRAGON_GREAVE)) ||
5588 ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DIAMOND_EDGE)))
5590 if (level > 65) level = 35 + (level - 65) / 5;
5591 else if (level > 35) level = 25 + (level - 35) / 3;
5592 else if (level > 15) level = 15 + (level - 15) / 2;
5593 exp = MIN(100000L, value) * level * level / 2;
5594 if (value > 100000L)
5595 exp += (value - 100000L) * level * level / 8;
5599 exp = MIN(100000L, value) * level;
5600 if (value > 100000L)
5601 exp += (value - 100000L) * level / 4;
5603 if ((((i == INVEN_RARM) || (i == INVEN_LARM)) && (buki_motteruka(i))) || (i == INVEN_BOW)) total_exp += exp / 48;
5604 else total_exp += exp / 16;
5605 if (i == INVEN_BODY) total_exp += exp / 32;
5607 p_ptr->exp = p_ptr->max_exp = total_exp;
5609 /* Check Experience */
5617 void lose_exp(s32b amount)
5619 if (p_ptr->prace == RACE_ANDROID) return;
5621 /* Never drop below zero experience */
5622 if (amount > p_ptr->exp) amount = p_ptr->exp;
5624 /* Lose some experience */
5625 p_ptr->exp -= amount;
5627 /* Check Experience */
5634 * If resisted to draining, return FALSE
5636 bool drain_exp(s32b drain, s32b slip, int hold_life_prob)
5638 /* Androids and their mimics are never drained */
5639 if (p_ptr->prace == RACE_ANDROID) return FALSE;
5641 if (p_ptr->hold_life && (randint0(100) < hold_life_prob))
5643 /* Hold experience */
5645 msg_print("¤·¤«¤·¼«¸Ê¤ÎÀ¸Ì¿ÎϤò¼é¤ê¤¤Ã¤¿¡ª");
5647 msg_print("You keep hold of your life force!");
5652 /* Hold experience failed */
5653 if (p_ptr->hold_life)
5656 msg_print("À¸Ì¿ÎϤò¾¯¤·µÛ¤¤¼è¤é¤ì¤¿µ¤¤¬¤¹¤ë¡ª");
5658 msg_print("You feel your life slipping away!");
5665 msg_print("À¸Ì¿ÎϤ¬ÂΤ«¤éµÛ¤¤¼è¤é¤ì¤¿µ¤¤¬¤¹¤ë¡ª");
5667 msg_print("You feel your life draining away!");
5676 bool set_ultimate_res(int v, bool do_dec)
5678 bool notice = FALSE;
5680 /* Hack -- Force good values */
5681 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
5683 if (p_ptr->is_dead) return FALSE;
5688 if (p_ptr->ult_res && !do_dec)
5690 if (p_ptr->ult_res > v) return FALSE;
5692 else if (!p_ptr->ult_res)
5695 msg_print("¤¢¤é¤æ¤ë¤³¤È¤ËÂФ·¤ÆÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
5697 msg_print("You feel resistant!");
5710 msg_print("¤¢¤é¤æ¤ë¤³¤È¤ËÂФ¹¤ëÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
5712 msg_print("You feel less resistant");
5722 /* Redraw status bar */
5723 p_ptr->redraw |= (PR_STATUS);
5725 /* Nothing to notice */
5726 if (!notice) return (FALSE);
5729 if (disturb_state) disturb(0, 0);
5731 /* Recalculate bonuses */
5732 p_ptr->update |= (PU_BONUS);
5741 bool set_tim_res_nether(int v, bool do_dec)
5743 bool notice = FALSE;
5745 /* Hack -- Force good values */
5746 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
5748 if (p_ptr->is_dead) return FALSE;
5753 if (p_ptr->tim_res_nether && !do_dec)
5755 if (p_ptr->tim_res_nether > v) return FALSE;
5757 else if (!p_ptr->tim_res_nether)
5760 msg_print("ÃϹö¤ÎÎϤËÂФ·¤ÆÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
5762 msg_print("You feel nether resistant!");
5772 if (p_ptr->tim_res_nether)
5775 msg_print("ÃϹö¤ÎÎϤËÂФ¹¤ëÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
5777 msg_print("You feel less nether resistant");
5785 p_ptr->tim_res_nether = v;
5787 /* Redraw status bar */
5788 p_ptr->redraw |= (PR_STATUS);
5790 /* Nothing to notice */
5791 if (!notice) return (FALSE);
5794 if (disturb_state) disturb(0, 0);
5796 /* Recalculate bonuses */
5797 p_ptr->update |= (PU_BONUS);
5806 bool set_tim_res_time(int v, bool do_dec)
5808 bool notice = FALSE;
5810 /* Hack -- Force good values */
5811 v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
5813 if (p_ptr->is_dead) return FALSE;
5818 if (p_ptr->tim_res_time && !do_dec)
5820 if (p_ptr->tim_res_time > v) return FALSE;
5822 else if (!p_ptr->tim_res_time)
5825 msg_print("»þ´ÖµÕž¤ÎÎϤËÂФ·¤ÆÂÑÀ¤¬¤Ä¤¤¤¿µ¤¤¬¤¹¤ë¡ª");
5827 msg_print("You feel time resistant!");
5837 if (p_ptr->tim_res_time)
5840 msg_print("»þ´ÖµÕž¤ÎÎϤËÂФ¹¤ëÂÑÀ¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
5842 msg_print("You feel less time resistant");
5850 p_ptr->tim_res_time = v;
5852 /* Redraw status bar */
5853 p_ptr->redraw |= (PR_STATUS);
5855 /* Nothing to notice */
5856 if (!notice) return (FALSE);
5859 if (disturb_state) disturb(0, 0);
5861 /* Recalculate bonuses */
5862 p_ptr->update |= (PU_BONUS);
5873 * Choose a warrior-mage elemental attack. -LM-
5875 bool choose_ele_attack(void)
5881 if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM))
5884 msg_format("Éð´ï¤ò»ý¤¿¤Ê¤¤¤ÈËâË¡·õ¤Ï»È¤¨¤Ê¤¤¡£");
5886 msg_format("You cannot use temporary branding with no weapon.");
5894 num = (p_ptr->lev - 20) / 5;
5897 c_prt(TERM_RED, " a) ¾Æ´þ", 2, 14);
5899 c_prt(TERM_RED, " a) Fire Brand", 2, 14);
5903 if (num >= 2) c_prt(TERM_L_WHITE," b) Åà·ë", 3, 14);
5905 if (num >= 2) c_prt(TERM_L_WHITE," b) Cold Brand", 3, 14);
5907 else prt("", 3, 14);
5910 if (num >= 3) c_prt(TERM_GREEN, " c) ÆÇ»¦", 4, 14);
5912 if (num >= 3) c_prt(TERM_GREEN, " c) Poison Brand", 4, 14);
5914 else prt("", 4, 14);
5917 if (num >= 4) c_prt(TERM_L_DARK, " d) Íϲò", 5, 14);
5919 if (num >= 4) c_prt(TERM_L_DARK, " d) Acid Brand", 5, 14);
5921 else prt("", 5, 14);
5924 if (num >= 5) c_prt(TERM_BLUE, " e) ÅÅ·â", 6, 14);
5926 if (num >= 5) c_prt(TERM_BLUE, " e) Elec Brand", 6, 14);
5928 else prt("", 6, 14);
5936 prt(" ¤É¤Î¸µÁǹ¶·â¤ò¤·¤Þ¤¹¤«¡©", 1, 14);
5938 prt(" Choose a temporary elemental brand ", 1, 14);
5943 if ((choice == 'a') || (choice == 'A'))
5944 set_ele_attack(ATTACK_FIRE, p_ptr->lev/2 + randint1(p_ptr->lev/2));
5945 else if (((choice == 'b') || (choice == 'B')) && (num >= 2))
5946 set_ele_attack(ATTACK_COLD, p_ptr->lev/2 + randint1(p_ptr->lev/2));
5947 else if (((choice == 'c') || (choice == 'C')) && (num >= 3))
5948 set_ele_attack(ATTACK_POIS, p_ptr->lev/2 + randint1(p_ptr->lev/2));
5949 else if (((choice == 'd') || (choice == 'D')) && (num >= 4))
5950 set_ele_attack(ATTACK_ACID, p_ptr->lev/2 + randint1(p_ptr->lev/2));
5951 else if (((choice == 'e') || (choice == 'E')) && (num >= 5))
5952 set_ele_attack(ATTACK_ELEC, p_ptr->lev/2 + randint1(p_ptr->lev/2));
5956 msg_print("ËâË¡·õ¤ò»È¤¦¤Î¤ò¤ä¤á¤¿¡£");
5958 msg_print("You cancel the temporary branding.");
5970 * Choose a elemental immune. -LM-
5972 bool choose_ele_immune(int turn)
5980 c_prt(TERM_RED, " a) ²Ð±ê", 2, 14);
5982 c_prt(TERM_RED, " a) Immune Fire", 2, 14);
5986 c_prt(TERM_L_WHITE," b) Î䵤", 3, 14);
5988 c_prt(TERM_L_WHITE," b) Immune Cold", 3, 14);
5992 c_prt(TERM_L_DARK, " c) »À", 4, 14);
5994 c_prt(TERM_L_DARK, " c) Immune Acid", 4, 14);
5998 c_prt(TERM_BLUE, " d) ÅÅ·â", 5, 14);
6000 c_prt(TERM_BLUE, " d) Immune Elec", 5, 14);
6011 prt(" ¤É¤Î¸µÁǤÎÌȱ֤ò¤Ä¤±¤Þ¤¹¤«¡©", 1, 14);
6013 prt(" Choose a temporary elemental immune ", 1, 14);
6018 if ((choice == 'a') || (choice == 'A'))
6019 set_ele_immune(DEFENSE_FIRE, turn);
6020 else if ((choice == 'b') || (choice == 'B'))
6021 set_ele_immune(DEFENSE_COLD, turn);
6022 else if ((choice == 'c') || (choice == 'C'))
6023 set_ele_immune(DEFENSE_ACID, turn);
6024 else if ((choice == 'd') || (choice == 'D'))
6025 set_ele_immune(DEFENSE_ELEC, turn);
6029 msg_print("Ìȱ֤òÉÕ¤±¤ë¤Î¤ò¤ä¤á¤¿¡£");
6031 msg_print("You cancel the temporary immune.");