Decompiled source of NewGamePlus Costmania v1.0.2

StressCost.dll

Decompiled 3 hours ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using DiskCardGame;
using GBC;
using HarmonyLib;
using InscryptionAPI.Card;
using InscryptionAPI.CardCosts;
using InscryptionAPI.Dialogue;
using InscryptionAPI.Helpers;
using InscryptionAPI.Helpers.Extensions;
using InscryptionAPI.PixelCard;
using InscryptionCommunityPatch.Card;
using Microsoft.CodeAnalysis;
using StressCost.Cost;
using StressCost.Patches;
using StressCost.Sigils;
using StressCost.Sigils.VariableStats;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("StressCost")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+601c6db39c8a8a85fc8994bcd3d52b73b98476ce")]
[assembly: AssemblyProduct("StressCost")]
[assembly: AssemblyTitle("StressCost")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace StressCost
{
	[BepInPlugin("aga.costmania", "CostMania", "0.0.6.7")]
	public class CostmaniaPlugin : BaseUnityPlugin
	{
		public const string GUID = "aga.costmania";

		public const string NAME = "CostMania";

		private const string VERSION = "0.0.6.7";

		public static string Directory;

		internal static ManualLogSource Log;

		private Harmony harmony = new Harmony("aga.costmania");

		public static readonly string[] NEW_TEMPLES = new string[4] { "Alchemy", "Stress", "Space", "Valor" };

		internal static ConfigEntry<bool> config3DAlchemy;

		internal static ConfigEntry<bool> config3DStress;

		internal static ConfigEntry<bool> config3DStardust;

		internal static ConfigEntry<bool> config3DValor;

		private void Awake()
		{
			Log = ((BaseUnityPlugin)this).Logger;
			Directory = ((BaseUnityPlugin)this).Info.Location.Replace("CostmaniaActivatedAbility.dll", "");
			harmony.PatchAll();
			AddCosts();
			AddSigils();
			harmony.PatchAll(typeof(CostmaniaPlugin));
			harmony.PatchAll(typeof(AbilityPatches));
			harmony.PatchAll(typeof(CollectionUIPatches));
			harmony.PatchAll(typeof(CostGraphicPatches));
			harmony.PatchAll(typeof(CostPatches));
			harmony.PatchAll(typeof(PackPatches));
			harmony.PatchAll(typeof(DialoguePatches));
			harmony.PatchAll(typeof(SporePatches));
			harmony.PatchAll(typeof(EncounterPatches));
			PackPatches.SetupStarterDecks();
			AbilityPatches.SetStackableAbilities();
			CollectionUIPatches.InitRareRecals();
			DialoguePatches.GenerateRebechaRant();
			config3DAlchemy = ((BaseUnityPlugin)this).Config.Bind<bool>("Alchemy in 3D", "Active", false, "Would allow Alchemy in 3D Acts, very buggy");
			config3DStress = ((BaseUnityPlugin)this).Config.Bind<bool>("Stress in 3D", "Active", false, "Would allow Stress in 3D Acts, very buggy");
			config3DStardust = ((BaseUnityPlugin)this).Config.Bind<bool>("Stardust in 3D", "Active", false, "Would allow Stardust in 3D Acts, very buggy");
			config3DValor = ((BaseUnityPlugin)this).Config.Bind<bool>("Valor in 3D", "Active", false, "Would allow Valor in 3D Acts, very buggy");
		}

		private void Update()
		{
			CostPatches.Update();
			CostGraphicPatches.Update();
			PackPatches.Update();
		}

		public static void AddCosts()
		{
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0389: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cf: Unknown result type (might be due to invalid IL or missing references)
			FullCardCost val = CardCostManager.Register("aga.costmania", "StressCost", typeof(StressCost.Cost.StressCost), (Func<int, CardInfo, PlayableCard, Texture2D>)StressCost.Cost.StressCost.Texture_3D, (Func<int, CardInfo, PlayableCard, Texture2D>)StressCost.Cost.StressCost.Texture_Pixel);
			CardCostManager.SetCostTier(val, (Func<int, int>)CostTier.CostTierS);
			val.ResourceType = (ResourceType)42;
			CardCostManager.SetCanBePlayedByTurn2WithHand(val, (Func<int, CardInfo, List<CardInfo>, bool>)FairHandStress.CanBePlayed);
			FullCardCost val2 = CardCostManager.Register("aga.costmania", "ValorCost", typeof(ValorCost), (Func<int, CardInfo, PlayableCard, Texture2D>)ValorCost.Texture_3D, (Func<int, CardInfo, PlayableCard, Texture2D>)ValorCost.Texture_Pixel);
			CardCostManager.SetCostTier(val2, (Func<int, int>)CostTier.CostTierV);
			val2.ResourceType = (ResourceType)42;
			CardCostManager.SetCanBePlayedByTurn2WithHand(val2, (Func<int, CardInfo, List<CardInfo>, bool>)FairHandValor.CanBePlayed);
			FullCardCost val3 = CardCostManager.Register("aga.costmania", "FleshCost", typeof(FleshCost), (Func<int, CardInfo, PlayableCard, Texture2D>)FleshCost.Texture_3D, (Func<int, CardInfo, PlayableCard, Texture2D>)FleshCost.Texture_Pixel);
			CardCostManager.SetCostTier(val3, (Func<int, int>)CostTier.CostTierA);
			val3.ResourceType = (ResourceType)42;
			CardCostManager.SetCanBePlayedByTurn2WithHand(val3, (Func<int, CardInfo, List<CardInfo>, bool>)FairHandFlesh.CanBePlayed);
			FullCardCost val4 = CardCostManager.Register("aga.costmania", "MetalCost", typeof(MetalCost), (Func<int, CardInfo, PlayableCard, Texture2D>)MetalCost.Texture_3D, (Func<int, CardInfo, PlayableCard, Texture2D>)MetalCost.Texture_Pixel);
			CardCostManager.SetCostTier(val4, (Func<int, int>)CostTier.CostTierA);
			val4.ResourceType = (ResourceType)42;
			CardCostManager.SetCanBePlayedByTurn2WithHand(val4, (Func<int, CardInfo, List<CardInfo>, bool>)FairHandMetal.CanBePlayed);
			FullCardCost val5 = CardCostManager.Register("aga.costmania", "ElixirCost", typeof(ElixirCost), (Func<int, CardInfo, PlayableCard, Texture2D>)ElixirCost.Texture_3D, (Func<int, CardInfo, PlayableCard, Texture2D>)ElixirCost.Texture_Pixel);
			CardCostManager.SetCostTier(val5, (Func<int, int>)CostTier.CostTierA);
			val5.ResourceType = (ResourceType)42;
			CardCostManager.SetCanBePlayedByTurn2WithHand(val5, (Func<int, CardInfo, List<CardInfo>, bool>)FairHandElixir.CanBePlayed);
			FullCardCost val6 = CardCostManager.Register("aga.costmania", "StardustCost", typeof(StardustCost), (Func<int, CardInfo, PlayableCard, Texture2D>)StardustCost.Texture_3D, (Func<int, CardInfo, PlayableCard, Texture2D>)StardustCost.Texture_Pixel);
			CardCostManager.SetCostTier(val6, (Func<int, int>)CostTier.CostTierF);
			val6.ResourceType = (ResourceType)42;
			CardCostManager.SetCanBePlayedByTurn2WithHand(val6, (Func<int, CardInfo, List<CardInfo>, bool>)FairHandStardust.CanBePlayed);
			Appearance id = CardAppearanceBehaviourManager.Add("aga.costmania", "PixelSporeBg", typeof(SporeBackground)).Id;
		}

		public static void AddSigils()
		{
			AbilRelaxant.AddRelaxant();
			AbilAffection.AddAffection();
			AbilEnrage.AddEnrage();
			AbilLiftoff.AddLiftoff();
			AbilGemAbsorber.AddGemAbsorber();
			AbilFrontliner.AddFrontliner();
			AbilBloodGuzzler.AddBloodGuzzler();
			AbilIronclad.AddIronclad();
			AbilFearmonger.AddFearmonger();
			AbilFirstStrike.AddFirstStrike();
			AbilWatchman.AddWatchman();
			AbilEldritchPower.AddEldritchPower();
			AbilSigilEater.AddSigilEater();
			AbilStarbringer.AddStrbringer();
			AbilHealingAura.AddHealingAura();
			AbilWarper.AddWarper();
			AbilShatteringStardust.AddShatteringStardust();
			AbilArmyBuilder.AddArmyBuilder();
			AbilAfterimage.AddAfterimage();
			AbilRentrance.AddRentrance();
			AbilEndOfTheTunnel.AddEndOfTheTunnel();
			AbilDriveby.AddDriveby();
			AbilDataBanks.AddDataBanks();
			AbilPigify.AddPigify();
			AbilTransmutation.AddTransmutation();
			AbilGloryKill.AddGloryKill();
			AbilImpart.AddImpart();
			AbilProductionLine.AddProductionLine();
			AbilGestationTank.AddGestationTank();
			VariablestatMightierPen.AddMightierPen();
			VariablestatDeathToll.AddDeathToll();
		}
	}
}
namespace StressCost.Sigils
{
	public class AbilAffection : AbilityBehaviour
	{
		[CompilerGenerated]
		private sealed class <OnTurnEnd>d__4 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public bool playerTurnEnd;

			public AbilAffection <>4__this;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnTurnEnd>d__4(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_005c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0066: Expected O, but got Unknown
				//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
				//IL_0117: Unknown result type (might be due to invalid IL or missing references)
				//IL_0121: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					((Card)((AbilityBehaviour)<>4__this).Card).Anim.StrongNegationEffect();
					<>2__current = (object)new WaitForSeconds(0.2f);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<>2__current = Singleton<TextBox>.Instance.ShowUntilInput(((Card)((AbilityBehaviour)<>4__this).Card).Info.displayedName + " preformed a seducive dance!", (Style)((Card)((AbilityBehaviour)<>4__this).Card).Info.temple, (DialogueSpeaker)null, (ScreenPosition)2, 0f, true, false, (Prompt)null, true, (Emotion)0);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					if (StressCost.Cost.StressCost.stressCounter > 0)
					{
						StressCost.Cost.StressCost.stressCounter--;
						AudioController.Instance.PlaySound2D("plainBlip6", (MixerGroup)0, 0.6f, 0f, (Pitch)null, (Repetition)null, (Randomization)null, (Distortion)null, false);
					}
					<>2__current = (object)new WaitForSeconds(0.3f);
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -1;
					<>2__current = ((AbilityBehaviour)<>4__this).LearnAbility(0.2f);
					<>1__state = 4;
					return true;
				case 4:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public static Ability ability;

		public override Ability Ability => ability;

		public override bool RespondsToTurnEnd(bool playerTurnEnd)
		{
			return playerTurnEnd == !((AbilityBehaviour)this).Card.OpponentCard;
		}

		[IteratorStateMachine(typeof(<OnTurnEnd>d__4))]
		public override IEnumerator OnTurnEnd(bool playerTurnEnd)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnTurnEnd>d__4(0)
			{
				<>4__this = this,
				playerTurnEnd = playerTurnEnd
			};
		}

		public static void AddAffection()
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			AbilityInfo val = AbilityManager.New("StressSigils", "Affection", "At the end of every turn, [creature] lowers the Stress Counter by 1.", typeof(AbilAffection), "3d_affection.png");
			AbilityExtensions.SetPixelAbilityIcon(val, TextureHelper.GetImageAsTexture("pixel_affection.png", typeof(CostmaniaPlugin).Assembly, (FilterMode)0), (FilterMode?)null);
			AbilityExtensions.SetPowerlevel(val, 1);
			ability = val.ability;
		}
	}
	public class AbilAfterimage : AbilityBehaviour
	{
		[CompilerGenerated]
		private sealed class <DoMovement>d__8 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public CardSlot destination;

			public bool isLeft;

			public AbilAfterimage <>4__this;

			private CardSlot <oldSlot>5__1;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <DoMovement>d__8(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<oldSlot>5__1 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d5: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					((Card)((AbilityBehaviour)<>4__this).Card).RenderInfo.flippedPortrait = isLeft && ((Card)((AbilityBehaviour)<>4__this).Card).Info.flipPortraitForStrafe;
					((Card)((AbilityBehaviour)<>4__this).Card).RenderCard();
					<oldSlot>5__1 = ((AbilityBehaviour)<>4__this).Card.Slot;
					<>2__current = Singleton<BoardManager>.Instance.AssignCardToSlot(((AbilityBehaviour)<>4__this).Card, destination, 0.1f, (Action)null, true);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<>2__current = (object)new WaitForSeconds(0.25f);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[CompilerGenerated]
		private sealed class <OnSlotTargetedForAttack>d__7 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public CardSlot slot;

			public PlayableCard attacker;

			public AbilAfterimage <>4__this;

			private CardSlot <right>5__1;

			private CardSlot <left>5__2;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnSlotTargetedForAttack>d__7(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<right>5__1 = null;
				<left>5__2 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
				//IL_0123: Unknown result type (might be due to invalid IL or missing references)
				//IL_012d: Expected O, but got Unknown
				//IL_0170: Unknown result type (might be due to invalid IL or missing references)
				//IL_017a: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>4__this.doDodge = false;
					<>2__current = ((AbilityBehaviour)<>4__this).PreSuccessfulTriggerSequence();
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<>2__current = Singleton<TextBox>.Instance.ShowUntilInput(((Card)((AbilityBehaviour)<>4__this).Card).Info.displayedName + " responds with a vicious counter attack!", (Style)((Card)((AbilityBehaviour)<>4__this).Card).Info.temple, (DialogueSpeaker)null, (ScreenPosition)2, 0f, true, false, (Prompt)null, true, (Emotion)0);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					((Card)((AbilityBehaviour)<>4__this).Card).Anim.PlayAttackAnimation(attacker.OpponentCard, attacker.Slot);
					<>2__current = (object)new WaitForSeconds(0.175f);
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -1;
					<>2__current = attacker.TakeDamage(1, ((AbilityBehaviour)<>4__this).Card);
					<>1__state = 4;
					return true;
				case 4:
					<>1__state = -1;
					<>2__current = (object)new WaitForSeconds(0.175f);
					<>1__state = 5;
					return true;
				case 5:
					<>1__state = -1;
					<right>5__1 = Singleton<BoardManager>.Instance.GetAdjacent(((AbilityBehaviour)<>4__this).Card.Slot, false);
					<left>5__2 = Singleton<BoardManager>.Instance.GetAdjacent(((AbilityBehaviour)<>4__this).Card.Slot, true);
					if ((Object)(object)<right>5__1 != (Object)null && (Object)(object)<right>5__1.Card == (Object)null)
					{
						<>2__current = <>4__this.DoMovement(<right>5__1, isLeft: false);
						<>1__state = 6;
						return true;
					}
					if ((Object)(object)<left>5__2 != (Object)null && (Object)(object)<left>5__2.Card == (Object)null)
					{
						<>2__current = <>4__this.DoMovement(<left>5__2, isLeft: true);
						<>1__state = 7;
						return true;
					}
					goto IL_026a;
				case 6:
					<>1__state = -1;
					goto IL_026a;
				case 7:
					<>1__state = -1;
					goto IL_026a;
				case 8:
					{
						<>1__state = -1;
						return false;
					}
					IL_026a:
					<>2__current = ((AbilityBehaviour)<>4__this).LearnAbility(0.1f);
					<>1__state = 8;
					return true;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[CompilerGenerated]
		private sealed class <OnUpkeep>d__6 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public bool playerUpkeep;

			public AbilAfterimage <>4__this;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnUpkeep>d__6(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = (<>4__this.doDodge = true);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<>2__current = <>4__this.<>n__0(playerUpkeep);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public static Ability ability;

		private bool doDodge = true;

		public override Ability Ability => ability;

		public override bool RespondsToUpkeep(bool playerUpkeep)
		{
			return playerUpkeep == !((AbilityBehaviour)this).Card.OpponentCard;
		}

		public override bool RespondsToSlotTargetedForAttack(CardSlot slot, PlayableCard attacker)
		{
			return ((object)slot).Equals((object?)((AbilityBehaviour)this).Card.Slot) && doDodge && ((Object)(object)Singleton<BoardManager>.Instance.GetAdjacent(((AbilityBehaviour)this).Card.Slot, true).Card == (Object)null || (Object)(object)Singleton<BoardManager>.Instance.GetAdjacent(((AbilityBehaviour)this).Card.Slot, false).Card == (Object)null);
		}

		[IteratorStateMachine(typeof(<OnUpkeep>d__6))]
		public override IEnumerator OnUpkeep(bool playerUpkeep)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnUpkeep>d__6(0)
			{
				<>4__this = this,
				playerUpkeep = playerUpkeep
			};
		}

		[IteratorStateMachine(typeof(<OnSlotTargetedForAttack>d__7))]
		public override IEnumerator OnSlotTargetedForAttack(CardSlot slot, PlayableCard attacker)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnSlotTargetedForAttack>d__7(0)
			{
				<>4__this = this,
				slot = slot,
				attacker = attacker
			};
		}

		[IteratorStateMachine(typeof(<DoMovement>d__8))]
		private IEnumerator DoMovement(CardSlot destination, bool isLeft)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <DoMovement>d__8(0)
			{
				<>4__this = this,
				destination = destination,
				isLeft = isLeft
			};
		}

		public static void AddAfterimage()
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			AbilityInfo val = AbilityManager.New("StressSigils", "Afterimage", "Once per round, [creature] may dodge an incoming attack, dealing 1 damage to the attacker.", typeof(AbilAfterimage), "3d_afterimage.png");
			AbilityExtensions.SetPixelAbilityIcon(val, TextureHelper.GetImageAsTexture("pixel_afterimage.png", typeof(CostmaniaPlugin).Assembly, (FilterMode)0), (FilterMode?)null);
			AbilityExtensions.SetPowerlevel(val, 4);
			ability = val.ability;
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private IEnumerator <>n__0(bool playerUpkeep)
		{
			return ((TriggerReceiver)this).OnUpkeep(playerUpkeep);
		}
	}
	public class AbilArmyBuilder : AbilityBehaviour
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass4_0
		{
			public string modPrefix;

			internal bool <OnResolveOnBoard>b__1(string newTemple)
			{
				return modPrefix.Contains(newTemple);
			}
		}

		[CompilerGenerated]
		private sealed class <OnResolveOnBoard>d__4 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public AbilArmyBuilder <>4__this;

			private CardSlot[] <slots>5__1;

			private <>c__DisplayClass4_0 <>8__2;

			private string <troopName>5__3;

			private CardTemple <>s__4;

			private CardSlot[] <>s__5;

			private int <>s__6;

			private CardSlot <slot>5__7;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnResolveOnBoard>d__4(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<slots>5__1 = null;
				<>8__2 = null;
				<troopName>5__3 = null;
				<>s__5 = null;
				<slot>5__7 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_03b1: Unknown result type (might be due to invalid IL or missing references)
				//IL_03bb: Expected O, but got Unknown
				//IL_012c: Unknown result type (might be due to invalid IL or missing references)
				//IL_020d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0212: Unknown result type (might be due to invalid IL or missing references)
				//IL_0214: Unknown result type (might be due to invalid IL or missing references)
				//IL_0216: Unknown result type (might be due to invalid IL or missing references)
				//IL_021c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0221: Unknown result type (might be due to invalid IL or missing references)
				//IL_0223: Unknown result type (might be due to invalid IL or missing references)
				//IL_023a: Expected I4, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = ((AbilityBehaviour)<>4__this).PreSuccessfulTriggerSequence();
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<slots>5__1 = (CardSlot[])(object)new CardSlot[2]
					{
						Singleton<BoardManager>.Instance.GetAdjacent(((AbilityBehaviour)<>4__this).Card.Slot, true),
						Singleton<BoardManager>.Instance.GetAdjacent(((AbilityBehaviour)<>4__this).Card.Slot, false)
					};
					if (<slots>5__1.Where((CardSlot slot) => (Object)(object)slot.Card == (Object)null).Count() > 0)
					{
						<>8__2 = new <>c__DisplayClass4_0();
						<>2__current = Singleton<TextBox>.Instance.ShowUntilInput(((Card)((AbilityBehaviour)<>4__this).Card).Info.displayedName + " called upon the strength of it's soliders!", (Style)((Card)((AbilityBehaviour)<>4__this).Card).Info.temple, (DialogueSpeaker)null, (ScreenPosition)2, 0f, true, false, (Prompt)null, true, (Emotion)0);
						<>1__state = 2;
						return true;
					}
					((Card)((AbilityBehaviour)<>4__this).Card).Anim.StrongNegationEffect();
					goto IL_0423;
				case 2:
					<>1__state = -1;
					<troopName>5__3 = "Squirrel";
					<>8__2.modPrefix = CardExtensions.GetModPrefix(((Card)((AbilityBehaviour)<>4__this).Card).Info);
					if (CardExtensions.GetExtendedProperty(((Card)((AbilityBehaviour)<>4__this).Card).Info, "TroopName") != null)
					{
						<troopName>5__3 = CardExtensions.GetExtendedProperty(((Card)((AbilityBehaviour)<>4__this).Card).Info, "TroopName");
					}
					else if (<>8__2.modPrefix == null || !CostmaniaPlugin.NEW_TEMPLES.Any((string newTemple) => <>8__2.modPrefix.Contains(newTemple)))
					{
						CardTemple temple = ((Card)((AbilityBehaviour)<>4__this).Card).Info.temple;
						<>s__4 = temple;
						CardTemple val = <>s__4;
						switch ((int)val)
						{
						case 0:
							<troopName>5__3 = "Bee";
							break;
						case 1:
							<troopName>5__3 = "Zombie";
							break;
						case 2:
							<troopName>5__3 = "Automaton";
							break;
						case 3:
							<troopName>5__3 = "FlyingMage";
							break;
						}
					}
					else if (<>8__2.modPrefix.Contains("Alchemy"))
					{
						<troopName>5__3 = "Alchemy_Homonculus";
					}
					else if (<>8__2.modPrefix.Contains("Stress"))
					{
						<troopName>5__3 = "Stress_Micro";
					}
					else if (<>8__2.modPrefix.Contains("Space"))
					{
						<troopName>5__3 = "Space_ShootingStar";
					}
					else if (<>8__2.modPrefix.Contains("Valor"))
					{
						<troopName>5__3 = "Valor_InfantryKnight";
					}
					<>s__5 = <slots>5__1;
					<>s__6 = 0;
					goto IL_03e2;
				case 3:
					<>1__state = -1;
					<>2__current = (object)new WaitForSeconds(0.5f);
					<>1__state = 4;
					return true;
				case 4:
					<>1__state = -1;
					goto IL_03cc;
				case 5:
					{
						<>1__state = -1;
						return false;
					}
					IL_03cc:
					<slot>5__7 = null;
					<>s__6++;
					goto IL_03e2;
					IL_0423:
					<>2__current = ((AbilityBehaviour)<>4__this).LearnAbility(0.2f);
					<>1__state = 5;
					return true;
					IL_03e2:
					if (<>s__6 < <>s__5.Length)
					{
						<slot>5__7 = <>s__5[<>s__6];
						if ((Object)(object)<slot>5__7.Card == (Object)null)
						{
							((Card)((AbilityBehaviour)<>4__this).Card).Anim.PlayAttackAnimation(false, <slot>5__7);
							<>2__current = CardSlotExtensions.CreateCardInSlot(<slot>5__7, CardLoader.GetCardByName(<troopName>5__3), 0.1f, true);
							<>1__state = 3;
							return true;
						}
						goto IL_03cc;
					}
					<>s__5 = null;
					<>8__2 = null;
					<troopName>5__3 = null;
					goto IL_0423;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public static Ability ability;

		public override Ability Ability => ability;

		public override bool RespondsToResolveOnBoard()
		{
			return true;
		}

		[IteratorStateMachine(typeof(<OnResolveOnBoard>d__4))]
		public override IEnumerator OnResolveOnBoard()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnResolveOnBoard>d__4(0)
			{
				<>4__this = this
			};
		}

		public static void AddArmyBuilder()
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			AbilityInfo val = AbilityManager.New("StressSigils", "Army Builder", "When [creature] is played, it's troops are placed to it's left and right.", typeof(AbilArmyBuilder), "3d_armybuilder.png");
			AbilityExtensions.SetPixelAbilityIcon(val, TextureHelper.GetImageAsTexture("pixel_armybuilder.png", typeof(CostmaniaPlugin).Assembly, (FilterMode)0), (FilterMode?)null);
			AbilityExtensions.SetPowerlevel(val, 5);
			ability = val.ability;
		}
	}
	public class AbilBloodGuzzler : AbilityBehaviour
	{
		[CompilerGenerated]
		private sealed class <OnDealDamage>d__4 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public int amount;

			public PlayableCard target;

			public AbilBloodGuzzler <>4__this;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnDealDamage>d__4(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
				//IL_0100: Expected O, but got Unknown
				//IL_0122: Unknown result type (might be due to invalid IL or missing references)
				//IL_012c: Expected O, but got Unknown
				//IL_0155: Unknown result type (might be due to invalid IL or missing references)
				//IL_015f: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = ((AbilityBehaviour)<>4__this).PreSuccessfulTriggerSequence();
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					((Card)((AbilityBehaviour)<>4__this).Card).Anim.StrongNegationEffect();
					<>2__current = Singleton<TextBox>.Instance.ShowUntilInput(((Card)((AbilityBehaviour)<>4__this).Card).Info.displayedName + " slakes on the blood of " + ((Card)target).Info.DisplayedNameEnglish, (Style)((Card)((AbilityBehaviour)<>4__this).Card).Info.temple, (DialogueSpeaker)null, (ScreenPosition)2, 0f, true, false, (Prompt)null, true, (Emotion)0);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					<>2__current = (object)new WaitForSeconds(0.25f);
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -1;
					((AbilityBehaviour)<>4__this).Card.AddTemporaryMod(new CardModificationInfo(0, amount));
					((AbilityBehaviour)<>4__this).Card.OnStatsChanged();
					((Card)((AbilityBehaviour)<>4__this).Card).RenderCard();
					<>2__current = (object)new WaitForSeconds(0.25f);
					<>1__state = 4;
					return true;
				case 4:
					<>1__state = -1;
					<>2__current = ((AbilityBehaviour)<>4__this).LearnAbility(0.25f);
					<>1__state = 5;
					return true;
				case 5:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public static Ability ability;

		public override Ability Ability => ability;

		public override bool RespondsToDealDamage(int amount, PlayableCard target)
		{
			return CardExtensions.NotDead(((AbilityBehaviour)this).Card) && amount > 0;
		}

		[IteratorStateMachine(typeof(<OnDealDamage>d__4))]
		public override IEnumerator OnDealDamage(int amount, PlayableCard target)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnDealDamage>d__4(0)
			{
				<>4__this = this,
				amount = amount,
				target = target
			};
		}

		public static void AddBloodGuzzler()
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			AbilityInfo val = AbilityManager.New("StressSigils", "Blood Guzzler", "When [creature] deals damage, it gains 1 Health for each damage dealt.", typeof(AbilBloodGuzzler), "3d_bloodguzzler.png");
			AbilityExtensions.SetPixelAbilityIcon(val, TextureHelper.GetImageAsTexture("pixel_bloodguzzler.png", typeof(CostmaniaPlugin).Assembly, (FilterMode)0), (FilterMode?)null);
			AbilityExtensions.SetPowerlevel(val, 4);
			ability = val.ability;
		}
	}
	[HarmonyPatch]
	public abstract class CostmaniaActivatedAbility : ActivatedAbilityBehaviour
	{
		[CompilerGenerated]
		private sealed class <Activate>d__15 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public CostmaniaActivatedAbility <>4__this;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <Activate>d__15(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = true;
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public virtual int StressCost => 0;

		public virtual int ValorCost => 0;

		public virtual int ValorRankCost => 0;

		public virtual int StardustCost => 0;

		public virtual int FleshCost => 0;

		public virtual int MetalCost => 0;

		public virtual int ElixirCost => 0;

		public override bool CanActivate()
		{
			return ((ActivatedAbilityBehaviour)this).CanActivate() && global::StressCost.Cost.ValorCost.MaxRank >= ValorCost && ((AbilityBehaviour)this).Card.ValorRank() >= ValorRankCost && global::StressCost.Cost.StardustCost.stardustCounter >= StardustCost && AlchemyCounter.fleshCount >= FleshCost && AlchemyCounter.metalCount >= MetalCost && AlchemyCounter.elixirCount >= ElixirCost;
		}

		[IteratorStateMachine(typeof(<Activate>d__15))]
		public override IEnumerator Activate()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <Activate>d__15(0)
			{
				<>4__this = this
			};
		}
	}
	public class AbilDataBanks : AbilityBehaviour
	{
		public static Ability ability;

		public override Ability Ability => ability;

		public static void AddDataBanks()
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			AbilityInfo val = AbilityManager.New("StressSigils", "Data Banks", "While [creature] is on the board, it's owner loses 2 Stardust instead of all of them at the start of their turn.", typeof(AbilDataBanks), "3d_databanks.png");
			AbilityExtensions.SetPixelAbilityIcon(val, TextureHelper.GetImageAsTexture("pixel_databanks.png", typeof(CostmaniaPlugin).Assembly, (FilterMode)0), (FilterMode?)null);
			AbilityExtensions.SetPowerlevel(val, 4);
			ability = val.ability;
		}
	}
	public class AbilDriveby : AbilityBehaviour
	{
		public static Ability ability;

		public override Ability Ability => ability;

		public static void AddDriveby()
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			AbilityInfo val = AbilityManager.New("StressSigils", "Driveby", "[creature] deals 1 damage to the creature opposing it when moving.", typeof(AbilDriveby), "3d_driveby.png");
			AbilityExtensions.SetPixelAbilityIcon(val, TextureHelper.GetImageAsTexture("pixel_driveby.png", typeof(CostmaniaPlugin).Assembly, (FilterMode)0), (FilterMode?)null);
			AbilityExtensions.SetPowerlevel(val, 1);
			ability = val.ability;
		}
	}
	public class AbilEldritchPower : AbilityBehaviour
	{
		[CompilerGenerated]
		private sealed class <OnUpkeep>d__4 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public bool playerUpkeep;

			public AbilEldritchPower <>4__this;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnUpkeep>d__4(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0109: Unknown result type (might be due to invalid IL or missing references)
				//IL_0113: Expected O, but got Unknown
				//IL_009f: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00da: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = ((AbilityBehaviour)<>4__this).PreSuccessfulTriggerSequence();
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<>2__current = Singleton<TextBox>.Instance.ShowUntilInput(((Card)((AbilityBehaviour)<>4__this).Card).Info.displayedName + "'s eldritch presence beckons towards you.", (Style)((Card)((AbilityBehaviour)<>4__this).Card).Info.temple, (DialogueSpeaker)null, (ScreenPosition)2, 0f, true, false, (Prompt)null, true, (Emotion)0);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					<>2__current = (object)new WaitForSeconds(0.2f);
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -1;
					try
					{
						AlchemyCounter.AddDies();
					}
					catch
					{
					}
					<>2__current = (object)new WaitForSeconds(0.3f);
					<>1__state = 4;
					return true;
				case 4:
					<>1__state = -1;
					<>2__current = ((AbilityBehaviour)<>4__this).LearnAbility(0.2f);
					<>1__state = 5;
					return true;
				case 5:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public static Ability ability;

		public override Ability Ability => ability;

		public override bool RespondsToUpkeep(bool playerUpkeep)
		{
			return playerUpkeep == !((AbilityBehaviour)this).Card.OpponentCard;
		}

		[IteratorStateMachine(typeof(<OnUpkeep>d__4))]
		public override IEnumerator OnUpkeep(bool playerUpkeep)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnUpkeep>d__4(0)
			{
				<>4__this = this,
				playerUpkeep = playerUpkeep
			};
		}

		public static void AddEldritchPower()
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			AbilityInfo val = AbilityManager.New("StressSigils", "Eldritch Power", "At the beginning of each turn, [creature] provides it's owner with 1 Alchemy Die.", typeof(AbilEldritchPower), "3d_eldritchpower.png");
			AbilityExtensions.SetPixelAbilityIcon(val, TextureHelper.GetImageAsTexture("pixel_eldritchpower.png", typeof(CostmaniaPlugin).Assembly, (FilterMode)0), (FilterMode?)null);
			AbilityExtensions.SetPowerlevel(val, 2);
			ability = val.ability;
		}
	}
	public class AbilEndOfTheTunnel : AbilityBehaviour
	{
		[CompilerGenerated]
		private sealed class <OnUpkeep>d__5 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public bool playerUpkeep;

			public AbilEndOfTheTunnel <>4__this;

			private IEnumerator<CardSlot> <>s__1;

			private CardSlot <target>5__2;

			private CardSlot <destination>5__3;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnUpkeep>d__5(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				int num = <>1__state;
				if ((uint)(num - -4) <= 1u || (uint)(num - 4) <= 1u)
				{
					try
					{
						if (num == -4 || (uint)(num - 4) <= 1u)
						{
							try
							{
							}
							finally
							{
								<>m__Finally2();
							}
						}
					}
					finally
					{
						<>m__Finally1();
					}
				}
				<>s__1 = null;
				<target>5__2 = null;
				<destination>5__3 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0096: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a0: Expected O, but got Unknown
				//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
				try
				{
					switch (<>1__state)
					{
					default:
						return false;
					case 0:
						<>1__state = -1;
						<>2__current = ((AbilityBehaviour)<>4__this).PreSuccessfulTriggerSequence();
						<>1__state = 1;
						return true;
					case 1:
						<>1__state = -1;
						((Card)((AbilityBehaviour)<>4__this).Card).Anim.StrongNegationEffect();
						<>2__current = (object)new WaitForSeconds(0.2f);
						<>1__state = 2;
						return true;
					case 2:
						<>1__state = -1;
						<>2__current = Singleton<TextBox>.Instance.ShowUntilInput("The merciless forces of gravity push further", (Style)((Card)((AbilityBehaviour)<>4__this).Card).Info.temple, (DialogueSpeaker)null, (ScreenPosition)2, 0f, true, false, (Prompt)null, true, (Emotion)0);
						<>1__state = 3;
						return true;
					case 3:
						<>1__state = -1;
						<>1__state = -3;
						<>s__1 = (from slot in Singleton<BoardManager>.Instance.allSlots
							where (Object)(object)slot.Card != (Object)null && slot.Card.OpponentCard != ((AbilityBehaviour)<>4__this).Card.OpponentCard
							orderby Math.Abs(slot.Index - ((AbilityBehaviour)<>4__this).Card.Slot.Index)
							select slot).GetEnumerator();
						<>1__state = -4;
						goto IL_0267;
					case 4:
						<>1__state = -4;
						goto IL_0258;
					case 5:
						<>1__state = -4;
						goto IL_0258;
					case 6:
						{
							<>1__state = -1;
							return false;
						}
						IL_0258:
						<destination>5__3 = null;
						<target>5__2 = null;
						goto IL_0267;
						IL_0267:
						if (<>s__1.MoveNext())
						{
							<target>5__2 = <>s__1.Current;
							Console.WriteLine((Object)(object)<target>5__2 == (Object)null);
							if (<target>5__2.Index > ((AbilityBehaviour)<>4__this).Card.Slot.Index)
							{
								<destination>5__3 = Singleton<BoardManager>.Instance.GetAdjacent(<target>5__2, true);
							}
							else
							{
								<destination>5__3 = Singleton<BoardManager>.Instance.GetAdjacent(<target>5__2, false);
							}
							if ((Object)(object)<destination>5__3 != (Object)null)
							{
								<>2__current = Singleton<BoardManager>.Instance.AssignCardToSlot(<target>5__2.Card, <destination>5__3, 0.1f, (Action)null, true);
								<>1__state = 4;
								return true;
							}
							<>2__current = <target>5__2.Card.Die(false, ((AbilityBehaviour)<>4__this).Card, true);
							<>1__state = 5;
							return true;
						}
						<>m__Finally2();
						<>s__1 = null;
						<>m__Finally1();
						<>2__current = ((AbilityBehaviour)<>4__this).LearnAbility(0.2f);
						<>1__state = 6;
						return true;
					}
				}
				catch
				{
					//try-fault
					((IDisposable)this).Dispose();
					throw;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			private void <>m__Finally1()
			{
				<>1__state = -1;
			}

			private void <>m__Finally2()
			{
				<>1__state = -3;
				if (<>s__1 != null)
				{
					<>s__1.Dispose();
				}
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public static Ability ability;

		public static bool dramaqueenTextPlayed;

		public override Ability Ability => ability;

		public override bool RespondsToUpkeep(bool playerUpkeep)
		{
			return playerUpkeep == !((AbilityBehaviour)this).Card.OpponentCard;
		}

		[IteratorStateMachine(typeof(<OnUpkeep>d__5))]
		public override IEnumerator OnUpkeep(bool playerUpkeep)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnUpkeep>d__5(0)
			{
				<>4__this = this,
				playerUpkeep = playerUpkeep
			};
		}

		public static void AddEndOfTheTunnel()
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			AbilityInfo val = AbilityManager.New("StressSigils", "End Of The Tunnel", "After ringing the bell, all opposing creatures move one space towerds [creature], perishing should they be within their grasp.", typeof(AbilEndOfTheTunnel), "3d_endoftheline.png");
			AbilityExtensions.SetPowerlevel(val, 5);
			AbilityExtensions.SetPixelAbilityIcon(val, TextureHelper.GetImageAsTexture("pixel_endoftheline.png", typeof(CostmaniaPlugin).Assembly, (FilterMode)0), (FilterMode?)null);
			ability = val.ability;
		}
	}
	public class AbilEnrage : CostmaniaActivatedAbility
	{
		[CompilerGenerated]
		private sealed class <Activate>d__5 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public AbilEnrage <>4__this;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <Activate>d__5(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0063: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00aa: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = Singleton<TextBox>.Instance.ShowUntilInput(((Card)((AbilityBehaviour)<>4__this).Card).Info.displayedName + "'s rage crept further", (Style)((Card)((AbilityBehaviour)<>4__this).Card).Info.temple, (DialogueSpeaker)null, (ScreenPosition)2, 0f, true, false, (Prompt)null, true, (Emotion)0);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					((AbilityBehaviour)<>4__this).Card.temporaryMods.Add(new CardModificationInfo(1, 1));
					((Card)((AbilityBehaviour)<>4__this).Card).Anim.StrongNegationEffect();
					<>2__current = ((AbilityBehaviour)<>4__this).LearnAbility(0f);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public static Ability ability;

		public override Ability Ability => ability;

		public override int StressCost => 2;

		[IteratorStateMachine(typeof(<Activate>d__5))]
		public override IEnumerator Activate()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <Activate>d__5(0)
			{
				<>4__this = this
			};
		}

		public static void AddEnrage()
		{
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			AbilityInfo val = AbilityManager.New("StressSigils", "Enrage", "Pay 2 stress for [creature] to gain 1 Power and Health.", typeof(AbilEnrage), "3d_enrage.png");
			AbilityExtensions.SetPixelAbilityIcon(val, TextureHelper.GetImageAsTexture("pixel_enrage.png", typeof(CostmaniaPlugin).Assembly, (FilterMode)0), (FilterMode?)null);
			AbilityExtensions.SetActivated(val, true);
			AbilityExtensions.SetPowerlevel(val, 3);
			ability = val.ability;
		}
	}
	public class AbilFearmonger : AbilityBehaviour
	{
		public static Ability ability;

		public override Ability Ability => ability;

		public static void AddFearmonger()
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			AbilityInfo val = AbilityManager.New("StressSigils", "Fearmonger", "[creature] strikes the opposing card every time the Stress Counter goes up.", typeof(AbilFearmonger), "3d_fearmonger.png");
			AbilityExtensions.SetPixelAbilityIcon(val, TextureHelper.GetImageAsTexture("pixel_fearmonger.png", typeof(CostmaniaPlugin).Assembly, (FilterMode)0), (FilterMode?)null);
			AbilityExtensions.SetPowerlevel(val, 2);
			ability = val.ability;
		}
	}
	public class AbilFirstStrike : AbilityBehaviour
	{
		[CompilerGenerated]
		private sealed class <OnResolveOnBoard>d__4 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public AbilFirstStrike <>4__this;

			private CardSlot <opponent>5__1;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnResolveOnBoard>d__4(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<opponent>5__1 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_013e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0148: Expected O, but got Unknown
				//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
				//IL_024c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0256: Expected O, but got Unknown
				//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
				//IL_01d9: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = ((AbilityBehaviour)<>4__this).PreSuccessfulTriggerSequence();
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					if (!((AbilityBehaviour)<>4__this).Card.Dead)
					{
						<>2__current = Singleton<TextBox>.Instance.ShowUntilInput(((Card)((AbilityBehaviour)<>4__this).Card).Info.displayedName + " took a free shot!", (Style)((Card)((AbilityBehaviour)<>4__this).Card).Info.temple, (DialogueSpeaker)null, (ScreenPosition)2, 0f, true, false, (Prompt)null, true, (Emotion)0);
						<>1__state = 2;
						return true;
					}
					goto IL_026e;
				case 2:
					<>1__state = -1;
					<opponent>5__1 = ((AbilityBehaviour)<>4__this).Card.Slot.opposingSlot;
					((Card)((AbilityBehaviour)<>4__this).Card).Anim.PlayAttackAnimation(false, <opponent>5__1);
					<>2__current = (object)new WaitForSeconds(0.175f);
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -1;
					if ((Object)(object)<opponent>5__1.Card != (Object)null && !((Card)<opponent>5__1.Card).FaceDown)
					{
						<>2__current = <opponent>5__1.Card.TakeDamage(((AbilityBehaviour)<>4__this).Card.Attack, ((AbilityBehaviour)<>4__this).Card);
						<>1__state = 4;
						return true;
					}
					<>2__current = (object)new WaitForSeconds(0.175f);
					<>1__state = 5;
					return true;
				case 4:
					<>1__state = -1;
					goto IL_0246;
				case 5:
					<>1__state = -1;
					<>2__current = Singleton<LifeManager>.Instance.ShowDamageSequence(((AbilityBehaviour)<>4__this).Card.Attack, ((AbilityBehaviour)<>4__this).Card.Attack, ((AbilityBehaviour)<>4__this).Card.OpponentCard, 0.3f, (GameObject)null, 0.15f, true);
					<>1__state = 6;
					return true;
				case 6:
					<>1__state = -1;
					goto IL_0246;
				case 7:
					<>1__state = -1;
					<opponent>5__1 = null;
					goto IL_026e;
				case 8:
					{
						<>1__state = -1;
						return false;
					}
					IL_0246:
					<>2__current = (object)new WaitForSeconds(0.3f);
					<>1__state = 7;
					return true;
					IL_026e:
					<>2__current = ((AbilityBehaviour)<>4__this).LearnAbility(0.2f);
					<>1__state = 8;
					return true;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public static Ability ability;

		public override Ability Ability => ability;

		public override bool RespondsToResolveOnBoard()
		{
			return true;
		}

		[IteratorStateMachine(typeof(<OnResolveOnBoard>d__4))]
		public override IEnumerator OnResolveOnBoard()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnResolveOnBoard>d__4(0)
			{
				<>4__this = this
			};
		}

		public static void AddFirstStrike()
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			AbilityInfo val = AbilityManager.New("StressSigils", "First Strike", "[creature] attacks the moment it is placed.", typeof(AbilFirstStrike), "3d_firststrike.png");
			AbilityExtensions.SetPixelAbilityIcon(val, TextureHelper.GetImageAsTexture("pixel_firststrike.png", typeof(CostmaniaPlugin).Assembly, (FilterMode)0), (FilterMode?)null);
			AbilityExtensions.SetPowerlevel(val, 4);
			ability = val.ability;
		}
	}
	public class AbilFrontliner : AbilityBehaviour
	{
		[CompilerGenerated]
		private sealed class <OnTurnEnd>d__4 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public bool playerTurnEnd;

			public AbilFrontliner <>4__this;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnTurnEnd>d__4(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_005c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0066: Expected O, but got Unknown
				//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f8: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					((Card)((AbilityBehaviour)<>4__this).Card).Anim.StrongNegationEffect();
					<>2__current = (object)new WaitForSeconds(0.2f);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<>2__current = Singleton<TextBox>.Instance.ShowUntilInput(((Card)((AbilityBehaviour)<>4__this).Card).Info.displayedName + "'s bravery amplified it's morale", (Style)((Card)((AbilityBehaviour)<>4__this).Card).Info.temple, (DialogueSpeaker)null, (ScreenPosition)2, 0f, true, false, (Prompt)null, true, (Emotion)0);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					((AbilityBehaviour)<>4__this).Card.AddValorRank();
					<>2__current = (object)new WaitForSeconds(0.2f);
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -1;
					<>2__current = ((AbilityBehaviour)<>4__this).LearnAbility(0.2f);
					<>1__state = 4;
					return true;
				case 4:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public static Ability ability;

		public override Ability Ability => ability;

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

		[IteratorStateMachine(typeof(<OnTurnEnd>d__4))]
		public override IEnumerator OnTurnEnd(bool playerTurnEnd)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnTurnEnd>d__4(0)
			{
				<>4__this = this,
				playerTurnEnd = playerTurnEnd
			};
		}

		public static void AddFrontliner()
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			AbilityInfo val = AbilityManager.New("StressSigils", "Frontliner", "At the end of every turn, [creature]'s Valor Rank increases by 1.", typeof(AbilFrontliner), "3d_frontliner.png");
			AbilityExtensions.SetPixelAbilityIcon(val, TextureHelper.GetImageAsTexture("pixel_frontliner.png", typeof(CostmaniaPlugin).Assembly, (FilterMode)0), (FilterMode?)null);
			AbilityExtensions.SetPowerlevel(val, 4);
			ability = val.ability;
		}
	}
	public class AbilGemAbsorber : AbilityBehaviour
	{
		[CompilerGenerated]
		private sealed class <OnResolveOnBoard>d__4 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public AbilGemAbsorber <>4__this;

			private List<CardSlot> <slots>5__1;

			private List<CardSlot>.Enumerator <>s__2;

			private CardSlot <gemSlot>5__3;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnResolveOnBoard>d__4(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				int num = <>1__state;
				if (num == -3 || (uint)(num - 3) <= 3u)
				{
					try
					{
					}
					finally
					{
						<>m__Finally1();
					}
				}
				<slots>5__1 = null;
				<gemSlot>5__3 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0168: Unknown result type (might be due to invalid IL or missing references)
				//IL_022c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0236: Expected O, but got Unknown
				//IL_0276: Unknown result type (might be due to invalid IL or missing references)
				//IL_0280: Expected O, but got Unknown
				//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
				//IL_02c3: Expected O, but got Unknown
				//IL_02ca: Unknown result type (might be due to invalid IL or missing references)
				//IL_02d4: Expected O, but got Unknown
				//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
				//IL_0205: Expected O, but got Unknown
				try
				{
					switch (<>1__state)
					{
					default:
						return false;
					case 0:
						<>1__state = -1;
						<slots>5__1 = new List<CardSlot>();
						if (((AbilityBehaviour)<>4__this).Card.OpponentCard)
						{
							<slots>5__1 = Singleton<BoardManager>.Instance.opponentSlots;
						}
						else
						{
							<slots>5__1 = Singleton<BoardManager>.Instance.playerSlots;
						}
						<slots>5__1 = <slots>5__1.FindAll((CardSlot slot) => (Object)(object)slot.Card != (Object)null && ((Card)slot.Card).Info.HasTrait((Trait)17));
						Console.WriteLine(<slots>5__1.Count);
						if (<slots>5__1.Count > 0)
						{
							<>2__current = ((AbilityBehaviour)<>4__this).PreSuccessfulTriggerSequence();
							<>1__state = 1;
							return true;
						}
						((Card)((AbilityBehaviour)<>4__this).Card).Anim.StrongNegationEffect();
						<>2__current = false;
						<>1__state = 9;
						return true;
					case 1:
						<>1__state = -1;
						<>2__current = Singleton<TextBox>.Instance.ShowUntilInput(((Card)((AbilityBehaviour)<>4__this).Card).Info.displayedName + " absorbs the mana of the crystals!", (Style)((Card)((AbilityBehaviour)<>4__this).Card).Info.temple, (DialogueSpeaker)null, (ScreenPosition)2, 0f, true, false, (Prompt)null, true, (Emotion)0);
						<>1__state = 2;
						return true;
					case 2:
						<>1__state = -1;
						<>s__2 = <slots>5__1.GetEnumerator();
						<>1__state = -3;
						goto IL_02f2;
					case 3:
						<>1__state = -3;
						<gemSlot>5__3.Card.AddTemporaryMod(new CardModificationInfo(0, -999));
						<>2__current = <gemSlot>5__3.Card.Die(false, ((AbilityBehaviour)<>4__this).Card, true);
						<>1__state = 4;
						return true;
					case 4:
						<>1__state = -3;
						<>2__current = (object)new WaitForSeconds(0.015f);
						<>1__state = 5;
						return true;
					case 5:
						<>1__state = -3;
						((Card)((AbilityBehaviour)<>4__this).Card).Anim.StrongNegationEffect();
						((AbilityBehaviour)<>4__this).Card.AddTemporaryMod(new CardModificationInfo(1, 1));
						<>2__current = (object)new WaitForSeconds(0.165f);
						<>1__state = 6;
						return true;
					case 6:
						<>1__state = -3;
						<gemSlot>5__3 = null;
						goto IL_02f2;
					case 7:
						<>1__state = -1;
						<>2__current = true;
						<>1__state = 8;
						return true;
					case 8:
						<>1__state = -1;
						break;
					case 9:
						{
							<>1__state = -1;
							break;
						}
						IL_02f2:
						if (<>s__2.MoveNext())
						{
							<gemSlot>5__3 = <>s__2.Current;
							((Card)((AbilityBehaviour)<>4__this).Card).Anim.PlayAttackAnimation(<gemSlot>5__3.Card.OpponentCard, <gemSlot>5__3);
							<>2__current = (object)new WaitForSeconds(0.175f);
							<>1__state = 3;
							return true;
						}
						<>m__Finally1();
						<>2__current = ((AbilityBehaviour)<>4__this).LearnAbility(0.2f);
						<>1__state = 7;
						return true;
					}
					return false;
				}
				catch
				{
					//try-fault
					((IDisposable)this).Dispose();
					throw;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			private void <>m__Finally1()
			{
				<>1__state = -1;
				((IDisposable)<>s__2).Dispose();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public static Ability ability;

		public override Ability Ability => ability;

		public override bool RespondsToResolveOnBoard()
		{
			return true;
		}

		[IteratorStateMachine(typeof(<OnResolveOnBoard>d__4))]
		public override IEnumerator OnResolveOnBoard()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnResolveOnBoard>d__4(0)
			{
				<>4__this = this
			};
		}

		public static void AddGemAbsorber()
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			AbilityInfo val = AbilityManager.New("StressSigils", "Gem Absorber", "When [creature] is placed on the board. All Mox cards you control perish, each granting it +1 Power and Health.", typeof(AbilGemAbsorber), "3d_gemabsorber.png");
			AbilityExtensions.SetPixelAbilityIcon(val, TextureHelper.GetImageAsTexture("pixel_gemabsorber.png", typeof(CostmaniaPlugin).Assembly, (FilterMode)0), (FilterMode?)null);
			AbilityExtensions.SetPowerlevel(val, 2);
			ability = val.ability;
		}
	}
	public class AbilGestationTank : AbilityBehaviour
	{
		[CompilerGenerated]
		private sealed class <OnDie>d__8 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public bool wasSacrifice;

			public PlayableCard killer;

			public AbilGestationTank <>4__this;

			private string <firstCube>5__1;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnDie>d__8(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<firstCube>5__1 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0081: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					((AbilityBehaviour)<>4__this).PreSuccessfulTriggerSequence();
					<>2__current = Singleton<TextBox>.Instance.ShowUntilInput(((Card)((AbilityBehaviour)<>4__this).Card).Info.displayedName + " releases the monster inside!", (Style)((Card)((AbilityBehaviour)<>4__this).Card).Info.temple, (DialogueSpeaker)null, (ScreenPosition)2, 0f, true, false, (Prompt)null, true, (Emotion)0);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					if (<>4__this.curIceCube != null)
					{
						<>2__current = CardSlotExtensions.CreateCardInSlot(((AbilityBehaviour)<>4__this).Card.Slot, CardLoader.GetCardByName(<>4__this.curIceCube), 0.1f, true);
						<>1__state = 2;
						return true;
					}
					<firstCube>5__1 = CardExtensions.GetExtendedProperty(((Card)((AbilityBehaviour)<>4__this).Card).Info, "GestationTankName1");
					if (<firstCube>5__1 != null)
					{
						<>2__current = CardSlotExtensions.CreateCardInSlot(((AbilityBehaviour)<>4__this).Card.Slot, CardLoader.GetCardByName(<firstCube>5__1), 0.1f, true);
						<>1__state = 3;
						return true;
					}
					<>2__current = CardSlotExtensions.CreateCardInSlot(((AbilityBehaviour)<>4__this).Card.Slot, CardLoader.GetCardByName("Alchemy_Spite"), 0.1f, true);
					<>1__state = 4;
					return true;
				case 2:
					<>1__state = -1;
					break;
				case 3:
					<>1__state = -1;
					goto IL_01ab;
				case 4:
					{
						<>1__state = -1;
						goto IL_01ab;
					}
					IL_01ab:
					<firstCube>5__1 = null;
					break;
				}
				return false;
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public static Ability ability;

		private int turnsPassed = 1;

		private string curIceCube = null;

		public override Ability Ability => ability;

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

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

		public override IEnumerator OnUpkeep(bool playerUpkeep)
		{
			turnsPassed++;
			string extendedProperty = CardExtensions.GetExtendedProperty(((Card)((AbilityBehaviour)this).Card).Info, $"GestationTankName{turnsPassed}");
			if (extendedProperty != null)
			{
				curIceCube = extendedProperty;
			}
			((Card)((AbilityBehaviour)this).Card).Anim.StrongNegationEffect();
			return ((TriggerReceiver)this).OnUpkeep(playerUpkeep);
		}

		[IteratorStateMachine(typeof(<OnDie>d__8))]
		public override IEnumerator OnDie(bool wasSacrifice, PlayableCard killer)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnDie>d__8(0)
			{
				<>4__this = this,
				wasSacrifice = wasSacrifice,
				killer = killer
			};
		}

		public static void AddGestationTank()
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			AbilityInfo val = AbilityManager.New("StressSigils", "Gestation Tank", "When [creature] perishes, it's ever growing spawn is released in it's place.", typeof(AbilGestationTank), "3d_gestationtank.png");
			AbilityExtensions.SetPixelAbilityIcon(val, TextureHelper.GetImageAsTexture("pixel_gestationtank.png", typeof(CostmaniaPlugin).Assembly, (FilterMode)0), (FilterMode?)null);
			AbilityExtensions.SetPowerlevel(val, 4);
			ability = val.ability;
		}
	}
	public class AbilGloryKill : AbilityBehaviour
	{
		[CompilerGenerated]
		private sealed class <OnOtherCardDie>d__4 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public PlayableCard card;

			public CardSlot deathSlot;

			public bool fromCombat;

			public PlayableCard killer;

			public AbilGloryKill <>4__this;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnOtherCardDie>d__4(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0096: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d1: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = ((AbilityBehaviour)<>4__this).PreSuccessfulTriggerSequence();
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<>2__current = Singleton<TextBox>.Instance.ShowUntilInput(((Card)((AbilityBehaviour)<>4__this).Card).Info.displayedName + "'s vigor rises with gusto!", (Style)((Card)((AbilityBehaviour)<>4__this).Card).Info.temple, (DialogueSpeaker)null, (ScreenPosition)2, 0f, true, false, (Prompt)null, true, (Emotion)0);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					<>2__current = (object)new WaitForSeconds(0.2f);
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -1;
					((AbilityBehaviour)<>4__this).Card.AddValorRank();
					((Card)((AbilityBehaviour)<>4__this).Card).Anim.StrongNegationEffect();
					<>2__current = ((AbilityBehaviour)<>4__this).LearnAbility(0.2f);
					<>1__state = 4;
					return true;
				case 4:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public static Ability ability;

		public override Ability Ability => ability;

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

		[IteratorStateMachine(typeof(<OnOtherCardDie>d__4))]
		public override IEnumerator OnOtherCardDie(PlayableCard card, CardSlot deathSlot, bool fromCombat, PlayableCard killer)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnOtherCardDie>d__4(0)
			{
				<>4__this = this,
				card = card,
				deathSlot = deathSlot,
				fromCombat = fromCombat,
				killer = killer
			};
		}

		public static void AddGloryKill()
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			AbilityInfo val = AbilityManager.New("StressSigils", "Glory Kill", "When [creature] strikes an opposing creature and it perishes, this card's Valor Rank goes up by 1.", typeof(AbilGloryKill), "3d_glorykill.png");
			AbilityExtensions.SetPixelAbilityIcon(val, TextureHelper.GetImageAsTexture("pixel_glorykill.png", typeof(CostmaniaPlugin).Assembly, (FilterMode)0), (FilterMode?)null);
			AbilityExtensions.SetPowerlevel(val, 2);
			ability = val.ability;
		}
	}
	public class AbilHealingAura : AbilityBehaviour
	{
		[CompilerGenerated]
		private sealed class <OnTurnEnd>d__4 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public bool playerTurnEnd;

			public AbilHealingAura <>4__this;

			private List<PlayableCard> <cards>5__1;

			private PlayableCard <left>5__2;

			private PlayableCard <right>5__3;

			private List<PlayableCard>.Enumerator <>s__4;

			private PlayableCard <card>5__5;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnTurnEnd>d__4(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<cards>5__1 = null;
				<left>5__2 = null;
				<right>5__3 = null;
				<card>5__5 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = ((AbilityBehaviour)<>4__this).PreSuccessfulTriggerSequence();
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					((Card)((AbilityBehaviour)<>4__this).Card).Anim.StrongNegationEffect();
					<cards>5__1 = new List<PlayableCard>();
					<left>5__2 = null;
					<right>5__3 = null;
					try
					{
						<left>5__2 = Singleton<BoardManager>.Instance.GetAdjacent(((AbilityBehaviour)<>4__this).Card.Slot, true).Card;
					}
					catch
					{
						Console.WriteLine("Left failed");
					}
					try
					{
						<right>5__3 = Singleton<BoardManager>.Instance.GetAdjacent(((AbilityBehaviour)<>4__this).Card.Slot, false).Card;
					}
					catch
					{
						Console.WriteLine("Right failed");
					}
					if ((Object)(object)<left>5__2 != (Object)null)
					{
						<cards>5__1.Add(<left>5__2);
					}
					if ((Object)(object)<right>5__3 != (Object)null)
					{
						<cards>5__1.Add(<right>5__3);
					}
					<>s__4 = <cards>5__1.GetEnumerator();
					try
					{
						while (<>s__4.MoveNext())
						{
							<card>5__5 = <>s__4.Current;
							if (<card>5__5.Health < <card>5__5.MaxHealth + 1)
							{
								<card>5__5.HealDamage(1);
							}
							<card>5__5 = null;
						}
					}
					finally
					{
						((IDisposable)<>s__4).Dispose();
					}
					<>2__current = Singleton<TextBox>.Instance.ShowUntilInput(((Card)((AbilityBehaviour)<>4__this).Card).Info.displayedName + " tended to the wounds of it's allies.", (Style)((Card)((AbilityBehaviour)<>4__this).Card).Info.temple, (DialogueSpeaker)null, (ScreenPosition)2, 0f, true, false, (Prompt)null, true, (Emotion)0);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					<>2__current = ((AbilityBehaviour)<>4__this).LearnAbility(0.2f);
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public static Ability ability;

		public override Ability Ability => ability;

		public override bool RespondsToTurnEnd(bool playerTurnEnd)
		{
			return playerTurnEnd == !((AbilityBehaviour)this).Card.OpponentCard;
		}

		[IteratorStateMachine(typeof(<OnTurnEnd>d__4))]
		public override IEnumerator OnTurnEnd(bool playerTurnEnd)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnTurnEnd>d__4(0)
			{
				<>4__this = this,
				playerTurnEnd = playerTurnEnd
			};
		}

		public static void AddHealingAura()
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			AbilityInfo val = AbilityManager.New("StressSigils", "Healing Aura", "At the end of it's owner's turn, [creature] heals it's 2 adjascent allies by 1 Health. [creature] can only heal up to 1 plus a creature's Maximum Health.", typeof(AbilHealingAura), "3d_healingaura.png");
			AbilityExtensions.SetPixelAbilityIcon(val, TextureHelper.GetImageAsTexture("pixel_healingaura.png", typeof(CostmaniaPlugin).Assembly, (FilterMode)0), (FilterMode?)null);
			AbilityExtensions.SetPowerlevel(val, 2);
			ability = val.ability;
		}
	}
	public class AbilImpart : AbilityBehaviour
	{
		[CompilerGenerated]
		private sealed class <OnOtherCardDie>d__4 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public PlayableCard card;

			public CardSlot deathSlot;

			public bool fromCombat;

			public PlayableCard killer;

			public AbilImpart <>4__this;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnOtherCardDie>d__4(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0096: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d1: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = ((AbilityBehaviour)<>4__this).PreSuccessfulTriggerSequence();
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<>2__current = Singleton<TextBox>.Instance.ShowUntilInput(((Card)((AbilityBehaviour)<>4__this).Card).Info.displayedName + " shares his wishom.", (Style)((Card)((AbilityBehaviour)<>4__this).Card).Info.temple, (DialogueSpeaker)null, (ScreenPosition)2, 0f, true, false, (Prompt)null, true, (Emotion)0);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					<>2__current = (object)new WaitForSeconds(0.2f);
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -1;
					try
					{
						Singleton<BoardManager>.Instance.GetAdjacent(((AbilityBehaviour)<>4__this).Card.Slot, true).Card.AddValorRank(((AbilityBehaviour)<>4__this).Card.ValorRank());
					}
					catch
					{
					}
					try
					{
						Singleton<BoardManager>.Instance.GetAdjacent(((AbilityBehaviour)<>4__this).Card.Slot, false).Card.AddValorRank(((AbilityBehaviour)<>4__this).Card.ValorRank());
					}
					catch
					{
					}
					<>2__current = ((AbilityBehaviour)<>4__this).LearnAbility(0.2f);
					<>1__state = 4;
					return true;
				case 4:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public static Ability ability;

		public override Ability Ability => ability;

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

		[IteratorStateMachine(typeof(<OnOtherCardDie>d__4))]
		public override IEnumerator OnOtherCardDie(PlayableCard card, CardSlot deathSlot, bool fromCombat, PlayableCard killer)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnOtherCardDie>d__4(0)
			{
				<>4__this = this,
				card = card,
				deathSlot = deathSlot,
				fromCombat = fromCombat,
				killer = killer
			};
		}

		public static void AddImpart()
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			AbilityInfo val = AbilityManager.New("StressSigils", "Impart", "When [creature] perishes, it adds it's Valor Rank to it's adjacent allies.", typeof(AbilImpart), "3d_impart.png");
			AbilityExtensions.SetPixelAbilityIcon(val, TextureHelper.GetImageAsTexture("pixel_impart.png", typeof(CostmaniaPlugin).Assembly, (FilterMode)0), (FilterMode?)null);
			AbilityExtensions.SetPowerlevel(val, 3);
			ability = val.ability;
		}
	}
	public class AbilIronclad : AbilityBehaviour
	{
		public static Ability ability;

		public override Ability Ability => ability;

		public static void AddIronclad()
		{
			//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)
			AbilityInfo val = AbilityManager.New("StressSigils", "Ironclad", "Any damage [creature] takes is reduced by 1.", typeof(AbilIronclad), "3d_ironclad.png");
			AbilityExtensions.SetPixelAbilityIcon(val, TextureHelper.GetImageAsTexture("pixel_ironclad.png", typeof(CostmaniaPlugin).Assembly, (FilterMode)0), (FilterMode?)null);
			AbilityExtensions.SetPowerlevel(val, 2);
			AbilityExtensions.SetCanStack(val, true, false);
			ability = val.ability;
		}
	}
	public class AbilLiftoff : AbilityBehaviour
	{
		[CompilerGenerated]
		private sealed class <OnResolveOnBoard>d__4 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public AbilLiftoff <>4__this;

			private List<PlayableCard> <cards>5__1;

			private PlayableCard <left>5__2;

			private PlayableCard <right>5__3;

			private List<PlayableCard>.Enumerator <>s__4;

			private PlayableCard <card>5__5;

			private CardModificationInfo <mod>5__6;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnResolveOnBoard>d__4(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<cards>5__1 = null;
				<left>5__2 = null;
				<right>5__3 = null;
				<card>5__5 = null;
				<mod>5__6 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_007a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0084: Expected O, but got Unknown
				//IL_018f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0199: Expected O, but got Unknown
				//IL_0239: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = ((AbilityBehaviour)<>4__this).PreSuccessfulTriggerSequence();
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					((Card)((AbilityBehaviour)<>4__this).Card).Anim.PlayJumpAnimation();
					<>2__current = (object)new WaitForSeconds(0.2f);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					<cards>5__1 = new List<PlayableCard>();
					<left>5__2 = null;
					<right>5__3 = null;
					try
					{
						<left>5__2 = Singleton<BoardManager>.Instance.GetAdjacent(((AbilityBehaviour)<>4__this).Card.Slot, true).Card;
					}
					catch
					{
						Console.WriteLine("Left failed");
					}
					try
					{
						<right>5__3 = Singleton<BoardManager>.Instance.GetAdjacent(((AbilityBehaviour)<>4__this).Card.Slot, false).Card;
					}
					catch
					{
						Console.WriteLine("Right failed");
					}
					if ((Object)(object)<left>5__2 != (Object)null)
					{
						<cards>5__1.Add(<left>5__2);
					}
					if ((Object)(object)<right>5__3 != (Object)null)
					{
						<cards>5__1.Add(<right>5__3);
					}
					<>s__4 = <cards>5__1.GetEnumerator();
					try
					{
						while (<>s__4.MoveNext())
						{
							<card>5__5 = <>s__4.Current;
							<mod>5__6 = new CardModificationInfo((Ability)19);
							<mod>5__6.singletonId = "Liftoff_buff";
							<card>5__5.Status.hiddenAbilities.Add((Ability)19);
							<card>5__5.AddTemporaryMod(<mod>5__6);
							<mod>5__6 = null;
							<card>5__5 = null;
						}
					}
					finally
					{
						((IDisposable)<>s__4).Dispose();
					}
					<>2__current = Singleton<TextBox>.Instance.ShowUntilInput(((Card)((AbilityBehaviour)<>4__this).Card).Info.displayedName + " granted their friends the power of flight!", (Style)((Card)((AbilityBehaviour)<>4__this).Card).Info.temple, (DialogueSpeaker)null, (ScreenPosition)2, 0f, true, false, (Prompt)null, true, (Emotion)0);
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -1;
					<>2__current = ((AbilityBehaviour)<>4__this).LearnAbility(0.2f);
					<>1__state = 4;
					return true;
				case 4:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public static Ability ability;

		public override Ability Ability => ability;

		public override bool RespondsToResolveOnBoard()
		{
			return true;
		}

		[IteratorStateMachine(typeof(<OnResolveOnBoard>d__4))]
		public override IEnumerator OnResolveOnBoard()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnResolveOnBoard>d__4(0)
			{
				<>4__this = this
			};
		}

		public static void AddLiftoff()
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			AbilityInfo val = AbilityManager.New("StressSigils", "Liftoff", "[creature] lifts adjascent allies to the air making them go Airborne.", typeof(AbilLiftoff), "3d_liftoff.png");
			AbilityExtensions.SetPixelAbilityIcon(val, TextureHelper.GetImageAsTexture("pixel_liftoff.png", typeof(CostmaniaPlugin).Assembly, (FilterMode)0), (FilterMode?)null);
			AbilityExtensions.SetPowerlevel(val, 1);
			ability = val.ability;
		}
	}
	public class AbilPigify : CostmaniaActivatedAbility
	{
		[CompilerGenerated]
		private sealed class <Activate>d__8 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public AbilPigify <>4__this;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <Activate>d__8(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0094: Unknown result type (might be due to invalid IL or missing references)
				//IL_0196: Unknown result type (might be due to invalid IL or missing references)
				//IL_0230: Unknown result type (might be due to invalid IL or missing references)
				//IL_023a: Expected O, but got Unknown
				//IL_0286: Unknown result type (might be due to invalid IL or missing references)
				//IL_0290: Expected O, but got Unknown
				//IL_02c1: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = ((AbilityBehaviour)<>4__this).PreSuccessfulTriggerSequence();
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					Singleton<ViewManager>.Instance.Controller.SwitchToControlMode(Singleton<BoardManager>.Instance.ChoosingSlotViewMode, false);
					Singleton<ViewManager>.Instance.Controller.LockState = (ViewLockState)1;
					<>4__this.available = Singleton<BoardManager>.Instance.AllSlots.Where((CardSlot slot) => (Object)(object)slot.Card != (Object)null && !((Card)slot.Card).Info.HasTrait((Trait)12) && !((object)slot).Equals((object?)((AbilityBehaviour)<>4__this).Card.Slot)).ToList();
					<>2__current = Singleton<BoardManager>.Instance.ChooseTarget(Singleton<BoardManager>.Instance.AllSlots, <>4__this.available, (Action<CardSlot>)<>4__this.ChosenTarget, (Action<CardSlot>)<>4__this.ChooseFail, (Action<CardSlot>)<>4__this.CursorEnteredSlot, (Func<bool>)(() => (Object)(object)<>4__this.selected == (Object)(object)((AbilityBehaviour)<>4__this).Card.slot), (CursorType)16);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					<>2__current = Singleton<TextBox>.Instance.ShowUntilInput(((Card)<>4__this.selected.Card).Info.displayedName + " underwent Pigification!", (Style)((Card)((AbilityBehaviour)<>4__this).Card).Info.temple, (DialogueSpeaker)null, (ScreenPosition)2, 0f, true, false, (Prompt)null, true, (Emotion)0);
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -1;
					((Card)((AbilityBehaviour)<>4__this).Card).Anim.PlayAttackAnimation(false, <>4__this.selected);
					if ((Object)(object)<>4__this.selected != (Object)null)
					{
						<>2__current = <>4__this.selected.Card.Die(false, (PlayableCard)null, true);
						<>1__state = 4;
						return true;
					}
					goto IL_02a1;
				case 4:
					<>1__state = -1;
					<>2__current = (object)new WaitForSeconds(0.175f);
					<>1__state = 5;
					return true;
				case 5:
					<>1__state = -1;
					<>2__current = CardSlotExtensions.CreateCardInSlot(<>4__this.selected, CardLoader.GetCardByName("Valor_Pig"), 0.1f, true);
					<>1__state = 6;
					return true;
				case 6:
					<>1__state = -1;
					<>2__current = (object)new WaitForSeconds(0.375f);
					<>1__state = 7;
					return true;
				case 7:
					<>1__state = -1;
					goto IL_02a1;
				case 8:
					{
						<>1__state = -1;
						return false;
					}
					IL_02a1:
					Singleton<ViewManager>.Instance.Controller.LockState = (ViewLockState)0;
					Singleton<ViewManager>.Instance.Controller.SwitchToControlMode(Singleton<BoardManager>.Instance.DefaultViewMode, false);
					<>2__current = ((AbilityBehaviour)<>4__this).LearnAbility(0f);
					<>1__state = 8;
					return true;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public static Ability ability;

		private List<CardSlot> available = new List<CardSlot>();

		private CardSlot selected;

		public override Ability Ability => ability;

		public override int ValorRankCost => 2;

		public override bool CanActivate()
		{
			Debug.Log((object)Singleton<BoardManager>.Instance.AllSlots.Where((CardSlot slot) => (Object)(object)slot.Card != (Object)null && !((Card)slot.Card).Info.HasTrait((Trait)12) && !((object)slot).Equals((object?)((AbilityBehaviour)this).Card.Slot)).ToList().Count);
			return Singleton<BoardManager>.Instance.AllSlots.Any((CardSlot slot) => (Object)(object)slot.Card != (Object)null && !((Card)slot.Card).Info.HasTrait((Trait)12) && !((object)slot).Equals((object?)((AbilityBehaviour)this).Card.Slot)) && base.CanActivate();
		}

		[IteratorStateMachine(typeof(<Activate>d__8))]
		public override IEnumerator Activate()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <Activate>d__8(0)
			{
				<>4__this = this
			};
		}

		private void ChosenTarget(CardSlot slot)
		{
			if (!((object)slot).Equals((object?)((AbilityBehaviour)this).Card.slot))
			{
				selected = slot;
			}
		}

		private void ChooseFail(CardSlot slot)
		{
			AudioController.Instance.PlaySound2D("toneless_negate", (MixerGroup)0, 0.65f, 0f, (Pitch)null, (Repetition)null, (Randomization)null, (Distortion)null, false);
		}

		private void CursorEnteredSlot(CardSlot slot)
		{
			if ((Object)(object)slot.Card != (Object)null)
			{
				((Card)slot.Card).Anim.StrongNegationEffect();
			}
		}

		public static void AddPigify()
		{
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			AbilityInfo val = AbilityManager.New("StressSigils", "Pigify", "Expend 2 Valor Rank from [creature] to turn a chosen sacrificable creature into a Pig. A Pig is defined as: 0, 2, Sprinter", typeof(AbilPigify), "3d_pigify.png");
			AbilityExtensions.SetPixelAbilityIcon(val, TextureHelper.GetImageAsTexture("pixel_pigify.png", typeof(CostmaniaPlugin).Assembly, (FilterMode)0), (FilterMode?)null);
			AbilityExtensions.SetActivated(val, true);
			AbilityExtensions.SetPowerlevel(val, 4);
			ability = val.ability;
		}
	}
	public class AbilProductionLine : AbilityBehaviour
	{
		[CompilerGenerated]
		private sealed class <DoMovement>d__6 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public CardSlot destination;

			public bool isLeft;

			public AbilProductionLine <>4__this;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <DoMovement>d__6(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bf: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					((Card)((AbilityBehaviour)<>4__this).Card).RenderInfo.flippedPortrait = isLeft && ((Card)((AbilityBehaviour)<>4__this).Card).Info.flipPortraitForStrafe;
					((Card)((AbilityBehaviour)<>4__this).Card).RenderCard();
					<>2__current = Singleton<BoardManager>.Instance.AssignCardToSlot(((AbilityBehaviour)<>4__this).Card, destination, 0.1f, (Action)null, true);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<>2__current = (object)new WaitForSeconds(0.25f);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[CompilerGenerated]
		private sealed class <OnTurnEnd>d__5 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public bool playerTurnEnd;

			public AbilProductionLine <>4__this;

			private CardSlot <old>5__1;

			private CardSlot <left>5__2;

			private CardSlot <right>5__3;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <OnTurnEnd>d__5(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<old>5__1 = null;
				<left>5__2 = null;
				<right>5__3 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_017c: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<old>5__1 = ((AbilityBehaviour)<>4__this).Card.Slot;
					<>2__current = ((AbilityBehaviour)<>4__this).PreSuccessfulTriggerSequence();
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<left>5__2 = Singleton<BoardManager>.Instance.GetAdjacent(((AbilityBehaviour)<>4__this).Card.Slot, true);
					<right>5__3 = Singleton<BoardManager>.Instance.GetAdjacent(((AbilityBehaviour)<>4__this).Card.Slot, false);
					if ((Object)(object)<right>5__3.Card == (Object)null)
					{
						<>2__current = <>4__this.DoMovement(<right>5__3, isLeft: false);
						<>1__state = 2;
						return true;
					}
					if ((Object)(object)<left>5__2.Card == (Object)null)
					{
						<>2__current = <>4__this.DoMovement(<left>5__2, isLeft: true);
						<>1__state = 3;
						return true;
					}
					goto IL_0147;
				case 2:
					<>1__state = -1;
					goto IL_0147;
				case 3:
					<>1__state = -1;
					goto IL_0147;
				case 4:
					<>1__state = -1;
					<>2__current = CardSlotExtensions.CreateCardInSlot(<old>5__1, CardLoader.GetCardByName(<>4__this.cards[Random.Range(0, <>4__this.cards.Length)]), 0.1f, true);
					<>1__state = 5;
					return true;
				case 5:
					<>1__state = -1;
					<>2__current = ((AbilityBehaviour)<>4__this).LearnAbility(0.1f);
					<>1__state = 6;
					return true;
				case 6:
					{
						<>1__state = -1;
						return false;
					}
					IL_0147:
					<>2__current = Singleton<TextBox>.Instance.ShowUntilInput(((Card)((AbilityBehaviour)<>4__this).Card).Info.displayedName + "'s pipeline triggers", (Style)((Card)((AbilityBehaviour)<>4__this).Card).Info.temple, (DialogueSpeaker)null, (ScreenPosition)2, 0f, true, false, (Prompt)null, true, (Emotion)0);
					<>1__state = 4;
					return true;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public static Ability ability;

		private string[] cards = new string[10] { "Alchemy_Homonculus", "Alchemy_Homonculus", "Alchemy_Homonculus", "Alchemy_Homonculus", "Alchemy_Homonculus", "Alchemy_Homonculus", "Alchemy_Homonculus", "Alchemy_Homonculus", "Alchemy_Homonculus", "Alchemy_GreaterHomonculus" };

		public override Ability Ability => ability;

		public override bool RespondsToTurnEnd(bool playerTurnEnd)
		{
			return playerTurnEnd && ((Object)(object)Singleton<BoardManager>.Instance.GetAdjacent(((AbilityBehaviour)this).Card.Slot, true).Card == (Object)null || (Object)(object)Singleton<BoardManager>.Instance.GetAdjacent(((AbilityBehaviour)this).Card.Slot, false).Card == (Object)null);
		}

		[IteratorStateMachine(typeof(<OnTurnEnd>d__5))]
		public override IEnumerator OnTurnEnd(bool playerTurnEnd)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <OnTurnEnd>d__5(0)
			{
				<>4__this = this,
				playerTurnEnd = playerTurnEnd
			};
		}

		[IteratorStateMachine(typeof(<DoMovement>d__6))]
		private IEnumerator DoMovement(CardSlot destination, bool isLeft)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <DoMovement>d__6(0)
			{
				<>4__this = this,
				destination = destination,
				isLeft = isLeft
			};
		}

		public static void AddProductionLine()
		{
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			AbilityInfo val = AbilityManager.New("StressSigils", "Production Line", "At the end of the turn, [creature] will move in the direction inscrybed in the sigil, and will drop a Homonculus in it's place.", typeof(AbilProductionLine), "3d_productionline.png");
			AbilityExtensions.SetPixelAbilityIcon(val, TextureHelper.GetImageAsTexture("pixel_productionline.png", typeof(CostmaniaPlugin).Assembly, (FilterMode)0), (FilterMode?)null);
			AbilityExtensions.SetPowerlevel(val, 5);
			ability = val.ability;
		}
	}
	public class AbilRelaxant : AbilityBehaviour
	{
		[CompilerGenerated]
		private sealed class <OnResolveOnBoard>d__4 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public AbilRelaxant <>4__this;

			object IEnumerator<object>.Current
			{
				[Debugg