From: Sean Hunt Date: Sun, 24 May 2015 15:04:05 +0000 (+0900) Subject: Make the wand of wishing chest immune to trapping X-Git-Tag: NetHack-3.6.0_RC01~371 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b8bea3af20328629273e8a68411e10e71d0b9b5f;p=nethack Make the wand of wishing chest immune to trapping This eliminates a source of very random, unpreventable frustration to players. --- diff --git a/dat/castle.des b/dat/castle.des index f6252667e..6abb9d0af 100644 --- a/dat/castle.des +++ b/dat/castle.des @@ -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) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index a6d6460ae..a72aa514a 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -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 diff --git a/util/lev_comp.l b/util/lev_comp.l index 240996a76..53e2743b2 100644 --- a/util/lev_comp.l +++ b/util/lev_comp.l @@ -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); diff --git a/util/lev_comp.y b/util/lev_comp.y index 318bf7ec8..a26adecb3 100644 --- a/util/lev_comp.y +++ b/util/lev_comp.y @@ -204,7 +204,7 @@ extern char curr_token[512]; %token QUANTITY_ID BURIED_ID LOOP_ID %token FOR_ID TO_ID %token SWITCH_ID CASE_ID BREAK_ID DEFAULT_ID -%token ERODED_ID TRAPPED_ID RECHARGED_ID INVIS_ID GREASED_ID +%token ERODED_ID TRAPPED_STATE RECHARGED_ID INVIS_ID GREASED_ID %token FEMALE_ID CANCELLED_ID REVIVED_ID AVENGE_ID FLEEING_ID BLINDED_ID %token PARALYZED_ID STUNNED_ID CONFUSED_ID SEENTRAPS_ID ALL_ID %token 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