ToME と TOband を参考に実装した.
* 判定マクロ, 及び進めない場合のメッセージは TOband のものを使った.
* カオス魔法 "虚無招来" で, 床に見える外壁は壁に数えない.
lite_spot(y, x);
}
+ /* Boundary floor mimic */
+ else if (boundary_floor_grid(c_ptr))
+ {
+#ifdef JP
+ msg_print("¤½¤ì°Ê¾åÀè¤Ë¤Ï¿Ê¤á¤Ê¤¤¤è¤¦¤À¡£");
+#else
+ msg_print("You feel you cannot go any more.");
+#endif
+ }
+
/* Wall (or secret door) */
else
{
#ifdef JP
- msg_print("Êɤ¬¹Ô¤¯¼ê¤ò¤Ï¤Ð¤ó¤Ç¤¤¤ë¤è¤¦¤À¡£");
+ msg_format("%s¤¬¹Ô¤¯¼ê¤ò¤Ï¤Ð¤ó¤Ç¤¤¤ë¤è¤¦¤À¡£", (feat == FEAT_TREES) ? "ÌÚ" : "ÊÉ");
#else
- msg_print("You feel a wall blocking your way.");
+ msg_format("You feel a %s blocking your way.", (feat == FEAT_TREES) ? "tree" : "wall");
#endif
c_ptr->info |= (CAVE_MARK);
msg_print("There is rubble blocking your way.");
#endif
-
if (!(p_ptr->confused || p_ptr->stun || p_ptr->image))
energy_use = 0;
msg_print("There is a closed door blocking your way.");
#endif
+ if (!(p_ptr->confused || p_ptr->stun || p_ptr->image))
+ energy_use = 0;
+ }
+
+ /* Boundary floor mimic */
+ else if (boundary_floor_grid(c_ptr))
+ {
+#ifdef JP
+ msg_print("¤½¤ì°Ê¾åÀè¤Ë¤Ï¿Ê¤á¤Ê¤¤¡£");
+#else
+ msg_print("You cannot go any more.");
+#endif
if (!(p_ptr->confused || p_ptr->stun || p_ptr->image))
energy_use = 0;
else
{
#ifdef JP
- msg_print("Êɤ¬¹Ô¤¯¼ê¤ò¤Ï¤Ð¤ó¤Ç¤¤¤ë¡£");
+ msg_format("%s¤¬¹Ô¤¯¼ê¤ò¤Ï¤Ð¤ó¤Ç¤¤¤ë¡£", (feat == FEAT_TREES) ? "ÌÚ" : "ÊÉ");
#else
- msg_print("There is a wall blocking your way.");
+ msg_format("There is a %s blocking your way.", (feat == FEAT_TREES) ? "tree" : "wall");
#endif
-
if (!(p_ptr->confused || p_ptr->stun || p_ptr->image))
energy_use = 0;
}
}
/* Sound */
- sound(SOUND_HITWALL);
+ if (!boundary_floor_grid(c_ptr)) sound(SOUND_HITWALL);
}
/* Normal movement */
}
- /* No tunnelling through mountains */
- else if (feat == FEAT_MOUNTAIN)
- {
-#ifdef JP
- msg_print("¤½¤³¤Ï·¡¤ì¤Ê¤¤!");
-#else
- msg_print("You can't tunnel through that!");
-#endif
-
- }
-
/* Map border (mimiccing Permanent wall) */
else if ((c_ptr->feat >= FEAT_PERM_EXTRA &&
c_ptr->feat <= FEAT_PERM_SOLID) ||
#define player_has_los_bold(Y,X) \
(((cave[Y][X].info & (CAVE_VIEW)) != 0) || p_ptr->inside_battle)
+/*
+ * Determine if a "boundary" grid is "floor mimic"
+ */
+#define boundary_floor_bold(Y,X) \
+ ((cave[(Y)][(X)].feat == FEAT_PERM_SOLID) && \
+ cave[(Y)][(X)].mimic && \
+ !(cave[(Y)][(X)].mimic & 0x20))
+
+#define boundary_floor_grid(C) \
+ (((C)->feat == FEAT_PERM_SOLID) && \
+ (C)->mimic && \
+ !((C)->mimic & 0x20))
#define update_playtime() \
{\
}
}
+ /* Hack -- boundary walls and mimics are set later */
+ for (y = 0; y < cur_hgt; y++) cave[y][0].feat = cave[y][cur_wid - 1].feat = FEAT_NONE;
+ for (x = 0; x < cur_wid; x++) cave[0][x].feat = cave[cur_hgt - 1][x].feat = FEAT_NONE;
+
#ifdef ALLOW_CAVERNS_AND_LAKES
/* Possible "destroyed" level */
if ((dun_level > 30) && one_in_(DUN_DEST*2) && (small_levels) && (d_info[dungeon_type].flags1 & DF1_DESTROY))
}
}
- /* Special boundary walls -- Top */
+ /* Special boundary walls -- Top and bottom */
for (x = 0; x < cur_wid; x++)
{
- cave_type *c_ptr = &cave[0][x];
+ cave_type *c_ptr = &cave[0][x]; /* Top */
- /* Clear previous contents, add "solid" perma-wall */
- c_ptr->feat = FEAT_PERM_SOLID;
+ /* Clear previous contents */
+ if (c_ptr->feat == FEAT_NONE) c_ptr->feat = fill_type[randint0(100)];
c_ptr->info &= ~(CAVE_MASK);
- }
- /* Special boundary walls -- Bottom */
- for (x = 0; x < cur_wid; x++)
- {
- cave_type *c_ptr = &cave[cur_hgt-1][x];
+ c_ptr = &cave[cur_hgt - 1][x]; /* Bottom */
- /* Clear previous contents, add "solid" perma-wall */
- c_ptr->feat = FEAT_PERM_SOLID;
+ /* Clear previous contents */
+ if (c_ptr->feat == FEAT_NONE) c_ptr->feat = fill_type[randint0(100)];
c_ptr->info &= ~(CAVE_MASK);
}
- /* Special boundary walls -- Left */
- for (y = 0; y < cur_hgt; y++)
+ /* Special boundary walls -- Left and right */
+ for (y = 1; y < (cur_hgt - 1); y++)
{
- cave_type *c_ptr = &cave[y][0];
+ cave_type *c_ptr = &cave[y][0]; /* Left */
- /* Clear previous contents, add "solid" perma-wall */
- c_ptr->feat = FEAT_PERM_SOLID;
+ /* Clear previous contents */
+ if (c_ptr->feat == FEAT_NONE) c_ptr->feat = fill_type[randint0(100)];
c_ptr->info &= ~(CAVE_MASK);
- }
- /* Special boundary walls -- Right */
- for (y = 0; y < cur_hgt; y++)
- {
- cave_type *c_ptr = &cave[y][cur_wid-1];
+ c_ptr = &cave[y][cur_wid - 1]; /* Right */
- /* Clear previous contents, add "solid" perma-wall */
- c_ptr->feat = FEAT_PERM_SOLID;
+ /* Clear previous contents */
+ if (c_ptr->feat == FEAT_NONE) c_ptr->feat = fill_type[randint0(100)];
c_ptr->info &= ~(CAVE_MASK);
}
}
}
+ /* Special boundary walls -- Top and bottom */
+ for (x = 0; x < cur_wid; x++)
+ {
+ cave_type *c_ptr = &cave[0][x];
+
+ /* Set boundary mimic and add "solid" perma-wall */
+ c_ptr->mimic = f_info[c_ptr->feat].mimic;
+ c_ptr->feat = FEAT_PERM_SOLID;
+
+ c_ptr = &cave[cur_hgt - 1][x];
+
+ /* Set boundary mimic and add "solid" perma-wall */
+ c_ptr->mimic = f_info[c_ptr->feat].mimic;
+ c_ptr->feat = FEAT_PERM_SOLID;
+ }
+
+ /* Special boundary walls -- Left and right */
+ for (y = 1; y < (cur_hgt - 1); y++)
+ {
+ cave_type *c_ptr = &cave[y][0];
+
+ /* Set boundary mimic and add "solid" perma-wall */
+ c_ptr->mimic = f_info[c_ptr->feat].mimic;
+ c_ptr->feat = FEAT_PERM_SOLID;
+
+ c_ptr = &cave[y][cur_wid - 1];
+
+ /* Set boundary mimic and add "solid" perma-wall */
+ c_ptr->mimic = f_info[c_ptr->feat].mimic;
+ c_ptr->feat = FEAT_PERM_SOLID;
+ }
+
/* Determine the character location */
if (!new_player_spot()) return FALSE;
y = py + ddy[dir];
x = px + ddx[dir];
c_ptr = &cave[y][x];
- if (cave_floor_bold(y, x))
+ if (cave_floor_bold(y, x) || boundary_floor_grid(c_ptr))
{
#ifdef JP
msg_print("²¿¤â¤Ê¤¤¾ì½ê¤Ë³ú¤ß¤Ä¤¤¤¿¡ª");
(c_ptr->feat == FEAT_MOUNTAIN))
{
#ifdef JP
- msg_print("¤¤¤Æ¤Ã¡ª¤³¤ÎÊɤϤ¢¤Ê¤¿¤Î»õ¤è¤ê¹Å¤¤¡ª");
+ msg_format("¤¤¤Æ¤Ã¡ª¤³¤Î%s¤Ï¤¢¤Ê¤¿¤Î»õ¤è¤ê¹Å¤¤¡ª", (c_ptr->mimic == FEAT_TREES) ? "ÌÚ" : "ÊÉ");
#else
- msg_print("Ouch! This wall is harder than your teeth!");
+ msg_format("Ouch! This %s is harder than your teeth!", (c_ptr->mimic == FEAT_TREES) ? "tree" : "wall");
#endif
break;
void call_the_(void)
{
int i;
+ int y, x;
+ bool do_call = TRUE;
- if (cave_floor_bold(py - 1, px - 1) &&
- cave_floor_bold(py - 1, px ) &&
- cave_floor_bold(py - 1, px + 1) &&
- cave_floor_bold(py , px - 1) &&
- cave_floor_bold(py , px + 1) &&
- cave_floor_bold(py + 1, px - 1) &&
- cave_floor_bold(py + 1, px ) &&
- cave_floor_bold(py + 1, px + 1))
+ for (i = 0; i < 9; i++)
+ {
+ y = py + ddy_ddd[i];
+ x = px + ddx_ddd[i];
+
+ if (!cave_floor_bold(y, x) && !boundary_floor_bold(y, x))
+ {
+ do_call = FALSE;
+ break;
+ }
+ }
+
+ if (do_call)
{
for (i = 1; i < 10; i++)
{
- if (i-5) fire_ball(GF_ROCKET, i, 175, 2);
+ if (i - 5) fire_ball(GF_ROCKET, i, 175, 2);
}
for (i = 1; i < 10; i++)
{
- if (i-5) fire_ball(GF_MANA, i, 175, 3);
+ if (i - 5) fire_ball(GF_MANA, i, 175, 3);
}
for (i = 1; i < 10; i++)
{
- if (i-5) fire_ball(GF_NUKE, i, 175, 4);
+ if (i - 5) fire_ball(GF_NUKE, i, 175, 4);
}
}
else
{
#ifdef JP
-msg_format("¤¢¤Ê¤¿¤Ï%s¤òÊɤ˶᤹¤®¤ë¾ì½ê¤Ç¾§¤¨¤Æ¤·¤Þ¤Ã¤¿¡ª",
-((mp_ptr->spell_book == TV_LIFE_BOOK) ? "µ§¤ê" : "¼öʸ"));
-msg_print("Â礤ÊÇúȯ²»¤¬¤¢¤Ã¤¿¡ª");
+ msg_format("¤¢¤Ê¤¿¤Ï%s¤òÊɤ˶᤹¤®¤ë¾ì½ê¤Ç¾§¤¨¤Æ¤·¤Þ¤Ã¤¿¡ª",
+ ((mp_ptr->spell_book == TV_LIFE_BOOK) ? "µ§¤ê" : "¼öʸ"));
+ msg_print("Â礤ÊÇúȯ²»¤¬¤¢¤Ã¤¿¡ª");
#else
msg_format("You %s the %s too close to a wall!",
((mp_ptr->spell_book == TV_LIFE_BOOK) ? "recite" : "cast"),
if (destroy_area(py, px, 15 + p_ptr->lev + randint0(11)))
#ifdef JP
-msg_print("¥À¥ó¥¸¥ç¥ó¤¬Êø²õ¤·¤¿...");
+ msg_print("¥À¥ó¥¸¥ç¥ó¤¬Êø²õ¤·¤¿...");
#else
msg_print("The dungeon collapses...");
#endif
else
#ifdef JP
-msg_print("¥À¥ó¥¸¥ç¥ó¤ÏÂ礤¯Íɤ줿¡£");
+ msg_print("¥À¥ó¥¸¥ç¥ó¤ÏÂ礤¯Íɤ줿¡£");
#else
msg_print("The dungeon trembles.");
#endif
#ifdef JP
-take_hit(DAMAGE_NOESCAPE, 100 + randint1(150), "¼«»¦Åª¤Êµõ̵¾·Íè", -1);
+ take_hit(DAMAGE_NOESCAPE, 100 + randint1(150), "¼«»¦Åª¤Êµõ̵¾·Íè", -1);
#else
take_hit(DAMAGE_NOESCAPE, 100 + randint1(150), "a suicidal Call the Void", -1);
#endif
{
for (tx = x - width - 1; tx <= x + width + 1; tx++)
{
- if (!in_bounds(ty, tx)) continue;
+ if (!in_bounds2(ty, tx)) continue;
c_ptr = &cave[ty][tx];
{
ty = rand_spread(y, d);
tx = rand_spread(x, d);
- if (!in_bounds(ty, tx)) continue;
+ if (!in_bounds2(ty, tx)) continue;
break;
}