mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-14 15:43:43 +01:00
Looping battle script, correct message
Testing in Sword showed that the pop up should happen once if two mons are cured, and that the correct message is "X was cured of its poisoning!"
This commit is contained in:
parent
4668e11765
commit
d99fd30e4d
@ -8927,30 +8927,26 @@ BattleScript_DarkTypePreventsPrankster::
|
||||
orhalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_PastelVeilActivatesOld::
|
||||
call BattleScript_AbilityPopUp
|
||||
printfromtable gSwitchInAbilityStringIds
|
||||
curestatus BS_SCRIPTING
|
||||
updatestatusicon BS_SCRIPTING
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end3
|
||||
|
||||
BattleScript_PastelVeilActivates::
|
||||
call BattleScript_AbilityPopUp
|
||||
printfromtable gSwitchInAbilityStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
copybyte gBattlerTarget, gBattlerAttacker
|
||||
setbyte gBattleCommunication, 0
|
||||
setbyte gBattleCommunication + 1, 0
|
||||
BattleScript_PastelVeil_TryCurePoison:
|
||||
jumpifstatus BS_TARGET, STATUS1_POISON | STATUS1_TOXIC_POISON, BattleScript_PastelVeilCurePoison
|
||||
goto BattleScript_PastelVeilEnd
|
||||
goto BattleScript_PastelVeilLoopIncrement
|
||||
BattleScript_PastelVeilCurePoison:
|
||||
jumpifbyte CMP_NOT_EQUAL, gBattleCommunication + 1, 0x0, BattleScript_PastelVeilCurePoisonNoPopUp
|
||||
call BattleScript_AbilityPopUp
|
||||
setbyte gBattleCommunication + 1, 1
|
||||
BattleScript_PastelVeilCurePoisonNoPopUp: @ Only show Pastel Veil pop up once if it cures two mons
|
||||
printfromtable gSwitchInAbilityStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
curestatus BS_TARGET
|
||||
updatestatusicon BS_TARGET
|
||||
BattleScript_PastelVeilLoopIncrement:
|
||||
jumpifbyte CMP_NOT_EQUAL, gBattleCommunication, 0x0, BattleScript_PastelVeilEnd
|
||||
addbyte gBattleCommunication, 1
|
||||
jumpifnoally BS_TARGET, BattleScript_PastelVeilEnd
|
||||
setallytonexttarget BattleScript_PastelVeil_TryCurePoison
|
||||
goto BattleScript_MoveEnd
|
||||
goto BattleScript_PastelVeilEnd
|
||||
BattleScript_PastelVeilEnd:
|
||||
end3
|
||||
|
@ -724,7 +724,7 @@ static const u8 sText_ButPokemonCantUseTheMove[] = _("But {B_ATK_NAME_WITH_PREFI
|
||||
static const u8 sText_ButHoopaCantUseIt[] = _("But Hoopa can't use it\nthe way it is now!");
|
||||
static const u8 sText_BrokeThroughProtection[] = _("It broke through the\n{B_DEF_NAME_WITH_PREFIX}'s protection!");
|
||||
static const u8 sText_PastelVeilProtected[] = _("{B_DEF_NAME_WITH_PREFIX} is protected\nby a pastel veil!");
|
||||
static const u8 sText_PastelVeilEnters[] = _("{B_EFF_NAME_WITH_PREFIX}'s poisoning\nwas cured!");
|
||||
static const u8 sText_PastelVeilEnters[] = _("{B_DEF_NAME_WITH_PREFIX} was cured\nof its poisoning!");
|
||||
|
||||
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||
{
|
||||
|
@ -4064,19 +4064,10 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
case ABILITY_PASTEL_VEIL:
|
||||
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||
{
|
||||
u32 side = GetBattlerSide(battler);
|
||||
|
||||
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
|
||||
{
|
||||
if (IsBattlerAlive(i) && GetBattlerSide(i) == side
|
||||
&& (gBattleMons[i].status1 & STATUS1_POISON || gBattleMons[i].status1 & STATUS1_TOXIC_POISON))
|
||||
{
|
||||
gActiveBattler = gBattleScripting.battler = gEffectBattler = i;
|
||||
gBattlerTarget = battler;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SWITCHIN_PASTEL_VEIL;
|
||||
BattleScriptPushCursorAndCallback(BattleScript_PastelVeilActivates);
|
||||
effect++;
|
||||
}
|
||||
}
|
||||
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||
}
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user