Toxic Spikes print whether the target is poisoned or badly poisoned (#6814)
This commit is contained in:
parent
8d5d7c7fca
commit
f4f82f2394
@ -6223,6 +6223,14 @@ BattleScript_ToxicSpikesPoisoned::
|
||||
waitstate
|
||||
return
|
||||
|
||||
BattleScript_ToxicSpikesBadlyPoisoned::
|
||||
printstring STRINGID_TOXICSPIKESBADLYPOISONED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
statusanimation BS_SCRIPTING
|
||||
updatestatusicon BS_SCRIPTING
|
||||
waitstate
|
||||
return
|
||||
|
||||
BattleScript_StickyWebOnSwitchIn::
|
||||
savetarget
|
||||
saveattacker
|
||||
|
||||
@ -286,6 +286,7 @@ extern const u8 BattleScript_BadDreamsActivates[];
|
||||
extern const u8 BattleScript_SwitchInAbilityMsg[];
|
||||
extern const u8 BattleScript_SwitchInAbilityMsgRet[];
|
||||
extern const u8 BattleScript_ToxicSpikesPoisoned[];
|
||||
extern const u8 BattleScript_ToxicSpikesBadlyPoisoned[];
|
||||
extern const u8 BattleScript_ToxicSpikesAbsorbed[];
|
||||
extern const u8 BattleScript_StickyWebOnSwitchIn[];
|
||||
extern const u8 BattleScript_SolarPowerActivates[];
|
||||
|
||||
@ -729,8 +729,9 @@
|
||||
#define STRINGID_ITDOESNTAFFECTTWOFOES 727
|
||||
#define STRINGID_SENDCAUGHTMONPARTYORBOX 728
|
||||
#define STRINGID_PKMNSENTTOPCAFTERCATCH 729
|
||||
#define STRINGID_TOXICSPIKESBADLYPOISONED 730
|
||||
|
||||
#define BATTLESTRINGS_COUNT 730
|
||||
#define BATTLESTRINGS_COUNT 731
|
||||
|
||||
// This is the string id that gBattleStringsTable starts with.
|
||||
// String ids before this (e.g. STRINGID_INTROMSG) are not in the table,
|
||||
|
||||
@ -638,6 +638,7 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||
[STRINGID_STEALTHROCKDMG] = COMPOUND_STRING("Pointed stones dug into {B_SCR_NAME_WITH_PREFIX2}!"),
|
||||
[STRINGID_TOXICSPIKESABSORBED] = COMPOUND_STRING("The poison spikes disappeared from the ground around {B_SCR_TEAM2} team!"),
|
||||
[STRINGID_TOXICSPIKESPOISONED] = COMPOUND_STRING("{B_SCR_NAME_WITH_PREFIX} was poisoned!"),
|
||||
[STRINGID_TOXICSPIKESBADLYPOISONED] = COMPOUND_STRING("{B_SCR_NAME_WITH_PREFIX} was badly poisoned!"),
|
||||
[STRINGID_STICKYWEBSWITCHIN] = COMPOUND_STRING("{B_SCR_NAME_WITH_PREFIX} was caught in a sticky web!"),
|
||||
[STRINGID_HEALINGWISHCAMETRUE] = COMPOUND_STRING("The healing wish came true for {B_ATK_NAME_WITH_PREFIX2}!"),
|
||||
[STRINGID_HEALINGWISHHEALED] = COMPOUND_STRING("{B_ATK_NAME_WITH_PREFIX} regained health!"),
|
||||
|
||||
@ -8253,8 +8253,11 @@ static bool32 DoSwitchInEffectsForBattler(u32 battler)
|
||||
i = GetBattlerAbility(battler);
|
||||
if (CanBePoisoned(gBattlerAttacker, battler, i))
|
||||
{
|
||||
if (gSideTimers[GetBattlerSide(battler)].toxicSpikesAmount >= 2)
|
||||
u32 tspikes = 0;
|
||||
if (gSideTimers[GetBattlerSide(battler)].toxicSpikesAmount >= 2) {
|
||||
tspikes = 1;
|
||||
gBattleMons[battler].status1 |= STATUS1_TOXIC_POISON;
|
||||
}
|
||||
else
|
||||
gBattleMons[battler].status1 |= STATUS1_POISON;
|
||||
|
||||
@ -8262,7 +8265,10 @@ static bool32 DoSwitchInEffectsForBattler(u32 battler)
|
||||
MarkBattlerForControllerExec(battler);
|
||||
gBattleScripting.battler = battler;
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_ToxicSpikesPoisoned;
|
||||
if (tspikes == 0)
|
||||
gBattlescriptCurrInstr = BattleScript_ToxicSpikesPoisoned;
|
||||
else
|
||||
gBattlescriptCurrInstr = BattleScript_ToxicSpikesBadlyPoisoned;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -235,3 +235,34 @@ SINGLE_BATTLE_TEST("Toxic Spikes inflicts poison on switch in after Primal Rever
|
||||
STATUS_ICON(player, poison: TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Toxic Spikes print normal poison for 1 layer")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WYNAUT);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_TOXIC_SPIKES); }
|
||||
TURN { SWITCH(opponent, 1); }
|
||||
TURN {}
|
||||
} SCENE {
|
||||
MESSAGE("The opposing Wynaut was poisoned!");
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Toxic Spikes print bad poison for 2 layers")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WYNAUT);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_TOXIC_SPIKES); }
|
||||
TURN { MOVE(player, MOVE_TOXIC_SPIKES); }
|
||||
TURN { SWITCH(opponent, 1); }
|
||||
TURN {}
|
||||
} SCENE {
|
||||
MESSAGE("The opposing Wynaut was badly poisoned!");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user