Octolock, more tests

This commit is contained in:
Alex 2023-10-18 20:25:34 +02:00
parent 6ed8ab771b
commit 91b6722322
11 changed files with 169 additions and 125 deletions

View file

@ -1366,6 +1366,12 @@
.byte \battler
.endm
.macro setoctolock battler:req, failInstr:req
callnative BS_Octolock
.byte \battler
.4byte \failInstr
.endm
.macro setzeffect
callnative BS_SetZEffect
.endm
@ -2044,11 +2050,6 @@
.4byte \failInstr
.endm
.macro setoctolock battler:req, failInstr:req
various \battler, VARIOUS_SET_OCTOLOCK
.4byte \failInstr
.endm
.macro cutonethirdhpraisestats failInstr:req
various BS_ATTACKER, VARIOUS_CUT_1_3_HP_RAISE_STATS
.4byte \failInstr

View file

@ -437,7 +437,6 @@ gBattleScriptsForMoveEffects::
.4byte BattleScript_EffectMortalSpin @ EFFECT_MORTAL_SPIN
.4byte BattleScript_EffectHit @ EFFECT_GIGATON_HAMMER
.4byte BattleScript_EffectSaltCure @ EFFECT_SALT_CURE
.4byte BattleScript_EffectMatchaGotcha @ EFFECT_MATCHA_GOTCHA
.4byte BattleScript_EffectSyrupBomb @ EFFECT_SYRUP_BOMB
.4byte BattleScript_EffectHit @ EFFECT_IVY_CUDGEL
@ -447,17 +446,17 @@ BattleScript_EffectSyrupBomb::
call BattleScript_EffectHit_Ret
seteffectwithchance
tryfaintmon BS_TARGET
goto BattleScript_MoveEnd
BattleScript_SyrupBombActivates::
printstring STRINGID_TARGETCOVEREDINSTICKYCANDYSYRUP
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
return
BattleScript_SyrupBombEndTurn::
playstatchangeanimation BS_ATTACKER, BIT_SPEED, STAT_CHANGE_NEGATIVE
setstatchanger STAT_SPEED, 1, TRUE
statbuffchange STAT_CHANGE_ALLOW_PTR | STAT_CHANGE_NOT_PROTECT_AFFECTED, BattleScript_SyrupBombTurnDmgEnd
BattleScript_SyrupBombTurnDmgPrintMsg:
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 3, BattleScript_SyrupBombTurnDmgEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 4, BattleScript_SyrupBombTurnDmgEnd
printfromtable gStatDownStringIds
waitmessage B_WAIT_TIME_LONG
BattleScript_SyrupBombTurnDmgEnd:
@ -1068,18 +1067,14 @@ BattleScript_EffectOctolock:
BattleScript_OctolockEndTurn::
playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_SPDEF, STAT_CHANGE_NEGATIVE
setstatchanger STAT_DEF, 1, TRUE
statbuffchange STAT_CHANGE_ALLOW_PTR | STAT_CHANGE_NOT_PROTECT_AFFECTED, BattleScript_OctolockTryLowerDef
statbuffchange STAT_CHANGE_ALLOW_PTR | STAT_CHANGE_NOT_PROTECT_AFFECTED, BattleScript_OctolockTryLowerSpDef
BattleScript_OctolockTryLowerDef:
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 3, BattleScript_OctolockTryLowerSpDef
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 4, BattleScript_OctolockTryLowerSpDef
printfromtable gStatDownStringIds
waitmessage B_WAIT_TIME_LONG
BattleScript_OctolockTryLowerSpDef:
setstatchanger STAT_SPDEF, 1, TRUE
statbuffchange STAT_CHANGE_ALLOW_PTR | STAT_CHANGE_NOT_PROTECT_AFFECTED, BattleScript_OctolockTurnDmgPrintMsg
statbuffchange STAT_CHANGE_ALLOW_PTR | STAT_CHANGE_NOT_PROTECT_AFFECTED, BattleScript_OctlockTurnDmgEnd
BattleScript_OctolockTurnDmgPrintMsg:
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 3, BattleScript_OctlockTurnDmgEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 4, BattleScript_OctlockTurnDmgEnd
printfromtable gStatDownStringIds
waitmessage B_WAIT_TIME_LONG
BattleScript_OctlockTurnDmgEnd:
@ -8597,7 +8592,7 @@ BattleScript_IntimidatePrevented:
pause B_WAIT_TIME_LONG
setbyte gBattleCommunication STAT_ATK
stattextbuffer BS_TARGET
printstring STRINGID_STATWASNOTLOWERED
printstring STRINGID_PKMNPREVENTSSTATLOSSWITH
waitmessage B_WAIT_TIME_LONG
call BattleScript_TryAdrenalineOrb
goto BattleScript_IntimidateLoopIncrement
@ -8908,7 +8903,7 @@ BattleScript_AbilityNoStatLoss::
BattleScript_ItemNoStatLoss::
pause B_WAIT_TIME_SHORT
printstring STRINGID_STATWASNOTLOWERED
printstring STRINGID_CLEARAMULETWONTLOWERSTATS
waitmessage B_WAIT_TIME_LONG
return

