Decompiled source of Sanae Kochiya v0.6.5

Sanae_Kochiya.dll

Decompiled 2 days ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using AddWatermark;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using Cysharp.Threading.Tasks;
using HarmonyLib;
using LBoL.Base;
using LBoL.Base.Extensions;
using LBoL.ConfigData;
using LBoL.Core;
using LBoL.Core.Battle;
using LBoL.Core.Battle.BattleActions;
using LBoL.Core.Battle.Interactions;
using LBoL.Core.Cards;
using LBoL.Core.Intentions;
using LBoL.Core.Randoms;
using LBoL.Core.StatusEffects;
using LBoL.Core.Units;
using LBoL.EntityLib.Cards;
using LBoL.EntityLib.Cards.Adventure;
using LBoL.EntityLib.Cards.Character.Reimu;
using LBoL.EntityLib.Cards.Enemy;
using LBoL.EntityLib.Cards.Neutral.NoColor;
using LBoL.EntityLib.Cards.Neutral.TwoColor;
using LBoL.EntityLib.EnemyUnits.Character;
using LBoL.EntityLib.Exhibits;
using LBoL.EntityLib.StatusEffects.Basic;
using LBoL.EntityLib.StatusEffects.Enemy;
using LBoL.EntityLib.StatusEffects.ExtraTurn;
using LBoL.EntityLib.StatusEffects.Neutral.TwoColor;
using LBoL.EntityLib.StatusEffects.Neutral.White;
using LBoL.EntityLib.StatusEffects.Others;
using LBoL.Presentation;
using LBoLEntitySideloader;
using LBoLEntitySideloader.Attributes;
using LBoLEntitySideloader.Entities;
using LBoLEntitySideloader.Resource;
using LBoLEntitySideloader.Utils;
using Sanae_Kochiya.Cards.Template;
using Sanae_Kochiya.Exhibits;
using Sanae_Kochiya.GunName;
using Sanae_Kochiya.ImageLoader;
using Sanae_Kochiya.Source.Boss;
using Sanae_Kochiya.Source.Cards.Rare;
using Sanae_Kochiya.Source.Cards.Starter;
using Sanae_Kochiya.Source.Config;
using Sanae_Kochiya.Source.Loadouts;
using Sanae_Kochiya.Source.Localization;
using Sanae_Kochiya.Source.StatusEffects;
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("Sanae_Kochiya")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Sanae_Kochiya")]
[assembly: AssemblyTitle("Sanae_Kochiya")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[HarmonyPatch(typeof(Siji))]
internal class Siji_OnBattleStarted_Patch
{
	[HarmonyPatch("OnBattleStarted", new Type[] { typeof(GameEventArgs) })]
	private static bool Prefix(Siji __instance, ref IEnumerable<BattleAction> __result, GameEventArgs arg)
	{
		//IL_0151: Unknown result type (might be due to invalid IL or missing references)
		//IL_015b: Expected O, but got Unknown
		string id = ((GameEntity)((GameEntity)__instance).GameRun.Player).Id;
		if (id == "Sanae_Kochiya")
		{
			string text = "净颇梨审判";
			text += " -博丽灵梦-";
			Type typeFromHandle = typeof(Sanae_KochiyaBossDef.Sanae_Kochiya);
			string text2 = LocalizationExtensions.LocalizeFormat("Chat.Siji2", new object[1] { ((Unit)((Unit)__instance).Battle.Player).GetName() });
			int count = ((Unit)__instance).Battle.Player.Exhibits.Count;
			int value = 1;
			if (count >= 20)
			{
				value = 3;
			}
			else if (count >= 10)
			{
				value = 2;
			}
			__result = new List<BattleAction>
			{
				(BattleAction)(object)PerformAction.Chat((Unit)(object)__instance, LocalizationExtensions.Localize("Chat.Siji1", true), 3f, 0f, 3.2f, true),
				(BattleAction)(object)PerformAction.Animation((Unit)(object)__instance, "shoot2", 0f, (string)null, 0f, -1),
				(BattleAction)(object)PerformAction.Chat((Unit)(object)__instance, text2, 3f, 0f, 3.2f, true),
				(BattleAction)(object)PerformAction.Animation((Unit)(object)__instance, "spell", 0f, (string)null, 0f, -1),
				(BattleAction)(object)PerformAction.Spell((Unit)(object)__instance, text),
				(BattleAction)new SpawnEnemyAction((EnemyUnit)(object)__instance, typeFromHandle, 2, 0f, 0.3f, false),
				(BattleAction)(object)new ApplyStatusEffectAction<SijiZui>((Unit)(object)__instance, (int?)value, (int?)null, (int?)null, (int?)null, 0f, true)
			};
			return false;
		}
		return true;
	}
}
namespace Sanae_Kochiya
{
	[BepInPlugin("xeno.lbol.character.Sanae_Kochiya", "Sanae_Kochiya", "0.6.5")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInProcess("LBoL.exe")]
	public class BepinexPlugin : BaseUnityPlugin
	{
		public static string modUniqueID = "Sanae_Kochiya";

		public static string playerName = "Sanae";

		public static bool useInGameModel = true;

		public static string model_name = "Sanae";

		public static bool model_is_flipped = false;

		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("xeno.lbol.character.Sanae_Kochiya", "");

		public static ConfigEntry<bool> modExclusiveConfig;

		private void Awake()
		{
			log = ((BaseUnityPlugin)this).Logger;
			modExclusiveConfig = ((BaseUnityPlugin)this).Config.Bind<bool>("Act1Boss", "Act1Boss", true, "Enables the Act 1 Sanae boss and Sanae common Exhibits, for non-Sanae characters.");
			Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
			((Object)((Component)this).gameObject).hideFlags = (HideFlags)61;
			CardIndexGenerator.PromiseClearIndexSet();
			EntityManager.RegisterSelf();
			harmony.PatchAll();
			Func<Sprite> func = () => ResourceLoader.LoadSprite("BossIconSanae.png", (IResourceSource)(object)directorySource, (Rect?)null, 1, (Vector2?)null);
			EnemyUnitTemplate.AddBossNodeIcon("Sanae_Kochiya", func, (Assembly)null);
			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 = "xeno.lbol.character.Sanae_Kochiya";

		public const string Name = "Sanae_Kochiya";

		public const string version = "0.6.5";

		public static readonly Harmony harmony = new Harmony("xeno.lbol.character.Sanae_Kochiya");
	}
	public sealed class SampleCharacterPlayerDef : PlayerUnitTemplate
	{
		[EntityLogic(typeof(SampleCharacterPlayerDef))]
		public sealed class Sanae_Kochiya : PlayerUnit
		{
		}

		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(BepinexPlugin.modUniqueID);
		}

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

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

		public override PlayerUnitConfig MakeConfig()
		{
			return SampleCharacterLoadouts.playerUnitConfig;
		}
	}
	internal class WatermarkWrapper
	{
		[MethodImpl(MethodImplOptions.NoInlining)]
		internal static void ActivateWatermark()
		{
			API.ActivateWatermark();
		}
	}
}
namespace Sanae_Kochiya.SampleCharacterUlt
{
	public sealed class SanaeUltWDef : SampleCharacterUltTemplate
	{
		public override UltimateSkillConfig MakeConfig()
		{
			UltimateSkillConfig defaulUltConfig = GetDefaulUltConfig();
			defaulUltConfig.PowerCost = 50;
			defaulUltConfig.PowerPerLevel = 100;
			defaulUltConfig.MaxPowerLevel = 2;
			defaulUltConfig.RepeatableType = (UsRepeatableType)0;
			defaulUltConfig.Damage = 12;
			defaulUltConfig.Value1 = 1;
			defaulUltConfig.RelativeEffects = new List<string> { "Amulet", "AmuletForCard" };
			return defaulUltConfig;
		}
	}
	[EntityLogic(typeof(SanaeUltWDef))]
	public sealed class SanaeUltW : UltimateSkill
	{
		public override DamageInfo Damage => CalculateDamage();

		public SanaeUltW()
		{
			((UltimateSkill)this).TargetType = (TargetType)2;
			((UltimateSkill)this).GunName = GunNameID.GetGunFromId(39050);
		}

		private DamageInfo CalculateDamage()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: 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_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			DamageInfo damage;
			if (((UltimateSkill)this).Battle == null || !((Unit)((UltimateSkill)this).Owner).HasStatusEffect<OmikujiBonusSe>())
			{
				damage = ((UltimateSkill)this).Damage;
				return DamageInfo.Attack(((DamageInfo)(ref damage)).Amount, true);
			}
			damage = ((UltimateSkill)this).Damage;
			return DamageInfo.Attack(((DamageInfo)(ref damage)).Amount + (float)((StatusEffect)((Unit)((UltimateSkill)this).Owner).GetStatusEffect<OmikujiBonusSe>()).Level, true);
		}

		protected override IEnumerable<BattleAction> Actions(UnitSelector selector)
		{
			Unit[] targets = selector.GetUnits(((UltimateSkill)this).Battle);
			yield return (BattleAction)new DamageAction((Unit)(object)((UltimateSkill)this).Owner, (IEnumerable<Unit>)targets, ((UltimateSkill)this).Damage, ((UltimateSkill)this).GunName, (GunType)0);
			if (!((UltimateSkill)this).Battle.BattleShouldEnd)
			{
				yield return (BattleAction)(object)new ApplyStatusEffectAction<AmuletForCard>((Unit)(object)((UltimateSkill)this).Owner, (int?)((UltimateSkill)this).Value1, (int?)0, (int?)0, (int?)0, 0.2f, true);
				yield return (BattleAction)(object)new ApplyStatusEffectAction<Amulet>((Unit)(object)((UltimateSkill)this).Owner, (int?)((UltimateSkill)this).Value1, (int?)0, (int?)0, (int?)0, 0.2f, true);
			}
		}
	}
	public sealed class SanaeUltUDef : SampleCharacterUltTemplate
	{
		public override UltimateSkillConfig MakeConfig()
		{
			UltimateSkillConfig defaulUltConfig = GetDefaulUltConfig();
			defaulUltConfig.PowerCost = 60;
			defaulUltConfig.PowerPerLevel = 120;
			defaulUltConfig.MaxPowerLevel = 2;
			defaulUltConfig.RepeatableType = (UsRepeatableType)0;
			defaulUltConfig.Damage = 20;
			defaulUltConfig.Value1 = 2;
			return defaulUltConfig;
		}
	}
	[EntityLogic(typeof(SanaeUltUDef))]
	public sealed class SanaeUltU : UltimateSkill
	{
		public int GrowthCount => ((GameEntity)this).GameRun.UltimateUseCount;

		public override DamageInfo Damage => CalculateDamage();

		public SanaeUltU()
		{
			((UltimateSkill)this).TargetType = (TargetType)1;
			((UltimateSkill)this).GunName = GunNameID.GetGunFromId(13000);
		}

		private DamageInfo CalculateDamage()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: 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_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			DamageInfo damage;
			if (((UltimateSkill)this).Battle == null || !((Unit)((UltimateSkill)this).Owner).HasStatusEffect<OmikujiBonusSe>())
			{
				damage = ((UltimateSkill)this).Damage;
				return DamageInfo.Attack(((DamageInfo)(ref damage)).Amount, true);
			}
			damage = ((UltimateSkill)this).Damage;
			return DamageInfo.Attack(((DamageInfo)(ref damage)).Amount + (float)((StatusEffect)((Unit)((UltimateSkill)this).Owner).GetStatusEffect<OmikujiBonusSe>()).Level, true);
		}

		protected override IEnumerable<BattleAction> Actions(UnitSelector selector)
		{
			ManaGroup manaA = ManaGroup.Single(CollectionsExtensions.Sample<ManaColor>((IEnumerable<ManaColor>)ManaColors.Colors, ((GameEntity)this).GameRun.BattleRng));
			ManaGroup manaB = ManaGroup.Single(CollectionsExtensions.Sample<ManaColor>((IEnumerable<ManaColor>)ManaColors.Colors, ((GameEntity)this).GameRun.BattleRng));
			Unit enemy = (Unit)(object)selector.GetEnemy(((UltimateSkill)this).Battle);
			if (((ManaGroup)(ref manaA)).HasColor((ManaColor)1))
			{
				yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((UltimateSkill)this).Owner, enemy, GunNameID.GetGunFromId(801), 0.05f);
			}
			else if (((ManaGroup)(ref manaA)).HasColor((ManaColor)2))
			{
				yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((UltimateSkill)this).Owner, enemy, GunNameID.GetGunFromId(802), 0.05f);
			}
			else if (((ManaGroup)(ref manaA)).HasColor((ManaColor)3))
			{
				yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((UltimateSkill)this).Owner, enemy, GunNameID.GetGunFromId(804), 0.05f);
			}
			else if (((ManaGroup)(ref manaA)).HasColor((ManaColor)4))
			{
				yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((UltimateSkill)this).Owner, enemy, GunNameID.GetGunFromId(803), 0.05f);
			}
			else if (((ManaGroup)(ref manaA)).HasColor((ManaColor)5))
			{
				yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((UltimateSkill)this).Owner, enemy, GunNameID.GetGunFromId(805), 0.05f);
			}
			else if (((ManaGroup)(ref manaA)).HasColor((ManaColor)6))
			{
				yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((UltimateSkill)this).Owner, enemy, GunNameID.GetGunFromId(806), 0.05f);
			}
			else
			{
				yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((UltimateSkill)this).Owner, enemy, GunNameID.GetGunFromId(807), 0.05f);
			}
			if (((ManaGroup)(ref manaB)).HasColor((ManaColor)1))
			{
				yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((UltimateSkill)this).Owner, enemy, GunNameID.GetGunFromId(801), 0.1f);
			}
			else if (((ManaGroup)(ref manaB)).HasColor((ManaColor)2))
			{
				yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((UltimateSkill)this).Owner, enemy, GunNameID.GetGunFromId(802), 0.1f);
			}
			else if (((ManaGroup)(ref manaB)).HasColor((ManaColor)3))
			{
				yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((UltimateSkill)this).Owner, enemy, GunNameID.GetGunFromId(804), 0.1f);
			}
			else if (((ManaGroup)(ref manaB)).HasColor((ManaColor)4))
			{
				yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((UltimateSkill)this).Owner, enemy, GunNameID.GetGunFromId(803), 0.1f);
			}
			else if (((ManaGroup)(ref manaB)).HasColor((ManaColor)5))
			{
				yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((UltimateSkill)this).Owner, enemy, GunNameID.GetGunFromId(805), 0.1f);
			}
			else if (((ManaGroup)(ref manaB)).HasColor((ManaColor)6))
			{
				yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((UltimateSkill)this).Owner, enemy, GunNameID.GetGunFromId(806), 0.1f);
			}
			else
			{
				yield return (BattleAction)(object)PerformAction.Gun((Unit)(object)((UltimateSkill)this).Owner, enemy, GunNameID.GetGunFromId(807), 0.1f);
			}
			yield return (BattleAction)new DamageAction((Unit)(object)((UltimateSkill)this).Owner, enemy, ((UltimateSkill)this).Damage, GunNameID.GetGunFromId(13180), (GunType)0);
			if (!((UltimateSkill)this).Battle.BattleShouldEnd)
			{
				yield return (BattleAction)new GainManaAction(manaA);
				yield return (BattleAction)new GainManaAction(manaB);
			}
		}
	}
	public class SampleCharacterUltTemplate : 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(SampleCharacterDefaultConfig.GetDefaultID((EntityDefinition)(object)this));
		}

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

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

		public override UltimateSkillConfig MakeConfig()
		{
			throw new NotImplementedException();
		}

		public UltimateSkillConfig GetDefaulUltConfig()
		{
			return SampleCharacterDefaultConfig.GetDefaultUltConfig();
		}
	}
}
namespace Sanae_Kochiya.model
{
	public sealed class SampleCharacterModel : UnitModelTemplate
	{
		public static bool useInGameModel = BepinexPlugin.useInGameModel;

