Merge branch 'master' of https://github.com/pret/pokeemerald into ui-standardize
This commit is contained in:
@@ -1595,7 +1595,7 @@ u8 AI_TypeCalc(u16 move, u16 targetSpecies, u8 targetAbility)
|
||||
{
|
||||
s32 i = 0;
|
||||
u8 flags = 0;
|
||||
u8 type1 = gBaseStats[targetSpecies].type1, type2 = gBaseStats[targetSpecies].type2;
|
||||
u8 type1 = gSpeciesInfo[targetSpecies].types[0], type2 = gSpeciesInfo[targetSpecies].types[1];
|
||||
u8 moveType;
|
||||
|
||||
if (move == MOVE_STRUGGLE)
|
||||
@@ -3274,7 +3274,7 @@ static void Cmd_getexp(void)
|
||||
viaExpShare++;
|
||||
}
|
||||
|
||||
calculatedExp = gBaseStats[gBattleMons[gBattlerFainted].species].expYield * gBattleMons[gBattlerFainted].level / 7;
|
||||
calculatedExp = gSpeciesInfo[gBattleMons[gBattlerFainted].species].expYield * gBattleMons[gBattlerFainted].level / 7;
|
||||
|
||||
if (viaExpShare) // at least one mon is getting exp via exp share
|
||||
{
|
||||
@@ -4604,8 +4604,8 @@ static void Cmd_switchindataupdate(void)
|
||||
for (i = 0; i < sizeof(struct BattlePokemon); i++)
|
||||
monData[i] = gBattleBufferB[gActiveBattler][4 + i];
|
||||
|
||||
gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1;
|
||||
gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2;
|
||||
gBattleMons[gActiveBattler].type1 = gSpeciesInfo[gBattleMons[gActiveBattler].species].types[0];
|
||||
gBattleMons[gActiveBattler].type2 = gSpeciesInfo[gBattleMons[gActiveBattler].species].types[1];
|
||||
gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].abilityNum);
|
||||
|
||||
// check knocked off item
|
||||
@@ -5087,7 +5087,7 @@ static void Cmd_openpartyscreen(void)
|
||||
*(gBattleStruct->monToSwitchIntoId + gActiveBattler) = PARTY_SIZE;
|
||||
gBattleStruct->field_93 &= ~(gBitTable[gActiveBattler]);
|
||||
|
||||
BtlController_EmitChoosePokemon(BUFFER_A, hitmarkerFaintBits, *(gBattleStruct->monToSwitchIntoId + (gActiveBattler ^ 2)), ABILITY_NONE, gBattleStruct->battlerPartyOrders[gActiveBattler]);
|
||||
BtlController_EmitChoosePokemon(BUFFER_A, hitmarkerFaintBits, *(gBattleStruct->monToSwitchIntoId + BATTLE_PARTNER(gActiveBattler)), ABILITY_NONE, gBattleStruct->battlerPartyOrders[gActiveBattler]);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
|
||||
gBattlescriptCurrInstr += 6;
|
||||
@@ -5108,7 +5108,7 @@ static void Cmd_openpartyscreen(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
gActiveBattler = GetBattlerAtPosition(GetBattlerPosition(battlerId) ^ BIT_SIDE);
|
||||
gActiveBattler = GetBattlerAtPosition(BATTLE_OPPOSITE(GetBattlerPosition(battlerId)));
|
||||
if (gAbsentBattlerFlags & gBitTable[gActiveBattler])
|
||||
gActiveBattler ^= BIT_FLANK;
|
||||
|
||||
@@ -5164,9 +5164,9 @@ static void Cmd_switchhandleorder(void)
|
||||
*(gActiveBattler * 3 + (u8 *)(gBattleStruct->battlerPartyOrders) + 0) |= (gBattleBufferB[gActiveBattler][2] & 0xF0);
|
||||
*(gActiveBattler * 3 + (u8 *)(gBattleStruct->battlerPartyOrders) + 1) = gBattleBufferB[gActiveBattler][3];
|
||||
|
||||
*((gActiveBattler ^ BIT_FLANK) * 3 + (u8 *)(gBattleStruct->battlerPartyOrders) + 0) &= (0xF0);
|
||||
*((gActiveBattler ^ BIT_FLANK) * 3 + (u8 *)(gBattleStruct->battlerPartyOrders) + 0) |= (gBattleBufferB[gActiveBattler][2] & 0xF0) >> 4;
|
||||
*((gActiveBattler ^ BIT_FLANK) * 3 + (u8 *)(gBattleStruct->battlerPartyOrders) + 2) = gBattleBufferB[gActiveBattler][3];
|
||||
*((BATTLE_PARTNER(gActiveBattler)) * 3 + (u8 *)(gBattleStruct->battlerPartyOrders) + 0) &= (0xF0);
|
||||
*((BATTLE_PARTNER(gActiveBattler)) * 3 + (u8 *)(gBattleStruct->battlerPartyOrders) + 0) |= (gBattleBufferB[gActiveBattler][2] & 0xF0) >> 4;
|
||||
*((BATTLE_PARTNER(gActiveBattler)) * 3 + (u8 *)(gBattleStruct->battlerPartyOrders) + 2) = gBattleBufferB[gActiveBattler][3];
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER)
|
||||
{
|
||||
@@ -5226,7 +5226,7 @@ static void Cmd_switchineffects(void)
|
||||
else
|
||||
{
|
||||
// There is a hack here to ensure the truant counter will be 0 when the battler's next turn starts.
|
||||
// The truant counter is not updated in the case where a mon switches in after a lost judgement in the battle arena.
|
||||
// The truant counter is not updated in the case where a mon switches in after a lost judgment in the battle arena.
|
||||
if (gBattleMons[gActiveBattler].ability == ABILITY_TRUANT && !gDisableStructs[gActiveBattler].truantSwitchInHack)
|
||||
gDisableStructs[gActiveBattler].truantCounter = 1;
|
||||
|
||||
@@ -6233,7 +6233,7 @@ static void Cmd_hpthresholds(void)
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE))
|
||||
{
|
||||
gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
|
||||
opposingBattler = gActiveBattler ^ BIT_SIDE;
|
||||
opposingBattler = BATTLE_OPPOSITE(gActiveBattler);
|
||||
|
||||
result = gBattleMons[opposingBattler].hp * 100 / gBattleMons[opposingBattler].maxHP;
|
||||
if (result == 0)
|
||||
@@ -6261,7 +6261,7 @@ static void Cmd_hpthresholds2(void)
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE))
|
||||
{
|
||||
gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
|
||||
opposingBattler = gActiveBattler ^ BIT_SIDE;
|
||||
opposingBattler = BATTLE_OPPOSITE(gActiveBattler);
|
||||
hpSwitchout = *(gBattleStruct->hpOnSwitchout + GetBattlerSide(opposingBattler));
|
||||
result = (hpSwitchout - gBattleMons[opposingBattler].hp) * 100 / hpSwitchout;
|
||||
|
||||
@@ -6299,7 +6299,7 @@ static void Cmd_various(void)
|
||||
break;
|
||||
case VARIOUS_SET_MAGIC_COAT_TARGET:
|
||||
gBattlerAttacker = gBattlerTarget;
|
||||
side = GetBattlerSide(gBattlerAttacker) ^ BIT_SIDE;
|
||||
side = BATTLE_OPPOSITE(GetBattlerSide(gBattlerAttacker));
|
||||
if (gSideTimers[side].followmeTimer != 0 && gBattleMons[gSideTimers[side].followmeTarget].hp != 0)
|
||||
gBattlerTarget = gSideTimers[side].followmeTarget;
|
||||
else
|
||||
@@ -6368,7 +6368,10 @@ static void Cmd_various(void)
|
||||
break;
|
||||
case VARIOUS_ARENA_JUDGMENT_WINDOW:
|
||||
i = BattleArena_ShowJudgmentWindow(&gBattleCommunication[0]);
|
||||
if (i == 0)
|
||||
|
||||
// BattleArena_ShowJudgmentWindow's last state was an intermediate step.
|
||||
// Return without advancing the current instruction so that it will be called again.
|
||||
if (i == ARENA_RESULT_RUNNING)
|
||||
return;
|
||||
|
||||
gBattleCommunication[1] = i;
|
||||
@@ -6409,10 +6412,10 @@ static void Cmd_various(void)
|
||||
break;
|
||||
case VARIOUS_ARENA_JUDGMENT_STRING:
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gRefereeStringsTable[gBattlescriptCurrInstr[1]]);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGEMENT_TEXT);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGMENT_TEXT);
|
||||
break;
|
||||
case VARIOUS_ARENA_WAIT_STRING:
|
||||
if (IsTextPrinterActive(ARENA_WIN_JUDGEMENT_TEXT))
|
||||
if (IsTextPrinterActive(ARENA_WIN_JUDGMENT_TEXT))
|
||||
return;
|
||||
break;
|
||||
case VARIOUS_WAIT_CRY:
|
||||
@@ -7186,7 +7189,7 @@ static void Cmd_forcerandomswitch(void)
|
||||
monsCount = PARTY_SIZE / 2;
|
||||
minNeeded = 1;
|
||||
battler2PartyId = gBattlerPartyIndexes[gBattlerTarget];
|
||||
battler1PartyId = gBattlerPartyIndexes[gBattlerTarget ^ BIT_FLANK];
|
||||
battler1PartyId = gBattlerPartyIndexes[BATTLE_PARTNER(gBattlerTarget)];
|
||||
}
|
||||
else if ((gBattleTypeFlags & BATTLE_TYPE_MULTI && gBattleTypeFlags & BATTLE_TYPE_LINK)
|
||||
|| (gBattleTypeFlags & BATTLE_TYPE_MULTI && gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK))
|
||||
@@ -7204,7 +7207,7 @@ static void Cmd_forcerandomswitch(void)
|
||||
monsCount = PARTY_SIZE / 2;
|
||||
minNeeded = 1;
|
||||
battler2PartyId = gBattlerPartyIndexes[gBattlerTarget];
|
||||
battler1PartyId = gBattlerPartyIndexes[gBattlerTarget ^ BIT_FLANK];
|
||||
battler1PartyId = gBattlerPartyIndexes[BATTLE_PARTNER(gBattlerTarget)];
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS)
|
||||
{
|
||||
@@ -7231,7 +7234,7 @@ static void Cmd_forcerandomswitch(void)
|
||||
minNeeded = 1;
|
||||
}
|
||||
battler2PartyId = gBattlerPartyIndexes[gBattlerTarget];
|
||||
battler1PartyId = gBattlerPartyIndexes[gBattlerTarget ^ BIT_FLANK];
|
||||
battler1PartyId = gBattlerPartyIndexes[BATTLE_PARTNER(gBattlerTarget)];
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
|
||||
{
|
||||
@@ -7240,7 +7243,7 @@ static void Cmd_forcerandomswitch(void)
|
||||
monsCount = PARTY_SIZE;
|
||||
minNeeded = 2;
|
||||
battler2PartyId = gBattlerPartyIndexes[gBattlerTarget];
|
||||
battler1PartyId = gBattlerPartyIndexes[gBattlerTarget ^ BIT_FLANK];
|
||||
battler1PartyId = gBattlerPartyIndexes[BATTLE_PARTNER(gBattlerTarget)];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -7293,7 +7296,7 @@ static void Cmd_forcerandomswitch(void)
|
||||
|| (gBattleTypeFlags & BATTLE_TYPE_RECORDED_LINK && gBattleTypeFlags & BATTLE_TYPE_MULTI))
|
||||
{
|
||||
SwitchPartyOrderLinkMulti(gBattlerTarget, i, 0);
|
||||
SwitchPartyOrderLinkMulti(gBattlerTarget ^ BIT_FLANK, i, 1);
|
||||
SwitchPartyOrderLinkMulti(BATTLE_PARTNER(gBattlerTarget), i, 1);
|
||||
}
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER)
|
||||
@@ -7639,7 +7642,7 @@ static void Cmd_updatestatusicon(void)
|
||||
}
|
||||
if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE))
|
||||
{
|
||||
gActiveBattler = GetBattlerAtPosition(GetBattlerPosition(gBattlerAttacker) ^ BIT_FLANK);
|
||||
gActiveBattler = GetBattlerAtPosition(BATTLE_PARTNER(GetBattlerPosition(gBattlerAttacker)));
|
||||
if (!(gAbsentBattlerFlags & gBitTable[gActiveBattler]))
|
||||
{
|
||||
BtlController_EmitStatusIconUpdate(BUFFER_A, gBattleMons[gActiveBattler].status1, gBattleMons[gActiveBattler].status2);
|
||||
@@ -8307,7 +8310,7 @@ static void Cmd_healpartystatus(void)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] |= B_MSG_BELL_SOUNDPROOF_ATTACKER;
|
||||
}
|
||||
|
||||
gActiveBattler = gBattleScripting.battler = GetBattlerAtPosition(GetBattlerPosition(gBattlerAttacker) ^ BIT_FLANK);
|
||||
gActiveBattler = gBattleScripting.battler = GetBattlerAtPosition(BATTLE_PARTNER(GetBattlerPosition(gBattlerAttacker)));
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE
|
||||
&& !(gAbsentBattlerFlags & gBitTable[gActiveBattler]))
|
||||
@@ -8357,7 +8360,7 @@ static void Cmd_healpartystatus(void)
|
||||
gBattleMons[gBattlerAttacker].status1 = 0;
|
||||
gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_NIGHTMARE;
|
||||
|
||||
gActiveBattler = GetBattlerAtPosition(GetBattlerPosition(gBattlerAttacker) ^ BIT_FLANK);
|
||||
gActiveBattler = GetBattlerAtPosition(BATTLE_PARTNER(GetBattlerPosition(gBattlerAttacker)));
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE
|
||||
&& !(gAbsentBattlerFlags & gBitTable[gActiveBattler]))
|
||||
{
|
||||
@@ -8396,7 +8399,7 @@ static void Cmd_cursetarget(void)
|
||||
|
||||
static void Cmd_trysetspikes(void)
|
||||
{
|
||||
u8 targetSide = GetBattlerSide(gBattlerAttacker) ^ BIT_SIDE;
|
||||
u8 targetSide = BATTLE_OPPOSITE(GetBattlerSide(gBattlerAttacker));
|
||||
|
||||
if (gSideTimers[targetSide].spikesAmount == 3)
|
||||
{
|
||||
@@ -8517,7 +8520,7 @@ static void Cmd_friendshiptodamagecalculation(void)
|
||||
if (gBattleMoves[gCurrentMove].effect == EFFECT_RETURN)
|
||||
gDynamicBasePower = 10 * (gBattleMons[gBattlerAttacker].friendship) / 25;
|
||||
else // EFFECT_FRUSTRATION
|
||||
gDynamicBasePower = 10 * (255 - gBattleMons[gBattlerAttacker].friendship) / 25;
|
||||
gDynamicBasePower = 10 * (MAX_FRIENDSHIP - gBattleMons[gBattlerAttacker].friendship) / 25;
|
||||
|
||||
gBattlescriptCurrInstr++;
|
||||
}
|
||||
@@ -8885,10 +8888,10 @@ static void Cmd_trydobeatup(void)
|
||||
|
||||
gBattlescriptCurrInstr += 9;
|
||||
|
||||
gBattleMoveDamage = gBaseStats[GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES)].baseAttack;
|
||||
gBattleMoveDamage = gSpeciesInfo[GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES)].baseAttack;
|
||||
gBattleMoveDamage *= gBattleMoves[gCurrentMove].power;
|
||||
gBattleMoveDamage *= (GetMonData(&party[gBattleCommunication[0]], MON_DATA_LEVEL) * 2 / 5 + 2);
|
||||
gBattleMoveDamage /= gBaseStats[gBattleMons[gBattlerTarget].species].baseDefense;
|
||||
gBattleMoveDamage /= gSpeciesInfo[gBattleMons[gBattlerTarget].species].baseDefense;
|
||||
gBattleMoveDamage = (gBattleMoveDamage / 50) + 2;
|
||||
if (gProtectStructs[gBattlerAttacker].helpingHand)
|
||||
gBattleMoveDamage = gBattleMoveDamage * 15 / 10;
|
||||
@@ -9065,7 +9068,7 @@ static void Cmd_settaunt(void)
|
||||
|
||||
static void Cmd_trysethelpinghand(void)
|
||||
{
|
||||
gBattlerTarget = GetBattlerAtPosition(GetBattlerPosition(gBattlerAttacker) ^ BIT_FLANK);
|
||||
gBattlerTarget = GetBattlerAtPosition(BATTLE_PARTNER(GetBattlerPosition(gBattlerAttacker)));
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE
|
||||
&& !(gAbsentBattlerFlags & gBitTable[gBattlerTarget])
|
||||
@@ -9565,9 +9568,9 @@ static void Cmd_pickup(void)
|
||||
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
|
||||
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM))
|
||||
ability = gBaseStats[species].abilities[1];
|
||||
ability = gSpeciesInfo[species].abilities[1];
|
||||
else
|
||||
ability = gBaseStats[species].abilities[0];
|
||||
ability = gSpeciesInfo[species].abilities[0];
|
||||
|
||||
if (ability == ABILITY_PICKUP
|
||||
&& species != SPECIES_NONE
|
||||
@@ -9588,9 +9591,9 @@ static void Cmd_pickup(void)
|
||||
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
|
||||
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM))
|
||||
ability = gBaseStats[species].abilities[1];
|
||||
ability = gSpeciesInfo[species].abilities[1];
|
||||
else
|
||||
ability = gBaseStats[species].abilities[0];
|
||||
ability = gSpeciesInfo[species].abilities[0];
|
||||
|
||||
if (ability == ABILITY_PICKUP
|
||||
&& species != SPECIES_NONE
|
||||
@@ -9742,7 +9745,7 @@ static void Cmd_settypetoterrain(void)
|
||||
// Unused
|
||||
static void Cmd_pursuitdoubles(void)
|
||||
{
|
||||
gActiveBattler = GetBattlerAtPosition(GetBattlerPosition(gBattlerAttacker) ^ BIT_FLANK);
|
||||
gActiveBattler = GetBattlerAtPosition(BATTLE_PARTNER(GetBattlerPosition(gBattlerAttacker)));
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE
|
||||
&& !(gAbsentBattlerFlags & gBitTable[gActiveBattler])
|
||||
@@ -9778,7 +9781,7 @@ static void Cmd_snatchsetbattlers(void)
|
||||
// Brick Break
|
||||
static void Cmd_removelightscreenreflect(void)
|
||||
{
|
||||
u8 opposingSide = GetBattlerSide(gBattlerAttacker) ^ BIT_SIDE;
|
||||
u8 opposingSide = BATTLE_OPPOSITE(GetBattlerSide(gBattlerAttacker));
|
||||
|
||||
if (gSideTimers[opposingSide].reflectTimer || gSideTimers[opposingSide].lightscreenTimer)
|
||||
{
|
||||
@@ -9806,7 +9809,7 @@ static void Cmd_handleballthrow(void)
|
||||
return;
|
||||
|
||||
gActiveBattler = gBattlerAttacker;
|
||||
gBattlerTarget = gBattlerAttacker ^ BIT_SIDE;
|
||||
gBattlerTarget = BATTLE_OPPOSITE(gBattlerAttacker);
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER)
|
||||
{
|
||||
@@ -9828,7 +9831,7 @@ static void Cmd_handleballthrow(void)
|
||||
if (gLastUsedItem == ITEM_SAFARI_BALL)
|
||||
catchRate = gBattleStruct->safariCatchFactor * 1275 / 100;
|
||||
else
|
||||
catchRate = gBaseStats[gBattleMons[gBattlerTarget].species].catchRate;
|
||||
catchRate = gSpeciesInfo[gBattleMons[gBattlerTarget].species].catchRate;
|
||||
|
||||
if (gLastUsedItem > ITEM_SAFARI_BALL)
|
||||
{
|
||||
@@ -9948,18 +9951,18 @@ static void Cmd_handleballthrow(void)
|
||||
|
||||
static void Cmd_givecaughtmon(void)
|
||||
{
|
||||
if (GiveMonToPlayer(&gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker ^ BIT_SIDE]]) != MON_GIVEN_TO_PARTY)
|
||||
if (GiveMonToPlayer(&gEnemyParty[gBattlerPartyIndexes[BATTLE_OPPOSITE(gBattlerAttacker)]]) != MON_GIVEN_TO_PARTY)
|
||||
{
|
||||
if (!ShouldShowBoxWasFullMessage())
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SENT_SOMEONES_PC;
|
||||
StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_PC_BOX_TO_SEND_MON)));
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker ^ BIT_SIDE]], MON_DATA_NICKNAME, gStringVar2);
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[BATTLE_OPPOSITE(gBattlerAttacker)]], MON_DATA_NICKNAME, gStringVar2);
|
||||
}
|
||||
else
|
||||
{
|
||||
StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_PC_BOX_TO_SEND_MON))); // box the mon was sent to
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker ^ BIT_SIDE]], MON_DATA_NICKNAME, gStringVar2);
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[BATTLE_OPPOSITE(gBattlerAttacker)]], MON_DATA_NICKNAME, gStringVar2);
|
||||
StringCopy(gStringVar3, GetBoxNamePtr(GetPCBoxToSendMon())); //box the mon was going to be sent to
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SOMEONES_BOX_FULL;
|
||||
}
|
||||
@@ -9969,9 +9972,9 @@ static void Cmd_givecaughtmon(void)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER]++;
|
||||
}
|
||||
|
||||
gBattleResults.caughtMonSpecies = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker ^ BIT_SIDE]], MON_DATA_SPECIES, NULL);
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker ^ BIT_SIDE]], MON_DATA_NICKNAME, gBattleResults.caughtMonNick);
|
||||
gBattleResults.caughtMonBall = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker ^ BIT_SIDE]], MON_DATA_POKEBALL, NULL);
|
||||
gBattleResults.caughtMonSpecies = GetMonData(&gEnemyParty[gBattlerPartyIndexes[BATTLE_OPPOSITE(gBattlerAttacker)]], MON_DATA_SPECIES, NULL);
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[BATTLE_OPPOSITE(gBattlerAttacker)]], MON_DATA_NICKNAME, gBattleResults.caughtMonNick);
|
||||
gBattleResults.caughtMonBall = GetMonData(&gEnemyParty[gBattlerPartyIndexes[BATTLE_OPPOSITE(gBattlerAttacker)]], MON_DATA_POKEBALL, NULL);
|
||||
|
||||
gBattlescriptCurrInstr++;
|
||||
}
|
||||
@@ -10159,13 +10162,13 @@ static void Cmd_trygivecaughtmonnick(void)
|
||||
case 2:
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker ^ BIT_SIDE]], MON_DATA_NICKNAME, gBattleStruct->caughtMonNick);
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[BATTLE_OPPOSITE(gBattlerAttacker)]], MON_DATA_NICKNAME, gBattleStruct->caughtMonNick);
|
||||
FreeAllWindowBuffers();
|
||||
|
||||
DoNamingScreen(NAMING_SCREEN_CAUGHT_MON, gBattleStruct->caughtMonNick,
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker ^ BIT_SIDE]], MON_DATA_SPECIES),
|
||||
GetMonGender(&gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker ^ BIT_SIDE]]),
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker ^ BIT_SIDE]], MON_DATA_PERSONALITY, NULL),
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[BATTLE_OPPOSITE(gBattlerAttacker)]], MON_DATA_SPECIES),
|
||||
GetMonGender(&gEnemyParty[gBattlerPartyIndexes[BATTLE_OPPOSITE(gBattlerAttacker)]]),
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[BATTLE_OPPOSITE(gBattlerAttacker)]], MON_DATA_PERSONALITY, NULL),
|
||||
BattleMainCB2);
|
||||
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
@@ -10174,7 +10177,7 @@ static void Cmd_trygivecaughtmonnick(void)
|
||||
case 3:
|
||||
if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active)
|
||||
{
|
||||
SetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker ^ BIT_SIDE]], MON_DATA_NICKNAME, gBattleStruct->caughtMonNick);
|
||||
SetMonData(&gEnemyParty[gBattlerPartyIndexes[BATTLE_OPPOSITE(gBattlerAttacker)]], MON_DATA_NICKNAME, gBattleStruct->caughtMonNick);
|
||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user