forked from rh-hideout/pokeemerald-expansion
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes Protective Pads Fluffy interaction (rh-hideout#4340)
* Fixes Protective Pads Fluffy interaction * couple more tests
- Loading branch information
1 parent
34fd73e
commit 5c0d187
Showing
2 changed files
with
89 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#include "global.h" | ||
#include "test/battle.h" | ||
|
||
ASSUMPTIONS | ||
{ | ||
ASSUME(gItemsInfo[ITEM_PROTECTIVE_PADS].holdEffect == HOLD_EFFECT_PROTECTIVE_PADS); | ||
ASSUME(gMovesInfo[MOVE_TACKLE].makesContact == TRUE); | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Protective Pads protected moves still make direct contact", s16 damage) | ||
{ | ||
u32 ability; | ||
PARAMETRIZE { ability = ABILITY_KLUTZ; } | ||
PARAMETRIZE { ability = ABILITY_FLUFFY; } | ||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_PROTECTIVE_PADS); } | ||
OPPONENT(SPECIES_STUFFUL) { Ability(ability); } | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_TACKLE); } | ||
} SCENE { | ||
MESSAGE("Wobbuffet used Tackle!"); | ||
HP_BAR(opponent, captureDamage: &results[i].damage); | ||
} FINALLY { | ||
EXPECT_MUL_EQ(results[0].damage, UQ_4_12(0.5), results[1].damage); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Protective Pads doesn't reduce tough claws damage", s16 damage) | ||
{ | ||
u32 item; | ||
PARAMETRIZE { item = ITEM_NONE; } | ||
PARAMETRIZE { item = ITEM_PROTECTIVE_PADS; } | ||
GIVEN { | ||
PLAYER(SPECIES_BINACLE) { Ability(ABILITY_TOUGH_CLAWS); Item(item); } | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_TACKLE); } | ||
} SCENE { | ||
MESSAGE("Binacle used Tackle!"); | ||
HP_BAR(opponent, captureDamage: &results[i].damage); | ||
} FINALLY { | ||
EXPECT_EQ(results[0].damage, results[1].damage); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Protective Pads doesn't invalid unseen fist") | ||
{ | ||
GIVEN { | ||
PLAYER(SPECIES_URSHIFU_RAPID_STRIKE_STYLE) { Ability(ABILITY_UNSEEN_FIST); Item(ITEM_PROTECTIVE_PADS); } | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(opponent, MOVE_PROTECT); MOVE(player, MOVE_TACKLE); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_PROTECT, opponent); | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player); | ||
HP_BAR(opponent); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Protective Pads protects from Rocly Helmet Damage") | ||
{ | ||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_PROTECTIVE_PADS); } | ||
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_ROCKY_HELMET); } | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_TACKLE); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player); | ||
HP_BAR(opponent); | ||
NONE_OF { | ||
HP_BAR(player); | ||
MESSAGE("Wobbuffet was hurt by Foe Wobbuffet's Rocky Helmet!"); | ||
} | ||
} | ||
} |