Decompiled source of LbolProbeMod v0.2.0

ProbeMod_windows.dll

Decompiled 2 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using AddWatermark;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using Cysharp.Threading.Tasks;
using HarmonyLib;
using 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.Randoms;
using LBoL.Core.StatusEffects;
using LBoL.Core.Units;
using LBoL.EntityLib.EnemyUnits.Character;
using LBoL.EntityLib.EnemyUnits.Normal;
using LBoL.EntityLib.EnemyUnits.Normal.Drones;
using LBoL.EntityLib.Exhibits;
using LBoL.EntityLib.StatusEffects.Basic;
using LBoL.EntityLib.StatusEffects.Cirno;
using LBoL.EntityLib.StatusEffects.Enemy;
using LBoL.EntityLib.StatusEffects.Koishi;
using LBoL.EntityLib.StatusEffects.Neutral.Blue;
using LBoL.Presentation;
using LBoLEntitySideloader;
using LBoLEntitySideloader.Attributes;
using LBoLEntitySideloader.Entities;
using LBoLEntitySideloader.Resource;
using LBoLEntitySideloader.Utils;
using ProbeMod.BattleActions;
using ProbeMod.Cards;
using ProbeMod.Cards.Template;
using ProbeMod.Config;
using ProbeMod.Exhibits;
using ProbeMod.GunName;
using ProbeMod.ImageLoader;
using ProbeMod.Localization;
using ProbeMod.Patches;
using ProbeMod.SFX;
using ProbeMod.SFX.Template;
using ProbeMod.StatusEffects;
using UnityEngine;
using UnityEngine.Experimental.Rendering;

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

		public static string playerName = "Probe";

		public static bool useInGameModel = false;

		public static string modelName = "Youmu";

		public static bool modelIsFlipped = true;

		public static List<ManaColor> offColors = new List<ManaColor> { (ManaColor)6 };

		public static ConfigEntry<bool> enableAct1Boss;

		public static CustomConfigEntry<bool> enableAct1BossEntry = new CustomConfigEntry<bool>(value: false, "EnableAct1Boss", "EnableAct1Boss", "Toggle the Act 1 boss. Default: Off");

		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("glamorganprobe.lbol.charactor.Probe", "");

		private void Awake()
		{
			log = ((BaseUnityPlugin)this).Logger;
			enableAct1Boss = ((BaseUnityPlugin)this).Config.Bind<bool>(enableAct1BossEntry.Section, enableAct1BossEntry.Key, enableAct1BossEntry.Value, enableAct1BossEntry.Description);
			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();
			}
			Func<Sprite> func = () => ResourceLoader.LoadSprite("BossIcon.png", (IResourceSource)(object)directorySource, (Rect?)null, 1, (Vector2?)null);
		}

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

		public const string Name = "ProbeMod";

		public const string version = "0.1.2";

		public static readonly Harmony harmony = new Harmony("glamorganprobe.lbol.charactor.Probe");
	}
	public class ProbeLoadouts
	{
		public static string UltimateSkillA = "ProbeUltA";

		public static string UltimateSkillB = "ProbeUltB";

		public static string ExhibitA = "ProbeInitialExhibitW";

		public static string ExhibitB = "ProbeInitialExhibitB";

		public static List<string> DeckA = new List<string> { "Shoot", "Shoot", "Boundary", "Boundary", "ProbeAttackW", "ProbeAttackW", "ProbeBlockB", "ProbeBlockB", "ProbeBlockB", "ProbeGatewaySupport" };

		public static List<string> DeckB = new List<string>
		{
			"Shoot", "Shoot", "Boundary", "Boundary", "ProbeAttackB", "ProbeAttackB", "ProbeBlockW", "ProbeBlockW", "ProbeBlockW", "ProbeBC",
			"ProbePylon"
		};

		public static PlayerUnitConfig playerUnitConfig;

		static ProbeLoadouts()
		{
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_0194: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: 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 = 2;
			((ManaGroup)(ref val)).Black = 0;
			((ManaGroup)(ref val)).Red = 0;
			((ManaGroup)(ref val)).Green = 0;
			((ManaGroup)(ref val)).Colorless = 0;
			((ManaGroup)(ref val)).Philosophy = 0;
			ManaGroup val2 = val;
			playerUnitConfig = new PlayerUnitConfig(modUniqueID, true, "", 0, 8, num, true, (int?)null, (ManaColor)1, (ManaColor)2, val2, "#edb035", 80, 80, 0, UltimateSkillA, UltimateSkillB, ExhibitA, ExhibitB, (IReadOnlyList<string>)DeckA, (IReadOnlyList<string>)DeckB, 1, 1);
		}
	}
	public sealed class ProbeModDef : PlayerUnitTemplate
	{
		[EntityLogic(typeof(ProbeModDef))]
		public sealed class ProbeMod : PlayerUnit
		{
		}

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

		public override IdContainer GetId()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			return IdContainer.op_Implicit(BepinexPlugin.modUniqueID);
		}

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

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

		public override PlayerUnitConfig MakeConfig()
		{
			return ProbeLoadouts.playerUnitConfig;
		}
	}
	internal class WatermarkWrapper
	{
		[MethodImpl(MethodImplOptions.NoInlining)]
		internal static void ActivateWatermark()
		{
			API.ActivateWatermark();
		}
	}
}
namespace ProbeMod.ProbeUlt
{
	public sealed class ProbeUltADef : ProbeUltTemplate
	{
		public override UltimateSkillConfig MakeConfig()
		{
			UltimateSkillConfig defaulUltConfig = GetDefaulUltConfig();
			defaulUltConfig.Damage = 20;
			defaulUltConfig.RelativeCards = new List<string> { "ProbeZealotCharge" };
			return defaulUltConfig;
		}
	}
	[EntityLogic(typeof(ProbeUltADef))]
	public sealed class ProbeUltA : UltimateSkill
	{
		public ProbeUltA()
		{
			((UltimateSkill)this).TargetType = (TargetType)1;
			((UltimateSkill)this).GunName = GunNameID.GetGunFromId(4158);
		}

