Decompiled source of Patchouli Knowledge v0.1.17

PatchouliCharacterMod.dll

Decompiled 2 weeks ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
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 Cysharp.Threading.Tasks;
using HarmonyLib;
using JetBrains.Annotations;
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.Intentions;
using LBoL.Core.StatusEffects;
using LBoL.Core.Units;
using LBoL.EntityLib.Cards;
using LBoL.EntityLib.Cards.Character.Sakuya;
using LBoL.EntityLib.Cards.Neutral.Black;
using LBoL.EntityLib.Cards.Neutral.NoColor;
using LBoL.EntityLib.Exhibits;
using LBoL.EntityLib.StatusEffects.Basic;
using LBoL.EntityLib.StatusEffects.ExtraTurn;
using LBoL.EntityLib.StatusEffects.Others;
using LBoL.Presentation.UI.Widgets;
using LBoLEntitySideloader;
using LBoLEntitySideloader.Attributes;
using LBoLEntitySideloader.Entities;
using LBoLEntitySideloader.Resource;
using LBoLEntitySideloader.Utils;
using PatchouliCharacterMod.BattleActions;
using PatchouliCharacterMod.Cards;
using PatchouliCharacterMod.Cards.Template;
using PatchouliCharacterMod.Config;
using PatchouliCharacterMod.GunName;
using PatchouliCharacterMod.Illustrator;
using PatchouliCharacterMod.ImageLoader;
using PatchouliCharacterMod.Localization;
using PatchouliCharacterMod.Patch;
using PatchouliCharacterMod.StatusEffects;
using TMPro;
using UnityEngine;
using UnityEngine.Experimental.Rendering;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: IgnoresAccessChecksTo("LBoL.Base")]
[assembly: IgnoresAccessChecksTo("LBoL.ConfigData")]
[assembly: IgnoresAccessChecksTo("LBoL.Core")]
[assembly: IgnoresAccessChecksTo("LBoL.EntityLib")]
[assembly: IgnoresAccessChecksTo("LBoL.Presentation")]
[assembly: IgnoresAccessChecksTo("Untitled.ConfigDataBuilder.Base")]
[assembly: AssemblyCompany("PatchouliCharacterMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+e6d190d072b7976c7f4efce1f8bcb5858c51b70d")]
[assembly: AssemblyProduct("PatchouliCharacterMod")]
[assembly: AssemblyTitle("PatchouliCharacterMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace PatchouliCharacterMod
{
	[BepInPlugin("rmrfmaxx.lbol.PatchouliCharacterMod", "Patchouli Character Mod", "0.1.17")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInProcess("LBoL.exe")]
	public class BepinexPlugin : BaseUnityPlugin
	{
		public static bool modelIsFlipped = true;

		public static List<ManaColor> offColors = new List<ManaColor>
		{
			(ManaColor)1,
			(ManaColor)4,
			(ManaColor)5,
			(ManaColor)6
		};

		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("rmrfmaxx.lbol.PatchouliCharacterMod", "");

		public static ConfigEntry<int> startingExhibitSign;

		public static ConfigEntry<int> startingCardSign;

		private void Awake()
		{
			log = ((BaseUnityPlugin)this).Logger;
			startingExhibitSign = ((BaseUnityPlugin)this).Config.Bind<int>("StartingExhibitSign", "StartingExhibitSign", 0, "Sign provided by PatchouliB's starting Exhibit. 0 = Fire, 1 = Water, 2 = Wood, 3 = Metal, 4 = Earth, 5 = Sun, 6 = Moon.");
			startingCardSign = ((BaseUnityPlugin)this).Config.Bind<int>("StartingCardSign", "StartingCardSign", 0, "Sign provided by PatchouliB's starting common card. 0 = Fire, 1 = Water, 2 = Wood, 3 = Metal, 4 = Earth, 5 = Sun, 6 = Moon.");
			Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
			((Object)((Component)this).gameObject).hideFlags = (HideFlags)61;
			EntityManager.RegisterSelf();
			harmony.PatchAll();
			if (Chainloader.PluginInfos.ContainsKey("neo.lbol.tools.watermark"))
			{
				WatermarkWrapper.ActivateWatermark();
			}
		}

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

		public const string Name = "Patchouli Character Mod";

		public const string version = "0.1.17";

		public static readonly Harmony harmony = new Harmony("rmrfmaxx.lbol.PatchouliCharacterMod");
	}
	public class PatchouliLoadouts
	{
		public static string UltimateSkillA = "PatchouliUltU";

		public static string UltimateSkillB = "PatchouliUltB";

		public static string ExhibitA = "PatchouliExhibitU";

		public static string ExhibitB = "PatchouliExhibitB";

		public static List<string> DeckA = new List<string>
		{
			"Shoot", "Shoot", "Boundary", "Boundary", "PatchouliAttackU", "PatchouliAttackU", "PatchouliBlockB", "PatchouliBlockB", "PatchouliBlockB", "PatchouliArcaneWard",
			"PatchouliCondensedBubble"
		};

		public static List<string> DeckB = new List<string> { "Shoot", "Shoot", "Boundary", "Boundary", "PatchouliAttackB", "PatchouliAttackB", "PatchouliBlockU", "PatchouliBlockU", "PatchouliBlockU", "PatchouliElementalManipulation" };
	}
	public sealed class PatchouliPlayerDef : PlayerUnitTemplate
	{
		[EntityLogic(typeof(PatchouliPlayerDef))]
		public sealed class PatchouliMod : PlayerUnit
		{
			public GameEvent<BoostEventArgs> Boosted { get; } = new GameEvent<BoostEventArgs>();


			public GameEvent<TriggerSignEventArgs> Spellcasting { get; } = new GameEvent<TriggerSignEventArgs>();


			public GameEvent<TriggerSignEventArgs> Spellcasted { get; } = new GameEvent<TriggerSignEventArgs>();


			public GameEvent<TriggerSignEventArgs> SignPassiveTriggering { get; } = new GameEvent<TriggerSignEventArgs>();


			public GameEvent<TriggerSignEventArgs> SignPassiveTriggered { get; } = new GameEvent<TriggerSignEventArgs>();


			public GameEvent<TriggerSignEventArgs> SignActiveTriggering { get; } = new GameEvent<TriggerSignEventArgs>();


			public GameEvent<TriggerSignEventArgs> SignActiveTriggered { get; } = new GameEvent<TriggerSignEventArgs>();

		}

		public static string playerName = "Patchouli";

		public static string modName = "PatchouliMod";

		public static DirectorySource PatchouliDir = new DirectorySource("rmrfmaxx.lbol.PatchouliCharacterMod", "");

		public UniTask<Sprite>? LoadSpellPortraitAsync { get; private set; }

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

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)PatchouliLocalization.PlayerUnitBatchLoc.AddEntity((EntityDefinition)(object)this);
		}

		public override PlayerImages LoadPlayerImages()
		{
			return PatchouliImageLoader.LoadPlayerImages(playerName);
		}

		public override PlayerUnitConfig MakeConfig()
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Expected O, but got Unknown
			int? num = 0;
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).Blue = 2;
			((ManaGroup)(ref val)).Black = 2;
			return new PlayerUnitConfig("PatchouliMod", 7, 0, num, "", "#d2c5df", true, 74, val, 85, 0, PatchouliLoadouts.UltimateSkillA, PatchouliLoadouts.UltimateSkillB, PatchouliLoadouts.ExhibitA, PatchouliLoadouts.ExhibitB, (IReadOnlyList<string>)PatchouliLoadouts.DeckA, (IReadOnlyList<string>)PatchouliLoadouts.DeckB, 3, 2);
		}
	}
	internal class WatermarkWrapper
	{
		[MethodImpl(MethodImplOptions.NoInlining)]
		internal static void ActivateWatermark()
		{
			API.ActivateWatermark();
		}
	}
}
namespace PatchouliCharacterMod.PatchouliUlt
{
	public sealed class PatchouliUltBDef : PatchouliUltTemplate
	{
		public override UltimateSkillConfig MakeConfig()
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Expected O, but got Unknown
			return new UltimateSkillConfig("", 10, 100, 100, 2, (UsRepeatableType)1, 40, 1, 0, (Keyword)256, (IReadOnlyList<string>)new List<string> { "PatchouliSignKeywordSe", "PatchouliMoonSignSe" }, (IReadOnlyList<string>)new List<string>());
		}
	}
	[EntityLogic(typeof(PatchouliUltBDef))]
	public sealed class PatchouliUltB : UltimateSkill
	{
		public PatchouliUltB()
		{
			((UltimateSkill)this).TargetType = (TargetType)1;
			((UltimateSkill)this).GunName = PatchouliGunName.UltimateSkillB;
		}

		protected override IEnumerable<BattleAction> Actions(UnitSelector selector)
		{
			EnemyUnit enemy = selector.GetEnemy(((UltimateSkill)this).Battle);
			yield return (BattleAction)(object)PerformAction.Spell((Unit)(object)((UltimateSkill)this).Battle.Player, "PatchouliUltB");
			yield return (BattleAction)new DamageAction((Unit)(object)((UltimateSkill)this).Owner, (Unit)(object)enemy, ((UltimateSkill)this).Damage, ((UltimateSkill)this).GunName, (GunType)0);
			if (!((UltimateSkill)this).Battle.BattleShouldEnd)
			{
				yield return (BattleAction)(object)new ApplyStatusEffectAction<PatchouliMoonSignSe>((Unit)(object)((UltimateSkill)this).Battle.Player, (int?)((UltimateSkill)this).Value1, (int?)0, (int?)PatchouliSignSe.TurnLimit, (int?)0, 0.2f, true);
			}
		}
	}
	public class PatchouliUltTemplate : UltimateSkillTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit(PatchouliDefaultConfig.GetDefaultID((EntityDefinition)(object)this));
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)PatchouliLocalization.UltimateSkillsBatchLoc.AddEntity((EntityDefinition)(object)this);
		}

		public override Sprite LoadSprite()
		{
			return PatchouliImageLoader.LoadUltLoader((UltimateSkillTemplate)(object)this);
		}

		public override UltimateSkillConfig MakeConfig()
		{
			throw new NotImplementedException();
		}
	}
	public sealed class PatchouliUltUDef : PatchouliUltTemplate
	{
		public override UltimateSkillConfig MakeConfig()
		{
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Expected O, but got Unknown
			return new UltimateSkillConfig("", 10, 100, 100, 2, (UsRepeatableType)1, 38, 1, 1, (Keyword)256, (IReadOnlyList<string>)new List<string> { "PatchouliBoostSe" }, (IReadOnlyList<string>)new List<string>());
		}
	}
	[EntityLogic(typeof(PatchouliUltUDef))]
	public sealed class PatchouliUltU : UltimateSkill
	{
		public PatchouliUltU()
		{
			((UltimateSkill)this).TargetType = (TargetType)1;
			((UltimateSkill)this).GunName = PatchouliGunName.UltimateSkillU;
		}

		protected override IEnumerable<BattleAction> Actions(UnitSelector selector)
		{
			EnemyUnit enemy = selector.GetEnemy(((UltimateSkill)this).Battle);
			yield return (BattleAction)(object)PerformAction.Spell((Unit)(object)((UltimateSkill)this).Battle.Player, "PatchouliUltU");
			yield return (BattleAction)new DamageAction((Unit)(object)((UltimateSkill)this).Owner, (Unit)(object)enemy, ((UltimateSkill)this).Damage, ((UltimateSkill)this).GunName, (GunType)0);
			if (!((UltimateSkill)this).Battle.BattleShouldEnd)
			{
				yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<PatchouliAstronomy>(((UltimateSkill)this).Value1, false), (AddCardsType)0);
				yield return (BattleAction)(object)new BoostAllInHandAction(((UltimateSkill)this).Value2);
			}
		}
	}
}
namespace PatchouliCharacterMod.StatusEffects
{
	public sealed class PatchouliBoostSeDef : PatchouliStatusEffectTemplate
	{
	}
	[EntityLogic(typeof(PatchouliBoostSeDef))]
	public sealed class PatchouliBoostSe : StatusEffect
	{
	}
	public sealed class PatchouliCounterSeDef : PatchouliStatusEffectTemplate
	{
	}
	[EntityLogic(typeof(PatchouliCounterSeDef))]
	public sealed class PatchouliCounterSe : StatusEffect
	{
	}
	public sealed class PatchouliSignKeywordSeDef : PatchouliStatusEffectTemplate
	{
	}
	[EntityLogic(typeof(PatchouliSignKeywordSeDef))]
	public sealed class PatchouliSignKeywordSe : StatusEffect
	{
	}
	public sealed class PatchouliAstronomyStudySeDef : PatchouliStatusEffectTemplate
	{
	}
	[EntityLogic(typeof(PatchouliAstronomyStudySeDef))]
	public sealed class PatchouliAstronomyStudySe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarted);
		}

		private IEnumerable<BattleAction> OnOwnerTurnStarted(UnitEventArgs args)
		{
			if (!((StatusEffect)this).Battle.BattleShouldEnd)
			{
				List<PatchouliAstronomy> list = ((StatusEffect)this).Battle.HandZone.OfType<PatchouliAstronomy>().ToList();
				if (list.Count < ((StatusEffect)this).Level)
				{
					<>n__0();
					yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<PatchouliAstronomy>(((StatusEffect)this).Level - list.Count, false), (AddCardsType)0);
				}
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class PatchouliAwakenedSpellbookSeDef : PatchouliStatusEffectTemplate
	{
	}
	[EntityLogic(typeof(PatchouliAwakenedSpellbookSeDef))]
	public sealed class PatchouliAwakenedSpellbookSe : StatusEffect
	{
		public int Boost = 0;

		public int BoostThreshold1 = 5;

		public bool isOwnSign = false;

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<CardUsingEventArgs>(((StatusEffect)this).Battle.CardUsing, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsing);
			((StatusEffect)this).ReactOwnerEvent<CardUsingEventArgs>(((StatusEffect)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed);
			((StatusEffect)this).ReactOwnerEvent<TriggerSignEventArgs>(CustomGameEventPatch.Spellcasted, (EventSequencedReactor<TriggerSignEventArgs>)OnSpellcasted);
		}

		private IEnumerable<BattleAction> OnSpellcasted(TriggerSignEventArgs args)
		{
			if (!isOwnSign)
			{
				<>n__0();
				yield return (BattleAction)(object)new BoostAllInHandAction(((StatusEffect)this).Level);
			}
			isOwnSign = false;
		}

		private IEnumerable<BattleAction> OnCardUsing(CardUsingEventArgs args)
		{
			Card card = args.Card;
			if (card is PatchouliBoostCard boostCard)
			{
				Boost = boostCard.Boost;
			}
			yield break;
		}

		private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs args)
		{
			Card card = args.Card;
			if (card is PatchouliBoostCard && Boost >= BoostThreshold1)
			{
				<>n__0();
				isOwnSign = true;
				yield return (BattleAction)(object)new ApplyStatusEffectAction<PatchouliFireSignSe>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)((StatusEffect)this).Level, (int?)0, (int?)PatchouliSignSe.TurnLimit, (int?)0, 0.2f, true);
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class PatchouliCircadianRhythmSeDef : PatchouliStatusEffectTemplate
	{
	}
	[EntityLogic(typeof(PatchouliCircadianRhythmSeDef))]
	public sealed class PatchouliCircadianRhythmSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<TriggerSignEventArgs>(CustomGameEventPatch.SignActiveTriggered, (EventSequencedReactor<TriggerSignEventArgs>)OnSignActiveTriggered);
		}

		private IEnumerable<BattleAction> OnSignActiveTriggered(TriggerSignEventArgs args)
		{
			if (args.Sign is PatchouliSunSignSe)
			{
				<>n__0();
				int sunAmount = ((StatusEffect)((Unit)((StatusEffect)this).Battle.Player).GetStatusEffect<PatchouliSunSignSe>()).Level;
				yield return (BattleAction)(object)new ApplyStatusEffectAction<PatchouliMoonSignSe>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)(sunAmount * ((StatusEffect)this).Level), (int?)null, (int?)PatchouliSignSe.TurnLimit, (int?)null, 0.2f, true);
			}
			else if (args.Sign is PatchouliMoonSignSe)
			{
				<>n__0();
				int moonAmount = ((StatusEffect)((Unit)((StatusEffect)this).Battle.Player).GetStatusEffect<PatchouliMoonSignSe>()).Level;
				yield return (BattleAction)(object)new ApplyStatusEffectAction<PatchouliSunSignSe>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)(moonAmount * ((StatusEffect)this).Level), (int?)null, (int?)PatchouliSignSe.TurnLimit, (int?)null, 0.2f, true);
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class PatchouliCurrentConductorSeDef : PatchouliStatusEffectTemplate
	{
	}
	[EntityLogic(typeof(PatchouliCurrentConductorSeDef))]
	public sealed class PatchouliCurrentConductorSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<TriggerSignEventArgs>(CustomGameEventPatch.SignPassiveTriggered, (EventSequencedReactor<TriggerSignEventArgs>)OnSignTriggered);
			((StatusEffect)this).ReactOwnerEvent<TriggerSignEventArgs>(CustomGameEventPatch.SignActiveTriggered, (EventSequencedReactor<TriggerSignEventArgs>)OnSignTriggered);
		}

		private IEnumerable<BattleAction> OnSignTriggered(TriggerSignEventArgs args)
		{
			if (!(args.Sign is PatchouliWaterSignSe))
			{
				yield break;
			}
			<>n__0();
			foreach (EnemyUnit unit in ((StatusEffect)this).Battle.AllAliveEnemies)
			{
				int newDrowning = (((Unit)unit).HasStatusEffect<Drowning>() ? ((StatusEffect)((Unit)unit).GetStatusEffect<Drowning>()).Level : 0);
				newDrowning += ((StatusEffect)this).Level;
				yield return (BattleAction)(object)new ApplyStatusEffectAction<Drowning>((Unit)(object)unit, (int?)newDrowning, (int?)0, (int?)null, (int?)null, 0f, true);
				if (((Unit)unit).HasStatusEffect<Drowning>())
				{
					int damage = Math.Max(((StatusEffect)((Unit)unit).GetStatusEffect<Drowning>()).Level, newDrowning);
					yield return (BattleAction)(object)DamageAction.Reaction((Unit)(object)unit, damage, (damage >= 15) ? "溺水BuffB" : "溺水BuffA");
				}
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class PatchouliEnigmaticMagicSeDef : PatchouliStatusEffectTemplate
	{
	}
	[EntityLogic(typeof(PatchouliEnigmaticMagicSeDef))]
	public sealed class PatchouliEnigmaticMagicSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<TriggerSignEventArgs>(CustomGameEventPatch.Spellcasted, (EventSequencedReactor<TriggerSignEventArgs>)OnSignGained);
		}

		private IEnumerable<BattleAction> OnSignGained(TriggerSignEventArgs args)
		{
			<>n__0();
			yield return (BattleAction)new CastBlockShieldAction((Unit)(object)((StatusEffect)this).Battle.Player, (Unit)(object)((StatusEffect)this).Battle.Player, ((StatusEffect)this).Level, 0, (BlockShieldType)2, true);
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class PatchouliFiveSeasonsSeDef : PatchouliStatusEffectTemplate
	{
	}
	[EntityLogic(typeof(PatchouliFiveSeasonsSeDef))]
	public sealed class PatchouliFiveSeasonsSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnEnding, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnEnding);
		}

		private IEnumerable<BattleAction> OnPlayerTurnEnding(UnitEventArgs args)
		{
			<>n__0();
			for (int i = 0; i < ((StatusEffect)this).Level; i++)
			{
				yield return (BattleAction)(object)new TriggerAllSignsPassiveAction();
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class PatchouliGirlOfShadeSeDef : PatchouliStatusEffectTemplate
	{
	}
	[EntityLogic(typeof(PatchouliGirlOfShadeSeDef))]
	public sealed class PatchouliGirlOfShadeSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<CardEventArgs>(((StatusEffect)this).Battle.CardExiled, (EventSequencedReactor<CardEventArgs>)OnCardExiled);
		}

		private IEnumerable<BattleAction> OnCardExiled(CardEventArgs args)
		{
			if ((int)args.Card.CardType == 7 || (int)args.Card.CardType == 8)
			{
				<>n__0();
				yield return (BattleAction)(object)new ApplyStatusEffectAction<Firepower>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)((StatusEffect)this).Level, (int?)null, (int?)null, (int?)null, 0f, true);
				yield return (BattleAction)(object)new ApplyStatusEffectAction<Spirit>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)((StatusEffect)this).Level, (int?)null, (int?)null, (int?)null, 0f, true);
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class PatchouliGrandIncantationSeDef : PatchouliStatusEffectTemplate
	{
	}
	[EntityLogic(typeof(PatchouliGrandIncantationSeDef))]
	public sealed class PatchouliGrandIncantationSe : StatusEffect
	{
		private int boost = 0;

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<CardUsingEventArgs>(((StatusEffect)this).Battle.CardUsing, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsing);
			((StatusEffect)this).ReactOwnerEvent<CardUsingEventArgs>(((StatusEffect)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed);
		}

		private IEnumerable<BattleAction> OnCardUsing(CardUsingEventArgs args)
		{
			Card card = args.Card;
			if (card is PatchouliBoostCard boostCard)
			{
				boost = boostCard.Boost;
			}
			yield break;
		}

		private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs args)
		{
			Card card = args.Card;
			if (card is PatchouliBoostCard)
			{
				<>n__0();
				EnemyUnit enemyUnitWithMaxHP = CollectionsExtensions.MaxBy<EnemyUnit, int>(((StatusEffect)this).Battle.EnemyGroup.Alives, (Func<EnemyUnit, int>)((EnemyUnit unit) => ((Unit)unit).Hp));
				float damage = (float)boost * (float)((StatusEffect)this).Level;
				yield return (BattleAction)new DamageAction((Unit)(object)((StatusEffect)this).Battle.Player, (Unit)(object)enemyUnitWithMaxHP, DamageInfo.Reaction(damage, false), PatchouliGunName.GrandIncantation, (GunType)0);
				boost = 0;
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class PatchouliIntelligenceSeDef : PatchouliStatusEffectTemplate
	{
	}
	[EntityLogic(typeof(PatchouliIntelligenceSeDef))]
	public sealed class PatchouliIntelligenceSe : StatusEffect
	{
	}
	public sealed class PatchouliKoakumaFriendSeDef : PatchouliStatusEffectTemplate
	{
	}
	[EntityLogic(typeof(PatchouliKoakumaFriendSeDef))]
	public sealed class PatchouliKoakumaFriendSe : StatusEffect
	{
	}
	public sealed class PatchouliOneWeekGirlSeDef : PatchouliStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = PatchouliStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.IsStackable = false;
			defaultStatusEffectConfig.LevelStackType = (StackType)3;
			defaultStatusEffectConfig.HasCount = true;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(PatchouliOneWeekGirlSeDef))]
	public sealed class PatchouliOneWeekGirlSe : StatusEffect
	{
		public string NextSign
		{
			get
			{
				string[] array = ((StatusEffect)this).Brief.Split(" ");
				return array[(((StatusEffect)this).Count + 1) % 7];
			}
		}

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

		private IEnumerable<BattleAction> OnPlayerTurnStarted(UnitEventArgs args)
		{
			<>n__0();
			((StatusEffect)this).Count = (((StatusEffect)this).Count + 1) % 7;
			Type type = PatchouliConfigEntry.SignToType((Signs)((StatusEffect)this).Count);
			yield return (BattleAction)new ApplyStatusEffectAction(type, (Unit)(object)((StatusEffect)this).Battle.Player, (int?)((StatusEffect)this).Level, (int?)0, (int?)PatchouliSignSe.TurnLimit, (int?)0, 0.2f, true);
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class PatchouliPhlogisticPillarSeDef : PatchouliStatusEffectTemplate
	{
	}
	[EntityLogic(typeof(PatchouliPhlogisticPillarSeDef))]
	public sealed class PatchouliPhlogisticPillarSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<CardUsingEventArgs>(((StatusEffect)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed);
		}

		private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs args)
		{
			if (args.Card is PatchouliBoostCard)
			{
				<>n__0();
				yield return (BattleAction)new CastBlockShieldAction((Unit)(object)((StatusEffect)this).Battle.Player, (Unit)(object)((StatusEffect)this).Battle.Player, 0, ((StatusEffect)this).Level, (BlockShieldType)2, true);
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class PatchouliSaintElmoPillarSeDef : PatchouliStatusEffectTemplate
	{
	}
	[EntityLogic(typeof(PatchouliSaintElmoPillarSeDef))]
	public sealed class PatchouliSaintElmoPillarSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<StatusEffectEventArgs>(((Unit)((StatusEffect)this).Battle.Player).StatusEffectRemoved, (EventSequencedReactor<StatusEffectEventArgs>)OnStatusEffectRemoved);
		}

		private IEnumerable<BattleAction> OnStatusEffectRemoved(StatusEffectEventArgs args)
		{
			if (args.Effect is Reflect)
			{
				int damage = args.Effect.Level * ((StatusEffect)this).Level;
				yield return (BattleAction)new DamageAction((Unit)(object)((StatusEffect)this).Battle.Player, (IEnumerable<Unit>)((StatusEffect)this).Battle.EnemyGroup.Alives, DamageInfo.Reaction((float)damage, false), PatchouliGunName.PatchouliSaintElmoPillar, (GunType)0);
			}
		}
	}
	public sealed class PatchouliSatelliteHimawariSeDef : PatchouliStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = PatchouliStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasCount = true;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(PatchouliSatelliteHimawariSeDef))]
	public sealed class PatchouliSatelliteHimawariSe : StatusEffect
	{
		public int BonusDamage => ((StatusEffect)this).Level * ((StatusEffect)this).Count;

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<TriggerSignEventArgs>(CustomGameEventPatch.SignActiveTriggering, (EventSequencedReactor<TriggerSignEventArgs>)OnSignActiveTriggering);
		}

		private IEnumerable<BattleAction> OnSignActiveTriggering(TriggerSignEventArgs args)
		{
			if (args.Sign is PatchouliWoodSignSe && ((Unit)((StatusEffect)this).Battle.Player).HasStatusEffect<PatchouliWoodSignSe>())
			{
				<>n__0();
				((StatusEffect)this).Count = ((StatusEffect)this).Count + ((Unit)((StatusEffect)this).Battle.Player).GetStatusEffect<PatchouliWoodSignSe>().ActiveAmount;
			}
			yield break;
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class PatchouliSpellPowerGraspSeDef : PatchouliStatusEffectTemplate
	{
	}
	[EntityLogic(typeof(PatchouliSpellPowerGraspSeDef))]
	public sealed class PatchouliSpellPowerGraspSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnStarted);
		}

		private IEnumerable<BattleAction> OnPlayerTurnStarted(UnitEventArgs args)
		{
			<>n__0();
			yield return (BattleAction)(object)new BoostAllInHandAction(((StatusEffect)this).Level);
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public class PatchouliStatusEffectTemplate : StatusEffectTemplate
	{
		public override IdContainer GetId()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit(PatchouliDefaultConfig.GetDefaultID((EntityDefinition)(object)this));
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)PatchouliLocalization.StatusEffectsBatchLoc.AddEntity((EntityDefinition)(object)this);
		}

		public override Sprite LoadSprite()
		{
			return PatchouliImageLoader.LoadStatusEffectLoader((StatusEffectTemplate)(object)this);
		}

		public override StatusEffectConfig MakeConfig()
		{
			return GetDefaultStatusEffectConfig();
		}

		public static StatusEffectConfig GetDefaultStatusEffectConfig()
		{
			return PatchouliDefaultConfig.GetDefaultStatusEffectConfig();
		}
	}
	public sealed class PatchouliTemporaryIntelligenceSeDef : PatchouliStatusEffectTemplate
	{
	}
	[EntityLogic(typeof(PatchouliTemporaryIntelligenceSeDef))]
	public sealed class PatchouliTemporaryIntelligenceSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).HandleOwnerEvent<UnitEventArgs>(unit.TurnEnded, (GameEventHandler<UnitEventArgs>)delegate
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Expected O, but got Unknown
				((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f)));
			});
		}
	}
	public sealed class PatchouliTheUnmovingGreatLibrarySeDef : PatchouliStatusEffectTemplate
	{
	}
	[EntityLogic(typeof(PatchouliTheUnmovingGreatLibrarySeDef))]
	public sealed class PatchouliTheUnmovingGreatLibrarySe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<TriggerSignEventArgs>(CustomGameEventPatch.SignActiveTriggered, (EventSequencedReactor<TriggerSignEventArgs>)OnSignActiveTriggered);
		}

		private IEnumerable<BattleAction> OnSignActiveTriggered(TriggerSignEventArgs args)
		{
			<>n__0();
			yield return (BattleAction)(object)new ApplyStatusEffectAction<PatchouliIntelligenceSe>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)((StatusEffect)this).Level, (int?)null, (int?)null, (int?)null, 0f, true);
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class PatchouliVoileSeDef : PatchouliStatusEffectTemplate
	{
	}
	[EntityLogic(typeof(PatchouliVoileSeDef))]
	public sealed class PatchouliVoileSe : StatusEffect
	{
		private int Boost = 0;

		public int BoostThreshold1 { get; } = 3;


		public int BoostThreshold2 { get; } = 6;


		public int BoostThreshold3 { get; } = 9;


		public ManaGroup Mana
		{
			get
			{
				//IL_0003: 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)
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				ManaGroup result = default(ManaGroup);
				((ManaGroup)(ref result)).Blue = ((StatusEffect)this).Level;
				return result;
			}
		}

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<CardUsingEventArgs>(((StatusEffect)this).Battle.CardUsing, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsing);
			((StatusEffect)this).ReactOwnerEvent<CardUsingEventArgs>(((StatusEffect)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed);
		}

		private IEnumerable<BattleAction> OnCardUsing(CardUsingEventArgs args)
		{
			Card card = args.Card;
			if (card is PatchouliBoostCard boostCard)
			{
				Boost = boostCard.Boost;
			}
			yield break;
		}

		private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs args)
		{
			if (args.Card is PatchouliBoostCard)
			{
				if (Boost >= BoostThreshold1)
				{
					<>n__0();
					yield return (BattleAction)new DrawManyCardAction(((StatusEffect)this).Level);
				}
				if (Boost >= BoostThreshold2)
				{
					yield return (BattleAction)new GainManaAction(Mana);
				}
				if (Boost >= BoostThreshold3)
				{
					yield return (BattleAction)(object)new ApplyStatusEffectAction<Firepower>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)((StatusEffect)this).Level, (int?)null, (int?)null, (int?)null, 0f, true);
				}
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class PatchouliEarthSignSeDef : PatchouliSignTemplate
	{
	}
	[EntityLogic(typeof(PatchouliEarthSignSeDef))]
	public sealed class PatchouliEarthSignSe : PatchouliSignSe
	{
		public override int BasePassive { get; set; } = 1;


		public override int BaseActive { get; set; } = 2;


		public override int Sign { get; set; } = 4;


		public override ManaGroup Mana
		{
			get
			{
				//IL_0003: 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)
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				ManaGroup result = default(ManaGroup);
				((ManaGroup)(ref result)).Philosophy = BaseManaAmount;
				return result;
			}
		}

		public override IEnumerable<BattleAction> SignAction(bool isActive = false)
		{
			<>n__0();
			yield return (BattleAction)(object)ConvertManaAction.PhilosophyRandomMana(((StatusEffect)this).Battle.BattleMana, Amount(isActive), ((StatusEffect)this).Battle.GameRun.BattleRng);
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class PatchouliFireSignSeDef : PatchouliSignTemplate
	{
	}
	[EntityLogic(typeof(PatchouliFireSignSeDef))]
	public sealed class PatchouliFireSignSe : PatchouliSignSe
	{
		public override int BasePassive { get; set; } = 3;


		public override int BaseActive { get; set; } = 5;


		public override int Sign { get; set; } = 0;


		public override ManaGroup Mana
		{
			get
			{
				//IL_0003: 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)
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				ManaGroup result = default(ManaGroup);
				((ManaGroup)(ref result)).Red = BaseManaAmount;
				return result;
			}
		}

		public override int Multiplier
		{
			get
			{
				int num = 1;
				if (((Unit)((StatusEffect)this).Battle.Player).HasStatusEffect<PatchouliKoakumaFriendSe>())
				{
					num += ((StatusEffect)((Unit)((StatusEffect)this).Battle.Player).GetStatusEffect<PatchouliKoakumaFriendSe>()).Level;
				}
				return num;
			}
		}

		public override IEnumerable<BattleAction> SignAction(bool isActive = false)
		{
			<>n__0();
			EnemyUnit enemyUnitWithMinHP = CollectionsExtensions.MinBy<EnemyUnit, int>(((StatusEffect)this).Battle.EnemyGroup.Alives, (Func<EnemyUnit, int>)((EnemyUnit unit) => ((Unit)unit).Hp));
			int fireDamageMultiplier = 1;
			if (((Unit)((StatusEffect)this).Battle.Player).HasStatusEffect<PatchouliKoakumaFriendSe>())
			{
				fireDamageMultiplier += ((StatusEffect)((Unit)((StatusEffect)this).Battle.Player).GetStatusEffect<PatchouliKoakumaFriendSe>()).Level;
			}
			yield return (BattleAction)new DamageAction((Unit)(object)((StatusEffect)this).Battle.Player, (Unit)(object)enemyUnitWithMinHP, DamageInfo.Reaction((float)(Amount(isActive) * fireDamageMultiplier), false), PatchouliGunName.FireSign, (GunType)0);
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class PatchouliMetalSignSeDef : PatchouliSignTemplate
	{
	}
	[EntityLogic(typeof(PatchouliMetalSignSeDef))]
	public sealed class PatchouliMetalSignSe : PatchouliSignSe
	{
		public override int BasePassive { get; set; } = 3;


		public override int BaseActive { get; set; } = 5;


		public override int Sign { get; set; } = 3;


		public override ManaGroup Mana
		{
			get
			{
				//IL_0003: 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)
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				ManaGroup result = default(ManaGroup);
				((ManaGroup)(ref result)).Colorless = BaseManaAmount;
				return result;
			}
		}

		public override IEnumerable<BattleAction> SignAction(bool isActive = false)
		{
			<>n__0();
			yield return (BattleAction)(object)new ApplyStatusEffectAction<Reflect>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)Amount(isActive), (int?)0, (int?)null, (int?)null, 0f, true);
			if (((Unit)((StatusEffect)this).Battle.Player).HasStatusEffect<Reflect>())
			{
				((Unit)((StatusEffect)this).Battle.Player).GetStatusEffect<Reflect>().Gun = ((((Unit)((StatusEffect)this).Battle.Player).GetStatusEffect<Reflect>().Gun == "弹幕对决") ? "弹幕对决B" : "弹幕对决");
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class PatchouliMoonSignSeDef : PatchouliSignTemplate
	{
	}
	[EntityLogic(typeof(PatchouliMoonSignSeDef))]
	public sealed class PatchouliMoonSignSe : PatchouliSignSe
	{
		public override int BasePassive { get; set; } = 2;


		public override int BaseActive { get; set; } = 4;


		public override int Sign { get; set; } = 6;


		public override ManaGroup Mana
		{
			get
			{
				//IL_0003: 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)
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				ManaGroup result = default(ManaGroup);
				((ManaGroup)(ref result)).Black = BaseManaAmount;
				return result;
			}
		}

		public override IEnumerable<BattleAction> SignAction(bool isActive = false)
		{
			<>n__0();
			yield return (BattleAction)new CastBlockShieldAction((Unit)(object)((StatusEffect)this).Battle.Player, (Unit)(object)((StatusEffect)this).Battle.Player, Amount(isActive), 0, (BlockShieldType)2, true);
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public class PatchouliSignSe : StatusEffect
	{
		public virtual int BasePassive { get; set; } = 0;


		public virtual int BaseActive { get; set; } = 0;


		public virtual int BaseManaAmount { get; set; } = 1;


		public virtual bool AffectedByInt { get; set; } = true;


		public virtual bool AffectedByLevel { get; set; } = true;


		public virtual int Sign { get; set; } = 0;


		public static int TurnLimit { get; set; } = 3;


		public virtual int Multiplier { get; set; } = 1;


		public int PassiveAmount => AmountFormula(BasePassive, isActive: false);

		public virtual int ActiveAmount => AmountFormula(BaseActive, isActive: true);

		public virtual ManaGroup Mana => default(ManaGroup);

		public int IntelligenceBonusAmount
		{
			get
			{
				int num = 0;
				if (((StatusEffect)this).Owner.HasStatusEffect<PatchouliIntelligenceSe>())
				{
					num += ((StatusEffect)((StatusEffect)this).Owner.GetStatusEffect<PatchouliIntelligenceSe>()).Level;
				}
				if (((StatusEffect)this).Owner.HasStatusEffect<PatchouliTemporaryIntelligenceSe>())
				{
					num += ((StatusEffect)((StatusEffect)this).Owner.GetStatusEffect<PatchouliTemporaryIntelligenceSe>()).Level;
				}
				return num;
			}
		}

		public int PassiveDeltaAmount { get; set; } = 0;


		public int ActiveDeltaAmount { get; set; } = 0;


		public int AmountFormula(int amount, bool isActive)
		{
			int num = (isActive ? ActiveDeltaAmount : PassiveDeltaAmount);
			return ((amount + (AffectedByInt ? IntelligenceBonusAmount : 0)) * ((!AffectedByLevel) ? 1 : ((StatusEffect)this).Level) + num) * Multiplier;
		}

		public int Amount(bool isActive)
		{
			return isActive ? ActiveAmount : PassiveAmount;
		}

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnTurnStarted);
			((StatusEffect)this).ReactOwnerEvent<StatusEffectApplyEventArgs>(((Unit)((StatusEffect)this).Battle.Player).StatusEffectAdded, (EventSequencedReactor<StatusEffectApplyEventArgs>)OnOwnerStatusEffectAdded);
		}

		private IEnumerable<BattleAction> OnOwnerStatusEffectAdded(StatusEffectApplyEventArgs args)
		{
			StatusEffect effect = args.Effect;
			if (effect is PatchouliSignSe signSe && signSe.Sign == Sign)
			{
				yield return (BattleAction)(object)new TriggerSignAction(this, isActive: false, spellcasting: true);
				<>n__0();
			}
			if (args.Effect is PatchouliIntelligenceSe || args.Effect is PatchouliTemporaryIntelligenceSe)
			{
				<>n__0();
			}
		}

		public virtual IEnumerable<BattleAction> SignAction(bool isActive = false)
		{
			yield break;
		}

		public virtual IEnumerable<BattleAction> GainManaAction()
		{
			yield break;
		}

		protected IEnumerable<BattleAction> OnTurnStarted(UnitEventArgs args)
		{
			if (!((StatusEffect)this).Battle.BattleShouldEnd)
			{
				((StatusEffect)this).Count = ((StatusEffect)this).Count - 1;
				<>n__1();
				if (((StatusEffect)this).Count > 0)
				{
					yield return (BattleAction)(object)new TriggerSignAction(this);
					yield break;
				}
				yield return (BattleAction)(object)new TriggerSignAction(this, isActive: true);
				yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
			}
		}

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

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__1()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public class PatchouliSignTemplate : PatchouliStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = PatchouliStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasCount = true;
			return defaultStatusEffectConfig;
		}
	}
	public sealed class PatchouliSunSignSeDef : PatchouliSignTemplate
	{
	}
	[EntityLogic(typeof(PatchouliSunSignSeDef))]
	public sealed class PatchouliSunSignSe : PatchouliSignSe
	{
		public override int BasePassive { get; set; } = 2;


		public override int BaseActive { get; set; } = 4;


		public override int Sign { get; set; } = 5;


		public override ManaGroup Mana
		{
			get
			{
				//IL_0003: 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)
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				ManaGroup result = default(ManaGroup);
				((ManaGroup)(ref result)).White = BaseManaAmount;
				return result;
			}
		}

		public override IEnumerable<BattleAction> SignAction(bool isActive = false)
		{
			<>n__0();
			yield return (BattleAction)new DamageAction((Unit)(object)((StatusEffect)this).Battle.Player, (IEnumerable<Unit>)((StatusEffect)this).Battle.AllAliveEnemies, DamageInfo.Reaction((float)Amount(isActive), false), PatchouliGunName.SunSign, (GunType)0);
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class PatchouliWaterSignSeDef : PatchouliSignTemplate
	{
	}
	[EntityLogic(typeof(PatchouliWaterSignSeDef))]
	public sealed class PatchouliWaterSignSe : PatchouliSignSe
	{
		public override int BasePassive { get; set; } = 1;


		public override int BaseActive { get; set; } = 3;


		public override int Sign { get; set; } = 1;


		public override ManaGroup Mana
		{
			get
			{
				//IL_0003: 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)
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				ManaGroup result = default(ManaGroup);
				((ManaGroup)(ref result)).Blue = BaseManaAmount;
				return result;
			}
		}

		public override IEnumerable<BattleAction> SignAction(bool isActive = false)
		{
			<>n__0();
			yield return (BattleAction)new CastBlockShieldAction((Unit)(object)((StatusEffect)this).Battle.Player, (Unit)(object)((StatusEffect)this).Battle.Player, 0, Amount(isActive), (BlockShieldType)2, true);
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class PatchouliWoodSignSeDef : PatchouliSignTemplate
	{
	}
	[EntityLogic(typeof(PatchouliWoodSignSeDef))]
	public sealed class PatchouliWoodSignSe : PatchouliSignSe
	{
		public override int BasePassive { get; set; } = 4;


		public override int BaseActive { get; set; } = 4;


		public override int Sign { get; set; } = 2;


		public override ManaGroup Mana
		{
			get
			{
				//IL_0003: 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)
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				ManaGroup result = default(ManaGroup);
				((ManaGroup)(ref result)).Green = BaseManaAmount;
				return result;
			}
		}

		public override int ActiveAmount
		{
			get
			{
				int num = 0;
				if (((Unit)((StatusEffect)this).Battle.Player).HasStatusEffect<PatchouliSatelliteHimawariSe>())
				{
					PatchouliSatelliteHimawariSe statusEffect = ((Unit)((StatusEffect)this).Battle.Player).GetStatusEffect<PatchouliSatelliteHimawariSe>();
					num += statusEffect.BonusDamage;
				}
				return base.ActiveAmount + num;
			}
		}

		public override IEnumerable<BattleAction> SignAction(bool isActive = false)
		{
			<>n__0();
			EnemyUnit enemyUnitWithMaxHP = CollectionsExtensions.MaxBy<EnemyUnit, int>(((StatusEffect)this).Battle.EnemyGroup.Alives, (Func<EnemyUnit, int>)((EnemyUnit unit) => ((Unit)unit).Hp));
			if (((Unit)((StatusEffect)this).Battle.Player).HasStatusEffect<PatchouliWoodSignSe>())
			{
				if (!isActive)
				{
					((Unit)((StatusEffect)this).Battle.Player).GetStatusEffect<PatchouliWoodSignSe>().ActiveDeltaAmount += Amount(isActive);
					<>n__1();
				}
				else
				{
					yield return (BattleAction)new DamageAction((Unit)(object)((StatusEffect)this).Battle.Player, (Unit)(object)enemyUnitWithMaxHP, DamageInfo.Reaction((float)Amount(isActive), false), PatchouliGunName.WoodSign, (GunType)0);
				}
			}
		}

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

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__1()
		{
			((StatusEffect)this).NotifyChanged();
		}
	}
	public enum Signs
	{
		Fire,
		Water,
		Wood,
		Metal,
		Earth,
		Sun,
		Moon
	}
}
namespace PatchouliCharacterMod.Patch
{
	[HarmonyPatch]
	internal class BoostCardWidgetPatch
	{
		[HarmonyPatch(typeof(CardWidget), "SetProperties")]
		private static void Postfix(CardWidget __instance)
		{
			if (__instance._card is PatchouliBoostCard patchouliBoostCard)
			{
				__instance.baseLoyaltyObj.SetActive(true);
				((TMP_Text)__instance.baseLoyalty).text = patchouliBoostCard.Boost.ToString();
			}
		}
	}
	[HarmonyPatch]
	internal class CustomGameEventPatch
	{
		public static GameEvent<BoostEventArgs> Boosted { get; set; }

		public static GameEvent<TriggerSignEventArgs> Spellcasting { get; set; }

		public static GameEvent<TriggerSignEventArgs> Spellcasted { get; set; }

		public static GameEvent<TriggerSignEventArgs> SignPassiveTriggering { get; set; }

		public static GameEvent<TriggerSignEventArgs> SignPassiveTriggered { get; set; }

		public static GameEvent<TriggerSignEventArgs> SignActiveTriggering { get; set; }

		public static GameEvent<TriggerSignEventArgs> SignActiveTriggered { get; set; }

		[HarmonyPatch(typeof(GameRunController), "EnterBattle")]
		private static bool Prefix(Unit __instance)
		{
			Boosted = new GameEvent<BoostEventArgs>();
			Spellcasting = new GameEvent<TriggerSignEventArgs>();
			Spellcasted = new GameEvent<TriggerSignEventArgs>();
			SignPassiveTriggering = new GameEvent<TriggerSignEventArgs>();
			SignPassiveTriggered = new GameEvent<TriggerSignEventArgs>();
			SignActiveTriggering = new GameEvent<TriggerSignEventArgs>();
			SignActiveTriggered = new GameEvent<TriggerSignEventArgs>();
			return true;
		}
	}
	[HarmonyPatch]
	internal class SignStatusEffectWidgetPatch
	{
		[HarmonyPatch(typeof(StatusEffectWidget), "TextRefresh")]
		private static void Postfix(StatusEffectWidget __instance)
		{
			if (__instance._statusEffect is PatchouliSignSe patchouliSignSe)
			{
				((TMP_Text)__instance.downText).text = patchouliSignSe.PassiveAmount + "/" + patchouliSignSe.ActiveAmount;
			}
		}
	}
}
namespace PatchouliCharacterMod.model
{
	public sealed class PatchouliPlayerModel : UnitModelTemplate
	{
		public string model_name = "PatchouliModel.png";

		public string spellsprite_name = "PatchouliStand.png";

		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 ((EntityDefinition)new PatchouliPlayerDef()).UniqueId;
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)PatchouliLocalization.UnitModelBatchLoc.AddEntity((EntityDefinition)(object)this);
		}

		public override ModelOption LoadModelOptions()
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Expected O, but got Unknown
			return new ModelOption(ResourceLoader.LoadSpriteAsync(model_name, BepinexPlugin.directorySource, 565, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://"));
		}

		public override UniTask<Sprite> LoadSpellSprite()
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			return ResourceLoader.LoadSpriteAsync(spellsprite_name, BepinexPlugin.directorySource, 100, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://");
		}

		public override UnitModelConfig MakeConfig()
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			UnitModelConfig val = ObjectExtensions.Copy<UnitModelConfig>(((UnitModelTemplate)this).DefaultConfig());
			val.Flip = true;
			val.Type = 0;
			val.Offset = new Vector2(0f, -0.1f);
			val.HasSpellPortrait = true;
			return val;
		}
	}
}
namespace PatchouliCharacterMod.Localization
{
	public sealed class PatchouliLocalization
	{
		public static string Cards = "Cards";

		public static string Exhibits = "Exhibits";

		public static string PlayerUnit = "PlayerUnit";

		public static string UnitModel = "UnitModel";

		public static string UltimateSkills = "UltimateSkills";

		public static string StatusEffects = "StatusEffects";

		public static BatchLocalization CardsBatchLoc = new BatchLocalization((IResourceSource)(object)BepinexPlugin.directorySource, typeof(CardTemplate), Cards, (Locale)0, false);

		public static BatchLocalization ExhibitsBatchLoc = new BatchLocalization((IResourceSource)(object)BepinexPlugin.directorySource, typeof(ExhibitTemplate), Exhibits, (Locale)0, false);

		public static BatchLocalization PlayerUnitBatchLoc = new BatchLocalization((IResourceSource)(object)BepinexPlugin.directorySource, typeof(PlayerUnitTemplate), PlayerUnit, (Locale)0, false);

		public static BatchLocalization UnitModelBatchLoc = new BatchLocalization((IResourceSource)(object)BepinexPlugin.directorySource, typeof(UnitModelTemplate), UnitModel, (Locale)0, false);

		public static BatchLocalization UltimateSkillsBatchLoc = new BatchLocalization((IResourceSource)(object)BepinexPlugin.directorySource, typeof(UltimateSkillTemplate), UltimateSkills, (Locale)0, false);

		public static BatchLocalization StatusEffectsBatchLoc = new BatchLocalization((IResourceSource)(object)BepinexPlugin.directorySource, typeof(StatusEffectTemplate), StatusEffects, (Locale)0, false);
	}
}
namespace PatchouliCharacterMod.ImageLoader
{
	public sealed class PatchouliImageLoader
	{
		public static string file_extension = ".png";

		public static PlayerImages LoadPlayerImages(string name)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			PlayerImages val = new PlayerImages();
			val.AutoLoad(name, (Func<string, Sprite>)((string s) => ResourceLoader.LoadSprite(s, (IResourceSource)(object)PatchouliPlayerDef.PatchouliDir, 100, 1, (FilterMode)1, true, (Rect?)null, (Vector2?)null)), (Func<string, UniTask<Sprite>>)((string s) => ResourceLoader.LoadSpriteAsync(s, PatchouliPlayerDef.PatchouliDir, 100, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://")), (UseSame)2, ".png", "");
			return val;
		}

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

		public static ExhibitSprites LoadExhibitSprite(ExhibitTemplate exhibit)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			ExhibitSprites val = new ExhibitSprites();
			val.main = ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)exhibit).GetId()) + file_extension, BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null);
			return val;
		}

		public static Sprite LoadUltLoader(UltimateSkillTemplate ult)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return LoadSprite(((EntityDefinition)ult).GetId());
		}

		public static Sprite LoadStatusEffectLoader(StatusEffectTemplate status)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return LoadSprite(((EntityDefinition)status).GetId());
		}

		public static Sprite LoadSprite(IdContainer ID)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return ResourceLoader.LoadSprite(IdContainer.op_Implicit(ID) + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null);
		}
	}
}
namespace PatchouliCharacterMod.Illustrator
{
	[StructLayout(LayoutKind.Sequential, Size = 1)]
	public struct PatchouliIllustrator
	{
		public static string PatchouliAttackU = "Cindy717";