		public static string model_name = (useInGameModel ? BepinexPlugin.model_name : "SampleCharacterModel.png");

		public static string spellsprite_name = "SampleCharacterStand.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 SampleCharacterPlayerDef()).UniqueId;
		}

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

		public override ModelOption LoadModelOptions()
		{
			//IL_0048: 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_0053: Expected O, but got Unknown
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			if (useInGameModel)
			{
				return new ModelOption(ResourcesHelper.LoadSpineUnitAsync(model_name));
			}
			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_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			if (useInGameModel)
			{
				return ResourcesHelper.LoadSpellPortraitAsync(model_name);
			}
			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_0057: Unknown result type (might be due to invalid IL or missing references)
			if (useInGameModel)
			{
				UnitModelConfig val = ObjectExtensions.Copy<UnitModelConfig>(UnitModelConfig.FromName(model_name));
				val.Flip = BepinexPlugin.model_is_flipped;
				return val;
			}
			UnitModelConfig val2 = ObjectExtensions.Copy<UnitModelConfig>(((UnitModelTemplate)this).DefaultConfig());
			val2.Flip = BepinexPlugin.model_is_flipped;
			val2.Type = 0;
			val2.Offset = new Vector2(0f, -0.1f);
			val2.HasSpellPortrait = true;
			return val2;
		}
	}
}
namespace Sanae_Kochiya.ImageLoader
{
	public sealed class SampleCharacterImageLoader
	{
		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)BepinexPlugin.directorySource, 100, 1, (FilterMode)1, true, (Rect?)null, (Vector2?)null)), (Func<string, UniTask<Sprite>>)((string s) => ResourceLoader.LoadSpriteAsync(s, BepinexPlugin.directorySource, 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_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			ExhibitSprites val = new ExhibitSprites();
			Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)exhibit).GetId()) + s + file_extension, BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null);
			val.main = func("");
			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) + file_extension, BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null);
		}
	}
}
namespace Sanae_Kochiya.GunName
{
	public static class GunNameID
	{
		private static IReadOnlyList<GunConfig> gunConfig = GunConfig.AllConfig();

		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 Sanae_Kochiya.Exhibits
{
	public class SampleCharacterExhibitTemplate : ExhibitTemplate
	{
		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(SampleCharacterDefaultConfig.GetDefaultID((EntityDefinition)(object)this));
		}

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

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

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

		public ExhibitConfig GetDefaultExhibitConfig()
		{
			return SampleCharacterDefaultConfig.GetDefaultExhibitConfig();
		}
	}
	public sealed class SanaeExhibitUDef : SampleCharacterExhibitTemplate
	{
		public override ExhibitConfig MakeConfig()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			ExhibitConfig defaultExhibitConfig = GetDefaultExhibitConfig();
			defaultExhibitConfig.Value1 = 10;
			ManaGroup value = default(ManaGroup);
			((ManaGroup)(ref value)).Blue = 1;
			defaultExhibitConfig.Mana = value;
			defaultExhibitConfig.BaseManaColor = (ManaColor)2;
			defaultExhibitConfig.Keywords = (Keyword)512;
			return defaultExhibitConfig;
		}
	}
	[EntityLogic(typeof(SanaeExhibitUDef))]
	public sealed class SanaeExhibitU : ShiningExhibit
	{
		protected override void OnEnterBattle()
		{
			((Exhibit)this).ReactBattleEvent<UsUsingEventArgs>(((Exhibit)this).Battle.UsUsed, (EventSequencedReactor<UsUsingEventArgs>)OnUsUsed);
		}

