Orb of Empathy now protects your allies from your indirect attacks

This commit is contained in:
Zeno Rogue 2020-03-02 20:35:15 +01:00
parent 1a7ba1b556
commit db5bcef578
4 changed files with 6 additions and 1 deletions

View File

@ -97,6 +97,9 @@ EX bool canAttack(cell *c1, eMonster m1, cell *c2, eMonster m2, flagtype flags)
if((flags & AF_ONLY_FBUG) && m2 != moPlayer && !isFriendlyOrBug(c2)) return false;
if((flags & AF_ONLY_ENEMY) && (m2 == moPlayer || isFriendlyOrBug(c2))) return false;
if(isFriendly(c2) && markOrb(itOrbEmpathy) && (flags & (AF_STAB | AF_MAGIC | AF_HORNS | AF_SWORD | AF_SWORD_INTO | AF_SIDE | AF_PLAGUE)))
return false;
if(m1 == moArrowTrap && arrow_stuns(m2)) return true;
if(among(m2, moAltDemon, moHexDemon, moPair, moCrusher, moNorthPole, moSouthPole, moMonk) && !(flags & (AF_EAT | AF_MAGIC | AF_BULL | AF_CRUSH)))

View File

@ -379,6 +379,7 @@ EX string generateHelpForItem(eItem it) {
cnt++;
}
}
help += XLAT("\n\nAdditionally, your allies are protected from your indirect attacks.");
}
#if CAP_INV

View File

@ -484,6 +484,7 @@ typedef function<int(struct cell*)> cellfunction;
#define AF_SIDE Flag(30) // side attack
#define AF_CRUSH Flag(31) // Crusher's delayed attack
#define AF_PLAGUE Flag(32) // Orb of Plague (do not check adjacency)
#define AF_PSI Flag(33) // Orb of the Mind
#if CAP_SDL

View File

@ -917,7 +917,7 @@ void psi_attack(cell *dest) {
else
addMessage(XLAT("You kill %the1 with a mental blast!", dest->monst));
// note: psi attack works with Petrify!
attackMonster(dest, AF_MAGIC, moPlayer);
attackMonster(dest, AF_PSI, moPlayer);
useupOrb(itOrbPsi, 30);
createNoise(2);
bfs();