Decompiled source of OLD SA sigil v0.2.0

Challenge/OldSa_Challenge.dll

Decompiled a day ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Ascension;
using InscryptionAPI.Helpers;
using OLD_SA.Random;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Challenge")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Challenge")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("7bddb5c6-b65b-44d7-8bf7-754e15af94f3")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OldSa_Challenge;

public static class ChallengeRegistry
{
	public static AscensionChallengeInfo NoGrowthChallenge;

	public const string NoGrowthName = "No Growth";

	public const string NoGrowthDescription = "Fledgling sigils no longer evolve. They only grant +1 Power and +1 Health.";

	public static AscensionChallengeInfo NoWoodcarverChallenge;

	public const string NoWoodcarverName = "No Woodcarver";

	public const string NoWoodcarverDescription = "You will no longer encounter Woodcarver choice nodes.";

	public static AscensionChallengeInfo DizzyStartersChallenge;

	public const string DizzyStartersName = "Dizzy Starters";

	public const string DizzyStartersDescription = "All creatures in your starting deck gain the Random sigil.";

	public static AscensionChallenge NoGrowthChallengeType => (AscensionChallenge)(((Object)(object)NoGrowthChallenge != (Object)null) ? ((int)NoGrowthChallenge.challengeType) : 0);

	public static AscensionChallenge NoWoodcarverChallengeType => (AscensionChallenge)(((Object)(object)NoWoodcarverChallenge != (Object)null) ? ((int)NoWoodcarverChallenge.challengeType) : 0);

	public static AscensionChallenge DizzyStartersChallengeType => (AscensionChallenge)(((Object)(object)DizzyStartersChallenge != (Object)null) ? ((int)DizzyStartersChallenge.challengeType) : 0);

	public static void Register()
	{
		Plugin.Log.LogInfo((object)"[OldSa Challenge] Registering challenges...");
		NoGrowthChallenge = FullChallenge.op_Implicit(ChallengeManager.Add("OLD_SA.Challenge", "No Growth", "Fledgling sigils no longer evolve. They only grant +1 Power and +1 Health.", 30, TextureHelper.GetImageAsTexture("NoGrowth.png", (FilterMode)0), TextureHelper.GetImageAsTexture("NoGrowth_Activated.png", (FilterMode)0), 0, false));
		Plugin.Log.LogInfo((object)("[OldSa Challenge] Registered: No Growth | ID: " + ((object)Unsafe.As<AscensionChallenge, AscensionChallenge>(ref NoGrowthChallenge.challengeType)/*cast due to .constrained prefix*/).ToString()));
		NoWoodcarverChallenge = FullChallenge.op_Implicit(ChallengeManager.Add("OLD_SA.Challenge", "No Woodcarver", "You will no longer encounter Woodcarver choice nodes.", 30, TextureHelper.GetImageAsTexture("NoWoodcarver.png", (FilterMode)0), TextureHelper.GetImageAsTexture("NoWoodcarver_Activated.png", (FilterMode)0), 0, false));
		Plugin.Log.LogInfo((object)("[OldSa Challenge] Registered: No Woodcarver | ID: " + ((object)Unsafe.As<AscensionChallenge, AscensionChallenge>(ref NoWoodcarverChallenge.challengeType)/*cast due to .constrained prefix*/).ToString()));
		DizzyStartersChallenge = FullChallenge.op_Implicit(ChallengeManager.Add("OLD_SA.Challenge", "Dizzy Starters", "All creatures in your starting deck gain the Random sigil.", 30, TextureHelper.GetImageAsTexture("DizzyStarters.png", (FilterMode)0), TextureHelper.GetImageAsTexture("DizzyStarters_Activated.png", (FilterMode)0), 0, false));
		Plugin.Log.LogInfo((object)("[OldSa Challenge] Registered: Dizzy Starters | ID: " + ((object)Unsafe.As<AscensionChallenge, AscensionChallenge>(ref DizzyStartersChallenge.challengeType)/*cast due to .constrained prefix*/).ToString()));
		Plugin.Log.LogInfo((object)"[OldSa Challenge] All challenges registered.");
	}
}
[HarmonyPatch(typeof(AscensionSaveData), "NewRun")]
public static class DizzyStartersPatch
{
	[HarmonyPostfix]
	public static void Postfix(AscensionSaveData __instance)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_003c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_0044: Invalid comparison between Unknown and I4
		//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c0: Expected O, but got Unknown
		if (!__instance.ChallengeIsActive(ChallengeRegistry.DizzyStartersChallengeType) || __instance.currentRun == null || __instance.currentRun.playerDeck == null)
		{
			return;
		}
		Ability randomAbility = RandomAPI.RandomAbility;
		if ((int)randomAbility == 0)
		{
			Plugin.Log.LogError((object)"[OldSa Challenge] Dizzy Starters: Random ability is invalid.");
			return;
		}
		foreach (CardInfo card in ((CardCollectionInfo)__instance.currentRun.playerDeck).Cards)
		{
			if (!((Object)(object)card == (Object)null) && !card.HasTrait((Trait)13) && !card.HasAbility(randomAbility))
			{
				CardModificationInfo val = new CardModificationInfo(randomAbility);
				__instance.currentRun.playerDeck.ModifyCard(card, val);
				Plugin.Log.LogInfo((object)("[OldSa Challenge] Dizzy Starters: Added Random to " + ((Object)card).name));
			}
		}
	}
}
[HarmonyPatch(typeof(Evolve), "OnUpkeep")]
public static class NoGrowthPatch
{
	private static readonly FieldRef<Evolve, int> NumTurnsInPlay = AccessTools.FieldRefAccess<Evolve, int>("numTurnsInPlay");

	private static readonly MethodInfo PreSuccessfulTriggerSequenceMethod = AccessTools.Method(typeof(AbilityBehaviour), "PreSuccessfulTriggerSequence", (Type[])null, (Type[])null);

	private static readonly PropertyInfo CardProperty = AccessTools.Property(typeof(AbilityBehaviour), "Card");

	private static readonly HashSet<Evolve> ProcessedEvolves = new HashSet<Evolve>();

	[HarmonyPrefix]
	public static bool Prefix(Evolve __instance, bool playerUpkeep, ref IEnumerator __result)
	{
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)__instance == (Object)null)
		{
			return true;
		}
		if ((Object)(object)ChallengeRegistry.NoGrowthChallenge == (Object)null || AscensionSaveData.Data == null || !AscensionSaveData.Data.ChallengeIsActive(ChallengeRegistry.NoGrowthChallenge.challengeType))
		{
			return true;
		}
		PlayableCard card = GetCard(__instance);
		if ((Object)(object)card == (Object)null || card.Dead)
		{
			return true;
		}
		if (card.OpponentCard)
		{
			return true;
		}
		if (ProcessedEvolves.Contains(__instance))
		{
			__result = EmptySequence();
			return false;
		}
		__result = NoGrowthOnUpkeep(__instance, card, playerUpkeep);
		return false;
	}

	private static IEnumerator EmptySequence()
	{
		yield break;
	}

	private static PlayableCard GetCard(Evolve evolve)
	{
		if ((Object)(object)evolve == (Object)null || CardProperty == null)
		{
			return null;
		}
		object? value = CardProperty.GetValue(evolve, null);
		return (PlayableCard)((value is PlayableCard) ? value : null);
	}

	private static IEnumerator NoGrowthOnUpkeep(Evolve evolve, PlayableCard card, bool playerUpkeep)
	{
		if ((Object)(object)evolve == (Object)null || (Object)(object)card == (Object)null || card.Dead || card.OpponentCard == playerUpkeep)
		{
			yield break;
		}
		int turnsToEvolve = ((!((Object)(object)((Card)card).Info != (Object)null) || ((Card)card).Info.evolveParams == null) ? 1 : ((Card)card).Info.evolveParams.turnsToEvolve);
		int numTurnsInPlay = NumTurnsInPlay.Invoke(evolve);
		numTurnsInPlay++;
		NumTurnsInPlay.Invoke(evolve) = numTurnsInPlay;
		int remaining = Mathf.Max(1, turnsToEvolve - numTurnsInPlay);
		((Card)card).RenderInfo.OverrideAbilityIcon((Ability)5, ResourceBank.Get<Texture>("Art/Cards/AbilityIcons/ability_evolve_" + remaining));
		((Card)card).RenderCard();
		if (numTurnsInPlay >= turnsToEvolve)
		{
			ProcessedEvolves.Add(evolve);
			yield return InvokePreSuccessfulTriggerSequence(evolve);
			if (!((Object)(object)card == (Object)null) && !card.Dead)
			{
				Singleton<ViewManager>.Instance.SwitchToView((View)4, false, false);
				yield return (object)new WaitForSeconds(0.15f);
				((Card)card).Anim.PlayTransformAnimation();
				yield return (object)new WaitForSeconds(0.15f);
				CardModificationInfo growth = new CardModificationInfo
				{
					attackAdjustment = 1,
					healthAdjustment = 1,
					singletonId = "OLD_SA_NoGrowth_StatIncrease"
				};
				card.AddTemporaryMod(growth);
				HideEvolve(card);
				card.OnStatsChanged();
				((Card)card).RenderCard();
				card.UpdateFaceUpOnBoardEffects();
			}
		}
	}

	private static void HideEvolve(PlayableCard card)
	{
		if (!((Object)(object)card == (Object)null) && card.Status != null)
		{
			if (card.Status.hiddenAbilities == null)
			{
				card.Status.hiddenAbilities = new List<Ability>();
			}
			if (!card.Status.hiddenAbilities.Contains((Ability)5))
			{
				card.Status.hiddenAbilities.Add((Ability)5);
			}
			((Card)card).RenderInfo.OverrideAbilityIcon((Ability)5, (Texture)null);
			((Card)card).RenderCard();
		}
	}

	private static IEnumerator InvokePreSuccessfulTriggerSequence(Evolve evolve)
	{
		if ((Object)(object)evolve == (Object)null || PreSuccessfulTriggerSequenceMethod == null)
		{
			yield break;
		}
		object result = PreSuccessfulTriggerSequenceMethod.Invoke(evolve, null);
		if (result is IEnumerator sequence)
		{
			while (sequence.MoveNext())
			{
				yield return sequence.Current;
			}
		}
	}
}
[HarmonyPatch(typeof(MapGenerator), "ChooseSpecialNodeFromPossibilities")]
public static class NoWoodcarverPatch
{
	[HarmonyPrefix]
	public static void Prefix(List<NodeData> possibilities)
	{
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		if (possibilities != null && !((Object)(object)ChallengeRegistry.NoWoodcarverChallenge == (Object)null) && SaveFile.IsAscension && AscensionSaveData.Data.ChallengeIsActive(ChallengeRegistry.NoWoodcarverChallenge.challengeType))
		{
			possibilities.RemoveAll((NodeData node) => node is BuildTotemNodeData);
		}
	}
}
[BepInPlugin("OLD_SA.Challenge", "OLD SA Challenge", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : BaseUnityPlugin
{
	public const string PluginGuid = "OLD_SA.Challenge";

	public const string PluginName = "OLD SA Challenge";

	public const string PluginVersion = "1.0.0";

	internal static ManualLogSource Log;

	private void Awake()
	{
		//IL_0021: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Expected O, but got Unknown
		Log = ((BaseUnityPlugin)this).Logger;
		Log.LogInfo((object)"[OldSa Challenge] Plugin loaded.");
		Harmony val = new Harmony("OLD_SA.Challenge");
		val.PatchAll();
		Log.LogInfo((object)"[OldSa Challenge] Harmony patches applied.");
		ChallengeRegistry.Register();
		Log.LogInfo((object)"[OldSa Challenge] Initialization complete.");
	}

	public static Texture2D LoadTexture(string name)
	{
		//IL_0057: Unknown result type (might be due to invalid IL or missing references)
		//IL_005d: Expected O, but got Unknown
		using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("OldSa_Challenge.Resources." + name);
		if (stream == null)
		{
			Log.LogError((object)("[World Rules] Missing texture: " + name));
			return null;
		}
		byte[] array = new byte[stream.Length];
		stream.Read(array, 0, array.Length);
		Texture2D val = new Texture2D(2, 2);
		ImageConversion.LoadImage(val, array);
		((Object)val).name = name;
		return val;
	}
}

OLD_SA_Card/OLD_SA_Decks/OLD_SA_Decks.dll

Decompiled a day ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using InscryptionAPI.Ascension;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OLD_SA_Decks")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OLD_SA_Decks")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("006f57b1-dcb0-4c34-9083-035a71c7be95")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
public static class StarterDeck
{
	public static void Init()
	{
		StarterDeckManager.New("com.oldsa.hive", "Hive Will", "OLD_SA_HiveDeck.png", new string[3] { "Beehive", "OLD_SA_BEE_WORKER", "OLD_SA_BEE_QUEEN" }, 0);
		StarterDeckManager.New("com.oldsa.poison", "Poison", "OLD_SA_Poison.png", new string[3] { "Skink", "OLD_SA_DART_FROG", "Adder" }, 0);
		StarterDeckManager.New("com.oldsa.strafe", "Strafe", "OLD_SA_Strafe.png", new string[3] { "ElkCub", "OLD_SA_ANTELOPE", "Bull" }, 0);
		StarterDeckManager.New("com.oldsa.cat", "Cat", "OLD_SA_Cat.png", new string[3] { "Cat", "OLD_SA_LYNX", "Wolf" }, 0);
	}
}
namespace OLD_SA.Decks;

[BepInPlugin("OLD_SA.Decks", "OLD SA Decks", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		StarterDeck.Init();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"OLD SA Decks Loaded");
	}
}

OLD_SA_Card/OLD_SA_Evolution.dll

Decompiled a day ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using OLD_SA.Dialogue;
using UnityEngine;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OLD_SA_Evolution")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OLD_SA_Evolution")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("5b768fcb-7685-41db-8b51-6ca3e88435e4")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.Evolution;

public static class EvolutionAPI
{
	public static Dictionary<string, string> Evolutions = new Dictionary<string, string>();

	public static Dictionary<string, int> Turns = new Dictionary<string, int>();

	public static Dictionary<string, string> EvolutionDialogues = new Dictionary<string, string>();

	public static HashSet<string> TriggeredEvolutionDialogues = new HashSet<string>();

	public static void AddEvolution(string from, string to, int turns, string dialogue = null)
	{
		Evolutions[from] = to;
		Turns[from] = turns;
		if (!string.IsNullOrEmpty(dialogue))
		{
			EvolutionDialogues[from] = dialogue;
		}
	}

	public static bool ShouldTriggerEvolutionDialogue(string cardName)
	{
		if (TriggeredEvolutionDialogues.Contains(cardName))
		{
			return false;
		}
		TriggeredEvolutionDialogues.Add(cardName);
		OLD_SA_SaveManager.Save();
		return true;
	}

	public static List<string> GetTriggeredDialogues()
	{
		return new List<string>(TriggeredEvolutionDialogues);
	}

	public static void LoadTriggeredDialogues(List<string> data)
	{
		TriggeredEvolutionDialogues.Clear();
		if (data == null)
		{
			return;
		}
		foreach (string datum in data)
		{
			if (!string.IsNullOrEmpty(datum))
			{
				TriggeredEvolutionDialogues.Add(datum);
			}
		}
	}

	public static void ClearTriggeredDialogues()
	{
		TriggeredEvolutionDialogues.Clear();
	}
}
public class EvolutionData
{
	public string target;

	public int turns;

	public string dialogue;
}
[HarmonyPatch(typeof(PlayableCard))]
public static class EvolutionDialoguePatch
{
	private static Dictionary<PlayableCard, string> BeforeEvolution = new Dictionary<PlayableCard, string>();

	[HarmonyPatch("TransformIntoCard")]
	[HarmonyPrefix]
	public static void Prefix(PlayableCard __instance)
	{
		if (!((Object)(object)__instance == (Object)null) && !((Object)(object)((Card)__instance).Info == (Object)null))
		{
			BeforeEvolution[__instance] = ((Object)((Card)__instance).Info).name;
		}
	}

	[HarmonyPatch("TransformIntoCard")]
	[HarmonyPostfix]
	public static IEnumerator Postfix(IEnumerator result, PlayableCard __instance, CardInfo evolvedInfo)
	{
		while (result.MoveNext())
		{
			yield return result.Current;
		}
		if (!((Object)(object)__instance == (Object)null) && !((Object)(object)evolvedInfo == (Object)null) && BeforeEvolution.ContainsKey(__instance))
		{
			string oldName = BeforeEvolution[__instance];
			BeforeEvolution.Remove(__instance);
			if (EvolutionAPI.EvolutionDialogues.ContainsKey(oldName) && EvolutionAPI.ShouldTriggerEvolutionDialogue(oldName))
			{
				string dialogue = EvolutionAPI.EvolutionDialogues[oldName];
				yield return ShowEvolutionDialogue(dialogue);
			}
		}
	}

	private static IEnumerator ShowEvolutionDialogue(string dialogue)
	{
		yield return (object)new WaitForEndOfFrame();
		if ((Object)(object)Singleton<TextDisplayer>.Instance != (Object)null)
		{
			yield return Singleton<TextDisplayer>.Instance.ShowUntilInput(dialogue, -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true);
		}
	}
}
public static class EvolutionManager
{
	public static void RegisterAll()
	{
		foreach (CardInfo item in CardManager.AllCardsCopy)
		{
			string evolveFrom = CardExtensions.GetExtendedProperty(item, "OLD_SA_EvolveFrom");
			if (string.IsNullOrEmpty(evolveFrom))
			{
				continue;
			}
			CardInfo val = CardManager.AllCardsCopy.Find((CardInfo x) => ((Object)x).name == evolveFrom);
			if (!((Object)(object)val == (Object)null))
			{
				int num = 1;
				string extendedProperty = CardExtensions.GetExtendedProperty(item, "OLD_SA_EvolveTurns");
				if (int.TryParse(extendedProperty, out var result))
				{
					num = result;
				}
				if (val.evolveParams == null || (Object)(object)val.evolveParams.evolution != (Object)(object)item)
				{
					CardExtensions.SetEvolve(val, item, num, (IEnumerable<CardModificationInfo>)null);
				}
				if (val.evolveParams != null)
				{
					val.evolveParams.turnsToEvolve = num;
				}
				string extendedProperty2 = CardExtensions.GetExtendedProperty(item, "OLD_SA_EvolveDialogue");
				EvolutionAPI.AddEvolution(((Object)val).name, ((Object)item).name, num, extendedProperty2);
			}
		}
	}
}
[BepInPlugin("OLD_SA.Evolution", "OLD SA Evolution", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Expected O, but got Unknown
		Harmony val = new Harmony("OLD_SA.Evolution");
		val.PatchAll();
		SceneManager.sceneLoaded += OnSceneLoaded;
		((MonoBehaviour)this).StartCoroutine(InitialRegister());
		Debug.Log((object)"OLD SA Evolution Loaded");
	}

	private IEnumerator InitialRegister()
	{
		yield return (object)new WaitUntil((Func<bool>)(() => CardManager.AllCardsCopy != null && CardManager.AllCardsCopy.Count > 0));
		yield return (object)new WaitForSeconds(1f);
		EvolutionManager.RegisterAll();
	}

	private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
	{
		((MonoBehaviour)this).StartCoroutine(DelayedSceneRegister());
	}

	private IEnumerator DelayedSceneRegister()
	{
		yield return (object)new WaitForSeconds(1f);
		EvolutionManager.RegisterAll();
	}
}

OLD_SA_Card/OLD_SA_Sigil.dll

Decompiled a day ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using HarmonyLib;
using OLD_SA.CardTraits;
using OLD_SA.Evolution;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OLD_SA_Sigil")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OLD_SA_Sigil")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("59150cfa-2a48-413c-bd72-7da85784e761")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.Dialogue;

public static class DialogueColorAPI
{
	public static Color? CurrentColor;
}
public static class OLD_SA_SaveManager
{
	[Serializable]
	private class DialogueSaveData
	{
		public List<string> SigilDialogues = new List<string>();

		public List<string> EvolutionDialogues = new List<string>();

		public List<string> TraitDialogues = new List<string>();
	}

	private static string PathFile => Path.Combine(Application.persistentDataPath, "OLD_SA_Save.json");

	public static void Save()
	{
		DialogueSaveData dialogueSaveData = new DialogueSaveData();
		dialogueSaveData.SigilDialogues = SigilDialogueSaveData.GetSaveList();
		dialogueSaveData.EvolutionDialogues = EvolutionAPI.GetTriggeredDialogues();
		dialogueSaveData.TraitDialogues = CardTraitDialogueSaveData.GetSaveList();
		string contents = JsonUtility.ToJson((object)dialogueSaveData, true);
		try
		{
			File.WriteAllText(PathFile, contents);
			Debug.Log((object)"OLD SA Save Complete");
		}
		catch (Exception ex)
		{
			Debug.LogError((object)("OLD SA Save Failed: " + ex.Message));
		}
	}

	public static void Load()
	{
		if (!File.Exists(PathFile))
		{
			Debug.Log((object)"OLD SA Save Not Found");
			return;
		}
		try
		{
			string text = File.ReadAllText(PathFile);
			DialogueSaveData dialogueSaveData = JsonUtility.FromJson<DialogueSaveData>(text);
			if (dialogueSaveData != null)
			{
				SigilDialogueSaveData.LoadFromList(dialogueSaveData.SigilDialogues);
				EvolutionAPI.LoadTriggeredDialogues(dialogueSaveData.EvolutionDialogues);
				CardTraitDialogueSaveData.LoadFromList(dialogueSaveData.TraitDialogues);
				Debug.Log((object)"OLD SA Load Complete");
			}
		}
		catch (Exception ex)
		{
			Debug.LogError((object)("OLD SA Load Failed: " + ex.Message));
		}
	}
}
[BepInPlugin("OLD_SA.Dialogue", "OLD SA Dialogue", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		OLD_SA_SaveManager.Load();
		Harmony val = new Harmony("OLD_SA.Dialogue");
		val.PatchAll();
		Debug.Log((object)"OLD SA Dialogue Loaded");
	}
}
public static class SigilDialogueAPI
{
	public static bool ShowingDialogue;

	public static IEnumerator ShowFirstTime(string sigilID, string dialogue)
	{
		return ShowFirstTime(sigilID, dialogue, null);
	}

	public static IEnumerator ShowFirstTime(string sigilID, string dialogue, PlayableCard triggerCard = null)
	{
		if (SigilDialogueSaveData.HasTriggered(sigilID))
		{
			yield break;
		}
		SigilDialogueSaveData.AddTriggered(sigilID);
		OLD_SA_SaveManager.Save();
		DialogueColorAPI.CurrentColor = null;
		if ((Object)(object)triggerCard != (Object)null && (Object)(object)((Card)triggerCard).Info != (Object)null)
		{
			string cardName = ((Object)((Card)triggerCard).Info).name;
			if (cardName == "OLD_SA_WIND_PTEROSAUR")
			{
				DialogueColorAPI.CurrentColor = Color.cyan;
			}
			if (cardName == "OLD_SA_BEE_QUEEN")
			{
				DialogueColorAPI.CurrentColor = Color.yellow;
			}
		}
		ShowingDialogue = true;
		if ((Object)(object)Singleton<ViewManager>.Instance != (Object)null)
		{
			Singleton<ViewManager>.Instance.Controller.LockState = (ViewLockState)1;
		}
		if ((Object)(object)Singleton<PlayerHand>.Instance != (Object)null)
		{
			Singleton<PlayerHand>.Instance.PlayingLocked = true;
		}
		try
		{
			if ((Object)(object)Singleton<TextDisplayer>.Instance != (Object)null)
			{
				yield return Singleton<TextDisplayer>.Instance.ShowUntilInput(dialogue, -2.5f, 0.5f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true);
			}
		}
		finally
		{
			if ((Object)(object)Singleton<PlayerHand>.Instance != (Object)null)
			{
				Singleton<PlayerHand>.Instance.PlayingLocked = false;
			}
			if ((Object)(object)Singleton<ViewManager>.Instance != (Object)null)
			{
				Singleton<ViewManager>.Instance.Controller.LockState = (ViewLockState)0;
			}
			DialogueColorAPI.CurrentColor = null;
			ShowingDialogue = false;
		}
	}
}
public static class SigilDialogueSaveData
{
	private static HashSet<string> Triggered = new HashSet<string>();

	public static int Count => Triggered.Count;

	public static bool HasTriggered(string id)
	{
		if (string.IsNullOrEmpty(id))
		{
			return false;
		}
		return Triggered.Contains(id);
	}

	public static void AddTriggered(string id)
	{
		if (!string.IsNullOrEmpty(id) && !Triggered.Contains(id))
		{
			Triggered.Add(id);
		}
	}

	public static void Remove(string id)
	{
		if (!string.IsNullOrEmpty(id))
		{
			Triggered.Remove(id);
		}
	}

	public static void Clear()
	{
		Triggered.Clear();
	}

	public static List<string> GetSaveList()
	{
		return new List<string>(Triggered);
	}

	public static void LoadFromList(List<string> data)
	{
		Triggered.Clear();
		if (data == null)
		{
			return;
		}
		foreach (string datum in data)
		{
			if (!string.IsNullOrEmpty(datum))
			{
				Triggered.Add(datum);
			}
		}
	}
}
[HarmonyPatch]
public static class SigilDialogueSavePatch
{
	[HarmonyPatch(typeof(SaveFile), "Initialize")]
	[HarmonyPostfix]
	public static void InitializePostfix()
	{
		OLD_SA_SaveManager.Load();
		Debug.Log((object)"OLD SA Dialogue Save Loaded");
	}

	[HarmonyPatch(typeof(SaveManager), "SaveToFile")]
	[HarmonyPostfix]
	public static void SaveToFilePostfix(bool saveActiveScene)
	{
		OLD_SA_SaveManager.Save();
		Debug.Log((object)"OLD SA Dialogue Save Saved");
	}
}
[HarmonyPatch(typeof(TextDisplayer), "ShowMessage")]
public static class TextDisplayerColorPatch
{
	[HarmonyPostfix]
	public static void Postfix(TextDisplayer __instance)
	{
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		if (!DialogueColorAPI.CurrentColor.HasValue)
		{
			return;
		}
		FieldInfo fieldInfo = AccessTools.Field(typeof(TextDisplayer), "textMesh");
		if (fieldInfo == null)
		{
			return;
		}
		object value = fieldInfo.GetValue(__instance);
		if (value != null)
		{
			PropertyInfo property = value.GetType().GetProperty("color");
			if (property != null && property.CanWrite)
			{
				property.SetValue(value, DialogueColorAPI.CurrentColor.Value);
			}
		}
	}
}

OLD_SA_Card/OldSa_CardTraits.dll

Decompiled a day ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using OLD_SA.Dialogue;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_CardTraits")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_CardTraits")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("4ebfbc44-c273-4a7d-92ed-5b86f52380fa")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.CardTraits;

public static class CardTrait
{
	public const string Featherless = "OLD_SA_Featherless";

	public const string Jackal = "OLD_SA_Jackal";

	public const string WeakHatchling = "OLD_SA_WeakHatchling";

	public const string Infinite = "OLD_SA_Infinite";
}
public static class CardTraitAPI
{
	public static HashSet<string> TriggeredTraitDialogues = new HashSet<string>();

	public static bool ShouldTriggerDialogue(string dialogueID)
	{
		if (string.IsNullOrEmpty(dialogueID))
		{
			return false;
		}
		if (TriggeredTraitDialogues.Contains(dialogueID))
		{
			return false;
		}
		TriggeredTraitDialogues.Add(dialogueID);
		OLD_SA_SaveManager.Save();
		return true;
	}

	public static List<string> GetTriggeredDialogues()
	{
		return new List<string>(TriggeredTraitDialogues);
	}

	public static void LoadTriggeredDialogues(List<string> data)
	{
		TriggeredTraitDialogues.Clear();
		if (data == null)
		{
			return;
		}
		foreach (string datum in data)
		{
			if (!string.IsNullOrEmpty(datum))
			{
				TriggeredTraitDialogues.Add(datum);
			}
		}
	}

