Merge pull request #2202 from AsparagusEduardo/BE_SkyDrop
Sky Drop fixes
This commit is contained in:
commit
2ce32afeaa
@ -2493,15 +2493,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;
|
||||
|
||||
@ -617,7 +617,7 @@ bool32 IsBattlerTrapped(u8 battler, bool8 checkSwitch)
|
||||
{
|
||||
if (gBattleMons[battler].status2 & (STATUS2_ESCAPE_PREVENTION | STATUS2_WRAPPED)
|
||||
|| IsAbilityPreventingEscape(battler)
|
||||
|| gStatuses3[battler] & (STATUS3_ROOTED) // TODO: sky drop target in air
|
||||
|| gStatuses3[battler] & (STATUS3_ROOTED | STATUS3_SKY_DROPPED)
|
||||
|| (gFieldStatuses & STATUS_FIELD_FAIRY_LOCK))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user