View file

@ -480,6 +480,7 @@ extern const u8 BattleScript_SelectingNotAllowedCurrentMove[];
extern const u8 BattleScript_SelectingNotAllowedCurrentMoveInPalace[];
extern const u8 BattleScript_SaltCureExtraDamage[];
extern const u8 BattleScript_SyrupBombEndTurn[];
extern const u8 BattleScript_SyrupBombActivates[];
// zmoves
extern const u8 BattleScript_ZMoveActivateDamaging[];

View file

@ -221,34 +221,33 @@
#define VARIOUS_TRY_TAR_SHOT 128
#define VARIOUS_CAN_TAR_SHOT_WORK 129
#define VARIOUS_CHECK_POLTERGEIST 130
#define VARIOUS_SET_OCTOLOCK 131
#define VARIOUS_CUT_1_3_HP_RAISE_STATS 132
#define VARIOUS_TRY_END_NEUTRALIZING_GAS 133
#define VARIOUS_JUMP_IF_UNDER_200 134
#define VARIOUS_SET_SKY_DROP 135
#define VARIOUS_CLEAR_SKY_DROP 136
#define VARIOUS_SKY_DROP_YAWN 137
#define VARIOUS_JUMP_IF_HOLD_EFFECT 138
#define VARIOUS_CURE_CERTAIN_STATUSES 139
#define VARIOUS_TRY_RESET_NEGATIVE_STAT_STAGES 140
#define VARIOUS_JUMP_IF_LAST_USED_ITEM_BERRY 141
#define VARIOUS_JUMP_IF_LAST_USED_ITEM_HOLD_EFFECT 142
#define VARIOUS_SAVE_BATTLER_ITEM 143
#define VARIOUS_RESTORE_BATTLER_ITEM 144
#define VARIOUS_BATTLER_ITEM_TO_LAST_USED_ITEM 145
#define VARIOUS_SET_BEAK_BLAST 146
#define VARIOUS_SWAP_SIDE_STATUSES 147
#define VARIOUS_SWAP_STATS 148
#define VARIOUS_TEATIME_INVUL 149
#define VARIOUS_TEATIME_TARGETS 150
#define VARIOUS_TRY_WIND_RIDER_POWER 151
#define VARIOUS_ACTIVATE_WEATHER_CHANGE_ABILITIES 152
#define VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES 153
#define VARIOUS_STORE_HEALING_WISH 154
#define VARIOUS_HIT_SWITCH_TARGET_FAILED 155
#define VARIOUS_TRY_REVIVAL_BLESSING 156
#define VARIOUS_TRY_TRAINER_SLIDE_MSG_Z_MOVE 157
#define VARIOUS_TRY_TRAINER_SLIDE_MSG_MEGA_EVOLUTION 158
#define VARIOUS_CUT_1_3_HP_RAISE_STATS 131
#define VARIOUS_TRY_END_NEUTRALIZING_GAS 132
#define VARIOUS_JUMP_IF_UNDER_200 133
#define VARIOUS_SET_SKY_DROP 134
#define VARIOUS_CLEAR_SKY_DROP 135
#define VARIOUS_SKY_DROP_YAWN 136
#define VARIOUS_JUMP_IF_HOLD_EFFECT 137
#define VARIOUS_CURE_CERTAIN_STATUSES 138
#define VARIOUS_TRY_RESET_NEGATIVE_STAT_STAGES 139
#define VARIOUS_JUMP_IF_LAST_USED_ITEM_BERRY 140
#define VARIOUS_JUMP_IF_LAST_USED_ITEM_HOLD_EFFECT 141
#define VARIOUS_SAVE_BATTLER_ITEM 142
#define VARIOUS_RESTORE_BATTLER_ITEM 143
#define VARIOUS_BATTLER_ITEM_TO_LAST_USED_ITEM 144
#define VARIOUS_SET_BEAK_BLAST 145
#define VARIOUS_SWAP_SIDE_STATUSES 146
#define VARIOUS_SWAP_STATS 147
#define VARIOUS_TEATIME_INVUL 148
#define VARIOUS_TEATIME_TARGETS 149
#define VARIOUS_TRY_WIND_RIDER_POWER 150
#define VARIOUS_ACTIVATE_WEATHER_CHANGE_ABILITIES 151
#define VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES 152
#define VARIOUS_STORE_HEALING_WISH 153
#define VARIOUS_HIT_SWITCH_TARGET_FAILED 154
#define VARIOUS_TRY_REVIVAL_BLESSING 155
#define VARIOUS_TRY_TRAINER_SLIDE_MSG_Z_MOVE 156
#define VARIOUS_TRY_TRAINER_SLIDE_MSG_MEGA_EVOLUTION 157
// Cmd_manipulatedamage
#define DMG_CHANGE_SIGN 0

