1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-23 09:57:41 +00:00

added faraway monster highlight as in @still-flow's pull request

This commit is contained in:
Zeno Rogue
2021-04-30 19:44:54 +02:00
parent 4cd43b3f27
commit 639122e314
6 changed files with 98 additions and 58 deletions

View File

@@ -158,6 +158,14 @@ EX bool isFriendly(cell *c) {
return isMounted(c) || isFriendly(c->monst);
}
EX eThreatLevel get_threat_level(cell *c) {
if(!c->monst) return tlNoThreat;
if(isFriendly(c)) return tlNoThreat;
if(classflag(c->monst) & CF_HIGH_THREAT) return tlHighThreat;
if(classflag(c->monst) & CF_SPAM) return tlSpam;
return tlNormal;
}
EX bool isFriendlyOrBug(cell *c) { // or killable discord!
// do not attack the stunned Princess
if(isPrincess(c->monst) && c->stuntime) return false;