	public static void ClearTriggeredDialogues()
	{
		TriggeredTraitDialogues.Clear();
	}
}
public static class CardTraitConditionAPI
{
	private static Dictionary<string, string> RequiredAdjacent = new Dictionary<string, string>();

	public static void RegisterAdjacentRequirement(string trait, string cardName)
	{
		RequiredAdjacent[trait] = cardName;
	}

	public static bool CheckAdjacentRequirement(PlayableCard card, string trait)
	{
		if (!RequiredAdjacent.ContainsKey(trait))
		{
			return true;
		}
		string text = RequiredAdjacent[trait];
		foreach (CardSlot adjacentSlot in Singleton<BoardManager>.Instance.GetAdjacentSlots(card.Slot))
		{
			if ((Object)(object)adjacentSlot.Card != (Object)null && ((Object)((Card)adjacentSlot.Card).Info).name == text)
			{
				return true;
			}
		}
		return false;
	}
}
public static class CardTraitDialogueManager
{
	public static IEnumerator TryTrigger(PlayableCard card)
	{
		if (!((Object)(object)card == (Object)null) && !((Object)(object)((Card)card).Info == (Object)null))
		{
			string dialogueID = CardExtensions.GetExtendedProperty(((Card)card).Info, "OLD_SA_TraitDialogueID");
			string dialogue = CardExtensions.GetExtendedProperty(((Card)card).Info, "OLD_SA_TraitDialogue");
			yield return TryTrigger(dialogueID, dialogue);
		}
	}

	public static IEnumerator TryTrigger(string dialogueID, string dialogue)
	{
		if (!string.IsNullOrEmpty(dialogueID) && !string.IsNullOrEmpty(dialogue) && !CardTraitDialogueSaveData.HasTriggered(dialogueID))
		{
			yield return Singleton<TextDisplayer>.Instance.ShowUntilInput(dialogue, -0.65f, 0.4f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true);
			CardTraitDialogueSaveData.AddTriggered(dialogueID);
		}
	}
}
public static class CardTraitDialogueQueue
{
	private static string id;

	private static string text;

	public static void Add(string dialogueID, string dialogue)
	{
		if (!string.IsNullOrEmpty(dialogueID) && !string.IsNullOrEmpty(dialogue))
		{
			id = dialogueID;
			text = dialogue;
		}
	}

	public static bool HasDialogue()
	{
		return !string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(text);
	}

	public static IEnumerator Play()
	{
		if (HasDialogue())
		{
			string currentID = id;
			string currentText = text;
			id = null;
			text = null;
			yield return Singleton<TextDisplayer>.Instance.ShowUntilInput(currentText, -0.65f, 0.4f, (Emotion)0, (LetterAnimation)0, (Speaker)0, (string[])null, true);
			CardTraitDialogueSaveData.AddTriggered(currentID);
		}
	}
}
public class CardTraitDialogueRunner : MonoBehaviour
{
	private static CardTraitDialogueRunner instance;

	private bool playing;

	public static CardTraitDialogueRunner Instance
	{
		get
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			if ((Object)(object)instance == (Object)null)
			{
				GameObject val = new GameObject("CardTraitDialogueRunner");
				Object.DontDestroyOnLoad((Object)(object)val);
				instance = val.AddComponent<CardTraitDialogueRunner>();
			}
			return instance;
		}
	}

	public void Queue(string dialogueID, string dialogue)
	{
		CardTraitDialogueQueue.Add(dialogueID, dialogue);
	}

	private void Update()
	{
		if (!playing && CardTraitDialogueQueue.HasDialogue())
		{
			((MonoBehaviour)this).StartCoroutine(PlayQueue());
		}
	}

	private IEnumerator PlayQueue()
	{
		playing = true;
		yield return CardTraitDialogueQueue.Play();
		playing = false;
	}
}
public static class CardTraitDialogueSaveData
{
	private static HashSet<string> Triggered = new HashSet<string>();

	public static bool HasTriggered(string id)
	{
		if (string.IsNullOrEmpty(id))
		{
			return false;
		}
		return Triggered.Contains(id);
	}

	public static void AddTriggered(string id)
	{
		if (!string.IsNullOrEmpty(id) && !Triggered.Contains(id))
		{
			Triggered.Add(id);
		}
	}

	public static void Remove(string id)
	{
		if (!string.IsNullOrEmpty(id))
		{
			Triggered.Remove(id);
		}
	}

	public static void Clear()
	{
		Triggered.Clear();
	}

	public static List<string> GetSaveList()
	{
		return new List<string>(Triggered);
	}

	public static void LoadFromList(List<string> data)
	{
		Triggered.Clear();
		if (data == null)
		{
			return;
		}
		foreach (string datum in data)
		{
			if (!string.IsNullOrEmpty(datum))
			{
				Triggered.Add(datum);
			}
		}
	}
}
[HarmonyPatch(typeof(PlayableCard), "AddTemporaryMod")]
public static class CardTraitFlyingPatch
{
	[HarmonyPrefix]
	public static bool Prefix(PlayableCard __instance, CardModificationInfo mod)
	{
		if ((Object)(object)__instance == (Object)null || (Object)(object)((Card)__instance).Info == (Object)null || mod == null || mod.abilities == null)
		{
			return true;
		}
		if (!mod.abilities.Contains((Ability)19))
		{
			return true;
		}
		if (mod.singletonId == "wind_blessing_flying")
		{
			return true;
		}
		if (!CardTraitHelper.HasTrait(__instance, "OLD_SA_Featherless"))
		{
			return true;
		}
		((MonoBehaviour)__instance).StartCoroutine(CardTraitDialogueManager.TryTrigger(__instance));
		mod.abilities.Remove((Ability)19);
		if (mod.abilities.Count == 0 && mod.attackAdjustment == 0 && mod.healthAdjustment == 0 && (mod.negateAbilities == null || mod.negateAbilities.Count == 0))
		{
			return false;
		}
		return true;
	}
}
public static class CardTraitHelper
{
	public static bool HasTrait(PlayableCard card, string trait)
	{
		if ((Object)(object)card == (Object)null || (Object)(object)((Card)card).Info == (Object)null)
		{
			return false;
		}
		if (CardExtensions.GetExtendedProperty(((Card)card).Info, trait) == "true")
		{
			return true;
		}
		foreach (CardModificationInfo mod in ((Card)card).Info.Mods)
		{
			if (mod.singletonId == trait)
			{
				return true;
			}
		}
		foreach (CardModificationInfo temporaryMod in card.TemporaryMods)
		{
			if (temporaryMod.singletonId == trait)
			{
				return true;
			}
		}
		return false;
	}
}
[HarmonyPatch(typeof(DeckInfo), "ModifyCard")]
public static class FeatherlessDeckModifyPatch
{
	[HarmonyPrefix]
	public static bool Prefix(CardInfo card, CardModificationInfo mod)
	{
		//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f7: Invalid comparison between Unknown and I4
		if ((Object)(object)card == (Object)null || mod == null || mod.abilities == null)
		{
			return true;
		}
		if (!mod.abilities.Contains((Ability)19))
		{
			return true;
		}
		if (CardExtensions.GetExtendedProperty(card, "OLD_SA_Featherless") != "true")
		{
			return true;
		}
		mod.abilities.Remove((Ability)19);
		string extendedProperty = CardExtensions.GetExtendedProperty(card, "OLD_SA_TraitDialogueID");
		string extendedProperty2 = CardExtensions.GetExtendedProperty(card, "OLD_SA_TraitDialogue");
		CardTraitDialogueQueue.Add(extendedProperty, extendedProperty2);
		if (mod.abilities.Count == 0 && mod.attackAdjustment == 0 && mod.healthAdjustment == 0 && (mod.negateAbilities == null || mod.negateAbilities.Count == 0) && (mod.addGemCost == null || mod.addGemCost.Count == 0) && (mod.specialAbilities == null || mod.specialAbilities.Count == 0) && (int)mod.statIcon == 0)
		{
			return false;
		}
		return true;
	}
}
[HarmonyPatch(typeof(RandomAbility), "ChooseAbility")]
public static class FeatherlessRandomAbilityPatch
{
	[HarmonyPostfix]
	public static void Postfix(RandomAbility __instance, ref Ability __result)
	{
		//IL_00db: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e1: Expected I4, but got Unknown
		if ((Object)(object)__instance == (Object)null)
		{
			return;
		}
		PlayableCard card = Traverse.Create((object)__instance).Field("Card").GetValue<PlayableCard>();
		if (!((Object)(object)card == (Object)null) && !((Object)(object)((Card)card).Info == (Object)null) && CardTraitHelper.HasTrait(card, "OLD_SA_Featherless") && (int)__result == 19)
		{
			List<Ability> learnedAbilities = AbilitiesUtil.GetLearnedAbilities(false, 0, 5, (AbilityMetaCategory)1);
			learnedAbilities.Remove((Ability)19);
			learnedAbilities.RemoveAll((Ability x) => card.HasAbility(x));
			if (learnedAbilities.Count > 0)
			{
				__result = (Ability)(int)learnedAbilities[SeededRandom.Range(0, learnedAbilities.Count, SaveManager.SaveFile.GetCurrentRandomSeed())];
			}
			else
			{
				__result = (Ability)15;
			}
		}
	}
}
[HarmonyPatch(typeof(PlayableCard), "AddTemporaryMod")]
public static class InfinitePermanentStatsPatch
{
	[HarmonyPrefix]
	public static bool Prefix(PlayableCard __instance, CardModificationInfo mod)
	{
		//IL_0088: Unknown result type (might be due to invalid IL or missing references)
		//IL_008e: Expected O, but got Unknown
		if ((Object)(object)__instance == (Object)null || (Object)(object)((Card)__instance).Info == (Object)null || mod == null)
		{
			return true;
		}
		if (!CardTraitHelper.HasTrait(__instance, "OLD_SA_Infinite"))
		{
			return true;
		}
		int num = ((mod.attackAdjustment > 0) ? mod.attackAdjustment : 0);
		int num2 = ((mod.healthAdjustment > 0) ? mod.healthAdjustment : 0);
		if (num == 0 && num2 == 0)
		{
			return true;
		}
		CardModificationInfo val = new CardModificationInfo();
		val.attackAdjustment = num;
		val.healthAdjustment = num2;
		((Card)__instance).Info.Mods.Add(val);
		mod.attackAdjustment -= num;
		mod.healthAdjustment -= num2;
		if (mod.attackAdjustment != 0 || mod.healthAdjustment != 0 || mod.bloodCostAdjustment != 0 || mod.bonesCostAdjustment != 0 || mod.energyCostAdjustment != 0 || mod.gemify || mod.fromOverclock || (mod.abilities != null && mod.abilities.Count > 0) || (mod.negateAbilities != null && mod.negateAbilities.Count > 0))
		{
			return true;
		}
		return false;
	}
}
public static class JackalFusionManager
{
	public static void ReplaceDeckCards(CardInfo jackal, CardInfo wolf, CardInfo result)
	{
		if (RunState.Run == null)
		{
			return;
		}
		DeckInfo playerDeck = RunState.Run.playerDeck;
		if (playerDeck == null)
		{
			return;
		}
		if ((Object)(object)jackal != (Object)null)
		{
			((CardCollectionInfo)playerDeck).RemoveCardByName(((Object)jackal).name);
		}
		if ((Object)(object)wolf != (Object)null)
		{
			((CardCollectionInfo)playerDeck).RemoveCardByName(((Object)wolf).name);
		}
		if ((Object)(object)result != (Object)null)
		{
			((CardCollectionInfo)playerDeck).AddCard(result);
		}
		foreach (CardInfo card in ((CardCollectionInfo)playerDeck).Cards)
		{
		}
	}
}
public static class JackalTraitAPI
{
	public const string Trait = "OLD_SA_Jackal";

	public const string ConditionCard = "OLD_SA_TraitConditionCard";

	public const string TransformCard = "OLD_SA_TraitTransformCard";

	public const string DialogueID = "OLD_SA_TraitDialogueID";

	public const string Dialogue = "OLD_SA_TraitDialogue";

	public static string GetConditionCard(PlayableCard card)
	{
		if (!CardTraitHelper.HasTrait(card, "OLD_SA_Jackal"))
		{
			return null;
		}
		return CardExtensions.GetExtendedProperty(((Card)card).Info, "OLD_SA_TraitConditionCard");
	}

	public static string GetTransformCard(PlayableCard card)
	{
		if (!CardTraitHelper.HasTrait(card, "OLD_SA_Jackal"))
		{
			return null;
		}
		return CardExtensions.GetExtendedProperty(((Card)card).Info, "OLD_SA_TraitTransformCard");
	}

	public static string GetDialogueID(PlayableCard card)
	{
		if (!CardTraitHelper.HasTrait(card, "OLD_SA_Jackal"))
		{
			return null;
		}
		return CardExtensions.GetExtendedProperty(((Card)card).Info, "OLD_SA_TraitDialogueID");
	}

	public static string GetDialogue(PlayableCard card)
	{
		if (!CardTraitHelper.HasTrait(card, "OLD_SA_Jackal"))
		{
			return null;
		}
		return CardExtensions.GetExtendedProperty(((Card)card).Info, "OLD_SA_TraitDialogue");
	}
}
public static class JackalTraitPatch
{
	private static bool transforming;

	public static IEnumerator CheckJackalFusion()
	{
		if (transforming || (Object)(object)Singleton<BoardManager>.Instance == (Object)null)
		{
			yield break;
		}
		foreach (CardSlot slot in Singleton<BoardManager>.Instance.GetSlots(true))
		{
			if ((Object)(object)slot.Card == (Object)null)
			{
				continue;
			}
			PlayableCard jackal = slot.Card;
			if (CardTraitHelper.HasTrait(jackal, "OLD_SA_Jackal"))
			{
				PlayableCard wolf = FindWolf(jackal);
				if ((Object)(object)wolf != (Object)null)
				{
					yield return Fusion(jackal, wolf);
					yield break;
				}
			}
		}
	}

	private static PlayableCard FindWolf(PlayableCard jackal)
	{
		foreach (CardSlot adjacentSlot in Singleton<BoardManager>.Instance.GetAdjacentSlots(jackal.Slot))
		{
			if ((Object)(object)adjacentSlot.Card == (Object)null || !(((Object)((Card)adjacentSlot.Card).Info).name == JackalTraitAPI.GetConditionCard(jackal)))
			{
				continue;
			}
			return adjacentSlot.Card;
		}
		return null;
	}

	private static IEnumerator Fusion(PlayableCard jackal, PlayableCard wolf)
	{
		transforming = true;
		CardInfo result = CardLoader.GetCardByName(JackalTraitAPI.GetTransformCard(jackal));
		if ((Object)(object)result == (Object)null)
		{
			transforming = false;
			yield break;
		}
		CardSlot spawnSlot = jackal.Slot;
		CardInfo jackalInfo = ((Card)jackal).Info;
		CardInfo wolfInfo = ((Card)wolf).Info;
		yield return CardTraitDialogueManager.TryTrigger(jackal);
		if ((Object)(object)jackal != (Object)null)
		{
			((Card)jackal).Anim.ExitBoard(0.5f, Vector3.zero);
		}
		if ((Object)(object)wolf != (Object)null)
		{
			((Card)wolf).Anim.ExitBoard(0.5f, Vector3.zero);
		}
		yield return (object)new WaitForSeconds(0.6f);
		if ((Object)(object)jackal != (Object)null)
		{
			Object.Destroy((Object)(object)((Component)jackal).gameObject);
		}
		if ((Object)(object)wolf != (Object)null)
		{
			Object.Destroy((Object)(object)((Component)wolf).gameObject);
		}
		yield return (object)new WaitForSeconds(0.2f);
		yield return Singleton<BoardManager>.Instance.CreateCardInSlot(result, spawnSlot, 0.1f, true);
		JackalFusionManager.ReplaceDeckCards(jackalInfo, wolfInfo, result);
		transforming = false;
	}
}
[HarmonyPatch(typeof(BoardManager), "AssignCardToSlot")]
public static class JackalFusionTriggerPatch
{
	public static IEnumerator Postfix(IEnumerator __result)
	{
		while (__result.MoveNext())
		{
			yield return __result.Current;
		}
		yield return (object)new WaitForSeconds(0.05f);
		if (HasJackalOnBoard())
		{
			yield return JackalTraitPatch.CheckJackalFusion();
		}
	}

	private static bool HasJackalOnBoard()
	{
		if ((Object)(object)Singleton<BoardManager>.Instance == (Object)null)
		{
			return false;
		}
		foreach (CardSlot slot in Singleton<BoardManager>.Instance.GetSlots(true))
		{
			if ((Object)(object)slot.Card == (Object)null || !CardTraitHelper.HasTrait(slot.Card, "OLD_SA_Jackal"))
			{
				continue;
			}
			return true;
		}
		return false;
	}
}
[BepInPlugin("OLD_SA.CardTraits", "OLD SA CardTraits", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Expected O, but got Unknown
		Harmony val = new Harmony("OLD_SA.CardTraits");
		val.PatchAll();
		_ = CardTraitDialogueRunner.Instance;
		((BaseUnityPlugin)this).Logger.LogInfo((object)"OLD SA CardTraits Loaded");
	}
}
[HarmonyPatch(typeof(Evolve), "OnUpkeep")]
public static class WeakHatchlingPatch
{
	private static readonly FieldRef<Evolve, int> NumTurnsInPlay = AccessTools.FieldRefAccess<Evolve, int>("numTurnsInPlay");

	private static readonly MethodInfo PreSuccessfulTriggerSequenceMethod = AccessTools.Method(typeof(AbilityBehaviour), "PreSuccessfulTriggerSequence", (Type[])null, (Type[])null);

	[HarmonyPrefix]
	public static bool Prefix(Evolve __instance, bool playerUpkeep, ref IEnumerator __result)
	{
		if ((Object)(object)__instance == (Object)null)
		{
			return true;
		}
		PlayableCard card = GetCard(__instance);
		if ((Object)(object)card == (Object)null || !CardTraitHelper.HasTrait(card, "OLD_SA_WeakHatchling"))
		{
			return true;
		}
		__result = WeakHatchlingOnUpkeep(__instance, card, playerUpkeep);
		return false;
	}

	private static PlayableCard GetCard(Evolve evolve)
	{
		if ((Object)(object)evolve == (Object)null)
		{
			return null;
		}
		PropertyInfo propertyInfo = AccessTools.Property(typeof(AbilityBehaviour), "Card");
		if (propertyInfo == null)
		{
			return null;
		}
		object? value = propertyInfo.GetValue(evolve, null);
		return (PlayableCard)((value is PlayableCard) ? value : null);
	}

	private static IEnumerator WeakHatchlingOnUpkeep(Evolve evolve, PlayableCard card, bool playerUpkeep)
	{
		if (!((Object)(object)evolve == (Object)null) && !((Object)(object)card == (Object)null) && !card.Dead && card.OpponentCard != playerUpkeep)
		{
			int turnsToEvolve = ((!((Object)(object)((Card)card).Info != (Object)null) || ((Card)card).Info.evolveParams == null) ? 1 : ((Card)card).Info.evolveParams.turnsToEvolve);
			int numTurnsInPlay = NumTurnsInPlay.Invoke(evolve);
			numTurnsInPlay++;
			NumTurnsInPlay.Invoke(evolve) = numTurnsInPlay;
			int remaining = Mathf.Max(1, turnsToEvolve - numTurnsInPlay);
			((Card)card).RenderInfo.OverrideAbilityIcon((Ability)5, ResourceBank.Get<Texture>("Art/Cards/AbilityIcons/ability_evolve_" + remaining));
			((Card)card).RenderCard();
			if (numTurnsInPlay >= turnsToEvolve)
			{
				yield return InvokePreSuccessfulTriggerSequence(evolve);
				CardModificationInfo growth = new CardModificationInfo
				{
					attackAdjustment = 1,
					healthAdjustment = 1,
					singletonId = "OLD_SA_WeakHatchling_Growth"
				};
				card.AddTemporaryMod(growth);
				RemoveEvolve(card);
				((Card)card).RenderCard();
				card.OnStatsChanged();
				card.UpdateFaceUpOnBoardEffects();
				yield return CardTraitDialogueManager.TryTrigger(card);
			}
		}
	}

	private static IEnumerator InvokePreSuccessfulTriggerSequence(Evolve evolve)
	{
		if ((Object)(object)evolve == (Object)null || PreSuccessfulTriggerSequenceMethod == null)
		{
			yield break;
		}
		object result = PreSuccessfulTriggerSequenceMethod.Invoke(evolve, null);
		if (result is IEnumerator sequence)
		{
			while (sequence.MoveNext())
			{
				yield return sequence.Current;
			}
		}
	}

	private static void RemoveEvolve(PlayableCard card)
	{
		if ((Object)(object)card == (Object)null)
		{
			return;
		}
		if ((Object)(object)card.TriggerHandler != (Object)null)
		{
			card.TriggerHandler.RemoveAbility((Ability)5);
		}
		while (true)
		{
			CardModificationInfo val = null;
			foreach (CardModificationInfo temporaryMod in card.TemporaryMods)
			{
				if (temporaryMod == null || temporaryMod.abilities == null || !temporaryMod.abilities.Contains((Ability)5))
				{
					continue;
				}
				val = temporaryMod;
				break;
			}
			if (val == null)
			{
				break;
			}
			card.RemoveTemporaryMod(val, true);
		}
	}
}

OLD_SA_Card/OldSa_Tribes.dll

Decompiled a day ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using DiskCardGame;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Tribes")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Tribes")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("408b1661-bdcd-4b4d-85b7-bcdbe1090f1a")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.Tribes;

[BepInPlugin("OLD_SA.Tribes", "OLD SA Tribes", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	public static ManualLogSource Log;

	private void Awake()
	{
		Log = ((BaseUnityPlugin)this).Logger;
		Log.LogInfo((object)"OLD SA Tribes loading...");
		TribesAPI.Init();
		Log.LogInfo((object)"OLD SA Tribes loaded.");
	}
}
public static class TribesAPI
{
	public static Tribe Feline;

	public static Tribe Plant;

	public static Tribe Crustacean;

	public static void Init()
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0039: Unknown result type (might be due to invalid IL or missing references)
		//IL_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0081: Unknown result type (might be due to invalid IL or missing references)
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		Feline = TribeManager.Add("OLD_SA", "Feline", TextureHelper.GetImageAsTexture("OldSa_Feline.png", (FilterMode)0), true, (Texture2D)null);
		Plant = TribeManager.Add("OLD_SA", "Plant", TextureHelper.GetImageAsTexture("OldSa_Plant.png", (FilterMode)0), true, (Texture2D)null);
		Crustacean = TribeManager.Add("OLD_SA", "Crustacean", TextureHelper.GetImageAsTexture("OldSa_Crustacean.png", (FilterMode)0), true, (Texture2D)null);
		CardInfo cardByName = CardLoader.GetCardByName("Cat");
		if ((Object)(object)cardByName != (Object)null && !cardByName.tribes.Contains(Feline))
		{
			cardByName.tribes.Add(Feline);
		}
	}
}

Sigil/OldSa_Blessing.dll

Decompiled a day ago
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Blessing")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Blessing")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("6d19ef0e-8b62-4cde-b8c7-49a209400275")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.Blessing;

public static class BlessingEffectManager
{
	private static readonly Dictionary<BlessingType, IBlessingEffect> Effects = new Dictionary<BlessingType, IBlessingEffect>();

	public static void Register(BlessingType type, IBlessingEffect effect)
	{
		Effects[type] = effect;
	}

	public static IBlessingEffect GetEffect(BlessingType type)
	{
		if (Effects.TryGetValue(type, out var value))
		{
			return value;
		}
		return null;
	}

	public static void Apply(PlayableCard card, BlessingType type)
	{
		GetEffect(type)?.Apply(card);
	}
}
public static class BlessingManager
{
	private static readonly Dictionary<PlayableCard, List<BlessingType>> Blessings = new Dictionary<PlayableCard, List<BlessingType>>();

	public static void AddBlessing(PlayableCard card, BlessingType type)
	{
		if (!((Object)(object)card == (Object)null))
		{
			if (!Blessings.ContainsKey(card))
			{
				Blessings.Add(card, new List<BlessingType>());
			}
			if (!Blessings[card].Contains(type))
			{
				Blessings[card].Add(type);
			}
		}
	}

	public static bool HasBlessing(PlayableCard card, BlessingType type)
	{
		if ((Object)(object)card == (Object)null)
		{
			return false;
		}
		if (!Blessings.ContainsKey(card))
		{
			return false;
		}
		return Blessings[card].Contains(type);
	}

	public static void RemoveBlessing(PlayableCard card, BlessingType type)
	{
		if (!((Object)(object)card == (Object)null) && Blessings.ContainsKey(card))
		{
			Blessings[card].Remove(type);
		}
	}

	public static void ClearCard(PlayableCard card)
	{
		if (!((Object)(object)card == (Object)null))
		{
			Blessings.Remove(card);
		}
	}

	public static void ClearAll()
	{
		Blessings.Clear();
	}
}
public static class BlessingRegister
{
	public static void Register()
	{
		BlessingEffectManager.Register(BlessingType.Wind, new WindBlessingEffect());
	}
}
public enum BlessingType
{
	Wind,
	Fire,
	Water,
	Earth
}
public interface IBlessingEffect
{
	void Apply(PlayableCard card);

	void Remove(PlayableCard card);
}
[BepInPlugin("OLD_SA.Blessing", "OLD SA Blessing", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	public static Plugin Instance;

	private Harmony harmony;

	private void Awake()
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Expected O, but got Unknown
		Instance = this;
		harmony = new Harmony("OLD_SA.Blessing");
		harmony.PatchAll();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"[OLD_SA.Blessing] Loaded.");
	}
}
public class WindBlessingEffect : IBlessingEffect
{
	public void Apply(PlayableCard card)
	{
		if (!((Object)(object)card == (Object)null))
		{
			WindBlessingRuntime.Add(card);
			card.UpdateFaceUpOnBoardEffects();
		}
	}

	public void Remove(PlayableCard card)
	{
		if (!((Object)(object)card == (Object)null))
		{
			WindBlessingRuntime.Remove(card);
			card.UpdateFaceUpOnBoardEffects();
		}
	}
}
[HarmonyPatch(typeof(PlayableCard), "HasAbility")]
public static class WindBlessingHasAbilityPatch
{
	public static void Postfix(PlayableCard __instance, Ability ability, ref bool __result)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0004: Invalid comparison between Unknown and I4
		if ((int)ability == 19 && WindBlessingRuntime.HasWind(__instance))
		{
			__result = true;
		}
	}
}
public static class WindBlessingRuntime
{
	private static readonly HashSet<PlayableCard> WindCards = new HashSet<PlayableCard>();

	public static void Add(PlayableCard card)
	{
		if (!((Object)(object)card == (Object)null))
		{
			WindCards.Add(card);
		}
	}

	public static void Remove(PlayableCard card)
	{
		if (!((Object)(object)card == (Object)null))
		{
			WindCards.Remove(card);
		}
	}

	public static bool HasWind(PlayableCard card)
	{
		if ((Object)(object)card == (Object)null)
		{
			return false;
		}
		return WindCards.Contains(card);
	}

	public static void RemoveDeadCards()
	{
		WindCards.RemoveWhere((PlayableCard card) => (Object)(object)card == (Object)null || card.Dead);
	}

	public static void Clear()
	{
		WindCards.Clear();
	}
}
[HarmonyPatch(typeof(PlayableCard), "OnUpkeep")]
public static class WindBlessingUpkeepPatch
{
	public static void Postfix(PlayableCard __instance, bool playerUpkeep)
	{
		if (!((Object)(object)__instance == (Object)null) && __instance.OpponentCard == playerUpkeep && WindBlessingRuntime.HasWind(__instance))
		{
			WindBlessingRuntime.Remove(__instance);
			__instance.UpdateFaceUpOnBoardEffects();
			((Card)__instance).RenderCard();
		}
	}
}

Sigil/OldSa_Blood Strike_sigil.dll

Decompiled a day ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using Pixelplacement;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Blood Strike_sigil")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Blood Strike_sigil")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("5220cd9b-f564-40be-bae0-549090a841ec")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.BloodStrike;

