mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 06:20:25 +00:00
Update EncounterSlot.cs
This commit is contained in:
parent
d2d20c13e0
commit
34ac8167f2
1 changed files with 11 additions and 6 deletions
|
@ -131,12 +131,10 @@ namespace PKHeX.Core
|
|||
|
||||
protected virtual void SetPINGA(PKM pk, EncounterCriteria criteria)
|
||||
{
|
||||
int gender = criteria.GetGender(-1, pk.PersonalInfo);
|
||||
var pi = pk.PersonalInfo;
|
||||
int gender = criteria.GetGender(-1, pi);
|
||||
int nature = (int)criteria.GetNature(Nature.Random);
|
||||
|
||||
var ability = Util.Rand.Next(2);
|
||||
if (Area!.Type == SlotType.HiddenGrotto) // don't force hidden for DexNav
|
||||
ability = 2;
|
||||
var ability = criteria.GetAbilityFromNumber(Ability, pi);
|
||||
|
||||
if (Generation == 3 && Species == (int)Unown)
|
||||
{
|
||||
|
@ -218,7 +216,14 @@ namespace PKHeX.Core
|
|||
|
||||
protected virtual HiddenAbilityPermission IsHiddenAbilitySlot() => HiddenAbilityPermission.Never;
|
||||
|
||||
protected bool IsDeferredWurmple(PKM pkm) => Species == (int)Wurmple && pkm.Species != (int)Wurmple && !WurmpleUtil.IsWurmpleEvoValid(pkm);
|
||||
public int Ability => IsHiddenAbilitySlot() switch
|
||||
{
|
||||
HiddenAbilityPermission.Never => 0,
|
||||
HiddenAbilityPermission.Always => 4,
|
||||
_ => -1,
|
||||
};
|
||||
|
||||
private bool IsDeferredWurmple(PKM pkm) => Species == (int)Wurmple && pkm.Species != (int)Wurmple && !WurmpleUtil.IsWurmpleEvoValid(pkm);
|
||||
|
||||
private bool IsDeferredHiddenAbility(bool IsHidden) => IsHiddenAbilitySlot() switch
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue