Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build failure due to deprecated MONST_REFLECT4 #680

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/brogue/Items.c
Original file line number Diff line number Diff line change
Expand Up @@ -3642,7 +3642,7 @@ static boolean tunnelize(short x, short y) {
static boolean negationWillAffectMonster(creature *monst, boolean isBolt) {

// negation bolts don't affect monsters that always reflect. negation never affects the warden.
if ((isBolt && (monst->info.flags & MONST_REFLECT_4) && (monst->info.flags & MONST_ALWAYS_USE_ABILITY))
if ((isBolt && (monst->info.abilityFlags & MA_REFLECT_100))
|| (monst->info.flags & MONST_INVULNERABLE)) {
return false;
}
Expand Down Expand Up @@ -5258,7 +5258,7 @@ static boolean canAutoTargetMonster(const creature *monst, const item *theItem,

// If we got this far we're using a staff or wand
// Don't target enemies that always reflect bolts (stone/winged guardian, non-negated mirrored totem)
if (isEnemy && (monst->info.flags & MONST_REFLECT_4) && (monst->info.flags & MONST_ALWAYS_USE_ABILITY)) {
if (isEnemy && (monst->info.abilityFlags & MA_REFLECT_100)) {
return false;
}

Expand All @@ -5278,7 +5278,7 @@ static boolean canAutoTargetMonster(const creature *monst, const item *theItem,
|| (isEnemy && theBolt.boltEffect == BE_DOMINATION && (wandDominate(monst) <= 0))
|| (isEnemy && theBolt.boltEffect == BE_BECKONING && (distanceBetween(player.loc, monst->loc) <= 1))
|| (isEnemy && theBolt.boltEffect == BE_DAMAGE && (theBolt.flags & BF_FIERY) && monst->status[STATUS_IMMUNE_TO_FIRE])
|| (isAlly && theBolt.boltEffect == BE_HEALING && !(monst->info.flags & MONST_REFLECT_4)
|| (isAlly && theBolt.boltEffect == BE_HEALING && !(monst->info.flags & MONST_REFLECT_50)
&& (monst->currentHP >= monst->info.maxHP))) {
return false;
} else if (isEnemy && theBolt.boltEffect == BE_NEGATION) {
Expand Down
Loading