From 4ea5e85bed767a8cffea1fdcfac8669dff06c632 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sat, 2 Mar 2019 17:40:38 -0500 Subject: [PATCH] Fix typos This is an updated version of #554, since it hasn't been updated in two weeks. --- asm/macros/battle_script.inc | 2 +- data/battle_scripts_1.s | 6 +++--- include/battle.h | 2 +- include/battle_scripts.h | 4 ++-- include/battle_util.h | 4 ++-- src/battle_main.c | 2 +- src/battle_script_commands.c | 8 ++++---- src/battle_util.c | 28 ++++++++++++++-------------- 8 files changed, 28 insertions(+), 28 deletions(-) diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index 6370ef569..ed32e4643 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -1078,7 +1078,7 @@ .4byte \param0 .endm - .macro tryimprision param0:req + .macro tryimprison param0:req .byte 0xdb .4byte \param0 .endm diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 8ddf56ef8..0159a3f73 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -2538,7 +2538,7 @@ BattleScript_EffectImprison:: attackcanceler attackstring ppreduce - tryimprision BattleScript_ButItFailed + tryimprison BattleScript_ButItFailed attackanimation waitanimation printstring STRINGID_PKMNSEALEDOPPONENTMOVE @@ -3684,11 +3684,11 @@ BattleScript_MoveUsedIsImprisoned:: waitmessage 0x40 goto BattleScript_MoveEnd -BattleScript_SelectingImprisionedMove:: +BattleScript_SelectingImprisonedMove:: printselectionstring STRINGID_PKMNCANTUSEMOVESEALED endselectionscript -BattleScript_SelectingImprisionedMoveInPalace:: +BattleScript_SelectingImprisonedMoveInPalace:: printstring STRINGID_PKMNCANTUSEMOVESEALED goto BattleScript_SelectingUnusableMoveInPalace diff --git a/include/battle.h b/include/battle.h index 94596c75e..d155ca5a0 100644 --- a/include/battle.h +++ b/include/battle.h @@ -175,7 +175,7 @@ struct ProtectStruct u32 targetNotAffected:1; u32 chargingTurn:1; u32 fleeFlag:2; // For RunAway and Smoke Ball. - u32 usedImprisionedMove:1; + u32 usedImprisonedMove:1; u32 loveImmobility:1; u32 usedDisabledMove:1; u32 usedTauntedMove:1; diff --git a/include/battle_scripts.h b/include/battle_scripts.h index a23fa6948..5f314401a 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -88,8 +88,8 @@ extern const u8 BattleScript_IngrainTurnHeal[]; extern const u8 BattleScript_AtkDefDown[]; extern const u8 BattleScript_KnockedOff[]; extern const u8 BattleScript_MoveUsedIsImprisoned[]; -extern const u8 BattleScript_SelectingImprisionedMove[]; -extern const u8 BattleScript_SelectingImprisionedMoveInPalace[]; +extern const u8 BattleScript_SelectingImprisonedMove[]; +extern const u8 BattleScript_SelectingImprisonedMoveInPalace[]; extern const u8 BattleScript_GrudgeTakesPp[]; extern const u8 BattleScript_MagicCoatBounce[]; extern const u8 BattleScript_SnatchedMove[]; diff --git a/include/battle_util.h b/include/battle_util.h index 71bb22a00..0756a387a 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -6,7 +6,7 @@ #define MOVE_LIMITATION_DISABLED (1 << 2) #define MOVE_LIMITATION_TORMENTED (1 << 3) #define MOVE_LIMITATION_TAUNT (1 << 4) -#define MOVE_LIMITATION_IMPRISION (1 << 5) +#define MOVE_LIMITATION_IMPRISON (1 << 5) #define ABILITYEFFECT_ON_SWITCHIN 0x0 #define ABILITYEFFECT_ENDTURN 0x1 @@ -44,7 +44,7 @@ u8 GetBattlerForBattleScript(u8 caseId); void PressurePPLose(u8 target, u8 attacker, u16 move); void PressurePPLoseOnUsingPerishSong(u8 attacker); -void PressurePPLoseOnUsingImprision(u8 attacker); +void PressurePPLoseOnUsingImprison(u8 attacker); void MarkAllBattlersForControllerExec(void); // unused void MarkBattlerForControllerExec(u8 battlerId); void sub_803F850(u8 arg0); diff --git a/src/battle_main.c b/src/battle_main.c index 043e75808..853dafe01 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -3279,7 +3279,7 @@ void FaintClearSetData(void) gProtectStructs[gActiveBattler].targetNotAffected = 0; gProtectStructs[gActiveBattler].chargingTurn = 0; gProtectStructs[gActiveBattler].fleeFlag = 0; - gProtectStructs[gActiveBattler].usedImprisionedMove = 0; + gProtectStructs[gActiveBattler].usedImprisonedMove = 0; gProtectStructs[gActiveBattler].loveImmobility = 0; gProtectStructs[gActiveBattler].usedDisabledMove = 0; gProtectStructs[gActiveBattler].usedTauntedMove = 0; diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index a53fa30f2..620366b52 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -297,7 +297,7 @@ static void atkD7_setyawn(void); static void atkD8_setdamagetohealthdifference(void); static void atkD9_scaledamagebyhealthratio(void); static void atkDA_tryswapabilities(void); -static void atkDB_tryimprision(void); +static void atkDB_tryimprison(void); static void atkDC_trysetgrudge(void); static void atkDD_weightdamagecalculation(void); static void atkDE_asistattackselect(void); @@ -549,7 +549,7 @@ void (* const gBattleScriptingCommandsTable[])(void) = atkD8_setdamagetohealthdifference, atkD9_scaledamagebyhealthratio, atkDA_tryswapabilities, - atkDB_tryimprision, + atkDB_tryimprison, atkDC_trysetgrudge, atkDD_weightdamagecalculation, atkDE_asistattackselect, @@ -9611,7 +9611,7 @@ static void atkDA_tryswapabilities(void) // skill swap } } -static void atkDB_tryimprision(void) +static void atkDB_tryimprison(void) { if ((gStatuses3[gBattlerAttacker] & STATUS3_IMPRISONED_OTHERS)) { @@ -9622,7 +9622,7 @@ static void atkDB_tryimprision(void) u8 battlerId, sideAttacker; sideAttacker = GetBattlerSide(gBattlerAttacker); - PressurePPLoseOnUsingImprision(gBattlerAttacker); + PressurePPLoseOnUsingImprison(gBattlerAttacker); for (battlerId = 0; battlerId < gBattlersCount; battlerId++) { if (sideAttacker != GetBattlerSide(battlerId)) diff --git a/src/battle_util.c b/src/battle_util.c index 2f583a9c7..fc6042b65 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -106,10 +106,10 @@ void PressurePPLose(u8 target, u8 attacker, u16 move) } } -void PressurePPLoseOnUsingImprision(u8 attacker) +void PressurePPLoseOnUsingImprison(u8 attacker) { int i, j; - int imprisionPos = 4; + int imprisonPos = 4; u8 atkSide = GetBattlerSide(attacker); for (i = 0; i < gBattlersCount; i++) @@ -123,19 +123,19 @@ void PressurePPLoseOnUsingImprision(u8 attacker) } if (j != MAX_MON_MOVES) { - imprisionPos = j; + imprisonPos = j; if (gBattleMons[attacker].pp[j] != 0) gBattleMons[attacker].pp[j]--; } } } - if (imprisionPos != 4 + if (imprisonPos != 4 && !(gBattleMons[attacker].status2 & STATUS2_TRANSFORMED) - && !(gDisableStructs[attacker].mimickedMoves & gBitTable[imprisionPos])) + && !(gDisableStructs[attacker].mimickedMoves & gBitTable[imprisonPos])) { gActiveBattler = attacker; - BtlController_EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + imprisionPos, 0, 1, &gBattleMons[gActiveBattler].pp[imprisionPos]); + BtlController_EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + imprisonPos, 0, 1, &gBattleMons[gActiveBattler].pp[imprisonPos]); MarkBattlerForControllerExec(gActiveBattler); } } @@ -224,7 +224,7 @@ bool8 WasUnableToUseMove(u8 battler) { if (gProtectStructs[battler].prlzImmobility || gProtectStructs[battler].targetNotAffected - || gProtectStructs[battler].usedImprisionedMove + || gProtectStructs[battler].usedImprisonedMove || gProtectStructs[battler].loveImmobility || gProtectStructs[battler].usedDisabledMove || gProtectStructs[battler].usedTauntedMove @@ -365,12 +365,12 @@ u8 TrySetCantSelectMoveBattleScript(void) gCurrentMove = move; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { - gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingImprisionedMoveInPalace; + gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingImprisonedMoveInPalace; gProtectStructs[gActiveBattler].palaceUnableToUseMove = 1; } else { - gSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingImprisionedMove; + gSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingImprisonedMove; limitations++; } } @@ -438,7 +438,7 @@ u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u8 check) unusableMoves |= gBitTable[i]; if (gDisableStructs[battlerId].tauntTimer && check & MOVE_LIMITATION_TAUNT && gBattleMoves[gBattleMons[battlerId].moves[i]].power == 0) unusableMoves |= gBitTable[i]; - if (GetImprisonedMovesCount(battlerId, gBattleMons[battlerId].moves[i]) && check & MOVE_LIMITATION_IMPRISION) + if (GetImprisonedMovesCount(battlerId, gBattleMons[battlerId].moves[i]) && check & MOVE_LIMITATION_IMPRISON) unusableMoves |= gBitTable[i]; if (gDisableStructs[battlerId].encoreTimer && gDisableStructs[battlerId].encoredMove != gBattleMons[battlerId].moves[i]) unusableMoves |= gBitTable[i]; @@ -469,7 +469,7 @@ bool8 AreAllMovesUnusable(void) u8 GetImprisonedMovesCount(u8 battlerId, u16 move) { s32 i; - u8 imprisionedMoves = 0; + u8 imprisonedMoves = 0; u8 battlerSide = GetBattlerSide(battlerId); for (i = 0; i < gBattlersCount; i++) @@ -483,11 +483,11 @@ u8 GetImprisonedMovesCount(u8 battlerId, u16 move) break; } if (j < MAX_MON_MOVES) - imprisionedMoves++; + imprisonedMoves++; } } - return imprisionedMoves; + return imprisonedMoves; } enum @@ -1466,7 +1466,7 @@ u8 AtkCanceller_UnableToUseMove(void) case CANCELLER_IMPRISONED: // imprisoned if (GetImprisonedMovesCount(gBattlerAttacker, gCurrentMove)) { - gProtectStructs[gBattlerAttacker].usedImprisionedMove = 1; + gProtectStructs[gBattlerAttacker].usedImprisonedMove = 1; CancelMultiTurnMoves(gBattlerAttacker); gBattlescriptCurrInstr = BattleScript_MoveUsedIsImprisoned; gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE;