summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2010-01-08 22:55:59 +0100
committerBardur Arantsson <bardur@scientician.net>2010-01-08 23:46:23 +0100
commitf7eb880a91dc00f0531fe6a6ec795fe56ae5fc3f (patch)
tree2c85e919f22ec7c00ecd923266e48ada19c8c126
parent884505957dbd7caf37642e8330e10d0b71d47554 (diff)
Import fix from CVS: Don't generate impassable glass walls.
-rw-r--r--changes.txt1
-rw-r--r--lib/edit/f_info.txt11
-rw-r--r--lib/pref/font-ibm.prf3
-rw-r--r--lib/pref/font-win.prf3
-rw-r--r--lib/pref/graf-ibm.prf3
-rw-r--r--lib/pref/graf-iso.prf3
-rw-r--r--lib/pref/graf-new.prf3
-rw-r--r--lib/pref/graf-xxx.prf3
-rw-r--r--src/cave.c13
-rw-r--r--src/cmd2.c2
-rw-r--r--src/externs.h1
-rw-r--r--src/melee2.c4
-rw-r--r--src/spells1.c6
-rw-r--r--src/spells2.c4
-rw-r--r--src/traps.c2
15 files changed, 53 insertions, 9 deletions
diff --git a/changes.txt b/changes.txt
index 884befa7..5ea9a5ac 100644
--- a/changes.txt
+++ b/changes.txt
@@ -1,5 +1,6 @@
T.o.M.E 2.3.6
+- Don't generate impassable glass walls.
diff --git a/lib/edit/f_info.txt b/lib/edit/f_info.txt
index 21f7954d..d4285333 100644
--- a/lib/edit/f_info.txt
+++ b/lib/edit/f_info.txt
@@ -931,3 +931,14 @@ F:NO_WALK | CAN_PASS | NOTICE | SUPPORT_LIGHT
F:DONT_NOTICE_RUNNING | TUNNELABLE
D:1:You tunnel into the battlement.
D:2:a hard stone battlement blocking your way
+
+#
+# A diggable glass wall.
+#
+N:217:molten glass wall
+G:.:B
+F:NO_WALK | WALL | CAN_PASS | TUNNELABLE | NOTICE
+F:DONT_NOTICE_RUNNING
+D:1:You tunnel into the molten glass wall...
+D:2:a molten glass wall blocking your way
+
diff --git a/lib/pref/font-ibm.prf b/lib/pref/font-ibm.prf
index 5111f639..35ebcdca 100644
--- a/lib/pref/font-ibm.prf
+++ b/lib/pref/font-ibm.prf
@@ -261,6 +261,9 @@ F:210:0x01/0xB2
# hail-stone wall
F:211:0x09/0xB1
+# molten glass wall
+F:217:0x0E/0xDB
+
##### Monster attr/char definitions #####
diff --git a/lib/pref/font-win.prf b/lib/pref/font-win.prf
index 00475916..60d2871c 100644
--- a/lib/pref/font-win.prf
+++ b/lib/pref/font-win.prf
@@ -197,6 +197,9 @@ F:215:0x0E/0x7F
# battlement
F:216:0x01/0x7F
+# glass wall
+F:217:0x0E/0x1F
+
##### Monster attr/char definitions #####
# Space monster
diff --git a/lib/pref/graf-ibm.prf b/lib/pref/graf-ibm.prf
index eee54a13..9233bd43 100644
--- a/lib/pref/graf-ibm.prf
+++ b/lib/pref/graf-ibm.prf
@@ -681,6 +681,9 @@ F:210:0x01/0xCA
# hail-stone wall
F:211:0x09/0xBC
+# molten glass wall
+F:217:0x0E/0xD0
+
##### Building attr/char definitions #####
diff --git a/lib/pref/graf-iso.prf b/lib/pref/graf-iso.prf
index 86cf8cc8..a97e5401 100644
--- a/lib/pref/graf-iso.prf
+++ b/lib/pref/graf-iso.prf
@@ -630,6 +630,9 @@ F:211:0x80:0x80
# dead small tree
F:212:0x80:0x80
+# molten glass wall
+F:217:0x80:0xAE
+
# something
K:0:0x80:0x80
diff --git a/lib/pref/graf-new.prf b/lib/pref/graf-new.prf
index 3df5caa9..384221b8 100644
--- a/lib/pref/graf-new.prf
+++ b/lib/pref/graf-new.prf
@@ -580,6 +580,9 @@ F:214:0x80/0x81
# glacial wall
F:215:0xC5/0x92
+# molten glass wall
+F:217:0xC0/0x9F
+
# Skeleton
G:M:1:0xC6/0x91
diff --git a/lib/pref/graf-xxx.prf b/lib/pref/graf-xxx.prf
index 08661544..9174a40a 100644
--- a/lib/pref/graf-xxx.prf
+++ b/lib/pref/graf-xxx.prf
@@ -614,6 +614,9 @@ F:214:0x80/0x80
# glacial wall
F:215:0xD0/0x88
+# molten glass wall
+F:217:0xD0/0x89
+
# something
K:0:0x80/0x80
diff --git a/src/cave.c b/src/cave.c
index fa65b321..12bedde5 100644
--- a/src/cave.c
+++ b/src/cave.c
@@ -4892,6 +4892,19 @@ void place_floor(int y, int x)
}
/*
+ * This routine is used when the current feature gets convert to a floor and
+ * the possible floor types include glass which is permanent. An unpassable
+ * feature is undesirable, so the glass gets convert to molten glass which
+ * is passable.
+ */
+void place_floor_convert_glass(int y, int x)
+{
+ place_floor(y, x);
+
+ if (cave[y][x].feat == 188) cave[y][x].feat = 217;
+}
+
+/*
* Place a cave filler at (y, x)
*/
void place_filler(int y, int x)
diff --git a/src/cmd2.c b/src/cmd2.c
index 27c64ed7..c962926e 100644
--- a/src/cmd2.c
+++ b/src/cmd2.c
@@ -2162,7 +2162,7 @@ void do_cmd_disarm_mon_trap(int y, int x)
{
msg_print("You disarm the monster trap.");
- place_floor(y, x);
+ place_floor_convert_glass(y, x);
cave[p_ptr->py][p_ptr->px].special = cave[p_ptr->py][p_ptr->px].special2 = 0;
}
diff --git a/src/externs.h b/src/externs.h
index 50ca716b..9cff66f2 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -673,6 +673,7 @@ extern void wiz_lite_extra(void);
extern void wiz_dark(void);
extern void cave_set_feat(int y, int x, int feat);
extern void place_floor(int y, int x);
+extern void place_floor_convert_glass(int y, int x);
extern void place_filler(int y, int x);
extern void mmove2(int *y, int *x, int y1, int x1, int y2, int x2);
extern bool projectable(int y1, int x1, int y2, int x2);
diff --git a/src/melee2.c b/src/melee2.c
index 291a7d9f..b5e40635 100644
--- a/src/melee2.c
+++ b/src/melee2.c
@@ -6833,7 +6833,7 @@ static void process_monster(int m_idx, bool is_frien)
c_ptr->info &= ~(CAVE_MARK);
/* Break the rune */
- place_floor(ny, nx);
+ place_floor_convert_glass(ny, nx);
/* Allow movement */
do_move = TRUE;
@@ -7068,7 +7068,7 @@ static void process_monster(int m_idx, bool is_frien)
c_ptr->info &= ~(CAVE_MARK);
/* Break the rune */
- place_floor(ny, nx);
+ place_floor_convert_glass(ny, nx);
/* Allow movement */
do_move = TRUE;
diff --git a/src/spells1.c b/src/spells1.c
index 6a4c362f..8f9c38c3 100644
--- a/src/spells1.c
+++ b/src/spells1.c
@@ -3252,7 +3252,7 @@ static bool project_f(int who, int r, int y, int x, int dam, int typ)
if (f)
{
- if (f == FEAT_FLOOR) place_floor(y, x);
+ if (f == FEAT_FLOOR) place_floor_convert_glass(y, x);
else cave_set_feat(y, x, f);
if (seen) obvious = TRUE;
@@ -3341,7 +3341,7 @@ static bool project_f(int who, int r, int y, int x, int dam, int typ)
/* Remove the feature */
if (!(f_info[c_ptr->feat].flags1 & FF1_PERMANENT))
- place_floor(y, x);
+ place_floor_convert_glass(y, x);
}
/* Hack -- Force redraw */
@@ -3411,7 +3411,7 @@ static bool project_f(int who, int r, int y, int x, int dam, int typ)
/* Remove the feature */
if (!(f_info[c_ptr->feat].flags1 & FF1_PERMANENT))
- place_floor(y, x);
+ place_floor_convert_glass(y, x);
/* Hack -- Force redraw */
note_spot(y, x);
diff --git a/src/spells2.c b/src/spells2.c
index 06f5b443..2e409713 100644
--- a/src/spells2.c
+++ b/src/spells2.c
@@ -5520,7 +5520,7 @@ void wipe(int y1, int x1, int r)
if (m_list[c_ptr->m_idx].status != MSTATUS_COMPANION) delete_monster(y, x);
delete_object(y, x);
- place_floor(y, x);
+ place_floor_convert_glass(y, x);
}
}
@@ -7914,7 +7914,7 @@ bool passwall(int dir, bool safe)
msg_print("You emerge in the wall!");
take_hit(damroll(10, 8), "becoming one with a wall");
}
- place_floor(y, x);
+ place_floor_convert_glass(y, x);
}
/* Move */
diff --git a/src/traps.c b/src/traps.c
index d387efea..3e9b2497 100644
--- a/src/traps.c
+++ b/src/traps.c
@@ -3418,7 +3418,7 @@ bool mon_hit_trap(int m_idx)
}
/* Remove the trap if inactive now */
- if (remove) place_floor(my, mx);
+ if (remove) place_floor_convert_glass(my, mx);
/* did it die? */
return (dead);