mirror of
https://github.com/mm201/pkmn-classic-framework.git
synced 2026-04-25 16:20:08 -05:00
Validate Pokemon abilities in GTS and Battle Tower. (to test)
This commit is contained in:
parent
2ecdf25b64
commit
7709b956a4
|
|
@ -99,5 +99,15 @@ namespace PkmnFoundations.Pokedex
|
|||
}
|
||||
}
|
||||
|
||||
public Ability[] HiddenAbilities
|
||||
{
|
||||
get
|
||||
{
|
||||
if (HiddenAbility1 != null)
|
||||
return new Ability[] { HiddenAbility1 };
|
||||
else
|
||||
return new Ability[] { };
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -350,6 +350,8 @@ namespace PkmnFoundations.Structures
|
|||
|
||||
if (thePokemon.AbilityID <= 0) return new ValidationSummary() { IsValid = false };
|
||||
if (thePokemon.AbilityID > 123) return new ValidationSummary() { IsValid = false };
|
||||
if (!thePokemon.Form.Abilities(Generations.Generation4).Abilities.Contains(thePokemon.Ability))
|
||||
return new ValidationSummary() { IsValid = false };
|
||||
|
||||
foreach (MoveSlot move in thePokemon.Moves)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -341,6 +341,9 @@ namespace PkmnFoundations.Structures
|
|||
|
||||
if (thePokemon.AbilityID <= 0) return new ValidationSummary() { IsValid = false };
|
||||
if (thePokemon.AbilityID > 164) return new ValidationSummary() { IsValid = false };
|
||||
if (!thePokemon.Form.Abilities(Generations.Generation4).Abilities.Contains(thePokemon.Ability) &&
|
||||
!thePokemon.Form.Abilities(Generations.Generation4).HiddenAbilities.Contains(thePokemon.Ability))
|
||||
return new ValidationSummary() { IsValid = false };
|
||||
|
||||
foreach (MoveSlot move in thePokemon.Moves)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user