Add Shiny output to distro raid comment

Also document Field_03, which is the rate of which you will find a distribution raid from a den in 1/16s. Thanks Anubis!
This commit is contained in:
sora10pls
2020-05-29 10:07:13 -04:00
parent d1bca23a1a
commit bca171111f
2 changed files with 14 additions and 7 deletions

View File

@@ -15,7 +15,7 @@ public class NestHoleDistributionEncounter8Table
public ulong TableID { get; set; }
public uint GameVersion { get; set; }
public byte Field_02 { get; set; }
public byte Field_03 { get; set; }
public byte EncounterRate { get; set; }
public NestHoleDistributionEncounter8[] Entries { get; set; }
public IEnumerable<string> GetPrettySummary(IReadOnlyList<string> species, IReadOnlyList<string> items, IReadOnlyList<string> moves, IReadOnlyList<int> tmtrs,
@@ -42,9 +42,9 @@ IEnumerable<string> PrettySummary(NestHoleDistributionEncounter8 e)
var rank = $"{e.MinRank + 1}-Star";
yield return $"{rank} {giga}{species[e.Species]}{form}";
yield return $"\tLv. {e.Level}";
if (e.Field_12 == 1)
if (e.ShinyLock == 1)
yield return "\tShiny: Never";
else if (e.Field_12 == 2)
else if (e.ShinyLock == 2)
yield return "\tShiny: Always";
yield return $"\tDynamax Level: {e.DynamaxLevel}";
yield return $"\tDynamax Boost: {e.DynamaxBoost:0.0}x";
@@ -117,6 +117,13 @@ string Summary(NestHoleDistributionEncounter8 e)
var altform = e.AltForm == 0 ? string.Empty : $", Form = {e.AltForm}";
var giga = !e.IsGigantamax ? string.Empty : ", CanGigantamax = true";
var moves = $", Moves = new[]{{ {e.Move0:000}, {e.Move1:000}, {e.Move2:000}, {e.Move3:000} }}";
var shiny = e.ShinyLock switch
{
0 => string.Empty,
1 => $", Shiny = Shiny.Never",
2 => $", Shiny = Shiny.Always",
_ => throw new Exception()
};
var ability = e.Ability switch
{
0 => "A0", // 1
@@ -136,7 +143,7 @@ string Summary(NestHoleDistributionEncounter8 e)
throw new Exception();
}
var flawless = e.FlawlessIVs;
return $" new EncounterStatic8ND({e.Level:00},{e.DynamaxLevel:00},{flawless}) {{ Species = {e.Species:000}, Ability = {ability}{moves}{gender}{altform}{giga} }},{comment}";
return $" new EncounterStatic8ND({e.Level:00},{e.DynamaxLevel:00},{flawless}) {{ Species = {e.Species:000}, Ability = {ability}{moves}{gender}{altform}{giga}{shiny} }},{comment}";
}
}
@@ -169,7 +176,7 @@ public class NestHoleDistributionEncounter8
public int[] Probabilities { get; set; }
public byte Gender { get; set; }
public byte FlawlessIVs { get; set; }
public byte Field_12 { get; set; }
public byte ShinyLock { get; set; }
public byte Field_13 { get; set; } // 3/4
public byte Field_14 { get; set; } // 3/4/5 -- +1 for second entries
public byte Nature { get; set; }

View File

@@ -8,7 +8,7 @@ table NestHoleDistributionEncounter8Table {
TableID:ulong;
GameVersion:uint;
Field_02:byte;
Field_03:byte;
EncounterRate:byte;
Entries:[NestHoleDistributionEncounter8];
}
@@ -31,7 +31,7 @@ table NestHoleDistributionEncounter8 {
Probabilities:[uint];
Gender:byte;
FlawlessIVs:byte;
Field_12:byte;
ShinyLock:byte;
Field_13:byte;
Field_14:byte;
Nature:byte;