mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Sprites and fixes
This commit is contained in:
parent
c3e31af5f3
commit
c3a8edae32
BIN
graphics/battle_interface/burst_trigger.png
Normal file
BIN
graphics/battle_interface/burst_trigger.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 314 B |
@ -677,8 +677,8 @@ static const struct SpriteTemplate sSpriteTemplate_MegaTrigger =
|
||||
.callback = SpriteCb_MegaTrigger
|
||||
};
|
||||
|
||||
static const u8 ALIGNED(4) sBurstTriggerGfx[] = INCBIN_U8("graphics/battle_interface/mega_trigger.4bpp");
|
||||
static const u16 sBurstTriggerPal[] = INCBIN_U16("graphics/battle_interface/mega_trigger.gbapal");
|
||||
static const u8 ALIGNED(4) sBurstTriggerGfx[] = INCBIN_U8("graphics/battle_interface/burst_trigger.4bpp");
|
||||
static const u16 sBurstTriggerPal[] = INCBIN_U16("graphics/battle_interface/burst_trigger.gbapal");
|
||||
|
||||
static const struct SpriteSheet sSpriteSheet_BurstTrigger =
|
||||
{
|
||||
|
@ -4438,9 +4438,9 @@ static void HandleTurnActionSelectionState(void)
|
||||
RecordedBattle_SetBattlerAction(gActiveBattler, gBattleResources->bufferB[gActiveBattler][2]);
|
||||
RecordedBattle_SetBattlerAction(gActiveBattler, gBattleResources->bufferB[gActiveBattler][3]);
|
||||
}
|
||||
gBattleStruct->chosenMovePositions[gActiveBattler] = gBattleResources->bufferB[gActiveBattler][2] & ~(RET_MEGA_EVOLUTION | RET_ULTRA_BURST);
|
||||
gChosenMoveByBattler[gActiveBattler] = gBattleMons[gActiveBattler].moves[gBattleStruct->chosenMovePositions[gActiveBattler]];
|
||||
gBattleStruct->moveTarget[gActiveBattler] = gBattleResources->bufferB[gActiveBattler][3];
|
||||
*(gBattleStruct->chosenMovePositions + gActiveBattler) = gBattleResources->bufferB[gActiveBattler][2] & ~(RET_MEGA_EVOLUTION | RET_ULTRA_BURST);
|
||||
gChosenMoveByBattler[gActiveBattler] = gBattleMons[gActiveBattler].moves[*(gBattleStruct->chosenMovePositions + gActiveBattler)];
|
||||
*(gBattleStruct->moveTarget + gActiveBattler) = gBattleResources->bufferB[gActiveBattler][3];
|
||||
if (gBattleResources->bufferB[gActiveBattler][2] & RET_MEGA_EVOLUTION)
|
||||
gBattleStruct->mega.toEvolve |= gBitTable[gActiveBattler];
|
||||
else if (gBattleResources->bufferB[gActiveBattler][2] & RET_ULTRA_BURST)
|
||||
|
@ -8628,6 +8628,8 @@ static void HandleScriptMegaPrimalBurst(u32 caseId, u32 battlerId, u32 type)
|
||||
SetBattlerShadowSpriteCallback(battlerId, gBattleMons[battlerId].species);
|
||||
if (type == 0)
|
||||
gBattleStruct->mega.alreadyEvolved[position] = TRUE;
|
||||
if (type == 2)
|
||||
gBattleStruct->burst.alreadyBursted[position] = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10036,7 +10036,28 @@ bool32 CanUltraBurst(u8 battlerId)
|
||||
struct Pokemon *mon;
|
||||
u8 battlerPosition = GetBattlerPosition(battlerId);
|
||||
u8 partnerPosition = GetBattlerPosition(BATTLE_PARTNER(battlerId));
|
||||
struct UltraBurstData *burst = &(((struct ChooseMoveStruct *)(&gBattleResources->bufferA[gActiveBattler][4]))->burst);
|
||||
|
||||
// Check if Player has a Z Ring
|
||||
if ((GetBattlerPosition(battlerId) == B_POSITION_PLAYER_LEFT || (!(gBattleTypeFlags & BATTLE_TYPE_MULTI) && GetBattlerPosition(battlerId) == B_POSITION_PLAYER_RIGHT))
|
||||
&& !CheckBagHasItem(ITEM_Z_POWER_RING, 1))
|
||||
return FALSE;
|
||||
|
||||
// Check if trainer already ultra bursted a pokemon.
|
||||
if (gBattleStruct->burst.alreadyBursted[battlerPosition])
|
||||
return FALSE;
|
||||
|
||||
// Cannot use z move and ultra burst on same turn
|
||||
if (gBattleStruct->zmove.toBeUsed[battlerId])
|
||||
return FALSE;
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE
|
||||
&& IsPartnerMonFromSameTrainer(battlerId)
|
||||
&& (gBattleStruct->burst.alreadyBursted[partnerPosition] || (gBattleStruct->burst.toBurst & gBitTable[BATTLE_PARTNER(battlerId)])))
|
||||
return FALSE;
|
||||
|
||||
// Check if mon is currently held by Sky Drop
|
||||
if (gStatuses3[battlerId] & STATUS3_SKY_DROPPED)
|
||||
return FALSE;
|
||||
|
||||
// Gets mon data.
|
||||
if (GetBattlerSide(battlerId) == B_SIDE_OPPONENT)
|
||||
|
Loading…
Reference in New Issue
Block a user