mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 09:50:34 +00:00
Orb of Empathy now protects your allies from your indirect attacks
This commit is contained in:
parent
1a7ba1b556
commit
db5bcef578
@ -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)))
|
||||
|
1
help.cpp
1
help.cpp
@ -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
|
||||
|
1
hyper.h
1
hyper.h
@ -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
|
||||
|
||||
|
2
orbs.cpp
2
orbs.cpp
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user