Decompiled source of OpponentsFriends v0.0.1

OpponentsFriends.dll

Decompiled a day ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using AddWatermark;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
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.Stations;
using LBoL.Core.StatusEffects;
using LBoL.Core.Units;
using LBoL.EntityLib.Cards.Character.Cirno;
using LBoL.EntityLib.Cards.Character.Koishi;
using LBoL.EntityLib.Cards.Character.Marisa;
using LBoL.EntityLib.Cards.Character.Reimu;
using LBoL.EntityLib.Cards.Character.Sakuya;
using LBoL.EntityLib.Exhibits.Shining;
using LBoL.EntityLib.PlayerUnits;
using LBoL.EntityLib.StatusEffects.Basic;
using LBoL.EntityLib.StatusEffects.Cirno;
using LBoL.EntityLib.StatusEffects.Enemy;
using LBoL.EntityLib.StatusEffects.Koishi;
using LBoL.EntityLib.StatusEffects.Reimu;
using LBoL.EntityLib.StatusEffects.Sakuya;
using LBoLEntitySideloader;
using LBoLEntitySideloader.Attributes;
using LBoLEntitySideloader.CustomHandlers;
using LBoLEntitySideloader.Entities;
using LBoLEntitySideloader.Resource;
using OpponentsFriends.src.Cirno;
using OpponentsFriends.src.Koishi;
using OpponentsFriends.src.Marisa;
using OpponentsFriends.src.Reimu;
using OpponentsFriends.src.Sakuya;
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("OpponentsFriends")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("OpponentsFriends")]
[assembly: AssemblyTitle("OpponentsFriends")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace OpponentsFriends
{
	[BepInPlugin("btou.lbol.OpponentsFriends", "OpponentsFriends", "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.OpponentsFriends", "");

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

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

		public static ConfigEntry<bool> seperatedReward;

		private void Awake()
		{
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Expected O, but got Unknown
			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();
			}
			ConfigFile val = new ConfigFile(Path.Combine(Paths.ConfigPath, "btou.lbol.OpponentsFriends", ".cfg"), true);
			seperatedReward = ((BaseUnityPlugin)this).Config.Bind<bool>("Game", "Seperate Reward", true, "Friend card reward is seperated from the BOSS rare card reward.");
			CHandlerManager.RegisterGameEventHandler<StationEventArgs>((EventProvider<StationEventArgs, GameRunController>)((GameRunController gr) => gr.StationRewardGenerating), (GameEventHandler<StationEventArgs>)OnRewardGenerating, (GameEventPriority)10);
		}

		private void OnDestroy()
		{
			if (harmony != null)
			{
				harmony.UnpatchSelf();
			}
		}

		private static void OnRewardGenerating(StationEventArgs args)
		{
			GameRunController gameRun = args.Station.GameRun;
			if (gameRun == null || CollectionsExtensions.IndexOf<Stage>(gameRun.Stages, args.Station.Stage) != 0 || args.Station.Level != 16)
			{
				return;
			}
			if (gameRun.Player.HasExhibit<ReimuR>() && !(gameRun.Player is Reimu))
			{
				if (seperatedReward.Value)
				{
					args.Station.Rewards.Add(StationReward.CreateCards((Card[])(object)new Card[1] { Library.CreateCard<ReimuRFriendTemplate.ReimuRFriend>() }));
					return;
				}
				StationReward val = args.Station.Rewards.Where((StationReward reward) => (int)reward.Type == 1).FirstOrDefault();
				val.Cards.Add((Card)(object)Library.CreateCard<ReimuRFriendTemplate.ReimuRFriend>());
			}
			else if (gameRun.Player.HasExhibit<ReimuW>() && !(gameRun.Player is Reimu))
			{
				if (seperatedReward.Value)
				{
					args.Station.Rewards.Add(StationReward.CreateCards((Card[])(object)new Card[1] { Library.CreateCard<ReimuWFriendTemplate.ReimuWFriend>() }));
					return;
				}
				StationReward val2 = args.Station.Rewards.Where((StationReward reward) => (int)reward.Type == 1).FirstOrDefault();
				val2.Cards.Add((Card)(object)Library.CreateCard<ReimuWFriendTemplate.ReimuWFriend>());
			}
			else if (gameRun.Player.HasExhibit<MarisaB>() && !(gameRun.Player is Marisa))
			{
				if (seperatedReward.Value)
				{
					args.Station.Rewards.Add(StationReward.CreateCards((Card[])(object)new Card[1] { Library.CreateCard<MarisaBFriendTemplate.MarisaBFriend>() }));
					return;
				}
				StationReward val3 = args.Station.Rewards.Where((StationReward reward) => (int)reward.Type == 1).FirstOrDefault();
				val3.Cards.Add((Card)(object)Library.CreateCard<MarisaBFriendTemplate.MarisaBFriend>());
			}
			else if (gameRun.Player.HasExhibit<MarisaR>() && !(gameRun.Player is Marisa))
			{
				if (seperatedReward.Value)
				{
					args.Station.Rewards.Add(StationReward.CreateCards((Card[])(object)new Card[1] { Library.CreateCard<MarisaRFriendTemplate.MarisaRFriend>() }));
					return;
				}
				StationReward val4 = args.Station.Rewards.Where((StationReward reward) => (int)reward.Type == 1).FirstOrDefault();
				val4.Cards.Add((Card)(object)Library.CreateCard<MarisaRFriendTemplate.MarisaRFriend>());
			}
			else if (gameRun.Player.HasExhibit<SakuyaW>() && !(gameRun.Player is Sakuya))
			{
				if (seperatedReward.Value)
				{
					args.Station.Rewards.Add(StationReward.CreateCards((Card[])(object)new Card[1] { Library.CreateCard<SakuyaWFriendTemplate.SakuyaWFriend>() }));
					return;
				}
				StationReward val5 = args.Station.Rewards.Where((StationReward reward) => (int)reward.Type == 1).FirstOrDefault();
				val5.Cards.Add((Card)(object)Library.CreateCard<SakuyaWFriendTemplate.SakuyaWFriend>());
			}
			else if (gameRun.Player.HasExhibit<SakuyaU>() && !(gameRun.Player is Sakuya))
			{
				if (seperatedReward.Value)
				{
					args.Station.Rewards.Add(StationReward.CreateCards((Card[])(object)new Card[1] { Library.CreateCard<SakuyaUFriendTemplate.SakuyaUFriend>() }));
					return;
				}
				StationReward val6 = args.Station.Rewards.Where((StationReward reward) => (int)reward.Type == 1).FirstOrDefault();
				val6.Cards.Add((Card)(object)Library.CreateCard<SakuyaUFriendTemplate.SakuyaUFriend>());
			}
			else if (gameRun.Player.HasExhibit<CirnoU>() && !(gameRun.Player is Cirno))
			{
				if (seperatedReward.Value)
				{
					args.Station.Rewards.Add(StationReward.CreateCards((Card[])(object)new Card[1] { Library.CreateCard<CirnoUFriendTemplate.CirnoUFriend>() }));
					return;
				}
				StationReward val7 = args.Station.Rewards.Where((StationReward reward) => (int)reward.Type == 1).FirstOrDefault();
				val7.Cards.Add((Card)(object)Library.CreateCard<CirnoUFriendTemplate.CirnoUFriend>());
			}
			else if (gameRun.Player.HasExhibit<CirnoG>() && !(gameRun.Player is Cirno))
			{
				if (seperatedReward.Value)
				{
					args.Station.Rewards.Add(StationReward.CreateCards((Card[])(object)new Card[1] { Library.CreateCard<CirnoGFriendTemplate.CirnoGFriend>() }));
					return;
				}
				StationReward val8 = args.Station.Rewards.Where((StationReward reward) => (int)reward.Type == 1).FirstOrDefault();
				val8.Cards.Add((Card)(object)Library.CreateCard<CirnoGFriendTemplate.CirnoGFriend>());
			}
			else if (gameRun.Player.HasExhibit<KoishiG>() && !(gameRun.Player is Koishi))
			{
				if (seperatedReward.Value)
				{
					args.Station.Rewards.Add(StationReward.CreateCards((Card[])(object)new Card[1] { Library.CreateCard<KoishiGFriendTemplate.KoishiGFriend>() }));
					return;
				}
				StationReward val9 = args.Station.Rewards.Where((StationReward reward) => (int)reward.Type == 1).FirstOrDefault();
				val9.Cards.Add((Card)(object)Library.CreateCard<KoishiGFriendTemplate.KoishiGFriend>());
			}
			else
			{
				if (!gameRun.Player.HasExhibit<KoishiB>() || gameRun.Player is Koishi)
				{
					return;
				}
				if (seperatedReward.Value)
				{
					args.Station.Rewards.Add(StationReward.CreateCards((Card[])(object)new Card[1] { Library.CreateCard<KoishiBFriendTemplate.KoishiBFriend>() }));
					return;
				}
				StationReward val10 = args.Station.Rewards.Where((StationReward reward) => (int)reward.Type == 1).FirstOrDefault();
				val10.Cards.Add((Card)(object)Library.CreateCard<KoishiBFriendTemplate.KoishiBFriend>());
			}
		}
	}
	public static class PInfo
	{
		public const string GUID = "btou.lbol.OpponentsFriends";

		public const string Name = "OpponentsFriends";

		public const string version = "0.0.1";

		public static readonly Harmony harmony = new Harmony("btou.lbol.OpponentsFriends");
	}
	internal class WatermarkWrapper
	{
		[MethodImpl(MethodImplOptions.NoInlining)]
		internal static void ActivateWatermark()
		{
			API.ActivateWatermark();
		}
	}
}
namespace OpponentsFriends.src.Sakuya
{
	public sealed class SakuyaUFriendTemplate : CardTemplate
	{
		[EntityLogic(typeof(SakuyaUFriendTemplate))]
		public sealed class SakuyaUFriend : Card
		{
			public override IEnumerable<BattleAction> OnTurnStartedInHand()
			{
				return ((Card)this).GetPassiveActions();
			}

