Pretty dump: print EVs

This commit is contained in:
sora10pls
2023-04-01 11:47:29 -04:00
parent 4f6d6e167c
commit 823a204bfa
2 changed files with 31 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
using System.Collections.Generic;
using System.ComponentModel;
using FlatSharp.Attributes;
// ReSharper disable UnusedMember.Global
@@ -15,4 +16,19 @@ public class ParamSet
[FlatBufferItem(3)] public int SPA { get; set; }
[FlatBufferItem(4)] public int SPD { get; set; }
[FlatBufferItem(5)] public int SPE { get; set; }
public int[] Stats
{
get => new int[] { HP, ATK, DEF, SPA, SPD, SPE };
set
{
if (value?.Length != 6) return;
HP = (sbyte)value[0];
ATK = (sbyte)value[1];
DEF = (sbyte)value[2];
SPA = (sbyte)value[3];
SPD = (sbyte)value[4];
SPE = (sbyte)value[5];
}
}
}

View File

@@ -461,6 +461,21 @@ private static void DumpPretty(IFileInternal ROM, DeliveryRaidEnemyTableArray ta
lines.Add($"\tIVs: {iv}");
if (boss.EffortValue.Stats.Any(z => z != 0))
{
string[] names = new[] { "HP", "Atk", "Def", "SpA", "SpD", "Spe" };
var spread = new List<string>();
for (int i = 0; i < boss.EffortValue.Stats.Length; i++)
{
if (boss.EffortValue.Stats[i] == 0)
continue;
spread.Add($"{boss.EffortValue.Stats[i]} {names[i]}");
}
lines.Add($"\tEVs: {string.Join(" / ", spread)}");
}
if (boss.RareType != RareType.DEFAULT)
lines.Add($"\tShiny: {shiny}");