		private IEnumerable<BattleAction> OnUsUsed(UsUsingEventArgs args)
		{
			<>n__0();
			yield return (BattleAction)new CastBlockShieldAction((Unit)(object)((Exhibit)this).Owner, (Unit)(object)((Exhibit)this).Owner, ((Exhibit)this).Value1, 0, (BlockShieldType)1, true);
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((Exhibit)this).NotifyActivating();
		}
	}
	public sealed class SanaeExhibitWDef : SampleCharacterExhibitTemplate
	{
		public override ExhibitConfig MakeConfig()
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			ExhibitConfig defaultExhibitConfig = GetDefaultExhibitConfig();
			defaultExhibitConfig.Value1 = 2;
			ManaGroup value = default(ManaGroup);
			((ManaGroup)(ref value)).White = 1;
			defaultExhibitConfig.Mana = value;
			defaultExhibitConfig.BaseManaColor = (ManaColor)1;
			defaultExhibitConfig.RelativeEffects = new List<string> { "AmuletForCard" };
			return defaultExhibitConfig;
		}
	}
	[EntityLogic(typeof(SanaeExhibitWDef))]
	public sealed class SanaeExhibitW : ShiningExhibit
	{
		protected override void OnEnterBattle()
		{
			((Exhibit)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnStarted);
		}

		private IEnumerable<BattleAction> OnPlayerTurnStarted(UnitEventArgs args)
		{
			if (((Unit)((Exhibit)this).Battle.Player).TurnCounter == 1)
			{
				<>n__0();
				yield return (BattleAction)(object)new ApplyStatusEffectAction<AmuletForCard>((Unit)(object)((Exhibit)this).Owner, (int?)((Exhibit)this).Value1, (int?)0, (int?)0, (int?)0, 0.2f, false);
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((Exhibit)this).NotifyActivating();
		}
	}
}
namespace Sanae_Kochiya.Cards.Template
{
	public class SampleCharacterCard : Card
	{
	}
	public static class CardIndexGenerator
	{
		private static int? initial_offset = null;

		private static HashSet<int> uniqueIds = new HashSet<int>();

		public const int milx1 = 1000000;

		public static HashSet<int> UniqueIds
		{
			get
			{
				if (uniqueIds == null)
				{
					uniqueIds = new HashSet<int>();
				}
				return uniqueIds;
			}
		}

		public static int Initial_offset
		{
			get
			{
				if (!initial_offset.HasValue)
				{
					int num = 0;
					if (UniqueTracker.Instance.configIndexes.TryGetValue(typeof(CardConfig), out var value))
					{
						num = value.Where((int i) => i >= 1000000).DefaultIfEmpty().Max() / 1000000;
					}
					num++;
					initial_offset = num * 1000000;
				}
				return initial_offset.Value;
			}
		}

		internal static void PromiseClearIndexSet()
		{
			EntityManager.AddPostLoadAction((Action)delegate
			{
				uniqueIds = null;
			}, (Assembly)null);
		}

		public static int GetUniqueIndex(CardConfig config)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: 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_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Expected I4, but got Unknown
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			int num = Initial_offset;
			num += ((!((Enum)config.Keywords).HasFlag((Enum)(object)(Keyword)2)) ? ((config.Rarity + 1) * 100000) : 0);
			int num2 = ((config.Colors.Count > 1) ? 9 : ((int)config.Colors[0]));
			num += num2 * 10000;
			int num3;
			if (!config.IsXCost && !((Enum)config.Keywords).HasFlag((Enum)(object)(Keyword)32768))
			{
				ManaGroup cost = config.Cost;
				if (((ManaGroup)(ref cost)).Total <= 9)
				{
					cost = config.Cost;
					num3 = ((ManaGroup)(ref cost)).Total;
					goto IL_00a8;
				}
			}
			num3 = 9;
			goto IL_00a8;
			IL_00a8:
			int num4 = num3;
			num += num4 * 1000;
			num += config.Type * 100;
			if (UniqueTracker.Instance.configIndexes.TryGetValue(typeof(CardConfig), out var value))
			{
				for (; value.Contains(num); num++)
				{
				}
			}
			return num;
		}
	}
	public abstract class SampleCharacterCardTemplate : CardTemplate
	{
		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(SampleCharacterDefaultConfig.GetDefaultID((EntityDefinition)(object)this));
		}

		public override CardImages LoadCardImages()
		{
			return SampleCharacterImageLoader.LoadCardImages((CardTemplate)(object)this);
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)SampleCharacterLocalization.CardsBatchLoc.AddEntity((EntityDefinition)(object)this);
		}

		public CardConfig GetCardDefaultConfig()
		{
			return SampleCharacterDefaultConfig.GetCardDefaultConfig();
		}
	}
}
namespace Sanae_Kochiya.Source.StatusEffects
{
	public sealed class AmuletForEnemyDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			return SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
		}

		public override Sprite LoadSprite()
		{
			return ResourceLoader.LoadSprite("Bulwark.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null);
		}
	}
	[EntityLogic(typeof(AmuletForEnemyDef))]
	public sealed class AmuletForEnemy : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToDiscard, (EventSequencedReactor<CardsEventArgs>)OnAddCard);
			((StatusEffect)this).ReactOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToHand, (EventSequencedReactor<CardsEventArgs>)OnAddCard);
			((StatusEffect)this).ReactOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToExile, (EventSequencedReactor<CardsEventArgs>)OnAddCard);
			((StatusEffect)this).ReactOwnerEvent<CardsAddingToDrawZoneEventArgs>(((StatusEffect)this).Battle.CardsAddedToDrawZone, (EventSequencedReactor<CardsAddingToDrawZoneEventArgs>)OnCardsAddedToDrawZone);
		}

		private IEnumerable<BattleAction> OnAddCard(CardsEventArgs args)
		{
			return ExileCard(args.Cards);
		}

		private IEnumerable<BattleAction> OnCardsAddedToDrawZone(CardsAddingToDrawZoneEventArgs args)
		{
			return ExileCard(args.Cards);
		}

		private IEnumerable<BattleAction> ExileCard(IEnumerable<Card> cards)
		{
			List<Card> candidate = cards.Where((Card card) => (int)card.CardType != 7 && (int)card.Zone != 4).ToList();
			if (candidate.Count == 0)
			{
				yield break;
			}
			if (((StatusEffect)this).Level < candidate.Count)
			{
				candidate.RemoveRange(((StatusEffect)this).Level, candidate.Count - ((StatusEffect)this).Level);
			}
			<>n__0();
			if (((Unit)((StatusEffect)this).Battle.Player).HasStatusEffect<RainbowMarketSe>())
			{
				foreach (Card card2 in candidate)
				{
					yield return (BattleAction)new MoveCardAction(card2, (CardZone)4);
				}
			}
			else
			{
				yield return (BattleAction)new ExileManyCardAction((IEnumerable<Card>)candidate);
			}
			((StatusEffect)this).Level = ((StatusEffect)this).Level - candidate.Count;
			if (((StatusEffect)this).Level <= 0)
			{
				yield return (BattleAction)(object)new ApplyStatusEffectAction<AmuletForEnemyHint>(((StatusEffect)this).Owner, (int?)0, (int?)0, (int?)0, (int?)0, 0.2f, true);
				yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class AmuletForEnemyHintDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			return SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
		}

		public override Sprite LoadSprite()
		{
			return ResourceLoader.LoadSprite("BulwarkHint.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null);
		}
	}
	[EntityLogic(typeof(AmuletForEnemyHintDef))]
	public sealed class AmuletForEnemyHint : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<StatusEffectApplyEventArgs>(((StatusEffect)this).Owner.StatusEffectAdded, (EventSequencedReactor<StatusEffectApplyEventArgs>)OnStatusEffectAdded);
		}

		private IEnumerable<BattleAction> OnStatusEffectAdded(StatusEffectApplyEventArgs args)
		{
			if (args.Effect is AmuletForEnemy)
			{
				yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
			}
		}
	}
	public sealed class NextTurnLoseFireDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)1;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(NextTurnLoseFireDef))]
	public sealed class NextTurnLoseFire : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnTurnStarted);
		}

		private IEnumerable<BattleAction> OnTurnStarted(UnitEventArgs args)
		{
			if (!((StatusEffect)this).Battle.BattleShouldEnd)
			{
				<>n__0();
				yield return ((StatusEffect)this).DebuffAction<FirepowerNegative>(((StatusEffect)this).Owner, ((StatusEffect)this).Level, 0, 0, 0, true, 0.1f);
				yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class NextTurnLosePowerDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)2;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(NextTurnLosePowerDef))]
	public sealed class NextTurnLosePower : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnTurnStarted);
		}

		private IEnumerable<BattleAction> OnTurnStarted(UnitEventArgs args)
		{
			if (!((StatusEffect)this).Battle.BattleShouldEnd)
			{
				<>n__0();
				yield return (BattleAction)new LosePowerAction(((StatusEffect)this).Level);
				yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class OmikujiBonusSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			return SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
		}
	}
	[EntityLogic(typeof(OmikujiBonusSeDef))]
	public sealed class OmikujiBonusSe : StatusEffect
	{
	}
	public sealed class SanaeAttackBlockSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			return SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
		}
	}
	[EntityLogic(typeof(SanaeAttackBlockSeDef))]
	public sealed class SanaeAttackBlockSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnEnding, (EventSequencedReactor<UnitEventArgs>)OnTurnEnding);
		}

		private IEnumerable<BattleAction> OnTurnEnding(GameEventArgs args)
		{
			<>n__0();
			int block = ((StatusEffect)this).Owner.Block;
			yield return (BattleAction)new LoseBlockShieldAction(((StatusEffect)this).Owner, block, 0, false);
			yield return (BattleAction)new DamageAction(((StatusEffect)this).Owner, (IEnumerable<Unit>)((StatusEffect)this).Battle.EnemyGroup.Alives, DamageInfo.Reaction((float)block, false), GunNameID.GetGunFromId(4900), (GunType)0);
			yield return (BattleAction)new CastBlockShieldAction(((StatusEffect)this).Owner, ((StatusEffect)this).Owner, new BlockInfo(((StatusEffect)this).Level, (BlockShieldType)1), false);
			yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class SanaeBlockPowerSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			return SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
		}
	}
	[EntityLogic(typeof(SanaeBlockPowerSeDef))]
	public sealed class SanaeBlockPowerSe : StatusEffect
	{
		private bool GainedBlock;

		private bool GainedShield;

		protected override void OnAdded(Unit unit)
		{
			GainedBlock = false;
			GainedShield = false;
			((StatusEffect)this).HandleOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarting, (GameEventHandler<UnitEventArgs>)OnTurnStarting);
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnEnded, (EventSequencedReactor<UnitEventArgs>)OnTurnEnded);
			((StatusEffect)this).ReactOwnerEvent<BlockShieldEventArgs>(((StatusEffect)this).Owner.BlockShieldGained, (EventSequencedReactor<BlockShieldEventArgs>)OnBlockShieldGained);
		}

		private void OnTurnStarting(UnitEventArgs args)
		{
			GainedBlock = false;
			GainedShield = false;
		}

		private IEnumerable<BattleAction> OnTurnEnded(UnitEventArgs args)
		{
			if (GainedBlock && GainedShield)
			{
				<>n__0();
				yield return ((StatusEffect)this).BuffAction<Firepower>(((StatusEffect)this).Level, 0, 0, 0, 0.2f);
			}
		}

		private IEnumerable<BattleAction> OnBlockShieldGained(BlockShieldEventArgs args)
		{
			if (!GainedBlock && 0f < args.Block)
			{
				GainedBlock = true;
			}
			if (!GainedShield && 0f < args.Shield)
			{
				GainedShield = true;
			}
			yield break;
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class SanaeBlockShuffleSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			return SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
		}
	}
	[EntityLogic(typeof(SanaeBlockShuffleSeDef))]
	public sealed class SanaeBlockShuffleSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<GameEventArgs>(((StatusEffect)this).Battle.Reshuffling, (EventSequencedReactor<GameEventArgs>)Reshuffling);
		}

		private IEnumerable<BattleAction> Reshuffling(GameEventArgs args)
		{
			<>n__0();
			yield return (BattleAction)new CastBlockShieldAction(((StatusEffect)this).Owner, ((StatusEffect)this).Owner, ((StatusEffect)this).Level, 0, (BlockShieldType)1, true);
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class SanaeDrawTempSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			return SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
		}
	}
	[EntityLogic(typeof(SanaeDrawTempSeDef))]
	public sealed class SanaeDrawTempSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnTurnStarted);
		}

		private IEnumerable<BattleAction> OnTurnStarted(UnitEventArgs args)
		{
			DrawManyCardAction drawAction = new DrawManyCardAction(((StatusEffect)this).Level);
			yield return (BattleAction)(object)drawAction;
			IReadOnlyList<Card> drawnCards = drawAction.DrawnCards;
			if (drawnCards != null && drawnCards.Count > 1)
			{
				SelectCardInteraction interaction = new SelectCardInteraction(1, drawnCards.Count, (IEnumerable<Card>)drawnCards, (SelectedCardHandling)0);
				yield return (BattleAction)new InteractionAction((Interaction)(object)interaction, false);
				IReadOnlyList<Card> discard = interaction.SelectedCards;
				if (discard.Count > 0)
				{
					yield return (BattleAction)new DiscardManyAction((IEnumerable<Card>)discard);
				}
			}
			else if (drawnCards != null && drawnCards.Count == 1)
			{
				yield return (BattleAction)new DiscardAction(drawnCards.FirstOrDefault());
			}
		}
	}
	public sealed class SanaeGrazeWardSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			return SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
		}
	}
	[EntityLogic(typeof(SanaeGrazeWardSeDef))]
	public sealed class SanaeGrazeWardSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<DamageEventArgs>(((Unit)((StatusEffect)this).Battle.Player).DamageReceived, (EventSequencedReactor<DamageEventArgs>)OnPlayerDamageReceived);
		}

		private IEnumerable<BattleAction> OnPlayerDamageReceived(DamageEventArgs args)
		{
			DamageInfo damageInfo = args.DamageInfo;
			if (((DamageInfo)(ref damageInfo)).IsGrazed)
			{
				<>n__0();
				yield return (BattleAction)(object)new ApplyStatusEffectAction<AmuletForCard>(((StatusEffect)this).Owner, (int?)((StatusEffect)this).Level, (int?)null, (int?)null, (int?)null, 0f, true);
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class SanaeKanakoFriendSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			return SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
		}
	}
	[EntityLogic(typeof(SanaeKanakoFriendSeDef))]
	public sealed class SanaeKanakoFriendSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UsUsingEventArgs>(((StatusEffect)this).Battle.UsUsed, (EventSequencedReactor<UsUsingEventArgs>)OnUsUsed);
		}

		private IEnumerable<BattleAction> OnUsUsed(UsUsingEventArgs args)
		{
			yield return (BattleAction)new ApplyStatusEffectAction(typeof(Firepower), (Unit)(object)((StatusEffect)this).Battle.Player, (int?)((StatusEffect)this).Level, (int?)0, (int?)0, (int?)0, 0.2f, true);
			yield return (BattleAction)new ApplyStatusEffectAction(typeof(Graze), (Unit)(object)((StatusEffect)this).Battle.Player, (int?)((StatusEffect)this).Level, (int?)0, (int?)0, (int?)0, 0.2f, true);
		}
	}
	public sealed class SanaeOrderShuffleSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(SanaeOrderShuffleSeDef))]
	public sealed class SanaeOrderShuffleSe : StatusEffect
	{
		public ManaGroup Mana
		{
			get
			{
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				//IL_0012: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				ManaGroup result = default(ManaGroup);
				((ManaGroup)(ref result)).Philosophy = 1;
				return result;
			}
		}

		protected override void OnAdded(Unit unit)
		{
			GameRunController gameRun = ((GameEntity)this).GameRun;
			int canViewDrawZoneActualOrder = gameRun.CanViewDrawZoneActualOrder + 1;
			gameRun.CanViewDrawZoneActualOrder = canViewDrawZoneActualOrder;
			((StatusEffect)this).ReactOwnerEvent<CardUsingEventArgs>(((StatusEffect)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed);
			((StatusEffect)this).ReactOwnerEvent<GameEventArgs>(((StatusEffect)this).Battle.BattleEnding, (EventSequencedReactor<GameEventArgs>)OnBattleEnding);
		}

		private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs args)
		{
			if ((int)args.Card.CardType != 3 && args.Card != Library.CreateCard(typeof(SanaeOrderShuffle)))
			{
				yield return (BattleAction)new ReshuffleAction();
				if ((int)args.Card.CardType == 4)
				{
					yield return (BattleAction)new GainManaAction(Mana);
					yield return (BattleAction)new DrawCardAction();
				}
			}
		}

		private IEnumerable<BattleAction> OnBattleEnding(GameEventArgs args)
		{
			if (((Unit)((StatusEffect)this).Battle.Player).IsAlive)
			{
				GameRunController gameRun = ((GameEntity)this).GameRun;
				int num = gameRun.CanViewDrawZoneActualOrder - 1;
				gameRun.CanViewDrawZoneActualOrder = num;
			}
			yield break;
		}
	}
	public sealed class SanaePowerPotatoSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			return SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
		}
	}
	[EntityLogic(typeof(SanaePowerPotatoSeDef))]
	public sealed class SanaePowerPotatoSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<GameEventArgs>(((StatusEffect)this).Battle.BattleEnding, (EventSequencedReactor<GameEventArgs>)OnBattleEnding);
		}

		private IEnumerable<BattleAction> OnBattleEnding(GameEventArgs args)
		{
			if (((Unit)((StatusEffect)this).Battle.Player).IsAlive)
			{
				<>n__0();
				((GameEntity)this).GameRun.GainPower(((StatusEffect)this).Level, false);
			}
			yield break;
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class SanaeSpellDamageSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			return SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
		}
	}
	[EntityLogic(typeof(SanaeSpellDamageSeDef))]
	public sealed class SanaeSpellDamageSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UsUsingEventArgs>(((StatusEffect)this).Battle.UsUsed, (EventSequencedReactor<UsUsingEventArgs>)OnUsUsed);
		}

		private IEnumerable<BattleAction> OnUsUsed(UsUsingEventArgs args)
		{
			for (int i = 0; i < ((StatusEffect)this).Level; i++)
			{
				yield return (BattleAction)new DamageAction(((StatusEffect)this).Owner, (Unit)(object)((StatusEffect)this).Battle.RandomAliveEnemy, DamageInfo.Attack(8f, false), GunNameID.GetGunFromId(14190), (GunType)0);
			}
		}
	}
	public sealed class SanaeSpellManaGreenSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			return SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
		}
	}
	[EntityLogic(typeof(SanaeSpellManaGreenSeDef))]
	public sealed class SanaeSpellManaGreenSe : StatusEffect
	{
		public ManaGroup Mana
		{
			get
			{
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				//IL_001c: Unknown result type (might be due to invalid IL or missing references)
				//IL_001f: Unknown result type (might be due to invalid IL or missing references)
				ManaGroup result = default(ManaGroup);
				((ManaGroup)(ref result)).Green = 1;
				((ManaGroup)(ref result)).Colorless = 1;
				return result;
			}
		}

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UsUsingEventArgs>(((StatusEffect)this).Battle.UsUsed, (EventSequencedReactor<UsUsingEventArgs>)OnUsUsed);
		}

		private IEnumerable<BattleAction> OnUsUsed(UsUsingEventArgs args)
		{
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).Green = ((StatusEffect)this).Level;
			((ManaGroup)(ref val)).Colorless = ((StatusEffect)this).Level;
			yield return (BattleAction)new GainManaAction(val);
		}
	}
	public sealed class SanaeSpellManaPhiloSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			return SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
		}
	}
	[EntityLogic(typeof(SanaeSpellManaPhiloSeDef))]
	public sealed class SanaeSpellManaPhiloSe : StatusEffect
	{
		public ManaGroup Mana
		{
			get
			{
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				//IL_001c: Unknown result type (might be due to invalid IL or missing references)
				//IL_001f: Unknown result type (might be due to invalid IL or missing references)
				ManaGroup result = default(ManaGroup);
				((ManaGroup)(ref result)).Green = 1;
				((ManaGroup)(ref result)).Philosophy = 1;
				return result;
			}
		}

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UsUsingEventArgs>(((StatusEffect)this).Battle.UsUsed, (EventSequencedReactor<UsUsingEventArgs>)OnUsUsed);
		}

		private IEnumerable<BattleAction> OnUsUsed(UsUsingEventArgs args)
		{
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).Green = ((StatusEffect)this).Level;
			((ManaGroup)(ref val)).Philosophy = ((StatusEffect)this).Level;
			yield return (BattleAction)new GainManaAction(val);
		}
	}
	public sealed class SanaeSpiritManaSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.IsStackable = false;
			defaultStatusEffectConfig.HasCount = true;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(SanaeSpiritManaSeDef))]
	public sealed class SanaeSpiritManaSe : 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)
		{
			if (!((StatusEffect)this).Battle.BattleShouldEnd)
			{
				int num = ((StatusEffect)this).Count - 1;
				((StatusEffect)this).Count = num;
				if (((StatusEffect)this).Count <= 0)
				{
					<>n__0();
					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);
					yield return (BattleAction)new AddCardsToHandAction((Card[])(object)new Card[1] { (Card)Library.CreateCard<WManaCard>() });
					yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
				}
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class SanaeStatusTalismanSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			return SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
		}
	}
	[EntityLogic(typeof(SanaeStatusTalismanSeDef))]
	public sealed class SanaeStatusTalismanSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnEnding, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnEnding);
		}

		private IEnumerable<BattleAction> OnPlayerTurnEnding(GameEventArgs args)
		{
			if (!((StatusEffect)this).Battle.BattleShouldEnd)
			{
				<>n__0();
				yield return (BattleAction)new AddCardsToDiscardAction((IEnumerable<Card>)Library.CreateCards<SanaeStatus>(((StatusEffect)this).Level, false), (AddCardsType)0);
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class SanaeWardTalismanSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			return SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
		}
	}
	[EntityLogic(typeof(SanaeWardTalismanSeDef))]
	public sealed class SanaeWardTalismanSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<StatusEffectApplyEventArgs>(((StatusEffect)this).Owner.StatusEffectAdded, (EventSequencedReactor<StatusEffectApplyEventArgs>)OnStatusEffectAdded);
			((StatusEffect)this).ReactOwnerEvent<UsUsingEventArgs>(((StatusEffect)this).Battle.UsUsed, (EventSequencedReactor<UsUsingEventArgs>)OnUsUsed);
		}

		private IEnumerable<BattleAction> OnStatusEffectAdded(StatusEffectApplyEventArgs args)
		{
			if (args.Effect is AmuletForCard)
			{
				yield return (BattleAction)new GainPowerAction(args.Effect.Level);
			}
		}

		private IEnumerable<BattleAction> OnUsUsed(UsUsingEventArgs args)
		{
			yield return (BattleAction)new AddCardsToDiscardAction((IEnumerable<Card>)Library.CreateCards<SanaeStatus>(((StatusEffect)this).Level, false), (AddCardsType)0);
		}
	}
	public class SampleCharacterStatusEffectTemplate : 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(SampleCharacterDefaultConfig.GetDefaultID((EntityDefinition)(object)this));
		}

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

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

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

		public static StatusEffectConfig GetDefaultStatusEffectConfig()
		{
			return SampleCharacterDefaultConfig.GetDefaultStatusEffectConfig();
		}
	}
	public sealed class TurnStartDontLoseManaDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = false;
			defaultStatusEffectConfig.HasDuration = true;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(TurnStartDontLoseManaDef))]
	public sealed class TurnStartDontLoseMana : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).HandleOwnerEvent<ManaEventArgs>(((StatusEffect)this).Battle.ManaLosing, (GameEventHandler<ManaEventArgs>)OnManaLosing);
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnTurnStarted);
		}

		private void OnManaLosing(ManaEventArgs args)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Invalid comparison between Unknown and I4
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			if ((int)((GameEventArgs)args).Cause == 13)
			{
				ManaGroup value = args.Value;
				if (!((ManaGroup)(ref value)).IsEmpty)
				{
					((StatusEffect)this).NotifyActivating();
					((GameEventArgs)args).CancelBy((GameEntity)(object)this);
				}
			}
		}

		private IEnumerable<BattleAction> OnTurnStarted(UnitEventArgs args)
		{
			((StatusEffect)this).Duration = ((StatusEffect)this).Duration - 1;
			if (((StatusEffect)this).Duration == 0)
			{
				yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
			}
		}
	}
}
namespace Sanae_Kochiya.Source.Localization
{
	public sealed class SampleCharacterLocalization
	{
		public static string Cards = "Cards";

