mirror of
https://github.com/kwsch/pkNX.git
synced 2026-04-25 07:16:51 -05:00
Update PersonalInfo9SV.cs
This commit is contained in:
parent
ef0759ab05
commit
51fe9491ec
|
|
@ -85,6 +85,8 @@ public int DexIndex
|
|||
public int FormStatsIndex { get; set; }
|
||||
public byte FormCount { get; set; } = 1;
|
||||
|
||||
public int BST => FB.Base.HP + FB.Base.ATK + FB.Base.DEF + FB.Base.SPE + FB.Base.SPA + FB.Base.SPD;
|
||||
|
||||
public void Write(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(FB.Base.HP);
|
||||
|
|
@ -136,10 +138,15 @@ public void Write(BinaryWriter bw)
|
|||
}
|
||||
}
|
||||
bw.Write(tmFlags);
|
||||
bw.Write(FB.KitakamiDex);
|
||||
bw.Write(FB.BlueberryDex);
|
||||
bw.Write((byte)FB.KitakamiDex); // always <= 255
|
||||
bw.Write((byte)FB.BlueberryDex); // always <= 255
|
||||
bw.Write(GetEXP(BST, FB.EvoStage, FB.BaseEXPAddend));
|
||||
bw.Write((ushort)0); // align 0x50
|
||||
}
|
||||
|
||||
private static ushort GetEXP(int bst, byte evoStage, short add)
|
||||
=> (ushort)(Math.Ceiling(bst * (1 + (3 * evoStage)) / 20d) + add);
|
||||
|
||||
public static readonly ushort[] TMIndexes =
|
||||
[
|
||||
005, 036, 204, 313, 097, 189, 184, 182, 424, 422,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user