- [+] let you salt corpses (stop them from decaying, like the spell
(forgot its name)) - [+] INFINITE LOOP during linkexit() on sewer map. - [+] cursed scroll of light wasn't updating view properly... - [+] when you use a tunnel, don't say "you walk down the staircase" - [+] use mandatory value of f_climbable text="tunnel" or "staircase" etc
This commit is contained in:
parent
804f72f5c7
commit
4f8f478139
20
data.c
20
data.c
|
@ -1379,7 +1379,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_RARE, NULL);
|
||||
addflag(lastot->flags, F_MAKESNOISE, 33, 3, NA, "a slow drip.");
|
||||
addflag(lastot->flags, F_GLYPH, C_GREY, '#', NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_DOWN, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_DOWN, NA, NA, "drainage grate");
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_GRATINGROOF, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
|
@ -1390,7 +1390,7 @@ void initobjects(void) {
|
|||
|
||||
addot(OT_GRATINGROOF, "drain in the roof", "An open draining grate set into the roof.", MT_NOTHING, 0, OC_DFEATURE, SZ_LARGE);
|
||||
addflag(lastot->flags, F_GLYPH, C_BLUE, '<', NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_UP, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_UP, NA, NA, "drainage grate");
|
||||
addflag(lastot->flags, F_DONTSHOWDEST, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_PIT, D_UP, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_GRATINGFLOOR, NA, NA, NULL);
|
||||
|
@ -1402,7 +1402,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 100, RR_RARE, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_CAVE, 100, RR_UNCOMMON, NULL);
|
||||
addflag(lastot->flags, F_GLYPH, C_BLUE, '^', NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_DOWN, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_DOWN, NA, NA, "hole");
|
||||
addflag(lastot->flags, F_DONTSHOWDEST, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_PIT, D_DOWN, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_HOLEINROOF, NA, NA, NULL);
|
||||
|
@ -1412,7 +1412,7 @@ void initobjects(void) {
|
|||
|
||||
addot(OT_HOLEINROOF, "hole in the roof", "A gaping hole in the roof.", MT_NOTHING, 0, OC_DFEATURE, SZ_LARGE);
|
||||
addflag(lastot->flags, F_GLYPH, C_BLUE, '<', NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_UP, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_UP, NA, NA, "hole");
|
||||
addflag(lastot->flags, F_DONTSHOWDEST, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_PIT, D_UP, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_HOLEINGROUND, NA, NA, NULL);
|
||||
|
@ -1423,7 +1423,7 @@ void initobjects(void) {
|
|||
|
||||
addot(OT_TUNNELDOWN, "tunnel leading down", "A wide tunnel leading downwards.", MT_STONE, 3000, OC_DFEATURE, SZ_HUGE);
|
||||
addflag(lastot->flags, F_GLYPH, C_BROWN, '>', NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_DOWN, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_DOWN, NA, NA, "tunnel");
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_TUNNELUP, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
|
@ -1431,21 +1431,21 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_MAKESNOISE, 33, 1, NA, "an echoing drip.");
|
||||
addot(OT_TUNNELUP, "tunnel leading up", "A wide tunnel leading upwards.", MT_STONE, 3000, OC_DFEATURE, SZ_HUGE);
|
||||
addflag(lastot->flags, F_GLYPH, C_BROWN, '<', NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_UP, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_UP, NA, NA, "tunnel");
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_TUNNELDOWN, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
|
||||
addot(OT_STAIRSDOWN, "staircase going down", "A stone staircase winding downwards.", MT_STONE, 3000, OC_DFEATURE, SZ_HUGE);
|
||||
addflag(lastot->flags, F_GLYPH, NA, '>', NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_DOWN, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_DOWN, NA, NA, "staircase");
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_STAIRSUP, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
|
||||
addot(OT_STAIRSUP, "staircase going up", "A stone staircase climbing upwards.", MT_STONE, 3000, OC_DFEATURE, SZ_HUGE);
|
||||
addflag(lastot->flags, F_GLYPH, NA, '<', NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_UP, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_UP, NA, NA, "staircase");
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_STAIRSDOWN, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
|
@ -1587,7 +1587,7 @@ void initobjects(void) {
|
|||
addot(OT_PORTAL, "magic portal", "A magical portal to a different place...", MT_MAGIC, 0, OC_DFEATURE, SZ_LARGE);
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 80, RR_VERYRARE, NULL);
|
||||
addflag(lastot->flags, F_GLYPH, C_BOLDGREEN, '^', NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_IN, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_IN, NA, NA, "portal");
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOFEEL, B_TRUE, NA, NA, NULL);
|
||||
|
@ -1595,7 +1595,7 @@ void initobjects(void) {
|
|||
addot(OT_STOMACHEXIT, "gaping hole", "A gaping hole in an enormous creature.", MT_MAGIC, 0, OC_DFEATURE, SZ_LARGE);
|
||||
addflag(lastot->flags, F_GLYPH, C_GREY, '^', NA, NULL);
|
||||
addflag(lastot->flags, F_DONTSHOWDEST, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_IN, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_IN, NA, NA, "hole");
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOFEEL, B_TRUE, NA, NA, NULL);
|
||||
|
|
BIN
data/hiscores.db
BIN
data/hiscores.db
Binary file not shown.
1
defs.h
1
defs.h
|
@ -2251,6 +2251,7 @@ enum FLAG {
|
|||
// stairs / teleporters / portals
|
||||
F_CLIMBABLE, // this is a stiarcase, v0 = up/down/in
|
||||
// also use this for portals
|
||||
// text = you climb down XXXX
|
||||
// OPTIONAL v1 = id of region to link to.
|
||||
F_PIT, // this is a pit which we can fall down.
|
||||
// v0 = up/down
|
||||
|
|
13
lf.c
13
lf.c
|
@ -6754,6 +6754,9 @@ enum MATERIAL getlfmaterial(lifeform_t *lf) {
|
|||
enum SKILLLEVEL getlorelevel(lifeform_t *lf, enum RACECLASS rcid) {
|
||||
enum SKILLLEVEL slev = PR_INEPT;
|
||||
raceclass_t *rc;
|
||||
if (gamemode < GM_GAMESTARTED) {
|
||||
return PR_INEPT;
|
||||
}
|
||||
rc = findraceclass(rcid);
|
||||
if (rc) {
|
||||
slev = getskill(lf, rc->skill);
|
||||
|
@ -17870,11 +17873,11 @@ int usestairs(lifeform_t *lf, object_t *o, int onpurpose, int climb) {
|
|||
curs_set(1);
|
||||
if (isportal) {
|
||||
if (isplayer(lf)) {
|
||||
msg("You enter %s...", obname);
|
||||
msg("You enter the %s...", f->text);
|
||||
// move cursor to msgwindow while we create the new level...
|
||||
wrefresh(msgwin);
|
||||
} else if (cansee(player, lf)) {
|
||||
msg("%s enters %s...", lfname, obname);
|
||||
msg("%s enters the %s...", lfname, f->text);
|
||||
}
|
||||
} else if (hasflag(o->flags, F_PIT) || (o->type->id == OT_GRATINGFLOOR) || (o->type->id == OT_GRATINGROOF)) {
|
||||
//f = hasflag(o->flags, F_PIT);
|
||||
|
@ -17886,11 +17889,11 @@ int usestairs(lifeform_t *lf, object_t *o, int onpurpose, int climb) {
|
|||
}
|
||||
} else {
|
||||
if (isplayer(lf)) {
|
||||
msg("You %s %s the staircase...", getmoveverb(lf), getdirname(dir));
|
||||
msg("You %s %s the %s...", getmoveverb(lf), getdirname(dir), f->text);
|
||||
// move cursor to msgwindow while we create the new level...
|
||||
wrefresh(msgwin);
|
||||
} else if (cansee(player, lf)) {
|
||||
msg("%s %s %s the staircase.", lfname, getmoveverbother(lf), getdirname(dir));
|
||||
msg("%s %s %s the %s.", lfname, getmoveverbother(lf), getdirname(dir), f->text);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17953,7 +17956,7 @@ int usestairs(lifeform_t *lf, object_t *o, int onpurpose, int climb) {
|
|||
if (movelfsoutofway(newcell) || !cellwalkable(lf, newcell, NULL)) {
|
||||
// TODO: handle this differently - ie always allow the player
|
||||
// go there?
|
||||
if (isplayer(lf)) msg("The stairs seem to be blocked.");
|
||||
if (isplayer(lf)) msg("The %s seems to be blocked.",f->text);
|
||||
return B_TRUE;
|
||||
}
|
||||
// announce
|
||||
|
|
30
map.c
30
map.c
|
@ -935,6 +935,8 @@ int cellhaslos(cell_t *c1, cell_t *dest) {
|
|||
int x2,y2;
|
||||
map_t *map;
|
||||
|
||||
if (c1 == dest) return B_TRUE;
|
||||
|
||||
if (!dest) return B_FALSE;
|
||||
|
||||
// let the player see when dead, otherwise the screen wil
|
||||
|
@ -4357,7 +4359,9 @@ int linkexits(map_t *m, int roomid) {
|
|||
// no corridors?
|
||||
if (ncorridors == 0) {
|
||||
if (db) dblog(" Need to link.");
|
||||
nadded += linkexit(poss[i], B_FALSE, NULL);
|
||||
if (!linkexit(poss[i], B_FALSE, NULL)) {
|
||||
nadded++;
|
||||
}
|
||||
}
|
||||
} // end for each door
|
||||
|
||||
|
@ -6643,19 +6647,20 @@ void makelit(cell_t *c, enum LIGHTLEV how, int howlong) {
|
|||
c->origlittimer = c->littimer;
|
||||
c->littimer = howlong;
|
||||
}
|
||||
c->lit = how;
|
||||
|
||||
if (how != origlit) {
|
||||
if ((gamemode == GM_GAMESTARTED) && (c->lit != how)) {
|
||||
//if ((gamemode == GM_GAMESTARTED) && (c->lit != how)) {
|
||||
if (gamemode == GM_GAMESTARTED) {
|
||||
lifeform_t *lf;
|
||||
for (lf = c->map->lf ; lf ; lf = lf->next) {
|
||||
//if (haslos(lf, c) || haslosdark(lf, c)) {
|
||||
if (haslos(lf, c)) {
|
||||
if ((lf->cell == c) || haslos(lf, c)) {
|
||||
setlosdirty(lf);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
c->lit = how;
|
||||
}
|
||||
|
||||
void makelitradius(cell_t *c, int radius, enum LIGHTLEV how, int howlong) {
|
||||
|
@ -6681,6 +6686,23 @@ void makelitradius(cell_t *c, int radius, enum LIGHTLEV how, int howlong) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// now setlos dirty for lfs who can see any of the cells.
|
||||
// while makelit() does this as well, we need to do it
|
||||
// again here because makelit also contains calls to "haslos",
|
||||
// which clears lf->losdirty again. This is fine when we're only
|
||||
// changing one cell's light level, but when changing multiple
|
||||
// cells we need to go through again afterwards.
|
||||
|
||||
if (gamemode == GM_GAMESTARTED) {
|
||||
lifeform_t *lf;
|
||||
for (lf = c->map->lf ; lf ; lf = lf->next) {
|
||||
//if (haslos(lf, c) || haslosdark(lf, c)) {
|
||||
if (distfunc(lf->cell,c) <= (radius + MAXVISRANGE)) {
|
||||
setlosdirty(lf);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void markroomwalls(map_t *m, room_t *r) {
|
||||
|
|
|
@ -2502,6 +2502,12 @@ int canseeob(lifeform_t *lf, object_t *o) {
|
|||
}
|
||||
}
|
||||
|
||||
if (isblind(player) || (o->pile->where && !haslos(player, o->pile->where)) ) {
|
||||
if (hasflag(o->flags, F_NOFEEL)) {
|
||||
return B_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
f = hasflag(o->flags, F_TRAIL);
|
||||
if (f) {
|
||||
if (f->val[2] == S_SIGHT) {
|
||||
|
@ -2551,9 +2557,6 @@ int canseeob(lifeform_t *lf, object_t *o) {
|
|||
}
|
||||
}
|
||||
|
||||
if (isblind(player) && hasflag(o->flags, F_NOFEEL)) {
|
||||
return B_FALSE;
|
||||
}
|
||||
return B_TRUE;
|
||||
}
|
||||
|
||||
|
|
11
spell.c
11
spell.c
|
@ -4915,6 +4915,10 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
makelitradius(targcell, power*2, L_PERMDARK, rnd(5,10) + power );
|
||||
}
|
||||
calclight(targcell->map);
|
||||
if (targcell->map == player->cell->map) {
|
||||
needredraw = B_TRUE;
|
||||
drawscreen();
|
||||
}
|
||||
} else if (spellid == OT_S_DETECTAURA) {
|
||||
if (isplayer(caster)) {
|
||||
object_t *o;
|
||||
|
@ -7734,9 +7738,12 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
addtempflag(targcell->lf->flags, F_PRODUCESLIGHT, B_TRUE, NA, NA, NULL, rnd(10,20)+(power*2) );
|
||||
}
|
||||
}
|
||||
|
||||
calclight(targcell->map);
|
||||
needredraw = B_TRUE;
|
||||
drawscreen();
|
||||
if (targcell->map == player->cell->map) {
|
||||
needredraw = B_TRUE;
|
||||
drawscreen();
|
||||
}
|
||||
} else if (spellid == OT_S_LIGHTNINGBOLT) {
|
||||
cell_t *retcell[MAXRETCELLS];
|
||||
int nretcells;
|
||||
|
|
Loading…
Reference in New Issue