Sky Drop fixes

- Sky Drop was using lbs in the formula instead of hectograms. This has been fixed.
- Sky Drop is now affected by weight modifiers like Float Stone.
- Enabled AI_CheckBadMove for Sky Drop.
This commit is contained in:
Eduardo Quezada D'Ottone 2022-07-20 15:13:53 -04:00
parent 9d1c0a7597
commit 343e685537
2 changed files with 5 additions and 6 deletions

View File

@ -2491,15 +2491,14 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
//break;
//case EFFECT_BEAK_BLAST:
//break;
/*case EFFECT_SKY_DROP:
case EFFECT_SKY_DROP:
if (IS_BATTLER_OF_TYPE(battlerDef, TYPE_FLYING))
score -= 10;
if (WillFaintFromWeather(battlerAtk)
|| MoveBlockedBySubstitute(move, battlerAtk, battlerDef)
|| GetSpeciesWeight(gBattleMons[battlerDef].species, AI_DATA->abilities[battlerDef], AI_DATA->holdEffects[battlerDef], battlerDef, TRUE) >= 2000) //200.0 kg
if (BattlerWillFaintFromWeather(battlerAtk, AI_DATA->abilities[battlerAtk])
|| DoesSubstituteBlockMove(battlerAtk, battlerDef, move)
|| GetBattlerWeight(battlerDef) >= 2000) //200.0 kg
score -= 10;
break;
*/
/*case EFFECT_NO_RETREAT:
if (TrappedByNoRetreat(battlerAtk))
score -= 10;

View File

@ -9192,7 +9192,7 @@ static void Cmd_various(void)
break;
case VARIOUS_JUMP_IF_UNDER_200:
// If the Pokemon is less than 200 kg, or weighing less than 441 lbs, then Sky Drop will work. Otherwise, it will fail.
if (GetPokedexHeightWeight(SpeciesToNationalPokedexNum(gBattleMons[gBattlerTarget].species), 1) < 441)
if (GetBattlerWeight(gBattlerTarget) < 2000)
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
else
gBattlescriptCurrInstr += 7;