From d7a718397e26560a74ff4eebbfd1fe818b16c839 Mon Sep 17 00:00:00 2001 From: WhistleWind Date: Wed, 8 Jan 2025 14:02:51 -0800 Subject: [PATCH 01/10] Fix rulebook icon scaling in Act 3 --- InscryptionAPI/Slots/SlotModificationManager.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/InscryptionAPI/Slots/SlotModificationManager.cs b/InscryptionAPI/Slots/SlotModificationManager.cs index 44244af9..62d683b9 100644 --- a/InscryptionAPI/Slots/SlotModificationManager.cs +++ b/InscryptionAPI/Slots/SlotModificationManager.cs @@ -566,6 +566,7 @@ private static void AddSlotModificationsToRuleBook(AbilityMetaCategory metaCateg } public const string SLOT_PAGEID = "SlotModification_"; + private static Vector3 PART_3_SCALE = new(0.7f, 0.7f, 1f); [HarmonyPrefix, HarmonyPatch(typeof(ItemPage), nameof(ItemPage.FillPage))] private static bool OverrideWithSlotInfo(ItemPage __instance, string headerText, params object[] otherArgs) @@ -574,7 +575,7 @@ private static bool OverrideWithSlotInfo(ItemPage __instance, string headerText, return true; // Slot modification pages use ItemPage format in Act 1 - __instance.iconRenderer.transform.localScale = Vector3.one; + __instance.iconRenderer.transform.localScale = SaveManager.SaveFile.IsPart3 ? PART_3_SCALE : Vector3.one; if (otherArgs[0] is string pageId && pageId.StartsWith(SLOT_PAGEID)) { string modString = pageId.Replace(SLOT_PAGEID, ""); @@ -588,20 +589,21 @@ private static bool OverrideWithSlotInfo(ItemPage __instance, string headerText, __instance.nameTextMesh.text = Localization.Translate(info.RulebookName); __instance.descriptionTextMesh.text = Localization.Translate(info.RulebookDescription); __instance.iconRenderer.sprite = info.RulebookSprite; - __instance.iconRenderer.transform.localScale = new(0.8f, 0.8f, 0.8f); + __instance.iconRenderer.transform.localScale = new(0.8f, 0.8f, 1f); InscryptionAPIPlugin.Logger.LogDebug($"Create rulebook page for slot modification [{info.ModificationType}] ({info.RulebookName})."); return false; } } return true; } + [HarmonyPrefix, HarmonyPatch(typeof(AbilityPage), nameof(AbilityPage.FillPage))] private static bool OverrideWithSlotInfo(AbilityPage __instance, string headerText, params object[] otherArgs) { if (SaveManager.SaveFile.IsPart1) return true; - __instance.mainAbilityGroup.iconRenderer.transform.localScale = Vector3.one; + __instance.mainAbilityGroup.iconRenderer.transform.localScale = SaveManager.SaveFile.IsPart3 ? PART_3_SCALE : Vector3.one; Transform slotRendererObj = __instance.mainAbilityGroup.transform.Find("SlotRenderer"); slotRendererObj?.gameObject.SetActive(false); __instance.mainAbilityGroup.iconRenderer.transform.parent.gameObject.SetActive(true); @@ -638,7 +640,7 @@ private static bool OverrideWithSlotInfo(AbilityPage __instance, string headerTe Debug.Log("Help"); } - __instance.mainAbilityGroup.iconRenderer.transform.localScale = new(0.8f, 0.8f, 0.8f); + __instance.mainAbilityGroup.iconRenderer.transform.localScale = new(0.8f, 0.8f, 1f); //InscryptionAPIPlugin.Logger.LogDebug($"Create rulebook page for slot modification [{info.ModificationType}] ({info.RulebookName})."); return false; } From 5dca636c31d9b76c976a9d2fb11960497656e52b Mon Sep 17 00:00:00 2001 From: WhistleWind Date: Wed, 8 Jan 2025 14:03:44 -0800 Subject: [PATCH 02/10] Add config to allow for vanilla style sigil stacking in specific conditions --- .../Card/StackAbilityIcons.cs | 102 +++++++++++++----- .../InscryptionCommunityPatchPlugin.cs | 4 + 2 files changed, 77 insertions(+), 29 deletions(-) diff --git a/InscryptionCommunityPatch/Card/StackAbilityIcons.cs b/InscryptionCommunityPatch/Card/StackAbilityIcons.cs index 3c82971d..2994adef 100644 --- a/InscryptionCommunityPatch/Card/StackAbilityIcons.cs +++ b/InscryptionCommunityPatch/Card/StackAbilityIcons.cs @@ -56,7 +56,7 @@ public static class StackAbilityIcons private static Sprite GetGBCNumberSprite(int number) { - var stackGBC = "stack_gbc.png"; + string stackGBC = "stack_gbc.png"; if (!PatchPlugin.act2StackIconType.Value) stackGBC = "stack_gbc_alt.png"; @@ -101,13 +101,6 @@ private static Color[] LEFT_BORDER private static readonly Dictionary patchedTexture = new(); private static readonly Dictionary> patchLocations = new(); - [HarmonyPatch(typeof(CardAbilityIcons), "GetDistinctShownAbilities")] - [HarmonyPostfix] - private static void ClearStackableIcons(ref List __result, CardInfo info, List mods, List hiddenAbilities) - { - __result = __result.Distinct().ToList(); - } - private static Vector2Int FindMatchingOnesDigit(Texture2D searchTex, bool normalSize = true) { Texture2D onesTexture = normalSize ? NUMBER_TEXTURES[1] : MEDIUM_NUMBER_TEXTURES[1]; @@ -301,6 +294,18 @@ private static Texture2D PatchTexture(Ability ability, int count) return newTexture; } + [HarmonyPatch(typeof(CardAbilityIcons), "GetDistinctShownAbilities")] + [HarmonyPostfix] + private static void ClearStackableIcons(ref List __result, CardInfo info, List mods, List hiddenAbilities) + { + int preDistinctCount = __result.Count; + __result = __result.Distinct().ToList(); + if (PatchPlugin.doubleStackSplit.Value && __result.Count == 1 && preDistinctCount == 2 && AbilitiesUtil.GetInfo(__result[0]).canStack) + { + __result.Add(__result[0]); + } + } + [HarmonyPatch(typeof(AbilityIconInteractable), "AssignAbility")] [HarmonyPostfix] private static void AddIconNumber(Ability ability, CardInfo info, PlayableCard card, ref AbilityIconInteractable __instance) @@ -312,12 +317,12 @@ private static void AddIconNumber(Ability ability, CardInfo info, PlayableCard c // Find all abilities on the card // Replace all of the textures where it stacks with a texture showing that it stacks // Okay, go through each ability on the card and see how many instances it has. - List baseAbilities = new(info.Abilities); int? count = null; + List baseAbilities = new(info.Abilities); + AbilityInfo ai = AbilityManager.AllAbilityInfos.AbilityByID(ability); if (card != null) { - baseAbilities.AddRange(AbilitiesUtil.GetAbilitiesFromMods(card.TemporaryMods)); - AbilityInfo ai = AbilityManager.AllAbilityInfos.AbilityByID(ability); + baseAbilities.AddRange(AbilitiesUtil.GetAbilitiesFromMods(card.TemporaryMods/*.Where(x => !x.fromTotem && (!x.fromCardMerge || PatchPlugin.configMergeOnBottom.Value)).ToList()*/)); if (ai.GetHideSingleStacks()) { for (int i = 0; i < card.Status.hiddenAbilities.Count(x => x == ability); i++) @@ -333,10 +338,15 @@ private static void AddIconNumber(Ability ability, CardInfo info, PlayableCard c } count ??= baseAbilities.Count(ab => ab == ability); - //Debug.Log($"[{AbilitiesUtil.GetInfo(ability).rulebookName}] {count}"); + Debug.Log($"[{AbilitiesUtil.GetInfo(ability).rulebookName}] {count} {baseAbilities.Count}"); - if (count > 1) // We need to add an override - __instance.SetIcon(PatchTexture(ability, (int)count)); + if (count > 1) // we have a stack and need to add an override + { + if (PatchPlugin.doubleStackSplit.Value && count == 2 && count == baseAbilities.Count) + __instance.SetIcon(__instance.LoadIcon(info, ai, card != null && card.OpponentCard));//RenderSameSigilTwice(__instance, ai, info, card); + else + __instance.SetIcon(PatchTexture(ability, (int)count)); + } } [HarmonyPatch(typeof(PixelCardAbilityIcons), "DisplayAbilities", new Type[] { typeof(List), typeof(PlayableCard) })] @@ -348,7 +358,6 @@ private static bool PatchPixelCardStacks(PixelCardAbilityIcons __instance, List< public static bool RenderPixelAbilityStacks(PixelCardAbilityIcons __instance, List abilities, PlayableCard card) { - List> grps = abilities.Distinct().Select(a => new Tuple(a, abilities.Where(ab => ab == a).Count())).ToList(); List abilityIconGroups = __instance.abilityIconGroups; if (abilityIconGroups.Count == 0) return false; @@ -356,22 +365,55 @@ public static bool RenderPixelAbilityStacks(PixelCardAbilityIcons __instance, Li foreach (GameObject gameObject in abilityIconGroups) gameObject.gameObject.SetActive(false); - if (grps.Count > 0 && grps.Count - 1 < abilityIconGroups.Count) + List allDisplayableAbilities = new(abilities); + if (card != null) { + allDisplayableAbilities.AddRange(AbilitiesUtil.GetAbilitiesFromMods(card.TemporaryMods)); + } + + List> grps = allDisplayableAbilities.Distinct().Select(a => new Tuple(a, abilities.Where(ab => ab == a).Count())).ToList(); + + if (grps.Count > 0 && grps.Count - 1 < abilityIconGroups.Count) // if there are displayable sigils and there are enough icon groups + { + // if there is only 1 ability and there are two stacks of it, render it twice + if (PatchPlugin.doubleStackSplit.Value && grps.Count == 1 && grps[0].Item2 == 2) + { + PatchPlugin.Logger.LogDebug($"Displaying {grps[0].Item1} twice"); + grps[0] = new Tuple(grps[0].Item1, 1); + grps.Add(grps[0]); + } + GameObject iconGroup = abilityIconGroups[grps.Count - 1]; iconGroup.gameObject.SetActive(true); - List componentsInChildren = new(); + List abilityRenderers = new(); foreach (Transform child in iconGroup.transform) - componentsInChildren.Add(child.gameObject.GetComponent()); + abilityRenderers.Add(child.gameObject.GetComponent()); - componentsInChildren.RemoveAll(sr => sr == null); + abilityRenderers.RemoveAll(sr => sr == null); - for (int i = 0; i < componentsInChildren.Count; i++) + CardInfo cardInfo = card?.Info ?? __instance.GetComponentInParent()?.Info; + for (int i = 0; i < abilityRenderers.Count; i++) { - SpriteRenderer abilityRenderer = componentsInChildren[i]; + SpriteRenderer abilityRenderer = abilityRenderers[i]; AbilityInfo abilityInfo = AbilitiesUtil.GetInfo(grps[i].Item1); - CardInfo cardInfo = card?.Info ?? __instance.GetComponentInParent()?.Info; + int stackCount = grps[i].Item2; + if (card != null) + { + if (abilityInfo.GetHideSingleStacks()) + { + for (int j = 0; j < card.Status.hiddenAbilities.Count(x => x == grps[i].Item1); j++) + { + stackCount--; + } + } + else if (card.Status.hiddenAbilities.Contains(grps[i].Item1)) + stackCount -= allDisplayableAbilities.Count(x => x == grps[i].Item1); + + if (abilityInfo.IsShieldAbility()) + stackCount = card.GetShieldBehaviour(grps[i].Item1)?.NumShields ?? 0; + } + abilityRenderer.sprite = abilityInfo.activated ? new() : OverridePixelSprite(abilityInfo, cardInfo, card); if (abilityInfo.flipYIfOpponent && card != null && card.OpponentCard) { @@ -383,7 +425,8 @@ public static bool RenderPixelAbilityStacks(PixelCardAbilityIcons __instance, Li else abilityRenderer.flipY = false; - AddStackCount(abilityRenderer, grps[i]); + PatchPlugin.Logger.LogDebug($"Pixel Stacks: [{grps[i].Item1}] Count: {stackCount}"); + AddStackCount(abilityRenderer, grps[i].Item1, stackCount); } } __instance.conduitIcon.SetActive(abilities.Exists((Ability x) => AbilitiesUtil.GetInfo(x).conduit)); @@ -402,14 +445,14 @@ public static bool RenderPixelAbilityStacks(PixelCardAbilityIcons __instance, Li return false; } - private static void AddStackCount(SpriteRenderer abilityRenderer, Tuple grpsI) + private static void AddStackCount(SpriteRenderer abilityRenderer, Ability ability, int count) { // And now my custom code to add the ability counter if we need to Transform countTransform = abilityRenderer.transform.Find("Count"); if (countTransform == null) { - if (grpsI.Item2 <= 1) + if (count <= 1) return; GameObject counter = new(); @@ -428,17 +471,18 @@ private static void AddStackCount(SpriteRenderer abilityRenderer, Tuple().sprite = GBC_NUMBER_SPRITES[grpsI.Item2 - 1]; + Debug.Log($"countTransform [{count - 1}]"); + countTransform.gameObject.GetComponent().sprite = GBC_NUMBER_SPRITES[count - 1]; } } private static Sprite OverridePixelSprite(AbilityInfo abilityInfo, CardInfo cardInfo, PlayableCard card) { + // countdown numbers for evolve and transformer if (cardInfo != null && (abilityInfo.ability == Ability.Evolve || abilityInfo.ability == Ability.Transformer)) { int turnsInPlay = card?.GetComponentInChildren()?.numTurnsInPlay ?? 0; @@ -457,7 +501,7 @@ private static Sprite OverridePixelSprite(AbilityInfo abilityInfo, CardInfo card return TextureHelper.ConvertTexture(texture, TextureHelper.SpriteType.PixelAbilityIcon); } - if (card && card.RenderInfo.overriddenAbilityIcons.ContainsKey(abilityInfo.ability)) + if (card != null && card.RenderInfo.overriddenAbilityIcons.ContainsKey(abilityInfo.ability)) { card.RenderInfo.overriddenAbilityIcons.TryGetValue(abilityInfo.ability, out Texture texture); diff --git a/InscryptionCommunityPatch/InscryptionCommunityPatchPlugin.cs b/InscryptionCommunityPatch/InscryptionCommunityPatchPlugin.cs index a8dca8c4..821280be 100644 --- a/InscryptionCommunityPatch/InscryptionCommunityPatchPlugin.cs +++ b/InscryptionCommunityPatch/InscryptionCommunityPatchPlugin.cs @@ -36,6 +36,7 @@ public class PatchPlugin : BaseUnityPlugin internal static ConfigEntry rightAct2Cost; internal static ConfigEntry act2CostRender; + internal static ConfigEntry doubleStackSplit; internal static ConfigEntry act2StackIconType; @@ -54,6 +55,7 @@ public class PatchPlugin : BaseUnityPlugin internal static ConfigEntry act2TutorCenterRows; + new internal static ManualLogSource Logger; private readonly Harmony HarmonyInstance = new(ModGUID); @@ -93,6 +95,8 @@ private void Awake() rightAct2Cost = Config.Bind("Card Costs", "GBC Cost On Right", true, "GBC Cards display their costs on the top-right corner. If false, display on the top-left corner"); configMergeOnBottom = Config.Bind("Sigil Display", "Merge_On_Botom", false, "Makes it so if enabled, merged sigils will display on the bottom of the card instead of on the artwork. In extreme cases, this can cause some visual bugs."); configRemovePatches = Config.Bind("Sigil Display", "Remove_Patches", false, "Makes it so if enabled, merged sigils will not have a patch behind them anymore and will instead be glowing yellow (only works with Merge_On_Bottom)."); + doubleStackSplit = Config.Bind("Sigil Display", "Vanilla Stacking", false, "If enabled, cards with only two visible sigils will display each separately even if they can stack."); + configSmallPricetags = Config.Bind("Act 1", "Smaller Pricetags", false, "If enabled, the price tags placed on cards while buying from the Trapper will be scaled down."); configMovePricetags = Config.Bind("Act 1", "Move Pricetags", false, "If enabled, the price tags placed on cards while buying from the Trapper will be moved to the right."); act2StackIconType = Config.Bind("Sigil Display", "Act 2 Sigil icon type", true, "If true, stacking icons are a cream outline with a black center. If false, stacking icons are a black outline with a cream center. Act 2"); From d4ac8978e003be6cb1edf8a9c5c1b7705d8189f3 Mon Sep 17 00:00:00 2001 From: WhistleWind Date: Sun, 12 Jan 2025 22:59:13 -0800 Subject: [PATCH 03/10] Added support for vanilla-style compound costs --- InscryptionAPI/Helpers/TextureHelper.cs | 18 +- InscryptionAPI/InscryptionAPIPlugin.cs | 2 +- .../Assets/blood_cost_11.png | Bin 908 -> 1137 bytes .../Assets/bone_cost_11.png | Bin 1258 -> 1495 bytes .../Assets/bone_cost_13.png | Bin 1553 -> 1786 bytes .../Assets/bone_cost_14.png | Bin 1660 -> 1580 bytes .../Assets/bone_cost_15.png | Bin 0 -> 1691 bytes .../Assets/bone_cost_16.png | Bin 0 -> 1820 bytes .../Assets/pixel_base_large.png | Bin 0 -> 364 bytes .../Assets/pixel_blank_large.png | Bin 0 -> 359 bytes .../Assets/pixel_blood_large_1.png | Bin 0 -> 439 bytes .../Assets/pixel_blood_large_10.png | Bin 0 -> 460 bytes .../Assets/pixel_blood_large_11.png | Bin 0 -> 463 bytes .../Assets/pixel_blood_large_12.png | Bin 0 -> 464 bytes .../Assets/pixel_blood_large_13.png | Bin 0 -> 463 bytes .../Assets/pixel_blood_large_14.png | Bin 0 -> 467 bytes .../Assets/pixel_blood_large_2.png | Bin 0 -> 457 bytes .../Assets/pixel_blood_large_3.png | Bin 0 -> 471 bytes .../Assets/pixel_blood_large_4.png | Bin 0 -> 471 bytes .../Assets/pixel_blood_large_5.png | Bin 0 -> 468 bytes .../Assets/pixel_blood_large_6.png | Bin 0 -> 472 bytes .../Assets/pixel_blood_large_7.png | Bin 0 -> 467 bytes .../Assets/pixel_blood_large_8.png | Bin 0 -> 467 bytes .../Assets/pixel_blood_large_9.png | Bin 0 -> 466 bytes .../Assets/pixel_bone_large_1.png | Bin 0 -> 452 bytes .../Assets/pixel_bone_large_10.png | Bin 0 -> 450 bytes .../Assets/pixel_bone_large_11.png | Bin 0 -> 452 bytes .../Assets/pixel_bone_large_12.png | Bin 0 -> 450 bytes .../Assets/pixel_bone_large_13.png | Bin 0 -> 450 bytes .../Assets/pixel_bone_large_14.png | Bin 0 -> 451 bytes .../Assets/pixel_bone_large_15.png | Bin 0 -> 451 bytes .../Assets/pixel_bone_large_16.png | Bin 0 -> 455 bytes .../Assets/pixel_bone_large_2.png | Bin 0 -> 451 bytes .../Assets/pixel_bone_large_3.png | Bin 0 -> 451 bytes .../Assets/pixel_bone_large_4.png | Bin 0 -> 451 bytes .../Assets/pixel_bone_large_5.png | Bin 0 -> 449 bytes .../Assets/pixel_bone_large_6.png | Bin 0 -> 452 bytes .../Assets/pixel_bone_large_7.png | Bin 0 -> 449 bytes .../Assets/pixel_bone_large_8.png | Bin 0 -> 453 bytes .../Assets/pixel_bone_large_9.png | Bin 0 -> 452 bytes .../Assets/pixel_energy_large_1.png | Bin 0 -> 392 bytes .../Assets/pixel_energy_large_2.png | Bin 0 -> 400 bytes .../Assets/pixel_energy_large_3.png | Bin 0 -> 452 bytes .../Assets/pixel_energy_large_4.png | Bin 0 -> 458 bytes .../Assets/pixel_energy_large_5.png | Bin 0 -> 452 bytes .../Assets/pixel_energy_large_6.png | Bin 0 -> 456 bytes .../Assets/pixel_energy_large_7.png | Bin 0 -> 459 bytes .../Assets/pixel_mox_blue_green_large.png | Bin 0 -> 484 bytes .../Assets/pixel_mox_blue_large_1.png | Bin 0 -> 451 bytes .../Assets/pixel_mox_blue_large_2.png | Bin 0 -> 464 bytes .../Assets/pixel_mox_blue_large_3.png | Bin 0 -> 473 bytes .../Assets/pixel_mox_blue_large_4.png | Bin 0 -> 476 bytes .../Assets/pixel_mox_blue_orange_large.png | Bin 0 -> 489 bytes .../Assets/pixel_mox_grand_large.png | Bin 0 -> 506 bytes .../Assets/pixel_mox_green_large_1.png | Bin 0 -> 446 bytes .../Assets/pixel_mox_green_large_2.png | Bin 0 -> 457 bytes .../Assets/pixel_mox_green_large_3.png | Bin 0 -> 462 bytes .../Assets/pixel_mox_green_large_4.png | Bin 0 -> 468 bytes .../Assets/pixel_mox_green_orange_large.png | Bin 0 -> 482 bytes .../Assets/pixel_mox_orange_large_1.png | Bin 0 -> 450 bytes .../Assets/pixel_mox_orange_large_2.png | Bin 0 -> 471 bytes .../Assets/pixel_mox_orange_large_3.png | Bin 0 -> 483 bytes .../Assets/pixel_mox_orange_large_4.png | Bin 0 -> 484 bytes .../Card/CardCostRender.cs | 21 +- .../Card/Part1CardCostRender.cs | 2 +- .../Card/Part2CardCostRender.cs | 192 +++++++++++++++++- .../Card/StackAbilityIcons.cs | 14 +- .../InscryptionCommunityPatchPlugin.cs | 3 + 68 files changed, 229 insertions(+), 23 deletions(-) create mode 100644 InscryptionCommunityPatch/Assets/bone_cost_15.png create mode 100644 InscryptionCommunityPatch/Assets/bone_cost_16.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_base_large.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_blank_large.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_blood_large_1.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_blood_large_10.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_blood_large_11.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_blood_large_12.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_blood_large_13.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_blood_large_14.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_blood_large_2.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_blood_large_3.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_blood_large_4.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_blood_large_5.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_blood_large_6.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_blood_large_7.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_blood_large_8.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_blood_large_9.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_bone_large_1.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_bone_large_10.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_bone_large_11.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_bone_large_12.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_bone_large_13.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_bone_large_14.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_bone_large_15.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_bone_large_16.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_bone_large_2.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_bone_large_3.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_bone_large_4.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_bone_large_5.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_bone_large_6.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_bone_large_7.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_bone_large_8.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_bone_large_9.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_energy_large_1.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_energy_large_2.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_energy_large_3.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_energy_large_4.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_energy_large_5.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_energy_large_6.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_energy_large_7.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_mox_blue_green_large.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_mox_blue_large_1.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_mox_blue_large_2.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_mox_blue_large_3.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_mox_blue_large_4.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_mox_blue_orange_large.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_mox_grand_large.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_mox_green_large_1.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_mox_green_large_2.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_mox_green_large_3.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_mox_green_large_4.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_mox_green_orange_large.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_mox_orange_large_1.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_mox_orange_large_2.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_mox_orange_large_3.png create mode 100644 InscryptionCommunityPatch/Assets/pixel_mox_orange_large_4.png diff --git a/InscryptionAPI/Helpers/TextureHelper.cs b/InscryptionAPI/Helpers/TextureHelper.cs index 7d1f2e54..f2758dfd 100644 --- a/InscryptionAPI/Helpers/TextureHelper.cs +++ b/InscryptionAPI/Helpers/TextureHelper.cs @@ -80,7 +80,11 @@ public enum SpriteType : int /// /// The texture for a button in Act 2 (same kind of button used for the hammer and activated sigils). /// - PixelStandardButton = 12 + PixelStandardButton = 12, + + Act2CostVanillaLeft = 13, + + Act2CostVanillaRight = 14 }; private static Vector2 DEFAULT_PIVOT = new(0.5f, 0.5f); @@ -89,8 +93,8 @@ public enum SpriteType : int private static readonly Dictionary SPRITE_RECTS = new() { - { SpriteType.CardPortrait, new Rect(0.0f, 0.0f, 114.0f, 94.0f) }, - { SpriteType.PixelPortrait, new Rect(0.0f, 0.0f, 41.0f, 28.0f) }, + { SpriteType.CardPortrait, new Rect(0f, 0f, 114f, 94f) }, + { SpriteType.PixelPortrait, new Rect(0f, 0f, 41f, 28f) }, { SpriteType.PixelAbilityIcon, new Rect(0f, 0f, 17f, 17f) }, { SpriteType.PixelStatIcon, new Rect(0f, 0f, 16f, 8f) }, { SpriteType.ChallengeIcon, new Rect(0f, 0f, 49f, 49f) }, @@ -101,7 +105,9 @@ public enum SpriteType : int { SpriteType.StarterDeckIcon, new Rect(0f, 0f, 35f, 44f) }, { SpriteType.PixelDecal, new Rect(0f, 0f, 42f, 56f) }, { SpriteType.PixelActivatedAbilityIcon, new Rect(0f, 0f, 22f, 10f) }, - { SpriteType.PixelStandardButton, new Rect(0f, 0f, 26f, 17f) } + { SpriteType.PixelStandardButton, new Rect(0f, 0f, 26f, 17f) }, + { SpriteType.Act2CostVanillaLeft, new Rect(0f, 0f, 48f, 28f) }, // vanilla costs should have a creme border on the left and right so we don't need padding + { SpriteType.Act2CostVanillaRight, new Rect(0f, 0f, 48f, 28f) } }; private static readonly Dictionary SPRITE_PIVOTS = new() @@ -118,7 +124,9 @@ public enum SpriteType : int { SpriteType.StarterDeckIcon, DEFAULT_PIVOT }, { SpriteType.PixelDecal, DEFAULT_PIVOT }, { SpriteType.PixelActivatedAbilityIcon, DEFAULT_PIVOT }, - { SpriteType.PixelStandardButton, new Vector2(0.5f, 0f) } + { SpriteType.PixelStandardButton, new Vector2(0.5f, 0f) }, + { SpriteType.Act2CostVanillaLeft, new Vector2(0.58f, 0.77f) }, + { SpriteType.Act2CostVanillaRight, new Vector2(0.75f, 0.77f) } }; /// diff --git a/InscryptionAPI/InscryptionAPIPlugin.cs b/InscryptionAPI/InscryptionAPIPlugin.cs index 8ba20cbe..866a6592 100644 --- a/InscryptionAPI/InscryptionAPIPlugin.cs +++ b/InscryptionAPI/InscryptionAPIPlugin.cs @@ -30,7 +30,7 @@ public class InscryptionAPIPlugin : BaseUnityPlugin { public const string ModGUID = "cyantist.inscryption.api"; public const string ModName = "InscryptionAPI"; - public const string ModVer = "2.22.3"; + public const string ModVer = "2.22.4"; public static string Directory = ""; diff --git a/InscryptionCommunityPatch/Assets/blood_cost_11.png b/InscryptionCommunityPatch/Assets/blood_cost_11.png index 1239cebb6fd4055068df11f1dbe4984fbf289503..2992ab89958bb4b235f5b0cedbfd81bbd50af00f 100644 GIT binary patch delta 1024 zcmeBS|Hv^Rw4Ont#5JNMI6tkVJh3R1As{g`uSCz!HAKNw&rr|k_a5eL3=9n0QX@Rm zJUz7-IDi~h1}R2X21X#u3y7tm>>wapgOM35&IDu|GBPm;0O=?o&TMA^i)R7ZAkbUJ z$nb(0OxJ@MXtpu{)7@PGcYhKc)B=-M7Y15;h!xWC~zP?dEzw}P6@|}xw`dBS(9I%dvnI> z_osjAjdH)56YsstDZ77W_RQ_lr5;LKlh3BD`^MY!;|+T&>m|({a~gmDdh@wqzGTh+ zE1gr$-CY;&@;52HLrUU(?&T9%^W7P~G_cz)cC+FvSXW%vl7h$&g{NQo;l^7HY&1R zf7Y_RKYY$!{#)R48^zp|RXi6MkEi~9z2nW^(;_;(_b!H(=Ks`^RsGnpW#SWtg5u;j z-nvUG4y2niI!vVpP1@%4Gq+jLdiofMk3!8uOoMf{C^9N<|3<;gUJ?HLd zzT3=vx7UWF>DsGpRnux0DIdAUpl*=TIPr#1f!P#?67@NLch|-*5>zVZxe>i)_4yy0 z9QYYx4jjtlk5=_q%A&H5ZTZcwd-s%ZU9MZ)cxX=jZTZV5d^|Q6#|lqkl$kJTo0aF{ zCgD{p#j<%t4y12q>`VU|ziRnCk*6DGYL-^5S-1V%B~ekW;z@gCWZY$g*fy#*#H^mb zC{Xm?}-*S zQ)1J@xBR)pTvJ~ryzBF%?Tg==%(699U0|-i#QsL=scs%(2$*X?)fplQ{NQ!^`EahanNaHz0GH*`4d|X)PeGZ Mr>mdKI;Vst02OqZm;e9( delta 773 zcmV+g1N!{&2#g1iRRRMclRW`Lf6#)lb!Rg3oPBx!lRyvs!7y)kHoI@;&CJ`4IwX_I zv3k8w`xZe$_JhI#=^T8{z7xcld)qW}+UF4fGvHCr zsF2PAoNJw5QmvIGb!)jvXa5tj&lz6^YNiSRIOii|Ct#wc0JifWUhXtoe<-o!q@tcg zXZ6Z>KxZC&{EC`Oz+-=kgE0?D$0C0#!TYfD&--1}1y4v@nJNQJz;RjsCO&)TG6l<^ zb97bRTfRz1Sv(?bB|8Az+?ZFrpEMd1vfF?l$Uwlje`Jx4yp&cSh%JNE06Zo=4XzZ{ znAxzl^NvPw++6uhBaJf)e`Em8kY>PHQ#3PbfSUIDd!_b@0SWYv!Fo;ot?Z)R!^G+{ z#yM*cWB`5?0u6&DiPuAaiihk#d!q<~ps~8Go((_I5faQE#*zhAQcJ+wP%`m4b+>wn zMu^-oU~h4*J`>6UGXQV_3#UD7l^~@Okc1kXVK?`3?G&c{Mh%5If44uPk)4=k=es5* z12`a>raDQZF(*`AEmmqMK*;U_93NJHsg8OxE{DybQm04idgClzQKB>_$;;kx)G=j{ zS^~(m>M0tP;XU4CclMUHx`A5O{I`XuEijc*;9>&6rQj@qSph3Afnc<^dUP~NO!{*c zxUS6#KxvCBDq4Q&e*q!84byqa+rf7l&7PDJFq;?B?d^JBaYJ?ourow&dDD>910)xQ z4I0^T*ddrK^4(*N1pZ9|;bV~Kpv1ld04ZOCm;w3=kATiC(>GuTCn4zYzGsr!V{ksU z+Li&}9YK5@0^0Aq3=r%0xjMj8CERvcRd8PR6_%O9&ik0EcLbomzYPD-(Igi8{X%By ztg*5PI4+%ctv-+(fbQ1#;{=?u5wP1*KNsx?IA{xm>%1hn2LSx7&#U`EZK7rz_LOI( zpyw69`uwZ_WHPS+0KU0-pPM=<*Ms;zA^RZ*3#I-6Nhv~~{RO*h00000NkvXXu0mjf Dovd!T diff --git a/InscryptionCommunityPatch/Assets/bone_cost_11.png b/InscryptionCommunityPatch/Assets/bone_cost_11.png index dd906b0c643c1d06c6e6aaccc1203b7f740f3a6d..b01605dcb3115cb6dcc36d070fb23fb5a261c6e3 100644 GIT binary patch delta 1440 zcmZ9Mdpy&77{`CRu&o^%wUS~u#E6+mE+}g++1x(pI0MHjaf?)Cj0&kP40Yv?=UNm;23loDMiOpq?@>mZI}RELAsr7W zA}2E}smO4)dwq$y@aJ1T8$H=)!O39m{gOcgmq7G7JZIl|X}{7I;^Zf8L7`=zJ`r61 zsM4UfBL*{v&mGdU7*FgDNz$Q8$b=2xN%f{rDm{TD-jQF!GD~Gcgkk-wT8o9d+Up|a zFW9fh=Dju{JP97g^SGCHuGkaJ$V-jWJ^3`HD$d_ko}7hgf)ul~%dF!r*;7+K*8vnZ zTHN@9k@1m9ILNsH7!F0nkIm(JB>I%zG(P`+3Hxd=u5TON`q6r%dAq z#VI8)$c^FZc7Gw(I_d!p-4)7o2ZjAc6{YdQ5shHH&%xszXK|fob|)^1Fn$}yf}ogJwsF1AC8BNtYQBdE8~LS{17OMGO{oIT`~ zk;_`9b@5XJ2OOpvF~BxLp~M}e%e-lD)^fbZPy?mp-P(IfhW>oAtoB9F^<)|Gy7B1P zD!qq0iw9G(yVYKlZ08mfbNh9e8@G3O_}_u%V=qX@sHM;H16ht$)_Q``%46(2iFBAi z9KaNKz87$|_5K1qxR(EMS7)3n!{FIxT<-?VDww;_vVJA{i=vW3v7vjU>I?6&iXL4g z(Vct*me6n8={Q-$F$ZgART4b9p|RM3*?X<8>}@gg{#gYASK(+8XTsQ!zo(nrwk#vS z4GcB5?>FzNd+zDxbf4m@(eL#eh#8(8nio+4`?^Elapu%paCRU0P!dn7?3>R+* zG!ct6WDKf|d(#h-rn_$Sy|fWO04tpiLXWEGyV^Y6o?hAp-F!BzRo#d}0V#(*%S8Z zZ}W(aI^}u@KOxy7KC87#^;*XzR#X8Z=)l9pRnD+}TtX9g)V2!YiQ-d~)5x!Oq&uC` zHmJj0nqls3zIsGA$@gKuv>b~QX0VCrWxeA@tfqs#OccMeTZcsoZQg($dwrhVsAH$- zb1xWMYXRy;POLA=_T{B7O&cLG{4%P1*9xIzY+5C0OmP1$)phm5GMWepjj_sMEJw1b zdZpf1msnTAXXFSUUa}=Kvnh~@ltitx)7iCm3;iU*#hrQ8wG`>LZQ%w?w>gAFgF?|) cnZs&S5Z3;Mfkhve^4t2S=rk*8k*Ra|zbsZ~WB>pF delta 1201 zcmV;i1Wx@#|y`adF8-iD;4qKUj4S9zqs11VLRBi3mZ^tSlJTh+agD2S;6T z4+=pDtmt9qpxH;VJJ0&}t9sMZ)9<5aMiBG|Mb~>Z^SY~ERe$&ErvExuNgK?__IjP0 z_4KMk`%=q1v&{Z)VUPeMqV@nM%j}{KkEotRqQ-Ic=l3@d?o2c~yk~-b-x{NjKm9@O z5VfQQUVFd*OR>hH0Z>8$5e7PCIsD*V$;QtMNy4)4{(F)---DFehlSM_`hY~NtH`ek z8IiUx=8ilr8h_CZqgO=hP-I7mxRQ4tV*ZpvvT~GS(I2|^cG0R49DuyR9I>4B;o95n zUcsC6-G?wQJCdQ!x6Xb-yRN@N@n&qqfJ{*F5F7v*jF+eu8_C16XAZ3M+w-yh#=~@S z`VP7B(iH@-_}!Xlg6niGN{m>6?7IZ^IjOdP<{i;e%75%O2!b65=!@T8l&gP$S~M$K za0a|2t+(dEZ=2~{oNNCxo)fhPHyfrF&Wq+Ds%K6VvBA$&X}HS-V+Y_SX%#r@N`^hb zrEE!?Qf61KyX}x!zEm*K51*SS+CBzzB~Vn5^ZeO0_d(M*y0LoPOpf~8XE_6(-_u~N z8#@3fpnt43a3h4JbDeeGN0EIS2f=3VD+g)n*q3s}#I4F%1Ab~A7meuF$tUUQg7OP1 zfvEnXXoFMW6gYX{Zqb;E=?-k?mF06y(@vkcU|QPjl%X2{IH;m&kFP06R|(kcpLt6( zKaM?}nJuS~_V07rLzD;Zyje64IRSaqDLcIR-G93#jjlm(sgeO2kgT2>&Qf=IE8=xG zl`^{zI6m6Ag{GI*OgY3WO{z~$(4)I|WPNslHJ)Xh`+OTE5)dAdsJf`zd3N3d^vo>__oZ{MUGs}y|0-HB7bM*q90X)GJV9E>+WPW+o=-4S1+Ap{G({hfaiX}B>-^H3H0rL-;U^NcCEZ_6oAVG`GUa}*#|ia*C1#BhAMg58}y*OAgFU?_Ce4f4C7hQ|gkVy1ypfx|rxx1C*vMqJOZ16Q^CZLRzLRbHXzZLRvQ1okEM99XV2mldAqR>e>VqfbKLKYeYSWN^0z9{g&_LSWjPv_htU!6b&y$cGLFK-ItGP;c4#5h|6`YVq)pdHo1@9VvqCBg=73-Gy=(R zjEb;R=+BuT7`ivRdNg{{f;wTp^gE{OKPZ@;z{%1eigiEA`|WW|$6c)ttQH5SI2Sf~pyMT~hlYBy6Z7yzN6r{Wiepn)ks&+OAULN}SN(3VA<&t-lvQ}@ z-I~bZOMAO3Q@@Tr@AgmgUf5sE9!vVYIQ8>-Wkk4COKpZ8JRKrRKZ-kQ0?g*ft@9Zg*uH8!5L^Q!YRDP1f96;u=>C%Us+ z*vK?3N7gK7VyvlP2ala_b%(8+ZcS1pzkgCgM)r6SV|ke)rXLXfa~AwSbJ-VSVI-KS zV|GP5L!-t8Vi`@EQH~XKaTpo3k9EQlBq4kk4a&e_E3JV9O{@$Ns;#HuM!9Pl?dzQ} z%&X1B!{jc>PUl#zl+!AbRMFKH+u*G=Kk9XQ7NJKZtd!eVAwSX;XI^b_tqh0@6xUV0 zlpnq7odCzN)U>Q|=;;4C=mIWTgd}+Se9Ag|L`U0O%P=I)1cwrFK^9=FHs{Z$B`Q(E zS0&n&s=>a3f@hNkYwVI~HG0KOMuC0=wczLMD%tU2>B+e1I$P*i&z^44ts*2+w*B_3 zu8wKhKC^g>uSXOE%TCX=-;pUkiLGHKf7ejJ-CDGBWck<3PrSIAVi+GAZFim#_a>}S zekiHFQAu3F@r-q*bfmF`<^>+~Ethg+_U!HF%S>sj{LaAfrpGx$tEw|9+3jALRp{wI z_N3a1JDL0V)+P?n?%di@b3|4odj}x4KbJ3lN*nhfCV_dqTw-A3I7f*!9Ir z)+Yz&aX+3xHx>TG&l$=FAt#`CO2t!w&Q9{{Y|c9Uic0rQ)?iegnO!fkjPgAsaf*DR zO`{(kH(=m%eUHINe66eyRjI0#aC3oI)$IAB>Kz;`xP`QA6J3HeI0p8qkF=3m2y%j` zfVv4(1dm}D9H>35d43qT|BR6LEM{-qLUS(0b?KGu_~yjr0PgS*)O6PYhiG@ErqExv z_+1Qm>#bP!BHZ-{xPO`v<=uHb_CSFRy`wZVjk!Rs9xm4g*D61dOt1r0y8(z6$$K1q zd96wJL@(LgIVa&u4Pv|17TKL0_C53j5vD4>lo4MJ&EFv$PE(xRIZS?cJgc@ z=iyrN%wUAQ1jd@9OWg1E(V`!N%4hUm#5yz%aTjP#FW;F#{$pDw53BjtP4gEx^K;X8 z1oy&5w>}+e-LDTt<60Rd;qb_O-ch5>_v#sQ-c_HZvy`ANO8OCqhf?1O+E3~aJ)8fN zf88eH?dG9tXv`F4eyk@3Vp8(xJ%Tg)z(Y0WhRw^M)KIFjYw#5!GI-CvqvHpO1%-v?HXEO!M)NdSL}i)`P( zN({VI#D${9OKUf6cLckA4~(bR8qS^G0DW$4F?_F$y$VK&67P4@iHVfCD{9S(6)MF7 z)>P%V1ak0zf|9E)R|Qq*RU~@p<+I`sW4)%zcP zrLRl)i1GL1y?3e|d%F0l%6rcasqe}e^~&j4)zA=)oVsANK?D%e2$4zvI6ruxM}Oe4 zeJ8XCzrz^{?VS(Yu8s{oqI^7<0EFoK;F7M_e@z6#`IVW2x@_J0lrBNt1X$pgLxBGN zW9lgNCIslZKX4vEfWm8Ix<2*eqApKb!d!hv&^QR-O0Bs2z$qHH564wy{|lvemvbHA_c-y1}CF8BR~XG2-FK- z{KQvRfF^H%Yw-~vT;I6FwJLvH4(`Eme{;~WF`XJ<;gYbUAwP0~YYx0j=tL42zr?cA z69%RLH6KZcl2e?zf%e=s~HSy=nA#LLPN$Sa4n@V~SR4h|Jn2sbk z1&;5&higR2a0jOI!X%5|dumRXs_ci~h5&F@EE4`Uef>vtdCi8}@Py+odMB)rSumV} zU=Rx??6~`8t~rPiX5@xe$>t3!^K`5sI zjyGm+(PAMT{F$Q4wCB{$?OVdOM8F(R)<*5iQHaYk{>-elu{S5QZK3FUb)u+d>2Vm1 z{*m4X?i64iX7y|qmKL}c1tK(BgCu$v+oiZI)5wDuduhZsa=!2>ttnD4f5+jTB@u+e zx$kwEKR8(pc>u>9X_qKK9G9D0xmJs7YMdMG4k`%U>S83sP7{dHntPtFEQ~oEKm-xO zbUp-*TfJ`LTq}FLf-*-~gcznQpm+AGfbf)tfj(Lmzm1h)*$-B5OjNiP z08DejE*|AaPuY1M?>Mtke-i<49_bRz{$Ljf$J00ue!*BlrR3*kSx|BQI)RhysI);0 zv~BVR+UR94ywm^Wj2as{p|;)7tVSu}syQ()VM-?&yM{L=m!3xsg8hJh?u>#0ko&=tO$v_rI=`;5fWP#~-kJG%&e{L!@;=JrhEa#EZ z_@C6&i~*7Ya14PYU`01HIjif~(BO3EuZvZYdMHKS;oaY^&YYUBH0!ehyyLCc$MyZ5 zBj>QMM^DGDHEJ++baLn+&L2hC3uS-Ry}yf80>F7JWiKuVcU%I*;ZyGyrsq_C_>5|3 z@z#7AWS&b@zIjP?e?J)*W%x01=NAp7VzI(%?G2nBr!*QGgE-&&M*Ab>>1hiOZ32Qn1 zjl(IxVr*Pc_!}W?HqLd>0gx)fTEkzE?}z~Pa9nV{C{6^IDFf0tmjL4YdL1_jzf*^I d{ZEKe{{Thpzgj^4u^0dV002ovPDHLkV1k2v$$bC- diff --git a/InscryptionCommunityPatch/Assets/bone_cost_14.png b/InscryptionCommunityPatch/Assets/bone_cost_14.png index 17c69fb408f1c029ceb5cc38e6b8bc8ac3c35de0..ebacd87c0cd86eff7509974e8959721befcda70e 100644 GIT binary patch delta 1525 zcmZ9Mdo}SVk?>=m%%WEG32&`W-KdV#yxT=jKrWhgE4Z=WoD{X%4N1K zbQ`x! zgph~as5t-t)M$0yZj>Dw)=vGMw}Qn!^a+bNs{0QeA* zVDCwBp1b0DlIicYqx1B|+!Q@b1!_0ho;;k0&tNXKDwUvInxK~UszuY6)m={lvqrS&=*=&BRVqW zV{gkY%eq@uN*ME<){8+A$jkN{620zt-hEW5bkFvxl|uqk_m+GYIyHmOl`^kEFnQB) z?pz<|!UsNcaT--pxw6;LwoU(3?)a^qx7%94{By0*EYxOodXH@QK2tqaUH2|q#z90T zZ@cU;%wDD#f?jowx%X?aqYP<`N10V5aUP_XT89VQk zJMZ8^cx6L`$3)Pi0zA+2@w-5+a9TitUjeDoh6 zSEB+|Zo}xG+M=ZlLA<|dYiwr2=IfE;gq(!PV>kLo!q9-l#pdZ;$I~H&hM30*ysFfd zIp?_#2h&-tE5jw&rY!e>jRx9Jb~bXKHTyj%rUnyQV+0+-$5#ss}z7b(Xl8|6ulz z#07O*Bf{_rjrSoCXG*t-BK%H64$^}q9wS96s{Fy;Xc5tF@iZwC*=K5L`6;W^u_eoq zaXyAIc4A)H-y62wk2m*1Zh7M{ON{)$B#q44#CFf@Dn+1Cco^Og&snyE_HfQQBTyEw z9<>{j>f`~z0sM*2{JqtI(Ueo}hY3MhX|JTqv8gqQcZw;#4NoE6IS6A74sM?_K-bBA-W6RAFWM*Z%rc6X}sgFM~@|;N;wq^+$ z6zBqJX{M}prMIxUe{FoqwszMfI)Yq~jxq?83yUUnE?ens9Xl%u^iWH)mhau|^rlD= z!8*qk6SrNVZ%M~mOQE*(D$~6vh3yJ+$MpjdBB+yyH{2N~V>7^>3!PXo-Q&CzBiM5I1ur(})K7F69JVk9EOXeC{ zYO-8@F*!2WLoM*%=gM{uMJc$iz1Nvs8}_MRsn{QXwI84Gnj11@IOGduB*{g-4qbGw z#1~8%*HQF5?LUUSfe<3Jt8L@|ch9*cYVo<}u*NVh4~ zJDPBTl!r5F)3ct!?yu2vozy_N0B)$_48579F#Mze2C(Bl6KD-h&;{{NyA%CJVSOoZ zvLC9uE%&~v`NT&mnq&mQ@r-akd}OfF_~j~b(Joj!%^g_U{61@`K+Q zMiP3zWV6d2x%qE;>vVFq@}b5{2*!`e5ehrB?dHUS}T0Y-7kfD(8wUmBtTeJA1P%qA$`$nGUa1-tC$2#v4+xN7qvoasN&@X;iPKwvh z&WPGtZ{}15t$z<}029TCNCrTB-+`U-22brfAx-!TVkotDY`I+=?SDep_+SVyqU)nM z*{+%in)uT6L3vEH?3YJSH3RbM$6-KE&rvZ%qX`4rA9Tb67?62mRJJF6Ta?F>K4Y%B z!|5ChFqKx&bzn42^$+54AM~$-2I!Q^(kKRy3^PF;Ie$Qzz_i^IS1sb=MUfu zma8)d9ti`kfO(Z&e&z=sqj}|Sb!Nn40?2&rl$eWObe&a_p&1!y0P`f(xK0<90MHFW z-C^{FWq;8>OO6OzfwbhwNgGWMFhMs0?aWudtFv{W&gxaI;0$1{i!G^EnZFmDYY?ta zI(~Ffy~?;S{MnEmzNA_PtfVU<49s5~DIN(8-GCb?UeQ8=+22b+9nE-)zyT9y5RGIY zX9)rw#S=qpsK=ip!5MdnmTP_QXQj~m%z&I6`G0qxr#`&6Ek!LaFo5gfXT?=p{8`lT+CGs!azULDhVL-`tO4I=2UJUl+ghI$dqW1mTmn|| zWz||0|4bi}!QxNSNZwkPlZ&A2GL3^SBt#TAw)Jt5pg_lLiTc=3u151J?#2D1>%_IqwtEdv3D9P*VbMt*Bs zt8B9gevBEwb(2z$J7%#!GdztX!q3K*y{c6P;!CBHSX^`#M)7#u*l`Gtr8bGqu{l`| z_Ht()Dxc)&BBqKW#~OexNvv45v$WQ@KwCSx;Y-{G;Wn4ym&X!iGvJ}{Sn z;&J7kpZro@wY@e;Hj&Vz+3N);IZ@hBH>^*e8Y5FSN50~0v)t(I1gc#x=BkVhAYR6@BA zdS9A0TD?u=3<3t(pMD}n`%j4bu79r=BUI~HiMp|}cu7SDumOM{X8;qGKUMwkOpg%{ z1KDt6$A~(k`{eVyu5VPwO048=OnP8WrTlRc57NVv@+c=cJ9or62^}k@G6NW0d=U5y zf+sR2aZ9HZiSRQzlo8$UOo>Of+^Md(;PJc17$lyK5*E+zB(8Yiy#C@lk$(xy00=`O zF<8;{kI%?9UTCnpb9t(4(oQOo_vq~pS-@$}U;^YhKqrw%h(e)&&j-J^Yj1SC>A~WM zkoL^79sC<1M0yH9yt|YQ02?DP4e5_s*8}hzz!6D20i!ttl|aY-UC>@Tt+GdU}E4W5_hgAZ?#E4^KZ&&l)E2-kO};=a9v z)$INTVKiVdFfXY7wY@pLbEb_Bef0f6SC zO@NJg?0Lx4<5GgS3{C|1U!k$#fPW|}nu|L`Ic#E&v&Gq|TGj4BJ@>+cXc07;C4hnw z1YiIn01#4M5O)5hH;3_D6HjoEOcV zbU27QpMUa9Fa`Ux@|g$cn6ZO(VJnJs(sW~&35srf%l$ni*{&3)YjMZD?A%>Tkp{iY z0ktdZjLd7dHvH`FAuYzN_qP4N54dYsk*7EGjMc%6#s?cDd^UYaH38$xyM_yN@fUcS`Sv7&8zAe&T z^+a3PEZ_He(R%KwjFWl_MjPjRRriA+yVv!r$HUmGRjifmxdpndgtk+%`)dtbQ*`^P zb)FFF)%1+13C@6=nu`y^z5lpju{1GL;SR51DSPph@} zqVJlS(#^)BvPM`|*EGl>Q=MxrxgwpGcf!2u|LA{8ya2N>n!IEc*2BrM_erg+5hMoQ zzQffV)Ly=Y6YNh6AFk_Q?Ipp*wuy$=j6P2j|EtItES*(fe?^y_`oGqsS-p;l)VEg0{ zldhi^uqH~^t;Yx4a@45HdM}&ap0KxzaY-(Gaiy%dzb}FB!c=NIA%^6sNjtFvjN0e^ zN`ieuB#;{v|E1nM^Wt*P%VE|o^W$Y^Cw~0^4yW0k)oe)gMr^pe#F#pJ4O&jl_TON zWe1ga#LfreQ+qSU{3G2_nnrTI@u}h z{eOEHrm_DV)ShgylI_($V2Y4{LsR+pZ@g{ylkMx`PCN+=ffMoXZfWBYv5oD_24*MX zS+SWg_DjGk5&^x<{sQL1iDu3g55bC!llkWl*@gN=bj(O^*|lz#5`197{%+KN2RH}( zF;`u&Yg#|W;(JW%C+F=XeaiQes$cg>F!7AC5TW1;@hURo8OO()5{)<5Ew#*8Lop|P zTOO{|c_cNnOA0a;`@JvrO~)PTlgG1}%7ne3I6;drKjAo9?g2y_rar+gA;!uZoN)oM z>@-G%F%In>T58v^MiTKx=e+L}HyJX`ijmiPNSFJneA`QS zVi~Y%cY3j1+BFP}Uw9~*eIvor8O-$7tx5-{%D6X6WuDz&J^xdtUmAwW*L{-Kj{*{Q zpz7AfRZ&`P=VIgVwU9aHB$lt#sue4&;0yLlzn+?~k`so4BsX_Q0m JwPfa{{{gH-)K~xj literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/bone_cost_16.png b/InscryptionCommunityPatch/Assets/bone_cost_16.png new file mode 100644 index 0000000000000000000000000000000000000000..9554b284651fc8f9cb3dd116bd9a6f42595194ba GIT binary patch literal 1820 zcmZ8hc{JPU8vZ3sWYH9@))Y6k5T!Jjs??TfBKCbPrD~_du8I+@s!_^}HMT*o;v%JL zNvY+U+6A?gQdehex7Lo-zRXW&&bjB@_nhZ@p7(jT|Gpp1OlTOiFd6^=jJ_Vl0%Q^h zQ6vxe4okC73`npAO$T6cME?sWFi)~E831Zhcn@6QV2%pVvkwMZ7Wm{PL=i67nxjuag*~*SK&vf<@ zwHEB8zsz-0Mf*E_|3$${thnkdf1HI_1%WZ z*x@n@$0p~qimcw_)9USl9N?-pnH5QC{eiVn%3FKKfH@2q66E?&KBGEAa-uz;G3V0n zEpKDWba#^LFKmX_cRFSllx!&oENWWAh?wJ@O9$7FEhhLc>azIACIs@D{t; zLt`KVj2>y(eR?qp96B^k0N*z)9xwzhb@ZPyl5+zQz zEg#1=949KN3A>rw3*YDDtw!ZJ#EQ-<^W|+9<|6{}v;`+an;>-a9B;Yps-ABkA+uWB z??GOJlzhDT85NAAo)Ibf;IVdN9p=}3Emj5xazt#+_Yxp=ZCJD5v$#zY!BZnQDv7rj zydgQ2Z=NL$p@yXUO0tGyh1fP&jH<7pVEfSUiy2YE^A?^`saP1Y$)~~h(D`}yF!w-Q zn#Nvt5nUQ(-lt`)2=OIoao#Dc|IgR$W8J2lbkR0_Vcl#;GBLvzOX9 zw4$!8!w$8mDDBCDHz~}Pdc=;GnrG8?z`$9h=~%TFv9fLJ8b~J|>#b3#k&pX7GP9Xq zDU2ajSR_fN7m@osRRnXG)*9Fs-6{L;nRh>|@MkdD>E8ET(m%&Ng-Rzp1!4pxB^gM< z6&HI0;4$1Q(NiOFt)Yo@_mR6uCETmJRUv*F&#vv83u3kSj(xQ{qdnqwXF%Pkt4Ds+ zX|MPr&cVTGf7x|mdek(ef9*3G8gPN`mLjw>!z701Y91xa`)`e3d1Q_VjEtpUKYt5e zu*m+sbS*5W*F91t0m6H8?G+^O2S2~$4|O8)a~k}M?K=$(jW(iz&6Av9a^AX{(tIfP z88+3>K=C2Davay_k>=sCD?53gr(~bs4}Ec$`=TR4;EdzWn+>NnQWB+aYWk0&@c=-8 zf?SQls2v3PYq>Q)%5V|GVo@k!bg4p?ZdtPpO7 z8#FGq`$${}ZJ7*bMmf^80|Lka+95awyDo-uD8M=t4C3DH!C13nY`8Kifke;aM z$s|ltHh!%_$y4TTad5zcf%K4qiF6nhD6|FKykp8Tp`68YSan`E?s~)ykWpioWRPl7 zY8o{5ByGiij?&aEam)0-RJgWmuJnCkTjZa31E zo5cw=|Hr2n7u7ZWJ^WusYib{AW?&%`5#nN+vl?p2)k0`a78M7X)o=>5Y|ewDW@)Ud zTFIpiL^kx*@ML&mN+a$pDs8~y%YIZVw<~oeIoz8Lq>8)$>qB*`)FOFFZm3JHBSL$k zRBBn*Wh_3%&#$VB@Hqh%eYty=piyx{`j^qmMFPNv0{?Apdy0t3kplyV+j#Ynuv&jb zI45^Gd~%r;*f-=!=t12WTr14~kFS`CWmERZb*N9Yn0N2)o``NC;7bid?8K1D=^-w^ zzULL|6^E*l3rEZPHYtp%07qoAc{Y+e$WJBebl0g)U%PcqdS%}JNXx1>bLO(#%{W;O cU99tf_hA7nd(`&3$dfN#pK3y3>D+$sC!%BwrT_o{ literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_base_large.png b/InscryptionCommunityPatch/Assets/pixel_base_large.png new file mode 100644 index 0000000000000000000000000000000000000000..4ca7ab8b4199a35892bc14f7e6fc829cf204a458 GIT binary patch literal 364 zcmeAS@N?(olHy`uVBq!ia0vp^20$#s!3HGNb8JolDaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(eheoCO|{#S9F5`$3q|f;CtLC@4|l8c`CQpH@$cc z0dZzK3s^i0$OeJlGDe0M%m^CIQU;*Z1a<}%ph^QHV*|zo5K}=mvMzv_GzG{80Vbfi zOkkBkmKH!3RF|OvC}0>m`R_W{vF#BCGNnCT977`9-yUQH8PlZje|?^Z1CYhQP@W|! V!@%fyrxxT|22WQ%mvv4FO#q&U>c zv7h@-A}f&3S>O>_%)r36AA}h#Sc6r7f)XXJ5hcO-X(i=}MX3w{iJ5sNdVa1U3Z{C7 zdPcwZFmD5@*_ImNnda%K#lQjNurf$7vNA9NSzbUa4P}E|qru1w7H0yo4H=mj1b}oD z5NEctfW@jH>LQ-Ev`U;>)U z1XdYjX#r$Gbr~8MfMh%Q?>g79?GXkt#XMacLoEE0C0G|Hi1aiC8gOl3W@BSuQ)OV> Swcy2akZMm?KbLh*2~7ZyCq8BX literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_blood_large_1.png b/InscryptionCommunityPatch/Assets/pixel_blood_large_1.png new file mode 100644 index 0000000000000000000000000000000000000000..8e3ffff0185b3eba8b1669fa9fae16569b54d01a GIT binary patch literal 439 zcmeAS@N?(olHy`uVBq!ia0vp^oFFy_Gm!MTx5WfVF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}25AX?bz5Zx16PMsRTirfUW1v`qI5!iJVl4^s3;quT48OPW1p@^*3p^r= z85sEXgD|57Yp@DXP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s&*=9a=50VV+fpMu z(>y)37&t)2GDtD9GB5&JUO+4jWrJLvp@3Xlx~Oh9v)z$$|*Er2YjE<*zY zkZdRaUFSNsJ;Feym8Xkih(x&VnUlN>1{}jgUbI_uH}q-h#QtFGQ=EmK sm;01l8M!X@U-L=1rrF#V^Z#&$yy<_2E&NN~wSr9aboFyt=akR{0Go$jT>t<8 literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_blood_large_10.png b/InscryptionCommunityPatch/Assets/pixel_blood_large_10.png new file mode 100644 index 0000000000000000000000000000000000000000..8df32ab4b5ca82ff18825aad922a20e9ccc5e496 GIT binary patch literal 460 zcmeAS@N?(olHy`uVBq!ia0vp^A|N&gGmxCuw=V}sF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}25AX?bz5Zx16PMsRTirfUW1v`qI5!iJVl4^s3;quT48OPW1p@^*3p^r= z85sEXgD|57Yp@DXP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s&*=9a=50VV+fpMu z(>y)37&t)2GDtD9GB5&JUO+4jWrJLvp@3Xlx~Oh9v)z$$|*Er2YjE<*zY zkZdRaUFSNsJ;Feyzo(01h(>U1pQF$L0}dv`kN@-aCS1#!apJ)##S=a)dpfl_)J1zr zLl-I~PEUB_Dy1ra@66E!XD-j{;_9=%vpo99gw-!w=IP5V_80v4dHMwY*RL2YQeKDH PfvoX#^>bP0l+XkKDD-Rx literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_blood_large_11.png b/InscryptionCommunityPatch/Assets/pixel_blood_large_11.png new file mode 100644 index 0000000000000000000000000000000000000000..ea64d8308b8642787f01c7b12030e830580529a2 GIT binary patch literal 463 zcmeAS@N?(olHy`uVBq!ia0vp^A|N&gGmxCuw=V}sF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}25AX?bz5Zx16PMsRTirfUW1v`qI5!iJVl4^s3;quT48OPW1p@^*3p^r= z85sEXgD|57Yp@DXP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s&*=9a=50VV+fpMu z(>y)37&t)2GDtD9GB5&JUO+4jWrJLvp@3Xlx~Oh9v)z$$|*Er2YjE<*zY zkZdRaUFSNsJ;Fd{kf)1dh(>U1A0r=wBFEvjPyfy3SGNUEw{VZ_Ipx#(H=tLmBKWX` zf2f|AO{zq(2rqZ~!H7?{C358B?Nuz-OU_<>n{5rt3*HINB`a5N|8qI~68q~YMw2Pm RyDx%l@^tlcS?83{1OPzlXr}-G literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_blood_large_12.png b/InscryptionCommunityPatch/Assets/pixel_blood_large_12.png new file mode 100644 index 0000000000000000000000000000000000000000..92bdc192fedd4a774d2f24193c586c4aea4c88bc GIT binary patch literal 464 zcmeAS@N?(olHy`uVBq!ia0vp^A|N&gGmxCuw=V}sF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}25AX?bz5Zx16PMsRTirfUW1v`qI5!iJVl4^s3;quT48OPW1p@^*3p^r= z85sEXgD|57Yp@DXP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s&*=9a=50VV+fpMu z(>y)37&t)2GDtD9GB5&JUO+4jWrJLvp@3Xlx~Oh9v)z$$|*Er2YjE<*zY zkZdRaUFSNsJ;Fd{u&0Y-h(>U1A0yuZ1rFx!U;oYf<#K{&d%W1HlC^f}hdWckIQ_FE z9a^I4VoeRF3RA{X0_^qRt^n2OEHF}Tjm$Mz&>sc7*-`@V`a`YwUw{DCU Te=_g3f~@j%^>bP0l+XkKLPT%< literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_blood_large_13.png b/InscryptionCommunityPatch/Assets/pixel_blood_large_13.png new file mode 100644 index 0000000000000000000000000000000000000000..1ad0bbb69a4eb7ef5a357b714d7394ef5ea536b4 GIT binary patch literal 463 zcmeAS@N?(olHy`uVBq!ia0vp^A|N&gGmxCuw=V}sF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}25AX?bz5Zx16PMsRTirfUW1v`qI5!iJVl4^s3;quT48OPW1p@^*3p^r= z85sEXgD|57Yp@DXP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s&*=9a=50VV+fpMu z(>y)37&t)2GDtD9GB5&JUO+4jWrJLvp@3Xlx~Oh9v)z$$|*Er2YjE<*zY zkZdRaUFSNsJ;Fd{kf)1dh(>U1A2%0+0f$re>woF%q(RGaY(v@2dMYjnSs& Ra>gZ)O`fiPF6*2UngA95Yxn>F literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_blood_large_14.png b/InscryptionCommunityPatch/Assets/pixel_blood_large_14.png new file mode 100644 index 0000000000000000000000000000000000000000..1b05e2512ec040c2cf8c00ef8caf4eb09b51870d GIT binary patch literal 467 zcmeAS@N?(olHy`uVBq!ia0vp^q98U0GmtFwxe5|sEDmyaVpw-h<|UBBlJ4m1$iT3% zpZiZDE0E70;1l9{{n273F2QxSx_zR?K(PdIZYChbS`y?J{2vGyesALo1`2Q%ctjR6 zF!1dMVMYtqU=^UCM2TxeNpOBzNqJ&XDnmeGW?qS&pKFMMsh**p(eFLX+kk4erABzB zd3tIwaDa?ukYZ$IU<9(ffLI#J202uNkr^xwvfPl7i9rBJM*(qWI}2Dm3&;k6-ZDmp z7eEifXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkV^K&louc_QC7iLEN+j{55)Ndd5GIM=9dF0CbDCUKVMt^fTDj5XU VGRCs)QZ5DA=IQF^vd$@?2>>_aZASnA literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_blood_large_2.png b/InscryptionCommunityPatch/Assets/pixel_blood_large_2.png new file mode 100644 index 0000000000000000000000000000000000000000..a6938ba76e165fb72d682b6d7991bc99760cdf13 GIT binary patch literal 457 zcmeAS@N?(olHy`uVBq!ia0vp^f*>{rGmxxUUaA447>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`212l#}zUVpThiA!*ut!|&FF;FZ)oSO+qv6ck+1^)*EhTq%xf`I~@1s;*b z3=DkxL735kHCP2GC{f}XQ4*Y=R#Ki=l*$m0n3-3i=jR%tV5(=RXY_jy^ERNGZK)BS zX`Y^13>+Y18Kf9l85n^qFCdnNvOzA_U}Of1gDf{>WMU8i(osO1+0FtM&jPYRptp>X z;RVoxFdEHL2B6dgb_N!pN&_Qf1I7gqQ$aSeE`XRc1;_>gCZM@YV3k3Z7C;tMm!W|H zNVb#zu5%sR9$_HU$J50zL?Ya`*Hef=k>iNNkN>mZx`t%WS#pVe@owdx@{ibjvOb-D zdXdL(L;sAd!aYY+s#^{$a2D-#o~|V>)H+L}UB_zrWV=tb^A5k@-PFS9f3xry*b$zt KelF{r5}E+x5ov?~ literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_blood_large_3.png b/InscryptionCommunityPatch/Assets/pixel_blood_large_3.png new file mode 100644 index 0000000000000000000000000000000000000000..9fd1a879400dce3214abf38584c651b1dc34f4d3 GIT binary patch literal 471 zcmeAS@N?(olHy`uVBq!ia0vp^5+F7QGmvcA6!!>7F%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}25AX?bz5Zx16PMsRTirfUW1v`qI5!iJVl4^s3;quT48OPW1p@^*3p^r= z85sEXgD|57Yp@DXP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s&*=9a=50VV+fpMu z(>y)37&t)2GDtD9GB5&JUO+4jWrJLvp@3Xlx~Oh9v)z$$|*Er2YjE<*zY zkZdRaUFSNsJ;Fd{l&6bhh(>Vi`9LlP1rFwbv+wGkEsIutr+n#nQ%?Aq(#nT94T?JveDDk&t;ucLK6VYOmIH{ literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_blood_large_4.png b/InscryptionCommunityPatch/Assets/pixel_blood_large_4.png new file mode 100644 index 0000000000000000000000000000000000000000..4942b1a2c922c9e8bf28e8d9192da76c07aee198 GIT binary patch literal 471 zcmeAS@N?(olHy`uVBq!ia0vp^q98U0GmtFwxe5|sEDmyaVpw-h<|UBBlJ4m1$iT3% zpZiZDE0E70;1l9{{n273F2QxSx_zR?K(PdIZYChbS`y?J{2vGyesALo1`2Q%ctjR6 zF!1dMVMYtqU=^UCM2TxeNpOBzNqJ&XDnmeGW?qS&pKFMMsh**p(eFLX+kk4erABzB zd3tIwaDa?ukYZ$IU<9(ffLI#J202uNkr^xwvfPl7i9rBJM*(qWI}2Dm3&;k6-ZDmp z7eEifXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkVrp7Rf!j) zw)3o9qTi+*wYOz*QcByq7ouOS*EL$bn`joBJLk8{E!oSno(lb2BjfvDb-PHP%Xj^E Z33B=q8K+KLt(pt6(bLt>Wt~$(69E1JZ;}82 literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_blood_large_5.png b/InscryptionCommunityPatch/Assets/pixel_blood_large_5.png new file mode 100644 index 0000000000000000000000000000000000000000..ee646fbd8e0a760291c2532f88308b8db3159cf3 GIT binary patch literal 468 zcmeAS@N?(olHy`uVBq!ia0vp^A|N&gGmxCuw=V}sF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}25AX?bz5Zx16PMsRTirfUW1v`qI5!iJVl4^s3;quT48OPW1p@^*3p^r= z85sEXgD|57Yp@DXP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s&*=9a=50VV+fpMu z(>y)37&t)2GDtD9GB5&JUO+4jWrJLvp@3Xlx~Oh9v)z$$|*Er2YjE<*zY zkZdRaUFSNsJ;Fd{xTlL_h(>ViIY*%b3LMM_6#o1_>)RxHTPEb%8I4t33%_!?3+&hG z`MTQ4b&-g=&a+8I7e5ACERI`HI{C@f@FOX~z4PMFY$;otf6IpNUDMs)7dc=4`o#B& Xk@Xm3o+ZcJ1dw%}u6{1-oD!M<+#7I@ literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_blood_large_6.png b/InscryptionCommunityPatch/Assets/pixel_blood_large_6.png new file mode 100644 index 0000000000000000000000000000000000000000..22e58b3eca6d00e26152e29def54c20579d4ebe5 GIT binary patch literal 472 zcmeAS@N?(olHy`uVBq!ia0vp^A|N&gGmxCuw=V}sF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}25AX?bz5Zx16PMsRTirfUW1v`qI5!iJVl4^s3;quT48OPW1p@^*3p^r= z85sEXgD|57Yp@DXP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s&*=9a=50VV+fpMu z(>y)37&t)2GDtD9GB5&JUO+4jWrJLvp@3Xlx~Oh9v)z$$|*Er2YjE<*zY zkZdRaUFSNsJ;Fd{w5N+>h(>ViIY*%e0}kgvfp_(3^-PPe>PS@jUVZV-&Y!#S7uzj+ bJE2-;VIRhZl^Yn2fvog&^>bP0l+XkKSetO& literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_blood_large_7.png b/InscryptionCommunityPatch/Assets/pixel_blood_large_7.png new file mode 100644 index 0000000000000000000000000000000000000000..8ae393a6be2ee8970f06fecbf603502e37c0cb82 GIT binary patch literal 467 zcmeAS@N?(olHy`uVBq!ia0vp^A|N&gGmxCuw=V}sF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}25AX?bz5Zx16PMsRTirfUW1v`qI5!iJVl4^s3;quT48OPW1p@^*3p^r= z85sEXgD|57Yp@DXP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s&*=9a=50VV+fpMu z(>y)37&t)2GDtD9GB5&JUO+4jWrJLvp@3Xlx~Oh9v)z$$|*Er2YjE<*zY zkZdRaUFSNsJ;Fd{n5TViIZi$XMGogcfp_)KUa}uwYv>j?t0Q%p<#)kewLPL= zK8Exz64)v#n!KQ^{1xZBiSj9TTTZFB&EmVM%xNb!1@J z*w6hZkrl}25AX?bz5Zx16PMsRTirfUW1v`qI5!iJVl4^s3;quT48OPW1p@^*3p^r= z85sEXgD|57Yp@DXP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s&*=9a=50VV+fpMu z(>y)37&t)2GDtD9GB5&JUO+4jWrJLvp@3Xlx~Oh9v)z$$|*Er2YjE<*zY zkZdRaUFSNsJ;Fd{n5TU1A0yuZ1rBD%pZ{lHU!3Qs-*#hhr(3A2QN2dnlgx>h z>#_o-=o>s W4;YIshWk$d+2-l$=d#Wzp$P!=E^ep* literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_blood_large_9.png b/InscryptionCommunityPatch/Assets/pixel_blood_large_9.png new file mode 100644 index 0000000000000000000000000000000000000000..b62b0a3bcf96d2e98aa76d9cd8320f5d94975dc5 GIT binary patch literal 466 zcmeAS@N?(olHy`uVBq!ia0vp^A|N&gGmxCuw=V}sF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}25AX?bz5Zx16PMsRTirfUW1v`qI5!iJVl4^s3;quT48OPW1p@^*3p^r= z85sEXgD|57Yp@DXP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s&*=9a=50VV+fpMu z(>y)37&t)2GDtD9GB5&JUO+4jWrJLvp@3Xlx~Oh9v)z$$|*Er2YjE<*zY zkZdRaUFSNsJ;Fd{sHcl#h(>ViIYzz%3LMM_l>Yobo6Vhf`Iv-dw$duDg@48S6y|C5 zl!h);y4clcP~VM%xNb!1@J z*w6hZkrl}24DbnYz5Zx16PF;6w>ocmKagTB3Gxg6|DWOdDPEvj2F?PH$YKTtzWpG~ zXu%q+0u+=eag8Vm&QB{TPb^Ah2uRG#E79|F4N)-FGt@Ksy@z=lP|dc~2+uT6Pb~%x zAcvJfijkFp5yQX4Ny?q4%idk6RQhNqnS=eg(8xRAjMn~$cc0dZzK3s^i0$OeJlGDe0MK###_ zG)ozPQWMx2Sb!=GjEoH!7eGt}*~q#8V$u{K8w8ku<}!g*23cAFSx{Yu1_mJ6PX4>j zb!>ZtflOad7sn8d;M_Bud8xRAjMn~$cc0dZzK3s^i0$OeJlGDe0MK###_ zG)ozPQWMx2Sb!=GjEoH!7eGt}*~q#8V$u{K8w8ku<}!g*23cAFSx{Yu1_mJ6PX4>j zb!>ZtflPl-7sn8d;M6nRd<_O1%oh&*<+uHnsJ2<~3cK{KzzfD#Jww9kLs{3BUYA{& zQ?SVI`MSd!XI)+XH7fQI|LIUfc)I$z JtaD0e0sxwjYDNG6 literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_bone_large_12.png b/InscryptionCommunityPatch/Assets/pixel_bone_large_12.png new file mode 100644 index 0000000000000000000000000000000000000000..118d4b1f01e9ceff624cad176808cb2d51a863eb GIT binary patch literal 450 zcmeAS@N?(olHy`uVBq!ia0vp^q98U0GmtFwxe5|sEDmyaVpw-h<|UBBlJ4m1$iT3% zpZiZDE0E6_;1l9{{n273E8xRAjMn~$cc0dZzK3s^i0$OeJlGDe0MK###_ zG)ozPQWMx2Sb!=GjEoH!7eGt}*~q#8V$u{K8w8ku<}!g*23cAFSx{Yu1_mJ6PX4>j zb!>ZtflOad7sn8d;M5*RJ_bV$rmO$$ccmuS=5(5sC|vU?H7r->YW?bc)8X>HU97FK zKRjb%vy+3Z)!f+soEOz_xaO~?v2ez;*WGVa?`Ut@zlyKAhhbYHn@mvv4F FO#sjfWHJB% literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_bone_large_13.png b/InscryptionCommunityPatch/Assets/pixel_bone_large_13.png new file mode 100644 index 0000000000000000000000000000000000000000..8474a95e7e7658dc90ff6c6af6dc075eedb051fd GIT binary patch literal 450 zcmeAS@N?(olHy`uVBq!ia0vp^q98U0GmtFwxe5|sEDmyaVpw-h<|UBBlJ4m1$iT3% zpZiZDE0E6_;1l9{{n273E8xRAjMn~$cc0dZzK3s^i0$OeJlGDe0MK###_ zG)ozPQWMx2Sb!=GjEoH!7eGt}*~q#8V$u{K8w8ku<}!g*23cAFSx{Yu1_mJ6PX4>j zb!>ZtflOad7sn8d;M5*RJ_bV$rmO$$ccmuWb?(e9P`Kt(YWUq(gzNS6PfWhmuf;^l z9;z3XuI=@GJ3~VD!#wSPhBfRHUys~L8vezaBuS>oyH=d#Wz Gp$PygPG#Q! literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_bone_large_14.png b/InscryptionCommunityPatch/Assets/pixel_bone_large_14.png new file mode 100644 index 0000000000000000000000000000000000000000..8b6076c7ec92b314f6bb35ee3958014cd1780df8 GIT binary patch literal 451 zcmeAS@N?(olHy`uVBq!ia0vp^q98U0GmtFwxe5|sEDmyaVpw-h<|UBBlJ4m1$iT3% zpZiZDE0E6_;1l9{{n273E8xRAjMn~$cc0dZzK3s^i0$OeJlGDe0MK###_ zG)ozPQWMx2Sb!=GjEoH!7eGt}*~q#8V$u{K8w8ku<}!g*23cAFSx{Yu1_mJ6PX4>j zb!>ZtflNP77sn8d;M5*YJ_ZAhLs$OWS4G{J*mH)J+i;aq^Y!3qnmYBTB)Xoh^bUwP zEcXAyOD~mIFV>k?UFc;gGZFJwJ20oKe|6XHdH=MxE!@9ItnwJc<}1z|LLgf_UHx3v IIVCg!0Pz}U+yDRo literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_bone_large_15.png b/InscryptionCommunityPatch/Assets/pixel_bone_large_15.png new file mode 100644 index 0000000000000000000000000000000000000000..a09c038adef5d35e0d3085430031c8511a8d216e GIT binary patch literal 451 zcmeAS@N?(olHy`uVBq!ia0vp^q98U0GmtFwxe5|sEDmyaVpw-h<|UBBlJ4m1$iT3% zpZiZDE0E6_;1l9{{n273E8xRAjMn~$cc0dZzK3s^i0$OeJlGDe0MK###_ zG)ozPQWMx2Sb!=GjEoH!7eGt}*~q#8V$u{K8w8ku<}!g*23cAFSx{Yu1_mJ6PX4>j zb!>ZtflNP77sn8d;MAUzf(!~A%#HuL&8GiSXr8%2!8ABlYfq=s(W>CR4wvg*hc8HK z@LzN?V~^~s`bP0 Hl+XkK7F%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}24DbnYz5Zx16PF;6w>ocmKagTB3Gxg6|DWOdDPEvj2F?PH$YKTtzWpG~ zXu%q+0u+=eag8Vm&QB{TPb^Ah2uRG#E79|F4N)-FGt@Ksy@z=lP|dc~2+uT6Pb~%x zAcvJfijkFp5ym}1H}?+fNBvNH#jx=l!!soz5s+sY NJYD@<);T3K0RSu{XPf{4 literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_bone_large_2.png b/InscryptionCommunityPatch/Assets/pixel_bone_large_2.png new file mode 100644 index 0000000000000000000000000000000000000000..4af6732ce9573ddd25766e2e166b069f677aad2c GIT binary patch literal 451 zcmeAS@N?(olHy`uVBq!ia0vp^A|N&gGmxCuw=V}sF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}24DbnYz5Zx16PF;6w>ocmKagTB3Gxg6|DWOdDPEvj2F?PH$YKTtzWpG~ zXu%q+0u+=eag8Vm&QB{TPb^Ah2uRG#E79|F4N)-FGt@Ksy@z=lP|dc~2+uT6Pb~%x zAcvJfijkFp5y{!=Cy(0 zyNer-@Z2*NKi0#eXM2`eP@^Kxzopr01RSi0RR91 literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_bone_large_3.png b/InscryptionCommunityPatch/Assets/pixel_bone_large_3.png new file mode 100644 index 0000000000000000000000000000000000000000..888cb1975d7430813a93a2380c1d46f2cbf3ee91 GIT binary patch literal 451 zcmeAS@N?(olHy`uVBq!ia0vp^A|N&gGmxCuw=V}sF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}24DbnYz5Zx16PF;6w>ocmKagTB3Gxg6|DWOdDPEvj2F?PH$YKTtzWpG~ zXu%q+0u+=eag8Vm&QB{TPb^Ah2uRG#E79|F4N)-FGt@Ksy@z=lP|dc~2+uT6Pb~%x zAcvJfijkFp5yk$m3$XYt92v$zW`Fl;>4__h^fi>Irf J%Q~loCIE+MZ6p8y literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_bone_large_4.png b/InscryptionCommunityPatch/Assets/pixel_bone_large_4.png new file mode 100644 index 0000000000000000000000000000000000000000..23d115f4061b2596f1295d5f8dcb0b4b7f952d4a GIT binary patch literal 451 zcmeAS@N?(olHy`uVBq!ia0vp^A|N&gGmxCuw=V}sF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}24DbnYz5Zx16PF;6w>ocmKagTB3Gxg6|DWOdDPEvj2F?PH$YKTtzWpG~ zXu%q+0u+=eag8Vm&QB{TPb^Ah2uRG#E79|F4N)-FGt@Ksy@z=lP|dc~2+uT6Pb~%x zAcvJfijkFp5yDY`B%m%kq@{Bk$*yi3=8= z{qkdpX-bkh`FpVWWbr`bv;3p00i_ I>zopr0Cpf}W&i*H literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_bone_large_5.png b/InscryptionCommunityPatch/Assets/pixel_bone_large_5.png new file mode 100644 index 0000000000000000000000000000000000000000..55a8f0c107b3a14f53c4e51e0ab63d79745ac6c4 GIT binary patch literal 449 zcmeAS@N?(olHy`uVBq!ia0vp^A|N&gGmxCuw=V}sF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}24DbnYz5Zx16PF;6w>ocmKagTB3Gxg6|DWOdDPEvj2F?PH$YKTtzWpG~ zXu%q+0u+=eag8Vm&QB{TPb^Ah2uRG#E79|F4N)-FGt@Ksy@z=lP|dc~2+uT6Pb~%x zAcvJfijkFp5ySAN@DbXvp literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_bone_large_6.png b/InscryptionCommunityPatch/Assets/pixel_bone_large_6.png new file mode 100644 index 0000000000000000000000000000000000000000..8e860a3daf28082b86df03209044862a7b45bbf5 GIT binary patch literal 452 zcmeAS@N?(olHy`uVBq!ia0vp^A|N&gGmxCuw=V}sF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}24DbnYz5Zx16PF;6w>ocmKagTB3Gxg6|DWOdDPEvj2F?PH$YKTtzWpG~ zXu%q+0u+=eag8Vm&QB{TPb^Ah2uRG#E79|F4N)-FGt@Ksy@z=lP|dc~2+uT6Pb~%x zAcvJfijkFp5yE@~*YTMhu%zOj?}?vc}WZ K&t;ucLK6T!UTIzc literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_bone_large_7.png b/InscryptionCommunityPatch/Assets/pixel_bone_large_7.png new file mode 100644 index 0000000000000000000000000000000000000000..f0017d765f5b7866ca02154b2e8d8cbdb0e05a1b GIT binary patch literal 449 zcmeAS@N?(olHy`uVBq!ia0vp^A|N&gGmxCuw=V}sF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}24DbnYz5Zx16PF;6w>ocmKagTB3Gxg6|DWOdDPEvj2F?PH$YKTtzWpG~ zXu%q+0u+=eag8Vm&QB{TPb^Ah2uRG#E79|F4N)-FGt@Ksy@z=lP|dc~2+uT6Pb~%x zAcvJfijkFp5y$e^3v9p8F**4(kAl&jh!rNYiWa`^w$v{- zDVRRF`*N1nm1g$;r=%}do2KeSzuv~S?)OLG*lVA<3t24+G#IuQylK1)vcuEW&t;uc GLK6V8;Aa>B literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_bone_large_8.png b/InscryptionCommunityPatch/Assets/pixel_bone_large_8.png new file mode 100644 index 0000000000000000000000000000000000000000..8c0527b57799f38d8e5e5a7474bc0e7047a5c901 GIT binary patch literal 453 zcmeAS@N?(olHy`uVBq!ia0vp^A|N&gGmxCuw=V}sF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}24DbnYz5Zx16PF;6w>ocmKagTB3Gxg6|DWOdDPEvj2F?PH$YKTtzWpG~ zXu%q+0u+=eag8Vm&QB{TPb^Ah2uRG#E79|F4N)-FGt@Ksy@z=lP|dc~2+uT6Pb~%x zAcvJfijkFp5ylq6*^fT%c=WSr} z+Y(vLp;MBb$yB+9y{Tu4&+I>Hsote`;>%7r)i>-u|54an-_h+*w_HPi1PdpuqJ KT-G@yGywqqpJp8Z literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_bone_large_9.png b/InscryptionCommunityPatch/Assets/pixel_bone_large_9.png new file mode 100644 index 0000000000000000000000000000000000000000..9a0999d2c040fd0aaf5d05afc5344fa870d4eef3 GIT binary patch literal 452 zcmeAS@N?(olHy`uVBq!ia0vp^A|N&gGmxCuw=V}sF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}24DbnYz5Zx16PF;6w>ocmKagTB3Gxg6|DWOdDPEvj2F?PH$YKTtzWpG~ zXu%q+0u+=eag8Vm&QB{TPb^Ah2uRG#E79|F4N)-FGt@Ksy@z=lP|dc~2+uT6Pb~%x zAcvJfijkFp5ypneQI*UE;Kf~I4=U1NxS>x&I K=d#Wzp$PyTr)u{A literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_energy_large_1.png b/InscryptionCommunityPatch/Assets/pixel_energy_large_1.png new file mode 100644 index 0000000000000000000000000000000000000000..a935853cd3adc68cd86fe93da022608aead8f05c GIT binary patch literal 392 zcmeAS@N?(olHy`uVBq!ia0vp^U^WXgkd-9)$P7p^76-XIF|0c$^AgBmNq6*hWMJ6X z&;2Kn70Bla@Ck9f{%A21mte{NJ3d<$xSzZDA1KaQ;1OBOz`(a3gc&VZgH?cn5+$w? zCBgY=CFO}lsSE*$nRz98ey$-3rh0~YM!)wkZv(2?mKx!i=IN=$zyaj2GDtD9GB5&J zUO+4jWrJL)!N?32X9BVf8JQRafOHfPXSTC|#j}8H5a=yqWOxDe42(vzlmRF;ft`T` zsM5g5*nn{X#8i-ttP3C}O#!k&fC*?W6If-Cr3H`$)n#a40Fv$Gzw2DbwnrGql=pOT y43W5;oFD=O2?-%VK}ww_W@c@Z6NDQY8W|bx&tsjczW;m&NSmjtpUXO@geCx{vGmzXHK0^~oF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}23GfMVz5Zx16PIAg|2sZg7Pz0g_#Y_FS>O>_%)r36AA}h#Sc6r7f)XXJ z5hcO-X(i=}MX3w{iJ5sNdVa1U3Z{C7dPcwZFmD5@*_ImNnda%K#lQjNurf$7vNA9N zSzbUa4P}E|slmt$7H0yo4H=mj1b}oD5NEctfW@2!0mM|0jjRhGCQSjdL4XNpE)!T~kfjBX1=VF}U;vWsFVdQ I&MBb@0GC2h0{{R3 literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_energy_large_3.png b/InscryptionCommunityPatch/Assets/pixel_energy_large_3.png new file mode 100644 index 0000000000000000000000000000000000000000..f22d74dfdb11c4a0d11e9e9e35eaadfa4ddd2b28 GIT binary patch literal 452 zcmeAS@N?(olHy`uVBq!ia0vp^q98U0GmtFwxe5|sEDmyaVpw-h<|UBBlJ4m1$iT3% zpZiZDE0E70;1l9{{n273F2R!jcYL-i0E#VD`xXeKSWANZg8u^n!|!c;!9W4d0*}aI z1_r+UAk1jN8ms~olqhkHC<)F_D=AMbN@WO0%*-p%^K%VRFx4~EGy1)Uc^gp8w$upE zG*3@01`d$13{s4&42(dQ7Z6KB*&v5%FfxP1nSg9VMkWRUARPt7ne8lK@hl)41bWLD z8D0QA2&2&~WdKS|U}sjH>LQ-Ev`U;>)U1XdYjX#r$Gbr~8M zfMh%Q?>g79?GXkt-923#Lo|Y?_ImO$C~z>p{`B9Rdy5jM`g4bb3dS=1^ literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_energy_large_4.png b/InscryptionCommunityPatch/Assets/pixel_energy_large_4.png new file mode 100644 index 0000000000000000000000000000000000000000..0644469b2a71f5be07fb6715a626da9f7f5de2ac GIT binary patch literal 458 zcmeAS@N?(olHy`uVBq!ia0vp^q98U0GmtFwxe5|sEDmyaVpw-h<|UBBlJ4m1$iT3% zpZiZDE0E70;1l9{{n273F2R!jcYL-i0E#VD`xXeKSWANZg8u^n!|!c;!9W4d0*}aI z1_r+UAk1jN8ms~olqhkHC<)F_D=AMbN@WO0%*-p%^K%VRFx4~EGy1)Uc^gp8w$upE zG*3@01`d$13{s4&42(dQ7Z6KB*&v5%FfxP1nSg9VMkWRUARPt7ne8lK@hl)41bWLD z8D0QA2&2&~WdKS|U}sjH>LQ-Ev`U;>)U1XdYjX#r$Gbr~8M zfMh%Q?>g79?GXkteLYjH>LQ-Ev`U;>)U1XdYjX#r$Gbr~8M zfMh%Q?>g79?GXkt-923#Lo|Y?_B!%0DDWH#`2OGAdO}Y7+?*t(R*elji#&H9UGEw^ zt-L<*^$M=soxx?#b*H-CT+aI1M*XD1+Qewh)cpntrj9W`a~Y%h|6N)QGTzhG&t;uc GLK6VbI%zrp literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_energy_large_6.png b/InscryptionCommunityPatch/Assets/pixel_energy_large_6.png new file mode 100644 index 0000000000000000000000000000000000000000..4df30720b44d938833dd3c0f6ba6dead88c1ab4f GIT binary patch literal 456 zcmeAS@N?(olHy`uVBq!ia0vp^q98U0GmtFwxe5|sEDmyaVpw-h<|UBBlJ4m1$iT3% zpZiZDE0E70;1l9{{n273F2R!jcYL-i0E#VD`xXeKSWANZg8u^n!|!c;!9W4d0*}aI z1_r+UAk1jN8ms~olqhkHC<)F_D=AMbN@WO0%*-p%^K%VRFx4~EGy1)Uc^gp8w$upE zG*3@01`d$13{s4&42(dQ7Z6KB*&v5%FfxP1nSg9VMkWRUARPt7ne8lK@hl)41bWLD z8D0QA2&2&~WdKS|U}sjH>LQ-Ev`U;>)U1XdYjX#r$Gbr~8M zfMh%Q?>g79?GXkty**tVLo|Y?o^|9ppdjFUG2{8a^t?%(B1e7gmCgiJhx|0$aNjN$Skgm_vL46m$iO0IQPuix$WM$j_CpV>`NJQeq@T2gRJm$ L^>bP0l+XkKPBCs? literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_energy_large_7.png b/InscryptionCommunityPatch/Assets/pixel_energy_large_7.png new file mode 100644 index 0000000000000000000000000000000000000000..43a09adfcd0667ddc68a550748abce23d4fd44c5 GIT binary patch literal 459 zcmeAS@N?(olHy`uVBq!ia0vp^5+F7QGmvcA6!!>7F%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}25AX?bz5Zx16PIAg|2sZg768STs(lLtQmiFGe!>5NfZ_KxzF?pLXMsm# zF#`kNeh_A~U=3CQ3QCl?MwA5SrKXms!@LcsW?O26 zXPT#{76S*!SOzIZRt82O%L|C5p=^-LH5i$};!HrcAtMum0FaIX;>>myuy_`b4FbJo zj0`V;9)!_omNEdPCa^QG096_o85=MzfS3xhk#zyYq$xl)2rvQ7Wdf@Vva|rQpt=kV z3_!A-{CAz}*!BnmnSP!wjv*Ssb9)_y7!)}Uzk2omeom%ix~%`RC7e7C-Uf9BHIED( z<|y7cZuFw&!2WQpBO8_|MYBd)>!%eIuIs$U8LzcTG2BBtP}=;(`vjk|IL1Taah~iT OTRdI;T-G@yGywpI)oJ|z literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_mox_blue_green_large.png b/InscryptionCommunityPatch/Assets/pixel_mox_blue_green_large.png new file mode 100644 index 0000000000000000000000000000000000000000..ebf1c91fe4fcf67ce66debfa326225d42ce21898 GIT binary patch literal 484 zcmeAS@N?(olHy`uVBq!ia0vp^q98U0GmtFwxe5|sEDmyaVpw-h<|UBBlJ4m1$iT3% zpZiZDE08Z5;1l9{{n273Eb z$b#xJG%x_kcJkkKu4CIH3}nW8x;Tbt1jn8Wv#K44ZD_1l;13F)myB@ z#KWF0;Ng;BDDvdkdNbCrjq^*3;F`Wt~$(695%GbISk# literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_mox_blue_large_1.png b/InscryptionCommunityPatch/Assets/pixel_mox_blue_large_1.png new file mode 100644 index 0000000000000000000000000000000000000000..450aad9a62d5e8f888218cf97704a21ee5d374b1 GIT binary patch literal 451 zcmeAS@N?(olHy`uVBq!ia0vp^d>}RlGmu=zwB8p;F%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}25AX?bz5Zx16PKX3CK2NWMU8i(osO1+0FtM&jPYRptp>X z;RVoxFdEHL2B6dgb_N!pN&_Qf1I7gqQ$aSeE`XRc1;_>gCZM@YV3k3Z7C;tMm!W|H zNVb#zu5%sR9$_HU&C|s(L?S%4&ryg$frCl)@Bi7%UmolbkDb-EqKiX-@14m5LDrz| zhI8BUviHwY){nl-=pO$pDdi6b-<6aslXZn&LVFcf{>ppJs9PZ#`V?fkr>mdKI;Vst E0NuD_;Q#;t literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_mox_blue_large_2.png b/InscryptionCommunityPatch/Assets/pixel_mox_blue_large_2.png new file mode 100644 index 0000000000000000000000000000000000000000..ef2d35c3be7e04c78bae43b103ab5acd9bb5330f GIT binary patch literal 464 zcmeAS@N?(olHy`uVBq!ia0vp^!XP#WGmxwaS}F>p7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`212l#}zUVpThiA&IaQL#Wq3Q)|$op&CPVl4^s3;quT48OPW1p@^*3p^r= z85sEXgD|57Yp@DXP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s&*=9a=50VV+fpMu z(>y)37&t)2GDtD9GB5&JUO+4jWrJLMLiX6-@Fa6(NdHYeL%ku^Usi5vPS{<6HimWwC zSFh7F%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}25AX?bz5Zx16PKXrv4WsqWIWncudynt95$_BYygOM35&IDu|GBPm;0O=?o&TMA^i)R7ZAkbUJ z$nXN_K^To@DFaYy0y_f>P^E#9u>s=(h^ZhOSr{&8 z03_SVf7iK=ZI3XJ8RO~V7@`qeI)RbzfC2||;+OyVanUiy&e%+DTHBe#AUH9_Co*%Q~loCIE8Ka=QQk literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_mox_blue_large_4.png b/InscryptionCommunityPatch/Assets/pixel_mox_blue_large_4.png new file mode 100644 index 0000000000000000000000000000000000000000..e1969f9c21650e590be9a02d59da84e857e5495c GIT binary patch literal 476 zcmeAS@N?(olHy`uVBq!ia0vp^5+F7QGmvcA6!!>7F%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}25AX?bz5Zx16PKXrv4WsqWIWncudynt95$_BYygOM35&IDu|GBPm;0O=?o&TMA^i)R7ZAkbUJ z$nXN_K^To@DFaYy0y_f>P^E#9u>s=(h^ZhOSr{&8 z03_SVf7iK=ZI3XJ8Sm-h7@`qeI)Ra|L4k+aeEa|XH@`Koa9(?&U~6#hMPEmVSxfZS znf*-aDPIDt4>Ql--@VuV?0${+bBfFxHKt6P*YG5JRRoi fim_RB*Ji#Dx5;9>bV~GvE67?;S3j3^P6IesvJDxT7zBWH6cA^&vw+33 zfNT)xEn{SO0rV)0MzfRwC^dndfd#12z{uEuaRJ0skd3ShASO)#vO$0eXf6|2Wss!> zkOkFcXkY-6?c~4fT*tOY7|2ZVba4#P2o61ek*`64$N3^}%m4o=`O!yju)F!4xREt^ z)jK6$4Tpj=$Mlq@a~+>!wsfi6mkqNem)e`D@kj69e(|Z;v*v71+coJK4i_)KIk4x* su>jZP539j0G#0rhGZ!u>xebr>mdKI;Vst0Ek|FHUIzs literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_mox_grand_large.png b/InscryptionCommunityPatch/Assets/pixel_mox_grand_large.png new file mode 100644 index 0000000000000000000000000000000000000000..f2bf9a62ed93f7e1034e8f49ff59b5b757fb8d07 GIT binary patch literal 506 zcmeAS@N?(olHy`uVBq!ia0vp^5+F7QGmvcA6!!>7F%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl|74)6(az5Zx16PMsVFRgEls)7PJ2av3CK2NWMU8i(osO1 z+0FtM&jPYRptp>X;RVpcFdEHL2B6dgb_N!pN&_Qf1I7gqQ$aSeE`XRc1;_>gCZM@Y zV3k3Z7C;tMm!W|HNVb#zu5%sR9$_Fe*VDx@L?bx$d>~(g0T0uKq^n>5sf(?c9r)9r zZMv>v>MARSElbRDn1u;?{W)q>%6n>mzXEa-S&Rd zoxQ0%jqYc{IU{~MoPW&sMwTac4zvBsM*El5EK|Z)t}RlGmu=zwB8p;F%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}25AX?bz5Zx16PIA(RHHfjLxEzglcWCvDb|u8zu^Bs!0>w;UocRBv%n*= z7-+$M5N5Ps4ORgPN|d-plmzFem6RtIr7{F0X6BXX`MHKDnCcno8U5bFybY*kTWW-7 zny0500|&@h1}R2X21X#u3y7tmY>>+}7@5K1OhC3FBNKxFkd6Z4%yt&AcovWi0=;F7 z3@?Blgwbf0G61C}ursg#RT>x>8!#?_m$Nv;eZ8x(p2r zK(d|ucb)6l_6P%+j-D=#Arj%KCmFdK3p7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`212l#}zUVpThiAykXs?nVNp+K?L$O>_ z%)r36AA}h#Sc6r7f)XXJ5hcO-X(i=}MX3w{iJ5sNdVa1U3Z{C7dPcwZFmD5@*_ImN znda%K#lQhFmO+Y!K*4Mt|LI1`X<$jHPX0HmXUIJ2DvES?2qgFtT? zBf|@z2Vpdtr3^r+3G56kK$QkY#s-WFAf|$BWL*F;X$p`H0!%=2nZPQ8EG>X6s4hbT z1CVSd|6S)gwmqN#_3?CZ4ABTK?Q-NhV8C-|!OQ>m_b|LQD~;j{+t729eFB>iZ(q`e zSn=(j{mfQ1J)L6frxba9TGQOk)3Yc0Y|dEmYscE6I@QX1{nq?D7}&lsZZTl9GX~k= M>FVdQ&MBb@0H`Qx(f|Me literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_mox_green_large_3.png b/InscryptionCommunityPatch/Assets/pixel_mox_green_large_3.png new file mode 100644 index 0000000000000000000000000000000000000000..42db72c45b38d79c25176a96440f96fd35a6a694 GIT binary patch literal 462 zcmeAS@N?(olHy`uVBq!ia0vp^5+F7QGmvcA6!!>7F%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}25AX?bz5Zx16PIA(RHHfjLxEzglcWCvDb|u8zu^Bs!0>w;UocRBv%n*= zn1O+BKL|5gum-CD1tm&cBT9nv(@M${i&7Z^5;OBk^!!{y6ioFD^^AV+VcrH*vn@5k zGtJXei-7}VEQ1syD+42tzopr0K%bcK>z>% literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_mox_green_large_4.png b/InscryptionCommunityPatch/Assets/pixel_mox_green_large_4.png new file mode 100644 index 0000000000000000000000000000000000000000..adbfb8e9083de480a1aa6e08ebb4f9f327bedc4f GIT binary patch literal 468 zcmeAS@N?(olHy`uVBq!ia0vp^5+F7QGmvcA6!!>7F%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}25AX?bz5Zx16PIA(RHHfjLxEzglcWCvDb|u8zu^Bs!0>w;UocRBv%n*= zn1O+BKL|5gum-CD1tm&cBT9nv(@M${i&7Z^5;OBk^!!{y6ioFD^^AV+VcrH*vn@5k zGtJXei-7}VEQ1syD+42tu3M(=UiWOXbETUotrE%JOUp@&x9Bn zO{-$5zumfkUAcIrX4VClK>iBV8gHj&y$;(I*~iwbP&bYhINf3W%Vf>x^D#2cg**k! X-7A=Qjcc7sLDqS?`njxgN@xNADphQs literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_mox_green_orange_large.png b/InscryptionCommunityPatch/Assets/pixel_mox_green_orange_large.png new file mode 100644 index 0000000000000000000000000000000000000000..57c2bff16be7a4ebee1fd1a711926ad0af1abf98 GIT binary patch literal 482 zcmeAS@N?(olHy`uVBq!ia0vp^q98U0GmtFwxe5|sEDmyaVpw-h<|UBBlJ4m1$iT3% zpZiZDE08Z5;1l9{{n273F2Tg9MsxOu?(@?6)~E`UnKCif7f7*}1o;L32LlEvZ)P{3 z5NCl$WHAE+-+mBgv|tTZ0SZc#xJHx&=ckpFCl;kL1SDqWmFW4ohA5co8R{AR-ov~N zsAgMgglC$krxpVTki*I##mLIQ2xNHyu{4woapt($7l|hyk zKo(S&p@9KNwv+#^a~<0rVIVWs)5S4FBRKVZG~WRQ9_E8B*Z=m%tY;3&)MZRM(cZb# zCBCRr?c^VWO88m6B&gmxTS5fJ5L^Ed2#l%vQ!kNMvI#T%UB jFZ|!h^zVwsUzcsym}jqGnxkeV4z|?O)z4*}Q$iB}++KFT literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_mox_orange_large_1.png b/InscryptionCommunityPatch/Assets/pixel_mox_orange_large_1.png new file mode 100644 index 0000000000000000000000000000000000000000..1f90f28814ae21a1c903b6a0c4f0a0acdd7a500e GIT binary patch literal 450 zcmeAS@N?(olHy`uVBq!ia0vp^d>}RlGmu=zwB8p;F%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}25AX?bz5Zx16PMsVFRgElsz5QxgqPkxinS!jFZe$YF#O)e7Yr2OEbxdd z23oKmgc&VZgH?cn5+$w?CBgY=CFO}lsSE*$nRz98ey$-3rh0~YM!)wkZv(2?mKx!i z=IN=$zyUIrL5h);ff2~^0%B<>8{~2gMrN=$6Oe7l$iyH3q@#d1vz-Mjo&{usKyMi% z!waAXVKkbh3_z&~>vp@3Xlx~Oh9v)z$$|*Er2YjE<*zY zkZdRaUFSNsJ;FeytEY=&h(x&SIYur91rFznk@xQ z)hqJzf1=);T3K F0RRyLX#@ZO literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_mox_orange_large_2.png b/InscryptionCommunityPatch/Assets/pixel_mox_orange_large_2.png new file mode 100644 index 0000000000000000000000000000000000000000..7f9abb3667504d9058f8d10c6bd10efe2f019965 GIT binary patch literal 471 zcmeAS@N?(olHy`uVBq!ia0vp^!XP#WGmxwaS}F>p7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`212l#}zUVpThiA!*wm)5sNRiKz;!b@);#aa^N7yKUx7=CZ#3kC{s7I;J! zGcfS&2Vq7F)?gK&phSslL`iUdT1k0gQ7S_~VrE{6o}X)of~lUNp3(0;%-eu!wxvdR zrg?g5F>rv4WsqWIWncudynt95$_BYygOM35&IDu|GBPm;0O=?o&TMA^i)R7ZAkbUJ z$nXN_K^To@DFaYy0y_f>P^E#9u>s=(h^ZhOSr{&8 z03_SVf7iK=Z4W3wqdZ+4Lo|Xz`yBZWDDWJY;j%F|-fYbl`elyk zi$%|678kgzZ0tQ?Cw!%98i$}|4EOijua(#i$vgGw|7P#n6>|21>kPLG#SJz*ldcL~ b-Bum{N{R9G%o&$FK{k52`njxgN@xNArDSoJ literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Assets/pixel_mox_orange_large_3.png b/InscryptionCommunityPatch/Assets/pixel_mox_orange_large_3.png new file mode 100644 index 0000000000000000000000000000000000000000..e5630b9436c0b69eaca9c4f5849118851b5e7223 GIT binary patch literal 483 zcmeAS@N?(olHy`uVBq!ia0vp^5+F7QGmvcA6!!>7F%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}25AX?bz5Zx16PMsVFRgElsz5QxgqPkxinS!jFZe$YF#O)e7Yr2OEbxdd zW?%FBlnrvZ1|u_AoC(M_WMpCx0Mb!FoY~F-7S95*L7=yc zk>Lf7F%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl}25AX?bz5Zx16PMsVFRgElsz5QxgqPkxinS!jFZe$YF#O)e7Yr2OEbxdd zW?%FBlnrvZ1|u_AoC(M_WMpCx0Mb!FoY~F-7S95*L7=yc zk>LfHfGG}_E0#2{)+84({z^QyH2`G2r>mdKI;Vst05RNnzW@LL literal 0 HcmV?d00001 diff --git a/InscryptionCommunityPatch/Card/CardCostRender.cs b/InscryptionCommunityPatch/Card/CardCostRender.cs index 57908d6d..b55d3555 100644 --- a/InscryptionCommunityPatch/Card/CardCostRender.cs +++ b/InscryptionCommunityPatch/Card/CardCostRender.cs @@ -79,19 +79,25 @@ private static void CreateFullCostSprite(CardDisplayer __instance, CardRenderInf { __instance.costRenderer.sprite = FinalCostSprite(renderInfo.baseInfo, playableCard, TextureHelper.SpriteType.OversizedCostDecal, 28); } - else if (__instance is PixelCardDisplayer && PatchPlugin.act2CostRender.Value) + else if (__instance is PixelCardDisplayer pixelDisplay && PatchPlugin.act2CostRender.Value) { - __instance.costRenderer.sprite = FinalCostSprite(renderInfo.baseInfo, playableCard, - PatchPlugin.rightAct2Cost.Value ? TextureHelper.SpriteType.Act2CostDecalRight : TextureHelper.SpriteType.Act2CostDecalLeft, 8); + if (PatchPlugin.act2VanillaStyle.Value) + { + __instance.costRenderer.sprite = Part2CardCostRender.FinalVanillaCostSprite(pixelDisplay, renderInfo.baseInfo, playableCard, !PatchPlugin.rightAct2Cost.Value); + } + else + { + __instance.costRenderer.sprite = FinalCostSprite(renderInfo.baseInfo, playableCard, + PatchPlugin.rightAct2Cost.Value ? TextureHelper.SpriteType.Act2CostDecalRight : TextureHelper.SpriteType.Act2CostDecalLeft, 8); + } } } + // prevents indexing error when a card has a cost greater than the vanilla limits [HarmonyPrefix, HarmonyPatch(typeof(CardDisplayer), nameof(CardDisplayer.GetCostSpriteForCard))] - private static bool Part1CardCostDisplayerPatch(CardDisplayer __instance) + private static bool Part1CardCostDisplayerPatch(CardDisplayer __instance, ref Sprite __result, CardInfo card) { - //Make sure we are in Leshy's Cabin - // prevents indexing error when a card has a cost greater than the vanilla limits - if (__instance is CardDisplayer3D && SceneLoader.ActiveSceneName.StartsWith("Part1")) + if (__instance is CardDisplayer3D && SceneLoader.ActiveSceneName.StartsWith("Part1")) // Make sure we are in Leshy's Cabin { return false; } @@ -100,7 +106,6 @@ private static bool Part1CardCostDisplayerPatch(CardDisplayer __instance) return false; } - return true; } } \ No newline at end of file diff --git a/InscryptionCommunityPatch/Card/Part1CardCostRender.cs b/InscryptionCommunityPatch/Card/Part1CardCostRender.cs index fe745572..1201081f 100644 --- a/InscryptionCommunityPatch/Card/Part1CardCostRender.cs +++ b/InscryptionCommunityPatch/Card/Part1CardCostRender.cs @@ -32,7 +32,7 @@ public static List CostTextures(CardInfo cardInfo, PlayableCard playa costTextures.Add(CardCostRender.GetTextureByName($"energy_cost_{Mathf.Min(7, energyCost)}")); if (bonesCost > 0) - costTextures.Add(CardCostRender.GetTextureByName($"bone_cost_{Mathf.Min(14, bonesCost)}")); + costTextures.Add(CardCostRender.GetTextureByName($"bone_cost_{Mathf.Min(16, bonesCost)}")); if (bloodCost > 0) costTextures.Add(CardCostRender.GetTextureByName($"blood_cost_{Mathf.Min(14, bloodCost)}")); diff --git a/InscryptionCommunityPatch/Card/Part2CardCostRender.cs b/InscryptionCommunityPatch/Card/Part2CardCostRender.cs index a098b00f..e70d9847 100644 --- a/InscryptionCommunityPatch/Card/Part2CardCostRender.cs +++ b/InscryptionCommunityPatch/Card/Part2CardCostRender.cs @@ -6,10 +6,10 @@ using InscryptionAPI.CardCosts; using InscryptionAPI.Helpers; using UnityEngine; +using static InscryptionAPI.Helpers.TextureHelper; namespace InscryptionCommunityPatch.Card; -//[HarmonyPatch] /// /// Modifies how card costs are rendered in Act 2 to add support for mixed costs and custom costs. /// Also reduces the size of card costs so they take up less space on the card. @@ -17,8 +17,143 @@ namespace InscryptionCommunityPatch.Card; public static class Part2CardCostRender { public static event Action> UpdateCardCost; + public static event Action> UpdateVanillaCardCost; // 24 x 13 + public static bool RightAct2Cost => PatchPlugin.rightAct2Cost.Value; + public static Sprite FinalVanillaCostSprite( + PixelCardDisplayer display, + CardInfo cardInfo, + PlayableCard playableCard, + bool leftOriented) + { + Debug.Log($"Use vanilla style"); + + Texture2D baseTexture; + List masterTextures; + List topTextures = new(); + List bottomTextures = new(); + + int bloodCost = playableCard?.BloodCost() ?? cardInfo.BloodCost; + int bonesCost = playableCard?.BonesCost() ?? cardInfo.BonesCost; + int energyCost = playableCard?.EnergyCost ?? cardInfo.EnergyCost; + List gemsCost = playableCard?.GemsCost() ?? cardInfo.GemsCost; + + baseTexture = TextureHelper.GetImageAsTexture("pixel_base_large.png", typeof(CardCostRender).Assembly); + masterTextures = VanillaCostTextures(display, cardInfo, playableCard, bloodCost, bonesCost, energyCost, gemsCost); + + while (masterTextures.Count < 4) + masterTextures.Add(null); + + if (leftOriented) + { + topTextures.Add(masterTextures[0]); + topTextures.Add(masterTextures[2]); + bottomTextures.Add(masterTextures[1]); + bottomTextures.Add(masterTextures[3]); + } + else + { + topTextures.Add(masterTextures[2]); + topTextures.Add(masterTextures[0]); + bottomTextures.Add(masterTextures[3]); + bottomTextures.Add(masterTextures[1]); + } + + Texture2D topTexture = CombineVanillaCostTextures(topTextures, baseTexture, leftOriented, 15); + Texture2D finalCombinedTex = CombineVanillaCostTextures(bottomTextures, topTexture, leftOriented, 1); + + return TextureHelper.ConvertTexture(finalCombinedTex, leftOriented ? SpriteType.Act2CostVanillaLeft : SpriteType.Act2CostVanillaRight); + } + + /// + /// A variant of TextureHelper.CombineTextures specifically designed for combining vanilla cost textures. + /// Each cost texture is assumed to be 13 pixels in height and UP TO 24 pixels in width, and this method compensates for any textures thinner than 24 px. + /// + /// + /// + /// + /// + /// + public static Texture2D CombineVanillaCostTextures(List textures, Texture2D baseTexture, bool leftOriented, int yOffset) + { + if (textures != null) + { + int xStep = leftOriented ? 0 : 24; + for (int j = 0; j < textures.Count; j++) + { + if (textures[j] != null) + { + int xOffset = leftOriented ? 0 : 24 - textures[j].width; + baseTexture.SetPixels(xOffset + xStep * j, yOffset, textures[j].width, textures[j].height, textures[j].GetPixels(), 0); + } + } + + baseTexture.Apply(); + } + + return baseTexture; + } + + public static List VanillaCostTextures(PixelCardDisplayer display, CardInfo cardInfo, PlayableCard playableCard, int bloodCost, int bonesCost, int energyCost, List gemsCost) + { + List costTextures = new(); + + if (bloodCost > 0) + { + costTextures.Add(CardCostRender.GetTextureByName($"pixel_blood_large_{Mathf.Min(14, bloodCost)}")); + } + + if (bonesCost > 0) + { + costTextures.Add(CardCostRender.GetTextureByName($"pixel_bone_large_{Mathf.Min(16, bonesCost)}")); + } + + if (energyCost > 0) + { + costTextures.Add(CardCostRender.GetTextureByName($"pixel_energy_large_{Mathf.Min(7, energyCost)}")); + } + + if (gemsCost.Count > 0) + { + costTextures.AddRange(GetVanillaMoxTextures(gemsCost)); + } + + // get a list of the custom costs we need textures for + // check for PlayableCard to account for possible dynamic costs (no API support but who knows what modders do) + List customCosts; + if (playableCard != null) + customCosts = playableCard.GetCustomCardCosts().Select(x => CardCostManager.AllCustomCosts.Find(c => c.CostName == x.CostName)).ToList(); + else + customCosts = cardInfo.GetCustomCosts(); + + foreach (CardCostManager.FullCardCost fullCost in customCosts) + { + int amount = playableCard?.GetCustomCost(fullCost) ?? cardInfo.GetCustomCost(fullCost); + string key = $"{fullCost.ModGUID}_{fullCost.CostName}_{amount}_vanilla_part2"; + if (CardCostRender.AssembledTextures.ContainsKey(key)) + { + if (CardCostRender.AssembledTextures[key] != null) + costTextures.Add(CardCostRender.AssembledTextures[key]); + else + CardCostRender.AssembledTextures.Remove(key); + } + else + { + Texture2D costTex = fullCost.PixelCostTexture(amount, cardInfo, playableCard); + if (costTex != null) + { + costTextures.Add(costTex); + CardCostRender.AssembledTextures.Add(key, costTex); + } + } + } + + // Call the event and allow others to modify the list of textures + UpdateCardCost?.Invoke(cardInfo, costTextures); + return costTextures; + } + public static List CostTextures(CardInfo cardInfo, PlayableCard playableCard, int bloodCost, int bonesCost, int energyCost, List gemsCost) { List costTextures = new(); @@ -112,6 +247,61 @@ private static Texture2D CombineMoxTextures(List pieces, Texture2D ba return baseTexture; } + public static List GetVanillaMoxTextures(List gemsCost) // vanilla order is OGB + { + List gemTextures = new(); + int orangeCount = Mathf.Min(4, gemsCost.Count(x => x == GemType.Orange)); + int greenCount = Mathf.Min(4, gemsCost.Count(x => x == GemType.Green)); + int blueCount = Mathf.Min(4, gemsCost.Count(y => y == GemType.Blue)); + + if (orangeCount > 0) + { + if (orangeCount == 1) + { + if (gemsCost.Count == 2) // 1 orange and 1 other + { + if (greenCount > 0) + { + gemTextures.Add(CardCostRender.GetTextureByName("pixel_mox_green_orange_large")); + } + else + { + gemTextures.Add(CardCostRender.GetTextureByName("pixel_mox_blue_orange_large")); + } + return gemTextures; + } + else if (gemsCost.Count == 3 && greenCount == orangeCount && blueCount == orangeCount) // one of each + { + gemTextures.Add(CardCostRender.GetTextureByName("pixel_mox_grand_large")); + return gemTextures; + } + } + + // default behaviour, accounts for multi mono mox + gemTextures.Add(CardCostRender.GetTextureByName($"pixel_mox_orange_large_{orangeCount}")); + } + + if (greenCount > 0) + { + if (greenCount == 1 && blueCount == 1) + { + gemTextures.Add(CardCostRender.GetTextureByName("pixel_mox_blue_green_large")); + return gemTextures; + } + + // default behaviour, accounts for multi mono mox + gemTextures.Add(CardCostRender.GetTextureByName($"pixel_mox_green_large_{greenCount}")); + } + + if (blueCount > 0) // at this point, we have eliminated all vanilla costs and we only some combination of multi mono costs + { + // default behaviour, accounts for multi mono mox + gemTextures.Add(CardCostRender.GetTextureByName($"pixel_mox_blue_large_{blueCount}")); + } + + return gemTextures; + } + public static List GetMoxTextures(List gemsCost) // vanilla order is OGB { List gemCost = new(); diff --git a/InscryptionCommunityPatch/Card/StackAbilityIcons.cs b/InscryptionCommunityPatch/Card/StackAbilityIcons.cs index 2994adef..95d25e93 100644 --- a/InscryptionCommunityPatch/Card/StackAbilityIcons.cs +++ b/InscryptionCommunityPatch/Card/StackAbilityIcons.cs @@ -238,7 +238,7 @@ private static Texture2D PatchTexture(Ability ability, int count) if (patchedTexture.ContainsKey(textureName)) return patchedTexture[textureName]; - PatchPlugin.Logger.LogDebug($"Ability [{AbilitiesUtil.GetInfo(ability).rulebookName}] stacks {count} times."); + PatchPlugin.Logger.LogDebug($"Ability [{AbilitiesUtil.GetInfo(ability).rulebookName}] stacks [{count}] time(s)."); // Copy the old texture to the new texture bool doubleDigit = count > 9; @@ -338,7 +338,7 @@ private static void AddIconNumber(Ability ability, CardInfo info, PlayableCard c } count ??= baseAbilities.Count(ab => ab == ability); - Debug.Log($"[{AbilitiesUtil.GetInfo(ability).rulebookName}] {count} {baseAbilities.Count}"); + //PatchPlugin.Logger.LogDebug($"[{AbilitiesUtil.GetInfo(ability).rulebookName}] {count} {baseAbilities.Count}"); if (count > 1) // we have a stack and need to add an override { @@ -371,14 +371,14 @@ public static bool RenderPixelAbilityStacks(PixelCardAbilityIcons __instance, Li allDisplayableAbilities.AddRange(AbilitiesUtil.GetAbilitiesFromMods(card.TemporaryMods)); } - List> grps = allDisplayableAbilities.Distinct().Select(a => new Tuple(a, abilities.Where(ab => ab == a).Count())).ToList(); + List> grps = allDisplayableAbilities.Distinct().Select(a => new Tuple(a, AbilitiesUtil.GetInfo(a).canStack ? abilities.Count(ab => ab == a) : 1)).ToList(); if (grps.Count > 0 && grps.Count - 1 < abilityIconGroups.Count) // if there are displayable sigils and there are enough icon groups { // if there is only 1 ability and there are two stacks of it, render it twice - if (PatchPlugin.doubleStackSplit.Value && grps.Count == 1 && grps[0].Item2 == 2) + if (PatchPlugin.doubleStackSplit.Value && grps.Count == 1 && grps[0].Item2 == 2/* && AbilitiesUtil.GetInfo(grps[0].Item1).canStack*/) { - PatchPlugin.Logger.LogDebug($"Displaying {grps[0].Item1} twice"); + //PatchPlugin.Logger.LogDebug($"Displaying {grps[0].Item1} twice"); grps[0] = new Tuple(grps[0].Item1, 1); grps.Add(grps[0]); } @@ -425,7 +425,7 @@ public static bool RenderPixelAbilityStacks(PixelCardAbilityIcons __instance, Li else abilityRenderer.flipY = false; - PatchPlugin.Logger.LogDebug($"Pixel Stacks: [{grps[i].Item1}] Count: {stackCount}"); + PatchPlugin.Logger.LogDebug($"Ability [{grps[i].Item1}] stacks [{stackCount}] time(s)"); AddStackCount(abilityRenderer, grps[i].Item1, stackCount); } } @@ -476,7 +476,7 @@ private static void AddStackCount(SpriteRenderer abilityRenderer, Ability abilit else { countTransform.gameObject.SetActive(true); - Debug.Log($"countTransform [{count - 1}]"); + PatchPlugin.Logger.LogDebug($"countTransform [{count - 1}]"); countTransform.gameObject.GetComponent().sprite = GBC_NUMBER_SPRITES[count - 1]; } } diff --git a/InscryptionCommunityPatch/InscryptionCommunityPatchPlugin.cs b/InscryptionCommunityPatch/InscryptionCommunityPatchPlugin.cs index 821280be..71937425 100644 --- a/InscryptionCommunityPatch/InscryptionCommunityPatchPlugin.cs +++ b/InscryptionCommunityPatch/InscryptionCommunityPatchPlugin.cs @@ -36,6 +36,8 @@ public class PatchPlugin : BaseUnityPlugin internal static ConfigEntry rightAct2Cost; internal static ConfigEntry act2CostRender; + internal static ConfigEntry act2VanillaStyle; + internal static ConfigEntry doubleStackSplit; internal static ConfigEntry act2StackIconType; @@ -93,6 +95,7 @@ private void Awake() configShowSquirrelTribeOnCards = Config.Bind("Tribes", "Show Squirrel Tribe", false, "Shows the Squirrel tribe icon on cards"); act2CostRender = Config.Bind("Card Costs", "GBC Cost render", true, "GBC Cards are able to display custom costs and hybrid costs through the API."); rightAct2Cost = Config.Bind("Card Costs", "GBC Cost On Right", true, "GBC Cards display their costs on the top-right corner. If false, display on the top-left corner"); + act2VanillaStyle = Config.Bind("Card Costs", "GBC Vanilla Render", false, "GBC cards use vanilla sprites when rendering multiple and custom costs."); configMergeOnBottom = Config.Bind("Sigil Display", "Merge_On_Botom", false, "Makes it so if enabled, merged sigils will display on the bottom of the card instead of on the artwork. In extreme cases, this can cause some visual bugs."); configRemovePatches = Config.Bind("Sigil Display", "Remove_Patches", false, "Makes it so if enabled, merged sigils will not have a patch behind them anymore and will instead be glowing yellow (only works with Merge_On_Bottom)."); doubleStackSplit = Config.Bind("Sigil Display", "Vanilla Stacking", false, "If enabled, cards with only two visible sigils will display each separately even if they can stack."); From 3b3e1ad285a80e14726d0bc18f1ca6746e836ae6 Mon Sep 17 00:00:00 2001 From: WhistleWind Date: Sun, 12 Jan 2025 23:01:01 -0800 Subject: [PATCH 04/10] DamageShieldBehaviour class now tracks whether it has fully initialised or not --- InscryptionAPI/Card/DamageShieldBehaviour.cs | 3 +++ InscryptionAPI/Card/ShieldManager.cs | 21 ++++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/InscryptionAPI/Card/DamageShieldBehaviour.cs b/InscryptionAPI/Card/DamageShieldBehaviour.cs index 9f9be3c3..7173e354 100644 --- a/InscryptionAPI/Card/DamageShieldBehaviour.cs +++ b/InscryptionAPI/Card/DamageShieldBehaviour.cs @@ -20,10 +20,13 @@ public abstract class DamageShieldBehaviour : AbilityBehaviour public abstract int StartingNumShields { get; } // how many shields this sigil will provide initially public bool HasShields() => NumShields > 0; + public bool initialised = false; public virtual void Start() { if (base.Card != null) numShields = StartingNumShields; + + initialised = true; } public virtual void AddShields(int amount, bool updateDisplay = true) diff --git a/InscryptionAPI/Card/ShieldManager.cs b/InscryptionAPI/Card/ShieldManager.cs index e1677777..3d4bbf58 100644 --- a/InscryptionAPI/Card/ShieldManager.cs +++ b/InscryptionAPI/Card/ShieldManager.cs @@ -104,7 +104,7 @@ private static bool PreventShieldReset(PlayableCard target) [HarmonyPrefix, HarmonyPatch(typeof(PlayableCard), nameof(PlayableCard.ResetShield), new Type[] { })] private static void ResetModShields(PlayableCard __instance) // runs before the base ResetShield logic { - foreach (var com in __instance.GetComponents()) + foreach (DamageShieldBehaviour com in __instance.GetComponents()) com.ResetShields(false); // if we're using the broken shield portrait, reset to the default portrait - if we're MudTurtle @@ -216,23 +216,26 @@ private static List HiddensOnlyRemoveStacks(List abilities, Li { // remove all abilities that hide the entire stack abilities.RemoveAll(x => hiddenAbilities.Contains(x) && !x.GetHideSingleStacks()); - foreach (var ab in hiddenAbilities.Where(x => x.GetHideSingleStacks())) + foreach (Ability ab in hiddenAbilities.Where(x => x.GetHideSingleStacks())) abilities.Remove(ab); + return abilities; } private static void CorrectHiddenAbilityRender(PlayableCard card) { - foreach (var com in card.GetComponents()) + foreach (DamageShieldBehaviour com in card.GetComponents().Where(x => x.initialised)) { if (com.HasShields()) { if (com.Ability.GetHideSingleStacks()) { // if there are more hidden shields than there should be - int removeStacks = card.Status.hiddenAbilities.Count(x => x == com.Ability) - com.NumShields; - for (int i = 0; i < removeStacks; i++) + if (card.Status.hiddenAbilities.Count(x => x == com.Ability) >= com.NumShields) { - card.Status.hiddenAbilities.Remove(com.Ability); + for (int i = 0; i < com.NumShields; i++) + { + card.Status.hiddenAbilities.Remove(com.Ability); + } } } else @@ -245,11 +248,13 @@ private static void CorrectHiddenAbilityRender(PlayableCard card) { if (com.Ability.GetHideSingleStacks()) { + card.AddShieldCount(1, Ability.DeathShield); int shieldsLost = com.StartingNumShields - com.NumShields; if (card.Status.hiddenAbilities.Count(x => x == com.Ability) < shieldsLost) { for (int i = 0; i < shieldsLost; i++) { + //Debug.Log($"{com.StartingNumShields} {com.NumShields} {shieldsLost} Add hidden"); card.Status.hiddenAbilities.Add(com.Ability); } } @@ -271,7 +276,7 @@ private static void CorrectHiddenAbilityRender(PlayableCard card) card.RenderCard(); } - [HarmonyPostfix, HarmonyPatch(typeof(PlayableCard), nameof(PlayableCard.AddTemporaryMod))] + [HarmonyPrefix, HarmonyPatch(typeof(PlayableCard), nameof(PlayableCard.AddTemporaryMod))] private static void AddTemporaryShieldCount(PlayableCard __instance, CardModificationInfo mod) { if (__instance == null || mod == null) @@ -287,7 +292,7 @@ private static void AddTemporaryShieldCount(PlayableCard __instance, CardModific { DamageShieldBehaviour behaviour = __instance.TriggerHandler.triggeredAbilities.Find(x => x.Item1 == ability).Item2 as DamageShieldBehaviour; behaviour.AddShields(1); - //InscryptionAPIPlugin.Logger.LogInfo($"Add: {__instance.Info.name} {behaviour.NumShields} <-- {behaviour.NumShields - 1}"); + //InscryptionAPIPlugin.Logger.LogInfo($"Add: {__instance.Info.name} {behaviour.NumShields - 1} --> {behaviour.NumShields}"); } } } From 161ff8ecb753f7bd929240f506b6a622ef822359 Mon Sep 17 00:00:00 2001 From: WhistleWind Date: Mon, 13 Jan 2025 14:50:15 -0800 Subject: [PATCH 05/10] 2.22.4 --- CHANGELOG.md | 14 +++++++++----- InscryptionAPI/InscryptionAPI.csproj | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08fe6113..1b3e48e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ -
-View Changelog +# 2.22.4 +- Added 'GBC Vanilla Render' config to community patches (false by default) - makes GBC cards render with vanilla cost sprites +- Added 'Vanilla Stacking' config to community patches (false by default) - renders cards with only two (stacking) sigils as they appear in vanilla, eg Spore Mice and Sporedigger +- Fixed incorrect rulebook icon scaling in Act 3 +- Fixed cards shield sigils not rendering correctly +- DamageShieldBehaviour class now has 'initialised' boolean field +- Highest displayable bone cost value in Act 1 raised from 13+ to 15+ +- Minor tweaks to blood and bone cost icons # 2.22.3 - Fixed pelt names when a user goes to the trader with modded cards, Examples shown below. @@ -701,6 +707,4 @@ - Custom cards are added via the **CustomCard** constructor rather than through the **AddCard** method. # v1.1 -- Hooked into a much more sensible method to load the cards into the card pool. - -
+- Hooked into a much more sensible method to load the cards into the card pool. \ No newline at end of file diff --git a/InscryptionAPI/InscryptionAPI.csproj b/InscryptionAPI/InscryptionAPI.csproj index 97fe1263..2b4e87ed 100644 --- a/InscryptionAPI/InscryptionAPI.csproj +++ b/InscryptionAPI/InscryptionAPI.csproj @@ -10,7 +10,7 @@ full false true - 2.22.3 + 2.22.4 From 109ef3ee4455e7a0d6d9e8d73369b559ab7249f4 Mon Sep 17 00:00:00 2001 From: WhistleWind Date: Fri, 14 Feb 2025 22:29:09 -0800 Subject: [PATCH 06/10] Rulebook fixes for Magnificus' Act --- CHANGELOG.md | 2 ++ .../Rulebook/RulebookRedirectPatches.cs | 4 ++-- .../Slots/SlotModificationManager.cs | 23 +++++++++++++++---- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b3e48e1..33b82dee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ - Added 'GBC Vanilla Render' config to community patches (false by default) - makes GBC cards render with vanilla cost sprites - Added 'Vanilla Stacking' config to community patches (false by default) - renders cards with only two (stacking) sigils as they appear in vanilla, eg Spore Mice and Sporedigger - Fixed incorrect rulebook icon scaling in Act 3 +- Fixed rulebook-related null errors when playing during Magnificus' Act +- Fixed slot modification rulebook pages not appearing correctly during Magnificus' Act - Fixed cards shield sigils not rendering correctly - DamageShieldBehaviour class now has 'initialised' boolean field - Highest displayable bone cost value in Act 1 raised from 13+ to 15+ diff --git a/InscryptionAPI/Rulebook/RulebookRedirectPatches.cs b/InscryptionAPI/Rulebook/RulebookRedirectPatches.cs index 2781739a..53ef0fc6 100644 --- a/InscryptionAPI/Rulebook/RulebookRedirectPatches.cs +++ b/InscryptionAPI/Rulebook/RulebookRedirectPatches.cs @@ -31,9 +31,9 @@ public static class RulebookRedirectPatches [HarmonyPostfix, HarmonyPatch(typeof(RuleBookController), nameof(RuleBookController.Start))] private static void CreateRedirectManager(RuleBookController __instance) { - if (RuleBookRedirectManager.m_Instance == null) + if (__instance.gameObject.GetComponent() == null) { - __instance.gameObject.AddComponent(); + RuleBookRedirectManager.m_Instance = __instance.gameObject.AddComponent(); } } diff --git a/InscryptionAPI/Slots/SlotModificationManager.cs b/InscryptionAPI/Slots/SlotModificationManager.cs index 62d683b9..307289b3 100644 --- a/InscryptionAPI/Slots/SlotModificationManager.cs +++ b/InscryptionAPI/Slots/SlotModificationManager.cs @@ -551,12 +551,14 @@ private static void AddSlotModificationsToRuleBook(AbilityMetaCategory metaCateg return; int curPageNum = 1; - GameObject itemPrefab = __instance.pageRanges.Find(x => x.type == PageRangeType.Items).rangePrefab; - int insertPosition = __result.FindLastIndex(rbi => itemPrefab) + 1; + PageRangeInfo itemPageRange = __instance.pageRanges.Find(x => x.type == PageRangeType.Items); + PageRangeInfo abilityRange = __instance.pageRanges.Find(x => x.type == PageRangeType.Abilities); + GameObject pagePrefab = (itemPageRange ?? abilityRange).rangePrefab; + int insertPosition = __result.FindLastIndex(rbi => pagePrefab) + 1; foreach (Info slot in infos) { RuleBookPageInfo info = new(); - info.pagePrefab = SaveManager.SaveFile.IsPart1 ? itemPrefab : __instance.pageRanges.Find(x => x.type == PageRangeType.Abilities).rangePrefab; + info.pagePrefab = (SaveManager.SaveFile.IsPart1 ? itemPageRange : abilityRange).rangePrefab; info.headerText = string.Format(Localization.Translate("APPENDIX XII, SUBSECTION I - SLOT EFFECTS {0}"), curPageNum); info.pageId = SLOT_PAGEID + (int)slot.ModificationType; __result.Insert(insertPosition, info); @@ -608,6 +610,7 @@ private static bool OverrideWithSlotInfo(AbilityPage __instance, string headerTe slotRendererObj?.gameObject.SetActive(false); __instance.mainAbilityGroup.iconRenderer.transform.parent.gameObject.SetActive(true); + // if this page should be filled with info from a slot modification if (otherArgs.Length > 0 && otherArgs.Last() is string pageId && pageId.StartsWith(SLOT_PAGEID)) { string modString = pageId.Replace(SLOT_PAGEID, ""); @@ -635,9 +638,21 @@ private static bool OverrideWithSlotInfo(AbilityPage __instance, string headerTe __instance.mainAbilityGroup.iconRenderer.transform.parent.gameObject.SetActive(false); slotRendererObj.GetComponent().sprite = info.P03RulebookSprite ?? info.RulebookSprite; } + else if (SaveManager.SaveFile.IsMagnificus) + { + if (slotRendererObj == null) + { + slotRendererObj = Instantiate(__instance.mainAbilityGroup.iconRenderer.transform.parent, __instance.mainAbilityGroup.transform); + slotRendererObj.name = "SlotRenderer"; + slotRendererObj.localPosition += new Vector3(0.1f, -0.1f, 0f); + } + slotRendererObj.gameObject.SetActive(true); + __instance.mainAbilityGroup.iconRenderer.transform.parent.gameObject.SetActive(false); + slotRendererObj.GetChild(0).GetComponent().material.mainTexture = (info.MagnificusRulebookSprite ?? info.RulebookSprite).texture; + } else { - Debug.Log("Help"); + InscryptionAPIPlugin.Logger.LogDebug("Slot modification page: WIP"); } __instance.mainAbilityGroup.iconRenderer.transform.localScale = new(0.8f, 0.8f, 1f); From b88aad009d2a757959c53b8edfd2a7cfe763ef2d Mon Sep 17 00:00:00 2001 From: WhistleWind Date: Fri, 14 Feb 2025 23:00:39 -0800 Subject: [PATCH 07/10] Cleanup --- .../Ascension/AscensionChallengePaginator.cs | 14 +- .../AscensionChallengePaginatorSetupifier.cs | 1 - .../Ascension/AscensionChallengeScreen.cs | 2 +- .../Ascension/ChallengeDisplayerPlus.cs | 4 +- InscryptionAPI/Ascension/ChallengeManager.cs | 2 +- InscryptionAPI/Card/AbilityManager.cs | 8 +- InscryptionAPI/Card/BasePart2Modular.cs | 3 - InscryptionAPI/Card/CardExtensions.cs | 5 +- InscryptionAPI/Card/CardExtensionsHelpers.cs | 2 +- InscryptionAPI/Card/CardManager.cs | 7 +- .../Card/CardModificationInfoExtensions.cs | 7 +- .../Card/CardModificationInfoManager.cs | 1 - InscryptionAPI/Card/CostProperties.cs | 21 +- InscryptionAPI/Card/DamageShieldBehaviour.cs | 3 - InscryptionAPI/Card/ShieldManager.cs | 1 - .../Card/SpecialTriggeredAbilityManager.cs | 2 +- InscryptionAPI/Costs/CardCostManager.cs | 3 +- InscryptionAPI/Dialogue/DialogueManager.cs | 2 +- .../Encounters/EncounterExtensions.cs | 4 +- InscryptionAPI/Encounters/OpponentManager.cs | 14 +- InscryptionAPI/Guid/GuidManager.cs | 2 +- InscryptionAPI/Helpers/CustomFields.cs | 182 +++++++++--------- .../Helpers/ResourcesManagerHelpers.cs | 2 +- InscryptionAPI/Helpers/TextureHelper.cs | 8 +- InscryptionAPI/InscryptionAPIPlugin.cs | 4 +- InscryptionAPI/Items/ConsumableItemManager.cs | 2 - InscryptionAPI/Items/ConsumableItemPatches.cs | 5 - .../Localizing/LocalizationManager.cs | 30 +-- .../Localizing/LocalizationManager_Patches.cs | 26 +-- .../Patches/TradePeltsSequencer_Patches.cs | 4 +- InscryptionAPI/Pelts/PeltManager.cs | 15 +- InscryptionAPI/PixelCard/GBCPackManager.cs | 6 - InscryptionAPI/PixelCard/PixelCardManager.cs | 7 +- InscryptionAPI/Regions/Part1RegionData.cs | 6 +- .../Rulebook/PageTextInteractable.cs | 6 - InscryptionAPI/Rulebook/RuleBookManager.cs | 17 +- .../Rulebook/RuleBookRedirectManager.cs | 10 +- .../Rulebook/RulebookRedirectPatches.cs | 6 - InscryptionAPI/Saves/ModdedSaveData.cs | 10 +- .../Slots/SlotModificationBehaviour.cs | 2 +- .../Slots/SlotModificationExtensions.cs | 3 +- .../SlotModificationGainAbilityBehaviour.cs | 2 +- .../Slots/SlotModificationInteractable.cs | 1 - .../Slots/SlotModificationManager.cs | 16 +- InscryptionAPI/Totems/TotemManager.cs | 8 +- .../Triggers/CustomTriggerFinder.cs | 2 +- .../Triggers/CustomTriggerPatches.cs | 2 - .../Triggers/DoCombatPhasePatches.cs | 5 +- InscryptionAPI/Triggers/Interfaces.cs | 1 - .../Triggers/SlotAttackSlotPatches.cs | 14 +- InscryptionAPI/Triggers/TakeDamagePatches.cs | 10 +- .../Card/Act2HideStatsPatch.cs | 1 - .../Card/CardCostRender.cs | 3 +- .../Card/HiddenCharIndexFIx.cs | 3 - .../Card/Part1CardCostRender.cs | 3 - .../Card/Part2CardCostRender.cs | 4 +- .../Card/Part3CardCostRender.cs | 2 +- .../Card/PixelCurrentDeckPatch.cs | 3 - .../Card/StackAbilityIcons.cs | 5 +- .../Card/TempModDecalsFix.cs | 1 - .../Card/TempModPixelSigilsFix.cs | 3 +- .../Act2ShapeshifterPatches.cs | 2 - .../DrawCopyOnDeathFix.cs | 3 - .../DrawNewHand3DFixes.cs | 1 - .../Card/Vanilla Ability Patches/SniperFix.cs | 1 - .../PixelTutor/PixelPlayableCardArray.cs | 4 +- .../ResourceManagers/ActOneEnergyDrone.cs | 2 +- .../ActThreeBonesDisplayer.cs | 4 +- .../Sequencers/BuyPeltsSmallTags.cs | 5 - .../Sequencers/CardCostChoiceNodePatch.cs | 1 - .../Sequencers/LeshyResetRedEyes.cs | 5 - .../Sequencers/PackRatNodeBackgroundFix.cs | 8 +- .../Sequencers/TradeableTalkingCardFix.cs | 3 - InscryptionCommunityPatch/Tests/TestCost.cs | 4 +- 74 files changed, 235 insertions(+), 356 deletions(-) diff --git a/InscryptionAPI/Ascension/AscensionChallengePaginator.cs b/InscryptionAPI/Ascension/AscensionChallengePaginator.cs index 514bfdc8..aaff322d 100644 --- a/InscryptionAPI/Ascension/AscensionChallengePaginator.cs +++ b/InscryptionAPI/Ascension/AscensionChallengePaginator.cs @@ -1,11 +1,7 @@ -using BepInEx; using DiskCardGame; using InscryptionAPI.Helpers; using InscryptionAPI.Helpers.Extensions; -using System; -using System.Linq; using System.Reflection; -using System.Runtime.CompilerServices; using System.Text; using UnityEngine; @@ -21,7 +17,7 @@ public void Initialize(AscensionChallengeScreen screen, AscensionMenuScreenTrans { //List firstPageObjs = new(); List icons; - + // if the screen object exists, use its list of icons; otherwise use the screenInteractables from the transition object if (screen != null) { @@ -166,7 +162,7 @@ private GameObject CreateIconGameObject(GameObject objectRef, int index, Ascensi screen?.icons.Add(chall); if (info != null) chall.challengeInfo = info; - + return newIcon; } public void OnEnable() @@ -180,7 +176,7 @@ public void OnEnable() ChallengeManager.SyncChallengeList(); Initialize(GetComponent(), GetComponent()); - + if (leftArrow) { Destroy(leftArrow.gameObject); @@ -202,7 +198,7 @@ public void OnEnable() if (screen != null) { screen.icons?.RemoveAll(x => x == null); - + icons = screen.icons; pageLength = screen.icons.Count; } @@ -287,7 +283,7 @@ public void OnEnable() challengeObjectsForPages.ForEach(x => x.RemoveAll(x => x == null)); LoadPage(pageIndex = 0); - + if (pagesToAdd.Count == 0) return; diff --git a/InscryptionAPI/Ascension/AscensionChallengePaginatorSetupifier.cs b/InscryptionAPI/Ascension/AscensionChallengePaginatorSetupifier.cs index 64569402..5e85925d 100644 --- a/InscryptionAPI/Ascension/AscensionChallengePaginatorSetupifier.cs +++ b/InscryptionAPI/Ascension/AscensionChallengePaginatorSetupifier.cs @@ -1,5 +1,4 @@ using DiskCardGame; -using UnityEngine; namespace InscryptionAPI.Ascension; diff --git a/InscryptionAPI/Ascension/AscensionChallengeScreen.cs b/InscryptionAPI/Ascension/AscensionChallengeScreen.cs index 0329cecf..fa2bf6c9 100644 --- a/InscryptionAPI/Ascension/AscensionChallengeScreen.cs +++ b/InscryptionAPI/Ascension/AscensionChallengeScreen.cs @@ -100,7 +100,7 @@ public static bool UpdateFooterText(AscensionChallengeScreen __instance, Ascensi { string arg = Localization.ToUpper(Localization.Translate(challengeInfo.title)); string text = string.Format(Localization.Translate(activated ? "{0} ENABLED" : "{0} DISABLED"), arg); - + string text2; if (activated) text2 = string.Format(Localization.Translate("{0} Challenge Points Subtracted"), (-challengeInfo.pointValue).ToString()); diff --git a/InscryptionAPI/Ascension/ChallengeDisplayerPlus.cs b/InscryptionAPI/Ascension/ChallengeDisplayerPlus.cs index 48460dd7..67cf8272 100644 --- a/InscryptionAPI/Ascension/ChallengeDisplayerPlus.cs +++ b/InscryptionAPI/Ascension/ChallengeDisplayerPlus.cs @@ -128,7 +128,7 @@ public void DisplayChallenge(AscensionChallengeInfo challengeInfo, bool immediat actualStrings = dependencyStrings.ConvertAll(x => !AscensionSaveData.Data.activeChallenges.Contains(x.challenge) ? $"[c:R]{x.FullText}[c:]" : AscensionSaveData.Data.activeChallenges.Count(x2 => x2 == x.challenge) < x.number ? x.RedPrefixText : x.FullText); - + dependency = "Depends on: " + string.Join(", ", actualStrings); } } @@ -141,7 +141,7 @@ public void DisplayChallenge(AscensionChallengeInfo challengeInfo, bool immediat AscensionChallengeInfo info = d.GetInfo(); if (info != null && !challenges.Contains(d)) { - string prefix = AscensionSaveData.Data.activeChallenges.Contains(d) ? $"[c:R]{Localization.Translate(info.title)}[c:]" : Localization.Translate(info.title); + string prefix = AscensionSaveData.Data.activeChallenges.Contains(d) ? $"[c:R]{Localization.Translate(info.title)}[c:]" : Localization.Translate(info.title); incompatibilityStrings.Add(prefix); challenges.Add(d); } diff --git a/InscryptionAPI/Ascension/ChallengeManager.cs b/InscryptionAPI/Ascension/ChallengeManager.cs index 5ee288ab..5824764b 100644 --- a/InscryptionAPI/Ascension/ChallengeManager.cs +++ b/InscryptionAPI/Ascension/ChallengeManager.cs @@ -40,7 +40,7 @@ public class FullChallenge /// A function that needs to return true for the challenge to be unlocked. Optional. If this isn't set, this check will be bypassed. The int argument is the current Kaycee's Mod challenge level. ///
public Func CustomUnlockCheck { get; set; } - + /// /// If true, this challenge's icon(s) will occupy the entire column like the Final Boss challenge icon, and be ordered to the right of regular challenges. /// diff --git a/InscryptionAPI/Card/AbilityManager.cs b/InscryptionAPI/Card/AbilityManager.cs index 026a3a00..a4d58c6f 100644 --- a/InscryptionAPI/Card/AbilityManager.cs +++ b/InscryptionAPI/Card/AbilityManager.cs @@ -36,7 +36,7 @@ public class FullAbility /// The unique ID for this ability ///
public readonly Ability Id; - + /// /// The guid of the mod that added this ability /// @@ -74,7 +74,7 @@ public class FullAbility /// Tuple.Item3 (string): the id that the API will match against to find the redirect page. Eg, for ability redirects this will be the Ability id as a string. /// public Dictionary RulebookDescriptionRedirects = new(); - + internal static ConditionalWeakTable ReverseMapper = new(); /// @@ -265,7 +265,7 @@ private static List GenBaseGameAbilityList() baseGame.Add(ab); continue; } - baseGame.Add(new FullAbility ( + baseGame.Add(new FullAbility( null, ability.ability, ability, @@ -276,7 +276,7 @@ private static List GenBaseGameAbilityList() return baseGame; } - + /// /// Creates a new ability and registers it to be able to be added to cards /// diff --git a/InscryptionAPI/Card/BasePart2Modular.cs b/InscryptionAPI/Card/BasePart2Modular.cs index 7a575c18..357b626d 100644 --- a/InscryptionAPI/Card/BasePart2Modular.cs +++ b/InscryptionAPI/Card/BasePart2Modular.cs @@ -1,7 +1,4 @@ using DiskCardGame; -using System; -using System.Collections.Generic; -using System.Text; namespace InscryptionAPI.Card; internal class Part2ModularAbilities diff --git a/InscryptionAPI/Card/CardExtensions.cs b/InscryptionAPI/Card/CardExtensions.cs index 78dfcd98..bdbcf3f5 100644 --- a/InscryptionAPI/Card/CardExtensions.cs +++ b/InscryptionAPI/Card/CardExtensions.cs @@ -1,8 +1,5 @@ using DiskCardGame; using InscryptionAPI.Helpers; -using InscryptionAPI.Nodes; -using Sirenix.Utilities; -using System.Collections; using UnityEngine; namespace InscryptionAPI.Card; @@ -343,7 +340,7 @@ public static CardInfo RemoveTraits(this CardInfo info, params Trait[] traits) } return info; } - + /// /// Removes any number of traits from the card. /// diff --git a/InscryptionAPI/Card/CardExtensionsHelpers.cs b/InscryptionAPI/Card/CardExtensionsHelpers.cs index 05f3a004..5dc89db1 100644 --- a/InscryptionAPI/Card/CardExtensionsHelpers.cs +++ b/InscryptionAPI/Card/CardExtensionsHelpers.cs @@ -818,7 +818,7 @@ public static DamageShieldBehaviour GetShieldBehaviour(this PlayableCard card, A Type type = ShieldManager.AllShieldAbilities.AbilityByID(ability)?.AbilityBehavior; if (type == null) return null; - + return card.GetComponent(type) as DamageShieldBehaviour; } /// diff --git a/InscryptionAPI/Card/CardManager.cs b/InscryptionAPI/Card/CardManager.cs index 1a01cbff..b4de2a81 100644 --- a/InscryptionAPI/Card/CardManager.cs +++ b/InscryptionAPI/Card/CardManager.cs @@ -3,7 +3,6 @@ using HarmonyLib; using InscryptionAPI.Guid; using InscryptionAPI.Helpers; -using InscryptionAPI.PixelCard; using InscryptionAPI.Saves; using MonoMod.Cil; using System.Collections.ObjectModel; @@ -22,7 +21,7 @@ private class CardExt // Needs to be defined first so the implicit static constr public readonly Dictionary TypeMap = new(); public readonly Dictionary StringMap = new(); } - public class CardAltPortraits + public class CardAltPortraits { public Sprite PixelAlternatePortrait = null; public Sprite SteelTrapPortrait = null; @@ -86,7 +85,7 @@ public static void SyncCardList() card.evolveParams.evolution.Mods = mods; } - if (card.iceCubeParams != null && card.iceCubeParams.creatureWithin != null) + if (card.iceCubeParams != null && card.iceCubeParams.creatureWithin != null) { List mods = card.iceCubeParams.creatureWithin.Mods; card.iceCubeParams.creatureWithin = cards.CardByName(card.iceCubeParams.creatureWithin.name).Clone() as CardInfo; @@ -295,7 +294,7 @@ public static CardInfo New(string modPrefix, string name, string displayName, in public static Dictionary GetCardExtensionTable(this CardInfo card) => CardExtensionProperties.GetOrCreateValue(card).StringMap; internal static CardAltPortraits GetAltPortraits(this CardInfo card) => CardAlternatePortraits.GetOrCreateValue(card); - + public static Sprite PixelAlternatePortrait(this CardInfo card) { return card.GetAltPortraits().PixelAlternatePortrait; diff --git a/InscryptionAPI/Card/CardModificationInfoExtensions.cs b/InscryptionAPI/Card/CardModificationInfoExtensions.cs index fb5dab09..f299b425 100644 --- a/InscryptionAPI/Card/CardModificationInfoExtensions.cs +++ b/InscryptionAPI/Card/CardModificationInfoExtensions.cs @@ -1,7 +1,6 @@ using DiskCardGame; using InscryptionAPI.CardCosts; using Sirenix.Utilities; -using UnityEngine; using static InscryptionAPI.Card.CardModificationInfoManager; namespace InscryptionAPI.Card; @@ -109,7 +108,7 @@ public static CardModificationInfo ClearCustomPropertiesId(this CardModification string properties = GetCustomPropertiesIdString(mod); if (properties != null) mod.singletonId = mod.singletonId.Replace(properties, ""); - + return mod; } public static CardModificationInfo ClearCustomCostsId(this CardModificationInfo mod) @@ -133,7 +132,7 @@ public static CardModificationInfo SetPropertiesId(this CardModificationInfo mod { string newProperties; string oldProperties = GetCustomPropertiesIdString(mod); // get the current string of properties - + // if the property is already set if (oldProperties.Contains(propertyName)) { @@ -239,7 +238,7 @@ public static string GetCustomCostId(this CardModificationInfo mod, string costN return null; string pairString = currentCosts.Substring(costIdx); - + int valueIdx = pairString.IndexOf(';'); if (valueIdx == -1) // if this is the last valuePair in the string valueIdx = pairString.IndexOf(']'); diff --git a/InscryptionAPI/Card/CardModificationInfoManager.cs b/InscryptionAPI/Card/CardModificationInfoManager.cs index bd31a6b9..765adb38 100644 --- a/InscryptionAPI/Card/CardModificationInfoManager.cs +++ b/InscryptionAPI/Card/CardModificationInfoManager.cs @@ -3,7 +3,6 @@ using InscryptionAPI.CardCosts; using Sirenix.Serialization.Utilities; using System.Runtime.CompilerServices; -using UnityEngine; namespace InscryptionAPI.Card; diff --git a/InscryptionAPI/Card/CostProperties.cs b/InscryptionAPI/Card/CostProperties.cs index cab30bea..c89a4cef 100644 --- a/InscryptionAPI/Card/CostProperties.cs +++ b/InscryptionAPI/Card/CostProperties.cs @@ -1,9 +1,8 @@ -using System.Collections; -using System.Reflection; -using System.Runtime.CompilerServices; using DiskCardGame; using GBC; using HarmonyLib; +using System.Reflection; +using System.Runtime.CompilerServices; using UnityEngine; namespace InscryptionAPI.Card.CostProperties; @@ -69,7 +68,7 @@ public bool GemsChanged(List a, List b) } public static ConditionalWeakTable>> CardInfoToCard = new(); - + /// /// ChangeCardCostGetter patches BloodCost so we can change the cost on the fly /// This reverse patch gives us access to the original method without any changes. @@ -77,7 +76,7 @@ public bool GemsChanged(List a, List b) /// [HarmonyReversePatch, HarmonyPatch(typeof(CardInfo), nameof(CardInfo.BloodCost), MethodType.Getter), MethodImpl(MethodImplOptions.NoInlining)] public static int OriginalBloodCost(CardInfo __instance) { return 0; } - + /// /// ChangeCardCostGetter patches BoneCost so we can change the cost on the fly /// This reverse patch gives us access to the original method without any changes. @@ -85,7 +84,7 @@ public bool GemsChanged(List a, List b) /// [HarmonyReversePatch, HarmonyPatch(typeof(CardInfo), nameof(CardInfo.BonesCost), MethodType.Getter), MethodImpl(MethodImplOptions.NoInlining)] public static int OriginalBonesCost(CardInfo __instance) { return 0; } - + /// /// ChangeCardCostGetter patches GemsCost so we can change the cost on the fly /// This reverse patch gives us access to the original method without any changes. @@ -155,7 +154,7 @@ public static bool BloodCost(CardInfo __instance, ref int __result) __result = Mathf.Max(0, card?.BloodCost() ?? CostProperties.OriginalBloodCost(__instance)); return false; } - + [HarmonyPatch(typeof(CardInfo), nameof(CardInfo.BonesCost), MethodType.Getter), HarmonyPrefix] public static bool BoneCost(CardInfo __instance, ref int __result) { @@ -166,7 +165,7 @@ public static bool BoneCost(CardInfo __instance, ref int __result) __result = Mathf.Max(0, card.BonesCost()); return false; } - + [HarmonyPatch(typeof(CardInfo), nameof(CardInfo.GemsCost), MethodType.Getter), HarmonyPrefix] public static bool GemsCost(CardInfo __instance, ref List __result) { @@ -174,7 +173,7 @@ public static bool GemsCost(CardInfo __instance, ref List __result) __result = card?.GemsCost() ?? CostProperties.ImprovedGemsCost(__instance); return false; } - + [HarmonyPatch(typeof(CardInfo), nameof(CardInfo.EnergyCost), MethodType.Getter), HarmonyPrefix] public static bool EnergyCost(CardInfo __instance, ref int __result) { @@ -297,10 +296,10 @@ private static IEnumerable TargetMethods() yield return AccessTools.Method(typeof(TurnManager), nameof(TurnManager.CleanupPhase)); yield return AccessTools.Method(typeof(GBCEncounterManager), nameof(GBCEncounterManager.LoadOverworldScene)); } - + private static void Postfix() { // NOTE: This is a hack to clear the table - CostProperties.CardInfoToCard = new ConditionalWeakTable>>(); + CostProperties.CardInfoToCard = new ConditionalWeakTable>>(); } } \ No newline at end of file diff --git a/InscryptionAPI/Card/DamageShieldBehaviour.cs b/InscryptionAPI/Card/DamageShieldBehaviour.cs index 7173e354..3bc475f5 100644 --- a/InscryptionAPI/Card/DamageShieldBehaviour.cs +++ b/InscryptionAPI/Card/DamageShieldBehaviour.cs @@ -1,10 +1,7 @@ using DiskCardGame; using GBC; -using HarmonyLib; using InscryptionAPI.Helpers.Extensions; -using InscryptionAPI.Triggers; using System.Collections; -using System.Runtime.CompilerServices; using UnityEngine; namespace InscryptionAPI.Card; diff --git a/InscryptionAPI/Card/ShieldManager.cs b/InscryptionAPI/Card/ShieldManager.cs index 3d4bbf58..3b86062a 100644 --- a/InscryptionAPI/Card/ShieldManager.cs +++ b/InscryptionAPI/Card/ShieldManager.cs @@ -4,7 +4,6 @@ using InscryptionAPI.Helpers.Extensions; using InscryptionAPI.Triggers; using System.Collections; -using System.Collections.ObjectModel; using System.Reflection; using System.Reflection.Emit; using UnityEngine; diff --git a/InscryptionAPI/Card/SpecialTriggeredAbilityManager.cs b/InscryptionAPI/Card/SpecialTriggeredAbilityManager.cs index 5a91774c..87da2522 100644 --- a/InscryptionAPI/Card/SpecialTriggeredAbilityManager.cs +++ b/InscryptionAPI/Card/SpecialTriggeredAbilityManager.cs @@ -15,7 +15,7 @@ public class FullSpecialTriggeredAbility public FullSpecialTriggeredAbility(SpecialTriggeredAbility id, Type abilityBehaviour) : this(null, abilityBehaviour.ToString(), id, abilityBehaviour) { - + } public FullSpecialTriggeredAbility(string guid, string name, SpecialTriggeredAbility id, Type abilityBehaviour) diff --git a/InscryptionAPI/Costs/CardCostManager.cs b/InscryptionAPI/Costs/CardCostManager.cs index de555d5e..60a1800d 100644 --- a/InscryptionAPI/Costs/CardCostManager.cs +++ b/InscryptionAPI/Costs/CardCostManager.cs @@ -4,7 +4,6 @@ using InscryptionAPI.Card; using InscryptionAPI.Dialogue; using InscryptionAPI.Guid; -using InscryptionAPI.Helpers; using Sirenix.Utilities; using System.Collections; using System.Collections.ObjectModel; @@ -207,7 +206,7 @@ static CardCostManager() public static List AllCustomCosts { get; private set; } = new(); internal readonly static ObservableCollection NewCosts = new(); - + public static event Func, List> ModifyCustomCostList; // you don't have the [colour] gem for that. diff --git a/InscryptionAPI/Dialogue/DialogueManager.cs b/InscryptionAPI/Dialogue/DialogueManager.cs index 435a289c..c19f5e51 100644 --- a/InscryptionAPI/Dialogue/DialogueManager.cs +++ b/InscryptionAPI/Dialogue/DialogueManager.cs @@ -40,7 +40,7 @@ public static Dialogue Add(string pluginGUID, DialogueEvent dialogueEvent) DialogueDataUtil.Data?.events?.RemoveAll(d => d.id == dialogueEvent.id); DialogueDataUtil.Data?.events?.Add(dialogueEvent); - + return dialogue; } diff --git a/InscryptionAPI/Encounters/EncounterExtensions.cs b/InscryptionAPI/Encounters/EncounterExtensions.cs index c5f4b220..99a1950e 100644 --- a/InscryptionAPI/Encounters/EncounterExtensions.cs +++ b/InscryptionAPI/Encounters/EncounterExtensions.cs @@ -1,9 +1,9 @@ -using System.Collections; -using System.Runtime.CompilerServices; using DiskCardGame; using GBC; using HarmonyLib; using InscryptionAPI.Card; +using System.Collections; +using System.Runtime.CompilerServices; using static DiskCardGame.EncounterBlueprintData; namespace InscryptionAPI.Encounters; diff --git a/InscryptionAPI/Encounters/OpponentManager.cs b/InscryptionAPI/Encounters/OpponentManager.cs index 46909bcb..7548873d 100644 --- a/InscryptionAPI/Encounters/OpponentManager.cs +++ b/InscryptionAPI/Encounters/OpponentManager.cs @@ -179,7 +179,7 @@ private static bool ReplacePrefabPath(ref string __result, Opponent.Type ___boss __result = obj != null ? fullPath : "Prefabs/Map/MapNodesPart1/MapNode_ProspectorBoss"; return false; } - + [HarmonyPatch(typeof(Opponent), nameof(Opponent.CreateCard))] [HarmonyPrefix] private static bool CloneCardInfo(ref CardInfo cardInfo) @@ -188,7 +188,7 @@ private static bool CloneCardInfo(ref CardInfo cardInfo) cardInfo = (CardInfo)cardInfo.Clone(); return true; } - + [HarmonyPatch] private class MapGenerator_CreateNode { @@ -309,7 +309,7 @@ internal class PreventCallsOnScenary_Patches { private static readonly Type StartNewPhaseSequence = Type.GetType("DiskCardGame.TrapperTraderBossOpponent+d__6, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"); private static readonly MethodInfo PlayAnimationInfo = AccessTools.Method(typeof(PreventCallsOnScenary_Patches), nameof(PlayAnimation), new[] { typeof(Animation), typeof(string) }); - + private static IEnumerable TargetMethods() { yield return AccessTools.Method(StartNewPhaseSequence, "MoveNext"); @@ -324,21 +324,21 @@ private static IEnumerable Transpiler(IEnumerable(), "knives_table_exit"); - + List codes = new List(instructions); for (int i = 0; i < codes.Count; i++) { if (codes[i].opcode == OpCodes.Ldstr && codes[i].operand == "knives_table_exit") { - + // ldstr "knives_table_exit" - codes[i+1] = new CodeInstruction(OpCodes.Call, PlayAnimationInfo); // callvirt instance bool [UnityEngine.AnimationModule]UnityEngine.Animation::Play(string) + codes[i + 1] = new CodeInstruction(OpCodes.Call, PlayAnimationInfo); // callvirt instance bool [UnityEngine.AnimationModule]UnityEngine.Animation::Play(string) // pop break; } } - + return codes; } diff --git a/InscryptionAPI/Guid/GuidManager.cs b/InscryptionAPI/Guid/GuidManager.cs index 3ffb0f31..199857ee 100644 --- a/InscryptionAPI/Guid/GuidManager.cs +++ b/InscryptionAPI/Guid/GuidManager.cs @@ -74,7 +74,7 @@ unsafe public static T GetEnumValue(string guid, string value) where T : unma reverseMapper[enumValue] = typeof(T); return *(T*)&enumValue; } - + public static bool TryGetGuidAndKeyEnumValue(T value, out string guid, out string key) where T : System.Enum { string prefix = $"{typeof(T).Name}"; diff --git a/InscryptionAPI/Helpers/CustomFields.cs b/InscryptionAPI/Helpers/CustomFields.cs index 8f4d24fb..4091247e 100644 --- a/InscryptionAPI/Helpers/CustomFields.cs +++ b/InscryptionAPI/Helpers/CustomFields.cs @@ -5,105 +5,107 @@ namespace InscryptionAPI.Helpers; /// /// Allows for an easy way to add custom fields to an object, or to an entire class. /// -public static class CustomFields { - static ConditionalWeakTable> objectFields = new ConditionalWeakTable>(); +public static class CustomFields +{ + static ConditionalWeakTable> objectFields = new ConditionalWeakTable>(); - /// - /// Returns a custom field. - /// - /// The type of the custom field. - /// The object which has the custom field. - /// The name of the custom field. - /// A custom field of type T. If the field is not found, default(T) is returned. - public static T Get(object obj, string field) - { - if (!HasField(obj, field)) Set(obj, field, default(T)); + /// + /// Returns a custom field. + /// + /// The type of the custom field. + /// The object which has the custom field. + /// The name of the custom field. + /// A custom field of type T. If the field is not found, default(T) is returned. + public static T Get(object obj, string field) + { + if (!HasField(obj, field)) Set(obj, field, default(T)); - objectFields.TryGetValue(obj, out Dictionary fields); - return (T)fields[field]; - } + objectFields.TryGetValue(obj, out Dictionary fields); + return (T)fields[field]; + } - /// - /// Returns a static custom field. - /// - /// The type of the custom field. - /// The class the static field is stored on. - /// The name of the custom field. - /// A custom field of type T. If the field is not found, default(T) is returned. - public static T GetStatic(string field) - => Get(typeof(C), field); + /// + /// Returns a static custom field. + /// + /// The type of the custom field. + /// The class the static field is stored on. + /// The name of the custom field. + /// A custom field of type T. If the field is not found, default(T) is returned. + public static T GetStatic(string field) + => Get(typeof(C), field); - /// - /// Returns a static custom field. - /// - /// The type of the custom field. - /// The name of the custom field. - /// The type of the class the static field is stored on. - /// A custom field of type T. If the field is not found, default(T) is returned. - public static T GetStatic(string field, Type classType) - => Get(classType, field); + /// + /// Returns a static custom field. + /// + /// The type of the custom field. + /// The name of the custom field. + /// The type of the class the static field is stored on. + /// A custom field of type T. If the field is not found, default(T) is returned. + public static T GetStatic(string field, Type classType) + => Get(classType, field); - /// - /// Set a custom field. - /// - /// The object which you want to store the custom field on. - /// The name of the custom field. - /// The value of the custom field. - public static void Set(object obj, string field, object value) - { - if (!objectFields.TryGetValue(obj, out Dictionary fields)) { - fields = new Dictionary() ; - objectFields.Add(obj, fields); - } + /// + /// Set a custom field. + /// + /// The object which you want to store the custom field on. + /// The name of the custom field. + /// The value of the custom field. + public static void Set(object obj, string field, object value) + { + if (!objectFields.TryGetValue(obj, out Dictionary fields)) + { + fields = new Dictionary(); + objectFields.Add(obj, fields); + } - fields[field] = value; - } + fields[field] = value; + } - /// - /// Set a static custom field. - /// - /// The class which you want to store the static field is stored on. - /// The name of the custom field. - /// The value of the custom field. - public static void SetStatic(string field, object value) - => Set(typeof(C), field, value); + /// + /// Set a static custom field. + /// + /// The class which you want to store the static field is stored on. + /// The name of the custom field. + /// The value of the custom field. + public static void SetStatic(string field, object value) + => Set(typeof(C), field, value); - /// - /// Set a static custom field. - /// - /// The name of the custom field. - /// The value of the custom field. - /// The type of the class which you want to store the static field is stored on. - public static void SetStatic(string field, object value, Type classType) - => Set(classType, field, value); + /// + /// Set a static custom field. + /// + /// The name of the custom field. + /// The value of the custom field. + /// The type of the class which you want to store the static field is stored on. + public static void SetStatic(string field, object value, Type classType) + => Set(classType, field, value); - /// - /// Check if an object currently stores a custom field. - /// - /// The object to check. - /// The name of the custom field to check for. - /// True if the object is storing the custom field. - public static bool HasField(object obj, string field) - { - if (!objectFields.TryGetValue(obj, out Dictionary fields)) return false; - return fields.ContainsKey(field); - } + /// + /// Check if an object currently stores a custom field. + /// + /// The object to check. + /// The name of the custom field to check for. + /// True if the object is storing the custom field. + public static bool HasField(object obj, string field) + { + if (!objectFields.TryGetValue(obj, out Dictionary fields)) return false; + return fields.ContainsKey(field); + } - /// - /// Check if a class currently stores a static custom field. - /// - /// The class which you want to check. - /// The name of the static custom field to check for. - /// True if the class is storing the static custom field. - public static bool HasStaticField(string field) - => HasField(typeof(C), field); + /// + /// Check if a class currently stores a static custom field. + /// + /// The class which you want to check. + /// The name of the static custom field to check for. + /// True if the class is storing the static custom field. + public static bool HasStaticField(string field) + => HasField(typeof(C), field); - /// - /// Check if a class currently stores a static custom field. - /// - /// The name of the static custom field to check for. - /// The type of the class which you want to check. - /// True if the class is storing the static custom field. - public static bool HasStaticField(string field, Type classType) - => HasField(classType, field); + /// + /// Check if a class currently stores a static custom field. + /// + /// The name of the static custom field to check for. + /// The type of the class which you want to check. + /// True if the class is storing the static custom field. + public static bool HasStaticField(string field, Type classType) + => HasField(classType, field); } \ No newline at end of file diff --git a/InscryptionAPI/Helpers/ResourcesManagerHelpers.cs b/InscryptionAPI/Helpers/ResourcesManagerHelpers.cs index 5f369c6a..95170918 100644 --- a/InscryptionAPI/Helpers/ResourcesManagerHelpers.cs +++ b/InscryptionAPI/Helpers/ResourcesManagerHelpers.cs @@ -109,7 +109,7 @@ public static bool PlayerHasGems(params GemType[] gems) public static class GetEmptyBatterySprite { public static Sprite emptyBatterySprite = null; - + [HarmonyPostfix] private static void GetSprite(PixelResourcesManager __instance) { diff --git a/InscryptionAPI/Helpers/TextureHelper.cs b/InscryptionAPI/Helpers/TextureHelper.cs index f2758dfd..742e1e45 100644 --- a/InscryptionAPI/Helpers/TextureHelper.cs +++ b/InscryptionAPI/Helpers/TextureHelper.cs @@ -255,18 +255,18 @@ public static Sprite GetEmissionSprite(this Sprite sprite) { if (sprite == null) return null; - + if (emissionMap.TryGetValue(sprite, out Sprite emission)) return emission; - - + + string text = sprite.name + "_emission"; emission = ResourceBank.Get("Art/Cards/Portraits/" + text); if (emission != null) { return emission; } - + emission = ResourceBank.Get("Art/Cards/GrimoraPortraits/" + text); if (emission != null) { diff --git a/InscryptionAPI/InscryptionAPIPlugin.cs b/InscryptionAPI/InscryptionAPIPlugin.cs index 866a6592..37e9613f 100644 --- a/InscryptionAPI/InscryptionAPIPlugin.cs +++ b/InscryptionAPI/InscryptionAPIPlugin.cs @@ -66,7 +66,7 @@ private void OnEnable() { Logger = base.Logger; Directory = Path.GetDirectoryName(Info.Location); - + HarmonyInstance.PatchAll(typeof(InscryptionAPIPlugin).Assembly); } @@ -127,7 +127,7 @@ private void Start() PeltManager.CreateDialogueEvents(); if (!DialogueManager.CustomDialogue.Exists(x => x.DialogueEvent.id == "Hint_NotEnoughSameColourGemsHint")) { - + } Logger.LogDebug($"Inserted {DialogueManager.CustomDialogue.Count} dialogue event(s)!"); } diff --git a/InscryptionAPI/Items/ConsumableItemManager.cs b/InscryptionAPI/Items/ConsumableItemManager.cs index 8f5c395a..a54a17bb 100644 --- a/InscryptionAPI/Items/ConsumableItemManager.cs +++ b/InscryptionAPI/Items/ConsumableItemManager.cs @@ -1,11 +1,9 @@ using DiskCardGame; -using HarmonyLib; using InscryptionAPI.Guid; using InscryptionAPI.Helpers; using InscryptionAPI.Helpers.Extensions; using InscryptionAPI.Items.Extensions; using InscryptionAPI.RuleBook; -using System.Collections; using System.Collections.ObjectModel; using System.Reflection; using UnityEngine; diff --git a/InscryptionAPI/Items/ConsumableItemPatches.cs b/InscryptionAPI/Items/ConsumableItemPatches.cs index ba56f41d..995fbcf5 100644 --- a/InscryptionAPI/Items/ConsumableItemPatches.cs +++ b/InscryptionAPI/Items/ConsumableItemPatches.cs @@ -1,15 +1,10 @@ using DiskCardGame; using HarmonyLib; -using InscryptionAPI.Boons; -using InscryptionAPI.Helpers; using InscryptionAPI.Items.Extensions; using InscryptionAPI.RuleBook; -using System; using System.Collections; -using System.Collections.Generic; using System.Reflection; using System.Reflection.Emit; -using System.Text; using UnityEngine; using static InscryptionAPI.Items.ConsumableItemManager; diff --git a/InscryptionAPI/Localizing/LocalizationManager.cs b/InscryptionAPI/Localizing/LocalizationManager.cs index 524e3b6f..269104ad 100644 --- a/InscryptionAPI/Localizing/LocalizationManager.cs +++ b/InscryptionAPI/Localizing/LocalizationManager.cs @@ -1,6 +1,6 @@ -using System.Text; using HarmonyLib; using InscryptionAPI.Guid; +using System.Text; using TMPro; using UnityEngine; @@ -16,7 +16,7 @@ public class CustomLanguage public string PathToStringTable; public Language Language; } - + public class CustomTranslation { public string PluginGUID; @@ -43,7 +43,7 @@ public enum FontReplacementType public static string[] AllLanguageNames = new string[] { }; public static string[] AllLanguageButtonText = new string[] { }; - + public static List AllLanguages = new(); public static List NewLanguages = new(); public static List CustomTranslations = new(); @@ -87,7 +87,7 @@ static LocalizationManager() } } - public static Language NewLanguage(string pluginGUID, string languageName, string code, string resetButtonText, string stringTablePath = null, List fontReplacements=null) + public static Language NewLanguage(string pluginGUID, string languageName, string code, string resetButtonText, string stringTablePath = null, List fontReplacements = null) { Language language = GuidManager.GetEnumValue(pluginGUID, languageName); CustomLanguage customLanguage = new() @@ -110,7 +110,7 @@ public static Language NewLanguage(string pluginGUID, string languageName, strin AddFontReplacement(language, replacement); } } - + return language; } @@ -125,7 +125,7 @@ public static void AddFontReplacement(Language language, FontReplacement replace }); return; } - + FontReplacementData.LanguageFontReplacements replacements = FontReplacementData.instance.languageFontReplacements.Find((a) => a.languages.Contains(language)); if (replacements == null) { @@ -165,23 +165,23 @@ public static FontReplacement GetFontReplacementForFont(FontReplacementType type InscryptionAPIPlugin.Logger.LogError("Unknown font replacement type: " + type.ToString().ToUpper()); return null; } - + if (replacement == null) { InscryptionAPIPlugin.Logger.LogError("Could not find font replacement for " + type.ToString().ToUpper()); return null; } - - replacement = UnityObject.Instantiate(replacement); + + replacement = UnityObject.Instantiate(replacement); if (font != null || tmpFont != null) { replacement.replacementFont = font; replacement.replacementTMPFont = tmpFont; } - + return replacement; } - + private static void ImportStringTable(string stringTablePath, Language language) { string lines = File.ReadAllText(stringTablePath); @@ -347,7 +347,7 @@ private static void InsertTranslation(CustomTranslation customTranslation) } } } - + /// /// Retrieves the LanguageCode for the given Language. /// @@ -358,7 +358,7 @@ public static string LanguageToCode(Language language) { return customLanguage.LanguageCode; } - + return null; } @@ -372,7 +372,7 @@ public static Language CodeToLanguage(string code) { return customLanguage.Language; } - + return Language.NUM_LANGUAGES; } @@ -412,7 +412,7 @@ public static void ExportAllToCSV() File.WriteAllText(path, stringBuilder.ToString()); InscryptionAPIPlugin.Logger.LogInfo($"Exported .csv file to {path}"); } - + [Obsolete("Use Translate() instead")] public static CustomTranslation New(string pluginGUID, string id, string englishString, string translatedString, Language language) { diff --git a/InscryptionAPI/Localizing/LocalizationManager_Patches.cs b/InscryptionAPI/Localizing/LocalizationManager_Patches.cs index 3ffe7d38..5f5e8c9c 100644 --- a/InscryptionAPI/Localizing/LocalizationManager_Patches.cs +++ b/InscryptionAPI/Localizing/LocalizationManager_Patches.cs @@ -1,7 +1,7 @@ -using System.Reflection; using DiskCardGame; using GBC; using HarmonyLib; +using System.Reflection; using UnityEngine; namespace InscryptionAPI.Localizing; @@ -26,21 +26,21 @@ private static void Localization_ReadCSVFileIntoTranslationData(Language languag OnLanguageLoaded?.Invoke(language); } - + [HarmonyPatch(typeof(Localization), nameof(Localization.TrySetToSystemLanguage))] [HarmonyPrefix] private static void Localization_TrySetToSystemLanguage() { foreach (CustomLanguage language in AllLanguages) { - if(language.LanguageName == Application.systemLanguage.ToString()) + if (language.LanguageName == Application.systemLanguage.ToString()) { Localization.CurrentLanguage = language.Language; return; } } } - + [HarmonyPatch(typeof(OptionsUI), nameof(OptionsUI.OnSetLanguageButtonPressed))] [HarmonyPrefix] private static bool OptionsUI_OnSetLanguageButtonPressed(OptionsUI __instance) @@ -49,7 +49,7 @@ private static bool OptionsUI_OnSetLanguageButtonPressed(OptionsUI __instance) Localization.CurrentLanguage = NewLanguages[(__instance.languageField.Value - (int)Language.NUM_LANGUAGES)].Language; else Localization.CurrentLanguage = (Language)__instance.languageField.Value; - + __instance.setLanguageButton.SetEnabled(enabled: false); Singleton.Instance.SetEnabled(enabled: false); CustomCoroutine.WaitThenExecute(0.1f, delegate @@ -88,7 +88,7 @@ private static void FontReplacementData_Initialize() [HarmonyPostfix] private static void OptionsUI_OnLanguageChanged(OptionsUI __instance, int newValue) { - int indexOf = AllLanguages.FindIndex((a)=>a.Language == Localization.CurrentLanguage); + int indexOf = AllLanguages.FindIndex((a) => a.Language == Localization.CurrentLanguage); __instance.setLanguageButton.gameObject.SetActive(newValue != indexOf); } @@ -98,29 +98,29 @@ private static bool OptionsUI_InitializeLanguageField(OptionsUI __instance) { __instance.languageField.AssignTextItems(new List(AllLanguageNames)); - int indexOf = AllLanguages.FindIndex((a)=>a.Language == Localization.CurrentLanguage); + int indexOf = AllLanguages.FindIndex((a) => a.Language == Localization.CurrentLanguage); __instance.languageField.ShowValue(indexOf, immediate: true); return false; } - + [HarmonyPatch(typeof(OptionsUI), nameof(OptionsUI.InitializeLanguageField))] [HarmonyPatch(typeof(OptionsUI), nameof(OptionsUI.OnLanguageChanged))] private static List Transpiler(IEnumerable instructions) { // LocalizedLanguageNames.NAMES // LocalizedLanguageNames.SET_LANGUAGE_BUTTON_TEXT - + // To - + // LocalizationManager.AllLanguageNames // LocalizationManager.AllLanguageButtonText - + FieldInfo NAMES = AccessTools.Field(typeof(LocalizedLanguageNames), nameof(LocalizedLanguageNames.NAMES)); FieldInfo SET_LANGUAGE_BUTTON_TEXT = AccessTools.Field(typeof(LocalizedLanguageNames), nameof(LocalizedLanguageNames.SET_LANGUAGE_BUTTON_TEXT)); - + FieldInfo NEW_NAMES = AccessTools.Field(typeof(LocalizationManager), nameof(LocalizationManager.AllLanguageNames)); FieldInfo NEW_SET_LANGUAGE_BUTTON_TEXT = AccessTools.Field(typeof(LocalizationManager), nameof(LocalizationManager.AllLanguageButtonText)); - + List codes = new List(instructions); for (int i = 0; i < codes.Count; i++) { diff --git a/InscryptionAPI/Pelts/Patches/TradePeltsSequencer_Patches.cs b/InscryptionAPI/Pelts/Patches/TradePeltsSequencer_Patches.cs index 1467fecb..363aa830 100644 --- a/InscryptionAPI/Pelts/Patches/TradePeltsSequencer_Patches.cs +++ b/InscryptionAPI/Pelts/Patches/TradePeltsSequencer_Patches.cs @@ -185,7 +185,7 @@ private static IEnumerable CapCreatedPeltCards(IEnumerable x.opcode == OpCodes.Callvirt && x.operand.ToString() == GetTradeCardInfos); int endIndex = codes.FindIndex(searchIndex, x => x.opcode == OpCodes.Stfld && x.operand.ToString() == Current); @@ -238,7 +238,7 @@ public static IEnumerator CentreCreateTradeCards(TradePeltsSequencer __instance, float anchorOffset = (4 - actualCardsPerRow) * (__instance.CARD_SPACING.x / 2f); Vector3 vector = __instance.CARDS_ANCHOR + new Vector3(anchorOffset + __instance.CARD_SPACING.x * num, 0f, __instance.CARD_SPACING.y * num2); - + // we treat this as a bool indicating whether there's 1 row or 2 if (rareCards) vector.z = -2f; diff --git a/InscryptionAPI/Pelts/PeltManager.cs b/InscryptionAPI/Pelts/PeltManager.cs index d4d0f951..cc35a9eb 100644 --- a/InscryptionAPI/Pelts/PeltManager.cs +++ b/InscryptionAPI/Pelts/PeltManager.cs @@ -2,7 +2,6 @@ using DiskCardGame; using InscryptionAPI.Dialogue; using InscryptionAPI.Guid; -using InscryptionAPI.Helpers; using Sirenix.Utilities; using System.Reflection; using UnityEngine; @@ -207,14 +206,17 @@ internal static void CreateDialogueEvents() string dialogueId = "TraderPelts" + name; if (!DialogueManager.CustomDialogue.Exists(x => x.DialogueEvent.id == dialogueId)) { - if (name.Contains("pelt") || name.Contains("pelt")) { + if (name.Contains("pelt") || name.Contains("pelt")) + { DialogueManager.GenerateEvent(InscryptionAPIPlugin.ModGUID, dialogueId, new() { name + "pelts..." } ); - } else { + } + else + { DialogueManager.GenerateEvent(InscryptionAPIPlugin.ModGUID, dialogueId, new() { @@ -229,10 +231,13 @@ internal static void CreateDialogueEvents() public static string GetTierNameFromPelt(string cardName) { string result = ""; - if (cardName.Contains("pelt") || cardName.Contains("pelt")) { + if (cardName.Contains("pelt") || cardName.Contains("pelt")) + { result = cardName.ToLowerInvariant().Replace("pelt", "").Replace("pelts", ""); result = result.Split('_').Last().ToTitleCase(); - } else { + } + else + { result = cardName.ToLowerInvariant(); result = result.Split('_').Last().ToTitleCase(); } diff --git a/InscryptionAPI/PixelCard/GBCPackManager.cs b/InscryptionAPI/PixelCard/GBCPackManager.cs index d56906bd..1bd4a287 100644 --- a/InscryptionAPI/PixelCard/GBCPackManager.cs +++ b/InscryptionAPI/PixelCard/GBCPackManager.cs @@ -1,14 +1,8 @@ using DiskCardGame; using GBC; using HarmonyLib; -using InscryptionAPI.Card; -using InscryptionAPI.Helpers; -using InscryptionAPI.Resource; -using Mono.Cecil; using System.Reflection; using System.Reflection.Emit; -using UnityEngine; -using UnityEngine.SceneManagement; namespace InscryptionAPI.PixelCard; diff --git a/InscryptionAPI/PixelCard/PixelCardManager.cs b/InscryptionAPI/PixelCard/PixelCardManager.cs index 292ff388..2b89df7a 100644 --- a/InscryptionAPI/PixelCard/PixelCardManager.cs +++ b/InscryptionAPI/PixelCard/PixelCardManager.cs @@ -3,10 +3,7 @@ using HarmonyLib; using InscryptionAPI.Card; using InscryptionAPI.Helpers; -using InscryptionAPI.Resource; -using Mono.Cecil; using System.Collections; -using System.Runtime.CompilerServices; using UnityEngine; using UnityEngine.SceneManagement; @@ -26,7 +23,7 @@ public class PixelDecalData public static PixelDecalData AddGBCDecal(string pluginGUID, string textureName, Texture2D texture) { - PixelDecalData result = new() + PixelDecalData result = new() { PluginGUID = pluginGUID, TextureName = textureName, @@ -34,7 +31,7 @@ public static PixelDecalData AddGBCDecal(string pluginGUID, string textureName, }; if (!CustomPixelDecals.Contains(result)) CustomPixelDecals.Add(result); - + return result; } internal static void Initialise() diff --git a/InscryptionAPI/Regions/Part1RegionData.cs b/InscryptionAPI/Regions/Part1RegionData.cs index ea357f79..0b977823 100644 --- a/InscryptionAPI/Regions/Part1RegionData.cs +++ b/InscryptionAPI/Regions/Part1RegionData.cs @@ -1,6 +1,6 @@ -using System.Reflection; using DiskCardGame; using InscryptionAPI.Guid; +using System.Reflection; namespace InscryptionAPI.Regions; @@ -20,12 +20,12 @@ public class Part1RegionData private int tier; private RegionData region; - + public Part1RegionData(RegionData region, int tier) { Assembly callingAssembly = Assembly.GetCallingAssembly(); GUID = TypeManager.GetModIdFromCallstack(callingAssembly); - + AllowSacrificableTerrainCards = false; AllowLockedTerrainCards = false; MinTerrain = -2; diff --git a/InscryptionAPI/Rulebook/PageTextInteractable.cs b/InscryptionAPI/Rulebook/PageTextInteractable.cs index dc969a3c..c6b15155 100644 --- a/InscryptionAPI/Rulebook/PageTextInteractable.cs +++ b/InscryptionAPI/Rulebook/PageTextInteractable.cs @@ -1,10 +1,4 @@ using DiskCardGame; -using InscryptionAPI.Card; -using InscryptionAPI.Nodes; -using System; -using System.Collections.Generic; -using System.Text; -using UnityEngine; namespace InscryptionAPI.RuleBook; diff --git a/InscryptionAPI/Rulebook/RuleBookManager.cs b/InscryptionAPI/Rulebook/RuleBookManager.cs index f748923d..f253299f 100644 --- a/InscryptionAPI/Rulebook/RuleBookManager.cs +++ b/InscryptionAPI/Rulebook/RuleBookManager.cs @@ -1,13 +1,6 @@ using DiskCardGame; -using HarmonyLib; -using InscryptionAPI.Card; -using InscryptionAPI.Guid; -using InscryptionAPI.Helpers; -using InscryptionAPI.Helpers.Extensions; using InscryptionAPI.Items.Extensions; -using System.Collections; using System.Collections.ObjectModel; -using System.Reflection; using UnityEngine; using static InscryptionAPI.Boons.BoonManager; using static InscryptionAPI.Slots.SlotModificationManager; @@ -23,7 +16,7 @@ public class RedirectInfo public Color redirectTextColour; public string redirectPageId; - public RedirectInfo (PageRangeType redirectType, Color redirectTextColour, string redirectPageId) + public RedirectInfo(PageRangeType redirectType, Color redirectTextColour, string redirectPageId) { this.redirectType = redirectType; this.redirectTextColour = redirectTextColour; @@ -112,7 +105,7 @@ public class FullRuleBookRangeInfo public int GetStartingNumber(List pages) => GetStartingNumberFunc(pages); public int GetInsertPosition(PageRangeInfo currentPageRange, List pages) => GetInsertPositionFunc(currentPageRange, pages); - public List CreatePages(RuleBookInfo instance, PageRangeInfo currentPageRange, AbilityMetaCategory metaCategory) => CreatePagesFunc(instance, currentPageRange,metaCategory); + public List CreatePages(RuleBookInfo instance, PageRangeInfo currentPageRange, AbilityMetaCategory metaCategory) => CreatePagesFunc(instance, currentPageRange, metaCategory); public void FillRuleBookPage(RuleBookPage instance, string pageId, params object[] otherArgs) => FillPageAction(instance, pageId, otherArgs); public FullRuleBookRangeInfo( @@ -148,7 +141,7 @@ public FullRuleBookRangeInfo Clone() public static List AllRuleBookInfos { get; private set; } public static event Func, List> ModifyRuleBookInfos; - + static RuleBookManager() { NewRuleBookInfos.CollectionChanged += static (_, _) => @@ -212,7 +205,7 @@ public static FullRuleBookRangeInfo New( Func, int> getInsertPositionFunc, Func> createPagesFunc) { - + FullRuleBookRangeInfo info = new( modGuid, pageType, headerPrefix, subsectionName, @@ -307,8 +300,8 @@ public static string GetUnformattedPageId(string pageId) /// Whether to offset the camera view down when opening the rulebook. public static void OpenToCustomPage(this RuleBookController instance, string pageId, bool offsetView = false) { - instance.SetShown(shown: true, offsetView); int pageIndex = -1; + instance.SetShown(shown: true, offsetView); if (pageId.StartsWith(RuleBookManagerPatches.API_ID)) pageIndex = instance.PageData.IndexOf(instance.PageData.Find(x => !string.IsNullOrEmpty(x.pageId) && x.pageId == pageId)); else diff --git a/InscryptionAPI/Rulebook/RuleBookRedirectManager.cs b/InscryptionAPI/Rulebook/RuleBookRedirectManager.cs index 7ed8b105..cbcf2201 100644 --- a/InscryptionAPI/Rulebook/RuleBookRedirectManager.cs +++ b/InscryptionAPI/Rulebook/RuleBookRedirectManager.cs @@ -1,12 +1,4 @@ using DiskCardGame; -using HarmonyLib; -using InscryptionAPI.Card; -using InscryptionAPI.Helpers.Extensions; -using Steamworks; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; using TMPro; using UnityEngine; @@ -267,7 +259,7 @@ private void CreateColliderSizeAndPosition(Transform textMesh, float sizeY, floa correctedYProportion = (descriptionTopLeft.y - wordPos.y) / descriptionLengths[1]; zCorrection = zLength * correctedYProportion; correctedY = currentPageTopLeft.y - (currentPageLengths[1] * correctedYProportion) - (zCorrection * correctedYProportion); - + } correctedPos = new(correctedX, correctedY, currentPageTopLeft.z + (zCorrection + zCorrection * correctedYProportion)); //Debug.Log($"[Corrected] ({correctedPos.x} {correctedPos.y} {correctedPos.z}) | {correctedXProportion} {correctedYProportion}"); diff --git a/InscryptionAPI/Rulebook/RulebookRedirectPatches.cs b/InscryptionAPI/Rulebook/RulebookRedirectPatches.cs index 53ef0fc6..0c5b9862 100644 --- a/InscryptionAPI/Rulebook/RulebookRedirectPatches.cs +++ b/InscryptionAPI/Rulebook/RulebookRedirectPatches.cs @@ -1,12 +1,6 @@ using DiskCardGame; using HarmonyLib; -using InscryptionAPI.Card; -using InscryptionAPI.Helpers.Extensions; -using System; using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using System.Text; using TMPro; using UnityEngine; diff --git a/InscryptionAPI/Saves/ModdedSaveData.cs b/InscryptionAPI/Saves/ModdedSaveData.cs index f1212528..cdb3437f 100644 --- a/InscryptionAPI/Saves/ModdedSaveData.cs +++ b/InscryptionAPI/Saves/ModdedSaveData.cs @@ -27,9 +27,9 @@ public T GetValueAsObject(string guid, string key) public bool TryGetGuidAndKey(string prefix, string enumValue, out string guid, out string key) { - foreach (KeyValuePair> pair in SaveData) + foreach (KeyValuePair> pair in SaveData) { - foreach (KeyValuePair valuePair in pair.Value) + foreach (KeyValuePair valuePair in pair.Value) { if (valuePair.Key.StartsWith(prefix, StringComparison.Ordinal)) { @@ -39,16 +39,16 @@ public bool TryGetGuidAndKey(string prefix, string enumValue, out string guid, o // to // guid: jamesgames.inscryption.starcraftcore // key: Abduct - string name = valuePair.Key.Substring(prefix.Length+1); + string name = valuePair.Key.Substring(prefix.Length + 1); int underscoreIndex = name.IndexOf('_'); guid = name.Substring(0, underscoreIndex); - key = name.Substring(underscoreIndex+1); + key = name.Substring(underscoreIndex + 1); return true; } } } } - + guid = null; key = null; return false; diff --git a/InscryptionAPI/Slots/SlotModificationBehaviour.cs b/InscryptionAPI/Slots/SlotModificationBehaviour.cs index 392addcf..06974afb 100644 --- a/InscryptionAPI/Slots/SlotModificationBehaviour.cs +++ b/InscryptionAPI/Slots/SlotModificationBehaviour.cs @@ -1,5 +1,5 @@ -using System.Collections; using DiskCardGame; +using System.Collections; namespace InscryptionAPI.Slots; diff --git a/InscryptionAPI/Slots/SlotModificationExtensions.cs b/InscryptionAPI/Slots/SlotModificationExtensions.cs index fe6872f8..ed6af50d 100644 --- a/InscryptionAPI/Slots/SlotModificationExtensions.cs +++ b/InscryptionAPI/Slots/SlotModificationExtensions.cs @@ -1,4 +1,3 @@ -using System.Collections; using DiskCardGame; using GBC; using HarmonyLib; @@ -6,8 +5,8 @@ using InscryptionAPI.Helpers; using InscryptionAPI.Helpers.Extensions; using InscryptionAPI.Saves; +using System.Collections; using UnityEngine; -using UnityEngine.UIElements; using static InscryptionAPI.Slots.SlotModificationManager; namespace InscryptionAPI.Slots; diff --git a/InscryptionAPI/Slots/SlotModificationGainAbilityBehaviour.cs b/InscryptionAPI/Slots/SlotModificationGainAbilityBehaviour.cs index 25ab4976..31bb3eab 100644 --- a/InscryptionAPI/Slots/SlotModificationGainAbilityBehaviour.cs +++ b/InscryptionAPI/Slots/SlotModificationGainAbilityBehaviour.cs @@ -1,5 +1,5 @@ -using System.Collections; using DiskCardGame; +using System.Collections; using UnityEngine; namespace InscryptionAPI.Slots; diff --git a/InscryptionAPI/Slots/SlotModificationInteractable.cs b/InscryptionAPI/Slots/SlotModificationInteractable.cs index e5fcc361..61a149d9 100644 --- a/InscryptionAPI/Slots/SlotModificationInteractable.cs +++ b/InscryptionAPI/Slots/SlotModificationInteractable.cs @@ -1,4 +1,3 @@ -using System.Collections; using DiskCardGame; namespace InscryptionAPI.Slots; diff --git a/InscryptionAPI/Slots/SlotModificationManager.cs b/InscryptionAPI/Slots/SlotModificationManager.cs index 307289b3..5e93078c 100644 --- a/InscryptionAPI/Slots/SlotModificationManager.cs +++ b/InscryptionAPI/Slots/SlotModificationManager.cs @@ -1,18 +1,12 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; using DiskCardGame; using GBC; using HarmonyLib; -using InscryptionAPI.Card; using InscryptionAPI.Guid; using InscryptionAPI.Helpers; -using InscryptionAPI.Helpers.Extensions; using InscryptionAPI.RuleBook; -using InscryptionAPI.Triggers; using Sirenix.Serialization.Utilities; +using System.Collections; +using System.Collections.ObjectModel; using UnityEngine; namespace InscryptionAPI.Slots; @@ -76,7 +70,7 @@ public class Info /// public ModificationType SharedRulebook { get; set; } = ModificationType.NoModification; public List MetaCategories = new(); - + /// /// The slot's modified texture in 3D scenes (Leshy, P03, etc) (154x226) /// @@ -552,7 +546,7 @@ private static void AddSlotModificationsToRuleBook(AbilityMetaCategory metaCateg int curPageNum = 1; PageRangeInfo itemPageRange = __instance.pageRanges.Find(x => x.type == PageRangeType.Items); - PageRangeInfo abilityRange = __instance.pageRanges.Find(x => x.type == PageRangeType.Abilities); + PageRangeInfo abilityRange = __instance.pageRanges.Find(x => x.type == PageRangeType.Abilities); GameObject pagePrefab = (itemPageRange ?? abilityRange).rangePrefab; int insertPosition = __result.FindLastIndex(rbi => pagePrefab) + 1; foreach (Info slot in infos) @@ -654,7 +648,7 @@ private static bool OverrideWithSlotInfo(AbilityPage __instance, string headerTe { InscryptionAPIPlugin.Logger.LogDebug("Slot modification page: WIP"); } - + __instance.mainAbilityGroup.iconRenderer.transform.localScale = new(0.8f, 0.8f, 1f); //InscryptionAPIPlugin.Logger.LogDebug($"Create rulebook page for slot modification [{info.ModificationType}] ({info.RulebookName})."); return false; diff --git a/InscryptionAPI/Totems/TotemManager.cs b/InscryptionAPI/Totems/TotemManager.cs index ab1679fe..0bb4dab3 100644 --- a/InscryptionAPI/Totems/TotemManager.cs +++ b/InscryptionAPI/Totems/TotemManager.cs @@ -17,7 +17,7 @@ internal enum TotemTopState CustomTribes, AllTribes } - + #region Patches [HarmonyPatch(typeof(BuildTotemSequencer), "GenerateTotemChoices", new Type[] { typeof(BuildTotemNodeData), typeof(int) })] private class ItemsUtil_AllConsumables @@ -76,13 +76,13 @@ public static IEnumerable Transpiler(IEnumerable list) { list.AddRange(TribeManager.NewTribes.Where(x => x.tribeChoice).Select(x => x.tribe)); InscryptionAPIPlugin.Logger.LogDebug($"Total Tribes: {list.Count}"); - + List cardsWithTribes = CardManager.AllCardsCopy.FindAll(x => x.tribes.Count > 0); list.RemoveAll(x => !cardsWithTribes.Exists(ci => ci.IsOfTribe(x))); @@ -158,7 +158,7 @@ private static bool Prefix(TotemTopData __instance, ref string __result) return true; } } - + /// /// If someone added a mod with sigils then removed the mod. They have learned the ability but it no longer exists. /// This breaks the new totem sequence because it's not checking if the ability info exists. diff --git a/InscryptionAPI/Triggers/CustomTriggerFinder.cs b/InscryptionAPI/Triggers/CustomTriggerFinder.cs index 50cc73c3..87c9d094 100644 --- a/InscryptionAPI/Triggers/CustomTriggerFinder.cs +++ b/InscryptionAPI/Triggers/CustomTriggerFinder.cs @@ -1,8 +1,8 @@ -using System.Collections; using DiskCardGame; using InscryptionAPI.Card; using InscryptionAPI.Slots; using Sirenix.Serialization.Utilities; +using System.Collections; namespace InscryptionAPI.Triggers; diff --git a/InscryptionAPI/Triggers/CustomTriggerPatches.cs b/InscryptionAPI/Triggers/CustomTriggerPatches.cs index ba4b309d..beac3fed 100644 --- a/InscryptionAPI/Triggers/CustomTriggerPatches.cs +++ b/InscryptionAPI/Triggers/CustomTriggerPatches.cs @@ -1,9 +1,7 @@ using DiskCardGame; using HarmonyLib; -using InscryptionAPI.Helpers.Extensions; using InscryptionAPI.Slots; using System.Collections; -using System.ComponentModel; using System.Reflection; using System.Reflection.Emit; using UnityEngine; diff --git a/InscryptionAPI/Triggers/DoCombatPhasePatches.cs b/InscryptionAPI/Triggers/DoCombatPhasePatches.cs index 66c0386f..2f44d051 100644 --- a/InscryptionAPI/Triggers/DoCombatPhasePatches.cs +++ b/InscryptionAPI/Triggers/DoCombatPhasePatches.cs @@ -1,6 +1,5 @@ using DiskCardGame; using HarmonyLib; -using InscryptionAPI.Helpers; using InscryptionAPI.Helpers.Extensions; using System.Collections; using System.Reflection; @@ -68,10 +67,10 @@ public static List ModifyAttackingSlots(bool playerIsAttacker) { List originalSlots = BoardManager.Instance.GetSlotsCopy(playerIsAttacker); List currentSlots = new(originalSlots); - + var triggers = CustomTriggerFinder.FindTriggersOnBoard(false).ToList(); triggers.Sort((IGetAttackingSlots a, IGetAttackingSlots b) => b.TriggerPriority(playerIsAttacker, originalSlots) - a.TriggerPriority(playerIsAttacker, originalSlots)); - + foreach (IGetAttackingSlots t in triggers) { if ((t as TriggerReceiver) != null && t.RespondsToGetAttackingSlots(playerIsAttacker, originalSlots, currentSlots)) diff --git a/InscryptionAPI/Triggers/Interfaces.cs b/InscryptionAPI/Triggers/Interfaces.cs index 30714e18..10a920ad 100644 --- a/InscryptionAPI/Triggers/Interfaces.cs +++ b/InscryptionAPI/Triggers/Interfaces.cs @@ -1,6 +1,5 @@ using DiskCardGame; using System.Collections; -using UnityEngine; namespace InscryptionAPI.Triggers; diff --git a/InscryptionAPI/Triggers/SlotAttackSlotPatches.cs b/InscryptionAPI/Triggers/SlotAttackSlotPatches.cs index ef47e9ef..0d74b35e 100644 --- a/InscryptionAPI/Triggers/SlotAttackSlotPatches.cs +++ b/InscryptionAPI/Triggers/SlotAttackSlotPatches.cs @@ -45,7 +45,7 @@ public static int DamageToDealThisPhase(CardSlot attackingSlot, CardSlot opposin // Trigger IModifyDirectDamage first and treat the new damage as the attacking card's attack var modifyDirectDamage = CustomTriggerFinder.FindGlobalTriggers(true).ToList(); - modifyDirectDamage.Sort((a, b) => + modifyDirectDamage.Sort((a, b) => b.TriggerPriority(opposingSlot, damage, attackingSlot.Card) - a.TriggerPriority(opposingSlot, damage, attackingSlot.Card) ); @@ -53,7 +53,7 @@ public static int DamageToDealThisPhase(CardSlot attackingSlot, CardSlot opposin foreach (var modify in modifyDirectDamage) { if (modify.RespondsToModifyDirectDamage(opposingSlot, damage, attackingSlot.Card, originalDamage)) - damage = modify.OnModifyDirectDamage(opposingSlot, damage, attackingSlot.Card, originalDamage); + damage = modify.OnModifyDirectDamage(opposingSlot, damage, attackingSlot.Card, originalDamage); } // first thing we check for is self-damage; if the attacking slot is on the same side as the opposing slot, deal self-damage @@ -157,7 +157,7 @@ private static bool OpposingCardNullCheck(List codes, int i) } } } - + return false; } @@ -188,13 +188,13 @@ private static bool ModifyDirectDamageCheck(List codes, ref int if (op_DisplayClass == null && codes[i].operand?.ToString() == name_CombatPhase) { op_DisplayClass = codes[i].operand; - op_AttackingSlot = codes[i+1].operand; + op_AttackingSlot = codes[i + 1].operand; break; } } int j = startIndex; - + // CustomFields.Set(this.CombatPhase.AttackingSlot.Card, "modifiedAttack", DamageToDealThisPhase(this.CombatPhase.AttackingSlot, this.OpposingSlot)); codes.Insert(j++, new(OpCodes.Ldarg_0)); codes.Insert(j++, new(OpCodes.Ldfld, op_DisplayClass)); @@ -213,9 +213,9 @@ private static bool ModifyDirectDamageCheck(List codes, ref int index = j; // replace the next 2 occurances of get_Attack() with the custom field call - for (int c = 0; c < 2; c++) + for (int c = 0; c < 2; c++) { - for (; j < codes.Count; j++) + for (; j < codes.Count; j++) { if (codes[j].opcode != OpCodes.Callvirt || codes[j].operand.ToString() != name_GetAttack) continue; diff --git a/InscryptionAPI/Triggers/TakeDamagePatches.cs b/InscryptionAPI/Triggers/TakeDamagePatches.cs index 3dce8d36..21a1e7b3 100644 --- a/InscryptionAPI/Triggers/TakeDamagePatches.cs +++ b/InscryptionAPI/Triggers/TakeDamagePatches.cs @@ -1,13 +1,9 @@ using DiskCardGame; using HarmonyLib; using InscryptionAPI.Card; -using InscryptionAPI.Helpers; -using InscryptionAPI.Helpers.Extensions; -using Sirenix.Serialization.Utilities; using System.Collections; using System.Reflection; using System.Reflection.Emit; -using UnityEngine; namespace InscryptionAPI.Triggers; @@ -47,7 +43,7 @@ private static bool AddModifyDamageTrigger(PlayableCard __instance, ref int dama foreach (IModifyDamageTaken modify in modifyTakeDamage) { if (modify != null && modify.RespondsToModifyDamageTaken(__instance, damage, attacker, originalDamage)) - damage = modify.OnModifyDamageTaken(__instance, damage, attacker, originalDamage); + damage = modify.OnModifyDamageTaken(__instance, damage, attacker, originalDamage); } // no negative damage @@ -68,7 +64,7 @@ private static IEnumerator AddTakeDamageTriggers(IEnumerator enumerator, Playabl yield return enumerator; if (__instance == null) yield break; - + if (!__instance.HasShield() && attacker != null) { yield return CustomTriggerFinder.TriggerInHand( @@ -94,7 +90,7 @@ private static IEnumerable TakeDamageTranspiler(IEnumerable masterTextures; - + int bloodCost = playableCard?.BloodCost() ?? cardInfo.BloodCost; int bonesCost = playableCard?.BonesCost() ?? cardInfo.BonesCost; int energyCost = playableCard?.EnergyCost ?? cardInfo.EnergyCost; diff --git a/InscryptionCommunityPatch/Card/HiddenCharIndexFIx.cs b/InscryptionCommunityPatch/Card/HiddenCharIndexFIx.cs index 58250b1f..e402a590 100644 --- a/InscryptionCommunityPatch/Card/HiddenCharIndexFIx.cs +++ b/InscryptionCommunityPatch/Card/HiddenCharIndexFIx.cs @@ -1,8 +1,5 @@ using DiskCardGame; -using GBC; using HarmonyLib; -using System.Collections; -using UnityEngine; namespace InscryptionCommunityPatch.Card; diff --git a/InscryptionCommunityPatch/Card/Part1CardCostRender.cs b/InscryptionCommunityPatch/Card/Part1CardCostRender.cs index 1201081f..dccb04f3 100644 --- a/InscryptionCommunityPatch/Card/Part1CardCostRender.cs +++ b/InscryptionCommunityPatch/Card/Part1CardCostRender.cs @@ -1,11 +1,8 @@ using DiskCardGame; -using GBC; -using HarmonyLib; using InscryptionAPI.Card; using InscryptionAPI.CardCosts; //using InscryptionAPI.CardCosts; using InscryptionAPI.Helpers; -using System.Linq; using UnityEngine; namespace InscryptionCommunityPatch.Card; diff --git a/InscryptionCommunityPatch/Card/Part2CardCostRender.cs b/InscryptionCommunityPatch/Card/Part2CardCostRender.cs index e70d9847..b6e3727c 100644 --- a/InscryptionCommunityPatch/Card/Part2CardCostRender.cs +++ b/InscryptionCommunityPatch/Card/Part2CardCostRender.cs @@ -1,7 +1,5 @@ using DiskCardGame; using GBC; -using HarmonyLib; -using InscryptionAPI; using InscryptionAPI.Card; using InscryptionAPI.CardCosts; using InscryptionAPI.Helpers; @@ -18,7 +16,7 @@ public static class Part2CardCostRender { public static event Action> UpdateCardCost; public static event Action> UpdateVanillaCardCost; // 24 x 13 - + public static bool RightAct2Cost => PatchPlugin.rightAct2Cost.Value; public static Sprite FinalVanillaCostSprite( diff --git a/InscryptionCommunityPatch/Card/Part3CardCostRender.cs b/InscryptionCommunityPatch/Card/Part3CardCostRender.cs index e9d7ab0f..b9946063 100644 --- a/InscryptionCommunityPatch/Card/Part3CardCostRender.cs +++ b/InscryptionCommunityPatch/Card/Part3CardCostRender.cs @@ -1,10 +1,10 @@ -using System.Runtime.CompilerServices; using DiskCardGame; using HarmonyLib; using InscryptionAPI.Card; using InscryptionAPI.CardCosts; using InscryptionAPI.Helpers; using Sirenix.Serialization.Utilities; +using System.Runtime.CompilerServices; using UnityEngine; namespace InscryptionCommunityPatch.Card; diff --git a/InscryptionCommunityPatch/Card/PixelCurrentDeckPatch.cs b/InscryptionCommunityPatch/Card/PixelCurrentDeckPatch.cs index 4d253ff3..26e7357e 100644 --- a/InscryptionCommunityPatch/Card/PixelCurrentDeckPatch.cs +++ b/InscryptionCommunityPatch/Card/PixelCurrentDeckPatch.cs @@ -1,8 +1,5 @@ using DiskCardGame; -using GBC; using HarmonyLib; -using System.Collections; -using UnityEngine; namespace InscryptionCommunityPatch.Card; diff --git a/InscryptionCommunityPatch/Card/StackAbilityIcons.cs b/InscryptionCommunityPatch/Card/StackAbilityIcons.cs index 95d25e93..2f8277a4 100644 --- a/InscryptionCommunityPatch/Card/StackAbilityIcons.cs +++ b/InscryptionCommunityPatch/Card/StackAbilityIcons.cs @@ -1,12 +1,9 @@ using DiskCardGame; using GBC; -using GracesGames.Common.Scripts; using HarmonyLib; using InscryptionAPI.Card; using InscryptionAPI.Helpers; -using InscryptionAPI.Helpers.Extensions; using UnityEngine; -using UnityEngine.UIElements; namespace InscryptionCommunityPatch.Card; @@ -336,7 +333,7 @@ private static void AddIconNumber(Ability ability, CardInfo info, PlayableCard c if (ai.IsShieldAbility()) count = card.GetShieldBehaviour(ability)?.NumShields; } - + count ??= baseAbilities.Count(ab => ab == ability); //PatchPlugin.Logger.LogDebug($"[{AbilitiesUtil.GetInfo(ability).rulebookName}] {count} {baseAbilities.Count}"); diff --git a/InscryptionCommunityPatch/Card/TempModDecalsFix.cs b/InscryptionCommunityPatch/Card/TempModDecalsFix.cs index 28775a4a..8fb0cc47 100644 --- a/InscryptionCommunityPatch/Card/TempModDecalsFix.cs +++ b/InscryptionCommunityPatch/Card/TempModDecalsFix.cs @@ -1,5 +1,4 @@ using DiskCardGame; -using GBC; using HarmonyLib; using InscryptionAPI.Card; using System.Collections; diff --git a/InscryptionCommunityPatch/Card/TempModPixelSigilsFix.cs b/InscryptionCommunityPatch/Card/TempModPixelSigilsFix.cs index 971913db..fe23143d 100644 --- a/InscryptionCommunityPatch/Card/TempModPixelSigilsFix.cs +++ b/InscryptionCommunityPatch/Card/TempModPixelSigilsFix.cs @@ -1,7 +1,6 @@ using DiskCardGame; using GBC; using HarmonyLib; -using InscryptionAPI.Card; using System.Reflection; using System.Reflection.Emit; @@ -38,7 +37,7 @@ public static List RenderTemporarySigils(CardInfo info, PlayableCard ca List abilities = new(info.Abilities); List tempAbilities = new(); - + foreach (CardModificationInfo mod in card.RenderInfo.temporaryMods) { if (mod.singletonId != "paint") // ignore abilities added by Magnificus diff --git a/InscryptionCommunityPatch/Card/Vanilla Ability Patches/Act2ShapeshifterPatches.cs b/InscryptionCommunityPatch/Card/Vanilla Ability Patches/Act2ShapeshifterPatches.cs index 41f5f7d4..d06f1df6 100644 --- a/InscryptionCommunityPatch/Card/Vanilla Ability Patches/Act2ShapeshifterPatches.cs +++ b/InscryptionCommunityPatch/Card/Vanilla Ability Patches/Act2ShapeshifterPatches.cs @@ -1,9 +1,7 @@ using DiskCardGame; using GBC; using HarmonyLib; -using InscryptionAPI.Card; using InscryptionAPI.Dialogue; -using InscryptionAPI.Helpers; using System.Collections; using System.Reflection; using System.Reflection.Emit; diff --git a/InscryptionCommunityPatch/Card/Vanilla Ability Patches/DrawCopyOnDeathFix.cs b/InscryptionCommunityPatch/Card/Vanilla Ability Patches/DrawCopyOnDeathFix.cs index b3028f91..6306ba7c 100644 --- a/InscryptionCommunityPatch/Card/Vanilla Ability Patches/DrawCopyOnDeathFix.cs +++ b/InscryptionCommunityPatch/Card/Vanilla Ability Patches/DrawCopyOnDeathFix.cs @@ -1,8 +1,5 @@ using DiskCardGame; using HarmonyLib; -using InscryptionAPI.Card; -using System.Collections; -using UnityEngine; namespace InscryptionCommunityPatch.Card; diff --git a/InscryptionCommunityPatch/Card/Vanilla Ability Patches/DrawNewHand3DFixes.cs b/InscryptionCommunityPatch/Card/Vanilla Ability Patches/DrawNewHand3DFixes.cs index 4a2612ae..c905adc0 100644 --- a/InscryptionCommunityPatch/Card/Vanilla Ability Patches/DrawNewHand3DFixes.cs +++ b/InscryptionCommunityPatch/Card/Vanilla Ability Patches/DrawNewHand3DFixes.cs @@ -1,6 +1,5 @@ using DiskCardGame; using HarmonyLib; -using InscryptionAPI.Helpers; using System.Collections; using System.Reflection; using System.Reflection.Emit; diff --git a/InscryptionCommunityPatch/Card/Vanilla Ability Patches/SniperFix.cs b/InscryptionCommunityPatch/Card/Vanilla Ability Patches/SniperFix.cs index 6f68ecf9..1539c78e 100644 --- a/InscryptionCommunityPatch/Card/Vanilla Ability Patches/SniperFix.cs +++ b/InscryptionCommunityPatch/Card/Vanilla Ability Patches/SniperFix.cs @@ -2,7 +2,6 @@ using HarmonyLib; using InscryptionAPI.Helpers.Extensions; using System.Collections; -using System.Linq.Expressions; using UnityEngine; namespace InscryptionCommunityPatch.Card; diff --git a/InscryptionCommunityPatch/PixelTutor/PixelPlayableCardArray.cs b/InscryptionCommunityPatch/PixelTutor/PixelPlayableCardArray.cs index 2f9729a9..126f3a71 100644 --- a/InscryptionCommunityPatch/PixelTutor/PixelPlayableCardArray.cs +++ b/InscryptionCommunityPatch/PixelTutor/PixelPlayableCardArray.cs @@ -1,9 +1,7 @@ using DiskCardGame; using GBC; -using InscryptionAPI; using InscryptionAPI.Helpers; using InscryptionAPI.Helpers.Extensions; -using InscryptionCommunityPatch.Card; using Pixelplacement; using Sirenix.Utilities; using System.Collections; @@ -95,7 +93,7 @@ public IEnumerator SelectPixelCardFrom( } InitializeGamepadGrid(); - + yield return SpawnAndPlaceCards(cards, GetNumRows(cards.Count), 0, false, forPositiveEffect); InitialiseButtons(cards, false, forPositiveEffect); diff --git a/InscryptionCommunityPatch/ResourceManagers/ActOneEnergyDrone.cs b/InscryptionCommunityPatch/ResourceManagers/ActOneEnergyDrone.cs index dd95f551..0f7fe52f 100644 --- a/InscryptionCommunityPatch/ResourceManagers/ActOneEnergyDrone.cs +++ b/InscryptionCommunityPatch/ResourceManagers/ActOneEnergyDrone.cs @@ -44,7 +44,7 @@ public static bool SceneCanHaveEnergyDrone(string sceneName) string activeSceneName = sceneName.ToLowerInvariant(); if (activeSceneName.Contains("part1")) return !activeSceneName.Contains("sanctum") && !activeSceneName.Contains("finale"); - + return activeSceneName.Contains("magnificus") || activeSceneName.Contains("grimora"); } diff --git a/InscryptionCommunityPatch/ResourceManagers/ActThreeBonesDisplayer.cs b/InscryptionCommunityPatch/ResourceManagers/ActThreeBonesDisplayer.cs index e1f61c4f..0d962fb1 100644 --- a/InscryptionCommunityPatch/ResourceManagers/ActThreeBonesDisplayer.cs +++ b/InscryptionCommunityPatch/ResourceManagers/ActThreeBonesDisplayer.cs @@ -1,10 +1,10 @@ -using System.Collections; -using System.Runtime.CompilerServices; using DiskCardGame; using HarmonyLib; using InscryptionAPI.Card; using InscryptionCommunityPatch.Card; using Pixelplacement; +using System.Collections; +using System.Runtime.CompilerServices; using UnityEngine; using UnityEngine.SceneManagement; diff --git a/InscryptionCommunityPatch/Sequencers/BuyPeltsSmallTags.cs b/InscryptionCommunityPatch/Sequencers/BuyPeltsSmallTags.cs index 3d3038b6..b74bab35 100644 --- a/InscryptionCommunityPatch/Sequencers/BuyPeltsSmallTags.cs +++ b/InscryptionCommunityPatch/Sequencers/BuyPeltsSmallTags.cs @@ -1,10 +1,5 @@ using DiskCardGame; using HarmonyLib; -using InscryptionAPI.Card; -using Pixelplacement; -using System.Collections; -using System.Reflection; -using System.Reflection.Emit; using UnityEngine; namespace InscryptionCommunityPatch.Sequencers; diff --git a/InscryptionCommunityPatch/Sequencers/CardCostChoiceNodePatch.cs b/InscryptionCommunityPatch/Sequencers/CardCostChoiceNodePatch.cs index 99550760..2451696b 100644 --- a/InscryptionCommunityPatch/Sequencers/CardCostChoiceNodePatch.cs +++ b/InscryptionCommunityPatch/Sequencers/CardCostChoiceNodePatch.cs @@ -1,7 +1,6 @@ using DiskCardGame; using HarmonyLib; using InscryptionAPI.Helpers; -using System.Collections; using UnityEngine; namespace InscryptionCommunityPatch.Sequencers; diff --git a/InscryptionCommunityPatch/Sequencers/LeshyResetRedEyes.cs b/InscryptionCommunityPatch/Sequencers/LeshyResetRedEyes.cs index e3645615..0e9f940b 100644 --- a/InscryptionCommunityPatch/Sequencers/LeshyResetRedEyes.cs +++ b/InscryptionCommunityPatch/Sequencers/LeshyResetRedEyes.cs @@ -1,11 +1,6 @@ using DiskCardGame; using HarmonyLib; -using InscryptionAPI.Card; -using Pixelplacement; using System.Collections; -using System.Reflection; -using System.Reflection.Emit; -using UnityEngine; namespace InscryptionCommunityPatch.Sequencers; diff --git a/InscryptionCommunityPatch/Sequencers/PackRatNodeBackgroundFix.cs b/InscryptionCommunityPatch/Sequencers/PackRatNodeBackgroundFix.cs index 0efb2d09..0cdd0a8f 100644 --- a/InscryptionCommunityPatch/Sequencers/PackRatNodeBackgroundFix.cs +++ b/InscryptionCommunityPatch/Sequencers/PackRatNodeBackgroundFix.cs @@ -1,12 +1,6 @@ using DiskCardGame; using HarmonyLib; -using InscryptionAPI.Helpers; -using InscryptionCommunityPatch.Card; -using Pixelplacement; -using System.Collections; -using System.Reflection; using System.Reflection.Emit; -using UnityEngine; namespace InscryptionCommunityPatch.Sequencers; @@ -18,7 +12,7 @@ internal class PackRatNodeBackgroundFix private static IEnumerable FixRareBackground(IEnumerable instructions) { List codes = new(instructions); - + // a part of the code block we want to remove can't be removed without breaking the ienum // so we cut around it for (int i = 0; i < codes.Count; i++) diff --git a/InscryptionCommunityPatch/Sequencers/TradeableTalkingCardFix.cs b/InscryptionCommunityPatch/Sequencers/TradeableTalkingCardFix.cs index e7ed5c59..9dadc5ff 100644 --- a/InscryptionCommunityPatch/Sequencers/TradeableTalkingCardFix.cs +++ b/InscryptionCommunityPatch/Sequencers/TradeableTalkingCardFix.cs @@ -1,10 +1,7 @@ using DiskCardGame; using HarmonyLib; -using InscryptionAPI.Card; using Pixelplacement; using System.Collections; -using System.Reflection; -using System.Reflection.Emit; using UnityEngine; namespace InscryptionCommunityPatch.Sequencers; diff --git a/InscryptionCommunityPatch/Tests/TestCost.cs b/InscryptionCommunityPatch/Tests/TestCost.cs index 3e1a8989..c0b2b896 100644 --- a/InscryptionCommunityPatch/Tests/TestCost.cs +++ b/InscryptionCommunityPatch/Tests/TestCost.cs @@ -1,11 +1,9 @@ using DiskCardGame; using InscryptionAPI; -using InscryptionAPI.Boons; using InscryptionAPI.CardCosts; using InscryptionAPI.Helpers; using InscryptionCommunityPatch.Card; using System.Collections; -using TMPro; using UnityEngine; namespace InscryptionCommunityPatch.Tests; @@ -16,7 +14,7 @@ public class TestCost : CustomCardCost public static void Init() { PatchPlugin.Logger.LogDebug("Adding TestCost"); - + CardCostManager.Register(InscryptionAPIPlugin.ModGUID, "TestCost", typeof(TestCost), Texture3D, TexturePixel) .SetCostTier(CostTier) .SetCanBePlayedByTurn2WithHand(CanBePlayed) From ab5665742444afb7a57b5f199cea394d90ef0a5b Mon Sep 17 00:00:00 2001 From: WhistleWind Date: Fri, 14 Feb 2025 23:05:12 -0800 Subject: [PATCH 08/10] Update Upload artifact to v4 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 62b38921..7e326466 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,7 +28,7 @@ jobs: unzip build/* -d out - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: InscryptionAPI path: out/ From e8658a670c6e4fed9784f8f0c9015b24185abfbf Mon Sep 17 00:00:00 2001 From: WhistleWind Date: Tue, 18 Feb 2025 21:58:28 -0800 Subject: [PATCH 09/10] Additional extensions --- .../Extensions/BoardManagerExtensions.cs | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/InscryptionAPI/Helpers/Extensions/BoardManagerExtensions.cs b/InscryptionAPI/Helpers/Extensions/BoardManagerExtensions.cs index c27433e4..19e94781 100644 --- a/InscryptionAPI/Helpers/Extensions/BoardManagerExtensions.cs +++ b/InscryptionAPI/Helpers/Extensions/BoardManagerExtensions.cs @@ -39,6 +39,16 @@ public static List GetCards( Predicate filterOnPredicate = null ) => manager.GetSlotsCopy(getPlayerCards).SelectCards(filterOnPredicate).ToList(); + /// + /// Retrieve all cards on the board that match the predicate, if given. + /// + /// Manager instance to access. + /// The predicate to filter on each card. + /// The list of relevant cards on the board. + public static List GetCards(this BoardManager manager, Predicate filterOnPredicate = null) + => manager.AllSlotsCopy.SelectCards(filterOnPredicate).ToList(); + + /// /// Retrieve all player slots that are not occupied by a card. /// @@ -74,6 +84,17 @@ public static List GetOpenSlots( Predicate filterOnPredicate = null ) => manager.GetSlotsCopy(getPlayerSlots).SelectOpenSlots(filterOnPredicate).ToList(); + /// + /// Retrieve all slots on the board that are not occupied by a card. + /// + /// Manager instance to access. + /// The predicate to filter on each slot. + /// The list of relevant card slots with no cards. + public static List GetOpenSlots( + this BoardManager manager, + Predicate filterOnPredicate = null + ) => manager.AllSlotsCopy.SelectOpenSlots(filterOnPredicate).ToList(); + /// /// Retrieve a copy of the board slots for the player or opponent's side of the board. /// @@ -84,7 +105,6 @@ public static List GetOpenSlots( public static List GetSlotsCopy(this BoardManager manager, bool getPlayerSlotsCopy) => getPlayerSlotsCopy ? manager.PlayerSlotsCopy : manager.OpponentSlotsCopy; - /// /// Retrieve all player or opponent card slots on the board. /// From 72c6f88e2de412ce5dffa7f9a2723d654065c615 Mon Sep 17 00:00:00 2001 From: WhistleWind Date: Wed, 19 Feb 2025 15:13:23 -0800 Subject: [PATCH 10/10] New PostCardGettingAttacked trigger, rewrote SlotAttackSlot transpilers, bumped version to 2.23.0 --- CHANGELOG.md | 5 +- InscryptionAPI/InscryptionAPI.csproj | 2 +- InscryptionAPI/InscryptionAPIPlugin.cs | 2 +- InscryptionAPI/Triggers/Interfaces.cs | 10 + .../Triggers/SlotAttackSlotPatches.cs | 339 +++++++----------- .../InscryptionCommunityPatch.csproj | 2 +- 6 files changed, 155 insertions(+), 205 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33b82dee..89d00a9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ -# 2.22.4 +# 2.23.0 - Added 'GBC Vanilla Render' config to community patches (false by default) - makes GBC cards render with vanilla cost sprites - Added 'Vanilla Stacking' config to community patches (false by default) - renders cards with only two (stacking) sigils as they appear in vanilla, eg Spore Mice and Sporedigger +- Added PostCardGettingAttacked custom trigger +- Added BoardManager.GetCards and BoardManager.GetOpenSlots overloads that retrieve from the entire board - Fixed incorrect rulebook icon scaling in Act 3 - Fixed rulebook-related null errors when playing during Magnificus' Act - Fixed slot modification rulebook pages not appearing correctly during Magnificus' Act @@ -8,6 +10,7 @@ - DamageShieldBehaviour class now has 'initialised' boolean field - Highest displayable bone cost value in Act 1 raised from 13+ to 15+ - Minor tweaks to blood and bone cost icons +- Rewrote SlotAttackSlotPatches transpilers to be cleaner # 2.22.3 - Fixed pelt names when a user goes to the trader with modded cards, Examples shown below. diff --git a/InscryptionAPI/InscryptionAPI.csproj b/InscryptionAPI/InscryptionAPI.csproj index 2b4e87ed..44ac6e8e 100644 --- a/InscryptionAPI/InscryptionAPI.csproj +++ b/InscryptionAPI/InscryptionAPI.csproj @@ -10,7 +10,7 @@ full false true - 2.22.4 + 2.23.0 diff --git a/InscryptionAPI/InscryptionAPIPlugin.cs b/InscryptionAPI/InscryptionAPIPlugin.cs index 37e9613f..ffeadde4 100644 --- a/InscryptionAPI/InscryptionAPIPlugin.cs +++ b/InscryptionAPI/InscryptionAPIPlugin.cs @@ -30,7 +30,7 @@ public class InscryptionAPIPlugin : BaseUnityPlugin { public const string ModGUID = "cyantist.inscryption.api"; public const string ModName = "InscryptionAPI"; - public const string ModVer = "2.22.4"; + public const string ModVer = "2.23.0"; public static string Directory = ""; diff --git a/InscryptionAPI/Triggers/Interfaces.cs b/InscryptionAPI/Triggers/Interfaces.cs index 10a920ad..1fdf8dee 100644 --- a/InscryptionAPI/Triggers/Interfaces.cs +++ b/InscryptionAPI/Triggers/Interfaces.cs @@ -819,6 +819,16 @@ public interface IShieldPreventedDamageInHand public IEnumerator OnShieldPreventedDamageInHand(PlayableCard target, int damage, PlayableCard attacker); public int ShieldPreventedDamageInHandPriority(PlayableCard target, int damage, PlayableCard attacker); } +/// +/// Expanded version of CardGettingAttacked trigger, executed before it, that includes the attacker as an argument +/// +public interface IPostCardGettingAttacked +{ + public bool RespondsToPostCardGettingAttacked(PlayableCard target, PlayableCard attacker); + public IEnumerator OnPostCardGettingAttacked(PlayableCard target, PlayableCard attacker); + public int PostCardGettingAttackedPriority(PlayableCard target, PlayableCard attacker); +} + /*public interface IOnPreTakeDamageFromHammer { public bool RespondsToPreTakeDamageFromHammer(HammerItem hammer, CardSlot targetSlot, GameObject firstPersonItem); diff --git a/InscryptionAPI/Triggers/SlotAttackSlotPatches.cs b/InscryptionAPI/Triggers/SlotAttackSlotPatches.cs index 0d74b35e..79111558 100644 --- a/InscryptionAPI/Triggers/SlotAttackSlotPatches.cs +++ b/InscryptionAPI/Triggers/SlotAttackSlotPatches.cs @@ -21,36 +21,23 @@ public static class SlotAttackSlotPatches private const string name_AttackingSlot = "DiskCardGame.CardSlot attackingSlot"; private const string name_CanAttackDirectly = "Boolean CanAttackDirectly(DiskCardGame.CardSlot)"; private const string name_VisualizeCardAttackingDirectly = "System.Collections.IEnumerator VisualizeCardAttackingDirectly(DiskCardGame.CardSlot, DiskCardGame.CardSlot, Int32)"; - private const string modifiedAttackCustomField = "modifiedAttack"; private static readonly MethodInfo method_GetCard = AccessTools.PropertyGetter(typeof(CardSlot), nameof(CardSlot.Card)); - private static readonly MethodInfo method_NewDamage = AccessTools.Method(typeof(SlotAttackSlotPatches), nameof(SlotAttackSlotPatches.DamageToDealThisPhase), - new Type[] { typeof(CardSlot), typeof(CardSlot) }); - - private static readonly MethodInfo method_NewTriggers = AccessTools.Method(typeof(SlotAttackSlotPatches), nameof(SlotAttackSlotPatches.TriggerOnDirectDamageTriggers), - new Type[] { typeof(PlayableCard), typeof(CardSlot) }); - - private static readonly MethodInfo method_SetCustomField = AccessTools.Method(typeof(CustomFields), nameof(CustomFields.Set)); - - private static readonly MethodInfo method_GetCustomField = AccessTools.Method(typeof(CustomFields), nameof(CustomFields.Get), - new Type[] { typeof(object), typeof(string) }, new Type[] { typeof(int) }); - - // make this public so people can alter it themselves public static int DamageToDealThisPhase(CardSlot attackingSlot, CardSlot opposingSlot) { int originalDamage = attackingSlot.Card.Attack; int damage = originalDamage; // Trigger IModifyDirectDamage first and treat the new damage as the attacking card's attack - var modifyDirectDamage = CustomTriggerFinder.FindGlobalTriggers(true).ToList(); + List modifyDirectDamage = CustomTriggerFinder.FindGlobalTriggers(true).ToList(); modifyDirectDamage.Sort((a, b) => b.TriggerPriority(opposingSlot, damage, attackingSlot.Card) - a.TriggerPriority(opposingSlot, damage, attackingSlot.Card) ); - foreach (var modify in modifyDirectDamage) + foreach (IModifyDirectDamage modify in modifyDirectDamage) { if (modify.RespondsToModifyDirectDamage(opposingSlot, damage, attackingSlot.Card, originalDamage)) damage = modify.OnModifyDirectDamage(opposingSlot, damage, attackingSlot.Card, originalDamage); @@ -76,25 +63,56 @@ public static int DamageToDealThisPhase(CardSlot attackingSlot, CardSlot opposin return damage; } + // Trigger both the vanilla trigger and the new trigger + public static IEnumerator TriggerOnDirectDamageTriggers(PlayableCard attacker, CardSlot opposingSlot) + { + int damage = CustomFields.Get(attacker, modifiedAttackCustomField); + + // trigger the vanilla trigger + if (attacker.TriggerHandler.RespondsToTrigger(Trigger.DealDamageDirectly, new object[] { damage })) + { + yield return attacker.TriggerHandler.OnTrigger(Trigger.DealDamageDirectly, new object[] { damage }); + } + + // trigger the new modded trigger + yield return CustomTriggerFinder.TriggerAll(false, x => x.RespondsToCardDealtDamageDirectly(attacker, opposingSlot, damage), x => x.OnCardDealtDamageDirectly(attacker, opposingSlot, damage)); + } + + public static IEnumerator TriggerCardGettingAttackedTriggers(PlayableCard attacker, PlayableCard opposingCard) + { + yield return Singleton.Instance.TriggerCardsOnBoard(Trigger.CardGettingAttacked, false, opposingCard); + + List postAttacked = CustomTriggerFinder.FindGlobalTriggers(true).ToList(); + postAttacked.Sort((a, b) => b.PostCardGettingAttackedPriority(opposingCard, attacker) - a.PostCardGettingAttackedPriority(opposingCard, attacker)); + foreach (IPostCardGettingAttacked modify in postAttacked) + { + if (modify != null && modify.RespondsToPostCardGettingAttacked(opposingCard, attacker)) + yield return modify.OnPostCardGettingAttacked(opposingCard, attacker); + } + } + // We want to add a null check after CardGettingAttacked is triggered, so we'll look for triggers [HarmonyTranspiler, HarmonyPatch(typeof(CombatPhaseManager), nameof(CombatPhaseManager.SlotAttackSlot), MethodType.Enumerator)] private static IEnumerable Transpiler(IEnumerable instructions) { List codes = new(instructions); - + object displayClassOperand = codes.First(x => x.opcode == OpCodes.Ldfld && x.operand.ToString() == name_CombatPhase).operand; + object attackingSlotOperand = codes.First(x => x.opcode == OpCodes.Stfld && x.operand.ToString() == name_AttackingSlot).operand; + object opposingSlotOperand = codes.First(x => x.opcode == OpCodes.Ldfld && x.operand.ToString() == name_OpposingSlot).operand; + // we want to slowly narrow our search until we find exactly where we want to insert our code - for (int a = 0; a < codes.Count; a++) + /*for (int a = 0; a < codes.Count; a++) { // separated into their own methods so I can save on eye strain and brain fog - if (ModifyDirectDamageCheck(codes, ref a)) + if (ModifyDirectDamageCheck(codes, combatPhaseOperand, attackingSlotOperand, opposingSlotOperand, ref a)) { for (int b = a; b < codes.Count; b++) { - if (CallTriggerOnDirectDamage(codes, ref b)) + if (CallTriggerOnDirectDamage(codes, opposingSlotOperand, ref b)) { for (int c = b; c < codes.Count; c++) { - if (OpposingCardNullCheck(codes, c)) + if (OpposingCardNullCheck(codes, opposingSlotOperand, combatPhaseOperand, attackingSlotOperand, c)) break; } break; @@ -102,198 +120,117 @@ private static IEnumerable Transpiler(IEnumerable codes, int i) + private static void OpposingCardNullCheck(List codes, int start, object opposingSlotOp, object displayClassOp, object attackingSlotOp) { // Looking for where GlobalTriggerHandler is called for CardGettingAttacked (enum 7) - if (codes[i].opcode == OpCodes.Call && codes[i].operand.ToString() == name_GlobalTrigger && codes[i + 1].opcode == OpCodes.Ldc_I4_7) - { - MethodInfo op_Inequality = null; - object op_OpposingSlot = null; - object op_GetCard = null; - object op_BreakLabel = null; - - for (int j = i + 1; j < codes.Count; j++) - { - // we need to get the operand for opposingSlot so we can insert it later - if (codes[j].opcode == OpCodes.Ldfld && codes[j].operand.ToString() == name_OpposingSlot && op_OpposingSlot == null) - op_OpposingSlot = codes[j].operand; - - // also get the operand for get_card - if (codes[j].opcode == OpCodes.Callvirt && codes[j].operand.ToString() == name_GetCard && op_GetCard == null) - op_GetCard = codes[j].operand; - - // if true, we've found the start of the if statement we'll be nesting in - if (codes[j].opcode == OpCodes.Stfld && codes[j - 1].opcode == OpCodes.Ldc_I4_M1) - { - for (int k = j + 1; k < codes.Count; k++) - { - // we want to grab the operand for != - if (codes[k].opcode == OpCodes.Call && op_Inequality == null) - op_Inequality = (MethodInfo)codes[k].operand; - - // we also want to grab the break label so we know where to jump - if (op_BreakLabel == null && codes[k].opcode == OpCodes.Brfalse) - op_BreakLabel = codes[k].operand; - - // if true, we've found where we want to insert our junk - if (codes[k].opcode == OpCodes.Stfld) - { - // if (this.opposingSlot.Card != null) - codes.Insert(k + 1, new CodeInstruction(OpCodes.Ldarg_0)); - codes.Insert(k + 2, new CodeInstruction(OpCodes.Ldfld, op_OpposingSlot)); - codes.Insert(k + 3, new CodeInstruction(OpCodes.Callvirt, op_GetCard)); - codes.Insert(k + 4, new CodeInstruction(OpCodes.Ldnull)); - codes.Insert(k + 5, new CodeInstruction(OpCodes.Call, op_Inequality)); - codes.Insert(k + 6, new CodeInstruction(OpCodes.Brfalse, op_BreakLabel)); - return true; - } - } - break; - } - } - } - - return false; + int index = 8 + codes.FindIndex(start, x => x.opcode == OpCodes.Callvirt && x.operand.ToString() == "Void SetAnimationPaused(Boolean)"); + object op_BreakLabel = null; + MethodInfo op_Inequality = null; + MethodInfo cardGettingAttacked = AccessTools.Method(typeof(SlotAttackSlotPatches), nameof(SlotAttackSlotPatches.TriggerCardGettingAttackedTriggers), + new Type[] { typeof(PlayableCard), typeof(PlayableCard) }); + + codes.RemoveRange(index, codes.FindIndex(index, x => x.opcode == OpCodes.Stfld) - index); + + // yield return TriggerCardGetting...(PlayableCard card, CardSlot slot) + // this.attackingSlot.Card + // this.opposingSlot + codes.Insert(index++, new(OpCodes.Ldarg_0)); + codes.Insert(index++, new(OpCodes.Ldfld, displayClassOp)); + codes.Insert(index++, new(OpCodes.Ldfld, attackingSlotOp)); + codes.Insert(index++, new(OpCodes.Callvirt, method_GetCard)); + codes.Insert(index++, new(OpCodes.Ldarg_0)); + codes.Insert(index++, new(OpCodes.Ldfld, opposingSlotOp)); + codes.Insert(index++, new(OpCodes.Callvirt, method_GetCard)); + codes.Insert(index++, new(OpCodes.Callvirt, cardGettingAttacked)); + + op_Inequality = (MethodInfo)codes[codes.FindIndex(index, x => x.opcode == OpCodes.Call && x.operand.ToString() == "Boolean op_Inequality(UnityEngine.Object, UnityEngine.Object)")].operand; + op_BreakLabel = codes[codes.FindIndex(index, x => x.opcode == OpCodes.Brfalse)].operand; + + index = 1 + codes.FindIndex(2 + codes.FindIndex(index, x => x.opcode == OpCodes.Ldc_I4_M1), x => x.opcode == OpCodes.Stfld); + + codes.Insert(index++, new CodeInstruction(OpCodes.Ldarg_0)); + codes.Insert(index++, new CodeInstruction(OpCodes.Ldfld, opposingSlotOp)); + codes.Insert(index++, new CodeInstruction(OpCodes.Callvirt, method_GetCard)); + codes.Insert(index++, new CodeInstruction(OpCodes.Ldnull)); + codes.Insert(index++, new CodeInstruction(OpCodes.Call, op_Inequality)); + codes.Insert(index++, new CodeInstruction(OpCodes.Brfalse, op_BreakLabel)); } - // Modifies direct attack damage and stores the new damage in a custom field - private static bool ModifyDirectDamageCheck(List codes, ref int index) + /// + /// Replaces the DealDamageDirectly trigger call with a call to TriggerOnDirectDamageTriggers + /// + private static int CallTriggerOnDirectDamage(List codes, int startIndex, object displayClassOperand, object attackingSlotOperand, object opposingSlotOp) { - if (codes[index].opcode == OpCodes.Callvirt && codes[index].operand.ToString() == name_CanAttackDirectly) - { - int startIndex = index + 2; - - object op_OpposingSlot = null; - object op_DisplayClass = null; - object op_AttackingSlot = null; - - // look backwards and retrieve opposingSlot - for (int i = index - 1; i > 0; i--) - { - if (op_OpposingSlot == null && codes[i].operand?.ToString() == name_OpposingSlot) - { - op_OpposingSlot = codes[i].operand; - break; - } - } - - // look forward and retrieve displayClass and attackingSlot - for (int i = startIndex; i < codes.Count; i++) - { - if (op_DisplayClass == null && codes[i].operand?.ToString() == name_CombatPhase) - { - op_DisplayClass = codes[i].operand; - op_AttackingSlot = codes[i + 1].operand; - break; - } - } - - int j = startIndex; - - // CustomFields.Set(this.CombatPhase.AttackingSlot.Card, "modifiedAttack", DamageToDealThisPhase(this.CombatPhase.AttackingSlot, this.OpposingSlot)); - codes.Insert(j++, new(OpCodes.Ldarg_0)); - codes.Insert(j++, new(OpCodes.Ldfld, op_DisplayClass)); - codes.Insert(j++, new(OpCodes.Ldfld, op_AttackingSlot)); - codes.Insert(j++, new(OpCodes.Callvirt, method_GetCard)); - codes.Insert(j++, new(OpCodes.Ldstr, modifiedAttackCustomField)); - codes.Insert(j++, new(OpCodes.Ldarg_0)); - codes.Insert(j++, new(OpCodes.Ldfld, op_DisplayClass)); - codes.Insert(j++, new(OpCodes.Ldfld, op_AttackingSlot)); - codes.Insert(j++, new(OpCodes.Ldarg_0)); - codes.Insert(j++, new(OpCodes.Ldfld, op_OpposingSlot)); - codes.Insert(j++, new(OpCodes.Callvirt, method_NewDamage)); - codes.Insert(j++, new(OpCodes.Box, typeof(int))); - codes.Insert(j++, new(OpCodes.Call, method_SetCustomField)); - - index = j; - - // replace the next 2 occurances of get_Attack() with the custom field call - for (int c = 0; c < 2; c++) - { - for (; j < codes.Count; j++) - { - if (codes[j].opcode != OpCodes.Callvirt || codes[j].operand.ToString() != name_GetAttack) continue; - - codes[j++] = new(OpCodes.Ldstr, modifiedAttackCustomField); - codes.Insert(j++, new(OpCodes.Callvirt, method_GetCustomField)); - - index = j; - break; - } - } - - return true; - } - return false; - } - - // Repalces the DealDamageDirectly trigger call with a call to TriggerOnDirectDamageTriggers - private static bool CallTriggerOnDirectDamage(List codes, ref int index) - { - if (codes[index].opcode != OpCodes.Callvirt || codes[index].operand.ToString() != name_GetCard) return false; - int startIndex = ++index; - - object op_OpposingSlot = null; - - // look backwards and retrieve opposingSlot - for (int i = startIndex - 1; i > 0; i--) - { - if (op_OpposingSlot == null && codes[i].operand?.ToString() == name_OpposingSlot) - { - op_OpposingSlot = codes[i].operand; - break; - } - } - - // look backwards for ldarg0 and duplicate it - for (int i = startIndex - 1; i > 0; i--) - { - if (codes[i].opcode == OpCodes.Ldarg_0) - { - codes.Insert(i, new(OpCodes.Ldarg_0)); - - index++; - startIndex++; - - break; - } - } - - for (int i = startIndex; i < codes.Count; i++) - { - if (codes[i].opcode != OpCodes.Ldc_I4_7) continue; - - // remove the existing trigger call - codes.RemoveRange(startIndex, i - startIndex - 2); - - // insert the call to our new trigger - codes.Insert(index++, new(OpCodes.Ldarg_0)); - codes.Insert(index++, new(OpCodes.Ldfld, op_OpposingSlot)); - codes.Insert(index++, new(OpCodes.Callvirt, method_NewTriggers)); - - break; - } - - return true; + int index = codes.FindIndex(startIndex, x => x.opcode == OpCodes.Callvirt && x.operand.ToString() == name_GetCard) - 2; + codes.Insert(index++, new(OpCodes.Ldarg_0)); + index += 3; + + MethodInfo info = AccessTools.Method(typeof(SlotAttackSlotPatches), nameof(SlotAttackSlotPatches.TriggerOnDirectDamageTriggers), + new Type[] { typeof(PlayableCard), typeof(CardSlot) }); + + // remove the existing trigger call + codes.RemoveRange(index, codes.FindIndex(index, x => x.opcode == OpCodes.Ldc_I4_7) - 2 - index); + //index = startIndex + 1; + //return index; + // insert the call to our new trigger + // this.displayClass.attackingSlot.Card + // this.opposingSlot + codes.Insert(index++, new(OpCodes.Ldarg_0)); + codes.Insert(index++, new(OpCodes.Ldfld, opposingSlotOp)); + codes.Insert(index++, new(OpCodes.Callvirt, info)); + + return index; } - // Trigger both the vanilla trigger and the new trigger - private static IEnumerator TriggerOnDirectDamageTriggers(PlayableCard attacker, CardSlot opposingSlot) + /// + /// Modifies the damage value added to DamageDealtThisPhase to support IModifyDirectDamage and negative damage values (self-damage) + /// + private static int ModifyDirectDamageCheck(List codes, object displayClassOperand, object attackingSlotOperand, object opposingSlotOperand) { - int damage = CustomFields.Get(attacker, modifiedAttackCustomField); - - // trigger the vanilla trigger - if (attacker.TriggerHandler.RespondsToTrigger(Trigger.DealDamageDirectly, new object[] { damage })) - { - yield return attacker.TriggerHandler.OnTrigger(Trigger.DealDamageDirectly, new object[] { damage }); - } - - // trigger the new modded trigger - yield return CustomTriggerFinder.TriggerAll(false, x => x.RespondsToCardDealtDamageDirectly(attacker, opposingSlot, damage), x => x.OnCardDealtDamageDirectly(attacker, opposingSlot, damage)); + int index = codes.FindIndex(x => x.opcode == OpCodes.Callvirt && x.operand.ToString() == name_CanAttackDirectly) + 2; + + MethodInfo setCustomField = AccessTools.Method(typeof(CustomFields), nameof(CustomFields.Set)); + MethodInfo damageToDeal = AccessTools.Method(typeof(SlotAttackSlotPatches), nameof(SlotAttackSlotPatches.DamageToDealThisPhase), + new Type[] { typeof(CardSlot), typeof(CardSlot) }); + + MethodInfo getCustomField = AccessTools.Method(typeof(CustomFields), nameof(CustomFields.Get), + new Type[] { typeof(object), typeof(string) }, new Type[] { typeof(int) }); + + // CustomFields.Set(this.CombatPhase.AttackingSlot.Card, "modifiedAttack", DamageToDealThisPhase(this.CombatPhase.AttackingSlot, this.OpposingSlot)); + // change DamageDealtThisPhase += attackingCard.Attack + // to DamageDealtThisPhase += (int)modifiedAttack + codes.Insert(index++, new(OpCodes.Ldarg_0)); + codes.Insert(index++, new(OpCodes.Ldfld, displayClassOperand)); + codes.Insert(index++, new(OpCodes.Ldfld, attackingSlotOperand)); + codes.Insert(index++, new(OpCodes.Callvirt, method_GetCard)); + codes.Insert(index++, new(OpCodes.Ldstr, modifiedAttackCustomField)); + codes.Insert(index++, new(OpCodes.Ldarg_0)); + codes.Insert(index++, new(OpCodes.Ldfld, displayClassOperand)); + codes.Insert(index++, new(OpCodes.Ldfld, attackingSlotOperand)); + codes.Insert(index++, new(OpCodes.Ldarg_0)); + codes.Insert(index++, new(OpCodes.Ldfld, opposingSlotOperand)); + codes.Insert(index++, new(OpCodes.Callvirt, damageToDeal)); + codes.Insert(index++, new(OpCodes.Box, typeof(int))); + codes.Insert(index++, new(OpCodes.Call, setCustomField)); + + // replace the next 2 occurences of get_Attack() with the custom field call + index = codes.FindIndex(index, x => x.opcode == OpCodes.Callvirt && x.operand.ToString() == name_GetAttack); + codes[index++] = new(OpCodes.Ldstr, modifiedAttackCustomField); + codes.Insert(index++, new(OpCodes.Callvirt, getCustomField)); + + index = codes.FindIndex(index, x => x.opcode == OpCodes.Callvirt && x.operand.ToString() == name_GetAttack); + codes[index++] = new(OpCodes.Ldstr, modifiedAttackCustomField); + codes.Insert(index++, new(OpCodes.Callvirt, getCustomField)); + + return index; } } \ No newline at end of file diff --git a/InscryptionCommunityPatch/InscryptionCommunityPatch.csproj b/InscryptionCommunityPatch/InscryptionCommunityPatch.csproj index 3ba1dbb4..1fa61d60 100644 --- a/InscryptionCommunityPatch/InscryptionCommunityPatch.csproj +++ b/InscryptionCommunityPatch/InscryptionCommunityPatch.csproj @@ -9,7 +9,7 @@ true full false - 2.22.0 + 2.23.0