View file

@ -547,7 +547,7 @@
#define STRINGID_NOONEWILLBEABLETORUNAWAY 545
#define STRINGID_DESTINYKNOTACTIVATES 546
#define STRINGID_CLOAKEDINAFREEZINGLIGHT 547
#define STRINGID_STATWASNOTLOWERED 548
#define STRINGID_CLEARAMULETWONTLOWERSTATS 548
#define STRINGID_FERVENTWISHREACHED 549
#define STRINGID_AIRLOCKACTIVATES 550
#define STRINGID_PRESSUREENTERS 551

View file

@ -702,7 +702,7 @@ static const u8 sText_PkmnAbsorbingPower[] = _("{B_ATK_NAME_WITH_PREFIX} is abso
static const u8 sText_NoOneWillBeAbleToRun[] = _("No one will be able to run away\nduring the next turn!");
static const u8 sText_DestinyKnotActivates[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} fell in love\nfrom the {B_LAST_ITEM}!");
static const u8 sText_CloakedInAFreezingLight[] = _("{B_ATK_NAME_WITH_PREFIX} became cloaked\nin a freezing light!");
static const u8 sText_StatWasNotLowered[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}\nwas not lowered!");
static const u8 sText_ClearAmuletWontLowerStats[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_LAST_ITEM} prevents\nits stats from being lowered!");
static const u8 sText_AuraFlaredToLife[] = _("{B_DEF_NAME_WITH_PREFIX}'s aura flared to life!");
static const u8 sText_AirLockActivates[] = _("The effects of weather\ndisappeared.");
static const u8 sText_PressureActivates[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} is exerting its\npressure!");
@ -812,7 +812,6 @@ static const u8 sText_TargetCoveredInStickyCandySyrup[] = _("{B_DEF_NAME_WITH_PR
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
{
[STRINGID_OPPORTUNISTCOPIED - BATTLESTRINGS_TABLE_START] = sText_OpportunistCopied,
[STRINGID_TARGETISHURTBYSALTCURE - BATTLESTRINGS_TABLE_START] = sText_TargetIsHurtBySaltCure,
[STRINGID_TARGETISBEINGSALTCURED - BATTLESTRINGS_TABLE_START] = sText_TargetIsBeingSaltCured,
[STRINGID_CURRENTMOVECANTSELECT - BATTLESTRINGS_TABLE_START] = sText_CurrentMoveCantSelect,
@ -899,7 +898,7 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
[STRINGID_ASANDSTORMKICKEDUP - BATTLESTRINGS_TABLE_START] = sText_ASandstormKickedUp,
[STRINGID_BATTLERABILITYRAISEDSTAT - BATTLESTRINGS_TABLE_START] = sText_BattlerAbilityRaisedStat,
[STRINGID_FETCHEDPOKEBALL - BATTLESTRINGS_TABLE_START] = sText_FetchedPokeBall,
[STRINGID_STATWASNOTLOWERED - BATTLESTRINGS_TABLE_START] = sText_StatWasNotLowered,
[STRINGID_CLEARAMULETWONTLOWERSTATS - BATTLESTRINGS_TABLE_START] = sText_ClearAmuletWontLowerStats,
[STRINGID_CLOAKEDINAFREEZINGLIGHT - BATTLESTRINGS_TABLE_START] = sText_CloakedInAFreezingLight,
[STRINGID_DESTINYKNOTACTIVATES - BATTLESTRINGS_TABLE_START] = sText_DestinyKnotActivates,
[STRINGID_NOONEWILLBEABLETORUNAWAY - BATTLESTRINGS_TABLE_START] = sText_NoOneWillBeAbleToRun,

View file

@ -3645,15 +3645,12 @@ void SetMoveEffect(bool32 primary, u32 certain)
break;
case MOVE_EFFECT_SYRUP_BOMB:
if (gStatuses4[gEffectBattler] & STATUS4_SYRUP_BOMB)
{
gBattlescriptCurrInstr++;
}
else
if (!(gStatuses4[gEffectBattler] & STATUS4_SYRUP_BOMB))
{
gStatuses4[gEffectBattler] |= STATUS4_SYRUP_BOMB;
gDisableStructs[gBattlerTarget].syrupBombTimer = 3;
gBattlescriptCurrInstr++;
BattleScriptPush(gBattlescriptCurrInstr + 1);
gBattlescriptCurrInstr = BattleScript_SyrupBombActivates;
}
break;
}
@ -10354,22 +10351,6 @@ static void Cmd_various(void)
}
return;
}
case VARIOUS_SET_OCTOLOCK:
{
VARIOUS_ARGS(const u8 *failInstr);
if (gDisableStructs[battler].octolock)
{
gBattlescriptCurrInstr = cmd->failInstr;
}
else
{
gDisableStructs[battler].octolock = TRUE;
gBattleMons[battler].status2 |= STATUS2_ESCAPE_PREVENTION;
gDisableStructs[battler].battlerPreventingEscape = gBattlerAttacker;
gBattlescriptCurrInstr = cmd->nextInstr;
}
return;
}
case VARIOUS_CHECK_POLTERGEIST:
{
VARIOUS_ARGS(const u8 *failInstr);
@ -11418,6 +11399,7 @@ static u32 ChangeStatBuffs(s8 statValue, u32 statId, u32 flags, const u8 *BS_ptr
gBattleScripting.battler = battler;
if (battlerHoldEffect == HOLD_EFFECT_CLEAR_AMULET)
{
gLastUsedItem = gBattleMons[battler].item;
gBattlescriptCurrInstr = BattleScript_ItemNoStatLoss;
RecordItemEffectBattle(battler, HOLD_EFFECT_CLEAR_AMULET);
}
@ -16260,3 +16242,21 @@ void BS_JumpIfTerrainAffected(void)
else
gBattlescriptCurrInstr = cmd->nextInstr;
}
void BS_Octolock(void)
{
NATIVE_ARGS(u8 battler, const u8 *failInstr);
u32 battler = GetBattlerForBattleScript(cmd->battler);
if (gDisableStructs[battler].octolock)
{
gBattlescriptCurrInstr = cmd->failInstr;
}
else
{
gDisableStructs[battler].octolock = TRUE;
gBattleMons[battler].status2 |= STATUS2_ESCAPE_PREVENTION;
gDisableStructs[battler].battlerPreventingEscape = gBattlerAttacker;
gBattlescriptCurrInstr = cmd->nextInstr;
}
}

View file

@ -3090,19 +3090,11 @@ u8 DoBattlerEndTurnEffects(void)
case ENDTURN_SYRUP_BOMB:
if ((gStatuses4[battler] & STATUS4_SYRUP_BOMB) && (gBattleMons[battler].hp != 0))
{
gDisableStructs[battler].syrupBombTimer--;
if (gDisableStructs[battler].syrupBombTimer == 0)
{
if (gDisableStructs[battler].syrupBombTimer > 0 && --gDisableStructs[battler].syrupBombTimer == 0)
gStatuses4[battler] &= ~STATUS4_SYRUP_BOMB;
PREPARE_MOVE_BUFFER(gBattleTextBuff1, MOVE_SYRUP_BOMB);
gBattlescriptCurrInstr = BattleScript_WrapEnds;
}
else if (gDisableStructs[battler].syrupBombTimer != 0)
{
gBattlerTarget = battler;
PREPARE_MOVE_BUFFER(gBattleTextBuff1, MOVE_SYRUP_BOMB);
gBattlescriptCurrInstr = BattleScript_SyrupBombEndTurn;
}
gBattlerTarget = battler;
PREPARE_MOVE_BUFFER(gBattleTextBuff1, MOVE_SYRUP_BOMB);
gBattlescriptCurrInstr = BattleScript_SyrupBombEndTurn;
BattleScriptExecute(gBattlescriptCurrInstr);
effect++;
}

View file

@ -21,8 +21,8 @@ SINGLE_BATTLE_TEST("Clear Amulet prevents Intimidate")
} SCENE {
HP_BAR(player, captureDamage: &turnOneHit);
ABILITY_POPUP(player, ABILITY_INTIMIDATE);
NONE_OF { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); }
MESSAGE("Foe Wobbuffet's Attack was not lowered!");
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
MESSAGE("Foe Wobbuffet's Clear Amulet prevents its stats from being lowered!");
HP_BAR(player, captureDamage: &turnTwoHit);
} THEN {
EXPECT_EQ(turnOneHit, turnTwoHit);
@ -55,31 +55,8 @@ SINGLE_BATTLE_TEST("Clear Amulet prevents stat reducing effects")
} WHEN {
TURN { MOVE(player, move); }
} SCENE {
NONE_OF { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); }
switch (move)
{
case MOVE_GROWL:
MESSAGE("Foe Wobbuffet's Attack was not lowered!");
break;
case MOVE_LEER:
MESSAGE("Foe Wobbuffet's Defense was not lowered!");
break;
case MOVE_CONFIDE:
MESSAGE("Foe Wobbuffet's Sp. Atk was not lowered!");
break;
case MOVE_FAKE_TEARS:
MESSAGE("Foe Wobbuffet's Sp. Def was not lowered!");
break;
case MOVE_SCARY_FACE:
MESSAGE("Foe Wobbuffet's Speed was not lowered!");
break;
case MOVE_SWEET_SCENT:
MESSAGE("Foe Wobbuffet's evasiveness was not lowered!");
break;
case MOVE_SAND_ATTACK:
MESSAGE("Foe Wobbuffet's accuracy was not lowered!");
break;
}
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
MESSAGE("Foe Wobbuffet's Clear Amulet prevents its stats from being lowered!");
}
}
@ -106,6 +83,7 @@ SINGLE_BATTLE_TEST("Clear Amulet prevents secondary effects that reduce stats")
} WHEN {
TURN { MOVE(player, MOVE_ROCK_SMASH); }
} SCENE {
NONE_OF { ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); }
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
NOT MESSAGE("Foe Wobbuffet's Clear Amulet prevents its stats from being lowered!");
}
}

