diff --git a/include/config/test.h b/include/config/test.h index 2fec28c951..b74399ebe8 100644 --- a/include/config/test.h +++ b/include/config/test.h @@ -1140,4 +1140,8 @@ // Move animation testing #define T_SHOULD_RUN_MOVE_ANIM FALSE // If TRUE, enables the move animation tests, these are very computationally heavy and takes a long time to run. +#define ANIM_TEST_START_MOVE 1 // First move to test +#define ANIM_TEST_END_MOVE MOVES_COUNT-1 // Last move to test + + #endif // GUARD_CONFIG_TEST_H diff --git a/test/battle/move_animations/all_anims.c b/test/battle/move_animations/all_anims.c index dfba4eb185..553bd1ab8e 100644 --- a/test/battle/move_animations/all_anims.c +++ b/test/battle/move_animations/all_anims.c @@ -359,24 +359,26 @@ static void DoublesScene(u32 move, struct BattlePokemon *attacker) } } +static void SameSideTargeting(u32 move, struct BattlePokemon *attacker) +{ + // Don't know how to make sure this is correct, some moves don't display +} + SINGLE_BATTLE_TEST("Move Animations don't leak when used - Singles (player to opponent)") { - u32 j = 1, move = 0, species = 0; + u32 j = ANIM_TEST_START_MOVE, move = 0, species = 0; + u32 tempMove, tempSpecies; FORCE_MOVE_ANIM(TRUE); - for (; j < MOVES_COUNT; j++) - { - ParametrizeMovesAndSpecies(j, &move, &species); - PARAMETRIZE { move = move; species = species; } + for (; j <= ANIM_TEST_END_MOVE; j++) { + ParametrizeMovesAndSpecies(j, &tempMove, &tempSpecies); + PARAMETRIZE { move = tempMove; species = tempSpecies; } } GIVEN { PLAYER(species) { HP(9997); MaxHP(9999); Item(ITEM_ORAN_BERRY); - if (species == SPECIES_WOBBUFFET) - Gender(MON_FEMALE); - if (gMovesInfo[move].effect == EFFECT_LAST_RESORT) - Moves(move, MOVE_POUND); - if (species == SPECIES_KLINKLANG) - Ability(ABILITY_PLUS); + if (species == SPECIES_WOBBUFFET) Gender(MON_FEMALE); + if (gMovesInfo[move].effect == EFFECT_LAST_RESORT) Moves(move, MOVE_POUND); + if (species == SPECIES_KLINKLANG) Ability(ABILITY_PLUS); } PLAYER(SPECIES_WOBBUFFET) { Gender(MON_MALE); MaxHP(9999); Moves(MOVE_POUND); @@ -402,22 +404,19 @@ SINGLE_BATTLE_TEST("Move Animations don't leak when used - Singles (player to op SINGLE_BATTLE_TEST("Move Animations don't leak when used - Singles (opponent to player)") { - u32 j = 1, move = 0, species = 0; + u32 j = ANIM_TEST_START_MOVE, move = 0, species = 0; + u32 tempMove, tempSpecies; FORCE_MOVE_ANIM(TRUE); - for (; j < MOVES_COUNT; j++) - { - ParametrizeMovesAndSpecies(j, &move, &species); - PARAMETRIZE { move = move; species = species; } + for (; j <= ANIM_TEST_END_MOVE; j++) { + ParametrizeMovesAndSpecies(j, &tempMove, &tempSpecies); + PARAMETRIZE { move = tempMove; species = tempSpecies; } } GIVEN { OPPONENT(species) { HP(9997); MaxHP(9999); Item(ITEM_ORAN_BERRY); - if (species == SPECIES_WOBBUFFET) - Gender(MON_FEMALE); - if (gMovesInfo[move].effect == EFFECT_LAST_RESORT) - Moves(move, MOVE_POUND); - if (species == SPECIES_KLINKLANG) - Ability(ABILITY_PLUS); + if (species == SPECIES_WOBBUFFET) Gender(MON_FEMALE); + if (gMovesInfo[move].effect == EFFECT_LAST_RESORT) Moves(move, MOVE_POUND); + if (species == SPECIES_KLINKLANG) Ability(ABILITY_PLUS); } OPPONENT(SPECIES_WOBBUFFET) { Gender(MON_MALE); MaxHP(9999); Moves(MOVE_POUND); @@ -443,39 +442,33 @@ SINGLE_BATTLE_TEST("Move Animations don't leak when used - Singles (opponent to DOUBLE_BATTLE_TEST("Move Animations don't leak when used - Doubles (playerLeft to opponentLeft)") { - u32 j = 1, move = 0, species = 0; + u32 j = ANIM_TEST_START_MOVE, move = 0, species = 0; + u32 tempMove, tempSpecies; FORCE_MOVE_ANIM(TRUE); struct BattlePokemon *attacker = playerLeft; struct BattlePokemon *target = opponentLeft; struct BattlePokemon *ignore1 = playerRight; struct BattlePokemon *ignore2 = opponentRight; - for (; j < MOVES_COUNT; j++) - { - ParametrizeMovesAndSpecies(j, &move, &species); - PARAMETRIZE { move = move; species = species; } + for (; j <= ANIM_TEST_END_MOVE; j++) { + ParametrizeMovesAndSpecies(j, &tempMove, &tempSpecies); + PARAMETRIZE { move = tempMove; species = tempSpecies; } } GIVEN { PLAYER(species) { HP(9997); MaxHP(9999); Item(ITEM_ORAN_BERRY); if (attacker == playerLeft) { - if (species == SPECIES_WOBBUFFET) - Gender(MON_FEMALE); - if (gMovesInfo[move].effect == EFFECT_LAST_RESORT) - Moves(move, MOVE_POUND); - if (species == SPECIES_KLINKLANG) - Ability(ABILITY_PLUS); + if (species == SPECIES_WOBBUFFET) Gender(MON_FEMALE); + if (gMovesInfo[move].effect == EFFECT_LAST_RESORT) Moves(move, MOVE_POUND); + if (species == SPECIES_KLINKLANG) Ability(ABILITY_PLUS); } } PLAYER(species) { HP(9997); MaxHP(9999); Item(ITEM_ORAN_BERRY); if (attacker == playerRight) { - if (species == SPECIES_WOBBUFFET) - Gender(MON_FEMALE); - if (gMovesInfo[move].effect == EFFECT_LAST_RESORT) - Moves(move, MOVE_POUND); - if (species == SPECIES_KLINKLANG) - Ability(ABILITY_PLUS); + if (species == SPECIES_WOBBUFFET) Gender(MON_FEMALE); + if (gMovesInfo[move].effect == EFFECT_LAST_RESORT) Moves(move, MOVE_POUND); + if (species == SPECIES_KLINKLANG) Ability(ABILITY_PLUS); } } PLAYER(SPECIES_WOBBUFFET) { @@ -507,15 +500,16 @@ DOUBLE_BATTLE_TEST("Move Animations don't leak when used - Doubles (playerLeft t DOUBLE_BATTLE_TEST("Move Animations don't leak when used - Doubles (opponentLeft to playerLeft)") { - u32 j = 1, move = 0, species = 0; + u32 j = ANIM_TEST_START_MOVE, move = 0, species = 0; + u32 tempMove, tempSpecies; FORCE_MOVE_ANIM(TRUE); struct BattlePokemon *attacker = opponentLeft; struct BattlePokemon *target = playerLeft; struct BattlePokemon *ignore1 = opponentRight; struct BattlePokemon *ignore2 = playerRight; - for (; j < MOVES_COUNT; j++) { - ParametrizeMovesAndSpecies(j, &move, &species); - PARAMETRIZE { move = move; species = species; } + for (; j <= ANIM_TEST_END_MOVE; j++) { + ParametrizeMovesAndSpecies(j, &tempMove, &tempSpecies); + PARAMETRIZE { move = tempMove; species = tempSpecies; } } GIVEN { OPPONENT(species) { @@ -565,15 +559,16 @@ DOUBLE_BATTLE_TEST("Move Animations don't leak when used - Doubles (opponentLeft DOUBLE_BATTLE_TEST("Move Animations don't leak when used - Doubles (playerLeft to opponentRight)") { - u32 j = 1, move = 0, species = 0; + u32 j = ANIM_TEST_START_MOVE, move = 0, species = 0; + u32 tempMove, tempSpecies; FORCE_MOVE_ANIM(TRUE); struct BattlePokemon *attacker = playerLeft; struct BattlePokemon *target = opponentRight; struct BattlePokemon *ignore1 = playerRight; struct BattlePokemon *ignore2 = opponentLeft; - for (; j < MOVES_COUNT; j++) { - ParametrizeMovesAndSpecies(j, &move, &species); - PARAMETRIZE { move = move; species = species; } + for (; j <= ANIM_TEST_END_MOVE; j++) { + ParametrizeMovesAndSpecies(j, &tempMove, &tempSpecies); + PARAMETRIZE { move = tempMove; species = tempSpecies; } } GIVEN { PLAYER(species) { @@ -623,15 +618,16 @@ DOUBLE_BATTLE_TEST("Move Animations don't leak when used - Doubles (playerLeft t DOUBLE_BATTLE_TEST("Move Animations don't leak when used - Doubles (opponentRight to playerLeft)") { - u32 j = 1, move = 0, species = 0; + u32 j = ANIM_TEST_START_MOVE, move = 0, species = 0; + u32 tempMove, tempSpecies; FORCE_MOVE_ANIM(TRUE); struct BattlePokemon *attacker = opponentRight; struct BattlePokemon *target = playerLeft; struct BattlePokemon *ignore1 = opponentLeft; struct BattlePokemon *ignore2 = playerRight; - for (; j < MOVES_COUNT; j++) { - ParametrizeMovesAndSpecies(j, &move, &species); - PARAMETRIZE { move = move; species = species; } + for (; j <= ANIM_TEST_END_MOVE; j++) { + ParametrizeMovesAndSpecies(j, &tempMove, &tempSpecies); + PARAMETRIZE { move = tempMove; species = tempSpecies; } } GIVEN { OPPONENT(species) { @@ -681,15 +677,16 @@ DOUBLE_BATTLE_TEST("Move Animations don't leak when used - Doubles (opponentRigh DOUBLE_BATTLE_TEST("Move Animations don't leak when used - Doubles (playerRight to opponentLeft)") { - u32 j = 1, move = 0, species = 0; + u32 j = ANIM_TEST_START_MOVE, move = 0, species = 0; + u32 tempMove, tempSpecies; FORCE_MOVE_ANIM(TRUE); struct BattlePokemon *attacker = playerRight; struct BattlePokemon *target = opponentLeft; struct BattlePokemon *ignore1 = playerLeft; struct BattlePokemon *ignore2 = opponentRight; - for (; j < MOVES_COUNT; j++) { - ParametrizeMovesAndSpecies(j, &move, &species); - PARAMETRIZE { move = move; species = species; } + for (; j <= ANIM_TEST_END_MOVE; j++) { + ParametrizeMovesAndSpecies(j, &tempMove, &tempSpecies); + PARAMETRIZE { move = tempMove; species = tempSpecies; } } GIVEN { PLAYER(species) { @@ -739,15 +736,16 @@ DOUBLE_BATTLE_TEST("Move Animations don't leak when used - Doubles (playerRight DOUBLE_BATTLE_TEST("Move Animations don't leak when used - Doubles (opponentLeft to playerRight)") { - u32 j = 1, move = 0, species = 0; + u32 j = ANIM_TEST_START_MOVE, move = 0, species = 0; + u32 tempMove, tempSpecies; FORCE_MOVE_ANIM(TRUE); struct BattlePokemon *attacker = opponentLeft; struct BattlePokemon *target = playerRight; struct BattlePokemon *ignore1 = playerLeft; struct BattlePokemon *ignore2 = opponentRight; - for (; j < MOVES_COUNT; j++) { - ParametrizeMovesAndSpecies(j, &move, &species); - PARAMETRIZE { move = move; species = species; } + for (; j <= ANIM_TEST_END_MOVE; j++) { + ParametrizeMovesAndSpecies(j, &tempMove, &tempSpecies); + PARAMETRIZE { move = tempMove; species = tempSpecies; } } GIVEN { OPPONENT(species) { @@ -797,15 +795,16 @@ DOUBLE_BATTLE_TEST("Move Animations don't leak when used - Doubles (opponentLeft DOUBLE_BATTLE_TEST("Move Animations don't leak when used - Doubles (playerRight to opponentRight)") { - u32 j = 1, move = 0, species = 0; + u32 j = ANIM_TEST_START_MOVE, move = 0, species = 0; + u32 tempMove, tempSpecies; FORCE_MOVE_ANIM(TRUE); struct BattlePokemon *attacker = playerRight; struct BattlePokemon *target = opponentRight; struct BattlePokemon *ignore1 = playerLeft; struct BattlePokemon *ignore2 = opponentLeft; - for (; j < MOVES_COUNT; j++) { - ParametrizeMovesAndSpecies(j, &move, &species); - PARAMETRIZE { move = move; species = species; } + for (; j <= ANIM_TEST_END_MOVE; j++) { + ParametrizeMovesAndSpecies(j, &tempMove, &tempSpecies); + PARAMETRIZE { move = tempMove; species = tempSpecies; } } GIVEN { PLAYER(species) { @@ -855,15 +854,16 @@ DOUBLE_BATTLE_TEST("Move Animations don't leak when used - Doubles (playerRight DOUBLE_BATTLE_TEST("Move Animations don't leak when used - Doubles (opponentRight to playerRight)") { - u32 j = 1, move = 0, species = 0; + u32 j = ANIM_TEST_START_MOVE, move = 0, species = 0; + u32 tempMove, tempSpecies; FORCE_MOVE_ANIM(TRUE); struct BattlePokemon *attacker = opponentRight; struct BattlePokemon *target = playerRight; struct BattlePokemon *ignore1 = playerLeft; struct BattlePokemon *ignore2 = opponentLeft; - for (; j < MOVES_COUNT; j++) { - ParametrizeMovesAndSpecies(j, &move, &species); - PARAMETRIZE { move = move; species = species; } + for (; j <= ANIM_TEST_END_MOVE; j++) { + ParametrizeMovesAndSpecies(j, &tempMove, &tempSpecies); + PARAMETRIZE { move = tempMove; species = tempSpecies; } } GIVEN { OPPONENT(species) { @@ -911,4 +911,242 @@ DOUBLE_BATTLE_TEST("Move Animations don't leak when used - Doubles (opponentRigh } } +/* +DOUBLE_BATTLE_TEST("Move Animations don't leak when used - Doubles (playerLeft to playerRight)") +{ + u32 j = ANIM_TEST_START_MOVE, move = 0, species = 0; + u32 tempMove, tempSpecies; + FORCE_MOVE_ANIM(TRUE); + struct BattlePokemon *attacker = playerLeft; + struct BattlePokemon *target = playerRight; + struct BattlePokemon *ignore1 = opponentRight; + struct BattlePokemon *ignore2 = opponentLeft; + for (; j <= ANIM_TEST_END_MOVE; j++) { + ParametrizeMovesAndSpecies(j, &tempMove, &tempSpecies); + PARAMETRIZE { move = tempMove; species = tempSpecies; } + } + GIVEN { + OPPONENT(species) { + HP(9997); MaxHP(9999); Item(ITEM_ORAN_BERRY); + if (attacker == opponentLeft) { + if (species == SPECIES_WOBBUFFET) Gender(MON_FEMALE); + if (gMovesInfo[move].effect == EFFECT_LAST_RESORT) Moves(move, MOVE_POUND); + if (species == SPECIES_KLINKLANG) Ability(ABILITY_PLUS); + } + } + OPPONENT(species) { + HP(9997); MaxHP(9999); Item(ITEM_ORAN_BERRY); + if (attacker == opponentRight) { + if (species == SPECIES_WOBBUFFET) Gender(MON_FEMALE); + if (gMovesInfo[move].effect == EFFECT_LAST_RESORT) Moves(move, MOVE_POUND); + if (species == SPECIES_KLINKLANG) Ability(ABILITY_PLUS); + } + } + OPPONENT(SPECIES_WOBBUFFET) { + Gender(MON_MALE); MaxHP(9999); Moves(MOVE_POUND, MOVE_CELEBRATE); + HP(gMovesInfo[move].effect == EFFECT_REVIVAL_BLESSING ? 0 : 9998); + } + PLAYER(SPECIES_WOBBUFFET) { + Gender(MON_MALE); HP(9998); MaxHP(9999); SpDefense(9999); Defense(9999); Ability(ABILITY_TELEPATHY); + if (gMovesInfo[move].effect != EFFECT_BESTOW) { + Item(ITEM_ORAN_BERRY); + } + } + PLAYER(SPECIES_WOBBUFFET) { + Gender(MON_MALE); HP(9998); MaxHP(9999); SpDefense(9999); Defense(9999); Ability(ABILITY_TELEPATHY); + if (gMovesInfo[move].effect != EFFECT_BESTOW) { + Item(ITEM_ORAN_BERRY); + } + } + PLAYER(SPECIES_WOBBUFFET) { Gender(MON_FEMALE); HP(9998); MaxHP(9999); SpDefense(9999); Defense(9999); } + } WHEN { + DoublesWhen(move, attacker, target, ignore1, ignore2); + } SCENE { + SameSideTargeting(move, attacker); + } THEN { + FORCE_MOVE_ANIM(FALSE); + if (gLoadFail) + DebugPrintf("Move failed: %S (%u)", gMovesInfo[move].name, move); + EXPECT_EQ(gLoadFail, FALSE); + } +} + +DOUBLE_BATTLE_TEST("Move Animations don't leak when used - Doubles (playerRight to playerLeft)") +{ + u32 j = ANIM_TEST_START_MOVE, move = 0, species = 0; + u32 tempMove, tempSpecies; + FORCE_MOVE_ANIM(TRUE); + struct BattlePokemon *attacker = playerRight; + struct BattlePokemon *target = playerLeft; + struct BattlePokemon *ignore1 = opponentRight; + struct BattlePokemon *ignore2 = opponentLeft; + for (; j <= ANIM_TEST_END_MOVE; j++) { + ParametrizeMovesAndSpecies(j, &tempMove, &tempSpecies); + PARAMETRIZE { move = tempMove; species = tempSpecies; } + } + GIVEN { + OPPONENT(species) { + HP(9997); MaxHP(9999); Item(ITEM_ORAN_BERRY); + if (attacker == opponentLeft) { + if (species == SPECIES_WOBBUFFET) Gender(MON_FEMALE); + if (gMovesInfo[move].effect == EFFECT_LAST_RESORT) Moves(move, MOVE_POUND); + if (species == SPECIES_KLINKLANG) Ability(ABILITY_PLUS); + } + } + OPPONENT(species) { + HP(9997); MaxHP(9999); Item(ITEM_ORAN_BERRY); + if (attacker == opponentRight) { + if (species == SPECIES_WOBBUFFET) Gender(MON_FEMALE); + if (gMovesInfo[move].effect == EFFECT_LAST_RESORT) Moves(move, MOVE_POUND); + if (species == SPECIES_KLINKLANG) Ability(ABILITY_PLUS); + } + } + OPPONENT(SPECIES_WOBBUFFET) { + Gender(MON_MALE); MaxHP(9999); Moves(MOVE_POUND, MOVE_CELEBRATE); + HP(gMovesInfo[move].effect == EFFECT_REVIVAL_BLESSING ? 0 : 9998); + } + PLAYER(SPECIES_WOBBUFFET) { + Gender(MON_MALE); HP(9998); MaxHP(9999); SpDefense(9999); Defense(9999); Ability(ABILITY_TELEPATHY); + if (gMovesInfo[move].effect != EFFECT_BESTOW) { + Item(ITEM_ORAN_BERRY); + } + } + PLAYER(SPECIES_WOBBUFFET) { + Gender(MON_MALE); HP(9998); MaxHP(9999); SpDefense(9999); Defense(9999); Ability(ABILITY_TELEPATHY); + if (gMovesInfo[move].effect != EFFECT_BESTOW) { + Item(ITEM_ORAN_BERRY); + } + } + PLAYER(SPECIES_WOBBUFFET) { Gender(MON_FEMALE); HP(9998); MaxHP(9999); SpDefense(9999); Defense(9999); } + } WHEN { + DoublesWhen(move, attacker, target, ignore1, ignore2); + } SCENE { + SameSideTargeting(move, attacker); + } THEN { + FORCE_MOVE_ANIM(FALSE); + if (gLoadFail) + DebugPrintf("Move failed: %S (%u)", gMovesInfo[move].name, move); + EXPECT_EQ(gLoadFail, FALSE); + } +} + +DOUBLE_BATTLE_TEST("Move Animations don't leak when used - Doubles (opponentleft to opponentRight)") +{ + u32 j = ANIM_TEST_START_MOVE, move = 0, species = 0; + u32 tempMove, tempSpecies; + FORCE_MOVE_ANIM(TRUE); + struct BattlePokemon *attacker = opponentLeft; + struct BattlePokemon *target = opponentRight; + struct BattlePokemon *ignore1 = playerLeft; + struct BattlePokemon *ignore2 = playerRight; + for (; j <= ANIM_TEST_END_MOVE; j++) { + ParametrizeMovesAndSpecies(j, &tempMove, &tempSpecies); + PARAMETRIZE { move = tempMove; species = tempSpecies; } + } + GIVEN { + OPPONENT(species) { + HP(9997); MaxHP(9999); Item(ITEM_ORAN_BERRY); + if (attacker == opponentLeft) { + if (species == SPECIES_WOBBUFFET) Gender(MON_FEMALE); + if (gMovesInfo[move].effect == EFFECT_LAST_RESORT) Moves(move, MOVE_POUND); + if (species == SPECIES_KLINKLANG) Ability(ABILITY_PLUS); + } + } + OPPONENT(species) { + HP(9997); MaxHP(9999); Item(ITEM_ORAN_BERRY); + if (attacker == opponentRight) { + if (species == SPECIES_WOBBUFFET) Gender(MON_FEMALE); + if (gMovesInfo[move].effect == EFFECT_LAST_RESORT) Moves(move, MOVE_POUND); + if (species == SPECIES_KLINKLANG) Ability(ABILITY_PLUS); + } + } + OPPONENT(SPECIES_WOBBUFFET) { + Gender(MON_MALE); MaxHP(9999); Moves(MOVE_POUND, MOVE_CELEBRATE); + HP(gMovesInfo[move].effect == EFFECT_REVIVAL_BLESSING ? 0 : 9998); + } + PLAYER(SPECIES_WOBBUFFET) { + Gender(MON_MALE); HP(9998); MaxHP(9999); SpDefense(9999); Defense(9999); Ability(ABILITY_TELEPATHY); + if (gMovesInfo[move].effect != EFFECT_BESTOW) { + Item(ITEM_ORAN_BERRY); + } + } + PLAYER(SPECIES_WOBBUFFET) { + Gender(MON_MALE); HP(9998); MaxHP(9999); SpDefense(9999); Defense(9999); Ability(ABILITY_TELEPATHY); + if (gMovesInfo[move].effect != EFFECT_BESTOW) { + Item(ITEM_ORAN_BERRY); + } + } + PLAYER(SPECIES_WOBBUFFET) { Gender(MON_FEMALE); HP(9998); MaxHP(9999); SpDefense(9999); Defense(9999); } + } WHEN { + DoublesWhen(move, attacker, target, ignore1, ignore2); + } SCENE { + SameSideTargeting(move, attacker); + } THEN { + FORCE_MOVE_ANIM(FALSE); + if (gLoadFail) + DebugPrintf("Move failed: %S (%u)", gMovesInfo[move].name, move); + EXPECT_EQ(gLoadFail, FALSE); + } +} + +DOUBLE_BATTLE_TEST("Move Animations don't leak when used - Doubles (opponentRight to opponentLeft)") +{ + u32 j = ANIM_TEST_START_MOVE, move = 0, species = 0; + u32 tempMove, tempSpecies; + FORCE_MOVE_ANIM(TRUE); + struct BattlePokemon *attacker = opponentRight; + struct BattlePokemon *target = opponentLeft; + struct BattlePokemon *ignore1 = playerLeft; + struct BattlePokemon *ignore2 = playerRight; + for (; j <= ANIM_TEST_END_MOVE; j++) { + ParametrizeMovesAndSpecies(j, &tempMove, &tempSpecies); + PARAMETRIZE { move = tempMove; species = tempSpecies; } + } + GIVEN { + OPPONENT(species) { + HP(9997); MaxHP(9999); Item(ITEM_ORAN_BERRY); + if (attacker == opponentLeft) { + if (species == SPECIES_WOBBUFFET) Gender(MON_FEMALE); + if (gMovesInfo[move].effect == EFFECT_LAST_RESORT) Moves(move, MOVE_POUND); + if (species == SPECIES_KLINKLANG) Ability(ABILITY_PLUS); + } + } + OPPONENT(species) { + HP(9997); MaxHP(9999); Item(ITEM_ORAN_BERRY); + if (attacker == opponentRight) { + if (species == SPECIES_WOBBUFFET) Gender(MON_FEMALE); + if (gMovesInfo[move].effect == EFFECT_LAST_RESORT) Moves(move, MOVE_POUND); + if (species == SPECIES_KLINKLANG) Ability(ABILITY_PLUS); + } + } + OPPONENT(SPECIES_WOBBUFFET) { + Gender(MON_MALE); MaxHP(9999); Moves(MOVE_POUND, MOVE_CELEBRATE); + HP(gMovesInfo[move].effect == EFFECT_REVIVAL_BLESSING ? 0 : 9998); + } + PLAYER(SPECIES_WOBBUFFET) { + Gender(MON_MALE); HP(9998); MaxHP(9999); SpDefense(9999); Defense(9999); Ability(ABILITY_TELEPATHY); + if (gMovesInfo[move].effect != EFFECT_BESTOW) { + Item(ITEM_ORAN_BERRY); + } + } + PLAYER(SPECIES_WOBBUFFET) { + Gender(MON_MALE); HP(9998); MaxHP(9999); SpDefense(9999); Defense(9999); Ability(ABILITY_TELEPATHY); + if (gMovesInfo[move].effect != EFFECT_BESTOW) { + Item(ITEM_ORAN_BERRY); + } + } + PLAYER(SPECIES_WOBBUFFET) { Gender(MON_FEMALE); HP(9998); MaxHP(9999); SpDefense(9999); Defense(9999); } + } WHEN { + DoublesWhen(move, attacker, target, ignore1, ignore2); + } SCENE { + SameSideTargeting(move, attacker); + } THEN { + FORCE_MOVE_ANIM(FALSE); + if (gLoadFail) + DebugPrintf("Move failed: %S (%u)", gMovesInfo[move].name, move); + EXPECT_EQ(gLoadFail, FALSE); + } +} +*/ + #endif