		public static string Exhibits = "Exhibits";

		public static string EnemyUnit = "EnemyUnit";

		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 EnemyUnitBatchLoc = new BatchLocalization((IResourceSource)(object)BepinexPlugin.directorySource, typeof(EnemyUnitTemplate), EnemyUnit, (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);

		public static void Init()
		{
			CardsBatchLoc.DiscoverAndLoadLocFiles(Cards);
			ExhibitsBatchLoc.DiscoverAndLoadLocFiles(Exhibits);
			EnemyUnitBatchLoc.DiscoverAndLoadLocFiles(EnemyUnit);
			PlayerUnitBatchLoc.DiscoverAndLoadLocFiles(PlayerUnit);
			UnitModelBatchLoc.DiscoverAndLoadLocFiles(UnitModel);
			UltimateSkillsBatchLoc.DiscoverAndLoadLocFiles(UltimateSkills);
			StatusEffectsBatchLoc.DiscoverAndLoadLocFiles(StatusEffects);
		}
	}
}
namespace Sanae_Kochiya.Source.Loadouts
{
	public class SampleCharacterLoadouts
	{
		public static string UltimateSkillA = "SanaeUltW";

		public static string UltimateSkillB = "SanaeUltU";

		public static string ExhibitA = "SanaeExhibitW";

		public static string ExhibitB = "SanaeExhibitU";

		public static List<string> DeckA = new List<string> { "Shoot", "Shoot", "Boundary", "Boundary", "SanaeAttackW", "SanaeAttackU", "SanaeBlockG", "SanaeBlockG", "SanaeBlockG", "SanaeStarterW" };

		public static List<string> DeckB = new List<string> { "Shoot", "Shoot", "Boundary", "Boundary", "SanaeAttackW", "SanaeAttackU", "SanaeBlockG", "SanaeBlockG", "SanaeBlockG", "SanaeStarterU" };

		public static PlayerUnitConfig playerUnitConfig;

		static SampleCharacterLoadouts()
		{
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Expected O, but got Unknown
			string modUniqueID = BepinexPlugin.modUniqueID;
			int? num = 0;
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).White = 1;
			((ManaGroup)(ref val)).Blue = 1;
			((ManaGroup)(ref val)).Black = 0;
			((ManaGroup)(ref val)).Red = 0;
			((ManaGroup)(ref val)).Green = 2;
			((ManaGroup)(ref val)).Colorless = 0;
			((ManaGroup)(ref val)).Philosophy = 0;
			playerUnitConfig = new PlayerUnitConfig(modUniqueID, 8, 0, num, "", "#28e25a", true, 80, val, 60, 0, UltimateSkillA, UltimateSkillB, ExhibitA, ExhibitB, (IReadOnlyList<string>)DeckA, (IReadOnlyList<string>)DeckB, 2, 3);
		}
	}
}
namespace Sanae_Kochiya.Source.Exhibits
{
	public sealed class SanaeClayVolcanoDef : SampleCharacterExhibitTemplate
	{
		public override ExhibitConfig MakeConfig()
		{
			ExhibitConfig defaultExhibitConfig = GetDefaultExhibitConfig();
			defaultExhibitConfig.IsPooled = true;
			defaultExhibitConfig.Appearance = (AppearanceType)0;
			defaultExhibitConfig.Owner = "";
			defaultExhibitConfig.LosableType = (ExhibitLosableType)0;
			defaultExhibitConfig.Rarity = (Rarity)0;
			defaultExhibitConfig.BaseManaColor = null;
			defaultExhibitConfig.BaseManaAmount = 0;
			defaultExhibitConfig.Value1 = 2;
			defaultExhibitConfig.RelativeEffects = new List<string> { "TempSpirit" };
			return defaultExhibitConfig;
		}
	}
	[EntityLogic(typeof(SanaeClayVolcanoDef))]
	public sealed class SanaeClayVolcano : Exhibit
	{
		private class SanaeClayVolcanoWeighter : IExhibitWeighter
		{
			public float WeightFor(Type type, GameRunController gameRun)
			{
				if (!BepinexPlugin.modExclusiveConfig.Value)
				{
					return 0f;
				}
				return 1.15f;
			}
		}

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

