Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts: # src/battle_main.c # src/battle_util.c # test/battle/hold_effect/kee_berry.c
This commit is contained in:
commit
ec803054e6
6
.github/pull_request_template.md
vendored
6
.github/pull_request_template.md
vendored
@ -11,8 +11,14 @@
|
||||
<!-- Format: "Fixes #2345, fixes #4523, fixes #2222." -->
|
||||
<!-- If it doesn't apply, feel free to remove this section. -->
|
||||
|
||||
## **People who collaborated with me in this PR**
|
||||
<!-- Please credit everyone else that contributed to this PR, be it code and/or assets. -->
|
||||
<!-- Use their GitHub tag if they have one. -->
|
||||
<!-- If it doesn't apply, feel free to remove this section. -->
|
||||
|
||||
## Feature(s) this PR does NOT handle:
|
||||
<!-- If your PR contains any unfinished features that are not considered merge-blocking, please list them here for clarity so no one can forget. -->
|
||||
<!-- If it doesn't apply, feel free to remove this section. -->
|
||||
|
||||
## **Discord contact info**
|
||||
<!--- formatted as name#numbers, e.g. Lunos#4026 -->
|
||||
|
||||
@ -4764,9 +4764,9 @@ s32 GetWhichBattlerFasterArgs(u32 battler1, u32 battler2, bool32 ignoreChosenMov
|
||||
strikesFirst = -1;
|
||||
else if (ability2 == ABILITY_STALL && ability1 != ABILITY_STALL)
|
||||
strikesFirst = 1;
|
||||
else if (ability1 == ABILITY_MYCELIUM_MIGHT && ability2 != ABILITY_MYCELIUM_MIGHT && IS_MOVE_STATUS(gCurrentMove))
|
||||
else if (ability1 == ABILITY_MYCELIUM_MIGHT && ability2 != ABILITY_MYCELIUM_MIGHT && IS_MOVE_STATUS(gChosenMoveByBattler[battler1]))
|
||||
strikesFirst = -1;
|
||||
else if (ability2 == ABILITY_MYCELIUM_MIGHT && ability1 != ABILITY_MYCELIUM_MIGHT && IS_MOVE_STATUS(gCurrentMove))
|
||||
else if (ability2 == ABILITY_MYCELIUM_MIGHT && ability1 != ABILITY_MYCELIUM_MIGHT && IS_MOVE_STATUS(gChosenMoveByBattler[battler2]))
|
||||
strikesFirst = 1;
|
||||
else
|
||||
{
|
||||
|
||||
@ -6476,6 +6476,7 @@ static u8 DamagedStatBoostBerryEffect(u32 battler, u8 statId, u8 category)
|
||||
&& (gBattleScripting.overrideBerryRequirements
|
||||
|| (!DoesSubstituteBlockMove(gBattlerAttacker, battler, gCurrentMove)
|
||||
&& GetBattleMoveCategory(gCurrentMove) == category
|
||||
&& battler != gBattlerAttacker
|
||||
&& TARGET_TURN_DAMAGED))
|
||||
)
|
||||
{
|
||||
|
||||
45
test/battle/ability/mycelium_might.c
Normal file
45
test/battle/ability/mycelium_might.c
Normal file
@ -0,0 +1,45 @@
|
||||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
SINGLE_BATTLE_TEST("Mycelium Might causes the user to move last in the priority bracket if it uses a status move")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_TOEDSCOOL) { Speed(100); Ability(ABILITY_MYCELIUM_MIGHT); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Speed(1); }
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_CELEBRATE); MOVE(player, MOVE_SPORE); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPORE, player);
|
||||
STATUS_ICON(opponent, sleep: TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Mycelium Might will respect the speed if both battlers have the ability")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_TOEDSCOOL) { Speed(100); Ability(ABILITY_MYCELIUM_MIGHT); }
|
||||
OPPONENT(SPECIES_TOEDSCOOL) { Speed(1); Ability(ABILITY_MYCELIUM_MIGHT); }
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_WILL_O_WISP); MOVE(player, MOVE_WILL_O_WISP); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_WILL_O_WISP, player);
|
||||
STATUS_ICON(opponent, burn: TRUE);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_WILL_O_WISP, opponent);
|
||||
STATUS_ICON(player, burn: TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Mycelium Might ignores opposing abilities")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_TOEDSCOOL) { Speed(100); Ability(ABILITY_MYCELIUM_MIGHT); }
|
||||
OPPONENT(SPECIES_BELDUM) { Speed(1); Ability(ABILITY_CLEAR_BODY);}
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_CELEBRATE); MOVE(player, MOVE_SCREECH); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SCREECH, player);
|
||||
NOT ABILITY_POPUP(opponent, ABILITY_CLEAR_BODY);
|
||||
}
|
||||
}
|
||||
@ -55,20 +55,21 @@ SINGLE_BATTLE_TEST("Kee Berry raises the holder's Defense by two stages with Rip
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Kee Berry is not triggered by a special move")
|
||||
SINGLE_BATTLE_TEST("Kee Berry doesn't trigger if the item hold user used a physical move")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_SWIFT].category == DAMAGE_CATEGORY_SPECIAL);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_KEE_BERRY); }
|
||||
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_KEE_BERRY); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_SWIFT); }
|
||||
TURN { MOVE(player, MOVE_TACKLE); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SWIFT, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player);
|
||||
HP_BAR(opponent);
|
||||
NONE_OF {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
|
||||
MESSAGE("Using Kee Berry, the Defense of Foe Wobbuffet rose!");
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player);
|
||||
MESSAGE("Using Kee Berry, the Defense of Wobbuffet rose!");
|
||||
}
|
||||
} THEN {
|
||||
EXPECT_EQ(player->statStages[STAT_DEF], DEFAULT_STAT_STAGE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,3 +54,22 @@ SINGLE_BATTLE_TEST("Maranga Berry raises the holder's Sp. Def by two stages with
|
||||
EXPECT_EQ(opponent->statStages[STAT_SPDEF], DEFAULT_STAT_STAGE + 2);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Maranga Berry doesn't trigger if the item hold user used a special move")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_MARANGA_BERRY); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_SWIFT); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SWIFT, player);
|
||||
HP_BAR(opponent);
|
||||
NONE_OF {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player);
|
||||
MESSAGE("Using Maranga Berry, the Sp. Def of Applin sharply rose!");
|
||||
}
|
||||
} THEN {
|
||||
EXPECT_EQ(player->statStages[STAT_SPDEF], DEFAULT_STAT_STAGE);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user