From 6a71e14718cd3a415e62b593ce3bcc27c68ce0e9 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Tue, 6 Feb 2024 08:39:42 -0300 Subject: [PATCH 1/3] Added credits section to PR template (#4141) --- .github/pull_request_template.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 612c771871..7a76b748e5 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -11,8 +11,14 @@ +## **People who collaborated with me in this PR** + + + + ## Feature(s) this PR does NOT handle: + ## **Discord contact info** From fa5f507b1ee8ce7be5b7142984fff823e2432091 Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Tue, 6 Feb 2024 23:30:57 +0100 Subject: [PATCH 2/3] Fixes Mycelium Might speed bracker (#4146) Co-authored-by: Bassoonian --- src/battle_main.c | 4 +-- test/battle/ability/mycelium_might.c | 45 ++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 test/battle/ability/mycelium_might.c diff --git a/src/battle_main.c b/src/battle_main.c index 49b8e8285a..67f2cf1737 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -4728,9 +4728,9 @@ u32 GetWhichBattlerFasterArgs(u32 battler1, u32 battler2, bool32 ignoreChosenMov strikesFirst = 1; else if (ability2 == ABILITY_STALL && ability1 != ABILITY_STALL) strikesFirst = 0; - 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 = 0; else { diff --git a/test/battle/ability/mycelium_might.c b/test/battle/ability/mycelium_might.c new file mode 100644 index 0000000000..1039fca34f --- /dev/null +++ b/test/battle/ability/mycelium_might.c @@ -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); + } +} From 452432533a0873a4337272a70d24b9850d24e00d Mon Sep 17 00:00:00 2001 From: Alex <93446519+AlexOn1ine@users.noreply.github.com> Date: Wed, 7 Feb 2024 15:42:22 +0100 Subject: [PATCH 3/3] Kee berry (#4149) * Fixes Kee Berry * new line * Fix fix --------- Co-authored-by: Bassoonian --- src/battle_util.c | 1 + test/battle/hold_effect/kee_berry.c | 17 +++++++++-------- test/battle/hold_effect/maranga_berry.c | 19 +++++++++++++++++++ 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index 856289d1f1..fe4863c0f0 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -6680,6 +6680,7 @@ static u8 DamagedStatBoostBerryEffect(u32 battler, u8 statId, u8 split) && (gBattleScripting.overrideBerryRequirements || (!DoesSubstituteBlockMove(gBattlerAttacker, battler, gCurrentMove) && GetBattleMoveSplit(gCurrentMove) == split + && battler != gBattlerAttacker && TARGET_TURN_DAMAGED)) ) { diff --git a/test/battle/hold_effect/kee_berry.c b/test/battle/hold_effect/kee_berry.c index c172a2c940..0134b34f1c 100644 --- a/test/battle/hold_effect/kee_berry.c +++ b/test/battle/hold_effect/kee_berry.c @@ -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(gBattleMoves[MOVE_SWIFT].split == SPLIT_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); } } diff --git a/test/battle/hold_effect/maranga_berry.c b/test/battle/hold_effect/maranga_berry.c index d29dc60d1e..9c133a7085 100644 --- a/test/battle/hold_effect/maranga_berry.c +++ b/test/battle/hold_effect/maranga_berry.c @@ -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); + } +}