			public override IEnumerable<BattleAction> GetPassiveActions()
			{
				((Card)this).NotifyActivating();
				((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).PassiveCost;
				yield return ((Card)this).BuffAction<TimeAuraSe>(((Card)this).Value1, 0, 0, 0, 0.2f);
			}

			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)this).Loyalty = ((Card)this).Loyalty + ((Card)this).ActiveCost;
					int num = ((Card)this).Battle.MaxHand - ((Card)this).Battle.HandZone.Count;
					if (num > 0)
					{
						yield return (BattleAction)new DrawManyCardAction(num);
					}
					if (!((Card)this).IsUpgraded || !CollectionsExtensions.NotEmpty<Card>((IReadOnlyCollection<Card>)((Card)this).Battle.HandZone))
					{
						yield break;
					}
					foreach (Card item in ((Card)this).Battle.HandZone)
					{
						item.DecreaseTurnCost(((Card)this).Mana);
					}
				}
				else
				{
					((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).UltimateCost;
					((Card)this).UltimateUsed = true;
					yield return (BattleAction)(object)PerformAction.Spell((Unit)(object)((Card)this).Battle.Player, "The World");
					yield return (BattleAction)(object)PerformAction.Effect((Unit)(object)((Card)this).Battle.Player, "ExtraTime", 0f, (string)null, 0f, (EffectBehavior)0, 0f);
					yield return (BattleAction)(object)PerformAction.Sfx("ExtraTurnLaunch", 0f);
					yield return (BattleAction)(object)new ApplyStatusEffectAction<ExtraTurn>((Unit)(object)((Card)this).Battle.Player, (int?)1, (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("SakuyaUFriend");
		}

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

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

		public override CardConfig MakeConfig()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: 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)2 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 2;
			((ManaGroup)(ref val2)).Blue = 1;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 1;
			((ManaGroup)(ref val2)).Blue = 1;
			ManaGroup? val4 = val2;
			int? num = 5;
			int? num2 = 6;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 1;
			return new CardConfig(0, "", 10, true, array, "", "", 0, false, false, false, false, true, (Rarity)2, (CardType)5, val, (IReadOnlyList<ManaColor>)obj, false, val3, val4, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, num, num2, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)1, (int?)1, (int?)1, (int?)1, (int?)(-3), (int?)(-3), (int?)null, (int?)null, (int?)(-6), (int?)(-5), (Keyword)0, (Keyword)1048576, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "TimeAuraSe" }, (IReadOnlyList<string>)new List<string> { "TimeAuraSe" }, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "Sakuya", "", "", true, (string)null, (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class SakuyaWFriendTemplate : CardTemplate
	{
		[EntityLogic(typeof(SakuyaWFriendTemplate))]
		public sealed class SakuyaWFriend : Card
		{
			public int Value3 = 1;

			public override IEnumerable<BattleAction> OnTurnStartedInHand()
			{
				return ((Card)this).GetPassiveActions();
			}

			public override IEnumerable<BattleAction> GetPassiveActions()
			{
				((Card)this).NotifyActivating();
				((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).PassiveCost;
				yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<Knife>(((Card)this).Value1, true), (AddCardsType)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)
				if (precondition == null || (int)((MiniSelectCardInteraction)precondition).SelectedCard.FriendToken == 1)
				{
					((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).ActiveCost;
					List<Card> list = ((Card)this).Battle.HandZone.Where((Card hand) => hand != this).ToList();
					if (!CollectionsExtensions.Empty<Card>((IReadOnlyCollection<Card>)list))
					{
						SelectHandInteraction action = new SelectHandInteraction(((Card)this).Value2, ((Card)this).Value2, (IEnumerable<Card>)list);
						yield return (BattleAction)new InteractionAction((Interaction)(object)action, false);
						IReadOnlyList<Card> selectedCards = action.SelectedCards;
						yield return (BattleAction)new DiscardManyAction((IEnumerable<Card>)selectedCards);
						yield return (BattleAction)new DrawManyCardAction(((Card)this).Value2);
						yield return ((Card)this).UpgradeAllHandsAction();
					}
					yield break;
				}
				((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).UltimateCost;
				((Card)this).UltimateUsed = true;
				List<Card> list2 = (from c in ((Card)this).Battle.EnumerateAllCardsButPlayArea()
					where c.CanUpgradeAndPositive
					select c).ToList();
				if (list2.Count > 0)
				{
					yield return (BattleAction)new UpgradeCardsAction((IEnumerable<Card>)list2);
				}
				SelectCardInteraction action2 = new SelectCardInteraction(0, Value3, (IEnumerable<Card>)((Card)this).Battle.ExileZone, (SelectedCardHandling)0);
				yield return (BattleAction)new InteractionAction((Interaction)(object)action2, false);
				if (action2.SelectedCards.Count > 0)
				{
					Card card = action2.SelectedCards.FirstOrDefault();
					yield return (BattleAction)new MoveCardAction(card, (CardZone)2);
					if (((Card)this).IsUpgraded)
					{
						card.SetTurnCost(((Card)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("SakuyaWFriend");
		}

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

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

		public override CardConfig MakeConfig()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_019d: 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)).Any = 2;
			((ManaGroup)(ref val2)).White = 1;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 1;
			((ManaGroup)(ref val2)).White = 1;
			ManaGroup? val4 = val2;
			int? num = 1;
			int? num2 = 1;
			int? num3 = 1;
			int? num4 = 1;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 0;
			return new CardConfig(0, "", 10, true, array, "", "", 0, false, false, false, false, true, (Rarity)2, (CardType)5, val, (IReadOnlyList<ManaColor>)obj, false, val3, val4, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, num, num2, num3, num4, (ManaGroup?)null, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)1, (int?)1, (int?)1, (int?)1, (int?)(-2), (int?)(-1), (int?)null, (int?)null, (int?)(-4), (int?)(-4), (Keyword)0, (Keyword)1048576, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string> { "Knife" }, (IReadOnlyList<string>)new List<string> { "Knife" }, "Sakuya", "", "", true, (string)null, (IReadOnlyList<string>)new List<string>());
		}
	}
}
namespace OpponentsFriends.src.Reimu
{
	public sealed class ReimuRFriendSeTemplate : StatusEffectTemplate
	{
		[EntityLogic(typeof(ReimuRFriendSeTemplate))]
		public sealed class ReimuRFriendSe : StatusEffect
		{
			protected override void OnAdded(Unit unit)
			{
				((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarting, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarting);
			}

			private IEnumerable<BattleAction> OnOwnerTurnStarting(UnitEventArgs args)
			{
				((StatusEffect)this).NotifyActivating();
				yield return (BattleAction)(object)new ApplyStatusEffectAction<Firepower>(((StatusEffect)this).Owner, (int?)((StatusEffect)this).Level, (int?)null, (int?)null, (int?)null, 0f, true);
				yield return (BattleAction)(object)new ApplyStatusEffectAction<Spirit>(((StatusEffect)this).Owner, (int?)((StatusEffect)this).Level, (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("ReimuRFriendSe");
		}

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

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

		public override StatusEffectConfig MakeConfig()
		{
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: 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)0, (StackType?)(StackType)0, false, (Keyword)0, (IReadOnlyList<string>)new List<string> { "Firepower", "Spirit" }, "Default", "Default", "Default");
		}
	}
	public sealed class ReimuRFriendTemplate : CardTemplate
	{
		[EntityLogic(typeof(ReimuRFriendTemplate))]
		public sealed class ReimuRFriend : Card
		{
			public int Value3 = 4;

			public override IEnumerable<BattleAction> OnTurnStartedInHand()
			{
				return ((Card)this).GetPassiveActions();
			}

			public override IEnumerable<BattleAction> GetPassiveActions()
			{
				((Card)this).NotifyActivating();
				((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).PassiveCost;
				yield return (BattleAction)(object)new ApplyStatusEffectAction<TempFirepower>((Unit)(object)((Card)this).Battle.Player, (int?)((Card)this).Value1, (int?)null, (int?)null, (int?)null, 0f, true);
				yield return (BattleAction)(object)new ApplyStatusEffectAction<TempSpirit>((Unit)(object)((Card)this).Battle.Player, (int?)((Card)this).Value1, (int?)null, (int?)null, (int?)null, 0f, true);
			}

			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)this).Loyalty = ((Card)this).Loyalty + ((Card)this).ActiveCost;
					yield return ((Card)this).DefenseAction(true);
					Guns guns = new Guns(((Card)this).GunName, ((Card)this).Value2, true);
					foreach (GunPair gunPair in guns.GunPairs)
					{
						yield return ((Card)this).AttackAction(UnitSelector.AllEnemies, gunPair);
					}
				}
				else
				{
					((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).UltimateCost;
					((Card)this).UltimateUsed = true;
					yield return (BattleAction)(object)((Card)this).SkillAnime;
					yield return ((Card)this).BuffAction<ReimuRFriendSeTemplate.ReimuRFriendSe>(Value3, 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("ReimuRFriend");
		}

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

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

		public override CardConfig MakeConfig()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)2;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)4 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 2;
			((ManaGroup)(ref val2)).Red = 1;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 1;
			((ManaGroup)(ref val2)).Red = 1;
			return new CardConfig(0, "", 10, true, array, "", "", 0, false, false, false, false, true, (Rarity)2, (CardType)5, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)7, (int?)9, (int?)7, (int?)9, (int?)7, (int?)9, (int?)2, (int?)3, (int?)2, (int?)2, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)1, (int?)1, (int?)1, (int?)1, (int?)(-3), (int?)(-2), (int?)null, (int?)null, (int?)(-6), (int?)(-5), (Keyword)0, (Keyword)1048576, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "TempFirepower", "TempSpirit", "Firepower", "Spirit" }, (IReadOnlyList<string>)new List<string> { "TempFirepower", "TempSpirit", "Firepower", "Spirit" }, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "Reimu", "", "", true, (string)null, (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class ReimuWFriendTemplate : CardTemplate
	{
		[EntityLogic(typeof(ReimuWFriendTemplate))]
		public sealed class ReimuWFriend : Card
		{
			public int Value3 = 2;

			public int Value4 = 2;

			public override IEnumerable<BattleAction> OnTurnEndingInHand()
			{
				return ((Card)this).GetPassiveActions();
			}

			public override IEnumerable<BattleAction> GetPassiveActions()
			{
				((Card)this).NotifyActivating();
				((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).PassiveCost;
				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);
				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);
			}

			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)this).Loyalty = ((Card)this).Loyalty + ((Card)this).ActiveCost;
					List<Card> list = ((Card)this).Battle.HandZone.Where((Card card) => card != this).ToList();
					if (!CollectionsExtensions.Empty<Card>((IReadOnlyCollection<Card>)list))
					{
						SelectHandInteraction action = new SelectHandInteraction(0, Value3, (IEnumerable<Card>)list);
						yield return (BattleAction)new InteractionAction((Interaction)(object)action, false);
						IReadOnlyList<Card> selectedCards = action.SelectedCards;
						if (selectedCards.Count > 0)
						{
							yield return (BattleAction)new ExileManyCardAction((IEnumerable<Card>)selectedCards);
							yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<YinyangCard>(selectedCards.Count, false), (AddCardsType)0);
						}
					}
				}
				else
				{
					((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).UltimateCost;
					((Card)this).UltimateUsed = true;
					yield return ((Card)this).BuffAction<JiangshenSe>(0, 0, 0, 0, 0.2f);
					yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<YinyangCard>(Value4, false), (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("ReimuWFriend");
		}

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

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

		public override CardConfig MakeConfig()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: 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)).Any = 2;
			((ManaGroup)(ref val2)).White = 1;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 1;
			((ManaGroup)(ref val2)).White = 1;
			return new CardConfig(0, "", 10, true, array, "", "", 0, false, false, false, false, true, (Rarity)2, (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?)1, (int?)2, (int?)2, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)1, (int?)1, (int?)1, (int?)1, (int?)(-2), (int?)(-1), (int?)null, (int?)null, (int?)(-5), (int?)(-4), (Keyword)0, (Keyword)1048576, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string> { "YinyangCard" }, (IReadOnlyList<string>)new List<string> { "YinyangCard" }, "Reimu", "", "", true, (string)null, (IReadOnlyList<string>)new List<string>());
		}
	}
}
namespace OpponentsFriends.src.Marisa
{
	public sealed class MarisaBFriendTemplate : CardTemplate
	{
		[EntityLogic(typeof(MarisaBFriendTemplate))]
		public sealed class MarisaBFriend : Card
		{
			public int Value3 = 2;

