mirror of
https://github.com/kwsch/pkNX.git
synced 2026-09-10 03:25:11 -05:00
Pretty dump: print EVs
This commit is contained in:
@@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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}");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user