mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-25 11:14:15 +01:00
Transform updates AI_PARTY data (#3295)
* Cmd_transformdataexecution overwrite AI_PARTY data * remove whitespace * add RecordAllMoves --------- Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
This commit is contained in:
parent
662dd7d2c6
commit
b77dec1234
@ -14,6 +14,7 @@ bool32 BattlerHasAi(u32 battlerId);
|
||||
bool32 IsAiBattlerAware(u32 battlerId);
|
||||
void ClearBattlerMoveHistory(u8 battlerId);
|
||||
void RecordLastUsedMoveBy(u32 battlerId, u32 move);
|
||||
void RecordAllMoves(u32 battler);
|
||||
void RecordKnownMove(u8 battlerId, u32 move);
|
||||
void RecordAbilityBattle(u8 battlerId, u16 abilityId);
|
||||
void ClearBattlerAbilityHistory(u8 battlerId);
|
||||
|
@ -507,6 +507,11 @@ void RecordKnownMove(u8 battlerId, u32 move)
|
||||
}
|
||||
}
|
||||
|
||||
void RecordAllMoves(u32 battler)
|
||||
{
|
||||
memcpy(AI_PARTY->mons[GetBattlerSide(battler)][gBattlerPartyIndexes[battler]].moves, gBattleMons[battler].moves, MAX_MON_MOVES * sizeof(u16));
|
||||
}
|
||||
|
||||
void RecordAbilityBattle(u8 battlerId, u16 abilityId)
|
||||
{
|
||||
BATTLE_HISTORY->abilities[battlerId] = abilityId;
|
||||
|
@ -12439,7 +12439,7 @@ static void Cmd_transformdataexecution(void)
|
||||
{
|
||||
s32 i;
|
||||
u8 *battleMonAttacker, *battleMonTarget;
|
||||
|
||||
|
||||
gBattleMons[gBattlerAttacker].status2 |= STATUS2_TRANSFORMED;
|
||||
gDisableStructs[gBattlerAttacker].disabledMove = MOVE_NONE;
|
||||
gDisableStructs[gBattlerAttacker].disableTimer = 0;
|
||||
@ -12464,7 +12464,11 @@ static void Cmd_transformdataexecution(void)
|
||||
else
|
||||
gBattleMons[gBattlerAttacker].pp[i] = 5;
|
||||
}
|
||||
|
||||
|
||||
// update AI knowledge
|
||||
RecordAllMoves(gBattlerAttacker);
|
||||
RecordAbilityBattle(gBattlerAttacker, gBattleMons[gBattlerAttacker].ability);
|
||||
|
||||
BtlController_EmitResetActionMoveSelection(gBattlerAttacker, BUFFER_A, RESET_MOVE_SELECTION);
|
||||
MarkBattlerForControllerExec(gBattlerAttacker);
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_TRANSFORMED;
|
||||
|
Loading…
Reference in New Issue
Block a user