		private IEnumerable<BattleAction> OnReshuffled(GameEventArgs args)
		{
			<>n__0();
			yield return (BattleAction)(object)new ApplyStatusEffectAction<TempSpirit>((Unit)(object)((Exhibit)this).Owner, (int?)((Exhibit)this).Value1, (int?)0, (int?)0, (int?)0, 0.2f, true);
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((Exhibit)this).NotifyActivating();
		}
	}
	public sealed class SanaeExpiredCouponDef : SampleCharacterExhibitTemplate
	{
		public override ExhibitConfig MakeConfig()
		{
			ExhibitConfig defaultExhibitConfig = GetDefaultExhibitConfig();
			defaultExhibitConfig.IsPooled = true;
			defaultExhibitConfig.Appearance = (AppearanceType)0;
			defaultExhibitConfig.Owner = "";
			defaultExhibitConfig.LosableType = (ExhibitLosableType)0;
			defaultExhibitConfig.Rarity = (Rarity)0;
			defaultExhibitConfig.BaseManaColor = null;
			defaultExhibitConfig.BaseManaAmount = 0;
			defaultExhibitConfig.Value1 = 20;
			defaultExhibitConfig.Keywords = (Keyword)16384;
			return defaultExhibitConfig;
		}
	}
	[EntityLogic(typeof(SanaeExpiredCouponDef))]
	public sealed class SanaeExpiredCoupon : Exhibit
	{
		private class SanaeExpiredCouponWeighter : IExhibitWeighter
		{
			public float WeightFor(Type type, GameRunController gameRun)
			{
				if (!BepinexPlugin.modExclusiveConfig.Value)
				{
					return 0f;
				}
				return 1.15f;
			}
		}

		protected override void OnEnterBattle()
		{
			((Exhibit)this).Active = true;
			((Exhibit)this).ReactBattleEvent<UsUsingEventArgs>(((Exhibit)this).Battle.UsUsed, (EventSequencedReactor<UsUsingEventArgs>)OnUsUsed);
		}

		private IEnumerable<BattleAction> OnUsUsed(UsUsingEventArgs args)
		{
			if (((Exhibit)this).Active)
			{
				<>n__0();
				((Exhibit)this).Active = false;
				yield return (BattleAction)new GainPowerAction(((Exhibit)this).Value1);
			}
		}

		protected override void OnLeaveBattle()
		{
			((Exhibit)this).Active = false;
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((Exhibit)this).NotifyActivating();
		}
	}
	public sealed class SanaeLibraryCardDef : SampleCharacterExhibitTemplate
	{
		public override ExhibitConfig MakeConfig()
		{
			ExhibitConfig defaultExhibitConfig = GetDefaultExhibitConfig();
			defaultExhibitConfig.IsPooled = true;
			defaultExhibitConfig.Appearance = (AppearanceType)0;
			defaultExhibitConfig.Owner = "";
			defaultExhibitConfig.LosableType = (ExhibitLosableType)0;
			defaultExhibitConfig.Rarity = (Rarity)0;
			defaultExhibitConfig.BaseManaColor = null;
			defaultExhibitConfig.BaseManaAmount = 0;
			defaultExhibitConfig.Value1 = 2;
			defaultExhibitConfig.RelativeEffects = new List<string> { "AmuletForCard" };
			return defaultExhibitConfig;
		}
	}
	[EntityLogic(typeof(SanaeLibraryCardDef))]
	public sealed class SanaeLibraryCard : Exhibit
	{
		private class SanaeLibraryCardWeighter : IExhibitWeighter
		{
			public float WeightFor(Type type, GameRunController gameRun)
			{
				if (!BepinexPlugin.modExclusiveConfig.Value)
				{
					return 0f;
				}
				return 1.15f;
			}
		}

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

		private void OnCardUsed(CardUsingEventArgs args)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Invalid comparison between Unknown and I4
			if ((int)args.Card.CardType == 1)
			{
				((Exhibit)this).Active = false;
			}
		}

		private IEnumerable<BattleAction> OnPlayerTurnStarted(UnitEventArgs args)
		{
			if (((Exhibit)this).Active)
			{
				<>n__0();
				yield return (BattleAction)(object)new ApplyStatusEffectAction<AmuletForCard>((Unit)(object)((Exhibit)this).Owner, (int?)((Exhibit)this).Value1, (int?)0, (int?)0, (int?)0, 0.2f, true);
			}
			((Exhibit)this).Active = true;
		}

		protected override void OnLeaveBattle()
		{
			((Exhibit)this).Active = false;
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((Exhibit)this).NotifyActivating();
		}
	}
}
namespace Sanae_Kochiya.Source.Config
{
	public sealed class SampleCharacterDefaultConfig
	{
		private static readonly string OwnerName = BepinexPlugin.modUniqueID;

		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_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: 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>(), OwnerName, "", "", 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");
		}

