Skip to content

Commit

Permalink
Fix regression bug with paralysis runic
Browse files Browse the repository at this point in the history
  • Loading branch information
zenzombie committed Jun 17, 2024
1 parent b68f5a3 commit 3ddf75c
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/brogue/Combat.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,14 +336,6 @@ void moralAttack(creature *attacker, creature *defender) {

alertMonster(defender); // this alerts the monster that you're nearby
}

if ((defender->info.abilityFlags & MA_CLONE_SELF_ON_DEFEND) && alliedCloneCount(defender) < 100) {
if (distanceBetween(defender->loc, attacker->loc) <= 1) {
splitMonster(defender, attacker->loc);
} else {
splitMonster(defender, INVALID_POS);
}
}
}
}

Expand Down Expand Up @@ -1216,11 +1208,21 @@ boolean attack(creature *attacker, creature *defender, boolean lungeAttack) {
}
}

moralAttack(attacker, defender);

if (attacker == &player && rogue.weapon && (rogue.weapon->flags & ITEM_RUNIC)) {
magicWeaponHit(defender, rogue.weapon, sneakAttack || defenderWasAsleep || defenderWasParalyzed);
}

moralAttack(attacker, defender);
if ((defender->info.abilityFlags & MA_CLONE_SELF_ON_DEFEND) && alliedCloneCount(defender) < 100
&& defender->currentHP > 0 && !(defender->bookkeepingFlags & MB_IS_DYING)) {

if (distanceBetween(defender->loc, attacker->loc) <= 1) {
splitMonster(defender, attacker->loc);
} else {
splitMonster(defender, INVALID_POS);
}
}

if (attacker == &player
&& (defender->bookkeepingFlags & MB_IS_DYING)
Expand Down

0 comments on commit 3ddf75c

Please sign in to comment.