Consider Nature Power in AI_CalcDamage (#2776)

This commit is contained in:
Eduardo Quezada D'Ottone 2023-02-25 12:30:53 -03:00 committed by GitHub
commit abc0e20aaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -744,6 +744,10 @@ s32 AI_CalcDamage(u16 move, u8 battlerAtk, u8 battlerDef, u8 *typeEffectiveness,
SetBattlerData(battlerDef);
gBattleStruct->dynamicMoveType = 0;
if (move == MOVE_NATURE_POWER)
move = GetNaturePowerMove();
SetTypeBeforeUsingMove(move, battlerAtk);
GET_MOVE_TYPE(move, moveType);

View File

@ -4847,7 +4847,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
[MOVE_NATURE_POWER] =
{
.effect = EFFECT_NATURE_POWER,
.power = 0,
.power = 1,
.type = TYPE_NORMAL,
.accuracy = 0,
.pp = 20,