-/* File: spells2.c */
-
-/*
+/*!
+ * @file spells2.c
+ * @brief 魔法効果の実装/ Spell code (part 2)
+ * @date 2014/07/15
+ * @author
+ * <pre>
* Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
- *
* This software may be copied and distributed for educational, research,
* and not for profit purposes provided that this copyright and statement
* are included in all such copies. Other copyrights may also apply.
+ * </pre>
*/
-/* Purpose: Spell code (part 2) */
-
#include "angband.h"
#include "grid.h"
+#include "trap.h"
-/*
- * self-knowledge... idea from nethack. Useful for determining powers and
- * resistences of items. It saves the screen, clears it, then starts listing
- * attributes, a screenful at a time. (There are a LOT of attributes to
- * list. It will probably take 2 or 3 screens for a powerful character whose
- * using several artifacts...) -CFT
- *
- * It is now a lot more efficient. -BEN-
- *
- * See also "identify_fully()".
- *
- * XXX XXX XXX Use the "show_file()" method, perhaps.
+/*!
+ * @brief プレイヤー周辺の地形を感知する
+ * @param range 効果範囲
+ * @param flag 特定地形ID
+ * @param known 地形から危険フラグを外すならTRUE
+ * @return 効力があった場合TRUEを返す
*/
-void self_knowledge(void)
+static bool detect_feat_flag(POSITION range, int flag, bool known)
{
- int i = 0, j, k;
+ int x, y;
+ bool detect = FALSE;
+ cave_type *c_ptr;
+
+ if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
- int v_nr = 0;
- char v_string [8] [128];
- char s_string [6] [128];
+ /* Scan the current panel */
+ for (y = 1; y < cur_hgt - 1; y++)
+ {
+ for (x = 1; x <= cur_wid - 1; x++)
+ {
+ int dist = distance(p_ptr->y, p_ptr->x, y, x);
+ if (dist > range) continue;
- u32b flgs[TR_FLAG_SIZE];
+ /* Access the grid */
+ c_ptr = &cave[y][x];
- object_type *o_ptr;
+ /* Hack -- Safe */
+ if (flag == FF_TRAP)
+ {
+ /* Mark as detected */
+ if (dist <= range && known)
+ {
+ if (dist <= range - 1) c_ptr->info |= (CAVE_IN_DETECT);
- char Dummy[80];
- char buf[2][80];
+ c_ptr->info &= ~(CAVE_UNSAFE);
- cptr info[220];
+ /* Redraw */
+ lite_spot(y, x);
+ }
+ }
- int plev = p_ptr->lev;
+ /* Detect flags */
+ if (cave_have_flag_grid(c_ptr, flag))
+ {
+ /* Detect secrets */
+ disclose_grid(y, x);
- int percent;
+ /* Hack -- Memorize */
+ c_ptr->info |= (CAVE_MARK);
- for (j = 0; j < TR_FLAG_SIZE; j++)
- flgs[j] = 0L;
+ /* Redraw */
+ lite_spot(y, x);
- p_ptr->knowledge |= (KNOW_STAT | KNOW_HPRATE);
+ /* Obvious */
+ detect = TRUE;
+ }
+ }
+ }
- strcpy(Dummy, "");
+ /* Result */
+ return detect;
+}
- percent = (int)(((long)p_ptr->player_hp[PY_MAX_LEVEL - 1] * 200L) /
- (2 * p_ptr->hitdie +
- ((PY_MAX_LEVEL - 1+3) * (p_ptr->hitdie + 1))));
-#ifdef JP
-sprintf(Dummy, "¸½ºß¤ÎÂÎÎÏ¥é¥ó¥¯ : %d/100", percent);
-#else
- sprintf(Dummy, "Your current Life Rating is %d/100.", percent);
-#endif
+/*!
+ * @brief プレイヤー周辺のトラップを感知する / Detect all traps on current panel
+ * @param range 効果範囲
+ * @param known 感知外範囲を超える警告フラグを立てる場合TRUEを返す
+ * @return 効力があった場合TRUEを返す
+ */
+bool detect_traps(POSITION range, bool known)
+{
+ bool detect = detect_feat_flag(range, FF_TRAP, known);
- strcpy(buf[0], Dummy);
- info[i++] = buf[0];
- info[i++] = "";
+ if (known) p_ptr->dtrap = TRUE;
- chg_virtue(V_KNOWLEDGE, 1);
- chg_virtue(V_ENLIGHTEN, 1);
+ if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 0) detect = FALSE;
- /* Acquire item flags from equipment */
- for (k = INVEN_RARM; k < INVEN_TOTAL; k++)
+ /* Describe */
+ if (detect)
{
- u32b tflgs[TR_FLAG_SIZE];
+ msg_print(_("トラップの存在を感じとった!", "You sense the presence of traps!"));
+ }
+
+ /* Result */
+ return detect;
+}
- o_ptr = &inventory[k];
- /* Skip non-objects */
- if (!o_ptr->k_idx) continue;
+/*!
+ * @brief プレイヤー周辺のドアを感知する / Detect all doors on current panel
+ * @param range 効果範囲
+ * @return 効力があった場合TRUEを返す
+ */
+bool detect_doors(POSITION range)
+{
+ bool detect = detect_feat_flag(range, FF_DOOR, TRUE);
- /* Extract the flags */
- object_flags(o_ptr, tflgs);
+ if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 0) detect = FALSE;
- /* Extract flags */
- for (j = 0; j < TR_FLAG_SIZE; j++)
- flgs[j] |= tflgs[j];
+ /* Describe */
+ if (detect)
+ {
+ msg_print(_("ドアの存在を感じとった!", "You sense the presence of doors!"));
}
-#ifdef JP
- info[i++] = "ǽÎϤκÇÂçÃÍ";
-#else
- info[i++] = "Limits of maximum stats";
-#endif
+ /* Result */
+ return detect;
+}
- for (v_nr = 0; v_nr < 6; v_nr++)
- {
- char stat_desc[80];
- sprintf(stat_desc, "%s 18/%d", stat_names[v_nr], p_ptr->stat_max_max[v_nr]-18);
+/*!
+ * @brief プレイヤー周辺の階段を感知する / Detect all stairs on current panel
+ * @param range 効果範囲
+ * @return 効力があった場合TRUEを返す
+ */
+bool detect_stairs(POSITION range)
+{
+ bool detect = detect_feat_flag(range, FF_STAIRS, TRUE);
- strcpy(s_string[v_nr], stat_desc);
+ if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 0) detect = FALSE;
- info[i++] = s_string[v_nr];
+ /* Describe */
+ if (detect)
+ {
+ msg_print(_("階段の存在を感じとった!", "You sense the presence of stairs!"));
}
- info[i++] = "";
-#ifdef JP
- sprintf(Dummy, "¸½ºß¤Î°À : %s(%ld)", your_alignment(), p_ptr->align);
-#else
- sprintf(Dummy, "Your alighnment : %s(%ld)", your_alignment(), p_ptr->align);
-#endif
- strcpy(buf[1], Dummy);
- info[i++] = buf[1];
- for (v_nr = 0; v_nr < 8; v_nr++)
- {
- char v_name [20];
- char vir_desc[80];
- int tester = p_ptr->virtues[v_nr];
-
- strcpy(v_name, virtue[(p_ptr->vir_types[v_nr])-1]);
-
-#ifdef JP
- sprintf(vir_desc, "¤ª¤Ã¤È¡£%s¤Î¾ðÊó¤Ê¤·¡£", v_name);
-#else
- sprintf(vir_desc, "Oops. No info about %s.", v_name);
-#endif
- if (tester < -100)
-#ifdef JP
- sprintf(vir_desc, "[%s]¤ÎÂÐ¶Ë (%d)",
-#else
- sprintf(vir_desc, "You are the polar opposite of %s (%d).",
-#endif
- v_name, tester);
- else if (tester < -80)
-#ifdef JP
- sprintf(vir_desc, "[%s]¤ÎÂçŨ (%d)",
-#else
- sprintf(vir_desc, "You are an arch-enemy of %s (%d).",
-#endif
- v_name, tester);
- else if (tester < -60)
-#ifdef JP
- sprintf(vir_desc, "[%s]¤Î¶¯Å¨ (%d)",
-#else
- sprintf(vir_desc, "You are a bitter enemy of %s (%d).",
-#endif
- v_name, tester);
- else if (tester < -40)
-#ifdef JP
- sprintf(vir_desc, "[%s]¤ÎŨ (%d)",
-#else
- sprintf(vir_desc, "You are an enemy of %s (%d).",
-#endif
- v_name, tester);
- else if (tester < -20)
-#ifdef JP
- sprintf(vir_desc, "[%s]¤Îºá¼Ô (%d)",
-#else
- sprintf(vir_desc, "You have sinned against %s (%d).",
-#endif
- v_name, tester);
- else if (tester < 0)
-#ifdef JP
- sprintf(vir_desc, "[%s]¤ÎÌÂÆ»¼Ô (%d)",
-#else
- sprintf(vir_desc, "You have strayed from the path of %s (%d).",
-#endif
- v_name, tester);
- else if (tester == 0)
-#ifdef JP
- sprintf(vir_desc, "[%s]¤ÎÃæΩ¼Ô (%d)",
-#else
- sprintf(vir_desc,"You are neutral to %s (%d).",
-#endif
- v_name, tester);
- else if (tester < 20)
-#ifdef JP
- sprintf(vir_desc, "[%s]¤Î¾®ÆÁ¼Ô (%d)",
-#else
- sprintf(vir_desc,"You are somewhat virtuous in %s (%d).",
-#endif
- v_name, tester);
- else if (tester < 40)
-#ifdef JP
- sprintf(vir_desc, "[%s]¤ÎÃæÆÁ¼Ô (%d)",
-#else
- sprintf(vir_desc,"You are virtuous in %s (%d).",
-#endif
- v_name, tester);
- else if (tester < 60)
-#ifdef JP
- sprintf(vir_desc, "[%s]¤Î¹âÆÁ¼Ô (%d)",
-#else
- sprintf(vir_desc,"You are very virtuous in %s (%d).",
-#endif
- v_name, tester);
- else if (tester < 80)
-#ifdef JP
- sprintf(vir_desc, "[%s]¤ÎÇÆ¼Ô (%d)",
-#else
- sprintf(vir_desc,"You are a champion of %s (%d).",
-#endif
- v_name, tester);
- else if (tester < 100)
-#ifdef JP
- sprintf(vir_desc, "[%s]¤Î°ÎÂç¤ÊÇÆ¼Ô (%d)",
-#else
- sprintf(vir_desc,"You are a great champion of %s (%d).",
-#endif
- v_name, tester);
- else
-#ifdef JP
- sprintf(vir_desc, "[%s]¤Î¶ñ¸½¼Ô (%d)",
-#else
- sprintf(vir_desc,"You are the living embodiment of %s (%d).",
-#endif
- v_name, tester);
-
- strcpy(v_string[v_nr], vir_desc);
-
- info[i++] = v_string[v_nr];
- }
- info[i++] = "";
-
- /* Racial powers... */
- if (p_ptr->mimic_form)
- {
- switch (p_ptr->mimic_form)
- {
- case MIMIC_DEMON:
- case MIMIC_DEMON_LORD:
-#ifdef JP
-sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤ÎÃϹö¤«²Ð±ê¤Î¥Ö¥ì¥¹¤òÅǤ¯¤³¤È¤¬¤Ç¤¤ë¡£(%d MP)", 3 * plev, 10+plev/3);
-#else
- sprintf(Dummy, "You can nether breathe, dam. %d (cost %d).", 3 * plev, 10+plev/3);
-#endif
+ /* Result */
+ return detect;
+}
- info[i++] = Dummy;
- break;
- case MIMIC_VAMPIRE:
- if (plev > 1)
- {
-#ifdef JP
-sprintf(Dummy, "¤¢¤Ê¤¿¤ÏŨ¤«¤é %d-%d HP ¤ÎÀ¸Ì¿ÎϤòµÛ¼ý¤Ç¤¤ë¡£(%d MP)",
-#else
- sprintf(Dummy, "You can steal life from a foe, dam. %d-%d (cost %d).",
-#endif
- plev + MAX(1, plev / 10), plev + plev * MAX(1, plev / 10), 1 + (plev / 3));
- info[i++] = Dummy;
- }
- break;
- }
- }
- else
- {
- switch (p_ptr->prace)
+/*!
+ * @brief プレイヤー周辺の地形財宝を感知する / Detect any treasure on the current panel
+ * @param range 効果範囲
+ * @return 効力があった場合TRUEを返す
+ */
+bool detect_treasure(POSITION range)
+{
+ bool detect = detect_feat_flag(range, FF_HAS_GOLD, TRUE);
+
+ if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 6) detect = FALSE;
+
+ /* Describe */
+ if (detect)
{
- case RACE_NIBELUNG:
- case RACE_DWARF:
- if (plev > 4)
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï櫤ȥɥ¢¤È³¬Ãʤò´¶ÃΤǤ¤ë¡£(5 MP)";
-#else
- info[i++] = "You can find traps, doors and stairs (cost 5).";
-#endif
+ msg_print(_("埋蔵された財宝の存在を感じとった!", "You sense the presence of buried treasure!"));
+ }
- break;
- case RACE_HOBBIT:
- if (plev > 14)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¿©ÎÁ¤òÀ¸À®¤Ç¤¤ë¡£(10 MP)";
-#else
- info[i++] = "You can produce food (cost 10).";
-#endif
+ /* Result */
+ return detect;
+}
- }
- break;
- case RACE_GNOME:
- if (plev > 4)
- {
-#ifdef JP
-sprintf(Dummy, "¤¢¤Ê¤¿¤ÏÈÏ°Ï %d °ÊÆâ¤Ë¥Æ¥ì¥Ý¡¼¥È¤Ç¤¤ë¡£(%d MP)",
-#else
- sprintf(Dummy, "You can teleport, range %d (cost %d).",
-#endif
- (1 + plev), (5 + (plev / 5)));
- info[i++] = Dummy;
- }
- break;
- case RACE_HALF_ORC:
- if (plev > 2)
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¶²Éݤò½üµî¤Ç¤¤ë¡£(5 MP)";
-#else
- info[i++] = "You can remove fear (cost 5).";
-#endif
+/*!
+ * @brief プレイヤー周辺のアイテム財宝を感知する / Detect all "gold" objects on the current panel
+ * @param range 効果範囲
+ * @return 効力があった場合TRUEを返す
+ */
+bool detect_objects_gold(POSITION range)
+{
+ int i, y, x;
+ POSITION range2 = range;
- break;
- case RACE_HALF_TROLL:
- if (plev > 9)
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¶¸Ë½²½¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(12 MP) ";
-#else
- info[i++] = "You enter berserk fury (cost 12).";
-#endif
+ bool detect = FALSE;
- break;
- case RACE_AMBERITE:
- if (plev > 29)
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥·¥ã¥É¥¦¥·¥Õ¥È¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(50 MP)";
-#else
- info[i++] = "You can Shift Shadows (cost 50).";
-#endif
+ if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range2 /= 3;
- if (plev > 39)
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¡Ö¥Ñ¥¿¡¼¥ó¡×¤ò¿´¤ËÉÁ¤¤¤ÆÊ⤯¤³¤È¤¬¤Ç¤¤ë¡£(75 MP)";
-#else
- info[i++] = "You can mentally Walk the Pattern (cost 75).";
-#endif
+ /* Scan objects */
+ for (i = 1; i < o_max; i++)
+ {
+ object_type *o_ptr = &o_list[i];
- break;
- case RACE_BARBARIAN:
- if (plev > 7)
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¶¸Ë½²½¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(10 MP) ";
-#else
- info[i++] = "You can enter berserk fury (cost 10).";
-#endif
+ /* Skip dead objects */
+ if (!o_ptr->k_idx) continue;
- break;
- case RACE_HALF_OGRE:
- if (plev > 24)
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÇúȯ¤Î¥ë¡¼¥ó¤ò»Å³Ý¤±¤ë¤³¤È¤¬¤Ç¤¤ë¡£(35 MP)";
-#else
- info[i++] = "You can set an Explosive Rune (cost 35).";
-#endif
+ /* Skip held objects */
+ if (o_ptr->held_m_idx) continue;
- break;
- case RACE_HALF_GIANT:
- if (plev > 19)
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÀФÎÊɤò²õ¤¹¤³¤È¤¬¤Ç¤¤ë¡£(10 MP)";
-#else
- info[i++] = "You can break stone walls (cost 10).";
-#endif
+ /* Location */
+ y = o_ptr->iy;
+ x = o_ptr->ix;
- break;
- case RACE_HALF_TITAN:
- if (plev > 34)
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥â¥ó¥¹¥¿¡¼¤ò¥¹¥¥ã¥ó¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(20 MP)";
-#else
- info[i++] = "You can probe monsters (cost 20).";
-#endif
+ /* Only detect nearby objects */
+ if (distance(p_ptr->y, p_ptr->x, y, x) > range2) continue;
- break;
- case RACE_CYCLOPS:
- if (plev > 19)
- {
-#ifdef JP
-sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î´äÀФòÅꤲ¤ë¤³¤È¤¬¤Ç¤¤ë¡£(15 MP)",
-#else
- sprintf(Dummy, "You can throw a boulder, dam. %d (cost 15).",
-#endif
+ /* Detect "gold" objects */
+ if (o_ptr->tval == TV_GOLD)
+ {
+ /* Hack -- memorize it */
+ o_ptr->marked |= OM_FOUND;
- 3 * plev);
- info[i++] = Dummy;
- }
- break;
- case RACE_YEEK:
- if (plev > 14)
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¶²Éݤò¸Æ¤Óµ¯¤³¤¹¶«¤ÓÀ¼¤òȯ¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(15 MP)";
-#else
- info[i++] = "You can make a terrifying scream (cost 15).";
-#endif
+ /* Redraw */
+ lite_spot(y, x);
- break;
- case RACE_KLACKON:
- if (plev > 8)
- {
-#ifdef JP
-sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î»À¤ò¿á¤¤«¤±¤ë¤³¤È¤¬¤Ç¤¤ë¡£(9 MP)", plev);
-#else
- sprintf(Dummy, "You can spit acid, dam. %d (cost 9).", plev);
-#endif
+ /* Detect */
+ detect = TRUE;
+ }
+ }
- info[i++] = Dummy;
- }
- break;
- case RACE_KOBOLD:
- if (plev > 11)
- {
- sprintf(Dummy,
-#ifdef JP
- "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤ÎÆÇÌð¤òÅꤲ¤ë¤³¤È¤¬¤Ç¤¤ë¡£(8 MP)", plev);
-#else
- "You can throw a dart of poison, dam. %d (cost 8).", plev);
-#endif
-
- info[i++] = Dummy;
- }
- break;
- case RACE_DARK_ELF:
- if (plev > 1)
- {
-#ifdef JP
-sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë¤Î¼öʸ¤ò»È¤¨¤ë¡£(2 MP)",
-#else
- sprintf(Dummy, "You can cast a Magic Missile, dam %d (cost 2).",
-#endif
-
- (3 + ((plev-1) / 5)));
- info[i++] = Dummy;
- }
- break;
- case RACE_DRACONIAN:
-#ifdef JP
-sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥Ö¥ì¥¹¤òÅǤ¯¤³¤È¤¬¤Ç¤¤ë¡£(%d MP)", 2 * plev, plev);
-#else
- sprintf(Dummy, "You can breathe, dam. %d (cost %d).", 2 * plev, plev);
-#endif
-
- info[i++] = Dummy;
- break;
- case RACE_MIND_FLAYER:
- if (plev > 14)
-#ifdef JP
-sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤ÎÀº¿À¹¶·â¤ò¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(12 MP)", plev);
-#else
- sprintf(Dummy, "You can mind blast your enemies, dam %d (cost 12).", plev);
-#endif
-
- info[i++] = Dummy;
- break;
- case RACE_IMP:
- if (plev > 29)
- {
-#ifdef JP
-sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò»È¤¨¤ë¡£(15 MP)", plev);
-#else
- sprintf(Dummy, "You can cast a Fire Ball, dam. %d (cost 15).", plev);
-#endif
-
- info[i++] = Dummy;
- }
- else if (plev > 8)
- {
-#ifdef JP
-sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò»È¤¨¤ë¡£(15 MP)", plev);
-#else
- sprintf(Dummy, "You can cast a Fire Bolt, dam. %d (cost 15).", plev);
-#endif
-
- info[i++] = Dummy;
- }
- break;
- case RACE_GOLEM:
- if (plev > 19)
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï d20+30 ¥¿¡¼¥ó¤Î´ÖÈ©¤òÀФËÊѲ½¤µ¤»¤é¤ì¤ë¡£(15 MP)";
-#else
- info[i++] = "You can turn your skin to stone, dur d20+30 (cost 15).";
-#endif
-
- break;
- case RACE_ZOMBIE:
- case RACE_SKELETON:
- if (plev > 29)
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼º¤Ã¤¿À¸Ì¿ÎϤò²óÉü¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(30 MP)";
-#else
- info[i++] = "You can restore lost life forces (cost 30).";
-#endif
-
- break;
- case RACE_VAMPIRE:
- if (plev > 1)
- {
-#ifdef JP
-sprintf(Dummy, "¤¢¤Ê¤¿¤ÏŨ¤«¤é %d-%d HP ¤ÎÀ¸Ì¿ÎϤòµÛ¼ý¤Ç¤¤ë¡£(%d MP)",
-#else
- sprintf(Dummy, "You can steal life from a foe, dam. %d-%d (cost %d).",
-#endif
-
- plev + MAX(1, plev / 10), plev + plev * MAX(1, plev / 10), 1 + (plev / 3));
- info[i++] = Dummy;
- }
- break;
- case RACE_SPECTRE:
- if (plev > 3)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ïµã¤¶«¤ó¤ÇŨ¤ò¶²Éݤµ¤»¤ë¤³¤È¤¬¤Ç¤¤ë¡£(3 MP)";
-#else
- info[i++] = "You can wail to terrify your enemies (cost 3).";
-#endif
-
- }
- break;
- case RACE_SPRITE:
- if (plev > 11)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏŨ¤ò̲¤é¤»¤ëËâË¡¤ÎÊ´¤òÅꤲ¤ë¤³¤È¤¬¤Ç¤¤ë¡£(12 MP)";
-#else
- info[i++] = "You can throw magical dust which induces sleep (cost 12).";
-#endif
-
- }
- break;
- case RACE_DEMON:
-#ifdef JP
-sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤ÎÃϹö¤«²Ð±ê¤Î¥Ö¥ì¥¹¤òÅǤ¯¤³¤È¤¬¤Ç¤¤ë¡£(%d MP)", 3 * plev, 10+plev/3);
-#else
- sprintf(Dummy, "You can breathe nether, dam. %d (cost %d).", 3 * plev, 10+plev/3);
-#endif
-
- info[i++] = Dummy;
- break;
- case RACE_KUTA:
- if (plev > 19)
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï d20+30 ¥¿¡¼¥ó¤Î´Ö²£¤Ë¿¤Ó¤ë¤³¤È¤¬¤Ç¤¤ë¡£(15 MP)";
-#else
- info[i++] = "You can expand horizontally, dur d20+30 (cost 15).";
-#endif
-
- break;
- case RACE_ANDROID:
- if (plev < 10)
-#ifdef JP
-sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥ì¥¤¥¬¥ó¤ò·â¤Ä¤³¤È¤¬¤Ç¤¤ë¡£(7 MP)", (plev + 1) / 2);
-#else
- sprintf(Dummy, "You can fire a ray gun with damage %d (cost 7).", (plev+1)/2);
-#endif
- else if (plev < 25)
-#ifdef JP
-sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥Ö¥é¥¹¥¿¡¼¤ò·â¤Ä¤³¤È¤¬¤Ç¤¤ë¡£(13 MP)", plev);
-#else
- sprintf(Dummy, "You can fire a blaster with damage %d (cost 13).", plev);
-#endif
- else if (plev < 35)
-#ifdef JP
-sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥Ð¥º¡¼¥«¤ò·â¤Ä¤³¤È¤¬¤Ç¤¤ë¡£(26 MP)", plev * 2);
-#else
- sprintf(Dummy, "You can fire a bazooka with damage %d (cost 26).", plev * 2);
-#endif
- else if (plev < 45)
-#ifdef JP
-sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥Ó¡¼¥à¥¥ã¥Î¥ó¤ò·â¤Ä¤³¤È¤¬¤Ç¤¤ë¡£(40 MP)", plev * 2);
-#else
- sprintf(Dummy, "You can fire a beam cannon with damage %d (cost 40).", plev * 2);
-#endif
- else
-#ifdef JP
-sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥í¥±¥Ã¥È¤ò·â¤Ä¤³¤È¤¬¤Ç¤¤ë¡£(60 MP)", plev * 5);
-#else
- sprintf(Dummy, "You can fire a rocket with damage %d (cost 60).", plev * 5);
-#endif
-
- info[i++] = Dummy;
- break;
- default:
- break;
- }
- }
-
- switch(p_ptr->pclass)
- {
- case CLASS_WARRIOR:
- if (plev > 39)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥é¥ó¥À¥à¤ÊÊý¸þ¤ËÂФ·¤Æ¿ô²ó¹¶·â¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(75 MP)";
-#else
- info[i++] = "You can attack some random directions at a time (cost 75).";
-#endif
- }
- break;
- case CLASS_MAGE:
- case CLASS_HIGH_MAGE:
- case CLASS_SORCERER:
- if (plev > 24)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥¢¥¤¥Æ¥à¤ÎËâÎϤòµÛ¼ý¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(1 MP)";
-#else
- info[i++] = "You can absorb charges from an item (cost 1).";
-#endif
- }
- break;
- case CLASS_PRIEST:
- if (is_good_realm(p_ptr->realm1))
- {
- if (plev > 34)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÉð´ï¤ò½ËÊ¡¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(70 MP)";
-#else
- info[i++] = "You can bless a weapon (cost 70).";
-#endif
- }
- }
- else
- {
- if (plev > 41)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼þ¤ê¤Î¤¹¤Ù¤Æ¤Î¥â¥ó¥¹¥¿¡¼¤ò¹¶·â¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(40 MP)";
-#else
- info[i++] = "You can damages all monsters in sight (cost 40).";
-#endif
- }
- }
- break;
- case CLASS_ROGUE:
- if (plev > 7)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¹¶·â¤·¤Æ¨ºÂ¤Ëƨ¤²¤ë¤³¤È¤¬¤Ç¤¤ë¡£(12 MP)";
-#else
- info[i++] = "You can hit a monster and teleport at a time (cost 12).";
-#endif
- }
- break;
- case CLASS_RANGER:
- if (plev > 14)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï²øʪ¤òÄ´ºº¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(20 MP)";
-#else
- info[i++] = "You can prove monsters (cost 20).";
-#endif
- }
- break;
- case CLASS_PALADIN:
- if (is_good_realm(p_ptr->realm1))
- {
- if (plev > 29)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÀ»¤Ê¤ëÁä¤òÊü¤Ä¤³¤È¤¬¤Ç¤¤ë¡£(30 MP)";
-#else
- info[i++] = "You can fires a holy spear (cost 30).";
-#endif
- }
- }
- else
- {
- if (plev > 29)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÀ¸Ì¿ÎϤò¸º¾¯¤µ¤»¤ëÁä¤òÊü¤Ä¤³¤È¤¬¤Ç¤¤ë¡£(30 MP)";
-#else
- info[i++] = "You can fires a spear which drains vitality (cost 30).";
-#endif
- }
- }
- break;
- case CLASS_WARRIOR_MAGE:
- if (plev > 24)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï£È£Ð¤ò£Í£Ð¤ËÊÑ´¹¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(0 MP)";
-#else
- info[i++] = "You can convert HP to SP (cost 0).";
-#endif
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï£Í£Ð¤ò£È£Ð¤ËÊÑ´¹¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(0 MP)";
-#else
- info[i++] = "You can convert SP to HP (cost 0).";
-#endif
- }
- break;
- case CLASS_CHAOS_WARRIOR:
- if (plev > 39)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼þ°Ï¤Ë²øʪ¤òÏǤ魯¸÷¤òȯÀ¸¤µ¤»¤ë¤³¤È¤¬¤Ç¤¤ë¡£(50 MP)";
-#else
- info[i++] = "You can radiate light which confuses nearby monsters (cost 50).";
-#endif
- }
- break;
- case CLASS_MONK:
- if (plev > 24)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¹½¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£(0 MP)";
-#else
- info[i++] = "You can assume a posture of special form (cost 0).";
-#endif
- }
- if (plev > 29)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÄ̾ï¤Î2Çܤι¶·â¤ò¹Ô¤¦¤³¤È¤¬¤Ç¤¤ë¡£(30 MP)";
-#else
- info[i++] = "You can perform double attacks in a time (cost 30).";
-#endif
- }
- break;
- case CLASS_MINDCRAFTER:
- case CLASS_FORCETRAINER:
- if (plev > 14)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÀº¿À¤ò½¸Ã椷¤Æ£Í£Ð¤ò²óÉü¤µ¤»¤ë¤³¤È¤¬¤Ç¤¤ë¡£(0 MP)";
-#else
- info[i++] = "You can concentrate to regenerate your mana (cost 0).";
-#endif
- }
- break;
- case CLASS_TOURIST:
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼Ì¿¿¤ò»£±Æ¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(0 MP)";
-#else
- info[i++] = "You can take a photograph (cost 0).";
-#endif
- if (plev > 24)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥¢¥¤¥Æ¥à¤ò´°Á´¤Ë´ÕÄꤹ¤ë¤³¤È¤¬¤Ç¤¤ë¡£(20 MP)";
-#else
- info[i++] = "You can *identify* items (cost 20).";
-#endif
- }
- break;
- case CLASS_IMITATOR:
- if (plev > 29)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï²øʪ¤ÎÆü칶·â¤ò¥À¥á¡¼¥¸2ÇܤǤޤͤ뤳¤È¤¬¤Ç¤¤ë¡£(100 MP)";
-#else
- info[i++] = "You can imitate monster's special attacks with double damage (cost 100).";
-#endif
- }
- break;
- case CLASS_BEASTMASTER:
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï1ÂΤÎÀ¸Ì¿¤Î¤¢¤ë¥â¥ó¥¹¥¿¡¼¤ò»ÙÇÛ¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(¥ì¥Ù¥ë/4 MP)";
-#else
- info[i++] = "You can dominate a monster (cost level/4).";
-#endif
- if (plev > 29)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï»ë³¦Æâ¤ÎÀ¸Ì¿¤Î¤¢¤ë¥â¥ó¥¹¥¿¡¼¤ò»ÙÇÛ¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£((¥ì¥Ù¥ë+20)/2 MP)";
-#else
- info[i++] = "You can dominate living monsters in sight (cost (level+20)/4).";
-#endif
- }
- break;
- case CLASS_MAGIC_EATER:
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¾ó/ËâË¡ËÀ/¥í¥Ã¥É¤ÎËâÎϤò¼«Ê¬¤Î¤â¤Î¤Ë¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can absorb a staff, wand or rod itself.";
-#endif
- break;
- case CLASS_RED_MAGE:
- if (plev > 47)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï1¥¿¡¼¥ó¤Ë2²óËâË¡¤ò¾§¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£(77 MP)";
-#else
- info[i++] = "You can cast two spells in one time (cost 77).";
-#endif
- }
- break;
- case CLASS_SAMURAI:
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÀº¿À¤ò½¸Ã椷¤Æµ¤¹ç¤¤¤òί¤á¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can concentrate to regenerate your mana.";
-#endif
- }
- if (plev > 24)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÆüì¤Ê·¿¤Ç¹½¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can assume a posture of special form.";
-#endif
- }
- break;
- case CLASS_BLUE_MAGE:
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÁê¼ê¤Ë»È¤ï¤ì¤¿ËâË¡¤ò³Ø¤Ö¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can study spells which your enemy casts on you.";
-#endif
- break;
- case CLASS_CAVALRY:
- if (plev > 9)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥â¥ó¥¹¥¿¡¼¤Ë¾è¤Ã¤Æ̵ÍýÌðÍý¥Ú¥Ã¥È¤Ë¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can ride on a hostile monster forcibly to turn it into pet.";
-#endif
- }
- break;
- case CLASS_BERSERKER:
- if (plev > 9)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï³¹¤È¥À¥ó¥¸¥ç¥ó¤Î´Ö¤ò¹Ô¤Í褹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can travel between town and the depths.";
-#endif
- }
- break;
- case CLASS_MIRROR_MASTER:
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¶À¤òºî¤ê½Ð¤¹¤³¤È¤¬¤Ç¤¤ë¡£(2 MP)";
-#else
- info[i++] = "You can create a Mirror (cost 2).";
-#endif
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¶À¤ò³ä¤ë¤³¤È¤¬¤Ç¤¤ë¡£(0 MP)";
-#else
- info[i++] = "You can break distant Mirrors (cost 0).";
-#endif
- break;
- case CLASS_NINJA:
- if (plev > 19)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÁÇÁ᤯°ÜÆ°¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can walk extremery fast.";
-#endif
- }
- break;
- }
-
- if (p_ptr->muta1)
- {
- if (p_ptr->muta1 & MUT1_SPIT_ACID)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï»À¤ò¿á¤¤«¤±¤ë¤³¤È¤¬¤Ç¤¤ë¡£(¥À¥á¡¼¥¸ ¥ì¥Ù¥ëX1)";
-#else
- info[i++] = "You can spit acid (dam lvl).";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_BR_FIRE)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï±ê¤Î¥Ö¥ì¥¹¤òÅǤ¯¤³¤È¤¬¤Ç¤¤ë¡£(¥À¥á¡¼¥¸ ¥ì¥Ù¥ëX2)";
-#else
- info[i++] = "You can breathe fire (dam lvl * 2).";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_HYPN_GAZE)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎâˤߤϺÅ̲¸ú²Ì¤ò¤â¤Ä¡£";
-#else
- info[i++] = "Your gaze is hypnotic.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_TELEKINES)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÇ°Æ°ÎϤò¤â¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are telekinetic.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_VTELEPORT)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼«Ê¬¤Î°Õ»×¤Ç¥Æ¥ì¥Ý¡¼¥È¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can teleport at will.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_MIND_BLST)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÀº¿À¹¶·â¤ò¹Ô¤¨¤ë¡£(¥À¥á¡¼¥¸ 3¡Á12d3)";
-#else
- info[i++] = "You can Mind Blast your enemies (3 to 12d3 dam).";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_RADIATION)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼«Ê¬¤Î°Õ»×¤Ç¶¯¤¤Êü¼ÍÀþ¤òȯÀ¸¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(¥À¥á¡¼¥¸ ¥ì¥Ù¥ëX2)";
-#else
- info[i++] = "You can emit hard radiation at will (dam lvl * 2).";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_VAMPIRISM)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏµÛ·ìµ´¤Î¤è¤¦¤ËŨ¤«¤éÀ¸Ì¿ÎϤòµÛ¼ý¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(¥À¥á¡¼¥¸ ¥ì¥Ù¥ëX2)";
-#else
- info[i++] = "You can drain life from a foe like a vampire (dam lvl * 2).";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_SMELL_MET)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¶á¤¯¤Ë¤¢¤ëµ®¶â°¤ò¤«¤®Ê¬¤±¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can smell nearby precious metal.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_SMELL_MON)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¶á¤¯¤Î¥â¥ó¥¹¥¿¡¼¤Î¸ºß¤ò¤«¤®Ê¬¤±¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can smell nearby monsters.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_BLINK)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ïû¤¤µ÷Î¥¤ò¥Æ¥ì¥Ý¡¼¥È¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can teleport yourself short distances.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_EAT_ROCK)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¹Å¤¤´ä¤ò¿©¤Ù¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can consume solid rock.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_SWAP_POS)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¾¤Î¼Ô¤È¾ì½ê¤òÆþ¤ìÂؤï¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can switch locations with another being.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_SHRIEK)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¿È¤ÎÌÓ¤â¤è¤À¤Ä¶«¤ÓÀ¼¤òȯ¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(¥À¥á¡¼¥¸ ¥ì¥Ù¥ëX2)";
-#else
- info[i++] = "You can emit a horrible shriek (dam 2 * lvl).";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_ILLUMINE)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÌÀ¤ë¤¤¸÷¤òÊü¤Ä¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can emit bright light.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_DET_CURSE)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°¤ÊËâË¡¤Î´í¸±¤ò´¶¤¸¤È¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can feel the danger of evil magic.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_BERSERK)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼«Ê¬¤Î°Õ»×¤Ç¶¸ÍðÀïÆ®¾õÂ֤ˤʤ뤳¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can drive yourself into a berserk frenzy.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_POLYMORPH)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼«Ê¬¤Î°Õ»Ö¤ÇÊѲ½¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can polymorph yourself at will.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_MIDAS_TCH)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÄ̾異¥¤¥Æ¥à¤ò¶â¤ËÊѤ¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can turn ordinary items to gold.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_GROW_MOLD)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼þ°Ï¤Ë¥¥Î¥³¤òÀ¸¤ä¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can cause mold to grow near you.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_RESIST)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¸µÁǤι¶·â¤ËÂФ·¤Æ¿È¤ò¹Å¤¯¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can harden yourself to the ravages of the elements.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_EARTHQUAKE)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼þ°Ï¤Î¥À¥ó¥¸¥ç¥ó¤òÊø²õ¤µ¤»¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can bring down the dungeon around your ears.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_EAT_MAGIC)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏËâË¡¤Î¥¨¥Í¥ë¥®¡¼¤ò¼«Ê¬¤Îʪ¤È¤·¤Æ»ÈÍѤǤ¤ë¡£";
-#else
- info[i++] = "You can consume magic energy for your own use.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_WEIGH_MAG)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼«Ê¬¤Ë±Æ¶Á¤òÍ¿¤¨¤ëËâË¡¤ÎÎϤò´¶¤¸¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can feel the strength of the magics affecting you.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_STERILITY)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï½¸ÃÄŪÀ¸¿£ÉÔǽ¤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can cause mass impotence.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_PANIC_HIT)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¹¶·â¤·¤¿¸å¿È¤ò¼é¤ë¤¿¤áƨ¤²¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can run for your life after hitting something.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_DAZZLE)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ïº®Íð¤ÈÌÕÌܤò°ú¤µ¯¤³¤¹Êü¼Íǽ¤òȯÀ¸¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£ ";
-#else
- info[i++] = "You can emit confusing, blinding radiation.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_LASER_EYE)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÌܤ«¤é¥ì¡¼¥¶¡¼¸÷Àþ¤òȯ¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(¥À¥á¡¼¥¸ ¥ì¥Ù¥ëX2)";
-#else
- info[i++] = "Your eyes can fire laser beams (dam 2 * lvl).";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_RECALL)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï³¹¤È¥À¥ó¥¸¥ç¥ó¤Î´Ö¤ò¹Ô¤Í褹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can travel between town and the depths.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_BANISH)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°¤Ê¥â¥ó¥¹¥¿¡¼¤òÃϹö¤ËÍî¤È¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can send evil creatures directly to Hell.";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_COLD_TOUCH)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏŨ¤ò¿¨¤Ã¤ÆÅà¤é¤»¤ë¤³¤È¤¬¤Ç¤¤ë¡£(¥À¥á¡¼¥¸ ¥ì¥Ù¥ëX3)";
-#else
- info[i++] = "You can freeze things with a touch (dam 3 * lvl).";
-#endif
-
- }
- if (p_ptr->muta1 & MUT1_LAUNCHER)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥¢¥¤¥Æ¥à¤òÎ϶¯¤¯Åꤲ¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can hurl objects with great force.";
-#endif
-
- }
- }
-
- if (p_ptr->muta2)
- {
- if (p_ptr->muta2 & MUT2_BERS_RAGE)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¶¸Àï»Î²½¤Îȯºî¤òµ¯¤³¤¹¡£";
-#else
- info[i++] = "You are subject to berserker fits.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_COWARDICE)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï»þ¡¹²²É¤ˤʤ롣";
-#else
- info[i++] = "You are subject to cowardice.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_RTELEPORT)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥é¥ó¥À¥à¤Ë¥Æ¥ì¥Ý¡¼¥È¤¹¤ë¡£";
-#else
- info[i++] = "You are teleporting randomly.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_ALCOHOL)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÂΤϥ¢¥ë¥³¡¼¥ë¤òʬÈ礹¤ë¡£";
-#else
- info[i++] = "Your body produces alcohol.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_HALLU)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¸¸³Ð¤ò°ú¤µ¯¤³¤¹Àº¿ÀºøÍð¤Ë¿¯¤µ¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You have a hallucinatory insanity.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_FLATULENT)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÀ©¸æ¤Ç¤¤Ê¤¤¶¯Îõ¤ÊÕû¤ò¤³¤¯¡£";
-#else
- info[i++] = "You are subject to uncontrollable flatulence.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_PROD_MANA)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÀ©¸æÉÔǽ¤ÊËâË¡¤Î¥¨¥Í¥ë¥®¡¼¤òȯ¤·¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are producing magical energy uncontrollably.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_ATT_DEMON)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥Ç¡¼¥â¥ó¤ò°ú¤¤Ä¤±¤ë¡£";
-#else
- info[i++] = "You attract demons.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_SCOR_TAIL)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥µ¥½¥ê¤Î¿¬Èø¤¬À¸¤¨¤Æ¤¤¤ë¡£(ÆÇ¡¢¥À¥á¡¼¥¸ 3d7)";
-#else
- info[i++] = "You have a scorpion tail (poison, 3d7).";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_HORNS)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï³Ñ¤¬À¸¤¨¤Æ¤¤¤ë¡£(¥À¥á¡¼¥¸ 2d6)";
-#else
- info[i++] = "You have horns (dam. 2d6).";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_BEAK)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥¯¥Á¥Ð¥·¤¬À¸¤¨¤Æ¤¤¤ë¡£(¥À¥á¡¼¥¸ 2d4)";
-#else
- info[i++] = "You have a beak (dam. 2d4).";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_SPEED_FLUX)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥é¥ó¥À¥à¤ËÁ᤯ư¤¤¤¿¤êÃÙ¤¯Æ°¤¤¤¿¤ê¤¹¤ë¡£";
-#else
- info[i++] = "You move faster or slower randomly.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_BANISH_ALL)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï»þ¡¹¶á¤¯¤Î¥â¥ó¥¹¥¿¡¼¤ò¾ÃÌǤµ¤»¤ë¡£";
-#else
- info[i++] = "You sometimes cause nearby creatures to vanish.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_EAT_LIGHT)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï»þ¡¹¼þ°Ï¤Î¸÷¤òµÛ¼ý¤·¤Æ±ÉÍܤˤ¹¤ë¡£";
-#else
- info[i++] = "You sometimes feed off of the light around you.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_TRUNK)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¾Ý¤Î¤è¤¦¤ÊÉ¡¤ò»ý¤Ã¤Æ¤¤¤ë¡£(¥À¥á¡¼¥¸ 1d4)";
-#else
- info[i++] = "You have an elephantine trunk (dam 1d4).";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_ATT_ANIMAL)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ïưʪ¤ò°ú¤¤Ä¤±¤ë¡£";
-#else
- info[i++] = "You attract animals.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_TENTACLES)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°¤Ê¿¨¼ê¤ò»ý¤Ã¤Æ¤¤¤ë¡£(¥À¥á¡¼¥¸ 2d5)";
-#else
- info[i++] = "You have evil looking tentacles (dam 2d5).";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_RAW_CHAOS)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¤·¤Ð¤·¤Ð½ã¥«¥ª¥¹¤ËÊñ¤Þ¤ì¤ë¡£";
-#else
- info[i++] = "You occasionally are surrounded with raw chaos.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_NORMALITY)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÊÑ°Û¤·¤Æ¤¤¤¿¤¬¡¢²óÉü¤·¤Æ¤¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You may be mutated, but you're recovering.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_WRAITH)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÆùÂΤÏÍ©Â⽤·¤¿¤ê¼ÂÂ⽤·¤¿¤ê¤¹¤ë¡£";
-#else
- info[i++] = "You fade in and out of physical reality.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_POLY_WOUND)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î·ò¹¯¤Ï¥«¥ª¥¹¤ÎÎϤ˱ƶÁ¤ò¼õ¤±¤ë¡£";
-#else
- info[i++] = "Your health is subject to chaotic forces.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_WASTING)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¿ê¼å¤¹¤ë¶²¤í¤·¤¤Éµ¤¤Ë¤«¤«¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You have a horrible wasting disease.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_ATT_DRAGON)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥É¥é¥´¥ó¤ò°ú¤¤Ä¤±¤ë¡£";
-#else
- info[i++] = "You attract dragons.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_WEIRD_MIND)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÀº¿À¤Ï¥é¥ó¥À¥à¤Ë³ÈÂ礷¤¿¤ê½Ì¾®¤·¤¿¤ê¤·¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your mind randomly expands and contracts.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_NAUSEA)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î°ß¤ÏÈó¾ï¤ËÍî¤ÁÃ夤¬¤Ê¤¤¡£";
-#else
- info[i++] = "You have a seriously upset stomach.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_CHAOS_GIFT)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥«¥ª¥¹¤Î¼é¸î°Ë⤫¤éË«Èþ¤ò¤¦¤±¤È¤ë¡£";
-#else
- info[i++] = "Chaos deities give you gifts.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_WALK_SHAD)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¤·¤Ð¤·¤Ð¾¤Î¡Ö±Æ¡×¤Ë̤¤¹þ¤à¡£";
-#else
- info[i++] = "You occasionally stumble into other shadows.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_WARNING)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏŨ¤Ë´Ø¤¹¤ë·Ù¹ð¤ò´¶¤¸¤ë¡£";
-#else
- info[i++] = "You receive warnings about your foes.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_INVULN)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï»þ¡¹É餱ÃΤ餺¤Êµ¤Ê¬¤Ë¤Ê¤ë¡£";
-#else
- info[i++] = "You occasionally feel invincible.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_SP_TO_HP)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï»þ¡¹·ì¤¬¶ÚÆù¤Ë¤É¤Ã¤Èή¤ì¤ë¡£";
-#else
- info[i++] = "Your blood sometimes rushes to your muscles.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_HP_TO_SP)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï»þ¡¹Æ¬¤Ë·ì¤¬¤É¤Ã¤Èή¤ì¤ë¡£";
-#else
- info[i++] = "Your blood sometimes rushes to your head.";
-#endif
-
- }
- if (p_ptr->muta2 & MUT2_DISARM)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¤è¤¯¤Ä¤Þ¤Å¤¤¤Æʪ¤òÍî¤È¤¹¡£";
-#else
- info[i++] = "You occasionally stumble and drop things.";
-#endif
-
- }
- }
-
- if (p_ptr->muta3)
- {
- if (p_ptr->muta3 & MUT3_HYPER_STR)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏĶ¿ÍŪ¤Ë¶¯¤¤¡£(ÏÓÎÏ+4)";
-#else
- info[i++] = "You are superhumanly strong (+4 STR).";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_PUNY)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ïµõ¼å¤À¡£(ÏÓÎÏ-4)";
-#else
- info[i++] = "You are puny (-4 STR).";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_HYPER_INT)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎǾ¤ÏÀ¸ÂÎ¥³¥ó¥Ô¥å¡¼¥¿¤À¡£(ÃÎǽ¡õ¸¤µ+4)";
-#else
- info[i++] = "Your brain is a living computer (+4 INT/WIS).";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_MORONIC)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÀº¿ÀÇö¼å¤À¡£(ÃÎǽ¡õ¸¤µ-4)";
-#else
- info[i++] = "You are moronic (-4 INT/WIS).";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_RESILIENT)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÈó¾ï¤Ë¥¿¥Õ¤À¡£(Âѵ×+4)";
-#else
- info[i++] = "You are very resilient (+4 CON).";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_XTRA_FAT)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¶Ëü¤ËÂÀ¤Ã¤Æ¤¤¤ë¡£(Âѵ×+2,¥¹¥Ô¡¼¥É-2)";
-#else
- info[i++] = "You are extremely fat (+2 CON, -2 speed).";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_ALBINO)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥¢¥ë¥Ó¥Î¤À¡£(Âѵ×-4)";
-#else
- info[i++] = "You are albino (-4 CON).";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_FLESH_ROT)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÆùÂΤÏÉåÇÔ¤·¤Æ¤¤¤ë¡£(Âѵ×-2,Ì¥ÎÏ-1)";
-#else
- info[i++] = "Your flesh is rotting (-2 CON, -1 CHR).";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_SILLY_VOI)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÀ¼¤Ï´ÖÈ´¤±¤Ê¥¡¼¥¡¼À¼¤À¡£(Ì¥ÎÏ-4)";
-#else
- info[i++] = "Your voice is a silly squeak (-4 CHR).";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_BLANK_FAC)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¤Î¤Ã¤Ú¤é¤Ü¤¦¤À¡£(Ì¥ÎÏ-1)";
-#else
- info[i++] = "Your face is featureless (-1 CHR).";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_ILL_NORM)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¸¸±Æ¤Ëʤ¤ï¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your appearance is masked with illusion.";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_XTRA_EYES)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï;ʬ¤ËÆó¤Ä¤ÎÌܤò»ý¤Ã¤Æ¤¤¤ë¡£(õº÷+15)";
-#else
- info[i++] = "You have an extra pair of eyes (+15 search).";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_MAGIC_RES)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏËâË¡¤Ø¤ÎÂÑÀ¤ò¤â¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are resistant to magic.";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_XTRA_NOIS)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÊѤʲ»¤òȯ¤·¤Æ¤¤¤ë¡£(±£Ì©-3)";
-#else
- info[i++] = "You make a lot of strange noise (-3 stealth).";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_INFRAVIS)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÁÇÀ²¤é¤·¤¤ÀÖ³°Àþ»ëÎϤò»ý¤Ã¤Æ¤¤¤ë¡£(+3)";
-#else
- info[i++] = "You have remarkable infravision (+3).";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_XTRA_LEGS)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï;ʬ¤ËÆóËܤΤ¬À¸¤¨¤Æ¤¤¤ë¡£(²Ã®+3)";
-#else
- info[i++] = "You have an extra pair of legs (+3 speed).";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_SHORT_LEG)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î¤Ïû¤¤Æ͵¯¤À¡£(²Ã®-3)";
-#else
- info[i++] = "Your legs are short stubs (-3 speed).";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_ELEC_TOUC)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î·ì´É¤Ë¤ÏÅÅή¤¬Î®¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Electricity is running through your veins.";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_FIRE_BODY)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÂΤϱê¤Ë¤Ä¤Ä¤Þ¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your body is enveloped in flames.";
-#endif
- }
- if (p_ptr->muta3 & MUT3_WART_SKIN)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÈ©¤Ï¥¤¥Ü¤ËÈï¤ï¤ì¤Æ¤¤¤ë¡£(Ì¥ÎÏ-2, AC+5)";
-#else
- info[i++] = "Your skin is covered with warts (-2 CHR, +5 AC).";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_SCALES)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÈ©¤ÏÎڤˤʤäƤ¤¤ë¡£(Ì¥ÎÏ-1, AC+10)";
-#else
- info[i++] = "Your skin has turned into scales (-1 CHR, +10 AC).";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_IRON_SKIN)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÈ©¤ÏÅ´¤Ç¤Ç¤¤Æ¤¤¤ë¡£(´ïÍÑ-1, AC+25)";
-#else
- info[i++] = "Your skin is made of steel (-1 DEX, +25 AC).";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_WINGS)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï±©¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You have wings.";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_FEARLESS)
- {
- /* Unnecessary */
- }
- if (p_ptr->muta3 & MUT3_REGEN)
- {
- /* Unnecessary */
- }
- if (p_ptr->muta3 & MUT3_ESP)
- {
- /* Unnecessary */
- }
- if (p_ptr->muta3 & MUT3_LIMBER)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÂΤÏÈó¾ï¤Ë¤·¤Ê¤ä¤«¤À¡£(´ïÍÑ+3)";
-#else
- info[i++] = "Your body is very limber (+3 DEX).";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_ARTHRITIS)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¤¤¤Ä¤â´ØÀá¤ËÄˤߤò´¶¤¸¤Æ¤¤¤ë¡£(´ïÍÑ-3)";
-#else
- info[i++] = "Your joints ache constantly (-3 DEX).";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_VULN_ELEM)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¸µÁǤι¶·â¤Ë¼å¤¤¡£";
-#else
- info[i++] = "You are susceptible to damage from the elements.";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_MOTION)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÆ°ºî¤ÏÀµ³Î¤ÇÎ϶¯¤¤¡£(±£Ì©+1)";
-#else
- info[i++] = "Your movements are precise and forceful (+1 STL).";
-#endif
-
- }
- if (p_ptr->muta3 & MUT3_GOOD_LUCK)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÇò¤¤¥ª¡¼¥é¤Ë¤Ä¤Ä¤Þ¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "There is a white aura surrounding you.";
-#endif
- }
- if (p_ptr->muta3 & MUT3_BAD_LUCK)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¹õ¤¤¥ª¡¼¥é¤Ë¤Ä¤Ä¤Þ¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "There is a black aura surrounding you.";
-#endif
- }
- }
-
- if (p_ptr->blind)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÌܤ¬¸«¤¨¤Ê¤¤¡£";
-#else
- info[i++] = "You cannot see.";
-#endif
-
- }
- if (p_ptr->confused)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ïº®Í𤷤Ƥ¤¤ë¡£";
-#else
- info[i++] = "You are confused.";
-#endif
-
- }
- if (p_ptr->afraid)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¶²Éݤ˿¯¤µ¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are terrified.";
-#endif
-
- }
- if (p_ptr->cut)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï½Ð·ì¤·¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are bleeding.";
-#endif
-
- }
- if (p_ptr->stun)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¤â¤¦¤í¤¦¤È¤·¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are stunned.";
-#endif
-
- }
- if (p_ptr->poisoned)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÆǤ˿¯¤µ¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are poisoned.";
-#endif
-
- }
- if (p_ptr->image)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¸¸³Ð¤ò¸«¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are hallucinating.";
-#endif
-
- }
- if (p_ptr->cursed & TRC_TY_CURSE)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°¤Ê±åÇ°¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You carry an ancient foul curse.";
-#endif
-
- }
- if (p_ptr->cursed & TRC_AGGRAVATE)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You aggravate monsters.";
-#endif
-
- }
- if (p_ptr->cursed & TRC_DRAIN_EXP)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï·Ð¸³ÃͤòµÛ¤ï¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are drained.";
-#endif
-
- }
- if (p_ptr->cursed & TRC_SLOW_REGEN)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î²óÉüÎϤÏÈó¾ï¤ËÃÙ¤¤¡£";
-#else
- info[i++] = "You regenerate slowly.";
-#endif
-
- }
- if (p_ptr->cursed & TRC_ADD_L_CURSE)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î¼å¤¤¼ö¤¤¤ÏÁý¤¨¤ë¡£"; /* »ÃÄêŪ -- henkma */
-#else
- info[i++] = "Your weak curses multiply.";
-#endif
-
- }
- if (p_ptr->cursed & TRC_ADD_H_CURSE)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î¶¯¤¤¼ö¤¤¤ÏÁý¤¨¤ë¡£"; /* »ÃÄêŪ -- henkma */
-#else
- info[i++] = "Your heavy curses multiply.";
-#endif
-
- }
- if (p_ptr->cursed & TRC_CALL_ANIMAL)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ïưʪ¤ËÁÀ¤ï¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You attract animals.";
-#endif
-
- }
- if (p_ptr->cursed & TRC_CALL_DEMON)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï°Ëâ¤ËÁÀ¤ï¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You attract demons.";
-#endif
-
- }
- if (p_ptr->cursed & TRC_CALL_DRAGON)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥É¥é¥´¥ó¤ËÁÀ¤ï¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You attract dragons.";
-#endif
-
- }
- if (p_ptr->cursed & TRC_COWARDICE)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï»þ¡¹²²É¤ˤʤ롣";
-#else
- info[i++] = "You are subject to cowardice.";
-#endif
-
- }
- if (p_ptr->cursed & TRC_TELEPORT)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î°ÌÃ֤ϤҤ¸¤ç¤¦¤ËÉÔ°ÂÄê¤À¡£";
-#else
- info[i++] = "Your position is very uncertain.";
-#endif
-
- }
- if (p_ptr->cursed & TRC_LOW_MELEE)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
-#else
- info[i++] = "Your weapon causes you to miss blows.";
-#endif
-
- }
- if (p_ptr->cursed & TRC_LOW_AC)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
-#else
- info[i++] = "You are subject to be hit.";
-#endif
-
- }
- if (p_ptr->cursed & TRC_LOW_MAGIC)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏËâË¡¤ò¼ºÇÔ¤·¤ä¤¹¤¤¡£";
-#else
- info[i++] = "You are subject to fail spellcasting.";
-#endif
-
- }
- if (p_ptr->cursed & TRC_FAST_DIGEST)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¤¹¤°¤ªÊ¢¤¬¤Ø¤ë¡£";
-#else
- info[i++] = "You have a good appetite.";
-#endif
-
- }
- if (p_ptr->cursed & TRC_DRAIN_HP)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÂÎÎϤòµÛ¤ï¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are drained.";
-#endif
-
- }
- if (p_ptr->cursed & TRC_DRAIN_MANA)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏËâÎϤòµÛ¤ï¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You brain is drained.";
-#endif
-
- }
- if (IS_BLESSED())
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¸øÀµ¤µ¤ò´¶¤¸¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You feel rightous.";
-#endif
-
- }
- if (IS_HERO())
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥Ò¡¼¥í¡¼µ¤Ê¬¤À¡£";
-#else
- info[i++] = "You feel heroic.";
-#endif
-
- }
- if (p_ptr->shero)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÀïÆ®¶¸¤À¡£";
-#else
- info[i++] = "You are in a battle rage.";
-#endif
-
- }
- if (p_ptr->protevil)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°¤Ê¤ë¸ºß¤«¤é¼é¤é¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are protected from evil.";
-#endif
-
- }
- if (p_ptr->shield)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¿ÀÈë¤Î¥·¡¼¥ë¥É¤Ç¼é¤é¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are protected by a mystic shield.";
-#endif
-
- }
- if (IS_INVULN())
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¸½ºß½ý¤Ä¤«¤Ê¤¤¡£";
-#else
- info[i++] = "You are temporarily invulnerable.";
-#endif
-
- }
- if (p_ptr->wraith_form)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï°ì»þŪ¤ËÍ©Â⽤·¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are temporarily incorporeal.";
-#endif
-
- }
- if (p_ptr->special_attack & ATTACK_CONFUSE)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤ÏÀÖ¤¯µ±¤¤¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your hands are glowing dull red.";
-#endif
-
- }
- if (p_ptr->special_attack & ATTACK_FIRE)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤Ï²Ð±ê¤Ëʤ¤ï¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You can strike the enemy with flame.";
-#endif
-
- }
- if (p_ptr->special_attack & ATTACK_COLD)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤ÏÎ䵤¤Ëʤ¤ï¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You can strike the enemy with cold.";
-#endif
-
- }
- if (p_ptr->special_attack & ATTACK_ACID)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤Ï»À¤Ëʤ¤ï¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You can strike the enemy with acid.";
-#endif
-
- }
- if (p_ptr->special_attack & ATTACK_ELEC)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤ÏÅÅ·â¤Ëʤ¤ï¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You can strike the enemy with electoric shock.";
-#endif
-
- }
- if (p_ptr->special_attack & ATTACK_POIS)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤ÏÆǤËʤ¤ï¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You can strike the enemy with poison.";
-#endif
-
- }
- switch (p_ptr->action)
- {
- case ACTION_SEARCH:
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¤Ò¤¸¤ç¤¦¤ËÃí°Õ¿¼¤¯¼þ°Ï¤ò¸«ÅϤ·¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are looking around very carefully.";
-#endif
- break;
- }
- if (p_ptr->new_spells)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼öʸ¤äµ§¤ê¤ò³Ø¤Ö¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can learn some spells/prayers.";
-#endif
-
- }
- if (p_ptr->word_recall)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¤¹¤°¤Ëµ¢´Ô¤¹¤ë¤À¤í¤¦¡£";
-#else
- info[i++] = "You will soon be recalled.";
-#endif
-
- }
- if (p_ptr->alter_reality)
- {
-#ifdef JP
- info[i++] = "¤¢¤Ê¤¿¤Ï¤¹¤°¤Ë¤³¤ÎÀ¤³¦¤òÎ¥¤ì¤ë¤À¤í¤¦¡£";
-#else
- info[i++] = "You will soon be altered.";
-#endif
-
- }
- if (p_ptr->see_infra)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÆ·¤ÏÀÖ³°Àþ¤ËÉÒ´¶¤Ç¤¢¤ë¡£";
-#else
- info[i++] = "Your eyes are sensitive to infrared light.";
-#endif
-
- }
- if (p_ptr->see_inv)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can see invisible creatures.";
-#endif
-
- }
- if (p_ptr->levitation)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÈô¤Ö¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can fly.";
-#endif
-
- }
- if (p_ptr->free_act)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏËãáãÃΤ餺¤Î¸ú²Ì¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You have free action.";
-#endif
-
- }
- if (p_ptr->regenerate)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÁÇÁ᤯ÂÎÎϤò²óÉü¤¹¤ë¡£";
-#else
- info[i++] = "You regenerate quickly.";
-#endif
-
- }
- if (p_ptr->slow_digest)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¿©Íߤ¬¾¯¤Ê¤¤¡£";
-#else
- info[i++] = "Your appetite is small.";
-#endif
-
- }
- if (p_ptr->telepathy)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You have ESP.";
-#endif
-
- }
- if (p_ptr->esp_animal)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼«Á³³¦¤ÎÀ¸Êª¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You sense natural creatures.";
-#endif
-
- }
- if (p_ptr->esp_undead)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥¢¥ó¥Ç¥Ã¥É¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You sense undead.";
-#endif
-
- }
- if (p_ptr->esp_demon)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï°Ëâ¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You sense demons.";
-#endif
-
- }
- if (p_ptr->esp_orc)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥ª¡¼¥¯¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You sense orcs.";
-#endif
-
- }
- if (p_ptr->esp_troll)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥È¥í¥ë¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You sense trolls.";
-#endif
-
- }
- if (p_ptr->esp_giant)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ïµð¿Í¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You sense giants.";
-#endif
-
- }
- if (p_ptr->esp_dragon)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥É¥é¥´¥ó¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You sense dragons.";
-#endif
-
- }
- if (p_ptr->esp_human)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¿Í´Ö¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You sense humans.";
-#endif
-
- }
- if (p_ptr->esp_evil)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°¤ÊÀ¸¤Êª¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You sense evil creatures.";
-#endif
-
- }
- if (p_ptr->esp_good)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÁ±ÎɤÊÀ¸¤Êª¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You sense good creatures.";
-#endif
-
- }
- if (p_ptr->esp_nonliving)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤθºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You sense non-living creatures.";
-#endif
-
- }
- if (p_ptr->esp_unique)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÆÃÊ̤ʶ¯Å¨¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You sense unique monsters.";
-#endif
-
- }
- if (p_ptr->hold_life)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼«¸Ê¤ÎÀ¸Ì¿ÎϤò¤·¤Ã¤«¤ê¤È°Ý»ý¤¹¤ë¡£";
-#else
- info[i++] = "You have a firm hold on your life force.";
-#endif
-
- }
- if (p_ptr->reflect)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
-#else
- info[i++] = "You reflect arrows and bolts.";
-#endif
-
- }
- if (p_ptr->sh_fire)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï±ê¤Î¥ª¡¼¥é¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are surrounded with a fiery aura.";
-#endif
-
- }
- if (p_ptr->sh_elec)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÅŵ¤¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are surrounded with electricity.";
-#endif
-
- }
- if (p_ptr->sh_cold)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÎ䵤¤Î¥ª¡¼¥é¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are surrounded with an aura of coldness.";
-#endif
-
- }
- if (p_ptr->tim_sh_holy)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÀ»¤Ê¤ë¥ª¡¼¥é¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are surrounded with a holy aura.";
-#endif
-
- }
- if (p_ptr->tim_sh_touki)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÆ®µ¤¤Î¥ª¡¼¥é¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are surrounded with a energy aura.";
-#endif
-
- }
- if (p_ptr->anti_magic)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÈ¿ËâË¡¥·¡¼¥ë¥É¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are surrounded by an anti-magic shell.";
-#endif
-
- }
- if (p_ptr->anti_tele)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥Æ¥ì¥Ý¡¼¥È¤Ç¤¤Ê¤¤¡£";
-#else
- info[i++] = "You cannot teleport.";
-#endif
-
- }
- if (p_ptr->lite)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î¿ÈÂΤϸ÷¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are carrying a permanent light.";
-#endif
-
- }
- if (p_ptr->warning)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¹ÔÆ°¤ÎÁ°¤Ë´í¸±¤ò»¡ÃΤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You will be warned before dangerous actions.";
-#endif
-
- }
- if (p_ptr->dec_mana)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¾¯¤Ê¤¤¾ÃÈñËâÎϤÇËâË¡¤ò¾§¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can cast spells with fewer mana points.";
-#endif
-
- }
- if (p_ptr->easy_spell)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÄ㤤¼ºÇÔΨ¤ÇËâË¡¤ò¾§¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "Fail rate of your magic is decreased.";
-#endif
-
- }
- if (p_ptr->heavy_spell)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¹â¤¤¼ºÇÔΨ¤ÇËâË¡¤ò¾§¤¨¤Ê¤±¤ì¤Ð¤¤¤±¤Ê¤¤¡£";
-#else
- info[i++] = "Fail rate of your magic is increased.";
-#endif
-
- }
- if (p_ptr->mighty_throw)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¶¯¤¯Êª¤òÅꤲ¤ë¡£";
-#else
- info[i++] = "You can throw objects powerfully.";
-#endif
-
- }
-
- if (p_ptr->immune_acid)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï»À¤ËÂФ¹¤ë´°Á´¤Ê¤ëÌȱ֤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are completely immune to acid.";
-#endif
-
- }
- else if (p_ptr->resist_acid && IS_OPPOSE_ACID())
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï»À¤Ø¤Î¶¯ÎϤÊÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You resist acid exceptionally well.";
-#endif
-
- }
- else if (p_ptr->resist_acid || IS_OPPOSE_ACID())
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï»À¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are resistant to acid.";
-#endif
-
- }
-
- if (p_ptr->immune_elec)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤Ê¤ëÌȱ֤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are completely immune to lightning.";
-#endif
-
- }
- else if (p_ptr->resist_elec && IS_OPPOSE_ELEC())
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÅÅ·â¤Ø¤Î¶¯ÎϤÊÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You resist lightning exceptionally well.";
-#endif
-
- }
- else if (p_ptr->resist_elec || IS_OPPOSE_ELEC())
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are resistant to lightning.";
-#endif
-
- }
-
- if (prace_is_(RACE_ANDROID) && !p_ptr->immune_elec)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÅÅ·â¤Ë¼å¤¤¡£";
-#else
- info[i++] = "You are susceptible to damage from lightning.";
-#endif
-
- }
-
- if (p_ptr->immune_fire)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤Ê¤ëÌȱ֤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are completely immune to fire.";
-#endif
-
- }
- else if (p_ptr->resist_fire && IS_OPPOSE_FIRE())
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï²Ð¤Ø¤Î¶¯ÎϤÊÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You resist fire exceptionally well.";
-#endif
-
- }
- else if (p_ptr->resist_fire || IS_OPPOSE_FIRE())
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are resistant to fire.";
-#endif
-
- }
-
- if (prace_is_(RACE_ENT) && !p_ptr->immune_fire)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï²Ð¤Ë¼å¤¤¡£";
-#else
- info[i++] = "You are susceptible to damage from fire.";
-#endif
-
- }
-
- if (p_ptr->immune_cold)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÎ䵤¤ËÂФ¹¤ë´°Á´¤Ê¤ëÌȱ֤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are completely immune to cold.";
-#endif
-
- }
- else if (p_ptr->resist_cold && IS_OPPOSE_COLD())
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÎ䵤¤Ø¤Î¶¯ÎϤÊÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You resist cold exceptionally well.";
-#endif
-
- }
- else if (p_ptr->resist_cold || IS_OPPOSE_COLD())
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÎ䵤¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are resistant to cold.";
-#endif
-
- }
-
- if (p_ptr->resist_pois && IS_OPPOSE_POIS())
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÆǤؤζ¯ÎϤÊÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You resist poison exceptionally well.";
-#endif
-
- }
- else if (p_ptr->resist_pois || IS_OPPOSE_POIS())
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÆǤؤÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are resistant to poison.";
-#endif
-
- }
-
- if (p_ptr->resist_lite)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are resistant to bright light.";
-#endif
-
- }
-
- if (prace_is_(RACE_VAMPIRE) || prace_is_(RACE_S_FAIRY) || (p_ptr->mimic_form == MIMIC_VAMPIRE))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÁ®¸÷¤Ë¼å¤¤¡£";
-#else
- info[i++] = "You are susceptible to damage from bright light.";
-#endif
-
- }
-
- if (prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE) || p_ptr->wraith_form)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï°Å¹õ¤ËÂФ¹¤ë´°Á´¤Ê¤ëÌȱ֤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are completely immune to darkness.";
-#endif
- }
-
- else if (p_ptr->resist_dark)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are resistant to darkness.";
-#endif
-
- }
- if (p_ptr->resist_conf)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are resistant to confusion.";
-#endif
-
- }
- if (p_ptr->resist_sound)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï²»ÇȤξ׷â¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are resistant to sonic attacks.";
-#endif
-
- }
- if (p_ptr->resist_disen)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are resistant to disenchantment.";
-#endif
-
- }
- if (p_ptr->resist_chaos)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥«¥ª¥¹¤ÎÎϤؤÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are resistant to chaos.";
-#endif
-
- }
- if (p_ptr->resist_shard)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÇËÊҤι¶·â¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are resistant to blasts of shards.";
-#endif
-
- }
- if (p_ptr->resist_nexus)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï°ø²Ìº®Íð¤Î¹¶·â¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are resistant to nexus attacks.";
-#endif
-
- }
-
- if (prace_is_(RACE_SPECTRE))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÃϹö¤ÎÎϤòµÛ¼ý¤Ç¤¤ë¡£";
-#else
- info[i++] = "You can drain nether forces.";
-#endif
-
- }
- else if (p_ptr->resist_neth)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÃϹö¤ÎÎϤؤÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are resistant to nether forces.";
-#endif
-
- }
- if (p_ptr->resist_fear)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÁ´¤¯¶²Éݤò´¶¤¸¤Ê¤¤¡£";
-#else
- info[i++] = "You are completely fearless.";
-#endif
-
- }
- if (p_ptr->resist_blind)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÌܤÏÌÕÌܤؤÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your eyes are resistant to blindness.";
-#endif
-
- }
- if (p_ptr->resist_time)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï»þ´ÖµÕž¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are resistant to time.";
-#endif
-
- }
-
- if (p_ptr->sustain_str)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÏÓÎϤϰݻý¤µ¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your strength is sustained.";
-#endif
-
- }
- if (p_ptr->sustain_int)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÃÎǽ¤Ï°Ý»ý¤µ¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your intelligence is sustained.";
-#endif
-
- }
- if (p_ptr->sustain_wis)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î¸¤µ¤Ï°Ý»ý¤µ¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your wisdom is sustained.";
-#endif
-
- }
- if (p_ptr->sustain_con)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÂѵ×ÎϤϰݻý¤µ¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your constitution is sustained.";
-#endif
-
- }
- if (p_ptr->sustain_dex)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î´ïÍѤµ¤Ï°Ý»ý¤µ¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your dexterity is sustained.";
-#endif
-
- }
- if (p_ptr->sustain_chr)
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÌ¥ÎϤϰݻý¤µ¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your charisma is sustained.";
-#endif
-
- }
-
- if (have_flag(flgs, TR_STR))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÏÓÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your strength is affected by your equipment.";
-#endif
-
- }
- if (have_flag(flgs, TR_INT))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÃÎǽ¤ÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your intelligence is affected by your equipment.";
-#endif
-
- }
- if (have_flag(flgs, TR_WIS))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î¸¤µ¤ÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your wisdom is affected by your equipment.";
-#endif
-
- }
- if (have_flag(flgs, TR_DEX))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î´ïÍѤµ¤ÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your dexterity is affected by your equipment.";
-#endif
-
- }
- if (have_flag(flgs, TR_CON))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÂѵ×ÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your constitution is affected by your equipment.";
-#endif
-
- }
- if (have_flag(flgs, TR_CHR))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÌ¥ÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your charisma is affected by your equipment.";
-#endif
-
- }
-
- if (have_flag(flgs, TR_STEALTH))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î±£Ì©¹ÔưǽÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your stealth is affected by your equipment.";
-#endif
-
- }
- if (have_flag(flgs, TR_SEARCH))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Îõº÷ǽÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your searching ability is affected by your equipment.";
-#endif
-
- }
- if (have_flag(flgs, TR_INFRA))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÀÖ³°Àþ»ëÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your infravision is affected by your equipment.";
-#endif
-
- }
- if (have_flag(flgs, TR_TUNNEL))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎºÎ·¡Ç½ÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your digging ability is affected by your equipment.";
-#endif
-
- }
- if (have_flag(flgs, TR_SPEED))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î¥¹¥Ô¡¼¥É¤ÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your speed is affected by your equipment.";
-#endif
-
- }
- if (have_flag(flgs, TR_BLOWS))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î¹¶·â®ÅÙ¤ÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your attack speed is affected by your equipment.";
-#endif
-
- }
-
-
- /* Access the current weapon */
- o_ptr = &inventory[INVEN_RARM];
-
- /* Analyze the weapon */
- if (o_ptr->k_idx)
- {
- /* Indicate Blessing */
- if (have_flag(flgs, TR_BLESSED))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¿À¤Î½ËÊ¡¤ò¼õ¤±¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your weapon has been blessed by the gods.";
-#endif
-
- }
-
- if (have_flag(flgs, TR_CHAOTIC))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥í¥°¥ë¥¹¤Îħ¤Î°À¤ò¤â¤Ä¡£";
-#else
- info[i++] = "Your weapon is branded with the Sign of Logrus.";
-#endif
-
- }
-
- /* Hack */
- if (have_flag(flgs, TR_IMPACT))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏÂÇ·â¤ÇÃϿ̤òȯÀ¸¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
-#else
- info[i++] = "The impact of your weapon can cause earthquakes.";
-#endif
-
- }
-
- if (have_flag(flgs, TR_VORPAL))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏÈó¾ï¤Ë±Ô¤¤¡£";
-#else
- info[i++] = "Your weapon is very sharp.";
-#endif
-
- }
-
- if (have_flag(flgs, TR_VAMPIRIC))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤«¤éÀ¸Ì¿ÎϤòµÛ¼ý¤¹¤ë¡£";
-#else
- info[i++] = "Your weapon drains life from your foes.";
-#endif
-
- }
-
- /* Special "Attack Bonuses" */
- if (have_flag(flgs, TR_BRAND_ACID))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤òÍϤ«¤¹¡£";
-#else
- info[i++] = "Your weapon melts your foes.";
-#endif
-
- }
- if (have_flag(flgs, TR_BRAND_ELEC))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤ò´¶ÅŤµ¤»¤ë¡£";
-#else
- info[i++] = "Your weapon shocks your foes.";
-#endif
-
- }
- if (have_flag(flgs, TR_BRAND_FIRE))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤òdz¤ä¤¹¡£";
-#else
- info[i++] = "Your weapon burns your foes.";
-#endif
-
- }
- if (have_flag(flgs, TR_BRAND_COLD))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤òÅà¤é¤»¤ë¡£";
-#else
- info[i++] = "Your weapon freezes your foes.";
-#endif
-
- }
- if (have_flag(flgs, TR_BRAND_POIS))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤òÆǤǿ¯¤¹¡£";
-#else
- info[i++] = "Your weapon poisons your foes.";
-#endif
-
- }
-
- /* Special "slay" flags */
- if (have_flag(flgs, TR_KILL_ANIMAL))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ïưʪ¤ÎŷŨ¤Ç¤¢¤ë¡£";
-#else
- info[i++] = "Your weapon is a great bane of animals.";
-#endif
-
- }
- else if (have_flag(flgs, TR_SLAY_ANIMAL))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ïưʪ¤ËÂФ·¤Æ¶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
-#else
- info[i++] = "Your weapon strikes at animals with extra force.";
-#endif
-
- }
- if (have_flag(flgs, TR_KILL_EVIL))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¼Ù°¤Ê¤ë¸ºß¤ÎŷŨ¤Ç¤¢¤ë¡£";
-#else
- info[i++] = "Your weapon is a great bane of evil.";
-#endif
-
- }
- else if (have_flag(flgs, TR_SLAY_EVIL))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤Æ¶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
-#else
- info[i++] = "Your weapon strikes at evil with extra force.";
-#endif
-
- }
- if (have_flag(flgs, TR_KILL_HUMAN))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¿Í´Ö¤ÎŷŨ¤Ç¤¢¤ë¡£";
-#else
- info[i++] = "Your weapon is a great bane of humans.";
-#endif
-
- }
- else if (have_flag(flgs, TR_SLAY_HUMAN))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
-#else
- info[i++] = "Your weapon is especially deadly against humans.";
-#endif
-
- }
- if (have_flag(flgs, TR_KILL_UNDEAD))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥¢¥ó¥Ç¥Ã¥É¤ÎŷŨ¤Ç¤¢¤ë¡£";
-#else
- info[i++] = "Your weapon is a great bane of undead.";
-#endif
-
- }
- else if (have_flag(flgs, TR_SLAY_UNDEAD))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤Æ¿ÀÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
-#else
- info[i++] = "Your weapon strikes at undead with holy wrath.";
-#endif
-
- }
- if (have_flag(flgs, TR_KILL_DEMON))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥Ç¡¼¥â¥ó¤ÎŷŨ¤Ç¤¢¤ë¡£";
-#else
- info[i++] = "Your weapon is a great bane of demons.";
-#endif
-
- }
- else if (have_flag(flgs, TR_SLAY_DEMON))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤Æ¿ÀÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
-#else
- info[i++] = "Your weapon strikes at demons with holy wrath.";
-#endif
-
- }
- if (have_flag(flgs, TR_KILL_ORC))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥ª¡¼¥¯¤ÎŷŨ¤Ç¤¢¤ë¡£";
-#else
- info[i++] = "Your weapon is a great bane of orcs.";
-#endif
-
- }
- else if (have_flag(flgs, TR_SLAY_ORC))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
-#else
- info[i++] = "Your weapon is especially deadly against orcs.";
-#endif
-
- }
- if (have_flag(flgs, TR_KILL_TROLL))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥È¥í¥ë¤ÎŷŨ¤Ç¤¢¤ë¡£";
-#else
- info[i++] = "Your weapon is a great bane of trolls.";
-#endif
-
- }
- else if (have_flag(flgs, TR_SLAY_TROLL))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
-#else
- info[i++] = "Your weapon is especially deadly against trolls.";
-#endif
-
- }
- if (have_flag(flgs, TR_KILL_GIANT))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ÎŷŨ¤Ç¤¢¤ë¡£";
-#else
- info[i++] = "Your weapon is a great bane of giants.";
-#endif
-
- }
- else if (have_flag(flgs, TR_SLAY_GIANT))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
-#else
- info[i++] = "Your weapon is especially deadly against giants.";
-#endif
-
- }
- /* Special "kill" flags */
- if (have_flag(flgs, TR_KILL_DRAGON))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥É¥é¥´¥ó¤ÎŷŨ¤Ç¤¢¤ë¡£";
-#else
- info[i++] = "Your weapon is a great bane of dragons.";
-#endif
-
- }
- else if (have_flag(flgs, TR_SLAY_DRAGON))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
-#else
- info[i++] = "Your weapon is especially deadly against dragons.";
-#endif
-
- }
-
- if (have_flag(flgs, TR_FORCE_WEAPON))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏMP¤ò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
-#else
- info[i++] = "Your weapon causes greate damages using your MP.";
-#endif
-
- }
- if (have_flag(flgs, TR_THROW))
- {
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏÅꤲ¤ä¤¹¤¤¡£";
-#else
- info[i++] = "Your weapon can be thrown well.";
-#endif
- }
- }
-
-
- /* Save the screen */
- screen_save();
-
- /* Erase the screen */
- for (k = 1; k < 24; k++) prt("", k, 13);
-
- /* Label the information */
-#ifdef JP
-prt(" ¤¢¤Ê¤¿¤Î¾õÂÖ:", 1, 15);
-#else
- prt(" Your Attributes:", 1, 15);
-#endif
-
-
- /* We will print on top of the map (column 13) */
- for (k = 2, j = 0; j < i; j++)
- {
- /* Show the info */
- prt(info[j], k++, 15);
-
- /* Every 20 entries (lines 2 to 21), start over */
- if ((k == 22) && (j+1 < i))
- {
-#ifdef JP
-prt("-- ³¤¯ --", k, 15);
-#else
- prt("-- more --", k, 15);
-#endif
-
- inkey();
- for (; k > 2; k--) prt("", k, 15);
- }
- }
-
- /* Pause */
-#ifdef JP
-prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 13);
-#else
- prt("[Press any key to continue]", k, 13);
-#endif
-
- inkey();
-
- /* Restore the screen */
- screen_load();
-}
-
-
-static int report_magics_aux(int dur)
-{
- if (dur <= 5)
- {
- return 0;
- }
- else if (dur <= 10)
- {
- return 1;
- }
- else if (dur <= 20)
- {
- return 2;
- }
- else if (dur <= 50)
- {
- return 3;
- }
- else if (dur <= 100)
- {
- return 4;
- }
- else if (dur <= 200)
- {
- return 5;
- }
- else
- {
- return 6;
- }
-}
-
-static cptr report_magic_durations[] =
-{
-#ifdef JP
-"¤´¤¯Ã»¤¤´Ö",
-"¾¯¤·¤Î´Ö",
-"¤·¤Ð¤é¤¯¤Î´Ö",
-"¿¾¯Ä¹¤¤´Ö",
-"Ť¤´Ö",
-"Èó¾ï¤ËŤ¤´Ö",
-"¿®¤¸Æñ¤¤¤Û¤ÉŤ¤´Ö",
-"¥â¥ó¥¹¥¿¡¼¤ò¹¶·â¤¹¤ë¤Þ¤Ç"
-#else
- "for a short time",
- "for a little while",
- "for a while",
- "for a long while",
- "for a long time",
- "for a very long time",
- "for an incredibly long time",
- "until you hit a monster"
-#endif
-
-};
-
-
-/*
- * Report all currently active magical effects.
- */
-void report_magics(void)
-{
- int i = 0, j, k;
- char Dummy[80];
- cptr info[128];
- int info2[128];
-
-
- if (p_ptr->blind)
- {
- info2[i] = report_magics_aux(p_ptr->blind);
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÌܤ¬¸«¤¨¤Ê¤¤¡£";
-#else
- info[i++] = "You cannot see";
-#endif
-
- }
- if (p_ptr->confused)
- {
- info2[i] = report_magics_aux(p_ptr->confused);
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ïº®Í𤷤Ƥ¤¤ë¡£";
-#else
- info[i++] = "You are confused";
-#endif
-
- }
- if (p_ptr->afraid)
- {
- info2[i] = report_magics_aux(p_ptr->afraid);
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¶²Éݤ˿¯¤µ¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are terrified";
-#endif
-
- }
- if (p_ptr->poisoned)
- {
- info2[i] = report_magics_aux(p_ptr->poisoned);
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÆǤ˿¯¤µ¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are poisoned";
-#endif
-
- }
- if (p_ptr->image)
- {
- info2[i] = report_magics_aux(p_ptr->image);
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¸¸³Ð¤ò¸«¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are hallucinating";
-#endif
-
- }
- if (p_ptr->blessed)
- {
- info2[i] = report_magics_aux(p_ptr->blessed);
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¸øÀµ¤µ¤ò´¶¤¸¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You feel rightous";
-#endif
-
- }
- if (p_ptr->hero)
- {
- info2[i] = report_magics_aux(p_ptr->hero);
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¥Ò¡¼¥í¡¼µ¤Ê¬¤À¡£";
-#else
- info[i++] = "You feel heroic";
-#endif
-
- }
- if (p_ptr->shero)
- {
- info2[i] = report_magics_aux(p_ptr->shero);
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÀïÆ®¶¸¤À¡£";
-#else
- info[i++] = "You are in a battle rage";
-#endif
-
- }
- if (p_ptr->protevil)
- {
- info2[i] = report_magics_aux(p_ptr->protevil);
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°¤Ê¤ë¸ºß¤«¤é¼é¤é¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are protected from evil";
-#endif
-
- }
- if (p_ptr->shield)
- {
- info2[i] = report_magics_aux(p_ptr->shield);
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï¿ÀÈë¤Î¥·¡¼¥ë¥É¤Ç¼é¤é¤ì¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are protected by a mystic shield";
-#endif
-
- }
- if (p_ptr->invuln)
- {
- info2[i] = report_magics_aux(p_ptr->invuln);
-#ifdef JP
-info[i++] = "̵Ũ¤Ç¤¤¤é¤ì¤ë¡£";
-#else
- info[i++] = "You are invulnerable";
-#endif
-
- }
- if (p_ptr->wraith_form)
- {
- info2[i] = report_magics_aux(p_ptr->wraith_form);
-#ifdef JP
-info[i++] = "Í©Âβ½¤Ç¤¤ë¡£";
-#else
- info[i++] = "You are incorporeal";
-#endif
-
- }
- if (p_ptr->special_attack & ATTACK_CONFUSE)
- {
- info2[i] = 7;
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤ÏÀÖ¤¯µ±¤¤¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "Your hands are glowing dull red.";
-#endif
-
- }
- if (p_ptr->word_recall)
- {
- info2[i] = report_magics_aux(p_ptr->word_recall);
-#ifdef JP
- info[i++] = "¤³¤Î¸åµ¢´Ô¤Î¾Û¤òȯư¤¹¤ë¡£";
-#else
- info[i++] = "You are waiting to be recalled";
-#endif
-
- }
- if (p_ptr->alter_reality)
- {
- info2[i] = report_magics_aux(p_ptr->alter_reality);
-#ifdef JP
- info[i++] = "¤³¤Î¸å¸½¼ÂÊÑÍƤ¬È¯Æ°¤¹¤ë¡£";
-#else
- info[i++] = "You waiting to be altered";
-#endif
-
- }
- if (p_ptr->oppose_acid)
- {
- info2[i] = report_magics_aux(p_ptr->oppose_acid);
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï»À¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are resistant to acid";
-#endif
-
- }
- if (p_ptr->oppose_elec)
- {
- info2[i] = report_magics_aux(p_ptr->oppose_elec);
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are resistant to lightning";
-#endif
-
- }
- if (p_ptr->oppose_fire)
- {
- info2[i] = report_magics_aux(p_ptr->oppose_fire);
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are resistant to fire";
-#endif
-
- }
- if (p_ptr->oppose_cold)
- {
- info2[i] = report_magics_aux(p_ptr->oppose_cold);
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÎ䵤¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are resistant to cold";
-#endif
-
- }
- if (p_ptr->oppose_pois)
- {
- info2[i] = report_magics_aux(p_ptr->oppose_pois);
-#ifdef JP
-info[i++] = "¤¢¤Ê¤¿¤ÏÆǤؤÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
-#else
- info[i++] = "You are resistant to poison";
-#endif
-
- }
-
- /* Save the screen */
- screen_save();
-
- /* Erase the screen */
- for (k = 1; k < 24; k++) prt("", k, 13);
-
- /* Label the information */
-#ifdef JP
-prt(" ËâË¡ :", 1, 15);
-#else
- prt(" Your Current Magic:", 1, 15);
-#endif
-
-
- /* We will print on top of the map (column 13) */
- for (k = 2, j = 0; j < i; j++)
- {
- /* Show the info */
-#ifdef JP
-sprintf(Dummy, "¤¢¤Ê¤¿¤Ï%s%s", info[j],
-#else
- sprintf(Dummy, "%s %s.", info[j],
-#endif
-
- report_magic_durations[info2[j]]);
- prt(Dummy, k++, 15);
-
- /* Every 20 entries (lines 2 to 21), start over */
- if ((k == 22) && (j + 1 < i))
- {
-#ifdef JP
-prt("-- ³¤¯ --", k, 15);
-#else
- prt("-- more --", k, 15);
-#endif
-
- inkey();
- for (; k > 2; k--) prt("", k, 15);
- }
- }
-
- /* Pause */
-#ifdef JP
-prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 13);
-#else
- prt("[Press any key to continue]", k, 13);
-#endif
-
- inkey();
-
- /* Restore the screen */
- screen_load();
-}
-
-
-static bool detect_feat_flag(int range, int flag, bool known)
-{
- int x, y;
- bool detect = FALSE;
- cave_type *c_ptr;
-
- if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
-
- /* Scan the current panel */
- for (y = 1; y < cur_hgt - 1; y++)
- {
- for (x = 1; x <= cur_wid - 1; x++)
- {
- int dist = distance(py, px, y, x);
- if (dist > range) continue;
-
- /* Access the grid */
- c_ptr = &cave[y][x];
-
- /* Hack -- Safe */
- if (flag == FF_TRAP)
- {
- /* Mark as detected */
- if (dist <= range && known)
- {
- if (dist <= range - 1) c_ptr->info |= (CAVE_IN_DETECT);
-
- c_ptr->info &= ~(CAVE_UNSAFE);
-
- /* Redraw */
- lite_spot(y, x);
- }
- }
-
- /* Detect flags */
- if (cave_have_flag_grid(c_ptr, flag))
- {
- /* Detect secrets */
- disclose_grid(y, x);
-
- /* Hack -- Memorize */
- c_ptr->info |= (CAVE_MARK);
-
- /* Redraw */
- lite_spot(y, x);
-
- /* Obvious */
- detect = TRUE;
- }
- }
- }
-
- /* Result */
- return detect;
-}
-
-
-/*
- * Detect all traps on current panel
- */
-bool detect_traps(int range, bool known)
-{
- bool detect = detect_feat_flag(range, FF_TRAP, known);
-
- if (known) p_ptr->dtrap = TRUE;
-
- if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 0) detect = FALSE;
-
- /* Describe */
- if (detect)
- {
-#ifdef JP
- msg_print("¥È¥é¥Ã¥×¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
-#else
- msg_print("You sense the presence of traps!");
-#endif
- }
-
- /* Result */
- return detect;
-}
-
-
-/*
- * Detect all doors on current panel
- */
-bool detect_doors(int range)
-{
- bool detect = detect_feat_flag(range, FF_DOOR, TRUE);
-
- if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 0) detect = FALSE;
-
- /* Describe */
- if (detect)
- {
-#ifdef JP
- msg_print("¥É¥¢¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
-#else
- msg_print("You sense the presence of doors!");
-#endif
- }
-
- /* Result */
- return detect;
-}
-
-
-/*
- * Detect all stairs on current panel
- */
-bool detect_stairs(int range)
-{
- bool detect = detect_feat_flag(range, FF_STAIRS, TRUE);
-
- if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 0) detect = FALSE;
-
- /* Describe */
- if (detect)
- {
-#ifdef JP
- msg_print("³¬Ãʤθºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
-#else
- msg_print("You sense the presence of stairs!");
-#endif
- }
-
- /* Result */
- return detect;
-}
-
-
-/*
- * Detect any treasure on the current panel
- */
-bool detect_treasure(int range)
-{
- bool detect = detect_feat_flag(range, FF_HAS_GOLD, TRUE);
-
- if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 6) detect = FALSE;
-
- /* Describe */
- if (detect)
- {
-#ifdef JP
- msg_print("Ë䢤µ¤ì¤¿ºâÊõ¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
-#else
- msg_print("You sense the presence of buried treasure!");
-#endif
- }
-
- /* Result */
- return detect;
-}
-
-
-/*
- * Detect all "gold" objects on the current panel
- */
-bool detect_objects_gold(int range)
-{
- int i, y, x;
- int range2 = range;
-
- bool detect = FALSE;
-
- if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range2 /= 3;
-
- /* Scan objects */
- for (i = 1; i < o_max; i++)
- {
- object_type *o_ptr = &o_list[i];
-
- /* Skip dead objects */
- if (!o_ptr->k_idx) continue;
-
- /* Skip held objects */
- if (o_ptr->held_m_idx) continue;
-
- /* Location */
- y = o_ptr->iy;
- x = o_ptr->ix;
-
- /* Only detect nearby objects */
- if (distance(py, px, y, x) > range2) continue;
-
- /* Detect "gold" objects */
- if (o_ptr->tval == TV_GOLD)
- {
- /* Hack -- memorize it */
- o_ptr->marked |= OM_FOUND;
-
- /* Redraw */
- lite_spot(y, x);
-
- /* Detect */
- detect = TRUE;
- }
- }
-
- if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 6) detect = FALSE;
+ if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 6) detect = FALSE;
/* Describe */
if (detect)
{
-#ifdef JP
-msg_print("ºâÊõ¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
-#else
- msg_print("You sense the presence of treasure!");
-#endif
-
+ msg_print(_("財宝の存在を感じとった!", "You sense the presence of treasure!"));
}
if (detect_monsters_string(range, "$"))
}
-/*
- * Detect all "normal" objects on the current panel
+/*!
+ * @brief 通常のアイテムオブジェクトを感知する / Detect all "normal" objects on the current panel
+ * @param range 効果範囲
+ * @return 効力があった場合TRUEを返す
*/
-bool detect_objects_normal(int range)
+bool detect_objects_normal(POSITION range)
{
int i, y, x;
- int range2 = range;
+ POSITION range2 = range;
bool detect = FALSE;
x = o_ptr->ix;
/* Only detect nearby objects */
- if (distance(py, px, y, x) > range2) continue;
+ if (distance(p_ptr->y, p_ptr->x, y, x) > range2) continue;
/* Detect "real" objects */
if (o_ptr->tval != TV_GOLD)
}
}
- if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 6) detect = FALSE;
+ if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 6) detect = FALSE;
/* Describe */
if (detect)
{
-#ifdef JP
-msg_print("¥¢¥¤¥Æ¥à¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
-#else
- msg_print("You sense the presence of objects!");
-#endif
-
+ msg_print(_("アイテムの存在を感じとった!", "You sense the presence of objects!"));
}
if (detect_monsters_string(range, "!=?|/`"))
}
-/*
- * Detect all "magic" objects on the current panel.
- *
+/*!
+ * @brief 魔法効果のあるのアイテムオブジェクトを感知する / Detect all "magic" objects on the current panel.
+ * @param range 効果範囲
+ * @return 効力があった場合TRUEを返す
+ * @details
+ * <pre>
* This will light up all spaces with "magic" items, including artifacts,
* ego-items, potions, scrolls, books, rods, wands, staves, amulets, rings,
* and "enchanted" items of the "good" variety.
*
* It can probably be argued that this function is now too powerful.
+ * </pre>
*/
-bool detect_objects_magic(int range)
+bool detect_objects_magic(POSITION range)
{
int i, y, x, tv;
x = o_ptr->ix;
/* Only detect nearby objects */
- if (distance(py, px, y, x) > range) continue;
+ if (distance(p_ptr->y, p_ptr->x, y, x) > range) continue;
/* Examine the tval */
tv = o_ptr->tval;
(tv == TV_CRUSADE_BOOK) ||
(tv == TV_MUSIC_BOOK) ||
(tv == TV_HISSATSU_BOOK) ||
+ (tv == TV_HEX_BOOK) ||
((o_ptr->to_a > 0) || (o_ptr->to_h + o_ptr->to_d > 0)))
{
/* Memorize the item */
/* Describe */
if (detect)
{
-#ifdef JP
-msg_print("ËâË¡¤Î¥¢¥¤¥Æ¥à¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
-#else
- msg_print("You sense the presence of magic objects!");
-#endif
-
+ msg_print(_("魔法のアイテムの存在を感じとった!", "You sense the presence of magic objects!"));
}
/* Return result */
}
-/*
- * Detect all "normal" monsters on the current panel
+/*!
+ * @brief 一般のモンスターを感知する / Detect all "normal" monsters on the current panel
+ * @param range 効果範囲
+ * @return 効力があった場合TRUEを返す
*/
-bool detect_monsters_normal(int range)
+bool detect_monsters_normal(POSITION range)
{
- int i, y, x;
+ MONSTER_IDX i;
+ POSITION y, x;
bool flag = FALSE;
x = m_ptr->fx;
/* Only detect nearby monsters */
- if (distance(py, px, y, x) > range) continue;
+ if (distance(p_ptr->y, p_ptr->x, y, x) > range) continue;
/* Detect all non-invisible monsters */
if (!(r_ptr->flags2 & RF2_INVISIBLE) || p_ptr->see_inv)
}
}
- if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 3) flag = FALSE;
+ if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 3) flag = FALSE;
/* Describe */
if (flag)
{
/* Describe result */
-#ifdef JP
-msg_print("¥â¥ó¥¹¥¿¡¼¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
-#else
- msg_print("You sense the presence of monsters!");
-#endif
-
+ msg_print(_("モンスターの存在を感じとった!", "You sense the presence of monsters!"));
}
/* Result */
}
-/*
- * Detect all "invisible" monsters around the player
+/*!
+ * @brief 不可視のモンスターを感知する / Detect all "invisible" monsters around the player
+ * @param range 効果範囲
+ * @return 効力があった場合TRUEを返す
*/
-bool detect_monsters_invis(int range)
+bool detect_monsters_invis(POSITION range)
{
- int i, y, x;
+ MONSTER_IDX i;
+ POSITION y, x;
bool flag = FALSE;
if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
x = m_ptr->fx;
/* Only detect nearby monsters */
- if (distance(py, px, y, x) > range) continue;
+ if (distance(p_ptr->y, p_ptr->x, y, x) > range) continue;
/* Detect invisible monsters */
if (r_ptr->flags2 & RF2_INVISIBLE)
}
}
- if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 3) flag = FALSE;
+ if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 3) flag = FALSE;
/* Describe */
if (flag)
{
/* Describe result */
-#ifdef JP
-msg_print("Æ©ÌÀ¤ÊÀ¸Êª¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
-#else
- msg_print("You sense the presence of invisible creatures!");
-#endif
-
+ msg_print(_("透明な生物の存在を感じとった!", "You sense the presence of invisible creatures!"));
}
/* Result */
return (flag);
}
-
-
-/*
- * Detect all "evil" monsters on current panel
+/*!
+ * @brief 邪悪なモンスターを感知する / Detect all "evil" monsters on current panel
+ * @param range 効果範囲
+ * @return 効力があった場合TRUEを返す
*/
-bool detect_monsters_evil(int range)
+bool detect_monsters_evil(POSITION range)
{
- int i, y, x;
+ MONSTER_IDX i;
+ POSITION y, x;
bool flag = FALSE;
if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
x = m_ptr->fx;
/* Only detect nearby monsters */
- if (distance(py, px, y, x) > range) continue;
+ if (distance(p_ptr->y, p_ptr->x, y, x) > range) continue;
/* Detect evil monsters */
if (r_ptr->flags3 & RF3_EVIL)
if (flag)
{
/* Describe result */
-#ifdef JP
-msg_print("¼Ù°¤Ê¤ëÀ¸Êª¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
-#else
- msg_print("You sense the presence of evil creatures!");
-#endif
-
+ msg_print(_("邪悪なる生物の存在を感じとった!", "You sense the presence of evil creatures!"));
}
/* Result */
return (flag);
}
-
-
-
-/*
- * Detect all "nonliving", "undead" or "demonic" monsters on current panel
+/*!
+ * @brief 無生命のモンスターを感知する(アンデッド、悪魔系を含む) / Detect all "nonliving", "undead" or "demonic" monsters on current panel
+ * @param range 効果範囲
+ * @return 効力があった場合TRUEを返す
*/
-bool detect_monsters_nonliving(int range)
+bool detect_monsters_nonliving(POSITION range)
{
- int i, y, x;
- bool flag = FALSE;
+ MONSTER_IDX i;
+ POSITION y, x;
+ bool flag = FALSE;
if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
x = m_ptr->fx;
/* Only detect nearby monsters */
- if (distance(py, px, y, x) > range) continue;
+ if (distance(p_ptr->y, p_ptr->x, y, x) > range) continue;
/* Detect non-living monsters */
if (!monster_living(r_ptr))
if (flag)
{
/* Describe result */
-#ifdef JP
-msg_print("¼«Á³¤Ç¤Ê¤¤¥â¥ó¥¹¥¿¡¼¤Î¸ºß¤ò´¶¤¸¤¿¡ª");
-#else
- msg_print("You sense the presence of unnatural beings!");
-#endif
-
+ msg_print(_("自然でないモンスターの存在を感じた!", "You sense the presence of unnatural beings!"));
}
/* Result */
return (flag);
}
-
-/*
- * Detect all monsters it has mind on current panel
+/*!
+ * @brief 精神のあるモンスターを感知する / Detect all monsters it has mind on current panel
+ * @param range 効果範囲
+ * @return 効力があった場合TRUEを返す
*/
-bool detect_monsters_mind(int range)
+bool detect_monsters_mind(POSITION range)
{
- int i, y, x;
+ MONSTER_IDX i;
+ POSITION y, x;
bool flag = FALSE;
if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
x = m_ptr->fx;
/* Only detect nearby monsters */
- if (distance(py, px, y, x) > range) continue;
+ if (distance(p_ptr->y, p_ptr->x, y, x) > range) continue;
/* Detect non-living monsters */
if (!(r_ptr->flags2 & RF2_EMPTY_MIND))
if (flag)
{
/* Describe result */
-#ifdef JP
-msg_print("»¦µ¤¤ò´¶¤¸¤È¤Ã¤¿¡ª");
-#else
- msg_print("You sense the presence of someone's mind!");
-#endif
-
+ msg_print(_("殺気を感じとった!", "You sense the presence of someone's mind!"));
}
/* Result */
}
-/*
- * Detect all (string) monsters on current panel
+/*!
+ * @brief 該当シンボルのモンスターを感知する / Detect all (string) monsters on current panel
+ * @param range 効果範囲
+ * @param Match 対応シンボルの混じったモンスター文字列(複数指定化)
+ * @return 効力があった場合TRUEを返す
*/
-bool detect_monsters_string(int range, cptr Match)
+bool detect_monsters_string(POSITION range, cptr Match)
{
- int i, y, x;
+ MONSTER_IDX i;
+ POSITION y, x;
bool flag = FALSE;
if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
x = m_ptr->fx;
/* Only detect nearby monsters */
- if (distance(py, px, y, x) > range) continue;
+ if (distance(p_ptr->y, p_ptr->x, y, x) > range) continue;
/* Detect monsters with the same symbol */
if (my_strchr(Match, r_ptr->d_char))
}
}
- if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 3) flag = FALSE;
+ if (music_singing(MUSIC_DETECT) && SINGING_COUNT(p_ptr) > 3) flag = FALSE;
/* Describe */
if (flag)
{
/* Describe result */
-#ifdef JP
-msg_print("¥â¥ó¥¹¥¿¡¼¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
-#else
- msg_print("You sense the presence of monsters!");
-#endif
-
+ msg_print(_("モンスターの存在を感じとった!", "You sense the presence of monsters!"));
}
/* Result */
return (flag);
}
-
-/*
- * A "generic" detect monsters routine, tagged to flags3
+/*!
+ * @brief flags3に対応するモンスターを感知する / A "generic" detect monsters routine, tagged to flags3
+ * @param range 効果範囲
+ * @param match_flag 感知フラグ
+ * @return 効力があった場合TRUEを返す
*/
-bool detect_monsters_xxx(int range, u32b match_flag)
+bool detect_monsters_xxx(POSITION range, u32b match_flag)
{
- int i, y, x;
+ MONSTER_IDX i;
+ POSITION y, x;
bool flag = FALSE;
-#ifdef JP
-cptr desc_monsters = "ÊѤʥâ¥ó¥¹¥¿¡¼";
-#else
- cptr desc_monsters = "weird monsters";
-#endif
+ cptr desc_monsters = _("変なモンスター", "weird monsters");
if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
x = m_ptr->fx;
/* Only detect nearby monsters */
- if (distance(py, px, y, x) > range) continue;
+ if (distance(p_ptr->y, p_ptr->x, y, x) > range) continue;
/* Detect evil monsters */
if (r_ptr->flags3 & (match_flag))
switch (match_flag)
{
case RF3_DEMON:
-#ifdef JP
-desc_monsters = "¥Ç¡¼¥â¥ó";
-#else
- desc_monsters = "demons";
-#endif
-
+ desc_monsters = _("デーモン", "demons");
break;
case RF3_UNDEAD:
-#ifdef JP
-desc_monsters = "¥¢¥ó¥Ç¥Ã¥É";
-#else
- desc_monsters = "the undead";
-#endif
-
+ desc_monsters = _("アンデッド", "the undead");
break;
}
/* Describe result */
-#ifdef JP
-msg_format("%s¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª", desc_monsters);
-#else
- msg_format("You sense the presence of %s!", desc_monsters);
-#endif
-
+ msg_format(_("%sの存在を感じとった!", "You sense the presence of %s!"), desc_monsters);
msg_print(NULL);
}
}
-/*
- * Detect everything
+/*!
+ * @brief 全感知処理 / Detect everything
+ * @param range 効果範囲
+ * @return 効力があった場合TRUEを返す
*/
-bool detect_all(int range)
+bool detect_all(POSITION range)
{
bool detect = FALSE;
}
-/*
- * Apply a "project()" directly to all viewable monsters
- *
+/*!
+ * @brief 視界内モンスターに魔法効果を与える / Apply a "project()" directly to all viewable monsters
+ * @param typ 属性効果
+ * @param dam 効果量
+ * @return 効力があった場合TRUEを返す
+ * @details
+ * <pre>
* Note that affected monsters are NOT auto-tracked by this usage.
*
* To avoid misbehavior when monster deaths have side-effects,
* this is done in two passes. -- JDL
+ * </pre>
*/
-bool project_hack(int typ, int dam)
+bool project_hack(int typ, HIT_POINT dam)
{
int i, x, y;
int flg = PROJECT_JUMP | PROJECT_KILL | PROJECT_HIDE;
x = m_ptr->fx;
/* Require line of sight */
- if (!player_has_los_bold(y, x) || !projectable(py, px, y, x)) continue;
+ if (!player_has_los_bold(y, x) || !projectable(p_ptr->y, p_ptr->x, y, x)) continue;
/* Mark the monster */
m_ptr->mflag |= (MFLAG_TEMP);
}
-/*
- * Speed monsters
+/*!
+ * @brief 視界内モンスターを加速する処理 / Speed monsters
+ * @return 効力があった場合TRUEを返す
*/
bool speed_monsters(void)
{
return (project_hack(GF_OLD_SPEED, p_ptr->lev));
}
-/*
- * Slow monsters
+/*!
+ * @brief 視界内モンスターを加速する処理 / Slow monsters
+ * @return 効力があった場合TRUEを返す
*/
-bool slow_monsters(void)
+bool slow_monsters(int power)
{
- return (project_hack(GF_OLD_SLOW, p_ptr->lev));
+ return (project_hack(GF_OLD_SLOW, power));
}
-/*
- * Sleep monsters
+/*!
+ * @brief 視界内モンスターを眠らせる処理 / Sleep monsters
+ * @return 効力があった場合TRUEを返す
*/
-bool sleep_monsters(void)
+bool sleep_monsters(int power)
{
- return (project_hack(GF_OLD_SLEEP, p_ptr->lev));
+ return (project_hack(GF_OLD_SLEEP, power));
}
-
-/*
- * Banish evil monsters
+/*!
+ * @brief 視界内の邪悪なモンスターをテレポート・アウェイさせる処理 / Banish evil monsters
+ * @return 効力があった場合TRUEを返す
*/
bool banish_evil(int dist)
{
return (project_hack(GF_AWAY_EVIL, dist));
}
-
-/*
- * Turn undead
+/*!
+ * @brief 視界内のアンデッド・モンスターを恐怖させる処理 / Turn undead
+ * @return 効力があった場合TRUEを返す
*/
bool turn_undead(void)
{
return tester;
}
-
-/*
- * Dispel undead monsters
+/*!
+ * @brief 視界内のアンデッド・モンスターにダメージを与える処理 / Dispel undead monsters
+ * @return 効力があった場合TRUEを返す
*/
-bool dispel_undead(int dam)
+bool dispel_undead(HIT_POINT dam)
{
bool tester = (project_hack(GF_DISP_UNDEAD, dam));
if (tester)
return tester;
}
-/*
- * Dispel evil monsters
+/*!
+ * @brief 視界内の邪悪なモンスターにダメージを与える処理 / Dispel evil monsters
+ * @return 効力があった場合TRUEを返す
*/
-bool dispel_evil(int dam)
+bool dispel_evil(HIT_POINT dam)
{
return (project_hack(GF_DISP_EVIL, dam));
}
-/*
- * Dispel good monsters
+/*!
+ * @brief 視界内の善良なモンスターにダメージを与える処理 / Dispel good monsters
+ * @return 効力があった場合TRUEを返す
*/
-bool dispel_good(int dam)
+bool dispel_good(HIT_POINT dam)
{
return (project_hack(GF_DISP_GOOD, dam));
}
-/*
- * Dispel all monsters
+/*!
+ * @brief 視界内のあらゆるモンスターにダメージを与える処理 / Dispel all monsters
+ * @return 効力があった場合TRUEを返す
*/
-bool dispel_monsters(int dam)
+bool dispel_monsters(HIT_POINT dam)
{
return (project_hack(GF_DISP_ALL, dam));
}
-/*
- * Dispel 'living' monsters
+/*!
+ * @brief 視界内の生命のあるモンスターにダメージを与える処理 / Dispel 'living' monsters
+ * @return 効力があった場合TRUEを返す
*/
-bool dispel_living(int dam)
+bool dispel_living(HIT_POINT dam)
{
return (project_hack(GF_DISP_LIVING, dam));
}
-/*
- * Dispel demons
+/*!
+ * @brief 視界内の悪魔系モンスターにダメージを与える処理 / Dispel 'living' monsters
+ * @return 効力があった場合TRUEを返す
*/
-bool dispel_demons(int dam)
+bool dispel_demons(HIT_POINT dam)
{
return (project_hack(GF_DISP_DEMON, dam));
}
-
-/*
- * Crusade
+/*!
+ * @brief 視界内のモンスターに「聖戦」効果を与える処理
+ * @return 効力があった場合TRUEを返す
*/
bool crusade(void)
{
return (project_hack(GF_CRUSADE, p_ptr->lev*4));
}
-
-/*
- * Wake up all monsters, and speed up "los" monsters.
+/*!
+ * @brief 視界内モンスターを怒らせる処理 / Wake up all monsters, and speed up "los" monsters.
+ * @param who 怒らせる原因を起こしたモンスター(0ならばプレイヤー)
+ * @return なし
*/
-void aggravate_monsters(int who)
+void aggravate_monsters(MONSTER_IDX who)
{
- int i;
+ MONSTER_IDX i;
bool sleep = FALSE;
bool speed = FALSE;
/* Messages */
#ifdef JP
- if (speed) msg_print("ÉÕ¶á¤Ç²¿¤«¤¬ÆÍÇ¡¶½Ê³¤·¤¿¤è¤¦¤Ê´¶¤¸¤ò¼õ¤±¤¿¡ª");
- else if (sleep) msg_print("²¿¤«¤¬ÆÍÇ¡¶½Ê³¤·¤¿¤è¤¦¤ÊÁû¡¹¤·¤¤²»¤¬±ó¤¯¤Ëʹ¤³¤¨¤¿¡ª");
+ if (speed) msg_print("付近で何かが突如興奮したような感じを受けた!");
+ else if (sleep) msg_print("何かが突如興奮したような騒々しい音が遠くに聞こえた!");
#else
if (speed) msg_print("You feel a sudden stirring nearby!");
else if (sleep) msg_print("You hear a sudden stirring in the distance!");
}
-/*
- * Delete a non-unique/non-quest monster
+/*!
+ * @brief モンスターへの単体抹殺処理サブルーチン / Delete a non-unique/non-quest monster
+ * @param m_idx 抹殺するモンスターID
+ * @param power 抹殺の威力
+ * @param player_cast プレイヤーの魔法によるものならば TRUE
+ * @param dam_side プレイヤーへの負担ダメージ量(1d(dam_side))
+ * @param spell_name 抹殺効果を起こした魔法の名前
+ * @return 効力があった場合TRUEを返す
*/
-bool genocide_aux(int m_idx, int power, bool player_cast, int dam_side, cptr spell_name)
+bool genocide_aux(MONSTER_IDX m_idx, int power, bool player_cast, int dam_side, cptr spell_name)
{
int msec = delay_factor * delay_factor * delay_factor;
monster_type *m_ptr = &m_list[m_idx];
else if (m_idx == p_ptr->riding) resist = TRUE;
+ else if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle) resist = TRUE;
+
else if (player_cast && (r_ptr->level > randint0(power))) resist = TRUE;
else if (player_cast && (m_ptr->mflag2 & MFLAG2_NOGENO)) resist = TRUE;
/* Delete the monster */
- else delete_monster_idx(m_idx);
+ else
+ {
+ if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname)
+ {
+ char m_name[80];
+
+ monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
+ do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_GENOCIDE, m_name);
+ }
+
+ delete_monster_idx(m_idx);
+ }
if (resist && player_cast)
{
monster_desc(m_name, m_ptr, 0);
if (see_m)
{
-#ifdef JP
- msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", m_name);
-#else
- msg_format("%^s is unaffected.", m_name);
-#endif
+ msg_format(_("%^sには効果がなかった。", "%^s is unaffected."), m_name);
}
if (MON_CSLEEP(m_ptr))
{
(void)set_monster_csleep(m_idx, 0);
- if (see_m)
+ if (m_ptr->ml)
{
-#ifdef JP
- msg_format("%^s¤¬Ìܤò³Ð¤Þ¤·¤¿¡£", m_name);
-#else
- msg_format("%^s wakes up.", m_name);
-#endif
+ msg_format(_("%^sが目を覚ました。", "%^s wakes up."), m_name);
}
}
if (is_friendly(m_ptr) && !is_pet(m_ptr))
{
if (see_m)
{
-#ifdef JP
- msg_format("%s¤ÏÅܤä¿¡ª", m_name);
-#else
- msg_format("%^s gets angry!", m_name);
-#endif
+ msg_format(_("%sは怒った!", "%^s gets angry!"), m_name);
}
set_hostile(m_ptr);
}
if (player_cast)
{
/* Take damage */
-#ifdef JP
- take_hit(DAMAGE_GENO, randint1(dam_side), format("%^s¤Î¼öʸ¤ò¾§¤¨¤¿ÈèÏ«", spell_name), -1);
-#else
- take_hit(DAMAGE_GENO, randint1(dam_side), format("the strain of casting %^s", spell_name), -1);
-#endif
+ take_hit(DAMAGE_GENO, randint1(dam_side), format(_("%^sの呪文を唱えた疲労", "the strain of casting %^s"), spell_name), -1);
}
/* Visual feedback */
- move_cursor_relative(py, px);
+ move_cursor_relative(p_ptr->y, p_ptr->x);
/* Redraw */
p_ptr->redraw |= (PR_HP);
}
-/*
- * Delete all non-unique/non-quest monsters of a given "type" from the level
+/*!
+ * @brief モンスターへのシンボル抹殺処理ルーチン / Delete all non-unique/non-quest monsters of a given "type" from the level
+ * @param power 抹殺の威力
+ * @param player_cast プレイヤーの魔法によるものならば TRUE
+ * @return 効力があった場合TRUEを返す
*/
bool symbol_genocide(int power, bool player_cast)
{
- int i;
+ MONSTER_IDX i;
char typ;
bool result = FALSE;
/* Prevent genocide in quest levels */
- if (p_ptr->inside_quest && !random_quest_number(dun_level))
+ if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle)
{
return (FALSE);
}
/* Mega-Hack -- Get a monster symbol */
-#ifdef JP
- while (!get_com("¤É¤Î¼ïÎà(ʸ»ú)¤Î¥â¥ó¥¹¥¿¡¼¤òËõ»¦¤·¤Þ¤¹¤«: ", &typ, FALSE)) ;
-#else
- while (!get_com("Choose a monster race (by symbol) to genocide: ", &typ, FALSE)) ;
-#endif
+ while (!get_com(_("どの種類(文字)のモンスターを抹殺しますか: ", "Choose a monster race (by symbol) to genocide: "), &typ, FALSE)) ;
/* Delete the monsters of that "type" */
for (i = 1; i < m_max; i++)
if (r_ptr->d_char != typ) continue;
/* Take note */
-#ifdef JP
- result |= genocide_aux(i, power, player_cast, 4, "Ëõ»¦");
-#else
- result |= genocide_aux(i, power, player_cast, 4, "Genocide");
-#endif
+ result |= genocide_aux(i, power, player_cast, 4, _("抹殺", "Genocide"));
}
if (result)
}
-/*
- * Delete all nearby (non-unique) monsters
+/*!
+ * @brief モンスターへの周辺抹殺処理ルーチン / Delete all nearby (non-unique) monsters
+ * @param power 抹殺の威力
+ * @param player_cast プレイヤーの魔法によるものならば TRUE
+ * @return 効力があった場合TRUEを返す
*/
bool mass_genocide(int power, bool player_cast)
{
- int i;
+ MONSTER_IDX i;
bool result = FALSE;
/* Prevent mass genocide in quest levels */
- if (p_ptr->inside_quest && !random_quest_number(dun_level))
+ if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle)
{
return (FALSE);
}
if (m_ptr->cdis > MAX_SIGHT) continue;
/* Note effect */
-#ifdef JP
- result |= genocide_aux(i, power, player_cast, 3, "¼þÊÕËõ»¦");
-#else
- result |= genocide_aux(i, power, player_cast, 3, "Mass Genocide");
-#endif
+ result |= genocide_aux(i, power, player_cast, 3, _("周辺抹殺", "Mass Genocide"));
}
if (result)
}
-
-/*
- * Delete all nearby (non-unique) undead
+/*!
+ * @brief アンデッド・モンスターへの周辺抹殺処理ルーチン / Delete all nearby (non-unique) undead
+ * @param power 抹殺の威力
+ * @param player_cast プレイヤーの魔法によるものならば TRUE
+ * @return 効力があった場合TRUEを返す
*/
bool mass_genocide_undead(int power, bool player_cast)
{
- int i;
+ MONSTER_IDX i;
bool result = FALSE;
/* Prevent mass genocide in quest levels */
- if (p_ptr->inside_quest && !random_quest_number(dun_level))
+ if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle)
{
return (FALSE);
}
if (m_ptr->cdis > MAX_SIGHT) continue;
/* Note effect */
-#ifdef JP
- result |= genocide_aux(i, power, player_cast, 3, "¥¢¥ó¥Ç¥Ã¥É¾ÃÌÇ");
-#else
- result |= genocide_aux(i, power, player_cast, 3, "Annihilate Undead");
-#endif
+ result |= genocide_aux(i, power, player_cast, 3, _("アンデッド消滅", "Annihilate Undead"));
}
if (result)
}
-
-/*
- * Probe nearby monsters
+/*!
+ * @brief 周辺モンスターを調査する / Probe nearby monsters
+ * @return 効力があった場合TRUEを返す
*/
bool probing(void)
{
- int i, speed;
- int cu, cv;
- bool probe = FALSE;
+ int i, speed;
+ bool_hack cu, cv;
+ bool probe = FALSE;
char buf[256];
cptr align;
/* Start the message */
if (!probe)
{
-#ifdef JP
- msg_print("Ä´ººÃæ...");
-#else
- msg_print("Probing...");
-#endif
+ msg_print(_("調査中...", "Probing..."));
}
msg_print(NULL);
speed = m_ptr->mspeed - 110;
if (MON_FAST(m_ptr)) speed += 10;
if (MON_SLOW(m_ptr)) speed -= 10;
+ if (ironman_nightmare) speed += 5;
/* Get the monster's alignment */
#ifdef JP
- if ((r_ptr->flags3 & (RF3_EVIL | RF3_GOOD)) == (RF3_EVIL | RF3_GOOD)) align = "籡";
- else if (r_ptr->flags3 & RF3_EVIL) align = "¼Ù°";
- else if (r_ptr->flags3 & RF3_GOOD) align = "Á±ÎÉ";
- else if ((m_ptr->sub_align & (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) == (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) align = "ÃæΩ(Á±°)";
- else if (m_ptr->sub_align & SUB_ALIGN_EVIL) align = "ÃæΩ(¼Ù°)";
- else if (m_ptr->sub_align & SUB_ALIGN_GOOD) align = "ÃæΩ(Á±ÎÉ)";
- else align = "ÃæΩ";
+ if ((r_ptr->flags3 & (RF3_EVIL | RF3_GOOD)) == (RF3_EVIL | RF3_GOOD)) align = "善悪";
+ else if (r_ptr->flags3 & RF3_EVIL) align = "邪悪";
+ else if (r_ptr->flags3 & RF3_GOOD) align = "善良";
+ else if ((m_ptr->sub_align & (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) == (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) align = "中立(善悪)";
+ else if (m_ptr->sub_align & SUB_ALIGN_EVIL) align = "中立(邪悪)";
+ else if (m_ptr->sub_align & SUB_ALIGN_GOOD) align = "中立(善良)";
+ else align = "中立";
#else
if ((r_ptr->flags3 & (RF3_EVIL | RF3_GOOD)) == (RF3_EVIL | RF3_GOOD)) align = "good&evil";
else if (r_ptr->flags3 & RF3_EVIL) align = "evil";
#endif
/* Describe the monster */
-#ifdef JP
-sprintf(buf,"%s ... °À:%s HP:%d/%d AC:%d ®ÅÙ:%s%d ·Ð¸³:", m_name, align, m_ptr->hp, m_ptr->maxhp, r_ptr->ac, (speed > 0) ? "+" : "", speed);
-#else
-sprintf(buf, "%s ... align:%s HP:%d/%d AC:%d speed:%s%d exp:", m_name, align, m_ptr->hp, m_ptr->maxhp, r_ptr->ac, (speed > 0) ? "+" : "", speed);
-#endif
+ sprintf(buf,_("%s ... 属性:%s HP:%d/%d AC:%d 速度:%s%d 経験:", "%s ... align:%s HP:%d/%d AC:%d speed:%s%d exp:"),
+ m_name, align, (int)m_ptr->hp, (int)m_ptr->maxhp, r_ptr->ac, (speed > 0) ? "+" : "", speed);
+
if (r_ptr->next_r_idx)
{
strcat(buf, format("%d/%d ", m_ptr->exp, r_ptr->next_exp));
}
#ifdef JP
- if (MON_CSLEEP(m_ptr)) strcat(buf,"¿ç̲ ");
- if (MON_STUNNED(m_ptr)) strcat(buf,"ۯ۰ ");
- if (MON_MONFEAR(m_ptr)) strcat(buf,"¶²ÉÝ ");
- if (MON_CONFUSED(m_ptr)) strcat(buf,"º®Íð ");
- if (MON_INVULNER(m_ptr)) strcat(buf,"̵Ũ ");
+ if (MON_CSLEEP(m_ptr)) strcat(buf,"睡眠 ");
+ if (MON_STUNNED(m_ptr)) strcat(buf,"朦朧 ");
+ if (MON_MONFEAR(m_ptr)) strcat(buf,"恐怖 ");
+ if (MON_CONFUSED(m_ptr)) strcat(buf,"混乱 ");
+ if (MON_INVULNER(m_ptr)) strcat(buf,"無敵 ");
#else
if (MON_CSLEEP(m_ptr)) strcat(buf,"sleeping ");
if (MON_STUNNED(m_ptr)) strcat(buf,"stunned ");
/* Learn everything about this monster */
if (lore_do_probe(m_ptr->r_idx))
{
- char buf[80];
-
/* Get base name of monster */
strcpy(buf, (r_name + r_ptr->name));
#ifdef JP
/* Note that we learnt some new flags -Mogami- */
- msg_format("%s¤Ë¤Ä¤¤¤Æ¤µ¤é¤Ë¾Ü¤·¤¯¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£", buf);
+ msg_format("%sについてさらに詳しくなった気がする。", buf);
#else
/* Pluralize it */
plural_aux(buf);
if (probe)
{
chg_virtue(V_KNOWLEDGE, 1);
-
-#ifdef JP
-msg_print("¤³¤ì¤ÇÁ´Éô¤Ç¤¹¡£");
-#else
- msg_print("That's all.");
-#endif
-
+ msg_print(_("これで全部です。", "That's all."));
}
/* Result */
-/*
- * The spell of destruction
- *
+/*!
+ * @brief *破壊*処理を行う / The spell of destruction
+ * @param y1 破壊の中心Y座標
+ * @param x1 破壊の中心X座標
+ * @param r 破壊の半径
+ * @param in_generate ダンジョンフロア生成中の処理ならばTRUE
+ * @return 効力があった場合TRUEを返す
+ * @details
+ * <pre>
* This spell "deletes" monsters (instead of "killing" them).
*
* Later we may use one function for both "destruction" and
* "earthquake" by using the "full" to select "destruction".
+ * </pre>
*/
bool destroy_area(int y1, int x1, int r, bool in_generate)
{
c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
/* Lose light and knowledge */
- c_ptr->info &= ~(CAVE_MARK | CAVE_GLOW);
+ c_ptr->info &= ~(CAVE_MARK | CAVE_GLOW | CAVE_KNOWN);
if (!in_generate) /* Normal */
{
m_ptr->hp = m_ptr->maxhp;
/* Try to teleport away quest monsters */
- if (!teleport_away(c_ptr->m_idx, (r * 2) + 1, TRUE, FALSE)) continue;
+ if (!teleport_away(c_ptr->m_idx, (r * 2) + 1, TELEPORT_DEC_VALOUR)) continue;
}
else
{
char m_name[80];
monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
- do_cmd_write_nikki(NIKKI_NAMED_PET, 6, m_name);
+ do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_DESTROY, m_name);
}
/* Delete the monster (if any) */
{
char o_name[MAX_NLEN];
object_desc(o_name, o_ptr, (OD_NAME_ONLY | OD_STORE));
-#ifdef JP
- msg_format("ÅÁÀâ¤Î¥¢¥¤¥Æ¥à (%s) ¤ÏÀ¸À®Ãæ¤Ë*Ç˲õ*¤µ¤ì¤¿¡£", o_name);
-#else
- msg_format("Artifact (%s) was *destroyed* during generation.", o_name);
-#endif
+ msg_format(_("伝説のアイテム (%s) は生成中に*破壊*された。", "Artifact (%s) was *destroyed* during generation."), o_name);
}
}
else if (in_generate && cheat_peek && o_ptr->art_name)
{
-#ifdef JP
- msg_print("¥é¥ó¥À¥à¡¦¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤Î1¤Ä¤ÏÀ¸À®Ãæ¤Ë*Ç˲õ*¤µ¤ì¤¿¡£");
-#else
- msg_print("One of the random artifacts was *destroyed* during generation.");
-#endif
+ msg_print(_("ランダム・アーティファクトの1つは生成中に*破壊*された。",
+ "One of the random artifacts was *destroyed* during generation."));
}
}
}
if (t < 20)
{
/* Create granite wall */
- cave_set_feat(y, x, FEAT_WALL);
+ cave_set_feat(y, x, feat_granite);
}
else if (t < 70)
{
/* Create quartz vein */
- cave_set_feat(y, x, FEAT_QUARTZ);
+ cave_set_feat(y, x, feat_quartz_vein);
}
else if (t < 100)
{
/* Create magma vein */
- cave_set_feat(y, x, FEAT_MAGMA);
+ cave_set_feat(y, x, feat_magma_vein);
}
else
{
else if (t < 70)
{
/* Create quartz vein */
- c_ptr->feat = FEAT_QUARTZ;
+ c_ptr->feat = feat_quartz_vein;
}
else if (t < 100)
{
/* Create magma vein */
- c_ptr->feat = FEAT_MAGMA;
+ c_ptr->feat = feat_magma_vein;
}
else
{
if (flag)
{
/* Message */
-#ifdef JP
- msg_print("dz¤¨¤ë¤è¤¦¤ÊÁ®¸÷¤¬È¯À¸¤·¤¿¡ª");
-#else
- msg_print("There is a searing blast of light!");
-#endif
+ msg_print(_("燃えるような閃光が発生した!", "There is a searing blast of light!"));
/* Blind the player */
if (!p_ptr->resist_blind && !p_ptr->resist_lite)
if (p_ptr->special_defense & NINJA_S_STEALTH)
{
- if (cave[py][px].info & CAVE_GLOW) set_superstealth(FALSE);
+ if (cave[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(FALSE);
}
}
}
-/*
+/*!
+ * @brief 地震処理(サブルーチン) /
* Induce an "earthquake" of the given radius at the given location.
+ * @return 効力があった場合TRUEを返す
+ * @param cy 中心Y座標
+ * @param cx 中心X座標
+ * @param r 効果半径
+ * @param m_idx 地震を起こしたモンスターID(0ならばプレイヤー)
+ * @details
+ * <pre>
*
* This will turn some walls into floors and some floors into walls.
*
* Note that as of now (2.7.8) no monster may occupy a "wall" grid, even
* for a single turn, unless that monster can pass_walls or kill_walls.
* This has allowed massive simplification of the "monster" code.
+ * </pre>
*/
-bool earthquake(int cy, int cx, int r)
+bool earthquake_aux(int cy, int cx, int r, MONSTER_IDX m_idx)
{
int i, t, y, x, yy, xx, dy, dx;
int damage = 0;
- int sn = 0, sy = 0, sx = 0;
+ int sn = 0;
+ POSITION sy = 0, sx = 0;
bool hurt = FALSE;
cave_type *c_ptr;
bool map[32][32];
c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY | CAVE_UNSAFE);
/* Lose light and knowledge */
- c_ptr->info &= ~(CAVE_GLOW | CAVE_MARK);
+ c_ptr->info &= ~(CAVE_GLOW | CAVE_MARK | CAVE_KNOWN);
/* Skip the epicenter */
if (!dx && !dy) continue;
for (i = 0; i < 8; i++)
{
/* Access the location */
- y = py + ddy_ddd[i];
- x = px + ddx_ddd[i];
+ y = p_ptr->y + ddy_ddd[i];
+ x = p_ptr->x + ddx_ddd[i];
/* Skip non-empty grids */
if (!cave_empty_bold(y, x)) continue;
{
case 1:
{
-#ifdef JP
-msg_print("¥À¥ó¥¸¥ç¥ó¤ÎÊɤ¬Êø¤ì¤¿¡ª");
-#else
- msg_print("The cave ceiling collapses!");
-#endif
-
+ msg_print(_("ダンジョンの壁が崩れた!", "The cave ceiling collapses!"));
break;
}
case 2:
{
-#ifdef JP
-msg_print("¥À¥ó¥¸¥ç¥ó¤Î¾²¤¬ÉÔ¼«Á³¤Ë¤Í¤¸¶Ê¤¬¤Ã¤¿¡ª");
-#else
- msg_print("The cave floor twists in an unnatural way!");
-#endif
-
+ msg_print(_("ダンジョンの床が不自然にねじ曲がった!", "The cave floor twists in an unnatural way!"));
break;
}
default:
{
-#ifdef JP
-msg_print("¥À¥ó¥¸¥ç¥ó¤¬Íɤ줿¡ªÊø¤ì¤¿´ä¤¬Æ¬¤Ë¹ß¤Ã¤Æ¤¤¿¡ª");
-#else
- msg_print("The cave quakes! You are pummeled with debris!");
-#endif
-
+ msg_print(_("ダンジョンが揺れた!崩れた岩が頭に降ってきた!", "The cave quakes! You are pummeled with debris!"));
break;
}
}
if (!sn)
{
/* Message and damage */
-#ifdef JP
-msg_print("¤¢¤Ê¤¿¤Ï¤Ò¤É¤¤²ø²æ¤òÉé¤Ã¤¿¡ª");
-#else
- msg_print("You are severely crushed!");
-#endif
-
+ msg_print(_("あなたはひどい怪我を負った!", "You are severely crushed!"));
damage = 200;
}
{
case 1:
{
-#ifdef JP
-msg_print("¹ß¤êÃí¤°´ä¤ò¤¦¤Þ¤¯Èò¤±¤¿¡ª");
-#else
- msg_print("You nimbly dodge the blast!");
-#endif
-
+ msg_print(_("降り注ぐ岩をうまく避けた!", "You nimbly dodge the blast!"));
damage = 0;
break;
}
case 2:
{
-#ifdef JP
-msg_print("´äÀФ¬¤¢¤Ê¤¿¤Ëľ·â¤·¤¿!");
-#else
- msg_print("You are bashed by rubble!");
-#endif
-
+ msg_print(_("岩石があなたに直撃した!", "You are bashed by rubble!"));
damage = damroll(10, 4);
(void)set_stun(p_ptr->stun + randint1(50));
break;
}
case 3:
{
-#ifdef JP
-msg_print("¤¢¤Ê¤¿¤Ï¾²¤ÈÊɤȤδ֤˶´¤Þ¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª");
-#else
- msg_print("You are crushed between the floor and ceiling!");
-#endif
-
+ msg_print(_("あなたは床と壁との間に挟まれてしまった!", "You are crushed between the floor and ceiling!"));
damage = damroll(10, 4);
(void)set_stun(p_ptr->stun + randint1(50));
break;
}
/* Important -- no wall on player */
- map[16+py-cy][16+px-cx] = FALSE;
+ map[16+p_ptr->y-cy][16+p_ptr->x-cx] = FALSE;
/* Take some damage */
-#ifdef JP
-if (damage) take_hit(DAMAGE_ATTACK, damage, "ÃÏ¿Ì", -1);
-#else
- if (damage) take_hit(DAMAGE_ATTACK, damage, "an earthquake", -1);
-#endif
+ if (damage)
+ {
+ cptr killer;
+
+ if (m_idx)
+ {
+ char m_name[80];
+ monster_type *m_ptr = &m_list[m_idx];
+
+ /* Get the monster's real name */
+ monster_desc(m_name, m_ptr, MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
+
+ killer = format(_("%sの起こした地震", "an earthquake caused by %s"), m_name);
+ }
+ else
+ {
+ killer = _("地震", "an earthquake");
+ }
+ take_hit(DAMAGE_ATTACK, damage, killer, -1);
+ }
}
/* Examine the quaked region */
monster_desc(m_name, m_ptr, 0);
/* Scream in pain */
-#ifdef JP
-msg_format("%^s¤Ï¶ìÄˤǵ㤤ï¤á¤¤¤¿¡ª", m_name);
-#else
- msg_format("%^s wails out in pain!", m_name);
-#endif
-
+ if (!ignore_unview || is_seen(m_ptr)) msg_format(_("%^sは苦痛で泣きわめいた!", "%^s wails out in pain!"), m_name);
/* Take damage from the quake */
damage = (sn ? damroll(4, 8) : (m_ptr->hp + 1));
- /* Monster is certainly awake */
- (void)set_monster_csleep(c_ptr->m_idx, 0);
+ /* Monster is certainly awake */
+ (void)set_monster_csleep(c_ptr->m_idx, 0);
+
+ /* Apply damage directly */
+ m_ptr->hp -= damage;
+
+ /* Delete (not kill) "dead" monsters */
+ if (m_ptr->hp < 0)
+ {
+ /* Message */
+ if (!ignore_unview || is_seen(m_ptr))
+ msg_format(_("%^sは岩石に埋もれてしまった!", "%^s is embedded in the rock!"), m_name);
+
+ if (c_ptr->m_idx)
+ {
+ if (record_named_pet && is_pet(&m_list[c_ptr->m_idx]) && m_list[c_ptr->m_idx].nickname)
+ {
+ char m2_name[80];
+
+ monster_desc(m2_name, m_ptr, MD_INDEF_VISIBLE);
+ do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_EARTHQUAKE, m2_name);
+ }
+ }
+
+ /* Delete the monster */
+ delete_monster(yy, xx);
+
+ /* No longer safe */
+ sn = 0;
+ }
+
+ /* Hack -- Escape from the rock */
+ if (sn)
+ {
+ IDX m_idx_aux = cave[yy][xx].m_idx;
+
+ /* Update the old location */
+ cave[yy][xx].m_idx = 0;
+
+ /* Update the new location */
+ cave[sy][sx].m_idx = m_idx_aux;
+
+ /* Move the monster */
+ m_ptr->fy = sy;
+ m_ptr->fx = sx;
+
+ /* Update the monster (new location) */
+ update_mon(m_idx, TRUE);
+
+ /* Redraw the old grid */
+ lite_spot(yy, xx);
+
+ /* Redraw the new grid */
+ lite_spot(sy, sx);
+ }
+ }
+ }
+ }
+ }
+
+ /* Lose monster light */
+ clear_mon_lite();
+
+ /* Examine the quaked region */
+ for (dy = -r; dy <= r; dy++)
+ {
+ for (dx = -r; dx <= r; dx++)
+ {
+ /* Extract the location */
+ yy = cy + dy;
+ xx = cx + dx;
+
+ /* Skip unaffected grids */
+ if (!map[16+yy-cy][16+xx-cx]) continue;
+
+ /* Access the cave grid */
+ c_ptr = &cave[yy][xx];
+
+ /* Paranoia -- never affect player */
+/* if (player_bold(yy, xx)) continue; */
+
+ /* Destroy location (if valid) */
+ if (cave_valid_bold(yy, xx))
+ {
+ /* Delete objects */
+ delete_object(yy, xx);
+
+ /* Wall (or floor) type */
+ t = cave_have_flag_bold(yy, xx, FF_PROJECT) ? randint0(100) : 200;
+
+ /* Granite */
+ if (t < 20)
+ {
+ /* Create granite wall */
+ cave_set_feat(yy, xx, feat_granite);
+ }
+
+ /* Quartz */
+ else if (t < 70)
+ {
+ /* Create quartz vein */
+ cave_set_feat(yy, xx, feat_quartz_vein);
+ }
+
+ /* Magma */
+ else if (t < 100)
+ {
+ /* Create magma vein */
+ cave_set_feat(yy, xx, feat_magma_vein);
+ }
+
+ /* Floor */
+ else
+ {
+ /* Create floor */
+ cave_set_feat(yy, xx, floor_type[randint0(100)]);
+ }
+ }
+ }
+ }
+
+
+ /* Process "re-glowing" */
+ for (dy = -r; dy <= r; dy++)
+ {
+ for (dx = -r; dx <= r; dx++)
+ {
+ /* Extract the location */
+ yy = cy + dy;
+ xx = cx + dx;
+
+ /* Skip illegal grids */
+ if (!in_bounds(yy, xx)) continue;
+
+ /* Skip distant grids */
+ if (distance(cy, cx, yy, xx) > r) continue;
+
+ /* Access the grid */
+ c_ptr = &cave[yy][xx];
+
+ if (is_mirror_grid(c_ptr)) c_ptr->info |= CAVE_GLOW;
+ else if (!(d_info[dungeon_type].flags1 & DF1_DARKNESS))
+ {
+ int ii, yyy, xxx;
+ cave_type *cc_ptr;
+
+ for (ii = 0; ii < 9; ii++)
+ {
+ yyy = yy + ddy_ddd[ii];
+ xxx = xx + ddx_ddd[ii];
+ if (!in_bounds2(yyy, xxx)) continue;
+ cc_ptr = &cave[yyy][xxx];
+ if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
+ {
+ c_ptr->info |= CAVE_GLOW;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+
+ /* Mega-Hack -- Forget the view and lite */
+ p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
+
+ /* Update stuff */
+ p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE | PU_MONSTERS);
+
+ /* Update the health bar */
+ p_ptr->redraw |= (PR_HEALTH | PR_UHEALTH);
+
+ /* Redraw map */
+ p_ptr->redraw |= (PR_MAP);
+
+ /* Window stuff */
+ p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
+
+ if (p_ptr->special_defense & NINJA_S_STEALTH)
+ {
+ if (cave[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(FALSE);
+ }
+
+ /* Success */
+ return (TRUE);
+}
+
+/*!
+ * @brief 地震処理(プレイヤーの中心発動) /
+ * Induce an "earthquake" of the given radius at the given location.
+ * @return 効力があった場合TRUEを返す
+ * @param cy 中心Y座標
+ * @param cx 中心X座標
+ * @param r 効果半径
+ */
+bool earthquake(int cy, int cx, int r)
+{
+ return earthquake_aux(cy, cx, r, 0);
+}
+
+/*!
+ * @brief ペット爆破処理 /
+ * @return なし
+ */
+void discharge_minion(void)
+{
+ MONSTER_IDX i;
+ bool okay = TRUE;
+
+ for (i = 1; i < m_max; i++)
+ {
+ monster_type *m_ptr = &m_list[i];
+ if (!m_ptr->r_idx || !is_pet(m_ptr)) continue;
+ if (m_ptr->nickname) okay = FALSE;
+ }
+ if (!okay || p_ptr->riding)
+ {
+ if (!get_check(_("本当に全ペットを爆破しますか?", "You will blast all pets. Are you sure? ")))
+ return;
+ }
+ for (i = 1; i < m_max; i++)
+ {
+ HIT_POINT dam;
+ monster_type *m_ptr = &m_list[i];
+ monster_race *r_ptr;
+
+ if (!m_ptr->r_idx || !is_pet(m_ptr)) continue;
+ r_ptr = &r_info[m_ptr->r_idx];
+
+ /* Uniques resist discharging */
+ if (r_ptr->flags1 & RF1_UNIQUE)
+ {
+ char m_name[80];
+ monster_desc(m_name, m_ptr, 0x00);
+ msg_format(_("%sは爆破されるのを嫌がり、勝手に自分の世界へと帰った。", "%^s resists to be blasted, and run away."), m_name);
+ delete_monster_idx(i);
+ continue;
+ }
+ dam = m_ptr->maxhp / 2;
+ if (dam > 100) dam = (dam-100)/2 + 100;
+ if (dam > 400) dam = (dam-400)/2 + 400;
+ if (dam > 800) dam = 800;
+ project(i, 2+(r_ptr->level/20), m_ptr->fy,
+ m_ptr->fx, dam, GF_PLASMA,
+ PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL, -1);
+
+ if (record_named_pet && m_ptr->nickname)
+ {
+ char m_name[80];
+
+ monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
+ do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_BLAST, m_name);
+ }
+
+ delete_monster_idx(i);
+ }
+}
+
+
+/*!
+ * @brief 部屋全体を照らすサブルーチン
+ * @return なし
+ * @details
+ * <pre>
+ * This routine clears the entire "temp" set.
+ * This routine will Perma-Lite all "temp" grids.
+ * This routine is used (only) by "lite_room()"
+ * Dark grids are illuminated.
+ * Also, process all affected monsters.
+ *
+ * SMART monsters always wake up when illuminated
+ * NORMAL monsters wake up 1/4 the time when illuminated
+ * STUPID monsters wake up 1/10 the time when illuminated
+ * </pre>
+ */
+static void cave_temp_room_lite(void)
+{
+ int i;
+
+ /* Clear them all */
+ for (i = 0; i < temp_n; i++)
+ {
+ int y = temp_y[i];
+ int x = temp_x[i];
+
+ cave_type *c_ptr = &cave[y][x];
- /* Apply damage directly */
- m_ptr->hp -= damage;
+ /* No longer in the array */
+ c_ptr->info &= ~(CAVE_TEMP);
- /* Delete (not kill) "dead" monsters */
- if (m_ptr->hp < 0)
- {
- /* Message */
-#ifdef JP
- msg_format("%^s¤Ï´äÀФËËä¤â¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª", m_name);
-#else
- msg_format("%^s is embedded in the rock!", m_name);
-#endif
+ /* Update only non-CAVE_GLOW grids */
+ /* if (c_ptr->info & (CAVE_GLOW)) continue; */
- if (c_ptr->m_idx)
- {
- if (record_named_pet && is_pet(&m_list[c_ptr->m_idx]) && m_list[c_ptr->m_idx].nickname)
- {
- char m2_name[80];
+ /* Perma-Lite */
+ c_ptr->info |= (CAVE_GLOW);
- monster_desc(m2_name, m_ptr, MD_INDEF_VISIBLE);
- do_cmd_write_nikki(NIKKI_NAMED_PET, 7, m2_name);
- }
- }
+ /* Process affected monsters */
+ if (c_ptr->m_idx)
+ {
+ int chance = 25;
- /* Delete the monster */
- delete_monster(yy, xx);
+ monster_type *m_ptr = &m_list[c_ptr->m_idx];
- /* No longer safe */
- sn = 0;
- }
+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
- /* Hack -- Escape from the rock */
- if (sn)
- {
- int m_idx = cave[yy][xx].m_idx;
+ /* Update the monster */
+ update_mon(c_ptr->m_idx, FALSE);
- /* Update the old location */
- cave[yy][xx].m_idx = 0;
+ /* Stupid monsters rarely wake up */
+ if (r_ptr->flags2 & (RF2_STUPID)) chance = 10;
- /* Update the new location */
- cave[sy][sx].m_idx = m_idx;
+ /* Smart monsters always wake up */
+ if (r_ptr->flags2 & (RF2_SMART)) chance = 100;
- /* Move the monster */
- m_ptr->fy = sy;
- m_ptr->fx = sx;
+ /* Sometimes monsters wake up */
+ if (MON_CSLEEP(m_ptr) && (randint0(100) < chance))
+ {
+ /* Wake up! */
+ (void)set_monster_csleep(c_ptr->m_idx, 0);
- /* Update the monster (new location) */
- update_mon(m_idx, TRUE);
+ /* Notice the "waking up" */
+ if (m_ptr->ml)
+ {
+ char m_name[80];
- /* Redraw the old grid */
- lite_spot(yy, xx);
+ /* Acquire the monster name */
+ monster_desc(m_name, m_ptr, 0);
- /* Redraw the new grid */
- lite_spot(sy, sx);
- }
+ /* Dump a message */
+ msg_format(_("%^sが目を覚ました。", "%^s wakes up."), m_name);
}
}
}
+
+ /* Note */
+ note_spot(y, x);
+
+ /* Redraw */
+ lite_spot(y, x);
+
+ update_local_illumination(y, x);
}
- /* Lose monster light */
- clear_mon_lite();
+ /* None left */
+ temp_n = 0;
+}
- /* Examine the quaked region */
- for (dy = -r; dy <= r; dy++)
- {
- for (dx = -r; dx <= r; dx++)
- {
- /* Extract the location */
- yy = cy + dy;
- xx = cx + dx;
- /* Skip unaffected grids */
- if (!map[16+yy-cy][16+xx-cx]) continue;
- /* Access the cave grid */
- c_ptr = &cave[yy][xx];
+/*!
+ * @brief 部屋全体を暗くするサブルーチン
+ * @return なし
+ * @details
+ * <pre>
+ * This routine clears the entire "temp" set.
+ * This routine will "darken" all "temp" grids.
+ * In addition, some of these grids will be "unmarked".
+ * This routine is used (only) by "unlite_room()"
+ * Also, process all affected monsters
+ * </pre>
+ */
+static void cave_temp_room_unlite(void)
+{
+ int i;
- /* Paranoia -- never affect player */
-/* if (player_bold(yy, xx)) continue; */
+ /* Clear them all */
+ for (i = 0; i < temp_n; i++)
+ {
+ int y = temp_y[i];
+ int x = temp_x[i];
+ int j;
- /* Destroy location (if valid) */
- if (cave_valid_bold(yy, xx))
- {
- /* Delete objects */
- delete_object(yy, xx);
+ cave_type *c_ptr = &cave[y][x];
+ bool do_dark = !is_mirror_grid(c_ptr);
- /* Wall (or floor) type */
- t = cave_have_flag_bold(yy, xx, FF_PROJECT) ? randint0(100) : 200;
+ /* No longer in the array */
+ c_ptr->info &= ~(CAVE_TEMP);
- /* Granite */
- if (t < 20)
+ /* Darken the grid */
+ if (do_dark)
+ {
+ if (dun_level || !is_daytime())
+ {
+ for (j = 0; j < 9; j++)
{
- /* Create granite wall */
- cave_set_feat(yy, xx, FEAT_WALL);
- }
+ int by = y + ddy_ddd[j];
+ int bx = x + ddx_ddd[j];
- /* Quartz */
- else if (t < 70)
- {
- /* Create quartz vein */
- cave_set_feat(yy, xx, FEAT_QUARTZ);
- }
+ if (in_bounds2(by, bx))
+ {
+ cave_type *cc_ptr = &cave[by][bx];
- /* Magma */
- else if (t < 100)
- {
- /* Create magma vein */
- cave_set_feat(yy, xx, FEAT_MAGMA);
+ if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
+ {
+ do_dark = FALSE;
+ break;
+ }
+ }
}
- /* Floor */
- else
- {
- /* Create floor */
- cave_set_feat(yy, xx, floor_type[randint0(100)]);
- }
+ if (!do_dark) continue;
+ }
+
+ c_ptr->info &= ~(CAVE_GLOW);
+
+ /* Hack -- Forget "boring" grids */
+ if (!have_flag(f_info[get_feat_mimic(c_ptr)].flags, FF_REMEMBER))
+ {
+ /* Forget the grid */
+ if (!view_torch_grids) c_ptr->info &= ~(CAVE_MARK);
+
+ /* Notice */
+ note_spot(y, x);
}
+
+ /* Process affected monsters */
+ if (c_ptr->m_idx)
+ {
+ /* Update the monster */
+ update_mon(c_ptr->m_idx, FALSE);
+ }
+
+ /* Redraw */
+ lite_spot(y, x);
+
+ update_local_illumination(y, x);
}
}
+ /* None left */
+ temp_n = 0;
+}
- /* Process "re-glowing" */
- for (dy = -r; dy <= r; dy++)
- {
- for (dx = -r; dx <= r; dx++)
- {
- /* Extract the location */
- yy = cy + dy;
- xx = cx + dx;
- /* Skip illegal grids */
- if (!in_bounds(yy, xx)) continue;
+/*!
+ * @brief 周辺に関数ポインタの条件に該当する地形がいくつあるかを計算する / Determine how much contiguous open space this grid is next to
+ * @param cy Y座標
+ * @param cx X座標
+ * @param pass_bold 地形条件を返す関数ポインタ
+ * @return 該当地形の数
+ */
+static int next_to_open(int cy, int cx, bool (*pass_bold)(int, int))
+{
+ int i;
- /* Skip distant grids */
- if (distance(cy, cx, yy, xx) > r) continue;
+ int y, x;
- /* Access the grid */
- c_ptr = &cave[yy][xx];
+ int len = 0;
+ int blen = 0;
- if (is_mirror_grid(c_ptr)) c_ptr->info |= CAVE_GLOW;
- else if (!(d_info[dungeon_type].flags1 & DF1_DARKNESS))
- {
- int ii, yyy, xxx;
- cave_type *cc_ptr;
+ for (i = 0; i < 16; i++)
+ {
+ y = cy + ddy_cdd[i % 8];
+ x = cx + ddx_cdd[i % 8];
- for (ii = 0; ii < 9; ii++)
- {
- yyy = yy + ddy_ddd[ii];
- xxx = xx + ddx_ddd[ii];
- if (!in_bounds2(yyy, xxx)) continue;
- cc_ptr = &cave[yyy][xxx];
- if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
- {
- c_ptr->info |= CAVE_GLOW;
- break;
- }
- }
+ /* Found a wall, break the length */
+ if (!pass_bold(y, x))
+ {
+ /* Track best length */
+ if (len > blen)
+ {
+ blen = len;
}
+
+ len = 0;
+ }
+ else
+ {
+ len++;
}
}
+ return (MAX(len, blen));
+}
- /* Mega-Hack -- Forget the view and lite */
- p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
-
- /* Update stuff */
- p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE | PU_MONSTERS);
-
- /* Update the health bar */
- p_ptr->redraw |= (PR_HEALTH | PR_UHEALTH);
+/*!
+ * @brief 周辺に関数ポインタの条件に該当する地形がいくつあるかを計算する / Determine how much contiguous open space this grid is next to
+ * @param cy Y座標
+ * @param cx X座標
+ * @param pass_bold 地形条件を返す関数ポインタ
+ * @return 該当地形の数
+ */
+static int next_to_walls_adj(int cy, int cx, bool (*pass_bold)(int, int))
+{
+ int i;
- /* Redraw map */
- p_ptr->redraw |= (PR_MAP);
+ int y, x;
- /* Window stuff */
- p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
+ int c = 0;
- if (p_ptr->special_defense & NINJA_S_STEALTH)
+ for (i = 0; i < 8; i++)
{
- if (cave[py][px].info & CAVE_GLOW) set_superstealth(FALSE);
+ y = cy + ddy_ddd[i];
+ x = cx + ddx_ddd[i];
+
+ if (!pass_bold(y, x)) c++;
}
- /* Success */
- return (TRUE);
+ return c;
}
-void discharge_minion(void)
+/*!
+ * @brief 部屋内にある一点の周囲に該当する地形数かいくつあるかをグローバル変数temp_nに返す / Aux function -- see below
+ * @param y 部屋内のy座標1点
+ * @param x 部屋内のx座標1点
+ * @param only_room 部屋内地形のみをチェック対象にするならば TRUE
+ * @param pass_bold 地形条件を返す関数ポインタ
+ * @return 該当地形の数
+ */
+static void cave_temp_room_aux(int y, int x, bool only_room, bool (*pass_bold)(int, int))
{
- int i;
- bool okay = TRUE;
+ cave_type *c_ptr;
- for (i = 1; i < m_max; i++)
- {
- monster_type *m_ptr = &m_list[i];
- if (!m_ptr->r_idx || !is_pet(m_ptr)) continue;
- if (m_ptr->nickname) okay = FALSE;
- }
- if (!okay || p_ptr->riding)
- {
-#ifdef JP
- if (!get_check("ËÜÅö¤ËÁ´¥Ú¥Ã¥È¤òÇúÇˤ·¤Þ¤¹¤«¡©"))
-#else
- if (!get_check("You will blast all pets. Are you sure? "))
-#endif
- return;
- }
- for (i = 1; i < m_max; i++)
+ /* Get the grid */
+ c_ptr = &cave[y][x];
+
+ /* Avoid infinite recursion */
+ if (c_ptr->info & (CAVE_TEMP)) return;
+
+ /* Do not "leave" the current room */
+ if (!(c_ptr->info & (CAVE_ROOM)))
{
- int dam;
- monster_type *m_ptr = &m_list[i];
- monster_race *r_ptr;
+ if (only_room) return;
- if (!m_ptr->r_idx || !is_pet(m_ptr)) continue;
- r_ptr = &r_info[m_ptr->r_idx];
+ /* Verify */
+ if (!in_bounds2(y, x)) return;
- /* Uniques resist discharging */
- if (r_ptr->flags1 & RF1_UNIQUE)
- {
- char m_name[80];
- monster_desc(m_name, m_ptr, 0x00);
-#ifdef JP
- msg_format("%s¤ÏÇúÇˤµ¤ì¤ë¤Î¤ò·ù¤¬¤ê¡¢¾¡¼ê¤Ë¼«Ê¬¤ÎÀ¤³¦¤Ø¤Èµ¢¤Ã¤¿¡£", m_name);
-#else
- msg_format("%^s resists to be blasted, and run away.", m_name);
-#endif
- delete_monster_idx(i);
- continue;
- }
- dam = m_ptr->maxhp / 2;
- if (dam > 100) dam = (dam-100)/2 + 100;
- if (dam > 400) dam = (dam-400)/2 + 400;
- if (dam > 800) dam = 800;
- project(i, 2+(r_ptr->level/20), m_ptr->fy,
- m_ptr->fx, dam, GF_PLASMA,
- PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL, -1);
- delete_monster_idx(i);
+ /* Do not exceed the maximum spell range */
+ if (distance(p_ptr->y, p_ptr->x, y, x) > MAX_RANGE) return;
+
+ /* Verify this grid */
+ /*
+ * The reason why it is ==6 instead of >5 is that 8 is impossible
+ * due to the check for cave_bold above.
+ * 7 lights dead-end corridors (you need to do this for the
+ * checkboard interesting rooms, so that the boundary is lit
+ * properly.
+ * This leaves only a check for 6 bounding walls!
+ */
+ if (in_bounds(y, x) && pass_bold(y, x) &&
+ (next_to_walls_adj(y, x, pass_bold) == 6) && (next_to_open(y, x, pass_bold) <= 1)) return;
}
+
+ /* Paranoia -- verify space */
+ if (temp_n == TEMP_MAX) return;
+
+ /* Mark the grid as "seen" */
+ c_ptr->info |= (CAVE_TEMP);
+
+ /* Add it to the "seen" set */
+ temp_y[temp_n] = y;
+ temp_x[temp_n] = x;
+ temp_n++;
}
+/*!
+ * @brief 指定のマスが光を通すか(LOSフラグを持つか)を返す。 / Aux function -- see below
+ * @param y 指定Y座標
+ * @param x 指定X座標
+ * @return 光を通すならばtrueを返す。
+ */
+static bool cave_pass_lite_bold(int y, int x)
+{
+ return cave_los_bold(y, x);
+}
-/*
- * This routine clears the entire "temp" set.
- *
- * This routine will Perma-Lite all "temp" grids.
- *
- * This routine is used (only) by "lite_room()"
- *
- * Dark grids are illuminated.
- *
- * Also, process all affected monsters.
- *
- * SMART monsters always wake up when illuminated
- * NORMAL monsters wake up 1/4 the time when illuminated
- * STUPID monsters wake up 1/10 the time when illuminated
+/*!
+ * @brief 部屋内にある一点の周囲がいくつ光を通すかをグローバル変数temp_nに返す / Aux function -- see below
+ * @param y 指定Y座標
+ * @param x 指定X座標
+ * @return なし
*/
-static void cave_temp_room_lite(void)
+static void cave_temp_lite_room_aux(int y, int x)
{
- int i;
+ cave_temp_room_aux(y, x, FALSE, cave_pass_lite_bold);
+}
- /* Clear them all */
- for (i = 0; i < temp_n; i++)
- {
- int y = temp_y[i];
- int x = temp_x[i];
+/*!
+ * @brief 指定のマスが光を通さず射線のみを通すかを返す。 / Aux function -- see below
+ * @param y 指定Y座標
+ * @param x 指定X座標
+ * @return 射線を通すならばtrueを返す。
+ */
+static bool cave_pass_dark_bold(int y, int x)
+{
+ return cave_have_flag_bold(y, x, FF_PROJECT);
+}
- cave_type *c_ptr = &cave[y][x];
- /* No longer in the array */
- c_ptr->info &= ~(CAVE_TEMP);
+/*!
+ * @brief 部屋内にある一点の周囲がいくつ射線を通すかをグローバル変数temp_nに返す / Aux function -- see below
+ * @param y 指定Y座標
+ * @param x 指定X座標
+ * @return なし
+ */
+static void cave_temp_unlite_room_aux(int y, int x)
+{
+ cave_temp_room_aux(y, x, TRUE, cave_pass_dark_bold);
+}
- /* Update only non-CAVE_GLOW grids */
- /* if (c_ptr->info & (CAVE_GLOW)) continue; */
- /* Perma-Lite */
- c_ptr->info |= (CAVE_GLOW);
+/*!
+ * @brief 指定された部屋内を照らす / Illuminate any room containing the given location.
+ * @param y1 指定Y座標
+ * @param x1 指定X座標
+ * @return なし
+ */
+void lite_room(int y1, int x1)
+{
+ int i, x, y;
- /* Process affected monsters */
- if (c_ptr->m_idx)
- {
- int chance = 25;
+ /* Add the initial grid */
+ cave_temp_lite_room_aux(y1, x1);
- monster_type *m_ptr = &m_list[c_ptr->m_idx];
+ /* While grids are in the queue, add their neighbors */
+ for (i = 0; i < temp_n; i++)
+ {
+ x = temp_x[i], y = temp_y[i];
- monster_race *r_ptr = &r_info[m_ptr->r_idx];
+ /* Walls get lit, but stop light */
+ if (!cave_pass_lite_bold(y, x)) continue;
- /* Update the monster */
- update_mon(c_ptr->m_idx, FALSE);
+ /* Spread adjacent */
+ cave_temp_lite_room_aux(y + 1, x);
+ cave_temp_lite_room_aux(y - 1, x);
+ cave_temp_lite_room_aux(y, x + 1);
+ cave_temp_lite_room_aux(y, x - 1);
- /* Stupid monsters rarely wake up */
- if (r_ptr->flags2 & (RF2_STUPID)) chance = 10;
+ /* Spread diagonal */
+ cave_temp_lite_room_aux(y + 1, x + 1);
+ cave_temp_lite_room_aux(y - 1, x - 1);
+ cave_temp_lite_room_aux(y - 1, x + 1);
+ cave_temp_lite_room_aux(y + 1, x - 1);
+ }
- /* Smart monsters always wake up */
- if (r_ptr->flags2 & (RF2_SMART)) chance = 100;
+ /* Now, lite them all up at once */
+ cave_temp_room_lite();
- /* Sometimes monsters wake up */
- if (MON_CSLEEP(m_ptr) && (randint0(100) < chance))
- {
- /* Wake up! */
- (void)set_monster_csleep(c_ptr->m_idx, 0);
+ if (p_ptr->special_defense & NINJA_S_STEALTH)
+ {
+ if (cave[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(FALSE);
+ }
+}
- /* Notice the "waking up" */
- if (is_seen(m_ptr))
- {
- char m_name[80];
- /* Acquire the monster name */
- monster_desc(m_name, m_ptr, 0);
+/*!
+ * @brief 指定された部屋内を暗くする / Darken all rooms containing the given location
+ * @param y1 指定Y座標
+ * @param x1 指定X座標
+ * @return なし
+ */
+void unlite_room(int y1, int x1)
+{
+ int i, x, y;
- /* Dump a message */
-#ifdef JP
- msg_format("%^s¤¬Ìܤò³Ð¤Þ¤·¤¿¡£", m_name);
-#else
- msg_format("%^s wakes up.", m_name);
-#endif
- }
- }
- }
+ /* Add the initial grid */
+ cave_temp_unlite_room_aux(y1, x1);
- /* Note */
- note_spot(y, x);
+ /* Spread, breadth first */
+ for (i = 0; i < temp_n; i++)
+ {
+ x = temp_x[i], y = temp_y[i];
- /* Redraw */
- lite_spot(y, x);
+ /* Walls get dark, but stop darkness */
+ if (!cave_pass_dark_bold(y, x)) continue;
- update_local_illumination(y, x);
+ /* Spread adjacent */
+ cave_temp_unlite_room_aux(y + 1, x);
+ cave_temp_unlite_room_aux(y - 1, x);
+ cave_temp_unlite_room_aux(y, x + 1);
+ cave_temp_unlite_room_aux(y, x - 1);
+
+ /* Spread diagonal */
+ cave_temp_unlite_room_aux(y + 1, x + 1);
+ cave_temp_unlite_room_aux(y - 1, x - 1);
+ cave_temp_unlite_room_aux(y - 1, x + 1);
+ cave_temp_unlite_room_aux(y + 1, x - 1);
}
- /* None left */
- temp_n = 0;
+ /* Now, darken them all at once */
+ cave_temp_room_unlite();
}
-/*
- * This routine clears the entire "temp" set.
- *
- * This routine will "darken" all "temp" grids.
- *
- * In addition, some of these grids will be "unmarked".
- *
- * This routine is used (only) by "unlite_room()"
- *
- * Also, process all affected monsters
+/*!
+ * @brief プレイヤー位置を中心にLITE_WEAK属性を通じた照明処理を行う / Hack -- call light around the player Affect all monsters in the projection radius
+ * @param dam 威力
+ * @param rad 効果半径
+ * @return 作用が実際にあった場合TRUEを返す
*/
-static void cave_temp_room_unlite(void)
+bool lite_area(HIT_POINT dam, int rad)
{
- int i;
+ BIT_FLAGS flg = PROJECT_GRID | PROJECT_KILL;
+
+ if (d_info[dungeon_type].flags1 & DF1_DARKNESS)
+ {
+ msg_print(_("ダンジョンが光を吸収した。", "The darkness of this dungeon absorb your light."));
+ return FALSE;
+ }
+
+ /* Hack -- Message */
+ if (!p_ptr->blind)
+ {
+ msg_print(_("白い光が辺りを覆った。", "You are surrounded by a white light."));
+ }
+
+ /* Hook into the "project()" function */
+ (void)project(0, rad, p_ptr->y, p_ptr->x, dam, GF_LITE_WEAK, flg, -1);
+
+ /* Lite up the room */
+ lite_room(p_ptr->y, p_ptr->x);
- /* Clear them all */
- for (i = 0; i < temp_n; i++)
- {
- int y = temp_y[i];
- int x = temp_x[i];
- int j;
+ /* Assume seen */
+ return (TRUE);
+}
- cave_type *c_ptr = &cave[y][x];
- bool do_dark = !is_mirror_grid(c_ptr);
- /* No longer in the array */
- c_ptr->info &= ~(CAVE_TEMP);
+/*!
+ * @brief プレイヤー位置を中心にLITE_DARK属性を通じた消灯処理を行う / Hack -- call light around the player Affect all monsters in the projection radius
+ * @param dam 威力
+ * @param rad 効果半径
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool unlite_area(HIT_POINT dam, int rad)
+{
+ BIT_FLAGS flg = PROJECT_GRID | PROJECT_KILL;
- /* Darken the grid */
- if (do_dark)
- {
- if (dun_level || !is_daytime())
- {
- for (j = 0; j < 9; j++)
- {
- int by = y + ddy_ddd[j];
- int bx = x + ddx_ddd[j];
+ /* Hack -- Message */
+ if (!p_ptr->blind)
+ {
+ msg_print(_("暗闇が辺りを覆った。", "Darkness surrounds you."));
+ }
- if (in_bounds2(by, bx))
- {
- cave_type *cc_ptr = &cave[by][bx];
+ /* Hook into the "project()" function */
+ (void)project(0, rad, p_ptr->y, p_ptr->x, dam, GF_DARK_WEAK, flg, -1);
- if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
- {
- do_dark = FALSE;
- break;
- }
- }
- }
+ /* Lite up the room */
+ unlite_room(p_ptr->y, p_ptr->x);
- if (!do_dark) continue;
- }
+ /* Assume seen */
+ return (TRUE);
+}
- c_ptr->info &= ~(CAVE_GLOW);
- /* Hack -- Forget "boring" grids */
- if (!have_flag(f_info[get_feat_mimic(c_ptr)].flags, FF_REMEMBER))
- {
- /* Forget the grid */
- if (!view_torch_grids) c_ptr->info &= ~(CAVE_MARK);
- /* Notice */
- note_spot(y, x);
- }
+/*!
+ * @brief ボール系スペルの発動 / Cast a ball spell
+ * @param typ 効果属性
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dam 威力
+ * @param rad 半径
+ * @return 作用が実際にあった場合TRUEを返す
+ * @details
+ * <pre>
+ * Stop if we hit a monster, act as a "ball"
+ * Allow "target" mode to pass over monsters
+ * Affect grids, objects, and monsters
+ * </pre>
+ */
+bool fire_ball(int typ, int dir, HIT_POINT dam, int rad)
+{
+ int tx, ty;
- /* Process affected monsters */
- if (c_ptr->m_idx)
- {
- /* Update the monster */
- update_mon(c_ptr->m_idx, FALSE);
- }
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
- /* Redraw */
- lite_spot(y, x);
+ if (typ == GF_CHARM_LIVING) flg|= PROJECT_HIDE;
+ /* Use the given direction */
+ tx = p_ptr->x + 99 * ddx[dir];
+ ty = p_ptr->y + 99 * ddy[dir];
- update_local_illumination(y, x);
- }
+ /* Hack -- Use an actual "target" */
+ if ((dir == 5) && target_okay())
+ {
+ flg &= ~(PROJECT_STOP);
+ tx = target_col;
+ ty = target_row;
}
- /* None left */
- temp_n = 0;
+ /* Analyze the "dir" and the "target". Hurt items on floor. */
+ return (project(0, rad, ty, tx, dam, typ, flg, -1));
+}
+
+/*!
+* @brief ブレス系スペルの発動 / Cast a breath spell
+* @param typ 効果属性
+* @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+* @param dam 威力
+* @param rad 半径
+* @return 作用が実際にあった場合TRUEを返す
+* @details
+* <pre>
+* Stop if we hit a monster, act as a "ball"
+* Allow "target" mode to pass over monsters
+* Affect grids, objects, and monsters
+* </pre>
+*/
+bool fire_breath(int typ, int dir, HIT_POINT dam, int rad)
+{
+ return fire_ball(typ, dir, dam, -rad);
}
-/*
- * Determine how much contiguous open space this grid is next to
+/*!
+ * @brief ロケット系スペルの発動(詳細な差は確認中) / Cast a ball spell
+ * @param typ 効果属性
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dam 威力
+ * @param rad 半径
+ * @return 作用が実際にあった場合TRUEを返す
+ * @details
+ * <pre>
+ * Stop if we hit a monster, act as a "ball"
+ * Allow "target" mode to pass over monsters
+ * Affect grids, objects, and monsters
+ * </pre>
*/
-static int next_to_open(int cy, int cx, bool (*pass_bold)(int, int))
+bool fire_rocket(int typ, int dir, HIT_POINT dam, int rad)
{
- int i;
+ int tx, ty;
- int y, x;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
- int len = 0;
- int blen = 0;
+ /* Use the given direction */
+ tx = p_ptr->x + 99 * ddx[dir];
+ ty = p_ptr->y + 99 * ddy[dir];
- for (i = 0; i < 16; i++)
+ /* Hack -- Use an actual "target" */
+ if ((dir == 5) && target_okay())
{
- y = cy + ddy_cdd[i % 8];
- x = cx + ddx_cdd[i % 8];
-
- /* Found a wall, break the length */
- if (!pass_bold(y, x))
- {
- /* Track best length */
- if (len > blen)
- {
- blen = len;
- }
-
- len = 0;
- }
- else
- {
- len++;
- }
+ tx = target_col;
+ ty = target_row;
}
- return (MAX(len, blen));
+ /* Analyze the "dir" and the "target". Hurt items on floor. */
+ return (project(0, rad, ty, tx, dam, typ, flg, -1));
}
-static int next_to_walls_adj(int cy, int cx, bool (*pass_bold)(int, int))
+/*!
+ * @brief ボール(ハイド)系スペルの発動 / Cast a ball spell
+ * @param typ 効果属性
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dam 威力
+ * @param rad 半径
+ * @return 作用が実際にあった場合TRUEを返す
+ * @details
+ * <pre>
+ * Stop if we hit a monster, act as a "ball"
+ * Allow "target" mode to pass over monsters
+ * Affect grids, objects, and monsters
+ * </pre>
+ */
+bool fire_ball_hide(int typ, int dir, HIT_POINT dam, int rad)
{
- int i;
+ int tx, ty;
- int y, x;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_HIDE;
- int c = 0;
+ /* Use the given direction */
+ tx = p_ptr->x + 99 * ddx[dir];
+ ty = p_ptr->y + 99 * ddy[dir];
- for (i = 0; i < 8; i++)
+ /* Hack -- Use an actual "target" */
+ if ((dir == 5) && target_okay())
{
- y = cy + ddy_ddd[i];
- x = cx + ddx_ddd[i];
-
- if (!pass_bold(y, x)) c++;
+ flg &= ~(PROJECT_STOP);
+ tx = target_col;
+ ty = target_row;
}
- return c;
+ /* Analyze the "dir" and the "target". Hurt items on floor. */
+ return (project(0, rad, ty, tx, dam, typ, flg, -1));
}
-/*
- * Aux function -- see below
+/*!
+ * @brief メテオ系スペルの発動 / Cast a meteor spell
+ * @param who スぺル詠唱者のモンスターID(0=プレイヤー)
+ * @param typ 効果属性
+ * @param dam 威力
+ * @param rad 半径
+ * @param y 中心点Y座標
+ * @param x 中心点X座標
+ * @return 作用が実際にあった場合TRUEを返す
+ * @details
+ * <pre>
+ * Cast a meteor spell, defined as a ball spell cast by an arbitary monster,
+ * player, or outside source, that starts out at an arbitrary location, and
+ * leaving no trail from the "caster" to the target. This function is
+ * especially useful for bombardments and similar. -LM-
+ * Option to hurt the player.
+ * </pre>
*/
-static void cave_temp_room_aux(int y, int x, bool only_room, bool (*pass_bold)(int, int))
+bool fire_meteor(MONSTER_IDX who, EFFECT_ID typ, POSITION y, POSITION x, HIT_POINT dam, POSITION rad)
{
- cave_type *c_ptr;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
- /* Get the grid */
- c_ptr = &cave[y][x];
+ /* Analyze the "target" and the caster. */
+ return (project(who, rad, y, x, dam, typ, flg, -1));
+}
- /* Avoid infinite recursion */
- if (c_ptr->info & (CAVE_TEMP)) return;
- /* Do not "leave" the current room */
- if (!(c_ptr->info & (CAVE_ROOM)))
- {
- if (only_room) return;
+/*!
+ * @brief ブラスト系スペルの発動 / Cast a blast spell
+ * @param typ 効果属性
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dd 威力ダイス数
+ * @param ds 威力ダイス目
+ * @param num 基本回数
+ * @param dev 回数分散
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool fire_blast(int typ, int dir, int dd, int ds, int num, int dev)
+{
+ int ly, lx, ld;
+ int ty, tx, y, x;
+ int i;
- /* Verify */
- if (!in_bounds2(y, x)) return;
+ BIT_FLAGS flg = PROJECT_FAST | PROJECT_THRU | PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE | PROJECT_GRID;
- /* Do not exceed the maximum spell range */
- if (distance(py, px, y, x) > MAX_RANGE) return;
+ /* Assume okay */
+ bool result = TRUE;
- /* Verify this grid */
- /*
- * The reason why it is ==6 instead of >5 is that 8 is impossible
- * due to the check for cave_bold above.
- * 7 lights dead-end corridors (you need to do this for the
- * checkboard interesting rooms, so that the boundary is lit
- * properly.
- * This leaves only a check for 6 bounding walls!
- */
- if (in_bounds(y, x) && pass_bold(y, x) &&
- (next_to_walls_adj(y, x, pass_bold) == 6) && (next_to_open(y, x, pass_bold) <= 1)) return;
+ /* Use the given direction */
+ if (dir != 5)
+ {
+ ly = ty = p_ptr->y + 20 * ddy[dir];
+ lx = tx = p_ptr->x + 20 * ddx[dir];
}
- /* Paranoia -- verify space */
- if (temp_n == TEMP_MAX) return;
+ /* Use an actual "target" */
+ else /* if (dir == 5) */
+ {
+ tx = target_col;
+ ty = target_row;
- /* Mark the grid as "seen" */
- c_ptr->info |= (CAVE_TEMP);
+ lx = 20 * (tx - p_ptr->x) + p_ptr->x;
+ ly = 20 * (ty - p_ptr->y) + p_ptr->y;
+ }
- /* Add it to the "seen" set */
- temp_y[temp_n] = y;
- temp_x[temp_n] = x;
- temp_n++;
-}
+ ld = distance(p_ptr->y, p_ptr->x, ly, lx);
-/*
- * Aux function -- see below
- */
-static bool cave_pass_lite_bold(int y, int x)
-{
- return cave_los_bold(y, x);
-}
+ /* Blast */
+ for (i = 0; i < num; i++)
+ {
+ while (1)
+ {
+ /* Get targets for some bolts */
+ y = rand_spread(ly, ld * dev / 20);
+ x = rand_spread(lx, ld * dev / 20);
-/*
- * Aux function -- see below
- */
-static void cave_temp_lite_room_aux(int y, int x)
-{
- cave_temp_room_aux(y, x, FALSE, cave_pass_lite_bold);
-}
+ if (distance(ly, lx, y, x) <= ld * dev / 20) break;
+ }
-/*
- * Aux function -- see below
- */
-static bool cave_pass_dark_bold(int y, int x)
-{
- return cave_have_flag_bold(y, x, FF_PROJECT);
+ /* Analyze the "dir" and the "target". */
+ if (!project(0, 0, y, x, damroll(dd, ds), typ, flg, -1))
+ {
+ result = FALSE;
+ }
+ }
+
+ return (result);
}
-/*
- * Aux function -- see below
+
+/*!
+ * @brief モンスターとの位置交換処理 / Switch position with a monster.
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @return 作用が実際にあった場合TRUEを返す
*/
-static void cave_temp_unlite_room_aux(int y, int x)
+bool teleport_swap(int dir)
{
- cave_temp_room_aux(y, x, TRUE, cave_pass_dark_bold);
-}
+ int tx, ty;
+ cave_type * c_ptr;
+ monster_type * m_ptr;
+ monster_race * r_ptr;
+
+ if ((dir == 5) && target_okay())
+ {
+ tx = target_col;
+ ty = target_row;
+ }
+ else
+ {
+ tx = p_ptr->x + ddx[dir];
+ ty = p_ptr->y + ddy[dir];
+ }
+ c_ptr = &cave[ty][tx];
+
+ if (p_ptr->anti_tele)
+ {
+ msg_print(_("不思議な力がテレポートを防いだ!", "A mysterious force prevents you from teleporting!"));
+ return FALSE;
+ }
+ if (!c_ptr->m_idx || (c_ptr->m_idx == p_ptr->riding))
+ {
+ msg_print(_("それとは場所を交換できません。", "You can't trade places with that!"));
+ /* Failure */
+ return FALSE;
+ }
+ if ((c_ptr->info & CAVE_ICKY) || (distance(ty, tx, p_ptr->y, p_ptr->x) > p_ptr->lev * 3 / 2 + 10))
+ {
+ msg_print(_("失敗した。", "Failed to swap."));
-/*
- * Illuminate any room containing the given location.
- */
-void lite_room(int y1, int x1)
-{
- int i, x, y;
+ /* Failure */
+ return FALSE;
+ }
- /* Add the initial grid */
- cave_temp_lite_room_aux(y1, x1);
+ m_ptr = &m_list[c_ptr->m_idx];
+ r_ptr = &r_info[m_ptr->r_idx];
- /* While grids are in the queue, add their neighbors */
- for (i = 0; i < temp_n; i++)
- {
- x = temp_x[i], y = temp_y[i];
+ (void)set_monster_csleep(c_ptr->m_idx, 0);
- /* Walls get lit, but stop light */
- if (!cave_pass_lite_bold(y, x)) continue;
+ if (r_ptr->flagsr & RFR_RES_TELE)
+ {
+ msg_print(_("テレポートを邪魔された!", "Your teleportation is blocked!"));
- /* Spread adjacent */
- cave_temp_lite_room_aux(y + 1, x);
- cave_temp_lite_room_aux(y - 1, x);
- cave_temp_lite_room_aux(y, x + 1);
- cave_temp_lite_room_aux(y, x - 1);
+ if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
- /* Spread diagonal */
- cave_temp_lite_room_aux(y + 1, x + 1);
- cave_temp_lite_room_aux(y - 1, x - 1);
- cave_temp_lite_room_aux(y - 1, x + 1);
- cave_temp_lite_room_aux(y + 1, x - 1);
+ /* Failure */
+ return FALSE;
}
- /* Now, lite them all up at once */
- cave_temp_room_lite();
+ sound(SOUND_TELEPORT);
- if (p_ptr->special_defense & NINJA_S_STEALTH)
- {
- if (cave[py][px].info & CAVE_GLOW) set_superstealth(FALSE);
- }
+ /* Swap the player and monster */
+ (void)move_player_effect(ty, tx, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
+
+ /* Success */
+ return TRUE;
}
-/*
- * Darken all rooms containing the given location
+/*!
+ * @brief 指定方向に飛び道具を飛ばす(フラグ任意指定) / Hack -- apply a "projection()" in a direction (or at the target)
+ * @param typ 効果属性
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dam 威力
+ * @param flg フラグ
+ * @return 作用が実際にあった場合TRUEを返す
*/
-void unlite_room(int y1, int x1)
+bool project_hook(int typ, int dir, HIT_POINT dam, BIT_FLAGS flg)
{
- int i, x, y;
-
- /* Add the initial grid */
- cave_temp_unlite_room_aux(y1, x1);
-
- /* Spread, breadth first */
- for (i = 0; i < temp_n; i++)
- {
- x = temp_x[i], y = temp_y[i];
+ int tx, ty;
- /* Walls get dark, but stop darkness */
- if (!cave_pass_dark_bold(y, x)) continue;
+ /* Pass through the target if needed */
+ flg |= (PROJECT_THRU);
- /* Spread adjacent */
- cave_temp_unlite_room_aux(y + 1, x);
- cave_temp_unlite_room_aux(y - 1, x);
- cave_temp_unlite_room_aux(y, x + 1);
- cave_temp_unlite_room_aux(y, x - 1);
+ /* Use the given direction */
+ tx = p_ptr->x + ddx[dir];
+ ty = p_ptr->y + ddy[dir];
- /* Spread diagonal */
- cave_temp_unlite_room_aux(y + 1, x + 1);
- cave_temp_unlite_room_aux(y - 1, x - 1);
- cave_temp_unlite_room_aux(y - 1, x + 1);
- cave_temp_unlite_room_aux(y + 1, x - 1);
+ /* Hack -- Use an actual "target" */
+ if ((dir == 5) && target_okay())
+ {
+ tx = target_col;
+ ty = target_row;
}
- /* Now, darken them all at once */
- cave_temp_room_unlite();
+ /* Analyze the "dir" and the "target", do NOT explode */
+ return (project(0, 0, ty, tx, dam, typ, flg, -1));
}
+/*!
+ * @brief ボルト系スペルの発動 / Cast a bolt spell.
+ * @param typ 効果属性
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dam 威力
+ * @return 作用が実際にあった場合TRUEを返す
+ * @details
+ * <pre>
+ * Stop if we hit a monster, as a "bolt".
+ * Affect monsters and grids (not objects).
+ * </pre>
+ */
+bool fire_bolt(int typ, int dir, HIT_POINT dam)
+{
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_GRID;
+ if (typ != GF_ARROW) flg |= PROJECT_REFLECTABLE;
+ return (project_hook(typ, dir, dam, flg));
+}
+
-/*
- * Hack -- call light around the player
- * Affect all monsters in the projection radius
+/*!
+ * @brief ビーム系スペルの発動 / Cast a beam spell.
+ * @param typ 効果属性
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dam 威力
+ * @return 作用が実際にあった場合TRUEを返す
+ * @details
+ * <pre>
+ * Pass through monsters, as a "beam".
+ * Affect monsters, grids and objects.
+ * </pre>
*/
-bool lite_area(int dam, int rad)
+bool fire_beam(int typ, int dir, HIT_POINT dam)
{
- int flg = PROJECT_GRID | PROJECT_KILL;
+ BIT_FLAGS flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_GRID | PROJECT_ITEM;
+ return (project_hook(typ, dir, dam, flg));
+}
- if (d_info[dungeon_type].flags1 & DF1_DARKNESS)
+
+/*!
+ * @brief 確率に応じたボルト系/ビーム系スペルの発動 / Cast a bolt spell, or rarely, a beam spell.
+ * @param prob ビーム化する確率(%)
+ * @param typ 効果属性
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dam 威力
+ * @return 作用が実際にあった場合TRUEを返す
+ * @details
+ * <pre>
+ * Pass through monsters, as a "beam".
+ * Affect monsters, grids and objects.
+ * </pre>
+ */
+bool fire_bolt_or_beam(int prob, int typ, int dir, HIT_POINT dam)
+{
+ if (randint0(100) < prob)
{
-#ifdef JP
- msg_print("¥À¥ó¥¸¥ç¥ó¤¬¸÷¤òµÛ¼ý¤·¤¿¡£");
-#else
- msg_print("The darkness of this dungeon absorb your light.");
-#endif
- return FALSE;
+ return (fire_beam(typ, dir, dam));
}
-
- /* Hack -- Message */
- if (!p_ptr->blind)
+ else
{
-#ifdef JP
-msg_print("Çò¤¤¸÷¤¬ÊÕ¤ê¤òʤ¤Ã¤¿¡£");
-#else
- msg_print("You are surrounded by a white light.");
-#endif
-
+ return (fire_bolt(typ, dir, dam));
}
+}
- /* Hook into the "project()" function */
- (void)project(0, rad, py, px, dam, GF_LITE_WEAK, flg, -1);
-
- /* Lite up the room */
- lite_room(py, px);
+/*!
+ * @brief LITE_WEAK属性による光源ビーム処理
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dam 威力
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool lite_line(int dir, HIT_POINT dam)
+{
+ BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_KILL;
+ return (project_hook(GF_LITE_WEAK, dir, dam, flg));
+}
- /* Assume seen */
- return (TRUE);
+/*!
+ * @brief 衰弱ボルト処理
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dam 威力
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool hypodynamic_bolt(int dir, HIT_POINT dam)
+{
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ return (project_hook(GF_HYPODYNAMIA, dir, dam, flg));
}
+/*!
+ * @brief 岩石溶解処理
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dam 威力
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool wall_to_mud(int dir, HIT_POINT dam)
+{
+ BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
+ return (project_hook(GF_KILL_WALL, dir, dam, flg));
+}
-/*
- * Hack -- call darkness around the player
- * Affect all monsters in the projection radius
+/*!
+ * @brief 魔法の施錠処理
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @return 作用が実際にあった場合TRUEを返す
*/
-bool unlite_area(int dam, int rad)
+bool wizard_lock(int dir)
{
- int flg = PROJECT_GRID | PROJECT_KILL;
+ BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
+ return (project_hook(GF_JAM_DOOR, dir, 20 + randint1(30), flg));
+}
- /* Hack -- Message */
- if (!p_ptr->blind)
- {
-#ifdef JP
-msg_print("°Å°Ç¤¬ÊÕ¤ê¤òʤ¤Ã¤¿¡£");
-#else
- msg_print("Darkness surrounds you.");
-#endif
+/*!
+ * @brief ドア破壊処理
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool destroy_door(int dir)
+{
+ BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
+ return (project_hook(GF_KILL_DOOR, dir, 0, flg));
+}
- }
+/*!
+ * @brief トラップ解除処理
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool disarm_trap(int dir)
+{
+ BIT_FLAGS flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
+ return (project_hook(GF_KILL_TRAP, dir, 0, flg));
+}
- /* Hook into the "project()" function */
- (void)project(0, rad, py, px, dam, GF_DARK_WEAK, flg, -1);
+/*!
+ * @brief モンスター回復処理
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param dam 威力
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool heal_monster(int dir, HIT_POINT dam)
+{
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ return (project_hook(GF_OLD_HEAL, dir, dam, flg));
+}
- /* Lite up the room */
- unlite_room(py, px);
+/*!
+ * @brief モンスター加速処理
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param power 効力
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool speed_monster(int dir, int power)
+{
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ return (project_hook(GF_OLD_SPEED, dir, power, flg));
+}
- /* Assume seen */
- return (TRUE);
+/*!
+ * @brief モンスター減速処理
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param power 効力
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool slow_monster(int dir, int power)
+{
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ return (project_hook(GF_OLD_SLOW, dir, power, flg));
}
+/*!
+ * @brief モンスター催眠処理
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param power 効力
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool sleep_monster(int dir, int power)
+{
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ return (project_hook(GF_OLD_SLEEP, dir, power, flg));
+}
+/*!
+ * @brief モンスター拘束(STASIS)処理
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @return 作用が実際にあった場合TRUEを返す
+ * @details 威力はプレイヤーレベル*2に固定
+ */
+bool stasis_monster(int dir)
+{
+ return (fire_ball_hide(GF_STASIS, dir, p_ptr->lev*2, 0));
+}
-/*
- * Cast a ball spell
- * Stop if we hit a monster, act as a "ball"
- * Allow "target" mode to pass over monsters
- * Affect grids, objects, and monsters
+/*!
+ * @brief 邪悪なモンスター拘束(STASIS)処理
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @return 作用が実際にあった場合TRUEを返す
+ * @details 威力はプレイヤーレベル*2に固定
*/
-bool fire_ball(int typ, int dir, int dam, int rad)
+bool stasis_evil(int dir)
{
- int tx, ty;
+ return (fire_ball_hide(GF_STASIS_EVIL, dir, p_ptr->lev*2, 0));
+}
- int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
+/*!
+ * @brief モンスター混乱処理
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param plev プレイヤーレベル(=効力)
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool confuse_monster(int dir, int plev)
+{
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ return (project_hook(GF_OLD_CONF, dir, plev, flg));
+}
- if (typ == GF_CONTROL_LIVING) flg|= PROJECT_HIDE;
- /* Use the given direction */
- tx = px + 99 * ddx[dir];
- ty = py + 99 * ddy[dir];
+/*!
+ * @brief モンスター朦朧処理
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param plev プレイヤーレベル(=効力)
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool stun_monster(int dir, int plev)
+{
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ return (project_hook(GF_STUN, dir, plev, flg));
+}
- /* Hack -- Use an actual "target" */
- if ((dir == 5) && target_okay())
- {
- flg &= ~(PROJECT_STOP);
- tx = target_col;
- ty = target_row;
- }
+/*!
+ * @brief チェンジモンスター処理
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param power 効力
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool poly_monster(int dir, int power)
+{
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ bool tester = (project_hook(GF_OLD_POLY, dir, power, flg));
+ if (tester)
+ chg_virtue(V_CHANCE, 1);
+ return(tester);
+}
- /* Analyze the "dir" and the "target". Hurt items on floor. */
- return (project(0, rad, ty, tx, dam, typ, flg, -1));
+/*!
+ * @brief クローンモンスター処理
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool clone_monster(int dir)
+{
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ return (project_hook(GF_OLD_CLONE, dir, 0, flg));
}
+/*!
+ * @brief モンスター恐慌処理
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param plev プレイヤーレベル(=効力)
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool fear_monster(int dir, int plev)
+{
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ return (project_hook(GF_TURN_ALL, dir, plev, flg));
+}
-/*
- * Cast a ball spell
- * Stop if we hit a monster, act as a "ball"
- * Allow "target" mode to pass over monsters
- * Affect grids, objects, and monsters
+/*!
+ * @brief 死の光線処理
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param plev プレイヤーレベル(効力はplev*200)
+ * @return 作用が実際にあった場合TRUEを返す
*/
-bool fire_rocket(int typ, int dir, int dam, int rad)
+bool death_ray(int dir, int plev)
{
- int tx, ty;
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
+ return (project_hook(GF_DEATH_RAY, dir, plev * 200, flg));
+}
- int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
+/*!
+ * @brief モンスター用テレポート処理
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param distance 移動距離
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool teleport_monster(int dir, int distance)
+{
+ BIT_FLAGS flg = PROJECT_BEAM | PROJECT_KILL;
+ return (project_hook(GF_AWAY_ALL, dir, distance, flg));
+}
- /* Use the given direction */
- tx = px + 99 * ddx[dir];
- ty = py + 99 * ddy[dir];
+/*!
+ * @brief ドア生成処理(プレイヤー中心に周囲1マス) / Hooks -- affect adjacent grids (radius 1 ball attack)
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool door_creation(void)
+{
+ BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
+ return (project(0, 1, p_ptr->y, p_ptr->x, 0, GF_MAKE_DOOR, flg, -1));
+}
- /* Hack -- Use an actual "target" */
- if ((dir == 5) && target_okay())
- {
- tx = target_col;
- ty = target_row;
- }
+/*!
+ * @brief トラップ生成処理(起点から周囲1マス)
+ * @param y 起点Y座標
+ * @param x 起点X座標
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool trap_creation(int y, int x)
+{
+ BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
+ return (project(0, 1, y, x, 0, GF_MAKE_TRAP, flg, -1));
+}
- /* Analyze the "dir" and the "target". Hurt items on floor. */
- return (project(0, rad, ty, tx, dam, typ, flg, -1));
+/*!
+ * @brief 森林生成処理(プレイヤー中心に周囲1マス)
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool tree_creation(void)
+{
+ BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
+ return (project(0, 1, p_ptr->y, p_ptr->x, 0, GF_MAKE_TREE, flg, -1));
}
+/*!
+ * @brief 魔法のルーン生成処理(プレイヤー中心に周囲1マス)
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool glyph_creation(void)
+{
+ BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM;
+ return (project(0, 1, p_ptr->y, p_ptr->x, 0, GF_MAKE_GLYPH, flg, -1));
+}
-/*
- * Cast a ball spell
- * Stop if we hit a monster, act as a "ball"
- * Allow "target" mode to pass over monsters
- * Affect grids, objects, and monsters
+/*!
+ * @brief 壁生成処理(プレイヤー中心に周囲1マス)
+ * @return 作用が実際にあった場合TRUEを返す
*/
-bool fire_ball_hide(int typ, int dir, int dam, int rad)
+bool wall_stone(void)
{
- int tx, ty;
+ BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
- int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_HIDE;
+ bool dummy = (project(0, 1, p_ptr->y, p_ptr->x, 0, GF_STONE_WALL, flg, -1));
- /* Use the given direction */
- tx = px + 99 * ddx[dir];
- ty = py + 99 * ddy[dir];
+ /* Update stuff */
+ p_ptr->update |= (PU_FLOW);
- /* Hack -- Use an actual "target" */
- if ((dir == 5) && target_okay())
- {
- flg &= ~(PROJECT_STOP);
- tx = target_col;
- ty = target_row;
- }
+ /* Redraw map */
+ p_ptr->redraw |= (PR_MAP);
- /* Analyze the "dir" and the "target". Hurt items on floor. */
- return (project(0, rad, ty, tx, dam, typ, flg, -1));
+ return dummy;
}
+/*!
+ * @brief ドア破壊処理(プレイヤー中心に周囲1マス)
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool destroy_doors_touch(void)
+{
+ BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
+ return (project(0, 1, p_ptr->y, p_ptr->x, 0, GF_KILL_DOOR, flg, -1));
+}
-/*
- * Cast a meteor spell, defined as a ball spell cast by an arbitary monster,
- * player, or outside source, that starts out at an arbitrary location, and
- * leaving no trail from the "caster" to the target. This function is
- * especially useful for bombardments and similar. -LM-
- *
- * Option to hurt the player.
+/*!
+ * @brief トラップ解除処理(プレイヤー中心に周囲1マス)
+ * @return 作用が実際にあった場合TRUEを返す
*/
-bool fire_meteor(int who, int typ, int y, int x, int dam, int rad)
+bool disarm_traps_touch(void)
{
- int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
+ BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
+ return (project(0, 1, p_ptr->y, p_ptr->x, 0, GF_KILL_TRAP, flg, -1));
+}
- /* Analyze the "target" and the caster. */
- return (project(who, rad, y, x, dam, typ, flg, -1));
+/*!
+ * @brief スリープモンスター処理(プレイヤー中心に周囲1マス)
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool sleep_monsters_touch(void)
+{
+ BIT_FLAGS flg = PROJECT_KILL | PROJECT_HIDE;
+ return (project(0, 1, p_ptr->y, p_ptr->x, p_ptr->lev, GF_OLD_SLEEP, flg, -1));
}
-bool fire_blast(int typ, int dir, int dd, int ds, int num, int dev)
+/*!
+ * @brief 死者復活処理(起点より周囲5マス)
+ * @param who 術者モンスターID(0ならばプレイやー)
+ * @param y 起点Y座標
+ * @param x 起点X座標
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool animate_dead(MONSTER_IDX who, POSITION y, POSITION x)
{
- int ly, lx, ld;
- int ty, tx, y, x;
- int i;
+ BIT_FLAGS flg = PROJECT_ITEM | PROJECT_HIDE;
+ return (project(who, 5, y, x, 0, GF_ANIM_DEAD, flg, -1));
+}
- int flg = PROJECT_FAST | PROJECT_THRU | PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE | PROJECT_GRID;
+/*!
+ * @brief 混沌招来処理
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+void call_chaos(void)
+{
+ int Chaos_type, dummy, dir;
+ int plev = p_ptr->lev;
+ bool line_chaos = FALSE;
- /* Assume okay */
- bool result = TRUE;
+ int hurt_types[31] =
+ {
+ GF_ELEC, GF_POIS, GF_ACID, GF_COLD,
+ GF_FIRE, GF_MISSILE, GF_ARROW, GF_PLASMA,
+ GF_HOLY_FIRE, GF_WATER, GF_LITE, GF_DARK,
+ GF_FORCE, GF_INERTIAL, GF_MANA, GF_METEOR,
+ GF_ICE, GF_CHAOS, GF_NETHER, GF_DISENCHANT,
+ GF_SHARDS, GF_SOUND, GF_NEXUS, GF_CONFUSION,
+ GF_TIME, GF_GRAVITY, GF_ROCKET, GF_NUKE,
+ GF_HELL_FIRE, GF_DISINTEGRATE, GF_PSY_SPEAR
+ };
- /* Use the given direction */
- if (dir != 5)
+ Chaos_type = hurt_types[randint0(31)];
+ if (one_in_(4)) line_chaos = TRUE;
+
+ if (one_in_(6))
+ {
+ for (dummy = 1; dummy < 10; dummy++)
+ {
+ if (dummy - 5)
+ {
+ if (line_chaos)
+ fire_beam(Chaos_type, dummy, 150);
+ else
+ fire_ball(Chaos_type, dummy, 150, 2);
+ }
+ }
+ }
+ else if (one_in_(3))
{
- ly = ty = py + 20 * ddy[dir];
- lx = tx = px + 20 * ddx[dir];
+ fire_ball(Chaos_type, 0, 500, 8);
}
-
- /* Use an actual "target" */
- else /* if (dir == 5) */
+ else
{
- tx = target_col;
- ty = target_row;
-
- lx = 20 * (tx - px) + px;
- ly = 20 * (ty - py) + py;
+ if (!get_aim_dir(&dir)) return;
+ if (line_chaos)
+ fire_beam(Chaos_type, dir, 250);
+ else
+ fire_ball(Chaos_type, dir, 250, 3 + (plev / 35));
}
+}
- ld = distance(py, px, ly, lx);
+/*!
+ * @brief TY_CURSE処理発動 / Activate the evil Topi Ylinen curse
+ * @param stop_ty 再帰処理停止フラグ
+ * @param count 発動回数
+ * @return 作用が実際にあった場合TRUEを返す
+ * @details
+ * <pre>
+ * rr9: Stop the nasty things when a Cyberdemon is summoned
+ * or the player gets paralyzed.
+ * </pre>
+ */
+bool activate_ty_curse(bool stop_ty, int *count)
+{
+ int i = 0;
- /* Blast */
- for (i = 0; i < num; i++)
+ BIT_FLAGS flg = (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP);
+
+ do
{
- while (1)
+ switch (randint1(34))
{
- /* Get targets for some bolts */
- y = rand_spread(ly, ld * dev / 20);
- x = rand_spread(lx, ld * dev / 20);
-
- if (distance(ly, lx, y, x) <= ld * dev / 20) break;
- }
+ case 28: case 29:
+ if (!(*count))
+ {
+ msg_print(_("地面が揺れた...", "The ground trembles..."));
+ earthquake(p_ptr->y, p_ptr->x, 5 + randint0(10));
+ if (!one_in_(6)) break;
+ }
+ case 30: case 31:
+ if (!(*count))
+ {
+ HIT_POINT dam = damroll(10, 10);
+ msg_print(_("純粋な魔力の次元への扉が開いた!", "A portal opens to a plane of raw mana!"));
+ project(0, 8, p_ptr->y, p_ptr->x, dam, GF_MANA, flg, -1);
+ take_hit(DAMAGE_NOESCAPE, dam, _("純粋な魔力の解放", "released pure mana"), -1);
+ if (!one_in_(6)) break;
+ }
+ case 32: case 33:
+ if (!(*count))
+ {
+ msg_print(_("周囲の空間が歪んだ!", "Space warps about you!"));
+ teleport_player(damroll(10, 10), TELEPORT_PASSIVE);
+ if (randint0(13)) (*count) += activate_hi_summon(p_ptr->y, p_ptr->x, FALSE);
+ if (!one_in_(6)) break;
+ }
+ case 34:
+ msg_print(_("エネルギーのうねりを感じた!", "You feel a surge of energy!"));
+ wall_breaker();
+ if (!randint0(7))
+ {
+ project(0, 7, p_ptr->y, p_ptr->x, 50, GF_KILL_WALL, flg, -1);
+ take_hit(DAMAGE_NOESCAPE, 50, _("エネルギーのうねり", "surge of energy"), -1);
+ }
+ if (!one_in_(6)) break;
+ case 1: case 2: case 3: case 16: case 17:
+ aggravate_monsters(0);
+ if (!one_in_(6)) break;
+ case 4: case 5: case 6:
+ (*count) += activate_hi_summon(p_ptr->y, p_ptr->x, FALSE);
+ if (!one_in_(6)) break;
+ case 7: case 8: case 9: case 18:
+ (*count) += summon_specific(0, p_ptr->y, p_ptr->x, dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
+ if (!one_in_(6)) break;
+ case 10: case 11: case 12:
+ msg_print(_("経験値が体から吸い取られた気がする!", "You feel your experience draining away..."));
+ lose_exp(p_ptr->exp / 16);
+ if (!one_in_(6)) break;
+ case 13: case 14: case 15: case 19: case 20:
+ if (stop_ty || (p_ptr->free_act && (randint1(125) < p_ptr->skill_sav)) || (p_ptr->pclass == CLASS_BERSERKER))
+ {
+ /* Do nothing */ ;
+ }
+ else
+ {
+ msg_print(_("彫像になった気分だ!", "You feel like a statue!"));
+ if (p_ptr->free_act)
+ set_paralyzed(p_ptr->paralyzed + randint1(3));
+ else
+ set_paralyzed(p_ptr->paralyzed + randint1(13));
+ stop_ty = TRUE;
+ }
+ if (!one_in_(6)) break;
+ case 21: case 22: case 23:
+ (void)do_dec_stat(randint0(6));
+ if (!one_in_(6)) break;
+ case 24:
+ msg_print(_("ほえ?私は誰?ここで何してる?", "Huh? Who am I? What am I doing here?"));
+ lose_all_info();
+ if (!one_in_(6)) break;
+ case 25:
+ /*
+ * Only summon Cyberdemons deep in the dungeon.
+ */
+ if ((dun_level > 65) && !stop_ty)
+ {
+ (*count) += summon_cyber(-1, p_ptr->y, p_ptr->x);
+ stop_ty = TRUE;
+ break;
+ }
+ if (!one_in_(6)) break;
+ default:
+ while (i < 6)
+ {
+ do
+ {
+ (void)do_dec_stat(i);
+ }
+ while (one_in_(2));
- /* Analyze the "dir" and the "target". */
- if (!project(0, 0, y, x, damroll(dd, ds), typ, flg, -1))
- {
- result = FALSE;
+ i++;
+ }
}
}
+ while (one_in_(3) && !stop_ty);
- return (result);
+ return stop_ty;
}
-
-/*
- * Switch position with a monster.
+/*!
+ * @brief HI_SUMMON(上級召喚)処理発動
+ * @param y 召喚位置Y座標
+ * @param x 召喚位置X座標
+ * @param can_pet プレイヤーのペットとなる可能性があるならばTRUEにする
+ * @return 作用が実際にあった場合TRUEを返す
*/
-bool teleport_swap(int dir)
+int activate_hi_summon(POSITION y, POSITION x, bool can_pet)
{
- int tx, ty;
- cave_type * c_ptr;
- monster_type * m_ptr;
- monster_race * r_ptr;
+ int i;
+ int count = 0;
+ DEPTH summon_lev;
+ BIT_FLAGS mode = PM_ALLOW_GROUP;
+ bool pet = FALSE;
- if ((dir == 5) && target_okay())
- {
- tx = target_col;
- ty = target_row;
- }
- else
+ if (can_pet)
{
- tx = px + ddx[dir];
- ty = py + ddy[dir];
+ if (one_in_(4))
+ {
+ mode |= PM_FORCE_FRIENDLY;
+ }
+ else
+ {
+ mode |= PM_FORCE_PET;
+ pet = TRUE;
+ }
}
- c_ptr = &cave[ty][tx];
- if (p_ptr->anti_tele)
- {
-#ifdef JP
-msg_print("ÉԻ׵ĤÊÎϤ¬¥Æ¥ì¥Ý¡¼¥È¤òËɤ¤¤À¡ª");
-#else
- msg_print("A mysterious force prevents you from teleporting!");
-#endif
+ if (!pet) mode |= PM_NO_PET;
- return FALSE;
+ summon_lev = (pet ? p_ptr->lev * 2 / 3 + randint1(p_ptr->lev / 2) : dun_level);
+
+ for (i = 0; i < (randint1(7) + (dun_level / 40)); i++)
+ {
+ switch (randint1(25) + (dun_level / 20))
+ {
+ case 1: case 2:
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_ANT, mode);
+ break;
+ case 3: case 4:
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_SPIDER, mode);
+ break;
+ case 5: case 6:
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HOUND, mode);
+ break;
+ case 7: case 8:
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HYDRA, mode);
+ break;
+ case 9: case 10:
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_ANGEL, mode);
+ break;
+ case 11: case 12:
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_UNDEAD, mode);
+ break;
+ case 13: case 14:
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_DRAGON, mode);
+ break;
+ case 15: case 16:
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_DEMON, mode);
+ break;
+ case 17:
+ if (can_pet) break;
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_AMBERITES, (mode | PM_ALLOW_UNIQUE));
+ break;
+ case 18: case 19:
+ if (can_pet) break;
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_UNIQUE, (mode | PM_ALLOW_UNIQUE));
+ break;
+ case 20: case 21:
+ if (!can_pet) mode |= PM_ALLOW_UNIQUE;
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HI_UNDEAD, mode);
+ break;
+ case 22: case 23:
+ if (!can_pet) mode |= PM_ALLOW_UNIQUE;
+ count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HI_DRAGON, mode);
+ break;
+ case 24:
+ count += summon_specific((pet ? -1 : 0), y, x, 100, SUMMON_CYBER, mode);
+ break;
+ default:
+ if (!can_pet) mode |= PM_ALLOW_UNIQUE;
+ count += summon_specific((pet ? -1 : 0), y, x,pet ? summon_lev : (((summon_lev * 3) / 2) + 5), 0, mode);
+ }
}
- if (!c_ptr->m_idx || (c_ptr->m_idx == p_ptr->riding))
- {
-#ifdef JP
-msg_print("¤½¤ì¤È¤Ï¾ì½ê¤ò¸ò´¹¤Ç¤¤Þ¤»¤ó¡£");
-#else
- msg_print("You can't trade places with that!");
-#endif
+ return count;
+}
- /* Failure */
- return FALSE;
- }
+/*!
+ * @brief サイバーデーモンの召喚
+ * @param who 召喚主のモンスターID(0ならばプレイヤー)
+ * @param y 召喚位置Y座標
+ * @param x 召喚位置X座標
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+int summon_cyber(MONSTER_IDX who, POSITION y, POSITION x)
+{
+ int i;
+ int max_cyber = (easy_band ? 1 : (dun_level / 50) + randint1(2));
+ int count = 0;
+ BIT_FLAGS mode = PM_ALLOW_GROUP;
- if ((c_ptr->info & CAVE_ICKY) || (distance(ty, tx, py, px) > p_ptr->lev * 3 / 2 + 10))
+ /* Summoned by a monster */
+ if (who > 0)
{
-#ifdef JP
-msg_print("¼ºÇÔ¤·¤¿¡£");
-#else
- msg_print("Failed to swap.");
-#endif
-
-
- /* Failure */
- return FALSE;
+ monster_type *m_ptr = &m_list[who];
+ if (is_pet(m_ptr)) mode |= PM_FORCE_PET;
}
- m_ptr = &m_list[c_ptr->m_idx];
- r_ptr = &r_info[m_ptr->r_idx];
-
- (void)set_monster_csleep(c_ptr->m_idx, 0);
+ if (max_cyber > 4) max_cyber = 4;
- if (r_ptr->flagsr & RFR_RES_TELE)
+ for (i = 0; i < max_cyber; i++)
{
-#ifdef JP
- msg_print("¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤵¤ì¤¿¡ª");
-#else
- msg_print("Your teleportation is blocked!");
-#endif
-
- if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
-
- /* Failure */
- return FALSE;
+ count += summon_specific(who, y, x, 100, SUMMON_CYBER, mode);
}
- sound(SOUND_TELEPORT);
-
- /* Swap the player and monster */
- (void)move_player_effect(ty, tx, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
-
- /* Success */
- return TRUE;
+ return count;
}
-
-/*
- * Hack -- apply a "projection()" in a direction (or at the target)
+/*!
+ * @brief 周辺破壊効果(プレイヤー中心)
+ * @return 作用が実際にあった場合TRUEを返す
*/
-bool project_hook(int typ, int dir, int dam, int flg)
+void wall_breaker(void)
{
- int tx, ty;
+ int i;
+ POSITION y = 0, x = 0;
+ int attempts = 1000;
- /* Pass through the target if needed */
- flg |= (PROJECT_THRU);
+ if (randint1(80 + p_ptr->lev) < 70)
+ {
+ while (attempts--)
+ {
+ scatter(&y, &x, p_ptr->y, p_ptr->x, 4, 0);
- /* Use the given direction */
- tx = px + ddx[dir];
- ty = py + ddy[dir];
+ if (!cave_have_flag_bold(y, x, FF_PROJECT)) continue;
- /* Hack -- Use an actual "target" */
- if ((dir == 5) && target_okay())
+ if (!player_bold(y, x)) break;
+ }
+
+ project(0, 0, y, x, 20 + randint1(30), GF_KILL_WALL,
+ (PROJECT_BEAM | PROJECT_THRU | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
+ }
+ else if (randint1(100) > 30)
{
- tx = target_col;
- ty = target_row;
+ earthquake(p_ptr->y, p_ptr->x, 1);
}
+ else
+ {
+ int num = damroll(5, 3);
- /* Analyze the "dir" and the "target", do NOT explode */
- return (project(0, 0, ty, tx, dam, typ, flg, -1));
+ for (i = 0; i < num; i++)
+ {
+ while (1)
+ {
+ scatter(&y, &x, p_ptr->y, p_ptr->x, 10, 0);
+
+ if (!player_bold(y, x)) break;
+ }
+
+ project(0, 0, y, x, 20 + randint1(30), GF_KILL_WALL,
+ (PROJECT_BEAM | PROJECT_THRU | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
+ }
+ }
}
-/*
- * Cast a bolt spell.
- * Stop if we hit a monster, as a "bolt".
- * Affect monsters and grids (not objects).
+/*!
+ * @brief パニック・モンスター効果(プレイヤー視界範囲内) / Confuse monsters
+ * @param dam 効力
+ * @return 作用が実際にあった場合TRUEを返す
*/
-bool fire_bolt(int typ, int dir, int dam)
+bool confuse_monsters(HIT_POINT dam)
{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE | PROJECT_GRID;
- return (project_hook(typ, dir, dam, flg));
+ return (project_hack(GF_OLD_CONF, dam));
}
-/*
- * Cast a beam spell.
- * Pass through monsters, as a "beam".
- * Affect monsters, grids and objects.
+/*!
+ * @brief チャーム・モンスター効果(プレイヤー視界範囲内) / Charm monsters
+ * @param dam 効力
+ * @return 作用が実際にあった場合TRUEを返す
*/
-bool fire_beam(int typ, int dir, int dam)
+bool charm_monsters(HIT_POINT dam)
{
- int flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_GRID | PROJECT_ITEM;
- return (project_hook(typ, dir, dam, flg));
+ return (project_hack(GF_CHARM, dam));
}
-/*
- * Cast a bolt spell, or rarely, a beam spell
+/*!
+ * @brief 動物魅了効果(プレイヤー視界範囲内) / Charm Animals
+ * @param dam 効力
+ * @return 作用が実際にあった場合TRUEを返す
*/
-bool fire_bolt_or_beam(int prob, int typ, int dir, int dam)
+bool charm_animals(HIT_POINT dam)
{
- if (randint0(100) < prob)
- {
- return (fire_beam(typ, dir, dam));
- }
- else
- {
- return (fire_bolt(typ, dir, dam));
- }
+ return (project_hack(GF_CONTROL_ANIMAL, dam));
}
-/*
- * Some of the old functions
+/*!
+ * @brief モンスター朦朧効果(プレイヤー視界範囲内) / Stun monsters
+ * @param dam 効力
+ * @return 作用が実際にあった場合TRUEを返す
*/
-bool lite_line(int dir)
+bool stun_monsters(HIT_POINT dam)
{
- int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_KILL;
- return (project_hook(GF_LITE_WEAK, dir, damroll(6, 8), flg));
+ return (project_hack(GF_STUN, dam));
}
-bool drain_life(int dir, int dam)
+/*!
+ * @brief モンスター停止効果(プレイヤー視界範囲内) / Stasis monsters
+ * @param dam 効力
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool stasis_monsters(HIT_POINT dam)
{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
- return (project_hook(GF_OLD_DRAIN, dir, dam, flg));
+ return (project_hack(GF_STASIS, dam));
}
-bool wall_to_mud(int dir)
+/*!
+ * @brief モンスター精神攻撃効果(プレイヤー視界範囲内) / Mindblast monsters
+ * @param dam 効力
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool mindblast_monsters(HIT_POINT dam)
{
- int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
- return (project_hook(GF_KILL_WALL, dir, 20 + randint1(30), flg));
+ return (project_hack(GF_PSI, dam));
}
-bool wizard_lock(int dir)
+/*!
+ * @brief モンスター追放効果(プレイヤー視界範囲内) / Banish all monsters
+ * @param dist 効力(距離)
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool banish_monsters(int dist)
{
- int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
- return (project_hook(GF_JAM_DOOR, dir, 20 + randint1(30), flg));
+ return (project_hack(GF_AWAY_ALL, dist));
}
-bool destroy_door(int dir)
+/*!
+ * @brief 邪悪退散効果(プレイヤー視界範囲内) / Turn evil
+ * @param dam 効力
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool turn_evil(HIT_POINT dam)
{
- int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
- return (project_hook(GF_KILL_DOOR, dir, 0, flg));
+ return (project_hack(GF_TURN_EVIL, dam));
}
-bool disarm_trap(int dir)
+/*!
+ * @brief 全モンスター退散効果(プレイヤー視界範囲内) / Turn everyone
+ * @param dam 効力
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool turn_monsters(HIT_POINT dam)
{
- int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
- return (project_hook(GF_KILL_TRAP, dir, 0, flg));
+ return (project_hack(GF_TURN_ALL, dam));
}
-bool heal_monster(int dir, int dam)
+/*!
+ * @brief 死の光線(プレイヤー視界範囲内) / Death-ray all monsters (note: OBSCENELY powerful)
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool deathray_monsters(void)
{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
- return (project_hook(GF_OLD_HEAL, dir, dam, flg));
+ return (project_hack(GF_DEATH_RAY, p_ptr->lev * 200));
}
-
-bool speed_monster(int dir)
+/*!
+ * @brief チャーム・モンスター(1体)
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param plev パワー
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool charm_monster(int dir, int plev)
{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
- return (project_hook(GF_OLD_SPEED, dir, p_ptr->lev, flg));
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL;
+ return (project_hook(GF_CHARM, dir, plev, flg));
}
-
-bool slow_monster(int dir)
+/*!
+ * @brief アンデッド支配(1体)
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param plev パワー
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool control_one_undead(int dir, int plev)
{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
- return (project_hook(GF_OLD_SLOW, dir, p_ptr->lev, flg));
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL;
+ return (project_hook(GF_CONTROL_UNDEAD, dir, plev, flg));
}
+/*!
+ * @brief 悪魔支配(1体)
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param plev パワー
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool control_one_demon(int dir, int plev)
+{
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL;
+ return (project_hook(GF_CONTROL_DEMON, dir, plev, flg));
+}
-bool sleep_monster(int dir)
+/*!
+ * @brief 動物支配(1体)
+ * @param dir 方向(5ならばグローバル変数 target_col/target_row の座標を目標にする)
+ * @param plev パワー
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool charm_animal(int dir, int plev)
{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
- return (project_hook(GF_OLD_SLEEP, dir, p_ptr->lev, flg));
+ BIT_FLAGS flg = PROJECT_STOP | PROJECT_KILL;
+ return (project_hook(GF_CONTROL_ANIMAL, dir, plev, flg));
}
-bool stasis_monster(int dir)
+/*!
+ * @brief 変わり身処理
+ * @param success 判定成功上の処理ならばTRUE
+ * @return 作用が実際にあった場合TRUEを返す
+ */
+bool kawarimi(bool success)
{
- return (fire_ball_hide(GF_STASIS, dir, p_ptr->lev*2, 0));
+ object_type forge;
+ object_type *q_ptr = &forge;
+ int y, x;
+
+ if (p_ptr->is_dead) return FALSE;
+ if (p_ptr->confused || p_ptr->blind || p_ptr->paralyzed || p_ptr->image) return FALSE;
+ if (randint0(200) < p_ptr->stun) return FALSE;
+
+ if (!success && one_in_(3))
+ {
+ msg_print(_("失敗!逃げられなかった。", "Failed! You couldn't run away."));
+ p_ptr->special_defense &= ~(NINJA_KAWARIMI);
+ p_ptr->redraw |= (PR_STATUS);
+ return FALSE;
+ }
+
+ y = p_ptr->y;
+ x = p_ptr->x;
+
+ teleport_player(10 + randint1(90), 0L);
+
+ object_wipe(q_ptr);
+
+ object_prep(q_ptr, lookup_kind(TV_STATUE, SV_WOODEN_STATUE));
+
+ q_ptr->pval = MON_NINJA;
+
+ /* Drop it in the dungeon */
+ (void)drop_near(q_ptr, -1, y, x);
+
+#ifdef JP
+ if (success) msg_print("攻撃を受ける前に素早く身をひるがえした。");
+ else msg_print("失敗!攻撃を受けてしまった。");
+#else
+ if (success) msg_print("You have turned around just before the attack hit you.");
+ else msg_print("Failed! You are hit by the attack.");
+#endif
+
+ p_ptr->special_defense &= ~(NINJA_KAWARIMI);
+ p_ptr->redraw |= (PR_STATUS);
+
+ /* Teleported */
+ return TRUE;
}
-bool stasis_evil(int dir)
+/*!
+ * @brief 入身処理 / "Rush Attack" routine for Samurai or Ninja
+ * @param mdeath 目標モンスターが死亡したかを返す
+ * @return 作用が実際にあった場合TRUEを返す / Return value is for checking "done"
+ */
+bool rush_attack(bool *mdeath)
{
- return (fire_ball_hide(GF_STASIS_EVIL, dir, p_ptr->lev*2, 0));
-}
+ int dir;
+ int tx, ty;
+ int tm_idx = 0;
+ u16b path_g[32];
+ int path_n, i;
+ bool tmp_mdeath = FALSE;
+ bool moved = FALSE;
+
+ if (mdeath) *mdeath = FALSE;
+
+ project_length = 5;
+ if (!get_aim_dir(&dir)) return FALSE;
+
+ /* Use the given direction */
+ tx = p_ptr->x + project_length * ddx[dir];
+ ty = p_ptr->y + project_length * ddy[dir];
+
+ /* Hack -- Use an actual "target" */
+ if ((dir == 5) && target_okay())
+ {
+ tx = target_col;
+ ty = target_row;
+ }
+
+ if (in_bounds(ty, tx)) tm_idx = cave[ty][tx].m_idx;
+
+ path_n = project_path(path_g, project_length, p_ptr->y, p_ptr->x, ty, tx, PROJECT_STOP | PROJECT_KILL);
+ project_length = 0;
+
+ /* No need to move */
+ if (!path_n) return TRUE;
+
+ /* Use ty and tx as to-move point */
+ ty = p_ptr->y;
+ tx = p_ptr->x;
+
+ /* Project along the path */
+ for (i = 0; i < path_n; i++)
+ {
+ monster_type *m_ptr;
+
+ int ny = GRID_Y(path_g[i]);
+ int nx = GRID_X(path_g[i]);
+
+ if (cave_empty_bold(ny, nx) && player_can_enter(cave[ny][nx].feat, 0))
+ {
+ ty = ny;
+ tx = nx;
+
+ /* Go to next grid */
+ continue;
+ }
+
+ if (!cave[ny][nx].m_idx)
+ {
+ if (tm_idx)
+ {
+ msg_print(_("失敗!", "Failed!"));
+ }
+ else
+ {
+ msg_print(_("ここには入身では入れない。", "You can't move to that place."));
+ }
+ /* Exit loop */
+ break;
+ }
-bool confuse_monster(int dir, int plev)
-{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
- return (project_hook(GF_OLD_CONF, dir, plev, flg));
-}
+ /* Move player before updating the monster */
+ if (!player_bold(ty, tx)) teleport_player_to(ty, tx, TELEPORT_NONMAGICAL);
+ /* Update the monster */
+ update_mon(cave[ny][nx].m_idx, TRUE);
-bool stun_monster(int dir, int plev)
-{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
- return (project_hook(GF_STUN, dir, plev, flg));
-}
+ /* Found a monster */
+ m_ptr = &m_list[cave[ny][nx].m_idx];
+ if (tm_idx != cave[ny][nx].m_idx)
+ {
+#ifdef JP
+ msg_format("%s%sが立ちふさがっている!", tm_idx ? "別の" : "",
+ m_ptr->ml ? "モンスター" : "何か");
+#else
+ msg_format("There is %s in the way!", m_ptr->ml ? (tm_idx ? "another monster" : "a monster") : "someone");
+#endif
+ }
+ else if (!player_bold(ty, tx))
+ {
+ /* Hold the monster name */
+ char m_name[80];
-bool poly_monster(int dir)
-{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
- bool tester = (project_hook(GF_OLD_POLY, dir, p_ptr->lev, flg));
- if (tester)
- chg_virtue(V_CHANCE, 1);
- return(tester);
-}
+ /* Get the monster name (BEFORE polymorphing) */
+ monster_desc(m_name, m_ptr, 0);
+ msg_format(_("素早く%sの懐に入り込んだ!", "You quickly jump in and attack %s!"), m_name);
+ }
+ if (!player_bold(ty, tx)) teleport_player_to(ty, tx, TELEPORT_NONMAGICAL);
+ moved = TRUE;
+ tmp_mdeath = py_attack(ny, nx, HISSATSU_NYUSIN);
-bool clone_monster(int dir)
-{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
- return (project_hook(GF_OLD_CLONE, dir, 0, flg));
-}
+ break;
+ }
+ if (!moved && !player_bold(ty, tx)) teleport_player_to(ty, tx, TELEPORT_NONMAGICAL);
-bool fear_monster(int dir, int plev)
-{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
- return (project_hook(GF_TURN_ALL, dir, plev, flg));
+ if (mdeath) *mdeath = tmp_mdeath;
+ return TRUE;
}
-bool death_ray(int dir, int plev)
+/*!
+ * @brief 全鏡の消去 / Remove all mirrors in this floor
+ * @param explode 爆発処理を伴うならばTRUE
+ * @return なし
+ */
+void remove_all_mirrors(bool explode)
{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
- return (project_hook(GF_DEATH_RAY, dir, plev * 200, flg));
-}
-
+ int x, y;
-bool teleport_monster(int dir)
-{
- int flg = PROJECT_BEAM | PROJECT_KILL;
- return (project_hook(GF_AWAY_ALL, dir, MAX_SIGHT * 5, flg));
+ for (x = 0; x < cur_wid; x++)
+ {
+ for (y = 0; y < cur_hgt; y++)
+ {
+ if (is_mirror_grid(&cave[y][x]))
+ {
+ remove_mirror(y, x);
+ if (explode)
+ project(0, 2, y, x, p_ptr->lev / 2 + 5, GF_SHARDS,
+ (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
+ }
+ }
+ }
}
-/*
- * Hooks -- affect adjacent grids (radius 1 ball attack)
+/*!
+ * @brief 『一つの指輪』の効果処理 /
+ * Hack -- activate the ring of power
+ * @param dir 発動の方向ID
+ * @return なし
*/
-bool door_creation(void)
+void ring_of_power(int dir)
{
- int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
- return (project(0, 1, py, px, 0, GF_MAKE_DOOR, flg, -1));
-}
+ /* Pick a random effect */
+ switch (randint1(10))
+ {
+ case 1:
+ case 2:
+ {
+ /* Message */
+ msg_print(_("あなたは悪性のオーラに包み込まれた。", "You are surrounded by a malignant aura."));
+ sound(SOUND_EVIL);
+ /* Decrease all stats (permanently) */
+ (void)dec_stat(A_STR, 50, TRUE);
+ (void)dec_stat(A_INT, 50, TRUE);
+ (void)dec_stat(A_WIS, 50, TRUE);
+ (void)dec_stat(A_DEX, 50, TRUE);
+ (void)dec_stat(A_CON, 50, TRUE);
+ (void)dec_stat(A_CHR, 50, TRUE);
-bool trap_creation(int y, int x)
-{
- int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
- return (project(0, 1, y, x, 0, GF_MAKE_TRAP, flg, -1));
-}
+ /* Lose some experience (permanently) */
+ p_ptr->exp -= (p_ptr->exp / 4);
+ p_ptr->max_exp -= (p_ptr->exp / 4);
+ check_experience();
+ break;
+ }
-bool tree_creation(void)
-{
- int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
- return (project(0, 1, py, px, 0, GF_MAKE_TREE, flg, -1));
-}
+ case 3:
+ {
+ /* Message */
+ msg_print(_("あなたは強力なオーラに包み込まれた。", "You are surrounded by a powerful aura."));
+ /* Dispel monsters */
+ dispel_monsters(1000);
-bool glyph_creation(void)
-{
- int flg = PROJECT_GRID | PROJECT_ITEM;
- return (project(0, 1, py, px, 0, GF_MAKE_GLYPH, flg, -1));
-}
+ break;
+ }
+ case 4:
+ case 5:
+ case 6:
+ {
+ /* Mana Ball */
+ fire_ball(GF_MANA, dir, 600, 3);
-bool wall_stone(void)
-{
- int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
+ break;
+ }
- bool dummy = (project(0, 1, py, px, 0, GF_STONE_WALL, flg, -1));
+ case 7:
+ case 8:
+ case 9:
+ case 10:
+ {
+ /* Mana Bolt */
+ fire_bolt(GF_MANA, dir, 500);
- /* Update stuff */
- p_ptr->update |= (PU_FLOW);
+ break;
+ }
+ }
+}
- /* Redraw map */
- p_ptr->redraw |= (PR_MAP);
+/*!
+* @brief 運命の輪、並びにカオス的な効果の発動
+* @param spell ランダムな効果を選択するための基準ID
+* @return なし
+*/
+void wild_magic(int spell)
+{
+ int counter = 0;
+ int type = SUMMON_MOLD + randint0(6);
- return dummy;
-}
+ if (type < SUMMON_MOLD) type = SUMMON_MOLD;
+ else if (type > SUMMON_MIMIC) type = SUMMON_MIMIC;
+ switch (randint1(spell) + randint1(8) + 1)
+ {
+ case 1:
+ case 2:
+ case 3:
+ teleport_player(10, TELEPORT_PASSIVE);
+ break;
+ case 4:
+ case 5:
+ case 6:
+ teleport_player(100, TELEPORT_PASSIVE);
+ break;
+ case 7:
+ case 8:
+ teleport_player(200, TELEPORT_PASSIVE);
+ break;
+ case 9:
+ case 10:
+ case 11:
+ unlite_area(10, 3);
+ break;
+ case 12:
+ case 13:
+ case 14:
+ lite_area(damroll(2, 3), 2);
+ break;
+ case 15:
+ destroy_doors_touch();
+ break;
+ case 16: case 17:
+ wall_breaker();
+ case 18:
+ sleep_monsters_touch();
+ break;
+ case 19:
+ case 20:
+ trap_creation(p_ptr->y, p_ptr->x);
+ break;
+ case 21:
+ case 22:
+ door_creation();
+ break;
+ case 23:
+ case 24:
+ case 25:
+ aggravate_monsters(0);
+ break;
+ case 26:
+ earthquake(p_ptr->y, p_ptr->x, 5);
+ break;
+ case 27:
+ case 28:
+ (void)gain_random_mutation(0);
+ break;
+ case 29:
+ case 30:
+ apply_disenchant(1);
+ break;
+ case 31:
+ lose_all_info();
+ break;
+ case 32:
+ fire_ball(GF_CHAOS, 0, spell + 5, 1 + (spell / 10));
+ break;
+ case 33:
+ wall_stone();
+ break;
+ case 34:
+ case 35:
+ while (counter++ < 8)
+ {
+ (void)summon_specific(0, p_ptr->y, p_ptr->x, (dun_level * 3) / 2, type, (PM_ALLOW_GROUP | PM_NO_PET));
+ }
+ break;
+ case 36:
+ case 37:
+ activate_hi_summon(p_ptr->y, p_ptr->x, FALSE);
+ break;
+ case 38:
+ (void)summon_cyber(-1, p_ptr->y, p_ptr->x);
+ break;
+ default:
+ {
+ int count = 0;
+ (void)activate_ty_curse(FALSE, &count);
+ break;
+ }
+ }
-bool destroy_doors_touch(void)
-{
- int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
- return (project(0, 1, py, px, 0, GF_KILL_DOOR, flg, -1));
+ return;
}
-
-bool sleep_monsters_touch(void)
+/*!
+* @brief カオス魔法「流星群」の処理としてプレイヤーを中心に隕石落下処理を10+1d10回繰り返す。
+* / Drop 10+1d10 meteor ball at random places near the player
+* @param dam ダメージ
+* @param rad 効力の半径
+* @return なし
+*/
+void cast_meteor(HIT_POINT dam, int rad)
{
- int flg = PROJECT_KILL | PROJECT_HIDE;
- return (project(0, 1, py, px, p_ptr->lev, GF_OLD_SLEEP, flg, -1));
-}
+ int i;
+ int b = 10 + randint1(10);
+ for (i = 0; i < b; i++)
+ {
+ POSITION y = 0, x = 0;
+ int count;
-bool animate_dead(int who, int y, int x)
-{
- int flg = PROJECT_ITEM | PROJECT_HIDE;
- return (project(who, 5, y, x, 0, GF_ANIM_DEAD, flg, -1));
-}
+ for (count = 0; count <= 20; count++)
+ {
+ int dy, dx, d;
+ x = p_ptr->x - 8 + randint0(17);
+ y = p_ptr->y - 8 + randint0(17);
-void call_chaos(void)
-{
- int Chaos_type, dummy, dir;
- int plev = p_ptr->lev;
- bool line_chaos = FALSE;
+ dx = (p_ptr->x > x) ? (p_ptr->x - x) : (x - p_ptr->x);
+ dy = (p_ptr->y > y) ? (p_ptr->y - y) : (y - p_ptr->y);
- int hurt_types[31] =
- {
- GF_ELEC, GF_POIS, GF_ACID, GF_COLD,
- GF_FIRE, GF_MISSILE, GF_ARROW, GF_PLASMA,
- GF_HOLY_FIRE, GF_WATER, GF_LITE, GF_DARK,
- GF_FORCE, GF_INERTIA, GF_MANA, GF_METEOR,
- GF_ICE, GF_CHAOS, GF_NETHER, GF_DISENCHANT,
- GF_SHARDS, GF_SOUND, GF_NEXUS, GF_CONFUSION,
- GF_TIME, GF_GRAVITY, GF_ROCKET, GF_NUKE,
- GF_HELL_FIRE, GF_DISINTEGRATE, GF_PSY_SPEAR
- };
+ /* Approximate distance */
+ d = (dy > dx) ? (dy + (dx >> 1)) : (dx + (dy >> 1));
- Chaos_type = hurt_types[randint0(31)];
- if (one_in_(4)) line_chaos = TRUE;
+ if (d >= 9) continue;
- if (one_in_(6))
- {
- for (dummy = 1; dummy < 10; dummy++)
- {
- if (dummy - 5)
- {
- if (line_chaos)
- fire_beam(Chaos_type, dummy, 150);
- else
- fire_ball(Chaos_type, dummy, 150, 2);
- }
+ if (!in_bounds(y, x) || !projectable(p_ptr->y, p_ptr->x, y, x)
+ || !cave_have_flag_bold(y, x, FF_PROJECT)) continue;
+
+ /* Valid position */
+ break;
}
- }
- else if (one_in_(3))
- {
- fire_ball(Chaos_type, 0, 500, 8);
- }
- else
- {
- if (!get_aim_dir(&dir)) return;
- if (line_chaos)
- fire_beam(Chaos_type, dir, 250);
- else
- fire_ball(Chaos_type, dir, 250, 3 + (plev / 35));
+
+ if (count > 20) continue;
+
+ project(0, rad, y, x, dam, GF_METEOR, PROJECT_KILL | PROJECT_JUMP | PROJECT_ITEM, -1);
}
}
-/*
- * Activate the evil Topi Ylinen curse
- * rr9: Stop the nasty things when a Cyberdemon is summoned
- * or the player gets paralyzed.
- */
-bool activate_ty_curse(bool stop_ty, int *count)
+/*!
+* @brief 破邪魔法「神の怒り」の処理としてターゲットを指定した後分解のボールを最大20回発生させる。
+* @param dam ダメージ
+* @param rad 効力の半径
+* @return ターゲットを指定し、実行したならばTRUEを返す。
+*/
+bool cast_wrath_of_the_god(HIT_POINT dam, int rad)
{
- int i = 0;
+ int x, y, tx, ty;
+ int nx, ny;
+ int dir, i;
+ int b = 10 + randint1(10);
- int flg = (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP);
+ if (!get_aim_dir(&dir)) return FALSE;
- do
- {
- switch (randint1(34))
- {
- case 28: case 29:
- if (!(*count))
- {
-#ifdef JP
-msg_print("ÃÏÌ̤¬Íɤ줿...");
-#else
- msg_print("The ground trembles...");
-#endif
+ /* Use the given direction */
+ tx = p_ptr->x + 99 * ddx[dir];
+ ty = p_ptr->y + 99 * ddy[dir];
- earthquake(py, px, 5 + randint0(10));
- if (!one_in_(6)) break;
- }
- case 30: case 31:
- if (!(*count))
- {
- int dam = damroll(10, 10);
-#ifdef JP
-msg_print("½ã¿è¤ÊËâÎϤμ¡¸µ¤Ø¤ÎÈ⤬³«¤¤¤¿¡ª");
-#else
- msg_print("A portal opens to a plane of raw mana!");
-#endif
+ /* Hack -- Use an actual "target" */
+ if ((dir == 5) && target_okay())
+ {
+ tx = target_col;
+ ty = target_row;
+ }
- project(0, 8, py, px, dam, GF_MANA, flg, -1);
-#ifdef JP
- take_hit(DAMAGE_NOESCAPE, dam, "½ã¿è¤ÊËâÎϤβòÊü", -1);
-#else
- take_hit(DAMAGE_NOESCAPE, dam, "released pure mana", -1);
-#endif
- if (!one_in_(6)) break;
- }
- case 32: case 33:
- if (!(*count))
- {
-#ifdef JP
-msg_print("¼þ°Ï¤Î¶õ´Ö¤¬ÏĤó¤À¡ª");
-#else
- msg_print("Space warps about you!");
-#endif
+ x = p_ptr->x;
+ y = p_ptr->y;
- teleport_player(damroll(10, 10), TRUE);
- if (randint0(13)) (*count) += activate_hi_summon(py, px, FALSE);
- if (!one_in_(6)) break;
- }
- case 34:
-#ifdef JP
-msg_print("¥¨¥Í¥ë¥®¡¼¤Î¤¦¤Í¤ê¤ò´¶¤¸¤¿¡ª");
-#else
- msg_print("You feel a surge of energy!");
-#endif
+ while (1)
+ {
+ /* Hack -- Stop at the target */
+ if ((y == ty) && (x == tx)) break;
- wall_breaker();
- if (!randint0(7))
- {
- project(0, 7, py, px, 50, GF_KILL_WALL, flg, -1);
-#ifdef JP
- take_hit(DAMAGE_NOESCAPE, 50, "¥¨¥Í¥ë¥®¡¼¤Î¤¦¤Í¤ê", -1);
-#else
- take_hit(DAMAGE_NOESCAPE, 50, "surge of energy", -1);
-#endif
- }
- if (!one_in_(6)) break;
- case 1: case 2: case 3: case 16: case 17:
- aggravate_monsters(0);
- if (!one_in_(6)) break;
- case 4: case 5: case 6:
- (*count) += activate_hi_summon(py, px, FALSE);
- if (!one_in_(6)) break;
- case 7: case 8: case 9: case 18:
- (*count) += summon_specific(0, py, px, dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
- if (!one_in_(6)) break;
- case 10: case 11: case 12:
-#ifdef JP
-msg_print("À¸Ì¿ÎϤ¬ÂΤ«¤éµÛ¤¤¼è¤é¤ì¤¿µ¤¤¬¤¹¤ë¡ª");
-#else
- msg_print("You feel your life draining away...");
-#endif
+ ny = y;
+ nx = x;
+ mmove2(&ny, &nx, p_ptr->y, p_ptr->x, ty, tx);
- lose_exp(p_ptr->exp / 16);
- if (!one_in_(6)) break;
- case 13: case 14: case 15: case 19: case 20:
- if (stop_ty || (p_ptr->free_act && (randint1(125) < p_ptr->skill_sav)) || (p_ptr->pclass == CLASS_BERSERKER))
- {
- /* Do nothing */ ;
- }
- else
- {
-#ifdef JP
-msg_print("ĦÁü¤Ë¤Ê¤Ã¤¿µ¤Ê¬¤À¡ª");
-#else
- msg_print("You feel like a statue!");
-#endif
+ /* Stop at maximum range */
+ if (MAX_RANGE <= distance(p_ptr->y, p_ptr->x, ny, nx)) break;
- if (p_ptr->free_act)
- set_paralyzed(p_ptr->paralyzed + randint1(3));
- else
- set_paralyzed(p_ptr->paralyzed + randint1(13));
- stop_ty = TRUE;
- }
- if (!one_in_(6)) break;
- case 21: case 22: case 23:
- (void)do_dec_stat(randint0(6));
- if (!one_in_(6)) break;
- case 24:
-#ifdef JP
-msg_print("¤Û¤¨¡©»ä¤Ïï¡©¤³¤³¤Ç²¿¤·¤Æ¤ë¡©");
-#else
- msg_print("Huh? Who am I? What am I doing here?");
-#endif
+ /* Stopped by walls/doors */
+ if (!cave_have_flag_bold(ny, nx, FF_PROJECT)) break;
- lose_all_info();
- if (!one_in_(6)) break;
- case 25:
- /*
- * Only summon Cyberdemons deep in the dungeon.
- */
- if ((dun_level > 65) && !stop_ty)
- {
- (*count) += summon_cyber(-1, py, px);
- stop_ty = TRUE;
- break;
- }
- if (!one_in_(6)) break;
- default:
- while (i < 6)
- {
- do
- {
- (void)do_dec_stat(i);
- }
- while (one_in_(2));
+ /* Stopped by monsters */
+ if ((dir != 5) && cave[ny][nx].m_idx != 0) break;
- i++;
- }
+ /* Save the new location */
+ x = nx;
+ y = ny;
+ }
+ tx = x;
+ ty = y;
+
+ for (i = 0; i < b; i++)
+ {
+ int count = 20, d = 0;
+
+ while (count--)
+ {
+ int dx, dy;
+
+ x = tx - 5 + randint0(11);
+ y = ty - 5 + randint0(11);
+
+ dx = (tx > x) ? (tx - x) : (x - tx);
+ dy = (ty > y) ? (ty - y) : (y - ty);
+
+ /* Approximate distance */
+ d = (dy > dx) ? (dy + (dx >> 1)) : (dx + (dy >> 1));
+ /* Within the radius */
+ if (d < 5) break;
}
+
+ if (count < 0) continue;
+
+ /* Cannot penetrate perm walls */
+ if (!in_bounds(y, x) ||
+ cave_stop_disintegration(y, x) ||
+ !in_disintegration_range(ty, tx, y, x))
+ continue;
+
+ project(0, rad, y, x, dam, GF_DISINTEGRATE, PROJECT_JUMP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL, -1);
}
- while (one_in_(3) && !stop_ty);
- return stop_ty;
+ return TRUE;
}
-
-int activate_hi_summon(int y, int x, bool can_pet)
+/*!
+* @brief 「ワンダー」のランダムな効果を決定して処理する。
+* @param dir 方向ID
+* @return なし
+* @details
+* This spell should become more useful (more controlled) as the\n
+* player gains experience levels. Thus, add 1/5 of the player's\n
+* level to the die roll. This eliminates the worst effects later on,\n
+* while keeping the results quite random. It also allows some potent\n
+* effects only at high level.
+*/
+void cast_wonder(int dir)
{
- int i;
- int count = 0;
- int summon_lev;
- u32b mode = PM_ALLOW_GROUP;
- bool pet = FALSE;
+ int plev = p_ptr->lev;
+ int die = randint1(100) + plev / 5;
+ int vir = virtue_number(V_CHANCE);
- if (can_pet)
+ if (vir)
{
- if (one_in_(4))
+ if (p_ptr->virtues[vir - 1] > 0)
{
- mode |= PM_FORCE_FRIENDLY;
+ while (randint1(400) < p_ptr->virtues[vir - 1]) die++;
}
else
{
- mode |= PM_FORCE_PET;
- pet = TRUE;
+ while (randint1(400) < (0 - p_ptr->virtues[vir - 1])) die--;
}
}
- if (!pet) mode |= PM_NO_PET;
+ if (die < 26)
+ chg_virtue(V_CHANCE, 1);
- summon_lev = (pet ? p_ptr->lev * 2 / 3 + randint1(p_ptr->lev / 2) : dun_level);
+ if (die > 100)
+ {
+ msg_print(_("あなたは力がみなぎるのを感じた!", "You feel a surge of power!"));
+ }
+
+ if (die < 8) clone_monster(dir);
+ else if (die < 14) speed_monster(dir, plev);
+ else if (die < 26) heal_monster(dir, damroll(4, 6));
+ else if (die < 31) poly_monster(dir, plev);
+ else if (die < 36)
+ fire_bolt_or_beam(beam_chance() - 10, GF_MISSILE, dir,
+ damroll(3 + ((plev - 1) / 5), 4));
+ else if (die < 41) confuse_monster(dir, plev);
+ else if (die < 46) fire_ball(GF_POIS, dir, 20 + (plev / 2), 3);
+ else if (die < 51) (void)lite_line(dir, damroll(6, 8));
+ else if (die < 56)
+ fire_bolt_or_beam(beam_chance() - 10, GF_ELEC, dir,
+ damroll(3 + ((plev - 5) / 4), 8));
+ else if (die < 61)
+ fire_bolt_or_beam(beam_chance() - 10, GF_COLD, dir,
+ damroll(5 + ((plev - 5) / 4), 8));
+ else if (die < 66)
+ fire_bolt_or_beam(beam_chance(), GF_ACID, dir,
+ damroll(6 + ((plev - 5) / 4), 8));
+ else if (die < 71)
+ fire_bolt_or_beam(beam_chance(), GF_FIRE, dir,
+ damroll(8 + ((plev - 5) / 4), 8));
+ else if (die < 76) hypodynamic_bolt(dir, 75);
+ else if (die < 81) fire_ball(GF_ELEC, dir, 30 + plev / 2, 2);
+ else if (die < 86) fire_ball(GF_ACID, dir, 40 + plev, 2);
+ else if (die < 91) fire_ball(GF_ICE, dir, 70 + plev, 3);
+ else if (die < 96) fire_ball(GF_FIRE, dir, 80 + plev, 3);
+ else if (die < 101) hypodynamic_bolt(dir, 100 + plev);
+ else if (die < 104)
+ {
+ earthquake(p_ptr->y, p_ptr->x, 12);
+ }
+ else if (die < 106)
+ {
+ (void)destroy_area(p_ptr->y, p_ptr->x, 13 + randint0(5), FALSE);
+ }
+ else if (die < 108)
+ {
+ symbol_genocide(plev + 50, TRUE);
+ }
+ else if (die < 110) dispel_monsters(120);
+ else /* RARE */
+ {
+ dispel_monsters(150);
+ slow_monsters(plev);
+ sleep_monsters(plev);
+ hp_player(300);
+ }
+}
- for (i = 0; i < (randint1(7) + (dun_level / 40)); i++)
+
+/*!
+* @brief 「悪霊召喚」のランダムな効果を決定して処理する。
+* @param dir 方向ID
+* @return なし
+*/
+void cast_invoke_spirits(int dir)
+{
+ int plev = p_ptr->lev;
+ int die = randint1(100) + plev / 5;
+ int vir = virtue_number(V_CHANCE);
+
+ if (vir)
{
- switch (randint1(25) + (dun_level / 20))
+ if (p_ptr->virtues[vir - 1] > 0)
{
- case 1: case 2:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_ANT, mode);
- break;
- case 3: case 4:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_SPIDER, mode);
- break;
- case 5: case 6:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HOUND, mode);
- break;
- case 7: case 8:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HYDRA, mode);
- break;
- case 9: case 10:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_ANGEL, mode);
- break;
- case 11: case 12:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_UNDEAD, mode);
- break;
- case 13: case 14:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_DRAGON, mode);
- break;
- case 15: case 16:
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_DEMON, mode);
- break;
- case 17:
- if (can_pet) break;
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_AMBERITES, (mode | PM_ALLOW_UNIQUE));
- break;
- case 18: case 19:
- if (can_pet) break;
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_UNIQUE, (mode | PM_ALLOW_UNIQUE));
- break;
- case 20: case 21:
- if (!can_pet) mode |= PM_ALLOW_UNIQUE;
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HI_UNDEAD, mode);
- break;
- case 22: case 23:
- if (!can_pet) mode |= PM_ALLOW_UNIQUE;
- count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HI_DRAGON, mode);
- break;
- case 24:
- count += summon_specific((pet ? -1 : 0), y, x, 100, SUMMON_CYBER, mode);
- break;
- default:
- if (!can_pet) mode |= PM_ALLOW_UNIQUE;
- count += summon_specific((pet ? -1 : 0), y, x,pet ? summon_lev : (((summon_lev * 3) / 2) + 5), 0, mode);
+ while (randint1(400) < p_ptr->virtues[vir - 1]) die++;
+ }
+ else
+ {
+ while (randint1(400) < (0 - p_ptr->virtues[vir - 1])) die--;
}
}
- return count;
-}
-
+ msg_print(_("あなたは死者たちの力を招集した...", "You call on the power of the dead..."));
+ if (die < 26)
+ chg_virtue(V_CHANCE, 1);
-/* ToDo: check */
-int summon_cyber(int who, int y, int x)
-{
- int i;
- int max_cyber = (easy_band ? 1 : (dun_level / 50) + randint1(2));
- int count = 0;
- u32b mode = PM_ALLOW_GROUP;
+ if (die > 100)
+ {
+ msg_print(_("あなたはおどろおどろしい力のうねりを感じた!", "You feel a surge of eldritch force!"));
+ }
- /* Summoned by a monster */
- if (who > 0)
+ if (die < 8)
{
- monster_type *m_ptr = &m_list[who];
- if (is_pet(m_ptr)) mode |= PM_FORCE_PET;
+ msg_print(_("なんてこった!あなたの周りの地面から朽ちた人影が立ち上がってきた!",
+ "Oh no! Mouldering forms rise from the earth around you!"));
+
+ (void)summon_specific(0, p_ptr->y, p_ptr->x, dun_level, SUMMON_UNDEAD, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
+ chg_virtue(V_UNLIFE, 1);
}
+ else if (die < 14)
+ {
+ msg_print(_("名状し難い邪悪な存在があなたの心を通り過ぎて行った...", "An unnamable evil brushes against your mind..."));
- if (max_cyber > 4) max_cyber = 4;
+ set_afraid(p_ptr->afraid + randint1(4) + 4);
+ }
+ else if (die < 26)
+ {
+ msg_print(_("あなたの頭に大量の幽霊たちの騒々しい声が押し寄せてきた...",
+ "Your head is invaded by a horde of gibbering spectral voices..."));
- for (i = 0; i < max_cyber; i++)
+ set_confused(p_ptr->confused + randint1(4) + 4);
+ }
+ else if (die < 31)
{
- count += summon_specific(who, y, x, 100, SUMMON_CYBER, mode);
+ poly_monster(dir, plev);
+ }
+ else if (die < 36)
+ {
+ fire_bolt_or_beam(beam_chance() - 10, GF_MISSILE, dir,
+ damroll(3 + ((plev - 1) / 5), 4));
+ }
+ else if (die < 41)
+ {
+ confuse_monster(dir, plev);
+ }
+ else if (die < 46)
+ {
+ fire_ball(GF_POIS, dir, 20 + (plev / 2), 3);
+ }
+ else if (die < 51)
+ {
+ (void)lite_line(dir, damroll(6, 8));
+ }
+ else if (die < 56)
+ {
+ fire_bolt_or_beam(beam_chance() - 10, GF_ELEC, dir,
+ damroll(3 + ((plev - 5) / 4), 8));
+ }
+ else if (die < 61)
+ {
+ fire_bolt_or_beam(beam_chance() - 10, GF_COLD, dir,
+ damroll(5 + ((plev - 5) / 4), 8));
+ }
+ else if (die < 66)
+ {
+ fire_bolt_or_beam(beam_chance(), GF_ACID, dir,
+ damroll(6 + ((plev - 5) / 4), 8));
+ }
+ else if (die < 71)
+ {
+ fire_bolt_or_beam(beam_chance(), GF_FIRE, dir,
+ damroll(8 + ((plev - 5) / 4), 8));
+ }
+ else if (die < 76)
+ {
+ hypodynamic_bolt(dir, 75);
+ }
+ else if (die < 81)
+ {
+ fire_ball(GF_ELEC, dir, 30 + plev / 2, 2);
+ }
+ else if (die < 86)
+ {
+ fire_ball(GF_ACID, dir, 40 + plev, 2);
+ }
+ else if (die < 91)
+ {
+ fire_ball(GF_ICE, dir, 70 + plev, 3);
+ }
+ else if (die < 96)
+ {
+ fire_ball(GF_FIRE, dir, 80 + plev, 3);
+ }
+ else if (die < 101)
+ {
+ hypodynamic_bolt(dir, 100 + plev);
+ }
+ else if (die < 104)
+ {
+ earthquake(p_ptr->y, p_ptr->x, 12);
+ }
+ else if (die < 106)
+ {
+ (void)destroy_area(p_ptr->y, p_ptr->x, 13 + randint0(5), FALSE);
+ }
+ else if (die < 108)
+ {
+ symbol_genocide(plev + 50, TRUE);
+ }
+ else if (die < 110)
+ {
+ dispel_monsters(120);
+ }
+ else
+ { /* RARE */
+ dispel_monsters(150);
+ slow_monsters(plev);
+ sleep_monsters(plev);
+ hp_player(300);
}
- return count;
+ if (die < 31)
+ {
+ msg_print(_("陰欝な声がクスクス笑う。「もうすぐおまえは我々の仲間になるだろう。弱き者よ。」",
+ "Sepulchral voices chuckle. 'Soon you will join us, mortal.'"));
+ }
}
-
-void wall_breaker(void)
+/*!
+* @brief トランプ領域の「シャッフル」の効果をランダムに決めて処理する。
+* @return なし
+*/
+void cast_shuffle(void)
{
+ int plev = p_ptr->lev;
+ int dir;
+ int die;
+ int vir = virtue_number(V_CHANCE);
int i;
- int y, x;
- int attempts = 1000;
- if (randint1(80 + p_ptr->lev) < 70)
+ /* Card sharks and high mages get a level bonus */
+ if ((p_ptr->pclass == CLASS_ROGUE) ||
+ (p_ptr->pclass == CLASS_HIGH_MAGE) ||
+ (p_ptr->pclass == CLASS_SORCERER))
+ die = (randint1(110)) + plev / 5;
+ else
+ die = randint1(120);
+
+
+ if (vir)
+ {
+ if (p_ptr->virtues[vir - 1] > 0)
+ {
+ while (randint1(400) < p_ptr->virtues[vir - 1]) die++;
+ }
+ else
+ {
+ while (randint1(400) < (0 - p_ptr->virtues[vir - 1])) die--;
+ }
+ }
+
+ msg_print(_("あなたはカードを切って一枚引いた...", "You shuffle the deck and draw a card..."));
+
+ if (die < 30)
+ chg_virtue(V_CHANCE, 1);
+
+ if (die < 7)
+ {
+ msg_print(_("なんてこった!《死》だ!", "Oh no! It's Death!"));
+
+ for (i = 0; i < randint1(3); i++)
+ activate_hi_summon(p_ptr->y, p_ptr->x, FALSE);
+ }
+ else if (die < 14)
+ {
+ msg_print(_("なんてこった!《悪魔》だ!", "Oh no! It's the Devil!"));
+ summon_specific(0, p_ptr->y, p_ptr->x, dun_level, SUMMON_DEMON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
+ }
+ else if (die < 18)
+ {
+ int count = 0;
+ msg_print(_("なんてこった!《吊られた男》だ!", "Oh no! It's the Hanged Man."));
+ activate_ty_curse(FALSE, &count);
+ }
+ else if (die < 22)
+ {
+ msg_print(_("《不調和の剣》だ。", "It's the swords of discord."));
+ aggravate_monsters(0);
+ }
+ else if (die < 26)
+ {
+ msg_print(_("《愚者》だ。", "It's the Fool."));
+ do_dec_stat(A_INT);
+ do_dec_stat(A_WIS);
+ }
+ else if (die < 30)
+ {
+ msg_print(_("奇妙なモンスターの絵だ。", "It's the picture of a strange monster."));
+ trump_summoning(1, FALSE, p_ptr->y, p_ptr->x, (dun_level * 3 / 2), (32 + randint1(6)), PM_ALLOW_GROUP | PM_ALLOW_UNIQUE);
+ }
+ else if (die < 33)
+ {
+ msg_print(_("《月》だ。", "It's the Moon."));
+ unlite_area(10, 3);
+ }
+ else if (die < 38)
+ {
+ msg_print(_("《運命の輪》だ。", "It's the Wheel of Fortune."));
+ wild_magic(randint0(32));
+ }
+ else if (die < 40)
+ {
+ msg_print(_("テレポート・カードだ。", "It's a teleport trump card."));
+ teleport_player(10, TELEPORT_PASSIVE);
+ }
+ else if (die < 42)
+ {
+ msg_print(_("《正義》だ。", "It's Justice."));
+ set_blessed(p_ptr->lev, FALSE);
+ }
+ else if (die < 47)
+ {
+ msg_print(_("テレポート・カードだ。", "It's a teleport trump card."));
+ teleport_player(100, TELEPORT_PASSIVE);
+ }
+ else if (die < 52)
+ {
+ msg_print(_("テレポート・カードだ。", "It's a teleport trump card."));
+ teleport_player(200, TELEPORT_PASSIVE);
+ }
+ else if (die < 60)
+ {
+ msg_print(_("《塔》だ。", "It's the Tower."));
+ wall_breaker();
+ }
+ else if (die < 72)
+ {
+ msg_print(_("《節制》だ。", "It's Temperance."));
+ sleep_monsters_touch();
+ }
+ else if (die < 80)
+ {
+ msg_print(_("《塔》だ。", "It's the Tower."));
+
+ earthquake(p_ptr->y, p_ptr->x, 5);
+ }
+ else if (die < 82)
+ {
+ msg_print(_("友好的なモンスターの絵だ。", "It's the picture of a friendly monster."));
+ trump_summoning(1, TRUE, p_ptr->y, p_ptr->x, (dun_level * 3 / 2), SUMMON_MOLD, 0L);
+ }
+ else if (die < 84)
+ {
+ msg_print(_("友好的なモンスターの絵だ。", "It's the picture of a friendly monster."));
+ trump_summoning(1, TRUE, p_ptr->y, p_ptr->x, (dun_level * 3 / 2), SUMMON_BAT, 0L);
+ }
+ else if (die < 86)
+ {
+ msg_print(_("友好的なモンスターの絵だ。", "It's the picture of a friendly monster."));
+ trump_summoning(1, TRUE, p_ptr->y, p_ptr->x, (dun_level * 3 / 2), SUMMON_VORTEX, 0L);
+ }
+ else if (die < 88)
+ {
+ msg_print(_("友好的なモンスターの絵だ。", "It's the picture of a friendly monster."));
+ trump_summoning(1, TRUE, p_ptr->y, p_ptr->x, (dun_level * 3 / 2), SUMMON_COIN_MIMIC, 0L);
+ }
+ else if (die < 96)
{
- while (attempts--)
- {
- scatter(&y, &x, py, px, 4, 0);
-
- if (!cave_have_flag_bold(y, x, FF_PROJECT)) continue;
-
- if (!player_bold(y, x)) break;
- }
+ msg_print(_("《恋人》だ。", "It's the Lovers."));
- project(0, 0, y, x, 20 + randint1(30), GF_KILL_WALL,
- (PROJECT_BEAM | PROJECT_THRU | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
+ if (get_aim_dir(&dir))
+ charm_monster(dir, MIN(p_ptr->lev, 20));
}
- else if (randint1(100) > 30)
+ else if (die < 101)
+ {
+ msg_print(_("《隠者》だ。", "It's the Hermit."));
+ wall_stone();
+ }
+ else if (die < 111)
+ {
+ msg_print(_("《審判》だ。", "It's the Judgement."));
+ do_cmd_rerate(FALSE);
+ lose_all_mutations();
+ }
+ else if (die < 120)
{
- earthquake(py, px, 1);
+ msg_print(_("《太陽》だ。", "It's the Sun."));
+ chg_virtue(V_KNOWLEDGE, 1);
+ chg_virtue(V_ENLIGHTEN, 1);
+ wiz_lite(FALSE);
}
else
{
- int num = damroll(5, 3);
-
- for (i = 0; i < num; i++)
+ msg_print(_("《世界》だ。", "It's the World."));
+ if (p_ptr->exp < PY_MAX_EXP)
{
- while (1)
- {
- scatter(&y, &x, py, px, 10, 0);
-
- if (!player_bold(y, x)) break;
- }
-
- project(0, 0, y, x, 20 + randint1(30), GF_KILL_WALL,
- (PROJECT_BEAM | PROJECT_THRU | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
+ s32b ee = (p_ptr->exp / 25) + 1;
+ if (ee > 5000) ee = 5000;
+ msg_print(_("更に経験を積んだような気がする。", "You feel more experienced."));
+ gain_exp(ee);
}
}
}
-
-/*
- * Confuse monsters
- */
-bool confuse_monsters(int dam)
-{
- return (project_hack(GF_OLD_CONF, dam));
-}
-
-
-/*
- * Charm monsters
- */
-bool charm_monsters(int dam)
-{
- return (project_hack(GF_CHARM, dam));
-}
-
-
-/*
- * Charm animals
- */
-bool charm_animals(int dam)
-{
- return (project_hack(GF_CONTROL_ANIMAL, dam));
-}
-
-
-/*
- * Stun monsters
- */
-bool stun_monsters(int dam)
-{
- return (project_hack(GF_STUN, dam));
-}
-
-
-/*
- * Stasis monsters
- */
-bool stasis_monsters(int dam)
-{
- return (project_hack(GF_STASIS, dam));
-}
-
-
-/*
- * Mindblast monsters
- */
-bool mindblast_monsters(int dam)
-{
- return (project_hack(GF_PSI, dam));
-}
-
-
-/*
- * Banish all monsters
- */
-bool banish_monsters(int dist)
-{
- return (project_hack(GF_AWAY_ALL, dist));
-}
-
-
-/*
- * Turn evil
- */
-bool turn_evil(int dam)
-{
- return (project_hack(GF_TURN_EVIL, dam));
-}
-
-
-/*
- * Turn everyone
- */
-bool turn_monsters(int dam)
+bool_hack life_stream(bool_hack message, bool_hack virtue)
{
- return (project_hack(GF_TURN_ALL, dam));
-}
-
+ if(virtue)
+ {
+ chg_virtue(V_VITALITY, 1);
+ chg_virtue(V_UNLIFE, -5);
+ }
+ if(message)
+ {
+ msg_print(_("体中に生命力が満ちあふれてきた!", "You feel life flow through your body!"));
+ }
+ restore_level();
+ (void)set_poisoned(0);
+ (void)set_blind(0);
+ (void)set_confused(0);
+ (void)set_image(0);
+ (void)set_stun(0);
+ (void)set_cut(0);
+ (void)restore_all_status();
+ (void)set_shero(0, TRUE);
+ update_stuff();
+ hp_player(5000);
-/*
- * Death-ray all monsters (note: OBSCENELY powerful)
- */
-bool deathray_monsters(void)
-{
- return (project_hack(GF_DEATH_RAY, p_ptr->lev * 200));
+ return TRUE;
}
-
-bool charm_monster(int dir, int plev)
+bool_hack heroism(int base)
{
- int flg = PROJECT_STOP | PROJECT_KILL;
- return (project_hook(GF_CHARM, dir, plev, flg));
+ bool_hack ident = FALSE;
+ if(set_afraid(0)) ident = TRUE;
+ if(set_hero(p_ptr->hero + randint1(base) + base, FALSE)) ident = TRUE;
+ if(hp_player(10)) ident = TRUE;
+ return ident;
}
-
-bool control_one_undead(int dir, int plev)
+bool_hack berserk(int base)
{
- int flg = PROJECT_STOP | PROJECT_KILL;
- return (project_hook(GF_CONTROL_UNDEAD, dir, plev, flg));
+ bool_hack ident = FALSE;
+ if (set_afraid(0)) ident = TRUE;
+ if (set_shero(p_ptr->hero + randint1(base) + base, FALSE)) ident = TRUE;
+ if (hp_player(30)) ident = TRUE;
+ return ident;
}
-
-bool control_one_demon(int dir, int plev)
+bool_hack cure_light_wounds(int dice, int sides)
{
- int flg = PROJECT_STOP | PROJECT_KILL;
- return (project_hook(GF_CONTROL_DEMON, dir, plev, flg));
+ bool_hack ident = FALSE;
+ if (hp_player(damroll(dice, sides))) ident = TRUE;
+ if (set_blind(0)) ident = TRUE;
+ if (set_cut(p_ptr->cut - 10)) ident = TRUE;
+ if (set_shero(0, TRUE)) ident = TRUE;
+ return ident;
}
-
-bool charm_animal(int dir, int plev)
+bool_hack cure_serious_wounds(int dice, int sides)
{
- int flg = PROJECT_STOP | PROJECT_KILL;
- return (project_hook(GF_CONTROL_ANIMAL, dir, plev, flg));
+ bool_hack ident = FALSE;
+ if (hp_player(damroll(dice, sides))) ident = TRUE;
+ if (set_blind(0)) ident = TRUE;
+ if (set_confused(0)) ident = TRUE;
+ if (set_cut((p_ptr->cut / 2) - 50)) ident = TRUE;
+ if (set_shero(0, TRUE)) ident = TRUE;
+ return ident;
}
-
-bool charm_living(int dir, int plev)
+bool_hack cure_critical_wounds(HIT_POINT pow)
{
- int flg = PROJECT_STOP | PROJECT_KILL;
- return (project_hook(GF_CONTROL_LIVING, dir, plev, flg));
+ bool_hack ident = FALSE;
+ if (hp_player(pow)) ident = TRUE;
+ if (set_blind(0)) ident = TRUE;
+ if (set_confused(0)) ident = TRUE;
+ if (set_poisoned(0)) ident = TRUE;
+ if (set_stun(0)) ident = TRUE;
+ if (set_cut(0)) ident = TRUE;
+ if (set_shero(0, TRUE)) ident = TRUE;
+ return ident;
}
-
-void kawarimi(bool success)
+bool_hack true_healing(HIT_POINT pow)
{
- object_type forge;
- object_type *q_ptr = &forge;
- int y, x;
-
- if (p_ptr->confused || p_ptr->blind || p_ptr->paralyzed || p_ptr->image) return;
- if (randint0(200) < p_ptr->stun) return;
-
- if (!success && one_in_(3))
- {
-#ifdef JP
- msg_print("¼ºÇÔ¡ªÆ¨¤²¤é¤ì¤Ê¤«¤Ã¤¿¡£");
-#else
- msg_print("Failed! You couldn't run away.");
-#endif
- p_ptr->special_defense &= ~(NINJA_KAWARIMI);
- p_ptr->redraw |= (PR_STATUS);
- return;
- }
-
- y = py;
- x = px;
-
- teleport_player(10 + randint1(90), FALSE);
-
- object_wipe(q_ptr);
-
- object_prep(q_ptr, lookup_kind(TV_STATUE, SV_WOODEN_STATUE));
-
- q_ptr->pval = MON_NINJA;
-
- /* Drop it in the dungeon */
- (void)drop_near(q_ptr, -1, y, x);
-
-#ifdef JP
- if (success) msg_print("¹¶·â¤ò¼õ¤±¤ëÁ°¤ËÁÇÁ᤯¿È¤ò¤Ò¤ë¤¬¤¨¤·¤¿¡£");
- else msg_print("¼ºÇÔ¡ª¹¶·â¤ò¼õ¤±¤Æ¤·¤Þ¤Ã¤¿¡£");
-#else
- if (success) msg_print("You have turned around just before the attack hit you.");
- else msg_print("Failed! You are hit by the attack.");
-#endif
-
- p_ptr->special_defense &= ~(NINJA_KAWARIMI);
- p_ptr->redraw |= (PR_STATUS);
+ bool_hack ident = FALSE;
+ if (hp_player(pow)) ident = TRUE;
+ if (set_blind(0)) ident = TRUE;
+ if (set_confused(0)) ident = TRUE;
+ if (set_poisoned(0)) ident = TRUE;
+ if (set_stun(0)) ident = TRUE;
+ if (set_cut(0)) ident = TRUE;
+ if (set_image(0)) ident = TRUE;
+ return ident;
}
-
-/*
- * "Rush Attack" routine for Samurai or Ninja
- * Return value is for checking "done"
- */
-bool rush_attack(bool *mdeath)
+bool_hack restore_mana(bool_hack magic_eater)
{
- int dir;
- int tx, ty;
- int tm_idx = 0;
- u16b path_g[32];
- int path_n, i;
- bool tmp_mdeath = FALSE;
- bool moved = FALSE;
-
- if (mdeath) *mdeath = FALSE;
-
- project_length = 5;
- if (!get_aim_dir(&dir)) return FALSE;
-
- /* Use the given direction */
- tx = px + project_length * ddx[dir];
- ty = py + project_length * ddy[dir];
-
- /* Hack -- Use an actual "target" */
- if ((dir == 5) && target_okay())
- {
- tx = target_col;
- ty = target_row;
- }
-
- if (in_bounds(ty, tx)) tm_idx = cave[ty][tx].m_idx;
-
- path_n = project_path(path_g, project_length, py, px, ty, tx, PROJECT_STOP | PROJECT_KILL);
- project_length = 0;
-
- /* No need to move */
- if (!path_n) return TRUE;
+ bool_hack ident = FALSE;
- /* Use ty and tx as to-move point */
- ty = py;
- tx = px;
-
- /* Project along the path */
- for (i = 0; i < path_n; i++)
+ if (p_ptr->pclass == CLASS_MAGIC_EATER && magic_eater)
{
- monster_type *m_ptr;
-
- int ny = GRID_Y(path_g[i]);
- int nx = GRID_X(path_g[i]);
-
- if (cave_empty_bold(ny, nx) && player_can_enter(cave[ny][nx].feat, 0))
- {
- ty = ny;
- tx = nx;
-
- /* Go to next grid */
- continue;
- }
-
- if (!cave[ny][nx].m_idx)
- {
- if (tm_idx)
- {
-#ifdef JP
- msg_print("¼ºÇÔ¡ª");
-#else
- msg_print("Failed!");
-#endif
- }
- else
- {
-#ifdef JP
- msg_print("¤³¤³¤Ë¤ÏÆþ¿È¤Ç¤ÏÆþ¤ì¤Ê¤¤¡£");
-#else
- msg_print("You can't move to that place.");
-#endif
- }
-
- /* Exit loop */
- break;
- }
-
- /* Move player before updating the monster */
- if (!player_bold(ty, tx)) teleport_player_to(ty, tx, FALSE, FALSE);
-
- /* Update the monster */
- update_mon(cave[ny][nx].m_idx, TRUE);
-
- /* Found a monster */
- m_ptr = &m_list[cave[ny][nx].m_idx];
-
- if (tm_idx != cave[ny][nx].m_idx)
+ int i;
+ for (i = 0; i < EATER_EXT * 2; i++)
{
-#ifdef JP
- msg_format("%s%s¤¬Î©¤Á¤Õ¤µ¤¬¤Ã¤Æ¤¤¤ë¡ª", tm_idx ? "Ê̤Î" : "",
- m_ptr->ml ? "¥â¥ó¥¹¥¿¡¼" : "²¿¤«");
-#else
- msg_format("There is %s in the way!", m_ptr->ml ? (tm_idx ? "another monster" : "a monster") : "someone");
-#endif
+ p_ptr->magic_num1[i] += (p_ptr->magic_num2[i] < 10) ? EATER_CHARGE * 3 : p_ptr->magic_num2[i] * EATER_CHARGE / 3;
+ 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;
}
- else if (!player_bold(ty, tx))
+ for (; i < EATER_EXT * 3; i++)
{
- /* Hold the monster name */
- char m_name[80];
-
- /* Get the monster name (BEFORE polymorphing) */
- monster_desc(m_name, m_ptr, 0);
-#ifdef JP
- msg_format("ÁÇÁ᤯%s¤Î²û¤ËÆþ¤ê¹þ¤ó¤À¡ª", m_name);
-#else
- msg_format("You quickly jump in and attack %s!", m_name);
-#endif
+ KIND_OBJECT_IDX k_idx = lookup_kind(TV_ROD, i - EATER_EXT * 2);
+ 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;
+ if (p_ptr->magic_num1[i] < 0) p_ptr->magic_num1[i] = 0;
}
-
- if (!player_bold(ty, tx)) teleport_player_to(ty, tx, FALSE, FALSE);
- moved = TRUE;
- tmp_mdeath = py_attack(ny, nx, HISSATSU_NYUSIN);
-
- break;
+ msg_print(_("頭がハッキリとした。", "You feel your head clear."));
+ p_ptr->window |= (PW_PLAYER);
+ ident = TRUE;
+ }
+ else if (p_ptr->csp < p_ptr->msp)
+ {
+ p_ptr->csp = p_ptr->msp;
+ p_ptr->csp_frac = 0;
+ msg_print(_("頭がハッキリとした。", "You feel your head clear."));
+ p_ptr->redraw |= (PR_MANA);
+ p_ptr->window |= (PW_PLAYER);
+ p_ptr->window |= (PW_SPELL);
+ ident = TRUE;
}
- if (!moved && !player_bold(ty, tx)) teleport_player_to(ty, tx, FALSE, FALSE);
-
- if (mdeath) *mdeath = tmp_mdeath;
- return TRUE;
+ return ident;
}
-
-/*
- * Remove all mirrors in this floor
- */
-void remove_all_mirrors(bool explode)
+bool restore_all_status(void)
{
- int x, y;
-
- for (x = 0; x < cur_wid; x++)
- {
- for (y = 0; y < cur_hgt; y++)
- {
- if (is_mirror_grid(&cave[y][x]))
- {
- remove_mirror(y, x);
- if (explode)
- project(0, 2, y, x, p_ptr->lev / 2 + 5, GF_SHARDS,
- (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
- }
- }
- }
+ bool ident = FALSE;
+ if (do_res_stat(A_STR)) ident = TRUE;
+ if (do_res_stat(A_INT)) ident = TRUE;
+ if (do_res_stat(A_WIS)) ident = TRUE;
+ if (do_res_stat(A_DEX)) ident = TRUE;
+ if (do_res_stat(A_CON)) ident = TRUE;
+ if (do_res_stat(A_CHR)) ident = TRUE;
+ return ident;
}
+