3 * @brief レイシャルと突然変異の技能処理 / Racial powers (and mutations)
6 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke\n
7 * This software may be copied and distributed for educational, research,\n
8 * and not for profit purposes provided that this copyright and statement\n
9 * are included in all such copies. Other copyrights may also apply.\n
10 * 2014 Deskull rearranged comment for Doxygen. \n
17 #include "cmd-basic.h"
18 #include "cmd-magiceat.h"
20 #include "cmd-zapwand.h"
23 #include "object-hook.h"
26 #include "player-race.h"
27 #include "player-effects.h"
28 #include "player-status.h"
29 #include "player-damage.h"
30 #include "spells-status.h"
31 #include "spells-object.h"
32 #include "spells-floor.h"
34 #include "cmd-spell.h"
35 #include "realm-hex.h"
36 #include "targeting.h"
37 #include "view/display-main-window.h"
38 #include "player-class.h"
42 * @return 構えを変化させたらTRUE、構え不能かキャンセルしたらFALSEを返す。
44 static bool choose_kamae(player_type *creature_ptr)
51 if (cmd_limit_confused(creature_ptr)) return FALSE;
53 prt(_(" a) 構えをとく", " a) No form"), 2, 20);
55 for (i = 0; i < MAX_KAMAE; i++)
57 if (creature_ptr->lev >= kamae_shurui[i].min_level)
59 sprintf(buf," %c) %-12s %s",I2A(i+1), kamae_shurui[i].desc, kamae_shurui[i].info);
65 prt(_(" どの構えをとりますか?", " Choose Stance: "), 1, 14);
76 else if ((choice == 'a') || (choice == 'A'))
78 if (creature_ptr->action == ACTION_KAMAE)
80 set_action(creature_ptr, ACTION_NONE);
83 msg_print(_("もともと構えていない。", "You are not in a special stance."));
87 else if ((choice == 'b') || (choice == 'B'))
92 else if (((choice == 'c') || (choice == 'C')) && (creature_ptr->lev > 29))
97 else if (((choice == 'd') || (choice == 'D')) && (creature_ptr->lev > 34))
102 else if (((choice == 'e') || (choice == 'E')) && (creature_ptr->lev > 39))
108 set_action(creature_ptr, ACTION_KAMAE);
110 if (creature_ptr->special_defense & (KAMAE_GENBU << new_kamae))
112 msg_print(_("構え直した。", "You reassume a stance."));
116 creature_ptr->special_defense &= ~(KAMAE_MASK);
117 creature_ptr->update |= (PU_BONUS);
118 creature_ptr->redraw |= (PR_STATE);
119 msg_format(_("%sの構えをとった。", "You assume the %s stance."), kamae_shurui[new_kamae].desc);
120 creature_ptr->special_defense |= (KAMAE_GENBU << new_kamae);
122 creature_ptr->redraw |= PR_STATE;
129 * @return 型を変化させたらTRUE、型の構え不能かキャンセルしたらFALSEを返す。
131 static bool choose_kata(player_type *creature_ptr)
138 if (cmd_limit_confused(creature_ptr)) return FALSE;
140 if (creature_ptr->stun)
142 msg_print(_("意識がはっきりとしない。", "You are not clear headed"));
146 if (creature_ptr->afraid)
148 msg_print(_("体が震えて構えられない!", "You are trembling with fear!"));
152 prt(_(" a) 型を崩す", " a) No Form"), 2, 20);
154 for (i = 0; i < MAX_KATA; i++)
156 if (creature_ptr->lev >= kata_shurui[i].min_level)
158 sprintf(buf,_(" %c) %sの型 %s", " %c) Stance of %-12s %s"),I2A(i+1), kata_shurui[i].desc, kata_shurui[i].info);
164 prt(_(" どの型で構えますか?", " Choose Stance: "), 1, 14);
170 if (choice == ESCAPE)
175 else if ((choice == 'a') || (choice == 'A'))
177 if (creature_ptr->action == ACTION_KATA)
179 set_action(creature_ptr, ACTION_NONE);
182 msg_print(_("もともと構えていない。", "You are not in a special stance."));
186 else if ((choice == 'b') || (choice == 'B'))
191 else if (((choice == 'c') || (choice == 'C')) && (creature_ptr->lev > 29))
196 else if (((choice == 'd') || (choice == 'D')) && (creature_ptr->lev > 34))
201 else if (((choice == 'e') || (choice == 'E')) && (creature_ptr->lev > 39))
207 set_action(creature_ptr, ACTION_KATA);
209 if (creature_ptr->special_defense & (KATA_IAI << new_kata))
211 msg_print(_("構え直した。", "You reassume a stance."));
215 creature_ptr->special_defense &= ~(KATA_MASK);
216 creature_ptr->update |= (PU_BONUS | PU_MONSTERS);
217 msg_format(_("%sの型で構えた。", "You assume the %s stance."), kata_shurui[new_kata].desc);
218 creature_ptr->special_defense |= (KATA_IAI << new_kata);
220 creature_ptr->redraw |= (PR_STATE | PR_STATUS);
227 * @brief レイシャル・パワー情報の構造体定義
229 typedef struct power_desc_type
231 GAME_TEXT name[MAX_NLEN]; //!<レイシャル名
232 PLAYER_LEVEL level; //!<体得レベル
241 * @brief レイシャル・パワーの発動成功率を計算する / Returns the chance to activate a racial power/mutation
242 * @param pd_ptr 発動したいレイシャル・パワー情報の構造体参照ポインタ
245 static PERCENTAGE racial_chance(player_type *creature_ptr, power_desc_type *pd_ptr)
247 PLAYER_LEVEL min_level = pd_ptr->level;
248 PERCENTAGE difficulty = pd_ptr->fail;
253 BASE_STATUS stat = creature_ptr->stat_cur[pd_ptr->stat];
255 /* No chance for success */
256 if ((creature_ptr->lev < min_level) || creature_ptr->confused)
261 if (difficulty == 0) return 100;
263 /* Calculate difficulty */
264 if (creature_ptr->stun)
266 difficulty += (PERCENTAGE)creature_ptr->stun;
268 else if (creature_ptr->lev > min_level)
270 PERCENTAGE lev_adj = (PERCENTAGE)((creature_ptr->lev - min_level) / 3);
271 if (lev_adj > 10) lev_adj = 10;
272 difficulty -= lev_adj;
275 if (difficulty < 5) difficulty = 5;
277 /* We only need halfs of the difficulty */
278 difficulty = difficulty / 2;
280 for (i = 1; i <= stat; i++)
282 val = i - difficulty;
284 sum += (val <= difficulty) ? val : difficulty;
290 return (((sum * 100) / difficulty) / stat);
294 static int racial_cost;
297 * @brief レイシャル・パワーの発動の判定処理
298 * @param pd_ptr 発動したいレイシャル・パワー情報の構造体参照ポインタ
300 * 発動成功ならば1、発動失敗ならば-1、キャンセルならば0を返す。
301 * return value indicates that we have succesfully used the power 1: Succeeded, 0: Cancelled, -1: Failed
303 static int racial_aux(player_type *creature_ptr, power_desc_type *pd_ptr)
305 PLAYER_LEVEL min_level = pd_ptr->level;
306 int use_stat = pd_ptr->stat;
307 int difficulty = pd_ptr->fail;
310 racial_cost = pd_ptr->cost;
312 /* Not enough mana - use hp */
313 if (creature_ptr->csp < racial_cost) use_hp = racial_cost - creature_ptr->csp;
315 /* Power is not available yet */
316 if (creature_ptr->lev < min_level)
318 msg_format(_("この能力を使用するにはレベル %d に達していなければなりません。",
319 "You need to attain level %d to use this power."), min_level);
321 free_turn(creature_ptr);
325 if (cmd_limit_confused(creature_ptr))
327 free_turn(creature_ptr);
332 else if (creature_ptr->chp < use_hp)
334 if (!get_check(_("本当に今の衰弱した状態でこの能力を使いますか?", "Really use the power in your weakened state? ")))
336 free_turn(creature_ptr);
341 /* Else attempt to do it! */
345 if (creature_ptr->stun)
347 difficulty += creature_ptr->stun;
349 else if (creature_ptr->lev > min_level)
351 int lev_adj = ((creature_ptr->lev - min_level) / 3);
352 if (lev_adj > 10) lev_adj = 10;
353 difficulty -= lev_adj;
356 if (difficulty < 5) difficulty = 5;
359 /* take time and pay the price */
360 take_turn(creature_ptr, 100);
363 if (randint1(creature_ptr->stat_cur[use_stat]) >= ((difficulty / 2) + randint1(difficulty / 2)))
368 if (flush_failure) flush();
369 msg_print(_("充分に集中できなかった。", "You've failed to concentrate hard enough."));
376 * @brief レイシャル・パワー発動処理
377 * @param creature_ptr プレーヤーへの参照ポインタ
378 * @param command 発動するレイシャルのID
379 * @return 処理を実際に実行した場合はTRUE、キャンセルした場合FALSEを返す。
381 static bool exe_racial_power(player_type *creature_ptr, s32b command)
383 PLAYER_LEVEL plev = creature_ptr->lev;
388 switch (creature_ptr->pclass)
392 return sword_dancing(creature_ptr);
395 case CLASS_HIGH_MAGE:
396 if (creature_ptr->realm1 == REALM_HEX)
398 bool retval = stop_hex_spell(creature_ptr);
399 if (retval) creature_ptr->energy_use = 10;
404 /* case CLASS_HIGH_MAGE: */
407 if (!eat_magic(creature_ptr, creature_ptr->lev * 2)) return FALSE;
412 if (is_good_realm(creature_ptr->realm1))
414 if (!bless_weapon(creature_ptr)) return FALSE;
418 (void)dispel_monsters(creature_ptr, plev * 4);
419 turn_monsters(creature_ptr, plev * 4);
420 banish_monsters(creature_ptr, plev * 4);
426 if(!hit_and_away(creature_ptr)) return FALSE;
432 msg_print(_("敵を調査した...", "You examine your foes..."));
433 probing(creature_ptr);
438 if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
439 fire_beam(creature_ptr, is_good_realm(creature_ptr->realm1) ? GF_HOLY_FIRE : GF_HELL_FIRE,
443 case CLASS_WARRIOR_MAGE:
447 return comvert_hp_to_mp(creature_ptr);
449 else if (command == -4)
451 return comvert_mp_to_hp(creature_ptr);
455 case CLASS_CHAOS_WARRIOR:
457 return confusing_light(creature_ptr);
462 if (!(empty_hands(creature_ptr, TRUE) & EMPTY_HAND_RARM))
464 msg_print(_("素手じゃないとできません。", "You need to be barehanded."));
467 if (creature_ptr->riding)
469 msg_print(_("乗馬中はできません。", "You need to get off a pet."));
475 if (!choose_kamae(creature_ptr)) return FALSE;
476 creature_ptr->update |= (PU_BONUS);
478 else if (command == -4)
480 return double_attack(creature_ptr);
484 case CLASS_MINDCRAFTER:
485 case CLASS_FORCETRAINER:
487 return clear_mind(creature_ptr);
493 if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
495 fire_beam(creature_ptr, GF_PHOTO, dir, 1);
497 else if (command == -4)
499 if (!identify_fully(creature_ptr, FALSE, 0)) return FALSE;
505 handle_stuff(creature_ptr);
506 if (!do_cmd_mane(creature_ptr, TRUE)) return FALSE;
509 case CLASS_BEASTMASTER:
513 if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
514 (void)fire_ball_hide(creature_ptr, GF_CHARM_LIVING, dir, creature_ptr->lev, 0);
516 else if (command == -4)
518 project_all_los(creature_ptr, GF_CHARM_LIVING, creature_ptr->lev);
524 if (!create_ammo(creature_ptr)) return FALSE;
527 case CLASS_MAGIC_EATER:
530 if (!import_magic_device(creature_ptr)) return FALSE;
531 } else if (command == -4) {
532 if (cmd_limit_cast(creature_ptr)) return FALSE;
533 if (!do_cmd_magic_eater(creature_ptr, FALSE, TRUE)) return FALSE;
539 /* Singing is already stopped */
540 if (!SINGING_SONG_EFFECT(creature_ptr) && !INTERUPTING_SONG_EFFECT(creature_ptr)) return FALSE;
542 stop_singing(creature_ptr);
543 creature_ptr->energy_use = 10;
548 if (cmd_limit_cast(creature_ptr)) return FALSE;
549 handle_stuff(creature_ptr);
550 do_cmd_cast(creature_ptr);
551 handle_stuff(creature_ptr);
552 if (!creature_ptr->paralyzed && !cmd_limit_cast(creature_ptr))
553 do_cmd_cast(creature_ptr);
560 concentration(creature_ptr);
562 else if (command == -4)
564 if (!has_melee_weapon(creature_ptr, INVEN_RARM) && !has_melee_weapon(creature_ptr, INVEN_LARM))
566 msg_print(_("武器を持たないといけません。", "You need to wield a weapon."));
569 if (!choose_kata(creature_ptr)) return FALSE;
570 creature_ptr->update |= (PU_BONUS);
574 case CLASS_BLUE_MAGE:
576 if (creature_ptr->action == ACTION_LEARN)
578 set_action(creature_ptr, ACTION_NONE);
582 set_action(creature_ptr, ACTION_LEARN);
584 free_turn(creature_ptr);
589 return rodeo(creature_ptr);
591 case CLASS_BERSERKER:
593 if (!recall_player(creature_ptr, randint0(21) + 15)) return FALSE;
598 if (creature_ptr->lev > 29)
600 if (!identify_fully(creature_ptr, TRUE, 0)) return FALSE;
604 if (!ident_spell(creature_ptr, TRUE, 0)) return FALSE;
608 case CLASS_MIRROR_MASTER:
612 /* Explode all mirrors */
613 remove_all_mirrors(creature_ptr, TRUE);
615 else if (command == -4)
617 return mirror_concentration(creature_ptr);
622 hayagake(creature_ptr);
626 else if (creature_ptr->mimic_form)
628 switch (creature_ptr->mimic_form)
631 case MIMIC_DEMON_LORD:
633 return demonic_breath(creature_ptr);
636 vampirism(creature_ptr);
644 switch (creature_ptr->prace)
647 msg_print(_("周囲を調べた。", "You examine your surroundings."));
648 (void)detect_traps(creature_ptr, DETECT_RAD_DEFAULT, TRUE);
649 (void)detect_doors(creature_ptr, DETECT_RAD_DEFAULT);
650 (void)detect_stairs(creature_ptr, DETECT_RAD_DEFAULT);
654 return create_ration(creature_ptr);
658 msg_print(_("パッ!", "Blink!"));
659 teleport_player(creature_ptr, 10, 0L);
663 msg_print(_("勇気を出した。", "You play tough."));
664 (void)set_afraid(creature_ptr, 0);
667 case RACE_HALF_TROLL:
668 msg_print(_("うがぁぁ!", "RAAAGH!"));
669 (void)berserk(creature_ptr, 10 + randint1(plev));
675 msg_print(_("あなたは歩き周り始めた。", "You start walking around. "));
676 reserve_alter_reality(creature_ptr);
678 else if (command == -2)
680 msg_print(_("あなたは「パターン」を心に描いてその上を歩いた...", "You picture the Pattern in your mind and walk it..."));
682 (void)true_healing(creature_ptr, 0);
683 (void)restore_all_status(creature_ptr);
684 (void)restore_level(creature_ptr);
689 msg_print(_("うぉぉおお!", "Raaagh!"));
690 (void)berserk(creature_ptr, 10 + randint1(plev));
694 msg_print(_("爆発のルーンを慎重に仕掛けた...", "You carefully set an explosive rune..."));
695 explosive_rune(creature_ptr, creature_ptr->y, creature_ptr->x);
698 case RACE_HALF_GIANT:
699 if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
700 (void)wall_to_mud(creature_ptr, dir, 20 + randint1(30));
703 case RACE_HALF_TITAN:
704 msg_print(_("敵を調査した...", "You examine your foes..."));
705 probing(creature_ptr);
709 if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
710 msg_print(_("巨大な岩を投げた。", "You throw a huge boulder."));
711 fire_bolt(creature_ptr, GF_MISSILE, dir, (3 * plev) / 2);
715 if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
716 stop_mouth(creature_ptr);
717 msg_print(_("身の毛もよだつ叫び声を上げた!", "You make a horrible scream!"));
718 (void)fear_monster(creature_ptr, dir, plev);
722 if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
723 stop_mouth(creature_ptr);
724 msg_print(_("酸を吐いた。", "You spit acid."));
725 if (plev < 25) fire_bolt(creature_ptr, GF_ACID, dir, plev);
726 else fire_ball(creature_ptr, GF_ACID, dir, plev, 2);
730 if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
731 msg_print(_("毒のダーツを投げた。", "You throw a dart of poison."));
732 fire_bolt(creature_ptr, GF_POIS, dir, plev);
736 msg_print(_("周囲を調査した。", "You examine your surroundings."));
737 (void)detect_traps(creature_ptr, DETECT_RAD_DEFAULT, TRUE);
738 (void)detect_doors(creature_ptr, DETECT_RAD_DEFAULT);
739 (void)detect_stairs(creature_ptr, DETECT_RAD_DEFAULT);
743 if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
744 msg_print(_("マジック・ミサイルを放った。", "You cast a magic missile."));
745 fire_bolt_or_beam(creature_ptr, 10, GF_MISSILE, dir, damroll(3 + ((plev - 1) / 5), 4));
749 return draconian_breath(creature_ptr);
752 case RACE_MIND_FLAYER:
753 if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
754 msg_print(_("あなたは集中し、目が赤く輝いた...", "You concentrate and your eyes glow red..."));
755 fire_bolt(creature_ptr, GF_PSI, dir, plev);
759 if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
762 msg_print(_("ファイア・ボールを放った。", "You cast a ball of fire."));
763 fire_ball(creature_ptr, GF_FIRE, dir, plev, 2);
767 msg_print(_("ファイア・ボルトを放った。", "You cast a bolt of fire."));
768 fire_bolt(creature_ptr, GF_FIRE, dir, plev);
773 (void)set_shield(creature_ptr, randint1(20) + 30, FALSE);
778 msg_print(_("あなたは失ったエネルギーを取り戻そうと試みた。", "You attempt to restore your lost energies."));
779 (void)restore_level(creature_ptr);
783 vampirism(creature_ptr);
787 if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
788 stop_mouth(creature_ptr);
789 msg_print(_("あなたはおどろおどろしい叫び声をあげた!", "You emit an eldritch howl!"));
790 (void)fear_monster(creature_ptr, dir, plev);
794 msg_print(_("あなたは魔法の粉を投げつけた...", "You throw some magic dust..."));
795 if (plev < 25) sleep_monsters_touch(creature_ptr);
796 else (void)sleep_monsters(creature_ptr, plev);
800 return demonic_breath(creature_ptr);
804 (void)set_tsubureru(creature_ptr, randint1(20) + 30, FALSE);
808 return android_inside_weapon(creature_ptr);
812 msg_print(_("この種族は特殊な能力を持っていません。", "This race has no bonus power."));
813 free_turn(creature_ptr);
822 * @brief レイシャル・パワーコマンドのメインルーチン / Allow user to choose a power (racial / mutation) to activate
825 void do_cmd_racial_power(player_type *creature_ptr)
827 power_desc_type power_desc[36];
831 PLAYER_LEVEL lvl = creature_ptr->lev;
832 bool flag, redraw, cast = FALSE;
833 bool warrior = ((creature_ptr->pclass == CLASS_WARRIOR || creature_ptr->pclass == CLASS_BERSERKER) ? TRUE : FALSE);
836 int menu_line = (use_menu ? 1 : 0);
838 if (creature_ptr->wild_mode) return;
840 for (num = 0; num < 36; num++)
842 strcpy(power_desc[num].name, "");
843 power_desc[num].number = 0;
848 if (cmd_limit_confused(creature_ptr))
850 free_turn(creature_ptr);
854 if (creature_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
856 set_action(creature_ptr, ACTION_NONE);
859 switch (creature_ptr->pclass)
863 strcpy(power_desc[num].name, _("剣の舞い", "Sword Dancing"));
864 power_desc[num].level = 40;
865 power_desc[num].cost = 75;
866 power_desc[num].stat = A_DEX;
867 power_desc[num].fail = 35;
868 power_desc[num++].number = -3;
871 case CLASS_HIGH_MAGE:
872 if (creature_ptr->realm1 == REALM_HEX)
874 strcpy(power_desc[num].name, _("詠唱をやめる", "Stop spell casting"));
875 power_desc[num].level = 1;
876 power_desc[num].cost = 0;
877 power_desc[num].stat = A_INT;
878 power_desc[num].fail = 0;
879 power_desc[num++].number = -3;
884 /* case CLASS_HIGH_MAGE: */
887 strcpy(power_desc[num].name, _("魔力食い", "Eat Magic"));
888 power_desc[num].level = 25;
889 power_desc[num].cost = 1;
890 power_desc[num].stat = A_INT;
891 power_desc[num].fail = 25;
892 power_desc[num++].number = -3;
897 if (is_good_realm(creature_ptr->realm1))
899 strcpy(power_desc[num].name, _("武器祝福", "Bless Weapon"));
900 power_desc[num].level = 35;
901 power_desc[num].cost = 70;
902 power_desc[num].stat = A_WIS;
903 power_desc[num].fail = 50;
904 power_desc[num++].number = -3;
908 strcpy(power_desc[num].name, _("召魂", "Evocation"));
909 power_desc[num].level = 42;
910 power_desc[num].cost = 40;
911 power_desc[num].stat = A_WIS;
912 power_desc[num].fail = 35;
913 power_desc[num++].number = -3;
919 strcpy(power_desc[num].name, _("ヒット&アウェイ", "Hit and Away"));
920 power_desc[num].level = 8;
921 power_desc[num].cost = 12;
922 power_desc[num].stat = A_DEX;
923 power_desc[num].fail = 14;
924 power_desc[num++].number = -3;
930 strcpy(power_desc[num].name, _("モンスター調査", "Probe Monster"));
931 power_desc[num].level = 15;
932 power_desc[num].cost = 20;
933 power_desc[num].stat = A_INT;
934 power_desc[num].fail = 12;
935 power_desc[num++].number = -3;
940 if (is_good_realm(creature_ptr->realm1))
942 strcpy(power_desc[num].name, _("ホーリー・ランス", "Holy Lance"));
943 power_desc[num].level = 30;
944 power_desc[num].cost = 30;
945 power_desc[num].stat = A_WIS;
946 power_desc[num].fail = 30;
947 power_desc[num++].number = -3;
951 strcpy(power_desc[num].name, _("ヘル・ランス", "Hell Lance"));
952 power_desc[num].level = 30;
953 power_desc[num].cost = 30;
954 power_desc[num].stat = A_WIS;
955 power_desc[num].fail = 30;
956 power_desc[num++].number = -3;
960 case CLASS_WARRIOR_MAGE:
962 strcpy(power_desc[num].name, _("変換: HP→MP", "Convert HP to SP"));
963 power_desc[num].level = 25;
964 power_desc[num].cost = 0;
965 power_desc[num].stat = A_INT;
966 power_desc[num].fail = 10;
967 power_desc[num++].number = -3;
969 strcpy(power_desc[num].name, _("変換: MP→HP", "Convert SP to HP"));
970 power_desc[num].level = 25;
971 power_desc[num].cost = 0;
972 power_desc[num].stat = A_INT;
973 power_desc[num].fail = 10;
974 power_desc[num++].number = -4;
977 case CLASS_CHAOS_WARRIOR:
979 strcpy(power_desc[num].name, _("幻惑の光", "Confusing Light"));
980 power_desc[num].level = 40;
981 power_desc[num].cost = 50;
982 power_desc[num].stat = A_INT;
983 power_desc[num].fail = 25;
984 power_desc[num++].number = -3;
989 strcpy(power_desc[num].name, _("構える", "Assume a Stance"));
990 power_desc[num].level = 25;
991 power_desc[num].cost = 0;
992 power_desc[num].stat = A_DEX;
993 power_desc[num].fail = 0;
994 power_desc[num++].number = -3;
996 strcpy(power_desc[num].name, _("百裂拳", "Double Attack"));
997 power_desc[num].level = 30;
998 power_desc[num].cost = 30;
999 power_desc[num].stat = A_STR;
1000 power_desc[num].fail = 20;
1001 power_desc[num++].number = -4;
1004 case CLASS_MINDCRAFTER:
1005 case CLASS_FORCETRAINER:
1007 strcpy(power_desc[num].name, _("明鏡止水", "Clear Mind"));
1008 power_desc[num].level = 15;
1009 power_desc[num].cost = 0;
1010 power_desc[num].stat = A_WIS;
1011 power_desc[num].fail = 10;
1012 power_desc[num++].number = -3;
1017 strcpy(power_desc[num].name, _("写真撮影", "Take a Photograph"));
1018 power_desc[num].level = 1;
1019 power_desc[num].cost = 0;
1020 power_desc[num].stat = A_DEX;
1021 power_desc[num].fail = 0;
1022 power_desc[num++].number = -3;
1024 strcpy(power_desc[num].name, _("真・鑑定", "Identify True"));
1025 power_desc[num].level = 25;
1026 power_desc[num].cost = 20;
1027 power_desc[num].stat = A_INT;
1028 power_desc[num].fail = 20;
1029 power_desc[num++].number = -4;
1032 case CLASS_IMITATOR:
1034 strcpy(power_desc[num].name, _("倍返し", "Double Revenge"));
1035 power_desc[num].level = 30;
1036 power_desc[num].cost = 100;
1037 power_desc[num].stat = A_DEX;
1038 power_desc[num].fail = 30;
1039 power_desc[num++].number = -3;
1042 case CLASS_BEASTMASTER:
1044 strcpy(power_desc[num].name, _("生物支配", "Dominate a Living Thing"));
1045 power_desc[num].level = 1;
1046 power_desc[num].cost = (creature_ptr->lev + 3) / 4;
1047 power_desc[num].stat = A_CHR;
1048 power_desc[num].fail = 10;
1049 power_desc[num++].number = -3;
1051 strcpy(power_desc[num].name, _("真・生物支配", "Dominate Living Things"));
1052 power_desc[num].level = 30;
1053 power_desc[num].cost = (creature_ptr->lev + 20) / 2;
1054 power_desc[num].stat = A_CHR;
1055 power_desc[num].fail = 10;
1056 power_desc[num++].number = -4;
1061 strcpy(power_desc[num].name, _("弾/矢の製造", "Create Ammo"));
1062 power_desc[num].level = 1;
1063 power_desc[num].cost = 0;
1064 power_desc[num].stat = A_DEX;
1065 power_desc[num].fail = 0;
1066 power_desc[num++].number = -3;
1069 case CLASS_MAGIC_EATER:
1071 strcpy(power_desc[num].name, _("魔力の取り込み", "Absorb Magic"));
1072 power_desc[num].level = 1;
1073 power_desc[num].cost = 0;
1074 power_desc[num].stat = A_INT;
1075 power_desc[num].fail = 0;
1076 power_desc[num++].number = -3;
1078 strcpy(power_desc[num].name, _("強力発動", "Powerful Activation"));
1079 power_desc[num].level = 10;
1080 power_desc[num].cost = 10 + (lvl - 10) / 2;
1081 power_desc[num].stat = A_INT;
1082 power_desc[num].fail = 0;
1083 power_desc[num++].number = -4;
1088 strcpy(power_desc[num].name, _("歌を止める", "Stop Singing"));
1089 power_desc[num].level = 1;
1090 power_desc[num].cost = 0;
1091 power_desc[num].stat = A_CHR;
1092 power_desc[num].fail = 0;
1093 power_desc[num++].number = -3;
1096 case CLASS_RED_MAGE:
1098 strcpy(power_desc[num].name, _("連続魔", "Double Magic"));
1099 power_desc[num].level = 48;
1100 power_desc[num].cost = 20;
1101 power_desc[num].stat = A_INT;
1102 power_desc[num].fail = 0;
1103 power_desc[num++].number = -3;
1108 strcpy(power_desc[num].name, _("気合いため", "Concentration"));
1109 power_desc[num].level = 1;
1110 power_desc[num].cost = 0;
1111 power_desc[num].stat = A_WIS;
1112 power_desc[num].fail = 0;
1113 power_desc[num++].number = -3;
1115 strcpy(power_desc[num].name, _("型", "Assume a Stance"));
1116 power_desc[num].level = 25;
1117 power_desc[num].cost = 0;
1118 power_desc[num].stat = A_DEX;
1119 power_desc[num].fail = 0;
1120 power_desc[num++].number = -4;
1123 case CLASS_BLUE_MAGE:
1125 strcpy(power_desc[num].name, _("ラーニング", "Learning"));
1126 power_desc[num].level = 1;
1127 power_desc[num].cost = 0;
1128 power_desc[num].stat = A_INT;
1129 power_desc[num].fail = 0;
1130 power_desc[num++].number = -3;
1135 strcpy(power_desc[num].name, _("荒馬ならし", "Rodeo"));
1136 power_desc[num].level = 10;
1137 power_desc[num].cost = 0;
1138 power_desc[num].stat = A_STR;
1139 power_desc[num].fail = 10;
1140 power_desc[num++].number = -3;
1143 case CLASS_BERSERKER:
1145 strcpy(power_desc[num].name, _("帰還", "Recall"));
1146 power_desc[num].level = 10;
1147 power_desc[num].cost = 10;
1148 power_desc[num].stat = A_DEX;
1149 power_desc[num].fail = 20;
1150 power_desc[num++].number = -3;
1153 case CLASS_MIRROR_MASTER:
1155 strcpy(power_desc[num].name, _("鏡割り", "Break Mirrors"));
1156 power_desc[num].level = 1;
1157 power_desc[num].cost = 0;
1158 power_desc[num].stat = A_INT;
1159 power_desc[num].fail = 0;
1160 power_desc[num++].number = -3;
1162 strcpy(power_desc[num].name, _("静水", "Mirror Concentration"));
1163 power_desc[num].level = 30;
1164 power_desc[num].cost = 0;
1165 power_desc[num].stat = A_INT;
1166 power_desc[num].fail = 20;
1167 power_desc[num++].number = -4;
1172 strcpy(power_desc[num].name, _("目利き", "Judgment"));
1173 power_desc[num].level = 5;
1174 power_desc[num].cost = 15;
1175 power_desc[num].stat = A_INT;
1176 power_desc[num].fail = 20;
1177 power_desc[num++].number = -3;
1182 strcpy(power_desc[num].name, _("速駆け", "Quick Walk"));
1183 power_desc[num].level = 20;
1184 power_desc[num].cost = 0;
1185 power_desc[num].stat = A_DEX;
1186 power_desc[num].fail = 0;
1187 power_desc[num++].number = -3;
1191 strcpy(power_desc[0].name, _("(なし)", "(none)"));
1194 if (creature_ptr->mimic_form)
1196 switch (creature_ptr->mimic_form)
1199 case MIMIC_DEMON_LORD:
1200 sprintf(power_desc[num].name, _("地獄/火炎のブレス (ダメージ %d)", "Nether or Fire Breath (dam %d)"), lvl * 3);
1201 power_desc[num].level = 15;
1202 power_desc[num].cost = 10 + lvl / 3;
1203 power_desc[num].stat = A_CON;
1204 power_desc[num].fail = 20;
1205 power_desc[num++].number = -1;
1208 strcpy(power_desc[num].name, _("吸血", "Vampiric Drain"));
1209 power_desc[num].level = 2;
1210 power_desc[num].cost = 1 + (lvl / 3);
1211 power_desc[num].stat = A_CON;
1212 power_desc[num].fail = 9;
1213 power_desc[num++].number = -1;
1219 switch (creature_ptr->prace)
1222 strcpy(power_desc[num].name, _("ドアと罠 感知", "Detect Doors+Traps"));
1223 power_desc[num].level = 5;
1224 power_desc[num].cost = 5;
1225 power_desc[num].stat = A_WIS;
1226 power_desc[num].fail = 12;
1227 power_desc[num++].number = -1;
1230 strcpy(power_desc[num].name, _("ドアと罠 感知", "Detect Doors+Traps"));
1231 power_desc[num].level = 10;
1232 power_desc[num].cost = 5;
1233 power_desc[num].stat = A_WIS;
1234 power_desc[num].fail = 10;
1235 power_desc[num++].number = -1;
1238 strcpy(power_desc[num].name, _("食糧生成", "Create Food"));
1239 power_desc[num].level = 15;
1240 power_desc[num].cost = 10;
1241 power_desc[num].stat = A_INT;
1242 power_desc[num].fail = 10;
1243 power_desc[num++].number = -1;
1246 sprintf(power_desc[num].name, _("ショート・テレポート", "Blink"));
1247 power_desc[num].level = 5;
1248 power_desc[num].cost = 5;
1249 power_desc[num].stat = A_INT;
1250 power_desc[num].fail = 12;
1251 power_desc[num++].number = -1;
1254 strcpy(power_desc[num].name, _("恐怖除去", "Remove Fear"));
1255 power_desc[num].level = 3;
1256 power_desc[num].cost = 5;
1257 power_desc[num].stat = A_WIS;
1258 power_desc[num].fail = warrior ? 5 : 10;
1259 power_desc[num++].number = -1;
1261 case RACE_HALF_TROLL:
1262 strcpy(power_desc[num].name, _("狂戦士化", "Berserk"));
1263 power_desc[num].level = 10;
1264 power_desc[num].cost = 12;
1265 power_desc[num].stat = A_STR;
1266 power_desc[num].fail = warrior ? 6 : 12;
1267 power_desc[num++].number = -1;
1269 case RACE_BARBARIAN:
1270 strcpy(power_desc[num].name, _("狂戦士化", "Berserk"));
1271 power_desc[num].level = 8;
1272 power_desc[num].cost = 10;
1273 power_desc[num].stat = A_STR;
1274 power_desc[num].fail = warrior ? 6 : 12;
1275 power_desc[num++].number = -1;
1278 strcpy(power_desc[num].name, _("シャドウ・シフト", "Shadow Shifting"));
1279 power_desc[num].level = 30;
1280 power_desc[num].cost = 50;
1281 power_desc[num].stat = A_INT;
1282 power_desc[num].fail = 50;
1283 power_desc[num++].number = -1;
1285 strcpy(power_desc[num].name, _("パターン・ウォーク", "Pattern Mindwalking"));
1286 power_desc[num].level = 40;
1287 power_desc[num].cost = 75;
1288 power_desc[num].stat = A_WIS;
1289 power_desc[num].fail = 50;
1290 power_desc[num++].number = -2;
1292 case RACE_HALF_OGRE:
1293 strcpy(power_desc[num].name, _("爆発のルーン", "Explosive Rune"));
1294 power_desc[num].level = 25;
1295 power_desc[num].cost = 35;
1296 power_desc[num].stat = A_INT;
1297 power_desc[num].fail = 15;
1298 power_desc[num++].number = -1;
1300 case RACE_HALF_GIANT:
1301 strcpy(power_desc[num].name, _("岩石溶解", "Stone to Mud"));
1302 power_desc[num].level = 20;
1303 power_desc[num].cost = 10;
1304 power_desc[num].stat = A_STR;
1305 power_desc[num].fail = 12;
1306 power_desc[num++].number = -1;
1308 case RACE_HALF_TITAN:
1309 strcpy(power_desc[num].name, _("スキャン・モンスター", "Probing"));
1310 power_desc[num].level = 15;
1311 power_desc[num].cost = 10;
1312 power_desc[num].stat = A_INT;
1313 power_desc[num].fail = 12;
1314 power_desc[num++].number = -1;
1317 sprintf(power_desc[num].name, _("岩石投げ(ダメージ %d)", "Throw Boulder (dam %d)"), (3 * lvl) / 2);
1318 power_desc[num].level = 20;
1319 power_desc[num].cost = 15;
1320 power_desc[num].stat = A_STR;
1321 power_desc[num].fail = 12;
1322 power_desc[num++].number = -1;
1325 strcpy(power_desc[num].name, _("モンスター恐慌", "Scare Monster"));
1326 power_desc[num].level = 15;
1327 power_desc[num].cost = 15;
1328 power_desc[num].stat = A_WIS;
1329 power_desc[num].fail = 10;
1330 power_desc[num++].number = -1;
1333 strcpy(power_desc[num].name, _("モンスター恐慌", "Scare Monster"));
1334 power_desc[num].level = 4;
1335 power_desc[num].cost = 6;
1336 power_desc[num].stat = A_INT;
1337 power_desc[num].fail = 3;
1338 power_desc[num++].number = -1;
1341 sprintf(power_desc[num].name, _("酸の唾 (ダメージ %d)", "Spit Acid (dam %d)"), lvl);
1342 power_desc[num].level = 9;
1343 power_desc[num].cost = 9;
1344 power_desc[num].stat = A_DEX;
1345 power_desc[num].fail = 14;
1346 power_desc[num++].number = -1;
1349 sprintf(power_desc[num].name, _("毒のダーツ (ダメージ %d)", "Poison Dart (dam %d)"), lvl);
1350 power_desc[num].level = 12;
1351 power_desc[num].cost = 8;
1352 power_desc[num].stat = A_DEX;
1353 power_desc[num].fail = 14;
1354 power_desc[num++].number = -1;
1357 sprintf(power_desc[num].name, _("マジック・ミサイル (ダメージ %dd%d)", "Magic Missile (dm %dd%d)"), 3 + ((lvl - 1) / 5), 4);
1358 power_desc[num].level = 2;
1359 power_desc[num].cost = 2;
1360 power_desc[num].stat = A_INT;
1361 power_desc[num].fail = 9;
1362 power_desc[num++].number = -1;
1364 case RACE_DRACONIAN:
1365 sprintf(power_desc[num].name, _("ブレス (ダメージ %d)", "Breath Weapon (dam %d)"), lvl * 2);
1366 power_desc[num].level = 1;
1367 power_desc[num].cost = lvl;
1368 power_desc[num].stat = A_CON;
1369 power_desc[num].fail = 12;
1370 power_desc[num++].number = -1;
1372 case RACE_MIND_FLAYER:
1373 sprintf(power_desc[num].name, _("精神攻撃 (ダメージ %d)", "Mind Blast (dam %d)"), lvl);
1374 power_desc[num].level = 15;
1375 power_desc[num].cost = 12;
1376 power_desc[num].stat = A_INT;
1377 power_desc[num].fail = 14;
1378 power_desc[num++].number = -1;
1381 sprintf(power_desc[num].name, _("ファイア・ボルト/ボール (ダメージ %d)", "Fire Bolt/Ball (dam %d)"), lvl);
1382 power_desc[num].level = 9;
1383 power_desc[num].cost = 15;
1384 power_desc[num].stat = A_WIS;
1385 power_desc[num].fail = 15;
1386 power_desc[num++].number = -1;
1389 strcpy(power_desc[num].name, _("肌石化 (期間 1d20+30)", "Stone Skin (dur 1d20+30)"));
1390 power_desc[num].level = 20;
1391 power_desc[num].cost = 15;
1392 power_desc[num].stat = A_CON;
1393 power_desc[num].fail = 8;
1394 power_desc[num++].number = -1;
1398 strcpy(power_desc[num].name, _("経験値復活", "Restore Experience"));
1399 power_desc[num].level = 30;
1400 power_desc[num].cost = 30;
1401 power_desc[num].stat = A_WIS;
1402 power_desc[num].fail = 18;
1403 power_desc[num++].number = -1;
1406 strcpy(power_desc[num].name, _("吸血", "Vampiric Drain"));
1407 power_desc[num].level = 2;
1408 power_desc[num].cost = 1 + (lvl / 3);
1409 power_desc[num].stat = A_CON;
1410 power_desc[num].fail = 9;
1411 power_desc[num++].number = -1;
1414 strcpy(power_desc[num].name, _("眠り粉", "Sleeping Dust"));
1415 power_desc[num].level = 12;
1416 power_desc[num].cost = 12;
1417 power_desc[num].stat = A_INT;
1418 power_desc[num].fail = 15;
1419 power_desc[num++].number = -1;
1422 sprintf(power_desc[num].name, _("地獄/火炎のブレス (ダメージ %d)", "Nether or Fire Breath (dam %d)"), lvl * 3);
1423 power_desc[num].level = 15;
1424 power_desc[num].cost = 10 + lvl / 3;
1425 power_desc[num].stat = A_CON;
1426 power_desc[num].fail = 20;
1427 power_desc[num++].number = -1;
1430 strcpy(power_desc[num].name, _("横に伸びる", "Expand Horizontally (dur 30+1d20)"));
1431 power_desc[num].level = 20;
1432 power_desc[num].cost = 15;
1433 power_desc[num].stat = A_CHR;
1434 power_desc[num].fail = 8;
1435 power_desc[num++].number = -1;
1438 if (creature_ptr->lev < 10)
1440 strcpy(power_desc[num].name, _("レイガン", "Ray Gun"));
1441 power_desc[num].level = 1;
1442 power_desc[num].cost = 7;
1443 power_desc[num].fail = 8;
1445 else if (creature_ptr->lev < 25)
1447 strcpy(power_desc[num].name, _("ブラスター", "Blaster"));
1448 power_desc[num].level = 10;
1449 power_desc[num].cost = 13;
1450 power_desc[num].fail = 10;
1452 else if (creature_ptr->lev < 35)
1454 strcpy(power_desc[num].name, _("バズーカ", "Bazooka"));
1455 power_desc[num].level = 25;
1456 power_desc[num].cost = 26;
1457 power_desc[num].fail = 12;
1459 else if (creature_ptr->lev < 45)
1461 strcpy(power_desc[num].name, _("ビームキャノン", "Beam Cannon"));
1462 power_desc[num].level = 35;
1463 power_desc[num].cost = 40;
1464 power_desc[num].fail = 15;
1468 strcpy(power_desc[num].name, _("ロケット", "Rocket"));
1469 power_desc[num].level = 45;
1470 power_desc[num].cost = 60;
1471 power_desc[num].fail = 18;
1473 power_desc[num].stat = A_STR;
1474 power_desc[num++].number = -1;
1483 if (creature_ptr->muta1)
1485 if (creature_ptr->muta1 & MUT1_SPIT_ACID)
1487 strcpy(power_desc[num].name, _("酸の唾", "Spit Acid"));
1488 power_desc[num].level = 9;
1489 power_desc[num].cost = 9;
1490 power_desc[num].stat = A_DEX;
1491 power_desc[num].fail = 15;
1492 power_desc[num++].number = MUT1_SPIT_ACID;
1495 if (creature_ptr->muta1 & MUT1_BR_FIRE)
1497 strcpy(power_desc[num].name, _("炎のブレス", "Fire Breath"));
1498 power_desc[num].level = 20;
1499 power_desc[num].cost = lvl;
1500 power_desc[num].stat = A_CON;
1501 power_desc[num].fail = 18;
1502 power_desc[num++].number = MUT1_BR_FIRE;
1505 if (creature_ptr->muta1 & MUT1_HYPN_GAZE)
1507 strcpy(power_desc[num].name, _("催眠睨み", "Hypnotic Gaze"));
1508 power_desc[num].level = 12;
1509 power_desc[num].cost = 12;
1510 power_desc[num].stat = A_CHR;
1511 power_desc[num].fail = 18;
1512 power_desc[num++].number = MUT1_HYPN_GAZE;
1515 if (creature_ptr->muta1 & MUT1_TELEKINES)
1517 strcpy(power_desc[num].name, _("念動力", "Telekinesis"));
1518 power_desc[num].level = 9;
1519 power_desc[num].cost = 9;
1520 power_desc[num].stat = A_WIS;
1521 power_desc[num].fail = 14;
1522 power_desc[num++].number = MUT1_TELEKINES;
1525 if (creature_ptr->muta1 & MUT1_VTELEPORT)
1527 strcpy(power_desc[num].name, _("テレポート", "Teleport"));
1528 power_desc[num].level = 7;
1529 power_desc[num].cost = 7;
1530 power_desc[num].stat = A_WIS;
1531 power_desc[num].fail = 15;
1532 power_desc[num++].number = MUT1_VTELEPORT;
1535 if (creature_ptr->muta1 & MUT1_MIND_BLST)
1537 strcpy(power_desc[num].name, _("精神攻撃", "Mind Blast"));
1538 power_desc[num].level = 5;
1539 power_desc[num].cost = 3;
1540 power_desc[num].stat = A_WIS;
1541 power_desc[num].fail = 15;
1542 power_desc[num++].number = MUT1_MIND_BLST;
1545 if (creature_ptr->muta1 & MUT1_RADIATION)
1547 strcpy(power_desc[num].name, _("放射能", "Emit Radiation"));
1548 power_desc[num].level = 15;
1549 power_desc[num].cost = 15;
1550 power_desc[num].stat = A_CON;
1551 power_desc[num].fail = 14;
1552 power_desc[num++].number = MUT1_RADIATION;
1555 if (creature_ptr->muta1 & MUT1_VAMPIRISM)
1557 strcpy(power_desc[num].name, _("吸血", "Vampiric Drain"));
1558 power_desc[num].level = 2;
1559 power_desc[num].cost = (1 + (lvl / 3));
1560 power_desc[num].stat = A_CON;
1561 power_desc[num].fail = 9;
1562 power_desc[num++].number = MUT1_VAMPIRISM;
1565 if (creature_ptr->muta1 & MUT1_SMELL_MET)
1567 strcpy(power_desc[num].name, _("金属嗅覚", "Smell Metal"));
1568 power_desc[num].level = 3;
1569 power_desc[num].cost = 2;
1570 power_desc[num].stat = A_INT;
1571 power_desc[num].fail = 12;
1572 power_desc[num++].number = MUT1_SMELL_MET;
1575 if (creature_ptr->muta1 & MUT1_SMELL_MON)
1577 strcpy(power_desc[num].name, _("敵臭嗅覚", "Smell Monsters"));
1578 power_desc[num].level = 5;
1579 power_desc[num].cost = 4;
1580 power_desc[num].stat = A_INT;
1581 power_desc[num].fail = 15;
1582 power_desc[num++].number = MUT1_SMELL_MON;
1585 if (creature_ptr->muta1 & MUT1_BLINK)
1587 strcpy(power_desc[num].name, _("ショート・テレポート", "Blink"));
1588 power_desc[num].level = 3;
1589 power_desc[num].cost = 3;
1590 power_desc[num].stat = A_WIS;
1591 power_desc[num].fail = 12;
1592 power_desc[num++].number = MUT1_BLINK;
1595 if (creature_ptr->muta1 & MUT1_EAT_ROCK)
1597 strcpy(power_desc[num].name, _("岩食い", "Eat Rock"));
1598 power_desc[num].level = 8;
1599 power_desc[num].cost = 12;
1600 power_desc[num].stat = A_CON;
1601 power_desc[num].fail = 18;
1602 power_desc[num++].number = MUT1_EAT_ROCK;
1605 if (creature_ptr->muta1 & MUT1_SWAP_POS)
1607 strcpy(power_desc[num].name, _("位置交換", "Swap Position"));
1608 power_desc[num].level = 15;
1609 power_desc[num].cost = 12;
1610 power_desc[num].stat = A_DEX;
1611 power_desc[num].fail = 16;
1612 power_desc[num++].number = MUT1_SWAP_POS;
1615 if (creature_ptr->muta1 & MUT1_SHRIEK)
1617 strcpy(power_desc[num].name, _("叫び", "Shriek"));
1618 power_desc[num].level = 20;
1619 power_desc[num].cost = 14;
1620 power_desc[num].stat = A_CON;
1621 power_desc[num].fail = 16;
1622 power_desc[num++].number = MUT1_SHRIEK;
1625 if (creature_ptr->muta1 & MUT1_ILLUMINE)
1627 strcpy(power_desc[num].name, _("照明", "Illuminate"));
1628 power_desc[num].level = 3;
1629 power_desc[num].cost = 2;
1630 power_desc[num].stat = A_INT;
1631 power_desc[num].fail = 10;
1632 power_desc[num++].number = MUT1_ILLUMINE;
1635 if (creature_ptr->muta1 & MUT1_DET_CURSE)
1637 strcpy(power_desc[num].name, _("呪い感知", "Detect Curses"));
1638 power_desc[num].level = 7;
1639 power_desc[num].cost = 14;
1640 power_desc[num].stat = A_WIS;
1641 power_desc[num].fail = 14;
1642 power_desc[num++].number = MUT1_DET_CURSE;
1645 if (creature_ptr->muta1 & MUT1_BERSERK)
1647 strcpy(power_desc[num].name, _("狂戦士化", "Berserk"));
1648 power_desc[num].level = 8;
1649 power_desc[num].cost = 8;
1650 power_desc[num].stat = A_STR;
1651 power_desc[num].fail = 14;
1652 power_desc[num++].number = MUT1_BERSERK;
1655 if (creature_ptr->muta1 & MUT1_POLYMORPH)
1657 strcpy(power_desc[num].name, _("変身", "Polymorph"));
1658 power_desc[num].level = 18;
1659 power_desc[num].cost = 20;
1660 power_desc[num].stat = A_CON;
1661 power_desc[num].fail = 18;
1662 power_desc[num++].number = MUT1_POLYMORPH;
1665 if (creature_ptr->muta1 & MUT1_MIDAS_TCH)
1667 strcpy(power_desc[num].name, _("ミダスの手", "Midas Touch"));
1668 power_desc[num].level = 10;
1669 power_desc[num].cost = 5;
1670 power_desc[num].stat = A_INT;
1671 power_desc[num].fail = 12;
1672 power_desc[num++].number = MUT1_MIDAS_TCH;
1675 if (creature_ptr->muta1 & MUT1_GROW_MOLD)
1677 strcpy(power_desc[num].name, _("カビ発生", "Grow Mold"));
1678 power_desc[num].level = 1;
1679 power_desc[num].cost = 6;
1680 power_desc[num].stat = A_CON;
1681 power_desc[num].fail = 14;
1682 power_desc[num++].number = MUT1_GROW_MOLD;
1685 if (creature_ptr->muta1 & MUT1_RESIST)
1687 strcpy(power_desc[num].name, _("エレメント耐性", "Resist Elements"));
1688 power_desc[num].level = 10;
1689 power_desc[num].cost = 12;
1690 power_desc[num].stat = A_CON;
1691 power_desc[num].fail = 12;
1692 power_desc[num++].number = MUT1_RESIST;
1695 if (creature_ptr->muta1 & MUT1_EARTHQUAKE)
1697 strcpy(power_desc[num].name, _("地震", "Earthquake"));
1698 power_desc[num].level = 12;
1699 power_desc[num].cost = 12;
1700 power_desc[num].stat = A_STR;
1701 power_desc[num].fail = 16;
1702 power_desc[num++].number = MUT1_EARTHQUAKE;
1705 if (creature_ptr->muta1 & MUT1_EAT_MAGIC)
1707 strcpy(power_desc[num].name, _("魔力食い", "Eat Magic"));
1708 power_desc[num].level = 17;
1709 power_desc[num].cost = 1;
1710 power_desc[num].stat = A_WIS;
1711 power_desc[num].fail = 15;
1712 power_desc[num++].number = MUT1_EAT_MAGIC;
1715 if (creature_ptr->muta1 & MUT1_WEIGH_MAG)
1717 strcpy(power_desc[num].name, _("魔力感知", "Weigh Magic"));
1718 power_desc[num].level = 6;
1719 power_desc[num].cost = 6;
1720 power_desc[num].stat = A_INT;
1721 power_desc[num].fail = 10;
1722 power_desc[num++].number = MUT1_WEIGH_MAG;
1725 if (creature_ptr->muta1 & MUT1_STERILITY)
1727 strcpy(power_desc[num].name, _("増殖阻止", "Sterilize"));
1728 power_desc[num].level = 12;
1729 power_desc[num].cost = 23;
1730 power_desc[num].stat = A_CHR;
1731 power_desc[num].fail = 15;
1732 power_desc[num++].number = MUT1_STERILITY;
1735 if (creature_ptr->muta1 & MUT1_HIT_AND_AWAY)
1737 strcpy(power_desc[num].name, _("ヒット&アウェイ", "Panic Hit"));
1738 power_desc[num].level = 10;
1739 power_desc[num].cost = 12;
1740 power_desc[num].stat = A_DEX;
1741 power_desc[num].fail = 14;
1742 power_desc[num++].number = MUT1_HIT_AND_AWAY;
1745 if (creature_ptr->muta1 & MUT1_DAZZLE)
1747 strcpy(power_desc[num].name, _("眩惑", "Dazzle"));
1748 power_desc[num].level = 7;
1749 power_desc[num].cost = 15;
1750 power_desc[num].stat = A_CHR;
1751 power_desc[num].fail = 8;
1752 power_desc[num++].number = MUT1_DAZZLE;
1755 if (creature_ptr->muta1 & MUT1_LASER_EYE)
1757 strcpy(power_desc[num].name, _("レーザー・アイ", "Laser Eye"));
1758 power_desc[num].level = 7;
1759 power_desc[num].cost = 10;
1760 power_desc[num].stat = A_WIS;
1761 power_desc[num].fail = 9;
1762 power_desc[num++].number = MUT1_LASER_EYE;
1765 if (creature_ptr->muta1 & MUT1_RECALL)
1767 strcpy(power_desc[num].name, _("帰還", "Recall"));
1768 power_desc[num].level = 17;
1769 power_desc[num].cost = 50;
1770 power_desc[num].stat = A_INT;
1771 power_desc[num].fail = 16;
1772 power_desc[num++].number = MUT1_RECALL;
1775 if (creature_ptr->muta1 & MUT1_BANISH)
1777 strcpy(power_desc[num].name, _("邪悪消滅", "Banish Evil"));
1778 power_desc[num].level = 25;
1779 power_desc[num].cost = 25;
1780 power_desc[num].stat = A_WIS;
1781 power_desc[num].fail = 18;
1782 power_desc[num++].number = MUT1_BANISH;
1785 if (creature_ptr->muta1 & MUT1_COLD_TOUCH)
1787 strcpy(power_desc[num].name, _("凍結の手", "Cold Touch"));
1788 power_desc[num].level = 2;
1789 power_desc[num].cost = 2;
1790 power_desc[num].stat = A_CON;
1791 power_desc[num].fail = 11;
1792 power_desc[num++].number = MUT1_COLD_TOUCH;
1795 if (creature_ptr->muta1 & MUT1_LAUNCHER)
1797 strcpy(power_desc[num].name, _("アイテム投げ", "Throw Object"));
1798 power_desc[num].level = 1;
1799 power_desc[num].cost = lvl;
1800 power_desc[num].stat = A_STR;
1801 power_desc[num].fail = 6;
1802 /* XXX_XXX_XXX Hack! MUT1_LAUNCHER counts as negative... */
1803 power_desc[num++].number = 3;
1810 (void)strnfmt(out_val, 78,
1811 _("(特殊能力 %c-%c, *'で一覧, ESCで中断) どの特殊能力を使いますか?", "(Powers %c-%c, *=List, ESC=exit) Use which power? "),
1812 I2A(0), (num <= 26) ? I2A(num - 1) : '0' + num - 27);
1814 if (!repeat_pull(&i) || i < 0 || i >= num) {
1815 if (use_menu) screen_save();
1817 choice = (always_show_list || use_menu) ? ESCAPE : 1;
1820 if (choice == ESCAPE) choice = ' ';
1821 else if (!get_com(out_val, &choice, FALSE))break;
1823 if (use_menu && choice != ' ')
1830 free_turn(creature_ptr);
1838 menu_line += (num - 1);
1859 else if (menu_line + 18 <= num)
1873 if (menu_line > num) menu_line -= num;
1875 /* Request redraw */
1876 if ((choice == ' ') || (choice == '*') || (choice == '?') || (use_menu && ask))
1879 if (!redraw || use_menu)
1889 if (!use_menu) screen_save();
1891 /* Print header(s) */
1893 prt(_(" Lv MP 失率", " Lv Cost Fail"), y++, x);
1895 prt(_(" Lv MP 失率 Lv MP 失率",
1896 " Lv Cost Fail Lv Cost Fail"), y++, x);
1902 x1 = ((ctr < 18) ? x : x + 40);
1903 y1 = ((ctr < 18) ? y + ctr : y + ctr - 18);
1907 if (ctr == (menu_line - 1)) strcpy(dummy, _(" 》 ", " > "));
1908 else strcpy(dummy, " ");
1912 /* letter/number for power selection */
1916 letter = '0' + ctr - 26;
1917 sprintf(dummy, " %c) ", letter);
1919 strcat(dummy, format("%-23.23s %2d %4d %3d%%",
1920 power_desc[ctr].name, power_desc[ctr].level, power_desc[ctr].cost,
1921 100 - racial_chance(creature_ptr, &power_desc[ctr])));
1941 if (choice == '\r' && num == 1)
1946 if (isalpha(choice))
1949 ask = (isupper(choice));
1952 if (ask) choice = (char)tolower(choice);
1954 /* Extract request */
1955 i = (islower(choice) ? A2I(choice) : -1);
1959 ask = FALSE; /* Can't uppercase digits */
1961 i = choice - '0' + 26;
1965 /* Totally Illegal */
1966 if ((i < 0) || (i >= num))
1978 (void)strnfmt(tmp_val, 78, _("%sを使いますか? ", "Use %s? "), power_desc[i].name);
1980 /* Belay that order */
1981 if (!get_check(tmp_val)) continue;
1987 if (redraw) screen_load();
1989 /* Abort if needed */
1992 free_turn(creature_ptr);
1996 } /*if (!repeat_pull(&i) || ...)*/
1997 switch (racial_aux(creature_ptr, &power_desc[i]))
2000 if (power_desc[i].number < 0)
2001 cast = exe_racial_power(creature_ptr, power_desc[i].number);
2003 cast = exe_mutation_power(creature_ptr, power_desc[i].number);
2017 int actual_racial_cost = racial_cost / 2 + randint1(racial_cost / 2);
2019 /* If mana is not enough, player consumes hit point! */
2020 if (creature_ptr->csp < actual_racial_cost)
2022 actual_racial_cost -= creature_ptr->csp;
2023 creature_ptr->csp = 0;
2024 take_hit(creature_ptr, DAMAGE_USELIFE, actual_racial_cost, _("過度の集中", "concentrating too hard"), -1);
2026 else creature_ptr->csp -= actual_racial_cost;
2028 creature_ptr->redraw |= (PR_HP | PR_MANA);
2029 creature_ptr->window |= (PW_PLAYER | PW_SPELL);
2032 else free_turn(creature_ptr);