			public override IEnumerable<BattleAction> GetPassiveActions()
			{
				((Card)this).NotifyActivating();
				((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).PassiveCost;
				if (((Card)this).IsUpgraded)
				{
					yield return (BattleAction)new AddCardsToDrawZoneAction((IEnumerable<Card>)Library.CreateCards<Potion>(((Card)this).Value1, false), (DrawZoneTarget)2, (AddCardsType)0);
				}
				else
				{
					yield return (BattleAction)new AddCardsToDiscardAction((IEnumerable<Card>)Library.CreateCards<Potion>(((Card)this).Value1, false), (AddCardsType)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)
				if (precondition == null || (int)((MiniSelectCardInteraction)precondition).SelectedCard.FriendToken == 1)
				{
					((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).ActiveCost;
					yield return (BattleAction)new ScryAction(((Card)this).Scry);
					yield return (BattleAction)new DrawManyCardAction(((Card)this).Value2);
					yield break;
				}
				((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).UltimateCost;
				((Card)this).UltimateUsed = true;
				List<Card> list = (from card in ((Card)this).Battle.DrawZoneToShow.Concat(((Card)this).Battle.DiscardZone)
					where !card.IsForbidden && card.CanUse
					select card).ToList();
				if (list.Count > 0)
				{
					SelectCardInteraction action = new SelectCardInteraction(1, 1, (IEnumerable<Card>)list, (SelectedCardHandling)0);
					yield return (BattleAction)new InteractionAction((Interaction)(object)action, false);
					Card card2 = action.SelectedCards.FirstOrDefault();
					for (int i = 0; i < Value3; i++)
					{
						yield return (BattleAction)new MoveCardToDrawZoneAction(card2, (DrawZoneTarget)0);
						yield return (BattleAction)new PlayCardAction(card2);
					}
				}
			}
		}

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

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

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

		public override CardConfig MakeConfig()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: 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)).Any = 2;
			((ManaGroup)(ref val2)).Black = 1;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 1;
			((ManaGroup)(ref val2)).Black = 1;
			ManaGroup? val4 = val2;
			int? num = 1;
			int? num2 = 1;
			int? num3 = 2;
			int? num4 = 3;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Philosophy = 1;
			ManaGroup? val5 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Philosophy = 2;
			return new CardConfig(0, "", 10, true, array, "", "", 0, false, false, false, false, true, (Rarity)2, (CardType)5, val, (IReadOnlyList<ManaColor>)obj, false, val3, val4, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, num, num2, num3, num4, val5, (ManaGroup?)val2, (int?)2, (int?)3, (int?)null, (int?)1, (int?)1, (int?)1, (int?)1, (int?)(-3), (int?)(-3), (int?)null, (int?)null, (int?)(-6), (int?)(-5), (Keyword)0, (Keyword)1048576, false, (Keyword)68719476736L, (Keyword)68719476736L, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string> { "Potion" }, (IReadOnlyList<string>)new List<string> { "Potion" }, "Marisa", "", "", true, (string)null, (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class MarisaRFriendTemplate : CardTemplate
	{
		[EntityLogic(typeof(MarisaRFriendTemplate))]
		public sealed class MarisaRFriend : Card
		{
			public int Value3 = 3;

			public override IEnumerable<BattleAction> OnTurnStartedInHand()
			{
				return ((Card)this).GetPassiveActions();
			}

			public override IEnumerable<BattleAction> GetPassiveActions()
			{
				((Card)this).NotifyActivating();
				((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).PassiveCost;
				yield return (BattleAction)(object)new ApplyStatusEffectAction<Charging>((Unit)(object)((Card)this).Battle.Player, (int?)((Card)this).Value1, (int?)null, (int?)null, (int?)null, 0f, true);
				yield return (BattleAction)(object)new ApplyStatusEffectAction<Concentration>((Unit)(object)((Card)this).Battle.Player, (int?)((Card)this).Value2, (int?)null, (int?)null, (int?)null, 0f, true);
			}

			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)this).Loyalty = ((Card)this).Loyalty + ((Card)this).ActiveCost;
					List<Card> list = ((Card)this).Battle.HandZone.Where((Card hand) => hand != this && !hand.IsTempRetain && !hand.IsRetain && !hand.Summoned).ToList();
					foreach (Card hand2 in list)
					{
						hand2.IsTempRetain = true;
					}
				}
				else
				{
					((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).UltimateCost;
					((Card)this).UltimateUsed = true;
					yield return ((Card)this).BuffAction<Burst>(1, 0, 0, 0, 0.2f);
					yield return (BattleAction)new DrawManyCardAction(Value3);
				}
			}
		}

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

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

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

		public override CardConfig MakeConfig()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e3: 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)).Any = 2;
			((ManaGroup)(ref val2)).Red = 1;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 1;
			((ManaGroup)(ref val2)).Red = 1;
			ManaGroup? val4 = val2;
			int? num = 2;
			int? num2 = 2;
			int? num3 = 1;
			int? num4 = 1;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Philosophy = 2;
			ManaGroup? val5 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Philosophy = 2;
			return new CardConfig(0, "", 10, true, array, "", "", 0, false, false, false, false, true, (Rarity)2, (CardType)5, val, (IReadOnlyList<ManaColor>)obj, false, val3, val4, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, num, num2, num3, num4, val5, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)1, (int?)1, (int?)1, (int?)1, (int?)(-2), (int?)(-1), (int?)null, (int?)null, (int?)(-4), (int?)(-3), (Keyword)0, (Keyword)1048576, false, (Keyword)4194304, (Keyword)4194304, (IReadOnlyList<string>)new List<string> { "Charging", "Concentration", "Burst" }, (IReadOnlyList<string>)new List<string> { "Charging", "Concentration", "Burst" }, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "Marisa", "", "", true, (string)null, (IReadOnlyList<string>)new List<string>());
		}
	}
}
namespace OpponentsFriends.src.Koishi
{
	public sealed class KoishiBFriendTemplate : CardTemplate
	{
		[EntityLogic(typeof(KoishiBFriendTemplate))]
		public sealed class KoishiBFriend : Card
		{
			private bool triggered = false;

