mirror of
https://github.com/rh-hideout/pokeemerald-expansion.git
synced 2026-04-27 02:37:04 -05:00
Update battle_script_commands.c
This commit is contained in:
parent
27ddd0145c
commit
2804c9ee1d
|
|
@ -8537,23 +8537,8 @@ static void Cmd_transformdataexecution(void)
|
||||||
battleMonAttacker = &gBattleMons[gBattlerAttacker];
|
battleMonAttacker = &gBattleMons[gBattlerAttacker];
|
||||||
battleMonTarget = &gBattleMons[gBattlerTarget];
|
battleMonTarget = &gBattleMons[gBattlerTarget];
|
||||||
|
|
||||||
battleMonAttacker->species = battleMonTarget->species;
|
// Fields before pp are copied by Transform. Keep new transformable fields above pp.
|
||||||
battleMonAttacker->attack = battleMonTarget->attack;
|
memcpy(battleMonAttacker, battleMonTarget, offsetof(struct BattlePokemon, pp));
|
||||||
battleMonAttacker->defense = battleMonTarget->defense;
|
|
||||||
battleMonAttacker->speed = battleMonTarget->speed;
|
|
||||||
battleMonAttacker->spAttack = battleMonTarget->spAttack;
|
|
||||||
battleMonAttacker->spDefense = battleMonTarget->spDefense;
|
|
||||||
memcpy(battleMonAttacker->moves, battleMonTarget->moves, sizeof(battleMonAttacker->moves));
|
|
||||||
battleMonAttacker->hpIV = battleMonTarget->hpIV;
|
|
||||||
battleMonAttacker->attackIV = battleMonTarget->attackIV;
|
|
||||||
battleMonAttacker->defenseIV = battleMonTarget->defenseIV;
|
|
||||||
battleMonAttacker->speedIV = battleMonTarget->speedIV;
|
|
||||||
battleMonAttacker->spAttackIV = battleMonTarget->spAttackIV;
|
|
||||||
battleMonAttacker->spDefenseIV = battleMonTarget->spDefenseIV;
|
|
||||||
battleMonAttacker->abilityNum = battleMonTarget->abilityNum;
|
|
||||||
memcpy(battleMonAttacker->statStages, battleMonTarget->statStages, sizeof(battleMonAttacker->statStages));
|
|
||||||
battleMonAttacker->ability = battleMonTarget->ability;
|
|
||||||
memcpy(battleMonAttacker->types, battleMonTarget->types, sizeof(battleMonAttacker->types));
|
|
||||||
|
|
||||||
gBattleMons[gBattlerAttacker].volatiles.overwrittenAbility = GetBattlerAbility(gBattlerTarget);
|
gBattleMons[gBattlerAttacker].volatiles.overwrittenAbility = GetBattlerAbility(gBattlerTarget);
|
||||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user