more renaming
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
|
||||
extern u32 gBattleControllerExecFlags;
|
||||
extern u8 gActiveBattler;
|
||||
extern u8 gBattleMoveTarget;
|
||||
extern u8 gBattlerTarget;
|
||||
extern u8 gAbsentBattlerFlags;
|
||||
extern bool8 gDoingBattleAnim;
|
||||
extern u16 gBattlerPartyIndexes[MAX_BATTLERS_COUNT];
|
||||
@@ -473,7 +473,7 @@ static void sub_805FC10(void)
|
||||
{
|
||||
if (gSprites[gHealthboxSpriteIds[gActiveBattler]].callback == SpriteCallbackDummy)
|
||||
{
|
||||
if (gBattleSpritesDataPtr->bankData[gActiveBattler].behindSubstitute)
|
||||
if (gBattleSpritesDataPtr->battlerData[gActiveBattler].behindSubstitute)
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, gActiveBattler, B_ANIM_MON_TO_SUBSTITUTE);
|
||||
gBattlerControllerFuncs[gActiveBattler] = sub_805FC80;
|
||||
}
|
||||
@@ -1229,7 +1229,7 @@ static void DoSwitchOutAnimation(void)
|
||||
switch (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState)
|
||||
{
|
||||
case 0:
|
||||
if (gBattleSpritesDataPtr->bankData[gActiveBattler].behindSubstitute)
|
||||
if (gBattleSpritesDataPtr->battlerData[gActiveBattler].behindSubstitute)
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, gActiveBattler, B_ANIM_SUBSTITUTE_TO_MON);
|
||||
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 1;
|
||||
@@ -1415,7 +1415,7 @@ static void OpponentHandleFaintAnimation(void)
|
||||
{
|
||||
if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState == 0)
|
||||
{
|
||||
if (gBattleSpritesDataPtr->bankData[gActiveBattler].behindSubstitute)
|
||||
if (gBattleSpritesDataPtr->battlerData[gActiveBattler].behindSubstitute)
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, gActiveBattler, B_ANIM_SUBSTITUTE_TO_MON);
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState++;
|
||||
}
|
||||
@@ -1484,10 +1484,10 @@ static void OpponentDoMoveAnimation(void)
|
||||
switch (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState)
|
||||
{
|
||||
case 0:
|
||||
if (gBattleSpritesDataPtr->bankData[gActiveBattler].behindSubstitute
|
||||
&& !gBattleSpritesDataPtr->bankData[gActiveBattler].flag_x8)
|
||||
if (gBattleSpritesDataPtr->battlerData[gActiveBattler].behindSubstitute
|
||||
&& !gBattleSpritesDataPtr->battlerData[gActiveBattler].flag_x8)
|
||||
{
|
||||
gBattleSpritesDataPtr->bankData[gActiveBattler].flag_x8 = 1;
|
||||
gBattleSpritesDataPtr->battlerData[gActiveBattler].flag_x8 = 1;
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, gActiveBattler, B_ANIM_SUBSTITUTE_TO_MON);
|
||||
}
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 1;
|
||||
@@ -1505,10 +1505,10 @@ static void OpponentDoMoveAnimation(void)
|
||||
if (!gAnimScriptActive)
|
||||
{
|
||||
sub_805EB9C(1);
|
||||
if (gBattleSpritesDataPtr->bankData[gActiveBattler].behindSubstitute && multihit < 2)
|
||||
if (gBattleSpritesDataPtr->battlerData[gActiveBattler].behindSubstitute && multihit < 2)
|
||||
{
|
||||
InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, gActiveBattler, B_ANIM_MON_TO_SUBSTITUTE);
|
||||
gBattleSpritesDataPtr->bankData[gActiveBattler].flag_x8 = 0;
|
||||
gBattleSpritesDataPtr->battlerData[gActiveBattler].flag_x8 = 0;
|
||||
}
|
||||
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].animationState = 3;
|
||||
}
|
||||
@@ -1575,24 +1575,24 @@ static void OpponentHandleChooseMove(void)
|
||||
switch (chosenMoveId)
|
||||
{
|
||||
case 5:
|
||||
BtlController_EmitTwoReturnValues(1, ACTION_WATCHES_CAREFULLY, 0);
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_SAFARI_WATCH_CAREFULLY, 0);
|
||||
break;
|
||||
case 4:
|
||||
BtlController_EmitTwoReturnValues(1, ACTION_RUN, 0);
|
||||
BtlController_EmitTwoReturnValues(1, B_ACTION_RUN, 0);
|
||||
break;
|
||||
case 6:
|
||||
BtlController_EmitTwoReturnValues(1, 15, gBattleMoveTarget);
|
||||
BtlController_EmitTwoReturnValues(1, 15, gBattlerTarget);
|
||||
break;
|
||||
default:
|
||||
if (gBattleMoves[moveInfo->moves[chosenMoveId]].target & (MOVE_TARGET_USER | MOVE_TARGET_x10))
|
||||
gBattleMoveTarget = gActiveBattler;
|
||||
gBattlerTarget = gActiveBattler;
|
||||
if (gBattleMoves[moveInfo->moves[chosenMoveId]].target & MOVE_TARGET_BOTH)
|
||||
{
|
||||
gBattleMoveTarget = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT);
|
||||
if (gAbsentBattlerFlags & gBitTable[gBattleMoveTarget])
|
||||
gBattleMoveTarget = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT);
|
||||
gBattlerTarget = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT);
|
||||
if (gAbsentBattlerFlags & gBitTable[gBattlerTarget])
|
||||
gBattlerTarget = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT);
|
||||
}
|
||||
BtlController_EmitTwoReturnValues(1, 10, (chosenMoveId) | (gBattleMoveTarget << 8));
|
||||
BtlController_EmitTwoReturnValues(1, 10, (chosenMoveId) | (gBattlerTarget << 8));
|
||||
break;
|
||||
}
|
||||
OpponentBufferExecCompleted();
|
||||
|
||||
Reference in New Issue
Block a user