Fix typos

This is an updated version of #554, since it hasn't been updated in two
weeks.
This commit is contained in:
Phlosioneer 2019-03-02 17:40:38 -05:00 committed by huderlem
parent e03595a10d
commit 4ea5e85bed
8 changed files with 28 additions and 28 deletions

View File

@ -1078,7 +1078,7 @@
.4byte \param0 .4byte \param0
.endm .endm
.macro tryimprision param0:req .macro tryimprison param0:req
.byte 0xdb .byte 0xdb
.4byte \param0 .4byte \param0
.endm .endm

View File

@ -2538,7 +2538,7 @@ BattleScript_EffectImprison::
attackcanceler attackcanceler
attackstring attackstring
ppreduce ppreduce
tryimprision BattleScript_ButItFailed tryimprison BattleScript_ButItFailed
attackanimation attackanimation
waitanimation waitanimation
printstring STRINGID_PKMNSEALEDOPPONENTMOVE printstring STRINGID_PKMNSEALEDOPPONENTMOVE
@ -3684,11 +3684,11 @@ BattleScript_MoveUsedIsImprisoned::
waitmessage 0x40 waitmessage 0x40
goto BattleScript_MoveEnd goto BattleScript_MoveEnd
BattleScript_SelectingImprisionedMove:: BattleScript_SelectingImprisonedMove::
printselectionstring STRINGID_PKMNCANTUSEMOVESEALED printselectionstring STRINGID_PKMNCANTUSEMOVESEALED
endselectionscript endselectionscript
BattleScript_SelectingImprisionedMoveInPalace:: BattleScript_SelectingImprisonedMoveInPalace::
printstring STRINGID_PKMNCANTUSEMOVESEALED printstring STRINGID_PKMNCANTUSEMOVESEALED
goto BattleScript_SelectingUnusableMoveInPalace goto BattleScript_SelectingUnusableMoveInPalace

View File

@ -175,7 +175,7 @@ struct ProtectStruct
u32 targetNotAffected:1; u32 targetNotAffected:1;
u32 chargingTurn:1; u32 chargingTurn:1;
u32 fleeFlag:2; // For RunAway and Smoke Ball. u32 fleeFlag:2; // For RunAway and Smoke Ball.
u32 usedImprisionedMove:1; u32 usedImprisonedMove:1;
u32 loveImmobility:1; u32 loveImmobility:1;
u32 usedDisabledMove:1; u32 usedDisabledMove:1;
u32 usedTauntedMove:1; u32 usedTauntedMove:1;

View File

@ -88,8 +88,8 @@ extern const u8 BattleScript_IngrainTurnHeal[];
extern const u8 BattleScript_AtkDefDown[]; extern const u8 BattleScript_AtkDefDown[];
extern const u8 BattleScript_KnockedOff[]; extern const u8 BattleScript_KnockedOff[];
extern const u8 BattleScript_MoveUsedIsImprisoned[]; extern const u8 BattleScript_MoveUsedIsImprisoned[];
extern const u8 BattleScript_SelectingImprisionedMove[]; extern const u8 BattleScript_SelectingImprisonedMove[];
extern const u8 BattleScript_SelectingImprisionedMoveInPalace[]; extern const u8 BattleScript_SelectingImprisonedMoveInPalace[];
extern const u8 BattleScript_GrudgeTakesPp[]; extern const u8 BattleScript_GrudgeTakesPp[];
extern const u8 BattleScript_MagicCoatBounce[]; extern const u8 BattleScript_MagicCoatBounce[];
extern const u8 BattleScript_SnatchedMove[]; extern const u8 BattleScript_SnatchedMove[];

View File

@ -6,7 +6,7 @@
#define MOVE_LIMITATION_DISABLED (1 << 2) #define MOVE_LIMITATION_DISABLED (1 << 2)
#define MOVE_LIMITATION_TORMENTED (1 << 3) #define MOVE_LIMITATION_TORMENTED (1 << 3)
#define MOVE_LIMITATION_TAUNT (1 << 4) #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_ON_SWITCHIN 0x0
#define ABILITYEFFECT_ENDTURN 0x1 #define ABILITYEFFECT_ENDTURN 0x1
@ -44,7 +44,7 @@
u8 GetBattlerForBattleScript(u8 caseId); u8 GetBattlerForBattleScript(u8 caseId);
void PressurePPLose(u8 target, u8 attacker, u16 move); void PressurePPLose(u8 target, u8 attacker, u16 move);
void PressurePPLoseOnUsingPerishSong(u8 attacker); void PressurePPLoseOnUsingPerishSong(u8 attacker);
void PressurePPLoseOnUsingImprision(u8 attacker); void PressurePPLoseOnUsingImprison(u8 attacker);
void MarkAllBattlersForControllerExec(void); // unused void MarkAllBattlersForControllerExec(void); // unused
void MarkBattlerForControllerExec(u8 battlerId); void MarkBattlerForControllerExec(u8 battlerId);
void sub_803F850(u8 arg0); void sub_803F850(u8 arg0);

