Merge branch 'master' of https://github.com/pret/pokeemerald into doc-contest
This commit is contained in:
@@ -96,7 +96,7 @@ static void SpriteCb_WildMonShowHealthbox(struct Sprite *sprite);
|
||||
static void SpriteCb_WildMonAnimate(struct Sprite *sprite);
|
||||
static void sub_80398D0(struct Sprite *sprite);
|
||||
static void SpriteCB_AnimFaintOpponent(struct Sprite *sprite);
|
||||
static void sub_8039AF4(struct Sprite *sprite);
|
||||
static void SpriteCb_BlinkVisible(struct Sprite *sprite);
|
||||
static void SpriteCallbackDummy_3(struct Sprite *sprite);
|
||||
static void oac_poke_ally_(struct Sprite *sprite);
|
||||
static void SpecialStatusesClear(void);
|
||||
@@ -2798,31 +2798,31 @@ static void SpriteCB_AnimFaintOpponent(struct Sprite *sprite)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8039AD8(struct Sprite *sprite)
|
||||
// Used when selecting a move, which can hit multiple targets, in double battles.
|
||||
void SpriteCb_ShowAsMoveTarget(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[3] = 8;
|
||||
sprite->data[4] = sprite->invisible;
|
||||
sprite->callback = sub_8039AF4;
|
||||
sprite->callback = SpriteCb_BlinkVisible;
|
||||
}
|
||||
|
||||
static void sub_8039AF4(struct Sprite *sprite)
|
||||
static void SpriteCb_BlinkVisible(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[3]--;
|
||||
if (sprite->data[3] == 0)
|
||||
if (--sprite->data[3] == 0)
|
||||
{
|
||||
sprite->invisible ^= 1;
|
||||
sprite->data[3] = 8;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8039B2C(struct Sprite *sprite)
|
||||
void SpriteCb_HideAsMoveTarget(struct Sprite *sprite)
|
||||
{
|
||||
sprite->invisible = sprite->data[4];
|
||||
sprite->data[4] = FALSE;
|
||||
sprite->callback = SpriteCallbackDummy_2;
|
||||
}
|
||||
|
||||
void sub_8039B58(struct Sprite *sprite)
|
||||
void SpriteCb_OpponentMonFromBall(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->affineAnimEnded)
|
||||
{
|
||||
@@ -2965,7 +2965,7 @@ static void SpriteCB_BounceEffect(struct Sprite *sprite)
|
||||
#undef sBouncerSpriteId
|
||||
#undef sWhich
|
||||
|
||||
void sub_8039E44(struct Sprite *sprite)
|
||||
void SpriteCb_PlayerMonFromBall(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->affineAnimEnded)
|
||||
BattleAnimateBackSprite(sprite, sprite->sSpeciesId);
|
||||
@@ -3112,7 +3112,7 @@ static void BattleStartClearSetData(void)
|
||||
}
|
||||
|
||||
gBattleStruct->givenExpMons = 0;
|
||||
gBattleStruct->field_92 = 0;
|
||||
gBattleStruct->palaceFlags = 0;
|
||||
|
||||
gRandomTurnNumber = Random();
|
||||
|
||||
@@ -3135,7 +3135,7 @@ void SwitchInClearSetData(void)
|
||||
if (gBattleMoves[gCurrentMove].effect != EFFECT_BATON_PASS)
|
||||
{
|
||||
for (i = 0; i < NUM_BATTLE_STATS; i++)
|
||||
gBattleMons[gActiveBattler].statStages[i] = 6;
|
||||
gBattleMons[gActiveBattler].statStages[i] = DEFAULT_STAT_STAGE;
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
if ((gBattleMons[i].status2 & STATUS2_ESCAPE_PREVENTION) && gDisableStructs[i].battlerPreventingEscape == gActiveBattler)
|
||||
@@ -3159,7 +3159,7 @@ void SwitchInClearSetData(void)
|
||||
&& (gDisableStructs[i].battlerWithSureHit == gActiveBattler))
|
||||
{
|
||||
gStatuses3[i] &= ~(STATUS3_ALWAYS_HITS);
|
||||
gStatuses3[i] |= 0x10;
|
||||
gStatuses3[i] |= STATUS3_ALWAYS_HITS_TURN(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3214,7 +3214,7 @@ void SwitchInClearSetData(void)
|
||||
*(3 * 2 + gActiveBattler * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(3 * 2 + gActiveBattler * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
|
||||
gBattleStruct->field_92 &= ~(gBitTable[gActiveBattler]);
|
||||
gBattleStruct->palaceFlags &= ~(gBitTable[gActiveBattler]);
|
||||
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
@@ -3244,7 +3244,7 @@ void FaintClearSetData(void)
|
||||
u8 *ptr;
|
||||
|
||||
for (i = 0; i < NUM_BATTLE_STATS; i++)
|
||||
gBattleMons[gActiveBattler].statStages[i] = 6;
|
||||
gBattleMons[gActiveBattler].statStages[i] = DEFAULT_STAT_STAGE;
|
||||
|
||||
gBattleMons[gActiveBattler].status2 = 0;
|
||||
gStatuses3[gActiveBattler] = 0;
|
||||
@@ -3309,7 +3309,7 @@ void FaintClearSetData(void)
|
||||
*(3 * 2 + gActiveBattler * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(3 * 2 + gActiveBattler * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
|
||||
gBattleStruct->field_92 &= ~(gBitTable[gActiveBattler]);
|
||||
gBattleStruct->palaceFlags &= ~(gBitTable[gActiveBattler]);
|
||||
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
@@ -3398,7 +3398,7 @@ static void BattleIntroDrawTrainersOrMonsSprites(void)
|
||||
hpOnSwitchout = &gBattleStruct->hpOnSwitchout[GetBattlerSide(gActiveBattler)];
|
||||
*hpOnSwitchout = gBattleMons[gActiveBattler].hp;
|
||||
for (i = 0; i < NUM_BATTLE_STATS; i++)
|
||||
gBattleMons[gActiveBattler].statStages[i] = 6;
|
||||
gBattleMons[gActiveBattler].statStages[i] = DEFAULT_STAT_STAGE;
|
||||
gBattleMons[gActiveBattler].status2 = 0;
|
||||
}
|
||||
|
||||
@@ -4052,7 +4052,7 @@ void BattleTurnPassed(void)
|
||||
gRandomTurnNumber = Random();
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_PALACE)
|
||||
BattleScriptExecute(BattleScript_82DB881);
|
||||
BattleScriptExecute(BattleScript_PalacePrintFlavorText);
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_ARENA && gBattleStruct->arenaTurnCounter == 0)
|
||||
BattleScriptExecute(BattleScript_ArenaTurnBeginning);
|
||||
}
|
||||
@@ -5547,7 +5547,7 @@ static void HandleAction_UseItem(void)
|
||||
ClearFuryCutterDestinyBondGrudge(gBattlerAttacker);
|
||||
gLastUsedItem = gBattleBufferB[gBattlerAttacker][1] | (gBattleBufferB[gBattlerAttacker][2] << 8);
|
||||
|
||||
if (gLastUsedItem <= ITEM_PREMIER_BALL) // is ball
|
||||
if (gLastUsedItem <= LAST_BALL) // is ball
|
||||
{
|
||||
gBattlescriptCurrInstr = gBattlescriptsForBallThrow[gLastUsedItem];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user