1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 09:00:34 +00:00

isRevivalOrb via flags

This commit is contained in:
Zeno Rogue 2019-03-23 16:42:11 +01:00
parent 9a072cdb62
commit c234156664
2 changed files with 2 additions and 4 deletions

View File

@ -91,6 +91,7 @@ static const flagtype IF_PROTECTION = Flag(2);
static const flagtype IF_EMPATHY = Flag(3); static const flagtype IF_EMPATHY = Flag(3);
static const flagtype IF_RANGED = Flag(4); static const flagtype IF_RANGED = Flag(4);
static const flagtype IF_SHMUPLIFE = Flag(5); static const flagtype IF_SHMUPLIFE = Flag(5);
static const flagtype IF_REVIVAL = Flag(6);
struct itemtype { struct itemtype {
char glyph; char glyph;

View File

@ -129,6 +129,7 @@ ITEMFLAGCHECK(itemBurns, !(flag & IF_FIREPROOF))
ITEMFLAGCHECK(isProtectionOrb, flag & IF_PROTECTION) ITEMFLAGCHECK(isProtectionOrb, flag & IF_PROTECTION)
ITEMFLAGCHECK(isEmpathyOrb, flag & IF_EMPATHY) ITEMFLAGCHECK(isEmpathyOrb, flag & IF_EMPATHY)
ITEMFLAGCHECK(isRangedOrb, flag & IF_RANGED) ITEMFLAGCHECK(isRangedOrb, flag & IF_RANGED)
ITEMFLAGCHECK(isRevivalOrb, flag & IF_REVIVAL)
eMonster movegroup(eMonster m); eMonster movegroup(eMonster m);
@ -262,10 +263,6 @@ bool haveRangedOrb() {
items[itOrbMorph] || items[itOrbPhasing]; items[itOrbMorph] || items[itOrbPhasing];
} }
bool isRevivalOrb(eItem i) {
return i == itOrbLife || i == itOrbFriend || i == itOrbUndeath;
}
bool isFriendlyGhost(eMonster m) { bool isFriendlyGhost(eMonster m) {
return m == moFriendlyGhost || (markEmpathy(itOrbAether) && isFriendly(m)); return m == moFriendlyGhost || (markEmpathy(itOrbAether) && isFriendly(m));
} }