		public static string PatchouliAttackB = "@nanasuou_touhou";

		public static string PatchouliBlockU = "茶スズ";

		public static string PatchouliBlockB = "wb yimo";

		public static string PatchouliCondensedBubble = "ぢせ";

		public static string PatchouliArcaneWard = "あおぷに";

		public static string PatchouliDiamondRing = "涼貓";

		public static string PatchouliSunshineReflector { get; internal set; } = "Biscuit_Gla";


		public static string PatchouliSilentSelene { get; internal set; } = "そらに";


		public static string PatchouliAgniShine { get; internal set; } = "古ボッキシモ一ル";


		public static string PatchouliFlashOfSpring { get; internal set; } = "Clynxen";


		public static string PatchouliDoyouSpear { get; internal set; } = "猫車";


		public static string PatchouliSilverDragon { get; internal set; } = "白都しっぽ\uff3f春例大祭け29b";


		public static string PatchouliLavaCromlech { get; internal set; } = "雉本ユーヒ";


		public static string PatchouliEmeraldMegalith { get; internal set; } = "@mihuni";


		public static string PatchouliSylphyHorn { get; internal set; } = "乙女座";


		public static string PatchouliForestBlaze { get; internal set; } = "SunnySideUp524";


		public static string PatchouliPhotosynthesis { get; internal set; } = "ひめか";


