Remove fixedball for go7, reset h/w/cp

Now that we have accurate calcs, let's just generate them with the values.
This commit is contained in:
Kurt 2022-02-25 13:52:50 -08:00
parent a5710ee374
commit ccca8abdad
4 changed files with 18 additions and 21 deletions

View file

@ -12,20 +12,14 @@ namespace PKHeX.Core
{
}
protected override void SetPINGA(PKM pk, EncounterCriteria criteria)
{
base.SetPINGA(pk, criteria);
pk.SetRandomEC();
}
protected override void ApplyDetails(ITrainerInfo sav, EncounterCriteria criteria, PKM pk)
{
base.ApplyDetails(sav, criteria, pk);
if (pk is IScaledSizeValue v)
{
v.ResetHeight();
v.ResetWeight();
}
pk.SetRandomEC();
var pb = (PB7)pk;
pb.ResetHeight();
pb.ResetWeight();
pb.ResetCP();
}
}
}

View file

@ -7,6 +7,7 @@ namespace PKHeX.Core
public sealed record EncounterSlot7GO : EncounterSlotGO
{
public override int Generation => 7;
public override Ball FixedBall => Ball.None; // GO Park can override the ball; obey capture rules for LGP/E
public EncounterSlot7GO(EncounterArea7g area, int species, int form, int start, int end, Shiny shiny, Gender gender, PogoType type)
: base(area, species, form, start, end, shiny, gender, type)
@ -21,6 +22,9 @@ namespace PKHeX.Core
pk.SetRandomEC();
pb.HeightScalar = PokeSizeUtil.GetRandomScalar();
pb.WeightScalar = PokeSizeUtil.GetRandomScalar();
pb.ResetHeight();
pb.ResetWeight();
pb.ResetCP();
}
protected override void SetEncounterMoves(PKM pk, GameVersion version, int level)

View file

@ -11,12 +11,11 @@
protected override void ApplyDetails(ITrainerInfo sav, EncounterCriteria criteria, PKM pk)
{
base.ApplyDetails(sav, criteria, pk);
if (pk is IScaledSizeValue v)
{
v.ResetHeight();
v.ResetWeight();
}
pk.SetRandomEC();
var pb = (PB7)pk;
pb.ResetHeight();
pb.ResetWeight();
pb.ResetCP();
}
}
}

View file

@ -18,11 +18,11 @@
protected override void ApplyDetails(ITrainerInfo sav, EncounterCriteria criteria, PKM pk)
{
base.ApplyDetails(sav, criteria, pk);
if (pk is IScaledSizeValue v)
{
v.ResetHeight();
v.ResetWeight();
}
pk.SetRandomEC();
var pb = (PB7)pk;
pb.ResetHeight();
pb.ResetWeight();
pb.ResetCP();
}
}
}