fixed some things about forbidden orbs

This commit is contained in:
Zeno Rogue 2017-10-13 21:28:03 +02:00
parent 5c3d89e4b5
commit 1728675ea5
2 changed files with 17 additions and 8 deletions

View File

@ -527,15 +527,23 @@ namespace inv {
displaystr(vid.xres/2, vid.yres - vid.fsize*5, 2, vid.fsize, hot, icol, 8);
#endif
eOrbLandRelation olr = getOLR(which, getPrizeLand());
eLand pl = getPrizeLand();
eOrbLandRelation olr = getOLR(which, pl);
int col = 0;
if(olr == olrDangerous) col = 0xC00000;
if(olr == olrUseless) col = 0x808080;
if(olr == olrForbidden) col = 0x804000;
const char *fmsg = NULL;
if(olr == olrDangerous)
col = 0xC00000,
fmsg = "Using %the1 in %the2 sounds dangerous...";
else if(olr == olrUseless)
col = 0xC00000,
fmsg = "%The1 is mostly useless in %the2...";
else if(olr == olrForbidden)
col = 0x804000,
fmsg = "%The1 is forbidden in %the2 (disables some achievements)";
if(col)
displaystr(vid.xres/2, vid.yres - vid.fsize*4, 2, vid.fsize, XLAT(olrDescriptions[olr], cwt.c->land, itNone, treasureType(cwt.c->land)), col, 8);
if(fmsg)
displaystr(vid.xres/2, vid.yres - vid.fsize*4, 2, vid.fsize, XLAT(fmsg, which, pl), col, 8);
}
}
@ -584,7 +592,7 @@ namespace inv {
cwt.c->item = orbmap[uni];
collectItem(cwt.c, true);
if(!cwt.c->item) usedup[orbmap[uni]]++;
if(getOLR(it, getPrizeLand()))
if(getOLR(it, getPrizeLand()) == olrForbidden)
usedForbidden = true;
cwt.c->item = it;
evokeOrb(orbmap[uni]);

View File

@ -260,7 +260,8 @@ eOrbLandRelation getOLR(eItem it, eLand l) {
l == laMinefield || l == laCocytus) return olrUseless;
if(l == laPrincessQuest)
if(it == itOrbAether || it == itOrbFlash || it == itOrbTeleport || it == itOrbSummon || it == itOrbFreedom)
if(it == itOrbAether || it == itOrbFlash || it == itOrbTeleport || it == itOrbSummon || it == itOrbFreedom ||
it == itOrbFriend)
return olrForbidden;
if(l == laTemple)