From 31dc906594319c20085def9fcca130a0c6bfe625 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Tue, 19 Sep 2023 13:38:40 +0200 Subject: [PATCH 01/20] fix protect recoil issue and add tests for protect --- data/battle_scripts_1.s | 2 + test/battle/move_effect/protect.c | 323 ++++++++++++++++++++++++++++++ 2 files changed, 325 insertions(+) create mode 100644 test/battle/move_effect/protect.c diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 2b3803ab91c2..e56cc621b93f 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -9321,6 +9321,7 @@ BattleScript_SpikyShieldEffect:: printstring STRINGID_PKMNHURTSWITH waitmessage B_WAIT_TIME_LONG tryfaintmon BS_ATTACKER + orhalfword gMoveResultFlags, MOVE_RESULT_MISSED BattleScript_SpikyShieldRet:: return @@ -9332,6 +9333,7 @@ BattleScript_KingsShieldEffect:: copybyte sBATTLER, gBattlerTarget copybyte gBattlerTarget, gBattlerAttacker copybyte gBattlerAttacker, sBATTLER + orhalfword gMoveResultFlags, MOVE_RESULT_MISSED return BattleScript_BanefulBunkerEffect:: diff --git a/test/battle/move_effect/protect.c b/test/battle/move_effect/protect.c new file mode 100644 index 000000000000..3241f1d808e5 --- /dev/null +++ b/test/battle/move_effect/protect.c @@ -0,0 +1,323 @@ +#include "global.h" +#include "test/battle.h" + +ASSUMPTIONS +{ + ASSUME(gBattleMoves[MOVE_PROTECT].effect == EFFECT_PROTECT); + ASSUME(gBattleMoves[MOVE_DETECT].effect == EFFECT_PROTECT); + ASSUME(gBattleMoves[MOVE_KINGS_SHIELD].effect == EFFECT_PROTECT); + ASSUME(gBattleMoves[MOVE_SILK_TRAP].effect == EFFECT_PROTECT); + ASSUME(gBattleMoves[MOVE_SPIKY_SHIELD].effect == EFFECT_PROTECT); + ASSUME(gBattleMoves[MOVE_WIDE_GUARD].effect == EFFECT_PROTECT); + ASSUME(gBattleMoves[MOVE_QUICK_GUARD].effect == EFFECT_PROTECT); + ASSUME(gBattleMoves[MOVE_CRAFTY_SHIELD].effect == EFFECT_PROTECT); + ASSUME(gBattleMoves[MOVE_BANEFUL_BUNKER].effect == EFFECT_PROTECT); + ASSUME(gBattleMoves[MOVE_TACKLE].split == SPLIT_PHYSICAL); + ASSUME(gBattleMoves[MOVE_TACKLE].flags & FLAG_MAKES_CONTACT); + ASSUME(gBattleMoves[MOVE_LEER].split == SPLIT_STATUS); + ASSUME(gBattleMoves[MOVE_WATER_GUN].split == SPLIT_SPECIAL); + ASSUME(!(gBattleMoves[MOVE_WATER_GUN].flags & FLAG_MAKES_CONTACT)); +} + +SINGLE_BATTLE_TEST("Protect, Detect, Spiky Shield, Baneful Bunker protect from moves") +{ + u32 j; + static const u16 protectMoves[] = {MOVE_PROTECT, MOVE_DETECT, MOVE_SPIKY_SHIELD, MOVE_BANEFUL_BUNKER}; + u16 protectMove = MOVE_NONE; + u16 usedMove = MOVE_NONE; + + for (j = 0; j < ARRAY_COUNT(protectMoves); j++) + { + PARAMETRIZE {protectMove = protectMoves[j]; usedMove = MOVE_TACKLE; } + PARAMETRIZE {protectMove = protectMoves[j]; usedMove = MOVE_LEER; } + PARAMETRIZE {protectMove = protectMoves[j]; usedMove = MOVE_WATER_GUN; } + } + + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, protectMove); MOVE(player, usedMove); } + TURN {} + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, protectMove, opponent); + MESSAGE("Foe Wobbuffet protected itself!"); + NOT ANIMATION(ANIM_TYPE_MOVE, usedMove, player); + MESSAGE("Foe Wobbuffet protected itself!"); + if (usedMove == MOVE_LEER) { + NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + } else { + NOT HP_BAR(opponent); + } + } +} + +SINGLE_BATTLE_TEST("King's Shield / Silk Trap / Obstruct protect from damaging moves only and lower Atk / Spd / Def by 1 / 1 / 2 for contact moves") +{ + u32 j; + static const u16 protectMoves[][3] = {{MOVE_KINGS_SHIELD, STAT_ATK, 1}, {MOVE_SILK_TRAP, STAT_SPEED, 1}, {MOVE_OBSTRUCT, STAT_DEF, 2}}; + u16 protectMove = MOVE_NONE; + u16 usedMove = MOVE_NONE; + u16 statId = 0, lowersBy = 0; + + for (j = 0; j < ARRAY_COUNT(protectMoves); j++) + { + PARAMETRIZE {protectMove = protectMoves[j][0]; statId = protectMoves[j][1]; lowersBy = protectMoves[j][2]; usedMove = MOVE_TACKLE; } + PARAMETRIZE {protectMove = protectMoves[j][0]; usedMove = MOVE_LEER; } + PARAMETRIZE {protectMove = protectMoves[j][0]; usedMove = MOVE_WATER_GUN; } + } + + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, protectMove); MOVE(player, usedMove); } + TURN {} + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, protectMove, opponent); + MESSAGE("Foe Wobbuffet protected itself!"); + if (usedMove == MOVE_LEER) { + ANIMATION(ANIM_TYPE_MOVE, usedMove, player); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent); + NOT MESSAGE("Foe Wobbuffet protected itself!"); + } else { + NOT ANIMATION(ANIM_TYPE_MOVE, usedMove, player); + MESSAGE("Foe Wobbuffet protected itself!"); + NOT HP_BAR(opponent); + if (usedMove == MOVE_TACKLE) { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + if (statId == STAT_ATK) { + MESSAGE("Wobbuffet's Attack fell!"); + } else if (statId == STAT_SPEED) { + MESSAGE("Wobbuffet's Speed fell!"); + } else if (statId == STAT_DEF) { + if (lowersBy == 2) { + MESSAGE("Wobbuffet's Defense harshly fell!"); + } + } + } + } + } THEN { + if (usedMove == MOVE_TACKLE) { + EXPECT_EQ(player->statStages[statId], DEFAULT_STAT_STAGE - lowersBy); + } + } +} + +// Also checks if it can faint the mon. +SINGLE_BATTLE_TEST("Spiky Shield does 1/8 dmg of max hp for moves making contact") +{ + u16 usedMove = MOVE_NONE; + u16 hp = 400, maxHp = 400; + + PARAMETRIZE {usedMove = MOVE_TACKLE; hp = 1;} + PARAMETRIZE {usedMove = MOVE_TACKLE;} + PARAMETRIZE {usedMove = MOVE_LEER;} + PARAMETRIZE {usedMove = MOVE_WATER_GUN;} + + GIVEN { + PLAYER(SPECIES_WOBBUFFET) {HP(hp); MaxHP(maxHp); } + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + if (hp == 1) { + TURN { MOVE(opponent, MOVE_SPIKY_SHIELD); MOVE(player, usedMove); SEND_OUT(player, 1); } + } else { + TURN { MOVE(opponent, MOVE_SPIKY_SHIELD); MOVE(player, usedMove); } + } + TURN {} + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_SPIKY_SHIELD, opponent); + MESSAGE("Foe Wobbuffet protected itself!"); + NOT ANIMATION(ANIM_TYPE_MOVE, usedMove, player); + MESSAGE("Foe Wobbuffet protected itself!"); + NOT HP_BAR(opponent); + if (usedMove == MOVE_TACKLE) { + HP_BAR(player, maxHp / 8); + if (hp == 1) { + MESSAGE("Wobbuffet fainted!"); + MESSAGE("Go! Wobbuffet!"); + } + } + } +} + +SINGLE_BATTLE_TEST("Baneful Bunker poisons pokemon for moves making contact") +{ + u16 usedMove = MOVE_NONE; + + PARAMETRIZE {usedMove = MOVE_TACKLE; } + PARAMETRIZE {usedMove = MOVE_LEER; } + PARAMETRIZE {usedMove = MOVE_WATER_GUN; } + + GIVEN { + PLAYER(SPECIES_WOBBUFFET); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, MOVE_BANEFUL_BUNKER); MOVE(player, usedMove); } + TURN {} + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_BANEFUL_BUNKER, opponent); + MESSAGE("Foe Wobbuffet protected itself!"); + NOT ANIMATION(ANIM_TYPE_MOVE, usedMove, player); + MESSAGE("Foe Wobbuffet protected itself!"); + NOT HP_BAR(opponent); + if (usedMove == MOVE_TACKLE) { + STATUS_ICON(player, STATUS1_POISON); + } else { + NOT STATUS_ICON(player, STATUS1_POISON); + } + } +} + +SINGLE_BATTLE_TEST("Recoil is not applied if battler was protected") // #3319 +{ + u16 move = MOVE_NONE; + + PARAMETRIZE {move = MOVE_PROTECT; } + PARAMETRIZE {move = MOVE_DETECT; } + PARAMETRIZE {move = MOVE_KINGS_SHIELD; } + PARAMETRIZE {move = MOVE_BANEFUL_BUNKER; } + PARAMETRIZE {move = MOVE_SILK_TRAP; } + PARAMETRIZE {move = MOVE_OBSTRUCT; } + PARAMETRIZE {move = MOVE_SPIKY_SHIELD; } + + GIVEN { + ASSUME(gBattleMoves[MOVE_DOUBLE_EDGE].effect == EFFECT_RECOIL_33); + PLAYER(SPECIES_RAPIDASH); + OPPONENT(SPECIES_BEAUTIFLY); + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE); MOVE(player, MOVE_TACKLE); } + TURN { MOVE(opponent, move); MOVE(player, MOVE_DOUBLE_EDGE); } + TURN {} + } SCENE { + // 1st turn + MESSAGE("Foe Beautifly used Tackle!"); + MESSAGE("Rapidash used Tackle!"); + // 2nd turn + ANIMATION(ANIM_TYPE_MOVE, move, opponent); + MESSAGE("Foe Beautifly protected itself!"); + MESSAGE("Rapidash used Double-Edge!"); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_DOUBLE_EDGE, player); + NOT MESSAGE("Rapidash is hit with recoil!"); + } +} + +DOUBLE_BATTLE_TEST("Wide Guard protects self and ally from multi-target moves") +{ + u16 move = MOVE_NONE; + + PARAMETRIZE {move = MOVE_TACKLE; } + PARAMETRIZE {move = MOVE_SURF; } // All targets + PARAMETRIZE {move = MOVE_HYPER_VOICE; } // 2 foes + + GIVEN { + ASSUME(gBattleMoves[MOVE_TACKLE].target == MOVE_TARGET_SELECTED); + ASSUME(gBattleMoves[MOVE_SURF].target == MOVE_TARGET_FOES_AND_ALLY); + ASSUME(gBattleMoves[MOVE_HYPER_VOICE].target == MOVE_TARGET_BOTH); + PLAYER(SPECIES_WOBBUFFET); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponentLeft, MOVE_WIDE_GUARD); MOVE(playerLeft, move, target:opponentLeft); } + TURN {} + } SCENE { + MESSAGE("Foe Wobbuffet used Wide Guard!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_WIDE_GUARD, opponentLeft); + if (move == MOVE_TACKLE) { + MESSAGE("Wobbuffet used Tackle!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, playerLeft); + HP_BAR(opponentLeft); + } else if (move == MOVE_HYPER_VOICE) { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_HYPER_VOICE, playerLeft); + MESSAGE("Foe Wobbuffet protected itself!"); + NOT HP_BAR(opponentLeft); + MESSAGE("Foe Wobbuffet protected itself!"); + NOT HP_BAR(opponentRight); + } else { // Surf + MESSAGE("Foe Wobbuffet protected itself!"); + NOT HP_BAR(opponentLeft); + HP_BAR(playerRight); + MESSAGE("Foe Wobbuffet protected itself!"); + NOT HP_BAR(opponentRight); + } + } +} + +DOUBLE_BATTLE_TEST("Quick Guard protects self and ally from priority moves") +{ + u16 move = MOVE_NONE; + struct BattlePokemon *targetOpponent = NULL; + + PARAMETRIZE {move = MOVE_TACKLE; targetOpponent = opponentLeft; } + PARAMETRIZE {move = MOVE_TACKLE; targetOpponent = opponentRight; } + PARAMETRIZE {move = MOVE_QUICK_ATTACK; targetOpponent = opponentLeft; } + PARAMETRIZE {move = MOVE_QUICK_ATTACK; targetOpponent = opponentRight; } + + GIVEN { + ASSUME(gBattleMoves[MOVE_TACKLE].priority == 0); + ASSUME(gBattleMoves[MOVE_QUICK_ATTACK].priority == 1); + PLAYER(SPECIES_WOBBUFFET); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponentLeft, MOVE_QUICK_GUARD); MOVE(playerLeft, move, target:targetOpponent); } + TURN {} + } SCENE { + MESSAGE("Foe Wobbuffet used Quick Guard!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_QUICK_GUARD, opponentLeft); + if (move == MOVE_TACKLE) { + MESSAGE("Wobbuffet used Tackle!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, playerLeft); + HP_BAR(targetOpponent); + } else if (move == MOVE_QUICK_ATTACK) { + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_QUICK_ATTACK, playerLeft); + MESSAGE("Foe Wobbuffet protected itself!"); + NOT HP_BAR(targetOpponent); + } + } +} + +DOUBLE_BATTLE_TEST("Crafty Shield protects self and ally from status moves") +{ + u16 move = MOVE_NONE; + struct BattlePokemon *targetOpponent = NULL; + + PARAMETRIZE {move = MOVE_HYPER_VOICE; } + PARAMETRIZE {move = MOVE_LEER; } + PARAMETRIZE {move = MOVE_TACKLE; targetOpponent = opponentLeft; } + PARAMETRIZE {move = MOVE_TACKLE; targetOpponent = opponentRight; } + + GIVEN { + ASSUME(gBattleMoves[MOVE_LEER].target == MOVE_TARGET_BOTH); + ASSUME(gBattleMoves[MOVE_HYPER_VOICE].target == MOVE_TARGET_BOTH); + ASSUME(gBattleMoves[MOVE_HYPER_VOICE].split == SPLIT_SPECIAL); + PLAYER(SPECIES_WOBBUFFET); + PLAYER(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponentLeft, MOVE_CRAFTY_SHIELD); (move == MOVE_TACKLE) ? MOVE(playerLeft, move, target:targetOpponent) : MOVE(playerLeft, move); } + TURN {} + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_CRAFTY_SHIELD, opponentLeft); + if (move == MOVE_LEER) { + MESSAGE("Wobbuffet used Leer!"); + MESSAGE("Foe Wobbuffet protected itself!"); + NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponentLeft); + MESSAGE("Foe Wobbuffet protected itself!"); + NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponentRight); + } else { + if (move == MOVE_HYPER_VOICE || targetOpponent == opponentLeft) { + NOT MESSAGE("Foe Wobbuffet protected itself!"); + HP_BAR(opponentLeft); + } else if (move == MOVE_HYPER_VOICE || targetOpponent == opponentRight) { + NOT MESSAGE("Foe Wobbuffet protected itself!"); + HP_BAR(opponentRight); + } + } + } +} From 926ae5d0ef141c636cefb948ec2ac96c4592372e Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Thu, 21 Sep 2023 23:05:55 +0200 Subject: [PATCH 02/20] test for #3312 and baneful bunker fix --- data/battle_scripts_1.s | 1 + test/battle/move_effect/protect.c | 46 +++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index e56cc621b93f..14771ed09ad5 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -9341,6 +9341,7 @@ BattleScript_BanefulBunkerEffect:: bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT seteffectsecondary setmoveeffect 0 + orhalfword gMoveResultFlags, MOVE_RESULT_MISSED return BattleScript_CuteCharmActivates:: diff --git a/test/battle/move_effect/protect.c b/test/battle/move_effect/protect.c index 3241f1d808e5..e0a45456c9b6 100644 --- a/test/battle/move_effect/protect.c +++ b/test/battle/move_effect/protect.c @@ -204,6 +204,52 @@ SINGLE_BATTLE_TEST("Recoil is not applied if battler was protected") // #3319 } } +SINGLE_BATTLE_TEST("Multi-hit moves don't hit a protected target and fail only once") // #3312 +{ + u16 move = MOVE_NONE; + + PARAMETRIZE {move = MOVE_PROTECT; } + PARAMETRIZE {move = MOVE_DETECT; } + PARAMETRIZE {move = MOVE_KINGS_SHIELD; } + PARAMETRIZE {move = MOVE_BANEFUL_BUNKER; } + PARAMETRIZE {move = MOVE_SILK_TRAP; } + PARAMETRIZE {move = MOVE_OBSTRUCT; } + PARAMETRIZE {move = MOVE_SPIKY_SHIELD; } + + GIVEN { + ASSUME(gBattleMoves[MOVE_ARM_THRUST].effect == EFFECT_MULTI_HIT); + PLAYER(SPECIES_RAPIDASH); + OPPONENT(SPECIES_BEAUTIFLY); + } WHEN { + TURN { MOVE(opponent, move); MOVE(player, MOVE_ARM_THRUST); } + TURN {} + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, move, opponent); + MESSAGE("Foe Beautifly protected itself!"); + MESSAGE("Rapidash used Arm Thrust!"); + NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_ARM_THRUST, player); + MESSAGE("Foe Beautifly protected itself!"); + // Each effect happens only once. + if (move == MOVE_KINGS_SHIELD || move == MOVE_SILK_TRAP || move == MOVE_OBSTRUCT) { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + } + else if (move == MOVE_SPIKY_SHIELD) { + HP_BAR(player); + NOT HP_BAR(player); + } + else if (move == MOVE_BANEFUL_BUNKER) { + STATUS_ICON(player, STATUS1_POISON); + } + NONE_OF { + MESSAGE("Hit 2 time(s)!"); + MESSAGE("Hit 3 time(s)!"); + MESSAGE("Hit 4 time(s)!"); + MESSAGE("Hit 5 time(s)!"); + } + } +} + DOUBLE_BATTLE_TEST("Wide Guard protects self and ally from multi-target moves") { u16 move = MOVE_NONE; From b5af95cf03be9de8a552618d82765825ed817654 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 23 Sep 2023 10:44:55 +0200 Subject: [PATCH 03/20] Update test/battle/move_effect/protect.c Co-authored-by: Eduardo Quezada D'Ottone --- test/battle/move_effect/protect.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/battle/move_effect/protect.c b/test/battle/move_effect/protect.c index e0a45456c9b6..228d164d2533 100644 --- a/test/battle/move_effect/protect.c +++ b/test/battle/move_effect/protect.c @@ -55,7 +55,12 @@ SINGLE_BATTLE_TEST("Protect, Detect, Spiky Shield, Baneful Bunker protect from m SINGLE_BATTLE_TEST("King's Shield / Silk Trap / Obstruct protect from damaging moves only and lower Atk / Spd / Def by 1 / 1 / 2 for contact moves") { u32 j; - static const u16 protectMoves[][3] = {{MOVE_KINGS_SHIELD, STAT_ATK, 1}, {MOVE_SILK_TRAP, STAT_SPEED, 1}, {MOVE_OBSTRUCT, STAT_DEF, 2}}; + static const u16 protectMoves[][3] = + { // Move Stat Stages + {MOVE_KINGS_SHIELD, STAT_ATK, 1}, + {MOVE_SILK_TRAP, STAT_SPEED, 1}, + {MOVE_OBSTRUCT, STAT_DEF, 2}, + }; u16 protectMove = MOVE_NONE; u16 usedMove = MOVE_NONE; u16 statId = 0, lowersBy = 0; From 6e17678a736aa23dfd2defffe964573a6d097314 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 23 Sep 2023 10:45:15 +0200 Subject: [PATCH 04/20] Update test/battle/move_effect/protect.c Co-authored-by: Eduardo Quezada D'Ottone --- test/battle/move_effect/protect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/battle/move_effect/protect.c b/test/battle/move_effect/protect.c index 228d164d2533..481c05e640da 100644 --- a/test/battle/move_effect/protect.c +++ b/test/battle/move_effect/protect.c @@ -52,7 +52,7 @@ SINGLE_BATTLE_TEST("Protect, Detect, Spiky Shield, Baneful Bunker protect from m } } -SINGLE_BATTLE_TEST("King's Shield / Silk Trap / Obstruct protect from damaging moves only and lower Atk / Spd / Def by 1 / 1 / 2 for contact moves") +SINGLE_BATTLE_TEST("King's Shield, Silk Trap and Obstruct protect from damaging moves and lower stats on contact") { u32 j; static const u16 protectMoves[][3] = From 8acd65e75d5e788ab40927a409c008c297f23f2e Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 23 Sep 2023 10:46:32 +0200 Subject: [PATCH 05/20] Update test/battle/move_effect/protect.c Co-authored-by: Eduardo Quezada D'Ottone --- test/battle/move_effect/protect.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/battle/move_effect/protect.c b/test/battle/move_effect/protect.c index 481c05e640da..8e85c9da9cdf 100644 --- a/test/battle/move_effect/protect.c +++ b/test/battle/move_effect/protect.c @@ -100,6 +100,8 @@ SINGLE_BATTLE_TEST("King's Shield, Silk Trap and Obstruct protect from damaging MESSAGE("Wobbuffet's Defense harshly fell!"); } } + } else { + NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); } } } THEN { From fb5898edcb00e40a8657c43ce9af748a64e42f4b Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 23 Sep 2023 10:46:40 +0200 Subject: [PATCH 06/20] Update test/battle/move_effect/protect.c Co-authored-by: Eduardo Quezada D'Ottone --- test/battle/move_effect/protect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/battle/move_effect/protect.c b/test/battle/move_effect/protect.c index 8e85c9da9cdf..e675b8854801 100644 --- a/test/battle/move_effect/protect.c +++ b/test/battle/move_effect/protect.c @@ -19,7 +19,7 @@ ASSUMPTIONS ASSUME(!(gBattleMoves[MOVE_WATER_GUN].flags & FLAG_MAKES_CONTACT)); } -SINGLE_BATTLE_TEST("Protect, Detect, Spiky Shield, Baneful Bunker protect from moves") +SINGLE_BATTLE_TEST("Protect, Detect, Spiky Shield and Baneful Bunker protect from all moves") { u32 j; static const u16 protectMoves[] = {MOVE_PROTECT, MOVE_DETECT, MOVE_SPIKY_SHIELD, MOVE_BANEFUL_BUNKER}; From e89ac9555a61e88d8383069d8a2f8debe09d4015 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 23 Sep 2023 10:46:50 +0200 Subject: [PATCH 07/20] Update test/battle/move_effect/protect.c Co-authored-by: Eduardo Quezada D'Ottone --- test/battle/move_effect/protect.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/battle/move_effect/protect.c b/test/battle/move_effect/protect.c index e675b8854801..3046844492e6 100644 --- a/test/battle/move_effect/protect.c +++ b/test/battle/move_effect/protect.c @@ -22,7 +22,12 @@ ASSUMPTIONS SINGLE_BATTLE_TEST("Protect, Detect, Spiky Shield and Baneful Bunker protect from all moves") { u32 j; - static const u16 protectMoves[] = {MOVE_PROTECT, MOVE_DETECT, MOVE_SPIKY_SHIELD, MOVE_BANEFUL_BUNKER}; + static const u16 protectMoves[] = { + MOVE_PROTECT, + MOVE_DETECT, + MOVE_SPIKY_SHIELD, + MOVE_BANEFUL_BUNKER, + }; u16 protectMove = MOVE_NONE; u16 usedMove = MOVE_NONE; From c198e16233845eafa8bfd489402cf96e76650860 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 23 Sep 2023 10:46:58 +0200 Subject: [PATCH 08/20] Update test/battle/move_effect/protect.c Co-authored-by: Eduardo Quezada D'Ottone --- test/battle/move_effect/protect.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/battle/move_effect/protect.c b/test/battle/move_effect/protect.c index 3046844492e6..b17af68e50b8 100644 --- a/test/battle/move_effect/protect.c +++ b/test/battle/move_effect/protect.c @@ -266,9 +266,9 @@ DOUBLE_BATTLE_TEST("Wide Guard protects self and ally from multi-target moves") { u16 move = MOVE_NONE; - PARAMETRIZE {move = MOVE_TACKLE; } - PARAMETRIZE {move = MOVE_SURF; } // All targets - PARAMETRIZE {move = MOVE_HYPER_VOICE; } // 2 foes + PARAMETRIZE { move = MOVE_TACKLE; } // Single target + PARAMETRIZE { move = MOVE_SURF; } // All targets + PARAMETRIZE { move = MOVE_HYPER_VOICE; } // 2 foes GIVEN { ASSUME(gBattleMoves[MOVE_TACKLE].target == MOVE_TARGET_SELECTED); From 342f13cd310d48f5d5ff9f75625ac7e536ca70b1 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 23 Sep 2023 10:47:06 +0200 Subject: [PATCH 09/20] Update test/battle/move_effect/protect.c Co-authored-by: Eduardo Quezada D'Ottone --- test/battle/move_effect/protect.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/battle/move_effect/protect.c b/test/battle/move_effect/protect.c index b17af68e50b8..5b0db451a443 100644 --- a/test/battle/move_effect/protect.c +++ b/test/battle/move_effect/protect.c @@ -220,13 +220,13 @@ SINGLE_BATTLE_TEST("Multi-hit moves don't hit a protected target and fail only o { u16 move = MOVE_NONE; - PARAMETRIZE {move = MOVE_PROTECT; } - PARAMETRIZE {move = MOVE_DETECT; } - PARAMETRIZE {move = MOVE_KINGS_SHIELD; } - PARAMETRIZE {move = MOVE_BANEFUL_BUNKER; } - PARAMETRIZE {move = MOVE_SILK_TRAP; } - PARAMETRIZE {move = MOVE_OBSTRUCT; } - PARAMETRIZE {move = MOVE_SPIKY_SHIELD; } + PARAMETRIZE { move = MOVE_PROTECT; } + PARAMETRIZE { move = MOVE_DETECT; } + PARAMETRIZE { move = MOVE_KINGS_SHIELD; } + PARAMETRIZE { move = MOVE_BANEFUL_BUNKER; } + PARAMETRIZE { move = MOVE_SILK_TRAP; } + PARAMETRIZE { move = MOVE_OBSTRUCT; } + PARAMETRIZE { move = MOVE_SPIKY_SHIELD; } GIVEN { ASSUME(gBattleMoves[MOVE_ARM_THRUST].effect == EFFECT_MULTI_HIT); From 14810ec34c889a286505d19b9bc504ac2611d9ce Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 23 Sep 2023 10:47:12 +0200 Subject: [PATCH 10/20] Update test/battle/move_effect/protect.c Co-authored-by: Eduardo Quezada D'Ottone --- test/battle/move_effect/protect.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/battle/move_effect/protect.c b/test/battle/move_effect/protect.c index 5b0db451a443..37a28e9dc3dc 100644 --- a/test/battle/move_effect/protect.c +++ b/test/battle/move_effect/protect.c @@ -187,13 +187,13 @@ SINGLE_BATTLE_TEST("Recoil is not applied if battler was protected") // #3319 { u16 move = MOVE_NONE; - PARAMETRIZE {move = MOVE_PROTECT; } - PARAMETRIZE {move = MOVE_DETECT; } - PARAMETRIZE {move = MOVE_KINGS_SHIELD; } - PARAMETRIZE {move = MOVE_BANEFUL_BUNKER; } - PARAMETRIZE {move = MOVE_SILK_TRAP; } - PARAMETRIZE {move = MOVE_OBSTRUCT; } - PARAMETRIZE {move = MOVE_SPIKY_SHIELD; } + PARAMETRIZE { move = MOVE_PROTECT; } + PARAMETRIZE { move = MOVE_DETECT; } + PARAMETRIZE { move = MOVE_KINGS_SHIELD; } + PARAMETRIZE { move = MOVE_BANEFUL_BUNKER; } + PARAMETRIZE { move = MOVE_SILK_TRAP; } + PARAMETRIZE { move = MOVE_OBSTRUCT; } + PARAMETRIZE { move = MOVE_SPIKY_SHIELD; } GIVEN { ASSUME(gBattleMoves[MOVE_DOUBLE_EDGE].effect == EFFECT_RECOIL_33); From dbfb5911964eef7e6ef6e56f39b9a34a3f65bd39 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 23 Sep 2023 10:47:20 +0200 Subject: [PATCH 11/20] Update test/battle/move_effect/protect.c Co-authored-by: Eduardo Quezada D'Ottone --- test/battle/move_effect/protect.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/battle/move_effect/protect.c b/test/battle/move_effect/protect.c index 37a28e9dc3dc..0c67bf6ac68a 100644 --- a/test/battle/move_effect/protect.c +++ b/test/battle/move_effect/protect.c @@ -122,10 +122,10 @@ SINGLE_BATTLE_TEST("Spiky Shield does 1/8 dmg of max hp for moves making contact u16 usedMove = MOVE_NONE; u16 hp = 400, maxHp = 400; - PARAMETRIZE {usedMove = MOVE_TACKLE; hp = 1;} - PARAMETRIZE {usedMove = MOVE_TACKLE;} - PARAMETRIZE {usedMove = MOVE_LEER;} - PARAMETRIZE {usedMove = MOVE_WATER_GUN;} + PARAMETRIZE { usedMove = MOVE_TACKLE; hp = 1;} + PARAMETRIZE { usedMove = MOVE_TACKLE;} + PARAMETRIZE { usedMove = MOVE_LEER;} + PARAMETRIZE { usedMove = MOVE_WATER_GUN;} GIVEN { PLAYER(SPECIES_WOBBUFFET) {HP(hp); MaxHP(maxHp); } From 30b9ada51bdc7f4160df6191dea0dfd1e77b5b87 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 23 Sep 2023 10:47:26 +0200 Subject: [PATCH 12/20] Update test/battle/move_effect/protect.c Co-authored-by: Eduardo Quezada D'Ottone --- test/battle/move_effect/protect.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/battle/move_effect/protect.c b/test/battle/move_effect/protect.c index 0c67bf6ac68a..5bbbe339d7f7 100644 --- a/test/battle/move_effect/protect.c +++ b/test/battle/move_effect/protect.c @@ -33,9 +33,9 @@ SINGLE_BATTLE_TEST("Protect, Detect, Spiky Shield and Baneful Bunker protect fro for (j = 0; j < ARRAY_COUNT(protectMoves); j++) { - PARAMETRIZE {protectMove = protectMoves[j]; usedMove = MOVE_TACKLE; } - PARAMETRIZE {protectMove = protectMoves[j]; usedMove = MOVE_LEER; } - PARAMETRIZE {protectMove = protectMoves[j]; usedMove = MOVE_WATER_GUN; } + PARAMETRIZE { protectMove = protectMoves[j]; usedMove = MOVE_TACKLE; } + PARAMETRIZE { protectMove = protectMoves[j]; usedMove = MOVE_LEER; } + PARAMETRIZE { protectMove = protectMoves[j]; usedMove = MOVE_WATER_GUN; } } GIVEN { From 3b0ed8f65f9e20a75e726d317d61b6a38a818a66 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 25 Sep 2023 09:03:14 +0200 Subject: [PATCH 13/20] Update test/battle/move_effect/protect.c Co-authored-by: Eduardo Quezada D'Ottone --- test/battle/move_effect/protect.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/battle/move_effect/protect.c b/test/battle/move_effect/protect.c index 5bbbe339d7f7..f1cda6a3e7b9 100644 --- a/test/battle/move_effect/protect.c +++ b/test/battle/move_effect/protect.c @@ -107,6 +107,8 @@ SINGLE_BATTLE_TEST("King's Shield, Silk Trap and Obstruct protect from damaging } } else { NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + } else { + NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); } } } THEN { From 64412ce6f9cda9aa36c91f762b661f8ba479ff1f Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 25 Sep 2023 09:03:26 +0200 Subject: [PATCH 14/20] Update test/battle/move_effect/protect.c Co-authored-by: Eduardo Quezada D'Ottone --- test/battle/move_effect/protect.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/battle/move_effect/protect.c b/test/battle/move_effect/protect.c index f1cda6a3e7b9..943aba7ae42f 100644 --- a/test/battle/move_effect/protect.c +++ b/test/battle/move_effect/protect.c @@ -72,9 +72,9 @@ SINGLE_BATTLE_TEST("King's Shield, Silk Trap and Obstruct protect from damaging for (j = 0; j < ARRAY_COUNT(protectMoves); j++) { - PARAMETRIZE {protectMove = protectMoves[j][0]; statId = protectMoves[j][1]; lowersBy = protectMoves[j][2]; usedMove = MOVE_TACKLE; } - PARAMETRIZE {protectMove = protectMoves[j][0]; usedMove = MOVE_LEER; } - PARAMETRIZE {protectMove = protectMoves[j][0]; usedMove = MOVE_WATER_GUN; } + PARAMETRIZE { usedMove = MOVE_TACKLE; protectMove = protectMoves[j][0]; statId = protectMoves[j][1]; lowersBy = protectMoves[j][2]; } + PARAMETRIZE { usedMove = MOVE_LEER; protectMove = protectMoves[j][0]; statId = 0; lowersBy = 0; } + PARAMETRIZE { usedMove = MOVE_WATER_GUN; protectMove = protectMoves[j][0]; statId = 0; lowersBy = 0; } } GIVEN { From 41f6b7a6bf4ccfbd7c5418f9df12499b95a22af2 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 25 Sep 2023 09:03:51 +0200 Subject: [PATCH 15/20] Update test/battle/move_effect/protect.c Co-authored-by: Eduardo Quezada D'Ottone --- test/battle/move_effect/protect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/battle/move_effect/protect.c b/test/battle/move_effect/protect.c index 943aba7ae42f..54c5fb5ab758 100644 --- a/test/battle/move_effect/protect.c +++ b/test/battle/move_effect/protect.c @@ -185,7 +185,7 @@ SINGLE_BATTLE_TEST("Baneful Bunker poisons pokemon for moves making contact") } } -SINGLE_BATTLE_TEST("Recoil is not applied if battler was protected") // #3319 +SINGLE_BATTLE_TEST("Recoil damage is not applied if target was protected") { u16 move = MOVE_NONE; From 964fb2222083df2b2819b7f9b29571c25b8cd43b Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 25 Sep 2023 09:05:22 +0200 Subject: [PATCH 16/20] Update test/battle/move_effect/protect.c Co-authored-by: Eduardo Quezada D'Ottone --- test/battle/move_effect/protect.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/battle/move_effect/protect.c b/test/battle/move_effect/protect.c index 54c5fb5ab758..48fc2bbad7c2 100644 --- a/test/battle/move_effect/protect.c +++ b/test/battle/move_effect/protect.c @@ -346,10 +346,10 @@ DOUBLE_BATTLE_TEST("Crafty Shield protects self and ally from status moves") u16 move = MOVE_NONE; struct BattlePokemon *targetOpponent = NULL; - PARAMETRIZE {move = MOVE_HYPER_VOICE; } - PARAMETRIZE {move = MOVE_LEER; } - PARAMETRIZE {move = MOVE_TACKLE; targetOpponent = opponentLeft; } - PARAMETRIZE {move = MOVE_TACKLE; targetOpponent = opponentRight; } + PARAMETRIZE { move = MOVE_HYPER_VOICE; } + PARAMETRIZE { move = MOVE_LEER; } + PARAMETRIZE { move = MOVE_TACKLE; targetOpponent = opponentLeft; } + PARAMETRIZE { move = MOVE_TACKLE; targetOpponent = opponentRight; } GIVEN { ASSUME(gBattleMoves[MOVE_LEER].target == MOVE_TARGET_BOTH); From c21c2088dcb3e00698947980f8eca6dd1afd8584 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 25 Sep 2023 09:05:35 +0200 Subject: [PATCH 17/20] Update test/battle/move_effect/protect.c Co-authored-by: Eduardo Quezada D'Ottone --- test/battle/move_effect/protect.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/battle/move_effect/protect.c b/test/battle/move_effect/protect.c index 48fc2bbad7c2..ba37485e5440 100644 --- a/test/battle/move_effect/protect.c +++ b/test/battle/move_effect/protect.c @@ -311,10 +311,10 @@ DOUBLE_BATTLE_TEST("Quick Guard protects self and ally from priority moves") u16 move = MOVE_NONE; struct BattlePokemon *targetOpponent = NULL; - PARAMETRIZE {move = MOVE_TACKLE; targetOpponent = opponentLeft; } - PARAMETRIZE {move = MOVE_TACKLE; targetOpponent = opponentRight; } - PARAMETRIZE {move = MOVE_QUICK_ATTACK; targetOpponent = opponentLeft; } - PARAMETRIZE {move = MOVE_QUICK_ATTACK; targetOpponent = opponentRight; } + PARAMETRIZE { move = MOVE_TACKLE; targetOpponent = opponentLeft; } + PARAMETRIZE { move = MOVE_TACKLE; targetOpponent = opponentRight; } + PARAMETRIZE { move = MOVE_QUICK_ATTACK; targetOpponent = opponentLeft; } + PARAMETRIZE { move = MOVE_QUICK_ATTACK; targetOpponent = opponentRight; } GIVEN { ASSUME(gBattleMoves[MOVE_TACKLE].priority == 0); From e3e5d3aa1551374744b7df5a69ac227106eba72e Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 25 Sep 2023 09:50:32 +0200 Subject: [PATCH 18/20] more recoil moves for protect test --- test/battle/move_effect/protect.c | 34 ++++++++++++++++++------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/test/battle/move_effect/protect.c b/test/battle/move_effect/protect.c index ba37485e5440..01b37166b29c 100644 --- a/test/battle/move_effect/protect.c +++ b/test/battle/move_effect/protect.c @@ -107,8 +107,6 @@ SINGLE_BATTLE_TEST("King's Shield, Silk Trap and Obstruct protect from damaging } } else { NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); - } else { - NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); } } } THEN { @@ -187,33 +185,41 @@ SINGLE_BATTLE_TEST("Baneful Bunker poisons pokemon for moves making contact") SINGLE_BATTLE_TEST("Recoil damage is not applied if target was protected") { - u16 move = MOVE_NONE; + u32 j, k; + static const u16 protectMoves[] = { MOVE_PROTECT, MOVE_DETECT, MOVE_KINGS_SHIELD, MOVE_BANEFUL_BUNKER, MOVE_SILK_TRAP, MOVE_OBSTRUCT, MOVE_SPIKY_SHIELD }; + static const u16 recoilMoves[] = { MOVE_VOLT_TACKLE, MOVE_HEAD_SMASH, MOVE_TAKE_DOWN, MOVE_DOUBLE_EDGE }; + u16 protectMove = MOVE_NONE; + u16 recoilMove = MOVE_NONE; + + for (j = 0; j < ARRAY_COUNT(protectMoves); j++) + { + for (k = 0; k < ARRAY_COUNT(recoilMoves); k++) + { + PARAMETRIZE { protectMove = protectMoves[j]; recoilMove = recoilMoves[k]; } + } + } - PARAMETRIZE { move = MOVE_PROTECT; } - PARAMETRIZE { move = MOVE_DETECT; } - PARAMETRIZE { move = MOVE_KINGS_SHIELD; } - PARAMETRIZE { move = MOVE_BANEFUL_BUNKER; } - PARAMETRIZE { move = MOVE_SILK_TRAP; } - PARAMETRIZE { move = MOVE_OBSTRUCT; } - PARAMETRIZE { move = MOVE_SPIKY_SHIELD; } GIVEN { + ASSUME(gBattleMoves[MOVE_VOLT_TACKLE].effect == EFFECT_RECOIL_33_STATUS); + ASSUME(gBattleMoves[MOVE_HEAD_SMASH].effect == EFFECT_RECOIL_50); + ASSUME(gBattleMoves[MOVE_TAKE_DOWN].effect == EFFECT_RECOIL_25); ASSUME(gBattleMoves[MOVE_DOUBLE_EDGE].effect == EFFECT_RECOIL_33); PLAYER(SPECIES_RAPIDASH); OPPONENT(SPECIES_BEAUTIFLY); } WHEN { TURN { MOVE(opponent, MOVE_TACKLE); MOVE(player, MOVE_TACKLE); } - TURN { MOVE(opponent, move); MOVE(player, MOVE_DOUBLE_EDGE); } + TURN { MOVE(opponent, protectMove); MOVE(player, recoilMove); } TURN {} } SCENE { // 1st turn MESSAGE("Foe Beautifly used Tackle!"); MESSAGE("Rapidash used Tackle!"); // 2nd turn - ANIMATION(ANIM_TYPE_MOVE, move, opponent); + ANIMATION(ANIM_TYPE_MOVE, protectMove, opponent); MESSAGE("Foe Beautifly protected itself!"); - MESSAGE("Rapidash used Double-Edge!"); - NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_DOUBLE_EDGE, player); + // MESSAGE("Rapidash used recoilMove!"); + NOT ANIMATION(ANIM_TYPE_MOVE, recoilMove, player); NOT MESSAGE("Rapidash is hit with recoil!"); } } From 1bc043426bc0b1e316962ab4bf2598a98fef8185 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 25 Sep 2023 23:29:02 +0200 Subject: [PATCH 19/20] Update test/battle/move_effect/protect.c Co-authored-by: Eduardo Quezada D'Ottone --- test/battle/move_effect/protect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/battle/move_effect/protect.c b/test/battle/move_effect/protect.c index 01b37166b29c..aa0cf97c76f7 100644 --- a/test/battle/move_effect/protect.c +++ b/test/battle/move_effect/protect.c @@ -224,7 +224,7 @@ SINGLE_BATTLE_TEST("Recoil damage is not applied if target was protected") } } -SINGLE_BATTLE_TEST("Multi-hit moves don't hit a protected target and fail only once") // #3312 +SINGLE_BATTLE_TEST("Multi-hit moves don't hit a protected target and fail only once") { u16 move = MOVE_NONE; From e993488cb0c69f91e1655d613bf1e22edd8fed5d Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Tue, 26 Sep 2023 09:10:55 +0200 Subject: [PATCH 20/20] rename spiky shield test --- test/battle/move_effect/protect.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/battle/move_effect/protect.c b/test/battle/move_effect/protect.c index aa0cf97c76f7..bd7a7329294f 100644 --- a/test/battle/move_effect/protect.c +++ b/test/battle/move_effect/protect.c @@ -116,8 +116,7 @@ SINGLE_BATTLE_TEST("King's Shield, Silk Trap and Obstruct protect from damaging } } -// Also checks if it can faint the mon. -SINGLE_BATTLE_TEST("Spiky Shield does 1/8 dmg of max hp for moves making contact") +SINGLE_BATTLE_TEST("Spiky Shield does 1/8 dmg of max hp of attackers making contact and may faint them") { u16 usedMove = MOVE_NONE; u16 hp = 400, maxHp = 400;