		public static string PatchouliGirlOfKnowledge { get; internal set; } = "@sono_nono";


		public static string PatchouliEnigmaticMagic { get; internal set; } = "柊セイジ@お仕事募集中";


		public static string PatchouliRapidCharge { get; internal set; } = "@Hanamoto410";


		public static string PatchouliPhilosopherStone { get; internal set; } = "その";


		public static string PatchouliFiveSeasons { get; internal set; } = "長井りく";


		public static string PatchouliOneWeekGirl { get; internal set; } = "@ichimi_131";


		public static string PatchouliAstronomy { get; internal set; } = "羽々斬";


		public static string PatchouliObservatory { get; internal set; } = "日辻ひこ";


		public static string PatchouliFatesHand { get; internal set; } = "七蘇芳";


		public static string PatchouliWaterElf { get; internal set; } = "藤乃かごめ@2日目東サ-21b";


		public static string PatchouliNegate { get; internal set; } = "";


		public static string PatchouliBuryInLake { get; internal set; } = "Ram";


		public static string PatchouliConcentration { get; internal set; } = "しろし";


		public static string PatchouliEveryAngleShot { get; internal set; } = "xilu4";


		public static string PatchouliCounterspell { get; internal set; } = "";


		public static string PatchouliGrandIncantation { get; internal set; } = "しゃんぐりら";


		public static string PatchouliKrakenWave { get; internal set; } = "サニーサイドアップ";


		public static string PatchouliNoachianDeluge { get; internal set; } = "ねこ";


		public static string PatchouliElementalHarvester { get; internal set; } = "現原宮";


		public static string PatchouliSpellPowerGrasp { get; internal set; } = "";


		public static string PatchouliSpellMastery { get; internal set; } = "3000小纯";


		public static string PatchouliPhlogisticPillar { get; internal set; } = "藤原あおい";


		public static string PatchouliVoile { get; internal set; } = "なぅか";


		public static string PatchouliDimensionShift { get; internal set; } = "ずか";


		public static string PatchouliMoonlitChill { get; internal set; } = "shibachipipa";


		public static string PatchouliMoongazing { get; internal set; } = "Ram";


		public static string PatchouliSeaOfSerenity { get; internal set; } = "";


		public static string PatchouliDistortionField { get; internal set; } = "戀歌@Skeb募集中";


		public static string PatchouliIntruderSecurity { get; internal set; } = "CR";


		public static string PatchouliCountersquall { get; internal set; } = "";


		public static string PatchouliAstronomyStudy { get; internal set; } = "Touhou Gensou Eclipse";


		public static string PatchouliAwakenedSpellbook { get; internal set; } = "かわやばぐ";


		public static string PatchouliMetalFatigue { get; internal set; } = "@ceciltite";


		public static string PatchouliMercuryPoisoning { get; internal set; } = "top-exerou";


		public static string PatchouliCircadianRhythm { get; internal set; } = "Ram";


		public static string PatchouliSakuyaFriend { get; internal set; } = "米室\uff3fお仕事募集中";


		public static string MagicalResearch { get; internal set; } = "葉鶏(ばとり)";


		public static string PatchouliTeaBreak { get; internal set; } = "久蒼穹";


		public static string PatchouliPhlogisticRain { get; internal set; } = "Pixerite";


		public static string PatchouliGingerDust { get; internal set; } = "百瀬 / ゆえこ";


		public static string PatchouliGreenStorm { get; internal set; } = "蓬莱雾理";


		public static string PatchouliSample { get; internal set; }

		public static string PatchouliRingOfAgni { get; internal set; } = "AMA@秋季例大祭";


		public static string PatchouliRoyalFlare { get; internal set; } = "青冥童子@お仕事募集中";


		public static string PatchouliAgniRadiance { get; internal set; } = "ファルケン@skebお仕募集中";


		public static string PatchouliKnowledgeSeeker { get; internal set; } = "モ誰";


		public static string PatchouliSummerRed { get; internal set; } = "";


		public static string PatchouliJellyfishPrincess { get; internal set; } = "ルシュ";


		public static string PatchouliDiamondHardness { get; internal set; } = "@Rinka_private";


		public static string PatchouliSpringWind { get; internal set; } = "@Rinka_private";


		public static string PatchouliSatelliteHimawari { get; internal set; } = "kasane (cynthia)";


		public static string PatchouliSpellCreation { get; internal set; } = "亜羽瀬ひの";


		public static string PatchouliSaintElmoPillar { get; internal set; } = "けろこ";


		public static string PatchouliSpellCreationBlock { get; internal set; } = "五七七";


		public static string PatchouliSpellCreationDraw { get; internal set; } = "五七七";


		public static string PatchouliSpellCreationFire { get; internal set; } = "五七七";


		public static string PatchouliSpellCreationWeak { get; internal set; } = "五七七";


		public static string PatchouliSungrazerComet { get; internal set; } = "ベンジャミン";


		public static string PatchouliHydrogenousProminence { get; internal set; } = "羽々斬";


		public static string PatchouliGirlOfShade { get; internal set; } = "syuri22";


		public static string PatchouliSpellDuplication { get; internal set; } = "CPKon";


		public static string PatchouliTwinspell { get; internal set; } = "木子翔";


		public static string PatchouliManaDrain { get; internal set; } = "@Its_you_dan";


		public static string PatchouliTidalWave { get; internal set; } = "ちよ";


		public static string PatchouliKoakumaFriend { get; internal set; } = "雾理";


		public static string PatchouliCurrentConductor { get; internal set; } = "墨洲";


		public static string PatchouliAutumnBlade { get; internal set; } = "はるとき";


		public static string PatchouliElementalTriangle { get; internal set; } = "@subachoco";


		public static string PatchouliElementalTriangleFire { get; internal set; } = "五七七";


		public static string PatchouliElementalTriangleWater { get; internal set; } = "五七七";


		public static string PatchouliElementalTriangleWood { get; internal set; } = "五七七";


		public static string PatchouliTheUnmovingGreatLibrary { get; internal set; } = "neko";

	}
	[StructLayout(LayoutKind.Sequential, Size = 1)]
	public struct PatchouliIllustrationRefs
	{
		public static string Adia = "Touhou Artificial Dream in Arcadia";

		public static string LOT2 = "Labyrinth of Touhou 2";

		public static string PdP = "Touhou Puppet Dance Performance";

		public static string Hisoutensoku = "Touhou Hisoutensoku";

		public static string GensoWanderer = "Touhou Gensou Wanderer";

		public static string GensoSkydrift = "Touhou Genso Skydrift";

		public static string MonsterTowerDefense = "Touhou Monster Tower Defense";

		public static string GensoShoujo = "Touhou Gensou Shoujo Taisen You";

		public static string Touhou7 = "Touhou 7";

		public static string Touhou8 = "Touhou 8";

		public static string Touhou9 = "Touhou 9";

		public static string Touhou17 = "Touhou 17";

		public static string Touhouvania = "Touhou Koumajou Densetsu II";

		public static string Mystia = "Touhou Mystia Izakaya";

		public static string YGO = "Yu-gi-oh!";
	}
}
namespace PatchouliCharacterMod.GunName
{
	[StructLayout(LayoutKind.Sequential, Size = 1)]
	public struct PatchouliGunName
	{
		private static IReadOnlyList<GunConfig> gunConfig = GunConfig.AllConfig();

		public static string PatchouliAttackU { get; internal set; } = GetGunFromId(802);


		public static string PatchouliAttackB { get; internal set; } = GetGunFromId(804);


		public static string PatchouliCondensedBubble { get; internal set; } = GetGunFromId(21071);


		public static string PatchouliManaDrain { get; internal set; } = GetGunFromId(4700);


		public static string PatchouliDiamondRing { get; internal set; } = GetGunFromId(824);


		public static string PatchouliSunshineReflector { get; internal set; } = GetGunFromId(6064);


		public static string PatchouliAgniShine { get; internal set; } = GetGunFromId(7100);


		public static string PatchouliDoyouSpear { get; internal set; } = GetGunFromId(25010);


		public static string PatchouliLavaCromlech { get; internal set; } = GetGunFromId(6061);


		public static string PatchouliForestBlaze { get; internal set; } = GetGunFromId(6062);


		public static string PatchouliObservatory { get; internal set; } = GetGunFromId(12160);


		public static string PatchouliEveryAngleShot { get; internal set; } = GetGunFromId(7160);


		public static string PatchouliKrakenWave { get; internal set; } = GetGunFromId(4157);


		public static string PatchouliNoachianDeluge { get; internal set; } = GetGunFromId(25054);


		public static string PatchouliSpellMastery { get; internal set; } = GetGunFromId(4711);


		public static string PatchouliMetalFatigue { get; internal set; } = GetGunFromId(6003);


		public static string PatchouliWaterElf { get; internal set; } = GetGunFromId(25141);


		public static string PatchouliPhlogisticRain { get; internal set; } = GetGunFromId(25053);


		public static string PatchouliGreenStorm { get; internal set; } = GetGunFromId(4152);


		public static string PatchouliRingOfAgni { get; internal set; } = GetGunFromId(4150);


		public static string PatchouliRoyalFlare { get; internal set; } = GetGunFromId(23071);


		public static string PatchouliSaintElmoPillar { get; internal set; } = GetGunFromId(60003);


		public static string PatchouliJellyfishPrincess { get; internal set; } = GetGunFromId(25183);


		public static string PatchouliSpringWind { get; internal set; } = GetGunFromId(6180);


		public static string PatchouliSpellCreation { get; internal set; } = GetGunFromId(21520);


		public static string PatchouliAutumnBlade { get; internal set; } = GetGunFromId(21511);


		public static string Voile { get; internal set; } = GetGunFromId(401);


		public static string GrandIncantation { get; internal set; } = GetGunFromId(4712);


		public static string FireSign { get; internal set; } = GetGunFromId(862);


		public static string WoodSign { get; internal set; } = GetGunFromId(25185);


		public static string SunSign { get; internal set; } = GetGunFromId(23011);


		public static string UltimateSkillU { get; internal set; } = GetGunFromId(4158);


		public static string UltimateSkillB { get; internal set; } = GetGunFromId(25191);


		public static string GetGunFromId(int id)
		{
			string text = "";
			try
			{
				return (from config in gunConfig
					where config.Id == id
					select config.Name).ToList()[0];
			}
			catch
			{
				Debug.Log((object)("id: " + id + " doesn't exist. Check whether the ID is correct."));
				return "Instant";
			}
		}
	}
}
namespace PatchouliCharacterMod.Exhibits
{
	public sealed class PatchouliExhibitBDef : PatchouliExhibitTemplate
	{
		public override ExhibitConfig MakeConfig()
		{
			//IL_0025: 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)
			ExhibitConfig defaultExhibitConfig = GetDefaultExhibitConfig();
			defaultExhibitConfig.Value1 = 1;
			defaultExhibitConfig.Value2 = 1;
			ManaGroup value = default(ManaGroup);
			((ManaGroup)(ref value)).Black = 1;
			defaultExhibitConfig.Mana = value;
			defaultExhibitConfig.BaseManaColor = (ManaColor)3;
			string item = PatchouliConfigEntry.SignToName(PatchouliConfigEntry.GetStartingExhibitSign());
			defaultExhibitConfig.RelativeEffects = new List<string> { "PatchouliSignKeywordSe", item };
			return defaultExhibitConfig;
		}
	}
	[EntityLogic(typeof(PatchouliExhibitBDef))]
	public sealed class PatchouliExhibitB : ShiningExhibit
	{
		private string Signs => ((GameEntity)this).LocalizeProperty("Signs", true, false);

		public string Sign
		{
			get
			{
				string[] array = Signs.Split(" ");
				return array[(int)PatchouliConfigEntry.GetStartingExhibitSign()];
			}
		}

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

		private IEnumerable<BattleAction> OnPlayerTurnStarted(UnitEventArgs args)
		{
			foreach (StatusEffect se in ((Unit)((Exhibit)this).Battle.Player).StatusEffects)
			{
				if (((GameEntity)se).Id == PatchouliConfigEntry.SignToName(PatchouliConfigEntry.GetStartingExhibitSign()))
				{
					yield break;
				}
			}
			<>n__0();
			Type type = PatchouliConfigEntry.SignToType(PatchouliConfigEntry.GetStartingExhibitSign());
			yield return (BattleAction)new ApplyStatusEffectAction(type, (Unit)(object)((Exhibit)this).Battle.Player, (int?)((Exhibit)this).Value1, (int?)0, (int?)PatchouliSignSe.TurnLimit, (int?)null, 0f, true);
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((Exhibit)this).NotifyActivating();
		}
	}
	public class PatchouliExhibitTemplate : ExhibitTemplate
	{
		protected string OwnerName = PatchouliPlayerDef.playerName;

		public override IdContainer GetId()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit(PatchouliDefaultConfig.GetDefaultID((EntityDefinition)(object)this));
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)PatchouliLocalization.ExhibitsBatchLoc.AddEntity((EntityDefinition)(object)this);
		}

		public override ExhibitSprites LoadSprite()
		{
			return PatchouliImageLoader.LoadExhibitSprite((ExhibitTemplate)(object)this);
		}

		public override ExhibitConfig MakeConfig()
		{
			return GetDefaultExhibitConfig();
		}

		public ExhibitConfig GetDefaultExhibitConfig()
		{
			return PatchouliDefaultConfig.GetDefaultExhibitConfig();
		}
	}
	public sealed class PatchouliExhibitUDef : PatchouliExhibitTemplate
	{
		public override ExhibitConfig MakeConfig()
		{
			//IL_0025: 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)
			ExhibitConfig defaultExhibitConfig = GetDefaultExhibitConfig();
			defaultExhibitConfig.Value1 = 1;
			defaultExhibitConfig.Value2 = 2;
			ManaGroup value = default(ManaGroup);
			((ManaGroup)(ref value)).Blue = 1;
			defaultExhibitConfig.Mana = value;
			defaultExhibitConfig.BaseManaColor = (ManaColor)2;
			defaultExhibitConfig.RelativeCards = new List<string> { "PatchouliAstronomy" };
			return defaultExhibitConfig;
		}
	}
	[EntityLogic(typeof(PatchouliExhibitUDef))]
	public sealed class PatchouliExhibitU : ShiningExhibit
	{
		private int Boost = 0;

		public int BoostThreshold1 { get; } = 8;


		protected override void OnEnterBattle()
		{
			((Exhibit)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnStarted);
			((Exhibit)this).ReactBattleEvent<CardUsingEventArgs>(((Exhibit)this).Battle.CardUsing, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsing);
			((Exhibit)this).ReactBattleEvent<CardUsingEventArgs>(((Exhibit)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed);
		}

		private IEnumerable<BattleAction> OnCardUsing(CardUsingEventArgs args)
		{
			Card card = args.Card;
			if (card is PatchouliBoostCard boostCard)
			{
				Boost = boostCard.Boost;
			}
			yield break;
		}

		private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs args)
		{
			if (args.Card is PatchouliBoostCard && Boost >= BoostThreshold1)
			{
				<>n__0();
				yield return (BattleAction)new CastBlockShieldAction((Unit)(object)((Exhibit)this).Battle.Player, (Unit)(object)((Exhibit)this).Battle.Player, ((Exhibit)this).Value2, 0, (BlockShieldType)2, true);
			}
		}

		private IEnumerable<BattleAction> OnPlayerTurnStarted(UnitEventArgs args)
		{
			if (((Unit)((Exhibit)this).Battle.Player).TurnCounter == 1)
			{
				<>n__0();
				yield return (BattleAction)new AddCardsToHandAction((Card[])(object)new Card[1] { Library.CreateCard<PatchouliAstronomy>() });
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((Exhibit)this).NotifyActivating();
		}
	}
}
namespace PatchouliCharacterMod.Config
{
	public sealed class PatchouliConfigEntry
	{
		public static Signs GetStartingExhibitSign()
		{
			if (BepinexPlugin.startingExhibitSign.Value < 0 || BepinexPlugin.startingExhibitSign.Value > 6)
			{
				return Signs.Fire;
			}
			return (Signs)BepinexPlugin.startingExhibitSign.Value;
		}

		public static Signs GetStartingCardSign()
		{
			if (BepinexPlugin.startingCardSign.Value < 0 || BepinexPlugin.startingCardSign.Value > 6)
			{
				return Signs.Fire;
			}
			return (Signs)BepinexPlugin.startingCardSign.Value;
		}

		public static string SignToName(Signs sign)
		{
			List<string> list = new List<string> { "PatchouliFireSignSe", "PatchouliWaterSignSe", "PatchouliWoodSignSe", "PatchouliMetalSignSe", "PatchouliEarthSignSe", "PatchouliSunSignSe", "PatchouliMoonSignSe" };
			return list[(int)sign];
		}

		public static Type SignToType(Signs sign)
		{
			List<Type> list = new List<Type>();
			list.Add(typeof(PatchouliFireSignSe));
			list.Add(typeof(PatchouliWaterSignSe));
			list.Add(typeof(PatchouliWoodSignSe));
			list.Add(typeof(PatchouliMetalSignSe));
			list.Add(typeof(PatchouliEarthSignSe));
			list.Add(typeof(PatchouliSunSignSe));
			list.Add(typeof(PatchouliMoonSignSe));
			List<Type> list2 = list;
			return list2[(int)sign];
		}
	}
	public sealed class PatchouliDefaultConfig
	{
		private static readonly string OwnerName = PatchouliPlayerDef.playerName;

		public static string GetDefaultID(EntityDefinition entity)
		{
			string name = ((object)entity).GetType().Name;
			return name.Remove(name.Length - 3);
		}

		public static CardConfig GetCardDefaultConfig()
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Expected O, but got Unknown
			return new CardConfig(0, "", 10, true, new string[0][], "", "", 0, false, true, true, false, true, (Rarity)0, (CardType)0, (TargetType?)null, (IReadOnlyList<ManaColor>)new List<ManaColor>(), false, default(ManaGroup), (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)0, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (string)null, "", "", false, (string)null, (IReadOnlyList<string>)new List<string>());
		}

		public static ExhibitConfig GetDefaultExhibitConfig()
		{
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Expected O, but got Unknown
			return new ExhibitConfig(0, "", 10, false, false, false, false, (AppearanceType)3, OwnerName, (ExhibitLosableType)1, (Rarity)3, (int?)null, (int?)null, (int?)null, (ManaGroup?)default(ManaGroup), (ManaColor?)null, (ManaColor?)(ManaColor)1, 1, false, (int?)null, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>());
		}

		public static StatusEffectConfig GetDefaultStatusEffectConfig()
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Expected O, but got Unknown
			return new StatusEffectConfig(0, "", 10, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default");
		}
	}
}
namespace PatchouliCharacterMod.Cards
{
	public sealed class PatchouliAgniShineDef : PatchouliCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.HideMesuem = true;
			cardDefaultConfig.IsPooled = false;
			cardDefaultConfig.GunName = PatchouliGunName.PatchouliAgniShine;
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)3 };
			ManaGroup cost = default(ManaGroup);
			((ManaGroup)(ref cost)).Black = 2;
			cardDefaultConfig.Cost = cost;
			cardDefaultConfig.Rarity = (Rarity)0;
			cardDefaultConfig.Owner = OwnerName;
			cardDefaultConfig.Type = (CardType)1;
			cardDefaultConfig.TargetType = (TargetType)1;
			cardDefaultConfig.Damage = 7;
			cardDefaultConfig.UpgradedDamage = 9;
			cardDefaultConfig.Value1 = 1;
			cardDefaultConfig.Value2 = 2;
			cardDefaultConfig.RelativeEffects = new List<string> { "PatchouliSignKeywordSe", "PatchouliFireSignSe" };
			cardDefaultConfig.UpgradedRelativeEffects = new List<string> { "PatchouliSignKeywordSe", "PatchouliFireSignSe" };
			cardDefaultConfig.Illustrator = PatchouliIllustrator.PatchouliAgniShine;
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(PatchouliAgniShineDef))]
	public sealed class PatchouliAgniShine : PatchouliCard
	{
		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).CardGuns = new Guns(((Card)this).GunName, ((Card)this).Value2, false);
			foreach (GunPair gunPair in ((Card)this).CardGuns.GunPairs)
			{
				yield return ((Card)this).AttackAction(selector, gunPair);
			}
			if (!((Card)this).Battle.BattleShouldEnd)
			{
				yield return ((Card)this).BuffAction<PatchouliFireSignSe>(((Card)this).Value1, 0, 0, PatchouliSignSe.TurnLimit, 0.2f);
				if (((Card)this).IsUpgraded)
				{
					yield return (BattleAction)(object)new TriggerSignPassiveAction(0);
				}
			}
		}
	}
	public sealed class PatchouliAttackBDef : PatchouliCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: 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)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.GunName = PatchouliGunName.PatchouliAttackB;
			cardDefaultConfig.IsPooled = false;
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)3 };
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 1;
			((ManaGroup)(ref val)).Black = 1;
			cardDefaultConfig.Cost = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 2;
			cardDefaultConfig.UpgradedCost = val;
			cardDefaultConfig.Rarity = (Rarity)0;
			cardDefaultConfig.Owner = OwnerName;
			cardDefaultConfig.Type = (CardType)1;
			cardDefaultConfig.TargetType = (TargetType)1;
			cardDefaultConfig.Damage = 10;
			cardDefaultConfig.UpgradedDamage = 14;
			cardDefaultConfig.Keywords = (Keyword)2;
			cardDefaultConfig.UpgradedKeywords = (Keyword)2;
			cardDefaultConfig.Illustrator = PatchouliIllustrator.PatchouliAttackB;
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(PatchouliAttackBDef))]
	public sealed class PatchouliAttackB : PatchouliCard
	{
	}
	public sealed class PatchouliBlockBDef : PatchouliCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.IsPooled = false;
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)3 };
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 1;
			((ManaGroup)(ref val)).Black = 1;
			cardDefaultConfig.Cost = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 2;
			cardDefaultConfig.UpgradedCost = val;
			cardDefaultConfig.Rarity = (Rarity)0;
			cardDefaultConfig.Owner = OwnerName;
			cardDefaultConfig.Type = (CardType)2;
			cardDefaultConfig.TargetType = (TargetType)4;
			cardDefaultConfig.Block = 10;
			cardDefaultConfig.UpgradedBlock = 13;
			cardDefaultConfig.Keywords = (Keyword)2;
			cardDefaultConfig.UpgradedKeywords = (Keyword)2;
			cardDefaultConfig.Illustrator = PatchouliIllustrator.PatchouliBlockB;
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(PatchouliBlockBDef))]
	public sealed class PatchouliBlockB : PatchouliCard
	{
	}
	public sealed class PatchouliDiamondRingDef : PatchouliCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_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 cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.GunName = PatchouliGunName.PatchouliDiamondRing;
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)3 };
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 1;
			((ManaGroup)(ref val)).Black = 1;
			cardDefaultConfig.Cost = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 2;
			cardDefaultConfig.UpgradedCost = val;
			cardDefaultConfig.Rarity = (Rarity)0;
			cardDefaultConfig.Owner = OwnerName;
			cardDefaultConfig.Type = (CardType)1;
			cardDefaultConfig.TargetType = (TargetType)1;
			cardDefaultConfig.Damage = 12;
			cardDefaultConfig.UpgradedDamage = 17;
			cardDefaultConfig.Value1 = 1;
			cardDefaultConfig.Keywords = (Keyword)0;
			cardDefaultConfig.UpgradedKeywords = (Keyword)0;
			cardDefaultConfig.RelativeEffects = new List<string> { "PatchouliSignKeywordSe", "PatchouliSunSignSe", "PatchouliMoonSignSe" };
			cardDefaultConfig.UpgradedRelativeEffects = new List<string> { "PatchouliSignKeywordSe", "PatchouliSunSignSe", "PatchouliMoonSignSe" };
			cardDefaultConfig.Illustrator = PatchouliIllustrator.PatchouliDiamondRing;
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(PatchouliDiamondRingDef))]
	public sealed class PatchouliDiamondRing : PatchouliCard
	{
		protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			yield return ((Card)this).AttackAction(selector, ((Card)this).GunName);
			if (!((Card)this).Battle.BattleShouldEnd)
			{
				List<PatchouliDiamondRing> list = Library.CreateCards<PatchouliDiamondRing>(2, ((Card)this).IsUpgraded).ToList();
				PatchouliDiamondRing first = list[0];
				PatchouliDiamondRing PatchouliDiamondRing = list[1];
				((Card)first).ChoiceCardIndicator = 1;
				((Card)PatchouliDiamondRing).ChoiceCardIndicator = 2;
				((Card)first).SetBattle(((Card)this).Battle);
				((Card)PatchouliDiamondRing).SetBattle(((Card)this).Battle);
				MiniSelectCardInteraction interaction = new MiniSelectCardInteraction((IEnumerable<Card>)list, false, false, false)
				{
					Source = (GameEntity)(object)this
				};
				yield return (BattleAction)new InteractionAction((Interaction)(object)interaction, false);
				if (interaction.SelectedCard == first)
				{
					yield return ((Card)this).BuffAction<PatchouliSunSignSe>(((Card)this).Value1, 0, 0, PatchouliSignSe.TurnLimit, 0.2f);
				}
				else
				{
					yield return ((Card)this).BuffAction<PatchouliMoonSignSe>(((Card)this).Value1, 0, 0, PatchouliSignSe.TurnLimit, 0.2f);
				}
			}
		}
	}
	public sealed class PatchouliElementalManipulationDef : PatchouliCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.GunName = PatchouliGunName.PatchouliAgniShine;
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)3 };
			ManaGroup cost = default(ManaGroup);
			((ManaGroup)(ref cost)).Black = 2;
			cardDefaultConfig.Cost = cost;
			cardDefaultConfig.Rarity = (Rarity)0;
			cardDefaultConfig.Owner = OwnerName;
			cardDefaultConfig.Type = (CardType)1;
			cardDefaultConfig.TargetType = (TargetType)1;
			cardDefaultConfig.Damage = 7;
			cardDefaultConfig.UpgradedDamage = 9;
			cardDefaultConfig.Value1 = 1;
			cardDefaultConfig.Value2 = 2;
			string item = PatchouliConfigEntry.SignToName(PatchouliConfigEntry.GetStartingCardSign());
			cardDefaultConfig.RelativeEffects = new List<string> { "PatchouliSignKeywordSe", item };
			cardDefaultConfig.UpgradedRelativeEffects = new List<string> { "PatchouliSignKeywordSe", item };
			cardDefaultConfig.Illustrator = PatchouliIllustrator.PatchouliAgniShine;
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(PatchouliElementalManipulationDef))]
	public sealed class PatchouliElementalManipulation : PatchouliCard
	{
		private string Signs => ((GameEntity)this).LocalizeProperty("Signs", true, false);

		public string Sign
		{
			get
			{
				string[] array = Signs.Split(" ");
				return array[(int)PatchouliConfigEntry.GetStartingCardSign()];
			}
		}

		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).CardGuns = new Guns(((Card)this).GunName, ((Card)this).Value2, false);
			foreach (GunPair gunPair in ((Card)this).CardGuns.GunPairs)
			{
				yield return ((Card)this).AttackAction(selector, gunPair);
			}
			if (!((Card)this).Battle.BattleShouldEnd)
			{
				Type type = PatchouliConfigEntry.SignToType(PatchouliConfigEntry.GetStartingCardSign());
				yield return ((Card)this).BuffAction(type, ((Card)this).Value1, 0, 0, PatchouliSignSe.TurnLimit, 0.2f);
				if (((Card)this).IsUpgraded)
				{
					yield return (BattleAction)(object)new TriggerSignPassiveAction((int)PatchouliConfigEntry.GetStartingCardSign());
				}
			}
		}
	}
	public sealed class PatchouliFlashOfSpringDef : PatchouliCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)3 };
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).Black = 1;
			cardDefaultConfig.Cost = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 1;
			cardDefaultConfig.UpgradedCost = val;
			cardDefaultConfig.Rarity = (Rarity)0;
			cardDefaultConfig.Owner = OwnerName;
			cardDefaultConfig.Value1 = 1;
			cardDefaultConfig.UpgradedValue1 = 2;
			cardDefaultConfig.Value2 = 1;
			cardDefaultConfig.Type = (CardType)3;
			cardDefaultConfig.TargetType = (TargetType)0;
			cardDefaultConfig.RelativeEffects = new List<string> { "PatchouliSignKeywordSe", "PatchouliWoodSignSe" };
			cardDefaultConfig.UpgradedRelativeEffects = new List<string> { "PatchouliSignKeywordSe", "PatchouliWoodSignSe" };
			cardDefaultConfig.Illustrator = PatchouliIllustrator.PatchouliFlashOfSpring;
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(PatchouliFlashOfSpringDef))]
	public sealed class PatchouliFlashOfSpring : PatchouliCard
	{
		protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			yield return (BattleAction)new DrawManyCardAction(((Card)this).Value1);
			yield return ((Card)this).BuffAction<PatchouliWoodSignSe>(((Card)this).Value2, 0, 0, PatchouliSignSe.TurnLimit, 0.2f);
		}
	}
	public sealed class PatchouliSilentSeleneDef : PatchouliCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_001f: 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)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)3 };
			ManaGroup cost = default(ManaGroup);
			((ManaGroup)(ref cost)).Any = 2;
			((ManaGroup)(ref cost)).Black = 1;
			cardDefaultConfig.Cost = cost;
			cardDefaultConfig.Rarity = (Rarity)0;
			cardDefaultConfig.Owner = OwnerName;
			cardDefaultConfig.Type = (CardType)2;
			cardDefaultConfig.TargetType = (TargetType)4;
			cardDefaultConfig.Block = 18;
			cardDefaultConfig.UpgradedBlock = 20;
			cardDefaultConfig.Value1 = 1;
			cardDefaultConfig.UpgradedValue1 = 2;
			cardDefaultConfig.RelativeEffects = new List<string> { "PatchouliSignKeywordSe", "PatchouliMoonSignSe" };
			cardDefaultConfig.UpgradedRelativeEffects = new List<string> { "PatchouliSignKeywordSe", "PatchouliMoonSignSe" };
			cardDefaultConfig.Illustrator = PatchouliIllustrator.PatchouliSilentSelene;
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(PatchouliSilentSeleneDef))]
	public sealed class PatchouliSilentSelene : PatchouliCard
	{
		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).DefenseAction(true);
			yield return ((Card)this).BuffAction<PatchouliMoonSignSe>(((Card)this).Value1, 0, 0, PatchouliSignSe.TurnLimit, 0.2f);
		}
	}
	public sealed class PatchouliSilverDragonDef : PatchouliCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_001f: 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)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)3 };
			ManaGroup cost = default(ManaGroup);
			((ManaGroup)(ref cost)).Any = 1;
			((ManaGroup)(ref cost)).Black = 1;
			cardDefaultConfig.Cost = cost;
			cardDefaultConfig.Rarity = (Rarity)0;
			cardDefaultConfig.Owner = OwnerName;
			cardDefaultConfig.Type = (CardType)2;
			cardDefaultConfig.TargetType = (TargetType)4;
			cardDefaultConfig.Block = 12;
			cardDefaultConfig.UpgradedBlock = 14;
			cardDefaultConfig.Value1 = 1;
			cardDefaultConfig.RelativeEffects = new List<string> { "PatchouliSignKeywordSe", "PatchouliMetalSignSe" };
			cardDefaultConfig.UpgradedRelativeEffects = new List<string> { "PatchouliSignKeywordSe", "PatchouliMetalSignSe" };
			cardDefaultConfig.Illustrator = PatchouliIllustrator.PatchouliSilverDragon;
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(PatchouliSilverDragonDef))]
	public sealed class PatchouliSilverDragon : PatchouliCard
	{
		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).DefenseAction(true);
			yield return ((Card)this).BuffAction<PatchouliMetalSignSe>(((Card)this).Value1, 0, 0, PatchouliSignSe.TurnLimit, 0.2f);
			if (((Card)this).IsUpgraded)
			{
				yield return (BattleAction)(object)new TriggerSignPassiveAction(3);
			}
		}
	}
	public sealed class PatchouliSunshineReflectorDef : PatchouliCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.GunName = PatchouliGunName.PatchouliSunshineReflector;
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)3 };
			ManaGroup cost = default(ManaGroup);
			((ManaGroup)(ref cost)).Any = 2;
			((ManaGroup)(ref cost)).Black = 1;
			cardDefaultConfig.Cost = cost;
			cardDefaultConfig.Rarity = (Rarity)0;
			cardDefaultConfig.Owner = OwnerName;
			cardDefaultConfig.Type = (CardType)1;
			cardDefaultConfig.TargetType = (TargetType)2;
			cardDefaultConfig.Damage = 17;
			cardDefaultConfig.UpgradedDamage = 19;
			cardDefaultConfig.Value1 = 1;
			cardDefaultConfig.UpgradedValue1 = 2;
			cardDefaultConfig.RelativeEffects = new List<string> { "PatchouliSignKeywordSe", "PatchouliSunSignSe" };
			cardDefaultConfig.UpgradedRelativeEffects = new List<string> { "PatchouliSignKeywordSe", "PatchouliSunSignSe" };
			cardDefaultConfig.Illustrator = PatchouliIllustrator.PatchouliSunshineReflector;
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(PatchouliSunshineReflectorDef))]
	public sealed class PatchouliSunshineReflector : PatchouliCard
	{
		protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			yield return ((Card)this).AttackAction(selector, ((Card)this).GunName);
			if (!((Card)this).Battle.BattleShouldEnd)
			{
				yield return ((Card)this).BuffAction<PatchouliSunSignSe>(((Card)this).Value1, 0, 0, PatchouliSignSe.TurnLimit, 0.2f);
			}
		}
	}
	public sealed class PatchouliFiveSeasonsDef : PatchouliCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)3 };
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).Black = 3;
			cardDefaultConfig.Cost = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Black = 1;
			cardDefaultConfig.UpgradedCost = val;
			cardDefaultConfig.Rarity = (Rarity)2;
			cardDefaultConfig.Owner = OwnerName;
			cardDefaultConfig.Type = (CardType)4;
			cardDefaultConfig.TargetType = (TargetType)4;
			cardDefaultConfig.Value1 = 1;
			cardDefaultConfig.RelativeEffects = new List<string> { "PatchouliSignKeywordSe", "PatchouliIntelligenceSe" };
			cardDefaultConfig.UpgradedRelativeEffects = new List<string> { "PatchouliSignKeywordSe", "PatchouliIntelligenceSe" };
			cardDefaultConfig.Illustrator = PatchouliIllustrator.PatchouliFiveSeasons;
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(PatchouliFiveSeasonsDef))]
	public sealed class PatchouliFiveSeasons : PatchouliCard
	{
		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<PatchouliFiveSeasonsSe>(((Card)this).Value1, 0, 0, 0, 0.2f);
		}
	}
	public sealed class PatchouliGirlOfShadeDef : PatchouliCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)3 };
			ManaGroup cost = default(ManaGroup);
			((ManaGroup)(ref cost)).Black = 4;
			cardDefaultConfig.Cost = cost;
			cardDefaultConfig.Rarity = (Rarity)2;
			cardDefaultConfig.Owner = OwnerName;
			cardDefaultConfig.Type = (CardType)4;
			cardDefaultConfig.TargetType = (TargetType)4;
			cardDefaultConfig.Value1 = 3;
			cardDefaultConfig.UpgradedValue1 = 5;
			cardDefaultConfig.Value2 = 1;
			cardDefaultConfig.RelativeCards = new List<string> { "Shadow" };
			cardDefaultConfig.UpgradedRelativeCards = new List<string> { "Shadow" };
			cardDefaultConfig.RelativeEffects = new List<string> { "Firepower", "Spirit" };