Skip to content

Commit

Permalink
Couple things for 1.8 release (#4274)
Browse files Browse the repository at this point in the history
* Couple things for 1.8 release

* revert EFFECT_VARY_POWER_BASED_ON_HP change

* Fix comment

---------

Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
  • Loading branch information
AlexOn1ine and AsparagusEduardo authored Mar 12, 2024
1 parent ec73e28 commit a741e2e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/battle_ai_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3769,9 +3769,9 @@ static u32 AI_CalcMoveScore(u32 battlerAtk, u32 battlerDef, u32 move)
IncreaseStatUpScore(battlerAtk, battlerDef, STAT_CHANGE_DEF, &score);
break;
case EFFECT_FIRST_TURN_ONLY:
if (ShouldFakeOut(battlerAtk, battlerDef, move))
if (ShouldFakeOut(battlerAtk, battlerDef, move) && MoveHasAdditionalEffectWithChance(move, MOVE_EFFECT_FLINCH, 100))
ADJUST_SCORE(GOOD_EFFECT);
else if (gMovesInfo[move].argument == MOVE_FIRST_IMPRESSION && gDisableStructs[battlerAtk].isFirstTurn && GetBestDmgMoveFromBattler(battlerAtk, battlerDef) == move)
else if (gDisableStructs[battlerAtk].isFirstTurn && GetBestDmgMoveFromBattler(battlerAtk, battlerDef) == move)
ADJUST_SCORE(BEST_EFFECT);
break;
case EFFECT_STOCKPILE:
Expand Down
20 changes: 20 additions & 0 deletions test/battle/ability/dancer.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,23 @@ SINGLE_BATTLE_TEST("Dancer can copy Teeter Dance")
ANIMATION(ANIM_TYPE_MOVE, MOVE_TEETER_DANCE, opponent);
}
}

DOUBLE_BATTLE_TEST("Dancer can copy Teeter Dance and confuse both opposing targets")
{
KNOWN_FAILING; // Fails because copied move that targets both opposing mons, targets only one when copied by Dancer
GIVEN {
ASSUME(gMovesInfo[MOVE_TEETER_DANCE].danceMove == TRUE);
PLAYER(SPECIES_WOBBUFFET)
PLAYER(SPECIES_WYNAUT)
OPPONENT(SPECIES_ORICORIO) { Ability(ABILITY_DANCER); Item(ITEM_LUM_BERRY); }
OPPONENT(SPECIES_SLOWPOKE) { Ability(ABILITY_OWN_TEMPO); }
} WHEN {
TURN { MOVE(playerLeft, MOVE_TEETER_DANCE); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_TEETER_DANCE, playerLeft);
ABILITY_POPUP(opponentLeft, ABILITY_DANCER);
ANIMATION(ANIM_TYPE_MOVE, MOVE_TEETER_DANCE, opponentLeft);
MESSAGE("Wobbuffet became confused!");
MESSAGE("Wynaut became confusef!");
}
}

0 comments on commit a741e2e

Please sign in to comment.