diff --git a/Data/Enemies.cs b/Data/Enemies.cs index fbe98f8..d870052 100644 --- a/Data/Enemies.cs +++ b/Data/Enemies.cs @@ -74,7 +74,7 @@ public class Enemies public static Enemy munchkin = new Enemy("Munchkin", "m054").ForParties(Parties.Ch10_11); public static Enemy borgbear = new Enemy("Borgbear", "m055").ForParties(Parties.Ch12_13); - public static Enemy goblinChieftan = new Enemy("Goblin Chieftan", "m056").ForParties(Parties.Ch10_11); + public static Enemy goblinChieftan = new Enemy("Goblin Chieftain", "m056").ForParties(Parties.Ch10_11); public static Enemy munchkinMaestro = new Enemy("Munchkin Maestro", "m057").ForParties(Parties.Ch10_11); public static Enemy borgbearHero = new Enemy("Borgbear Hero", "m058", null, EnemyType.Rare).ForParties(Parties.Ch12_13); diff --git a/Data/Treasures.cs b/Data/Treasures.cs index ce35c37..0c50a55 100644 --- a/Data/Treasures.cs +++ b/Data/Treasures.cs @@ -455,11 +455,11 @@ public class Treasures public static Treasure mission11Repeat = new Treasure("Mission 11 Repeat", "tre_ms_n006_02", TreasureArea.Mission); public static Treasure mission12 = new Treasure("Mission 12: Geiseric", "tre_ms_k002_01", TreasureArea.Mission); public static Treasure mission12Repeat = new Treasure("Mission 12 Repeat", "tre_ms_k002_02", TreasureArea.Mission); - public static Treasure mission13 = new Treasure("Mission 13: Goblin Chieftan", "tre_ms_n008_01", TreasureArea.Mission); + public static Treasure mission13 = new Treasure("Mission 13: Goblin Chieftain", "tre_ms_n008_01", TreasureArea.Mission); public static Treasure mission13Repeat = new Treasure("Mission 13 Repeat", "tre_ms_n008_02", TreasureArea.Mission); public static Treasure mission14 = new Treasure("Mission 14: Sahagin", "tre_ms_n007_01", TreasureArea.Mission); public static Treasure mission14Repeat = new Treasure("Mission 14 Repeat", "tre_ms_n007_02", TreasureArea.Mission); - public static Treasure mission15 = new Treasure("Mission 15: Goblin Chieftan", "tre_ms_n011_01", TreasureArea.Mission); + public static Treasure mission15 = new Treasure("Mission 15: Goblin Chieftain", "tre_ms_n011_01", TreasureArea.Mission); public static Treasure mission15Repeat = new Treasure("Mission 15 Repeat", "tre_ms_n011_02", TreasureArea.Mission); public static Treasure mission16 = new Treasure("Mission 16: Sahagin", "tre_ms_n012_01", TreasureArea.Mission); public static Treasure mission16Repeat = new Treasure("Mission 16 Repeat", "tre_ms_n012_02", TreasureArea.Mission); @@ -469,7 +469,7 @@ public class Treasures public static Treasure mission18Repeat = new Treasure("Mission 18 Repeat", "tre_ms_t006_02", TreasureArea.Mission); public static Treasure mission19 = new Treasure("Mission 19: Uridimmu", "tre_ms_t007_01", TreasureArea.Mission); public static Treasure mission19Repeat = new Treasure("Mission 19 Repeat", "tre_ms_t007_02", TreasureArea.Mission); - public static Treasure mission20 = new Treasure("Mission 20: Goblin Chieftan", "tre_ms_t008_01", TreasureArea.Mission); + public static Treasure mission20 = new Treasure("Mission 20: Goblin Chieftain", "tre_ms_t008_01", TreasureArea.Mission); public static Treasure mission20Repeat = new Treasure("Mission 20 Repeat", "tre_ms_t008_02", TreasureArea.Mission); public static Treasure mission21 = new Treasure("Mission 21: Gelatitan", "tre_ms_z001_01", TreasureArea.Mission); diff --git a/FF13Randomizer.csproj b/FF13Randomizer.csproj index 6660812..9b358ed 100644 --- a/FF13Randomizer.csproj +++ b/FF13Randomizer.csproj @@ -1,6 +1,5 @@  - Debug @@ -52,9 +51,6 @@ 4 - - ..\packages\Costura.Fody.5.1.0\lib\netstandard1.0\Costura.dll - ..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll True @@ -346,8 +342,6 @@ - - FormMain.cs @@ -455,12 +449,15 @@ - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - + + + + + + + + + + \ No newline at end of file diff --git a/FormMain.cs b/FormMain.cs index df09bff..bb28244 100644 --- a/FormMain.cs +++ b/FormMain.cs @@ -21,7 +21,7 @@ namespace FF13Randomizer { public partial class FormMain : Form { - public static string Version { get; set; } = "1.9.0.Pre-8"; + public static string Version { get; set; } = "1.9.0"; public static bool PlandoModified { get; set; } = false; diff --git a/Plandos/TreasurePlando.cs b/Plandos/TreasurePlando.cs index 1050ff9..d56b26b 100644 --- a/Plandos/TreasurePlando.cs +++ b/Plandos/TreasurePlando.cs @@ -192,6 +192,10 @@ private List MigrateJSON(List list, stri return list; List migrated = new List(list); + if (VersionOrder.Compare(version, "1.9.0") == -1) + { + migrated.Where(j => j.Item == "Stilstone Ring").ForEach(j => j.Item = "Siltstone Ring"); + } if (VersionOrder.Compare(version, "1.8.0.Pre-3") == -1) { migrated.Where(j => j.Amount == 0).ForEach(j => j.Amount = -1); diff --git a/StatValues.cs b/StatValues.cs deleted file mode 100644 index c44f000..0000000 --- a/StatValues.cs +++ /dev/null @@ -1,71 +0,0 @@ -using Bartz24.Rando; -using FF13Data; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FF13Randomizer -{ - public class StatValues - { - public int[] Vals { get; set; } - - public StatValues(int count) - { - Vals = new int[count]; - } - - public void Randomize(int variance, float rate = 0.2f) - { - Randomize(GetVarianceBounds(variance), variance * Vals.Length, rate); - } - - public void Randomize(Tuple[] bounds, long amount, float rate = 0.2f) - { - int randTotal = (int)Math.Min(Math.Min(amount, bounds.Select(t => (long)t.Item2 - (long)t.Item1).Sum()), Int32.MaxValue); - while (Vals.Sum() < randTotal) - { - int select = SelectNext(); - int val = (int)Math.Max((randTotal - Vals.Sum()) * boundMult(bounds, select) * rate, 1); - Vals[select] += Math.Min(bounds[select].Item2 - bounds[select].Item1 - Vals[select], val); - } - for (int i = 0; i < Vals.Length; i++) - { - Vals[i] += bounds[i].Item1; - } - } - - protected virtual int SelectNext() - { - return RandomNum.RandInt(0, Vals.Length - 1); - } - - private float boundMult(Tuple[] bounds, int select) - { - return (float)(bounds[select].Item2 - bounds[select].Item1) / bounds.Select(t => (float)(t.Item2 - t.Item1)).Sum(); - } - - public int this[int i] - { - get - { - return Vals[i]; - } - set - { - Vals[i] = value; - } - } - - public Tuple[] GetVarianceBounds(int variance) - { - return Enumerable.Range(0, Vals.Length).Select(i => new Tuple(100 - variance, Int32.MaxValue)).ToArray(); - } - public long GetTotalPoints(Tuple[] bounds) - { - return bounds.Select(b => (b.Item1 + b.Item2) / 2L - b.Item1).Sum(); - } - } -} diff --git a/StatValuesWeighted.cs b/StatValuesWeighted.cs deleted file mode 100644 index b78d804..0000000 --- a/StatValuesWeighted.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Bartz24.Rando; -using FF13Data; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FF13Randomizer -{ - public class StatValuesWeighted : StatValues - { - private int[] weights; - public StatValuesWeighted(int[] weights) : base(weights.Length) - { - this.weights = weights; - } - - protected override int SelectNext() - { - return RandomNum.SelectRandomWeighted(Enumerable.Range(0, weights.Length).ToList(), i => weights[i]); - } - } -} diff --git a/VersionOrder.cs b/VersionOrder.cs index 08c53e5..d5acd07 100644 --- a/VersionOrder.cs +++ b/VersionOrder.cs @@ -24,6 +24,7 @@ public class VersionOrder "1.9.0.Pre-5", "1.9.0.Pre-6", "1.9.0.Pre-7", + "1.9.0.Pre-8", FormMain.Version }; diff --git a/packages.config b/packages.config index 724eb39..596517f 100644 --- a/packages.config +++ b/packages.config @@ -1,7 +1,5 @@  - -