			private UnitSelector target = null;

			protected override void OnEnterBattle(BattleController battle)
			{
				((Card)this).ReactBattleEvent<CardUsingEventArgs>(((Card)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed);
			}

			private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs action)
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Invalid comparison between Unknown and I4
				if ((int)action.Card.CardType == 1)
				{
					triggered = true;
					target = action.Selector;
					return ((Card)this).GetPassiveActions();
				}
				return null;
			}

			public override IEnumerable<BattleAction> OnTurnEndingInHand()
			{
				IEnumerable<BattleAction> passiveActions = ((Card)this).GetPassiveActions();
				triggered = false;
				return passiveActions;
			}

			public override IEnumerable<BattleAction> GetPassiveActions()
			{
				((Card)this).NotifyActivating();
				((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).PassiveCost;
				if (!((Card)this).Battle.BattleShouldEnd)
				{
					if (!triggered || target == UnitSelector.AllEnemies)
					{
						yield return (BattleAction)new PlayCardAction((Card)(object)Library.CreateCard<FollowAttackFiller>(), UnitSelector.RandomEnemy);
					}
					else
					{
						yield return (BattleAction)new PlayCardAction((Card)(object)Library.CreateCard<FollowAttackFiller>(), target);
					}
				}
			}

			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)this).Loyalty = ((Card)this).Loyalty + ((Card)this).ActiveCost;
					yield return ((Card)this).BuffAction<MoodPassion>(0, 0, 0, 0, 0.2f);
					yield return (BattleAction)new DrawManyCardAction(((Card)this).Value1);
				}
				else
				{
					((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).UltimateCost;
					((Card)this).UltimateUsed = true;
					yield return (BattleAction)new GainManaAction(((Card)this).Mana);
					yield return (BattleAction)new DreamCardsAction(((Card)this).Value2);
					yield return ((Card)this).BuffAction<Firepower>(((Card)this).Value2, 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("KoishiBFriend");
		}

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

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

		public override CardConfig MakeConfig()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_022f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0235: 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)).Any = 2;
			((ManaGroup)(ref val2)).Black = 1;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 1;
			((ManaGroup)(ref val2)).Black = 1;
			ManaGroup? val4 = val2;
			int? num = 2;
			int? num2 = 2;
			int? num3 = 6;
			int? num4 = 7;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).White = 1;
			((ManaGroup)(ref val2)).Blue = 1;
			((ManaGroup)(ref val2)).Green = 1;
			((ManaGroup)(ref val2)).Black = 1;
			((ManaGroup)(ref val2)).Red = 1;
			((ManaGroup)(ref val2)).Colorless = 1;
			ManaGroup? val5 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).White = 1;
			((ManaGroup)(ref val2)).Blue = 1;
			((ManaGroup)(ref val2)).Green = 1;
			((ManaGroup)(ref val2)).Black = 1;
			((ManaGroup)(ref val2)).Red = 1;
			((ManaGroup)(ref val2)).Colorless = 1;
			((ManaGroup)(ref val2)).Philosophy = 1;
			return new CardConfig(0, "", 10, true, array, "", "", 0, false, false, false, false, true, (Rarity)2, (CardType)5, val, (IReadOnlyList<ManaColor>)obj, false, val3, val4, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, num, num2, num3, num4, val5, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)1, (int?)1, (int?)1, (int?)1, (int?)(-3), (int?)(-2), (int?)null, (int?)null, (int?)(-6), (int?)(-6), (Keyword)0, (Keyword)1048576, false, (Keyword)18014398509481984L, (Keyword)18014398509481984L, (IReadOnlyList<string>)new List<string> { "MoodPassion", "Firepower" }, (IReadOnlyList<string>)new List<string> { "MoodPassion", "Firepower" }, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "Koishi", "", "", true, (string)null, (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class KoishiGFriendTemplate : CardTemplate
	{
		[EntityLogic(typeof(KoishiGFriendTemplate))]
		public sealed class KoishiGFriend : Card
		{
			public override IEnumerable<BattleAction> OnTurnStartedInHand()
			{
				return ((Card)this).GetPassiveActions();
			}

			public override IEnumerable<BattleAction> GetPassiveActions()
			{
				((Card)this).NotifyActivating();
				((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).PassiveCost;
				yield return (BattleAction)new GainManaAction(((Card)this).Mana);
			}

			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)this).Loyalty = ((Card)this).Loyalty + ((Card)this).ActiveCost;
					yield return ((Card)this).BuffAction<Inspiration>(((Card)this).Value1, 0, 0, 0, 0.2f);
					yield return (BattleAction)new AddCardsToDrawZoneAction((IEnumerable<Card>)Library.CreateCards<InspirationCard>(((Card)this).Value1, false), (DrawZoneTarget)2, (AddCardsType)0);
					yield return (BattleAction)new AddCardsToDiscardAction((IEnumerable<Card>)Library.CreateCards<InspirationCard>(((Card)this).Value1, false), (AddCardsType)0);
					yield break;
				}
				((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).UltimateCost;
				((Card)this).UltimateUsed = true;
				yield return ((Card)this).BuffAction<Graze>(((Card)this).Value2, 0, 0, 0, 0.2f);
				Guns guns = new Guns(((Card)this).GunName, ((Card)this).Value2, true);
				foreach (GunPair gunPair in guns.GunPairs)
				{
					yield return ((Card)this).AttackAction(UnitSelector.AllEnemies, gunPair);
				}
			}
		}

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

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

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

		public override CardConfig MakeConfig()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e8: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)2;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)5 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 2;
			((ManaGroup)(ref val2)).Green = 1;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 1;
			((ManaGroup)(ref val2)).Green = 1;
			ManaGroup? val4 = val2;
			int? num = 5;
			int? num2 = 6;
			int? num3 = 1;
			int? num4 = 1;
			int? num5 = 5;
			int? num6 = 6;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Colorless = 1;
			((ManaGroup)(ref val2)).Green = 1;
			ManaGroup? val5 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Colorless = 1;
			((ManaGroup)(ref val2)).Green = 2;
			return new CardConfig(0, "", 10, true, array, "", "", 0, false, false, false, false, true, (Rarity)2, (CardType)5, val, (IReadOnlyList<ManaColor>)obj, false, val3, val4, (int?)null, num, num2, (int?)null, (int?)null, (int?)null, (int?)null, num3, num4, num5, num6, val5, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)1, (int?)1, (int?)1, (int?)1, (int?)(-3), (int?)(-3), (int?)null, (int?)null, (int?)(-6), (int?)(-6), (Keyword)0, (Keyword)1048576, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "Inspiration", "Graze" }, (IReadOnlyList<string>)new List<string> { "Inspiration", "Graze" }, (IReadOnlyList<string>)new List<string> { "InspirationCard" }, (IReadOnlyList<string>)new List<string> { "InspirationCard" }, "Koishi", "", "", true, (string)null, (IReadOnlyList<string>)new List<string>());
		}
	}
}
namespace OpponentsFriends.src.Cirno
{
	public sealed class CirnoGFriendTemplate : CardTemplate
	{
		[EntityLogic(typeof(CirnoGFriendTemplate))]
		public sealed class CirnoGFriend : Card
		{
			public int Heal = 5;

