diff --git a/include/battle.h b/include/battle.h index 48b6dc6ea..e770bbd3d 100644 --- a/include/battle.h +++ b/include/battle.h @@ -3592,8 +3592,6 @@ void LONG_CALL SortRawSpeedNonRNGArray(struct BattleSystem *bsys, struct BattleS BOOL LONG_CALL CanActivateDamageReductionBerry(struct BattleSystem *bsys, struct BattleStruct *ctx, int defender); -#define GET_HELD_ITEM_HOLD_EFFECT_ACCOUNTING_KLUTZ(ctx, client) (GetBattlerAbility(ctx, client) != ABILITY_KLUTZ ? HeldItemHoldEffectGet(ctx, client) : 0) - BOOL IsPureType(struct BattleStruct *ctx, int battlerId, int type); #endif // BATTLE_H diff --git a/include/debug.h b/include/debug.h index 54ea01653..aa478ec8c 100644 --- a/include/debug.h +++ b/include/debug.h @@ -66,6 +66,6 @@ //#define DEBUG_BEFORE_MOVE_LOGIC // NOCASH_GBA_PRINT swaps from desmume prints with the syscall to NO$GBA-style prints for use with i.e. melonDS -//#define NOCASH_GBA_PRINT +#define NOCASH_GBA_PRINT #endif // DEBUG_H diff --git a/src/battle/battle_script_commands.c b/src/battle/battle_script_commands.c index 8055fc16e..1270deb23 100644 --- a/src/battle/battle_script_commands.c +++ b/src/battle/battle_script_commands.c @@ -3304,7 +3304,7 @@ BOOL BtlCmd_SetMultiHit(struct BattleSystem *bsys, struct BattleStruct *ctx) { // If it rolled 4 or 5 Loaded Dice doesn't do anything, // otherwise it rolls the number of hits as 5 minus a random integer from 0 to 1 inclusive. - if (GET_HELD_ITEM_HOLD_EFFECT_ACCOUNTING_KLUTZ(ctx, ctx->attack_client) == HOLD_EFFECT_INCREASE_MULTI_STRIKE_MINIMUM) { + if (HeldItemHoldEffectGet(ctx, ctx->attack_client) == HOLD_EFFECT_INCREASE_MULTI_STRIKE_MINIMUM) { if (cnt != 4 && cnt != 5) { cnt = 5 - (BattleRand(bsys) % 2); // 5 - (0 or 1) } @@ -3314,7 +3314,7 @@ BOOL BtlCmd_SetMultiHit(struct BattleSystem *bsys, struct BattleStruct *ctx) { // Population Bomb checks accuracy for each hit, like Triple Kick and Triple Axel. // Loaded Dice causes it to only run the first accuracy check, and rolls the number of hits as 10 minus a random integer from 0 to 6 inclusive. - if (cnt == 10 && GET_HELD_ITEM_HOLD_EFFECT_ACCOUNTING_KLUTZ(ctx, ctx->attack_client) == HOLD_EFFECT_INCREASE_MULTI_STRIKE_MINIMUM) { + if (cnt == 10 && HeldItemHoldEffectGet(ctx, ctx->attack_client) == HOLD_EFFECT_INCREASE_MULTI_STRIKE_MINIMUM) { cnt = 10 - (BattleRand(bsys) % 7); // 10 - (0 to 6) } diff --git a/src/battle/other_battle_calculators.c b/src/battle/other_battle_calculators.c index c2c667359..be110b506 100644 --- a/src/battle/other_battle_calculators.c +++ b/src/battle/other_battle_calculators.c @@ -1138,7 +1138,7 @@ void LONG_CALL CalcPriorityAndQuickClawCustapBerry(void *bsys, struct BattleStru } } - hold_effect = GET_HELD_ITEM_HOLD_EFFECT_ACCOUNTING_KLUTZ(ctx, client); + hold_effect = HeldItemHoldEffectGet(ctx, client); hold_atk = HeldItemAtkGet(ctx, client, 0); if (hold_effect == HOLD_EFFECT_SOMETIMES_PRIORITY) { diff --git a/src/individual/btl_scr_cmd_33_statbuffchange.c b/src/individual/btl_scr_cmd_33_statbuffchange.c index c4d03bef3..b5b3ccee7 100644 --- a/src/individual/btl_scr_cmd_33_statbuffchange.c +++ b/src/individual/btl_scr_cmd_33_statbuffchange.c @@ -75,9 +75,9 @@ BOOL btl_scr_cmd_33_statbuffchange(void *bw, struct BattleStruct *sp) sp->temp_work = STATUS_EFF_UP; } //1 step down - else if (sp->addeffect_param >= ADD_STATUS_EFF_BOOST_STATS_ATTACK_UP) + else if (sp->addeffect_param >= ADD_STATUS_EFF_BOOST_STATS_ATTACK_DOWN) { - stattochange = sp->addeffect_param - ADD_STATUS_EFF_BOOST_STATS_ATTACK_UP; + stattochange = sp->addeffect_param - ADD_STATUS_EFF_BOOST_STATS_ATTACK_DOWN; statchange = -1; sp->temp_work = STATUS_EFF_DOWN; }