		public static UltimateSkillConfig GetDefaultUltConfig()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Expected O, but got Unknown
			return new UltimateSkillConfig("", 10, 100, 100, 2, (UsRepeatableType)1, 1, 0, 0, (Keyword)256, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>());
		}
	}
}
namespace Sanae_Kochiya.Source.Cards.Uncommon
{
	public sealed class SanaeAmuletTalismanDef : SampleCharacterCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Colors = new List<ManaColor>
			{
				(ManaColor)1,
				(ManaColor)5
			};
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 3;
			((ManaGroup)(ref val)).White = 1;
			((ManaGroup)(ref val)).Green = 1;
			cardDefaultConfig.Cost = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 4;
			((ManaGroup)(ref val)).Hybrid = 1;
			((ManaGroup)(ref val)).HybridColor = 3;
			cardDefaultConfig.UpgradedCost = val;
			cardDefaultConfig.Rarity = (Rarity)1;
			cardDefaultConfig.Type = (CardType)3;
			cardDefaultConfig.TargetType = (TargetType)4;
			cardDefaultConfig.Value1 = 15;
			cardDefaultConfig.UpgradedValue1 = 20;
			cardDefaultConfig.Value2 = 4;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 1;
			cardDefaultConfig.Mana = val;
			cardDefaultConfig.RelativeKeyword = (Keyword)1099511644160L;
			cardDefaultConfig.UpgradedRelativeKeyword = (Keyword)1099511644160L;
			cardDefaultConfig.RelativeEffects = new List<string> { "Amulet" };
			cardDefaultConfig.UpgradedRelativeEffects = new List<string> { "Amulet" };
			cardDefaultConfig.RelativeCards = new List<string> { "SanaeStatus" };
			cardDefaultConfig.UpgradedRelativeCards = new List<string> { "SanaeStatus" };
			cardDefaultConfig.Illustrator = "";
			cardDefaultConfig.Index = CardIndexGenerator.Initial_offset + 275301;
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(SanaeAmuletTalismanDef))]
	public sealed class SanaeAmuletTalisman : SampleCharacterCard
	{
		protected override ManaGroup AdditionalCost
		{
			get
			{
				//IL_0025: Unknown result type (might be due to invalid IL or missing references)
				//IL_002b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0030: Unknown result type (might be due to invalid IL or missing references)
				//IL_0010: Unknown result type (might be due to invalid IL or missing references)
				//IL_001c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0021: Unknown result type (might be due to invalid IL or missing references)
				//IL_0033: Unknown result type (might be due to invalid IL or missing references)
				if (((Card)this).Battle != null)
				{
					return ((Card)this).Mana * -AmuletCount;
				}
				return ((Card)this).Mana * 0;
			}
		}

		private int AmuletCount
		{
			get
			{
				if (((Card)this).Battle != null && ((Unit)((Card)this).Battle.Player).HasStatusEffect<Amulet>())
				{
					return ((StatusEffect)((Unit)((Card)this).Battle.Player).GetStatusEffect<Amulet>()).Level;
				}
				return 0;
			}
		}

		protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			yield return (BattleAction)new GainPowerAction(((Card)this).Value1);
			yield return (BattleAction)new AddCardsToDrawZoneAction((IEnumerable<Card>)Library.CreateCards<SanaeStatus>(((Card)this).Value2, false), (DrawZoneTarget)2, (AddCardsType)0);
		}
	}
	public sealed class SanaeAttackBlockDef : SampleCharacterCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.GunName = GunNameID.GetGunFromId(4900);
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)1 };
			ManaGroup cost = default(ManaGroup);
			((ManaGroup)(ref cost)).Any = 1;
			cardDefaultConfig.Cost = cost;
			cardDefaultConfig.Rarity = (Rarity)1;
			cardDefaultConfig.Type = (CardType)2;
			cardDefaultConfig.TargetType = (TargetType)2;
			cardDefaultConfig.Block = 2;
			cardDefaultConfig.UpgradedBlock = 16;
			cardDefaultConfig.RelativeKeyword = (Keyword)512;
			cardDefaultConfig.Illustrator = "";
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(SanaeAttackBlockDef))]
	public sealed class SanaeAttackBlock : SampleCharacterCard
	{
		protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			if (((Unit)((Card)this).Battle.Player).Block > 0)
			{
				SanaeAttackBlock sanaeAttackBlock = this;
				BlockInfo val = <>n__0();
				yield return ((Card)sanaeAttackBlock).BuffAction<SanaeAttackBlockSe>(((BlockInfo)(ref val)).Block, 0, 0, 0, 0.2f);
			}
			else
			{
				yield return ((Card)this).DefenseAction(false);
			}
			yield return (BattleAction)new RequestEndPlayerTurnAction();
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private BlockInfo <>n__0()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return ((Card)this).Block;
		}
	}
	public sealed class SanaeAttackCopyDef : SampleCharacterCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.GunName = GunNameID.GetGunFromId(4712);
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)2 };
			cardDefaultConfig.Cost = default(ManaGroup);
			cardDefaultConfig.Rarity = (Rarity)1;
			cardDefaultConfig.Type = (CardType)1;
			cardDefaultConfig.TargetType = (TargetType)1;
			cardDefaultConfig.Damage = 6;
			cardDefaultConfig.UpgradedDamage = 8;
			cardDefaultConfig.Keywords = (Keyword)33554432;
			cardDefaultConfig.UpgradedKeywords = (Keyword)41943040;
			cardDefaultConfig.RelativeKeyword = (Keyword)35184372154368L;
			cardDefaultConfig.UpgradedRelativeKeyword = (Keyword)35184372154368L;
			cardDefaultConfig.Illustrator = "";
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(SanaeAttackCopyDef))]
	public sealed class SanaeAttackCopy : SampleCharacterCard
	{
		protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			yield return ((Card)this).AttackAction(selector, (GunPair)null);
			Card card = ((Card)this).CloneBattleCard();
			card.IsExile = true;
			yield return (BattleAction)new AddCardsToDrawZoneAction((IEnumerable<Card>)(object)new Card[1] { card }, (DrawZoneTarget)0, (AddCardsType)0);
		}
	}
	public sealed class SanaeAttackExpelDef : SampleCharacterCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.GunName = GunNameID.GetGunFromId(12210);
			cardDefaultConfig.GunNameBurst = GunNameID.GetGunFromId(12211);
			cardDefaultConfig.Colors = new List<ManaColor>
			{
				(ManaColor)2,
				(ManaColor)5
			};
			ManaGroup cost = default(ManaGroup);
			((ManaGroup)(ref cost)).Any = 2;
			((ManaGroup)(ref cost)).Blue = 1;
			((ManaGroup)(ref cost)).Green = 1;
			cardDefaultConfig.Cost = cost;
			cardDefaultConfig.Rarity = (Rarity)1;
			cardDefaultConfig.Type = (CardType)1;
			cardDefaultConfig.TargetType = (TargetType)2;
			cardDefaultConfig.Damage = 19;
			cardDefaultConfig.UpgradedDamage = 25;
			cardDefaultConfig.Value1 = 14;
			cardDefaultConfig.UpgradedValue1 = 20;
			cardDefaultConfig.Value2 = 5;
			cardDefaultConfig.Keywords = (Keyword)256;
			cardDefaultConfig.UpgradedKeywords = (Keyword)256;
			cardDefaultConfig.RelativeKeyword = (Keyword)274877923328L;
			cardDefaultConfig.UpgradedRelativeKeyword = (Keyword)274877923328L;
			cardDefaultConfig.Illustrator = "";
			cardDefaultConfig.Index = CardIndexGenerator.Initial_offset + 284101;
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(SanaeAttackExpelDef))]
	public sealed class SanaeAttackExpel : SampleCharacterCard
	{
		protected override void OnEnterBattle(BattleController battle)
		{
			((Card)this).ReactBattleEvent<DieEventArgs>(((Card)this).Battle.EnemyDied, (EventSequencedReactor<DieEventArgs>)OnEnemyDied);
		}

		private IEnumerable<BattleAction> OnEnemyDied(DieEventArgs args)
		{
			if (args.DieSource == this && !args.Unit.HasStatusEffect<Servant>())
			{
				yield return (BattleAction)new GainPowerAction(((Card)this).Value1);
			}
		}

		protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			yield return ((Card)this).AttackAction(selector, (GunPair)null);
			yield return (BattleAction)new GainPowerAction(((Card)this).Value2);
		}
	}
	public sealed class SanaeAttackRandomDef : SampleCharacterCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_0041: 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_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.GunName = GunNameID.GetGunFromId(14070);
			cardDefaultConfig.GunNameBurst = GunNameID.GetGunFromId(14071);
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)1 };
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 2;
			((ManaGroup)(ref val)).White = 1;
			cardDefaultConfig.Cost = val;
			cardDefaultConfig.Rarity = (Rarity)1;
			cardDefaultConfig.Type = (CardType)1;
			cardDefaultConfig.TargetType = (TargetType)3;
			cardDefaultConfig.Damage = 12;
			cardDefaultConfig.UpgradedDamage = 10;
			cardDefaultConfig.Value1 = 2;
			cardDefaultConfig.UpgradedValue1 = 3;
			cardDefaultConfig.Value2 = 2;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).White = 2;
			((ManaGroup)(ref val)).Philosophy = 1;
			cardDefaultConfig.Mana = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Philosophy = 3;
			cardDefaultConfig.UpgradedMana = val;
			cardDefaultConfig.RelativeKeyword = (Keyword)2048;
			cardDefaultConfig.UpgradedRelativeKeyword = (Keyword)2048;
			cardDefaultConfig.RelativeCards = new List<string> { "Chunguang" };
			cardDefaultConfig.UpgradedRelativeCards = new List<string> { "Chunguang" };
			cardDefaultConfig.Illustrator = "";
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(SanaeAttackRandomDef))]
	public sealed class SanaeAttackRandom : SampleCharacterCard
	{
		protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			List<SanaeAttackRandom> list = Library.CreateCards<SanaeAttackRandom>(2, ((Card)this).IsUpgraded).ToList();
			SanaeAttackRandom first = list[0];
			SanaeAttackRandom sanaeAttackRandom = list[1];
			((Card)first).ChoiceCardIndicator = 1;
			((Card)sanaeAttackRandom).ChoiceCardIndicator = 2;
			((Card)first).SetBattle(((Card)this).Battle);
			((Card)sanaeAttackRandom).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);
			((Card)this).CardGuns = new Guns(((Card)this).GunName, ((Card)this).Value1, true);
			foreach (GunPair gunPair in ((Card)this).CardGuns.GunPairs)
			{
				yield return ((Card)this).AttackAction(selector, gunPair);
			}
			if (interaction.SelectedCard == first)
			{
				yield return (BattleAction)new AddCardsToDrawZoneAction((IEnumerable<Card>)Library.CreateCards<Chunguang>(((Card)this).Value2, false), (DrawZoneTarget)0, (AddCardsType)0);
				yield return (BattleAction)new GainManaAction(((Card)this).Mana);
			}
		}
	}
	public sealed class SanaeAttackRebuffDef : SampleCharacterCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.GunName = GunNameID.GetGunFromId(25050);
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)5 };
			ManaGroup cost = default(ManaGroup);
			((ManaGroup)(ref cost)).Any = 2;
			((ManaGroup)(ref cost)).Green = 1;
			cardDefaultConfig.Cost = cost;
			cardDefaultConfig.Rarity = (Rarity)1;
			cardDefaultConfig.Type = (CardType)1;
			cardDefaultConfig.TargetType = (TargetType)2;
			cardDefaultConfig.Damage = 17;
			cardDefaultConfig.UpgradedDamage = 23;
			cardDefaultConfig.Value1 = 2;
			cardDefaultConfig.UpgradedValue1 = 3;
			cardDefaultConfig.RelativeEffects = new List<string> { "Amulet" };
			cardDefaultConfig.UpgradedRelativeEffects = new List<string> { "Amulet" };
			cardDefaultConfig.Illustrator = "";
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(SanaeAttackRebuffDef))]
	public sealed class SanaeAttackRebuff : SampleCharacterCard
	{
		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)
			bool rebuff = false;
			EnemyUnit[] enemies = selector.GetEnemies(((Card)this).Battle);
			EnemyUnit[] array = enemies;
			foreach (EnemyUnit enemy in array)
			{
				foreach (Intention i in enemy.Intentions)
				{
					if (i is NegativeEffectIntention)
					{
						rebuff = true;
					}
				}
			}
			yield return ((Card)this).AttackAction(selector, (GunPair)null);
			if (rebuff)
			{
				yield return ((Card)this).BuffAction<Amulet>(((Card)this).Value1, 0, 0, 0, 0.2f);
			}
		}
	}
	public sealed class SanaeBlockManaDef : SampleCharacterCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Colors = new List<ManaColor>
			{
				(ManaColor)2,
				(ManaColor)5
			};
			ManaGroup cost = default(ManaGroup);
			((ManaGroup)(ref cost)).Any = 1;
			((ManaGroup)(ref cost)).Hybrid = 1;
			((ManaGroup)(ref cost)).HybridColor = 6;
			cardDefaultConfig.Cost = cost;
			cardDefaultConfig.Rarity = (Rarity)1;
			cardDefaultConfig.Type = (CardType)2;
			cardDefaultConfig.TargetType = (TargetType)4;
			cardDefaultConfig.Block = 16;
			cardDefaultConfig.UpgradedBlock = 20;
			cardDefaultConfig.Value1 = 1;
			cardDefaultConfig.RelativeKeyword = (Keyword)17592186044928L;
			cardDefaultConfig.UpgradedRelativeKeyword = (Keyword)512;
			cardDefaultConfig.RelativeEffects = new List<string> { "TurnStartDontLoseMana" };
			cardDefaultConfig.UpgradedRelativeEffects = new List<string> { "TurnStartDontLoseMana" };
			cardDefaultConfig.Illustrator = "";
			cardDefaultConfig.Index = CardIndexGenerator.Initial_offset + 282201;
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(SanaeBlockManaDef))]
	public sealed class SanaeBlockMana : SampleCharacterCard
	{
		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);
			List<SanaeBlockMana> list = Library.CreateCards<SanaeBlockMana>(2, ((Card)this).IsUpgraded).ToList();
			SanaeBlockMana first = list[0];
			SanaeBlockMana sanaeBlockMana = list[1];
			((Card)first).ChoiceCardIndicator = 1;
			((Card)sanaeBlockMana).ChoiceCardIndicator = 2;
			((Card)first).SetBattle(((Card)this).Battle);
			((Card)sanaeBlockMana).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<TurnStartDontLoseBlock>(((Card)this).Value1, 0, 0, 0, 0.2f);
			}
			else
			{
				yield return ((Card)this).BuffAction<TurnStartDontLoseMana>(0, ((Card)this).Value1, 0, 0, 0.2f);
			}
			if (!((Card)this).IsUpgraded)
			{
				yield return (BattleAction)new LockRandomTurnManaAction(((Card)this).Value1);
			}
		}
	}
	public sealed class SanaeBlockRebuffDef : SampleCharacterCardTemplate
	{
		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)2 };
			ManaGroup cost = default(ManaGroup);
			((ManaGroup)(ref cost)).Any = 3;
			((ManaGroup)(ref cost)).Blue = 1;
			cardDefaultConfig.Cost = cost;
			cardDefaultConfig.Rarity = (Rarity)1;
			cardDefaultConfig.Type = (CardType)2;
			cardDefaultConfig.TargetType = (TargetType)4;
			cardDefaultConfig.Block = 11;
			cardDefaultConfig.UpgradedBlock = 16;
			cardDefaultConfig.Shield = 11;
			cardDefaultConfig.UpgradedShield = 16;
			cardDefaultConfig.Value1 = 1;
			cardDefaultConfig.Value2 = 2;
			cardDefaultConfig.RelativeKeyword = (Keyword)1536;
			cardDefaultConfig.UpgradedRelativeKeyword = (Keyword)1536;
			cardDefaultConfig.RelativeEffects = new List<string> { "Amulet", "Weak" };
			cardDefaultConfig.UpgradedRelativeEffects = new List<string> { "Amulet", "Weak" };
			cardDefaultConfig.Illustrator = "Xeno";
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(SanaeBlockRebuffDef))]
	public sealed class SanaeBlockRebuff : SampleCharacterCard
	{
		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);
			if (!((Unit)((Card)this).Battle.Player).HasStatusEffect<Amulet>())
			{
				yield break;
			}
			yield return ((Card)this).DebuffAction<Weak>((Unit)(object)((Card)this).Battle.Player, 0, ((Card)this).Value1, 0, 0, true, 0.2f);
			foreach (BattleAction item in ((Card)this).DebuffAction<Weak>((IEnumerable<Unit>)((Card)this).Battle.AllAliveEnemies, 0, ((Card)this).Value2, 0, 0, true, 0.1f))
			{
				yield return item;
			}
		}
	}
	public sealed class SanaeBlockShuffleDef : SampleCharacterCardTemplate
	{
		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)2 };
			ManaGroup cost = default(ManaGroup);
			((ManaGroup)(ref cost)).Any = 2;
			((ManaGroup)(ref cost)).Blue = 1;
			cardDefaultConfig.Cost = cost;
			cardDefaultConfig.Rarity = (Rarity)1;
			cardDefaultConfig.Type = (CardType)4;
			cardDefaultConfig.TargetType = (TargetType)4;
			cardDefaultConfig.Value1 = 10;
			cardDefaultConfig.UpgradedValue1 = 12;
			cardDefaultConfig.Scry = 3;
			cardDefaultConfig.UpgradedScry = 7;
			cardDefaultConfig.RelativeKeyword = (Keyword)68719477248L;
			cardDefaultConfig.UpgradedRelativeKeyword = (Keyword)68719477248L;
			cardDefaultConfig.Illustrator = "";
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(SanaeBlockShuffleDef))]
	public sealed class SanaeBlockShuffle : SampleCharacterCard
	{
		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<SanaeBlockShuffleSe>(((Card)this).Value1, 0, 0, 0, 0.2f);
			yield return (BattleAction)new ScryAction(((Card)this).Scry);
		}
	}
	public sealed class SanaeDazzleDashDef : SampleCharacterCardTemplate
	{
		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)5 };
			ManaGroup cost = default(ManaGroup);
			((ManaGroup)(ref cost)).Green = 2;
			cardDefaultConfig.Cost = cost;
			cardDefaultConfig.Rarity = (Rarity)1;
			cardDefaultConfig.Type = (CardType)4;
			cardDefaultConfig.TargetType = (TargetType)4;
			cardDefaultConfig.Value1 = 2;
			cardDefaultConfig.Value2 = 4;
			cardDefaultConfig.UpgradedValue2 = 9;
			cardDefaultConfig.RelativeKeyword = (Keyword)16384;
			cardDefaultConfig.UpgradedRelativeKeyword = (Keyword)16384;
			cardDefaultConfig.RelativeEffects = new List<string> { "Firepower" };
			cardDefaultConfig.UpgradedRelativeEffects = new List<string> { "Firepower" };
			cardDefaultConfig.Illustrator = "";
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(SanaeDazzleDashDef))]
	public sealed class SanaeDazzleDash : SampleCharacterCard
	{
		protected override void OnEnterBattle(BattleController battle)
		{
			((Card)this).ReactBattleEvent<UsUsingEventArgs>(((Card)this).Battle.UsUsed, (EventSequencedReactor<UsUsingEventArgs>)OnUsUsed);
			((Card)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Card)this).Battle.Player).TurnEnding, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnEnding);
		}

		private IEnumerable<BattleAction> OnUsUsed(UsUsingEventArgs args)
		{
			if ((int)((Card)this).Zone == 2)
			{
				((Card)this).NotifyActivating();
				((Card)this).DeltaValue1 = ((Card)this).DeltaValue1 + ((Card)this).Value1;
				((Card)this).DeltaValue2 = ((Card)this).DeltaValue2 + ((Card)this).Value2;
			}
			yield break;
		}

		private IEnumerable<BattleAction> OnPlayerTurnEnding(GameEventArgs args)
		{
			if (!((Card)this).Battle.BattleShouldEnd)
			{
				((Card)this).DeltaValue1 = 0;
				((Card)this).DeltaValue2 = 0;
			}
			yield break;
		}

		protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			yield return ((Card)this).BuffAction<Firepower>(((Card)this).Value1, 0, 0, 0, 0.2f);
			yield return (BattleAction)new GainPowerAction(((Card)this).Value2);
		}
	}
	public sealed class SanaeDrawAbilityDef : SampleCharacterCardTemplate
	{
		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)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)5 };
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 1;
			((ManaGroup)(ref val)).Green = 1;
			cardDefaultConfig.Cost = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 1;
			cardDefaultConfig.UpgradedCost = val;
			cardDefaultConfig.Rarity = (Rarity)1;
			cardDefaultConfig.Type = (CardType)3;
			cardDefaultConfig.TargetType = (TargetType)4;
			cardDefaultConfig.Value1 = 3;
			cardDefaultConfig.Value2 = 1;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 1;
			cardDefaultConfig.Mana = val;
			cardDefaultConfig.RelativeKeyword = (Keyword)1099511627780L;
			cardDefaultConfig.UpgradedRelativeKeyword = (Keyword)1099511627780L;
			cardDefaultConfig.Illustrator = "";
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(SanaeDrawAbilityDef))]
	public sealed class SanaeDrawAbility : SampleCharacterCard
	{
		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)
			DrawManyCardAction drawAction = new DrawManyCardAction(((Card)this).Value1);
			yield return (BattleAction)(object)drawAction;
			IReadOnlyList<Card> drawnCards = drawAction.DrawnCards;
			if (drawnCards == null || drawnCards.Count <= 0)
			{
				yield break;
			}
			foreach (Card card in drawnCards)
			{
				if ((int)card.CardType != 4)
				{
					continue;
				}
				card.NotifyActivating();
				if (((Card)this).IsUpgraded)
				{
					ManaGroup cost = card.Cost;
					if (((ManaGroup)(ref cost)).Amount > 0)
					{
						cost = card.Cost;
						ManaColor[] array = CollectionsExtensions.SampleManyOrAll<ManaColor>(((ManaGroup)(ref cost)).EnumerateComponents(), 1, ((GameEntity)this).GameRun.BattleRng);
						card.DecreaseTurnCost(ManaGroup.FromComponents((IEnumerable<ManaColor>)array));
					}
				}
				else
				{
					card.DecreaseTurnCost(((Card)this).Mana);
				}
			}
		}
	}
	public sealed class SanaeDrawSplashDef : SampleCharacterCardTemplate
	{
		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)
			//IL_0041: 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)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)2 };
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 4;
			((ManaGroup)(ref val)).Blue = 1;
			cardDefaultConfig.Cost = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 3;
			((ManaGroup)(ref val)).Blue = 1;
			cardDefaultConfig.UpgradedCost = val;
			cardDefaultConfig.Rarity = (Rarity)1;
			cardDefaultConfig.Type = (CardType)3;
			cardDefaultConfig.TargetType = (TargetType)4;
			cardDefaultConfig.Value1 = 5;
			cardDefaultConfig.UpgradedValue1 = 7;
			cardDefaultConfig.Value2 = 5;
			cardDefaultConfig.RelativeKeyword = (Keyword)33554432;
			cardDefaultConfig.UpgradedRelativeKeyword = (Keyword)33554432;
			cardDefaultConfig.RelativeCards = new List<string> { "UManaCard" };
			cardDefaultConfig.UpgradedRelativeCards = new List<string> { "UManaCard" };
			cardDefaultConfig.Illustrator = "";
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(SanaeDrawSplashDef))]
	public sealed class SanaeDrawSplash : SampleCharacterCard
	{
		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);
			Li