mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-09 04:24:36 -05:00
Misc mg updates
pgf/wc6/wc7 received on future game -> random version could eventually be replaced with a get-sane-version which checks if OriginGame == 0. fix wc3 random RS giving E (R+1=E)
This commit is contained in:
parent
d794e71175
commit
35e699cffa
|
|
@ -171,7 +171,7 @@ public override PKM ConvertToPKM(ITrainerInfo SAV)
|
|||
Nature = Nature != 0xFF ? Nature : (int)(Util.Rand32() % 25),
|
||||
Gender = pi.Gender == 255 ? 2 : (Gender != 2 ? Gender : pi.RandomGender),
|
||||
AltForm = Form,
|
||||
Version = OriginGame == 0 ? new[] {20, 21, 22, 23}[Util.Rand32() & 0x3] : OriginGame,
|
||||
Version = OriginGame == 0 ? SAV.Game : OriginGame,
|
||||
Language = Language == 0 ? SAV.Language : Language,
|
||||
Ball = Ball,
|
||||
Move1 = Move1,
|
||||
|
|
@ -210,6 +210,9 @@ public override PKM ConvertToPKM(ITrainerInfo SAV)
|
|||
|
||||
FatefulEncounter = true,
|
||||
};
|
||||
if (SAV.Generation > 5 && OriginGame == 0) // Gen6+, give random gen5 game
|
||||
pk.Version = (int)GameVersion.W + Util.Rand.Next(4);
|
||||
|
||||
pk.Move1_PP = pk.GetMovePP(Move1, 0);
|
||||
pk.Move2_PP = pk.GetMovePP(Move2, 0);
|
||||
pk.Move3_PP = pk.GetMovePP(Move3, 0);
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ private static int GetRandomVersion(int version)
|
|||
case (int)GameVersion.FRLG:
|
||||
return (int)GameVersion.FR + rand; // or LG
|
||||
case (int)GameVersion.RS:
|
||||
return (int)GameVersion.R + rand; // or S
|
||||
return (int)GameVersion.S + rand; // or R
|
||||
default:
|
||||
throw new Exception($"Unknown GameVersion: {version}");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -357,10 +357,8 @@ public override PKM ConvertToPKM(ITrainerInfo SAV)
|
|||
|
||||
pk.MetDate = Date ?? DateTime.Now;
|
||||
|
||||
if (SAV.Generation > 6 && OriginGame == 0) // Gen7
|
||||
{
|
||||
pk.Version = (int)GameVersion.OR;
|
||||
}
|
||||
if (SAV.Generation > 6 && OriginGame == 0) // Gen7+, give random gen6 game
|
||||
pk.Version = (int)GameVersion.X + Util.Rand.Next(4);
|
||||
|
||||
if (!IsEgg)
|
||||
if (pk.CurrentHandler == 0) // OT
|
||||
|
|
|
|||
|
|
@ -375,6 +375,10 @@ public override PKM ConvertToPKM(ITrainerInfo SAV)
|
|||
|
||||
EVs = EVs,
|
||||
};
|
||||
|
||||
if (SAV.Generation > 7 && OriginGame == 0) // Gen8+, give random gen7 game
|
||||
pk.Version = (int)GameVersion.SN + Util.Rand.Next(4);
|
||||
|
||||
pk.Move1_PP = pk.GetMovePP(Move1, 0);
|
||||
pk.Move2_PP = pk.GetMovePP(Move2, 0);
|
||||
pk.Move3_PP = pk.GetMovePP(Move3, 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user