public static class BloodStrikeAPI
{
	public static FullAbility ability;

	public static void Init()
	{
		AbilityInfo val = ScriptableObject.CreateInstance<AbilityInfo>();
		((Object)val).name = "Blood Strike";
		val.rulebookName = "Blood Strike";
		val.metaCategories = new List<AbilityMetaCategory>
		{
			(AbilityMetaCategory)0,
			(AbilityMetaCategory)1
		};
		val.powerLevel = 5;
		val.opponentUsable = true;
		val.canStack = false;
		Texture imageAsTexture = (Texture)(object)TextureHelper.GetImageAsTexture("OldSa_Blood_Strike.png", (FilterMode)0);
		FieldInfo field = typeof(AbilityInfo).GetField("rulebookDescription", BindingFlags.Instance | BindingFlags.NonPublic);
		if (field != null)
		{
			field.SetValue(val, "When [creature] kills another creature, it attacks again.");
		}
		ability = AbilityManager.Add("OLD_SA", val, typeof(BloodStrikeBehaviour), imageAsTexture);
	}
}
public class BloodStrikeBehaviour : AbilityBehaviour
{
	public override Ability Ability => BloodStrikeAPI.ability.Id;

	public override bool RespondsToOtherCardDie(PlayableCard card, CardSlot deathSlot, bool fromCombat, PlayableCard killer)
	{
		return (Object)(object)killer == (Object)(object)((AbilityBehaviour)this).Card;
	}

	public override IEnumerator OnOtherCardDie(PlayableCard card, CardSlot deathSlot, bool fromCombat, PlayableCard killer)
	{
		yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
		if ((Object)(object)((AbilityBehaviour)this).Card == (Object)null || ((AbilityBehaviour)this).Card.Dead || (Object)(object)((AbilityBehaviour)this).Card.Slot == (Object)null)
		{
			yield break;
		}
		CardSlot attackingSlot = ((AbilityBehaviour)this).Card.Slot;
		CardSlot opposingSlot = attackingSlot.opposingSlot;
		if ((Object)(object)opposingSlot == (Object)null)
		{
			yield break;
		}
		CombatPhaseManager combat = Singleton<CombatPhaseManager>.Instance;
		if (!((Object)(object)combat == (Object)null))
		{
			int damageBefore = combat.DamageDealtThisPhase;
			yield return combat.SlotAttackSlot(attackingSlot, opposingSlot, 0f);
			int damageAfter = combat.DamageDealtThisPhase;
			int directDamage = damageAfter - damageBefore;
			if (directDamage > 0)
			{
				yield return MoveDamageWeightsToScales(combat, attackingSlot.IsPlayerSlot);
				yield return Singleton<LifeManager>.Instance.ShowDamageSequence(directDamage, directDamage, !attackingSlot.IsPlayerSlot, 0f, (GameObject)null, 0f, true);
			}
			yield return ((AbilityBehaviour)this).LearnAbility(0.25f);
		}
	}

	private IEnumerator MoveDamageWeightsToScales(CombatPhaseManager combat, bool playerIsAttacker)
	{
		CombatPhaseManager3D combat3D = (CombatPhaseManager3D)(object)((combat is CombatPhaseManager3D) ? combat : null);
		if ((Object)(object)combat3D == (Object)null)
		{
			yield return (object)new WaitForSeconds(0.25f);
			yield break;
		}
		FieldInfo field = typeof(CombatPhaseManager3D).GetField("damageWeights", BindingFlags.Instance | BindingFlags.NonPublic);
		if (field == null)
		{
			yield return (object)new WaitForSeconds(0.25f);
			yield break;
		}
		if (!(field.GetValue(combat3D) is List<Transform> damageWeights))
		{
			yield return (object)new WaitForSeconds(0.25f);
			yield break;
		}
		if ((Object)(object)Singleton<LifeManager>.Instance.Scales3D != (Object)null)
		{
			Vector3 scalesPos = (playerIsAttacker ? Singleton<LifeManager>.Instance.Scales3D.OpponentSide : Singleton<LifeManager>.Instance.Scales3D.PlayerSide);
			foreach (Transform transform in damageWeights)
			{
				if ((Object)(object)transform != (Object)null)
				{
					Tween.Position(transform, scalesPos, 0.2f, 0f, Tween.EaseOut, (LoopType)0, (Action)null, (Action)null, true);
					Object.Destroy((Object)(object)((Component)transform).gameObject, 0.2f);
				}
				yield return (object)new WaitForSeconds(0.02f);
			}
		}
		else
		{
			foreach (Transform transform2 in damageWeights)
			{
				if ((Object)(object)transform2 != (Object)null)
				{
					Part1Scales.DissolveWeight(((Component)transform2).gameObject);
				}
				yield return (object)new WaitForSeconds(0.02f);
			}
		}
		yield return (object)new WaitForSeconds(0.25f);
		damageWeights.Clear();
	}
}
[BepInPlugin("OLD_SA.BloodStrike", "OLD SA Blood Strike", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Expected O, but got Unknown
		Harmony val = new Harmony("OLD_SA.BloodStrike");
		val.PatchAll();
		BloodStrikeAPI.Init();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"OLD SA Blood Strike Loaded");
	}
}

Sigil/OldSa_BloodRecompense_sigil.dll

Decompiled a day ago
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using OLD_SA.Dialogue;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Blood Recompense")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Blood Recompense")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("cc6d3245-7eca-4c79-b54b-b4a2e4110b2f")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace BloodRecompense;

public static class BloodRecompenseAPI
{
	private static bool initialized = false;

	public const string DefaultSpawnCard = "Squirrel";

	private static Dictionary<PlayableCard, PlayableCard> DamageSources = new Dictionary<PlayableCard, PlayableCard>();

	public static void RegisterDamageSource(PlayableCard target, PlayableCard attacker)
	{
		if (!((Object)(object)target == (Object)null) && !((Object)(object)attacker == (Object)null))
		{
			DamageSources[target] = attacker;
		}
	}

	public static bool WasKilledBy(PlayableCard dead, PlayableCard killer)
	{
		if ((Object)(object)dead == (Object)null || (Object)(object)killer == (Object)null)
		{
			return false;
		}
		if (DamageSources.TryGetValue(dead, out var value))
		{
			return (Object)(object)value == (Object)(object)killer;
		}
		return false;
	}

	public static void ClearDamageSource(PlayableCard card)
	{
		if (!((Object)(object)card == (Object)null))
		{
			DamageSources.Remove(card);
		}
	}

	public static void Init()
	{
		if (!initialized)
		{
			BloodRecompenseBehaviour.Init();
			initialized = true;
		}
	}

	public static bool HasBloodRecompense(CardInfo info)
	{
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)info == (Object)null)
		{
			return false;
		}
		return info.Abilities.Contains(BloodRecompenseBehaviour.ability);
	}

	public static BloodRecompenseResult GetResult(PlayableCard card)
	{
		if ((Object)(object)card == (Object)null)
		{
			return null;
		}
		string text = "Squirrel";
		BloodRecompenseInfo bloodRecompenseInfo = ((Card)card).Info.GetBloodRecompenseInfo();
		if (bloodRecompenseInfo != null && !string.IsNullOrEmpty(bloodRecompenseInfo.SpawnCard))
		{
			text = bloodRecompenseInfo.SpawnCard;
		}
		CardInfo cardByName = CardLoader.GetCardByName(text);
		if ((Object)(object)cardByName == (Object)null)
		{
			return null;
		}
		return new BloodRecompenseResult(cardByName);
	}
}
public static class BloodRecompenseExtensions
{
	private const string InfoKey = "OLD_SA.BloodRecompenseInfo";

	public static void AddBloodRecompense(this CardInfo card)
	{
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Invalid comparison between Unknown and I4
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Expected I4, but got Unknown
		if (!((Object)(object)card == (Object)null))
		{
			if ((int)BloodRecompenseBehaviour.ability == 0)
			{
				BloodRecompenseAPI.Init();
			}
			if (!card.Abilities.Contains(BloodRecompenseBehaviour.ability))
			{
				CardExtensions.AddAbilities(card, (Ability[])(object)new Ability[1] { (Ability)(int)BloodRecompenseBehaviour.ability });
			}
		}
	}

	public static void AddBloodRecompense(this CardInfo card, string spawnCard)
	{
		if (!((Object)(object)card == (Object)null))
		{
			card.AddBloodRecompense();
			if (!string.IsNullOrEmpty(spawnCard))
			{
				card.SetBloodRecompenseInfo(new BloodRecompenseInfo(spawnCard));
			}
		}
	}

	public static void SetBloodRecompenseInfo(this CardInfo card, BloodRecompenseInfo info)
	{
		if (!((Object)(object)card == (Object)null) && info != null && !string.IsNullOrEmpty(info.SpawnCard))
		{
			CardExtensions.SetExtendedProperty(card, "OLD_SA.BloodRecompenseInfo", (object)info.SpawnCard);
		}
	}

	public static BloodRecompenseInfo GetBloodRecompenseInfo(this CardInfo card)
	{
		if ((Object)(object)card == (Object)null)
		{
			return null;
		}
		string extendedProperty = CardExtensions.GetExtendedProperty(card, "OLD_SA.BloodRecompenseInfo");
		if (string.IsNullOrEmpty(extendedProperty))
		{
			return null;
		}
		return new BloodRecompenseInfo(extendedProperty);
	}
}
public class BloodRecompenseInfo
{
	public string SpawnCard { get; set; }

	public BloodRecompenseInfo(string card)
	{
		SpawnCard = card;
	}
}
public class BloodRecompenseResult
{
	public CardInfo Card { get; set; }

	public int Count { get; set; }

	public BloodRecompenseResult(CardInfo card)
	{
		Card = card;
		Count = 1;
	}
}
[HarmonyPatch(typeof(PlayableCard), "TakeDamage")]
public static class BloodRecompenseDamagePatch
{
	public static void Prefix(PlayableCard __instance, int damage, PlayableCard attacker)
	{
		if (!((Object)(object)__instance == (Object)null) && !((Object)(object)attacker == (Object)null))
		{
			BloodRecompenseAPI.RegisterDamageSource(__instance, attacker);
		}
	}
}
public static class BloodRecompenseManager
{
	public static bool Processing;
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.oldsa.BloodRecompense", "OLD_SA_BloodRecompense", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private static ManualLogSource Log;

	private void Awake()
	{
		Log = ((BaseUnityPlugin)this).Logger;
		Log.LogInfo((object)"OLD_SA_BloodRecompense Mod loaded successfully.");
		BloodRecompenseBehaviour.Init();
		Log.LogInfo((object)"Blood Recompense ability initialized.");
	}
}
public static class BloodRecompenseSpawnAPI
{
	public static IEnumerator SpawnToHand(CardInfo card)
	{
		if (!((Object)(object)card == (Object)null))
		{
			yield return Singleton<CardSpawner>.Instance.SpawnCardToHand(card, 0.5f);
		}
	}

	public static IEnumerator SpawnToHand(string cardName)
	{
		CardInfo card = CardLoader.GetCardByName(cardName);
		if (!((Object)(object)card == (Object)null))
		{
			yield return SpawnToHand(card);
		}
	}
}
public class BloodRecompenseBehaviour : AbilityBehaviour
{
	public static Ability ability;

	public override Ability Ability => ability;

	public static void Init()
	{
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
		AbilityInfo val = ScriptableObject.CreateInstance<AbilityInfo>();
		((Object)val).name = "BloodRecompense";
		val.rulebookName = "Blood Recompense";
		Texture imageAsTexture = (Texture)(object)TextureHelper.GetImageAsTexture("OldSa_Blood_Recompense.png", (FilterMode)0);
		Texture2D imageAsTexture2 = TextureHelper.GetImageAsTexture("OldSa_Blood_Recompense_px.png", (FilterMode)0);
		val.pixelIcon = Sprite.Create(imageAsTexture2, new Rect(0f, 0f, (float)((Texture)imageAsTexture2).width, (float)((Texture)imageAsTexture2).height), new Vector2(0.5f, 0.5f));
		FieldInfo field = typeof(AbilityInfo).GetField("rulebookDescription", BindingFlags.Instance | BindingFlags.NonPublic);
		if (field != null)
		{
			field.SetValue(val, "When [creature] eliminates another creature, the owner gains a specific card in their hand.");
		}
		val.metaCategories = new List<AbilityMetaCategory>
		{
			(AbilityMetaCategory)0,
			(AbilityMetaCategory)2,
			(AbilityMetaCategory)1,
			(AbilityMetaCategory)3
		};
		val.powerLevel = 3;
		val.opponentUsable = false;
		FullAbility val2 = AbilityManager.Add("OLD_SA", val, typeof(BloodRecompenseBehaviour), imageAsTexture);
		ability = val2.Id;
		Debug.Log((object)("Blood Recompense ability registered ID=" + ((object)Unsafe.As<Ability, Ability>(ref ability)/*cast due to .constrained prefix*/).ToString()));
	}

	public override bool RespondsToOtherCardDie(PlayableCard card, CardSlot deathSlot, bool fromCombat, PlayableCard killer)
	{
		return (Object)(object)killer == (Object)(object)((AbilityBehaviour)this).Card;
	}

	public override IEnumerator OnOtherCardDie(PlayableCard card, CardSlot deathSlot, bool fromCombat, PlayableCard killer)
	{
		yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
		BloodRecompenseResult result = BloodRecompenseAPI.GetResult(((AbilityBehaviour)this).Card);
		if (result != null && !((Object)(object)result.Card == (Object)null))
		{
			CardInfo spawn = (CardInfo)result.Card.Clone();
			ModifySpawnedCard(spawn);
			yield return BloodRecompenseSpawnAPI.SpawnToHand(spawn);
			Singleton<ViewManager>.Instance.SwitchToView((View)0, false, false);
			yield return (object)new WaitForSeconds(0.5f);
			yield return SigilDialogueAPI.ShowFirstTime("BloodRecompense", "A new cycle begins... Even death can give birth to new life.");
			if ((Object)(object)card != (Object)null)
			{
				BloodRecompenseAPI.ClearDamageSource(card);
			}
			Singleton<ViewManager>.Instance.SwitchToView((View)4, false, false);
		}
	}

	private void ModifySpawnedCard(CardInfo card)
	{
		//IL_0094: Unknown result type (might be due to invalid IL or missing references)
		//IL_009a: Expected O, but got Unknown
		List<Ability> list = new List<Ability>(((Card)((AbilityBehaviour)this).Card).Info.Abilities);
		foreach (CardModificationInfo temporaryMod in ((AbilityBehaviour)this).Card.TemporaryMods)
		{
			list.AddRange(temporaryMod.abilities);
		}
		list.RemoveAll((Ability x) => x == ability);
		if (list.Count != 0)
		{
			CardModificationInfo val = new CardModificationInfo();
			val.fromCardMerge = true;
			val.abilities = list;
			card.Mods.Add(val);
		}
	}
}

Sigil/OldSa_Bloodlust Rising_sigil.dll

Decompiled a day ago
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using OLD_SA.SmallSigils;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Bloodlust Rising_sigil")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Bloodlust Rising_sigil")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("c833c51f-3b0b-4b13-b19e-49596ad94f6c")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.BloodlustRising;

public static class BloodlustRisingAPI
{
	public static FullAbility ability;

	public static void Init()
	{
		AbilityInfo val = ScriptableObject.CreateInstance<AbilityInfo>();
		((Object)val).name = "Bloodlust Rising";
		val.rulebookName = "Bloodlust Rising";
		val.metaCategories = new List<AbilityMetaCategory>
		{
			(AbilityMetaCategory)0,
			(AbilityMetaCategory)1
		};
		val.powerLevel = 3;
		val.opponentUsable = true;
		val.canStack = false;
		Texture imageAsTexture = (Texture)(object)TextureHelper.GetImageAsTexture("OldSa_Bloodlust_Rising.png", (FilterMode)0);
		FieldInfo field = typeof(AbilityInfo).GetField("rulebookDescription", BindingFlags.Instance | BindingFlags.NonPublic);
		if (field != null)
		{
			field.SetValue(val, "When [creature] kills a creature, it gains 2 Gluttony.");
		}
		ability = AbilityManager.Add("OLD_SA", val, typeof(BloodlustRisingBehaviour), imageAsTexture);
	}
}
public class BloodlustRisingBehaviour : AbilityBehaviour
{
	public override Ability Ability => BloodlustRisingAPI.ability.Id;

	public override bool RespondsToOtherCardDie(PlayableCard card, CardSlot deathSlot, bool fromCombat, PlayableCard killer)
	{
		return (Object)(object)killer == (Object)(object)((AbilityBehaviour)this).Card;
	}

	public override IEnumerator OnOtherCardDie(PlayableCard card, CardSlot deathSlot, bool fromCombat, PlayableCard killer)
	{
		if (!((Object)(object)((AbilityBehaviour)this).Card == (Object)null) && !((AbilityBehaviour)this).Card.Dead)
		{
			yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
			SmallSigilManager.AddStacks(((AbilityBehaviour)this).Card, (SmallSigilType)2, 2);
			yield return ((AbilityBehaviour)this).LearnAbility(0.25f);
		}
	}
}
[BepInPlugin("OLD_SA.BloodlustRising", "OLD SA Bloodlust Rising", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		BloodlustRisingAPI.Init();
	}
}

Sigil/OldSa_Cunning_sigil.dll

Decompiled a day ago
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Cunning_sigil")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Cunning_sigil")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("8c1adbcf-028b-4655-bd78-77375f2d87d0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.Cunning;

public static class CunningAPI
{
	public static FullAbility ability;

	public unsafe static void Init()
	{
		//IL_0079: Unknown result type (might be due to invalid IL or missing references)
		//IL_0088: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
		AbilityInfo val = ScriptableObject.CreateInstance<AbilityInfo>();
		((Object)val).name = "Cunning";
		val.rulebookName = "Cunning";
		val.metaCategories = new List<AbilityMetaCategory>
		{
			(AbilityMetaCategory)0,
			(AbilityMetaCategory)1
		};
		val.powerLevel = 2;
		val.opponentUsable = true;
		Texture imageAsTexture = (Texture)(object)TextureHelper.GetImageAsTexture("OldSa_Cunning.png", (FilterMode)0);
		Texture2D imageAsTexture2 = TextureHelper.GetImageAsTexture("OldSa_Cunning_px.png", (FilterMode)0);
		val.pixelIcon = Sprite.Create(imageAsTexture2, new Rect(0f, 0f, (float)((Texture)imageAsTexture2).width, (float)((Texture)imageAsTexture2).height), new Vector2(0.5f, 0.5f));
		FieldInfo field = typeof(AbilityInfo).GetField("rulebookDescription", BindingFlags.Instance | BindingFlags.NonPublic);
		if (field != null)
		{
			field.SetValue(val, "When there is a creature opposite [creature], [creature] gains Power equal to the number of sigils on that creature.");
		}
		ability = AbilityManager.Add("OLD_SA", val, typeof(CunningBehaviour), imageAsTexture);
		Ability id = ability.Id;
		Debug.Log((object)("Cunning registered ID=" + ((object)(*(Ability*)(&id))/*cast due to .constrained prefix*/).ToString()));
	}
}
[HarmonyPatch(typeof(PlayableCard), "get_Attack")]
public static class CunningAttackPatch
{
	[HarmonyPostfix]
	public static void Postfix(PlayableCard __instance, ref int __result)
	{
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)__instance == (Object)null || (Object)(object)((Card)__instance).Info == (Object)null || !__instance.HasAbility(CunningAPI.ability.Id) || (Object)(object)__instance.Slot == (Object)null || (Object)(object)__instance.Slot.opposingSlot == (Object)null)
		{
			return;
		}
		PlayableCard card = __instance.Slot.opposingSlot.Card;
		if (!((Object)(object)card == (Object)null))
		{
			int sigilCount = GetSigilCount(card);
			if (sigilCount > 0)
			{
				__result += sigilCount;
			}
		}
	}

	private static int GetSigilCount(PlayableCard card)
	{
		int num = 0;
		if (((Card)card).Info.Abilities != null)
		{
			num += ((Card)card).Info.Abilities.Count;
		}
		if (card.TemporaryMods != null)
		{
			foreach (CardModificationInfo temporaryMod in card.TemporaryMods)
			{
				if (temporaryMod.abilities != null)
				{
					num += temporaryMod.abilities.Count;
				}
			}
		}
		return num;
	}
}
public class CunningBehaviour : AbilityBehaviour
{
	public override Ability Ability => CunningAPI.ability.Id;
}
[BepInPlugin("OLD_SA.Cunning", "OLD SA Cunning", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Expected O, but got Unknown
		Debug.Log((object)"OLD SA Cunning Loading...");
		CunningAPI.Init();
		Harmony val = new Harmony("OLD_SA.Cunning");
		val.PatchAll();
		Debug.Log((object)"OLD SA Cunning Loaded!");
	}
}

Sigil/OldSa_Deadly Fang_sigil.dll

Decompiled a day ago
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using OLD_SA.SmallSigils;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Deadly Fang_sigil")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Deadly Fang_sigil")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("e6c3083e-0bee-46d6-949d-33660cb4fdb5")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.DeadlyFang;

public static class DeadlyFangAPI
{
	public static FullAbility ability;

	public static void Init()
	{
		AbilityInfo val = ScriptableObject.CreateInstance<AbilityInfo>();
		((Object)val).name = "Deadly Fang";
		val.rulebookName = "Deadly Fang";
		val.metaCategories = new List<AbilityMetaCategory>
		{
			(AbilityMetaCategory)0,
			(AbilityMetaCategory)1
		};
		val.powerLevel = 3;
		val.opponentUsable = true;
		val.canStack = false;
		Texture imageAsTexture = (Texture)(object)TextureHelper.GetImageAsTexture("OldSa_Deadly_Fang.png", (FilterMode)0);
		FieldInfo field = typeof(AbilityInfo).GetField("rulebookDescription", BindingFlags.Instance | BindingFlags.NonPublic);
		if (field != null)
		{
			field.SetValue(val, "When [creature] attacks, it gives Poison equal to 4 minus its Power to the target.");
		}
		ability = AbilityManager.Add("OLD_SA", val, typeof(DeadlyFangBehaviour), imageAsTexture);
	}
}
public class DeadlyFangBehaviour : AbilityBehaviour
{
	public override Ability Ability => DeadlyFangAPI.ability.Id;

	public override bool RespondsToDealDamage(int amount, PlayableCard target)
	{
		if ((Object)(object)((AbilityBehaviour)this).Card == (Object)null || ((AbilityBehaviour)this).Card.Dead)
		{
			return false;
		}
		if ((Object)(object)target == (Object)null || target.Dead)
		{
			return false;
		}
		return amount > 0;
	}

	public override IEnumerator OnDealDamage(int amount, PlayableCard target)
	{
		if (!((Object)(object)((AbilityBehaviour)this).Card == (Object)null) && !((AbilityBehaviour)this).Card.Dead && !((Object)(object)target == (Object)null) && !target.Dead)
		{
			yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
			int attack = ((AbilityBehaviour)this).Card.Attack;
			int poison = 4 - attack;
			if (poison < 0)
			{
				poison = 0;
			}
			if (poison > 0)
			{
				SmallSigilManager.AddStacks(target, (SmallSigilType)1, poison);
			}
			yield return ((AbilityBehaviour)this).LearnAbility(0.25f);
		}
	}
}
[BepInPlugin("OLD_SA.DeadlyFang", "OLD SA Deadly Fang", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		Debug.Log((object)"[OLD SA] Initializing Deadly Fang...");
		DeadlyFangAPI.Init();
		Debug.Log((object)"[OLD SA] Deadly Fang initialized.");
	}
}

Sigil/OldSa_Death Spray_sigil.dll

Decompiled a day ago
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using OLD_SA.SmallSigils;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Death Spray_sigil")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Death Spray_sigil")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("11770e47-5aec-4f45-b449-5b81d4f62b0f")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.DeathSpray;

public static class DeathSprayAPI
{
	public static FullAbility ability;

	public static void Init()
	{
		AbilityInfo val = ScriptableObject.CreateInstance<AbilityInfo>();
		((Object)val).name = "Death Spray";
		val.rulebookName = "Death Spray";
		val.metaCategories = new List<AbilityMetaCategory>
		{
			(AbilityMetaCategory)0,
			(AbilityMetaCategory)1
		};
		val.powerLevel = 4;
		val.opponentUsable = true;
		Texture imageAsTexture = (Texture)(object)TextureHelper.GetImageAsTexture("OldSa_Death_Spray.png", (FilterMode)0);
		FieldInfo field = typeof(AbilityInfo).GetField("rulebookDescription", BindingFlags.Instance | BindingFlags.NonPublic);
		if (field != null)
		{
			field.SetValue(val, "When [creature] dies, it gives 4 Poison to a random enemy.");
		}
		ability = AbilityManager.Add("OLD_SA", val, typeof(DeathSprayBehaviour), imageAsTexture);
	}
}
public class DeathSprayBehaviour : AbilityBehaviour
{
	public override Ability Ability => DeathSprayAPI.ability.Id;

	public override bool RespondsToDie(bool wasSacrifice, PlayableCard killer)
	{
		return !wasSacrifice;
	}

	public override IEnumerator OnDie(bool wasSacrifice, PlayableCard killer)
	{
		yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
		List<PlayableCard> targets = new List<PlayableCard>();
		if (!((AbilityBehaviour)this).Card.OpponentCard)
		{
			foreach (CardSlot slot in Singleton<BoardManager>.Instance.OpponentSlotsCopy)
			{
				if ((Object)(object)slot != (Object)null && (Object)(object)slot.Card != (Object)null && !slot.Card.Dead)
				{
					targets.Add(slot.Card);
				}
			}
		}
		else
		{
			foreach (CardSlot slot2 in Singleton<BoardManager>.Instance.PlayerSlotsCopy)
			{
				if ((Object)(object)slot2 != (Object)null && (Object)(object)slot2.Card != (Object)null && !slot2.Card.Dead)
				{
					targets.Add(slot2.Card);
				}
			}
		}
		if (targets.Count != 0)
		{
			PlayableCard target = targets[Random.Range(0, targets.Count)];
			SmallSigilManager.AddStacks(target, (SmallSigilType)1, 4);
			yield return null;
		}
	}
}
[BepInPlugin("OLD_SA.DeathSpray", "OLD SA Death Spray", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		DeathSprayAPI.Init();
	}
}

Sigil/OldSa_Dragon's Rumble_sigil.dll

Decompiled a day ago
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using OLD_SA.Dialogue;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Dragon's Rumble_sigil")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Dragon's Rumble_sigil")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("bf186182-ce7f-4319-9508-a81b593ffaa4")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.DragonsRumble;

public class DragonRumbleAPI
{
	public static FullAbility ability;

	public static void Init()
	{
		AbilityInfo val = ScriptableObject.CreateInstance<AbilityInfo>();
		((Object)val).name = "DragonsRumble";
		val.rulebookName = "Dragon's Rumble";
		val.powerLevel = 4;
		Texture2D imageAsTexture = TextureHelper.GetImageAsTexture("OldSa_Dragons_Rumble.png", (FilterMode)0);
		ability = AbilityManager.Add("OLD_SA", val, typeof(DragonRumbleBehaviour), (Texture)(object)imageAsTexture);
		val.metaCategories = new List<AbilityMetaCategory> { (AbilityMetaCategory)0 };
		FieldInfo field = typeof(AbilityInfo).GetField("rulebookDescription", BindingFlags.Instance | BindingFlags.NonPublic);
		if (field != null)
		{
			field.SetValue(val, "When [creature] dies, it deals 1 damage to a random enemy, increasing each time it takes damage.");
		}
	}

