diff --git a/src/Data/Hints.cs b/src/Data/Hints.cs index af6c8088..4e8d6901 100644 --- a/src/Data/Hints.cs +++ b/src/Data/Hints.cs @@ -184,14 +184,13 @@ public static void PopulateHints() { slotLocation = HexHint.Location == "Your Pocket" ? $"0, Server" : $"{HexHint.Player}, {HexHint.Location}"; } else if (IsSinglePlayer()) { ItemData Hex = ItemLookup.Items[Hexagon]; - Check HexCheck = ItemRandomizer.FindRandomizedItemByName(Hex.ItemNameForInventory); + Check HexCheck = Hex.Name == "Gold Questagon" ? ItemRandomizer.FindAllRandomizedItemsByName(Hex.ItemNameForInventory)[i] : ItemRandomizer.FindRandomizedItemByName(Hex.ItemNameForInventory); Scene = Locations.SimplifiedSceneNames[HexCheck.Location.SceneName]; Prefix = Vowels.Contains(Scene[0]) ? "#E" : "#uh"; Hint = $"#A sA {Prefix} {(TunicRandomizer.Settings.UseTrunicTranslations ? Translations.Translate(Scene, false) : $"\"{Scene.ToUpper()}\"")} iz \nwAr #uh {HexagonColors[Hexagon]}kwehstuhgawn [hexagram]<#FFFFFF> iz fownd\"...\""; slotLocation = $"{HexCheck.Location.LocationId} [{HexCheck.Location.SceneName}]"; } - if (HexagonHintArea == "Swamp Relic") { HeroGraveHints.Add(HexagonHintArea, new HeroGraveHint(slotLocation, Hint, RelicHint.Item1, RelicHint.Item2, "Swamp Redux 2", "_Setpieces Etc/RelicPlinth/", false)); } else if (HexagonHintArea == "Monastery Relic") { diff --git a/src/Data/Items.cs b/src/Data/Items.cs index abf05f7d..baaf2578 100644 --- a/src/Data/Items.cs +++ b/src/Data/Items.cs @@ -498,6 +498,14 @@ public static ItemData GetItemDataFromCheck(Check Check) { { "ldrurdrurdrul", "Granted Icebomb" }, }; + public static List ShopkeeperLines = new List() { + "nO rEfuhndz.", + "awl sAlz fInuhl.", + "tipi^ ehnkurijd.", + "#Ar mahsturwurks awl.", + "nO diskownts.", + }; + public static Dictionary> FillerItems = new Dictionary>() { { "Firecracker", new List() { 2, 3, 4, 5, 6 } }, { "Firebomb", new List() { 2, 3 } }, diff --git a/src/Patches/GhostHints.cs b/src/Patches/GhostHints.cs index 2792a05f..55abd199 100644 --- a/src/Patches/GhostHints.cs +++ b/src/Patches/GhostHints.cs @@ -120,11 +120,11 @@ public HintGhost(string name, string sceneName, Vector3 position, Quaternion rot "Mask", "Key (House)", "Relic - Hero Sword", - "Relic - Hero Pendant MP", + "Relic - Hero Crown", "Relic - Hero Water", "Relic - Hero Pendant HP", - "Relic - Hero Crown", "Relic - Hero Pendant SP", + "Relic - Hero Pendant MP", "Dath Stone", }; @@ -473,8 +473,8 @@ public static void GenerateItemHints() { HintableItemsSolo.Add("26"); } for (int i = 0; i < HintableItems.Count; i++) { - string Item = HintableItems[i]; if (SaveFlags.IsArchipelago()) { + string Item = HintableItems[i]; List ItemLocations = Locations.MajorItemLocations[Item]; foreach(ArchipelagoHint HintLocation in ItemLocations) { if (HintLocation.Player == Archipelago.instance.GetPlayerSlot()) { @@ -497,7 +497,7 @@ public static void GenerateItemHints() { ItemData ItemData = ItemLookup.GetItemDataFromCheck(Check); string ItemToDisplay = TextBuilderPatches.ItemNameToAbbreviation.ContainsKey(ItemData.Name) ? TextBuilderPatches.ItemNameToAbbreviation[ItemData.Name] : ""; - Hint = $"bI #uh wA, I saw A {ItemToDisplay} \"{Item.ToUpper().Replace(" ", "\" \"")}\" #uh lahst tIm I wuhs {ScenePrefix} \"{Scene.ToUpper().Replace(" ", "\" \"")}.\""; + Hint = $"bI #uh wA, I saw A {ItemToDisplay} \"{ItemData.Name.ToUpper().Replace(" ", "\" \"")}\" #uh lahst tIm I wuhs {ScenePrefix} \"{Scene.ToUpper().Replace(" ", "\" \"")}.\""; if (TunicRandomizer.Settings.UseTrunicTranslations) { Hint = $"bI #uh wA, I saw A {Translations.Translate(ItemLookup.SimplifiedItemNames[Check.Reward.Name], false)} #uh lahst tIm I wuhs {ScenePrefix} {Translations.Translate(Scene, false)}."; } diff --git a/src/Patches/ItemPatches.cs b/src/Patches/ItemPatches.cs index 0382f925..70f9b72c 100644 --- a/src/Patches/ItemPatches.cs +++ b/src/Patches/ItemPatches.cs @@ -174,18 +174,18 @@ public static bool ShopItem_IInteractionReceiver_Interact_PrefixPatch(Item i, Sh public static bool ShopItem_buy_PrefixPatch(ShopItem __instance) { string LocationId = $"{__instance.name} [Shop]"; - if (!Locations.LocationIdToDescription.ContainsKey(LocationId)) { - if (TunicRandomizer.Settings.SkipItemAnimations && __instance.itemToGive != null) { - TunicRandomizer.Settings.SkipItemAnimations = false; - ItemPresentation.PresentItem(__instance.itemToGive, __instance.quantityToGive); - TunicRandomizer.Settings.SkipItemAnimations = true; - } - return true; - } + int Price = TunicRandomizer.Settings.CheaperShopItemsEnabled ? 300 : __instance.price; if (Inventory.GetItemByName("MoneySmall").Quantity < Price) { GenericMessage.ShowMessage($"nawt Enuhf [money]..."); } else { + if (!Locations.LocationIdToDescription.ContainsKey(LocationId)) { + if (TunicRandomizer.Settings.SkipItemAnimations && __instance.itemToGive != null) { + string itemName = ItemLookup.SimplifiedItemNames[__instance.itemToGive.name] + (__instance.quantityToGive > 1 ? "s" : ""); + Notifications.Show($"{TextBuilderPatches.ItemNameToAbbreviation[ItemLookup.SimplifiedItemNames[__instance.itemToGive.name]]} \"Bought {itemName}!\"", $"{ItemLookup.ShopkeeperLines[new System.Random().Next(ItemLookup.ShopkeeperLines.Count)]}"); + } + return true; + } Inventory.GetItemByName("MoneySmall").Quantity -= Price; if (IsArchipelago()) { Archipelago.instance.ActivateCheck(Locations.LocationIdToDescription[LocationId]); diff --git a/src/PluginInfo.cs b/src/PluginInfo.cs index 57a16a9a..0fc5e569 100644 --- a/src/PluginInfo.cs +++ b/src/PluginInfo.cs @@ -1,7 +1,7 @@ namespace TunicRandomizer { public class PluginInfo { public const string NAME = "Tunic Randomizer"; - public const string VERSION = "3.0.0"; + public const string VERSION = "3.0.1"; public const string GUID = "silentdestroyer.tunic.randomizer"; } }