Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git i/include/extern.h w/include/extern.h
- index b6f4825..399c940 100644
- --- i/include/extern.h
- +++ w/include/extern.h
- @@ -355,6 +355,7 @@ E int FDECL(back_to_glyph, (XCHAR_P, XCHAR_P));
- E int FDECL(zapdir_to_glyph, (int, int, int));
- E int FDECL(glyph_at, (XCHAR_P, XCHAR_P));
- E void NDECL(set_wall_state);
- +E int FDECL(set_wall, (int, int, int));
- E void FDECL(unset_seenv, (struct rm *, int, int, int, int));
- E int FDECL(warning_of, (struct monst *));
- @@ -2283,6 +2284,7 @@ E void FDECL(fill_room, (struct mkroom *, BOOLEAN_P));
- E boolean FDECL(load_special, (const char *));
- E xchar FDECL(selection_getpoint, (int, int, struct opvar *));
- E struct opvar *FDECL(selection_opvar, (char *));
- +E void FDECL(set_door_orientation, (int, int));
- E void FDECL(opvar_free_x, (struct opvar *));
- E void FDECL(set_selection_floodfillchk, (int FDECL((*), (int,int))));
- E void FDECL(selection_floodfill, (struct opvar *, int, int, BOOLEAN_P));
- diff --git i/src/display.c w/src/display.c
- index 5c98c8a..1c6b6f7 100644
- --- i/src/display.c
- +++ w/src/display.c
- @@ -131,7 +131,6 @@ STATIC_DCL boolean FDECL(more_than_one, (int, int, int, int, int));
- #endif
- STATIC_DCL int FDECL(set_twall, (int, int, int, int, int, int, int, int));
- -STATIC_DCL int FDECL(set_wall, (int, int, int));
- STATIC_DCL int FDECL(set_corn, (int, int, int, int, int, int, int, int));
- STATIC_DCL int FDECL(set_crosswall, (int, int));
- STATIC_DCL void FDECL(set_seenv, (struct rm *, int, int, int, int));
- @@ -1921,7 +1920,7 @@ int x1, y1, x2, y2, x3, y3;
- }
- /* Return wall mode for a horizontal or vertical wall. */
- -STATIC_OVL int
- +int
- set_wall(x, y, horiz)
- int x, y, horiz;
- {
- diff --git i/src/lock.c w/src/lock.c
- index 067eb6c..60ce3d6 100644
- --- i/src/lock.c
- +++ w/src/lock.c
- @@ -1031,6 +1031,35 @@ int x, y;
- } else
- res = FALSE;
- break;
- + case WAN_MAKE_INVISIBLE:
- + if (door->doormask & (D_LOCKED | D_CLOSED)) {
- + /* Riders shall not be blocked */
- + if (Is_astralevel(&u.uz))
- + {
- + msg = "The door momentarily fades.";
- + res = FALSE;
- + break;
- + }
- + /* Probably should not count as vandalism,
- + * but the original shop door will still reappear */
- + if (*in_rooms(x, y, SHOPBASE))
- + add_damage(x, y, 0L);
- + /* BUG: secret doors can only pretend to be straight walls,
- + * so a door created with wizard lock in a room corner
- + * or other weird position will display as a wrong kind
- + * of wall when made invisible. This is not noticeable
- + * with the default symset, but all others will glitch.
- + * There's no easy way to fix it short of arbitrarily refusing
- + * to vanish doors at weird positions, which is also ugly. */
- + door->typ = SDOOR;
- + set_door_orientation(x, y);
- + door->doormask &= ~WM_MASK;
- + door->wall_info |= set_wall(x, y, door->horizontal);
- + newsym(x, y);
- + msg = "The door vanishes!";
- + } else
- + res = FALSE;
- + break;
- default:
- impossible("magic (%d) attempted on door.", otmp->otyp);
- break;
- diff --git i/src/shk.c w/src/shk.c
- index 1b42f27..4bce8a5 100644
- --- i/src/shk.c
- +++ w/src/shk.c
- @@ -3499,7 +3499,8 @@ boolean catchup; /* restoring a level */
- (void) mpickobj(shkp, otmp);
- }
- deltrap(ttmp);
- - if (IS_DOOR(tmp_dam->typ) && !(levl[x][y].doormask & D_ISOPEN)) {
- + if (IS_DOOR(tmp_dam->typ) && IS_DOOR(levl[x][y].typ)
- + && !(levl[x][y].doormask & D_ISOPEN)) {
- levl[x][y].doormask = D_CLOSED;
- block_point(x, y);
- } else if (IS_WALL(tmp_dam->typ)) {
- diff --git i/src/sp_lev.c w/src/sp_lev.c
- index a1b1f6d..800b0aa 100644
- --- i/src/sp_lev.c
- +++ w/src/sp_lev.c
- @@ -52,7 +52,6 @@ STATIC_DCL void FDECL(set_wall_property, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P,
- STATIC_DCL void NDECL(shuffle_alignments);
- STATIC_DCL void NDECL(count_features);
- STATIC_DCL void NDECL(remove_boundary_syms);
- -STATIC_DCL void FDECL(set_door_orientation, (int, int));
- STATIC_DCL void FDECL(maybe_add_door, (int, int, struct mkroom *));
- STATIC_DCL void NDECL(link_doors_rooms);
- STATIC_DCL void NDECL(fill_rooms);
- @@ -704,7 +703,7 @@ remove_boundary_syms()
- }
- /* used by sel_set_door() and link_doors_rooms() */
- -STATIC_OVL void
- +void
- set_door_orientation(x, y)
- int x, y;
- {
- diff --git i/src/zap.c w/src/zap.c
- index 5750b27..2c2ab38 100644
- --- i/src/zap.c
- +++ w/src/zap.c
- @@ -3297,6 +3297,7 @@ struct obj **pobj; /* object tossed/used, set to NULL
- case WAN_OPENING:
- case WAN_LOCKING:
- case WAN_STRIKING:
- + case WAN_MAKE_INVISIBLE:
- case SPE_KNOCK:
- case SPE_WIZARD_LOCK:
- case SPE_FORCE_BOLT:
- @@ -3304,7 +3305,8 @@ struct obj **pobj; /* object tossed/used, set to NULL
- if (cansee(bhitpos.x, bhitpos.y)
- || (obj->otyp == WAN_STRIKING && !Deaf))
- learnwand(obj);
- - if (levl[bhitpos.x][bhitpos.y].doormask == D_BROKEN
- + if (IS_DOOR(levl[bhitpos.x][bhitpos.y].typ)
- + && levl[bhitpos.x][bhitpos.y].doormask == D_BROKEN
- && *in_rooms(bhitpos.x, bhitpos.y, SHOPBASE)) {
- shopdoor = TRUE;
- add_damage(bhitpos.x, bhitpos.y, SHOP_DOOR_COST);
Add Comment
Please, Sign In to add comment