mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-14 16:27:21 +00:00
Set random personal tera type for egg>pk9 template
This commit is contained in:
parent
7d7d7e91c0
commit
9009439bb7
1 changed files with 8 additions and 0 deletions
|
@ -89,6 +89,14 @@ public sealed record EncounterEgg(ushort Species, byte Form, byte Level, int Gen
|
|||
s3.Scale = PokeSizeUtil.GetRandomScalar();
|
||||
}
|
||||
|
||||
if (pk is ITeraType tera)
|
||||
{
|
||||
var type = Tera9RNG.GetTeraTypeFromPersonal(Species, Form, Util.Rand.Rand64());
|
||||
tera.TeraTypeOriginal = (MoveType)type;
|
||||
if (criteria.TeraType != -1 && type != criteria.TeraType)
|
||||
tera.SetTeraType(type); // sets the override type
|
||||
}
|
||||
|
||||
return pk;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue