Decompiled source of Less Stall v1.0.1

LessStall.dll

Decompiled 5 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using AddWatermark;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Logging;
using HarmonyLib;
using LBoL.Base;
using LBoL.Base.Extensions;
using LBoL.ConfigData;
using LBoL.Core;
using LBoL.Core.Battle;
using LBoL.Core.Battle.BattleActions;
using LBoL.Core.Battle.Interactions;
using LBoL.Core.Cards;
using LBoL.Core.Randoms;
using LBoL.Core.StatusEffects;
using LBoL.Core.Units;
using LBoL.EntityLib.Cards.Character.Marisa;
using LBoL.EntityLib.Cards.Character.Sakuya;
using LBoL.EntityLib.Cards.Neutral.NoColor;
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("LessStall")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+23e85c692074e2787bc7a096d0f572277e0cb961")]
[assembly: AssemblyProduct("LessStall")]
[assembly: AssemblyTitle("LessStall")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace LessStall
{
	[OverwriteVanilla]
	public sealed class BailianFireDef : CardTemplate
	{
		public static ManaGroup reducedMana = ManaGroup.Anys(1);

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

		[DontOverwrite]
		public override CardImages LoadCardImages()
		{
			return null;
		}

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

		public override CardConfig MakeConfig()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			CardConfig val = CardConfig.FromId(IdContainer.op_Implicit(((EntityDefinition)this).GetId()));
			val.Mana = reducedMana;
			val.UpgradedValue1 = 3;
			return val;
		}
	}
	[EntityLogic(typeof(BailianFireDef))]
	public sealed class BailianFire : 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 ((Card)this).BuffAction<BailianFireSe>(1, 0, 0, 0, 0.2f);
			if (!((Card)this).IsUpgraded || ((Card)this).Value1 <= 0)
			{
				yield break;
			}
			Card[] cards = ((Card)this).Battle.RollCards(new CardWeightTable(RarityWeightTable.BattleCard, OwnerWeightTable.AllOnes, CardTypeWeightTable.OnlySkill, false), ((Card)this).Value1, (Predicate<CardConfig>)null);
			if (cards.Length != 0)
			{
				Card[] array = cards;
				foreach (Card card in array)
				{
					card.IsReplenish = true;
				}
				yield return (BattleAction)new AddCardsToDrawZoneAction((IEnumerable<Card>)cards, (DrawZoneTarget)2, (AddCardsType)0);
			}
		}
	}
	[OverwriteVanilla]
	public sealed class BailianFireSeDef : StatusEffectTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit("BailianFireSe");
		}

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

		[DontOverwrite]
		public override Sprite LoadSprite()
		{
			return null;
		}

		public override StatusEffectConfig MakeConfig()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			StatusEffectConfig val = StatusEffectConfig.FromId(IdContainer.op_Implicit(((EntityDefinition)this).GetId()));
			val.IsStackable = false;
			val.HasLevel = false;
			val.Keywords = (Keyword)0;
			return val;
		}
	}
	[EntityLogic(typeof(BailianFireSeDef))]
	public sealed class BailianFireSe : StatusEffect
	{
		public ManaGroup Mana = BailianFireDef.reducedMana;

		protected override void OnAdded(Unit unit)
		{
			ReduceCosts(((StatusEffect)this).Battle.EnumerateAllCards());
			((StatusEffect)this).HandleOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToDiscard, (GameEventHandler<CardsEventArgs>)delegate(CardsEventArgs e)
			{
				ReduceCosts(e.Cards);
			});
			((StatusEffect)this).HandleOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToHand, (GameEventHandler<CardsEventArgs>)delegate(CardsEventArgs e)
			{
				ReduceCosts(e.Cards);
			});
			((StatusEffect)this).HandleOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToExile, (GameEventHandler<CardsEventArgs>)delegate(CardsEventArgs e)
			{
				ReduceCosts(e.Cards);
			});
			((StatusEffect)this).HandleOwnerEvent<CardsAddingToDrawZoneEventArgs>(((StatusEffect)this).Battle.CardsAddedToDrawZone, (GameEventHandler<CardsAddingToDrawZoneEventArgs>)delegate(CardsAddingToDrawZoneEventArgs e)
			{
				ReduceCosts(e.Cards);
			});
		}

		private void ReduceCosts(IEnumerable<Card> cards)
		{
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Invalid comparison between Unknown and I4
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			List<Card> list = cards.Where((Card card) => (int)card.CardType == 3).ToList();
			if (list.Count <= 0)
			{
				return;
			}
			((StatusEffect)this).NotifyActivating();
			foreach (Card item in list)
			{
				if ((int)item.CardType == 3 && !ManaGroupExtensions.IsSubset(item.BaseCost, Mana))
				{
					item.SetBaseCost(Mana);
				}
			}
		}
	}
	[OverwriteVanilla]
	public sealed class BailianNingshenDef : CardTemplate
	{
		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("BailianNingshen");
		}

		[DontOverwrite]
		public override CardImages LoadCardImages()
		{
			return null;
		}

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

		public override CardConfig MakeConfig()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			CardConfig val = CardConfig.FromId(IdContainer.op_Implicit(((EntityDefinition)this).GetId()));
			val.Keywords = (Keyword)131072;
			val.UpgradedKeywords = (Keyword)131072;
			return val;
		}
	}
	[EntityLogic(typeof(BailianNingshenDef))]
	public sealed class BailianNingshen : Card
	{
		protected override string GetBaseDescription()
		{
			return ((Card)this).GetBaseDescription();
		}

		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)
			Card[] cards = ((Card)this).Battle.RollCards(new CardWeightTable(RarityWeightTable.OnlyCommon, OwnerWeightTable.Valid, CardTypeWeightTable.CanBeLoot, false), ((Card)this).Value1, (Predicate<CardConfig>)null);
			if (cards.Length == 0)
			{
				yield break;
			}
			if (((Card)this).IsUpgraded)
			{
				Card[] array = cards;
				foreach (Card card in array)
				{
					card.Upgrade();
				}
			}
			MiniSelectCardInteraction interaction = new MiniSelectCardInteraction((IEnumerable<Card>)cards, false, false, false)
			{
				Source = (GameEntity)(object)this
			};
			yield return (BattleAction)new InteractionAction((Interaction)(object)interaction, false);
			Card selectedCard = interaction.SelectedCard;
			selectedCard.SetTurnCost(((Card)this).Mana);
			selectedCard.IsReplenish = true;
			yield return (BattleAction)new AddCardsToHandAction((Card[])(object)new Card[1] { selectedCard });
		}
	}
	[BepInPlugin("ravi.lbol.lessStall", "Less Stall", "1.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("ravi.lbol.lessStall", "");

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

		private void OnDestroy()
		{
			if (harmony != null)
			{
				harmony.UnpatchSelf();
			}
		}
	}
	[OverwriteVanilla]
	public sealed class FineCollectionDef : CardTemplate
	{
		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("FindCollection");
		}

		[DontOverwrite]
		public override CardImages LoadCardImages()
		{
			return null;
		}

		[DontOverwrite]
		public override LocalizationOption LoadLocalization()
		{
			return null;
		}

		public override CardConfig MakeConfig()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			CardConfig val = CardConfig.FromId(IdContainer.op_Implicit(((EntityDefinition)this).GetId()));
			val.Keywords = (Keyword)131072;
			val.UpgradedKeywords = (Keyword)393216;
			val.Value1 = 5;
			ManaGroup cost = default(ManaGroup);
			((ManaGroup)(ref cost)).White = 1;
			val.Cost = cost;
			return val;
		}
	}
	[OverwriteVanilla]
	public sealed class HuanxiangTouying : CardTemplate
	{
		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("HuanxiangTouying");
		}

		[DontOverwrite]
		public override CardImages LoadCardImages()
		{
			return null;
		}

		[DontOverwrite]
		public override LocalizationOption LoadLocalization()
		{
			return null;
		}

		public override CardConfig MakeConfig()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			CardConfig val = CardConfig.FromId(IdContainer.op_Implicit(((EntityDefinition)this).GetId()));
			val.Keywords = (Keyword)131072;
			val.UpgradedKeywords = (Keyword)131072;
			ManaGroup value = default(ManaGroup);
			((ManaGroup)(ref value)).Philosophy = 3;
			val.Mana = value;
			return val;
		}
	}
	[OverwriteVanilla]
	public sealed class LanCardDef : CardTemplate
	{
		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("LanCard");
		}

		[DontOverwrite]
		public override CardImages LoadCardImages()
		{
			return null;
		}

		[DontOverwrite]
		public override LocalizationOption LoadLocalization()
		{
			return null;
		}

		public override CardConfig MakeConfig()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			CardConfig val = CardConfig.FromId(IdContainer.op_Implicit(((EntityDefinition)this).GetId()));
			val.Keywords = (Keyword)393216;
			val.UpgradedKeywords = (Keyword)393216;
			ManaGroup value = default(ManaGroup);
			((ManaGroup)(ref value)).Any = 1;
			((ManaGroup)(ref value)).Hybrid = 1;
			((ManaGroup)(ref value)).HybridColor = 0;
			val.UpgradedCost = value;
			return val;
		}
	}
	[OverwriteVanilla]
	public sealed class LilyChunDef : CardTemplate
	{
		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("LilyChun");
		}

		[DontOverwrite]
		public override CardImages LoadCardImages()
		{
			return null;
		}

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

		public override CardConfig MakeConfig()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			CardConfig val = CardConfig.FromId(IdContainer.op_Implicit(((EntityDefinition)this).GetId()));
			val.Keywords = (Keyword)131072;
			val.UpgradedKeywords = (Keyword)131072;
			ManaGroup value = default(ManaGroup);
			((ManaGroup)(ref value)).Any = 1;
			val.Mana = value;
			value = default(ManaGroup);
			((ManaGroup)(ref value)).Any = 0;
			val.UpgradedMana = value;
			return val;
		}
	}
	[EntityLogic(typeof(LilyChunDef))]
	public sealed class LilyChun : 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)
			List<Card> cards = ((Card)this).Battle.RollCards(new CardWeightTable(RarityWeightTable.BattleCard, OwnerWeightTable.AllOnes, CardTypeWeightTable.CanBeLoot, false), ((Card)this).Value1, (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 == 1 && config.Id != ((GameEntity)this).Id;
			}).ToList();
			if (cards.Count <= 0)
			{
				yield break;
			}
			foreach (Card card in cards)
			{
				card.SetTurnCost(((Card)this).Mana);
				card.IsEthereal = true;
				card.IsExile = true;
			}
			yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)cards, (AddCardsType)0);
		}
	}
	[OverwriteVanilla]
	public sealed class LilyFriendDef : CardTemplate
	{
		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("LilyFriend");
		}

		[DontOverwrite]
		public override CardImages LoadCardImages()
		{
			return null;
		}

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

		public override CardConfig MakeConfig()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			CardConfig val = CardConfig.FromId(IdContainer.op_Implicit(((EntityDefinition)this).GetId()));
			val.Value2 = 2;
			return val;
		}
	}
	[EntityLogic(typeof(LilyFriendDef))]
	public sealed class LilyFriend : Card
	{
		public int UltDamage
		{
			get
			{
				//IL_0020: Unknown result type (might be due to invalid IL or missing references)
				//IL_0025: Unknown result type (might be due to invalid IL or missing references)
				if (((Card)this).Battle == null)
				{
					return 0;
				}
				int value = ((Card)this).Value2;
				ManaGroup battleMana = ((Card)this).Battle.BattleMana;
				return value * Math.Max(((ManaGroup)(ref battleMana)).Amount, 0);
			}
		}

		public ManaGroup TurnMana => ((Card)this).Mana;

		public ManaGroup ActiveMana
		{
			get
			{
				//IL_0024: Unknown result type (might be due to invalid IL or missing references)
				//IL_002a: Unknown result type (might be due to invalid IL or missing references)
				//IL_002f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0034: Unknown result type (might be due to invalid IL or missing references)
				//IL_0010: Unknown result type (might be due to invalid IL or missing references)
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0020: Unknown result type (might be due to invalid IL or missing references)
				//IL_0037: Unknown result type (might be due to invalid IL or missing references)
				if (!((Card)this).IsUpgraded)
				{
					return ManaGroup.Blues(1) + ManaGroup.Greens(2);
				}
				return ManaGroup.Philosophies(1) + ManaGroup.Greens(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;
				yield return (BattleAction)(object)((Card)this).SkillAnime;
				yield return (BattleAction)new GainManaAction(ActiveMana);
				yield break;
			}
			((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).UltimateCost;
			((Card)this).UltimateUsed = true;
			yield return (BattleAction)(object)((Card)this).SkillAnime;
			((Card)this).DeltaDamage = ((Card)this).DeltaDamage + UltDamage;
			((Card)this).CardGuns = new Guns(((Card)this).GunName, ((Card)this).Value1, true);
			foreach (GunPair gunPair in ((Card)this).CardGuns.GunPairs)
			{
				yield return ((Card)this).AttackRandomAliveEnemyAction(gunPair);
			}
		}

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

		public override IEnumerable<BattleAction> GetPassiveActions()
		{
			if (!((Card)this).Summoned || ((Card)this).Battle.BattleShouldEnd)
			{
				yield break;
			}
			<>n__0();
			((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).PassiveCost;
			for (int i = 0; i < ((Card)this).Battle.FriendPassiveTimes; i++)
			{
				if (((Card)this).Battle.BattleShouldEnd)
				{
					break;
				}
				yield return (BattleAction)(object)PerformAction.Sfx("FairySupport", 0f);
				yield return (BattleAction)(object)PerformAction.Effect((Unit)(object)((Card)this).Battle.Player, "LilyFairy", 0f, (string)null, 0f, (EffectBehavior)0, 0f);
				yield return (BattleAction)new GainManaAction(((Card)this).Mana);
			}
		}

		public override IEnumerable<BattleAction> SummonActions(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)
			((Card)this).CardGuns = new Guns(((Card)this).GunName, ((Card)this).Value1, true);
			foreach (GunPair gunPair in ((Card)this).CardGuns.GunPairs)
			{
				yield return ((Card)this).AttackRandomAliveEnemyAction(gunPair);
			}
			foreach (BattleAction item in <>n__1(selector, consumingMana, precondition))
			{
				yield return item;
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((Card)this).NotifyActivating();
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private IEnumerable<BattleAction> <>n__1(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return ((Card)this).SummonActions(selector, consumingMana, precondition);
		}
	}
	[OverwriteVanilla]
	public sealed class MeilingFriendDef : CardTemplate
	{
		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("MeilingFriend");
		}

		[DontOverwrite]
		public override CardImages LoadCardImages()
		{
			return null;
		}

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

		public override CardConfig MakeConfig()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			CardConfig val = CardConfig.FromId(IdContainer.op_Implicit(((EntityDefinition)this).GetId()));
			val.Value1 = 3;
			val.UpgradedValue1 = 4;
			return val;
		}
	}
	[EntityLogic(typeof(MeilingFriendDef))]
	public sealed class MeilingFriend : Card
	{
		public int Graze
		{
			get
			{
				if (!((Card)this).IsUpgraded)
				{
					return 1;
				}
				return 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)
			((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).UltimateCost;
			((Card)this).UltimateUsed = true;
			yield return (BattleAction)(object)((Card)this).SpellAnime;
			yield return ((Card)this).BuffAction<Spirit>(((Card)this).Value1, 0, 0, 0, 0.2f);
			yield return ((Card)this).BuffAction<Firepower>(((Card)this).Value2, 0, 0, 0, 0.2f);
		}

		protected override void OnEnterBattle(BattleController battle)
		{
			((Card)this).ReactBattleEvent<StatisticalDamageEventArgs>(((Unit)((Card)this).Battle.Player).StatisticalTotalDamageReceived, (EventSequencedReactor<StatisticalDamageEventArgs>)OnStatisticalTotalDamageReceived);
		}

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

		private IEnumerable<BattleAction> OnStatisticalTotalDamageReceived(StatisticalDamageEventArgs args)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			if ((int)((Card)this).Zone != 2)
			{
				return null;
			}
			return ((Card)this).GetPassiveActions();
		}

		public override IEnumerable<BattleAction> GetPassiveActions()
		{
			if (!((Card)this).Summoned || ((Card)this).Battle.BattleShouldEnd)
			{
				yield break;
			}
			<>n__0();
			((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).PassiveCost;
			for (int i = 0; i < ((Card)this).Battle.FriendPassiveTimes; i++)
			{
				if (((Card)this).Battle.BattleShouldEnd)
				{
					break;
				}
				yield return (BattleAction)(object)PerformAction.Sfx("FairySupport", 0f);
				yield return (BattleAction)new AddCardsToHandAction((Card[])(object)new Card[1] { (Card)Library.CreateCard<Knife>() });
			}
		}

		public override IEnumerable<BattleAction> SummonActions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			yield return ((Card)this).BuffAction<Graze>(Graze, 0, 0, 0, 0.2f);
			foreach (BattleAction item in <>n__1(selector, consumingMana, precondition))
			{
				yield return item;
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((Card)this).NotifyActivating();
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private IEnumerable<BattleAction> <>n__1(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return ((Card)this).SummonActions(selector, consumingMana, precondition);
		}
	}
	[OverwriteVanilla]
	public sealed class OutInGapDef : CardTemplate
	{
		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("OutInGap");
		}

		[DontOverwrite]
		public override CardImages LoadCardImages()
		{
			return null;
		}

		[DontOverwrite]
		public override LocalizationOption LoadLocalization()
		{
			return null;
		}

		public override CardConfig MakeConfig()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			CardConfig val = CardConfig.FromId(IdContainer.op_Implicit(((EntityDefinition)this).GetId()));
			val.Keywords = (Keyword)131072;
			val.UpgradedKeywords = (Keyword)393216;
			val.Value1 = 5;
			ManaGroup cost = default(ManaGroup);
			((ManaGroup)(ref cost)).Any = 1;
			((ManaGroup)(ref cost)).White = 1;
			val.Cost = cost;
			return val;
		}
	}
	[OverwriteVanilla]
	public sealed class PatchouliFriendDef : CardTemplate
	{
		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("PatchouliFriend");
		}

		[DontOverwrite]
		public override CardImages LoadCardImages()
		{
			return null;
		}

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

		public override CardConfig MakeConfig()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			CardConfig val = CardConfig.FromId(IdContainer.op_Implicit(((EntityDefinition)this).GetId()));
			val.Value1 = 1;
			val.UpgradedValue1 = 1;
			val.RelativeCards = new List<string> { "Astrology", "Potion" };
			val.UpgradedRelativeCards = new List<string> { "Astrology", "Potion" };
			return val;
		}
	}
	[EntityLogic(typeof(PatchouliFriendDef))]
	public sealed class PatchouliFriend : Card
	{
		public override FriendCostInfo FriendU => new FriendCostInfo(((Card)this).UltimateCost, (FriendCostType)1);

		public int PassiveColor => ((Card)this).PassiveCost;

		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)(object)((Card)this).SkillAnime;
				yield return ((Card)this).BuffAction<Firepower>(((Card)this).Value1, 0, 0, 0, 0.2f);
				yield return ((Card)this).BuffAction<Spirit>(((Card)this).Value1, 0, 0, 0, 0.2f);
				yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<Astrology>(((Card)this).Value1, false), (AddCardsType)0);
			}
			else
			{
				((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).UltimateCost;
				yield return (BattleAction)(object)((Card)this).SkillAnime;
				yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<Potion>(((Card)this).Value2, false), (AddCardsType)0);
			}
		}

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

		public override IEnumerable<BattleAction> GetPassiveActions()
		{
			if (!((Card)this).Summoned || ((Card)this).Battle.BattleShouldEnd)
			{
				yield break;
			}
			<>n__0();
			((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).PassiveCost;
			for (int i = 0; i < ((Card)this).Battle.FriendPassiveTimes; i++)
			{
				if (((Card)this).Battle.BattleShouldEnd)
				{
					break;
				}
				yield return (BattleAction)(object)PerformAction.Sfx("FairySupport", 0f);
				yield return (BattleAction)(object)ConvertManaAction.PhilosophyRandomMana(((Card)this).Battle.BattleMana, PassiveColor, ((GameEntity)this).GameRun.BattleRng);
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((Card)this).NotifyActivating();
		}
	}
	[OverwriteVanilla]
	public sealed class PatchouliLibrary : CardTemplate
	{
		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("PatchouliLibrary");
		}

		[DontOverwrite]
		public override CardImages LoadCardImages()
		{
			return null;
		}

		[DontOverwrite]
		public override LocalizationOption LoadLocalization()
		{
			return null;
		}

		public override CardConfig MakeConfig()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			CardConfig val = CardConfig.FromId(IdContainer.op_Implicit(((EntityDefinition)this).GetId()));
			val.Keywords = (Keyword)393216;
			val.UpgradedKeywords = (Keyword)393216;
			ManaGroup value = default(ManaGroup);
			((ManaGroup)(ref value)).White = 1;
			((ManaGroup)(ref value)).Hybrid = 2;
			((ManaGroup)(ref value)).HybridColor = 5;
			val.UpgradedCost = value;
			return val;
		}
	}
	public static class PInfo
	{
		public const string GUID = "ravi.lbol.lessStall";

		public const string Name = "Less Stall";

		public const string version = "1.0.1";

		public static readonly Harmony harmony = new Harmony("ravi.lbol.lessStall");
	}
	internal class WatermarkWrapper
	{
		[MethodImpl(MethodImplOptions.NoInlining)]
		internal static void ActivateWatermark()
		{
			API.ActivateWatermark();
		}
	}
	[OverwriteVanilla]
	public sealed class YukariFriendDef : CardTemplate
	{
		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("YukariFriend");
		}

		[DontOverwrite]
		public override CardImages LoadCardImages()
		{
			return null;
		}

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

		public override CardConfig MakeConfig()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			CardConfig val = CardConfig.FromId(IdContainer.op_Implicit(((EntityDefinition)this).GetId()));
			val.Value1 = 35;
			return val;
		}
	}
	[EntityLogic(typeof(YukariFriendDef))]
	public sealed class YukariFriend : Card
	{
		public int Fire
		{
			get
			{
				if (((Card)this).Battle == null)
				{
					return 0;
				}
				return ((Card)this).Battle.TurnCardUsageHistory.Count((Card c) => (int)c.CardType == 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;
				yield return (BattleAction)(object)((Card)this).SkillAnime;
				yield return ((Card)this).DefenseAction(0, ((Card)this).Value1, (BlockShieldType)2, true);
				yield break;
			}
			((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).UltimateCost;
			((Card)this).UltimateUsed = true;
			yield return (BattleAction)(object)((Card)this).SkillAnime;
			List<Card> cardsCanExile = (from card in ((Card)this).Battle.HandZone.Concat(((Card)this).Battle.DrawZoneToShow).Concat(((Card)this).Battle.DiscardZone)
				where card != this
				select card).ToList();
			if (!CollectionsExtensions.Empty<Card>((IReadOnlyCollection<Card>)cardsCanExile))
			{
				SelectCardInteraction exileInteraction = new SelectCardInteraction(0, int.MaxValue, (IEnumerable<Card>)cardsCanExile, (SelectedCardHandling)0)
				{
					Source = (GameEntity)(object)this
				};
				yield return (BattleAction)new InteractionAction((Interaction)(object)exileInteraction, false);
				Card[] exiledCards = exileInteraction.SelectedCards.ToArray();
				if (exiledCards.Length != 0)
				{
					yield return (BattleAction)new ExileManyCardAction((IEnumerable<Card>)exiledCards);
				}
			}
			if (((Card)this).Battle.ExileZone.Count > 0)
			{
				SelectCardInteraction interaction = new SelectCardInteraction(1, 1, (IEnumerable<Card>)((Card)this).Battle.ExileZone, (SelectedCardHandling)0)
				{
					Source = (GameEntity)(object)this
				};
				yield return (BattleAction)new InteractionAction((Interaction)(object)interaction, false);
				Card returnedCard = interaction.SelectedCards.FirstOrDefault();
				if (returnedCard != null)
				{
					yield return (BattleAction)new MoveCardAction(returnedCard, (CardZone)2);
				}
			}
		}

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

		public override IEnumerable<BattleAction> GetPassiveActions()
		{
			if (!((Card)this).Summoned || ((Card)this).Battle.BattleShouldEnd)
			{
				yield break;
			}
			<>n__0();
			((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).PassiveCost;
			if (Fire <= 0)
			{
				yield break;
			}
			for (int i = 0; i < ((Card)this).Battle.FriendPassiveTimes; i++)
			{
				if (((Card)this).Battle.BattleShouldEnd)
				{
					break;
				}
				yield return ((Card)this).BuffAction<Firepower>(Fire, 0, 0, 0, 0.2f);
			}
		}

		protected override void OnEnterBattle(BattleController battle)
		{
			((Card)this).HandleBattleEvent<CardUsingEventArgs>(((Card)this).Battle.CardUsed, (GameEventHandler<CardUsingEventArgs>)delegate
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Invalid comparison between Unknown and I4
				if ((int)((Card)this).Zone == 2)
				{
					((GameEntity)this).NotifyChanged();
				}
			}, (GameEventPriority)0);
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((Card)this).NotifyActivating();
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		internal IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}