			public override IEnumerable<BattleAction> OnTurnStartedInHand()
			{
				return ((Card)this).GetPassiveActions();
			}

			public override IEnumerable<BattleAction> GetPassiveActions()
			{
				((Card)this).NotifyActivating();
				((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).PassiveCost;
				yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<SummerFlower>(((Card)this).Value1, ((Card)this).IsUpgraded), (AddCardsType)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)
				if (precondition == null || (int)((MiniSelectCardInteraction)precondition).SelectedCard.FriendToken == 1)
				{
					((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).ActiveCost;
					Card[] array = ((Card)this).Battle.RollCardsWithoutManaLimit(new CardWeightTable(RarityWeightTable.BattleCard, OwnerWeightTable.AllOnes, CardTypeWeightTable.OnlyFriend, false), ((Card)this).Value2, (Predicate<CardConfig>)delegate(CardConfig config)
					{
						//IL_0001: Unknown result type (might be due to invalid IL or missing references)
						//IL_0006: Unknown result type (might be due to invalid IL or missing references)
						ManaGroup cost = config.Cost;
						return ((ManaGroup)(ref cost)).Amount < 5;
					});
					Card[] array2 = array;
					foreach (Card obj in array2)
					{
						obj.Summon();
					}
					SelectCardInteraction interaction = new SelectCardInteraction(1, 1, (IEnumerable<Card>)array, (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 return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)selectedCards, (AddCardsType)0);
					}
				}
				else
				{
					((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).UltimateCost;
					((Card)this).UltimateUsed = true;
					ManaGroup baseMana = ((GameEntity)this).GameRun.BaseMana;
					yield return (BattleAction)new GainManaAction(baseMana);
					yield return ((Card)this).HealAction(Heal);
				}
			}
		}

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

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

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