		protected override IEnumerable<BattleAction> Actions(UnitSelector selector)
		{
			AudioManager.GuardedGetInstance().FixedPlaySfx(ProbeSFXTemplate.GetSfxId<ProbeSFXUltADef>());
			EnemyUnit enemy = selector.GetEnemy(((UltimateSkill)this).Battle);
			yield return (BattleAction)new DamageAction((Unit)(object)((UltimateSkill)this).Owner, (Unit)(object)enemy, ((UltimateSkill)this).Damage, "Instant", (GunType)0);
			yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<ProbeZealotCharge>(((UltimateSkill)this).Battle.CardsToFull, false), (AddCardsType)0);
		}
	}
	public sealed class ProbeUltBDef : ProbeUltTemplate
	{
		public override UltimateSkillConfig MakeConfig()
		{
			UltimateSkillConfig defaulUltConfig = GetDefaulUltConfig();
			defaulUltConfig.Damage = 5;
			defaulUltConfig.Value1 = 10;
			defaulUltConfig.RelativeCards = new List<string> { "ProbeZealotCharge" };
			return defaulUltConfig;
		}
	}
	[EntityLogic(typeof(ProbeUltBDef))]
	public sealed class ProbeUltB : UltimateSkill
	{
		public ProbeUltB()
		{
			((UltimateSkill)this).TargetType = (TargetType)3;
			((UltimateSkill)this).GunName = GunNameID.GetGunFromId(4158);
		}

		protected override IEnumerable<BattleAction> Actions(UnitSelector selector)
		{
			AudioManager.GuardedGetInstance().FixedPlaySfx(ProbeSFXTemplate.GetSfxId<ProbeSFXUltBDef>());
			yield return (BattleAction)new AddCardsToHandAction((Card[])(object)new Card[1] { Library.CreateCard<ProbeZealotCharge>() });
			for (int i = 0; i < ((UltimateSkill)this).Value1; i++)
			{
				if (((UltimateSkill)this).Battle.BattleShouldEnd)
				{
					break;
				}
				EnemyUnit enemy = selector.GetEnemy(((UltimateSkill)this).Battle);
				yield return (BattleAction)new DamageAction((Unit)(object)((UltimateSkill)this).Owner, (Unit)(object)enemy, ((UltimateSkill)this).Damage, "Instant", (GunType)0);
			}
		}
	}
	public class ProbeUltTemplate : 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(ProbeDefaultConfig.DefaultID((EntityDefinition)(object)this));
		}

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

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

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

		public UltimateSkillConfig GetDefaulUltConfig()
		{
			return ProbeDefaultConfig.DefaultUltConfig();
		}
	}
}
namespace ProbeMod.StatusEffects
{
	public sealed class ProbeBuildingKeywordSeDef : ProbeStatusEffectTemplate
	{
		public override Sprite LoadSprite()
		{
			return null;
		}
	}
	[EntityLogic(typeof(ProbeBuildingKeywordSeDef))]
	public sealed class ProbeBuildingKeywordSe : StatusEffect
	{
	}
	public sealed class ProbeProtossWarriorKeywordSeDef : ProbeStatusEffectTemplate
	{
		public override Sprite LoadSprite()
		{
			return null;
		}
	}
	[EntityLogic(typeof(ProbeProtossWarriorKeywordSeDef))]
	public sealed class ProbeProtossWarriorKeywordSe : StatusEffect
	{
	}
	public sealed class ProbeTrapKeywordSeDef : ProbeStatusEffectTemplate
	{
		public override Sprite LoadSprite()
		{
			return null;
		}
	}
	[EntityLogic(typeof(ProbeTrapKeywordSeDef))]
	public sealed class ProbeTrapKeywordSe : StatusEffect
	{
	}
	public sealed class ProbeXelnagaArtifactKeywordSeDef : ProbeStatusEffectTemplate
	{
		public override Sprite LoadSprite()
		{
			return null;
		}
	}
	[EntityLogic(typeof(ProbeXelnagaArtifactKeywordSeDef))]
	public sealed class ProbeXelnagaArtifactKeywordSe : StatusEffect
	{
	}
	public sealed class ProbeEnhanceSeDef : ProbeStatusEffectTemplate
	{
		public override Sprite LoadSprite()
		{
			return null;
		}
	}
	[EntityLogic(typeof(ProbeEnhanceSeDef))]
	public sealed class ProbeEnhanceSe : StatusEffect
	{
	}
	public sealed class ProbeChronoFieldSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)0;
			defaultStatusEffectConfig.HasLevel = true;
			defaultStatusEffectConfig.LimitStackType = (StackType)0;
			defaultStatusEffectConfig.HasDuration = false;
			defaultStatusEffectConfig.HasCount = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeChronoFieldSeDef))]
	public sealed class ProbeChronoFieldSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).HandleOwnerEvent<CardEventArgs>(((StatusEffect)this).Battle.CardDrawn, (GameEventHandler<CardEventArgs>)OnCardDrawn);
		}

		private void OnCardDrawn(CardEventArgs args)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Invalid comparison between Unknown and I4
			if ((int)args.Card.CardType == 5)
			{
				Card card = args.Card;
				card.Loyalty += ((StatusEffect)this).Level;
			}
		}
	}
	public sealed class ProbeExpandSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)0;
			defaultStatusEffectConfig.HasLevel = true;
			defaultStatusEffectConfig.LimitStackType = (StackType)0;
			defaultStatusEffectConfig.HasDuration = false;
			defaultStatusEffectConfig.HasCount = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeExpandSeDef))]
	public sealed class ProbeExpandSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarting, (EventSequencedReactor<UnitEventArgs>)OnTurnStarting);
		}

		private IEnumerable<BattleAction> OnTurnStarting(UnitEventArgs args)
		{
			for (int i = 0; i < ((StatusEffect)this).Level; i++)
			{
				ManaGroup value = ManaGroup.Single(CollectionsExtensions.Sample<ManaColor>((IEnumerable<ManaColor>)ManaColors.Colors, ((GameEntity)this).GameRun.BattleRng));
				yield return (BattleAction)new GainManaAction(value);
			}
		}
	}
	public sealed class ProbeNoMissSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)2;
			defaultStatusEffectConfig.HasLevel = false;
			defaultStatusEffectConfig.LimitStackType = (StackType)0;
			defaultStatusEffectConfig.HasDuration = false;
			defaultStatusEffectConfig.HasCount = true;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeNoMissSeDef))]
	public sealed class ProbeNoMissSe : StatusEffect
	{
		public int Money = 15;

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).Count = Money;
			((StatusEffect)this).ReactOwnerEvent<DamageEventArgs>(((StatusEffect)this).Owner.DamageTaking, (EventSequencedReactor<DamageEventArgs>)OnDamaged);
			((StatusEffect)this).ReactOwnerEvent<GameEventArgs>(((StatusEffect)this).Battle.BattleEnding, (EventSequencedReactor<GameEventArgs>)OnBattleEnding);
		}

		private IEnumerable<BattleAction> OnDamaged(DamageEventArgs args)
		{
			DamageInfo damageInfo = args.DamageInfo;
			if (!((DamageInfo)(ref damageInfo)).ZeroDamage)
			{
				yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
			}
		}

		private IEnumerable<BattleAction> OnBattleEnding(GameEventArgs args)
		{
			yield return (BattleAction)new GainMoneyAction(Money, (SpecialSourceType)0);
		}
	}
	public sealed class ProbeNoShootSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)2;
			defaultStatusEffectConfig.HasLevel = false;
			defaultStatusEffectConfig.LimitStackType = (StackType)0;
			defaultStatusEffectConfig.HasDuration = false;
			defaultStatusEffectConfig.HasCount = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeNoShootSeDef))]
	public sealed class ProbeNoShootSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<CardUsingEventArgs>(((StatusEffect)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed);
			((StatusEffect)this).ReactOwnerEvent<GameEventArgs>(((StatusEffect)this).Battle.BattleEnding, (EventSequencedReactor<GameEventArgs>)OnBattleEnding);
		}

		private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs args)
		{
			if ((int)args.Card.CardType == 1)
			{
				yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
			}
		}

		private IEnumerable<BattleAction> OnBattleEnding(GameEventArgs args)
		{
			List<Card> list = ((GameEntity)this).GameRun.BaseDeck.Where((Card card2) => card2.CanUpgradeAndPositive).ToList();
			if (list.Count <= 0)
			{
				yield break;
			}
			Card card3 = CollectionsExtensions.Sample<Card>((IEnumerable<Card>)list, ((GameEntity)this).GameRun.GameRunEventRng);
			((GameEntity)this).GameRun.UpgradeDeckCard(card3, false);
			foreach (Card item in ((StatusEffect)this).Battle.EnumerateAllCards())
			{
				if (item.InstanceId == card3.InstanceId)
				{
					if (item.CanUpgrade)
					{
						yield return (BattleAction)new UpgradeCardAction(item);
					}
					break;
				}
			}
		}
	}
	public sealed class ProbeNoBlockSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)2;
			defaultStatusEffectConfig.HasLevel = false;
			defaultStatusEffectConfig.LimitStackType = (StackType)0;
			defaultStatusEffectConfig.HasDuration = false;
			defaultStatusEffectConfig.HasCount = true;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeNoBlockSeDef))]
	public sealed class ProbeNoBlockSe : StatusEffect
	{
		public int Life => 5;

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).Count = Life;
			((StatusEffect)this).ReactOwnerEvent<BlockShieldEventArgs>(((StatusEffect)this).Owner.BlockShieldGained, (EventSequencedReactor<BlockShieldEventArgs>)OnGainBlockShield);
			((StatusEffect)this).ReactOwnerEvent<GameEventArgs>(((StatusEffect)this).Battle.BattleEnding, (EventSequencedReactor<GameEventArgs>)OnBattleEnding);
		}

		private IEnumerable<BattleAction> OnGainBlockShield(BlockShieldEventArgs args)
		{
			if (args.Block > 0f || args.Shield > 0f)
			{
				yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
			}
		}

		private IEnumerable<BattleAction> OnBattleEnding(GameEventArgs args)
		{
			((GameEntity)this).GameRun.GainMaxHp(Life, true, true);
			yield return (BattleAction)(object)PerformAction.Sfx("Shengyan", 0f);
		}
	}
	public sealed class ProbeGouSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)1;
			defaultStatusEffectConfig.HasLevel = false;
			defaultStatusEffectConfig.IsStackable = false;
			defaultStatusEffectConfig.HasDuration = false;
			defaultStatusEffectConfig.HasCount = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeGouSeDef))]
	public sealed class ProbeGouSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarting, (EventSequencedReactor<UnitEventArgs>)OnTurnStarting);
		}

		private IEnumerable<BattleAction> OnTurnStarting(UnitEventArgs args)
		{
			yield return ((StatusEffect)this).BuffAction<CantDrawThisTurn>(0, 0, 0, 0, 0.2f);
			yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
		}
	}
	public sealed class ProbeHardenedShieldSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)0;
			defaultStatusEffectConfig.HasLevel = true;
			defaultStatusEffectConfig.LevelStackType = (StackType)2;
			defaultStatusEffectConfig.HasDuration = false;
			defaultStatusEffectConfig.HasCount = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeHardenedShieldSeDef))]
	public sealed class ProbeHardenedShieldSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnStarted);
			((StatusEffect)this).ReactOwnerEvent<DamageEventArgs>(((Unit)((StatusEffect)this).Battle.Player).DamageTaking, (EventSequencedReactor<DamageEventArgs>)OnDamageTaking);
		}

		private IEnumerable<BattleAction> OnDamageTaking(DamageEventArgs args)
		{
			DamageInfo damageInfo2 = args.DamageInfo;
			float damageBlocked = ((DamageInfo)(ref damageInfo2)).DamageBlocked;
			damageInfo2 = args.DamageInfo;
			_ = damageBlocked + ((DamageInfo)(ref damageInfo2)).DamageShielded;
			bool hasBlockOrShield = ((Unit)((StatusEffect)this).Battle.Player).Block > 0 || ((Unit)((StatusEffect)this).Battle.Player).Shield > 0;
			DamageInfo damageInfo = args.DamageInfo;
			if (hasBlockOrShield && ((DamageInfo)(ref damageInfo)).Amount > (float)((StatusEffect)this).Level)
			{
				if (((DamageInfo)(ref damageInfo)).DamageBlocked > (float)((StatusEffect)this).Level)
				{
					((DamageInfo)(ref damageInfo)).DamageBlocked = ((StatusEffect)this).Level;
					((DamageInfo)(ref damageInfo)).DamageShielded = 0f;
					((DamageInfo)(ref damageInfo)).Damage = 0f;
				}
				else if (((DamageInfo)(ref damageInfo)).DamageShielded + ((DamageInfo)(ref damageInfo)).DamageBlocked > (float)((StatusEffect)this).Level)
				{
					((DamageInfo)(ref damageInfo)).DamageShielded = (float)((StatusEffect)this).Level - ((DamageInfo)(ref damageInfo)).DamageBlocked;
					((DamageInfo)(ref damageInfo)).Damage = 0f;
				}
				else
				{
					((DamageInfo)(ref damageInfo)).Damage = (float)((StatusEffect)this).Level - ((DamageInfo)(ref damageInfo)).DamageBlocked - ((DamageInfo)(ref damageInfo)).DamageShielded;
				}
			}
			args.DamageInfo = damageInfo;
			yield break;
		}

		private IEnumerable<BattleAction> OnPlayerTurnStarted(UnitEventArgs args)
		{
			yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
		}
	}
	public sealed class ProbeMangSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)1;
			defaultStatusEffectConfig.HasLevel = false;
			defaultStatusEffectConfig.LimitStackType = (StackType)0;
			defaultStatusEffectConfig.HasDuration = false;
			defaultStatusEffectConfig.HasCount = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeMangSeDef))]
	public sealed class ProbeMangSe : StatusEffect
	{
		public override string PreventCardUsageMessage => "键盘上只剩下F2A了。";

		public override bool ShouldPreventCardUsage(Card card)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			return (int)card.CardType != 1;
		}
	}
	public sealed class ProbeNoRewardsSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)2;
			defaultStatusEffectConfig.HasLevel = false;
			defaultStatusEffectConfig.LimitStackType = (StackType)0;
			defaultStatusEffectConfig.HasDuration = false;
			defaultStatusEffectConfig.HasCount = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeNoRewardsSeDef))]
	public sealed class ProbeNoRewardsSe : StatusEffect
	{
	}
	public sealed class ProbePlasmaSurgeSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)0;
			defaultStatusEffectConfig.HasLevel = true;
			defaultStatusEffectConfig.LimitStackType = (StackType)0;
			defaultStatusEffectConfig.HasDuration = false;
			defaultStatusEffectConfig.HasCount = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbePlasmaSurgeSeDef))]
	public sealed class ProbePlasmaSurgeSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<ManaEventArgs>(((StatusEffect)this).Battle.ManaConsumed, (EventSequencedReactor<ManaEventArgs>)OnManaConsumed);
		}

		private IEnumerable<BattleAction> OnManaConsumed(ManaEventArgs args)
		{
			ManaGroup value = args.Value;
			int count = ((ManaGroup)(ref value)).Total;
			yield return (BattleAction)new CastBlockShieldAction(((StatusEffect)this).Owner, ((StatusEffect)this).Owner, ((StatusEffect)this).Level * count, 0, (BlockShieldType)1, true);
		}
	}
	public sealed class ProbeReversalFragilSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)0;
			defaultStatusEffectConfig.HasLevel = false;
			defaultStatusEffectConfig.DurationStackType = (StackType)0;
			defaultStatusEffectConfig.DurationDecreaseTiming = (DurationDecreaseTiming)3;
			defaultStatusEffectConfig.HasDuration = true;
			defaultStatusEffectConfig.HasCount = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeReversalFragilSeDef))]
	public sealed class ProbeReversalFragilSe : StatusEffect
	{
		[UsedImplicitly]
		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)
		{
			((StatusEffect)this).HandleOwnerEvent<BlockShieldEventArgs>(unit.BlockShieldGaining, (GameEventHandler<BlockShieldEventArgs>)OnBlockGaining);
		}

		private void OnBlockGaining(BlockShieldEventArgs args)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Invalid comparison between Unknown and I4
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Invalid comparison between Unknown and I4
			if ((int)((GameEventArgs)args).Cause == 1 || (int)((GameEventArgs)args).Cause == 20)
			{
				float num = 1f + (float)Value / 100f;
				if ((int)args.Type != 2)
				{
					args.Block *= num;
					args.Shield *= num;
				}
			}
		}
	}
	public sealed class ProbeReversalVulnerableSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)0;
			defaultStatusEffectConfig.HasLevel = false;
			defaultStatusEffectConfig.DurationStackType = (StackType)0;
			defaultStatusEffectConfig.DurationDecreaseTiming = (DurationDecreaseTiming)3;
			defaultStatusEffectConfig.HasDuration = true;
			defaultStatusEffectConfig.HasCount = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeReversalVulnerableSeDef))]
	public sealed class ProbeReversalVulnerableSe : StatusEffect
	{
		[UsedImplicitly]
		public int Value
		{
			get
			{
				GameRunController gameRun = ((GameEntity)this).GameRun;
				if (gameRun == null)
				{
					return 50;
				}
				return 50 + ((((StatusEffect)this).Owner is PlayerUnit) ? gameRun.PlayerVulnerableExtraPercentage : gameRun.EnemyVulnerableExtraPercentage);
			}
		}

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).HandleOwnerEvent<DamageEventArgs>(unit.DamageReceiving, (GameEventHandler<DamageEventArgs>)OnDamageReceiving);
		}

		private void OnDamageReceiving(DamageEventArgs args)
		{
			//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
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			DamageInfo damageInfo = args.DamageInfo;
			if ((int)((DamageInfo)(ref damageInfo)).DamageType == 2)
			{
				((DamageInfo)(ref damageInfo)).Damage = ((DamageInfo)(ref damageInfo)).Amount * (1f - (float)Value / 100f);
				args.DamageInfo = damageInfo;
				((GameEventArgs)args).AddModifier((GameEntity)(object)this);
			}
		}
	}
	public sealed class ProbeReversalWeakSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)0;
			defaultStatusEffectConfig.HasLevel = false;
			defaultStatusEffectConfig.DurationStackType = (StackType)0;
			defaultStatusEffectConfig.DurationDecreaseTiming = (DurationDecreaseTiming)3;
			defaultStatusEffectConfig.HasDuration = true;
			defaultStatusEffectConfig.HasCount = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeReversalWeakSeDef))]
	public sealed class ProbeReversalWeakSe : StatusEffect
	{
		[UsedImplicitly]
		public int Value
		{
			get
			{
				GameRunController gameRun = ((GameEntity)this).GameRun;
				if (gameRun == null || !(((StatusEffect)this).Owner is EnemyUnit))
				{
					return 30;
				}
				return Math.Min(30 + gameRun.WeakExtraPercentage, 100);
			}
		}

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).HandleOwnerEvent<DamageDealingEventArgs>(unit.DamageDealing, (GameEventHandler<DamageDealingEventArgs>)OnDamageDealing);
		}

		private void OnDamageDealing(DamageDealingEventArgs args)
		{
			//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
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			DamageInfo damageInfo = args.DamageInfo;
			if ((int)((DamageInfo)(ref damageInfo)).DamageType == 2)
			{
				((DamageInfo)(ref damageInfo)).Damage = ((DamageInfo)(ref damageInfo)).Amount * (1f + (float)Value / 100f);
				args.DamageInfo = damageInfo;
				((GameEventArgs)args).AddModifier((GameEntity)(object)this);
			}
		}
	}
	public sealed class ProbeReversalInvincibleEternalSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)1;
			defaultStatusEffectConfig.HasLevel = false;
			defaultStatusEffectConfig.DurationStackType = (StackType)0;
			defaultStatusEffectConfig.DurationDecreaseTiming = (DurationDecreaseTiming)3;
			defaultStatusEffectConfig.HasDuration = true;
			defaultStatusEffectConfig.HasCount = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeReversalInvincibleEternalSeDef))]
	public sealed class ProbeReversalInvincibleEternalSe : StatusEffect
	{
		public override string UnitEffectName => "InvincibleLoop";

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).HandleOwnerEvent<HealEventArgs>(unit.HealingReceiving, (GameEventHandler<HealEventArgs>)OnHealingReceiving);
		}

		private void OnHealingReceiving(HealEventArgs args)
		{
			int num = MathExtensions.RoundToInt(args.Amount);
			if (num > 1)
			{
				((StatusEffect)this).NotifyActivating();
				args.Amount = 1f;
				((GameEventArgs)args).AddModifier((GameEntity)(object)this);
			}
		}
	}
	public sealed class ProbeReversalLimitedDamageSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)2;
			defaultStatusEffectConfig.HasLevel = false;
			defaultStatusEffectConfig.HasDuration = false;
			defaultStatusEffectConfig.HasCount = true;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeReversalLimitedDamageSeDef))]
	public sealed class ProbeReversalLimitedDamageSe : StatusEffect
	{
		private int _internalCount;

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).Highlight = true;
			((StatusEffect)this).Count = 200;
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(unit.TurnStarting, (EventSequencedReactor<UnitEventArgs>)OnTurnStarting);
		}

		private IEnumerable<BattleAction> OnTurnStarting(UnitEventArgs args)
		{
			if (((StatusEffect)this).Owner != null && !((StatusEffect)this).Battle.BattleShouldEnd)
			{
				((StatusEffect)this).NotifyActivating();
				yield return (BattleAction)(object)DamageAction.Reaction(((StatusEffect)this).Owner, ((StatusEffect)this).Count, "Instant");
			}
		}
	}
	public sealed class ProbeNextTurnZealotSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)0;
			defaultStatusEffectConfig.HasLevel = true;
			defaultStatusEffectConfig.LimitStackType = (StackType)0;
			defaultStatusEffectConfig.HasDuration = false;
			defaultStatusEffectConfig.HasCount = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeNextTurnZealotSeDef))]
	public sealed class ProbeNextTurnZealotSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnStarted);
		}

		private IEnumerable<BattleAction> OnPlayerTurnStarted(UnitEventArgs args)
		{
			yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<ProbeZealotCharge>(((StatusEffect)this).Level, false), (AddCardsType)0);
			yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
		}
	}
	public sealed class ProbeNextTurnStalkerSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)0;
			defaultStatusEffectConfig.HasLevel = true;
			defaultStatusEffectConfig.LimitStackType = (StackType)0;
			defaultStatusEffectConfig.HasDuration = false;
			defaultStatusEffectConfig.HasCount = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeNextTurnStalkerSeDef))]
	public sealed class ProbeNextTurnStalkerSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnStarted);
		}

		private IEnumerable<BattleAction> OnPlayerTurnStarted(UnitEventArgs args)
		{
			yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<ProbeStalker>(((StatusEffect)this).Level, false), (AddCardsType)0);
			yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
		}
	}
	public sealed class ProbeTouSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)0;
			defaultStatusEffectConfig.HasLevel = false;
			defaultStatusEffectConfig.IsStackable = false;
			defaultStatusEffectConfig.HasDuration = false;
			defaultStatusEffectConfig.HasCount = true;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeTouSeDef))]
	public sealed class ProbeTouSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnStarted);
		}

		private IEnumerable<BattleAction> OnPlayerTurnStarted(UnitEventArgs args)
		{
			if (((StatusEffect)this).Count > 0)
			{
				int count = ((StatusEffect)this).Count;
				((StatusEffect)this).Count = count - 1;
				yield break;
			}
			ProbeMothership mothership = Library.CreateCard<ProbeMothership>();
			((Card)mothership).Summon();
			yield return (BattleAction)new AddCardsToHandAction((Card[])(object)new Card[1] { mothership });
			yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)Library.CreateCards<ProbeCarrier>(2, false), (AddCardsType)0);
		}
	}
	public sealed class ProbeTurtleStyleSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)1;
			defaultStatusEffectConfig.HasLevel = false;
			defaultStatusEffectConfig.LimitStackType = (StackType)0;
			defaultStatusEffectConfig.HasDuration = false;
			defaultStatusEffectConfig.HasCount = true;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeTurtleStyleSeDef))]
	public sealed class ProbeTurtleStyleSe : StatusEffect
	{
		public override string PreventCardUsageMessage => LocalizationExtensions.Localize("ErrorChat.CardCharm", true);

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).Count = ((StatusEffect)this).Limit;
			((StatusEffect)this).HandleOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarting, (GameEventHandler<UnitEventArgs>)delegate
			{
				((StatusEffect)this).Count = ((StatusEffect)this).Limit;
				((StatusEffect)this).Highlight = false;
			});
			((StatusEffect)this).HandleOwnerEvent<CardUsingEventArgs>(((StatusEffect)this).Battle.CardUsed, (GameEventHandler<CardUsingEventArgs>)OnCardUsed);
		}

		private void OnCardUsed(CardUsingEventArgs args)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Invalid comparison between Unknown and I4
			if ((int)args.Card.CardType == 1)
			{
				((StatusEffect)this).Count = ((StatusEffect)this).Limit - ((StatusEffect)this).Battle.TurnCardUsageHistory.Count((Card c) => (int)c.CardType == 1);
				if (((StatusEffect)this).Count <= 1)
				{
					((StatusEffect)this).Highlight = true;
				}
			}
		}

		public override bool ShouldPreventCardUsage(Card card)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Invalid comparison between Unknown and I4
			return ((StatusEffect)this).Count <= 0 && (int)card.CardType == 1;
		}
	}
	public sealed class ProbeNextTurnPowerSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)0;
			defaultStatusEffectConfig.HasLevel = true;
			defaultStatusEffectConfig.LimitStackType = (StackType)0;
			defaultStatusEffectConfig.HasDuration = false;
			defaultStatusEffectConfig.HasCount = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeNextTurnPowerSeDef))]
	public sealed class ProbeNextTurnPowerSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnStarted);
		}

		private IEnumerable<BattleAction> OnPlayerTurnStarted(UnitEventArgs args)
		{
			yield return ((StatusEffect)this).BuffAction<Firepower>(((StatusEffect)this).Level, 0, 0, 0, 0.2f);
			yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
		}
	}
	public sealed class ProbeNextTurnSpiritSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)0;
			defaultStatusEffectConfig.HasLevel = true;
			defaultStatusEffectConfig.LimitStackType = (StackType)0;
			defaultStatusEffectConfig.HasDuration = false;
			defaultStatusEffectConfig.HasCount = false;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeNextTurnSpiritSeDef))]
	public sealed class ProbeNextTurnSpiritSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnStarted);
		}

		private IEnumerable<BattleAction> OnPlayerTurnStarted(UnitEventArgs args)
		{
			yield return ((StatusEffect)this).BuffAction<Spirit>(((StatusEffect)this).Level, 0, 0, 0, 0.2f);
			yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f);
		}
	}
	public sealed class ProbeWengSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)0;
			defaultStatusEffectConfig.LevelStackType = (StackType)0;
			defaultStatusEffectConfig.HasLevel = true;
			defaultStatusEffectConfig.IsStackable = false;
			defaultStatusEffectConfig.HasDuration = false;
			defaultStatusEffectConfig.HasCount = false;
			defaultStatusEffectConfig.IsStackable = true;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeWengSeDef))]
	public sealed class ProbeWengSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((Unit)((StatusEffect)this).Battle.Player).TurnStarting, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnStarted);
		}

		private IEnumerable<BattleAction> OnPlayerTurnStarted(UnitEventArgs args)
		{
			ScryInfo val = default(ScryInfo);
			((ScryInfo)(ref val)).Count = ((StatusEffect)this).Level;
			yield return (BattleAction)new ScryAction(val);
		}
	}
	public sealed class ProbeEndBattleHealSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)0;
			defaultStatusEffectConfig.LevelStackType = (StackType)0;
			defaultStatusEffectConfig.HasLevel = true;
			defaultStatusEffectConfig.IsStackable = false;
			defaultStatusEffectConfig.HasDuration = false;
			defaultStatusEffectConfig.HasCount = false;
			defaultStatusEffectConfig.IsStackable = true;
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeEndBattleHealSeDef))]
	public sealed class ProbeEndBattleHealSe : StatusEffect
	{
		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<GameEventArgs>(((StatusEffect)this).Battle.BattleEnding, (EventSequencedReactor<GameEventArgs>)OnBattleEnding);
		}

		private IEnumerable<BattleAction> OnBattleEnding(GameEventArgs args)
		{
			yield return (BattleAction)new HealAction((Unit)(object)((StatusEffect)this).Battle.Player, (Unit)(object)((StatusEffect)this).Battle.Player, ((StatusEffect)this).Level, (HealType)0, 0.2f);
		}
	}
	public sealed class ProbeXelnagaArtifactSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.Type = (StatusEffectType)2;
			defaultStatusEffectConfig.LevelStackType = (StackType)3;
			defaultStatusEffectConfig.HasLevel = false;
			defaultStatusEffectConfig.IsStackable = true;
			defaultStatusEffectConfig.HasDuration = false;
			defaultStatusEffectConfig.HasCount = false;
			defaultStatusEffectConfig.RelativeEffects = new List<string> { "ProbeXelnagaArtifactKeywordSe" };
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeXelnagaArtifactSeDef))]
	public sealed class ProbeXelnagaArtifactSe : StatusEffect
	{
		public int Value1 => 3;

		protected override void OnAdded(Unit unit)
		{
			((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnEnded, (EventSequencedReactor<UnitEventArgs>)OnTurnEnd);
		}

		private IEnumerable<BattleAction> OnTurnEnd(UnitEventArgs args)
		{
			if (((GameEntity)this).GameRun.Player.Exhibits.Any((Exhibit e) => e.Config.RelativeEffects.Any((string s) => s == "ProbeXelnagaArtifactKeywordSe")) && ((GameEntity)this).GameRun.BaseDeck.Any((Card c) => c.Config.RelativeEffects.Any((string s) => s == "ProbeXelnagaArtifactKeywordSe")))
			{
				yield return ((StatusEffect)this).BuffAction<Firepower>(Value1, 0, 0, 0, 0.2f);
				yield return ((StatusEffect)this).BuffAction<Spirit>(Value1, 0, 0, 0, 0.2f);
			}
		}
	}
	public sealed class ProbeTurnGainSpiritSeDef : ProbeStatusEffectTemplate
	{
		public override StatusEffectConfig MakeConfig()
		{
			StatusEffectConfig defaultStatusEffectConfig = ProbeStatusEffectTemplate.GetDefaultStatusEffectConfig();
			defaultStatusEffectConfig.RelativeEffects = new List<string> { "Spirit" };
			return defaultStatusEffectConfig;
		}
	}
	[EntityLogic(typeof(ProbeTurnGainSpiritSeDef))]
	public sealed class ProbeTurnGainSpiritSe : 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 ((StatusEffect)this).BuffAction<Spirit>(((StatusEffect)this).Level, 0, 0, 0, 0.2f);
		}
	}
	public class ProbeStatusEffectTemplate : 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(ProbeDefaultConfig.DefaultID((EntityDefinition)(object)this));
		}

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

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

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

		public static StatusEffectConfig GetDefaultStatusEffectConfig()
		{
			return ProbeDefaultConfig.DefaultStatusEffectConfig();
		}
	}
}
namespace ProbeMod.SFX
{
	public sealed class ProbeSFXArtanisTestDef : ProbeSFXTemplate
	{
		public override SfxConfig MakeConfig()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			SfxConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Name = IdContainer.op_Implicit(((EntityDefinition)this).UniqueId);
			cardDefaultConfig.Folder = "";
			cardDefaultConfig.Path = "ProbeSFXArtanisTest.ogg";
			return cardDefaultConfig;
		}
	}
	public sealed class ProbeSFXColossusDef : ProbeSFXTemplate
	{
		public override SfxConfig MakeConfig()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			SfxConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Name = IdContainer.op_Implicit(((EntityDefinition)this).UniqueId);
			cardDefaultConfig.Folder = "";
			cardDefaultConfig.Path = "ProbeSFXColossus.ogg";
			return cardDefaultConfig;
		}
	}
	public sealed class ProbeSFXHardenedShieldDef : ProbeSFXTemplate
	{
		public override SfxConfig MakeConfig()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			SfxConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Name = IdContainer.op_Implicit(((EntityDefinition)this).UniqueId);
			cardDefaultConfig.Folder = "";
			cardDefaultConfig.Path = "ProbeSFXHardenedShield.ogg";
			return cardDefaultConfig;
		}
	}
	public sealed class ProbeSFXMothershipDef : ProbeSFXTemplate
	{
		public override SfxConfig MakeConfig()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			SfxConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Name = IdContainer.op_Implicit(((EntityDefinition)this).UniqueId);
			cardDefaultConfig.Folder = "";
			cardDefaultConfig.Path = "ProbeSFXMothership.ogg";
			return cardDefaultConfig;
		}
	}
	public sealed class ProbeSFXStalkerDef : ProbeSFXTemplate
	{
		public override SfxConfig MakeConfig()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			SfxConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Name = IdContainer.op_Implicit(((EntityDefinition)this).UniqueId);
			cardDefaultConfig.Folder = "";
			cardDefaultConfig.Path = "ProbeSFXStalker.ogg";
			return cardDefaultConfig;
		}
	}
	public sealed class ProbeSFXUltADef : ProbeSFXTemplate
	{
		public override SfxConfig MakeConfig()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			SfxConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Name = IdContainer.op_Implicit(((EntityDefinition)this).UniqueId);
			cardDefaultConfig.Folder = "";
			cardDefaultConfig.Path = "ProbeSFXUltA.ogg";
			return cardDefaultConfig;
		}
	}
	public sealed class ProbeSFXUltBDef : ProbeSFXTemplate
	{
		public override SfxConfig MakeConfig()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			SfxConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Name = IdContainer.op_Implicit(((EntityDefinition)this).UniqueId);
			cardDefaultConfig.Folder = "";
			cardDefaultConfig.Path = "ProbeSFXUltB.ogg";
			return cardDefaultConfig;
		}
	}
	public sealed class ProbeSFXZealotDef : ProbeSFXTemplate
	{
		public override SfxConfig MakeConfig()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			SfxConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Name = IdContainer.op_Implicit(((EntityDefinition)this).UniqueId);
			cardDefaultConfig.Folder = "";
			cardDefaultConfig.Path = "ProbeSFXZealot.ogg";
			return cardDefaultConfig;
		}
	}
}
namespace ProbeMod.SFX.Template
{
	public abstract class ProbeSFXTemplate : SfxTemplate
	{
		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(ProbeDefaultConfig.DefaultID((EntityDefinition)(object)this));
		}

		public override List<UniTask<AudioClip>> LoadSfxListAsync()
		{
			return ProbeAudioClipLoader.LoadOggSFXs(this);
		}

		public SfxConfig GetCardDefaultConfig()
		{
			return ((SfxTemplate)this).DefaultConfig();
		}

		public static string GetSfxId<T>() where T : ProbeSFXTemplate
		{
			string name = typeof(T).Name;
			return name.Remove(name.Length - 3);
		}
	}
	public static class ProbeAudioClipLoader
	{
		public static string file_extension = ".ogg";

		public static DirectorySource sfx_dir = new DirectorySource("glamorganprobe.lbol.charactor.Probe", "SFX");

		public static List<UniTask<AudioClip>> LoadOggSFXs(string name)
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			return new List<UniTask<AudioClip>> { ResourceLoader.LoadAudioClip(name + file_extension, (AudioType)14, sfx_dir, "file://") };
		}

		public static List<UniTask<AudioClip>> LoadOggSFXs(ProbeSFXTemplate template)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return LoadOggSFXs(IdContainer.op_Implicit(((EntityDefinition)template).GetId()));
		}

		public static void FixedPlaySfx(this AudioManager manager, string sfxName, float volume = -1f)
		{
			if (GameMaster.IsTurboMode)
			{
				manager.TurboPlaySfxHandler(sfxName, volume);
			}
			else
			{
				manager.PlaySfxHandler(sfxName, volume);
			}
		}

		public static void TurboPlaySfxHandler(this AudioManager manager, string sfxName, float volume = -1f)
		{
			if (!BasicTypeExtensions.IsNullOrEmpty(sfxName) && !(sfxName == "Empty"))
			{
				if (!manager._sfxTable.TryGetValue(sfxName, out var value))
				{
					Debug.LogWarning((object)("Sfx with name " + sfxName + " not found"));
				}
				else if (AudioSettings.dspTime > value.PreviousPlayTime + value.ReplayLimit)
				{
					manager.TurboInternalPlaySfx(value, volume);
				}
				else if (AudioSettings.dspTime > value.PreviousPlayTime + value.ReplayLimit * 0.6)
				{
					double scheduledTime = value.PreviousPlayTime + value.ReplayLimit;
					manager.TurboInternalPlaySfx(value, volume, scheduledTime);
				}
			}
		}

		public static void TurboInternalPlaySfx(this AudioManager manager, SfxEntry entry, float volume)
		{
			AudioClip sfxClip = manager.GetSfxClip(entry);
			manager.TurboPlaySfxImmediately(sfxClip, (volume > 0f) ? (volume * entry.Volume) : entry.Volume);
			entry.PreviousPlayTime = AudioSettings.dspTime;
		}

		public static void TurboInternalPlaySfx(this AudioManager manager, SfxEntry entry, float volume, double scheduledTime)
		{
			AudioClip sfxClip = manager.GetSfxClip(entry);
			manager.TurboInternalPlaySfxScheduled(sfxClip, (volume > 0f) ? volume : entry.Volume, scheduledTime);
			entry.PreviousPlayTime = scheduledTime;
		}

		public static void TurboPlaySfxImmediately(this AudioManager manager, AudioClip clip, float volume)
		{
			AudioSource val = manager._sourceHolder.AddComponent<AudioSource>();
			val.clip = clip;
			val.outputAudioMixerGroup = manager._sfxGroup;
			val.volume = volume;
			val.Play();
			Object.Destroy((Object)(object)val, val.clip.length * 2f + 1f);
		}

		public static void TurboInternalPlaySfxScheduled(this AudioManager manager, AudioClip clip, float volume, double scheduledTime)
		{
			double num = scheduledTime - AudioSettings.dspTime;
			if (num >= 0.0)
			{
				AudioSource val = manager._sourceHolder.AddComponent<AudioSource>();
				val.clip = clip;
				val.outputAudioMixerGroup = manager._sfxGroup;
				val.volume = volume;
				val.PlayScheduled(scheduledTime);
				Object.Destroy((Object)(object)val, ((float)num + val.clip.length) * 2f + 1f);
			}
			else
			{
				Debug.LogWarning((object)"一个音效的预定下次播放时间,早于当前时间,舍弃这次预定。");
			}
		}
	}
}
namespace ProbeMod.Patches
{
	[HarmonyPatch]
	internal class CustomGameEventManager
	{
		public static GameEvent<BuffAttackEventArgs> PreCustomEvent { get; set; }

		public static GameEvent<BuffAttackEventArgs> PostCustomEvent { get; set; }

		[HarmonyPatch(typeof(GameRunController), "EnterBattle")]
		private static bool Prefix(GameRunController __instance)
		{
			PreCustomEvent = new GameEvent<BuffAttackEventArgs>();
			PostCustomEvent = new GameEvent<BuffAttackEventArgs>();
			return true;
		}
	}
}
namespace ProbeMod.model
{
	public sealed class ProbeModel : UnitModelTemplate
	{
		public static bool useInGameModel = BepinexPlugin.useInGameModel;

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

		public static string spellsprite_name = "ProbeStand.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 IdContainer.op_Implicit(BepinexPlugin.modUniqueID);
		}

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

		public override ModelOption LoadModelOptions()
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Expected O, but got Unknown
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			if (useInGameModel)
			{
				return new ModelOption(ResourcesHelper.LoadSpineUnitAsync(model_name));
			}
			return new ModelOption(ResourceLoader.LoadSpriteAsync(model_name, BepinexPlugin.directorySource, 565, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://"));
		}

		public override UniTask<Sprite> LoadSpellSprite()
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			if (useInGameModel)
			{
				return ResourcesHelper.LoadSpellPortraitAsync(model_name);
			}
			return ResourceLoader.LoadSpriteAsync(spellsprite_name, BepinexPlugin.directorySource, 100, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://");
		}

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

		public static string Exhibits = "Exhibits";

		public static string PlayerUnit = "PlayerUnit";

		public static string EnemiesUnit = "EnemyUnit";

		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 EnemiesUnitBatchLoc = new BatchLocalization((IResourceSource)(object)BepinexPlugin.directorySource, typeof(EnemyUnitTemplate), EnemiesUnit, (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);
			EnemiesUnitBatchLoc.DiscoverAndLoadLocFiles(EnemiesUnit);
			UnitModelBatchLoc.DiscoverAndLoadLocFiles(UnitModel);
			UltimateSkillsBatchLoc.DiscoverAndLoadLocFiles(UltimateSkills);
			StatusEffectsBatchLoc.DiscoverAndLoadLocFiles(StatusEffects);
		}
	}
}
namespace ProbeMod.ImageLoader
{
	public sealed class ProbeImageLoader
	{
		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_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			ExhibitSprites val = new ExhibitSprites();
			val.main = ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)exhibit).GetId()) + file_extension, BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null);
			return val;
		}

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

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

		public static Sprite LoadSprite(IdContainer ID)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return ResourceLoader.LoadSprite(IdContainer.op_Implicit(ID) + file_extension, BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null);
		}
	}
}
namespace ProbeMod.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 ProbeMod.Exhibits
{
	public sealed class ProbeInitialExhibitWDef : ProbeExhibitTemplate
	{
		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 = 1;
			ManaGroup value = default(ManaGroup);
			((ManaGroup)(ref value)).White = 1;
			defaultExhibitConfig.Mana = value;
			defaultExhibitConfig.BaseManaColor = (ManaColor)1;
			defaultExhibitConfig.HasCounter = true;
			defaultExhibitConfig.InitialCounter = 0;
			return defaultExhibitConfig;
		}
	}
	[EntityLogic(typeof(ProbeInitialExhibitWDef))]
	public sealed class ProbeInitialExhibitW : ShiningExhibit
	{
		public ManaGroup GainMana
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				ManaGroup result = default(ManaGroup);
				((ManaGroup)(ref result)).White = 2;
				return result;
			}
		}

		public override bool ShowCounter => false;

		protected override void OnEnterBattle()
		{
			((Exhibit)this).Counter = 0;
			((Exhibit)this).ReactBattleEvent<CardUsingEventArgs>(((Exhibit)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed);
		}

		private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs args)
		{
			if (args.Card.IsXCost && ((Exhibit)this).Counter == 0)
			{
				((Exhibit)this).Counter = 1;
				((Exhibit)this).NotifyActivating();
				yield return (BattleAction)new GainManaAction(GainMana);
				((Exhibit)this).Blackout = true;
			}
		}

		protected override void OnLeaveBattle()
		{
			((Exhibit)this).Blackout = false;
		}
	}
	public sealed class ProbeInitialExhibitBDef : ProbeExhibitTemplate
	{
		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 = 6;
			ManaGroup value = default(ManaGroup);
			((ManaGroup)(ref value)).Blue = 1;
			defaultExhibitConfig.Mana = value;
			defaultExhibitConfig.BaseManaColor = (ManaColor)2;
			defaultExhibitConfig.RelativeEffects = new List<string>();
			return defaultExhibitConfig;
		}
	}
	[EntityLogic(typeof(ProbeInitialExhibitBDef))]
	public sealed class ProbeInitialExhibitB : ShiningExhibit
	{
		protected override void OnEnterBattle()
		{
			((Exhibit)this).ReactBattleEvent<CardUsingEventArgs>(((Exhibit)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed);
		}

		private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs args)
		{
			if (!((Exhibit)this).Battle.BattleShouldEnd && (int)args.Card.CardType == 5)
			{
				EnemyUnit randomAliveEnemy = ((Exhibit)this).Battle.RandomAliveEnemy;
				if (randomAliveEnemy != null)
				{
					((Exhibit)this).NotifyActivating();
					yield return (BattleAction)new DamageAction((Unit)(object)((Exhibit)this).Battle.Player, (Unit)(object)randomAliveEnemy, DamageInfo.Reaction((float)((Exhibit)this).Value1, false), "单发激光", (GunType)0);
				}
			}
		}
	}
	public class ProbeExhibitTemplate : 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(ProbeDefaultConfig.DefaultID((EntityDefinition)(object)this));
		}

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

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

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

		public ExhibitConfig GetDefaultExhibitConfig()
		{
			return ProbeDefaultConfig.DefaultExhibitConfig();
		}
	}
	public sealed class ProbeExhibitBrokenBKeyDef : ProbeExhibitTemplate
	{
		public override ExhibitConfig MakeConfig()
		{
			ExhibitConfig defaultExhibitConfig = GetDefaultExhibitConfig();
			defaultExhibitConfig.IsPooled = true;
			defaultExhibitConfig.Appearance = (AppearanceType)0;
			defaultExhibitConfig.Owner = null;
			defaultExhibitConfig.LosableType = (ExhibitLosableType)0;
			defaultExhibitConfig.Rarity = (Rarity)0;
			defaultExhibitConfig.Value1 = 2;
			return defaultExhibitConfig;
		}
	}
	[EntityLogic(typeof(ProbeExhibitBrokenBKeyDef))]
	public sealed class ProbeExhibitBrokenBKey : Exhibit
	{
		protected override void OnEnterBattle()
		{
			((Exhibit)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Owner).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarted);
		}

		private IEnumerable<BattleAction> OnOwnerTurnStarted(UnitEventArgs args)
		{
			if (((Unit)((Exhibit)this).Owner).TurnCounter % 2 == 1)
			{
				((Exhibit)this).NotifyActivating();
				ManaGroup battleMana = ((Exhibit)this).Battle.BattleMana;
				if (((ManaGroup)(ref battleMana)).Amount > 0)
				{
					yield return (BattleAction)(object)new ApplyStatusEffectAction<TempFirepower>((Unit)(object)((Exhibit)this).Battle.Player, (int?)2, (int?)null, (int?)null, (int?)null, 0f, true);
					((GameEntity)this).NotifyChanged();
				}
			}
			else
			{
				((Exhibit)this).NotifyActivating();
				yield return (BattleAction)(object)new ApplyStatusEffectAction<TempSpirit>((Unit)(object)((Exhibit)this).Battle.Player, (int?)2, (int?)null, (int?)null, (int?)null, 0f, true);
				((GameEntity)this).NotifyChanged();
			}
		}
	}
	public sealed class ProbeExhibitGuideDef : ProbeExhibitTemplate
	{
		public override ExhibitConfig MakeConfig()
		{
			ExhibitConfig defaultExhibitConfig = GetDefaultExhibitConfig();
			defaultExhibitConfig.IsPooled = true;
			defaultExhibitConfig.Appearance = (AppearanceType)0;
			defaultExhibitConfig.LosableType = (ExhibitLosableType)0;
			defaultExhibitConfig.Rarity = (Rarity)1;
			defaultExhibitConfig.Owner = null;
			defaultExhibitConfig.HasCounter = true;
			defaultExhibitConfig.InitialCounter = 0;
			defaultExhibitConfig.Value1 = 2;
			defaultExhibitConfig.Value2 = 100;
			defaultExhibitConfig.Value3 = 200;
			return defaultExhibitConfig;
		}
	}
	[EntityLogic(typeof(ProbeExhibitGuideDef))]
	public sealed class ProbeExhibitGuide : Exhibit
	{
		protected override void OnEnterBattle()
		{
			((Exhibit)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Battle.Player).TurnEnded, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnEnd);
			((Exhibit)this).ReactBattleEvent<CardEventArgs>(((Exhibit)this).Battle.CardExiled, (EventSequencedReactor<CardEventArgs>)OnCardExiled);
		}

		private IEnumerable<BattleAction> OnCardExiled(CardEventArgs args)
		{
			if (args.Card is ProbeZealotCharge)
			{
				int counter = ((Exhibit)this).Counter;
				((Exhibit)this).Counter = counter + 1;
			}
			if (((Exhibit)this).Counter == ((Exhibit)this).Value2)
			{
				yield return (BattleAction)new GainPowerAction(((Exhibit)this).Value3);
				((Exhibit)this).Counter = 0;
			}
		}

		private IEnumerable<BattleAction> OnPlayerTurnEnd(GameEventArgs args)
		{
			if (((Unit)((Exhibit)this).Battle.Player).TurnCounter == 1)
			{
				yield return (BattleAction)new AddCardsToDiscardAction((IEnumerable<Card>)Library.CreateCards<ProbeZealotCharge>(((Exhibit)this).Value1, false), (AddCardsType)0);
			}
		}
	}
	public sealed class ProbeExhibitKaldalisDef : ProbeExhibitTemplate
	{
		public override ExhibitConfig MakeConfig()
		{
			ExhibitConfig defaultExhibitConfig = GetDefaultExhibitConfig();
			defaultExhibitConfig.IsPooled = true;
			defaultExhibitConfig.Appearance = (AppearanceType)0;
			defaultExhibitConfig.LosableType = (ExhibitLosableType)0;
			defaultExhibitConfig.Rarity = (Rarity)1;
			defaultExhibitConfig.Owner = null;
			defaultExhibitConfig.Value1 = 4;
			defaultExhibitConfig.Value2 = 4;
			return defaultExhibitConfig;
		}
	}
	[EntityLogic(typeof(ProbeExhibitKaldalisDef))]
	public sealed class ProbeExhibitKaldalis : Exhibit
	{
		protected override void OnEnterBattle()
		{
			((Exhibit)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnStarted);
			((Exhibit)this).HandleBattleEvent<CardUsingEventArgs>(((Exhibit)this).Battle.CardPlaying, (GameEventHandler<CardUsingEventArgs>)OnCardPlaying);
		}

		private void OnCardPlaying(CardUsingEventArgs args)
		{
			if (args.Card is ProbeZealotCharge)
			{
				Card card = args.Card;
				card.DeltaDamage += ((Exhibit)this).Value1;
			}
		}

		private IEnumerable<BattleAction> OnPlayerTurnStarted(GameEventArgs args)
		{
			if (((Unit)((Exhibit)this).Battle.Player).TurnCounter == 1)
			{
				yield return (BattleAction)new AddCardsToDiscardAction((IEnumerable<Card>)Library.CreateCards<ProbeZealotCharge>(((Exhibit)this).Value2, false), (AddCardsType)0);
			}
		}
	}
	public sealed class ProbeExhibitLieutenantDef : ProbeExhibitTemplate
	{
		public override ExhibitConfig MakeConfig()
		{
			ExhibitConfig defaultExhibitConfig = GetDefaultExhibitConfig();
			defaultExhibitConfig.IsPooled = true;
			defaultExhibitConfig.Appearance = (AppearanceType)2;
			defaultExhibitConfig.Owner = null;
			defaultExhibitConfig.LosableType = (ExhibitLosableType)0;
			defaultExhibitConfig.Rarity = (Rarity)1;
			defaultExhibitConfig.Value1 = 600;
			defaultExhibitConfig.Value2 = 10;
			return defaultExhibitConfig;
		}
	}
	[EntityLogic(typeof(ProbeExhibitLieutenantDef))]
	public sealed class ProbeExhibitLieutenant : Exhibit
	{
		protected override void OnAdded(PlayerUnit player)
		{
		}

		protected override IEnumerator SpecialGain(PlayerUnit unit)
		{
			((GameEntity)this).GameRun.GainMoney(((Exhibit)this).Value1, false, (VisualSourceData)null);
			yield return null;
		}

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

		private IEnumerable<BattleAction> OnBattleEnd(GameEventArgs args)
		{
			if (((GameEntity)this).GameRun.Money < ((Exhibit)this).Value2)
			{
				int healLose = 10 - ((GameEntity)this).GameRun.Money;
				if (((GameEntity)this).GameRun.Money > 0)
				{
					yield return (BattleAction)new LoseMoneyAction(((GameEntity)this).GameRun.Money);
				}
				yield return (BattleAction)new DamageAction((Unit)(object)((Exhibit)this).Battle.Player, (Unit)(object)((Exhibit)this).Battle.Player, DamageInfo.HpLose((float)healLose, false), "Instant", (GunType)0);
			}
			else
			{
				yield return (BattleAction)new LoseMoneyAction(((Exhibit)this).Value2);
			}
		}
	}
	public sealed class ProbeExhibitLostSpannerDef : ProbeExhibitTemplate
	{
		public override ExhibitConfig MakeConfig()
		{
			ExhibitConfig defaultExhibitConfig = GetDefaultExhibitConfig();
			defaultExhibitConfig.IsPooled = true;
			defaultExhibitConfig.Appearance = (AppearanceType)0;
			defaultExhibitConfig.Owner = null;
			defaultExhibitConfig.LosableType = (ExhibitLosableType)0;
			defaultExhibitConfig.Rarity = (Rarity)1;
			defaultExhibitConfig.Value1 = 50;
			return defaultExhibitConfig;
		}
	}
	[EntityLogic(typeof(ProbeExhibitLostSpannerDef))]
	public sealed class ProbeExhibitLostSpanner : Exhibit
	{
		protected override void OnEnterBattle()
		{
			((Exhibit)this).HandleBattleEvent<ManaConvertingEventArgs>(((Exhibit)this).Battle.ManaConverting, (GameEventHandler<ManaConvertingEventArgs>)OnManaConverting);
			((Exhibit)this).HandleBattleEvent<UnitEventArgs>(((Exhibit)this).Battle.EnemySpawned, (GameEventHandler<UnitEventArgs>)OnEnemySpawned);
			foreach (EnemyUnit allAliveEnemy in ((Exhibit)this).Battle.AllAliveEnemies)
			{
				if (!(allAliveEnemy is Drone) && !(allAliveEnemy is HetongYinchen) && !(allAliveEnemy is HetongKailang) && !(allAliveEnemy is Nitori))
				{
					continue;
				}
				((Exhibit)this).HandleBattleEvent<DamageEventArgs>(((Unit)allAliveEnemy).DamageReceiving, (GameEventHandler<DamageEventArgs>)delegate(DamageEventArgs arg)
				{
					//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
					//IL_003b: Unknown result type (might be due to invalid IL or missing references)
					DamageInfo damageInfo = arg.DamageInfo;
					if ((int)((DamageInfo)(ref damageInfo)).DamageType == 2)
					{
						((DamageInfo)(ref damageInfo)).Damage = ((DamageInfo)(ref damageInfo)).Amount * (1f + (float)((Exhibit)this).Value1 / 100f);
						arg.DamageInfo = damageInfo;
						((GameEventArgs)arg).AddModifier((GameEntity)(object)this);
					}
				});
			}
		}

		private void OnEnemySpawned(UnitEventArgs args)
		{
			if (!(args.Unit is Drone) && !(args.Unit is HetongYinchen) && !(args.Unit is HetongKailang) && !(args.Unit is Nitori))
			{
				return;
			}
			((Exhibit)this).HandleBattleEvent<DamageEventArgs>(args.Unit.DamageReceiving, (GameEventHandler<DamageEventArgs>)delegate(DamageEventArgs arg)
			{
				//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
				//IL_003b: Unknown result type (might be due to invalid IL or missing references)
				DamageInfo damageInfo = arg.DamageInfo;
				if ((int)((DamageInfo)(ref damageInfo)).DamageType == 2)
				{
					((DamageInfo)(ref damageInfo)).Damage = ((DamageInfo)(ref damageInfo)).Amount * (1f + (float)((Exhibit)this).Value1 / 100f);
					arg.DamageInfo = damageInfo;
					((GameEventArgs)arg).AddModifier((GameEntity)(object)this);
				}
			});
		}

		private void OnManaConverting(ManaConvertingEventArgs args)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			if (SynergyAmount(args.Output, (ManaColor)6) > SynergyAmount(args.Input, (ManaColor)6))
			{
				((GameEventArgs)args).IsCanceled = true;
			}
		}

		private int SynergyAmount(ManaGroup cost, ManaColor synergyColor, int synergyColorAmount = 1)
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Invalid comparison between Unknown and I4
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			if (synergyColorAmount < 1)
			{
				throw new InvalidOperationException("can not get synergy with mana amount blew zero.");
			}
			int num = 0;
			if (1 == 0)
			{
			}
			int num2 = (((int)synergyColor == 0) ? ((ManaGroup)(ref cost)).Amount : (((int)synergyColor != 7) ? (((ManaGroup)(ref cost)).Philosophy + ((ManaGroup)(ref cost)).GetValue(synergyColor)) : ((ManaGroup)(ref cost)).Philosophy));
			if (1 == 0)
			{
			}
			return num2 / synergyColorAmount + ((GameEntity)this).GameRun.SynergyAdditionalCount;
		}
	}
	public sealed class ProbeExhibitSentryDef : ProbeExhibitTemplate
	{
		public override ExhibitConfig MakeConfig()
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			ExhibitConfig defaultExhibitConfig = GetDefaultExhibitConfig();
			defaultExhibitConfig.IsPooled = true;
			defaultExhibitConfig.Appearance = (AppearanceType)0;
			defaultExhibitConfig.Owner = null;
			defaultExhibitConfig.LosableType = (ExhibitLosableType)0;
			defaultExhibitConfig.Rarity = (Rarity)0;
			ManaGroup value = default(ManaGroup);
			((ManaGroup)(ref value)).Any = 1;
			defaultExhibitConfig.Mana = value;
			defaultExhibitConfig.Value1 = 2;
			return defaultExhibitConfig;
		}
	}
	[EntityLogic(typeof(ProbeExhibitSentryDef))]
	public sealed class ProbeExhibitSentry : Exhibit
	{
		protected override void OnEnterBattle()
		{
			((Exhibit)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnStarted);
		}

		private IEnumerable<BattleAction> OnPlayerTurnStarted(GameEventArgs args)
		{
			if (((Unit)((Exhibit)this).Battle.Player).TurnCounter != 1)
			{
				yield break;
			}
			((Exhibit)this).NotifyActivating();
			for (int i = 0; i < ((Exhibit)this).Value1; i++)
			{
				Card friend = ((Exhibit)this).Battle.DrawZone.Where((Card c) => (int)c.CardType == 5).ToList().FirstOrDefault();
				friend.DecreaseTurnCost(((Exhibit)this).Mana);
				if (friend != null)
				{
					yield return (BattleAction)new DrawSelectedCardAction(friend);
				}
			}
			((Exhibit)this).Blackout = true;
		}

		protected override void OnLeaveBattle()
		{
			((Exhibit)this).Blackout = false;
		}
	}
	public sealed class ProbeExhibitUnboundFanaticDef : ProbeExhibitTemplate
	{
		public override ExhibitConfig MakeConfig()
		{
			ExhibitConfig defaultExhibitConfig = GetDefaultExhibitConfig();
			defaultExhibitConfig.IsPooled = true;
			defaultExhibitConfig.Appearance = (AppearanceType)0;
			defaultExhibitConfig.Owner = null;
			defaultExhibitConfig.LosableType = (ExhibitLosableType)0;
			defaultExhibitConfig.Rarity = (Rarity)1;
			defaultExhibitConfig.HasCounter = true;
			defaultExhibitConfig.InitialCounter = 0;
			defaultExhibitConfig.Keywords = (Keyword)256;
			return defaultExhibitConfig;
		}
	}
	[EntityLogic(typeof(ProbeExhibitUnboundFanaticDef))]
	public sealed class ProbeExhibitUnboundFanatic : Exhibit
	{
		public DamageInfo Damage = DamageInfo.Attack(20f, true);

		public float DamageValue => ((DamageInfo)(ref Damage)).Damage;

		protected override void OnEnterBattle()
		{
			((Exhibit)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnTurnStarted);
			((Exhibit)this).Counter = 0;
			((Exhibit)this).Active = true;
		}

		private IEnumerable<BattleAction> OnTurnStarted(UnitEventArgs args)
		{
			int counter = ((Exhibit)this).Counter;
			((Exhibit)this).Counter = counter + 1;
			if (((Exhibit)this).Counter == 3 || ((Exhibit)this).Counter == 6 || ((Exhibit)this).Counter == 9)
			{
				EnemyUnit target = CollectionsExtensions.MinBy<EnemyUnit, int>(((Exhibit)this).Battle.EnemyGroup.Alives, (Func<EnemyUnit, int>)((EnemyUnit unit) => ((Unit)unit).Hp));
				if ((float)((Unit)target).Hp > ((DamageInfo)(ref Damage)).Damage)
				{
					yield return (BattleAction)new DamageAction((Unit)(object)((Exhibit)this).Battle.Player, (Unit)(object)target, Damage, "Simple1", (GunType)0);
				}
				else
				{
					DamageInfo overflowDamage = DamageInfo.Reaction(((DamageInfo)(ref Damage)).Damage - (float)((Unit)target).Hp, true);
					yield return (BattleAction)new DamageAction((Unit)(object)((Exhibit)this).Battle.Player, (Unit)(object)target, DamageInfo.Attack((float)((Unit)target).Hp, false), "Simple1", (GunType)0);
					yield return (BattleAction)new DamageAction((Unit)(object)((Exhibit)this).Battle.Player, (IEnumerable<Unit>)((Exhibit)this).Battle.AllAliveEnemies, overflowDamage, "Instant", (GunType)0);
				}
			}
			if (!((Exhibit)this).Blackout && ((Exhibit)this).Counter >= 9)
			{
				((Exhibit)this).Blackout = true;
			}
		}

		protected override void OnLeaveBattle()
		{
			((Exhibit)this).Active = false;
			((Exhibit)this).Blackout = false;
		}
	}
	public sealed class ProbeExhibitXelnagaArtifactDef : ProbeExhibitTemplate
	{
		public override ExhibitConfig MakeConfig()
		{
			ExhibitConfig defaultExhibitConfig = GetDefaultExhibitConfig();
			defaultExhibitConfig.IsPooled = true;
			defaultExhibitConfig.Appearance = (AppearanceType)0;
			defaultExhibitConfig.Owner = null;
			defaultExhibitConfig.LosableType = (ExhibitLosableType)0;
			defaultExhibitConfig.Rarity = (Rarity)1;
			defaultExhibitConfig.Value1 = 1;
			defaultExhibitConfig.RelativeEffects = new List<string> { "ProbeXelnagaArtifactKeywordSe" };
			return defaultExhibitConfig;
		}
	}
	[EntityLogic(typeof(ProbeExhibitXelnagaArtifactDef))]
	public sealed class ProbeExhibitXelnagaArtifact : Exhibit
	{
		protected override void OnEnterBattle()
		{
			((Exhibit)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Battle.Player).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnPlayerTurnStarted);
		}

		private IEnumerable<BattleAction> OnPlayerTurnStarted(GameEventArgs args)
		{
			if (((Unit)((Exhibit)this).Battle.Player).TurnCounter == 1)
			{
				((Exhibit)this).NotifyActivating();
				PlayerUnit owner = ((Exhibit)this).Owner;
				int? num = ((Exhibit)this).Value1;
				yield return (BattleAction)(object)new ApplyStatusEffectAction<GuangxueMicai>((Unit)(object)owner, (int?)null, num, (int?)null, (int?)null, 0f, true);
			}
			if (((Unit)((Exhibit)this).Battle.Player).StatusEffects.Any((StatusEffect e) => e.Config.RelativeEffects.Any((string s) => s == "ProbeXelnagaArtifactKeywordSe")) && ((GameEntity)this).GameRun.BaseDeck.Any((Card c) => c.Config.RelativeEffects.Any((string s) => s == "ProbeXelnagaArtifactKeywordSe")))
			{
				PlayerUnit owner2 = ((Exhibit)this).Owner;
				int? num = ((Exhibit)this).Value1;
				yield return (BattleAction)(object)new ApplyStatusEffectAction<GuangxueMicai>((Unit)(object)owner2, (int?)null, num, (int?)null, (int?)null, 0f, true);
			}
		}
	}
}
namespace ProbeMod.Enemies.Template
{
	public abstract class ProbeEnemyGroupTemplate : EnemyGroupTemplate
	{
		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(ProbeDefaultConfig.DefaultID((EntityDefinition)(object)this));
		}

		public override EnemyGroupConfig MakeConfig()
		{
			return ProbeDefaultConfig.EnemyGroupDefaultConfig();
		}

		public EnemyGroupConfig GetEnemyGroupDefaultConfig()
		{
			return ProbeDefaultConfig.EnemyGroupDefaultConfig();
		}
	}
	public class ProbeEnemyUnitTemplate : EnemyUnitTemplate
	{
		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(ProbeDefaultConfig.DefaultID((EntityDefinition)(object)this));
		}

		public override EnemyUnitConfig MakeConfig()
		{
			return ProbeDefaultConfig.EnemyUnitDefaultConfig();
		}

		public override LocalizationOption LoadLocalization()
		{
			return (LocalizationOption)(object)ProbeLocalization.EnemiesUnitBatchLoc.AddEntity((EntityDefinition)(object)this);
		}

		public override Type TemplateType()
		{
			return typeof(EnemyUnitTemplate);
		}

		public EnemyUnitConfig GetEnemyUnitDefaultConfig()
		{
			return ProbeDefaultConfig.EnemyUnitDefaultConfig();
		}
	}
}
namespace ProbeMod.Config
{
	public struct CustomConfigEntry<T>
	{
		public T Value { get; set; }

		public string Section { get; set; }

		public string Key { get; set; }

		public string Description { get; set; }

		public CustomConfigEntry(T value, string section, string key, string description)
		{
			Value = value;
			Section = section;
			Key = key;
			Description = description;
		}
	}
	public sealed class ProbeDefaultConfig
	{
		private static readonly string OwnerName = BepinexPlugin.modUniqueID;

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

		public static CardConfig CardDefaultConfig()
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0194: Expected O, but got Unknown
			return new CardConfig(0, "", 10, true, new string[0][], "", "", 0, false, true, false, true, true, (Rarity)0, (CardType)0, (TargetType?)null, (IReadOnlyList<ManaColor>)new List<ManaColor>(), false, default(ManaGroup), (ManaGroup?)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, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)0, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), OwnerName, "", "", false, (string)null, (IReadOnlyList<string>)new List<string>());
		}

		public static ExhibitConfig DefaultExhibitConfig()
		{
			//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 DefaultStatusEffectConfig()
		{
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: 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>(), (string)null, "Default", "Default", "Default");
		}

		public static UltimateSkillConfig DefaultUltConfig()
		{
			//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 static EnemyUnitConfig EnemyUnitDefaultConfig()
		{
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Expected O, but got Unknown
			return new EnemyUnitConfig("", false, false, (IReadOnlyList<ManaColor>)new List<ManaColor> { (ManaColor)6 }, 10, "", "#ffff", (EnemyType)3, true, (float?)null, (int?)null, 250, (int?)10, (int?)10, (int?)10, (int?)10, (int?)1, (int?)15, (int?)1, (int?)2, (int?)250, (int?)10, (int?)10, (int?)10, (int?)10, (int?)1, (int?)15, (int?)1, (int?)2, (int?)250, (int?)10, (int?)10, (int?)10, (int?)10, (int?)1, (int?)15, (int?)1, (int?)2, new MinMax(100, 100), new MinMax(100, 100), (IReadOnlyList<string>)new List<string> { GunNameID.GetGunFromId(800) }, (IReadOnlyList<string>)new List<string> { GunNameID.GetGunFromId(800) }, (IReadOnlyList<string>)new List<string> { GunNameID.GetGunFromId(800) }, (IReadOnlyList<string>)new List<string> { GunNameID.GetGunFromId(800) });
		}

		public static EnemyGroupConfig EnemyGroupDefaultConfig()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Expected O, but got Unknown
			return new EnemyGroupConfig("", false, (IReadOnlyList<string>)new List<string>(), "", "Single", (IReadOnlyList<string>)new List<string>(), (EnemyType)3, false, 1f, true, new Vector2(-4f, 0.5f), "", "", (string)null);
		}

		public static SfxConfig SfxDefaultConfig()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			return new SfxConfig("", "", "", 0.08, 0.5f);
		}
	}
}
namespace ProbeMod.Cards
{
	public sealed class ProbeAttackBDef : ProbeCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: 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_008f: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Rarity = (Rarity)0;
			cardDefaultConfig.Type = (CardType)1;
			cardDefaultConfig.TargetType = (TargetType)1;
			cardDefaultConfig.IsPooled = false;
			cardDefaultConfig.FindInBattle = false;
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)2 };
			cardDefaultConfig.Keywords = (Keyword)1;
			cardDefaultConfig.UpgradedKeywords = (Keyword)1;
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).Blue = 1;
			((ManaGroup)(ref val)).Any = 1;
			cardDefaultConfig.Cost = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 2;
			cardDefaultConfig.UpgradedCost = val;
			cardDefaultConfig.Damage = 10;
			cardDefaultConfig.UpgradedDamage = 14;
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(ProbeAttackBDef))]
	public sealed class ProbeAttackB : ProbeCard
	{
		protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			yield return ((Card)this).AttackAction(selector, (GunPair)null);
		}
	}
	public sealed class ProbeBlockBDef : ProbeCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: 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_008f: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Rarity = (Rarity)0;
			cardDefaultConfig.Type = (CardType)2;
			cardDefaultConfig.TargetType = (TargetType)0;
			cardDefaultConfig.IsPooled = false;
			cardDefaultConfig.FindInBattle = false;
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)2 };
			cardDefaultConfig.Keywords = (Keyword)1;
			cardDefaultConfig.UpgradedKeywords = (Keyword)1;
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).Blue = 1;
			((ManaGroup)(ref val)).Any = 1;
			cardDefaultConfig.Cost = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 2;
			cardDefaultConfig.UpgradedCost = val;
			cardDefaultConfig.Block = 10;
			cardDefaultConfig.UpgradedBlock = 13;
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(ProbeBlockBDef))]
	public sealed class ProbeBlockB : ProbeCard
	{
		protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			yield return ((Card)this).DefenseAction(true);
		}
	}
	public sealed class ProbeAttackWDef : ProbeCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: 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_008f: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Rarity = (Rarity)0;
			cardDefaultConfig.Type = (CardType)1;
			cardDefaultConfig.TargetType = (TargetType)1;
			cardDefaultConfig.IsPooled = false;
			cardDefaultConfig.FindInBattle = false;
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)1 };
			cardDefaultConfig.Keywords = (Keyword)1;
			cardDefaultConfig.UpgradedKeywords = (Keyword)1;
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).White = 1;
			((ManaGroup)(ref val)).Any = 1;
			cardDefaultConfig.Cost = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 2;
			cardDefaultConfig.UpgradedCost = val;
			cardDefaultConfig.Damage = 10;
			cardDefaultConfig.UpgradedDamage = 14;
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(ProbeAttackWDef))]
	public sealed class ProbeAttackW : ProbeCard
	{
		protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			yield return ((Card)this).AttackAction(selector, (GunPair)null);
		}
	}
	public sealed class ProbeBlockWDef : ProbeCardTemplate
	{
		public override CardConfig MakeConfig()
		{
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: 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_008f: Unknown result type (might be due to invalid IL or missing references)
			CardConfig cardDefaultConfig = GetCardDefaultConfig();
			cardDefaultConfig.Rarity = (Rarity)0;
			cardDefaultConfig.Type = (CardType)2;
			cardDefaultConfig.TargetType = (TargetType)0;
			cardDefaultConfig.IsPooled = false;
			cardDefaultConfig.FindInBattle = false;
			cardDefaultConfig.Colors = new List<ManaColor> { (ManaColor)1 };
			cardDefaultConfig.Keywords = (Keyword)1;
			cardDefaultConfig.UpgradedKeywords = (Keyword)1;
			ManaGroup val = default(ManaGroup);
			((ManaGroup)(ref val)).White = 1;
			((ManaGroup)(ref val)).Any = 1;
			cardDefaultConfig.Cost = val;
			val = default(ManaGroup);
			((ManaGroup)(ref val)).Any = 2;
			cardDefaultConfig.UpgradedCost = val;
			cardDefaultConfig.Block = 10;
			cardDefaultConfig.UpgradedBlock = 13;
			cardDefaultConfig.Index = CardIndexGenerator.GetUniqueIndex(cardDefaultConfig);
			return cardDefaultConfig;
		}
	}
	[EntityLogic(typeof(ProbeBlockWDef))]
	public sealed class ProbeBlockW : ProbeCard
	{
		protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition)