NikoCharacterMod.dll

Decompiled 8 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using AddWatermark;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Logging;
using Cysharp.Threading.Tasks;
using HarmonyLib;
using LBoL.Base;
using LBoL.Base.Extensions;
using LBoL.ConfigData;
using LBoL.Core;
using LBoL.Core.Battle;
using LBoL.Core.Battle.BattleActions;
using LBoL.Core.Battle.Interactions;
using LBoL.Core.Cards;
using LBoL.Core.Randoms;
using LBoL.Core.StatusEffects;
using LBoL.Core.Units;
using LBoL.EntityLib.Cards.Neutral.Black;
using LBoL.EntityLib.Exhibits;
using LBoL.EntityLib.StatusEffects.Basic;
using LBoL.EntityLib.StatusEffects.Enemy;
using LBoLEntitySideloader;
using LBoLEntitySideloader.Attributes;
using LBoLEntitySideloader.Entities;
using LBoLEntitySideloader.Resource;
using LBoLEntitySideloader.Utils;
using NikoCharacterMod.Status;
using NikoCharacterMod.Util;
using UnityEngine;
using UnityEngine.Experimental.Rendering;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: IgnoresAccessChecksTo("LBoL.Base")]
[assembly: IgnoresAccessChecksTo("LBoL.ConfigData")]
[assembly: IgnoresAccessChecksTo("LBoL.Core")]
[assembly: IgnoresAccessChecksTo("LBoL.EntityLib")]
[assembly: IgnoresAccessChecksTo("LBoL.Presentation")]
[assembly: IgnoresAccessChecksTo("Untitled.ConfigDataBuilder.Base")]
[assembly: AssemblyCompany("NikoCharacterMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("NikoCharacterMod")]
[assembly: AssemblyTitle("NikoCharacterMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace NikoCharacterMod
{
	[BepInPlugin("niko-character-nikocharacter", "Niko Character Mod", "1.0.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInProcess("LBoL.exe")]
	public class BepinexPlugin : BaseUnityPlugin
	{
		private static readonly Harmony harmony = PInfo.harmony;

		internal static ManualLogSource log;

		internal static TemplateSequenceTable sequenceTable = new TemplateSequenceTable(0);

		internal static IResourceSource embeddedSource = (IResourceSource)new EmbeddedSource(Assembly.GetExecutingAssembly());

		internal static DirectorySource directorySource = new DirectorySource("niko-character-nikocharacter", "");

		internal static BatchLocalization cardbatchloc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(CardTemplate), "Cards", (Locale)0, false);

		internal static BatchLocalization sebatchloc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(StatusEffectTemplate), "Status", (Locale)0, false);

		internal static BatchLocalization exbatchloc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(ExhibitTemplate), "Exhibit", (Locale)0, false);

		internal static BatchLocalization playerbatchloc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(PlayerUnitTemplate), "PlayerUnit", (Locale)0, false);

		internal static BatchLocalization modelbatchloc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(UnitModelTemplate), "UnitModel", (Locale)0, false);

		private void Awake()
		{
			log = ((BaseUnityPlugin)this).Logger;
			Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
			((Object)((Component)this).gameObject).hideFlags = (HideFlags)61;
			EntityManager.RegisterSelf();
			harmony.PatchAll();
			if (Chainloader.PluginInfos.ContainsKey("neo.lbol.tools.watermark"))
			{
				WatermarkWrapper.ActivateWatermark();
			}
		}

		private void OnDestroy()
		{
			if (harmony != null)
			{
				harmony.UnpatchSelf();
			}
		}
	}
	public sealed class NikoPlayerDef : PlayerUnitTemplate
	{
		[EntityLogic(typeof(NikoPlayerDef))]
		public sealed class Niko : PlayerUnit
		{
		}

		public static DirectorySource dir = new DirectorySource("neo.lbol.frameworks.entitySideloader", "Niko");

		public static string name = "Niko";

		public override IdContainer GetId()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("Niko");
		}

		public override LocalizationOption LoadLocalization()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource);
			val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this);
			return (LocalizationOption)(object)val;
		}

		public override PlayerImages LoadPlayerImages()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			PlayerImages val = new PlayerImages();
			val.AutoLoad("", (Func<string, Sprite>)((string s) => ResourceLoader.LoadSprite(s, (IResourceSource)(object)dir, 100, 1, (FilterMode)1, true, (Rect?)null, (Vector2?)null)), (Func<string, UniTask<Sprite>>)((string s) => ResourceLoader.LoadSpriteAsync(s, dir, 100, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://")), (UseSame)2, ".png", "");
			UniTask<Sprite> value = ResourceLoader.LoadSpriteAsync("niko.png", BepinexPlugin.directorySource, 100, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://");
			val.SetStartPanelStand((UniTask<Sprite>?)value, (Func<Sprite>)null);
			val.SetWinStand((UniTask<Sprite>?)value, (Func<Sprite>)null);
			val.SetDeckStand((UniTask<Sprite>?)value, (Func<Sprite>)null);
			return val;
		}

		public override PlayerUnitConfig MakeConfig()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Expected O, but got Unknown
			PlayerUnitConfig val = ObjectExtensions.Copy<PlayerUnitConfig>(PlayerUnitConfig.FromId("Reimu"));
			int? num = 0;
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).White = 2;
			((ManaGroup)(ref val2)).Black = 2;
			return new PlayerUnitConfig("", 6, 0, num, "", "#521fd1", true, 70, val2, 10, 0, val.UltimateSkillA, val.UltimateSkillB, "ShiningSun", "ShatteredSun", (IReadOnlyList<string>)new List<string> { "Shoot", "Shoot", "Boundary", "Boundary", "ReimuAttackW", "ReimuAttackW", "MarisaBlockB", "MarisaBlockB", "MarisaBlockB", "WhereTheresLight" }, (IReadOnlyList<string>)new List<string> { "Shoot", "Shoot", "Boundary", "Boundary", "MarisaAttackB", "MarisaAttackB", "ReimuBlockW", "ReimuBlockW", "ReimuBlockW", "LightsOut" }, 3, 3);
		}
	}
	public sealed class NikoModelDef : UnitModelTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return ((EntityDefinition)new NikoPlayerDef()).UniqueId;
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)toolbox.LocalizationModel(BepinexPlugin.directorySource);
		}

		public override ModelOption LoadModelOptions()
		{
			//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_0036: Expected O, but got Unknown
			return new ModelOption(ResourceLoader.LoadSpriteAsync("Niko_Sprite.png", BepinexPlugin.directorySource, 240, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://"));
		}

		public override UniTask<Sprite> LoadSpellSprite()
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			return ResourceLoader.LoadSpriteAsync("Niko_Sprite.png", NikoPlayerDef.dir, 1200, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://");
		}

		public override UnitModelConfig MakeConfig()
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			UnitModelConfig val = ObjectExtensions.Copy<UnitModelConfig>(UnitModelConfig.FromName("Reimu"));
			val.Flip = true;
			val.Type = 0;
			val.Offset = new Vector2(0f, 0.04f);
			return val;
		}
	}
	public static class PInfo
	{
		public const string GUID = "niko-character-nikocharacter";

		public const string Name = "Niko Character Mod";

		public const string version = "1.0.0";

		public static readonly Harmony harmony = new Harmony("niko-character-nikocharacter");
	}
	internal class WatermarkWrapper
	{
		[MethodImpl(MethodImplOptions.NoInlining)]
		internal static void ActivateWatermark()
		{
			API.ActivateWatermark();
		}
	}
}
namespace NikoCharacterMod.Util
{
	public class NikoCardBase : Card
	{
		public string GetShadedText
		{
			get
			{
				if (((Card)this).Battle == null)
				{
					return ShadedText();
				}
				return ShadedText(((Card)this).Battle.Player);
			}
		}

		public static string ShadedText(PlayerUnit player)
		{
			if (!((Unit)player).HasStatusEffect<SolsticeSE>())
			{
				return "Shadow";
			}
			return "Status Card";
		}

		public static string ShadedText()
		{
			return "Shadow";
		}
	}
	public abstract class toolbox
	{
		public static bool IsShaded(PlayerUnit player, Card card)
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Invalid comparison between Unknown and I4
			if (!((Unit)player).HasStatusEffect<SolsticeSE>())
			{
				if (card is Shadow)
				{
					return true;
				}
			}
			else if ((int)card.CardType == 7)
			{
				return true;
			}
			return false;
		}

		public static GlobalLocalization loccard()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			GlobalLocalization val = new GlobalLocalization(BepinexPlugin.embeddedSource);
			val.LocalizationFiles.AddLocaleFile((Locale)0, "CardsEn.yaml");
			return val;
		}

		public static GlobalLocalization locse()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			GlobalLocalization val = new GlobalLocalization(BepinexPlugin.embeddedSource);
			val.LocalizationFiles.AddLocaleFile((Locale)0, "StatusEn.yaml");
			return val;
		}

		public static GlobalLocalization locex()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			GlobalLocalization val = new GlobalLocalization(BepinexPlugin.embeddedSource);
			val.LocalizationFiles.AddLocaleFile((Locale)0, "ExhibitEn.yaml");
			return val;
		}

		public static GlobalLocalization locplayer()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			GlobalLocalization val = new GlobalLocalization(BepinexPlugin.embeddedSource);
			val.LocalizationFiles.AddLocaleFile((Locale)0, "PlayerUnitEn.yaml");
			return val;
		}

		public static GlobalLocalization LocalizationModel(DirectorySource dirsorc)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)dirsorc);
			val.LocalizationFiles.AddLocaleFile((Locale)0, "UnitModelEn.yaml");
			return val;
		}
	}
}
namespace NikoCharacterMod.Status
{
	public sealed class BlackoutSEDef : StatusEffectTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("BlackoutSE");
		}

		[DontOverwrite]
		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)toolbox.LocalizationModel(BepinexPlugin.directorySource);
		}

		[DontOverwrite]
		public override Sprite LoadSprite()
		{
			return ResourceLoader.LoadSprite("BlackoutSE.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null);
		}

		public override StatusEffectConfig MakeConfig()
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Expected O, but got Unknown
			return new StatusEffectConfig(0, "", 10, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default");
		}
	}
	[EntityLogic(typeof(BlackoutSEDef))]
	public sealed class BlackoutSE : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<CardEventArgs>(((StatusEffect)this).Battle.CardExiled, (EventSequencedReactor<CardEventArgs>)OnCardExiled);
		}

		public IEnumerable<BattleAction> OnCardExiled(CardEventArgs args)
		{
			if ((int)((GameEventArgs)args).Cause != 3 && !(args.Card is Shadow))
			{
				List<Card> list = new List<Card>();
				for (int i = 0; i < ((StatusEffect)this).Level; i++)
				{
					Shadow shadow = Library.CreateCard<Shadow>();
					list.Add((Card)(object)shadow);
				}
				((StatusEffect)this).NotifyActivating();
				yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)list, (AddCardsType)0);
			}
		}
	}
	public sealed class NullPointerSEDef : StatusEffectTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("NullPointerSE");
		}

		[DontOverwrite]
		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)toolbox.LocalizationModel(BepinexPlugin.directorySource);
		}

		[DontOverwrite]
		public override Sprite LoadSprite()
		{
			return ResourceLoader.LoadSprite("NullPointerSE.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null);
		}

		public override StatusEffectConfig MakeConfig()
		{
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Expected O, but got Unknown
			return new StatusEffectConfig(0, "", 1000, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default");
		}
	}
	[EntityLogic(typeof(NullPointerSEDef))]
	public sealed class NullPointerSE : StatusEffect
	{
		private List<string> TemporaryStatuses = new List<string>();

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnTurnStarted);
		}

		public IEnumerable<BattleAction> OnTurnStarted(UnitEventArgs args)
		{
			List<StatusEffect> tempse = new List<StatusEffect>();
			foreach (string tempstatusname in TemporaryStatuses)
			{
				foreach (StatusEffect status2 in ((StatusEffect)this).Owner.StatusEffects)
				{
					if (((GameEntity)status2).Id == tempstatusname)
					{
						tempse.Add(status2);
					}
				}
			}
			foreach (StatusEffect status3 in tempse)
			{
				status3.Level -= 1;
				if (status3.Level < 1)
				{
					yield return (BattleAction)new RemoveStatusEffectAction(status3, true, 0.1f);
				}
			}
			TemporaryStatuses.Clear();
			for (int i = 0; i < ((StatusEffect)this).Level; i++)
			{
				List<(Type StatusEffectType, StatusEffectConfig)> effects = (from status in Library.EnumerateStatusEffectTypes()
					where status.Item2.HasLevel
					select status).ToList();
				int idx = ((GameEntity)this).GameRun.BattleCardRng.NextInt(0, effects.Count());
				StatusEffectConfig randomse = effects[idx].Item2;
				TemporaryStatuses.Add(randomse.Id);
				yield return (BattleAction)new ApplyStatusEffectAction(((object)Library.CreateStatusEffect(randomse.Id)).GetType(), (Unit)(object)((StatusEffect)this).Battle.Player, (int?)1, (int?)null, (int?)null, (int?)null, 0f, true);
			}
		}
	}
	public sealed class SolsticeSEDef : StatusEffectTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("SolsticeSE");
		}

		[DontOverwrite]
		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)toolbox.LocalizationModel(BepinexPlugin.directorySource);
		}

		[DontOverwrite]
		public override Sprite LoadSprite()
		{
			return ResourceLoader.LoadSprite("SolsticeSE.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null);
		}

		public override StatusEffectConfig MakeConfig()
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Expected O, but got Unknown
			return new StatusEffectConfig(0, "", 10, (StatusEffectType)0, false, false, (int?)null, false, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default");
		}
	}
	[EntityLogic(typeof(SolsticeSEDef))]
	public sealed class SolsticeSE : StatusEffect
	{
	}
}
namespace NikoCharacterMod.Exhibits
{
	public sealed class ShatteredSunDefinition : ExhibitTemplate
	{
		[EntityLogic(typeof(ShatteredSunDefinition))]
		public sealed class ShatteredSun : ShiningExhibit
		{
			protected override void OnEnterBattle()
			{
				((Exhibit)this).ReactBattleEvent<CardsAddingToDrawZoneEventArgs>(((Exhibit)this).Battle.CardsAddingToDrawZone, (EventSequencedReactor<CardsAddingToDrawZoneEventArgs>)CardsAdded_Draw);
				((Exhibit)this).ReactBattleEvent<CardsEventArgs>(((Exhibit)this).Battle.CardsAddingToDiscard, (EventSequencedReactor<CardsEventArgs>)CardsAdded);
				((Exhibit)this).ReactBattleEvent<CardsEventArgs>(((Exhibit)this).Battle.CardsAddingToHand, (EventSequencedReactor<CardsEventArgs>)CardsAdded);
			}

			private void CardAdded(Card card)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Invalid comparison between Unknown and I4
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				//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)
				//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_003c: Unknown result type (might be due to invalid IL or missing references)
				if ((int)card.CardType != 7)
				{
					ManaGroup cost = card.Cost;
					ManaColor maxColor = ((ManaGroup)(ref cost)).MaxColor;
					cost = card.Cost;
					card.DecreaseTurnCost(ManaGroup.FromComponents((IEnumerable<ManaColor>)CollectionsExtensions.SampleManyOrAll<ManaColor>(((ManaGroup)(ref cost)).EnumerateComponents(), 1, card.BattleRng)));
					((GameEntity)card).NotifyChanged();
				}
			}

			private IEnumerable<BattleAction> CardsAdded_Draw(CardsAddingToDrawZoneEventArgs args)
			{
				Card[] cards = args.Cards;
				foreach (Card card in cards)
				{
					((Exhibit)this).NotifyActivating();
					CardAdded(card);
				}
				yield break;
			}

			private IEnumerable<BattleAction> CardsAdded(CardsEventArgs args)
			{
				Card[] cards = args.Cards;
				foreach (Card card in cards)
				{
					CardAdded(card);
					((Exhibit)this).NotifyActivating();
				}
				yield break;
			}
		}

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("ShatteredSun");
		}

		public override LocalizationOption LoadLocalization()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource);
			val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this);
			return (LocalizationOption)(object)val;
		}

		public override ExhibitSprites LoadSprite()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			string folder = "Resources.";
			ExhibitSprites val = new ExhibitSprites();
			Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null);
			val.main = func("");
			return val;
		}

		public override ExhibitConfig MakeConfig()
		{
			//IL_002f: 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_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Expected O, but got Unknown
			int? num = 1;
			ManaGroup value = default(ManaGroup);
			((ManaGroup)(ref value)).Colorless = 1;
			return new ExhibitConfig(0, "", 10, false, false, false, false, (AppearanceType)3, "Niko", (ExhibitLosableType)1, (Rarity)3, num, (int?)null, (int?)null, (ManaGroup?)value, (ManaColor?)null, (ManaColor?)(ManaColor)3, 1, false, (int?)null, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class ShiningSunDefinition : ExhibitTemplate
	{
		[EntityLogic(typeof(ShiningSunDefinition))]
		public sealed class ShiningSun : ShiningExhibit
		{
			protected override void OnEnterBattle()
			{
				((Exhibit)this).ReactBattleEvent<CardEventArgs>(((Exhibit)this).Battle.CardExiled, (EventSequencedReactor<CardEventArgs>)CardExiled);
				((Exhibit)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Owner).TurnStarted, (EventSequencedReactor<UnitEventArgs>)TurnStarted);
			}

			private IEnumerable<BattleAction> CardExiled(CardEventArgs args)
			{
				if (toolbox.IsShaded(((Exhibit)this).Battle.Player, args.Card) && ((Exhibit)this).Counter > 0)
				{
					((Exhibit)this).NotifyActivating();
					int counter = ((Exhibit)this).Counter;
					((Exhibit)this).Counter = counter - 1;
					ManaGroup val = default(ManaGroup);
					((ManaGroup)(ref val)).Colorless = 1;
					yield return (BattleAction)new GainManaAction(val);
				}
			}

			private IEnumerable<BattleAction> TurnStarted(UnitEventArgs args)
			{
				((Exhibit)this).Counter = ((Exhibit)this).Value1;
				yield break;
			}
		}

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("ShiningSun");
		}

		public override LocalizationOption LoadLocalization()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource);
			val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this);
			return (LocalizationOption)(object)val;
		}

		public override ExhibitSprites LoadSprite()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			string folder = "Resources.";
			ExhibitSprites val = new ExhibitSprites();
			Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null);
			val.main = func("");
			return val;
		}

		public override ExhibitConfig MakeConfig()
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Expected O, but got Unknown
			int? num = 10;
			ManaGroup value = default(ManaGroup);
			((ManaGroup)(ref value)).Colorless = 1;
			return new ExhibitConfig(0, "", 10, false, false, false, false, (AppearanceType)3, "Niko", (ExhibitLosableType)1, (Rarity)3, num, (int?)null, (int?)null, (ManaGroup?)value, (ManaColor?)null, (ManaColor?)(ManaColor)1, 1, true, (int?)10, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string> { "Shadow" });
		}
	}
}
namespace NikoCharacterMod.CardsW
{
	public sealed class BlindingLightDef : CardTemplate
	{
		[EntityLogic(typeof(BlindingLightDef))]
		public sealed class BlindingLight : NikoCardBase
		{
			protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				foreach (EnemyUnit Unit in ((Card)this).Battle.AllAliveEnemies)
				{
					yield return (BattleAction)(object)new ApplyStatusEffectAction<TempFirepowerNegative>((Unit)(object)Unit, (int?)((Card)this).Value1, (int?)null, (int?)null, (int?)null, 0f, true);
				}
				yield return (BattleAction)(object)new ApplyStatusEffectAction<TempFirepowerNegative>((Unit)(object)((Card)this).Battle.Player, (int?)((Card)this).Value1, (int?)null, (int?)null, (int?)null, 0f, true);
			}
		}

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("BlindingLight");
		}

		public override CardImages LoadCardImages()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			CardImages val = new CardImages(BepinexPlugin.embeddedSource);
			val.AutoLoad((CardTemplate)(object)this, ".png", "", false);
			return val;
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.cardbatchloc.AddEntity((EntityDefinition)(object)this);
		}

		public override CardConfig MakeConfig()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)5;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)1 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).White = 1;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 1;
			return new CardConfig(13060, "", 10, true, array, "Simple1", "Simple1", 0, true, true, true, false, true, (Rarity)0, (CardType)3, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)4, (int?)6, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)0, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "TempFirepowerNegative" }, (IReadOnlyList<string>)new List<string> { "TempFirepowerNegative" }, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "Niko", "", "", true, "", (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class FlareDef : CardTemplate
	{
		[EntityLogic(typeof(FlareDef))]
		public sealed class Flare : NikoCardBase
		{
			protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				List<Card> shadows = new List<Card>();
				foreach (Card card3 in ((Card)this).Battle._handZone)
				{
					if (toolbox.IsShaded(((Card)this).Battle.Player, card3))
					{
						shadows.Add(card3);
					}
				}
				if (((Card)this).IsUpgraded)
				{
					foreach (Card card2 in ((Card)this).Battle._discardZone)
					{
						if (toolbox.IsShaded(((Card)this).Battle.Player, card2))
						{
							shadows.Add(card2);
						}
					}
					foreach (Card card in ((Card)this).Battle._drawZone)
					{
						if (toolbox.IsShaded(((Card)this).Battle.Player, card))
						{
							shadows.Add(card);
						}
					}
				}
				yield return (BattleAction)new ExileManyCardAction((IEnumerable<Card>)shadows);
			}
		}

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("Flare");
		}

		public override CardImages LoadCardImages()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			CardImages val = new CardImages(BepinexPlugin.embeddedSource);
			val.AutoLoad((CardTemplate)(object)this, ".png", "", false);
			return val;
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.cardbatchloc.AddEntity((EntityDefinition)(object)this);
		}

		public override CardConfig MakeConfig()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)0;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)1 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).White = 1;
			((ManaGroup)(ref val2)).Any = 2;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).White = 1;
			((ManaGroup)(ref val2)).Any = 1;
			return new CardConfig(13060, "", 10, true, array, "Simple1", "Simple1", 0, true, true, true, false, true, (Rarity)1, (CardType)3, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)131072, (Keyword)131072, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string> { "Shadow" }, (IReadOnlyList<string>)new List<string>(), "Niko", "", "", true, "Nightmargin", (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class GlowingEyesDef : CardTemplate
	{
		[EntityLogic(typeof(GlowingEyesDef))]
		public sealed class GlowingEyes : NikoCardBase
		{
			protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				yield return (BattleAction)(object)new ApplyStatusEffectAction<AmuletForCard>((Unit)(object)((Card)this).Battle.Player, (int?)((Card)this).Value1, (int?)null, (int?)null, (int?)null, 0f, true);
			}
		}

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("GlowingEyes");
		}

		public override CardImages LoadCardImages()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			CardImages val = new CardImages(BepinexPlugin.embeddedSource);
			val.AutoLoad((CardTemplate)(object)this, ".png", "", false);
			return val;
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.cardbatchloc.AddEntity((EntityDefinition)(object)this);
		}

		public override CardConfig MakeConfig()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)0;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)1 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).White = 1;
			((ManaGroup)(ref val2)).Any = 1;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 2;
			return new CardConfig(13060, "", 10, true, array, "札弹射击", "札弹射击B", 0, false, true, true, false, true, (Rarity)0, (CardType)2, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)2, (int?)5, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)0, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "AmuletForCard" }, (IReadOnlyList<string>)new List<string> { "AmuletForCard" }, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "Niko", "", "", true, "", (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class LightTheWayDef : CardTemplate
	{
		[EntityLogic(typeof(LightTheWayDef))]
		public sealed class LightTheWay : NikoCardBase
		{
			protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				for (int i = ((Card)this).Value1; i > 0; i--)
				{
					if (((Card)this).Battle._drawZone.Count() == 0)
					{
						yield return (BattleAction)new ReshuffleAction();
					}
					Card Draw = ((Card)this).Battle._drawZone.First();
					yield return (BattleAction)new DrawSelectedCardAction(Draw);
					if (toolbox.IsShaded(((Card)this).Battle.Player, Draw))
					{
						Draw.NotifyActivating();
						yield return ((Card)this).DefenseAction(true);
					}
				}
			}
		}

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("LightTheWay");
		}

		public override CardImages LoadCardImages()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			CardImages val = new CardImages(BepinexPlugin.embeddedSource);
			val.AutoLoad((CardTemplate)(object)this, ".png", "", false);
			return val;
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.cardbatchloc.AddEntity((EntityDefinition)(object)this);
		}

		public override CardConfig MakeConfig()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)0;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)1 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).White = 2;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).White = 1;
			((ManaGroup)(ref val2)).Any = 1;
			return new CardConfig(13060, "", 10, true, array, "Simple1", "Simple1", 0, true, true, true, false, true, (Rarity)1, (CardType)3, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)5, (int?)5, (int?)null, (int?)null, (int?)3, (int?)5, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)0, false, (Keyword)131072, (Keyword)131072, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string> { "Shadow" }, (IReadOnlyList<string>)new List<string> { "Shadow" }, "Niko", "", "", true, "Nightmargin", (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class OnLittleCatFeetDef : CardTemplate
	{
		[EntityLogic(typeof(OnLittleCatFeetDef))]
		public sealed class OnLittleCatFeet : NikoCardBase
		{
			protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				yield return (BattleAction)(object)new ApplyStatusEffectAction<Graze>((Unit)(object)((Card)this).Battle.Player, (int?)1, (int?)1, (int?)((Card)this).Value1, (int?)null, 0f, true);
			}
		}

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("OnLittleCatFeet");
		}

		public override CardImages LoadCardImages()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			CardImages val = new CardImages(BepinexPlugin.embeddedSource);
			val.AutoLoad((CardTemplate)(object)this, ".png", "", false);
			return val;
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.cardbatchloc.AddEntity((EntityDefinition)(object)this);
		}

		public override CardConfig MakeConfig()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)1;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)1 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).White = 1;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 1;
			return new CardConfig(13060, "", 10, true, array, "札弹射击", "札弹射击B", 0, true, true, true, false, true, (Rarity)0, (CardType)2, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)1, (int?)2, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)0, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "Graze" }, (IReadOnlyList<string>)new List<string> { "Graze" }, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "Niko", "", "", true, "", (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class ShineDef : CardTemplate
	{
		[EntityLogic(typeof(ShineDef))]
		public sealed class Shine : NikoCardBase
		{
			public Card oneTargetHand;

			public override Interaction Precondition()
			{
				//IL_005c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0062: Expected O, but got Unknown
				List<Card> list = ((Card)this).Battle.HandZone.Where((Card hand) => hand != this && hand.CanUpgradeAndPositive).ToList();
				if (list.Count == 1)
				{
					oneTargetHand = list[0];
				}
				if (list.Count <= 1)
				{
					return null;
				}
				return (Interaction)new SelectHandInteraction(1, ((Card)this).Value1, (IEnumerable<Card>)list);
			}

			protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				if (precondition != null)
				{
					IReadOnlyList<Card> cards = ((SelectHandInteraction)precondition).SelectedCards;
					if (!CollectionsExtensions.Empty<Card>((IReadOnlyCollection<Card>)cards))
					{
						yield return (BattleAction)new UpgradeCardsAction((IEnumerable<Card>)cards);
						IEnumerable<Card> shadows = (IEnumerable<Card>)Library.CreateCards<Shadow>(cards.Count, false);
						yield return (BattleAction)new AddCardsToDrawZoneAction(shadows, (DrawZoneTarget)2, (AddCardsType)0);
					}
				}
				else if (oneTargetHand != null)
				{
					yield return (BattleAction)new UpgradeCardAction(oneTargetHand);
					yield return (BattleAction)new AddCardsToDrawZoneAction((IEnumerable<Card>)Library.CreateCards<Shadow>(1, false), (DrawZoneTarget)2, (AddCardsType)0);
					oneTargetHand = null;
				}
			}
		}

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("Shine");
		}

		public override CardImages LoadCardImages()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			CardImages val = new CardImages(BepinexPlugin.embeddedSource);
			val.AutoLoad((CardTemplate)(object)this, ".png", "", false);
			return val;
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.cardbatchloc.AddEntity((EntityDefinition)(object)this);
		}

		public override CardConfig MakeConfig()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)0;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)1 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).White = 1;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).White = 1;
			return new CardConfig(13060, "", 10, true, array, "Simple1", "Simple1", 0, true, true, true, false, true, (Rarity)1, (CardType)3, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)2, (int?)5, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)0, false, (Keyword)4096, (Keyword)4096, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string> { "Shadow" }, (IReadOnlyList<string>)new List<string> { "Shadow" }, "Niko", "", "", true, "Nightmargin", (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class SolsticeDef : CardTemplate
	{
		[EntityLogic(typeof(SolsticeDef))]
		public sealed class Solstice : NikoCardBase
		{
			protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				yield return ((Card)this).BuffAction<SolsticeSE>(1, 0, 0, 0, 0.2f);
			}
		}

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("Solstice");
		}

		public override CardImages LoadCardImages()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			CardImages val = new CardImages(BepinexPlugin.embeddedSource);
			val.AutoLoad((CardTemplate)(object)this, ".png", "", false);
			return val;
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.cardbatchloc.AddEntity((EntityDefinition)(object)this);
		}

		public override CardConfig MakeConfig()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)0;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)1 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).White = 2;
			((ManaGroup)(ref val2)).Any = 3;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).White = 1;
			((ManaGroup)(ref val2)).Any = 4;
			return new CardConfig(13060, "", 10, true, array, "Simple1", "Simple1", 0, true, true, true, false, true, (Rarity)2, (CardType)4, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)0, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "SolsticeSE" }, (IReadOnlyList<string>)new List<string> { "SolsticeSE" }, (IReadOnlyList<string>)new List<string> { "Shadow" }, (IReadOnlyList<string>)new List<string> { "Shadow" }, "Niko", "", "", true, "Niko", (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class SunBathingDef : CardTemplate
	{
		[EntityLogic(typeof(SunBathingDef))]
		public sealed class SunBathing : NikoCardBase
		{
			protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				foreach (EnemyUnit Unit in ((Card)this).Battle.AllAliveEnemies)
				{
					yield return ((Card)this).AttackAction((Unit)(object)Unit);
				}
				IEnumerable<Card> shadows = (IEnumerable<Card>)Library.CreateCards<Shadow>(((Card)this).Battle.AllAliveEnemies.Count(), false);
				yield return (BattleAction)new AddCardsToDrawZoneAction(shadows, (DrawZoneTarget)2, (AddCardsType)0);
			}
		}

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("SunBathing");
		}

		public override CardImages LoadCardImages()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			CardImages val = new CardImages(BepinexPlugin.embeddedSource);
			val.AutoLoad((CardTemplate)(object)this, ".png", "", false);
			return val;
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.cardbatchloc.AddEntity((EntityDefinition)(object)this);
		}

		public override CardConfig MakeConfig()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)5;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)1 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).White = 2;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).White = 1;
			((ManaGroup)(ref val2)).Any = 1;
			return new CardConfig(13060, "", 10, true, array, "Simple1", "Simple1", 0, true, true, true, false, true, (Rarity)1, (CardType)1, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)14, (int?)22, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)0, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "Niko", "", "", true, "", (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class WhereTheresLightDef : CardTemplate
	{
		[EntityLogic(typeof(WhereTheresLightDef))]
		public sealed class WhereTheresLight : NikoCardBase
		{
			protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				yield return ((Card)this).AttackAction(selector, (GunPair)null);
				yield return (BattleAction)(object)new ApplyStatusEffectAction<Weak>((Unit)(object)selector._selectedEnemy, (int?)1, (int?)((Card)this).Value1, (int?)null, (int?)null, 0f, true);
				yield return (BattleAction)new AddCardsToHandAction((Card[])(object)new Card[1] { (Card)Library.CreateCard<Shadow>() });
			}
		}

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("WhereTheresLight");
		}

		public override CardImages LoadCardImages()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			CardImages val = new CardImages(BepinexPlugin.embeddedSource);
			val.AutoLoad((CardTemplate)(object)this, ".png", "", false);
			return val;
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.cardbatchloc.AddEntity((EntityDefinition)(object)this);
		}

		public override CardConfig MakeConfig()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a7: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)1;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)1 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).White = 2;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).White = 1;
			((ManaGroup)(ref val2)).Any = 1;
			return new CardConfig(13060, "", 10, true, array, "札弹射击", "札弹射击B", 0, false, true, true, false, true, (Rarity)0, (CardType)1, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)14, (int?)16, (int?)null, (int?)null, (int?)null, (int?)null, (int?)1, (int?)2, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)0, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "Weak" }, (IReadOnlyList<string>)new List<string> { "Weak" }, (IReadOnlyList<string>)new List<string> { "Shadow" }, (IReadOnlyList<string>)new List<string> { "Shadow" }, "Niko", "", "", true, "u/leoglucky", (IReadOnlyList<string>)new List<string>());
		}
	}
}
namespace NikoCharacterMod.CardsR
{
	public sealed class RueFriendDef : CardTemplate
	{
		[EntityLogic(typeof(RueFriendDef))]
		public sealed class RueFriend : NikoCardBase
		{
			public override IEnumerable<BattleAction> OnTurnStartedInHand()
			{
				return ((Card)this).GetPassiveActions();
			}

			public override IEnumerable<BattleAction> GetPassiveActions()
			{
				if (!((Card)this).Summoned || ((Card)this).Battle.BattleShouldEnd)
				{
					yield break;
				}
				((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).PassiveCost;
				for (int i = 0; i < ((Card)this).Battle.FriendPassiveTimes; i++)
				{
					if (((Card)this).Battle.BattleShouldEnd)
					{
						break;
					}
					List<Card> statuses = ((Card)this).Battle._handZone.FindAll(IsStatus);
					if (statuses.Count > 0)
					{
						((Card)this).NotifyActivating();
						yield return (BattleAction)new ExileManyCardAction((IEnumerable<Card>)CollectionsExtensions.SampleManyOrAll<Card>((IEnumerable<Card>)statuses, ((Card)this).Value1, ((Card)this).BattleRng));
						if (((Card)this).Loyalty <= 0)
						{
							yield return (BattleAction)new RemoveCardAction((Card)(object)this);
						}
					}
				}
			}

			private bool IsStatus(Card card)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Invalid comparison between Unknown and I4
				return (int)card.CardType == 7;
			}

			protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				if (precondition == null || (int)((MiniSelectCardInteraction)precondition).SelectedCard.FriendToken == 1)
				{
					yield return (BattleAction)(object)new ApplyStatusEffectAction<Amulet>((Unit)(object)((Card)this).Battle.Player, (int?)((Card)this).Value1, (int?)null, (int?)null, (int?)null, 0f, true);
					((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).ActiveCost;
				}
				else
				{
					yield return (BattleAction)(object)new ApplyStatusEffectAction<AmuletForCard>((Unit)(object)((Card)this).Battle.Player, (int?)((Card)this).Value2, (int?)null, (int?)null, (int?)null, 0f, true);
					((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).UltimateCost;
					yield return (BattleAction)new RemoveCardAction((Card)(object)this);
				}
			}
		}

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("RueFriend");
		}

		public override CardImages LoadCardImages()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			CardImages val = new CardImages(BepinexPlugin.embeddedSource);
			val.AutoLoad((CardTemplate)(object)this, ".png", "", false);
			return val;
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.cardbatchloc.AddEntity((EntityDefinition)(object)this);
		}

		public override CardConfig MakeConfig()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)0;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)4 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Red = 1;
			((ManaGroup)(ref val2)).Any = 1;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Red = 1;
			((ManaGroup)(ref val2)).Any = 1;
			return new CardConfig(13060, "", 10, true, array, "Simple1", "Simple1", 0, true, true, true, false, true, (Rarity)1, (CardType)5, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)1, (int?)2, (int?)3, (int?)5, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)2, (int?)4, (int?)1, (int?)1, (int?)(-3), (int?)(-2), (int?)(-6), (int?)(-5), (Keyword)0, (Keyword)0, false, (Keyword)131072, (Keyword)131072, (IReadOnlyList<string>)new List<string> { "Amulet", "AmuletForCard" }, (IReadOnlyList<string>)new List<string> { "Amulet", "AmuletForCard" }, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "Niko", "", "", true, "Nightmargin", (IReadOnlyList<string>)new List<string>());
		}
	}
}
namespace NikoCharacterMod.CardsG
{
	public sealed class CedricFriendDef : CardTemplate
	{
		[EntityLogic(typeof(CedricFriendDef))]
		public sealed class CedricFriend : NikoCardBase
		{
			public override IEnumerable<BattleAction> OnTurnStartedInHand()
			{
				return ((Card)this).GetPassiveActions();
			}

			public override IEnumerable<BattleAction> GetPassiveActions()
			{
				if (!((Card)this).Summoned || ((Card)this).Battle.BattleShouldEnd)
				{
					yield break;
				}
				((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).PassiveCost;
				for (int i = 0; i < ((Card)this).Battle.FriendPassiveTimes; i++)
				{
					if (((Card)this).Battle.BattleShouldEnd)
					{
						break;
					}
					if (!((Card)this).Battle.HandZone.All(CanNotBeUpgraded))
					{
						((Card)this).NotifyActivating();
						yield return ((Card)this).UpgradeRandomHandAction(((Card)this).Value1, (CardType)0);
					}
					if (((Card)this).Loyalty <= 0)
					{
						yield return (BattleAction)new RemoveCardAction((Card)(object)this);
					}
				}
			}

			private bool CanNotBeUpgraded(Card card)
			{
				return !card.CanUpgrade;
			}

			protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				if (precondition == null || (int)((MiniSelectCardInteraction)precondition).SelectedCard.FriendToken == 1)
				{
					Card tool2 = ((Card)this).Battle.RollCard(new CardWeightTable(RarityWeightTable.OnlyCommon, OwnerWeightTable.Valid, CardTypeWeightTable.OnlyTool), (Predicate<CardConfig>)null);
					tool2.DeckCounter = 1;
					yield return (BattleAction)new AddCardsToHandAction((Card[])(object)new Card[1] { tool2 });
					((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).ActiveCost;
				}
				else
				{
					Card tool = ((Card)this).Battle.RollCard(new CardWeightTable(RarityWeightTable.BattleCard, OwnerWeightTable.Valid, CardTypeWeightTable.OnlyTool), (Predicate<CardConfig>)null);
					tool.DeckCounter = 1;
					((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).UltimateCost;
					yield return (BattleAction)new AddCardsToDeckAction((Card[])(object)new Card[1] { tool });
					yield return (BattleAction)new RemoveCardAction((Card)(object)this);
				}
			}
		}

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("CedricFriend");
		}

		public override CardImages LoadCardImages()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			CardImages val = new CardImages(BepinexPlugin.embeddedSource);
			val.AutoLoad((CardTemplate)(object)this, ".png", "", false);
			return val;
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.cardbatchloc.AddEntity((EntityDefinition)(object)this);
		}

		public override CardConfig MakeConfig()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_016c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)0;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)5 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Green = 1;
			((ManaGroup)(ref val2)).Any = 1;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Green = 1;
			((ManaGroup)(ref val2)).Any = 1;
			return new CardConfig(13060, "", 10, true, array, "Simple1", "Simple1", 0, true, true, true, false, true, (Rarity)1, (CardType)5, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)1, (int?)2, (int?)3, (int?)5, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)2, (int?)4, (int?)1, (int?)1, (int?)(-3), (int?)(-2), (int?)(-7), (int?)(-6), (Keyword)4096, (Keyword)4096, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "Niko", "", "", true, "Nightmargin", (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class ProtoFriendDef : CardTemplate
	{
		[EntityLogic(typeof(ProtoFriendDef))]
		public sealed class ProtoFriend : NikoCardBase
		{
			public override IEnumerable<BattleAction> OnTurnEndingInHand()
			{
				return ((Card)this).GetPassiveActions();
			}

			public override IEnumerable<BattleAction> GetPassiveActions()
			{
				if (!((Card)this).Summoned || ((Card)this).Battle.BattleShouldEnd)
				{
					yield break;
				}
				((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).PassiveCost;
				for (int i = 0; i < ((Card)this).Battle.FriendPassiveTimes; i++)
				{
					if (((Card)this).Battle.BattleShouldEnd)
					{
						break;
					}
					((Card)this).NotifyActivating();
					yield return ((Card)this).AttackAction((Unit)(object)((Card)this).Battle.RandomAliveEnemy);
					if (((Card)this).Loyalty <= 0)
					{
						yield return (BattleAction)new RemoveCardAction((Card)(object)this);
					}
				}
			}

			private bool IsStatus(Card card)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Invalid comparison between Unknown and I4
				return (int)card.CardType == 7;
			}

			protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				if (precondition == null || (int)((MiniSelectCardInteraction)precondition).SelectedCard.FriendToken == 1)
				{
					foreach (EnemyUnit Unit in ((Card)this).Battle.AllAliveEnemies)
					{
						yield return (BattleAction)(object)new ApplyStatusEffectAction<TempFirepowerNegative>((Unit)(object)Unit, (int?)((Card)this).Value1, (int?)null, (int?)null, (int?)null, 0f, true);
					}
					((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).ActiveCost;
				}
				else
				{
					yield return (BattleAction)(object)new ApplyStatusEffectAction<DroneBlock>((Unit)(object)((Card)this).Battle.Player, (int?)((Card)this).Value2, (int?)null, (int?)null, (int?)null, 0f, true);
					((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).UltimateCost;
					yield return (BattleAction)new RemoveCardAction((Card)(object)this);
				}
			}
		}

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("ProtoFriend");
		}

		public override CardImages LoadCardImages()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			CardImages val = new CardImages(BepinexPlugin.embeddedSource);
			val.AutoLoad((CardTemplate)(object)this, ".png", "", false);
			return val;
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.cardbatchloc.AddEntity((EntityDefinition)(object)this);
		}

		public override CardConfig MakeConfig()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)3;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)2 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Blue = 1;
			((ManaGroup)(ref val2)).Any = 1;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Blue = 1;
			((ManaGroup)(ref val2)).Any = 1;
			return new CardConfig(13060, "", 10, true, array, "Simple1", "Simple1", 0, true, true, true, false, true, (Rarity)1, (CardType)5, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)8, (int?)12, (int?)null, (int?)null, (int?)null, (int?)null, (int?)5, (int?)8, (int?)8, (int?)8, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)2, (int?)4, (int?)1, (int?)1, (int?)(-3), (int?)(-2), (int?)(-6), (int?)(-5), (Keyword)0, (Keyword)0, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "DroneBlock", "TempFirepowerNegative" }, (IReadOnlyList<string>)new List<string> { "DroneBlock", "TempFirepowerNegative" }, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "Niko", "", "", true, "Nightmargin", (IReadOnlyList<string>)new List<string>());
		}
	}
}
namespace NikoCharacterMod.CardsB
{
	public sealed class AltDef : CardTemplate
	{
		[EntityLogic(typeof(AltDef))]
		public sealed class Alt : NikoCardBase
		{
			public override Interaction Precondition()
			{
				//IL_002b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0031: Expected O, but got Unknown
				List<Card> list = ((Card)this).Battle.HandZone.Where((Card hand) => hand != this).ToList();
				return (Interaction)new SelectHandInteraction(0, ((Card)this).Value1, (IEnumerable<Card>)list);
			}

			protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				if (precondition != null)
				{
					IReadOnlyList<Card> cards = ((SelectHandInteraction)precondition).SelectedCards;
					if (!CollectionsExtensions.Empty<Card>((IReadOnlyCollection<Card>)cards))
					{
						foreach (Card card in cards)
						{
							ManaGroup cost = card.Cost;
							_ = ((ManaGroup)(ref cost)).MaxColor;
							cost = card.Cost;
							card.DecreaseBaseCost(ManaGroup.FromComponents((IEnumerable<ManaColor>)CollectionsExtensions.SampleManyOrAll<ManaColor>(((ManaGroup)(ref cost)).EnumerateComponents(), 1, ((Card)this).BattleRng)));
							((GameEntity)card).NotifyChanged();
						}
					}
				}
				yield return (BattleAction)new AddCardsToDiscardAction((IEnumerable<Card>)Library.CreateCards<DelDef.Del>(1, ((Card)this).IsUpgraded), (AddCardsType)0);
			}
		}

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("Alt");
		}

		public override CardImages LoadCardImages()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			CardImages val = new CardImages(BepinexPlugin.embeddedSource);
			val.AutoLoad((CardTemplate)(object)this, ".png", "", false);
			return val;
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.cardbatchloc.AddEntity((EntityDefinition)(object)this);
		}

		public override CardConfig MakeConfig()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)0;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)3 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Black = 2;
			((ManaGroup)(ref val2)).Any = 1;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Black = 1;
			((ManaGroup)(ref val2)).Any = 2;
			return new CardConfig(13060, "", 10, true, array, "simple1", "simple1", 0, false, false, false, true, true, (Rarity)2, (CardType)3, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)1, (int?)1, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)131072, (Keyword)131072, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string> { "Del" }, (IReadOnlyList<string>)new List<string> { "Del+" }, "Niko", "", "", true, "", (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class BlackoutDef : CardTemplate
	{
		[EntityLogic(typeof(BlackoutDef))]
		public sealed class Blackout : NikoCardBase
		{
			protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				yield return ((Card)this).BuffAction<BlackoutSE>(1, 0, 0, 0, 0.2f);
			}
		}

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("Blackout");
		}

		public override CardImages LoadCardImages()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			CardImages val = new CardImages(BepinexPlugin.embeddedSource);
			val.AutoLoad((CardTemplate)(object)this, ".png", "", false);
			return val;
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.cardbatchloc.AddEntity((EntityDefinition)(object)this);
		}

		public override CardConfig MakeConfig()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)0;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)3 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Black = 2;
			((ManaGroup)(ref val2)).Any = 3;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Black = 1;
			((ManaGroup)(ref val2)).Any = 4;
			return new CardConfig(13060, "", 10, true, array, "Simple1", "Simple1", 0, true, true, true, false, true, (Rarity)2, (CardType)4, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)0, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "BlackoutSE" }, (IReadOnlyList<string>)new List<string> { "BlackoutSE" }, (IReadOnlyList<string>)new List<string> { "Shadow", "Solstice" }, (IReadOnlyList<string>)new List<string> { "Shadow", "Solstice" }, "Niko", "", "", false, "", (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class CombineDef : CardTemplate
	{
		[EntityLogic(typeof(CombineDef))]
		public sealed class Combine : NikoCardBase
		{
			public override Interaction Precondition()
			{
				//IL_0041: Unknown result type (might be due to invalid IL or missing references)
				//IL_0047: Expected O, but got Unknown
				List<Card> list = ((Card)this).Battle.DrawZone.Where((Card card) => card != this && (int)card.CardType != 5).ToList();
				if (list.Count <= 0)
				{
					return null;
				}
				return (Interaction)new SelectCardInteraction(2, ((Card)this).Value1, (IEnumerable<Card>)list, (SelectedCardHandling)0);
			}

			protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				SelectCardInteraction val = (SelectCardInteraction)precondition;
				IReadOnlyList<Card> selected = (((int)val != 0) ? val.SelectedCards : null);
				CombinedDef.Combined combined = Library.CreateCard<CombinedDef.Combined>(false);
				foreach (Card card in selected)
				{
					if (((GameEntity)card).BaseName == "Amalgamation")
					{
						combined.AddToStorage((CombinedDef.Combined)(object)card);
					}
					else
					{
						combined.AddToStorage(card);
					}
					yield return (BattleAction)new RemoveCardAction(card);
				}
				if (selected.Count > 0)
				{
					yield return (BattleAction)new AddCardsToHandAction((Card[])(object)new Card[1] { combined });
				}
			}
		}

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("Combine");
		}

		public override CardImages LoadCardImages()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			CardImages val = new CardImages(BepinexPlugin.embeddedSource);
			val.AutoLoad((CardTemplate)(object)this, ".png", "", false);
			return val;
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.cardbatchloc.AddEntity((EntityDefinition)(object)this);
		}

		public override CardConfig MakeConfig()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)0;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)3 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Black = 1;
			((ManaGroup)(ref val2)).Any = 2;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Black = 1;
			((ManaGroup)(ref val2)).Any = 2;
			return new CardConfig(13060, "", 10, true, array, "Simple1", "Simple1", 1, true, false, false, false, true, (Rarity)2, (CardType)3, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)2, (int?)3, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)0, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string> { "Combined" }, (IReadOnlyList<string>)new List<string> { "Combined" }, "Niko", "", "", true, "", (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class CombinedDef : CardTemplate
	{
		[EntityLogic(typeof(CombinedDef))]
		public sealed class Combined : NikoCardBase
		{
			public List<Card> StoredCards = new List<Card>();

			public string GetDesc
			{
				get
				{
					string text = "";
					foreach (Card storedCard in StoredCards)
					{
						string description = ((GameEntity)storedCard).Description;
						while (description.StartsWith(Environment.NewLine))
						{
							description.TrimStart(Environment.NewLine.ToCharArray());
						}
						text = text + Environment.NewLine + ((GameEntity)storedCard).Description;
						while (text.EndsWith(Environment.NewLine))
						{
							text.TrimEnd(Environment.NewLine.ToCharArray());
						}
					}
					if (text == "")
					{
						text = "No effect.";
					}
					return text;
				}
			}

			private void RecalculateCost()
			{
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				//IL_002c: Unknown result type (might be due to invalid IL or missing references)
				//IL_002e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0033: Unknown result type (might be due to invalid IL or missing references)
				//IL_0038: Unknown result type (might be due to invalid IL or missing references)
				//IL_0054: Unknown result type (might be due to invalid IL or missing references)
				//IL_0062: Unknown result type (might be due to invalid IL or missing references)
				//IL_0067: Unknown result type (might be due to invalid IL or missing references)
				//IL_006c: Unknown result type (might be due to invalid IL or missing references)
				//IL_006e: Unknown result type (might be due to invalid IL or missing references)
				((Card)this).DecreaseBaseCost(((Card)this).Cost);
				ManaGroup val = ManaGroup.Empty;
				foreach (Card storedCard in StoredCards)
				{
					val += storedCard.Cost;
				}
				val -= ManaGroup.Anys(StoredCards.Count / 2);
				((Card)this).IncreaseBaseCost(val);
			}

			public void AddToStorage(Card card)
			{
				StoredCards.Add(card);
				RecalculateCost();
			}

			public void AddToStorage(Combined card)
			{
				foreach (Card storedCard in card.StoredCards)
				{
					AddToStorage(storedCard);
				}
			}

			public void RemoveFromStorage(Card card)
			{
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				((Card)this).DecreaseBaseCost(card.Cost);
				StoredCards.Remove(card);
				RecalculateCost();
			}

			protected override void OnEnterBattle(BattleController battle)
			{
				((Card)this).ReactBattleEvent<CardMovingEventArgs>(battle.CardMoving, (EventSequencedReactor<CardMovingEventArgs>)OnCardMoving);
				((Card)this).ReactBattleEvent<CardEventArgs>(battle.CardExiling, (EventSequencedReactor<CardEventArgs>)OnCardExiling);
				((Card)this).ReactBattleEvent<CardEventArgs>(battle.CardRemoving, (EventSequencedReactor<CardEventArgs>)OnCardRemoving);
			}

			private IEnumerable<BattleAction> OnCardMoving(CardMovingEventArgs args)
			{
				if (StoredCards.Contains(args.Card))
				{
					((GameEventArgs)args).CancelBy((GameEntity)(object)this);
				}
				yield break;
			}

			private IEnumerable<BattleAction> OnCardExiling(CardEventArgs args)
			{
				if (StoredCards.Contains(args.Card) && (int)((GameEventArgs)args).Cause == 2)
				{
					RemoveFromStorage(args.Card);
				}
				yield break;
			}

			private IEnumerable<BattleAction> OnCardRemoving(CardEventArgs args)
			{
				if (StoredCards.Contains(args.Card) && (int)((GameEventArgs)args).Cause == 2)
				{
					RemoveFromStorage(args.Card);
				}
				yield break;
			}

			protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				List<Card> prevstoredcards = new List<Card>();
				foreach (Card card2 in StoredCards)
				{
					prevstoredcards.Add(card2);
				}
				foreach (Card card in prevstoredcards)
				{
					BattleController battle = ((Card)this).Battle;
					battle.MaxHand += 1;
					yield return (BattleAction)new AddCardsToHandAction((Card[])(object)new Card[1] { card });
					BattleController battle2 = ((Card)this).Battle;
					battle2.MaxHand -= 1;
					yield return (BattleAction)new UseCardAction(card, selector, ManaGroup.Empty);
					if (StoredCards.Contains(card))
					{
						yield return (BattleAction)new RemoveCardAction(card);
					}
				}
				if (StoredCards.Count <= 0)
				{
					yield return (BattleAction)new RemoveCardAction((Card)(object)this);
				}
			}
		}

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("Combined");
		}

		public override CardImages LoadCardImages()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			CardImages val = new CardImages(BepinexPlugin.embeddedSource);
			val.AutoLoad((CardTemplate)(object)this, ".png", "", false);
			return val;
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.cardbatchloc.AddEntity((EntityDefinition)(object)this);
		}

		public override CardConfig MakeConfig()
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Expected O, but got Unknown
			return new CardConfig(13060, "", 10, true, new string[0][], "Simple1", "Simple1", 1, false, false, false, true, false, (Rarity)2, (CardType)3, (TargetType?)(TargetType)1, (IReadOnlyList<ManaColor>)new List<ManaColor> { (ManaColor)3 }, false, ManaGroup.Empty, (ManaGroup?)ManaGroup.Empty, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)0, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "Niko", "", "", true, "", (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class CorruptionDef : CardTemplate
	{
		[EntityLogic(typeof(CorruptionDef))]
		public sealed class Corruption : NikoCardBase
		{
			protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				List<Card> list = ((Card)this).Battle.HandZone.Where((Card hand) => hand != this && (int)hand.CardType != 6).ToList();
				SelectCardInteraction interaction = new SelectCardInteraction(0, ((Card)this).Value1, (IEnumerable<Card>)list, (SelectedCardHandling)0)
				{
					Source = (GameEntity)(object)this
				};
				yield return (BattleAction)new InteractionAction((Interaction)(object)interaction, false);
				IReadOnlyList<Card> selectedCards = interaction.SelectedCards;
				if (selectedCards.Count <= 0)
				{
					yield break;
				}
				yield return (BattleAction)new ExileManyCardAction((IEnumerable<Card>)selectedCards);
				foreach (Card card in selectedCards)
				{
					RarityWeightTable rarity = RarityWeightTable.BattleCard;
					if ((int)card.Config.Rarity == 0)
					{
						rarity = RarityWeightTable.OnlyCommon;
					}
					if ((int)card.Config.Rarity == 1)
					{
						rarity = RarityWeightTable.OnlyUncommon;
					}
					if ((int)card.Config.Rarity == 2)
					{
						rarity = RarityWeightTable.OnlyRare;
					}
					OwnerWeightTable owner = OwnerWeightTable.Valid;
					CardTypeWeightTable type = CardTypeWeightTable.CanBeLoot;
					if ((int)card.CardType == 1)
					{
						type = CardTypeWeightTable.OnlyAttack;
					}
					if ((int)card.CardType == 2)
					{
						type = CardTypeWeightTable.OnlyDefense;
					}
					if ((int)card.CardType == 3)
					{
						type = CardTypeWeightTable.OnlySkill;
					}
					if ((int)card.CardType == 4)
					{
						type = CardTypeWeightTable.OnlyAbility;
					}
					if ((int)card.CardType == 5)
					{
						type = CardTypeWeightTable.OnlyFriend;
					}
					Card[] newcards = ((Card)this).Battle.RollCards(new CardWeightTable(rarity, owner, type), 1, (Predicate<CardConfig>)null);
					if (newcards.Length == 0)
					{
						Card newcard = ((Card)this).Battle.RollCard(new CardWeightTable(rarity, owner, CardTypeWeightTable.CanBeLoot), (Predicate<CardConfig>)null);
						yield return (BattleAction)new AddCardsToHandAction((Card[])(object)new Card[1] { newcard });
					}
					else
					{
						yield return (BattleAction)new AddCardsToHandAction((Card[])(object)new Card[1] { newcards[0] });
					}
				}
			}
		}

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("Corruption");
		}

		public override CardImages LoadCardImages()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			CardImages val = new CardImages(BepinexPlugin.embeddedSource);
			val.AutoLoad((CardTemplate)(object)this, ".png", "", false);
			return val;
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.cardbatchloc.AddEntity((EntityDefinition)(object)this);
		}

		public override CardConfig MakeConfig()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)0;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)3 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Black = 1;
			((ManaGroup)(ref val2)).Any = 1;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Black = 1;
			return new CardConfig(13060, "", 10, true, array, "Simple1", "Simple1", 0, true, true, true, false, true, (Rarity)0, (CardType)3, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)2, (int?)2, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)0, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "Niko", "", "", false, "", (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class CtrlDef : CardTemplate
	{
		[EntityLogic(typeof(CtrlDef))]
		public sealed class Ctrl : NikoCardBase
		{
			public override Interaction Precondition()
			{
				//IL_002b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0031: Expected O, but got Unknown
				List<Card> list = ((Card)this).Battle.HandZone.Where((Card hand) => hand != this && !hand.IsRetain).ToList();
				return (Interaction)new SelectHandInteraction(0, ((Card)this).Value1, (IEnumerable<Card>)list);
			}

			protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				if (precondition != null)
				{
					IReadOnlyList<Card> cards = ((SelectHandInteraction)precondition).SelectedCards;
					if (!CollectionsExtensions.Empty<Card>((IReadOnlyCollection<Card>)cards))
					{
						foreach (Card card in cards)
						{
							BepinexPlugin.log.LogInfo((object)card);
							card.IsRetain = true;
							((GameEntity)card).NotifyChanged();
						}
					}
				}
				yield return (BattleAction)new AddCardsToDiscardAction((IEnumerable<Card>)Library.CreateCards<AltDef.Alt>(1, ((Card)this).IsUpgraded), (AddCardsType)0);
			}
		}

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("Ctrl");
		}

		public override CardImages LoadCardImages()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			CardImages val = new CardImages(BepinexPlugin.embeddedSource);
			val.AutoLoad((CardTemplate)(object)this, ".png", "", false);
			return val;
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)BepinexPlugin.cardbatchloc.AddEntity((EntityDefinition)(object)this);
		}

		public override CardConfig MakeConfig()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)0;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)3 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Black = 2;
			((ManaGroup)(ref val2)).Any = 1;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Black = 1;
			((ManaGroup)(ref val2)).Any = 2;
			return new CardConfig(13060, "", 10, true, array, "simple1", "simple1", 0, true, true, true, false, true, (Rarity)2, (CardType)3, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)1, (int?)1, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)131072, (Keyword)131072, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string> { "Alt" }, (IReadOnlyList<string>)new List<string> { "Alt+" }, "Niko", "", "", true, "", (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class DecayDef : CardTemplate
	{
		[EntityLogic(typeof(DecayDef))]
		public sealed class Decay : NikoCardBase
		{
			protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				List<Card> hand = ((Card)this).Battle._handZone;
				SelectCardInteraction interaction = new SelectCardInteraction(0, ((Card)this).Value1, (IEnumerable<Card>)hand, (SelectedCardHandling)0)
				{
					Source = (GameEntity)(object)this
				};
				yield return (BattleAction)new InteractionAction((Interaction)(object)interaction, false);
				IReadOnlyList<Card> selectedCards = interaction.SelectedCards;
				if (selectedCards.Count <= 0)
				{
					yield break;
				}
				yield return (BattleAction)new ExileManyCardAction((IEnumerable<Card>)selectedCards);
				foreach (Card card in selectedCards)
				{
					if (toolbox.IsShaded(((Card)this).Battle.Player, card))
					{
						card.NotifyActivating();
						yield return ((Card)this).AttackRandomAliveEnemyAction((GunPair)null);
					}
				}
			}
		}

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("Decay");
		}

		public override CardImages LoadCardImages()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O,