		public override CardConfig MakeConfig()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: 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)).Any = 2;
			((ManaGroup)(ref val2)).Green = 1;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 1;
			((ManaGroup)(ref val2)).Green = 1;
			return new CardConfig(0, "", 10, true, array, "", "", 0, false, false, false, false, true, (Rarity)2, (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?)1, (int?)3, (int?)4, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)1, (int?)1, (int?)1, (int?)1, (int?)(-3), (int?)(-3), (int?)null, (int?)null, (int?)(-6), (int?)(-5), (Keyword)0, (Keyword)1048576, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "Cold", "DroneBlock" }, (IReadOnlyList<string>)new List<string> { "Cold", "DroneBlock" }, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "Cirno", "", "", true, (string)null, (IReadOnlyList<string>)new List<string>());
		}
	}
	public sealed class CirnoUFriendTemplate : CardTemplate
	{
		[EntityLogic(typeof(CirnoUFriendTemplate))]
		public sealed class CirnoUFriend : Card
		{
			public override IEnumerable<BattleAction> OnTurnStartedInHand()
			{
				return ((Card)this).GetPassiveActions();
			}

			public override IEnumerable<BattleAction> GetPassiveActions()
			{
				((Card)this).NotifyActivating();
				((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).PassiveCost;
				if (((Card)this).Battle.DrawZone.Count > 0)
				{
					Card topCard = ((Card)this).Battle.DrawZone.FirstOrDefault();
					if (((Card)this).Battle.DrawZone.Count > 1)
					{
						Card bottomCard = ((Card)this).Battle.DrawZone.LastOrDefault();
						yield return (BattleAction)new MoveCardAction(bottomCard, (CardZone)2);
					}
					yield return (BattleAction)new MoveCardAction(topCard, (CardZone)2);
				}
			}

			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)this).Loyalty = ((Card)this).Loyalty + ((Card)this).ActiveCost;
					foreach (BattleAction item in ((Card)this).DebuffAction<Cold>((IEnumerable<Unit>)((Card)this).Battle.AllAliveEnemies, 0, 0, 0, 0, true, 0.1f))
					{
						yield return item;
					}
					yield return ((Card)this).DefenseAction(true);
				}
				else
				{
					((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).UltimateCost;
					((Card)this).UltimateUsed = true;
					yield return ((Card)this).BuffAction<DroneBlock>(((Card)this).Value1, 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("CirnoUFriend");
		}

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

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

		public override CardConfig MakeConfig()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: Expected O, but got Unknown
			string[][] array = new string[0][];
			TargetType? val = (TargetType)2;
			List<ManaColor> obj = new List<ManaColor> { (ManaColor)2 };
			ManaGroup val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 2;
			((ManaGroup)(ref val2)).Blue = 1;
			ManaGroup val3 = val2;
			val2 = default(ManaGroup);
			((ManaGroup)(ref val2)).Any = 1;
			((ManaGroup)(ref val2)).Blue = 1;
			return new CardConfig(0, "", 10, true, array, "", "", 0, false, false, false, false, true, (Rarity)2, (CardType)5, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)9, (int?)9, (int?)13, (int?)17, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)1, (int?)1, (int?)1, (int?)1, (int?)(-2), (int?)(-2), (int?)null, (int?)null, (int?)(-4), (int?)(-4), (Keyword)0, (Keyword)1048576, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "Cold", "DroneBlock" }, (IReadOnlyList<string>)new List<string> { "Cold", "DroneBlock" }, (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)
		{
		}
	}
}