Decompiled source of WhistleWind Abnormal Sigils v1.1.2

WhistleWind.AbnormalSigils.dll

Decompiled 7 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using DiskCardGame;
using GBC;
using HarmonyLib;
using Infiniscryption.Spells.Patchers;
using InscryptionAPI.Ascension;
using InscryptionAPI.Card;
using InscryptionAPI.Dialogue;
using InscryptionAPI.Guid;
using InscryptionAPI.Helpers;
using InscryptionAPI.Helpers.Extensions;
using InscryptionAPI.Items;
using InscryptionAPI.Items.Extensions;
using InscryptionAPI.PixelCard;
using InscryptionAPI.Resource;
using InscryptionAPI.TalkingCards.Create;
using InscryptionAPI.Triggers;
using InscryptionCommunityPatch.Card;
using Microsoft.CodeAnalysis;
using Pixelplacement;
using Sirenix.Utilities;
using TribalLibary;
using UnityEngine;
using WhistleWind.AbnormalSigils.Core;
using WhistleWind.AbnormalSigils.Core.Helpers;
using WhistleWind.AbnormalSigils.StatusEffects;
using WhistleWind.Core.AbilityClasses;
using WhistleWind.Core.Helpers;

[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("WhistleWind.AbnormalSigils")]
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: AssemblyInformationalVersion("1.1.1")]
[assembly: AssemblyProduct("WhistleWind.AbnormalSigils")]
[assembly: AssemblyTitle("WhistleWind.AbnormalSigils")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("A mod for Inscryption adding sigils based on the abnormalities from Lobotomy Corporation and Library of Ruina.")]
[assembly: AssemblyFileVersion("1.1.1.0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.1.1.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	[Microsoft.CodeAnalysis.Embedded]
	[CompilerGenerated]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace WhistleWind.AbnormalSigils
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("whistlewind.inscryption.abnormalsigils", "Abnormal Sigils", "1.1.1")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class AbnormalPlugin : BaseUnityPlugin
	{
		public static class SpellAPI
		{
			public static bool Enabled => Chainloader.PluginInfos.ContainsKey("zorro.inscryption.infiniscryption.spells");
		}

		public static class TribalAPI
		{
			public static bool Enabled => Chainloader.PluginInfos.ContainsKey("tribes.libary");

			public static void UseTribalTribes()
			{
				//IL_000f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0014: Unknown result type (might be due to invalid IL or missing references)
				//IL_0019: Unknown result type (might be due to invalid IL or missing references)
				//IL_001e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0023: Unknown result type (might be due to invalid IL or missing references)
				//IL_0028: Unknown result type (might be due to invalid IL or missing references)
				//IL_002d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0032: Unknown result type (might be due to invalid IL or missing references)
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				//IL_003c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0079: Unknown result type (might be due to invalid IL or missing references)
				//IL_007e: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
				//IL_0105: Unknown result type (might be due to invalid IL or missing references)
				//IL_010a: Unknown result type (might be due to invalid IL or missing references)
				//IL_014b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0150: Unknown result type (might be due to invalid IL or missing references)
				//IL_018e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0193: Unknown result type (might be due to invalid IL or missing references)
				Log.LogDebug((object)"Tribal Libary detected. Using its tribes instead.");
				TribeDivine = Plugin.guardianTribe;
				TribeFae = Plugin.fairyTribe;
				TribeAnthropoid = Plugin.humanoidTribe;
				TribeMechanical = Plugin.machineTribe;
				TribeBotanic = Plugin.plantTribe;
				int num = 0;
				foreach (TribeInfo newTribe in TribeManager.NewTribes)
				{
					if (num >= 5)
					{
						break;
					}
					if (newTribe.guid == "tribes.libary")
					{
						if (newTribe.tribe == TribeDivine)
						{
							newTribe.icon = TextureHelper.ConvertTexture(TextureLoader.LoadTextureFromFile("tribeDivine.png"), (Vector2?)null);
							newTribe.cardback = TextureLoader.LoadTextureFromFile("tribeDivine_reward.png");
							num++;
						}
						else if (newTribe.tribe == TribeFae)
						{
							newTribe.icon = TextureHelper.ConvertTexture(TextureLoader.LoadTextureFromFile("tribeFae.png"), (Vector2?)null);
							newTribe.cardback = TextureLoader.LoadTextureFromFile("tribeFae_reward.png");
							num++;
						}
						else if (newTribe.tribe == TribeAnthropoid)
						{
							newTribe.icon = TextureHelper.ConvertTexture(TextureLoader.LoadTextureFromFile("tribeAnthropoid.png"), (Vector2?)null);
							newTribe.cardback = TextureLoader.LoadTextureFromFile("tribeAnthropoid_reward.png");
							num++;
						}
						else if (newTribe.tribe == TribeMechanical)
						{
							newTribe.icon = TextureHelper.ConvertTexture(TextureLoader.LoadTextureFromFile("tribeMechanical.png"), (Vector2?)null);
							newTribe.cardback = TextureLoader.LoadTextureFromFile("tribeMechanical_reward.png");
							num++;
						}
						else if (newTribe.tribe == TribeBotanic)
						{
							newTribe.icon = TextureHelper.ConvertTexture(TextureLoader.LoadTextureFromFile("tribeBotanic.png"), (Vector2?)null);
							newTribe.cardback = TextureLoader.LoadTextureFromFile("tribeBotanic_reward.png");
							num++;
						}
					}
				}
			}
		}

		public const string pluginGuid = "whistlewind.inscryption.abnormalsigils";

		public const string pluginPrefix = "wstl";

		public const string pluginName = "Abnormal Sigils";

		private const string pluginVersion = "1.1.1";

		internal static ManualLogSource Log;

		private static readonly Harmony HarmonyInstance = new Harmony("whistlewind.inscryption.abnormalsigils");

		public static Tribe TribeDivine;

		public static Tribe TribeFae;

		public static Tribe TribeBotanic;

		public static Tribe TribeAnthropoid;

		public static Tribe TribeMechanical;

		public static Trait Boneless = GuidManager.GetEnumValue<Trait>("whistlewind.inscryption.abnormalsigils", "Boneless");

		public static Trait SwanBrother = GuidManager.GetEnumValue<Trait>("whistlewind.inscryption.abnormalsigils", "SwanBrother");

		public static Trait NakedSerpent = GuidManager.GetEnumValue<Trait>("whistlewind.inscryption.abnormalsigils", "NakedSerpent");

		public static Trait SporeFriend = GuidManager.GetEnumValue<Trait>("whistlewind.inscryption.abnormalsigils", "SporeFriend");

		public static Trait LovingSlime = GuidManager.GetEnumValue<Trait>("whistlewind.inscryption.abnormalsigils", "LovingSlime");

		public static Trait ImmuneToInstaDeath = GuidManager.GetEnumValue<Trait>("whistlewind.inscryption.abnormalsigils", "ImmuneToInstaDeath");

		public static Trait Orchestral = GuidManager.GetEnumValue<Trait>("whistlewind.inscryption.abnormalsigils", "Orchestral");

		public static Trait ImmuneToAilments = GuidManager.GetEnumValue<Trait>("whistlewind.inscryption.abnormalsigils", "ImmuneToAilments");

		public static CardMetaCategory CannotGiveSigils = GuidManager.GetEnumValue<CardMetaCategory>("whistlewind.inscryption.abnormalsigils", "CannotGiveSigils");

		public static CardMetaCategory CannotGainSigils = GuidManager.GetEnumValue<CardMetaCategory>("whistlewind.inscryption.abnormalsigils", "CannotGainSigils");

		public static CardMetaCategory CannotBoostStats = GuidManager.GetEnumValue<CardMetaCategory>("whistlewind.inscryption.abnormalsigils", "CannotBoostStats");

		public static CardMetaCategory CannotCopyCard = GuidManager.GetEnumValue<CardMetaCategory>("whistlewind.inscryption.abnormalsigils", "CannotCopyCard");

		private void Ability_Aggravating()
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			Aggravating.ability = AbnormalAbilityHelper.CreateAbility<Aggravating>("sigilAggravating", "Aggravating", "While this card is on the board, all opposing creatures gain 1 Power.", "My beasts are incensed by your creature's presence.", null, -3, modular: false, special: false, opponent: true, canStack: true).Id;
		}

		private void Ability_Alchemist()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			Alchemist.ability = AbnormalAbilityHelper.CreateActivatedAbility<Alchemist>("sigilAlchemist", "Alchemist", "Pay 2 Energy to discard your current hand and draw cards equal to the amount you discarded.", "The unending faith of countless promises.", "[creature] replaces your hand with a new one!", 3).Id;
		}

		private void Ability_Assimilator()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Assimilator.ability = AbnormalAbilityHelper.CreateAbility<Assimilator>("sigilAssimilator", "Assimilator", "When this card kills an opposing card, it gains 1 Power and 1 Health.", "From the many, one.", "[creature] makes its victim a part of itself.", 5, modular: false, special: false, opponent: true, canStack: true).Id;
		}

		private void Ability_Barreler()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Barreler.ability = AbnormalAbilityHelper.CreateAbility<Barreler>("sigilBarreler", "Barreler", "At the end of the owner's turn, this card moves in the sigil's direction to the end of the board, moving any cards in the way.", "Make room.", "[creature] moves to the end of the board, tossing anything in its way.", 1, modular: true, special: false, opponent: true, canStack: false, unobtainable: false, flipY: false, (string)null).Id;
		}

		private void Ability_BindingStrike()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			BindingStrike.ability = AbnormalAbilityHelper.CreateAbility<BindingStrike>("sigilBindingStrike", "Binding Strike", "When [creature] strikes an opposing creature, inflict Bind equal to twice this card's Power.", "Your beast falls behind the pack.", null, 2, modular: false, special: false, opponent: true).Id;
		}

		private void Ability_BitterEnemies()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			BitterEnemies.ability = AbnormalAbilityHelper.CreateAbility<BitterEnemies>("sigilBitterEnemies", "Bitter Enemies", "This card gains 1 Power for each other card on the board that also bears this sigil.", "A bitter grudge laid bare.", null, 2, modular: true, special: false, opponent: true).Id;
		}

		private void Ability_Bloodfiend()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Bloodfiend.ability = AbnormalAbilityHelper.CreateAbility<Bloodfiend>("sigilBloodfiend", "Bloodfiend", "When this card deals damage, it gains 1 Health.", "Accursed fiend.", "[creature] sucks out fresh life!", 3, modular: true, special: false, opponent: true, canStack: true).Id;
		}

		private void Ability_Bloodletter()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Bloodletter.ability = AbnormalAbilityHelper.CreateAbility<Bloodletter>("sigilBloodletter", "Bloodletter", "When a [creature] is struck with a nonfatal attack, absorb 1 Health from the striker.", "The blood runs warm with sweet vitality.", "[creature] absorbs nutrients!", 4, modular: false, special: false, opponent: true, canStack: true).Id;
		}

		private void Ability_BroodMother()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			BroodMother.ability = AbnormalAbilityHelper.CreateAbility<BroodMother>("sigilBroodMother", "Broodmother", "When [creature] is struck, create a Spiderling in your hand. [define:wstl_spiderling]", "A small spider takes refuge in your hand.", "[creature] drops a spiderling!", 3, modular: true, special: false, opponent: false, canStack: false, unobtainable: false, flipY: false, (string)null).Id;
		}

		private void Ability_Conductor()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Conductor.ability = AbnormalAbilityHelper.CreateAbility<Conductor>("sigilConductor", "Conductor", "The effect of this sigil will change over the next 3 turns while this card is on the board.", "From break and ruin, the most beautiful performance begins.", "[creature] plays a quiet symphony.", 3, modular: false, special: false, opponent: true).Id;
		}

		private void Ability_Copycat()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Copycat.ability = AbnormalAbilityHelper.CreateAbility<Copycat>("sigilCopycat", "Copycat", "[creature] will transform into a copy of the first creature that opposes it.", "A near perfect impersonation.", "[creature] tries to mimick the opposing creature.", 2, modular: false, special: false, opponent: true).Id;
		}

		private void Ability_Corrector()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Corrector.ability = AbnormalAbilityHelper.CreateAbility<Corrector>("sigilCorrector", "Corrector", "When [creature] is drawn, randomly change its stats according to its total play cost.", "How balanced.", "[creature] stats are forcefully 'corrected'.", 2, modular: true, special: false, opponent: true).Id;
		}

		private void Ability_Courageous()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			Courageous.ability = AbnormalAbilityHelper.CreateAbility<Courageous>("sigilCourageous", "Courageous", "Creatures adjacent to this card lose up to 2 Health. For each point of Heath lost, the affected creature gains 1 Power. This effect cannot kill cards.", "Life is only given to those who don't fear death.", null, 3, modular: false, special: false, opponent: true).Id;
		}

		private void Ability_Cursed()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Cursed.ability = AbnormalAbilityHelper.CreateAbility<Cursed>("sigilCursed", "Cursed", "When [creature] dies, the killer transforms into a copy of this card.", "The curse continues unabated.", "[creature] passes the curse on.", 0, modular: true).Id;
		}

		private void Ability_Cycler()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Cycler.ability = AbnormalAbilityHelper.CreateAbility<Cycler>("sigilCycler", "Cycler", "At the end of the owner's turn, this card moves in the sigil's direction, looping around the owner's side of the board.", "A never-ending cycle.", "[creature] moves to a new space, going around its side of the board.", 1, modular: true, special: false, opponent: true, canStack: false, unobtainable: false, flipY: false, (string)null).Id;
		}

		private void Ability_FalseThrone()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			FalseThrone.ability = AbnormalAbilityHelper.CreateActivatedAbility<FalseThrone>("sigilFalseThrone", "False Throne", "Once per turn, pay 1 Health to give Neutered to a chosen creature, then create a free, unaltered copy of it in your hand.", "A simple little magic trick.", "[creature] gives a false present to the chosen creature.", 5, special: true).Id;
		}

		private void Ability_FlagBearer()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			FlagBearer.ability = AbnormalAbilityHelper.CreateAbility<FlagBearer>("sigilFlagBearer", "Flag Bearer", "While this card is on the board, adjacent creatures gain 2 Health.", "Morale runs high.", null, 3, modular: false, special: false, opponent: false, canStack: true).Id;
		}

		private void Ability_FrostRuler()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			FrostRuler.ability = AbnormalAbilityHelper.CreateActivatedAbility<FrostRuler>("sigilFrostRuler", "Ruler of Frost", "Once per turn, pay 2 Bones to choose a space on the board. If the space is empty, create a Block of Ice. Otherwise, if this card can kill the occupying card, transform it into a Frozen Heart.", "With a wave of her hand, the Snow Queen blocked the path.", "[creature] freezes the path.", 4).Id;
		}

		private void Ability_FrozenHeart()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			FrozenHeart.ability = AbnormalAbilityHelper.CreateAbility<FrozenHeart>("sigilFrozenHeart", "Frozen Heart", "When [creature] dies, the killer gains 2 Health.", "Spring arrives with blossoming roses.", "[creature] releases warm life.", -1).Id;
		}

		private void Ability_Gardener()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Gardener.ability = AbnormalAbilityHelper.CreateAbility<Gardener>("sigilGardener", "Gardener", "When an allied card is killed, create a Sapling in their place. [define:wstl_parasiteTreeSapling]", "They proliferate and become whole. Can you feel it?", "A sapling grows out of the dead card's corpse.", 4).Id;
		}

		private void Ability_GiftGiver()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			GiftGiver.ability = AbnormalAbilityHelper.CreateAbility<GiftGiver>("sigilGiftGiver", "Gift Giver", "When [creature] is played, create a random card in your hand.", "A gift for you.", "[creature] has a gift for you!", 3, modular: false, special: false, opponent: true, canStack: false, unobtainable: false, flipY: false, (string)null).Id;
		}

		private void Ability_GreedyHealing()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			GreedyHealing.ability = AbnormalAbilityHelper.CreateAbility<GreedyHealing>("sigilGreedyHealing", "Greedy Healing", "At the end of its owner's turn, this card gains 2 Health. If 2 turns pass without this card taking damage, it will die.", "Your beast has Health in excess.", "[creature] gives itself more Health!", 3, modular: true, special: false, opponent: true).Id;
		}

		private void Ability_Grinder()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			Grinder.ability = AbnormalAbilityHelper.CreateAbility<Grinder>("sigilGrinder", "Grinder", "This card gains the stats of the creatures sacrificed to play it.", "Now everything will be just fine.", null, 3).Id;
		}

		private void Ability_GroupHealer()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			GroupHealer.ability = AbnormalAbilityHelper.CreateAbility<GroupHealer>("sigilGroupHealer", "Group Healer", "At the start of its owner's turn, this card will heal all allies that have taken damage by 1 Health.", "You only delay the inevitable.", "[creature] heals all its friends.", 4, modular: false, special: false, opponent: false, canStack: true).Id;
		}

		private void Ability_Healer()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Healer.ability = AbnormalAbilityHelper.CreateAbility<Healer>("sigilHealer", "Healer", "At the end of your turn, you may choose one of your other cards to heal by 2 Health.", "Never underestimate the importance of a healer.", "[creature] heals the chosen creature!", 2).Id;
		}

		private void Ability_HighStrung()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			HighStrung.ability = AbnormalAbilityHelper.CreateAbility<HighStrung>("sigilHighStrung", "High-Strung", "At the end of the current turn, this card gains Haste equal to twice the opposing card's Power.", null, null, 2, modular: true, special: false, opponent: true).Id;
		}

		private void Ability_Idol()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			Idol.ability = AbnormalAbilityHelper.CreateAbility<Idol>("sigilIdol", "Idol", "While this card is on the board, all opposing creatures lose 1 Power.", "My beasts defer to you.", null, 5, modular: false, special: false, opponent: false, canStack: true).Id;
		}

		private void Ability_LeftStrike()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			LeftStrike.ability = AbnormalAbilityHelper.CreateAbility<LeftStrike>("sigilLeftStrike", "Left-Veering Strike", "[creature] will strike the opposing space to the left of the space across from it.").Id;
		}

		private void Ability_Lonely()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			Lonely.ability = AbnormalAbilityHelper.CreateAbility<Lonely>("sigilLonely", "Lonely", "Choose a card on the board to gain 1 Pebble unless a card with Pebble already exists, then return this card to your hand. If a card with Pebble dies, all ally cards receive 1 additional damage until a new card is chosen.", "A friend to stay.", null, 3).Id;
		}

		private void Ability_Martyr()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Martyr.ability = AbnormalAbilityHelper.CreateAbility<Martyr>("sigilMartyr", "Martyr", "When [creature] dies, all allied creatures gain 2 Health and lose any negative status effects.", "A selfless death to cleanse your beasts of evil.", "[creature]'s death cleanses your other creatures!", 1, modular: true, special: false, opponent: false, canStack: true).Id;
		}

		private void Ability_Nettles()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Nettles.ability = AbnormalAbilityHelper.CreateAbility<Nettles>("sigilNettles", "Nettle Clothes", "When this card is played, fill all empty spaces on the owner's side of the board with random Brothers. This card gains the first sigil of each allied Brother.", "These clothes will surely restore our happy days.", "[creature] brings out its family!", 5).Id;
		}

		private void Ability_Neutered()
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			Neutered.ability = AbnormalAbilityHelper.CreateAbility<Neutered>("sigilNeutered", "Neutered", "[creature] has its Power reduced to 0. At the start of the owner's turn, remove this sigil.", null, null, -2).Id;
		}

		private void Ability_NeuteredLatch()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			NeuteredLatch.ability = AbnormalAbilityHelper.CreateActivatedAbility<NeuteredLatch>("sigilNeuteredLatch", "Neutered Latch", "Once per turn, pay [sigilcost:2 Bones] to choose a creature to gain the Neutered sigil, then increase this sigil's activation cost by 1 Bone.", "The will to fight has been lost.", "[creature] prevents the chosen creature from attacking.", 4).Id;
		}

		private void Ability_NimbleFoot()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			string text = "At the start of the owner's turn, this <color=#00a602>card</color> <color=#008b02>gains</color> <color=\"green\">2</color> Haste.";
			text = "At the start of the owner's turn, this card gains 2 Haste.";
			NimbleFoot.ability = AbnormalAbilityHelper.CreateAbility<NimbleFoot>("sigilNimbleFoot", "Nimble-Footed", text, null, null, 1, modular: true, special: false, opponent: true, canStack: true).Id;
		}

		private void Ability_OneSided()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			OneSided.ability = AbnormalAbilityHelper.CreateAbility<OneSided>("sigilOneSided", "Opportunistic", "[creature] deals 1 additional damage to opposing cards that cannot attack this card during their own turn.", "A cheap hit.", null, 2, modular: true, special: false, opponent: true, canStack: true, unobtainable: false, flipY: true).Id;
		}

		private void Ability_Persecutor()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Persecutor.ability = AbnormalAbilityHelper.CreateAbility<Persecutor>("sigilPersecutor", "Persecutor", "When a card bearing this sigil is played, create a Nail in the adjacent left space and a Hammer in the adjacent right space if they are empty.", "Are you guilty of having a closed heart?", "[creature] reveals its hidden tools!", 4).Id;
		}

		private void Ability_Persistent()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Persistent.ability = AbnormalAbilityHelper.CreateAbility<Persistent>("sigilPersistent", "Persistent", "Attacks by this card cannot be avoided or redirected by sigils like Loose Tail or Waterborne.", "Prey cannot hide so easily.", "[creature] chases its prey down.", 2, modular: true, special: false, opponent: true).Id;
		}

		private void Ability_Piercing()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			Piercing.ability = AbnormalAbilityHelper.CreateAbility<Piercing>("sigilPiercing", "Piercing", "Damage dealt by this card cannot be negated or reduced by sigils such as Armoured or Thick Skin.", "Your beast runs mine through.", null, 2, modular: true, special: false, opponent: true).Id;
		}

		private void Ability_Protector()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Protector.ability = AbnormalAbilityHelper.CreateAbility<Protector>("sigilProtector", "Protector", "Creatures adjacent to this card take 1 less damage when struck.", "Your beast shields its ally against the blow.", "[creature] shields its friend!", 3, modular: false, special: false, opponent: true, canStack: true).Id;
		}

		private void Ability_Punisher()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Punisher.ability = AbnormalAbilityHelper.CreateAbility<Punisher>("sigilPunisher", "Punisher", "When [creature] is struck, the striker is killed.", "Retaliation is switft and brutal.", "[creature] swiftly retaliates!", 4, modular: false, special: false, opponent: true).Id;
		}

		private void Ability_QueenNest()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			QueenNest.ability = AbnormalAbilityHelper.CreateAbility<QueenNest>("sigilQueenNest", "Queen Nest", "Whenever another card is killed, create a Worker Bee in your hand. [define:wstl_queenBeeWorker]", "For the hive.", "Another worker is born to serve [creature].", 4, modular: false, special: false, opponent: true, canStack: false, unobtainable: false, flipY: false, (string)null).Id;
		}

		private void Ability_Reflector()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Reflector.ability = AbnormalAbilityHelper.CreateAbility<Reflector>("sigilReflector", "Reflector", "When this card is struck, the striker is dealt damage equal to the striker's Power.", "What goes around comes around.", "[creature] returns the damage.", 2, modular: true, special: false, opponent: true).Id;
		}

		private void Ability_RefreshDecks()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			RefreshDecks.ability = AbnormalAbilityHelper.CreateAbility<RefreshDecks>("sigilRefreshDecks", "Refresh Decks", "Refreshes and reshuffles both draw piles.").Id;
		}

		private void Ability_Regenerator()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Regenerator.ability = AbnormalAbilityHelper.CreateAbility<Regenerator>("sigilRegenerator", "Regenerator", "At the start of its owner's turn, this card heals adjacent cards by 1 Health.", "Wounds heal, but the scars remain.", "[creature] heals adjacent creatures.", 3, modular: true, special: false, opponent: false, canStack: true).Id;
		}

		private void Ability_ReturnCard()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			ReturnCard.ability = AbnormalAbilityHelper.CreateAbility<ReturnCard>("sigilReturnCard", "Return Card to Hand", "Returns the selected card to your hand with all changes and statuses retained. Change the selected card's cost to 0-2 Bones based on how recently it was played.").Id;
		}

		private void Ability_ReturnToNihil()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			ReturnToNihil.ability = AbnormalAbilityHelper.CreateAbility<ReturnToNihil>("sigilReturnToNihil", "Return to Nihil", "At the end of the owner's turn, deal damage equal to this card's Power to all other cards on the board.", "One step closer to oblivion.", "The void calls.", 5, modular: false, special: true).Id;
		}

		private void Ability_RightfulHeir()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			RightfulHeir.ability = AbnormalAbilityHelper.CreateActivatedAbility<RightfulHeir>("sigilRightfulHeir", "Rightful Heir", "Once per turn, pay [sigilcost:1 Bone] to transform a chosen creature into a Pumpkin, then increase this sigil's activation cost by 1. [define:wstl_ozmaPumpkin]", "All she has left now are her children.", "[creature] turns the creature into a pumpkin.", 3).Id;
		}

		private void Ability_RightStrike()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			RightStrike.ability = AbnormalAbilityHelper.CreateAbility<RightStrike>("sigilRightStrike", "Right-Veering Strike", "[creature] will strike the opposing space to the right of the space across from it.").Id;
		}

		private void Ability_Roots()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Roots.ability = AbnormalAbilityHelper.CreateAbility<Roots>("sigilRoots", "Roots", "When this card is played, create Thorny Vines on adjacent empty spaces. [define:wstl_snowWhitesVine]", "Resentment bursts forth like a weed.", "Sharp thorns shoot out around [creature]!", 3, modular: true, special: false, opponent: true, canStack: false, unobtainable: false, flipY: false, (string)null).Id;
		}

		private void Ability_Scorching()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Scorching.ability = AbnormalAbilityHelper.CreateAbility<Scorching>("sigilScorching", "Scorching", "The creature opposing this card takes 1 damage at the end of its owner's turn.", "A slow and painful death.", "The creature opposing [creature] is burned!", 2, modular: true, special: false, opponent: true, canStack: true).Id;
		}

		private void Ability_Scrambler()
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			string text = "When [creature] is sacrificed, give its stats to the sacrificing card then randomise the resulting stats.";
			if (SpellAPI.Enabled)
			{
				text += " Works for Spells.";
			}
			Scrambler.ability = AbnormalAbilityHelper.CreateAbility<Scrambler>("sigilScrambler", "Scrambler", text, "Do you love your city?", null, 3).Id;
		}

		private void Ability_SerpentsNest()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			SerpentsNest.ability = AbnormalAbilityHelper.CreateAbility<SerpentsNest>("sigilSerpentsNest", "Serpent's Nest", "When [creature] is struck, the striker gains 1 Worms.", "It can enter your body through any aperture.", null, 2, modular: false, special: false, opponent: true, canStack: true).Id;
		}

		private void Ability_Slime()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Slime.ability = AbnormalAbilityHelper.CreateAbility<Slime>("sigilSlime", "Made of Slime", "At the end of the owner's turn, give adjacent cards this sigil, and deal 1 damage to this card if it is not a Slime. This card transforms into a Slime on death.", "Its army grows everyday.", "[creature] melts into slime!", 4).Id;
		}

		private void Ability_Sporogenic()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Sporogenic.ability = AbnormalAbilityHelper.CreateAbility<Sporogenic>("sigilSporogenic", "Sporogenic", "Creatures adjacent to this card gain 1 Spores at the end of its owner's turn. This sigil activates before other sigils.", "They will love this curse like a blessing.", "[creature] scatters spores on the adjacent cards!", 2, modular: false, special: false, opponent: true, canStack: true).Id;
		}

		private void Ability_TeamLeader()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			TeamLeader.ability = AbnormalAbilityHelper.CreateAbility<TeamLeader>("sigilTeamLeader", "Team Leader", "While this card is on the board, all allied creatures gain 1 Power.", "Your beast emboldens its allies.", null, 5, modular: false, special: false, opponent: true, canStack: true).Id;
		}

		private void Ability_TheTrain()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			TheTrain.ability = AbnormalAbilityHelper.CreateAbility<TheTrain>("sigilTheTrain", "The Train", "When [creature] is played, kill all creatures on the board. Creatures killed this way do not drop bones.", "The train boards those that don't step away from the tracks.", "The train blows its mighty horn.", 5, modular: false, special: true).Id;
		}

		private void Ability_ThickSkin()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			ThickSkin.ability = AbnormalAbilityHelper.CreateAbility<ThickSkin>("sigilThickSkin", "Thick Skin", "Whenever [creature] takes damage, reduce that damage by 1.", "Your creature's hide absorbs the blow.", "[creature] absorbs the blow.", 2, modular: true, special: false, opponent: false, canStack: true).Id;
		}

		private void Ability_Volatile()
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			Volatile.ability = AbnormalAbilityHelper.CreateAbility<Volatile>("sigilVolatile", "Volatile", "When this card dies, adjacent and opposing cards are dealt 10 damage.", "An explosive finish.", "[creature] detonates! Adjacent creatures are killed in the blast.", 0, modular: false, special: false, opponent: true, canStack: false, unobtainable: false, flipY: false, "sigilVolatile_flipped").Id;
		}

		private void Ability_Witness()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			Witness.ability = AbnormalAbilityHelper.CreateActivatedAbility<Witness>("sigilWitness", "Witness", "Pay 2 Bones to increase the selected creature's Health by 2 and their taken damage by 1. This effect stacks up to 3 times.", "The truth will set you free.", "The chosen beholds [creature] and is reborn.", 2).Id;
		}

		private void Ability_Woodcutter()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			Woodcutter.ability = AbnormalAbilityHelper.CreateAbility<Woodcutter>("sigilWoodcutter", "Woodcutter", "When a creature moves into the space opposite this card, they take damage equal to this card's Power.", "No matter how many trees fall, the forest remains dense.", "[creature] takes a free swing.", 4, modular: false, special: false, opponent: true).Id;
		}

		private void Ability_YellowBrickRoad()
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			YellowBrickRoad.ability = AbnormalAbilityHelper.CreateAbility<YellowBrickRoad>("sigilYellowBrickRoad", "Follow the Leader", "At the end of its owner's turn, this card moves in the sigil's direction, looping around the owner's side of the board. Allied creatures towards this card in the sigil's direction as far as possible.", "Let's go, together.", "[creature] leads your creatures forward.", 2, modular: false, special: true, opponent: false, canStack: false, unobtainable: false, flipY: false, (string)null).Id;
		}

		private void StatIcon_Nihil()
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			Nihil.icon = AbilityHelper.CreateStatIcon<Nihil>("whistlewind.inscryption.abnormalsigils", "sigilNihil", "Nihil", "The value represented by this sigil will be equal to the number of empty spaces on the board.", attack: true, health: false).Id;
		}

		private void StatIcon_SigilPower()
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			SigilPower.icon = AbilityHelper.CreateStatIcon<SigilPower>("whistlewind.inscryption.abnormalsigils", "sigilSigilPower", "Sigil Power", "The value represented with this sigil will be equal to the power level of this card's strongest sigil.", attack: true, health: true).Id;
		}

		private void StatIcon_Slime()
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			SlimeIcon.icon = AbilityHelper.CreateStatIcon<SlimeIcon>("whistlewind.inscryption.abnormalsigils", "sigilSlimeIcon", "Loving Slimes", "The value represented by this sigil will be equal to the number of Slimes that the owner has on their side of the table.", attack: true, health: false).Id;
		}

		private void StatIcon_Time()
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			Time.icon = AbilityHelper.CreateStatIcon<Time>("whistlewind.inscryption.abnormalsigils", "sigilTime", "Passing Time", "The value represented with this sigil will be equal to the number of turns that have passed since this card was placed on the board.", attack: true, health: false).Id;
		}

		private void Ability_SeeMore()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			SeeMore.ability = AbnormalAbilityHelper.CreateAbility<SeeMore>("sigilSeeMore", "Status Effect Overflow", "If a card has more than 5 status effects, display the overflow here.", null, null, 0, modular: false, special: false, opponent: false, canStack: false, unobtainable: true).Id;
		}

		private void StatusEffect_Bind()
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			StatusEffectManager.FullStatusEffect obj2 = StatusEffectManager.NewStatusEffect<Bind>("whistlewind.inscryption.abnormalsigils", "Bind", "This card attacks after ally cards with less Bind. At 4 Bind, attack after opposing cards as well. Remove all Bind from this card when it attacks or on next upkeep.", "sigilBind", null, "sigilBind_pixel", -1, iconColour: GameColors.Instance.orange, categories: new List<StatusEffectManager.StatusMetaCategory> { StatusEffectManager.StatusMetaCategory.Part1StatusEffect });
			Bind.specialAbility = obj2.BehaviourId;
			Bind.iconId = obj2.IconId;
		}

		private void StatusEffect_Haste()
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			StatusEffectManager.FullStatusEffect obj2 = StatusEffectManager.NewStatusEffect<Haste>("whistlewind.inscryption.abnormalsigils", "Haste", "This card attacks before ally cards with less Haste. At 4 Haste, attack before opposing cards as well. Remove all Haste from this card when it attacks or on next upkeep.", "sigilHaste", null, "sigilHaste_pixel", 1, iconColour: GameColors.Instance.orange, categories: new List<StatusEffectManager.StatusMetaCategory> { StatusEffectManager.StatusMetaCategory.Part1StatusEffect });
			Haste.specialAbility = obj2.BehaviourId;
			Haste.iconId = obj2.IconId;
		}

		private void StatusEffect_Pebble()
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			StatusEffectManager.FullStatusEffect obj2 = StatusEffectManager.NewStatusEffect<Pebble>("whistlewind.inscryption.abnormalsigils", "Pebble", "This card regains 1 Health at the end of the owner's turn. When this card is struck, reduce the received damage by 1.", "sigilPebble", null, "sigilPebble_pixel", 2, iconColour: GameColors.Instance.nearWhite, categories: new List<StatusEffectManager.StatusMetaCategory> { StatusEffectManager.StatusMetaCategory.Part1StatusEffect });
			Pebble.specialAbility = obj2.BehaviourId;
			Pebble.iconId = obj2.IconId;
		}

		private void StatusEffect_Prudence()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			Prudence.specialAbility = StatusEffectManager.NewStatusEffect<Prudence>("whistlewind.inscryption.abnormalsigils", "Flagellated", "When this card is struck, take damage equal to this status effect.", "sigilPrudence.png", null, "sigilPrudence_pixel.png", -3, iconColour: GameColors.Instance.lightPurple, categories: new List<StatusEffectManager.StatusMetaCategory> { StatusEffectManager.StatusMetaCategory.Part1StatusEffect }).BehaviourId;
		}

		private void StatusEffect_Spores()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			Spores.specialAbility = StatusEffectManager.NewStatusEffect<Spores>("whistlewind.inscryption.abnormalsigils", "Spores", "At the start of its owner's turn, this card takes damage equal to its Spores. Upon dying, create a Spore Mold Creature with stats equal to its Spores.", "sigilSpores", null, "sigilSpores_pixel", -2, iconColour: GameColors.Instance.darkBlue, categories: new List<StatusEffectManager.StatusMetaCategory> { StatusEffectManager.StatusMetaCategory.Part1StatusEffect }).BehaviourId;
		}

		private void StatusEffect_Worms()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			Worms.specialAbility = StatusEffectManager.NewStatusEffect<Worms>("whistlewind.inscryption.abnormalsigils", "Worms", "At the start of the owner's turn, this card gains 1 Worms. At 5+ Worms, attack allied creatures instead with a chance to give 1 Worms to struck cards.", "sigilWorms", null, "sigilWorms_pixel", -3, iconColour: GameColors.Instance.brown, categories: new List<StatusEffectManager.StatusMetaCategory> { StatusEffectManager.StatusMetaCategory.Part1StatusEffect }).BehaviourId;
		}

		private void OnDisable()
		{
			HarmonyInstance.UnpatchSelf();
		}

		private void Awake()
		{
			Log = ((BaseUnityPlugin)this).Logger;
			AbnormalConfigManager.Instance.BindConfig();
			if (!AbnormalConfigManager.Instance.EnableMod)
			{
				((BaseUnityPlugin)this).Logger.LogWarning((object)"Abnormal Sigils is disabled in the configuration. This will likely break things.");
				return;
			}
			HarmonyInstance.PatchAll(Assembly.GetExecutingAssembly());
			AddResources();
			AbnormalDialogueManager.GenerateDialogueEvents();
			InitTribes();
			AddAbilities();
			AddSpecialAbilities();
			AddAppearances();
			AddCards();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Abnormal Sigils loaded!");
		}

		private void InitTribes()
		{
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			Log.LogDebug((object)"Loading tribes...");
			if (TribalAPI.Enabled)
			{
				TribalAPI.UseTribalTribes();
				return;
			}
			Texture2D val = TextureLoader.LoadTextureFromFile("tribeAnthropoid.png");
			Texture2D val2 = TextureLoader.LoadTextureFromFile("tribeAnthropoid_reward.png");
			Texture2D val3 = TextureLoader.LoadTextureFromFile("tribeBotanic.png");
			Texture2D val4 = TextureLoader.LoadTextureFromFile("tribeBotanic_reward.png");
			Texture2D val5 = TextureLoader.LoadTextureFromFile("tribeDivine.png");
			Texture2D val6 = TextureLoader.LoadTextureFromFile("tribeDivine_reward.png");
			Texture2D val7 = TextureLoader.LoadTextureFromFile("tribeFae.png");
			Texture2D val8 = TextureLoader.LoadTextureFromFile("tribeFae_reward.png");
			Texture2D val9 = TextureLoader.LoadTextureFromFile("tribeMechanical.png");
			Texture2D val10 = TextureLoader.LoadTextureFromFile("tribeMechanical_reward.png");
			TribeAnthropoid = TribeManager.Add("whistlewind.inscryption.abnormalsigils", "AnthropoidTribe", val, true, val2);
			TribeBotanic = TribeManager.Add("whistlewind.inscryption.abnormalsigils", "BotanicalTribe", val3, true, val4);
			TribeDivine = TribeManager.Add("whistlewind.inscryption.abnormalsigils", "DivineTribe", val5, true, val6);
			TribeFae = TribeManager.Add("whistlewind.inscryption.abnormalsigils", "FaerieTribe", val7, true, val8);
			TribeMechanical = TribeManager.Add("whistlewind.inscryption.abnormalsigils", "MechanicalTribe", val9, true, val10);
		}

		private void AddResources()
		{
			foreach (string item in new List<string> { "decalSpore", "decalWorms" })
			{
				for (int i = 0; i < 3; i++)
				{
					string text = $"{item}_{i}";
					Texture2D val = TextureLoader.LoadTextureFromFile(text ?? "");
					ResourceBankManager.AddDecal("whistlewind.inscryption.abnormalsigils", text, (Texture)(object)val, false);
					PixelCardManager.AddGBCDecal("whistlewind.inscryption.abnormalsigils", text, val);
				}
			}
		}

		private void AddSpecialAbilities()
		{
			LinqExtensions.ForEach<MethodInfo>(from mi in AccessTools.GetDeclaredMethods(typeof(AbnormalPlugin))
				where mi.Name.StartsWith("SpecialAbility")
				select mi, (Action<MethodInfo>)delegate(MethodInfo mi)
			{
				mi.Invoke(this, null);
			});
			StatIcon_Time();
			StatIcon_SigilPower();
			StatIcon_Slime();
			StatIcon_Nihil();
		}

		private void AddAppearances()
		{
			LinqExtensions.ForEach<MethodInfo>(from mi in AccessTools.GetDeclaredMethods(typeof(AbnormalPlugin))
				where mi.Name.StartsWith("Appearance")
				select mi, (Action<MethodInfo>)delegate(MethodInfo mi)
			{
				mi.Invoke(this, null);
			});
		}

		private void AddCards()
		{
			LinqExtensions.ForEach<MethodInfo>(from mi in AccessTools.GetDeclaredMethods(typeof(AbnormalPlugin))
				where mi.Name.StartsWith("Card")
				select mi, (Action<MethodInfo>)delegate(MethodInfo mi)
			{
				mi.Invoke(this, null);
			});
		}

		private void AddAbilities()
		{
			AbilityManager.ModifyAbilityList += delegate(List<FullAbility> abilities)
			{
				abilities.Find((FullAbility x) => ((Object)x.Info).name == "MadeOfStone").Info.rulebookDescription = "A card bearing this sigil is immune to the effects of Touch of Death, Stinky, Punisher, Cursed, and Idol.";
				return abilities;
			};
			Ability_Punisher();
			Ability_Bloodfiend();
			Ability_Martyr();
			Ability_Aggravating();
			Ability_TeamLeader();
			Ability_Idol();
			Ability_Conductor();
			Ability_Woodcutter();
			Ability_FrozenHeart();
			Ability_FrostRuler();
			Ability_Roots();
			Ability_BroodMother();
			Ability_Cursed();
			Ability_Healer();
			Ability_QueenNest();
			Ability_BitterEnemies();
			Ability_Persistent();
			Ability_Courageous();
			Ability_SerpentsNest();
			StatusEffect_Worms();
			Ability_Assimilator();
			Ability_GroupHealer();
			Ability_Reflector();
			Ability_FlagBearer();
			Ability_Grinder();
			Ability_TheTrain();
			Ability_Scorching();
			Ability_Regenerator();
			Ability_Volatile();
			Ability_GiftGiver();
			Ability_Piercing();
			Ability_Scrambler();
			Ability_Gardener();
			Ability_Slime();
			Ability_Protector();
			Ability_Alchemist();
			Ability_Nettles();
			Ability_Sporogenic();
			StatusEffect_Spores();
			Ability_Witness();
			StatusEffect_Prudence();
			Ability_Corrector();
			Ability_ThickSkin();
			Ability_OneSided();
			Ability_Copycat();
			Ability_YellowBrickRoad();
			Ability_Neutered();
			Ability_NeuteredLatch();
			Ability_RightfulHeir();
			Ability_GreedyHealing();
			Ability_Cycler();
			Ability_Barreler();
			Ability_Bloodletter();
			Ability_LeftStrike();
			Ability_RightStrike();
			Ability_NimbleFoot();
			StatusEffect_Haste();
			Ability_HighStrung();
			Ability_BindingStrike();
			StatusEffect_Bind();
			Ability_Persecutor();
			Ability_Lonely();
			StatusEffect_Pebble();
			Ability_FalseThrone();
			Ability_ReturnToNihil();
			Ability_ReturnCard();
			Ability_RefreshDecks();
			Ability_SeeMore();
		}

		public static CardInfo MakeCard(string cardName, string displayName = null, string description = null, int attack = 0, int health = 0, int blood = 0, int bones = 0, int energy = 0)
		{
			return CardHelper.NewCard(addToAPI: false, "wstl", cardName, displayName, description, attack, health, blood, bones, energy, null, (CardTemple)0);
		}

		public static void CreateCard(CardInfo cardInfo)
		{
			CardManager.Add("wstl", cardInfo);
		}

		private void Appearance_AlternateBattlePortrait()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			AlternateBattlePortrait.appearance = CardHelper.CreateAppearance<AlternateBattlePortrait>("whistlewind.inscryption.abnormalsigils", "AlternateBattlePortrait").Id;
		}

		private void Appearance_ForcedEmission()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			ForcedEmission.appearance = CardHelper.CreateAppearance<ForcedEmission>("whistlewind.inscryption.abnormalsigils", "ForcedEmission").Id;
		}

		private void Appearance_WhiteEmission()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			ForcedWhiteEmission.appearance = CardHelper.CreateAppearance<ForcedWhiteEmission>("whistlewind.inscryption.abnormalsigils", "ForcedWhiteEmission").Id;
		}

		private void Card_SwanBrothers_F0270()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected I4, but got Unknown
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected I4, but got Unknown
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Expected I4, but got Unknown
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Expected I4, but got Unknown
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d8: Expected I4, but got Unknown
			Tribe[] array = (Tribe[])(object)new Tribe[1] { (Tribe)(int)TribeAnthropoid };
			Trait[] array2 = (Trait[])(object)new Trait[1] { (Trait)(int)SwanBrother };
			Appearance[] array3 = (Appearance[])(object)new Appearance[1] { (Appearance)9 };
			CreateCard(CardExtensions.AddAppearances(CardExtensions.AddTraits(CardExtensions.AddTribes(CardExtensions.AddAbilities(MakeCard("dreamOfABlackSwanBrother1", "First Brother", null, 0, 1, 1).SetPortraits("dreamOfABlackSwanBrother1"), (Ability[])(object)new Ability[1] { (Ability)100 }), array), array2), array3));
			CreateCard(CardExtensions.AddAppearances(CardExtensions.AddTraits(CardExtensions.AddTribes(CardExtensions.AddAbilities(MakeCard("dreamOfABlackSwanBrother2", "Second Brother", null, 0, 1, 1).SetPortraits("dreamOfABlackSwanBrother2"), (Ability[])(object)new Ability[1] { (Ability)(int)Piercing.ability }), array), array2), array3));
			CreateCard(CardExtensions.AddAppearances(CardExtensions.AddTraits(CardExtensions.AddTribes(CardExtensions.AddAbilities(MakeCard("dreamOfABlackSwanBrother3", "Third Brother", null, 0, 2, 1).SetPortraits("dreamOfABlackSwanBrother3"), (Ability[])(object)new Ability[1] { (Ability)15 }), array), array2), array3));
			CreateCard(CardExtensions.AddAppearances(CardExtensions.AddTraits(CardExtensions.AddTribes(CardExtensions.AddAbilities(MakeCard("dreamOfABlackSwanBrother4", "Fourth Brother", null, 0, 1, 1).SetPortraits("dreamOfABlackSwanBrother4"), (Ability[])(object)new Ability[1] { (Ability)4 }), array), array2), array3));
			CreateCard(CardExtensions.AddAppearances(CardExtensions.AddTraits(CardExtensions.AddTribes(CardExtensions.AddAbilities(MakeCard("dreamOfABlackSwanBrother5", "Fifth Brother", null, 0, 1, 1).SetPortraits("dreamOfABlackSwanBrother5"), (Ability[])(object)new Ability[1] { (Ability)(int)Scorching.ability }), array), array2), array3));
			CreateCard(CardExtensions.AddAppearances(CardExtensions.AddTraits(CardExtensions.AddTribes(CardExtensions.AddAbilities(MakeCard("dreamOfABlackSwanBrother6", "Sixth Brother", null, 0, 1, 1).SetPortraits("dreamOfABlackSwanBrother6"), (Ability[])(object)new Ability[1] { (Ability)(int)ThickSkin.ability }), array), array2), array3));
		}

		private void Card_LaetitiaFriend_O0167()
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected I4, but got Unknown
			CreateCard(CardExtensions.SetDefaultEvolutionName(CardExtensions.AddTribes(MakeCard("laetitiaFriend", "Little Witch's Friend", null, 1, 2, 0, 3).SetPortraits("laetitiaFriend"), (Tribe[])(object)new Tribe[2]
			{
				(Tribe)(int)TribeFae,
				(Tribe)6
			}), "Little Witch's Big Friend"));
		}

		private void Card_MeltingLoveMinion_D03109()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Expected I4, but got Unknown
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Expected I4, but got Unknown
			CreateCard(CardExtensions.AddTraits(CardExtensions.AddAbilities(CardExtensions.SetStatIcon(MakeCard("meltingLoveMinion", "Slime", null, 0, 2, 0, 3).SetPortraits("meltingLoveMinion"), SlimeIcon.Icon), (Ability[])(object)new Ability[1] { (Ability)(int)Slime.ability }), (Trait[])(object)new Trait[1] { (Trait)(int)LovingSlime }));
		}

		private void Card_NailHammer_O010()
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected I4, but got Unknown
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Expected I4, but got Unknown
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Expected I4, but got Unknown
			CreateCard(CardExtensions.AddAbilities(MakeCard("nail", "Nail", null, 1, 2).SetPortraits("nail"), (Ability[])(object)new Ability[2]
			{
				(Ability)(int)Piercing.ability,
				(Ability)(int)RightStrike.ability
			}));
			CreateCard(CardExtensions.AddAbilities(MakeCard("hammer", "Hammer", null, 1, 2).SetPortraits("hammer"), (Ability[])(object)new Ability[2]
			{
				(Ability)105,
				(Ability)(int)LeftStrike.ability
			}));
		}

		private void Card_OzmaPumpkinJack_F04116()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected I4, but got Unknown
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Expected I4, but got Unknown
			Tribe[] array = (Tribe[])(object)new Tribe[1] { (Tribe)(int)TribeBotanic };
			CreateCard(CardExtensions.AddTribes(CardExtensions.AddAbilities(MakeCard("ozmaPumpkinJack", "Jack", null, 2, 2).SetPortraits("ozmaPumpkinJack"), (Ability[])(object)new Ability[1] { (Ability)(int)Cursed.ability }), array));
			CreateCard(CardExtensions.SetEvolve(CardExtensions.AddTribes(CardExtensions.AddAbilities(MakeCard("ozmaPumpkin", "Pumpkin", null, 0, 2).SetPortraits("ozmaPumpkin"), (Ability[])(object)new Ability[1] { (Ability)5 }), array), "wstl_ozmaPumpkinJack", 2, (IEnumerable<CardModificationInfo>)null));
		}

		private void Card_ParasiteTreeSapling_D04108()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Expected I4, but got Unknown
			CreateCard(CardExtensions.SetTerrain(CardExtensions.AddTribes(CardExtensions.AddAbilities(MakeCard("parasiteTreeSapling", "Sapling", null, 0, 2, 0, 1).SetPortraits("parasiteTreeSapling"), (Ability[])(object)new Ability[1] { (Ability)28 }), (Tribe[])(object)new Tribe[1] { (Tribe)(int)TribeBotanic })));
		}

		private void Card_QueenBeeWorker_T0450()
		{
			CreateCard(CardExtensions.AddTribes(MakeCard("queenBeeWorker", "Worker Bee", null, 1, 1, 0, 1).SetPortraits("queenBeeWorker"), (Tribe[])(object)new Tribe[1] { (Tribe)6 }));
		}

		private void Card_SnowQueenIceBlock_F0137()
		{
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Expected I4, but got Unknown
			CreateCard(CardExtensions.SetTerrain(CardExtensions.AddAbilities(MakeCard("snowQueenIceBlock", "Block of Ice", null, 0, 2).SetPortraits("snowQueenIceBlock"), (Ability[])(object)new Ability[1] { (Ability)23 })));
			CreateCard(CardExtensions.AddAbilities(MakeCard("snowQueenIceHeart", "Frozen Heart", null, 0, 1).SetPortraits("snowQueenIceHeart"), (Ability[])(object)new Ability[1] { (Ability)(int)FrozenHeart.ability }));
		}

		private void Card_SnowWhitesVine_F0442()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Expected I4, but got Unknown
			CreateCard(CardExtensions.SetTerrain(CardExtensions.AddTribes(CardExtensions.AddAbilities(MakeCard("snowWhitesVine", "Thorny Vines", null, 0, 1).SetPortraits("snowWhitesVine"), (Ability[])(object)new Ability[1] { (Ability)15 }), (Tribe[])(object)new Tribe[1] { (Tribe)(int)TribeBotanic })));
		}

		private void Card_Spiderling_O0243()
		{
			Tribe[] array = (Tribe[])(object)new Tribe[1] { (Tribe)6 };
			Appearance[] array2 = (Appearance[])(object)new Appearance[1] { (Appearance)14 };
			CreateCard(CardExtensions.SetDefaultEvolutionName(CardExtensions.AddAppearances(CardExtensions.AddTribes(MakeCard("spiderBrood", "Spider Brood", null, 1, 3, 0, 3).SetPortraits("spiderBrood"), array), array2), "Spider Buff"));
			CreateCard(CardExtensions.SetAffectedByTidalLock(CardExtensions.SetEvolve(CardExtensions.AddAppearances(CardExtensions.AddTribes(CardExtensions.AddAbilities(MakeCard("spiderling", "Spiderling", null, 0, 1).SetPortraits("spiderling"), (Ability[])(object)new Ability[1] { (Ability)5 }), array), array2), "wstl_spiderBrood", 1, (IEnumerable<CardModificationInfo>)null), true));
		}

		private void Card_TheLittlePrinceMinion_O0466()
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected I4, but got Unknown
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Expected I4, but got Unknown
			CreateCard(CardExtensions.AddTraits(CardExtensions.AddTribes(MakeCard("theLittlePrinceMinion", "Spore Mold Creature").SetPortraits("theLittlePrinceMinion"), (Tribe[])(object)new Tribe[1] { (Tribe)(int)TribeBotanic }), (Trait[])(object)new Trait[1] { (Trait)(int)SporeFriend }));
		}
	}
	public class Aggravating : AbilityBehaviour, IPassiveAttackBuff
	{
		public static Ability ability;

		public override Ability Ability => ability;

		public override bool RespondsToResolveOnBoard()
		{
			return ActivateOnPlay();
		}

		public override bool RespondsToOtherCardResolve(PlayableCard otherCard)
		{
			return ActivateOnPlay();
		}

		public override IEnumerator OnResolveOnBoard()
		{
			return ((AbilityBehaviour)this).LearnAbility(0.4f);
		}

		public override IEnumerator OnOtherCardResolve(PlayableCard otherCard)
		{
			return ((AbilityBehaviour)this).LearnAbility(0.4f);
		}

		public int GetPassiveAttackBuff(PlayableCard target)
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			if (!((AbilityBehaviour)this).Card.OnBoard || target.OpponentCard == ((AbilityBehaviour)this).Card.OpponentCard || (Object)(object)target == (Object)(object)((AbilityBehaviour)this).Card)
			{
				return 0;
			}
			return CardExtensions.GetAbilityStacks(((AbilityBehaviour)this).Card, ((AbilityBehaviour)this).Ability);
		}

		public bool ActivateOnPlay()
		{
			if ((Object)(object)((AbilityBehaviour)this).Card.Slot != (Object)null)
			{
				return (from s in Singleton<BoardManager>.Instance.GetSlots(((AbilityBehaviour)this).Card.OpponentCard)
					where (Object)(object)s.Card != (Object)null
					select s).Count() > 0;
			}
			return false;
		}
	}
	public class Alchemist : ExtendedActivatedAbilityBehaviour
	{
		public static Ability ability;

		public override Ability Ability => ability;

		public override int StartingEnergyCost => 2;

		public override bool CanActivate()
		{
			if (Singleton<PlayerHand>.Instance.CardsInHand.Count() > 0)
			{
				if (((CardDrawPiles)Singleton<CardDrawPiles3D>.Instance).Deck.Cards.Count == 0)
				{
					return Singleton<CardDrawPiles3D>.Instance.SideDeck.Cards.Count > 0;
				}
				return true;
			}
			return false;
		}

		public override IEnumerator Activate()
		{
			yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
			yield return HelperMethods.ChangeCurrentView((View)0);
			List<PlayableCard> list = new List<PlayableCard>(Singleton<PlayerHand>.Instance.CardsInHand);
			int count = 0;
			Singleton<PlayerHand>.Instance.CardsInHand.Clear();
			foreach (PlayableCard item in list)
			{
				if ((Object)(object)item != (Object)null)
				{
					count++;
					yield return Singleton<PlayerHand>.Instance.CleanUpCard(item);
				}
			}
			for (int i = 0; i < count; i++)
			{
				if (((CardDrawPiles)Singleton<CardDrawPiles3D>.Instance).Deck.Cards.Count > 0)
				{
					Singleton<CardDrawPiles3D>.Instance.Pile.Draw();
					yield return ((CardDrawPiles)Singleton<CardDrawPiles3D>.Instance).DrawCardFromDeck((CardInfo)null, (Action<PlayableCard>)null);
					continue;
				}
				if (Singleton<CardDrawPiles3D>.Instance.SideDeck.Cards.Count > 0)
				{
					Singleton<CardDrawPiles3D>.Instance.SidePile.Draw();
					yield return Singleton<CardDrawPiles3D>.Instance.DrawFromSidePile();
					continue;
				}
				yield return DialogueHelper.PlayAlternateDialogue("You've exhausted all of your cards.");
				break;
			}
			yield return ((AbilityBehaviour)this).LearnAbility(0.2f);
			yield return HelperMethods.ChangeCurrentView((View)1);
		}
	}
	public class Assimilator : AbilityBehaviour
	{
		public static Ability ability;

		public override Ability Ability => ability;

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

		public override IEnumerator OnOtherCardDie(PlayableCard card, CardSlot deathSlot, bool fromCombat, PlayableCard killer)
		{
			yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
			yield return (object)new WaitForSeconds(0.3f);
			((AbilityBehaviour)this).Card.AddTemporaryMod(new CardModificationInfo(1, 1));
			((Card)((AbilityBehaviour)this).Card).Anim.LightNegationEffect();
			yield return (object)new WaitForSeconds(0.3f);
			yield return ((AbilityBehaviour)this).LearnAbility(0f);
		}
	}
	public class Barreler : Strafe
	{
		public static Ability ability;

		public override Ability Ability => ability;

		public override IEnumerator DoStrafe(CardSlot toLeft, CardSlot toRight)
		{
			if (!CardExtensions.HasTrait(((AbilityBehaviour)this).Card, (Trait)16))
			{
				List<CardSlot> slotsCopy = BoardManagerExtensions.GetSlotsCopy(Singleton<BoardManager>.Instance, !((AbilityBehaviour)this).Card.OpponentCard);
				CardSlot slot = ((AbilityBehaviour)this).Card.Slot;
				bool flag = (Object)(object)toLeft != (Object)null;
				bool flag2 = (Object)(object)toRight != (Object)null;
				if (base.movingLeft && !flag)
				{
					base.movingLeft = false;
				}
				if (!base.movingLeft && !flag2)
				{
					base.movingLeft = true;
				}
				((Card)((AbilityBehaviour)this).Card).RenderInfo.SetAbilityFlipped(((AbilityBehaviour)this).Ability, base.movingLeft);
				((Card)((AbilityBehaviour)this).Card).RenderInfo.flippedPortrait = base.movingLeft && ((Card)((AbilityBehaviour)this).Card).Info.flipPortraitForStrafe;
				((Card)((AbilityBehaviour)this).Card).RenderCard();
				CardSlot destination = (base.movingLeft ? slotsCopy.First() : slotsCopy.Last());
				bool destinationValid = (Object)(object)destination != (Object)null && (Object)(object)slot != (Object)null;
				if ((Object)(object)destination != (Object)null && destinationValid)
				{
					yield return SwapSlots(destination, slot, slotsCopy);
				}
				else
				{
					((Card)((AbilityBehaviour)this).Card).Anim.StrongNegationEffect();
					yield return (object)new WaitForSeconds(0.15f);
				}
				if ((Object)(object)destination != (Object)null && destinationValid)
				{
					yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
					yield return ((AbilityBehaviour)this).LearnAbility(0f);
				}
			}
		}

		private IEnumerator SwapSlots(CardSlot destination, CardSlot originalSlot, List<CardSlot> boardSlots)
		{
			List<CardSlot> list = new List<CardSlot>(boardSlots);
			if (base.movingLeft)
			{
				list.Reverse();
			}
			List<CardSlot> list2 = list.FindAll((CardSlot x) => (!base.movingLeft) ? (x.Index > originalSlot.Index) : (x.Index < originalSlot.Index));
			Dictionary<PlayableCard, CardSlot> swappedCards = new Dictionary<PlayableCard, CardSlot>();
			CardSlot val = originalSlot;
			foreach (CardSlot item in list2)
			{
				if ((Object)(object)item.Card != (Object)null)
				{
					PlayableCard card = item.Card;
					float num = (((Component)card.Slot).transform.position.x + ((Component)val).transform.position.x) / 2f;
					float num2 = ((Component)card).transform.position.y + 0.35f;
					float z = ((Component)card).transform.position.z;
					Tween.Position(((Component)card).transform, new Vector3(num, num2, z), 0.3f, (float)item.Index * 0.01f, Tween.EaseOut, (LoopType)0, (Action)null, (Action)null, true);
					swappedCards.Add(card, val);
				}
				val = item;
			}
			yield return MoveToAdjacentSlot(((AbilityBehaviour)this).Card, destination, destinationValid: true);
			foreach (KeyValuePair<PlayableCard, CardSlot> item2 in swappedCards)
			{
				if ((Object)(object)item2.Key != (Object)null && CardExtensions.NotDead(item2.Key))
				{
					yield return Singleton<BoardManager>.Instance.AssignCardToSlot(item2.Key, item2.Value, 0.1f, (Action)null, true);
				}
			}
		}

		private IEnumerator MoveToAdjacentSlot(PlayableCard target, CardSlot destination, bool destinationValid)
		{
			if ((Object)(object)destination != (Object)null && destinationValid)
			{
				yield return Singleton<BoardManager>.Instance.AssignCardToSlot(target, destination, 0.1f, (Action)null, true);
				yield return (object)new WaitForSeconds(0.25f);
			}
			else
			{
				((Card)target).Anim.StrongNegationEffect();
				yield return (object)new WaitForSeconds(0.15f);
			}
		}
	}
	public class BindingStrike : AbilityBehaviour
	{
		public static Ability ability;

		public override Ability Ability => ability;

		public override bool RespondsToDealDamage(int amount, PlayableCard target)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)target != (Object)null && !target.Dead)
			{
				return CardExtensions.LacksTrait(target, AbnormalPlugin.ImmuneToAilments);
			}
			return false;
		}

		public override IEnumerator OnDealDamage(int amount, PlayableCard target)
		{
			yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
			yield return AddBindToCard(target);
			yield return ((AbilityBehaviour)this).LearnAbility(0.4f);
		}

		private IEnumerator AddBindToCard(PlayableCard card)
		{
			((Card)card).Anim.LightNegationEffect();
			card.AddStatusEffectFlipCard<Bind>(((AbilityBehaviour)this).Card.Attack * 2, addDecals: false, (int i) => i + 1);
			yield return (object)new WaitForSeconds(0.1f);
		}
	}
	public class BitterEnemies : AbilityBehaviour, IPassiveAttackBuff
	{
		public static Ability ability;

		public override Ability Ability => ability;

		public override bool RespondsToResolveOnBoard()
		{
			return ActivateOnPlay();
		}

		public override bool RespondsToOtherCardResolve(PlayableCard otherCard)
		{
			return ActivateOnPlay();
		}

		public override IEnumerator OnResolveOnBoard()
		{
			return ((AbilityBehaviour)this).LearnAbility(0.4f);
		}

		public override IEnumerator OnOtherCardResolve(PlayableCard otherCard)
		{
			return ((AbilityBehaviour)this).LearnAbility(0.4f);
		}

		public int GetPassiveAttackBuff(PlayableCard target)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			if (!((AbilityBehaviour)this).Card.OnBoard || (Object)(object)target == (Object)(object)((AbilityBehaviour)this).Card || CardExtensions.LacksAbility(((Card)target).Info, ability))
			{
				return 0;
			}
			List<CardSlot> list = BoardManagerExtensions.GetSlotsCopy(Singleton<BoardManager>.Instance, !((AbilityBehaviour)this).Card.OpponentCard).FindAll((CardSlot x) => (Object)(object)x.Card != (Object)null && x.Card.HasAbility(ability));
			list.Remove(((AbilityBehaviour)this).Card.Slot);
			if (list.Count <= 0)
			{
				return 0;
			}
			return CardExtensions.GetAbilityStacks(((AbilityBehaviour)this).Card, ((AbilityBehaviour)this).Ability);
		}

		public bool ActivateOnPlay()
		{
			return Singleton<BoardManager>.Instance.AllSlotsCopy.Exists((CardSlot x) => x.IsPlayerSlot != Object.op_Implicit((Object)(object)((AbilityBehaviour)this).Card.Slot) && (Object)(object)x.Card != (Object)null && x.Card.HasAbility(((AbilityBehaviour)this).Ability));
		}
	}
	public class Bloodfiend : AbilityBehaviour
	{
		public static Ability ability;

		public override Ability Ability => ability;

		public override bool RespondsToDealDamage(int amount, PlayableCard target)
		{
			if (amount > 0 && !((AbilityBehaviour)this).Card.Dead)
			{
				return ((AbilityBehaviour)this).Card.Health > 0;
			}
			return false;
		}

		public override IEnumerator OnDealDamage(int amount, PlayableCard target)
		{
			yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
			yield return (object)new WaitForSeconds(0.3f);
			((AbilityBehaviour)this).Card.HealDamage(1);
			((Card)((AbilityBehaviour)this).Card).Anim.LightNegationEffect();
			yield return (object)new WaitForSeconds(0.3f);
			yield return ((AbilityBehaviour)this).LearnAbility(0f);
		}
	}
	public class Bloodletter : AbilityBehaviour
	{
		public static Ability ability;

		public override Ability Ability => ability;

		public override bool RespondsToTakeDamage(PlayableCard source)
		{
			if ((Object)(object)source != (Object)null)
			{
				if (source.Health > 0 && !((AbilityBehaviour)this).Card.Dead)
				{
					return ((AbilityBehaviour)this).Card.Health > 0;
				}
				return false;
			}
			return false;
		}

		public override IEnumerator OnTakeDamage(PlayableCard source)
		{
			yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
			((Card)((AbilityBehaviour)this).Card).Anim.StrongNegationEffect();
			yield return (object)new WaitForSeconds(0.55f);
			yield return source.TakeDamage(1, ((AbilityBehaviour)this).Card);
			((AbilityBehaviour)this).Card.HealDamage(1);
			((Card)((AbilityBehaviour)this).Card).Anim.LightNegationEffect();
			yield return ((AbilityBehaviour)this).LearnAbility(0.4f);
		}
	}
	public class BroodMother : OpponentDrawCreatedCard
	{
		public static Ability ability;

		public override Ability Ability => ability;

		public override CardInfo CardToDraw
		{
			get
			{
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0021: Expected I4, but got Unknown
				CardInfo cardByName = CardLoader.GetCardByName("wstl_spiderling");
				cardByName.Mods.AddRange(((AbilityBehaviour)this).GetNonDefaultModsFromSelf((Ability[])(object)new Ability[1] { (Ability)(int)((AbilityBehaviour)this).Ability }));
				return cardByName;
			}
		}

		public override bool RespondsToTakeDamage(PlayableCard source)
		{
			return true;
		}

		public override IEnumerator OnTakeDamage(PlayableCard source)
		{
			yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
			((Card)((AbilityBehaviour)this).Card).Anim.StrongNegationEffect();
			yield return (object)new WaitForSeconds(0.4f);
			yield return QueueOrCreateDrawnCard();
			yield return ((AbilityBehaviour)this).LearnAbility(0.5f);
		}
	}
	public class Conductor : AbilityBehaviour, IPassiveAttackBuff
	{
		public static Ability ability;

		public int turnCount;

		public override Ability Ability => ability;

		public override bool RespondsToResolveOnBoard()
		{
			return true;
		}

		public override IEnumerator OnResolveOnBoard()
		{
			return ((AbilityBehaviour)this).LearnAbility(0.4f);
		}

		public override bool RespondsToUpkeep(bool onPlayerUpkeep)
		{
			if (turnCount < 3)
			{
				return ((AbilityBehaviour)this).Card.OpponentCard != onPlayerUpkeep;
			}
			return false;
		}

		public override IEnumerator OnUpkeep(bool onPlayerUpkeep)
		{
			yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
			yield return HelperMethods.ChangeCurrentView((View)4);
			((Card)((AbilityBehaviour)this).Card).Anim.StrongNegationEffect();
			turnCount++;
			yield return (object)new WaitForSeconds(0.4f);
			yield return HelperMethods.ChangeCurrentView((View)1);
		}

		public int GetPassiveAttackBuff(PlayableCard target)
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)target == (Object)(object)((AbilityBehaviour)this).Card || turnCount == 0 || !((AbilityBehaviour)this).Card.OnBoard)
			{
				return 0;
			}
			int num = ((Card)((AbilityBehaviour)this).Card).Info.Attack;
			if (CardExtensions.HasTrait(target, AbnormalPlugin.Orchestral))
			{
				num++;
			}
			if (turnCount >= 3)
			{
				return num;
			}
			if (turnCount >= 2 && target.OpponentCard == ((AbilityBehaviour)this).Card.OpponentCard)
			{
				return num / 2;
			}
			if (CardSlotExtensions.GetAdjacentCards(((AbilityBehaviour)this).Card.Slot).Contains(target))
			{
				return num / 2;
			}
			return 0;
		}
	}
	public class Copycat : AbilityBehaviour
	{
		public static Ability ability;

		private bool copiedCard;

		private CardInfo originalCardInfo;

		private readonly List<CardModificationInfo> tempMods = new List<CardModificationInfo>();

		public override Ability Ability => ability;

		public override int Priority => -1;

		private void Start()
		{
			if (!((Object)(object)((AbilityBehaviour)this).Card == (Object)null) && !((Object)(object)originalCardInfo != (Object)null))
			{
				ref CardInfo reference = ref originalCardInfo;
				object obj = ((Card)((AbilityBehaviour)this).Card).Info.Clone();
				reference = (CardInfo)((obj is CardInfo) ? obj : null);
			}
		}

		public override bool RespondsToResolveOnBoard()
		{
			if (!copiedCard)
			{
				return (Object)(object)CardExtensions.OpposingCard(((AbilityBehaviour)this).Card) != (Object)null;
			}
			return false;
		}

		public override bool RespondsToOtherCardAssignedToSlot(PlayableCard otherCard)
		{
			if (!copiedCard && (Object)(object)otherCard != (Object)null && (Object)(object)otherCard == (Object)(object)CardExtensions.OpposingCard(((AbilityBehaviour)this).Card))
			{
				return true;
			}
			return false;
		}

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

		public override IEnumerator OnResolveOnBoard()
		{
			if (!CanCopyCard(CardExtensions.OpposingCard(((AbilityBehaviour)this).Card)))
			{
				((Card)((AbilityBehaviour)this).Card).Anim.StrongNegationEffect();
				yield return (object)new WaitForSeconds(0.4f);
				yield return DialogueHelper.PlayDialogueEvent("CopycatFail");
				yield break;
			}
			PlayableCard card = ((AbilityBehaviour)this).Card;
			yield return TransformIntoCopy(CardExtensions.OpposingCard(((AbilityBehaviour)this).Card));
			if (!card.TriggerHandler.RespondsToTrigger((Trigger)3, Array.Empty<object>()))
			{
				yield break;
			}
			yield return (object)new WaitForSeconds(0.4f);
			foreach (TriggerReceiver item in from x in card.TriggerHandler.GetAllReceivers()
				where (Object)(object)x != (Object)null && x.RespondsToResolveOnBoard()
				select x)
			{
				yield return item.OnResolveOnBoard();
			}
		}

		public override IEnumerator OnOtherCardAssignedToSlot(PlayableCard otherCard)
		{
			if (CanCopyCard(CardExtensions.OpposingCard(((AbilityBehaviour)this).Card)))
			{
				yield return TransformIntoCopy(otherCard);
				yield break;
			}
			((Card)((AbilityBehaviour)this).Card).Anim.StrongNegationEffect();
			yield return (object)new WaitForSeconds(0.4f);
			yield return DialogueHelper.PlayDialogueEvent("CopycatFail");
		}

		private IEnumerator TransformIntoCopy(PlayableCard otherCard)
		{
			foreach (CardModificationInfo temporaryMod in otherCard.TemporaryMods)
			{
				tempMods.Add(temporaryMod.FullClone());
			}
			yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
			yield return ((AbilityBehaviour)this).Card.TransformIntoCard(CopyInfo(((Card)otherCard).Info), (Action)NegateCopycat, (Action)null);
			yield return ((AbilityBehaviour)this).LearnAbility(0.5f);
		}

		public override IEnumerator OnDie(bool wasSacrifice, PlayableCard killer)
		{
			((Card)((AbilityBehaviour)this).Card).Anim.StrongNegationEffect();
			((Card)((AbilityBehaviour)this).Card).SetInfo(originalCardInfo);
			yield return (object)new WaitForSeconds(0.55f);
			yield return DialogueHelper.PlayDialogueEvent("CopycatDead");
		}

		private CardInfo CopyInfo(CardInfo cloneCardInfo)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Expected O, but got Unknown
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			object obj = cloneCardInfo.Clone();
			object obj2 = ((obj is CardInfo) ? obj : null);
			CardModificationInfo val = new CardModificationInfo
			{
				nameReplacement = "False " + cloneCardInfo.DisplayedNameLocalized,
				abilities = new List<Ability>(originalCardInfo.DefaultAbilities)
			};
			val.abilities.Remove(((AbilityBehaviour)this).Ability);
			((CardInfo)obj2).Mods.Add(val);
			return (CardInfo)obj2;
		}

		private void NegateCopycat()
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Expected O, but got Unknown
			copiedCard = true;
			if (((AbilityBehaviour)this).Card.Health == 0)
			{
				((AbilityBehaviour)this).Card.Status.damageTaken = 0;
			}
			((AbilityBehaviour)this).Card.AddTemporaryMod(new CardModificationInfo
			{
				negateAbilities = new List<Ability> { ((AbilityBehaviour)this).Ability }
			});
		}

		private bool CanCopyCard(PlayableCard card)
		{
			return CardExtensions.LacksAllTraits(card, (Trait[])(object)new Trait[2]
			{
				(Trait)16,
				(Trait)14
			});
		}
	}
	public class Corrector : AbilityBehaviour
	{
		public static Ability ability;

		public override Ability Ability => ability;

		public override bool RespondsToResolveOnBoard()
		{
			return ((AbilityBehaviour)this).Card.OpponentCard;
		}

		public override bool RespondsToDrawn()
		{
			return true;
		}

		public override IEnumerator OnResolveOnBoard()
		{
			yield return HelperMethods.ChangeCurrentView((View)4);
			((Card)((AbilityBehaviour)this).Card).Anim.PlayTransformAnimation();
			yield return (object)new WaitForSeconds(0.15f);
			GetNewStats();
			yield return (object)new WaitForSeconds(0.55f);
			yield return ((AbilityBehaviour)this).LearnAbility(0f);
		}

		public override IEnumerator OnDrawn()
		{
			PlayerHand instance = Singleton<PlayerHand>.Instance;
			((PlayerHand3D)((instance is PlayerHand3D) ? instance : null)).MoveCardAboveHand(((AbilityBehaviour)this).Card);
			yield return (object)new WaitForSeconds(0.15f);
			yield return ((Card)((AbilityBehaviour)this).Card).Anim.FlipInAir();
			yield return (object)new WaitForSeconds(0.1f);
			GetNewStats();
			yield return (object)new WaitForSeconds(0.1f);
			yield return ((AbilityBehaviour)this).LearnAbility(0f);
		}

		private int GetCostPowerLevel()
		{
			int bonesCost = ((Card)((AbilityBehaviour)this).Card).Info.BonesCost;
			int num = bonesCost + ((Card)((AbilityBehaviour)this).Card).Info.BloodCost switch
			{
				0 => 0, 
				1 => 4, 
				2 => 8, 
				3 => 13, 
				_ => 24 + (((Card)((AbilityBehaviour)this).Card).Info.BloodCost - 4) * 7, 
			};
			return num + ((Card)((AbilityBehaviour)this).Card).Info.EnergyCost switch
			{
				0 => 0, 
				1 => 1, 
				2 => 2, 
				3 => 4, 
				4 => 7, 
				5 => 9, 
				_ => 12 + (((Card)((AbilityBehaviour)this).Card).Info.EnergyCost - 6) * 4, 
			} + ((Card)((AbilityBehaviour)this).Card).Info.GemsCost.Count * 3 + CardExtensions.GetExtendedPropertyAsInt(((Card)((AbilityBehaviour)this).Card).Info, "LifeCost").GetValueOrDefault() * 2 + CardExtensions.GetExtendedPropertyAsInt(((Card)((AbilityBehaviour)this).Card).Info, "MoneyCost").GetValueOrDefault() + CardExtensions.GetExtendedPropertyAsInt(((Card)((AbilityBehaviour)this).Card).Info, "LifeMoneyCost").GetValueOrDefault() * 3 + ((CardExtensions.GetExtendedProperty(((Card)((AbilityBehaviour)this).Card).Info, "ForbiddenMoxCost") != null) ? 3 : 0);
		}

		private void GetNewStats()
		{
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Expected O, but got Unknown
			int[] array = new int[2];
			int num = GetCostPowerLevel();
			int num2 = ((TriggerReceiver)this).GetRandomSeed();
			while (num > 0)
			{
				if (num > 1 && SeededRandom.Value(num2 *= 2) <= 0.4f)
				{
					array[0]++;
					num -= 2;
				}
				else
				{
					array[1]++;
					num--;
				}
			}
			if (array[1] == 0)
			{
				array[1] = 1;
			}
			((AbilityBehaviour)this).Card.AddTemporaryMod(new CardModificationInfo(array[0] - ((AbilityBehaviour)this).Card.Attack, array[1] - ((AbilityBehaviour)this).Card.Health)
			{
				nonCopyable = true
			});
		}
	}
	public class Courageous : AbilityBehaviour
	{
		public static Ability ability;

		public override Ability Ability => ability;

		public override bool RespondsToResolveOnBoard()
		{
			return Singleton<BoardManager>.Instance.GetAdjacentSlots(((AbilityBehaviour)this).Card.Slot).Exists((CardSlot slot) => (Object)(object)slot.Card != (Object)null);
		}

		public override IEnumerator OnResolveOnBoard()
		{
			yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
			foreach (CardSlot item in from slot in Singleton<BoardManager>.Instance.GetAdjacentSlots(((AbilityBehaviour)this).Card.Slot)
				where (Object)(object)slot.Card != (Object)null
				select slot)
			{
				yield return ApplyEffect(item.Card);
			}
		}

		public override bool RespondsToOtherCardResolve(PlayableCard otherCard)
		{
			return Singleton<BoardManager>.Instance.GetAdjacentSlots(((AbilityBehaviour)this).Card.Slot).Contains(otherCard.Slot);
		}

		public override IEnumerator OnOtherCardResolve(PlayableCard otherCard)
		{
			yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
			yield return ApplyEffect(otherCard);
		}

		private IEnumerator ApplyEffect(PlayableCard card)
		{
			if (card.Health <= 1)
			{
				((Card)card).Anim.StrongNegationEffect();
				yield return (object)new WaitForSeconds(0.4f);
				yield return DialogueHelper.PlayDialogueEvent("CourageousFail");
				yield break;
			}
			Ability[] array = new Ability[3];
			RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			if (CardExtensions.HasAnyOfAbilities(card, (Ability[])(object)array) || card.Status.hiddenAbilities.Contains((Ability)10))
			{
				((Card)card).Anim.StrongNegationEffect();
				yield return (object)new WaitForSeconds(0.4f);
				yield return DialogueHelper.PlayDialogueEvent("CourageousRefuse");
				yield break;
			}
			if (!card.TemporaryMods.Exists((CardModificationInfo x) => x.singletonId == "wstl:Courageous1"))
			{
				CardModificationInfo val = new CardModificationInfo(1, -1)
				{
					singletonId = "wstl:Courageous1"
				};
				card.AddTemporaryMod(val);
			}
			if (!card.TemporaryMods.Exists((CardModificationInfo x) => x.singletonId == "wstl:Courageous2") && card.Health > 1)
			{
				CardModificationInfo val2 = new CardModificationInfo(1, -1)
				{
					singletonId = "wstl:Courageous2"
				};
				card.AddTemporaryMod(val2);
			}
			card.OnStatsChanged();
			((Card)card).Anim.StrongNegationEffect();
			yield return (object)new WaitForSeconds(0.4f);
			yield return ((AbilityBehaviour)this).LearnAbility(0f);
		}
	}
	public class Cursed : AbilityBehaviour
	{
		public static Ability ability;

		public override Ability Ability => ability;

		public override bool RespondsToDie(bool wasSacrifice, PlayableCard killer)
		{
			if (!wasSacrifice && (Object)(object)killer != (Object)null && !killer.Dead && killer.Health != 0)
			{
				return CardExtensions.LacksAbility(killer, (Ability)105);
			}
			return false;
		}

		public override IEnumerator OnDie(bool wasSacrifice, PlayableCard killer)
		{
			if (CardExtensions.HasAnyOfTraits(killer, (Trait[])(object)new Trait[2]
			{
				(Trait)16,
				(Trait)14
			}))
			{
				((Card)killer).Anim.StrongNegationEffect();
				yield return (object)new WaitForSeconds(0.4f);
				yield return DialogueHelper.PlayDialogueEvent("CursedFail");
				yield break;
			}
			yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
			yield return HelperMethods.ChangeCurrentView((View)4);
			yield return (object)new WaitForSeconds(0.2f);
			((Card)killer).Anim.StrongNegationEffect();
			yield return (object)new WaitForSeconds(0.55f);
			yield return killer.TransformIntoCard(((Card)((AbilityBehaviour)this).Card).Info, (Action)null, (Action)null);
			killer.Status.damageTaken = 0;
			killer.TemporaryMods.RemoveAll((CardModificationInfo x) => x.nonCopyable || !x.fromTotem);
			yield return (object)new WaitForSeconds(0.4f);
			yield return ((AbilityBehaviour)this).LearnAbility(0f);
		}
	}
	public class Cycler : Strafe
	{
		public static Ability ability;

		public override Ability Ability => ability;

		public override IEnumerator DoStrafe(CardSlot toLeft, CardSlot toRight)
		{
			if (CardExtensions.HasTrait(((AbilityBehaviour)this).Card, (Trait)16))
			{
				yield break;
			}
			List<CardSlot> slotsCopy = BoardManagerExtensions.GetSlotsCopy(Singleton<BoardManager>.Instance, !((AbilityBehaviour)this).Card.OpponentCard);
			CardSlot oldSlot = ((AbilityBehaviour)this).Card.Slot;
			bool atEndOfBoard = (Object)(object)((AbilityBehaviour)this).Card.Slot == (Object)(object)slotsCopy.First() || (Object)(object)((AbilityBehaviour)this).Card.Slot == (Object)(object)slotsCopy.Last();
			bool flag = (Object)(object)toLeft != (Object)null && (Object)(object)toLeft.Card == (Object)null;
			bool flag2 = (Object)(object)toRight != (Object)null && (Object)(object)toRight.Card == (Object)null;
			bool canLoopAround = CheckIfCanLoop(atEndOfBoard, base.movingLeft, flag, flag2, ((AbilityBehaviour)this).Card.Slot, slotsCopy.First(), slotsCopy.Last());
			if (base.movingLeft && !flag && !canLoopAround)
			{
				base.movingLeft = false;
				canLoopAround = CheckIfCanLoop(atEndOfBoard, base.movingLeft, flag, flag2, ((AbilityBehaviour)this).Card.Slot, slotsCopy.First(), slotsCopy.Last());
			}
			if (!base.movingLeft && !flag2 && !canLoopAround)
			{
				base.movingLeft = true;
				canLoopAround = CheckIfCanLoop(atEndOfBoard, base.movingLeft, flag, flag2, ((AbilityBehaviour)this).Card.Slot, slotsCopy.First(), slotsCopy.Last());
			}
			((Card)((AbilityBehaviour)this).Card).RenderInfo.SetAbilityFlipped(((AbilityBehaviour)this).Ability, base.movingLeft);
			((Card)((AbilityBehaviour)this).Card).RenderInfo.flippedPortrait = base.movingLeft && ((Card)((AbilityBehaviour)this).Card).Info.flipPortraitForStrafe;
			((Card)((AbilityBehaviour)this).Card).RenderCard();
			CardSlot destination;
			bool destinationValid;
			if (canLoopAround)
			{
				destination = (base.movingLeft ? slotsCopy.Last() : slotsCopy.First());
				destinationValid = (Object)(object)destination.Card == (Object)null;
			}
			else
			{
				destination = (base.movingLeft ? toLeft : toRight);
				destinationValid = (base.movingLeft ? flag : flag2);
			}
			yield return (object)new WaitForSeconds(0.05f);
			yield return ((AbilityBehaviour)this).PreSuccessfulTriggerSequence();
			if ((Object)(object)destination != (Object)null && destinationValid)
			{
				if (canLoopAround)
				{
					yield return LoopToSlot(destination, oldSlot);
					yield return ((AbilityBehaviour)this).LearnAbility(0f);
				}
				else
				{
					yield return MoveToSlot(destination, oldSlot);
				}
			}
			else
			{
				((Card)((AbilityBehaviour)this).Card).Anim.StrongNegationEffect();
				yield return (object)new WaitForSeconds(0.15f);
			}
		}

		private IEnumerator LoopToSlot(CardSlot destination, CardSlot oldSlot)
		{
			Vector3 val = (((AbilityBehaviour)this).Card.Slot.IsPlayerSlot ? Vector3.back : Vector3.forward);
			Tween.Position(((Component)((AbilityBehaviour)this).Card).transform, ((Component)((AbilityBehaviour)this).Card).transform.position + val * 2f + Vector3.up * 0.25f, 0.15f, 0f, Tween.EaseOut, (LoopType)0, (Action)null, (Action)null, true);
			yield return (object)new WaitForSeconds(0.15f);
			Tween.Position(((Component)((AbilityBehaviour)this).Card).transform, new Vector3(((Component)destination).transform.position.x, ((Component)((AbilityBehaviour)this).Card).transform.position.y, ((Component)((AbilityBehaviour)this).Card).transform.position.z), 0.1f, 0f, (AnimationCurve)null, (LoopType)0, (Action)null, (Action)null, true);
			yield return (object)new WaitForSeconds(0.1f);
			yield return Singleton<BoardManager>.Instance.AssignCardToSlot(((AbilityBehaviour)this).Card, destination, 0.1f, (Action)null, true);
			yield return <>n__0(oldSlot);
			yield return (object)new WaitForSeconds(0.25f);
		}

		private IEnumerator MoveToSlot(CardSlot destination, CardSlot oldSlot)
		{
			yield return Singleton<BoardManager>.Instance.AssignCardToSlot(((AbilityBehaviour)this).Card, destination, 0.1f, (Action)null, true);
			yield return <>n__0(oldSlot);
			yield return (object)new WaitForSeconds(0.25f);
		}

		private static bool CheckIfCanLoop(bool atEndOfBoard, bool movingLeft, bool canMoveLeft, bool canMoveRight, CardSlot originalSlot, CardSlot firstSlot, CardSlot lastSlot)
		{
			if (atEndOfBoard)
			{
				if (movingLeft && !canMoveLeft && (Object)(object)originalSlot == (Object)(object)firstSlot)
				{
					return (Object)(object)lastSlot.Card == (Object)null;
				}
				if (!movingLeft && !canMoveRight && (Object)(object)originalSlot == (Object)(object)lastSlot)
				{
					return (Object)(object)firstSlot.Card == (Object)null;
				}
			}
			return false;
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private IEnumerator <>n__0(CardSlot oldSlot)
		{
			return ((Strafe)this).PostSuccessfulMoveSequence(oldSlot);
		}
	}
	public class FalseThrone : ActivatedSelectSlotBehaviour
	{
		public static Ability ability;

		public override Ability Ability => ability;

		public override Ability LatchAbility => Neutered.ability;

		public override int StartingHealthCost => 1;

		public override int TurnDelay => 1;

		public override bool IsValidTarget(CardSlot slot)
		{
			if (!base.IsValidTarget(slot))
			{
				return false;
			}
			return CardExtensions.LacksAllTraits(slot.Card, (Trait[])(object)new Trait[2]
			{
				(Trait)16,
				(Trait)14
			});
		}

		public override IEnumerator OnValidTargetSelected(CardSlot slot)
		{
			if (!((Object)(object)slot != (Object)null) || !((Object)(object)slot.Card != (Object)null))
			{
				yield break;
			}
			object obj = ((Card)slot.Card).Info.Clone();
			CardInfo cardInfo = (CardInfo)((obj is CardInfo) ? obj : null);
			foreach (CardModificationInfo mod in cardInfo.Mods)
			{
				mod.bloodCostAdjustment = 0;
				mod.bonesCostAdjustment = 0;
				mod.energyCostAdjustment = 0;
				mod.addGemCost = new List<GemType>();
			}
			CardExtensions.SetCost(cardInfo, (int?)0, (int?)0, (int?)0, new List<GemType>());
			((Card)slot.Card).Anim.LightNegationEffect();
			slot.Card.AddTemporaryMod(new CardModificationInfo(LatchAbility)
			{
				singletonId = "wstl:EmeraldNeuter"
			});
			yield return (object)new WaitForSeconds(0.75f);
			yield return HelperMethods.ChangeCurrentView((View)1);
			yield return Singleton<CardSpawner>.Instance.SpawnCardToHand(cardInfo, (List<CardModificationInfo>)