]> granicus.if.org Git - nethack/commitdiff
Make the wand of wishing chest immune to trapping
authorSean Hunt <scshunt@csclub.uwaterloo.ca>
Sun, 24 May 2015 15:04:05 +0000 (00:04 +0900)
committernhmall <mjnh@persona.ca>
Sun, 24 May 2015 15:12:41 +0000 (11:12 -0400)
This eliminates a source of very random, unpreventable frustration to
players.

dat/castle.des
doc/fixes35.0
util/lev_comp.l
util/lev_comp.y

index f6252667eb3547d2b80998f0bce646c08e8975f7..6abb9d0afe2eb8a0b354637adbb67e3b64115e25 100644 (file)
@@ -137,7 +137,7 @@ OBJECT:$object[3],(53,11)
 OBJECT:$object[3],(54,11)
 OBJECT:$object[3],(55,11)
 # THE WAND OF WISHING in 1 of the 4 towers
-CONTAINER:('(',"chest"),$place[0] {
+CONTAINER:('(',"chest"),not_trapped,$place[0] {
 OBJECT:('/',"wishing")
 }
 # Prevent monsters from eating it.  (@'s never eat objects)
index a6d6460ae9d3f2be5efc4fbca7c0185c95834fc5..a72aa514a38b0d5c822251dbb6d83e2263752258 100644 (file)
@@ -916,6 +916,7 @@ monsters without hands can no longer pick up piles of objects (with
 uncursed enchant weapon now correctly fixes erosion
 scroll of earth messages cleaned up
 long worms can no longer be leashed
+the chest in the Castle containing the wishing wand can never be trapped
 
 
 Platform- and/or Interface-Specific Fixes
index 240996a76db1f60350e3d51c428656c2d4525b0e..53e2743b2d043a904d646c6652b9d6484261779b 100644 (file)
@@ -209,7 +209,8 @@ quantity    ST_RET(QUANTITY_ID);
 buried         ST_RET(BURIED_ID);
 eroded         ST_RET(ERODED_ID);
 erodeproof     ST_RET(ERODEPROOF_ID);
-trapped                ST_RET(TRAPPED_ID);
+trapped     { savetoken(yytext); yylval.i=1; return TRAPPED_STATE; }
+not_trapped { savetoken(yytext); yylval.i=0; return TRAPPED_STATE; }
 recharged      ST_RET(RECHARGED_ID);
 invisible      ST_RET(INVIS_ID);
 greased                ST_RET(GREASED_ID);
index 318bf7ec8b9d8a530cc628352089f4b9afc16868..a26adecb36532d0df5d88b579ecae35efb1227a9 100644 (file)
@@ -204,7 +204,7 @@ extern char curr_token[512];
 %token <i> QUANTITY_ID BURIED_ID LOOP_ID
 %token <i> FOR_ID TO_ID
 %token <i> SWITCH_ID CASE_ID BREAK_ID DEFAULT_ID
-%token <i> ERODED_ID TRAPPED_ID RECHARGED_ID INVIS_ID GREASED_ID
+%token <i> ERODED_ID TRAPPED_STATE RECHARGED_ID INVIS_ID GREASED_ID
 %token <i> FEMALE_ID CANCELLED_ID REVIVED_ID AVENGE_ID FLEEING_ID BLINDED_ID
 %token <i> PARALYZED_ID STUNNED_ID CONFUSED_ID SEENTRAPS_ID ALL_ID
 %token <i> MONTYPE_ID
@@ -1640,9 +1640,9 @@ object_info       : CURSE_TYPE
                      } else
                          lc_error("DOOR state can only be locked or broken.");
                  }
-               | TRAPPED_ID
+               | TRAPPED_STATE
                  {
-                     add_opvars(splev, "ii", VA_PASS2(1, SP_O_V_TRAPPED));
+                     add_opvars(splev, "ii", VA_PASS2($1, SP_O_V_TRAPPED));
                      $$ = 0x0400;
                  }
                | RECHARGED_ID ':' integer_or_var