mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 20:43:07 +00:00
Add specified ability no-hidden check
ability=0 allowed abil1/2 but not 4; catch that scenario
This commit is contained in:
parent
2ad103dd46
commit
2db8daa07b
1 changed files with 15 additions and 4 deletions
|
@ -55,8 +55,14 @@ namespace PKHeX.Core
|
|||
{
|
||||
var EncounterMatch = data.EncounterMatch;
|
||||
var eabil = GetEncounterFixedAbilityNumber(EncounterMatch);
|
||||
if (eabil > 0)
|
||||
return VerifyFixedAbility(data, abilities, AbilityState.CanMismatch, eabil, abilnum);
|
||||
if (eabil >= 0)
|
||||
{
|
||||
|
||||
if ((data.pkm.AbilityNumber == 4) != (eabil == 4))
|
||||
return GetInvalid(LAbilityHiddenFail);
|
||||
if (eabil > 0)
|
||||
return VerifyFixedAbility(data, abilities, AbilityState.CanMismatch, eabil, abilnum);
|
||||
}
|
||||
|
||||
var gen = data.Info.Generation;
|
||||
switch (gen)
|
||||
|
@ -78,8 +84,13 @@ namespace PKHeX.Core
|
|||
|
||||
var EncounterMatch = data.EncounterMatch;
|
||||
int eabil = GetEncounterFixedAbilityNumber(EncounterMatch);
|
||||
if (eabil > 0)
|
||||
return VerifyFixedAbility(data, abilities, state, eabil, abilnum);
|
||||
if (eabil >= 0)
|
||||
{
|
||||
if ((data.pkm.AbilityNumber == 4) != (eabil == 4))
|
||||
return GetInvalid(LAbilityHiddenFail);
|
||||
if (eabil > 0)
|
||||
return VerifyFixedAbility(data, abilities, state, eabil, abilnum);
|
||||
}
|
||||
|
||||
int gen = data.Info.Generation;
|
||||
if (gen == 5)
|
||||
|
|
Loading…
Reference in a new issue