View File

@ -3279,7 +3279,7 @@ void FaintClearSetData(void)
gProtectStructs[gActiveBattler].targetNotAffected = 0; gProtectStructs[gActiveBattler].targetNotAffected = 0;
gProtectStructs[gActiveBattler].chargingTurn = 0; gProtectStructs[gActiveBattler].chargingTurn = 0;
gProtectStructs[gActiveBattler].fleeFlag = 0; gProtectStructs[gActiveBattler].fleeFlag = 0;
gProtectStructs[gActiveBattler].usedImprisionedMove = 0; gProtectStructs[gActiveBattler].usedImprisonedMove = 0;
gProtectStructs[gActiveBattler].loveImmobility = 0; gProtectStructs[gActiveBattler].loveImmobility = 0;
gProtectStructs[gActiveBattler].usedDisabledMove = 0; gProtectStructs[gActiveBattler].usedDisabledMove = 0;
gProtectStructs[gActiveBattler].usedTauntedMove = 0; gProtectStructs[gActiveBattler].usedTauntedMove = 0;

View File

@ -297,7 +297,7 @@ static void atkD7_setyawn(void);
static void atkD8_setdamagetohealthdifference(void); static void atkD8_setdamagetohealthdifference(void);
static void atkD9_scaledamagebyhealthratio(void); static void atkD9_scaledamagebyhealthratio(void);
static void atkDA_tryswapabilities(void); static void atkDA_tryswapabilities(void);
static void atkDB_tryimprision(void); static void atkDB_tryimprison(void);
static void atkDC_trysetgrudge(void); static void atkDC_trysetgrudge(void);
static void atkDD_weightdamagecalculation(void); static void atkDD_weightdamagecalculation(void);
static void atkDE_asistattackselect(void); static void atkDE_asistattackselect(void);
@ -549,7 +549,7 @@ void (* const gBattleScriptingCommandsTable[])(void) =
atkD8_setdamagetohealthdifference, atkD8_setdamagetohealthdifference,
atkD9_scaledamagebyhealthratio, atkD9_scaledamagebyhealthratio,
atkDA_tryswapabilities, atkDA_tryswapabilities,
atkDB_tryimprision, atkDB_tryimprison,
atkDC_trysetgrudge, atkDC_trysetgrudge,
atkDD_weightdamagecalculation, atkDD_weightdamagecalculation,
atkDE_asistattackselect, 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)) if ((gStatuses3[gBattlerAttacker] & STATUS3_IMPRISONED_OTHERS))
{ {
@ -9622,7 +9622,7 @@ static void atkDB_tryimprision(void)
u8 battlerId, sideAttacker; u8 battlerId, sideAttacker;
sideAttacker = GetBattlerSide(gBattlerAttacker); sideAttacker = GetBattlerSide(gBattlerAttacker);
PressurePPLoseOnUsingImprision(gBattlerAttacker); PressurePPLoseOnUsingImprison(gBattlerAttacker);
for (battlerId = 0; battlerId < gBattlersCount; battlerId++) for (battlerId = 0; battlerId < gBattlersCount; battlerId++)
{ {
if (sideAttacker != GetBattlerSide(battlerId)) if (sideAttacker != GetBattlerSide(battlerId))

View File

@ -106,10 +106,10 @@ void PressurePPLose(u8 target, u8 attacker, u16 move)
} }
} }
void PressurePPLoseOnUsingImprision(u8 attacker) void PressurePPLoseOnUsingImprison(u8 attacker)
{ {
int i, j; int i, j;
int imprisionPos = 4; int imprisonPos = 4;
u8 atkSide = GetBattlerSide(attacker); u8 atkSide = GetBattlerSide(attacker);
for (i = 0; i < gBattlersCount; i++) for (i = 0; i < gBattlersCount; i++)
@ -123,19 +123,19 @@ void PressurePPLoseOnUsingImprision(u8 attacker)
} }
if (j != MAX_MON_MOVES) if (j != MAX_MON_MOVES)
{ {
imprisionPos = j; imprisonPos = j;
if (gBattleMons[attacker].pp[j] != 0) if (gBattleMons[attacker].pp[j] != 0)
gBattleMons[attacker].pp[j]--; gBattleMons[attacker].pp[j]--;
} }
} }
} }
if (imprisionPos != 4 if (imprisonPos != 4
&& !(gBattleMons[attacker].status2 & STATUS2_TRANSFORMED) && !(gBattleMons[attacker].status2 & STATUS2_TRANSFORMED)
&& !(gDisableStructs[attacker].mimickedMoves & gBitTable[imprisionPos])) && !(gDisableStructs[attacker].mimickedMoves & gBitTable[imprisonPos]))
{ {
gActiveBattler = attacker; 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); MarkBattlerForControllerExec(gActiveBattler);
} }
} }
@ -224,7 +224,7 @@ bool8 WasUnableToUseMove(u8 battler)
{ {
if (gProtectStructs[battler].prlzImmobility if (gProtectStructs[battler].prlzImmobility
|| gProtectStructs[battler].targetNotAffected || gProtectStructs[battler].targetNotAffected
|| gProtectStructs[battler].usedImprisionedMove || gProtectStructs[battler].usedImprisonedMove
|| gProtectStructs[battler].loveImmobility || gProtectStructs[battler].loveImmobility
|| gProtectStructs[battler].usedDisabledMove || gProtectStructs[battler].usedDisabledMove
|| gProtectStructs[battler].usedTauntedMove || gProtectStructs[battler].usedTauntedMove
@ -365,12 +365,12 @@ u8 TrySetCantSelectMoveBattleScript(void)
gCurrentMove = move; gCurrentMove = move;
if (gBattleTypeFlags & BATTLE_TYPE_PALACE) if (gBattleTypeFlags & BATTLE_TYPE_PALACE)
{ {
gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingImprisionedMoveInPalace; gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingImprisonedMoveInPalace;
gProtectStructs[gActiveBattler].palaceUnableToUseMove = 1; gProtectStructs[gActiveBattler].palaceUnableToUseMove = 1;
} }
else else
{ {
gSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingImprisionedMove; gSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingImprisonedMove;
limitations++; limitations++;
} }
} }
@ -438,7 +438,7 @@ u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u8 check)
unusableMoves |= gBitTable[i]; unusableMoves |= gBitTable[i];
if (gDisableStructs[battlerId].tauntTimer && check & MOVE_LIMITATION_TAUNT && gBattleMoves[gBattleMons[battlerId].moves[i]].power == 0) if (gDisableStructs[battlerId].tauntTimer && check & MOVE_LIMITATION_TAUNT && gBattleMoves[gBattleMons[battlerId].moves[i]].power == 0)
unusableMoves |= gBitTable[i]; 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]; unusableMoves |= gBitTable[i];
if (gDisableStructs[battlerId].encoreTimer && gDisableStructs[battlerId].encoredMove != gBattleMons[battlerId].moves[i]) if (gDisableStructs[battlerId].encoreTimer && gDisableStructs[battlerId].encoredMove != gBattleMons[battlerId].moves[i])
unusableMoves |= gBitTable[i]; unusableMoves |= gBitTable[i];
@ -469,7 +469,7 @@ bool8 AreAllMovesUnusable(void)
u8 GetImprisonedMovesCount(u8 battlerId, u16 move) u8 GetImprisonedMovesCount(u8 battlerId, u16 move)
{ {
s32 i; s32 i;
u8 imprisionedMoves = 0; u8 imprisonedMoves = 0;
u8 battlerSide = GetBattlerSide(battlerId); u8 battlerSide = GetBattlerSide(battlerId);
for (i = 0; i < gBattlersCount; i++) for (i = 0; i < gBattlersCount; i++)
@ -483,11 +483,11 @@ u8 GetImprisonedMovesCount(u8 battlerId, u16 move)
break; break;
} }
if (j < MAX_MON_MOVES) if (j < MAX_MON_MOVES)
imprisionedMoves++; imprisonedMoves++;
} }
} }
return imprisionedMoves; return imprisonedMoves;
} }
enum enum
@ -1466,7 +1466,7 @@ u8 AtkCanceller_UnableToUseMove(void)
case CANCELLER_IMPRISONED: // imprisoned case CANCELLER_IMPRISONED: // imprisoned
if (GetImprisonedMovesCount(gBattlerAttacker, gCurrentMove)) if (GetImprisonedMovesCount(gBattlerAttacker, gCurrentMove))
{ {
gProtectStructs[gBattlerAttacker].usedImprisionedMove = 1; gProtectStructs[gBattlerAttacker].usedImprisonedMove = 1;
CancelMultiTurnMoves(gBattlerAttacker); CancelMultiTurnMoves(gBattlerAttacker);
gBattlescriptCurrInstr = BattleScript_MoveUsedIsImprisoned; gBattlescriptCurrInstr = BattleScript_MoveUsedIsImprisoned;
gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE; gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE;