Decompiled source of MomijiMod v1.0.4

Momiji.dll

Decompiled 8 hours ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using AddWatermark;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Logging;
using Cysharp.Threading.Tasks;
using HarmonyLib;
using JetBrains.Annotations;
using LBoL.Base;
using LBoL.Base.Extensions;
using LBoL.ConfigData;
using LBoL.Core;
using LBoL.Core.Battle;
using LBoL.Core.Battle.BattleActions;
using LBoL.Core.Battle.Interactions;
using LBoL.Core.Cards;
using LBoL.Core.Intentions;
using LBoL.Core.Randoms;
using LBoL.Core.StatusEffects;
using LBoL.Core.Units;
using LBoL.EntityLib.Cards;
using LBoL.EntityLib.Cards.Character.Sakuya;
using LBoL.EntityLib.Exhibits;
using LBoL.EntityLib.StatusEffects.Basic;
using LBoL.EntityLib.StatusEffects.Cirno;
using LBoL.EntityLib.StatusEffects.Enemy;
using LBoL.EntityLib.StatusEffects.ExtraTurn;
using LBoL.Presentation;
using LBoLEntitySideloader;
using LBoLEntitySideloader.Attributes;
using LBoLEntitySideloader.Entities;
using LBoLEntitySideloader.Resource;
using LBoLEntitySideloader.Utils;
using Momiji.Source;
using Momiji.Source.GunName;
using Momiji.Source.ImageLoader;
using Momiji.Source.Localization;
using Momiji.Source.StatusEffects;
using Momiji.Source.Ultimate;
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("Momiji")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+37737b3fdc82abd14a32eee610e78b1f4b454e82")]
[assembly: AssemblyProduct("Momiji")]
[assembly: AssemblyTitle("Momiji")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Momiji
{
	[BepInPlugin("worldsoul.test.momiji.mod", "Momiji Mod", "0.0.1")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInProcess("LBoL.exe")]
	public class BepinexPlugin : BaseUnityPlugin
	{
		public static string modUniqueID = "Momiji";

		public static string playerName = "Momiji";

		public static bool useInGameModel = false;

		public static string modelName = "Youmu";

		public static bool modelIsFlipped = true;

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

		private static readonly Harmony harmony = PInfo.harmony;

		internal static ManualLogSource log;

		internal static TemplateSequenceTable sequenceTable = new TemplateSequenceTable(0);

		internal static IResourceSource embeddedSource = (IResourceSource)new EmbeddedSource(Assembly.GetExecutingAssembly());

		internal static DirectorySource directorySource = new DirectorySource("worldsoul.test.momiji.mod", "");

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

		private void OnDestroy()
		{
			if (harmony != null)
			{
				harmony.UnpatchSelf();
			}
		}
	}
	public static class PInfo
	{
		public const string GUID = "worldsoul.test.momiji.mod";

		public const string Name = "Momiji Mod";

		public const string version = "0.0.1";

		public static readonly Harmony harmony = new Harmony("worldsoul.test.momiji.mod");
	}
	public sealed class MomijiDef : PlayerUnitTemplate
	{
		[EntityLogic(typeof(MomijiDef))]
		public sealed class Momiji : PlayerUnit
		{
			protected override void OnEnterBattle(BattleController battle)
			{
				((Unit)this).OnEnterBattle(battle);
				if (((PlayerUnit)this).Us is RabiesBite rabiesBite)
				{
					rabiesBite.OnEnterBattle(battle);
				}
			}
		}

		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 Momiji.Source
{
	public sealed class AirCutterDef : SampleCharacterCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.GunName = GunNameID.GetGunFromId(400);
			cardDefaultConfig.IsPooled = false;
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)6 };
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 1;
			cardDefaultConfig.Cost = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 1;
			cardDefaultConfig.UpgradedCost = val;
			cardDefaultConfig.Rarity = (Rarity)0;
			cardDefaultConfig.Type = (CardType)1;
			cardDefaultConfig.TargetType = (TargetType)1;
			cardDefaultConfig.Damage = 8;
			cardDefaultConfig.UpgradedDamage = 10;
			cardDefaultConfig.Block = 8;
			cardDefaultConfig.UpgradedBlock = 10;
			cardDefaultConfig.Keywords = (Keyword)655360;
			cardDefaultConfig.UpgradedKeywords = (Keyword)655360;
			cardDefaultConfig.Illustrator = "マール";
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(AirCutterDef))]
	public sealed class AirCutter : 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)
			EnemyUnit selectedEnemy = selector.SelectedEnemy;
			yield return ((Card)this).AttackAction(selector, ((Card)this).GunName);
			yield return ((Card)this).DefenseAction(true);
			if (((Unit)((Card)this).Battle.Player).HasStatusEffect<HowlingMountainWindSe>() && ((Unit)selectedEnemy).HasStatusEffect<Vulnerable>())
			{
				yield return ((Card)this).AttackAction(selector, ((Card)this).GunName);
			}
		}
	}
	public sealed class MapleLeafDef : SampleCharacterCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: 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)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.GunName = GunNameID.GetGunFromId(400);
			cardDefaultConfig.IsPooled = false;
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)6 };
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 0;
			cardDefaultConfig.Cost = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 0;
			cardDefaultConfig.UpgradedCost = val;
			cardDefaultConfig.Rarity = (Rarity)0;
			cardDefaultConfig.Type = (CardType)3;
			cardDefaultConfig.TargetType = (TargetType)0;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Philosophy = 1;
			cardDefaultConfig.Mana = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Philosophy = 2;
			cardDefaultConfig.UpgradedMana = val;
			cardDefaultConfig.Value1 = 1;
			cardDefaultConfig.Keywords = (Keyword)2228224;
			cardDefaultConfig.UpgradedKeywords = (Keyword)2228224;
			cardDefaultConfig.Illustrator = "ramudayajirushi";
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(MapleLeafDef))]
	public sealed class MapleLeaf : 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 GainManaAction(((Card)this).Mana);
		}
	}
	public sealed class CleavingSwipeDef : SampleCharacterCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.GunName = GunNameID.GetGunFromId(400);
			cardDefaultConfig.Colors = new List<ManaColor>
			{
				(ManaColor)1,
				(ManaColor)4
			};
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).White = 1;
			((ManaGroup)(ref val)).Red = 1;
			cardDefaultConfig.Cost = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 2;
			cardDefaultConfig.UpgradedCost = val;
			cardDefaultConfig.Rarity = (Rarity)0;
			cardDefaultConfig.Type = (CardType)1;
			cardDefaultConfig.TargetType = (TargetType)2;
			cardDefaultConfig.Damage = 12;
			cardDefaultConfig.UpgradedDamage = 9;
			cardDefaultConfig.Value1 = 2;
			cardDefaultConfig.UpgradedValue1 = 2;
			cardDefaultConfig.Illustrator = "hide448";
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(CleavingSwipeDef))]
	public sealed class CleavingSwipe : 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, ((Card)this).GunName);
			if (((Card)this).IsUpgraded)
			{
				yield return ((Card)this).AttackAction(selector, ((Card)this).GunName);
			}
			if (!((Card)this).Battle.BattleShouldEnd)
			{
				yield return (BattleAction)new DrawManyCardAction(((Card)this).Value1);
			}
		}
	}
	public sealed class TrainingRecordDef : SampleCharacterCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.GunName = GunNameID.GetGunFromId(400);
			cardDefaultConfig.FindInBattle = false;
			cardDefaultConfig.ToolPlayableTimes = 4;
			cardDefaultConfig.Colors = new List<ManaColor>
			{
				(ManaColor)1,
				(ManaColor)4
			};
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 1;
			((ManaGroup)(ref val)).White = 1;
			((ManaGroup)(ref val)).Red = 1;
			cardDefaultConfig.Cost = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 2;
			((ManaGroup)(ref val)).Hybrid = 1;
			((ManaGroup)(ref val)).HybridColor = 2;
			cardDefaultConfig.UpgradedCost = val;
			cardDefaultConfig.Rarity = (Rarity)2;
			cardDefaultConfig.Type = (CardType)1;
			cardDefaultConfig.TargetType = (TargetType)1;
			cardDefaultConfig.Damage = 10;
			cardDefaultConfig.UpgradedDamage = 15;
			cardDefaultConfig.Value1 = 2;
			cardDefaultConfig.UpgradedValue1 = 3;
			cardDefaultConfig.Value2 = 1;
			cardDefaultConfig.UpgradedValue2 = 2;
			cardDefaultConfig.Keywords = (Keyword)131072;
			cardDefaultConfig.UpgradedKeywords = (Keyword)131072;
			cardDefaultConfig.Illustrator = "konabetate";
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(TrainingRecordDef))]
	public sealed class TrainingRecord : SampleCharacterCard
	{
		private int intention = 0;

		private bool Active
		{
			get
			{
				if (((Card)this).Battle != null)
				{
					return !((Card)this).Battle.BattleCardUsageHistory.Any((Card card) => card is TimeWalk);
				}
				return true;
			}
		}

		private static bool CheckForCardTypeAndIntention(Card card, int intention)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Invalid comparison between Unknown and I4
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Invalid comparison between Unknown and I4
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Invalid comparison between Unknown and I4
			if ((int)card.CardType == 1 && (intention == 1 || intention == 3 || intention == 5 || intention == 7))
			{
				return true;
			}
			if ((int)card.CardType == 2 && (intention == 2 || intention == 3 || intention == 6 || intention == 7))
			{
				return true;
			}
			if (((int)card.CardType == 4 || (int)card.CardType == 3) && intention >= 4)
			{
				return true;
			}
			return false;
		}

		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 (Active)
			{
				Card cardToUpgrade = null;
				EnemyUnit selectedEnemy = selector.SelectedEnemy;
				intention = IntentionCheck(selectedEnemy);
				IEnumerable<Card> eligibleCards = from c in ((GameEntity)this).GameRun.BaseDeck
					where c.CanUpgradeAndPositive
					where CheckForCardTypeAndIntention(c, intention)
					select c;
				if (eligibleCards.Count() > 0)
				{
					cardToUpgrade = CollectionsExtensions.Sample<Card>(eligibleCards, ((GameEntity)this).GameRun.GameRunEventRng);
				}
				Card cardInDeckToUpgrade = cardToUpgrade;
				if (cardInDeckToUpgrade != null)
				{
					((GameEntity)this).GameRun.UpgradeDeckCard(cardInDeckToUpgrade, false);
				}
				Card cardInBattleToUpgrade = (from c in ((Card)this).Battle.EnumerateAllCards()
					where c.CanUpgrade && c.InstanceId == cardInDeckToUpgrade.InstanceId
					select c).FirstOrDefault();
				if (cardInBattleToUpgrade != null)
				{
					yield return (BattleAction)new UpgradeCardAction(cardInBattleToUpgrade);
				}
			}
			yield return ((Card)this).AttackAction(selector, ((Card)this).GunName);
		}
	}
	public sealed class CollectingMomijiDef : 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)4 };
			ManaGroup cost = default(ManaGroup);
			((ManaGroup)(ref cost)).Red = 1;
			cardDefaultConfig.Cost = cost;
			cardDefaultConfig.Rarity = (Rarity)1;
			cardDefaultConfig.Type = (CardType)3;
			cardDefaultConfig.TargetType = (TargetType)0;
			cardDefaultConfig.Value1 = 2;
			cardDefaultConfig.UpgradedValue1 = 3;
			cardDefaultConfig.Illustrator = "en (shihi no utage)";
			cardDefaultConfig.RelativeCards = new List<string> { "MapleLeaf" };
			cardDefaultConfig.UpgradedRelativeCards = new List<string> { "MapleLeaf" };
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(CollectingMomijiDef))]
	public sealed class CollectingMomiji : 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 AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<MapleLeaf>(((Card)this).Value1, false), (AddCardsType)0);
		}
	}
	public sealed class SurgeofPowerDef : 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)
			//IL_00b4: 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)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)4 };
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 1;
			((ManaGroup)(ref val)).Red = 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)0;
			cardDefaultConfig.Value1 = 2;
			cardDefaultConfig.UpgradedValue1 = 2;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 0;
			cardDefaultConfig.Mana = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 0;
			cardDefaultConfig.UpgradedMana = val;
			cardDefaultConfig.Illustrator = "hara tamakita";
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(SurgeofPowerDef))]
	public sealed class SurgeofPower : 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).HasStatusEffect<SurgeofPowerSe>())
			{
				yield return (BattleAction)(object)new ApplyStatusEffectAction<SurgeofPowerSe>((Unit)(object)((Card)this).Battle.Player, (int?)1, (int?)0, (int?)0, (int?)0, 0.2f, true);
			}
			yield return (BattleAction)(object)new ApplyStatusEffectAction<SurgeofPowerSe>((Unit)(object)((Card)this).Battle.Player, (int?)((Card)this).Value1, (int?)0, (int?)0, (int?)0, 0.2f, true);
		}
	}
	public class SampleCharacterCard : Card
	{
		public int IntentionCheck(EnemyUnit enemyUnit)
		{
			int num = 0;
			bool flag = false;
			bool flag2 = false;
			bool flag3 = false;
			foreach (Intention intention in enemyUnit.Intentions)
			{
				if ((intention is AddCardIntention || intention is AttackIntention || intention is ExplodeAllyIntention || intention is ExplodeIntention || intention is NegativeEffectIntention) && !flag)
				{
					flag = true;
					num++;
				}
				else if ((intention is ClearIntention || intention is DefendIntention || intention is EscapeIntention || intention is GrazeIntention || intention is HealIntention || intention is RepairIntention || intention is PositiveEffectIntention) && !flag2)
				{
					flag2 = true;
					num += 2;
				}
				else if ((intention is ChargeIntention || intention is DoNothingIntention || intention is HexIntention || intention is SleepIntention || intention is KokoroDarkIntention || intention is SpawnIntention || intention is StunIntention || intention is UnknownIntention) && !flag3)
				{
					flag3 = true;
					num += 4;
				}
				else if (intention is SpellCardIntention)
				{
					SpellCardIntention val = (SpellCardIntention)(object)((intention is SpellCardIntention) ? intention : null);
					if (val == null || !val.Damage.HasValue)
					{
						flag = true;
						num++;
					}
					flag3 = true;
					num += 4;
				}
			}
			return num;
		}
	}
	public static class CardIndexGenerator
	{
		private static readonly List<ManaColor> offColors = BepinexPlugin.offColors;

		private static int? initial_offset = null;

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

		public const int milx1 = 10000000;

		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 >= 10000000).DefaultIfEmpty().Max() / 10000000;
					}
					num++;
					initial_offset = num * 10000000;
				}
				return initial_offset.Value;
			}
		}

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

		public static int GetUniqueIndex(CardConfig config)
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Expected I4, but got Unknown
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			int num = Initial_offset;
			num += (config.Colors.Any((ManaColor x) => offColors.Any((ManaColor y) => y == x)) ? 1000000 : 0);
			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)65536))
			{
				ManaGroup cost = config.Cost;
				if (((ManaGroup)(ref cost)).Total <= 9)
				{
					cost = config.Cost;
					num3 = ((ManaGroup)(ref cost)).Total;
					goto IL_00df;
				}
			}
			num3 = 9;
			goto IL_00df;
			IL_00df:
			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();
		}
	}
	public class SampleCharacterLoadouts
	{
		public static string UltimateSkillA = "RabiesBite";

		public static string UltimateSkillB = "ExpelleesCanan";

		public static string ExhibitA = "HeavyBlade";

		public static string ExhibitB = "BatteredShield";

		public static List<string> DeckA = new List<string> { "Shoot", "Shoot", "Boundary", "Boundary", "Slice", "Slice", "GuardUp", "GuardUp", "GuardUp", "GuardBreak" };

		public static List<string> DeckB = new List<string> { "Shoot", "Shoot", "Boundary", "Boundary", "ShieldBash", "ShieldBash", "Parry", "Parry", "Parry", "FarSight" };

		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 = 2;
			((ManaGroup)(ref val)).Blue = 0;
			((ManaGroup)(ref val)).Black = 0;
			((ManaGroup)(ref val)).Red = 2;
			((ManaGroup)(ref val)).Green = 0;
			((ManaGroup)(ref val)).Colorless = 0;
			((ManaGroup)(ref val)).Philosophy = 0;
			playerUnitConfig = new PlayerUnitConfig(modUniqueID, 8, 0, num, "", "#e58c27", true, 80, val, 60, 0, UltimateSkillA, UltimateSkillB, ExhibitA, ExhibitB, (IReadOnlyList<string>)DeckA, (IReadOnlyList<string>)DeckB, 1, 2);
		}
	}
}
namespace Momiji.Source.Ultimate
{
	public sealed class ExpelleesCananDef : SampleCharacterUltTemplate
	{
		public override UltimateSkillConfig MakeConfig()
		{
			UltimateSkillConfig defaulUltConfig = GetDefaulUltConfig();
			defaulUltConfig.Damage = 15;
			defaulUltConfig.Value1 = 2;
			defaulUltConfig.Value2 = 10;
			defaulUltConfig.Keywords = (Keyword)256;
			return defaulUltConfig;
		}
	}
	[EntityLogic(typeof(ExpelleesCananDef))]
	public sealed class ExpelleesCanan : UltimateSkill
	{
		public BlockInfo Block => new BlockInfo(((UltimateSkill)this).Value2, (BlockShieldType)1);

		public ExpelleesCanan()
		{
			((UltimateSkill)this).TargetType = (TargetType)2;
			((UltimateSkill)this).GunName = GunNameID.GetGunFromId(4158);
		}

		protected override IEnumerable<BattleAction> Actions(UnitSelector selector)
		{
			Unit[] targets = selector.GetUnits(((UltimateSkill)this).Battle);
			yield return (BattleAction)(object)PerformAction.Spell((Unit)(object)((UltimateSkill)this).Owner, "ExpelleesCanan");
			yield return (BattleAction)new CastBlockShieldAction((Unit)(object)((UltimateSkill)this).Owner, (Unit)(object)((UltimateSkill)this).Owner, Block, false);
			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 break;
			}
			Unit[] array = targets;
			foreach (Unit unit in array)
			{
				if (unit.IsAlive)
				{
					yield return (BattleAction)(object)new ApplyStatusEffectAction<FirepowerNegative>(unit, (int?)((UltimateSkill)this).Value1, (int?)null, (int?)null, (int?)null, 0f, true);
				}
			}
		}
	}
	public sealed class RabiesBiteDef : SampleCharacterUltTemplate
	{
		public override UltimateSkillConfig MakeConfig()
		{
			UltimateSkillConfig defaulUltConfig = GetDefaulUltConfig();
			defaulUltConfig.Damage = 15;
			defaulUltConfig.Value1 = 3;
			defaulUltConfig.Value2 = 4;
			defaulUltConfig.Keywords = (Keyword)256;
			defaulUltConfig.RelativeEffects = new List<string> { "Weak" };
			return defaulUltConfig;
		}
	}
	[EntityLogic(typeof(RabiesBiteDef))]
	public sealed class RabiesBite : UltimateSkill
	{
		public RabiesBite()
		{
			((UltimateSkill)this).TargetType = (TargetType)1;
			((UltimateSkill)this).GunName = GunNameID.GetGunFromId(4158);
		}

		protected override IEnumerable<BattleAction> Actions(UnitSelector selector)
		{
			EnemyUnit enemy = selector.GetEnemy(((UltimateSkill)this).Battle);
			yield return (BattleAction)(object)PerformAction.Spell((Unit)(object)((UltimateSkill)this).Battle.Player, "RabiesBite");
			yield return (BattleAction)new DamageAction((Unit)(object)((UltimateSkill)this).Owner, (Unit)(object)enemy, ((UltimateSkill)this).Damage, ((UltimateSkill)this).GunName, (GunType)0);
			yield return (BattleAction)new DamageAction((Unit)(object)((UltimateSkill)this).Owner, (Unit)(object)enemy, ((UltimateSkill)this).Damage, ((UltimateSkill)this).GunName, (GunType)0);
			if (((Unit)enemy).IsAlive)
			{
				yield return (BattleAction)(object)new ApplyStatusEffectAction<Vulnerable>((Unit)(object)enemy, (int?)0, (int?)((UltimateSkill)this).Value1, (int?)0, (int?)0, 0.2f, true);
			}
		}

		public void OnEnterBattle(BattleController battle)
		{
			((Unit)((UltimateSkill)this).Owner).ReactBattleEvent<DieEventArgs>(((UltimateSkill)this).Battle.EnemyDied, (Func<DieEventArgs, IEnumerable<BattleAction>>)OnEnemyDied);
		}

		private IEnumerable<BattleAction> OnEnemyDied(DieEventArgs args)
		{
			if (args.DieSource == this && !args.Unit.HasStatusEffect<Servant>())
			{
				((GameEntity)this).GameRun.GainMaxHp(((UltimateSkill)this).Value2, true, true);
				yield return (BattleAction)(object)PerformAction.Sfx("Shengyan", 0f);
			}
		}
	}
	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 Momiji.Source.StatusEffects
{
	public sealed class CircularPacingSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = true;
			defaultStatusEffectConfig.LevelStackType = (StackType)0;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(CircularPacingSeDef))]
	public sealed class CircularPacingSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			foreach (EnemyUnit allAliveEnemy in ((StatusEffect)this).Battle.AllAliveEnemies)
			{
				((StatusEffect)this).ReactOwnerEvent<StatusEffectApplyEventArgs>(((Unit)allAliveEnemy).StatusEffectAdded, (EventSequencedReactor<StatusEffectApplyEventArgs>)OnEnemyStatusEffectAdded);
			}
			((StatusEffect)this).HandleOwnerEvent<UnitEventArgs>(((StatusEffect)this).Battle.EnemySpawned, (GameEventHandler<UnitEventArgs>)OnEnemySpawned);
		}

		private IEnumerable<BattleAction> OnEnemyStatusEffectAdded(StatusEffectApplyEventArgs args)
		{
			if ((int)args.Effect.Type == 1)
			{
				yield return (BattleAction)new CastBlockShieldAction((Unit)(object)((StatusEffect)this).Battle.Player, 0, ((StatusEffect)this).Level, (BlockShieldType)1, false);
			}
		}

		private void OnEnemySpawned(UnitEventArgs args)
		{
			((StatusEffect)this).ReactOwnerEvent<StatusEffectApplyEventArgs>(args.Unit.StatusEffectAdded, (EventSequencedReactor<StatusEffectApplyEventArgs>)OnEnemyStatusEffectAdded);
		}
	}
	public sealed class CrispFallAirSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = true;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(CrispFallAirSeDef))]
	public sealed class CrispFallAirSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarted);
		}

		private IEnumerable<BattleAction> OnOwnerTurnStarted(UnitEventArgs args)
		{
			if (!((StatusEffect)this).Battle.BattleShouldEnd)
			{
				<>n__0();
				yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<AirCutter>(((StatusEffect)this).Level, false), (AddCardsType)0);
				yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	internal class DefensiveIntention
	{
	}
	public sealed class DestabilizeSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = true;
			defaultStatusEffectConfig.LevelStackType = (StackType)0;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(DestabilizeSeDef))]
	public sealed class DestabilizeSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<DamageEventArgs>(((Unit)((StatusEffect)this).Battle.Player).DamageDealt, (EventSequencedReactor<DamageEventArgs>)OnPlayerDamageDealt);
		}

		private IEnumerable<BattleAction> OnPlayerDamageDealt(DamageEventArgs args)
		{
			if (!((StatusEffect)this).Battle.BattleShouldEnd && (int)((GameEventArgs)args).Cause == 1)
			{
				DamageInfo damageInfo = args.DamageInfo;
				if (((DamageInfo)(ref damageInfo)).Damage > 0f)
				{
					yield return (BattleAction)new CastBlockShieldAction((Unit)(object)((StatusEffect)this).Battle.Player, 0, ((StatusEffect)this).Level, (BlockShieldType)1, false);
				}
				damageInfo = default(DamageInfo);
			}
		}
	}
	public sealed class DistractSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(DistractSeDef))]
	public sealed class DistractSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<DamageDealingEventArgs>(((Unit)((StatusEffect)this).Battle.Player).DamageDealing, (EventSequencedReactor<DamageDealingEventArgs>)OnPlayerDamageDealt);
		}

		public IEnumerable<BattleAction> OnPlayerDamageDealt(DamageDealingEventArgs args)
		{
			int num;
			if (args.Source == ((StatusEffect)this).Battle.Player && args.Targets != null)
			{
				DamageInfo damageInfo = args.DamageInfo;
				num = (((int)((DamageInfo)(ref damageInfo)).DamageType == 2) ? 1 : 0);
			}
			else
			{
				num = 0;
			}
			if (num == 0)
			{
				yield break;
			}
			Unit[] targets = args.Targets;
			for (int i = 0; i < targets.Length; i++)
			{
				EnemyUnit enemyUnit = (EnemyUnit)targets[i];
				if (((Unit)enemyUnit).IsAlive && ((Unit)enemyUnit).HasStatusEffect<Vulnerable>())
				{
					yield return (BattleAction)(object)new ApplyStatusEffectAction<Weak>((Unit)(object)enemyUnit, (int?)0, (int?)1, (int?)0, (int?)0, 0.2f, true);
				}
			}
		}
	}
	public sealed class FakeOpeningSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = true;
			defaultStatusEffectConfig.LevelStackType = (StackType)0;
			defaultStatusEffectConfig.RelativeEffects = new List<string> { "RetaliationSe" };
			defaultStatusEffectConfig.Order = 5;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(FakeOpeningSeDef))]
	public sealed class FakeOpeningSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarted);
		}

		private IEnumerable<BattleAction> OnOwnerTurnStarted(UnitEventArgs args)
		{
			yield return (BattleAction)(object)new ApplyStatusEffectAction<RetaliationSe>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)((StatusEffect)this).Level, (int?)0, (int?)0, (int?)0, 0.2f, true);
		}
	}
	public sealed class FeedOnTheWeakSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = false;
			defaultStatusEffectConfig.HasDuration = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(FeedOnTheWeakSeDef))]
	public sealed class FeedOnTheWeakSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).Owner.ReactBattleEvent<DieEventArgs>(((StatusEffect)this).Battle.EnemyDied, (Func<DieEventArgs, IEnumerable<BattleAction>>)OnEnemyDied);
		}

		private IEnumerable<BattleAction> OnEnemyDied(DieEventArgs args)
		{
			if (!args.Unit.HasStatusEffect<Servant>())
			{
				yield return (BattleAction)new GainPowerAction(10);
				yield return (BattleAction)new HealAction((Unit)(object)((StatusEffect)this).Battle.Player, (Unit)(object)((StatusEffect)this).Battle.Player, 4, (HealType)0, 0.2f);
			}
		}
	}
	public sealed class ForestAmbushSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ForestAmbushSeDef))]
	public sealed class ForestAmbushSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<DamageDealingEventArgs>(((Unit)((StatusEffect)this).Battle.Player).DamageDealing, (EventSequencedReactor<DamageDealingEventArgs>)OnPlayerDamageDealt);
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnEnded, (EventSequencedReactor<UnitEventArgs>)OnTurnEnding);
		}

		public IEnumerable<BattleAction> OnPlayerDamageDealt(DamageDealingEventArgs args)
		{
			int num;
			if (args.Source == ((StatusEffect)this).Battle.Player && args.Targets != null)
			{
				DamageInfo damageInfo = args.DamageInfo;
				num = (((int)((DamageInfo)(ref damageInfo)).DamageType == 2) ? 1 : 0);
			}
			else
			{
				num = 0;
			}
			if (num == 0)
			{
				yield break;
			}
			<>n__0();
			Unit[] targets = args.Targets;
			foreach (Unit enemyUnit in targets)
			{
				if (enemyUnit.IsAlive)
				{
					yield return (BattleAction)new DamageAction(((StatusEffect)this).Owner, enemyUnit, DamageInfo.Reaction((float)((StatusEffect)((Unit)((StatusEffect)this).Battle.Player).GetStatusEffect<RetaliationSe>()).Level, false), GunNameID.GetGunFromId(400), (GunType)0);
				}
			}
		}

		private IEnumerable<BattleAction> OnTurnEnding(UnitEventArgs args)
		{
			yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class FragilForEnemiesDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = false;
			defaultStatusEffectConfig.HasDuration = true;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(FragilForEnemiesDef))]
	public sealed class FragilForEnemies : StatusEffect
	{
		public int Value
		{
			get
			{
				GameRunController gameRun = ((GameEntity)this).GameRun;
				if (gameRun == null || !(((StatusEffect)this).Owner is EnemyUnit))
				{
					return 30;
				}
				return Math.Min(30 + gameRun.FragilExtraPercentage, 100);
			}
		}

		protected override void OnAdded(Unit unit)
		{
			if (unit is PlayerUnit)
			{
				((StatusEffect)this).HandleOwnerEvent<BlockShieldEventArgs>(unit.BlockShieldGaining, (GameEventHandler<BlockShieldEventArgs>)OnBlockGaining);
			}
			else
			{
				Debug.LogError((object)(((GameEntity)this).Name + " added to enemy " + ((GameEntity)unit).Name + ", which has no effect."));
			}
		}

		private void OnBlockGaining(BlockShieldEventArgs args)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Invalid comparison between Unknown and I4
			float num = 1f - (float)Value / 100f;
			if ((int)args.Type != 2)
			{
				args.Block *= num;
				args.Shield *= num;
			}
		}
	}
	public sealed class FrigidSkySeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(FrigidSkySeDef))]
	public sealed class FrigidSkySe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<DamageEventArgs>(((Unit)((StatusEffect)this).Battle.Player).DamageDealt, (EventSequencedReactor<DamageEventArgs>)OnPlayerDamageDealt);
		}

		private IEnumerable<BattleAction> OnPlayerDamageDealt(DamageEventArgs args)
		{
			if (!((StatusEffect)this).Battle.BattleShouldEnd && (int)((GameEventArgs)args).Cause == 1)
			{
				GameEntity actionSource = ((GameEventArgs)args).ActionSource;
				Card card = (Card)(object)((actionSource is Card) ? actionSource : null);
				DamageInfo damageInfo = args.DamageInfo;
				if (card != null && ((GameEntity)card).BaseName == "AirCutter" && ((DamageInfo)(ref damageInfo)).Damage > 0f)
				{
					yield return ((StatusEffect)this).DebuffAction<Cold>(args.Target, 0, 0, 0, 0, true, 0.03f);
				}
				damageInfo = default(DamageInfo);
			}
		}
	}
	public sealed class HowlingMountainWindSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = false;
			defaultStatusEffectConfig.RelativeEffects = new List<string> { "Vulnerable" };
			defaultStatusEffectConfig.Order = 10;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(HowlingMountainWindSeDef))]
	public sealed class HowlingMountainWindSe : StatusEffect
	{
	}
	public sealed class ImageTrainingSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = true;
			defaultStatusEffectConfig.LevelStackType = (StackType)0;
			defaultStatusEffectConfig.Order = 5;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ImageTrainingSeDef))]
	public sealed class ImageTrainingSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarted);
		}

		private IEnumerable<BattleAction> OnOwnerTurnStarted(UnitEventArgs args)
		{
			if (!((StatusEffect)this).Battle.BattleShouldEnd)
			{
				<>n__0();
				yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<AirCutter>(((StatusEffect)this).Level, false), (AddCardsType)0);
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class IndiscriminateRevengeSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(IndiscriminateRevengeSeDef))]
	public sealed class IndiscriminateRevengeSe : StatusEffect
	{
		private bool hasActivated = false;

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

		private IEnumerable<BattleAction> StatusEffectRemoved(StatusEffectEventArgs args)
		{
			if (((GameEventArgs)args).ActionSource is Reflect)
			{
				int retalLevel = ((StatusEffect)((Unit)((StatusEffect)this).Battle.Player).GetStatusEffect<RetaliationSe>()).Level;
				if ((float)retalLevel > 0f)
				{
					yield return (BattleAction)new DamageAction((Unit)(object)((StatusEffect)this).Battle.Player, (IEnumerable<Unit>)((StatusEffect)this).Battle.EnemyGroup.Alives, DamageInfo.Reaction((float)retalLevel, false), "Instant", (GunType)0);
				}
			}
		}
	}
	public sealed class InstantofContactSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			return SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
		}
	}
	[EntityLogic(typeof(InstantofContactSeDef))]
	public sealed class InstantofContactSe : ExtraTurnPartner
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<BlockShieldEventArgs>(((StatusEffect)this).Owner.BlockShieldGained, (EventSequencedReactor<BlockShieldEventArgs>)OnBlockShieldGained);
			((ExtraTurnPartner)this).ThisTurnActivating = false;
			((StatusEffect)this).HandleOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarting, (GameEventHandler<UnitEventArgs>)delegate
			{
				if (((Unit)((StatusEffect)this).Battle.Player).IsExtraTurn && !((StatusEffect)this).Battle.Player.IsSuperExtraTurn && ((Unit)((StatusEffect)this).Battle.Player).GetStatusEffectExtend<ExtraTurnPartner>() == this)
				{
					((ExtraTurnPartner)this).ThisTurnActivating = true;
				}
			});
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnEnded, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnEnded);
		}

		private IEnumerable<BattleAction> OnPlayerTurnEnded(UnitEventArgs args)
		{
			if (((ExtraTurnPartner)this).ThisTurnActivating)
			{
				yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
			}
		}

		private IEnumerable<BattleAction> OnBlockShieldGained(BlockShieldEventArgs args)
		{
			if (!((StatusEffect)this).Battle.BattleShouldEnd && (args.Block > 0f || args.Shield > 0f))
			{
				<>n__0();
				yield return (BattleAction)(object)new ApplyStatusEffectAction<RetaliationSe>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)((StatusEffect)this).Level, (int?)0, (int?)0, (int?)0, 0.2f, true);
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class SampleCharacterCustomKeywordSeDef : SampleCharacterStatusEffectTemplate
	{
	}
	[EntityLogic(typeof(SampleCharacterCustomKeywordSeDef))]
	public sealed class SampleCharacterCustomKeywordSe : StatusEffect
	{
	}
	public sealed class MapleLeafFestivalSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = true;
			defaultStatusEffectConfig.LevelStackType = (StackType)0;
			defaultStatusEffectConfig.Order = 5;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(MapleLeafFestivalSeDef))]
	public sealed class MapleLeafFestivalSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarted);
		}

		private IEnumerable<BattleAction> OnOwnerTurnStarted(UnitEventArgs args)
		{
			if (!((StatusEffect)this).Battle.BattleShouldEnd)
			{
				<>n__0();
				yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<MapleLeaf>(((StatusEffect)this).Level, false), (AddCardsType)0);
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class MountainsideTrailTrackingSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = true;
			defaultStatusEffectConfig.LevelStackType = (StackType)0;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(MountainsideTrailTrackingSeDef))]
	public sealed class MountainsideTrailTrackingSe : StatusEffect
	{
		private bool hasActivated = false;

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<DamageEventArgs>(((Unit)((StatusEffect)this).Battle.Player).DamageDealt, (EventSequencedReactor<DamageEventArgs>)OnPlayerDamageDealt);
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarted);
		}

		private IEnumerable<BattleAction> OnPlayerDamageDealt(DamageEventArgs args)
		{
			if (!((StatusEffect)this).Battle.BattleShouldEnd && (int)((GameEventArgs)args).Cause == 1)
			{
				DamageInfo damageInfo = args.DamageInfo;
				if (((DamageInfo)(ref damageInfo)).Damage > 0f && args.Target.HasStatusEffect<Vulnerable>())
				{
					yield return (BattleAction)new DrawManyCardAction(((StatusEffect)this).Level);
					hasActivated = true;
				}
				damageInfo = default(DamageInfo);
			}
		}

		private IEnumerable<BattleAction> OnOwnerTurnStarted(UnitEventArgs args)
		{
			if (!((StatusEffect)this).Battle.BattleShouldEnd && hasActivated)
			{
				hasActivated = false;
			}
			yield break;
		}
	}
	internal class OffensiveIntention
	{
	}
	public sealed class RetaliationSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.RelativeEffects = new List<string> { "Reflect" };
			defaultStatusEffectConfig.HasLevel = true;
			defaultStatusEffectConfig.LevelStackType = (StackType)0;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(RetaliationSeDef))]
	public sealed class RetaliationSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((GameEntity)this).React(Reactor.op_Implicit((BattleAction)(object)new ApplyStatusEffectAction<Reflect>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)((StatusEffect)this).Level, (int?)0, (int?)0, (int?)0, 0.2f, true)));
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarted);
		}

		private IEnumerable<BattleAction> OnOwnerTurnStarted(UnitEventArgs args)
		{
			yield return ((StatusEffect)this).BuffAction<Reflect>(((StatusEffect)this).Level, 0, 0, 0, 0.2f);
		}
	}
	public sealed class SenseWeaknessSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = true;
			defaultStatusEffectConfig.LevelStackType = (StackType)0;
			defaultStatusEffectConfig.RelativeEffects = new List<string> { "Vulnerable" };
			defaultStatusEffectConfig.Order = 5;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(SenseWeaknessSeDef))]
	public sealed class SenseWeaknessSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<GameEventArgs>(((StatusEffect)this).Battle.BattleEnding, (EventSequencedReactor<GameEventArgs>)OnBattleEnding);
			GameRunController gameRun = ((GameEntity)this).GameRun;
			gameRun.EnemyVulnerableExtraPercentage += ((StatusEffect)this).Level;
		}

		private IEnumerable<BattleAction> OnBattleEnding(GameEventArgs args)
		{
			GameRunController gameRun = ((GameEntity)this).GameRun;
			gameRun.EnemyVulnerableExtraPercentage -= ((StatusEffect)this).Level;
			yield break;
		}
	}
	public sealed class ShieldCounterSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = true;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ShieldCounterSeDef))]
	public sealed class ShieldCounterSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<DamageEventArgs>(((Unit)((StatusEffect)this).Battle.Player).DamageDealt, (EventSequencedReactor<DamageEventArgs>)OnPlayerDamageDealt);
		}

		public IEnumerable<BattleAction> OnPlayerDamageDealt(DamageEventArgs args)
		{
			int num;
			if (args.Source == ((StatusEffect)this).Battle.Player && args.Target != null)
			{
				DamageInfo damageInfo = args.DamageInfo;
				num = (((int)((DamageInfo)(ref damageInfo)).DamageType == 1) ? 1 : 0);
			}
			else
			{
				num = 0;
			}
			if (num != 0)
			{
				<>n__0();
				if (args.Target.IsAlive)
				{
					yield return (BattleAction)(object)new ApplyStatusEffectAction<Vulnerable>(args.Target, (int?)0, (int?)((StatusEffect)this).Level, (int?)0, (int?)0, 0.2f, true);
				}
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	public sealed class SmellofDeathSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(SmellofDeathSeDef))]
	public sealed class SmellofDeathSe : StatusEffect
	{
		public int FinalDamage => ((StatusEffect)this).Owner.MaxHp * ((StatusEffect)this).Level / 2;

		protected override void OnAdded(Unit unit)
		{
			if (!(unit is EnemyUnit))
			{
				Debug.LogError((object)("Cannot add DeathExplode to " + ((object)unit).GetType().Name));
			}
			else
			{
				((StatusEffect)this).ReactOwnerEvent<DieEventArgs>(((StatusEffect)this).Owner.Dying, (EventSequencedReactor<DieEventArgs>)OnDying);
			}
		}

		private IEnumerable<BattleAction> OnDying(DieEventArgs args)
		{
			DieCause dieCause = args.DieCause;
			if ((int)dieCause != 4 && (int)dieCause != 6)
			{
				<>n__0();
				((GameEventArgs)args).CancelBy((GameEntity)(object)this);
				Unit owner = ((StatusEffect)this).Owner;
				Unit obj = owner;
				yield return (BattleAction)new DamageAction((obj is EnemyUnit) ? obj : null, (IEnumerable<Unit>)((StatusEffect)this).Battle.AllAliveEnemies.Where((EnemyUnit e) => e != owner), DamageInfo.Attack((float)FinalDamage, false), "冰封噩梦B", (GunType)0);
				yield return (BattleAction)new DieAction(owner, (DieCause)4, owner, (GameEntity)(object)this);
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	internal class SpecialIntention
	{
	}
	public sealed class StandWatchSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = true;
			defaultStatusEffectConfig.LevelStackType = (StackType)0;
			defaultStatusEffectConfig.Order = 5;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(StandWatchSeDef))]
	public sealed class StandWatchSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarted);
		}

		private IEnumerable<BattleAction> OnOwnerTurnStarted(UnitEventArgs args)
		{
			if (!((StatusEffect)this).Battle.BattleShouldEnd)
			{
				<>n__0();
				yield return (BattleAction)new CastBlockShieldAction((Unit)(object)((StatusEffect)this).Battle.Player, ((StatusEffect)this).Level, 0, (BlockShieldType)1, false);
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
	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 SurgeofPowerSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = true;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(SurgeofPowerSeDef))]
	public sealed class SurgeofPowerSe : StatusEffect
	{
		[UsedImplicitly]
		public ManaGroup Mana = ManaGroup.Empty;

		protected override void OnAdded(Unit unit)
		{
			CardToFree(((StatusEffect)this).Battle.EnumerateAllCards());
			((StatusEffect)this).ReactOwnerEvent<CardUsingEventArgs>(((StatusEffect)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed);
			((StatusEffect)this).HandleOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToDiscard, (GameEventHandler<CardsEventArgs>)OnAddCard);
			((StatusEffect)this).HandleOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToHand, (GameEventHandler<CardsEventArgs>)OnAddCard);
			((StatusEffect)this).HandleOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToExile, (GameEventHandler<CardsEventArgs>)OnAddCard);
			((StatusEffect)this).HandleOwnerEvent<CardsAddingToDrawZoneEventArgs>(((StatusEffect)this).Battle.CardsAddedToDrawZone, (GameEventHandler<CardsAddingToDrawZoneEventArgs>)OnAddCardToDraw);
		}

		private void OnAddCardToDraw(CardsAddingToDrawZoneEventArgs args)
		{
			CardToFree(args.Cards);
		}

		private void OnAddCard(CardsEventArgs args)
		{
			CardToFree(args.Cards);
		}

		private void CardToFree(IEnumerable<Card> cards)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Invalid comparison between Unknown and I4
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Invalid comparison between Unknown and I4
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Invalid comparison between Unknown and I4
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Invalid comparison between Unknown and I4
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Invalid comparison between Unknown and I4
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Invalid comparison between Unknown and I4
			foreach (Card card in cards)
			{
				if ((int)card.CardType == 1 || (int)card.CardType == 3 || (int)card.CardType == 2 || (int)card.CardType == 4 || (int)card.CardType == 7 || (int)card.CardType == 8)
				{
					card.FreeCost = true;
				}
			}
		}

		protected override void OnRemoved(Unit unit)
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Invalid comparison between Unknown and I4
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Invalid comparison between Unknown and I4
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Invalid comparison between Unknown and I4
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Invalid comparison between Unknown and I4
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Invalid comparison between Unknown and I4
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Invalid comparison between Unknown and I4
			foreach (Card item in ((StatusEffect)this).Battle.EnumerateAllCards())
			{
				if ((int)item.CardType == 1 || (int)item.CardType == 3 || (int)item.CardType == 2 || (int)item.CardType == 4 || (int)item.CardType == 7 || (int)item.CardType == 8)
				{
					item.FreeCost = false;
				}
			}
		}

		private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs args)
		{
			if ((int)args.Card.CardType == 1 || (int)args.Card.CardType == 3 || (int)args.Card.CardType == 2 || (int)args.Card.CardType == 4 || (int)args.Card.CardType == 7 || (int)args.Card.CardType == 8)
			{
				int level = ((StatusEffect)this).Level - 1;
				((StatusEffect)this).Level = level;
				if (((StatusEffect)this).Level <= 0)
				{
					yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
				}
			}
		}
	}
	public sealed class TirelessGuardSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = false;
			defaultStatusEffectConfig.Order = 5;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(TirelessGuardSeDef))]
	public sealed class TirelessGuardSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<StatusEffectEventArgs>(((Unit)((StatusEffect)this).Battle.Player).StatusEffectRemoved, (EventSequencedReactor<StatusEffectEventArgs>)StatusEffectRemoved);
		}

		private IEnumerable<BattleAction> StatusEffectRemoved(StatusEffectEventArgs args)
		{
			if (!((Unit)((StatusEffect)this).Battle.Player).HasStatusEffect<TwinFangSe>() && ((GameEventArgs)args).ActionSource is Reflect)
			{
				int reflectLevel2 = args.Effect.Level;
				if ((float)reflectLevel2 > 0f)
				{
					reflectLevel2 /= 2;
					yield return (BattleAction)(object)new ApplyStatusEffectAction<Reflect>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)reflectLevel2, (int?)0, (int?)0, (int?)0, 0.2f, true);
				}
			}
		}
	}
	public sealed class TrapStanceSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(TrapStanceSeDef))]
	public sealed class TrapStanceSe : StatusEffect
	{
		private bool hasActivated = false;

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

		private IEnumerable<BattleAction> StatusEffectRemoved(StatusEffectEventArgs args)
		{
			if (((GameEventArgs)args).ActionSource is Reflect)
			{
				int retalLevel = ((StatusEffect)((Unit)((StatusEffect)this).Battle.Player).GetStatusEffect<RetaliationSe>()).Level;
				if ((float)retalLevel > 0f && !hasActivated)
				{
					yield return (BattleAction)(object)new ApplyStatusEffectAction<Reflect>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)retalLevel, (int?)0, (int?)0, (int?)0, 0.2f, true);
					hasActivated = true;
				}
			}
		}

		private IEnumerable<BattleAction> OnOwnerTurnStarted(UnitEventArgs args)
		{
			if (!((StatusEffect)this).Battle.BattleShouldEnd && hasActivated)
			{
				hasActivated = false;
			}
			yield break;
		}
	}
	public sealed class TwinFangSeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(TwinFangSeDef))]
	public sealed class TwinFangSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<StatusEffectEventArgs>(((Unit)((StatusEffect)this).Battle.Player).StatusEffectRemoved, (EventSequencedReactor<StatusEffectEventArgs>)StatusEffectRemoved);
		}

		private IEnumerable<BattleAction> StatusEffectRemoved(StatusEffectEventArgs args)
		{
			if (((GameEventArgs)args).ActionSource is Reflect)
			{
				int reflectLevel = args.Effect.Level;
				if ((float)reflectLevel > 0f)
				{
					yield return (BattleAction)(object)new ApplyStatusEffectAction<Reflect>((Unit)(object)((StatusEffect)this).Battle.Player, (int?)reflectLevel, (int?)0, (int?)0, (int?)0, 0.2f, true);
					yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
				}
			}
		}
	}
	public sealed class WoodlandSentrySeDef : SampleCharacterStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = SampleCharacterStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.HasLevel = true;
			defaultStatusEffectConfig.LevelStackType = (StackType)0;
			defaultStatusEffectConfig.Order = 10;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(WoodlandSentrySeDef))]
	public sealed class WoodlandSentrySe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnEnding, (EventSequencedReactor<UnitEventArgs>)OnTurnEnding);
		}

		private IEnumerable<BattleAction> OnTurnEnding(UnitEventArgs args)
		{
			int num = ((StatusEffect)this).Battle.HandZone.Count * ((StatusEffect)this).Level;
			if (num > 0)
			{
				<>n__0();
				yield return (BattleAction)new CastBlockShieldAction((Unit)(object)((StatusEffect)this).Battle.Player, num, 0, (BlockShieldType)1, true);
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((StatusEffect)this).NotifyActivating();
		}
	}
}
namespace Momiji.Source.model
{
	public sealed class MomijiModelDef : UnitModelTemplate
	{
		public static bool useInGameModel = BepinexPlugin.useInGameModel;

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

		public static string spellsprite_name = "MomijiSpellCard.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 MomijiDef()).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, 265, (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.modelIsFlipped;
				return val;
			}
			UnitModelConfig val2 = ObjectExtensions.Copy<UnitModelConfig>(((UnitModelTemplate)this).DefaultConfig());
			val2.Flip = BepinexPlugin.modelIsFlipped;
			val2.Type = 0;
			val2.Offset = new Vector2(0f, -20.1f);
			val2.HasSpellPortrait = true;
			return val2;
		}
	}
}
namespace Momiji.Source.Localization
{
	public sealed class SampleCharacterLocalization
	{
		public static string Cards = "Cards";

		public static string Exhibits = "Exhibits";

		public static string PlayerUnit = "PlayerUnit";

		public static string UnitModel = "UnitModel";

		public static string UltimateSkills = "UltimateSkills";

		public static string StatusEffects = "StatusEffects";

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

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

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

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

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

		public static BatchLocalization StatusEffectsBatchLoc = new BatchLocalization((IResourceSource)(object)BepinexPlugin.directorySource, typeof(StatusEffectTemplate), StatusEffects, (Locale)0, false);

		public static void Init()
		{
			CardsBatchLoc.DiscoverAndLoadLocFiles(Cards);
			ExhibitsBatchLoc.DiscoverAndLoadLocFiles(Exhibits);
			PlayerUnitBatchLoc.DiscoverAndLoadLocFiles(PlayerUnit);
			UnitModelBatchLoc.DiscoverAndLoadLocFiles(UnitModel);
			UltimateSkillsBatchLoc.DiscoverAndLoadLocFiles(UltimateSkills);
			StatusEffectsBatchLoc.DiscoverAndLoadLocFiles(StatusEffects);
		}
	}
}
namespace Momiji.Source.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 Momiji.Source.Exhibits
{
	public sealed class BatteredShieldDef : 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 = 3;
			ManaGroup value = default(ManaGroup);
			((ManaGroup)(ref value)).White = 1;
			defaultExhibitConfig.Mana = value;
			defaultExhibitConfig.BaseManaColor = (ManaColor)1;
			defaultExhibitConfig.RelativeEffects = new List<string> { "Reflect" };
			return defaultExhibitConfig;
		}
	}
	[EntityLogic(typeof(BatteredShieldDef))]
	public sealed class BatteredShield : ShiningExhibit
	{
		private bool Triggered = false;

		protected override void OnEnterBattle()
		{
			((Exhibit)this).HandleBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Owner).TurnStarting, (GameEventHandler<UnitEventArgs>)OnTurnStarting);
			((Exhibit)this).ReactBattleEvent<BlockShieldEventArgs>(((Unit)((Exhibit)this).Owner).BlockShieldGained, (EventSequencedReactor<BlockShieldEventArgs>)OnBlockShieldGained);
		}

		protected override void OnLeaveBattle()
		{
			Triggered = false;
		}

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

		private IEnumerable<BattleAction> OnBlockShieldGained(BlockShieldEventArgs args)
		{
			if ((args.Block > 0f || args.Shield > 0f) && !Triggered)
			{
				Triggered = true;
				<>n__0();
				yield return (BattleAction)(object)new ApplyStatusEffectAction<Reflect>((Unit)(object)((Exhibit)this).Owner, (int?)((Exhibit)this).Value1, (int?)null, (int?)null, (int?)null, 0.1f, true);
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((Exhibit)this).NotifyActivating();
		}
	}
	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 HeavyBladeDef : 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)).Red = 1;
			defaultExhibitConfig.Mana = value;
			defaultExhibitConfig.BaseManaColor = (ManaColor)4;
			return defaultExhibitConfig;
		}
	}
	[EntityLogic(typeof(HeavyBladeDef))]
	public sealed class HeavyBlade : ShiningExhibit
	{
		private readonly HashSet<Unit> TriggeredEnemies = new HashSet<Unit>();

		protected override void OnEnterBattle()
		{
			TriggeredEnemies.Clear();
			((Exhibit)this).ReactBattleEvent<StatisticalDamageEventArgs>(((Unit)((Exhibit)this).Battle.Player).StatisticalTotalDamageDealt, (EventSequencedReactor<StatisticalDamageEventArgs>)OnStatisticalDamageDealt);
		}

		private IEnumerable<BattleAction> OnStatisticalDamageDealt(StatisticalDamageEventArgs args)
		{
			if (((Exhibit)this).Battle.BattleShouldEnd)
			{
				yield break;
			}
			bool activated = false;
			foreach (var (unit, dmg) in args.ArgsTable)
			{
				if (unit.IsAlive && dmg.Count(delegate(DamageEventArgs dmgArgs)
				{
					//IL_0002: Unknown result type (might be due to invalid IL or missing references)
					//IL_0007: Unknown result type (might be due to invalid IL or missing references)
					//IL_000a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0010: Invalid comparison between Unknown and I4
					DamageInfo damageInfo = dmgArgs.DamageInfo;
					return (int)((DamageInfo)(ref damageInfo)).DamageType == 2 && ((DamageInfo)(ref damageInfo)).Amount > 0f;
				}) > 0 && !TriggeredEnemies.Contains(unit))
				{
					if (!activated)
					{
						<>n__0();
						activated = true;
					}
					TriggeredEnemies.Add(unit);
					yield return (BattleAction)(object)new ApplyStatusEffectAction<TempFirepowerNegative>(unit, (int?)((Exhibit)this).Value1, (int?)null, (int?)null, (int?)null, 0f, true);
				}
			}
		}

		[CompilerGenerated]
		[DebuggerHidden]
		private void <>n__0()
		{
			((Exhibit)this).NotifyActivating();
		}
	}
}
namespace Momiji.Source.ImageLoader
{
	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_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: 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, (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>());
		}
	}
	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
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			ExhibitSprites val = new ExhibitSprites();
			Debug.Log((object)("Momiji Exhibits: " + IdContainer.op_Implicit(((EntityDefinition)exhibit).GetId()) + file_extension));
			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 Momiji.Source.Cards
{
	public sealed class FeedOnTheWeakDef : 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)3 };
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 2;
			((ManaGroup)(ref val)).Black = 1;
			cardDefaultConfig.Cost = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 1;
			((ManaGroup)(ref val)).Black = 1;
			cardDefaultConfig.UpgradedCost = val;
			cardDefaultConfig.Rarity = (Rarity)1;
			cardDefaultConfig.Type = (CardType)4;
			cardDefaultConfig.TargetType = (TargetType)0;
			cardDefaultConfig.Value1 = 4;
			cardDefaultConfig.UpgradedValue1 = 10;
			cardDefaultConfig.Illustrator = "平行移動";
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(FeedOnTheWeakDef))]
	public sealed class FeedOnTheWeak : 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)(object)new ApplyStatusEffectAction<FeedOnTheWeakSe>((Unit)(object)((Card)this).Battle.Player, (int?)1, (int?)0, (int?)0, (int?)0, 0.2f, true);
		}
	}
	public sealed class SmellofDeathDef : 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)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)3 };
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 1;
			((ManaGroup)(ref val)).Black = 1;
			cardDefaultConfig.Cost = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 0;
			cardDefaultConfig.UpgradedCost = val;
			cardDefaultConfig.Rarity = (Rarity)1;
			cardDefaultConfig.Type = (CardType)3;
			cardDefaultConfig.TargetType = (TargetType)1;
			cardDefaultConfig.Value1 = 2;
			cardDefaultConfig.RelativeEffects = new List<string> { "Vulnerable" };
			cardDefaultConfig.UpgradedRelativeEffects = new List<string> { "Vulnerable" };
			cardDefaultConfig.Keywords = (Keyword)131072;
			cardDefaultConfig.UpgradedKeywords = (Keyword)131072;
			cardDefaultConfig.Illustrator = "真塚ケイ";
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(SmellofDeathDef))]
	public sealed class SmellofDeath : 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)
			EnemyUnit selectedEnemy = selector.SelectedEnemy;
			yield return (BattleAction)(object)new ApplyStatusEffectAction<Vulnerable>((Unit)(object)selectedEnemy, (int?)0, (int?)((Card)this).Value1, (int?)0, (int?)0, 0.2f, true);
			yield return (BattleAction)(object)new ApplyStatusEffectAction<SmellofDeathSe>((Unit)(object)selectedEnemy, (int?)1, (int?)0, (int?)0, (int?)0, 0.2f, true);
		}
	}
	public sealed class ForestAmbushDef : 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)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)5 };
			ManaGroup val = default(ManaGroup);
			((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 = 5;
			cardDefaultConfig.Illustrator = "荒野\u3000沖";
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(ForestAmbushDef))]
	public sealed class ForestAmbush : 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)(object)new ApplyStatusEffectAction<RetaliationSe>((Unit)(object)((Card)this).Battle.Player, (int?)((Card)this).Value1, (int?)0, (int?)0, (int?)0, 0.2f, true);
			yield return (BattleAction)(object)new ApplyStatusEffectAction<ForestAmbushSe>((Unit)(object)((Card)this).Battle.Player, (int?)1, (int?)0, (int?)0, (int?)0, 0.2f, true);
		}
	}
	public sealed class AyaTeammateDef : 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)4,
				(ManaColor)5
			};
			ManaGroup cost = default(ManaGroup);
			((ManaGroup)(ref cost)).Any = 1;
			((ManaGroup)(ref cost)).Red = 1;
			((ManaGroup)(ref cost)).Green = 1;
			cardDefaultConfig.Cost = cost;
			cardDefaultConfig.Rarity = (Rarity)1;
			cardDefaultConfig.Type = (CardType)5;
			cardDefaultConfig.TargetType = (TargetType)0;
			cardDefaultConfig.Loyalty = 2;
			cardDefaultConfig.UpgradedLoyalty = 2;
			cardDefaultConfig.PassiveCost = 1;
			cardDefaultConfig.UpgradedPassiveCost = 1;
			cardDefaultConfig.ActiveCost = -3;
			cardDefaultConfig.UpgradedActiveCost = -3;
			cardDefaultConfig.UltimateCost = -6;
			cardDefaultConfig.UpgradedUltimateCost = -6;
			cardDefaultConfig.Value1 = 1;
			cardDefaultConfig.UpgradedValue1 = 2;
			cardDefaultConfig.Value2 = 3;
			cardDefaultConfig.UpgradedValue2 = 4;
			cardDefaultConfig.Illustrator = "bowstringsmall";
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(AyaTeammateDef))]
	public sealed class AyaTeammate : SampleCharacterCard
	{
		public int Graze
		{
			get
			{
				if (!((Card)this).IsUpgraded)
				{
					return 2;
				}
				return 3;
			}
		}

		public string Indent { get; } = "<indent=80>";


		public string PassiveCostIcon => $"<indent=0><sprite=\"Passive\" name=\"{((Card)this).PassiveCost}\">{Indent}";

		public string ActiveCostIcon => $"<indent=0><sprite=\"Active\" name=\"{((Card)this).ActiveCost}\">{Indent}";

		public string UltimateCostIcon => $"<indent=0><sprite=\"Ultimate\" name=\"{((Card)this).UltimateCost}\">{Indent}";

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

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

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

		protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			if (precondition == null || (int)((MiniSelectCardInteraction)precondition).SelectedCard.FriendToken == 1)
			{
				((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).ActiveCost;
				foreach (BattleAction item in ((Card)this).DebuffAction<LockedOn>((IEnumerable<Unit>)((Card)this).Battle.AllAliveEnemies, ((Card)this).Value2, 0, 0, 0, true, 0.2f))
				{
					yield return item;
				}
				yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<MapleLeaf>(((Card)this).Value1, false), (AddCardsType)0);
				yield return (BattleAction)(object)((Card)this).SkillAnime;
			}
			else
			{
				((Card)this).Loyalty = ((Card)this).Loyalty + ((Card)this).UltimateCost;
				((Card)this).UltimateUsed = true;
				yield return ((Card)this).BuffAction<WindGirl>(1, 0, 0, 0, 0.2f);
				yield return (BattleAction)(object)new ApplyStatusEffectAction<AccuracyModule>((Unit)(object)((Card)this).Battle.Player, (int?)1, (int?)0, (int?)0, (int?)0, 0.2f, true);
				yield return (BattleAction)(object)((Card)this).SkillAnime;
			}
		}

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

		[CompilerGenerated]
		[DebuggerHidden]
		private IEnumerable<BattleAction> <>n__1(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return ((Card)this).SummonActions(selector, consumingMana, precondition);
		}
	}
	public sealed class RabidBiteDef : 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)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Colors = new List<ManaColor>
			{
				(ManaColor)4,
				(ManaColor)3
			};
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 2;
			((ManaGroup)(ref val)).Hybrid = 1;
			((ManaGroup)(ref val)).HybridColor = 7;
			cardDefaultConfig.Cost = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 1;
			((ManaGroup)(ref val)).Hybrid = 1;
			((ManaGroup)(ref val)).HybridColor = 7;
			cardDefaultConfig.UpgradedCost = val;
			cardDefaultConfig.Rarity = (Rarity)1;
			cardDefaultConfig.Type = (CardType)1;
			cardDefaultConfig.TargetType = (TargetType)1;
			cardDefaultConfig.Damage = 12;
			cardDefaultConfig.UpgradedDamage = 12;
			cardDefaultConfig.Value1 = 3;
			cardDefaultConfig.Keywords = (Keyword)256;
			cardDefaultConfig.UpgradedKeywords = (Keyword)256;
			cardDefaultConfig.Illustrator = "翡翠ぺちか";
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(RabidBiteDef))]
	public sealed class RabidBite : 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)
			_ = selector.SelectedEnemy;
			yield return ((Card)this).AttackAction(selector, ((Card)this).GunName);
			yield return ((Card)this).HealAction(((Card)this).Value1);
		}
	}
	public sealed class WoodlandSentryDef : SampleCharacterCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.GunName = GunNameID.GetGunFromId(400);
			cardDefaultConfig.Colors = new List<ManaColor>
			{
				(ManaColor)1,
				(ManaColor)5
			};
			ManaGroup cost = default(ManaGroup);
			((ManaGroup)(ref cost)).White = 1;
			((ManaGroup)(ref cost)).Green = 1;
			cardDefaultConfig.Cost = cost;
			cardDefaultConfig.Rarity = (Rarity)1;
			cardDefaultConfig.Type = (CardType)4;
			cardDefaultConfig.TargetType = (TargetType)0;
			cardDefaultConfig.Value1 = 1;
			cardDefaultConfig.UpgradedValue1 = 2;
			cardDefaultConfig.Value2 = 3;
			cardDefaultConfig.Illustrator = "ポロリキン";
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(WoodlandSentryDef))]
	public sealed class WoodlandSentry : SampleCharacterCard
	{
		protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)