3 * @brief
\83v
\83\8c\83C
\83\84\81[
\82Ì
\88ù
\82Þ
\83R
\83}
\83\93\83h
\8eÀ
\91\95\r
6 * cmd6.c
\82æ
\82è
\95ª
\97£
\81B
\r
10 #include "angband.h"
\r
11 #include "selfinfo.h"
\r
14 * @brief
\96ò
\82ð
\88ù
\82Þ
\83R
\83}
\83\93\83h
\82Ì
\83T
\83u
\83\8b\81[
\83`
\83\93 /
\r
15 * Quaff a potion (from the pack or the floor)
\r
16 * @param item
\88ù
\82Þ
\96ò
\83I
\83u
\83W
\83F
\83N
\83g
\82Ì
\8f\8a\8e\9d\95iID
\r
19 void do_cmd_quaff_potion_aux(int item)
\r
28 p_ptr->energy_use = 100;
\r
32 if (flush_failure) flush();
\r
33 msg_print(_("
\95r
\82©
\82ç
\90\85\82ª
\97¬
\82ê
\8fo
\82Ä
\82±
\82È
\82¢
\81I", "The potion doesn't flow out from a bottle."));
\r
39 if (music_singing_any()) stop_singing();
\r
40 if (hex_spelling_any())
\r
42 if (!hex_spelling(HEX_INHAIL)) stop_hex_spell_all();
\r
45 /* Get the item (in the pack) */
\r
48 o_ptr = &inventory[item];
\r
51 /* Get the item (on the floor) */
\r
54 o_ptr = &o_list[0 - item];
\r
57 /* Get local object */
\r
60 /* Obtain a local object */
\r
61 object_copy(q_ptr, o_ptr);
\r
66 /* Reduce and describe inventory */
\r
69 inven_item_increase(item, -1);
\r
70 inven_item_describe(item);
\r
71 inven_item_optimize(item);
\r
74 /* Reduce and describe floor item */
\r
77 floor_item_increase(0 - item, -1);
\r
78 floor_item_describe(0 - item);
\r
79 floor_item_optimize(0 - item);
\r
86 /* Not identified yet */
\r
90 lev = k_info[q_ptr->k_idx].level;
\r
92 /* Analyze the potion */
\r
93 if (q_ptr->tval == TV_POTION)
\r
95 switch (q_ptr->sval)
\r
97 /*
\88ù
\82Ý
\82²
\82½
\82¦
\82ð
\83I
\83\8a\83W
\83i
\83\8b\82æ
\82è
\8d×
\82©
\82
\95\
\8c» */
\r
98 case SV_POTION_WATER:
\r
99 msg_print(_("
\8cû
\82Ì
\92\86\82ª
\82³
\82Á
\82Ï
\82è
\82µ
\82½
\81B", ""));
\r
100 msg_print(_("
\82Ì
\82Ç
\82Ì
\8a\89\82«
\82ª
\8f
\82µ
\82¨
\82³
\82Ü
\82Á
\82½
\81B", "You feel less thirsty."));
\r
104 case SV_POTION_APPLE_JUICE:
\r
105 msg_print(_("
\8aÃ
\82
\82Ä
\83T
\83b
\83p
\83\8a\82Æ
\82µ
\82Ä
\82¢
\82Ä
\81A
\82Æ
\82Ä
\82à
\82¨
\82¢
\82µ
\82¢
\81B", ""));
\r
106 msg_print(_("
\82Ì
\82Ç
\82Ì
\8a\89\82«
\82ª
\8f
\82µ
\82¨
\82³
\82Ü
\82Á
\82½
\81B", "You feel less thirsty."));
\r
110 case SV_POTION_SLIME_MOLD:
\r
111 msg_print(_("
\82È
\82ñ
\82Æ
\82à
\95s
\8bC
\96¡
\82È
\96¡
\82¾
\81B", ""));
\r
112 msg_print(_("
\82Ì
\82Ç
\82Ì
\8a\89\82«
\82ª
\8f
\82µ
\82¨
\82³
\82Ü
\82Á
\82½
\81B", "You feel less thirsty."));
\r
116 case SV_POTION_SLOWNESS:
\r
117 if (set_slow(randint1(25) + 15, FALSE)) ident = TRUE;
\r
120 case SV_POTION_SALT_WATER:
\r
121 msg_print(_("
\82¤
\82¥
\81I
\8ev
\82í
\82¸
\93f
\82¢
\82Ä
\82µ
\82Ü
\82Á
\82½
\81B", "The potion makes you vomit!"));
\r
123 if (!(prace_is_(RACE_GOLEM) ||
\r
124 prace_is_(RACE_ZOMBIE) ||
\r
125 prace_is_(RACE_DEMON) ||
\r
126 prace_is_(RACE_ANDROID) ||
\r
127 prace_is_(RACE_SPECTRE) ||
\r
128 (mimic_info[p_ptr->mimic_form].MIMIC_FLAGS & MIMIC_IS_NONLIVING)))
\r
130 /* Only living creatures get thirsty */
\r
131 (void)set_food(PY_FOOD_STARVE - 1);
\r
134 (void)set_poisoned(0);
\r
135 (void)set_paralyzed(p_ptr->paralyzed + 4);
\r
139 case SV_POTION_POISON:
\r
140 if (!(p_ptr->resist_pois || IS_OPPOSE_POIS()))
\r
142 if (set_poisoned(p_ptr->poisoned + randint0(15) + 10))
\r
149 case SV_POTION_BLINDNESS:
\r
150 if (!p_ptr->resist_blind)
\r
152 if (set_blind(p_ptr->blind + randint0(100) + 100))
\r
159 case SV_POTION_CONFUSION: /* Booze */
\r
160 if (p_ptr->pclass != CLASS_MONK) chg_virtue(V_HARMONY, -1);
\r
161 else if (!p_ptr->resist_conf) p_ptr->special_attack |= ATTACK_SUIKEN;
\r
162 if (!p_ptr->resist_conf)
\r
164 if (set_confused(randint0(20) + 15))
\r
170 if (!p_ptr->resist_chaos)
\r
174 if (set_image(p_ptr->image + randint0(150) + 150))
\r
179 if (one_in_(13) && (p_ptr->pclass != CLASS_MONK))
\r
182 if (one_in_(3)) lose_all_info();
\r
184 (void)teleport_player_aux(100, TELEPORT_NONMAGICAL | TELEPORT_PASSIVE);
\r
186 msg_print(_("
\92m
\82ç
\82È
\82¢
\8fê
\8f\8a\82Å
\96Ú
\82ª
\90Á
\82ß
\82½
\81B
\93ª
\92É
\82ª
\82·
\82é
\81B", "You wake up somewhere with a sore head..."));
\r
187 msg_print(_("
\89½
\82à
\8ev
\82¢
\8fo
\82¹
\82È
\82¢
\81B
\82Ç
\82¤
\82â
\82Á
\82Ä
\82±
\82±
\82Ö
\97\88\82½
\82Ì
\82©
\82à
\95ª
\82©
\82ç
\82È
\82¢
\81I", "You can't remember a thing, or how you got here!"));
\r
192 case SV_POTION_SLEEP:
\r
193 if (!p_ptr->free_act)
\r
195 msg_print(_("
\82 \82È
\82½
\82Í
\96°
\82Á
\82Ä
\82µ
\82Ü
\82Á
\82½
\81B", "You fall asleep."));
\r
197 if (ironman_nightmare)
\r
199 msg_print(_("
\8b°
\82ë
\82µ
\82¢
\8cõ
\8ci
\82ª
\93ª
\82É
\95\82\82©
\82ñ
\82Å
\82«
\82½
\81B", "A horrible vision enters your mind."));
\r
201 /* Have some nightmares */
\r
202 sanity_blast(NULL, FALSE);
\r
204 if (set_paralyzed(p_ptr->paralyzed + randint0(4) + 4))
\r
211 case SV_POTION_LOSE_MEMORIES:
\r
212 if (!p_ptr->hold_exp && (p_ptr->exp > 0))
\r
214 msg_print(_("
\89ß
\8b\8e\82Ì
\8bL
\89¯
\82ª
\94\96\82ê
\82Ä
\82¢
\82
\8bC
\82ª
\82·
\82é
\81B", "You feel your memories fade."));
\r
215 chg_virtue(V_KNOWLEDGE, -5);
\r
217 lose_exp(p_ptr->exp / 4);
\r
222 case SV_POTION_RUINATION:
\r
223 msg_print(_("
\90g
\82à
\90S
\82à
\8eã
\82Á
\82Ä
\82«
\82Ä
\81A
\90¸
\8bC
\82ª
\94²
\82¯
\82Ä
\82¢
\82
\82æ
\82¤
\82¾
\81B", "Your nerves and muscles feel weak and lifeless!"));
\r
224 take_hit(DAMAGE_LOSELIFE, damroll(10, 10), _("
\94j
\96Å
\82Ì
\96ò", "a potion of Ruination"), -1);
\r
226 (void)dec_stat(A_DEX, 25, TRUE);
\r
227 (void)dec_stat(A_WIS, 25, TRUE);
\r
228 (void)dec_stat(A_CON, 25, TRUE);
\r
229 (void)dec_stat(A_STR, 25, TRUE);
\r
230 (void)dec_stat(A_CHR, 25, TRUE);
\r
231 (void)dec_stat(A_INT, 25, TRUE);
\r
235 case SV_POTION_DEC_STR:
\r
236 if (do_dec_stat(A_STR)) ident = TRUE;
\r
239 case SV_POTION_DEC_INT:
\r
240 if (do_dec_stat(A_INT)) ident = TRUE;
\r
243 case SV_POTION_DEC_WIS:
\r
244 if (do_dec_stat(A_WIS)) ident = TRUE;
\r
247 case SV_POTION_DEC_DEX:
\r
248 if (do_dec_stat(A_DEX)) ident = TRUE;
\r
251 case SV_POTION_DEC_CON:
\r
252 if (do_dec_stat(A_CON)) ident = TRUE;
\r
255 case SV_POTION_DEC_CHR:
\r
256 if (do_dec_stat(A_CHR)) ident = TRUE;
\r
259 case SV_POTION_DETONATIONS:
\r
260 msg_print(_("
\91Ì
\82Ì
\92\86\82Å
\8c\83\82µ
\82¢
\94\9a\94
\82ª
\8bN
\82«
\82½
\81I", "Massive explosions rupture your body!"));
\r
261 take_hit(DAMAGE_NOESCAPE, damroll(50, 20), _("
\94\9a\94
\82Ì
\96ò", "a potion of Detonation"), -1);
\r
263 (void)set_stun(p_ptr->stun + 75);
\r
264 (void)set_cut(p_ptr->cut + 5000);
\r
268 case SV_POTION_DEATH:
\r
269 chg_virtue(V_VITALITY, -1);
\r
270 chg_virtue(V_UNLIFE, 5);
\r
271 msg_print(_("
\8e\80\82Ì
\97\
\8a´
\82ª
\91Ì
\92\86\82ð
\8bì
\82¯
\82ß
\82®
\82Á
\82½
\81B", "A feeling of Death flows through your body."));
\r
272 take_hit(DAMAGE_LOSELIFE, 5000, _("
\8e\80\82Ì
\96ò", "a potion of Death"), -1);
\r
276 case SV_POTION_INFRAVISION:
\r
277 if (set_tim_infra(p_ptr->tim_infra + 100 + randint1(100), FALSE))
\r
283 case SV_POTION_DETECT_INVIS:
\r
284 if (set_tim_invis(p_ptr->tim_invis + 12 + randint1(12), FALSE))
\r
290 case SV_POTION_SLOW_POISON:
\r
291 if (set_poisoned(p_ptr->poisoned / 2)) ident = TRUE;
\r
294 case SV_POTION_CURE_POISON:
\r
295 if (set_poisoned(0)) ident = TRUE;
\r
298 case SV_POTION_BOLDNESS:
\r
299 if (set_afraid(0)) ident = TRUE;
\r
302 case SV_POTION_SPEED:
\r
305 if (set_fast(randint1(25) + 15, FALSE)) ident = TRUE;
\r
309 (void)set_fast(p_ptr->fast + 5, FALSE);
\r
313 case SV_POTION_RESIST_HEAT:
\r
314 if (set_oppose_fire(p_ptr->oppose_fire + randint1(10) + 10, FALSE))
\r
320 case SV_POTION_RESIST_COLD:
\r
321 if (set_oppose_cold(p_ptr->oppose_cold + randint1(10) + 10, FALSE))
\r
327 case SV_POTION_HEROISM:
\r
328 if (set_afraid(0)) ident = TRUE;
\r
329 if (set_hero(p_ptr->hero + randint1(25) + 25, FALSE)) ident = TRUE;
\r
330 if (hp_player(10)) ident = TRUE;
\r
333 case SV_POTION_BESERK_STRENGTH:
\r
334 if (set_afraid(0)) ident = TRUE;
\r
335 if (set_shero(p_ptr->shero + randint1(25) + 25, FALSE)) ident = TRUE;
\r
336 if (hp_player(30)) ident = TRUE;
\r
339 case SV_POTION_CURE_LIGHT:
\r
340 if (hp_player(damroll(2, 8))) ident = TRUE;
\r
341 if (set_blind(0)) ident = TRUE;
\r
342 if (set_cut(p_ptr->cut - 10)) ident = TRUE;
\r
343 if (set_shero(0,TRUE)) ident = TRUE;
\r
346 case SV_POTION_CURE_SERIOUS:
\r
347 if (hp_player(damroll(4, 8))) ident = TRUE;
\r
348 if (set_blind(0)) ident = TRUE;
\r
349 if (set_confused(0)) ident = TRUE;
\r
350 if (set_cut((p_ptr->cut / 2) - 50)) ident = TRUE;
\r
351 if (set_shero(0,TRUE)) ident = TRUE;
\r
354 case SV_POTION_CURE_CRITICAL:
\r
355 if (hp_player(damroll(6, 8))) ident = TRUE;
\r
356 if (set_blind(0)) ident = TRUE;
\r
357 if (set_confused(0)) ident = TRUE;
\r
358 if (set_poisoned(0)) ident = TRUE;
\r
359 if (set_stun(0)) ident = TRUE;
\r
360 if (set_cut(0)) ident = TRUE;
\r
361 if (set_shero(0,TRUE)) ident = TRUE;
\r
364 case SV_POTION_HEALING:
\r
365 if (hp_player(300)) ident = TRUE;
\r
366 if (set_blind(0)) ident = TRUE;
\r
367 if (set_confused(0)) ident = TRUE;
\r
368 if (set_poisoned(0)) ident = TRUE;
\r
369 if (set_stun(0)) ident = TRUE;
\r
370 if (set_cut(0)) ident = TRUE;
\r
371 if (set_shero(0,TRUE)) ident = TRUE;
\r
374 case SV_POTION_STAR_HEALING:
\r
375 if (hp_player(1200)) ident = TRUE;
\r
376 if (set_blind(0)) ident = TRUE;
\r
377 if (set_confused(0)) ident = TRUE;
\r
378 if (set_poisoned(0)) ident = TRUE;
\r
379 if (set_stun(0)) ident = TRUE;
\r
380 if (set_cut(0)) ident = TRUE;
\r
381 if (set_shero(0,TRUE)) ident = TRUE;
\r
384 case SV_POTION_LIFE:
\r
385 chg_virtue(V_VITALITY, 1);
\r
386 chg_virtue(V_UNLIFE, -5);
\r
387 msg_print(_("
\91Ì
\92\86\82É
\90¶
\96½
\97Í
\82ª
\96\9e\82¿
\82 \82Ó
\82ê
\82Ä
\82«
\82½
\81I", "You feel life flow through your body!"));
\r
389 (void)set_poisoned(0);
\r
390 (void)set_blind(0);
\r
391 (void)set_confused(0);
\r
392 (void)set_image(0);
\r
395 (void)do_res_stat(A_STR);
\r
396 (void)do_res_stat(A_CON);
\r
397 (void)do_res_stat(A_DEX);
\r
398 (void)do_res_stat(A_WIS);
\r
399 (void)do_res_stat(A_INT);
\r
400 (void)do_res_stat(A_CHR);
\r
401 (void)set_shero(0,TRUE);
\r
407 case SV_POTION_RESTORE_MANA:
\r
408 if (p_ptr->pclass == CLASS_MAGIC_EATER)
\r
411 for (i = 0; i < EATER_EXT*2; i++)
\r
413 p_ptr->magic_num1[i] += (p_ptr->magic_num2[i] < 10) ? EATER_CHARGE * 3 : p_ptr->magic_num2[i]*EATER_CHARGE/3;
\r
414 if (p_ptr->magic_num1[i] > p_ptr->magic_num2[i]*EATER_CHARGE) p_ptr->magic_num1[i] = p_ptr->magic_num2[i]*EATER_CHARGE;
\r
416 for (; i < EATER_EXT*3; i++)
\r
418 KIND_OBJECT_IDX k_idx = lookup_kind(TV_ROD, i-EATER_EXT*2);
\r
419 p_ptr->magic_num1[i] -= ((p_ptr->magic_num2[i] < 10) ? EATER_ROD_CHARGE*3 : p_ptr->magic_num2[i]*EATER_ROD_CHARGE/3)*k_info[k_idx].pval;
\r
420 if (p_ptr->magic_num1[i] < 0) p_ptr->magic_num1[i] = 0;
\r
422 msg_print(_("
\93ª
\82ª
\83n
\83b
\83L
\83\8a\82Æ
\82µ
\82½
\81B", "You feel your head clear."));
\r
423 p_ptr->window |= (PW_PLAYER);
\r
426 else if (p_ptr->csp < p_ptr->msp)
\r
428 p_ptr->csp = p_ptr->msp;
\r
429 p_ptr->csp_frac = 0;
\r
430 msg_print(_("
\93ª
\82ª
\83n
\83b
\83L
\83\8a\82Æ
\82µ
\82½
\81B", "You feel your head clear."));
\r
432 p_ptr->redraw |= (PR_MANA);
\r
433 p_ptr->window |= (PW_PLAYER);
\r
434 p_ptr->window |= (PW_SPELL);
\r
437 if (set_shero(0,TRUE)) ident = TRUE;
\r
440 case SV_POTION_RESTORE_EXP:
\r
441 if (restore_level()) ident = TRUE;
\r
444 case SV_POTION_RES_STR:
\r
445 if (do_res_stat(A_STR)) ident = TRUE;
\r
448 case SV_POTION_RES_INT:
\r
449 if (do_res_stat(A_INT)) ident = TRUE;
\r
452 case SV_POTION_RES_WIS:
\r
453 if (do_res_stat(A_WIS)) ident = TRUE;
\r
456 case SV_POTION_RES_DEX:
\r
457 if (do_res_stat(A_DEX)) ident = TRUE;
\r
460 case SV_POTION_RES_CON:
\r
461 if (do_res_stat(A_CON)) ident = TRUE;
\r
464 case SV_POTION_RES_CHR:
\r
465 if (do_res_stat(A_CHR)) ident = TRUE;
\r
468 case SV_POTION_INC_STR:
\r
469 if (do_inc_stat(A_STR)) ident = TRUE;
\r
472 case SV_POTION_INC_INT:
\r
473 if (do_inc_stat(A_INT)) ident = TRUE;
\r
476 case SV_POTION_INC_WIS:
\r
477 if (do_inc_stat(A_WIS)) ident = TRUE;
\r
480 case SV_POTION_INC_DEX:
\r
481 if (do_inc_stat(A_DEX)) ident = TRUE;
\r
484 case SV_POTION_INC_CON:
\r
485 if (do_inc_stat(A_CON)) ident = TRUE;
\r
488 case SV_POTION_INC_CHR:
\r
489 if (do_inc_stat(A_CHR)) ident = TRUE;
\r
492 case SV_POTION_AUGMENTATION:
\r
493 if (do_inc_stat(A_STR)) ident = TRUE;
\r
494 if (do_inc_stat(A_INT)) ident = TRUE;
\r
495 if (do_inc_stat(A_WIS)) ident = TRUE;
\r
496 if (do_inc_stat(A_DEX)) ident = TRUE;
\r
497 if (do_inc_stat(A_CON)) ident = TRUE;
\r
498 if (do_inc_stat(A_CHR)) ident = TRUE;
\r
501 case SV_POTION_ENLIGHTENMENT:
\r
502 msg_print(_("
\8e©
\95ª
\82Ì
\92u
\82©
\82ê
\82Ä
\82¢
\82é
\8fó
\8bµ
\82ª
\94]
\97 \82É
\95\82\82©
\82ñ
\82Å
\82«
\82½...", "An image of your surroundings forms in your mind..."));
\r
503 chg_virtue(V_KNOWLEDGE, 1);
\r
504 chg_virtue(V_ENLIGHTEN, 1);
\r
509 case SV_POTION_STAR_ENLIGHTENMENT:
\r
510 msg_print(_("
\8dX
\82È
\82é
\8c[
\96Ö
\82ð
\8a´
\82¶
\82½...", "You begin to feel more enlightened..."));
\r
511 chg_virtue(V_KNOWLEDGE, 1);
\r
512 chg_virtue(V_ENLIGHTEN, 2);
\r
515 (void)do_inc_stat(A_INT);
\r
516 (void)do_inc_stat(A_WIS);
\r
517 (void)detect_traps(DETECT_RAD_DEFAULT, TRUE);
\r
518 (void)detect_doors(DETECT_RAD_DEFAULT);
\r
519 (void)detect_stairs(DETECT_RAD_DEFAULT);
\r
520 (void)detect_treasure(DETECT_RAD_DEFAULT);
\r
521 (void)detect_objects_gold(DETECT_RAD_DEFAULT);
\r
522 (void)detect_objects_normal(DETECT_RAD_DEFAULT);
\r
528 case SV_POTION_SELF_KNOWLEDGE:
\r
529 msg_print(_("
\8e©
\95ª
\8e©
\90g
\82Ì
\82±
\82Æ
\82ª
\8f
\82µ
\82Í
\95ª
\82©
\82Á
\82½
\8bC
\82ª
\82·
\82é...", "You begin to know yourself a little better..."));
\r
535 case SV_POTION_EXPERIENCE:
\r
536 if (p_ptr->prace == RACE_ANDROID) break;
\r
537 chg_virtue(V_ENLIGHTEN, 1);
\r
538 if (p_ptr->exp < PY_MAX_EXP)
\r
540 s32b ee = (p_ptr->exp / 2) + 10;
\r
541 if (ee > 100000L) ee = 100000L;
\r
542 msg_print(_("
\8dX
\82É
\8co
\8c±
\82ð
\90Ï
\82ñ
\82¾
\82æ
\82¤
\82È
\8bC
\82ª
\82·
\82é
\81B", "You feel more experienced."));
\r
548 case SV_POTION_RESISTANCE:
\r
549 (void)set_oppose_acid(p_ptr->oppose_acid + randint1(20) + 20, FALSE);
\r
550 (void)set_oppose_elec(p_ptr->oppose_elec + randint1(20) + 20, FALSE);
\r
551 (void)set_oppose_fire(p_ptr->oppose_fire + randint1(20) + 20, FALSE);
\r
552 (void)set_oppose_cold(p_ptr->oppose_cold + randint1(20) + 20, FALSE);
\r
553 (void)set_oppose_pois(p_ptr->oppose_pois + randint1(20) + 20, FALSE);
\r
557 case SV_POTION_CURING:
\r
558 if (hp_player(50)) ident = TRUE;
\r
559 if (set_blind(0)) ident = TRUE;
\r
560 if (set_poisoned(0)) ident = TRUE;
\r
561 if (set_confused(0)) ident = TRUE;
\r
562 if (set_stun(0)) ident = TRUE;
\r
563 if (set_cut(0)) ident = TRUE;
\r
564 if (set_image(0)) ident = TRUE;
\r
567 case SV_POTION_INVULNERABILITY:
\r
568 (void)set_invuln(p_ptr->invuln + randint1(4) + 4, FALSE);
\r
572 case SV_POTION_NEW_LIFE:
\r
573 do_cmd_rerate(FALSE);
\r
575 p_ptr->update |= PU_BONUS;
\r
576 lose_all_mutations();
\r
580 case SV_POTION_NEO_TSUYOSHI:
\r
581 (void)set_image(0);
\r
582 (void)set_tsuyoshi(p_ptr->tsuyoshi + randint1(100) + 100, FALSE);
\r
586 case SV_POTION_TSUYOSHI:
\r
587 msg_print(_("
\81u
\83I
\83N
\83\8c\8cZ
\82³
\82ñ
\81I
\81v", "Brother OKURE!"));
\r
589 p_ptr->tsuyoshi = 1;
\r
590 (void)set_tsuyoshi(0, TRUE);
\r
591 if (!p_ptr->resist_chaos)
\r
593 (void)set_image(50 + randint1(50));
\r
598 case SV_POTION_POLYMORPH:
\r
599 if ((p_ptr->muta1 || p_ptr->muta2 || p_ptr->muta3) && one_in_(23))
\r
601 lose_all_mutations();
\r
609 if(gain_random_mutation(0)) ident = TRUE;
\r
611 else if (lose_mutation(0)) ident = TRUE;
\r
612 } while(!ident || one_in_(2));
\r
618 if (prace_is_(RACE_SKELETON))
\r
620 msg_print(_("
\89t
\91Ì
\82Ì
\88ê
\95\94\82Í
\82 \82È
\82½
\82Ì
\83A
\83S
\82ð
\91f
\92Ê
\82è
\82µ
\82Ä
\97\8e\82¿
\82½
\81I", "Some of the fluid falls through your jaws!"));
\r
621 (void)potion_smash_effect(0, p_ptr->y, p_ptr->x, q_ptr->k_idx);
\r
624 /* Combine / Reorder the pack (later) */
\r
625 p_ptr->notice |= (PN_COMBINE | PN_REORDER);
\r
627 if (!(object_is_aware(q_ptr)))
\r
629 chg_virtue(V_PATIENCE, -1);
\r
630 chg_virtue(V_CHANCE, 1);
\r
631 chg_virtue(V_KNOWLEDGE, -1);
\r
634 /* The item has been tried */
\r
635 object_tried(q_ptr);
\r
637 /* An identification was made */
\r
638 if (ident && !object_is_aware(q_ptr))
\r
640 object_aware(q_ptr);
\r
641 gain_exp((lev + (p_ptr->lev >> 1)) / p_ptr->lev);
\r
645 p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
\r
647 /* Potions can feed the player */
\r
648 switch (p_ptr->mimic_form)
\r
651 switch (p_ptr->prace)
\r
654 (void)set_food(p_ptr->food + (q_ptr->pval / 10));
\r
656 case RACE_SKELETON:
\r
663 set_food(p_ptr->food + ((q_ptr->pval) / 20));
\r
666 if (q_ptr->tval == TV_FLASK)
\r
668 msg_print(_("
\83I
\83C
\83\8b\82ð
\95â
\8b\8b\82µ
\82½
\81B", "You replenish yourself with the oil."));
\r
669 set_food(p_ptr->food + 5000);
\r
673 set_food(p_ptr->food + ((q_ptr->pval) / 20));
\r
677 msg_print(_("
\90\85\95ª
\82ð
\8eæ
\82è
\8d\9e\82ñ
\82¾
\81B", "You are moistened."));
\r
678 set_food(MIN(p_ptr->food + q_ptr->pval + MAX(0, q_ptr->pval * 10) + 2000, PY_FOOD_MAX - 1));
\r
681 (void)set_food(p_ptr->food + q_ptr->pval);
\r
686 case MIMIC_DEMON_LORD:
\r
687 set_food(p_ptr->food + ((q_ptr->pval) / 20));
\r
689 case MIMIC_VAMPIRE:
\r
690 (void)set_food(p_ptr->food + (q_ptr->pval / 10));
\r
693 (void)set_food(p_ptr->food + q_ptr->pval);
\r
700 * @brief
\83I
\83u
\83W
\83F
\83N
\83g
\82ð
\83v
\83\8c\83C
\83\84\81[
\82ª
\88ù
\82Þ
\82±
\82Æ
\82ª
\82Å
\82«
\82é
\82©
\82ð
\94»
\92è
\82·
\82é /
\r
701 * Hook to determine if an object can be quaffed
\r
702 * @param o_ptr
\94»
\92è
\82µ
\82½
\82¢
\83I
\83u
\83W
\83F
\83N
\83g
\82Ì
\8d\
\91¢
\91Ì
\8eQ
\8fÆ
\83|
\83C
\83\93\83^
\r
703 * @return
\88ù
\82Þ
\82±
\82Æ
\82ª
\89Â
\94\
\82È
\82ç
\82ÎTRUE
\82ð
\95Ô
\82·
\r
705 static bool item_tester_hook_quaff(object_type *o_ptr)
\r
707 if (o_ptr->tval == TV_POTION) return TRUE;
\r
709 if (prace_is_(RACE_ANDROID))
\r
711 if (o_ptr->tval == TV_FLASK && o_ptr->sval == SV_FLASK_OIL)
\r
719 * @brief
\96ò
\82ð
\88ù
\82Þ
\83R
\83}
\83\93\83h
\82Ì
\83\81\83C
\83\93\83\8b\81[
\83`
\83\93 /
\r
720 * Quaff some potion (from the pack or floor)
\r
723 void do_cmd_quaff_potion(void)
\r
728 if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
\r
730 set_action(ACTION_NONE);
\r
733 /* Restrict choices to potions */
\r
734 item_tester_hook = item_tester_hook_quaff;
\r
737 q = _("
\82Ç
\82Ì
\96ò
\82ð
\88ù
\82Ý
\82Ü
\82·
\82©? ", "Quaff which potion? ");
\r
738 s = _("
\88ù
\82ß
\82é
\96ò
\82ª
\82È
\82¢
\81B", "You have no potions to quaff.");
\r
740 if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
\r
742 /* Quaff the potion */
\r
743 do_cmd_quaff_potion_aux(item);
\r