	public static IEnumerator DealDamage(PlayableCard source)
	{
		List<CardSlot> targets = new List<CardSlot>();
		foreach (CardSlot slot in Singleton<BoardManager>.Instance.OpponentSlotsCopy)
		{
			if ((Object)(object)slot.Card != (Object)null && !slot.Card.Dead)
			{
				targets.Add(slot);
			}
		}
		if (targets.Count != 0)
		{
			CardSlot target = targets[Random.Range(0, targets.Count)];
			PlayableCard victim = target.Card;
			if (!((Object)(object)victim == (Object)null) && !victim.Dead)
			{
				yield return victim.TakeDamage(1, source);
			}
		}
	}
}
public class DragonRumbleBehaviour : AbilityBehaviour
{
	public int triggerCount = 1;

	public override Ability Ability => DragonRumbleAPI.ability.Id;

	public void IncreaseTrigger()
	{
		triggerCount++;
	}

	public int GetTriggerCount()
	{
		return triggerCount;
	}

	public void ResetTrigger()
	{
		triggerCount = 1;
	}

	public override bool RespondsToDie(bool wasSacrifice, PlayableCard killer)
	{
		return !wasSacrifice;
	}

	public override IEnumerator OnDie(bool wasSacrifice, PlayableCard killer)
	{
		yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
		int count = triggerCount;
		for (int i = 0; i < count; i++)
		{
			yield return DragonRumbleAPI.DealDamage(((AbilityBehaviour)this).Card);
		}
		yield return SigilDialogueAPI.ShowFirstTime("DragonRumble", "It departs, leaving its enemies to suffer the consequences. But the Ring never ends, and neither does its return.");
		ResetTrigger();
	}
}
[HarmonyPatch(typeof(PlayableCard), "TakeDamage")]
public class DragonRumbleDamagePatch
{
	public static void Prefix(PlayableCard __instance)
	{
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		if (!((Object)(object)__instance == (Object)null) && __instance.HasAbility(DragonRumbleAPI.ability.Id))
		{
			DragonRumbleBehaviour component = ((Component)__instance).GetComponent<DragonRumbleBehaviour>();
			if (!((Object)(object)component == (Object)null))
			{
				component.IncreaseTrigger();
			}
		}
	}
}
[BepInPlugin("oldsa.dragonsrumble", "Old SA Dragon's Rumble", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		DragonRumbleAPI.Init();
		Harmony val = new Harmony("OLD_SA.DragonsRumble");
		val.PatchAll();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Dragon's Rumble Loaded");
	}
}

Sigil/OldSa_Greed's Sin_sigil.dll

Decompiled a day ago
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using OLD_SA.SmallSigils;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Greed's Sin_sigil")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Greed's Sin_sigil")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("3d4de877-48c9-4c43-ac54-9c4981726cd4")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.GreedSin;

public static class GreedSinAPI
{
	public static FullAbility ability;

	public static void Init()
	{
		AbilityInfo val = ScriptableObject.CreateInstance<AbilityInfo>();
		((Object)val).name = "Greed's Sin";
		val.rulebookName = "Greed's Sin";
		val.metaCategories = new List<AbilityMetaCategory>
		{
			(AbilityMetaCategory)0,
			(AbilityMetaCategory)1
		};
		val.powerLevel = 5;
		val.opponentUsable = true;
		val.canStack = false;
		Texture imageAsTexture = (Texture)(object)TextureHelper.GetImageAsTexture("OldSa_Greed_Sin.png", (FilterMode)0);
		FieldInfo field = typeof(AbilityInfo).GetField("rulebookDescription", BindingFlags.Instance | BindingFlags.NonPublic);
		if (field != null)
		{
			field.SetValue(val, "When [creature] kills another creature, a random opposing creature gains 5 Gluttony.");
		}
		ability = AbilityManager.Add("OLD_SA", val, typeof(GreedSinBehaviour), imageAsTexture);
	}
}
public class GreedSinBehaviour : AbilityBehaviour
{
	public override Ability Ability => GreedSinAPI.ability.Id;

	public override bool RespondsToOtherCardDie(PlayableCard card, CardSlot deathSlot, bool fromCombat, PlayableCard killer)
	{
		return (Object)(object)killer == (Object)(object)((AbilityBehaviour)this).Card;
	}

	public override IEnumerator OnOtherCardDie(PlayableCard card, CardSlot deathSlot, bool fromCombat, PlayableCard killer)
	{
		yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
		for (int i = 0; i < 5; i++)
		{
			List<PlayableCard> allies = new List<PlayableCard>();
			if ((Object)(object)Singleton<BoardManager>.Instance != (Object)null)
			{
				List<CardSlot> slots = Singleton<BoardManager>.Instance.GetSlots(((AbilityBehaviour)this).Card.OpponentCard);
				foreach (CardSlot slot in slots)
				{
					if (!((Object)(object)slot == (Object)null) && !((Object)(object)slot.Card == (Object)null) && !slot.Card.Dead)
					{
						allies.Add(slot.Card);
					}
				}
			}
			if (allies.Count == 0)
			{
				break;
			}
			PlayableCard target = allies[Random.Range(0, allies.Count)];
			if (!((Object)(object)target == (Object)null) && !target.Dead)
			{
				SmallSigilManager.AddStacks(target, (SmallSigilType)2, 1);
				yield return (object)new WaitForSeconds(0.1f);
			}
		}
		yield return ((AbilityBehaviour)this).LearnAbility(0.25f);
	}
}
[BepInPlugin("OLD_SA.GreedSin", "OLD SA Greed's Sin", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: Expected O, but got Unknown
		((BaseUnityPlugin)this).Logger.LogInfo((object)"[OLD SA Greed's Sin] Loading...");
		GreedSinAPI.Init();
		Harmony val = new Harmony("OLD_SA.GreedSin");
		val.PatchAll();
	}
}

Sigil/OldSa_Hive Will_sigil.dll

Decompiled a day ago
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using OLD_SA.Dialogue;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Hive Will_sigil")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Hive Will_sigil")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("014ad8de-ec23-4e3d-82f6-36fbdce503a7")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.HiveWill;

public static class HiveWillAPI
{
	public static FullAbility ability;

	public unsafe static void Init()
	{
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
		AbilityInfo val = ScriptableObject.CreateInstance<AbilityInfo>();
		((Object)val).name = "HiveWill";
		val.rulebookName = "Hive Will";
		val.metaCategories = new List<AbilityMetaCategory> { (AbilityMetaCategory)0 };
		Texture imageAsTexture = (Texture)(object)TextureHelper.GetImageAsTexture("OldSa_Hive_Will.png", (FilterMode)0);
		Texture2D imageAsTexture2 = TextureHelper.GetImageAsTexture("OldSa_Hive_Will_px.png", (FilterMode)0);
		val.pixelIcon = Sprite.Create(imageAsTexture2, new Rect(0f, 0f, (float)((Texture)imageAsTexture2).width, (float)((Texture)imageAsTexture2).height), new Vector2(0.5f, 0.5f));
		FieldInfo field = typeof(AbilityInfo).GetField("rulebookDescription", BindingFlags.Instance | BindingFlags.NonPublic);
		if (field != null)
		{
			field.SetValue(val, "When a specific card is played on [creature], they fuse with each other.");
		}
		val.opponentUsable = false;
		val.powerLevel = 0;
		ability = AbilityManager.Add("OLD_SA", val, typeof(HiveWillBehaviour), imageAsTexture);
		Ability id = ability.Id;
		Debug.Log((object)("HiveWill registered ID=" + ((object)(*(Ability*)(&id))/*cast due to .constrained prefix*/).ToString()));
	}
}
public static class HiveWillAssets
{
	public static Sprite LoadSprite(string name)
	{
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		Texture2D imageAsTexture = TextureHelper.GetImageAsTexture(name, (FilterMode)0);
		if ((Object)(object)imageAsTexture == (Object)null)
		{
			return null;
		}
		return Sprite.Create(imageAsTexture, new Rect(0f, 0f, (float)((Texture)imageAsTexture).width, (float)((Texture)imageAsTexture).height), new Vector2(0.5f, 0.5f));
	}
}
public static class HiveWillAudio
{
	public static AudioClip LoadBuzz()
	{
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: Expected O, but got Unknown
		string text = Path.Combine(Path.GetDirectoryName(typeof(HiveWillAudio).Assembly.Location), "Audio", "hive_buzz.wav");
		if (!File.Exists(text))
		{
			return null;
		}
		WWW val = new WWW("file:///" + text);
		while (!val.isDone)
		{
		}
		return val.GetAudioClip(false, false);
	}
}
public class HiveWillBehaviour : AbilityBehaviour
{
	public override Ability Ability => HiveWillAPI.ability.Id;
}
[HarmonyPatch(typeof(TurnManager), "set_GameEnded")]
public static class HiveWillCombatEndPatch
{
	public static void Postfix(bool value)
	{
		if (value)
		{
			Debug.Log((object)"HiveWill Combat End Clear Trigger");
			HiveWillTemporaryManager.Clear();
		}
	}
}
public class HiveWillIconShake : MonoBehaviour
{
	private float angle = 4f;

	private float speed = 35f;

	private Quaternion startRotation;

	public void StartShake()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		startRotation = ((Component)this).transform.localRotation;
	}

	private void Update()
	{
		//IL_0021: Unknown result type (might be due to invalid IL or missing references)
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_0036: Unknown result type (might be due to invalid IL or missing references)
		float num = Mathf.Sin(Time.time * speed) * angle;
		((Component)this).transform.localRotation = startRotation * Quaternion.Euler(0f, 0f, num);
	}
}
public static class HiveWillManager
{
	public static IEnumerator Merge(PlayableCard host, PlayableCard material)
	{
		if ((Object)(object)host == (Object)null || (Object)(object)material == (Object)null)
		{
			HiveWillPatch.Merging = false;
			yield break;
		}
		CardModificationInfo statMod = new CardModificationInfo();
		statMod.attackAdjustment = material.Attack;
		statMod.healthAdjustment = material.Health;
		statMod.fromCardMerge = true;
		host.AddTemporaryMod(statMod);
		if (ShouldInherit(host))
		{
			InheritAbilities(host, material);
		}
		Singleton<PlayerHand>.Instance.RemoveCardFromHand(material);
		((Component)material).gameObject.SetActive(false);
		yield return (object)new WaitForSeconds(0.2f);
		((Card)host).Anim.PlayTransformAnimation();
		yield return (object)new WaitForSeconds(0.8f);
		((Card)host).RenderCard();
		try
		{
			yield return SigilDialogueAPI.ShowFirstTime("HiveWill", "She shall lead her swarm to victory.", host);
		}
		finally
		{
			HiveWillSelectionPatch.DisableFlying();
			((Card)host).Anim.SetSelectedToPlay(false);
			HiveWillPatch.Merging = false;
			Singleton<ViewManager>.Instance.SwitchToView((View)0, false, false);
		}
	}

	private static bool ShouldInherit(PlayableCard host)
	{
		string extendedProperty = CardExtensions.GetExtendedProperty(((Card)host).Info, "OLD_SA.HiveWillInherit");
		if (extendedProperty == "false")
		{
			return false;
		}
		return true;
	}

	private static void InheritAbilities(PlayableCard host, PlayableCard material)
	{
		//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e8: Expected O, but got Unknown
		//IL_015c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0162: Expected O, but got Unknown
		//IL_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_0066: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_008c: Unknown result type (might be due to invalid IL or missing references)
		List<Ability> list = new List<Ability>();
		foreach (CardModificationInfo mod in ((Card)material).Info.Mods)
		{
			if (mod.abilities == null || !mod.fromCardMerge)
			{
				continue;
			}
			foreach (Ability ability in mod.abilities)
			{
				if (!host.HasAbility(ability) && !list.Contains(ability))
				{
					list.Add(ability);
				}
			}
		}
		if (list.Count != 0)
		{
			CardModificationInfo val = new CardModificationInfo();
			val.abilities = new List<Ability>(list);
			val.fromCardMerge = true;
			val.singletonId = "OLD_SA_HIVEWILL";
			Debug.Log((object)("HiveWill Add Temporary Mod: " + ((Object)((Card)host).Info).name + " ID=" + val.singletonId + " Abilities=" + string.Join(",", list)));
			host.AddTemporaryMod(val);
			CardModificationInfo val2 = new CardModificationInfo();
			val2.abilities = new List<Ability>(list);
			val2.fromCardMerge = true;
			val2.singletonId = "OLD_SA_HIVEWILL";
			((Card)host).Info.Mods.Add(val2);
			Debug.Log((object)("HiveWill Add Display Mod: " + ((Object)((Card)host).Info).name + " ID=" + val2.singletonId));
			HiveWillTemporaryManager.Register(host);
			host.OnStatsChanged();
			((Card)host).RenderCard();
		}
	}
}
[HarmonyPatch(typeof(BoardManager))]
public static class HiveWillPatch
{
	public static bool Merging;

	[HarmonyPatch("ChooseSlot")]
	[HarmonyPrefix]
	public static void ChooseSlotPrefix(List<CardSlot> validSlots)
	{
		if (validSlots == null)
		{
			return;
		}
		PlayableCard choosingSlotCard = Singleton<PlayerHand>.Instance.ChoosingSlotCard;
		if ((Object)(object)choosingSlotCard == (Object)null)
		{
			return;
		}
		foreach (CardSlot item in Singleton<BoardManager>.Instance.PlayerSlotsCopy)
		{
			if (!((Object)(object)item.Card == (Object)null))
			{
				PlayableCard card = item.Card;
				if (HasHiveWill(card) && IsHiveWillTarget(card, choosingSlotCard) && !validSlots.Contains(item))
				{
					validSlots.Add(item);
				}
			}
		}
	}

	[HarmonyPatch("OnSlotSelected")]
	[HarmonyPrefix]
	public static bool OnSlotSelectedPrefix(CardSlot slot)
	{
		if (Merging)
		{
			return false;
		}
		if ((Object)(object)slot == (Object)null)
		{
			return true;
		}
		if ((Object)(object)slot.Card == (Object)null)
		{
			return true;
		}
		PlayableCard card = slot.Card;
		if (!HasHiveWill(card))
		{
			return true;
		}
		PlayableCard choosingSlotCard = Singleton<PlayerHand>.Instance.ChoosingSlotCard;
		if ((Object)(object)choosingSlotCard == (Object)null)
		{
			return true;
		}
		if (!IsHiveWillTarget(card, choosingSlotCard))
		{
			return true;
		}
		Merging = true;
		HiveWillSelectionPatch.DisableFlying();
		Singleton<ViewManager>.Instance.SwitchToView((View)4, false, false);
		((MonoBehaviour)card).StartCoroutine(HiveWillManager.Merge(card, choosingSlotCard));
		return false;
	}

	private static bool IsHiveWillTarget(PlayableCard host, PlayableCard card)
	{
		string text = CardExtensions.GetExtendedProperty(((Card)host).Info, "OLD_SA.HiveWillTarget");
		if (string.IsNullOrEmpty(text))
		{
			text = "Squirrel";
		}
		return ((Object)((Card)card).Info).name == text;
	}

	private static bool HasHiveWill(PlayableCard card)
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		if (((Card)card).Info.Abilities.Contains(HiveWillAPI.ability.Id))
		{
			return true;
		}
		foreach (CardModificationInfo temporaryMod in card.TemporaryMods)
		{
			if (temporaryMod.abilities.Contains(HiveWillAPI.ability.Id))
			{
				return true;
			}
		}
		return false;
	}
}
public static class HiveWillSelectionEffect
{
	private static GameObject currentIcon;

	public static void Show(PlayableCard card)
	{
		//IL_0057: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: Expected O, but got Unknown
		//IL_0071: Unknown result type (might be due to invalid IL or missing references)
		//IL_0085: Unknown result type (might be due to invalid IL or missing references)
		//IL_008a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
		if (!((Object)(object)card == (Object)null) && !((Object)(object)currentIcon != (Object)null))
		{
			Sprite val = HiveWillAssets.LoadSprite("HiveIcon.png");
			if ((Object)(object)val == (Object)null)
			{
				Debug.Log((object)"Missing HiveIcon");
				return;
			}
			currentIcon = new GameObject("HiveWillIcon");
			currentIcon.transform.position = ((Component)card).transform.position + new Vector3(0f, 0.8f, 0f);
			currentIcon.transform.rotation = Quaternion.Euler(90f, 0f, 0f);
			SpriteRenderer val2 = currentIcon.AddComponent<SpriteRenderer>();
			val2.sprite = val;
			((Renderer)val2).sortingOrder = 999;
			HiveWillIconShake hiveWillIconShake = currentIcon.AddComponent<HiveWillIconShake>();
			hiveWillIconShake.StartShake();
		}
	}

	public static void Hide()
	{
		if ((Object)(object)currentIcon != (Object)null)
		{
			Object.Destroy((Object)(object)currentIcon);
		}
		currentIcon = null;
	}

	public static bool IsShowing()
	{
		return (Object)(object)currentIcon != (Object)null;
	}
}
public static class HiveWillSelectionManager
{
	public static PlayableCard Material;

	public static PlayableCard Target;

	public static bool Choosing;

	public static void StartSelection(PlayableCard material, PlayableCard target)
	{
		Material = material;
		Target = target;
		Choosing = true;
		if ((Object)(object)Target != (Object)null && (Object)(object)((Card)Target).Anim != (Object)null)
		{
			((Card)Target).Anim.SetSelectedToPlay(true);
		}
	}

	public static void Finish()
	{
		if (!((Object)(object)Material == (Object)null) && !((Object)(object)Target == (Object)null))
		{
			((MonoBehaviour)Target).StartCoroutine(HiveWillManager.Merge(Target, Material));
			Choosing = false;
			Material = null;
			Target = null;
		}
	}

	private static bool IsHiveWillTarget(PlayableCard host, PlayableCard card)
	{
		string text = CardExtensions.GetExtendedProperty(((Card)host).Info, "OLD_SA.HiveWillTarget");
		if (string.IsNullOrEmpty(text))
		{
			text = "Squirrel";
		}
		return ((Object)((Card)card).Info).name == text;
	}

	private static void InheritAbilities(PlayableCard host, PlayableCard material)
	{
		//IL_0100: Unknown result type (might be due to invalid IL or missing references)
		//IL_0128: Unknown result type (might be due to invalid IL or missing references)
		//IL_012e: Expected O, but got Unknown
		//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
		Debug.Log((object)"=== HiveWill Ability Inherit ===");
		Debug.Log((object)("Material: " + ((Object)((Card)material).Info).name));
		Debug.Log((object)("TemporaryMods Count: " + material.TemporaryMods.Count));
		HashSet<Ability> hashSet = new HashSet<Ability>();
		foreach (CardModificationInfo temporaryMod in material.TemporaryMods)
		{
			if (temporaryMod.abilities == null)
			{
				continue;
			}
			Debug.Log((object)("Found Mod Abilities: " + string.Join(", ", temporaryMod.abilities)));
			foreach (Ability ability in temporaryMod.abilities)
			{
				hashSet.Add(ability);
			}
		}
		hashSet.Remove(HiveWillAPI.ability.Id);
		if (hashSet.Count == 0)
		{
			Debug.Log((object)"No extra abilities found.");
			return;
		}
		CardModificationInfo val = new CardModificationInfo();
		val.fromCardMerge = true;
		val.abilities = new List<Ability>(hashSet);
		host.AddTemporaryMod(val);
	}
}
[HarmonyPatch(typeof(PlayerHand))]
public static class HiveWillSelectionPatch
{
	private static HashSet<PlayableCard> ActiveCards = new HashSet<PlayableCard>();

	[HarmonyPatch("ManagedUpdate")]
	[HarmonyPostfix]
	public static void UpdateCheck()
	{
		PlayerHand instance = Singleton<PlayerHand>.Instance;
		if (!((Object)(object)instance == (Object)null))
		{
			if ((Object)(object)instance.ChoosingSlotCard != (Object)null)
			{
				CheckHiveWill(instance.ChoosingSlotCard);
			}
			else
			{
				DisableFlying();
			}
		}
	}

	private static void CheckHiveWill(PlayableCard material)
	{
		HashSet<PlayableCard> hashSet = new HashSet<PlayableCard>();
		foreach (CardSlot item in Singleton<BoardManager>.Instance.PlayerSlotsCopy)
		{
			if ((Object)(object)item.Card == (Object)null)
			{
				continue;
			}
			PlayableCard card = item.Card;
			if (HasHiveWill(card))
			{
				string text = CardExtensions.GetExtendedProperty(((Card)card).Info, "OLD_SA.HiveWillTarget");
				if (string.IsNullOrEmpty(text))
				{
					text = "Squirrel";
				}
				if (!(((Object)((Card)material).Info).name != text))
				{
					hashSet.Add(card);
					EnableFlying(card);
				}
			}
		}
		foreach (PlayableCard item2 in new List<PlayableCard>(ActiveCards))
		{
			if (!hashSet.Contains(item2))
			{
				RemoveFlying(item2);
			}
		}
	}

	private static void EnableFlying(PlayableCard card)
	{
		if (!ActiveCards.Contains(card))
		{
			HiveWillSelectionEffect.Show(card);
			ActiveCards.Add(card);
		}
	}

	private static void RemoveFlying(PlayableCard card)
	{
		if (!((Object)(object)card == (Object)null))
		{
			HiveWillSelectionEffect.Hide();
			ActiveCards.Remove(card);
		}
	}

	public static void DisableFlying()
	{
		foreach (PlayableCard item in new List<PlayableCard>(ActiveCards))
		{
			RemoveFlying(item);
		}
	}

	private static bool HasHiveWill(PlayableCard card)
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		if (((Card)card).Info.Abilities.Contains(HiveWillAPI.ability.Id))
		{
			return true;
		}
		foreach (CardModificationInfo temporaryMod in card.TemporaryMods)
		{
			if (temporaryMod.abilities.Contains(HiveWillAPI.ability.Id))
			{
				return true;
			}
		}
		return false;
	}
}
public static class HiveWillTemporaryManager
{
	private static List<CardInfo> Cards = new List<CardInfo>();

	public static void Register(PlayableCard card)
	{
		if (!((Object)(object)card == (Object)null) && !((Object)(object)((Card)card).Info == (Object)null))
		{
			Debug.Log((object)("HiveWill Register CardInfo = " + ((Object)((Card)card).Info).name));
			if (!Cards.Contains(((Card)card).Info))
			{
				Cards.Add(((Card)card).Info);
			}
		}
	}

	public static void Clear()
	{
		Debug.Log((object)("HiveWill Clear Start Count = " + Cards.Count));
		foreach (CardInfo card in Cards)
		{
			if (!((Object)(object)card == (Object)null))
			{
				Debug.Log((object)("HiveWill Clearing CardInfo = " + ((Object)card).name));
				int count = card.Mods.Count;
				card.Mods.RemoveAll((CardModificationInfo x) => x.singletonId == "OLD_SA_HIVEWILL");
				int count2 = card.Mods.Count;
				Debug.Log((object)("HiveWill Remove Display Mods: " + (count - count2)));
			}
		}
		Cards.Clear();
		Debug.Log((object)"HiveWill Clear Finished");
	}
}
[BepInPlugin("OLD_SA.HiveWill", "OLD_SA Hive Will", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		HiveWillAPI.Init();
		Harmony val = new Harmony("OLD_SA.HiveWill");
		val.PatchAll();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"OLD_SA Hive Will Loaded");
	}
}

Sigil/OldSa_Immolate_sigil.dll

Decompiled a day ago
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using OLD_SA.SmallSigils;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Immolate_sigil")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Immolate_sigil")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("41436ad8-9195-43e8-ba27-c14a8582321d")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.Immolate;

public static class ImmolateAPI
{
	public static FullAbility ability;

	public unsafe static void Init()
	{
		//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
		AbilityInfo val = ScriptableObject.CreateInstance<AbilityInfo>();
		((Object)val).name = "Immolate";
		val.rulebookName = "Immolate";
		val.metaCategories = new List<AbilityMetaCategory>
		{
			(AbilityMetaCategory)0,
			(AbilityMetaCategory)1
		};
		val.powerLevel = 3;
		val.opponentUsable = true;
		Texture imageAsTexture = (Texture)(object)TextureHelper.GetImageAsTexture("OldSa_Immolate.png", (FilterMode)0);
		FieldInfo field = typeof(AbilityInfo).GetField("rulebookDescription", BindingFlags.Instance | BindingFlags.NonPublic);
		if (field != null)
		{
			field.SetValue(val, "At the start of the end, [creature] gives the opposing creature 3 Blaze.");
		}
		ability = AbilityManager.Add("OLD_SA", val, typeof(ImmolateBehaviour), imageAsTexture);
		Ability id = ability.Id;
		Debug.Log((object)("[OLD SA] Immolate registered. ID=" + ((object)(*(Ability*)(&id))/*cast due to .constrained prefix*/).ToString()));
	}
}
public class ImmolateBehaviour : AbilityBehaviour
{
	public static Ability AbilityID => ImmolateAPI.ability.Id;

	public override Ability Ability => AbilityID;

	public override bool RespondsToTurnEnd(bool playerTurnEnd)
	{
		if ((Object)(object)((AbilityBehaviour)this).Card == (Object)null || ((AbilityBehaviour)this).Card.Dead)
		{
			return false;
		}
		return ((AbilityBehaviour)this).Card.OpponentCard != playerTurnEnd;
	}

	public override IEnumerator OnTurnEnd(bool playerTurnEnd)
	{
		if ((Object)(object)((AbilityBehaviour)this).Card == (Object)null || ((AbilityBehaviour)this).Card.Dead)
		{
			yield break;
		}
		CardSlot opposingSlot = ((AbilityBehaviour)this).Card.Slot.opposingSlot;
		if (!((Object)(object)opposingSlot == (Object)null) && !((Object)(object)opposingSlot.Card == (Object)null))
		{
			PlayableCard target = opposingSlot.Card;
			if (!((Object)(object)target == (Object)null) && !target.Dead)
			{
				yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
				SmallSigilManager.AddStacks(target, (SmallSigilType)0, 3);
				yield return ((AbilityBehaviour)this).LearnAbility(0.25f);
			}
		}
	}
}
[BepInPlugin("OLD_SA.Immolate", "OLD SA Immolate Sigil", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		Debug.Log((object)"[OLD SA Immolate] Loading...");
		ImmolateAPI.Init();
		Debug.Log((object)"[OLD SA Immolate] Loaded.");
	}
}

Sigil/OldSa_Inferno_sigil.dll

Decompiled a day ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using InscryptionAPI.Helpers.Extensions;
using OLD_SA.SmallSigils;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Inferno_sigil")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Inferno_sigil")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("f922c8b9-44d0-47d2-9c0b-c7807a8cbfad")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.Inferno;

public static class InfernoAPI
{
	public static FullAbility ability;

	public unsafe static void Init()
	{
		//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
		AbilityInfo val = ScriptableObject.CreateInstance<AbilityInfo>();
		((Object)val).name = "Inferno";
		val.rulebookName = "Inferno";
		val.metaCategories = new List<AbilityMetaCategory> { (AbilityMetaCategory)0 };
		val.powerLevel = 4;
		val.opponentUsable = false;
		val.canStack = false;
		Texture imageAsTexture = (Texture)(object)TextureHelper.GetImageAsTexture("OldSa_Inferno.png", (FilterMode)0);
		FieldInfo field = typeof(AbilityInfo).GetField("rulebookDescription", BindingFlags.Instance | BindingFlags.NonPublic);
		if (field != null)
		{
			field.SetValue(val, "At the start of the turn, [creature] gives 1 Blaze to all opposing creatures.");
		}
		ability = AbilityManager.Add("OLD_SA", val, typeof(InfernoBehaviour), imageAsTexture);
		Ability id = ability.Id;
		Debug.Log((object)("Inferno registered ID=" + ((object)(*(Ability*)(&id))/*cast due to .constrained prefix*/).ToString()));
	}
}
public class InfernoBehaviour : AbilityBehaviour
{
	public static Ability AbilityID => InfernoAPI.ability.Id;

	public override Ability Ability => AbilityID;

	public override bool RespondsToUpkeep(bool playerUpkeep)
	{
		if ((Object)(object)((AbilityBehaviour)this).Card == (Object)null || ((AbilityBehaviour)this).Card.Dead)
		{
			return false;
		}
		return ((AbilityBehaviour)this).Card.OpponentCard != playerUpkeep;
	}

	public override IEnumerator OnUpkeep(bool playerUpkeep)
	{
		if ((Object)(object)((AbilityBehaviour)this).Card == (Object)null || ((AbilityBehaviour)this).Card.Dead)
		{
			yield break;
		}
		yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
		List<PlayableCard> opposingCards = BoardManagerExtensions.GetCards(Singleton<BoardManager>.Instance, !((AbilityBehaviour)this).Card.OpponentCard, (Predicate<PlayableCard>)null);
		foreach (PlayableCard target in opposingCards)
		{
			if (!((Object)(object)target == (Object)null) && !target.Dead)
			{
				SmallSigilManager.AddStacks(target, (SmallSigilType)0, 1);
				yield return null;
			}
		}
		yield return ((AbilityBehaviour)this).LearnAbility(0.25f);
	}
}
[BepInPlugin("OLD_SA.Inferno", "OLD SA Inferno Sigil", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		Debug.Log((object)"[OLD SA Inferno] Loading...");
		InfernoAPI.Init();
		Debug.Log((object)"[OLD SA Inferno] Loaded.");
	}
}

Sigil/OldSa_Infinite_sigil.dll

Decompiled a day ago
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using OLD_SA.Dialogue;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Infinite_sigil")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Infinite_sigil")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("29dc7318-f797-403f-b9cc-8aa737517d63")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.Infinite;

public static class InfiniteAPI
{
	public static FullAbility ability;

	public static void Init()
	{
		AbilityInfo val = ScriptableObject.CreateInstance<AbilityInfo>();
		((Object)val).name = "Infinite";
		val.rulebookName = "Infinite";
		val.metaCategories = new List<AbilityMetaCategory> { (AbilityMetaCategory)0 };
		val.powerLevel = 5;
		val.opponentUsable = false;
		val.canStack = false;
		Texture imageAsTexture = (Texture)(object)TextureHelper.GetImageAsTexture("OldSa_Infinite.png", (FilterMode)0);
		FieldInfo field = typeof(AbilityInfo).GetField("rulebookDescription", BindingFlags.Instance | BindingFlags.NonPublic);
		if (field != null)
		{
			field.SetValue(val, "At the start of each turn, [creature] regains lost sigils.");
		}
		ability = AbilityManager.Add("OLD_SA", val, typeof(InfiniteBehaviour), imageAsTexture);
	}
}
public class InfiniteBehaviour : AbilityBehaviour
{
	public override Ability Ability => InfiniteAPI.ability.Id;

	public override bool RespondsToUpkeep(bool playerUpkeep)
	{
		return false;
	}

	public override IEnumerator OnUpkeep(bool playerUpkeep)
	{
		yield break;
	}
}
[HarmonyPatch(typeof(GlobalTriggerHandler), "TriggerSequence")]
public static class InfiniteTriggerSequencePatch
{
	private class AbilitySnapshot
	{
		public Ability Ability;

		public bool IsTemporary;

		public CardModificationInfo TemporaryMod;

		public AbilitySnapshot(Ability ability, bool isTemporary, CardModificationInfo temporaryMod)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			Ability = ability;
			IsTemporary = isTemporary;
			TemporaryMod = temporaryMod;
		}
	}

	private class LostAbilityData
	{
		public Ability Ability;

		public CardModificationInfo TemporaryMod;

		public bool IsTemporary => TemporaryMod != null;

		public LostAbilityData(Ability ability, CardModificationInfo temporaryMod)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			Ability = ability;
			TemporaryMod = temporaryMod;
		}
	}

	private static readonly Dictionary<PlayableCard, List<LostAbilityData>> LostAbilities = new Dictionary<PlayableCard, List<LostAbilityData>>();

	private static bool restoring;

	private static bool? lastUpkeepSide;

	[HarmonyPostfix]
	public static IEnumerator Postfix(IEnumerator result, GlobalTriggerHandler __instance, Trigger trigger, TriggerReceiver receiver, object[] otherArgs)
	{
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		if ((int)trigger == 0 && !restoring)
		{
			bool playerUpkeep = otherArgs != null && otherArgs.Length != 0 && otherArgs[0] is bool && (bool)otherArgs[0];
			if (!lastUpkeepSide.HasValue || lastUpkeepSide.Value != playerUpkeep)
			{
				lastUpkeepSide = playerUpkeep;
				yield return RestoreAllForUpkeep(playerUpkeep);
			}
			yield return result;
			yield break;
		}
		if (restoring)
		{
			yield return result;
			yield break;
		}
		Dictionary<PlayableCard, List<AbilitySnapshot>> before = CaptureAllInfiniteCards();
		yield return result;
		Dictionary<PlayableCard, List<AbilitySnapshot>> after = CaptureAllInfiniteCards();
		foreach (KeyValuePair<PlayableCard, List<AbilitySnapshot>> entry in before)
		{
			PlayableCard card = entry.Key;
			if ((Object)(object)card == (Object)null || card.Dead)
			{
				continue;
			}
			List<AbilitySnapshot> beforeAbilities = entry.Value;
			if (!after.TryGetValue(card, out var afterAbilities))
			{
				afterAbilities = new List<AbilitySnapshot>();
			}
			foreach (AbilitySnapshot previous in beforeAbilities)
			{
				if (!ContainsAbility(afterAbilities, previous.Ability))
				{
					AddLostAbility(card, previous);
				}
			}
			afterAbilities = null;
		}
	}

	private static Dictionary<PlayableCard, List<AbilitySnapshot>> CaptureAllInfiniteCards()
	{
		Dictionary<PlayableCard, List<AbilitySnapshot>> dictionary = new Dictionary<PlayableCard, List<AbilitySnapshot>>();
		if (InfiniteAPI.ability == null || (Object)(object)Singleton<BoardManager>.Instance == (Object)null)
		{
			return dictionary;
		}
		foreach (CardSlot item in Singleton<BoardManager>.Instance.PlayerSlotsCopy)
		{
			if (!((Object)(object)item == (Object)null) && !((Object)(object)item.Card == (Object)null) && !item.Card.Dead)
			{
				PlayableCard card = item.Card;
				if (HasInfinite(card))
				{
					dictionary[card] = CaptureRuntimeAbilities(card);
				}
			}
		}
		foreach (CardSlot item2 in Singleton<BoardManager>.Instance.OpponentSlotsCopy)
		{
			if (!((Object)(object)item2 == (Object)null) && !((Object)(object)item2.Card == (Object)null) && !item2.Card.Dead)
			{
				PlayableCard card2 = item2.Card;
				if (HasInfinite(card2))
				{
					dictionary[card2] = CaptureRuntimeAbilities(card2);
				}
			}
		}
		return dictionary;
	}

	private static bool HasInfinite(PlayableCard card)
	{
		//IL_0040: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)card == (Object)null || InfiniteAPI.ability == null)
		{
			return false;
		}
		AbilityBehaviour[] components = ((Component)card).GetComponents<AbilityBehaviour>();
		AbilityBehaviour[] array = components;
		foreach (AbilityBehaviour val in array)
		{
			if ((Object)(object)val != (Object)null && val.Ability == InfiniteAPI.ability.Id)
			{
				return true;
			}
		}
		return false;
	}

	private static List<AbilitySnapshot> CaptureRuntimeAbilities(PlayableCard card)
	{
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0068: Unknown result type (might be due to invalid IL or missing references)
		//IL_0090: Unknown result type (might be due to invalid IL or missing references)
		//IL_009a: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Unknown result type (might be due to invalid IL or missing references)
		List<AbilitySnapshot> list = new List<AbilitySnapshot>();
		if ((Object)(object)card == (Object)null)
		{
			return list;
		}
		AbilityBehaviour[] components = ((Component)card).GetComponents<AbilityBehaviour>();
		AbilityBehaviour[] array = components;
		foreach (AbilityBehaviour val in array)
		{
			if (!((Object)(object)val == (Object)null))
			{
				Ability ability = val.Ability;
				if ((Object)(object)((Card)card).Info != (Object)null && ((Card)card).Info.Abilities.Contains(ability))
				{
					list.Add(new AbilitySnapshot(ability, isTemporary: false, null));
					continue;
				}
				CardModificationInfo temporaryMod = FindTemporaryMod(card, ability);
				list.Add(new AbilitySnapshot(ability, isTemporary: true, temporaryMod));
			}
		}
		return list;
	}

	private static CardModificationInfo FindTemporaryMod(PlayableCard card, Ability ability)
	{
		//IL_003c: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)card == (Object)null)
		{
			return null;
		}
		foreach (CardModificationInfo temporaryMod in card.TemporaryMods)
		{
			if (temporaryMod == null || !temporaryMod.abilities.Contains(ability))
			{
				continue;
			}
			return temporaryMod;
		}
		return null;
	}

	private static bool ContainsAbility(List<AbilitySnapshot> abilities, Ability ability)
	{
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		foreach (AbilitySnapshot ability2 in abilities)
		{
			if (ability2.Ability == ability)
			{
				return true;
			}
		}
		return false;
	}

	private static void AddLostAbility(PlayableCard card, AbilitySnapshot lost)
	{
		//IL_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_008c: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)card == (Object)null)
		{
			return;
		}
		if (!LostAbilities.ContainsKey(card))
		{
			LostAbilities.Add(card, new List<LostAbilityData>());
		}
		List<LostAbilityData> list = LostAbilities[card];
		foreach (LostAbilityData item in list)
		{
			if (item.Ability == lost.Ability)
			{
				return;
			}
		}
		list.Add(new LostAbilityData(lost.Ability, lost.TemporaryMod));
	}

	private static IEnumerator RestoreAllForUpkeep(bool playerUpkeep)
	{
		if (LostAbilities.Count == 0)
		{
			yield break;
		}
		restoring = true;
		try
		{
			Singleton<ViewManager>.Instance.SwitchToView((View)4, false, false);
			yield return (object)new WaitForSeconds(0.1f);
			List<KeyValuePair<PlayableCard, List<LostAbilityData>>> pending = new List<KeyValuePair<PlayableCard, List<LostAbilityData>>>(LostAbilities);
			foreach (KeyValuePair<PlayableCard, List<LostAbilityData>> entry in pending)
			{
				PlayableCard card = entry.Key;
				if ((Object)(object)card == (Object)null || card.Dead || (Object)(object)card.Slot == (Object)null || card.OpponentCard != !playerUpkeep)
				{
					continue;
				}
				List<LostAbilityData> lost = entry.Value;
				if (lost == null || lost.Count == 0)
				{
					continue;
				}
				yield return RevealCard(card);
				foreach (LostAbilityData data in lost)
				{
					if ((Object)(object)card == (Object)null || card.Dead)
					{
						break;
					}
					if (card.HasAbility(data.Ability))
					{
						continue;
					}
					if (!data.IsTemporary)
					{
						card.TriggerHandler.AddAbility(data.Ability);
						continue;
					}
					CardModificationInfo mod = CloneTemporaryMod(data.TemporaryMod, data.Ability);
					if (mod != null)
					{
						card.AddTemporaryMod(mod);
					}
				}
				((Card)card).RenderCard();
				card.OnStatsChanged();
				card.UpdateFaceUpOnBoardEffects();
				yield return SigilDialogueAPI.ShowFirstTime("Infinite", "It never knows contentment.", card);
				yield return (object)new WaitForSeconds(0.25f);
			}
		}
		finally
		{
			LostAbilities.Clear();
			restoring = false;
		}
	}

	private static IEnumerator RevealCard(PlayableCard card)
	{
		if (!((Object)(object)card == (Object)null) && !card.Dead && ((Card)card).FaceDown)
		{
			((Card)card).SetFaceDown(false, false);
			yield return (object)new WaitForSeconds(0.15f);
		}
	}

	private static CardModificationInfo CloneTemporaryMod(CardModificationInfo source, Ability ability)
	{
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: Expected O, but got Unknown
		//IL_0097: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Expected O, but got Unknown
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
		if (source == null)
		{
			CardModificationInfo val = new CardModificationInfo();
			val.abilities = new List<Ability> { ability };
			return val;
		}
		CardModificationInfo val2 = new CardModificationInfo();
		val2.attackAdjustment = source.attackAdjustment;
		val2.healthAdjustment = source.healthAdjustment;
		val2.bloodCostAdjustment = source.bloodCostAdjustment;
		val2.bonesCostAdjustment = source.bonesCostAdjustment;
		val2.energyCostAdjustment = source.energyCostAdjustment;
		val2.gemify = source.gemify;
		val2.fromOverclock = source.fromOverclock;
		val2.singletonId = source.singletonId;
		val2.abilities = new List<Ability> { ability };
		foreach (Ability negateAbility in source.negateAbilities)
		{
			val2.negateAbilities.Add(negateAbility);
		}
		return val2;
	}
}
[BepInPlugin("OLD_SA.Infinite", "OLD SA Infinite", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private Harmony harmony;

	private unsafe void Awake()
	{
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_006c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0076: Expected O, but got Unknown
		((BaseUnityPlugin)this).Logger.LogInfo((object)"[OLD SA Infinite] Loading...");
		InfiniteAPI.Init();
		if (InfiniteAPI.ability == null)
		{
			((BaseUnityPlugin)this).Logger.LogError((object)"[OLD SA Infinite] Failed to register Infinite ability!");
			return;
		}
		ManualLogSource logger = ((BaseUnityPlugin)this).Logger;
		Ability id = InfiniteAPI.ability.Id;
		logger.LogInfo((object)("[OLD SA Infinite] Infinite ability registered. ID = " + ((object)(*(Ability*)(&id))/*cast due to .constrained prefix*/).ToString()));
		harmony = new Harmony("OLD_SA.Infinite");
		harmony.PatchAll();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"[OLD SA Infinite] Harmony patches applied.");
		((BaseUnityPlugin)this).Logger.LogInfo((object)"[OLD SA Infinite] Loaded successfully.");
	}

	private void OnDestroy()
	{
		if (harmony != null)
		{
			harmony.UnpatchSelf();
			harmony = null;
		}
		((BaseUnityPlugin)this).Logger.LogInfo((object)"[OLD SA Infinite] Unloaded.");
	}
}

Sigil/OldSa_Martyr's Sting_station.dll

Decompiled a day ago
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Martyr's Sting_station")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Martyr's Sting_station")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("292d45ee-add0-4f6e-b6d7-c6be983e9d4a")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.MartyrsSting;

public class MartyrsSting : VariableStatBehaviour
{
	public static SpecialStatIcon iconType;

	protected override SpecialStatIcon IconType => iconType;

	public static void Init()
	{
		//IL_0086: Unknown result type (might be due to invalid IL or missing references)
		//IL_008b: Unknown result type (might be due to invalid IL or missing references)
		StatIconInfo val = ScriptableObject.CreateInstance<StatIconInfo>();
		val.rulebookName = "Martyr's Sting";
		val.rulebookDescription = "The lower this creature's health, the higher its attack.";
		Texture2D imageAsTexture = TextureHelper.GetImageAsTexture("Martyr's Sting.png", (FilterMode)0);
		val.iconGraphic = (Texture)(object)imageAsTexture;
		Texture2D imageAsTexture2 = TextureHelper.GetImageAsTexture("Martyr's Sting_px.png", (FilterMode)0);
		AbilityExtensions.SetPixelIcon(val, imageAsTexture2, (FilterMode?)null);
		val.metaCategories = new List<AbilityMetaCategory> { (AbilityMetaCategory)0 };
		val.appliesToAttack = true;
		val.appliesToHealth = false;
		FullStatIcon val2 = StatIconManager.Add("OLD_SA", val, typeof(MartyrsSting));
		iconType = val2.Id;
	}

	protected override int[] GetStatValues()
	{
		if ((Object)(object)((SpecialCardBehaviour)this).PlayableCard == (Object)null || (Object)(object)((SpecialCardBehaviour)this).PlayableCard.Slot == (Object)null)
		{
			return new int[2];
		}
		int maxHealth = ((SpecialCardBehaviour)this).PlayableCard.MaxHealth;
		int health = ((SpecialCardBehaviour)this).PlayableCard.Health;
		int num = maxHealth - health;
		return new int[2]
		{
			1 + num,
			0
		};
	}
}
[BepInPlugin("OLD_SA.MartyrsSting", "OLD_SA Martyr's Sting", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		MartyrsSting.Init();
		Harmony val = new Harmony("OLD_SA.MartyrsSting");
		val.PatchAll();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"OLD_SA Martyr's Sting Loaded");
	}
}

Sigil/OldSa_Penalty_sigil.dll

Decompiled a day ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Penalty_sigil")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Penalty_sigil")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("3abb0a06-3397-4edd-a979-83e4c193ba69")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.Penalty;

public static class PenaltyAPI
{
	public static FullAbility ability;

	public static void Init()
	{
		//IL_0079: Unknown result type (might be due to invalid IL or missing references)
		//IL_0088: Unknown result type (might be due to invalid IL or missing references)
		AbilityInfo val = ScriptableObject.CreateInstance<AbilityInfo>();
		((Object)val).name = "Penalty";
		val.rulebookName = "Penalty";
		val.metaCategories = new List<AbilityMetaCategory> { (AbilityMetaCategory)0 };
		val.powerLevel = -2;
		val.opponentUsable = false;
		val.canStack = false;
		Texture imageAsTexture = (Texture)(object)TextureHelper.GetImageAsTexture("OldSa_Penalty.png", (FilterMode)0);
		Texture2D imageAsTexture2 = TextureHelper.GetImageAsTexture("OldSa_Penalty_px.png", (FilterMode)0);
		val.pixelIcon = Sprite.Create(imageAsTexture2, new Rect(0f, 0f, (float)((Texture)imageAsTexture2).width, (float)((Texture)imageAsTexture2).height), new Vector2(0.5f, 0.5f));
		FieldInfo field = typeof(AbilityInfo).GetField("rulebookDescription", BindingFlags.Instance | BindingFlags.NonPublic);
		if (field != null)
		{
			field.SetValue(val, "When [creature] is played, its owner takes 1 damage.");
		}
		ability = AbilityManager.Add("OLD_SA", val, typeof(PenaltyBehaviour), imageAsTexture);
	}
}
public class PenaltyBehaviour : AbilityBehaviour
{
	private static readonly MethodInfo PreSuccessfulTriggerSequenceMethod = AccessTools.Method(typeof(AbilityBehaviour), "PreSuccessfulTriggerSequence", (Type[])null, (Type[])null);

	public override Ability Ability => PenaltyAPI.ability.Id;

	public override bool RespondsToResolveOnBoard()
	{
		return true;
	}

	public override IEnumerator OnResolveOnBoard()
	{
		if (!((Object)(object)((AbilityBehaviour)this).Card == (Object)null) && !((Object)(object)Singleton<LifeManager>.Instance == (Object)null))
		{
			yield return InvokePreSuccessfulTriggerSequence();
			bool toPlayer = !((AbilityBehaviour)this).Card.OpponentCard;
			yield return Singleton<LifeManager>.Instance.ShowDamageSequence(1, 1, toPlayer, 0.125f, (GameObject)null, 0f, true);
		}
	}

	private IEnumerator InvokePreSuccessfulTriggerSequence()
	{
		if (PreSuccessfulTriggerSequenceMethod == null)
		{
			yield break;
		}
		object result = PreSuccessfulTriggerSequenceMethod.Invoke(this, null);
		if (result is IEnumerator sequence)
		{
			while (sequence.MoveNext())
			{
				yield return sequence.Current;
			}
		}
	}
}
[BepInPlugin("OLD_SA.Penalty", "OLD SA Penalty", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private Harmony harmony;

	private unsafe void Awake()
	{
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_006c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0076: Expected O, but got Unknown
		((BaseUnityPlugin)this).Logger.LogInfo((object)"[OLD SA Penalty] Loading...");
		PenaltyAPI.Init();
		if (PenaltyAPI.ability == null)
		{
			((BaseUnityPlugin)this).Logger.LogError((object)"[OLD SA Penalty] Failed to register Penalty ability!");
			return;
		}
		ManualLogSource logger = ((BaseUnityPlugin)this).Logger;
		Ability id = PenaltyAPI.ability.Id;
		logger.LogInfo((object)("[OLD SA Penalty] Penalty ability registered. ID = " + ((object)(*(Ability*)(&id))/*cast due to .constrained prefix*/).ToString()));
		harmony = new Harmony("OLD_SA.Penalty");
		harmony.PatchAll();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"[OLD SA Penalty] Harmony patches applied.");
		((BaseUnityPlugin)this).Logger.LogInfo((object)"[OLD SA Penalty] Loaded successfully.");
	}

	private void OnDestroy()
	{
		if (harmony != null)
		{
			harmony.UnpatchSelf();
			harmony = null;
		}
		((BaseUnityPlugin)this).Logger.LogInfo((object)"[OLD SA Penalty] Unloaded.");
	}
}

Sigil/OldSa_Random_sigil.dll

Decompiled a day ago
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Random_sigil")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Random_sigil")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("cf3705a4-140c-4f68-8f0c-b63c824f267b")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.Random;

[BepInPlugin("OLD_SA.Random", "OLD SA Random", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		RandomAPI.Init();
		Harmony val = new Harmony("OLD_SA.Random");
		val.PatchAll();
	}
}
public static class RandomAPI
{
	public static FullAbility ability;

	public static Ability RandomAbility;

	public static void Init()
	{
		//IL_009f: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
		AbilityInfo val = ScriptableObject.CreateInstance<AbilityInfo>();
		((Object)val).name = "Random";
		val.rulebookName = "Random";
		val.metaCategories = new List<AbilityMetaCategory> { (AbilityMetaCategory)0 };
		val.powerLevel = -1;
		val.opponentUsable = false;
		val.canStack = false;
		Texture imageAsTexture = (Texture)(object)TextureHelper.GetImageAsTexture("OldSa_Random.png", (FilterMode)0);
		FieldInfo field = typeof(AbilityInfo).GetField("rulebookDescription", BindingFlags.Instance | BindingFlags.NonPublic);
		if (field != null)
		{
			field.SetValue(val, "When [creature] attacks, its target is random.");
		}
		ability = AbilityManager.Add("OLD_SA", val, typeof(RandomBehaviour), imageAsTexture);
		RandomAbility = val.ability;
	}
}
public class RandomBehaviour : AbilityBehaviour
{
	public override Ability Ability => RandomAPI.ability.Id;
}
[HarmonyPatch(typeof(PlayableCard), "GetOpposingSlots")]
public static class RandomPatch
{
	private static int randomCounter;

	[HarmonyPostfix]
	public static void Postfix(PlayableCard __instance, ref List<CardSlot> __result)
	{
		//IL_0037: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)__instance == (Object)null || (Object)(object)__instance.Slot == (Object)null || __result == null || RandomAPI.ability == null || !__instance.HasAbility(RandomAPI.ability.Id))
		{
			return;
		}
		List<CardSlot> list = (__instance.OpponentCard ? Singleton<BoardManager>.Instance.PlayerSlotsCopy : Singleton<BoardManager>.Instance.OpponentSlotsCopy);
		if (list == null || list.Count == 0)
		{
			return;
		}
		int count = __result.Count;
		if (count > 0)
		{
			List<CardSlot> list2 = new List<CardSlot>();
			for (int i = 0; i < count; i++)
			{
				int randomSeed = GetRandomSeed(__instance, i);
				float num = SeededRandom.Value(randomSeed);
				int num2 = Mathf.FloorToInt(num * (float)list.Count);
				num2 = Mathf.Clamp(num2, 0, list.Count - 1);
				list2.Add(list[num2]);
			}
			__result = list2;
		}
	}

	private static int GetRandomSeed(PlayableCard card, int attackIndex)
	{
		int currentRandomSeed = SaveManager.SaveFile.GetCurrentRandomSeed();
		int num = (((Object)(object)card != (Object)null && (Object)(object)card.Slot != (Object)null) ? card.Slot.Index : 0);
		int num2 = randomCounter++;
		int num3 = currentRandomSeed;
		num3 = num3 * 31 + num;
		num3 = num3 * 31 + attackIndex;
		return num3 * 31 + num2;
	}
}

Sigil/OldSa_Retribution_sigil.dll

Decompiled a day ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using OLD_SA.Dialogue;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Retribution_sigil")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Retribution_sigil")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("40ac4f68-7b1a-43e3-8dc6-e8c2d15bec1b")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.Retribution;

[BepInPlugin("OLD_SA.Retribution", "OLD SA Retribution", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		RetributionAPI.Init();
		Harmony val = new Harmony("OLD_SA.Retribution");
		val.PatchAll();
		Debug.Log((object)"OLD SA Retribution Loaded");
	}
}
public static class RetributionAPI
{
	public static FullAbility ability;

	public unsafe static void Init()
	{
		//IL_0071: Unknown result type (might be due to invalid IL or missing references)
		//IL_0080: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
		AbilityInfo val = ScriptableObject.CreateInstance<AbilityInfo>();
		((Object)val).name = "Retribution";
		val.rulebookName = "Retribution";
		val.metaCategories = new List<AbilityMetaCategory> { (AbilityMetaCategory)0 };
		val.powerLevel = 3;
		val.opponentUsable = false;
		Texture imageAsTexture = (Texture)(object)TextureHelper.GetImageAsTexture("OldSa_Retribution.png", (FilterMode)0);
		Texture2D imageAsTexture2 = TextureHelper.GetImageAsTexture("OldSa_Retribution_px.png", (FilterMode)0);
		val.pixelIcon = Sprite.Create(imageAsTexture2, new Rect(0f, 0f, (float)((Texture)imageAsTexture2).width, (float)((Texture)imageAsTexture2).height), new Vector2(0.5f, 0.5f));
		FieldInfo field = typeof(AbilityInfo).GetField("rulebookDescription", BindingFlags.Instance | BindingFlags.NonPublic);
		if (field != null)
		{
			field.SetValue(val, "When an enemy creature attacks the player, [creature] causes it to lose Power.");
		}
		ability = AbilityManager.Add("OLD_SA", val, typeof(RetributionBehaviour), imageAsTexture);
		Ability id = ability.Id;
		Debug.Log((object)("Retribution registered ID=" + ((object)(*(Ability*)(&id))/*cast due to .constrained prefix*/).ToString()));
	}
}
public class RetributionBehaviour : AbilityBehaviour
{
	public override Ability Ability => RetributionAPI.ability.Id;

	public IEnumerator Trigger(PlayableCard attacker)
	{
		if (!((Object)(object)attacker == (Object)null))
		{
			yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
			yield return (object)new WaitForSeconds(0.4f);
			if ((Object)(object)((AbilityBehaviour)this).Card != (Object)null && (Object)(object)((AbilityBehaviour)this).Card.Slot != (Object)null && (Object)(object)attacker.Slot != (Object)null)
			{
				((Card)((AbilityBehaviour)this).Card).Anim.PlayAttackAnimation(((AbilityBehaviour)this).Card.IsFlyingAttackingReach(), attacker.Slot, (Action)null);
				yield return (object)new WaitForSeconds(0f);
				((Card)attacker).Anim.PlayHitAnimation();
				yield return (object)new WaitForSeconds(0.2f);
			}
			CardModificationInfo debuff = new CardModificationInfo();
			debuff.attackAdjustment = -1;
			attacker.AddTemporaryMod(debuff);
			((Card)attacker).RenderCard();
			yield return SigilDialogueAPI.ShowFirstTime("Retribution", "It makes all who commit violence pay the price.");
		}
	}
}
[HarmonyPatch(typeof(CombatPhaseManager), "SlotAttackSlot")]
public static class RetributionPatch
{
	public static IEnumerator Postfix(IEnumerator result, CardSlot attackingSlot, CardSlot opposingSlot)
	{
		int oldDamage = Singleton<CombatPhaseManager>.Instance.DamageDealtThisPhase;
		while (result.MoveNext())
		{
			yield return result.Current;
		}
		if ((Object)(object)attackingSlot == (Object)null || (Object)(object)opposingSlot == (Object)null || (Object)(object)attackingSlot.Card == (Object)null)
		{
			yield break;
		}
		PlayableCard attacker = attackingSlot.Card;
		int newDamage = Singleton<CombatPhaseManager>.Instance.DamageDealtThisPhase;
		if (newDamage <= oldDamage)
		{
			yield break;
		}
		List<CardSlot> targetSlots = ((!opposingSlot.IsPlayerSlot) ? Singleton<BoardManager>.Instance.OpponentSlotsCopy : Singleton<BoardManager>.Instance.PlayerSlotsCopy);
		foreach (CardSlot slot in targetSlots)
		{
			if (!((Object)(object)slot == (Object)null) && !((Object)(object)slot.Card == (Object)null) && slot.Card.HasAbility(RetributionAPI.ability.Id))
			{
				RetributionBehaviour behaviour = ((Component)slot.Card).GetComponent<RetributionBehaviour>();
				if (!((Object)(object)behaviour == (Object)null))
				{
					yield return (object)new WaitForSeconds(0.2f);
					yield return behaviour.Trigger(attacker);
				}
			}
		}
	}
}

