mirror of
https://codeberg.org/noisytoot/notnotdnethack.git
synced 2025-07-29 00:42:28 +01:00
Add loot to grue level
Uncharged lantern and a sack containing an elvish sword of great antiquity and a platinum bar. Should eventually have an ivory everburning torch in the bag as well (oops!) Adds "uncharged" keyword, allowing uncharged wands, lanterns, lightsabers, etc. to be wished.
This commit is contained in:
parent
267fb2d18e
commit
0ca064058d
2 changed files with 30 additions and 2 deletions
12
dat/grue.des
12
dat/grue.des
|
@ -102,6 +102,12 @@ TELEPORT_REGION:(55,02,73,18),(0,0,0,0),up
|
|||
STAIR:(08,10),up
|
||||
STAIR:(68,10),down
|
||||
|
||||
# Treasure
|
||||
OBJECT:'#',"uncharged lantern",(62,18)
|
||||
OBJECT:'(',"sack",(62,18)
|
||||
OBJECT:'#',"+2 blessed wrathful silver elven broadsword",contained
|
||||
OBJECT:'#',"platinum bar",contained
|
||||
|
||||
# Warning
|
||||
ENGRAVING:(08,10), dust, "BEWARE OF GRUE"
|
||||
|
||||
|
@ -262,6 +268,12 @@ TELEPORT_REGION:(03,04,18,19),(0,0,0,0),down
|
|||
STAIR:(13,18),up
|
||||
STAIR:(66,15),down
|
||||
|
||||
# Treasure
|
||||
OBJECT:'#',"uncharged lantern",(67,17)
|
||||
OBJECT:'(',"sack",(67,17)
|
||||
OBJECT:'#',"+2 blessed wrathful silver elven broadsword",contained
|
||||
OBJECT:'#',"platinum bar",contained
|
||||
|
||||
# Non diggable walls
|
||||
NON_DIGGABLE:(00,00,75,20)
|
||||
|
||||
|
|
20
src/objnam.c
20
src/objnam.c
|
@ -3647,7 +3647,7 @@ int wishflags;
|
|||
register int i;
|
||||
register struct obj *otmp;
|
||||
int cnt, spe, spesgn, typ, very, rechrg;
|
||||
int blessed, uncursed, iscursed, ispoisoned, isgreased, isdrained, stolen;
|
||||
int blessed, uncursed, iscursed, ispoisoned, isgreased, isdrained, stolen, uncharged;
|
||||
int moonphase = -1, viperheads = -1, ampule = -1, mat = 0;
|
||||
int eroded, eroded2, eroded3, erodeproof;
|
||||
int gemtype = 0;
|
||||
|
@ -3705,7 +3705,7 @@ int wishflags;
|
|||
|
||||
cnt = spe = spesgn = typ = very = rechrg =
|
||||
blessed = uncursed = iscursed = stolen =
|
||||
isdrained = halfdrained =
|
||||
isdrained = halfdrained = uncharged =
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
isinvisible =
|
||||
#endif
|
||||
|
@ -3861,6 +3861,9 @@ int wishflags;
|
|||
iscursed = 1;
|
||||
} else if (!strncmpi(bp, "uncursed ", l=9)) {
|
||||
uncursed = 1;
|
||||
|
||||
} else if (!strncmpi(bp, "uncharged ", l=10)) {
|
||||
uncharged = 1;
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
} else if (!strncmpi(bp, "invisible ", l=10)) {
|
||||
isinvisible = 1;
|
||||
|
@ -5454,6 +5457,19 @@ typfnd:
|
|||
} else if (spesgn < 0) {
|
||||
curse(otmp);
|
||||
}
|
||||
// Some items can be wished for in an uncharged state
|
||||
if (uncharged) {
|
||||
if(objects[otmp->otyp].oc_charged){
|
||||
if(is_lightsaber(otmp))
|
||||
otmp->age = 0;
|
||||
else if(is_weptool(otmp))
|
||||
otmp->ovar1 = 0;
|
||||
else otmp->spe = 0;
|
||||
}
|
||||
else if(otmp->otyp == LANTERN){
|
||||
otmp->age = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
if (isinvisible) otmp->oinvis = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue