Decompiled source of Lv2Exhibits v0.0.1

Level2Exhibits.dll

Decompiled 2 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using AddWatermark;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using JetBrains.Annotations;
using LBoL.Base;
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.StatusEffects;
using LBoL.Core.Units;
using LBoL.EntityLib.Cards.Character.Marisa;
using LBoL.EntityLib.Cards.Character.Reimu;
using LBoL.EntityLib.Cards.Neutral.TwoColor;
using LBoL.EntityLib.Exhibits;
using LBoL.EntityLib.Exhibits.Shining;
using LBoL.EntityLib.StatusEffects.Cirno;
using LBoLEntitySideloader;
using LBoLEntitySideloader.Attributes;
using LBoLEntitySideloader.Entities;
using LBoLEntitySideloader.Resource;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.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("Level2Exhibits")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Level2Exhibits")]
[assembly: AssemblyTitle("Level2Exhibits")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Level2Exibits
{
	internal class WatermarkWrapper
	{
		[MethodImpl(MethodImplOptions.NoInlining)]
		internal static void ActivateWatermark()
		{
			API.ActivateWatermark();
		}
	}
}
namespace Level2Exhibits
{
	[BepInPlugin("btou.lbol.Level2Exhibits", "Level2Exhibits", "0.0.1")]
	[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("btou.lbol.Level2Exhibits", "");

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

		internal static BatchLocalization exbatchloc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(ExhibitTemplate), "Exhibit", (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();
		}

		private void OnDestroy()
		{
			if (harmony != null)
			{
				harmony.UnpatchSelf();
			}
		}
	}
	public static class PInfo
	{
		public const string GUID = "btou.lbol.Level2Exhibits";

		public const string Name = "Level2Exhibits";

		public const string version = "0.0.1";

		public static readonly Harmony harmony = new Harmony("btou.lbol.Level2Exhibits");
	}
}
namespace Level2Exhibits.src.Sakuya
{
	public sealed class sakuyaalv2def : ExhibitTemplate
	{
		[ExhibitInfo(WeighterType = typeof(sakuyaalv2Weighter))]
		[EntityLogic(typeof(sakuyaalv2def))]
		public sealed class sakuyaalv2 : ShiningExhibit
		{
			public class sakuyaalv2Weighter : IExhibitWeighter
			{
				public float WeightFor(Type type, GameRunController gameRun)
				{
					if (gameRun.Player.HasExhibit<SakuyaW>())
					{
						return 1f;
					}
					return 0f;
				}
			}

			protected override void OnEnterBattle()
			{
				((Exhibit)this).ReactBattleEvent<CardEventArgs>(((Exhibit)this).Battle.CardExiled, (EventSequencedReactor<CardEventArgs>)OnCardExiled);
			}

			private IEnumerable<BattleAction> OnCardExiled(CardEventArgs args)
			{
				int counter = ((Exhibit)this).Counter;
				((Exhibit)this).Counter = counter + 1;
				while (((Exhibit)this).Counter >= ((Exhibit)this).Value1)
				{
					((Exhibit)this).NotifyActivating();
					((Exhibit)this).Counter = ((Exhibit)this).Counter - ((Exhibit)this).Value1;
					foreach (EnemyUnit enemy in ((Exhibit)this).Battle.EnemyGroup)
					{
						if (((Unit)enemy).IsAlive)
						{
							yield return (BattleAction)(object)new ApplyStatusEffectAction<LockedOn>((Unit)(object)enemy, (int?)((Exhibit)this).Value2, (int?)null, (int?)null, (int?)null, 0f, true);
							yield return (BattleAction)(object)new ApplyStatusEffectAction<TempFirepowerNegative>((Unit)(object)enemy, (int?)((Exhibit)this).Value2, (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("sakuyaalv2");
		}

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

		public override ExhibitSprites LoadSprite()
		{
			throw new NotImplementedException();
		}

		public override ExhibitConfig MakeConfig()
		{
			//IL_003f: 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_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Expected O, but got Unknown
			return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(CardConfig)), "", 1000, false, true, false, false, (AppearanceType)2, "", (ExhibitLosableType)2, (Rarity)3, (int?)4, (int?)1, (int?)0, (ManaGroup?)default(ManaGroup), (ManaColor?)null, (ManaColor?)(ManaColor)1, 1, true, (int?)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "LockedOn", "TempFirepowerNegative" }, (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class sakuyablv2def : ExhibitTemplate
	{
		[ExhibitInfo(WeighterType = typeof(sakuyablv2Weighter))]
		[EntityLogic(typeof(sakuyablv2def))]
		public sealed class sakuyablv2 : ShiningExhibit
		{
			public class sakuyablv2Weighter : IExhibitWeighter
			{
				public float WeightFor(Type type, GameRunController gameRun)
				{
					if (gameRun.Player.HasExhibit<SakuyaU>())
					{
						return 1f;
					}
					return 0f;
				}
			}

			protected override void OnEnterBattle()
			{
				((Exhibit)this).ReactBattleEvent<CardEventArgs>(((Exhibit)this).Battle.CardDiscarded, (EventSequencedReactor<CardEventArgs>)OnCardDiscarded);
			}

			private IEnumerable<BattleAction> OnCardDiscarded(CardEventArgs args)
			{
				((Exhibit)this).NotifyActivating();
				yield return (BattleAction)(object)new ApplyStatusEffectAction<Graze>((Unit)(object)((GameEntity)this).GameRun.Player, (int?)((Exhibit)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("sakuyablv2");
		}

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

		public override ExhibitSprites LoadSprite()
		{
			throw new NotImplementedException();
		}

		public override ExhibitConfig MakeConfig()
		{
			//IL_003f: 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_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Expected O, but got Unknown
			return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(CardConfig)), "", 1000, false, true, false, false, (AppearanceType)2, "", (ExhibitLosableType)2, (Rarity)3, (int?)1, (int?)0, (int?)0, (ManaGroup?)default(ManaGroup), (ManaColor?)null, (ManaColor?)(ManaColor)2, 1, false, (int?)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "Graze" }, (IReadOnlyList<string>)new List<string>());
		}
	}
}
namespace Level2Exhibits.src.Reimu
{
	public sealed class reimualv2def : ExhibitTemplate
	{
		[ExhibitInfo(WeighterType = typeof(reimualv2Weighter))]
		[EntityLogic(typeof(reimualv2def))]
		public sealed class reimualv2 : ShiningExhibit
		{
			public class reimualv2Weighter : IExhibitWeighter
			{
				public float WeightFor(Type type, GameRunController gameRun)
				{
					if (gameRun.Player.HasExhibit<ReimuR>())
					{
						return 1f;
					}
					return 0f;
				}
			}

			private bool triggeredByThis = false;

			protected override void OnEnterBattle()
			{
				((Exhibit)this).ReactBattleEvent<StatusEffectApplyEventArgs>(((Unit)((Exhibit)this).Battle.Player).StatusEffectAdded, (EventSequencedReactor<StatusEffectApplyEventArgs>)OnPlayerStatusEffectAdded);
			}

			private IEnumerable<BattleAction> OnPlayerStatusEffectAdded(StatusEffectApplyEventArgs args)
			{
				StatusEffect statusEffect = args.Effect;
				if (statusEffect is TempFirepower)
				{
					int tempFireLevel = ((StatusEffect)((Unit)((GameEntity)this).GameRun.Player).GetStatusEffect<TempFirepower>()).Level;
					int tempSpiritLevel = 0;
					if (((Unit)((GameEntity)this).GameRun.Player).HasStatusEffect<TempSpirit>())
					{
						tempSpiritLevel = ((StatusEffect)((Unit)((GameEntity)this).GameRun.Player).GetStatusEffect<TempSpirit>()).Level;
					}
					if (!triggeredByThis && tempSpiritLevel < tempFireLevel)
					{
						triggeredByThis = true;
						((Exhibit)this).NotifyActivating();
						yield return (BattleAction)(object)new ApplyStatusEffectAction<TempSpirit>((Unit)(object)((GameEntity)this).GameRun.Player, (int?)(tempFireLevel - tempSpiritLevel), (int?)null, (int?)null, (int?)null, 0f, true);
						triggeredByThis = false;
					}
				}
				if (statusEffect is Firepower)
				{
					int fireLevel = ((StatusEffect)((Unit)((GameEntity)this).GameRun.Player).GetStatusEffect<Firepower>()).Level;
					int spiritLevel = 0;
					if (((Unit)((GameEntity)this).GameRun.Player).HasStatusEffect<Spirit>())
					{
						spiritLevel = ((StatusEffect)((Unit)((GameEntity)this).GameRun.Player).GetStatusEffect<Spirit>()).Level;
					}
					if (!triggeredByThis && spiritLevel < fireLevel)
					{
						triggeredByThis = true;
						((Exhibit)this).NotifyActivating();
						yield return (BattleAction)(object)new ApplyStatusEffectAction<Spirit>((Unit)(object)((GameEntity)this).GameRun.Player, (int?)(fireLevel - spiritLevel), (int?)null, (int?)null, (int?)null, 0f, true);
						triggeredByThis = false;
					}
				}
				triggeredByThis = false;
				yield return 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("reimualv2");
		}

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

		public override ExhibitSprites LoadSprite()
		{
			throw new NotImplementedException();
		}

		public override ExhibitConfig MakeConfig()
		{
			//IL_003f: 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_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Expected O, but got Unknown
			return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(CardConfig)), "", 1000, false, true, false, false, (AppearanceType)2, "", (ExhibitLosableType)2, (Rarity)3, (int?)0, (int?)0, (int?)0, (ManaGroup?)default(ManaGroup), (ManaColor?)null, (ManaColor?)(ManaColor)4, 1, false, (int?)null, (Keyword)0, (IReadOnlyList<string>)new List<string> { "Firepower", "Spirit" }, (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class reimublv2def : ExhibitTemplate
	{
		[ExhibitInfo(WeighterType = typeof(reimublv2Weighter))]
		[EntityLogic(typeof(reimublv2def))]
		public sealed class reimublv2 : ShiningExhibit
		{
			public class reimublv2Weighter : IExhibitWeighter
			{
				public float WeightFor(Type type, GameRunController gameRun)
				{
					if (gameRun.Player.HasExhibit<ReimuW>())
					{
						return 1f;
					}
					return 0f;
				}
			}

			[UsedImplicitly]
			protected override IEnumerator SpecialGain(PlayerUnit player)
			{
				((Exhibit)this).OnGain(player);
				List<Card> list = ((GameEntity)this).GameRun.BaseDeckWithOutUnremovable.ToList();
				int num = Math.Min(list.Count, ((Exhibit)this).Value1);
				if (num == 0)
				{
					yield break;
				}
				SelectCardInteraction interaction = new SelectCardInteraction(0, num, (IEnumerable<Card>)list, (SelectedCardHandling)0)
				{
					Source = (GameEntity)(object)this,
					CanCancel = false
				};
				yield return ((GameEntity)this).GameRun.InteractionViewer.View((Interaction)(object)interaction);
				IReadOnlyList<Card> selectedCards = interaction.SelectedCards;
				List<Card> list2 = new List<Card>();
				if (selectedCards.Count != 0)
				{
					if (selectedCards.Count <= 2)
					{
						list2.Add((Card)(object)Library.CreateCard<YinyangCard>());
						list2.Add((Card)(object)Library.CreateCard<ShuihuoCard>());
						list2.Add((Card)(object)Library.CreateCard<FengleiCard>());
						list2.Add((Card)(object)Library.CreateCard<ShanyuCard>());
					}
					else
					{
						Debug.LogError((object)"目前先代的御币只支持变化2张的情况");
					}
					((GameEntity)this).GameRun.RemoveDeckCards((IEnumerable<Card>)selectedCards, false);
					((GameEntity)this).GameRun.AddDeckCards((IEnumerable<Card>)list2, true, (VisualSourceData)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("reimublv2");
		}

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

		public override ExhibitSprites LoadSprite()
		{
			throw new NotImplementedException();
		}

		public override ExhibitConfig MakeConfig()
		{
			//IL_003f: 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_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Expected O, but got Unknown
			return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(CardConfig)), "", 1000, false, true, false, false, (AppearanceType)2, "", (ExhibitLosableType)2, (Rarity)3, (int?)2, (int?)0, (int?)0, (ManaGroup?)default(ManaGroup), (ManaColor?)null, (ManaColor?)(ManaColor)1, 1, false, (int?)null, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string> { "YinyangCard", "ShuihuoCard", "FengleiCard", "ShanyuCard" });
		}
	}
}
namespace Level2Exhibits.src.Marisa
{
	public sealed class marisaalv2def : ExhibitTemplate
	{
		[ExhibitInfo(WeighterType = typeof(marisaalv2Weighter))]
		[EntityLogic(typeof(marisaalv2def))]
		public sealed class marisaalv2 : ShiningExhibit
		{
			public class marisaalv2Weighter : IExhibitWeighter
			{
				public float WeightFor(Type type, GameRunController gameRun)
				{
					if (gameRun.Player.HasExhibit<MarisaB>())
					{
						return 1f;
					}
					return 0f;
				}
			}

			protected override void OnEnterBattle()
			{
				((Exhibit)this).NotifyActivating();
				((Exhibit)this).ReactBattleEvent<GameEventArgs>(((Exhibit)this).Battle.BattleStarted, (EventSequencedReactor<GameEventArgs>)OnBattleStarted);
			}

			public IEnumerable<BattleAction> OnBattleStarted(GameEventArgs args)
			{
				((Exhibit)this).NotifyActivating();
				int i = ((GameEntity)this).GameRun.BaseDeck.Count;
				yield return (BattleAction)new AddCardsToDrawZoneAction((IEnumerable<Card>)Library.CreateCards<Potion>(i / ((Exhibit)this).Value1, false), (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("marisaalv2");
		}

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

		public override ExhibitSprites LoadSprite()
		{
			throw new NotImplementedException();
		}

		public override ExhibitConfig MakeConfig()
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Expected O, but got Unknown
			return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(CardConfig)), "", 1000, false, true, false, false, (AppearanceType)2, "", (ExhibitLosableType)2, (Rarity)3, (int?)10, (int?)1, (int?)0, (ManaGroup?)default(ManaGroup), (ManaColor?)null, (ManaColor?)(ManaColor)3, 1, false, (int?)null, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string> { "Potion" });
		}
	}
	public sealed class marisablv2def : ExhibitTemplate
	{
		[ExhibitInfo(WeighterType = typeof(marisablv2Weighter))]
		[EntityLogic(typeof(marisablv2def))]
		public sealed class marisablv2 : ShiningExhibit
		{
			public class marisablv2Weighter : IExhibitWeighter
			{
				public float WeightFor(Type type, GameRunController gameRun)
				{
					if (gameRun.Player.HasExhibit<MarisaR>())
					{
						return 1f;
					}
					return 0f;
				}
			}

			private int charging = 0;

			private int concentration = 0;

			protected override void OnEnterBattle()
			{
				((Exhibit)this).ReactBattleEvent<CardUsingEventArgs>(((Exhibit)this).Battle.CardUsing, (EventSequencedReactor<CardUsingEventArgs>)check);
				((Exhibit)this).ReactBattleEvent<CardUsingEventArgs>(((Exhibit)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnLosedCharging);
			}

			public IEnumerable<BattleAction> check(CardUsingEventArgs args)
			{
				if (((Unit)((GameEntity)this).GameRun.Player).HasStatusEffect<Charging>())
				{
					charging = ((StatusEffect)((Unit)((GameEntity)this).GameRun.Player).GetStatusEffect<Charging>()).Level;
				}
				else
				{
					charging = 0;
				}
				if (((Unit)((GameEntity)this).GameRun.Player).HasStatusEffect<Concentration>())
				{
					concentration = ((StatusEffect)((Unit)((GameEntity)this).GameRun.Player).GetStatusEffect<Concentration>()).Level;
				}
				else
				{
					concentration = 0;
				}
				yield return null;
			}

			public IEnumerable<BattleAction> OnLosedCharging(GameEventArgs args)
			{
				if (charging > 0 && (!((Unit)((GameEntity)this).GameRun.Player).HasStatusEffect<Charging>() || ((StatusEffect)((Unit)((GameEntity)this).GameRun.Player).GetStatusEffect<Charging>()).Level < charging))
				{
					((Exhibit)this).NotifyActivating();
					yield return (BattleAction)new DrawCardAction();
					yield return (BattleAction)new GainManaAction(((Exhibit)this).Mana);
				}
				if (concentration > 0 && (!((Unit)((GameEntity)this).GameRun.Player).HasStatusEffect<Concentration>() || ((StatusEffect)((Unit)((GameEntity)this).GameRun.Player).GetStatusEffect<Concentration>()).Level < concentration))
				{
					((Exhibit)this).NotifyActivating();
					yield return (BattleAction)new DrawCardAction();
					yield return (BattleAction)new GainManaAction(((Exhibit)this).Mana);
				}
			}
		}

		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("marisablv2");
		}

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

		public override ExhibitSprites LoadSprite()
		{
			throw new NotImplementedException();
		}

		public override ExhibitConfig MakeConfig()
		{
			//IL_003f: 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_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Expected O, but got Unknown
			int num = BepinexPlugin.sequenceTable.Next(typeof(CardConfig));
			int? num2 = 1;
			int? num3 = 0;
			int? num4 = 0;
			ManaGroup value = default(ManaGroup);
			((ManaGroup)(ref value)).Red = 1;
			return new ExhibitConfig(num, "", 1000, false, true, false, false, (AppearanceType)2, "", (ExhibitLosableType)2, (Rarity)3, num2, num3, num4, (ManaGroup?)value, (ManaColor?)null, (ManaColor?)(ManaColor)4, 1, false, (int?)null, (Keyword)0, (IReadOnlyList<string>)new List<string> { "Charging", "Concentration" }, (IReadOnlyList<string>)new List<string>());
		}
	}
}
namespace Level2Exhibits.src.Cirno
{
	public sealed class cirnoaicecrystaldef : CardTemplate
	{
		[EntityLogic(typeof(cirnoaicecrystaldef))]
		public sealed class cirnoaicecrystal : Card
		{
			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<Cold>((Unit)(object)selector.SelectedEnemy, (int?)null, (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("cirnoaicecrystal");
		}

		public override CardImages LoadCardImages()
		{
			throw new NotImplementedException();
		}

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

		public override CardConfig MakeConfig()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)1;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)2 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 1;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 0;
			return new CardConfig(0, "", 10, true, array, "", "", 0, false, false, false, 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?)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)2228224, (Keyword)2228224, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "Cold" }, (IReadOnlyList<string>)new List<string> { "Cold" }, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "Cirno", "", "", true, (string)null, (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class cirnoalv2def : ExhibitTemplate
	{
		[ExhibitInfo(WeighterType = typeof(cirnoalv2Weighter))]
		[EntityLogic(typeof(cirnoalv2def))]
		public sealed class cirnoalv2 : ShiningExhibit
		{
			public class cirnoalv2Weighter : IExhibitWeighter
			{
				public float WeightFor(Type type, GameRunController gameRun)
				{
					if (gameRun.Player.HasExhibit<CirnoU>())
					{
						return 1f;
					}
					return 0f;
				}
			}

			protected override void OnEnterBattle()
			{
				((Exhibit)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Battle.Player).TurnEnding, (EventSequencedReactor<UnitEventArgs>)OnTrigger);
			}

			private IEnumerable<BattleAction> OnTrigger(GameEventArgs args)
			{
				if (((Exhibit)this).Battle.BattleShouldEnd || !(((Exhibit)this).Battle.BattleMana != ManaGroup.Empty))
				{
					goto IL_00b8;
				}
				ManaGroup val = ((Exhibit)this).Battle.BattleMana;
				if (!((ManaGroup)(ref val)).HasColor((ManaColor)2))
				{
					val = ((Exhibit)this).Battle.BattleMana;
					if (!((ManaGroup)(ref val)).HasColor((ManaColor)7))
					{
						goto IL_00b8;
					}
				}
				int num = ((((Exhibit)this).Battle.DrawZone.Count > 0) ? 1 : 0);
				goto IL_00b9;
				IL_00b9:
				if (num == 0)
				{
					yield break;
				}
				((Exhibit)this).NotifyActivating();
				Card target = ((Exhibit)this).Battle.DrawZone.LastOrDefault();
				if (target != null)
				{
					DontPlayItdef.DontPlayIt dpi = Library.CreateCard<DontPlayItdef.DontPlayIt>();
					dpi.TargetName = StringDecorator.GetEntityName(((GameEntity)target).Name);
					MiniSelectCardInteraction interaction = new MiniSelectCardInteraction((IEnumerable<Card>)(object)new Card[2] { target, dpi }, false, false, false)
					{
						Source = (GameEntity)(object)this
					};
					yield return (BattleAction)new InteractionAction((Interaction)(object)interaction, false);
					if (interaction.SelectedCard is DontPlayItdef.DontPlayIt)
					{
						yield break;
					}
				}
				if (((Exhibit)this).Battle.HandZone.Count < ((Exhibit)this).Battle.MaxHand)
				{
					yield return (BattleAction)new MoveCardAction(target, (CardZone)2);
					UnitSelector randomEnemy = UnitSelector.RandomEnemy;
					val = default(ManaGroup);
					yield return (BattleAction)new UseCardAction(target, randomEnemy, val);
				}
				yield break;
				IL_00b8:
				num = 0;
				goto IL_00b9;
			}
		}

		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("cirnoalv2");
		}

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

		public override ExhibitSprites LoadSprite()
		{
			throw new NotImplementedException();
		}

		public override ExhibitConfig MakeConfig()
		{
			//IL_003f: 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_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Expected O, but got Unknown
			int num = BepinexPlugin.sequenceTable.Next(typeof(CardConfig));
			int? num2 = 0;
			int? num3 = 0;
			int? num4 = 0;
			ManaGroup value = default(ManaGroup);
			((ManaGroup)(ref value)).Blue = 1;
			return new ExhibitConfig(num, "", 1000, false, true, false, false, (AppearanceType)2, "", (ExhibitLosableType)2, (Rarity)3, num2, num3, num4, (ManaGroup?)value, (ManaColor?)null, (ManaColor?)(ManaColor)2, 1, false, (int?)null, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class cirnoblv2def : ExhibitTemplate
	{
		[ExhibitInfo(WeighterType = typeof(cirnoblv2Weighter))]
		[EntityLogic(typeof(cirnoblv2def))]
		public sealed class cirnoblv2 : ShiningExhibit
		{
			public class cirnoblv2Weighter : IExhibitWeighter
			{
				public float WeightFor(Type type, GameRunController gameRun)
				{
					if (gameRun.Player.HasExhibit<CirnoU>())
					{
						return 1f;
					}
					return 0f;
				}
			}

			[UsedImplicitly]
			public string HoldedCard
			{
				get
				{
					Card obj = TryGetGameRunCard();
					return (obj != null) ? ((GameEntity)obj).Name : null;
				}
			}

			protected override IEnumerator SpecialGain(PlayerUnit player)
			{
				IReadOnlyList<Card> baseDeck = ((GameEntity)this).GameRun.BaseDeck;
				if (baseDeck.Where((Card card) => (int)card.CardType == 5).ToList().Count == 0)
				{
					Debug.LogError((object)("Gain " + ((GameEntity)this).DebugName + " while base-deck has no friends."));
					yield break;
				}
				SelectCardInteraction interaction = new SelectCardInteraction(1, 1, (IEnumerable<Card>)baseDeck.Where((Card card) => (int)card.CardType == 5).ToList(), (SelectedCardHandling)0)
				{
					Source = (GameEntity)(object)this,
					CanCancel = false
				};
				yield return ((GameEntity)this).GameRun.InteractionViewer.View((Interaction)(object)interaction);
				Card card2 = interaction.SelectedCards[0];
				((Exhibit)this).CardInstanceId = card2.InstanceId;
				((GameEntity)this).NotifyChanged();
			}

			protected override void OnAdded(PlayerUnit player)
			{
				((Exhibit)this).HandleGameRunEvent<CardsEventArgs>(((GameEntity)this).GameRun.DeckCardsRemoved, (GameEventHandler<CardsEventArgs>)delegate(CardsEventArgs args)
				{
					int? cardInstanceId = ((Exhibit)this).CardInstanceId;
					if (cardInstanceId.HasValue)
					{
						int instanceId = cardInstanceId.GetValueOrDefault();
						if (args.Cards.Any((Card card) => card.InstanceId == instanceId))
						{
							((Exhibit)this).CardInstanceId = null;
							((GameEntity)this).NotifyChanged();
						}
					}
				});
			}

			protected override void OnEnterBattle()
			{
				((Exhibit)this).ReactBattleEvent<GameEventArgs>(((Exhibit)this).Battle.BattleStarted, (EventSequencedReactor<GameEventArgs>)OnBattleStarted);
			}

			public Card TryGetGameRunCard()
			{
				GameRunController gameRun = ((GameEntity)this).GameRun;
				if (gameRun != null)
				{
					int? cardInstanceId = ((Exhibit)this).CardInstanceId;
					if (cardInstanceId.HasValue)
					{
						int instanceId = cardInstanceId.GetValueOrDefault();
						Card val = ((IEnumerable<Card>)gameRun.BaseDeck).FirstOrDefault((Func<Card, bool>)((Card c) => c.InstanceId == instanceId));
						if (val == null)
						{
							Debug.LogError((object)$"Cannot find card with ID {instanceId} in base-deck");
						}
						return val;
					}
				}
				return null;
			}

			private IEnumerable<BattleAction> OnBattleStarted(GameEventArgs args)
			{
				int? cardInstanceId = ((Exhibit)this).CardInstanceId;
				if (cardInstanceId.HasValue)
				{
					int instanceId = cardInstanceId.GetValueOrDefault();
					Card card2 = ((IEnumerable<Card>)((Exhibit)this).Battle.DrawZone).FirstOrDefault((Func<Card, bool>)((Card card) => card.InstanceId == instanceId));
					if (card2 == null)
					{
						Debug.LogError((object)$"Cannot find card with ID {instanceId} in draw-zone");
						yield break;
					}
					((Exhibit)this).NotifyActivating();
					card2.Summon();
					card2.Loyalty += 9;
					yield return (BattleAction)new MoveCardToDrawZoneAction(card2, (DrawZoneTarget)0);
				}
			}

			public override IEnumerable<Card> EnumerateRelativeCards()
			{
				foreach (Card item in <>n__0())
				{
					yield return item;
				}
				Card card = TryGetGameRunCard();
				if (card != null)
				{
					yield return card;
				}
			}

			[CompilerGenerated]
			[DebuggerHidden]
			private IEnumerable<Card> <>n__0()
			{
				return ((Exhibit)this).EnumerateRelativeCards();
			}
		}

		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("cirnoblv2");
		}

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

		public override ExhibitSprites LoadSprite()
		{
			throw new NotImplementedException();
		}

		public override ExhibitConfig MakeConfig()
		{
			//IL_003f: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Expected O, but got Unknown
			return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(CardConfig)), "", 1000, false, true, false, false, (AppearanceType)2, "", (ExhibitLosableType)2, (Rarity)3, (int?)1, (int?)0, (int?)0, (ManaGroup?)default(ManaGroup), (ManaColor?)null, (ManaColor?)(ManaColor)5, 1, false, (int?)null, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class DontPlayItdef : CardTemplate
	{
		[EntityLogic(typeof(DontPlayItdef))]
		public sealed class DontPlayIt : Card
		{
			public string TargetName { get; set; }

			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 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("DontPlayIt");
		}

		public override CardImages LoadCardImages()
		{
			throw new NotImplementedException();
		}

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

		public override CardConfig MakeConfig()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)0;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)6 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 0;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 0;
			return new CardConfig(0, "", 10, true, array, "", "", 0, false, false, false, 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?)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>(), "Cirno", "", "", true, (string)null, (IReadOnlyList<string>)new List<string>());
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		internal IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}