AI assumes Magnitude / Present damage (#7334)
This commit is contained in:
parent
688ec0023e
commit
5c2980b906
@ -783,6 +783,10 @@ struct SimulatedDamage AI_CalcDamage(u32 move, u32 battlerAtk, u32 battlerDef, u
|
||||
SetDynamicMoveCategory(battlerAtk, battlerDef, move);
|
||||
SetTypeBeforeUsingMove(move, battlerAtk);
|
||||
|
||||
// We can set those globals because they are going to get rerolled on attack execution
|
||||
gBattleStruct->magnitudeBasePower = 70;
|
||||
gBattleStruct->presentBasePower = 80;
|
||||
|
||||
struct DamageContext ctx;
|
||||
ctx.battlerAtk = battlerAtk;
|
||||
ctx.battlerDef = battlerDef;
|
||||
|
||||
@ -897,3 +897,18 @@ AI_SINGLE_BATTLE_TEST("Move scoring comparison properly awards bonus point to be
|
||||
TURN { EXPECT_MOVE(opponent, MOVE_WATER_SPOUT); }
|
||||
}
|
||||
}
|
||||
|
||||
AI_SINGLE_BATTLE_TEST("AI will see Magnitude damage")
|
||||
{
|
||||
PASSES_RANDOMLY(SHOULD_SWITCH_HASBADODDS_PERCENTAGE, 100, RNG_AI_SWITCH_HASBADODDS);
|
||||
GIVEN {
|
||||
ASSUME(GetMoveEffect(MOVE_MAGNITUDE) == EFFECT_MAGNITUDE);
|
||||
ASSUME(GetMoveType(MOVE_MAGNITUDE) == TYPE_GROUND);
|
||||
AI_FLAGS(AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_TRY_TO_FAINT | AI_FLAG_CHECK_VIABILITY | AI_FLAG_SMART_SWITCHING | AI_FLAG_SMART_MON_CHOICES | AI_FLAG_OMNISCIENT);
|
||||
PLAYER(SPECIES_GEODUDE) { Level(15); Moves(MOVE_DEFENSE_CURL, MOVE_MAGNITUDE); }
|
||||
OPPONENT(SPECIES_TYRUNT) { Level(13); Moves(MOVE_BITE, MOVE_THUNDER_FANG, MOVE_ROCK_TOMB); }
|
||||
OPPONENT(SPECIES_ZUBAT) { Level(14); Moves(MOVE_TACKLE); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_MAGNITUDE); EXPECT_SWITCH(opponent, 1); }
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user