mirror of
https://codeberg.org/noisytoot/notnotdnethack.git
synced 2025-05-11 17:55:11 +01:00
colored branch stairs and also incs eat whistles now
issue #1379 - Colored branch stairs ought to be implemented for QoL improvements. now with free colored altars. so basically, they exist now. the "default" color is yellow but almost all branches are recolored to be distinct because i could - for example, mines is brown, sea is yellow, temple is red, tomb is black, etc. this includes (because reasons) outlands<->rlyeh and outlands<->dispensary but i believe that's all of the "branch" stairs in the dungeon. oh VOTD is grey/white due to being overriden by VOTD colors, but who cares, that's not a very helpful one to turn yellow. anyway, so this exists. uses S_brdnstair and S_brupstair like vanilla & other variants does, and handling should be added for all relevant things, including moving the "<= S_dnstair"s to use branch stairs instead when checking certain "end of dungeon feature" glyph lists. support has been added for DEC/IBM/UTF graphics too if barely, they render same as stairs but colored rather than as ladders. branch ladders don't exist btw so don't add those without adding the appropriate symbol i guess. altars also now get hallu colors with god's worst redraw function. i jest it's not that bad but yeah added see_altars to see_traps/_objects_monsters, which does the similar thing, but clears the glyph buffer (extra operations whoo) instead of just calling newsym because altars are all S_altar recolored, so the game needs to recompute colors, and so if other "color shifting" glyphs are added this could be problematic. shouldn't be a huge deal though since i don't expect any other things to change color per turn since they wouldn't work without a redraw anyway. hallu altars are random color, and then lnc is white/grey/black, unaligned yellow, void red (idk black is used, blue is black for a lot of ppl i think, maybe make htat magenta. up 2 chris) issue #2099 - Incantifiers should be able to eat magic whistles. yeah let netsysfire cook bro is onto something fr also fixes a stupid typo about god giving minions being loyal not just randomly nooping edog->loyal. worst part is that i fixed that in a force push but fucked MORE shit up so the new force push broke it RIP in pieces
This commit is contained in:
parent
d844babe27
commit
d27fe0ec2c
14 changed files with 236 additions and 151 deletions
|
@ -37,6 +37,7 @@ typedef struct stairway { /* basic stairway identifier */
|
|||
xchar sx, sy; /* x / y location of the stair */
|
||||
d_level tolev; /* where does it go */
|
||||
char up; /* what type of stairway (up/down) */
|
||||
boolean u_traversed;
|
||||
} stairway;
|
||||
|
||||
/* level region types */
|
||||
|
@ -237,6 +238,7 @@ typedef struct branch {
|
|||
#define Is_sunkcity(x) (In_sea(x) && dungeon_topology.sea_variant == SUNKEN_CITY_LEVEL)
|
||||
#define Is_peanut(x) (In_sea(x) && dungeon_topology.sea_variant == PEANUT_ISLAND_LEVEL)
|
||||
#define In_moloch_temple(x) ((x)->dnum == temple_dnum)
|
||||
#define In_lost_tomb(x) ((x)->dnum == tomb_dnum)
|
||||
#define Inhell In_hell(&u.uz) /* now gehennom */
|
||||
#define Infuture (Role_if(PM_ANACHRONONAUT) && In_quest(&u.uz))
|
||||
#define In_endgame(x) ((x)->dnum == astral_level.dnum)
|
||||
|
|
|
@ -457,6 +457,7 @@ E void NDECL(see_monsters);
|
|||
E void NDECL(set_mimic_blocking);
|
||||
E void NDECL(see_objects);
|
||||
E void NDECL(see_traps);
|
||||
E void NDECL(see_altars);
|
||||
E void NDECL(curs_on_u);
|
||||
E int NDECL(doredraw);
|
||||
E void NDECL(docrt);
|
||||
|
|
|
@ -157,6 +157,10 @@ enum {
|
|||
S_dnstair,
|
||||
S_upladder,
|
||||
S_dnladder,
|
||||
S_brupstair,
|
||||
S_brdnstair,
|
||||
S_brupladder,
|
||||
S_brdnladder,
|
||||
S_altar,
|
||||
S_grave,
|
||||
S_seal,
|
||||
|
|
|
@ -3056,6 +3056,7 @@ karemade:
|
|||
see_monsters();
|
||||
see_objects();
|
||||
see_traps();
|
||||
see_altars();
|
||||
if (u.uswallow) swallowed(0);
|
||||
} else if (Unblind_telepat || goodsmeller(youracedata) || Warning || Warn_of_mon || NightmareAware_Sanity < 100 || oldsanity < 100) {
|
||||
see_monsters();
|
||||
|
@ -3104,6 +3105,7 @@ karemade:
|
|||
see_monsters();
|
||||
see_objects();
|
||||
see_traps();
|
||||
see_altars();
|
||||
if (u.uswallow) swallowed(0);
|
||||
} else if (Unblind_telepat || goodsmeller(youracedata) || Warning || Warn_of_mon || NightmareAware_Sanity < 100 || oldsanity < 100) {
|
||||
see_monsters();
|
||||
|
@ -3574,40 +3576,27 @@ do_positionbar()
|
|||
{
|
||||
static char pbar[COLNO];
|
||||
char *p;
|
||||
|
||||
|
||||
#define cmap_at_stair(stair) glyph_to_cmap(level.locations[stair.sx][stair.sy].glyph)
|
||||
p = pbar;
|
||||
/* up stairway */
|
||||
if (upstair.sx &&
|
||||
(glyph_to_cmap(level.locations[upstair.sx][upstair.sy].glyph) ==
|
||||
S_upstair ||
|
||||
glyph_to_cmap(level.locations[upstair.sx][upstair.sy].glyph) ==
|
||||
S_upladder)) {
|
||||
if (upstair.sx && (cmap_at_stair(upstair) == S_upstair || cmap_at_stair(upstair) == S_upladder)) {
|
||||
*p++ = '<';
|
||||
*p++ = upstair.sx;
|
||||
}
|
||||
if (sstairs.sx &&
|
||||
(glyph_to_cmap(level.locations[sstairs.sx][sstairs.sy].glyph) ==
|
||||
S_upstair ||
|
||||
glyph_to_cmap(level.locations[sstairs.sx][sstairs.sy].glyph) ==
|
||||
S_upladder)) {
|
||||
if (sstairs.sx && (cmap_at_stair(sstairs) == S_upstair || cmap_at_stair(sstairs) == S_upladder)
|
||||
|| cmap_at_stair(sstairs) == S_brupstair)) {
|
||||
*p++ = '<';
|
||||
*p++ = sstairs.sx;
|
||||
}
|
||||
|
||||
/* down stairway */
|
||||
if (dnstair.sx &&
|
||||
(glyph_to_cmap(level.locations[dnstair.sx][dnstair.sy].glyph) ==
|
||||
S_dnstair ||
|
||||
glyph_to_cmap(level.locations[dnstair.sx][dnstair.sy].glyph) ==
|
||||
S_dnladder)) {
|
||||
if (dnstair.sx && (cmap_at_stair(dnstair) == S_dnstair || cmap_at_stair(dnstair) == S_dnladder)) {
|
||||
*p++ = '>';
|
||||
*p++ = dnstair.sx;
|
||||
}
|
||||
if (sstairs.sx &&
|
||||
(glyph_to_cmap(level.locations[sstairs.sx][sstairs.sy].glyph) ==
|
||||
S_dnstair ||
|
||||
glyph_to_cmap(level.locations[sstairs.sx][sstairs.sy].glyph) ==
|
||||
S_dnladder)) {
|
||||
if (sstairs.sx && (cmap_at_stair(sstairs) == S_dnstair || cmap_at_stair(sstairs) == S_dnladder)
|
||||
|| cmap_at_stair(sstairs) == S_brdnstair)) {
|
||||
*p++ = '>';
|
||||
*p++ = sstairs.sx;
|
||||
}
|
||||
|
|
|
@ -135,9 +135,9 @@ NEARDATA struct dig_info digging;
|
|||
|
||||
NEARDATA dungeon dungeons[MAXDUNGEON]; /* ini'ed by init_dungeon() */
|
||||
NEARDATA s_level *sp_levchn;
|
||||
NEARDATA stairway upstair = { 0, 0 }, dnstair = { 0, 0 };
|
||||
NEARDATA stairway upladder = { 0, 0 }, dnladder = { 0, 0 };
|
||||
NEARDATA stairway sstairs = { 0, 0 };
|
||||
NEARDATA stairway upstair = { 0, 0, 0, 0}, dnstair = { 0, 0, 0, 0};
|
||||
NEARDATA stairway upladder = { 0, 0, 0, 0}, dnladder = { 0, 0, 0, 0};
|
||||
NEARDATA stairway sstairs = { 0, 0, 0, 0};
|
||||
NEARDATA dest_area updest = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
NEARDATA dest_area dndest = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
NEARDATA coord inv_pos = { 0, 0 };
|
||||
|
|
|
@ -1336,6 +1336,23 @@ see_traps()
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Update hallucinated altars.
|
||||
*/
|
||||
void
|
||||
see_altars()
|
||||
{
|
||||
int x, y;
|
||||
struct rm* lev;
|
||||
clear_glyph_buffer();
|
||||
for (x = 1; x < COLNO; x++) {
|
||||
lev = &levl[x][0];
|
||||
for (y = 0; y < ROWNO; y++, lev++)
|
||||
if (lev->glyph == cmap_to_glyph(S_altar))
|
||||
show_glyph(x,y,lev->glyph);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Put the cursor on the hero. Flush all accumulated glyphs before doing it.
|
||||
*/
|
||||
|
@ -1776,11 +1793,17 @@ back_to_glyph(x,y)
|
|||
case POOL:
|
||||
case MOAT: idx = S_pool; break;
|
||||
case STAIRS:
|
||||
idx = (ptr->ladder & LA_DOWN) ? S_dnstair : S_upstair;
|
||||
break;
|
||||
if (x == sstairs.sx && y == sstairs.sy && sstairs.u_traversed)
|
||||
idx = (ptr->ladder & LA_DOWN) ? S_brdnstair : S_brupstair;
|
||||
else
|
||||
idx = (ptr->ladder & LA_DOWN) ? S_dnstair : S_upstair;
|
||||
break;
|
||||
case LADDER:
|
||||
idx = (ptr->ladder & LA_DOWN) ? S_dnladder : S_upladder;
|
||||
break;
|
||||
if (x == sstairs.sx && y == sstairs.sy && sstairs.u_traversed)
|
||||
idx = (ptr->ladder & LA_DOWN) ? S_brdnladder : S_brupladder;
|
||||
else
|
||||
idx = (ptr->ladder & LA_DOWN) ? S_dnladder : S_upladder;
|
||||
break;
|
||||
case FOUNTAIN: idx = S_fountain; break;
|
||||
case FORGE: idx = S_forge; break;
|
||||
case SINK: idx = S_sink; break;
|
||||
|
|
188
src/do.c
188
src/do.c
|
@ -1429,99 +1429,109 @@ remake:
|
|||
u_on_newpos(ttrap->tx, ttrap->ty);
|
||||
} else if (at_stairs && !In_endgame(&u.uz)) {
|
||||
if (up) {
|
||||
if (at_ladder) {
|
||||
u_on_newpos(xdnladder, ydnladder);
|
||||
} else {
|
||||
if (newdungeon) {
|
||||
if (Is_stronghold(&u.uz)) {
|
||||
register xchar x, y;
|
||||
if (at_ladder) {
|
||||
dnladder.u_traversed = TRUE;
|
||||
u_on_newpos(xdnladder, ydnladder);
|
||||
} else {
|
||||
if (newdungeon) {
|
||||
sstairs.u_traversed = TRUE;
|
||||
if (Is_stronghold(&u.uz)) {
|
||||
register xchar x, y;
|
||||
|
||||
do {
|
||||
x = (COLNO - 2 - rnd(5));
|
||||
y = rn1(ROWNO - 4, 3);
|
||||
} while(occupied(x, y) ||
|
||||
IS_WALL(levl[x][y].typ));
|
||||
u_on_newpos(x, y);
|
||||
} else u_on_sstairs();
|
||||
} else u_on_dnstairs();
|
||||
}
|
||||
/* Remove bug which crashes with levitation/punishment KAA */
|
||||
if (Punished && !Levitation) {
|
||||
pline("With great effort you climb the %s.",
|
||||
at_ladder ? "ladder" : "stairs");
|
||||
} else if (at_ladder)
|
||||
You("climb up the ladder.");
|
||||
} else { /* down */
|
||||
if (at_ladder) {
|
||||
u_on_newpos(xupladder, yupladder);
|
||||
} else {
|
||||
if (newdungeon) u_on_sstairs();
|
||||
else u_on_upstairs();
|
||||
}
|
||||
if (u.dz && Flying)
|
||||
You("fly down along the %s.",
|
||||
at_ladder ? "ladder" : "stairs");
|
||||
else if (u.dz &&
|
||||
#ifdef CONVICT
|
||||
(near_capacity() > UNENCUMBERED || (Punished &&
|
||||
((uwep != uball) || ((P_SKILL(P_FLAIL) < P_BASIC))
|
||||
|| !Role_if(PM_CONVICT)))
|
||||
|| Fumbling)
|
||||
#else
|
||||
(near_capacity() > UNENCUMBERED || Punished || Fumbling)
|
||||
#endif /* CONVICT */
|
||||
) {
|
||||
You("fall down the %s.", at_ladder ? "ladder" : "stairs");
|
||||
if (Punished) {
|
||||
drag_down();
|
||||
ballrelease(FALSE);
|
||||
}
|
||||
if(((uwep && is_lightsaber(uwep) && litsaber(uwep))) ||
|
||||
(uswapwep && is_lightsaber(uswapwep) && litsaber(uswapwep) && u.twoweap)
|
||||
){
|
||||
boolean mainsaber = (uwep && is_lightsaber(uwep) && litsaber(uwep));
|
||||
boolean mainsaber_locked = (uwep && (uwep->oartifact == ART_INFINITY_S_MIRRORED_ARC || uwep->otyp == KAMEREL_VAJRA));
|
||||
boolean secsaber = (uswapwep && is_lightsaber(uswapwep) && litsaber(uswapwep) && u.twoweap);
|
||||
boolean secsaber_locked = (uswapwep && (uswapwep->oartifact == ART_INFINITY_S_MIRRORED_ARC || uswapwep->otyp == KAMEREL_VAJRA));
|
||||
if((mainsaber && mainsaber_locked)
|
||||
|| (secsaber && secsaber_locked)
|
||||
){
|
||||
int lrole = rnl(20);
|
||||
if(lrole+5 < ACURR(A_DEX)){
|
||||
You("roll and dodge your tumbling energy sword%s.", (mainsaber && secsaber) ? "s" : "");
|
||||
} else {
|
||||
You("come into contact with your energy sword%s.", (mainsaber && secsaber && (lrole >= ACURR(A_DEX) || (mainsaber_locked && secsaber_locked))) ? "s" : "");
|
||||
if(mainsaber && (mainsaber_locked || lrole >= ACURR(A_DEX)))
|
||||
losehp(dmgval(uwep,&youmonst,0,&youmonst), "falling downstairs with a lit lightsaber", KILLED_BY);
|
||||
if(secsaber && (secsaber_locked || lrole >= ACURR(A_DEX)))
|
||||
losehp(dmgval(uswapwep,&youmonst,0,&youmonst), "falling downstairs with a lit lightsaber", KILLED_BY);
|
||||
}
|
||||
if(mainsaber && !mainsaber_locked)
|
||||
lightsaber_deactivate(uwep, TRUE);
|
||||
if(secsaber && !secsaber_locked)
|
||||
lightsaber_deactivate(uswapwep, TRUE);
|
||||
do {
|
||||
x = (COLNO - 2 - rnd(5));
|
||||
y = rn1(ROWNO - 4, 3);
|
||||
} while(occupied(x, y) ||
|
||||
IS_WALL(levl[x][y].typ));
|
||||
u_on_newpos(x, y);
|
||||
} else u_on_sstairs();
|
||||
} else {
|
||||
if(rnl(20) < ACURR(A_DEX)){
|
||||
You("hurriedly deactivate your energy sword%s.", (mainsaber && secsaber) ? "s" : "");
|
||||
} else {
|
||||
You("come into contact with your energy sword%s.", (mainsaber && secsaber) ? "s" : "");
|
||||
if(mainsaber) losehp(dmgval(uwep,&youmonst,0,&youmonst), "falling downstairs with a lit lightsaber", KILLED_BY);
|
||||
if(secsaber) losehp(dmgval(uswapwep,&youmonst,0,&youmonst), "falling downstairs with a lit lightsaber", KILLED_BY);
|
||||
}
|
||||
if(mainsaber) lightsaber_deactivate(uwep, TRUE);
|
||||
if(secsaber) lightsaber_deactivate(uswapwep, TRUE);
|
||||
dnstair.u_traversed = TRUE;
|
||||
u_on_dnstairs();
|
||||
}
|
||||
}
|
||||
#ifdef STEED
|
||||
/* falling off steed has its own losehp() call */
|
||||
if (u.usteed)
|
||||
dismount_steed(DISMOUNT_FELL);
|
||||
else
|
||||
#endif
|
||||
losehp(rnd(3), "falling downstairs", KILLED_BY);
|
||||
selftouch("Falling, you");
|
||||
} else if (u.dz && at_ladder)
|
||||
You("climb down the ladder.");
|
||||
/* Remove bug which crashes with levitation/punishment KAA */
|
||||
if (Punished && !Levitation) {
|
||||
pline("With great effort you climb the %s.",
|
||||
at_ladder ? "ladder" : "stairs");
|
||||
} else if (at_ladder)
|
||||
You("climb up the ladder.");
|
||||
} else { /* down */
|
||||
if (at_ladder) {
|
||||
upladder.u_traversed = TRUE;
|
||||
u_on_newpos(xupladder, yupladder);
|
||||
} else {
|
||||
if (newdungeon) {
|
||||
sstairs.u_traversed = TRUE;
|
||||
u_on_sstairs();
|
||||
} else {
|
||||
upstair.u_traversed = TRUE;
|
||||
u_on_upstairs();
|
||||
}
|
||||
}
|
||||
if (u.dz && Flying)
|
||||
You("fly down along the %s.",
|
||||
at_ladder ? "ladder" : "stairs");
|
||||
else if (u.dz &&
|
||||
#ifdef CONVICT
|
||||
(near_capacity() > UNENCUMBERED || (Punished &&
|
||||
((uwep != uball) || ((P_SKILL(P_FLAIL) < P_BASIC))
|
||||
|| !Role_if(PM_CONVICT)))
|
||||
|| Fumbling)
|
||||
#else
|
||||
(near_capacity() > UNENCUMBERED || Punished || Fumbling)
|
||||
#endif /* CONVICT */
|
||||
) {
|
||||
You("fall down the %s.", at_ladder ? "ladder" : "stairs");
|
||||
if (Punished) {
|
||||
drag_down();
|
||||
ballrelease(FALSE);
|
||||
}
|
||||
if(((uwep && is_lightsaber(uwep) && litsaber(uwep))) ||
|
||||
(uswapwep && is_lightsaber(uswapwep) && litsaber(uswapwep) && u.twoweap)
|
||||
){
|
||||
boolean mainsaber = (uwep && is_lightsaber(uwep) && litsaber(uwep));
|
||||
boolean mainsaber_locked = (uwep && (uwep->oartifact == ART_INFINITY_S_MIRRORED_ARC || uwep->otyp == KAMEREL_VAJRA));
|
||||
boolean secsaber = (uswapwep && is_lightsaber(uswapwep) && litsaber(uswapwep) && u.twoweap);
|
||||
boolean secsaber_locked = (uswapwep && (uswapwep->oartifact == ART_INFINITY_S_MIRRORED_ARC || uswapwep->otyp == KAMEREL_VAJRA));
|
||||
if((mainsaber && mainsaber_locked)
|
||||
|| (secsaber && secsaber_locked)
|
||||
){
|
||||
int lrole = rnl(20);
|
||||
if(lrole+5 < ACURR(A_DEX)){
|
||||
You("roll and dodge your tumbling energy sword%s.", (mainsaber && secsaber) ? "s" : "");
|
||||
} else {
|
||||
You("come into contact with your energy sword%s.", (mainsaber && secsaber && (lrole >= ACURR(A_DEX) || (mainsaber_locked && secsaber_locked))) ? "s" : "");
|
||||
if(mainsaber && (mainsaber_locked || lrole >= ACURR(A_DEX)))
|
||||
losehp(dmgval(uwep,&youmonst,0,&youmonst), "falling downstairs with a lit lightsaber", KILLED_BY);
|
||||
if(secsaber && (secsaber_locked || lrole >= ACURR(A_DEX)))
|
||||
losehp(dmgval(uswapwep,&youmonst,0,&youmonst), "falling downstairs with a lit lightsaber", KILLED_BY);
|
||||
}
|
||||
if(mainsaber && !mainsaber_locked)
|
||||
lightsaber_deactivate(uwep, TRUE);
|
||||
if(secsaber && !secsaber_locked)
|
||||
lightsaber_deactivate(uswapwep, TRUE);
|
||||
} else {
|
||||
if(rnl(20) < ACURR(A_DEX)){
|
||||
You("hurriedly deactivate your energy sword%s.", (mainsaber && secsaber) ? "s" : "");
|
||||
} else {
|
||||
You("come into contact with your energy sword%s.", (mainsaber && secsaber) ? "s" : "");
|
||||
if(mainsaber) losehp(dmgval(uwep,&youmonst,0,&youmonst), "falling downstairs with a lit lightsaber", KILLED_BY);
|
||||
if(secsaber) losehp(dmgval(uswapwep,&youmonst,0,&youmonst), "falling downstairs with a lit lightsaber", KILLED_BY);
|
||||
}
|
||||
if(mainsaber) lightsaber_deactivate(uwep, TRUE);
|
||||
if(secsaber) lightsaber_deactivate(uswapwep, TRUE);
|
||||
}
|
||||
}
|
||||
/* falling off steed has its own losehp() call */
|
||||
if (u.usteed)
|
||||
dismount_steed(DISMOUNT_FELL);
|
||||
else
|
||||
losehp(rnd(3), "falling downstairs", KILLED_BY);
|
||||
|
||||
selftouch("Falling, you");
|
||||
} else if (u.dz && at_ladder)
|
||||
You("climb down the ladder.");
|
||||
}
|
||||
} else { /* trap door or level_tele or In_endgame */
|
||||
misc_levelport:
|
||||
|
|
|
@ -1616,7 +1616,7 @@ boolean is_summoned;
|
|||
initedog(mon);
|
||||
newsym(mon->mx, mon->my);
|
||||
mon->mpeaceful = 1;
|
||||
EDOG(mon)->loyal;
|
||||
EDOG(mon)->loyal = 1;
|
||||
set_malign(mon);
|
||||
mon->mtame = 10;
|
||||
/* this section names the creature "of ______" */
|
||||
|
|
|
@ -252,6 +252,10 @@ const struct symdef defsyms[MAXPCHARS] = {
|
|||
{'>', "staircase down", C(CLR_GRAY)}, /* dnstair */
|
||||
{'<', "ladder up", C(CLR_BROWN)}, /* upladder */
|
||||
{'>', "ladder down", C(CLR_BROWN)}, /* dnladder */
|
||||
{'<', "branch staircase up", C(CLR_YELLOW)}, /* brupstair */
|
||||
{'>', "branch staircase down", C(CLR_YELLOW)}, /* brdnstair */
|
||||
{'<', "branch ladder up", C(CLR_YELLOW)}, /* brupladder */
|
||||
{'>', "branch ladder down", C(CLR_YELLOW)}, /* brdnladder */
|
||||
{'_', "altar", C(CLR_GRAY)}, /* altar */
|
||||
{'|', "grave", C(CLR_GRAY)}, /* grave */
|
||||
{'+', "hellish seal", C(CLR_BRIGHT_MAGENTA)}, /* seal */
|
||||
|
@ -383,6 +387,8 @@ static glyph_t ibm_graphics[MAXPCHARS] = {
|
|||
0xb1, /* S_litcorr: meta-1, medium shading */
|
||||
g_FILLER(S_upstair),
|
||||
g_FILLER(S_dnstair),
|
||||
g_FILLER(S_brupstair),
|
||||
g_FILLER(S_brdnstair),
|
||||
g_FILLER(S_upladder),
|
||||
g_FILLER(S_dnladder),
|
||||
g_FILLER(S_altar),
|
||||
|
@ -500,6 +506,8 @@ static glyph_t dec_graphics[MAXPCHARS] = {
|
|||
g_FILLER(S_litcorr),
|
||||
g_FILLER(S_upstair),
|
||||
g_FILLER(S_dnstair),
|
||||
g_FILLER(S_brupstair),
|
||||
g_FILLER(S_brdnstair),
|
||||
0xf9, /* S_upladder: meta-y, greater-than-or-equals */
|
||||
0xfa, /* S_dnladder: meta-z, less-than-or-equals */
|
||||
g_FILLER(S_altar), /* 0xc3, \E)3: meta-C, dagger */
|
||||
|
@ -615,6 +623,8 @@ static glyph_t mac_graphics[MAXPCHARS] = {
|
|||
g_FILLER(S_litcorr),
|
||||
g_FILLER(S_upstair),
|
||||
g_FILLER(S_dnstair),
|
||||
g_FILLER(S_brupstair),
|
||||
g_FILLER(S_brdnstair),
|
||||
g_FILLER(S_upladder),
|
||||
g_FILLER(S_dnladder),
|
||||
g_FILLER(S_altar),
|
||||
|
@ -732,6 +742,8 @@ static glyph_t utf8_graphics[MAXPCHARS] = {
|
|||
g_FILLER(S_litcorr),
|
||||
g_FILLER(S_upstair),
|
||||
g_FILLER(S_dnstair),
|
||||
g_FILLER(S_brupstair),
|
||||
g_FILLER(S_brdnstair),
|
||||
0x2264, /* S_upladder: LESS-THAN OR EQUAL TO */
|
||||
0x2265, /* S_dnladder: GREATER-THAN OR EQUAL TO */
|
||||
0x03A9, /* S_altar: GREEK CAPITAL LETTER OMEGA */
|
||||
|
@ -1094,7 +1106,7 @@ boolean is_rlevel;
|
|||
) {
|
||||
# endif
|
||||
showsyms[S_vodoor] = showsyms[S_hodoor] = showsyms[S_ndoor] = '+';
|
||||
showsyms[S_upstair] = showsyms[S_dnstair] = '%';
|
||||
showsyms[S_upstair] = showsyms[S_dnstair] = showsyms[S_brupstair] = showsyms[S_brdnstair] = '%';
|
||||
# ifdef ASCIIGRAPH
|
||||
} else {
|
||||
/* a la EPYX Rogue */
|
||||
|
@ -1119,6 +1131,8 @@ boolean is_rlevel;
|
|||
showsyms[S_litcorr] = 0xb2;
|
||||
showsyms[S_upstair] = 0xf0; /* Greek Xi */
|
||||
showsyms[S_dnstair] = 0xf0;
|
||||
showsyms[S_brupstair] = 0xf0;
|
||||
showsyms[S_brdnstair] = 0xf0;
|
||||
#ifndef MSWIN_GRAPHICS
|
||||
showsyms[S_arrow_trap] = 0x04; /* diamond (cards) */
|
||||
showsyms[S_dart_trap] = 0x04;
|
||||
|
|
21
src/eat.c
21
src/eat.c
|
@ -112,6 +112,7 @@ register struct obj *obj;
|
|||
if(obj->oclass == WAND_CLASS && obj->spe > 0 && objects[obj->otyp].oc_magic) return TRUE;
|
||||
if(obj->otyp == CORPSE && (obj->corpsenm == PM_AOA || obj->corpsenm == PM_AOA_DROPLET || obj->corpsenm == PM_NEWT)) return TRUE;
|
||||
if(obj->otyp == TIN && (!obj->known || obj->corpsenm == PM_AOA || obj->corpsenm == PM_AOA_DROPLET || obj->corpsenm == PM_NEWT)) return TRUE;
|
||||
if(obj->otyp == MAGIC_WHISTLE) return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -2934,15 +2935,21 @@ doeat() /* generic "eat" command funtion (see cmd.c) */
|
|||
break;
|
||||
case TOOL_CLASS:
|
||||
u.uconduct.food++;
|
||||
curspe = otmp->spe;
|
||||
(void) drain_item(otmp);
|
||||
if(curspe > otmp->spe){
|
||||
You("drain the %s%s.", xname(otmp),otmp->spe!=0 ? "":" dry");
|
||||
lesshungry(5*INC_BASE_NUTRITION);
|
||||
flags.botl = 1;
|
||||
if (otmp->otyp == MAGIC_WHISTLE){
|
||||
poly_obj(otmp, WHISTLE);
|
||||
You("drain the %s of its magic.", xname(otmp));
|
||||
} else {
|
||||
pline("The %s resists your attempt to drain its magic.", xname(otmp));
|
||||
curspe = otmp->spe;
|
||||
(void) drain_item(otmp);
|
||||
if(curspe > otmp->spe){
|
||||
You("drain the %s%s.", xname(otmp),otmp->spe!=0 ? "":" dry");
|
||||
|
||||
} else {
|
||||
pline("The %s resists your attempt to drain its magic.", xname(otmp));
|
||||
}
|
||||
}
|
||||
lesshungry(5*INC_BASE_NUTRITION);
|
||||
flags.botl = 1;
|
||||
break;
|
||||
case SCROLL_CLASS:
|
||||
if(otmp->oartifact) break; //redundant check
|
||||
|
|
|
@ -4710,11 +4710,15 @@ char *buf;
|
|||
}
|
||||
dfeature = altbuf;
|
||||
} else if ((x == xupstair && y == yupstair) ||
|
||||
(x == sstairs.sx && y == sstairs.sy && sstairs.up))
|
||||
(x == sstairs.sx && y == sstairs.sy && sstairs.up && !sstairs.u_traversed))
|
||||
cmap = S_upstair; /* "staircase up" */
|
||||
else if (x == sstairs.sx && y == sstairs.sy && sstairs.up && sstairs.u_traversed)
|
||||
cmap = S_brupstair; /* "staircase up" */
|
||||
else if ((x == xdnstair && y == ydnstair) ||
|
||||
(x == sstairs.sx && y == sstairs.sy && !sstairs.up))
|
||||
(x == sstairs.sx && y == sstairs.sy && !sstairs.up && !sstairs.u_traversed))
|
||||
cmap = S_dnstair; /* "staircase down" */
|
||||
else if (x == sstairs.sx && y == sstairs.sy && !sstairs.up && sstairs.u_traversed)
|
||||
cmap = S_brdnstair;
|
||||
else if (x == xupladder && y == yupladder)
|
||||
cmap = S_upladder; /* "ladder up" */
|
||||
else if (x == xdnladder && y == ydnladder)
|
||||
|
|
|
@ -200,7 +200,7 @@ unsigned int *obgcolor;
|
|||
if(offset >= S_vwall && offset <= S_trwall){
|
||||
color = CLR_BROWN;
|
||||
}
|
||||
if(offset >= S_drkroom && offset <= S_dnladder){
|
||||
if(offset >= S_drkroom && offset <= S_brdnladder){
|
||||
color = CLR_BROWN;
|
||||
}
|
||||
} else if(Is_waterlevel(&u.uz)){
|
||||
|
@ -214,7 +214,7 @@ unsigned int *obgcolor;
|
|||
if(offset >= S_vwall && offset <= S_trwall){
|
||||
color = CLR_BLACK;
|
||||
}
|
||||
if(offset >= S_drkroom && offset <= S_dnladder){
|
||||
if(offset >= S_drkroom && offset <= S_brdnladder){
|
||||
color = offset == S_litroom ? CLR_GRAY : CLR_BLACK;
|
||||
}
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ unsigned int *obgcolor;
|
|||
if(offset >= S_vwall && offset <= S_trwall){
|
||||
color = CLR_BROWN;
|
||||
}
|
||||
if(offset >= S_drkroom && offset <= S_dnladder){
|
||||
if(offset >= S_drkroom && offset <= S_brdnladder){
|
||||
color = CLR_BROWN;
|
||||
}
|
||||
} else if(Is_paradise(&u.uz)){
|
||||
|
@ -230,7 +230,7 @@ unsigned int *obgcolor;
|
|||
color = CLR_BRIGHT_BLUE;
|
||||
} else if(offset == S_drkroom || offset == S_corr || offset <= S_hcdoor){
|
||||
color = CLR_BROWN;
|
||||
} else if(offset >= S_litroom && offset <= S_dnladder){
|
||||
} else if(offset >= S_litroom && offset <= S_brdnladder){
|
||||
color = CLR_YELLOW;
|
||||
}
|
||||
} else if(Is_peanut(&u.uz)){
|
||||
|
@ -240,14 +240,14 @@ unsigned int *obgcolor;
|
|||
color = CLR_BRIGHT_BLUE;
|
||||
} else if(offset == S_drkroom || offset == S_corr || offset <= S_hcdoor){
|
||||
color = CLR_BROWN;
|
||||
} else if(offset >= S_litroom && offset <= S_dnladder){
|
||||
} else if(offset >= S_litroom && offset <= S_brdnladder){
|
||||
color = CLR_YELLOW;
|
||||
}
|
||||
} else if(In_moloch_temple(&u.uz)){
|
||||
if(offset >= S_vwall && offset <= S_trwall){
|
||||
color = CLR_RED;
|
||||
}
|
||||
if(offset >= S_drkroom && offset <= S_dnladder){
|
||||
if(offset >= S_drkroom && offset <= S_brdnladder){
|
||||
color = offset == S_litroom ? CLR_GRAY : CLR_BLACK;
|
||||
}
|
||||
} else if(In_quest(&u.uz)){
|
||||
|
@ -262,7 +262,7 @@ unsigned int *obgcolor;
|
|||
|| offset == S_litroom
|
||||
|| offset == S_brightrm
|
||||
|| offset == S_litcorr
|
||||
|| (offset >= S_upstair && offset <= S_dnladder)
|
||||
|| (offset >= S_upstair && offset <= S_brdnladder)
|
||||
|| offset == S_litsoil
|
||||
|| offset == S_litsand
|
||||
){
|
||||
|
@ -289,7 +289,7 @@ unsigned int *obgcolor;
|
|||
|| offset == S_corr
|
||||
|| offset == S_drksoil
|
||||
|| offset == S_drksand
|
||||
|| (offset >= S_upstair && offset <= S_dnladder)
|
||||
|| (offset >= S_upstair && offset <= S_brdnladder)
|
||||
){
|
||||
color = CLR_BLACK;
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ unsigned int *obgcolor;
|
|||
|| offset == S_litroom
|
||||
|| offset == S_brightrm
|
||||
|| offset == S_litcorr
|
||||
|| (offset >= S_upstair && offset <= S_dnladder)
|
||||
|| (offset >= S_upstair && offset <= S_brdnladder)
|
||||
|| offset == S_litsoil
|
||||
|| offset == S_litsand
|
||||
){
|
||||
|
@ -324,7 +324,7 @@ unsigned int *obgcolor;
|
|||
if(offset >= S_vwall && offset <= S_trwall){
|
||||
color = CLR_BLACK;
|
||||
}
|
||||
if(offset >= S_drkroom && offset <= S_dnladder){
|
||||
if(offset >= S_drkroom && offset <= S_brdnladder){
|
||||
color = offset == S_litroom ? CLR_GRAY : CLR_BLACK;
|
||||
}
|
||||
if(Is_lich_level(&u.uz)){
|
||||
|
@ -366,20 +366,20 @@ unsigned int *obgcolor;
|
|||
if(offset >= S_vwall && offset <= S_trwall){
|
||||
color = CLR_BRIGHT_BLUE;
|
||||
}
|
||||
else if(offset >= S_drkroom && offset <= S_dnladder){
|
||||
else if(offset >= S_drkroom && offset <= S_brdnladder){
|
||||
color = CLR_BLUE;
|
||||
}
|
||||
} else {
|
||||
if(offset >= S_vwall && offset <= S_trwall){
|
||||
color = CLR_BLACK;
|
||||
}
|
||||
else if(offset >= S_drkroom && offset <= S_dnladder){
|
||||
else if(offset >= S_drkroom && offset <= S_brdnladder){
|
||||
color = offset == S_litroom ? CLR_GRAY : CLR_BLACK;
|
||||
}
|
||||
}
|
||||
} else if(In_law(&u.uz)){
|
||||
if(Is_path(&u.uz)){
|
||||
if(offset >= S_drkroom && offset <= S_dnladder){
|
||||
if(offset >= S_drkroom && offset <= S_brdnladder){
|
||||
color = CLR_BROWN;
|
||||
}
|
||||
}
|
||||
|
@ -388,7 +388,7 @@ unsigned int *obgcolor;
|
|||
if(offset >= S_vwall && offset <= S_trwall){
|
||||
color = CLR_BROWN;
|
||||
}
|
||||
else if(offset >= S_drkroom && offset <= S_dnladder){
|
||||
else if(offset >= S_drkroom && offset <= S_brdnladder){
|
||||
if(offset == S_litcorr || offset == S_corr)
|
||||
;
|
||||
|
||||
|
@ -491,6 +491,34 @@ unsigned int *obgcolor;
|
|||
else if(offset == S_litroom) color = CLR_ORANGE;
|
||||
}
|
||||
}
|
||||
if (offset >= S_brupstair && offset <= S_brdnladder){
|
||||
/* each main dungeon stair should be identifiable by color
|
||||
* yellow is re-used for sea & sokoban but those are different directions
|
||||
* temple is red because wall color, lost tomb is black bc idk spooky
|
||||
* and mines is brown obviously
|
||||
*/
|
||||
if ((&sstairs.tolev)->dnum == mines_dnum)
|
||||
color = CLR_BROWN;
|
||||
else if (In_tower(&sstairs.tolev))
|
||||
color = CLR_BLUE;
|
||||
/* else if (In_sokoban(&sstairs.tolev))
|
||||
color = CLR_BLUE; soko doesn't use blue stairs, leave this yellow */
|
||||
else if (In_sea(&sstairs.tolev))
|
||||
color = CLR_YELLOW;
|
||||
else if (In_moloch_temple(&sstairs.tolev))
|
||||
color = CLR_RED;
|
||||
else if (In_lost_tomb(&sstairs.tolev))
|
||||
color = CLR_BLACK;
|
||||
else if (In_lost_cities(&sstairs.tolev))
|
||||
color = CLR_BLUE;
|
||||
else if (In_outlands(&sstairs.tolev))
|
||||
color = CLR_BROWN;
|
||||
else if (In_outlands(&u.uz)) /* if not going to lost cities, going to illurien */
|
||||
color = CLR_BRIGHT_BLUE;
|
||||
else if (In_hell(&u.uz) && (&sstairs.tolev)->dnum == 0) /* hell into VOTD */
|
||||
color = CLR_GRAY;
|
||||
}
|
||||
|
||||
if (offset >= S_vwall && offset <= S_hcdoor) {
|
||||
if (*in_rooms(x,y,BEEHIVE))
|
||||
color = CLR_YELLOW;
|
||||
|
@ -507,15 +535,16 @@ unsigned int *obgcolor;
|
|||
color = (offset == S_drkroom) ? CLR_BLACK : CLR_BROWN;
|
||||
}
|
||||
} else if (offset == S_altar) {
|
||||
// if (Hallucination) color = rn2(CLR_MAX); Redraw cycle doesn't trigger unless something passes over square
|
||||
if (Is_astralevel(&u.uz)) color = CLR_BRIGHT_MAGENTA;
|
||||
if (Hallucination) color = rn2(CLR_MAX);
|
||||
else if (Is_astralevel(&u.uz)) color = CLR_BRIGHT_MAGENTA;
|
||||
else if(Is_sanctum(&u.uz)) color = CLR_MAGENTA;
|
||||
// else switch(a_align(x, y)) { Commented out due to hallucination code.
|
||||
// case A_LAWFUL: color = CLR_WHITE; break;
|
||||
// case A_NEUTRAL: color = CLR_GRAY; break;
|
||||
// case A_CHAOTIC: color = CLR_BLACK; break;
|
||||
// default: color = CLR_RED; break;
|
||||
// }
|
||||
else switch(a_align(x, y)) {
|
||||
case A_LAWFUL: color = CLR_WHITE; break;
|
||||
case A_NEUTRAL: color = CLR_GRAY; break;
|
||||
case A_CHAOTIC: color = CLR_BLACK; break;
|
||||
case A_NONE: color = CLR_RED; break;
|
||||
default: color = CLR_YELLOW; break;
|
||||
}
|
||||
}
|
||||
if(artifact_door(x, y)){
|
||||
color = CLR_MAGENTA;
|
||||
|
|
|
@ -1004,7 +1004,7 @@ clear_level_structures()
|
|||
init_rect();
|
||||
init_vault();
|
||||
xdnstair = ydnstair = xupstair = yupstair = 0;
|
||||
sstairs.sx = sstairs.sy = 0;
|
||||
sstairs.sx = sstairs.sy = sstairs.u_traversed = 0;
|
||||
xdnladder = ydnladder = xupladder = yupladder = 0;
|
||||
made_branch = FALSE;
|
||||
clear_regions();
|
||||
|
@ -1748,6 +1748,7 @@ xchar x, y; /* location */
|
|||
} else if (make_stairs) {
|
||||
sstairs.sx = x;
|
||||
sstairs.sy = y;
|
||||
if (!u.uz.dnum && u.uz.dlevel == 1) sstairs.u_traversed = TRUE;
|
||||
sstairs.up = (char) on_level(&br->end1, &u.uz) ?
|
||||
br->end1_up : !br->end1_up;
|
||||
assign_level(&sstairs.tolev, dest);
|
||||
|
|
|
@ -344,6 +344,7 @@ long mask; /* nonzero if resistance status should change by mask */
|
|||
see_monsters();
|
||||
see_objects();
|
||||
see_traps();
|
||||
see_altars();
|
||||
}
|
||||
|
||||
/* for perm_inv and anything similar
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue