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(); ((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)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 GetOpposingSlots(List originalSlots, List otherAddedSlots) { List list = new List(); 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.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); } }