private void AddDump(List <string> lines, PersonalInfo pi, int entry, string name, int species, int form) { if (pi is PersonalInfoSWSH s && !s.IsPresentInGame) { return; } var specCode = pi.FormeCount > 1 ? $"{Species[species]}-{form}" : $"{Species[species]}"; if (Settings.Stats) { AddPersonalLines(lines, pi, entry, name, specCode); } if (Settings.Learn) { AddLearnsets(lines, entry, specCode); } if (Settings.Egg) { AddEggMoves(lines, species, form, specCode); } if (Settings.TMHM) { AddTMs(lines, pi, specCode); } if (Settings.Tutor) { AddArmorTutors(lines, pi, specCode); } if (Settings.Evo) { AddEvolutions(lines, entry); } if (Settings.Dex) { AddZukan(lines, entry); } }
protected virtual void AddArmorTutors(List <string> lines, PersonalInfo pi, string SpecCode) { var armor = pi.SpecialTutors[0]; int count = 0; lines.Add("Armor Tutors:"); for (int i = 0; i < armor.Length; i++) { if (!armor[i]) { continue; } var move = ArmorTutorIndexes[i]; lines.Add($"- {Moves[move]}"); count++; MoveSpeciesLearn[move].Add(SpecCode); } if (count == 0) { lines.Add("None!"); } }
protected virtual void AddTMs(List <string> lines, PersonalInfo pi, string SpecCode) { var tmhm = pi.TMHM; int count = 0; lines.Add("TMs:"); for (int i = 0; i < 100; i++) { if (!tmhm[i]) { continue; } var move = TMIndexes[i]; lines.Add($"- [TM{i:00}] {Moves[move]}"); count++; MoveSpeciesLearn[move].Add(SpecCode); } if (count == 0) { lines.Add("None!"); } }
protected override void AddTMs(List <string> lines, PersonalInfo pi, string specCode) { base.AddTMs(lines, pi, specCode); AddTRs(lines, pi, specCode); }
private void AddPersonalLines(List <string> lines, PersonalInfo pi, int entry, string name, string specCode) { Debug.WriteLine($"Dumping {specCode}"); lines.Add("======"); lines.Add($"{entry:000} - {name} (Stage: {pi.EvoStage})"); lines.Add("======"); if (pi is PersonalInfoSWSH s) { if (s.DexID != 0) { lines.Add($"Galar Dex: #{s.DexID:000}"); } if (s.DexIDArmor != 0) { lines.Add($"Armor Dex: #{s.DexIDArmor:000}"); } if (s.DexIDCrown != 0) { lines.Add($"Crown Dex: #{s.DexIDCrown:000}"); } if (s.DexID == 0 && s.DexIDArmor == 0 && s.DexIDCrown == 0) { lines.Add("Galar Dex: Foreign"); } if (s.CanNotDynamax) { lines.Add("Can Not Dynamax!"); } } lines.Add($"Base Stats: {pi.HP}.{pi.ATK}.{pi.DEF}.{pi.SPA}.{pi.SPD}.{pi.SPE} (BST: {pi.BST})"); lines.Add($"EV Yield: {pi.EV_HP}.{pi.EV_ATK}.{pi.EV_DEF}.{pi.EV_SPA}.{pi.EV_SPD}.{pi.EV_SPE}"); lines.Add($"Gender Ratio: {pi.Gender}"); lines.Add($"Catch Rate: {pi.CatchRate}"); if (HasAbilities) { var abils = pi.Abilities; var msg = string.Join(" | ", abils.Select((z, j) => Abilities[z] + AbilitySuffix[j])); lines.Add($"Abilities: {msg}"); } lines.Add(string.Format(pi.Type1 != pi.Type2 ? "Type: {0} / {1}" : "Type: {0}", Types[pi.Type1], Types[pi.Type2])); if (HasItems) { var items = pi.Items; if (items.Distinct().Count() == 1) { lines.Add($"Items: {Items[pi.Items[0]]}"); } else { lines.AddRange(items.Select((z, j) => $"{ItemPrefix[j]}: {Items[z]}")); } } lines.Add($"EXP Group: {ExpGroups[pi.EXPGrowth]}"); lines.Add(string.Format(pi.EggGroup1 != pi.EggGroup2 ? "Egg Group: {0} / {1}" : "Egg Group: {0}", EggGroups[pi.EggGroup1], EggGroups[pi.EggGroup2])); lines.Add($"Hatch Cycles: {pi.HatchCycles}"); lines.Add($"Height: {(decimal)pi.Height / 100:00.00}m, Weight: {(decimal)pi.Weight / 10:000.0}kg, Color: {Colors[pi.Color]}"); }