Sigil/OldSa_Ring Fort_sigil.dll

Decompiled a day ago
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using OLD_SA.Dialogue;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Ring Fort_sigil")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Ring Fort_sigil")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("c7d3d1e4-a719-44a4-9bbf-73e52029f5e9")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.RingFort;

[BepInPlugin("oldsa.ringfort", "Old SA Ring Fort", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		RingFortAPI.Init();
		Harmony val = new Harmony("oldsa.ringfort");
		val.PatchAll();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Old SA Ring Fort Loaded");
	}
}
public class RingFortBehaviour : AbilityBehaviour
{
	public override Ability Ability => RingFortAPI.ability.Id;

	public IEnumerator TriggerFirstDialogue()
	{
		yield return SigilDialogueAPI.ShowFirstTime("RingFort", "A pitiful creature... yet this time, it managed to protect everything.", ((AbilityBehaviour)this).Card);
	}
}
public class RingFortAPI
{
	public static FullAbility ability;

	public unsafe static void Init()
	{
		//IL_009a: Unknown result type (might be due to invalid IL or missing references)
		//IL_009f: Unknown result type (might be due to invalid IL or missing references)
		AbilityInfo val = ScriptableObject.CreateInstance<AbilityInfo>();
		((Object)val).name = "RingFort";
		val.rulebookName = "Ring Fort";
		val.powerLevel = 5;
		val.metaCategories = new List<AbilityMetaCategory> { (AbilityMetaCategory)0 };
		FieldInfo field = typeof(AbilityInfo).GetField("rulebookDescription", BindingFlags.Instance | BindingFlags.NonPublic);
		if (field != null)
		{
			field.SetValue(val, "When [creature] takes damage, it intercepts the attack and reduces that damage by 1.");
		}
		Texture2D imageAsTexture = TextureHelper.GetImageAsTexture("OldSa_Ring_Fort.png", (FilterMode)0);
		ability = AbilityManager.Add("OLD_SA", val, typeof(RingFortBehaviour), (Texture)(object)imageAsTexture);
		Ability id = ability.Id;
		Debug.Log((object)("Ring Fort registered ID = " + ((object)(*(Ability*)(&id))/*cast due to .constrained prefix*/).ToString()));
	}
}
[HarmonyPatch(typeof(CombatPhaseManager), "SlotAttackSlot")]
public class RingFortPatch
{
	public static PlayableCard redirectedCard;

	public static void Prefix(CardSlot attackingSlot, ref CardSlot opposingSlot, float waitAfter)
	{
		//IL_009f: Unknown result type (might be due to invalid IL or missing references)
		redirectedCard = null;
		if ((Object)(object)attackingSlot == (Object)null || (Object)(object)opposingSlot == (Object)null || (Object)(object)attackingSlot.Card == (Object)null)
		{
			return;
		}
		List<CardSlot> list = ((!attackingSlot.IsPlayerSlot) ? Singleton<BoardManager>.Instance.PlayerSlotsCopy : Singleton<BoardManager>.Instance.OpponentSlotsCopy);
		foreach (CardSlot item in list)
		{
			if ((Object)(object)item.Card == (Object)null || !item.Card.HasAbility(RingFortAPI.ability.Id))
			{
				continue;
			}
			redirectedCard = item.Card;
			opposingSlot = item;
			break;
		}
	}
}
[HarmonyPatch(typeof(PlayableCard), "TakeDamage")]
public class RingFortDamagePatch
{
	public static void Prefix(PlayableCard __instance, ref int damage)
	{
		if ((Object)(object)__instance == (Object)null || !((Object)(object)__instance == (Object)(object)RingFortPatch.redirectedCard))
		{
			return;
		}
		int num = damage;
		damage = Mathf.Max(0, damage - 1);
		if (num > damage && !SigilDialogueSaveData.HasTriggered("RingFort"))
		{
			RingFortBehaviour component = ((Component)__instance).GetComponent<RingFortBehaviour>();
			if ((Object)(object)component != (Object)null)
			{
				((MonoBehaviour)__instance).StartCoroutine(component.TriggerFirstDialogue());
			}
		}
	}
}
[HarmonyPatch(typeof(PlayableCard), "CanAttackDirectly")]
public class RingFortDirectAttackPatch
{
	public static bool Prefix(PlayableCard __instance, CardSlot opposingSlot, ref bool __result)
	{
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)__instance == (Object)null)
		{
			return true;
		}
		if ((Object)(object)opposingSlot == (Object)null)
		{
			return true;
		}
		if ((Object)(object)opposingSlot.Card != (Object)null && opposingSlot.Card.HasAbility(RingFortAPI.ability.Id))
		{
			Debug.Log((object)"Ring Fort blocks direct attack");
			__result = false;
			return false;
		}
		return true;
	}
}

Sigil/OldSa_Royalty_station.dll

Decompiled a day ago
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OLD_SA.Royalty")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OLD_SA.Royalty")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("7879e24e-cb30-4fed-833d-51d78ca3f60b")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.Royalty;

[BepInPlugin("OLD_SA.Royalty", "OLD_SA Royalty", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		Royalty.Init();
		Harmony val = new Harmony("OLD_SA.Royalty");
		val.PatchAll();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"OLD_SA Royalty Loaded");
	}
}
public class Royalty : VariableStatBehaviour
{
	public static SpecialStatIcon iconType;

	protected override SpecialStatIcon IconType => iconType;

	public static void Init()
	{
		//IL_0086: Unknown result type (might be due to invalid IL or missing references)
		//IL_008b: Unknown result type (might be due to invalid IL or missing references)
		StatIconInfo val = ScriptableObject.CreateInstance<StatIconInfo>();
		val.rulebookName = "Royalty";
		val.rulebookDescription = "This creature's attack is determined by the number of different tribes present on the board.";
		Texture2D imageAsTexture = TextureHelper.GetImageAsTexture("royalty.png", (FilterMode)0);
		val.iconGraphic = (Texture)(object)imageAsTexture;
		Texture2D imageAsTexture2 = TextureHelper.GetImageAsTexture("royalty_px.png", (FilterMode)0);
		AbilityExtensions.SetPixelIcon(val, imageAsTexture2, (FilterMode?)null);
		val.metaCategories = new List<AbilityMetaCategory> { (AbilityMetaCategory)0 };
		val.appliesToAttack = true;
		val.appliesToHealth = false;
		FullStatIcon val2 = StatIconManager.Add("OLD_SA", val, typeof(Royalty));
		iconType = val2.Id;
	}

	protected override int[] GetStatValues()
	{
		HashSet<string> hashSet = new HashSet<string>();
		foreach (CardSlot slot in Singleton<BoardManager>.Instance.GetSlots(true))
		{
			AddTribe(slot, hashSet);
		}
		foreach (CardSlot slot2 in Singleton<BoardManager>.Instance.GetSlots(false))
		{
			AddTribe(slot2, hashSet);
		}
		int count = hashSet.Count;
		int num = count;
		int? extendedPropertyAsInt = CardExtensions.GetExtendedPropertyAsInt(((Card)((SpecialCardBehaviour)this).PlayableCard).Info, "OLD_SA.RoyaltyBonus");
		if (extendedPropertyAsInt.HasValue)
		{
			num = extendedPropertyAsInt.Value;
		}
		return new int[2]
		{
			count + num,
			0
		};
	}

	private void AddTribe(CardSlot slot, HashSet<string> tribes)
	{
		//IL_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)slot.Card == (Object)null)
		{
			return;
		}
		if (((Card)slot.Card).Info.tribes == null || ((Card)slot.Card).Info.tribes.Count == 0)
		{
			tribes.Add("NONE");
			return;
		}
		foreach (Tribe tribe in ((Card)slot.Card).Info.tribes)
		{
			tribes.Add(((object)tribe/*cast due to .constrained prefix*/).ToString());
		}
	}
}

Sigil/OldSa_SmallSigils.dll

Decompiled a day ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using InscryptionCommunityPatch.Card;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_SmallSigils")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_SmallSigils")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("1cd49d69-dd3b-4c57-b7ac-6ff7e5278d53")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.SmallSigils;

public class BurningStatusEffect : SmallSigilStatusEffectBehaviour
{
	public override string CardModSingletonName => "OLD_SA_Burning";
}
public class GluttonyStatusEffect : SmallSigilStatusEffectBehaviour
{
	public override string CardModSingletonName => "OLD_SA_Gluttony";
}
[BepInPlugin("OLD_SA.SmallSigils", "OLD SA Small Sigils", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	public const string PluginGuid = "OLD_SA.SmallSigils";

	private Harmony harmony;

	public static Plugin Instance { get; private set; }

	private void Awake()
	{
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0034: Expected O, but got Unknown
		Instance = this;
		((BaseUnityPlugin)this).Logger.LogInfo((object)"OLD SA Small Sigils Loaded");
		SmallSigilStatusEffectManager.Initialize("OLD_SA.SmallSigils");
		harmony = new Harmony("OLD_SA.SmallSigils");
		harmony.PatchAll();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"OLD SA Small Sigils patches applied.");
	}

	private void OnDestroy()
	{
		if (harmony != null)
		{
			harmony.UnpatchSelf();
			harmony = null;
		}
		Instance = null;
	}
}
public class PoisonStatusEffect : SmallSigilStatusEffectBehaviour
{
	public override string CardModSingletonName => "OLD_SA_Poison";
}
public class SmallSigilAbilityIcons : ManagedBehaviour
{
	public List<AbilityIconInteractable> part1AbilityIcons = new List<AbilityIconInteractable>();

	public List<GameObject> smallSigilIconGroups = new List<GameObject>();

	public List<AbilityIconInteractable> abilityIcons = new List<AbilityIconInteractable>();

	public Material smallSigilMat;

	public Color burningColor = new Color(1f, 0.15f, 0.05f, 1f);

	public Color poisonColor = new Color(0.15f, 1f, 0.15f, 1f);

	public Color gluttonyColor = new Color(0.45f, 0.22f, 0.08f, 1f);
}
[HarmonyPatch]
internal static class SmallSigilAbilityIconsPatch
{
	private const int MaxSmallSigilIcons = 5;

	private const float StartX = 0.4f;

	private const float XSpacing = 0.14f;

	private const float IconY = 0.75f;

	private static readonly Vector3 IconScale = new Vector3(0.1f, 0.075f, 1f);

	[HarmonyPostfix]
	[HarmonyPatch(typeof(CardAbilityIcons), "UpdateAbilityIcons")]
	private static void AddSmallSigilIcons(CardAbilityIcons __instance, PlayableCard playableCard)
	{
		//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01be: Invalid comparison between Unknown and I4
		//IL_022d: Unknown result type (might be due to invalid IL or missing references)
		//IL_023f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0269: Unknown result type (might be due to invalid IL or missing references)
		//IL_0284: Unknown result type (might be due to invalid IL or missing references)
		//IL_02e8: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)__instance == (Object)null || !SaveManager.SaveFile.IsPart1 || (Object)(object)playableCard == (Object)null)
		{
			return;
		}
		SmallSigilAbilityIcons smallSigilAbilityIcons = ((Component)__instance).GetComponent<SmallSigilAbilityIcons>();
		if ((Object)(object)smallSigilAbilityIcons == (Object)null)
		{
			smallSigilAbilityIcons = ((Component)__instance).gameObject.AddComponent<SmallSigilAbilityIcons>();
		}
		if ((Object)(object)smallSigilAbilityIcons == (Object)null || smallSigilAbilityIcons.part1AbilityIcons == null)
		{
			return;
		}
		if (smallSigilAbilityIcons.part1AbilityIcons.Count < 5)
		{
			CreateSmallSigilSlots(__instance, smallSigilAbilityIcons);
		}
		if (smallSigilAbilityIcons.part1AbilityIcons.Count == 0)
		{
			return;
		}
		for (int i = 0; i < smallSigilAbilityIcons.part1AbilityIcons.Count; i++)
		{
			AbilityIconInteractable val = smallSigilAbilityIcons.part1AbilityIcons[i];
			if ((Object)(object)val != (Object)null)
			{
				((Component)val).gameObject.SetActive(false);
			}
		}
		List<SmallSigilType> list = new List<SmallSigilType>();
		if (SmallSigilManager.GetStacks(playableCard, SmallSigilType.Burning) > 0)
		{
			list.Add(SmallSigilType.Burning);
		}
		if (SmallSigilManager.GetStacks(playableCard, SmallSigilType.Poison) > 0)
		{
			list.Add(SmallSigilType.Poison);
		}
		if (SmallSigilManager.GetStacks(playableCard, SmallSigilType.Gluttony) > 0)
		{
			list.Add(SmallSigilType.Gluttony);
		}
		if (list.Count == 0)
		{
			return;
		}
		int num = Mathf.Min(new int[3]
		{
			list.Count,
			smallSigilAbilityIcons.part1AbilityIcons.Count,
			5
		});
		for (int j = 0; j < num; j++)
		{
			SmallSigilType type = list[j];
			Ability ability = GetAbility(type);
			if ((int)ability == 0)
			{
				continue;
			}
			AbilityIconInteractable val2 = smallSigilAbilityIcons.part1AbilityIcons[j];
			if ((Object)(object)val2 == (Object)null)
			{
				continue;
			}
			int stacks = SmallSigilManager.GetStacks(playableCard, type);
			if (stacks <= 0)
			{
				continue;
			}
			((Component)val2).transform.localPosition = new Vector3(0.4f - 0.14f * (float)j, 0.75f, 0f);
			((Component)val2).transform.localScale = IconScale;
			Texture texture = GetTexture(type);
			if ((Object)(object)texture == (Object)null)
			{
				continue;
			}
			val2.AssignAbility(ability, ((Card)playableCard).Info, playableCard);
			if (stacks > 1)
			{
				Texture val3 = InvokePatchTexture(ability, stacks);
				if ((Object)(object)val3 != (Object)null)
				{
					val2.SetIcon(val3);
				}
				else
				{
					val2.SetIcon(texture);
				}
			}
			else
			{
				val2.SetIcon(texture);
			}
			Renderer component = ((Component)val2).GetComponent<Renderer>();
			if ((Object)(object)component != (Object)null)
			{
				component.material.color = GetColor(smallSigilAbilityIcons, type);
			}
			((Component)val2).gameObject.SetActive(true);
			if (!smallSigilAbilityIcons.abilityIcons.Contains(val2))
			{
				smallSigilAbilityIcons.abilityIcons.Add(val2);
			}
		}
	}

	[HarmonyPostfix]
	[HarmonyPatch(typeof(CardAbilityIcons), "UpdateAbilityIcons")]
	private static void ResetSmallSigilController(CardAbilityIcons __instance)
	{
		if ((Object)(object)__instance == (Object)null)
		{
			return;
		}
		SmallSigilAbilityIcons component = ((Component)__instance).GetComponent<SmallSigilAbilityIcons>();
		if (!((Object)(object)component == (Object)null) && component.abilityIcons != null)
		{
			component.abilityIcons.RemoveAll((AbilityIconInteractable icon) => (Object)(object)icon == (Object)null || !((Component)icon).gameObject.activeSelf);
		}
	}

	private static Texture InvokePatchTexture(Ability ability, int count)
	{
		//IL_004f: Unknown result type (might be due to invalid IL or missing references)
		if (count <= 1)
		{
			return null;
		}
		MethodInfo methodInfo = AccessTools.Method(typeof(StackAbilityIcons), "PatchTexture", (Type[])null, (Type[])null);
		if (methodInfo == null)
		{
			return null;
		}
		int num = Mathf.Clamp(count, 2, 99);
		try
		{
			object obj = methodInfo.Invoke(null, new object[2] { ability, num });
			return (Texture)((obj is Texture) ? obj : null);
		}
		catch
		{
			return null;
		}
	}

	private static void CreateSmallSigilSlots(CardAbilityIcons instance, SmallSigilAbilityIcons controller)
	{
		//IL_010a: Unknown result type (might be due to invalid IL or missing references)
		//IL_011c: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)instance == (Object)null || (Object)(object)controller == (Object)null)
		{
			return;
		}
		AbilityIconInteractable val = null;
		AbilityIconInteractable[] componentsInChildren = ((Component)instance).GetComponentsInChildren<AbilityIconInteractable>(true);
		AbilityIconInteractable[] array = componentsInChildren;
		foreach (AbilityIconInteractable val2 in array)
		{
			if (!((Object)(object)val2 == (Object)null) && !((Object)((Component)val2).gameObject).name.StartsWith("SmallSigilIcon_"))
			{
				val = val2;
				break;
			}
		}
		if ((Object)(object)val == (Object)null)
		{
			return;
		}
		for (int j = controller.part1AbilityIcons.Count; j < 5; j++)
		{
			GameObject val3 = Object.Instantiate<GameObject>(((Component)val).gameObject, ((Component)val).transform.parent);
			if ((Object)(object)val3 == (Object)null)
			{
				continue;
			}
			((Object)val3).name = "SmallSigilIcon_" + (j + 1);
			val3.transform.localPosition = new Vector3(0.4f - 0.14f * (float)j, 0.75f, 0f);
			val3.transform.localScale = IconScale;
			AbilityIconInteractable component = val3.GetComponent<AbilityIconInteractable>();
			if ((Object)(object)component == (Object)null)
			{
				Object.Destroy((Object)(object)val3);
				continue;
			}
			Renderer component2 = ((Component)val).GetComponent<Renderer>();
			Renderer component3 = ((Component)component).GetComponent<Renderer>();
			if ((Object)(object)component2 != (Object)null && (Object)(object)component3 != (Object)null)
			{
				component3.sharedMaterial = component2.sharedMaterial;
			}
			controller.part1AbilityIcons.Add(component);
			val3.SetActive(false);
		}
	}

	private static Ability GetAbility(SmallSigilType type)
	{
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		return (Ability)(type switch
		{
			SmallSigilType.Burning => SmallSigilStatusEffectManager.GetIconAbility(typeof(BurningStatusEffect)), 
			SmallSigilType.Poison => SmallSigilStatusEffectManager.GetIconAbility(typeof(PoisonStatusEffect)), 
			SmallSigilType.Gluttony => SmallSigilStatusEffectManager.GetIconAbility(typeof(GluttonyStatusEffect)), 
			_ => 0, 
		});
	}

	private static Texture GetTexture(SmallSigilType type)
	{
		return (Texture)(type switch
		{
			SmallSigilType.Burning => SmallSigilStatusEffectManager.GetIconTexture(typeof(BurningStatusEffect)), 
			SmallSigilType.Poison => SmallSigilStatusEffectManager.GetIconTexture(typeof(PoisonStatusEffect)), 
			SmallSigilType.Gluttony => SmallSigilStatusEffectManager.GetIconTexture(typeof(GluttonyStatusEffect)), 
			_ => null, 
		});
	}

	private static Color GetColor(SmallSigilAbilityIcons controller, SmallSigilType type)
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_0037: Unknown result type (might be due to invalid IL or missing references)
		//IL_003c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0040: Unknown result type (might be due to invalid IL or missing references)
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)controller == (Object)null)
		{
			return Color.white;
		}
		return (Color)(type switch
		{
			SmallSigilType.Burning => controller.burningColor, 
			SmallSigilType.Poison => controller.poisonColor, 
			SmallSigilType.Gluttony => controller.gluttonyColor, 
			_ => Color.white, 
		});
	}

	[HarmonyPostfix]
	[HarmonyPatch(typeof(CardAbilityIcons), "GetDistinctShownAbilities")]
	private static void HideSmallSigilsFromNormalIcons(ref List<Ability> __result)
	{
		if (__result != null && __result.Count != 0)
		{
			__result.RemoveAll((Ability ability) => SmallSigilStatusEffectManager.IsSmallSigilAbility(ability));
		}
	}
}
public class SmallSigilBehaviour : MonoBehaviour
{
	public PlayableCard Card { get; private set; }

	private void Awake()
	{
		Card = ((Component)this).GetComponent<PlayableCard>();
		if (!((Object)(object)Card == (Object)null))
		{
			SmallSigilManager.RegisterCard(Card);
			EnsureTriggerBehaviour();
		}
	}

	private void EnsureTriggerBehaviour()
	{
		if (!((Object)(object)Card == (Object)null) && (Object)(object)((Component)Card).GetComponent<SmallSigilTriggerBehaviour>() == (Object)null)
		{
			((Component)Card).gameObject.AddComponent<SmallSigilTriggerBehaviour>();
		}
	}

	private void OnDestroy()
	{
		if (!((Object)(object)Card == (Object)null))
		{
			SmallSigilRuleManager.ClearCard(Card);
			SmallSigilManager.ClearCard(Card);
			Card = null;
		}
	}
}
public class SmallSigilData
{
	private readonly Dictionary<SmallSigilType, int> stacks = new Dictionary<SmallSigilType, int>();

	public int GetStacks(SmallSigilType type)
	{
		if (stacks.TryGetValue(type, out var value))
		{
			return value;
		}
		return 0;
	}

	public void AddStacks(SmallSigilType type, int amount)
	{
		if (amount > 0)
		{
			int num = GetStacks(type);
			stacks[type] = num + amount;
		}
	}

	public bool RemoveStacks(SmallSigilType type, int amount)
	{
		if (amount <= 0)
		{
			return false;
		}
		int num = GetStacks(type);
		if (num < amount)
		{
			return false;
		}
		int num2 = num - amount;
		if (num2 <= 0)
		{
			stacks.Remove(type);
		}
		else
		{
			stacks[type] = num2;
		}
		return true;
	}

	public void SetStacks(SmallSigilType type, int amount)
	{
		if (amount <= 0)
		{
			stacks.Remove(type);
		}
		else
		{
			stacks[type] = amount;
		}
	}

	public void Clear()
	{
		stacks.Clear();
	}
}
public static class SmallSigilManager
{
	private static Type GetBehaviourType(SmallSigilType type)
	{
		return type switch
		{
			SmallSigilType.Burning => typeof(BurningStatusEffect), 
			SmallSigilType.Poison => typeof(PoisonStatusEffect), 
			SmallSigilType.Gluttony => typeof(GluttonyStatusEffect), 
			_ => null, 
		};
	}

	private static SmallSigilStatusEffectBehaviour GetBehaviour(PlayableCard card, SmallSigilType type, bool create)
	{
		if ((Object)(object)card == (Object)null)
		{
			return null;
		}
		Type behaviourType = GetBehaviourType(type);
		if (behaviourType == null)
		{
			return null;
		}
		SmallSigilStatusEffectBehaviour smallSigilStatusEffectBehaviour = ((Component)card).GetComponent(behaviourType) as SmallSigilStatusEffectBehaviour;
		if ((Object)(object)smallSigilStatusEffectBehaviour == (Object)null && create)
		{
			smallSigilStatusEffectBehaviour = ((Component)card).gameObject.AddComponent(behaviourType) as SmallSigilStatusEffectBehaviour;
		}
		return smallSigilStatusEffectBehaviour;
	}

	public static SmallSigilStatusEffectBehaviour GetBehaviourForRule(PlayableCard card, SmallSigilType type)
	{
		return GetBehaviour(card, type, create: false);
	}

	public static void RegisterCard(PlayableCard card)
	{
	}

	public static int GetStacks(PlayableCard card, SmallSigilType type)
	{
		SmallSigilStatusEffectBehaviour behaviour = GetBehaviour(card, type, create: false);
		if ((Object)(object)behaviour == (Object)null)
		{
			return 0;
		}
		return behaviour.EffectSeverity;
	}

	public static void AddStacks(PlayableCard card, SmallSigilType type, int amount)
	{
		if (!((Object)(object)card == (Object)null) && amount > 0)
		{
			SmallSigilStatusEffectBehaviour behaviour = GetBehaviour(card, type, create: true);
			if (!((Object)(object)behaviour == (Object)null))
			{
				behaviour.AddSeverity(amount);
				SmallSigilRuleManager.RequestProcess(card);
			}
		}
	}

	public static bool RemoveStacks(PlayableCard card, SmallSigilType type, int amount)
	{
		if ((Object)(object)card == (Object)null || amount <= 0)
		{
			return false;
		}
		SmallSigilStatusEffectBehaviour behaviour = GetBehaviour(card, type, create: false);
		if ((Object)(object)behaviour == (Object)null)
		{
			return false;
		}
		if (behaviour.EffectSeverity < amount)
		{
			return false;
		}
		behaviour.SetSeverity(behaviour.EffectSeverity - amount);
		return true;
	}

	public static void SetStacks(PlayableCard card, SmallSigilType type, int amount)
	{
		if ((Object)(object)card == (Object)null)
		{
			return;
		}
		SmallSigilStatusEffectBehaviour behaviour = GetBehaviour(card, type, create: true);
		if (!((Object)(object)behaviour == (Object)null))
		{
			behaviour.SetSeverity(amount);
			if (amount > 0)
			{
				SmallSigilRuleManager.RequestProcess(card);
			}
		}
	}

	public static void ClearStacks(PlayableCard card, SmallSigilType type)
	{
		if (!((Object)(object)card == (Object)null))
		{
			SmallSigilStatusEffectBehaviour behaviour = GetBehaviour(card, type, create: false);
			if (!((Object)(object)behaviour == (Object)null))
			{
				behaviour.SetSeverity(0);
			}
		}
	}

	public static void ClearCard(PlayableCard card)
	{
		if (!((Object)(object)card == (Object)null))
		{
			ClearStacks(card, SmallSigilType.Burning);
			ClearStacks(card, SmallSigilType.Poison);
			ClearStacks(card, SmallSigilType.Gluttony);
		}
	}

	public static void ClearAll()
	{
	}

	private static string GetCardName(PlayableCard card)
	{
		if ((Object)(object)card == (Object)null || (Object)(object)((Card)card).Info == (Object)null)
		{
			return "NULL";
		}
		return ((Object)((Card)card).Info).name;
	}
}
public static class SmallSigilRuleManager
{
	private class SmallSigilRule
	{
		public int Threshold;

		public int Consume;

		public SmallSigilCategory Category;

		public SmallSigilAttribute Attribute;

		public Func<PlayableCard, IEnumerator> Effect;
	}

	private static readonly Dictionary<SmallSigilType, SmallSigilRule> Rules;

	private const float TriggerDelay = 0.4f;

	private static readonly HashSet<PlayableCard> ProcessingCards;

	private static readonly Dictionary<PlayableCard, int> BattleTriggerCounts;

	private static IEnumerator RunSmallSigilTriggerSequence(PlayableCard card, Ability ability)
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		if (!((Object)(object)card == (Object)null))
		{
			if ((Object)(object)Singleton<GlobalTriggerHandler>.Instance != (Object)null)
			{
				Singleton<GlobalTriggerHandler>.Instance.AbilitiesTriggeredThisTurn.Add(ability);
			}
			yield return card.OnAbilityTriggered(ability);
		}
	}

	static SmallSigilRuleManager()
	{
		Rules = new Dictionary<SmallSigilType, SmallSigilRule>();
		ProcessingCards = new HashSet<PlayableCard>();
		BattleTriggerCounts = new Dictionary<PlayableCard, int>();
		RegisterRules();
	}

	private static void RegisterRules()
	{
		Register(SmallSigilType.Burning, 2, 2, SmallSigilCategory.Debuff, SmallSigilAttribute.Fire, BurningEffect);
		Register(SmallSigilType.Poison, 4, 4, SmallSigilCategory.Debuff, SmallSigilAttribute.Poison, PoisonEffect);
		Register(SmallSigilType.Gluttony, 3, 3, SmallSigilCategory.Buff, SmallSigilAttribute.None, GluttonyEffect);
	}

	private static void Register(SmallSigilType type, int threshold, int consume, SmallSigilCategory category, SmallSigilAttribute attribute, Func<PlayableCard, IEnumerator> effect)
	{
		Rules[type] = new SmallSigilRule
		{
			Threshold = threshold,
			Consume = consume,
			Category = category,
			Attribute = attribute,
			Effect = effect
		};
	}

	public static void RequestProcess(PlayableCard card)
	{
		if (!((Object)(object)card == (Object)null) && !ProcessingCards.Contains(card) && HasTriggeredEffect(card))
		{
			ProcessingCards.Add(card);
			SmallSigilStatusEffectBehaviour component = ((Component)card).GetComponent<SmallSigilStatusEffectBehaviour>();
			if ((Object)(object)component == (Object)null)
			{
				ProcessingCards.Remove(card);
			}
			else
			{
				((MonoBehaviour)component).StartCoroutine(Process(card));
			}
		}
	}

	public static bool HasTriggeredEffect(PlayableCard card)
	{
		if ((Object)(object)card == (Object)null)
		{
			return false;
		}
		foreach (KeyValuePair<SmallSigilType, SmallSigilRule> rule in Rules)
		{
			int stacks = SmallSigilManager.GetStacks(card, rule.Key);
			if (stacks >= rule.Value.Threshold)
			{
				return true;
			}
		}
		return false;
	}

	public static IEnumerator Process(PlayableCard card)
	{
		if ((Object)(object)card == (Object)null)
		{
			yield break;
		}
		if (!ProcessingCards.Contains(card))
		{
			ProcessingCards.Add(card);
		}
		try
		{
			bool needsAnotherCheck = true;
			while ((Object)(object)card != (Object)null && needsAnotherCheck)
			{
				needsAnotherCheck = false;
				foreach (KeyValuePair<SmallSigilType, SmallSigilRule> pair in Rules)
				{
					if ((Object)(object)card == (Object)null)
					{
						yield break;
					}
					SmallSigilType type = pair.Key;
					SmallSigilRule rule = pair.Value;
					int stacks = SmallSigilManager.GetStacks(card, type);
					if (stacks < rule.Threshold)
					{
						continue;
					}
					int triggerCount = stacks / rule.Threshold;
					for (int i = 0; i < triggerCount; i++)
					{
						if ((Object)(object)card == (Object)null)
						{
							yield break;
						}
						int currentStacks = SmallSigilManager.GetStacks(card, type);
						if (currentStacks < rule.Threshold)
						{
							break;
						}
						SmallSigilStatusEffectBehaviour behaviour = SmallSigilManager.GetBehaviourForRule(card, type);
						if ((Object)(object)behaviour == (Object)null)
						{
							break;
						}
						yield return RunSmallSigilTriggerSequence(card, behaviour.IconAbilityInfo.ability);
						if ((Object)(object)card == (Object)null)
						{
							yield break;
						}
						currentStacks = SmallSigilManager.GetStacks(card, type);
						if (currentStacks < rule.Threshold || !SmallSigilManager.RemoveStacks(card, type, rule.Consume))
						{
							break;
						}
						if (rule.Effect != null)
						{
							yield return rule.Effect(card);
						}
						if ((Object)(object)card == (Object)null)
						{
							yield break;
						}
						yield return null;
					}
					if ((Object)(object)card != (Object)null && SmallSigilManager.GetStacks(card, type) >= rule.Threshold)
					{
						needsAnotherCheck = true;
					}
				}
				if ((Object)(object)card != (Object)null && HasTriggeredEffect(card))
				{
					needsAnotherCheck = true;
				}
			}
		}
		finally
		{
			ProcessingCards.Remove(card);
		}
	}

	private static IEnumerator BurningEffect(PlayableCard card)
	{
		if (!((Object)(object)card == (Object)null))
		{
			yield return card.TakeDamage(1, (PlayableCard)null);
		}
	}

	private static IEnumerator PoisonEffect(PlayableCard card)
	{
		if (!((Object)(object)card == (Object)null) && !card.HasAbility((Ability)105))
		{
			yield return card.Die(false, (PlayableCard)null, true);
		}
	}

	private static IEnumerator GluttonyEffect(PlayableCard card)
	{
		if (!((Object)(object)card == (Object)null))
		{
			if (!BattleTriggerCounts.ContainsKey(card))
			{
				BattleTriggerCounts.Add(card, 0);
			}
			BattleTriggerCounts[card]++;
			CardModificationInfo mod = new CardModificationInfo();
			mod.attackAdjustment = 1;
			mod.healthAdjustment = 1;
			((Card)card).Info.Mods.Add(mod);
			((Card)card).RenderCard();
			if (BattleTriggerCounts[card] >= 3)
			{
				yield return card.Die(false, (PlayableCard)null, true);
			}
			else
			{
				yield return null;
			}
		}
	}

	public static SmallSigilCategory GetCategory(SmallSigilType type)
	{
		if (Rules.TryGetValue(type, out var value))
		{
			return value.Category;
		}
		return SmallSigilCategory.Debuff;
	}

	public static SmallSigilAttribute GetAttribute(SmallSigilType type)
	{
		if (Rules.TryGetValue(type, out var value))
		{
			return value.Attribute;
		}
		return SmallSigilAttribute.None;
	}

	public static void ClearCard(PlayableCard card)
	{
		if (!((Object)(object)card == (Object)null))
		{
			BattleTriggerCounts.Remove(card);
			ProcessingCards.Remove(card);
		}
	}

	public static void ClearAll()
	{
		BattleTriggerCounts.Clear();
		ProcessingCards.Clear();
	}

	private static string GetCardName(PlayableCard card)
	{
		if ((Object)(object)card == (Object)null || (Object)(object)((Card)card).Info == (Object)null)
		{
			return "NULL";
		}
		return ((Object)((Card)card).Info).name;
	}
}
public abstract class SmallSigilStatusEffectBehaviour : SpecialCardBehaviour
{
	public abstract string CardModSingletonName { get; }

	protected string DisplayModSingletonName => CardModSingletonName + "_DISPLAY";

	public virtual bool EffectCanBeInherited => false;

	public AbilityInfo IconAbilityInfo => SmallSigilStatusEffectManager.GetIconAbilityInfo(((object)this).GetType());

	public int EffectSeverity { get; protected set; }

	protected virtual void Start()
	{
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		if (!((Object)(object)((SpecialCardBehaviour)this).PlayableCard == (Object)null))
		{
			AbilityInfo iconAbilityInfo = IconAbilityInfo;
			if (!((Object)(object)iconAbilityInfo == (Object)null))
			{
				EffectSeverity = GetExistingSeverity(iconAbilityInfo.ability);
				SyncEffectMods();
			}
		}
	}

	private int GetExistingSeverity(Ability ability)
	{
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Invalid comparison between Unknown and I4
		//IL_009a: Unknown result type (might be due to invalid IL or missing references)
		//IL_009f: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_0168: Unknown result type (might be due to invalid IL or missing references)
		//IL_016d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0170: Unknown result type (might be due to invalid IL or missing references)
		//IL_0172: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)((SpecialCardBehaviour)this).PlayableCard == (Object)null || (Object)(object)((Card)((SpecialCardBehaviour)this).PlayableCard).Info == (Object)null || (int)ability == 0)
		{
			return 0;
		}
		int num = 0;
		foreach (CardModificationInfo temporaryMod in ((SpecialCardBehaviour)this).PlayableCard.TemporaryMods)
		{
			if (temporaryMod == null || temporaryMod.singletonId != CardModSingletonName || temporaryMod.abilities == null)
			{
				continue;
			}
			foreach (Ability ability2 in temporaryMod.abilities)
			{
				if (ability2 == ability)
				{
					num++;
				}
			}
		}
		if (num > 0)
		{
			return num;
		}
		int num2 = 0;
		foreach (CardModificationInfo mod in ((Card)((SpecialCardBehaviour)this).PlayableCard).Info.Mods)
		{
			if (mod == null || mod.singletonId != DisplayModSingletonName || mod.abilities == null)
			{
				continue;
			}
			foreach (Ability ability3 in mod.abilities)
			{
				if (ability3 == ability)
				{
					num2++;
				}
			}
		}
		return num2;
	}

	public void AddSeverity(int amount)
	{
		if (!((Object)(object)((SpecialCardBehaviour)this).PlayableCard == (Object)null) && amount > 0)
		{
			EffectSeverity += amount;
			SyncEffectMods();
		}
	}

	public void SetSeverity(int amount)
	{
		if (!((Object)(object)((SpecialCardBehaviour)this).PlayableCard == (Object)null))
		{
			EffectSeverity = ((amount >= 0) ? amount : 0);
			SyncEffectMods();
		}
	}

	private void SyncEffectMods()
	{
		if ((Object)(object)((SpecialCardBehaviour)this).PlayableCard == (Object)null || (Object)(object)((Card)((SpecialCardBehaviour)this).PlayableCard).Info == (Object)null)
		{
			return;
		}
		RemoveTemporaryEffectMod();
		RemoveDisplayEffectMod();
		if (EffectSeverity <= 0)
		{
			((SpecialCardBehaviour)this).PlayableCard.OnStatsChanged();
			((Card)((SpecialCardBehaviour)this).PlayableCard).RenderCard();
			return;
		}
		CardModificationInfo val = CreateEffectMod();
		if (val != null && val.abilities != null && val.abilities.Count > 0)
		{
			((SpecialCardBehaviour)this).PlayableCard.AddTemporaryMod(val);
		}
		CardModificationInfo val2 = CreateDisplayMod();
		if (val2 != null && val2.abilities != null && val2.abilities.Count > 0)
		{
			((Card)((SpecialCardBehaviour)this).PlayableCard).Info.Mods.Add(val2);
		}
		((SpecialCardBehaviour)this).PlayableCard.OnStatsChanged();
		((Card)((SpecialCardBehaviour)this).PlayableCard).RenderCard();
	}

	private void RemoveTemporaryEffectMod()
	{
		if (!((Object)(object)((SpecialCardBehaviour)this).PlayableCard == (Object)null))
		{
			CardModificationInfo val = ((SpecialCardBehaviour)this).PlayableCard.TemporaryMods.Find((CardModificationInfo x) => x != null && x.singletonId == CardModSingletonName);
			if (val != null)
			{
				((SpecialCardBehaviour)this).PlayableCard.RemoveTemporaryMod(val, true);
			}
		}
	}

	private void RemoveDisplayEffectMod()
	{
		if ((Object)(object)((SpecialCardBehaviour)this).PlayableCard == (Object)null || (Object)(object)((Card)((SpecialCardBehaviour)this).PlayableCard).Info == (Object)null)
		{
			return;
		}
		List<CardModificationInfo> list = ((Card)((SpecialCardBehaviour)this).PlayableCard).Info.Mods.FindAll((CardModificationInfo x) => x != null && x.singletonId == DisplayModSingletonName);
		if (list.Count == 0)
		{
			return;
		}
		foreach (CardModificationInfo item in list)
		{
			((Card)((SpecialCardBehaviour)this).PlayableCard).Info.Mods.Remove(item);
		}
	}

	private CardModificationInfo CreateEffectMod()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_0047: Expected I4, but got Unknown
		CardModificationInfo val = new CardModificationInfo();
		val.singletonId = CardModSingletonName;
		val.nonCopyable = true;
		AbilityInfo iconAbilityInfo = IconAbilityInfo;
		if ((Object)(object)iconAbilityInfo == (Object)null)
		{
			return val;
		}
		for (int i = 0; i < EffectSeverity; i++)
		{
			CardModificationInfoExtensions.AddAbilities(val, (Ability[])(object)new Ability[1] { (Ability)(int)iconAbilityInfo.ability });
		}
		return val;
	}

	private CardModificationInfo CreateDisplayMod()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Expected O, but got Unknown
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_0047: Expected I4, but got Unknown
		CardModificationInfo val = new CardModificationInfo();
		val.singletonId = DisplayModSingletonName;
		val.nonCopyable = true;
		AbilityInfo iconAbilityInfo = IconAbilityInfo;
		if ((Object)(object)iconAbilityInfo == (Object)null)
		{
			return val;
		}
		for (int i = 0; i < EffectSeverity; i++)
		{
			CardModificationInfoExtensions.AddAbilities(val, (Ability[])(object)new Ability[1] { (Ability)(int)iconAbilityInfo.ability });
		}
		return val;
	}

	public void ClearDisplayMod()
	{
		if (!((Object)(object)((SpecialCardBehaviour)this).PlayableCard == (Object)null) && !((Object)(object)((Card)((SpecialCardBehaviour)this).PlayableCard).Info == (Object)null))
		{
			RemoveDisplayEffectMod();
			((SpecialCardBehaviour)this).PlayableCard.OnStatsChanged();
			((Card)((SpecialCardBehaviour)this).PlayableCard).RenderCard();
		}
	}

	public void ClearAllEffectMods()
	{
		if (!((Object)(object)((SpecialCardBehaviour)this).PlayableCard == (Object)null) && !((Object)(object)((Card)((SpecialCardBehaviour)this).PlayableCard).Info == (Object)null))
		{
			RemoveTemporaryEffectMod();
			RemoveDisplayEffectMod();
			EffectSeverity = 0;
			((SpecialCardBehaviour)this).PlayableCard.OnStatsChanged();
			((Card)((SpecialCardBehaviour)this).PlayableCard).RenderCard();
		}
	}
}
public static class SmallSigilStatusEffectManager
{
	public const string SmallSigilProperty = "OLD_SA_SmallSigil";

	private static readonly Dictionary<Type, AbilityInfo> Effects = new Dictionary<Type, AbilityInfo>();

	private static readonly Dictionary<Type, Texture> IconTextures = new Dictionary<Type, Texture>();

	public static void Initialize(string pluginGuid)
	{
		if (Effects.Count <= 0)
		{
			Register<BurningStatusEffect>(pluginGuid, "Blaze", "Every 2 Blaze, the bearer takes 1 damage.", "OldSa_Blaze.png");
			Register<PoisonStatusEffect>(pluginGuid, "Poison", "Every 4 Poison, the bearer dies.", "OldSa_Poison.png");
			Register<GluttonyStatusEffect>(pluginGuid, "Gluttony", "Every 3 Gluttony, the bearer gains 1 Power and 1 Health.After triggering 3 times in a battle, the bearer dies.", "OldSa_Gluttony.png");
		}
	}

	private static void Register<T>(string pluginGuid, string rulebookName, string rulebookDescription, string iconFile) where T : SmallSigilStatusEffectBehaviour
	{
		Texture2D imageAsTexture = TextureHelper.GetImageAsTexture(iconFile, (FilterMode)0);
		if (!((Object)(object)imageAsTexture == (Object)null))
		{
			IconTextures[typeof(T)] = (Texture)(object)imageAsTexture;
			AbilityInfo val = ScriptableObject.CreateInstance<AbilityInfo>();
			((Object)val).name = rulebookName;
			val.rulebookName = rulebookName;
			FieldInfo field = typeof(AbilityInfo).GetField("rulebookDescription", BindingFlags.Instance | BindingFlags.NonPublic);
			if (field != null)
			{
				field.SetValue(val, rulebookDescription);
			}
			val.metaCategories = new List<AbilityMetaCategory> { (AbilityMetaCategory)0 };
			AbilityExtensions.SetCanStack(val, true, false);
			AbilityExtensions.SetPassive(val, true);
			AbilityExtensions.SetExtendedProperty(val, "OLD_SA_SmallSigil", (object)true);
			FullAbility val2 = AbilityManager.Add(pluginGuid, val, typeof(T), (Texture)(object)imageAsTexture);
			if (val2 != null)
			{
				Effects[typeof(T)] = val2.Info;
			}
		}
	}

	public static AbilityInfo GetIconAbilityInfo(Type behaviourType)
	{
		if (behaviourType == null)
		{
			return null;
		}
		if (Effects.TryGetValue(behaviourType, out var value))
		{
			return value;
		}
		return null;
	}

	public static Ability GetIconAbility(Type behaviourType)
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_0021: Unknown result type (might be due to invalid IL or missing references)
		AbilityInfo iconAbilityInfo = GetIconAbilityInfo(behaviourType);
		if ((Object)(object)iconAbilityInfo == (Object)null)
		{
			return (Ability)0;
		}
		return iconAbilityInfo.ability;
	}

	public static Texture GetIconTexture(Type behaviourType)
	{
		if (behaviourType == null)
		{
			return null;
		}
		if (IconTextures.TryGetValue(behaviourType, out var value))
		{
			return value;
		}
		return null;
	}

	public static bool IsSmallSigilAbility(Ability ability)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0003: Invalid comparison between Unknown and I4
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		if ((int)ability == 0)
		{
			return false;
		}
		AbilityInfo info = AbilitiesUtil.GetInfo(ability);
		if ((Object)(object)info == (Object)null)
		{
			return false;
		}
		return AbilityExtensions.GetExtendedPropertyAsBool(info, "OLD_SA_SmallSigil") == true;
	}
}
public enum SmallSigilCategory
{
	Buff,
	Debuff
}
public enum SmallSigilAttribute
{
	None,
	Fire,
	Poison
}
public class SmallSigilTriggerBehaviour : TriggerReceiver
{
	private PlayableCard Card => ((Component)this).GetComponent<PlayableCard>();

	public override bool RespondsToTakeDamage(PlayableCard source)
	{
		return (Object)(object)Card != (Object)null && SmallSigilRuleManager.HasTriggeredEffect(Card);
	}

	public override IEnumerator OnTakeDamage(PlayableCard source)
	{
		if (!((Object)(object)Card == (Object)null))
		{
			yield return SmallSigilRuleManager.Process(Card);
		}
	}

	public override bool RespondsToCardGettingAttacked(PlayableCard source)
	{
		return false;
	}

	public override IEnumerator OnCardGettingAttacked(PlayableCard card)
	{
		yield break;
	}

	public override bool RespondsToTurnEnd(bool playerTurnEnd)
	{
		return false;
	}

	public override IEnumerator OnTurnEnd(bool playerTurnEnd)
	{
		yield break;
	}

	public override bool RespondsToDie(bool wasSacrifice, PlayableCard killer)
	{
		return false;
	}

	public override IEnumerator OnDie(bool wasSacrifice, PlayableCard killer)
	{
		yield break;
	}
}
public enum SmallSigilType
{
	Burning,
	Poison,
	Gluttony
}

Sigil/OldSa_Strafe Strike_sigil.dll

Decompiled a day ago
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Strafe Strike_sigil")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Strafe Strike_sigil")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("a396b6fd-2b3b-4ced-aca0-69ad30118ef9")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.StrafeStrike;

[BepInPlugin("OLD_SA.StrafeStrike", "OLD SA Strafe Strike", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Expected O, but got Unknown
		Harmony val = new Harmony("OLD_SA.StrafeStrike");
		StrafeStrikeAPI.Init();
		val.PatchAll();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"OLD SA Strafe Strike Loaded");
	}
}
public static class StrafeStrikeAPI
{
	public static FullAbility ability;

	public static void Init()
	{
		AbilityInfo val = ScriptableObject.CreateInstance<AbilityInfo>();
		((Object)val).name = "Strafe Strike";
		val.rulebookName = "Strafe Strike";
		val.metaCategories = new List<AbilityMetaCategory>
		{
			(AbilityMetaCategory)0,
			(AbilityMetaCategory)1
		};
		val.powerLevel = 4;
		val.opponentUsable = true;
		val.canStack = false;
		Texture imageAsTexture = (Texture)(object)TextureHelper.GetImageAsTexture("OldSa_Strafe_Strike.png", (FilterMode)0);
		FieldInfo field = typeof(AbilityInfo).GetField("rulebookDescription", BindingFlags.Instance | BindingFlags.NonPublic);
		if (field != null)
		{
			field.SetValue(val, "After [creature] moves, it attacks.");
		}
		ability = AbilityManager.Add("OLD_SA", val, typeof(StrafeStrikeBehaviour), imageAsTexture);
	}
}
public class StrafeStrikeBehaviour : AbilityBehaviour
{
	private CardSlot lastSlot;

	public override Ability Ability => StrafeStrikeAPI.ability.Id;

	public override bool RespondsToResolveOnBoard()
	{
		return (Object)(object)((AbilityBehaviour)this).Card != (Object)null && !((AbilityBehaviour)this).Card.Dead && (Object)(object)((AbilityBehaviour)this).Card.Slot != (Object)null;
	}

	public override IEnumerator OnResolveOnBoard()
	{
		if (!((Object)(object)((AbilityBehaviour)this).Card == (Object)null) && !((AbilityBehaviour)this).Card.Dead && !((Object)(object)((AbilityBehaviour)this).Card.Slot == (Object)null))
		{
			lastSlot = ((AbilityBehaviour)this).Card.Slot;
		}
		yield break;
	}

	public override bool RespondsToOtherCardAssignedToSlot(PlayableCard otherCard)
	{
		if ((Object)(object)((AbilityBehaviour)this).Card == (Object)null || ((AbilityBehaviour)this).Card.Dead)
		{
			return false;
		}
		if ((Object)(object)otherCard == (Object)null || otherCard.Dead)
		{
			return false;
		}
		if ((Object)(object)otherCard != (Object)(object)((AbilityBehaviour)this).Card)
		{
			return false;
		}
		if ((Object)(object)lastSlot == (Object)null)
		{
			return false;
		}
		if ((Object)(object)((AbilityBehaviour)this).Card.Slot == (Object)null || (Object)(object)((AbilityBehaviour)this).Card.Slot == (Object)(object)lastSlot)
		{
			return false;
		}
		return true;
	}

	public override IEnumerator OnOtherCardAssignedToSlot(PlayableCard otherCard)
	{
		if ((Object)(object)((AbilityBehaviour)this).Card == (Object)null || ((AbilityBehaviour)this).Card.Dead || (Object)(object)((AbilityBehaviour)this).Card.Slot == (Object)null || (Object)(object)otherCard == (Object)null || (Object)(object)otherCard != (Object)(object)((AbilityBehaviour)this).Card || otherCard.Dead)
		{
			yield break;
		}
		CardSlot attackingSlot = ((AbilityBehaviour)this).Card.Slot;
		if ((Object)(object)lastSlot == (Object)null || (Object)(object)attackingSlot == (Object)(object)lastSlot)
		{
			yield break;
		}
		lastSlot = attackingSlot;
		yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
		if ((Object)(object)((AbilityBehaviour)this).Card == (Object)null || ((AbilityBehaviour)this).Card.Dead || (Object)(object)((AbilityBehaviour)this).Card.Slot == (Object)null)
		{
			yield break;
		}
		attackingSlot = ((AbilityBehaviour)this).Card.Slot;
		CardSlot opposingSlot = attackingSlot.opposingSlot;
		if ((Object)(object)opposingSlot == (Object)null)
		{
			yield break;
		}
		CombatPhaseManager combat = Singleton<CombatPhaseManager>.Instance;
		if (!((Object)(object)combat == (Object)null))
		{
			int damageBefore = combat.DamageDealtThisPhase;
			yield return combat.SlotAttackSlot(attackingSlot, opposingSlot, 0f);
			int damageAfter = combat.DamageDealtThisPhase;
			int damage = damageAfter - damageBefore;
			if (damage <= 0)
			{
				yield return ((AbilityBehaviour)this).LearnAbility(0.25f);
				yield break;
			}
			yield return ResolveDamage(combat, damage, attackingSlot.IsPlayerSlot);
			yield return ((AbilityBehaviour)this).LearnAbility(0.25f);
		}
	}

	private IEnumerator ResolveDamage(CombatPhaseManager combat, int damage, bool playerIsAttacker)
	{
		if (!((Object)(object)combat == (Object)null) && damage > 0)
		{
			yield return (object)new WaitForSeconds(0.4f);
			int excessDamage = 0;
			if (playerIsAttacker)
			{
				excessDamage = Singleton<LifeManager>.Instance.Balance + damage - 5;
				excessDamage = Mathf.Max(0, excessDamage);
			}
			int damageToScales = damage - excessDamage;
			yield return Singleton<LifeManager>.Instance.ShowDamageSequence(damageToScales, damageToScales, !playerIsAttacker, 0f, (GameObject)null, 0f, true);
			if (excessDamage > 0 && playerIsAttacker && (Object)(object)Singleton<TurnManager>.Instance != (Object)null && (Object)(object)Singleton<TurnManager>.Instance.Opponent != (Object)null && Singleton<TurnManager>.Instance.Opponent.NumLives == 1 && Singleton<TurnManager>.Instance.Opponent.GiveCurrencyOnDefeat)
			{
				yield return Singleton<TurnManager>.Instance.Opponent.TryRevokeSurrender();
				RunState run = RunState.Run;
				run.currency += excessDamage;
				yield return VisualizeExcessLethalDamage(excessDamage);
			}
			SetDamageDealtThisPhase(combat, combat.DamageDealtThisPhase - damage);
		}
	}

	private static void SetDamageDealtThisPhase(CombatPhaseManager combat, int value)
	{
		if ((Object)(object)combat == (Object)null)
		{
			return;
		}
		PropertyInfo property = typeof(CombatPhaseManager).GetProperty("DamageDealtThisPhase", BindingFlags.Instance | BindingFlags.Public);
		if (!(property == null))
		{
			MethodInfo setMethod = property.GetSetMethod(nonPublic: true);
			if (!(setMethod == null))
			{
				setMethod.Invoke(combat, new object[1] { Mathf.Max(0, value) });
			}
		}
	}

	private IEnumerator VisualizeExcessLethalDamage(int excessDamage)
	{
		if (excessDamage <= 0)
		{
			yield break;
		}
		MethodInfo method = typeof(CombatPhaseManager).GetMethod("VisualizeExcessLethalDamage", BindingFlags.Instance | BindingFlags.NonPublic);
		if (method == null)
		{
			yield break;
		}
		object result = method.Invoke(Singleton<CombatPhaseManager>.Instance, new object[2] { excessDamage, null });
		if (result is IEnumerator sequence)
		{
			while (sequence.MoveNext())
			{
				yield return sequence.Current;
			}
		}
	}
}

Sigil/OldSa_Tempest_sigil.dll

Decompiled a day ago
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Tempest_sigil")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Tempest_sigil")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("209b2d3a-a1fc-4e1d-8a4e-a627b05cec58")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.Tempest;

[BepInPlugin("OLD_SA.Tempest", "OLD SA Tempest", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		TempestAPI.Init();
		Harmony val = new Harmony("OLD_SA.Tempest");
		val.PatchAll();
	}
}
public class TempestAPI
{
	public static FullAbility ability;

	public static void Init()
	{
		AbilityInfo val = ScriptableObject.CreateInstance<AbilityInfo>();
		((Object)val).name = "Tempest";
		val.rulebookName = "Tempest";
		val.powerLevel = 4;
		Texture2D imageAsTexture = TextureHelper.GetImageAsTexture("OldSa_Tempest.png", (FilterMode)0);
		ability = AbilityManager.Add("OLD_SA", val, typeof(TempestBehaviour), (Texture)(object)imageAsTexture);
		val.metaCategories = new List<AbilityMetaCategory>
		{
			(AbilityMetaCategory)0,
			(AbilityMetaCategory)7
		};
		FieldInfo field = typeof(AbilityInfo).GetField("rulebookDescription", BindingFlags.Instance | BindingFlags.NonPublic);
		if (field != null)
		{
			field.SetValue(val, "For each flying ally, [creature] attacks an additional time.");
		}
	}
}
public class TempestBehaviour : ExtendedAbilityBehaviour
{
	public static Ability ability;

	public override Ability Ability => ability;

	public override bool RespondsToGetOpposingSlots()
	{
		return true;
	}

	public override List<CardSlot> GetOpposingSlots(List<CardSlot> originalSlots, List<CardSlot> otherAddedSlots)
	{
		List<CardSlot> list = new List<CardSlot>();
		int num = CountFriendlyAirborne();
		for (int i = 0; i < num; i++)
		{
			CardSlot val = CardExtensions.OpposingSlot(((AbilityBehaviour)this).Card);
			if ((Object)(object)val != (Object)null)
			{
				list.Add(val);
			}
		}
		return list;
	}

	private int CountFriendlyAirborne()
	{
		int num = 0;
		foreach (CardSlot slot in Singleton<BoardManager>.Instance.GetSlots(((AbilityBehaviour)this).Card.Slot.IsPlayerSlot))
		{
			if ((Object)(object)slot.Card != (Object)null && HasAirborne(slot.Card))
			{
				num++;
			}
		}
		return num;
	}

	private bool HasAirborne(PlayableCard card)
	{
		if ((Object)(object)card == (Object)null)
		{
			return false;
		}
		return card.HasAbility((Ability)19);
	}
}

Sigil/OldSa_Wind's Blessing_sigil.dll

Decompiled a day ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using OLD_SA.Blessing;
using OLD_SA.Dialogue;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_Wind's Blessing_sigil")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_Wind's Blessing_sigil")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("3c5c93e4-53b2-4569-b21f-e6bb56856b02")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace OLD_SA.WindsBlessing;

[BepInPlugin("OLD_SA.WindsBlessing", "OLD SA Wind's Blessing", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Expected O, but got Unknown
		((BaseUnityPlugin)this).Logger.LogInfo((object)"OLD SA Wind's Blessing Loaded");
		WindBlessingAPI.Init();
		WindBlessingAudio.Init();
		Harmony val = new Harmony("OLD_SA.WindsBlessing");
		val.PatchAll();
	}
}
public class WindBlessingAPI
{
	public static FullAbility ability;

	public static void Init()
	{
		AbilityInfo val = ScriptableObject.CreateInstance<AbilityInfo>();
		((Object)val).name = "WindsBlessing";
		val.rulebookName = "Wind's Blessing";
		val.powerLevel = 5;
		Texture2D imageAsTexture = TextureHelper.GetImageAsTexture("OldSa_Winds_Blessing.png", (FilterMode)0);
		ability = AbilityManager.Add("OLD_SA", val, typeof(WindBlessingBehaviour), (Texture)(object)imageAsTexture);
		val.metaCategories = new List<AbilityMetaCategory> { (AbilityMetaCategory)0 };
		FieldInfo field = typeof(AbilityInfo).GetField("rulebookDescription", BindingFlags.Instance | BindingFlags.NonPublic);
		if (field != null)
		{
			field.SetValue(val, "At the start of the turn, [creature] grants Wind Blessing to itself and adjacent creatures.");
		}
	}
}
public static class WindBlessingAssets
{
	public static Sprite LoadSprite(string name)
	{
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		Texture2D imageAsTexture = TextureHelper.GetImageAsTexture(name, (FilterMode)0);
		if ((Object)(object)imageAsTexture == (Object)null)
		{
			Debug.Log((object)("Missing artwork: " + name));
			return null;
		}
		return Sprite.Create(imageAsTexture, new Rect(0f, 0f, (float)((Texture)imageAsTexture).width, (float)((Texture)imageAsTexture).height), new Vector2(0.5f, 0.5f));
	}
}
public static class WindBlessingAudio
{
	private static AudioClip windSound;

	private static AudioClip pterosaurRoar;

	public static void Init()
	{
		Debug.Log((object)"Loading Wind Blessing Audio...");
		windSound = LoadAudio("old_sa_wind.wav");
		pterosaurRoar = LoadAudio("old_sa_pterosaur_roar.wav");
		Debug.Log((object)("Wind sound = " + (object)windSound));
		Debug.Log((object)("Pterosaur roar = " + (object)pterosaurRoar));
	}

	public static void PlayWind(Vector3 position)
	{
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		Debug.Log((object)"Playing wind sound");
		if ((Object)(object)windSound == (Object)null)
		{
			Debug.Log((object)"Wind sound missing");
		}
		else
		{
			PlayClip(windSound, position);
		}
	}

	public static void PlayPterosaurRoar(Vector3 position)
	{
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		Debug.Log((object)"Playing pterosaur roar");
		if ((Object)(object)pterosaurRoar == (Object)null)
		{
			Debug.Log((object)"Pterosaur roar missing");
		}
		else
		{
			PlayClip(pterosaurRoar, position);
		}
	}

	private static void PlayClip(AudioClip clip, Vector3 position)
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Expected O, but got Unknown
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = new GameObject("WindBlessingAudio");
		val.transform.position = position;
		AudioSource val2 = val.AddComponent<AudioSource>();
		val2.clip = clip;
		val2.volume = 1f;
		Debug.Log((object)("Audio length:" + clip.length));
		val2.spatialBlend = 0f;
		val2.Play();
		Object.Destroy((Object)(object)val, clip.length + 0.2f);
	}

	private static AudioClip LoadAudio(string fileName)
	{
		//IL_0069: Unknown result type (might be due to invalid IL or missing references)
		//IL_006f: Expected O, but got Unknown
		Debug.Log((object)("LoadAudio called: " + fileName));
		string text = Path.Combine(Path.GetDirectoryName(typeof(WindBlessingAudio).Assembly.Location), "Audio", fileName);
		if (!File.Exists(text))
		{
			Debug.Log((object)("Missing audio: " + text));
			return null;
		}
		WWW val = new WWW("file:///" + text);
		while (!val.isDone)
		{
		}
		if (!string.IsNullOrEmpty(val.error))
		{
			Debug.Log((object)("Audio load error: " + val.error));
			return null;
		}
		AudioClip audioClip = val.GetAudioClip(false, false);
		if ((Object)(object)audioClip == (Object)null)
		{
			Debug.Log((object)("AudioClip creation failed: " + fileName));
			return null;
		}
		Debug.Log((object)("Loaded audio " + fileName + " length=" + audioClip.length));
		return audioClip;
	}
}
public class WindBlessingBehaviour : AbilityBehaviour
{
	private bool windBlessingTriggered;

	public override Ability Ability => WindBlessingAPI.ability.Id;

	public override bool RespondsToUpkeep(bool playerUpkeep)
	{
		return playerUpkeep;
	}

	public override IEnumerator OnUpkeep(bool playerUpkeep)
	{
		windBlessingTriggered = true;
		yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
		Singleton<ViewManager>.Instance.SwitchToView((View)4, false, false);
		if (ShouldUseWindPortrait())
		{
			yield return WindBlessingPterosaurPortraitSwitch.SwitchToStage1(((AbilityBehaviour)this).Card);
		}
		CardSlot leftSlot = GetAdjacentSlot(-1);
		if ((Object)(object)leftSlot != (Object)null && (Object)(object)leftSlot.Card != (Object)null)
		{
			yield return TriggerWindBlessing(leftSlot.Card);
		}
		yield return (object)new WaitForSeconds(0.15f);
		if (ShouldUseWindPortrait())
		{
			yield return WindBlessingPterosaurPortraitSwitch.SwitchToStage2(((AbilityBehaviour)this).Card);
		}
		CardSlot rightSlot = GetAdjacentSlot(1);
		if ((Object)(object)rightSlot != (Object)null && (Object)(object)rightSlot.Card != (Object)null)
		{
			yield return TriggerWindBlessing(rightSlot.Card);
		}
		yield return (object)new WaitForSeconds(0.25f);
		yield return TriggerSelfWindBlessing();
		yield return SigilDialogueAPI.ShowFirstTime("WindBlessing", "It spreads its wings, sending creatures soaring into the sky.", ((AbilityBehaviour)this).Card);
		while (WindBlessingEffect.ActiveWindIcons > 0)
		{
			yield return null;
		}
		Singleton<ViewManager>.Instance.SwitchToView((View)1, false, false);
	}

	private IEnumerator TriggerWindBlessing(PlayableCard target)
	{
		if (!((Object)(object)target == (Object)null) && !target.HasAbility((Ability)19))
		{
			yield return WindBlessingEffect.Play(target);
			yield return GiveWindBlessing(target);
		}
	}

	private IEnumerator TriggerSelfWindBlessing()
	{
		if (!((Object)(object)((AbilityBehaviour)this).Card == (Object)null) && !((AbilityBehaviour)this).Card.HasAbility((Ability)19))
		{
			if (ShouldUseWindPortrait())
			{
				yield return WindBlessingPterosaurPortraitSwitch.SwitchToStage3(((AbilityBehaviour)this).Card);
			}
			yield return WindBlessingEffect.Play(((AbilityBehaviour)this).Card, selfCast: true);
			yield return GiveWindBlessing(((AbilityBehaviour)this).Card);
		}
	}

	private bool ShouldUseWindPortrait()
	{
		return windBlessingTriggered && (Object)(object)((AbilityBehaviour)this).Card != (Object)null && (Object)(object)((Card)((AbilityBehaviour)this).Card).Info != (Object)null && ((Object)((Card)((AbilityBehaviour)this).Card).Info).name == "OLD_SA_WIND_PTEROSAUR";
	}

	private CardSlot GetAdjacentSlot(int offset)
	{
		if ((Object)(object)((AbilityBehaviour)this).Card == (Object)null || (Object)(object)((AbilityBehaviour)this).Card.Slot == (Object)null)
		{
			return null;
		}
		CardSlot slot = ((AbilityBehaviour)this).Card.Slot;
		int num = slot.Index + offset;
		List<CardSlot> slots = Singleton<BoardManager>.Instance.GetSlots(slot.IsPlayerSlot);
		if (num < 0 || num >= slots.Count)
		{
			return null;
		}
		return slots[num];
	}

	private IEnumerator GiveWindBlessing(PlayableCard target)
	{
		if (!((Object)(object)target == (Object)null) && !target.HasAbility((Ability)19) && !WindBlessingRuntime.HasWind(target))
		{
			WindBlessingRuntime.Add(target);
			target.UpdateFaceUpOnBoardEffects();
			((Card)target).RenderCard();
		}
		yield break;
	}
}
public static class WindBlessingEffect
{
	private const string PTEROSAUR_CARD = "OLD_SA_WIND_PTEROSAUR";

	public static int ActiveWindIcons;

	public static IEnumerator Play(PlayableCard card, bool selfCast = false)
	{
		if (!((Object)(object)card == (Object)null))
		{
			Debug.Log((object)("Wind Blessing effect on " + ((Object)((Card)card).Info).name));
			((Card)card).Anim.PlayTransformAnimation();
			WindBlessingWindIcon.Spawn(card);
			if (selfCast && ((Object)((Card)card).Info).name == "OLD_SA_WIND_PTEROSAUR")
			{
				WindBlessingAudio.PlayPterosaurRoar(((Component)card).transform.position);
			}
			else
			{
				WindBlessingAudio.PlayWind(((Component)card).transform.position);
			}
		}
		yield break;
	}
}
public static class WindBlessingFlyingManager
{
	public static HashSet<PlayableCard> AddingWindFlying = new HashSet<PlayableCard>();

	public static bool IsAddingWindFlying(PlayableCard card)
	{
		if ((Object)(object)card == (Object)null)
		{
			return false;
		}
		return AddingWindFlying.Contains(card);
	}

	public static void ClearAdding()
	{
		AddingWindFlying.Clear();
	}
}
public static class WindBlessingPterosaurPortraitSwitch
{
	private const string PTEROSAUR_CARD = "OLD_SA_WIND_PTEROSAUR";

	public static IEnumerator SwitchToStage1(PlayableCard card, bool allowEmission = false)
	{
		yield return SwitchPortrait(card, 1, allowEmission);
	}

	public static IEnumerator SwitchToStage2(PlayableCard card, bool allowEmission = false)
	{
		yield return SwitchPortrait(card, 2, allowEmission);
	}

	public static IEnumerator SwitchToStage3(PlayableCard card, bool allowEmission = false)
	{
		yield return SwitchPortrait(card, 3, allowEmission);
	}

	private static IEnumerator SwitchPortrait(PlayableCard card, int stage, bool allowEmission)
	{
		if ((Object)(object)card == (Object)null || (Object)(object)((Card)card).Info == (Object)null || ((Object)((Card)card).Info).name != "OLD_SA_WIND_PTEROSAUR")
		{
			yield break;
		}
		string portraitName = null;
		switch (stage)
		{
		case 1:
			portraitName = "OLD_SA_WIND_PTEROSAUR_1";
			break;
		case 2:
			portraitName = "OLD_SA_WIND_PTEROSAUR_2";
			break;
		case 3:
			portraitName = "OLD_SA_WIND_PTEROSAUR_3";
			break;
		}
		if (portraitName != null)
		{
			Sprite portrait = LoadPortrait(portraitName);
			if ((Object)(object)portrait != (Object)null)
			{
				card.SwitchToPortrait(portrait);
				((Card)card).RenderInfo.forceEmissivePortrait = allowEmission && HasEmission(portraitName);
				((Card)card).RenderCard();
			}
		}
	}

	public static IEnumerator ResetPortrait(PlayableCard card)
	{
		if (!((Object)(object)card == (Object)null) && !((Object)(object)((Card)card).Info == (Object)null) && !(((Object)((Card)card).Info).name != "OLD_SA_WIND_PTEROSAUR"))
		{
			Sprite normalPortrait = LoadPortrait("OLD_SA_WIND_PTEROSAUR");
			if ((Object)(object)normalPortrait != (Object)null)
			{
				((Card)card).RenderInfo.forceEmissivePortrait = false;
				((Card)card).RenderInfo.portraitOverride = null;
				card.SwitchToPortrait(normalPortrait);
				((Card)card).RenderCard();
			}
		}
		yield break;
	}

	private static Sprite LoadPortrait(string name)
	{
		//IL_0051: Unknown result type (might be due to invalid IL or missing references)
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
		Texture2D imageAsTexture = TextureHelper.GetImageAsTexture(name + ".png", (FilterMode)0);
		if ((Object)(object)imageAsTexture == (Object)null)
		{
			Debug.Log((object)("Missing portrait: " + name));
			return null;
		}
		Sprite val = Sprite.Create(imageAsTexture, new Rect(0f, 0f, (float)((Texture)imageAsTexture).width, (float)((Texture)imageAsTexture).height), new Vector2(0.5f, 0.5f));
		((Object)val).name = name;
		Texture2D val2 = null;
		try
		{
			val2 = TextureHelper.GetImageAsTexture(name + "_emission.png", (FilterMode)0);
		}
		catch
		{
		}
		if ((Object)(object)val2 != (Object)null)
		{
			Sprite val3 = Sprite.Create(val2, new Rect(0f, 0f, (float)((Texture)val2).width, (float)((Texture)val2).height), new Vector2(0.5f, 0.5f));
			((Object)val3).name = name + "_emission";
			TextureHelper.RegisterEmissionForSprite(val, val3);
		}
		return val;
	}

	private static bool HasEmission(string name)
	{
		Texture2D val = null;
		try
		{
			val = TextureHelper.GetImageAsTexture(name + "_emission.png", (FilterMode)0);
		}
		catch
		{
		}
		return (Object)(object)val != (Object)null;
	}
}
public static class WindBlessingWindIcon
{
	public static void Spawn(PlayableCard card)
	{
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_0048: Expected O, but got Unknown
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		//IL_0068: Unknown result type (might be due to invalid IL or missing references)
		//IL_006d: Unknown result type (might be due to invalid IL or missing references)
		//IL_008d: Unknown result type (might be due to invalid IL or missing references)
		if (!((Object)(object)card == (Object)null))
		{
			Sprite val = WindBlessingAssets.LoadSprite("WindIcon.png");
			if ((Object)(object)val == (Object)null)
			{
				Debug.Log((object)"Missing WindIcon");
				return;
			}
			GameObject val2 = new GameObject("WindBlessingIcon");
			val2.transform.position = ((Component)card).transform.position + new Vector3(0f, 0.8f, 0f);
			val2.transform.rotation = Quaternion.Euler(90f, 0f, 0f);
			SpriteRenderer val3 = val2.AddComponent<SpriteRenderer>();
			val3.sprite = val;
			((Renderer)val3).sortingOrder = 999;
			WindBlessingEffect.ActiveWindIcons++;
			WindIconRotation windIconRotation = val2.AddComponent<WindIconRotation>();
			windIconRotation.StartAnimation();
		}
	}
}
public class WindIconRotation : MonoBehaviour
{
	private float duration = 1.2f;

	private float timer = 0f;

	private float startSpeed = 720f;

	private SpriteRenderer renderer;

	private Vector3 startScale = new Vector3(0.2f, 0.2f, 0.2f);

	private Vector3 normalScale = Vector3.one;

	public void StartAnimation()
	{
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		timer = 0f;
		renderer = ((Component)this).GetComponent<SpriteRenderer>();
		((Component)this).transform.localScale = startScale;
	}

	private void Update()
	{
		//IL_008d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_00df: Unknown result type (might be due to invalid IL or missing references)
		//IL_0103: Unknown result type (might be due to invalid IL or missing references)
		//IL_0108: Unknown result type (might be due to invalid IL or missing references)
		//IL_0128: Unknown result type (might be due to invalid IL or missing references)
		timer += Time.deltaTime;
		float num = Mathf.Clamp01(timer / duration);
		if (num < 0.15f)
		{
			float num2 = num / 0.15f;
			((Component)this).transform.localScale = Vector3.Lerp(startScale, normalScale, Mathf.Sin(num2 * (float)Math.PI * 0.5f));
		}
		float num3 = Mathf.Lerp(startSpeed, 0f, Mathf.Pow(num, 2.5f));
		((Component)this).transform.Rotate(Vector3.forward, num3 * Time.deltaTime);
		if (num > 0.8f)
		{
			float num4 = (num - 0.8f) / 0.2f;
			float num5 = Mathf.Lerp(1f, 0f, num4);
			((Component)this).transform.localScale = new Vector3(num5, num5, num5);
			if ((Object)(object)renderer != (Object)null)
			{
				Color color = renderer.color;
				color.a = Mathf.Lerp(1f, 0f, num4);
				renderer.color = color;
			}
		}
		if (timer >= duration)
		{
			WindBlessingEffect.ActiveWindIcons--;
			Object.Destroy((Object)(object)((Component)this).gameObject);
		}
	}
}

Sigil/OldSa_WolfAndJackal_sigil.dll

Decompiled a day ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using DiskCardGame;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.Helpers;
using OLD_SA.WolfJackal;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("OldSa_WolfAndJackal_sigil")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OldSa_WolfAndJackal_sigil")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("52f11cb7-74f6-4ad0-8434-d2213aa3d57a")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
public static class WolfAndJackalActivatedAPI
{
	public static bool HasWolfAndWarg(PlayableCard card)
	{
		//IL_0026: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)card == (Object)null)
		{
			return false;
		}
		foreach (Ability ability in ((Card)card).Info.Abilities)
		{
			if (ability == WolfAndJackalAPI.ability.Id)
			{
				return true;
			}
		}
		return false;
	}
}
namespace OLD_SA.WolfJackal;

[BepInPlugin("OLD_SA.WolfJackal", "OLD SA WolfJackal", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	private void Awake()
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		WolfAndJackalAPI.Init();
		Harmony val = new Harmony("OLD_SA.WolfJackal");
		val.PatchAll();
		Debug.Log((object)"OLD SA WolfJackal Loaded");
	}
}
[HarmonyPatch]
public static class WolfAndJackalActivatedEffectPatch
{
	private static bool Copying;

	private static IEnumerable<MethodBase> TargetMethods()
	{
		Type[] types = typeof(ActivatedAbilityBehaviour).Assembly.GetTypes();
		foreach (Type type in types)
		{
			if (type.IsSubclassOf(typeof(ActivatedAbilityBehaviour)))
			{
				MethodInfo method = type.GetMethod("Activate", BindingFlags.Instance | BindingFlags.NonPublic);
				if (method != null)
				{
					yield return method;
				}
			}
		}
	}

	[HarmonyPostfix]
	public static IEnumerator Postfix(IEnumerator result, ActivatedAbilityBehaviour __instance)
	{
		yield return result;
		if (Copying || (Object)(object)__instance == (Object)null)
		{
			yield break;
		}
		PlayableCard card = ((Component)__instance).GetComponent<PlayableCard>();
		if (!((Object)(object)card == (Object)null) && WolfAndJackalTriggerAPI.HasWolfAndWarg(card))
		{
			Copying = true;
			MethodInfo activate = ((object)__instance).GetType().GetMethod("Activate", BindingFlags.Instance | BindingFlags.NonPublic);
			if (activate != null && activate.Invoke(__instance, null) is IEnumerator second)
			{
				yield return second;
			}
			Copying = false;
		}
	}
}
public static class WolfAndJackalAPI
{
	public static FullAbility ability;

	public unsafe static void Init()
	{
		//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
		AbilityInfo val = ScriptableObject.CreateInstance<AbilityInfo>();
		((Object)val).name = "WolfAndWarg";
		val.rulebookName = "Wolf and Warg";
		val.metaCategories = new List<AbilityMetaCategory> { (AbilityMetaCategory)0 };
		val.powerLevel = 5;
		val.opponentUsable = false;
		val.canStack = false;
		Texture imageAsTexture = (Texture)(object)TextureHelper.GetImageAsTexture("OldSa_WolfAndWarg.png", (FilterMode)0);
		FieldInfo field = typeof(AbilityInfo).GetField("rulebookDescription", BindingFlags.Instance | BindingFlags.NonPublic);
		if (field != null)
		{
			field.SetValue(val, "When another sigil on [creature] triggers, it triggers an additional time.");
		}
		ability = AbilityManager.Add("OLD_SA", val, typeof(WolfAndJackalBehaviour), imageAsTexture);
		Ability id = ability.Id;
		Debug.Log((object)("WolfAndWarg registered ID=" + ((object)(*(Ability*)(&id))/*cast due to .constrained prefix*/).ToString()));
	}
}
[HarmonyPatch(typeof(PlayableCard), "GetOpposingSlots")]
public static class WolfAndJackalAttackPatch
{
	private static Dictionary<PlayableCard, bool> Processing = new Dictionary<PlayableCard, bool>();

	[HarmonyPostfix]
	public static void Postfix(PlayableCard __instance, ref List<CardSlot> __result)
	{
		if ((Object)(object)__instance == (Object)null || !__instance.OnBoard || !HasWolf(__instance) || (Processing.ContainsKey(__instance) && Processing[__instance]))
		{
			return;
		}
		Processing[__instance] = true;
		List<CardSlot> list = new List<CardSlot>();
		if (__instance.HasAbility((Ability)100))
		{
			list.Add(__instance.Slot.opposingSlot);
		}
		if (__instance.HasAbility((Ability)24))
		{
			foreach (CardSlot adjacentSlot in Singleton<BoardManager>.Instance.GetAdjacentSlots(__instance.Slot.opposingSlot))
			{
				list.Add(adjacentSlot);
			}
		}
		if (__instance.HasTriStrike())
		{
			foreach (CardSlot adjacentSlot2 in Singleton<BoardManager>.Instance.GetAdjacentSlots(__instance.Slot.opposingSlot))
			{
				list.Add(adjacentSlot2);
			}
			if (!list.Contains(__instance.Slot.opposingSlot))
			{
				list.Add(__instance.Slot.opposingSlot);
			}
		}
		foreach (CardSlot item in list)
		{
			if (!((Object)(object)item == (Object)null))
			{
				__result.Add(item);
			}
		}
		Processing.Remove(__instance);
	}

	private static bool HasWolf(PlayableCard card)
	{
		//IL_0026: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)card == (Object)null)
		{
			return false;
		}
		foreach (Ability ability in ((Card)card).Info.Abilities)
		{
			if (ability == WolfAndJackalAPI.ability.Id)
			{
				return true;
			}
		}
		return false;
	}
}
public class WolfAndJackalBehaviour : AbilityBehaviour
{
	public override Ability Ability => WolfAndJackalAPI.ability.Id;
}
[HarmonyPatch(typeof(PlayableCard), "GetPassiveAttackBuffs")]
public static class WolfAndJackalPassiveBuffPatch
{
	[HarmonyPostfix]
	public static void Postfix(PlayableCard __instance, ref int __result)
	{
		if ((Object)(object)__instance == (Object)null || !__instance.OnBoard)
		{
			return;
		}
		int num = 0;
		foreach (CardSlot adjacentSlot in Singleton<BoardManager>.Instance.GetAdjacentSlots(__instance.Slot))
		{
			if (!((Object)(object)adjacentSlot.Card == (Object)null) && adjacentSlot.Card.HasAbility((Ability)34) && WolfAndJackalTriggerAPI.HasWolfAndWarg(adjacentSlot.Card))
			{
				num++;
			}
		}
		CardSlot opposingSlot = __instance.Slot.opposingSlot;
		if ((Object)(object)opposingSlot != (Object)null && (Object)(object)opposingSlot.Card != (Object)null)
		{
			PlayableCard card = opposingSlot.Card;
			if (card.HasAbility((Ability)76) && WolfAndJackalTriggerAPI.HasWolfAndWarg(card))
			{
				num++;
			}
			if (card.HasAbility((Ability)83) && WolfAndJackalTriggerAPI.HasWolfAndWarg(card) && !__instance.HasAbility((Ability)105))
			{
				num--;
			}
		}
		if (num != 0)
		{
			__result += num;
		}
	}
}
[HarmonyPatch(typeof(CardTriggerHandler), "OnTrigger")]
public static class WolfAndJackalPatch
{
	private static bool repeating;

	[HarmonyPostfix]
	public static IEnumerator Postfix(IEnumerator result, CardTriggerHandler __instance, Trigger trigger, object[] otherArgs)
	{
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		yield return result;
		if (repeating)
		{
			yield break;
		}
		PlayableCard card = ((Component)__instance).GetComponent<PlayableCard>();
		if ((Object)(object)card == (Object)null || WolfAndJackalAPI.ability == null)
		{
			yield break;
		}
		AbilityBehaviour[] realAbilities = ((Component)card).GetComponents<AbilityBehaviour>();
		AbilityBehaviour[] array = realAbilities;
		for (int i = 0; i < array.Length; i++)
		{
			_ = array[i];
		}
		bool hasWolfAndWarg = false;
		AbilityBehaviour[] array2 = realAbilities;
		foreach (AbilityBehaviour realAbility in array2)
		{
			if (realAbility.Ability == WolfAndJackalAPI.ability.Id)
			{
				hasWolfAndWarg = true;
				break;
			}
		}
		if (!hasWolfAndWarg || (int)trigger == 18)
		{
			yield break;
		}
		List<TriggerReceiver> receivers = GetReceivers(__instance);
		if (receivers == null)
		{
			yield break;
		}
		repeating = true;
		foreach (TriggerReceiver receiver in receivers)
		{
			if (!((Object)(object)receiver == (Object)null))
			{
				AbilityBehaviour ability = (AbilityBehaviour)(object)((receiver is AbilityBehaviour) ? receiver : null);
				if (!((Object)(object)ability == (Object)null) && ability.Ability != WolfAndJackalAPI.ability.Id && GlobalTriggerHandler.ReceiverRespondsToTrigger(trigger, receiver, otherArgs))
				{
					yield return Singleton<GlobalTriggerHandler>.Instance.TriggerSequence(trigger, receiver, otherArgs);
				}
			}
		}
		repeating = false;
	}

	private static List<TriggerReceiver> GetReceivers(CardTriggerHandler handler)
	{
		MethodInfo method = typeof(CardTriggerHandler).GetMethod("GetAllReceivers", BindingFlags.Instance | BindingFlags.NonPublic);
		if (method == null)
		{
			return null;
		}
		return method.Invoke(handler, null) as List<TriggerReceiver>;
	}
}
public static class WolfAndJackalTriggerAPI
{
	public static bool HasWolfAndWarg(PlayableCard card)
	{
		//IL_0036: Unknown result type (might be due to invalid IL or missing references)
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)card == (Object)null)
		{
			return false;
		}
		if (WolfAndJackalAPI.ability == null)
		{
			return false;
		}
		foreach (Ability ability in ((Card)card).Info.Abilities)
		{
			if (ability == WolfAndJackalAPI.ability.Id)
			{
				return true;
			}
		}
		return false;
	}

	public static int GetPassiveMultiplier(PlayableCard card)
	{
		return (!HasWolfAndWarg(card)) ? 1 : 2;
	}
}