Make the wand of wishing chest immune to trapping

This eliminates a source of very random, unpreventable frustration to
players.
This commit is contained in:
Sean Hunt
2015-05-25 00:04:05 +09:00
committed by nhmall
parent b5513b7db0
commit b8bea3af20
4 changed files with 7 additions and 5 deletions

View 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)

View 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

View 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);

View 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