diff --git a/include/config.h b/include/config.h
index 2ad84f29cd..f55ec4f4a2 100644
--- a/include/config.h
+++ b/include/config.h
@@ -6,7 +6,7 @@
// still has them in the ROM. This is because the developers forgot
// to define NDEBUG before release, however this has been changed as
// Ruby's actual debug build does not use the AGBPrint features.
[color=Red]-#define NDEBUG[/color]
[color=SeaGreen]+//#define NDEBUG[/color]
// To enable printf debugging, comment out "#define NDEBUG". This allows
// the various AGBPrint functions to be used. (See include/gba/isagbprint.h).
diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c
index 6f2403d4ea..9cae76a9af 100644
--- a/src/battle_script_commands.c
+++ b/src/battle_script_commands.c
@@ -1856,6 +1856,7 @@ u32 GetTotalAccuracy(u32 battlerAtk, u32 battlerDef, u32 move, u32 atkAbility, u
u8 defParam = GetBattlerHoldEffectParam(battlerDef);
u8 atkAlly = BATTLE_PARTNER(battlerAtk);
u16 atkAllyAbility = GetBattlerAbility(atkAlly);
[color=SeaGreen]+ bool8 isHitSE = GetTypeModifier(gBattleMoves[move].type, gBattleMons[battlerDef].type1) >= UQ_4_12(2.0);[/color]
gPotentialItemEffectBattler = battlerDef;
accStage = gBattleMons[battlerAtk].statStages[STAT_ACC];
@@ -1919,6 +1920,14 @@ u32 GetTotalAccuracy(u32 battlerAtk, u32 battlerDef, u32 move, u32 atkAbility, u
if (gBattleMons[battlerDef].status2 & STATUS2_CONFUSION)
calc = (calc * 50) / 100; // 1.5 tangled feet loss
break;
[color=SeaGreen]+ case ABILITY_ANTICIPATION:
+ if (isHitSE)
+ {
+ DebugPrintfLevel(MGBA_LOG_DEBUG, "This is being reached! Calc is %d: ", calc);
+ calc = (calc * 80) / 100; // 1.2 anticipation loss
+ DebugPrintfLevel(MGBA_LOG_DEBUG, "And now it's %d:", calc);
+ }
+ break;[/color]
}
// Attacker's ally's ability