mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +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;
|
||||
|
@ -12465,6 +12465,10 @@ static void Cmd_transformdataexecution(void)
|
||||
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