View file

@ -1,7 +1,7 @@
#include "global.h"
#include "test/battle.h"
SINGLE_BATTLE_TEST("Octolock")
SINGLE_BATTLE_TEST("Octolock decreases Defense and Sp. Def by at the end of the turn")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
@ -18,7 +18,7 @@ SINGLE_BATTLE_TEST("Octolock")
}
}
SINGLE_BATTLE_TEST("Octolock 2")
SINGLE_BATTLE_TEST("Octolock reduction is prevented by Clear Body, White Smoke and Full Metal Body")
{
u32 species;
u32 ability;
@ -62,7 +62,7 @@ SINGLE_BATTLE_TEST("Octolock 2")
}
}
SINGLE_BATTLE_TEST("Octolock 3")
SINGLE_BATTLE_TEST("Octolock Defense reduction is prevented by Big Pecks")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
@ -75,23 +75,48 @@ SINGLE_BATTLE_TEST("Octolock 3")
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
NOT MESSAGE("Foe Pidgey's Defense fell!");
ABILITY_POPUP(opponent, ABILITY_BIG_PECKS);
MESSAGE("Foe Pidgey's Big Pecks prevents stat loss!");
MESSAGE("Foe Wobbuffet's Sp. Def fell!");
MESSAGE("Foe Pidgey's Big Pecks prevents Defense loss!");
MESSAGE("Foe Pidgey's Sp. Def fell!");
}
}
SINGLE_BATTLE_TEST("Octolock 4")
SINGLE_BATTLE_TEST("Octolock reduction is prevented by Clear Amulet")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_CLEAR_AMULET); }
} WHEN {
TURN { MOVE(player, MOVE_OCTOLOCK); }
TURN {}
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_OCTOLOCK, player);
MESSAGE("Foe Wobbuffet can no longer escape because of Octolock!");
MESSAGE("Foe Wobbuffet's Clear Amulet prevents its stats from being lowered!");
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
NOT MESSAGE("Foe Wobbuffet's Defense fell!");
NOT MESSAGE("Foe Wobbuffet's Sp. Def fell!");
}
}
SINGLE_BATTLE_TEST("Octolock will not decrease Defense and Sp. Def further then minus six")
{
u8 j;
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_OCTOLOCK); }
for (j = 0; j < 6; j++)
TURN {}
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_OCTOLOCK, player);
for (j = 0; j < 5; j++)
MESSAGE("Foe Wobbuffet's Defense fell!");
MESSAGE("Foe Wobbuffet's Sp. Def fell!");
MESSAGE("Foe Wobbuffet's Defense won't go lower!");
MESSAGE("Foe Wobbuffet's Sp. Def won't go lower!");
NOT MESSAGE("Foe Wobbuffet's Defense fell!");
NOT MESSAGE("Foe Wobbuffet's Sp. Def fell!");
}
}

View file

@ -3,14 +3,15 @@
SINGLE_BATTLE_TEST("Syrup Bomb covers the foe in sticky syrup for 3 turns")
{
u8 j;
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_SYRUP_BOMB); }
TURN {}
TURN {}
TURN {}
for (j = 0; j < 4; j++)
TURN {}
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_SYRUP_BOMB, player);
HP_BAR(opponent);
@ -19,7 +20,30 @@ SINGLE_BATTLE_TEST("Syrup Bomb covers the foe in sticky syrup for 3 turns")
MESSAGE("Foe Wobbuffet's Speed fell!");
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
MESSAGE("Foe Wobbuffet's Speed fell!");
MESSAGE("Foe Wobbuffet was freed from Syrup Bomb!");
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
MESSAGE("Foe Wobbuffet's Speed fell!");
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
NOT MESSAGE("Foe Wobbuffet's Speed fell!");
}
}
SINGLE_BATTLE_TEST("Target will be not covered in sticky syrup again if it is currently covered")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_SYRUP_BOMB); }
TURN { MOVE(player, MOVE_SYRUP_BOMB); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_SYRUP_BOMB, player);
HP_BAR(opponent);
MESSAGE("Foe Wobbuffet got covered in sticky syrup!");
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
MESSAGE("Foe Wobbuffet's Speed fell!");
ANIMATION(ANIM_TYPE_MOVE, MOVE_SYRUP_BOMB, player);
HP_BAR(opponent);
NOT MESSAGE("Foe Wobbuffet got covered in sticky syrup!");
}
}
@ -32,9 +56,9 @@ SINGLE_BATTLE_TEST("Syrup Bomb is prevented by Bulletproof")
TURN { MOVE(player, MOVE_SYRUP_BOMB); }
} SCENE {
ABILITY_POPUP(opponent, ABILITY_BULLETPROOF);
MESSAGE("Foe Chespin's Bulletproof blocks Syrup Bomb!");
NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_SYRUP_BOMB, player);
NOT HP_BAR(opponent);
MESSAGE("Foe Chespin's Bulletproof blocks Syrup Bomb!");
}
}
@ -63,23 +87,29 @@ SINGLE_BATTLE_TEST("Clear Body, White Smoke and Full Metal Body prevent Sticky S
MESSAGE("Foe Beldum got covered in sticky syrup!");
ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY);
MESSAGE("Foe Beldum's Clear Body prevents stat loss!");
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
NOT MESSAGE("Foe Beldum's Speed fell!");
}
else if (species == SPECIES_TORKOAL)
{
MESSAGE("Foe Torkoal got covered in sticky syrup!");
ABILITY_POPUP(opponent, ABILITY_WHITE_SMOKE);
MESSAGE("Foe Torkoal's White Smoke prevents stat loss!");
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
NOT MESSAGE("Foe Torkoal's Speed fell!");
}
else if (species == SPECIES_SOLGALEO)
{
MESSAGE("Foe Solgaleo got covered in sticky syrup!");
ABILITY_POPUP(opponent, ABILITY_FULL_METAL_BODY);
MESSAGE("Foe Solgaleo's Full Metal Body prevents stat loss!");
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
NOT MESSAGE("Foe Solgaleo's Speed fell!");
}
}
}
SINGLE_BATTLE_TEST("Clear Amulet prevents Sticky Syrup speed reduction")
SINGLE_BATTLE_TEST("Sticky Syrup speed reduction is prevented by Clear Amulet")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
@ -90,8 +120,32 @@ SINGLE_BATTLE_TEST("Clear Amulet prevents Sticky Syrup speed reduction")
ANIMATION(ANIM_TYPE_MOVE, MOVE_SYRUP_BOMB, player);
HP_BAR(opponent);
MESSAGE("Foe Wobbuffet got covered in sticky syrup!");
MESSAGE("Foe Wobbuffet's Clear Amulet prevents its stats from being lowered!");
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
NOT MESSAGE("Foe Wobbuffet's Speed fell!");
}
}
SINGLE_BATTLE_TEST("Sticky syrup will not decrease speed further then minus six")
{
u8 j;
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
for (j = 0; j < 3; j++)
TURN { MOVE(player, MOVE_SCARY_FACE); }
TURN { MOVE(player, MOVE_SYRUP_BOMB); }
TURN {}
} SCENE {
for (j = 0; j < 3; j++)
ANIMATION(ANIM_TYPE_MOVE, MOVE_SCARY_FACE, player);
ANIMATION(ANIM_TYPE_MOVE, MOVE_SYRUP_BOMB, player);
HP_BAR(opponent);
MESSAGE("Foe Wobbuffet got covered in sticky syrup!");
MESSAGE("Foe Wobbuffet's Speed won't go lower!");
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
NOT MESSAGE("Foe Wobbuffet's Speed fell!");
MESSAGE("Foe Wobbuffet's Speed was not lowered!");
}
}