mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
54 lines
1.9 KiB
C
54 lines
1.9 KiB
C
#include "global.h"
|
|
#include "test/battle.h"
|
|
|
|
ASSUMPTIONS
|
|
{
|
|
ASSUME(gBattleMoves[MOVE_KNOCK_OFF].effect == EFFECT_KNOCK_OFF);
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Knock Off knocks a healing berry before it has the chance to activate")
|
|
{
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_SITRUS_BERRY); MaxHP(500); HP(255); }
|
|
} WHEN {
|
|
TURN { MOVE(player, MOVE_KNOCK_OFF); }
|
|
} SCENE {
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_KNOCK_OFF, player);
|
|
NONE_OF {
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
|
|
MESSAGE("Foe Wobbuffet's Sitrus Berry restored health!");
|
|
}
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_ITEM_KNOCKOFF);
|
|
MESSAGE("Wobbuffet knocked off Foe Wobbuffet's Sitrus Berry!");
|
|
}
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Knock Off activates after Rocky Helmet and Weakness Policy")
|
|
{
|
|
u16 item = 0;
|
|
|
|
PARAMETRIZE { item = ITEM_WEAKNESS_POLICY; }
|
|
PARAMETRIZE { item = ITEM_ROCKY_HELMET; }
|
|
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WOBBUFFET) { Item(item); }
|
|
} WHEN {
|
|
TURN { MOVE(player, MOVE_KNOCK_OFF); }
|
|
} SCENE {
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_KNOCK_OFF, player);
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
|
|
if (item == ITEM_WEAKNESS_POLICY) {
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE);
|
|
MESSAGE("Using WeaknssPolicy, the Attack of Foe Wobbuffet sharply rose!");
|
|
MESSAGE("Using WeaknssPolicy, the Sp. Atk of Foe Wobbuffet sharply rose!");
|
|
} else if (item == ITEM_ROCKY_HELMET) {
|
|
HP_BAR(player);
|
|
MESSAGE("Wobbuffet was hurt by Foe Wobbuffet's Rocky Helmet!");
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_ITEM_KNOCKOFF);
|
|
MESSAGE("Wobbuffet knocked off Foe Wobbuffet's Rocky Helmet!");
|
|
}
|
|
}
|
|
}
|