Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git c/include/extern.h w/include/extern.h
- index 6959e24..5f7e299 100644
- --- c/include/extern.h
- +++ w/include/extern.h
- @@ -365,6 +365,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 *));
- @@ -2326,6 +2327,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 c/src/display.c w/src/display.c
- index c5b155b..e673644 100644
- --- c/src/display.c
- +++ w/src/display.c
- @@ -138,7 +138,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));
- @@ -2007,7 +2006,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 c/src/lock.c w/src/lock.c
- index 270ab18..9e29ca9 100644
- --- c/src/lock.c
- +++ w/src/lock.c
- @@ -1049,6 +1049,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 c/src/sp_lev.c w/src/sp_lev.c
- index cd95210..dba499e 100644
- --- c/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);
- @@ -717,7 +716,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 c/src/zap.c w/src/zap.c
- index a9350eb..ebe80fe 100644
- --- c/src/zap.c
- +++ w/src/zap.c
- @@ -3394,6 +3394,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:
- @@ -3401,7 +3402,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