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;
|
//break;
|
||||||
//case EFFECT_BEAK_BLAST:
|
//case EFFECT_BEAK_BLAST:
|
||||||
//break;
|
//break;
|
||||||
/*case EFFECT_SKY_DROP:
|
case EFFECT_SKY_DROP:
|
||||||
if (IS_BATTLER_OF_TYPE(battlerDef, TYPE_FLYING))
|
if (IS_BATTLER_OF_TYPE(battlerDef, TYPE_FLYING))
|
||||||
score -= 10;
|
score -= 10;
|
||||||
if (WillFaintFromWeather(battlerAtk)
|
if (BattlerWillFaintFromWeather(battlerAtk, AI_DATA->abilities[battlerAtk])
|
||||||
|| MoveBlockedBySubstitute(move, battlerAtk, battlerDef)
|
|| DoesSubstituteBlockMove(battlerAtk, battlerDef, move)
|
||||||
|| GetSpeciesWeight(gBattleMons[battlerDef].species, AI_DATA->abilities[battlerDef], AI_DATA->holdEffects[battlerDef], battlerDef, TRUE) >= 2000) //200.0 kg
|
|| GetBattlerWeight(battlerDef) >= 2000) //200.0 kg
|
||||||
score -= 10;
|
score -= 10;
|
||||||
break;
|
break;
|
||||||
*/
|
|
||||||
/*case EFFECT_NO_RETREAT:
|
/*case EFFECT_NO_RETREAT:
|
||||||
if (TrappedByNoRetreat(battlerAtk))
|
if (TrappedByNoRetreat(battlerAtk))
|
||||||
score -= 10;
|
score -= 10;
|
||||||
|
|||||||
@ -617,7 +617,7 @@ bool32 IsBattlerTrapped(u8 battler, bool8 checkSwitch)
|
|||||||
{
|
{
|
||||||
if (gBattleMons[battler].status2 & (STATUS2_ESCAPE_PREVENTION | STATUS2_WRAPPED)
|
if (gBattleMons[battler].status2 & (STATUS2_ESCAPE_PREVENTION | STATUS2_WRAPPED)
|
||||||
|| IsAbilityPreventingEscape(battler)
|
|| IsAbilityPreventingEscape(battler)
|
||||||
|| gStatuses3[battler] & (STATUS3_ROOTED) // TODO: sky drop target in air
|
|| gStatuses3[battler] & (STATUS3_ROOTED | STATUS3_SKY_DROPPED)
|
||||||
|| (gFieldStatuses & STATUS_FIELD_FAIRY_LOCK))
|
|| (gFieldStatuses & STATUS_FIELD_FAIRY_LOCK))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9192,7 +9192,7 @@ static void Cmd_various(void)
|
|||||||
break;
|
break;
|
||||||
case VARIOUS_JUMP_IF_UNDER_200:
|
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 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);
|
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
|
||||||
else
|
else
|
||||||
gBattlescriptCurrInstr += 7;
|
gBattlescriptCurrInstr += 7;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user