Skip to content

Commit 7b26611

Browse files
committed
Add inori check for combo
1 parent 380c78a commit 7b26611

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Wizardry/Core/ComboAttack/Source/battle-order-combo.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
#include "kernel-lib.h"
66
#include "constants/skills.h"
77

8+
STATIC_DECLAR bool ComboCheckBattleInori(struct Unit *combo_actor)
9+
{
10+
return CheckBattleInori(&gBattleActor, &gBattleTarget);
11+
}
12+
813
STATIC_DECLAR bool BattleComboGenerateHit(void)
914
{
1015
FORCE_DECLARE struct Unit *unit;
@@ -49,6 +54,16 @@ STATIC_DECLAR bool BattleComboGenerateHit(void)
4954

5055
/* step3 BattleGenerateHit */
5156
if (gBattleTarget.unit.curHP == 0) {
57+
if (ComboCheckBattleInori(unit)) {
58+
gBattleStats.damage = gBattleStats.damage - 1;
59+
gBattleHitIterator->hpChange = gBattleStats.damage;
60+
defender->unit.curHP = 1;
61+
62+
gBattleHitIterator->info |= BATTLE_HIT_INFO_FINISHES;
63+
gBattleHitIterator++;
64+
return true;
65+
}
66+
5267
gBattleActor.wexpMultiplier++;
5368
gBattleHitIterator->info |= BATTLE_HIT_INFO_FINISHES;
5469
gBattleHitIterator->info |= BATTLE_HIT_INFO_KILLS_TARGET;

0 commit comments

Comments
 (0)