Decompiled source of Wide Player v1.1.3

WidePlayer.dll

Decompiled 3 weeks ago
using System;
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 DG.Tweening;
using DG.Tweening.Core;
using DG.Tweening.Plugins.Options;
using HarmonyLib;
using LBoL.Base;
using LBoL.ConfigData;
using LBoL.Core;
using LBoL.Core.Battle;
using LBoL.Core.Cards;
using LBoL.Core.Units;
using LBoL.EntityLib.Cards.Character.Sakuya;
using LBoL.Presentation;
using LBoL.Presentation.UI;
using LBoL.Presentation.UI.Panels;
using LBoL.Presentation.Units;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: IgnoresAccessChecksTo("LBoL.Base")]
[assembly: IgnoresAccessChecksTo("LBoL.ConfigData")]
[assembly: IgnoresAccessChecksTo("LBoL.Core")]
[assembly: IgnoresAccessChecksTo("LBoL.EntityLib")]
[assembly: IgnoresAccessChecksTo("LBoL.Presentation")]
[assembly: IgnoresAccessChecksTo("Untitled.ConfigDataBuilder.Base")]
[assembly: AssemblyCompany("WidePlayer")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("WidePlayer")]
[assembly: AssemblyTitle("WidePlayer")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace WidePlayer
{
	[BepInPlugin("intoxicatedkid.wideplayer", "Wide Player", "1.1.3")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInProcess("LBoL.exe")]
	public class BepinexPlugin : BaseUnityPlugin
	{
		[HarmonyPatch(typeof(BattleController), "EndPlayerTurn")]
		private class BattleController_EndPlayerTurn_Patch
		{
			private static void Postfix(BattleController __instance)
			{
				//IL_03a0: Unknown result type (might be due to invalid IL or missing references)
				//IL_03a5: Unknown result type (might be due to invalid IL or missing references)
				//IL_041f: Unknown result type (might be due to invalid IL or missing references)
				//IL_03d9: Unknown result type (might be due to invalid IL or missing references)
				//IL_03de: Unknown result type (might be due to invalid IL or missing references)
				//IL_044f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0562: Unknown result type (might be due to invalid IL or missing references)
				if (Singleton<GameMaster>.Instance.CurrentGameRun == null || (!WidePlayer.Value && !LongPlayer.Value && !ThinPlayer.Value && !ShortPlayer.Value) || ((GameEntity)Singleton<GameMaster>.Instance.CurrentGameRun.Player).Id == "AyaPlayerUnit" || ((GameEntity)Singleton<GameMaster>.Instance.CurrentGameRun.Player).Id == "LongPlayerUnit")
				{
					return;
				}
				float num = Math.Max(Math.Min((float)((Unit)Singleton<GameMaster>.Instance.CurrentGameRun.Player).MaxHp / Math.Max(PlayerUnitConfig.FromId(((GameEntity)Singleton<GameMaster>.Instance.CurrentGameRun.Player).Id).MaxHp, 50f), WidePlayer.Value ? 20f : 1f), ThinPlayer.Value ? 0.2f : 1f);
				float num2 = Math.Max(Math.Min((float)((Unit)Singleton<GameMaster>.Instance.CurrentGameRun.Player).MaxHp / Math.Max(PlayerUnitConfig.FromId(((GameEntity)Singleton<GameMaster>.Instance.CurrentGameRun.Player).Id).MaxHp, 50f), LongPlayer.Value ? 20f : 1f), ShortPlayer.Value ? 0.2f : 1f);
				if (WideCards.Value && WidePlayer.Value && Singleton<GameMaster>.Instance.CurrentGameRun.BaseDeck.Any((Card c) => c is ExtraTurnEveryone))
				{
					num += 1f;
				}
				if (WideCards.Value && Singleton<GameMaster>.Instance.CurrentGameRun.BaseDeck.Any((Card c) => c is KnifeAim))
				{
					if (ThinPlayer.Value)
					{
						num -= 0.5f;
					}
					if (ShortPlayer.Value)
					{
						num2 -= 0.5f;
					}
				}
				if (WideDeck.Value)
				{
					if (WidePlayer.Value)
					{
						num += 0.025f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.BaseDeck.Count;
					}
					if (LongPlayer.Value)
					{
						num2 += 0.025f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.BaseDeck.Count;
					}
				}
				if (WideExhibits.Value)
				{
					if (WidePlayer.Value)
					{
						num += 0.05f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.Player.Exhibits.Count;
					}
					if (LongPlayer.Value)
					{
						num2 += 0.05f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.Player.Exhibits.Count;
					}
				}
				if (WideMana.Value && Singleton<GameMaster>.Instance.CurrentGameRun.Battle != null)
				{
					ManaGroup battleMana;
					if (WidePlayer.Value)
					{
						float num3 = num;
						battleMana = Singleton<GameMaster>.Instance.CurrentGameRun.Battle.BattleMana;
						num = num3 + 0.01f * (float)((ManaGroup)(ref battleMana)).Amount;
					}
					if (LongPlayer.Value)
					{
						float num4 = num2;
						battleMana = Singleton<GameMaster>.Instance.CurrentGameRun.Battle.BattleMana;
						num2 = num4 + 0.01f * (float)((ManaGroup)(ref battleMana)).Amount;
					}
				}
				if (WideRequests.Value)
				{
					if (WidePlayer.Value)
					{
						num += 0.15f * (float)PuzzleFlags.GetPuzzleLevel(Singleton<GameMaster>.Instance.CurrentGameRun.Puzzles);
					}
					if (LongPlayer.Value)
					{
						num2 += 0.15f * (float)PuzzleFlags.GetPuzzleLevel(Singleton<GameMaster>.Instance.CurrentGameRun.Puzzles);
					}
				}
				if (WideTeammates.Value && Singleton<GameMaster>.Instance.CurrentGameRun.Battle != null)
				{
					if (WidePlayer.Value)
					{
						num += 0.1f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.Battle.HandZone.Count((Card c) => (int)c.CardType == 5 && c.Summoned);
					}
					if (LongPlayer.Value)
					{
						num2 += 0.1f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.Battle.HandZone.Count((Card c) => (int)c.CardType == 5 && c.Summoned);
					}
				}
				TweenExtensions.WaitForCompletion((Tween)(object)TweenSettingsExtensions.SetAutoKill<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetUpdate<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetEase<TweenerCore<Vector3, Vector3, VectorOptions>>(ShortcutExtensions.DOScale(((Component)((Unit)Singleton<GameMaster>.Instance.CurrentGameRun.Player).GetView<UnitView>()).transform, new Vector3(Math.Max(num, 0.2f), Math.Max(num2, 0.2f)), 0f), (Ease)1), true), true));
			}
		}

		[HarmonyPatch(typeof(Unit), "SetMaxHp")]
		private class Unit_SetMaxHp_Patch
		{
			private static void Postfix(Unit __instance)
			{
				//IL_03a8: Unknown result type (might be due to invalid IL or missing references)
				//IL_03ad: Unknown result type (might be due to invalid IL or missing references)
				//IL_0427: Unknown result type (might be due to invalid IL or missing references)
				//IL_03e1: Unknown result type (might be due to invalid IL or missing references)
				//IL_03e6: Unknown result type (might be due to invalid IL or missing references)
				//IL_0457: Unknown result type (might be due to invalid IL or missing references)
				//IL_056a: Unknown result type (might be due to invalid IL or missing references)
				if (Singleton<GameMaster>.Instance.CurrentGameRun == null || !(__instance is PlayerUnit) || (!WidePlayer.Value && !LongPlayer.Value && !ThinPlayer.Value && !ShortPlayer.Value) || ((GameEntity)Singleton<GameMaster>.Instance.CurrentGameRun.Player).Id == "AyaPlayerUnit" || ((GameEntity)Singleton<GameMaster>.Instance.CurrentGameRun.Player).Id == "LongPlayerUnit")
				{
					return;
				}
				float num = Math.Max(Math.Min((float)((Unit)Singleton<GameMaster>.Instance.CurrentGameRun.Player).MaxHp / Math.Max(PlayerUnitConfig.FromId(((GameEntity)Singleton<GameMaster>.Instance.CurrentGameRun.Player).Id).MaxHp, 50f), WidePlayer.Value ? 20f : 1f), ThinPlayer.Value ? 0.2f : 1f);
				float num2 = Math.Max(Math.Min((float)((Unit)Singleton<GameMaster>.Instance.CurrentGameRun.Player).MaxHp / Math.Max(PlayerUnitConfig.FromId(((GameEntity)Singleton<GameMaster>.Instance.CurrentGameRun.Player).Id).MaxHp, 50f), LongPlayer.Value ? 20f : 1f), ShortPlayer.Value ? 0.2f : 1f);
				if (WideCards.Value && WidePlayer.Value && Singleton<GameMaster>.Instance.CurrentGameRun.BaseDeck.Any((Card c) => c is ExtraTurnEveryone))
				{
					num += 1f;
				}
				if (WideCards.Value && Singleton<GameMaster>.Instance.CurrentGameRun.BaseDeck.Any((Card c) => c is KnifeAim))
				{
					if (ThinPlayer.Value)
					{
						num -= 0.5f;
					}
					if (ShortPlayer.Value)
					{
						num2 -= 0.5f;
					}
				}
				if (WideDeck.Value)
				{
					if (WidePlayer.Value)
					{
						num += 0.025f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.BaseDeck.Count;
					}
					if (LongPlayer.Value)
					{
						num2 += 0.025f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.BaseDeck.Count;
					}
				}
				if (WideExhibits.Value)
				{
					if (WidePlayer.Value)
					{
						num += 0.05f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.Player.Exhibits.Count;
					}
					if (LongPlayer.Value)
					{
						num2 += 0.05f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.Player.Exhibits.Count;
					}
				}
				if (WideMana.Value && Singleton<GameMaster>.Instance.CurrentGameRun.Battle != null)
				{
					ManaGroup battleMana;
					if (WidePlayer.Value)
					{
						float num3 = num;
						battleMana = Singleton<GameMaster>.Instance.CurrentGameRun.Battle.BattleMana;
						num = num3 + 0.01f * (float)((ManaGroup)(ref battleMana)).Amount;
					}
					if (LongPlayer.Value)
					{
						float num4 = num2;
						battleMana = Singleton<GameMaster>.Instance.CurrentGameRun.Battle.BattleMana;
						num2 = num4 + 0.01f * (float)((ManaGroup)(ref battleMana)).Amount;
					}
				}
				if (WideRequests.Value)
				{
					if (WidePlayer.Value)
					{
						num += 0.15f * (float)PuzzleFlags.GetPuzzleLevel(Singleton<GameMaster>.Instance.CurrentGameRun.Puzzles);
					}
					if (LongPlayer.Value)
					{
						num2 += 0.15f * (float)PuzzleFlags.GetPuzzleLevel(Singleton<GameMaster>.Instance.CurrentGameRun.Puzzles);
					}
				}
				if (WideTeammates.Value && Singleton<GameMaster>.Instance.CurrentGameRun.Battle != null)
				{
					if (WidePlayer.Value)
					{
						num += 0.1f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.Battle.HandZone.Count((Card c) => (int)c.CardType == 5 && c.Summoned);
					}
					if (LongPlayer.Value)
					{
						num2 += 0.1f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.Battle.HandZone.Count((Card c) => (int)c.CardType == 5 && c.Summoned);
					}
				}
				TweenExtensions.WaitForCompletion((Tween)(object)TweenSettingsExtensions.SetAutoKill<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetUpdate<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetEase<TweenerCore<Vector3, Vector3, VectorOptions>>(ShortcutExtensions.DOScale(((Component)((Unit)Singleton<GameMaster>.Instance.CurrentGameRun.Player).GetView<UnitView>()).transform, new Vector3(Math.Max(num, 0.2f), Math.Max(num2, 0.2f)), 0f), (Ease)1), true), true));
			}
		}

		[HarmonyPatch(typeof(UiManager), "EnterGameRun")]
		private class UiManager_EnterGameRun_Patch
		{
			private static void Postfix(UiManager __instance)
			{
				//IL_03a0: Unknown result type (might be due to invalid IL or missing references)
				//IL_03a5: Unknown result type (might be due to invalid IL or missing references)
				//IL_041f: Unknown result type (might be due to invalid IL or missing references)
				//IL_03d9: Unknown result type (might be due to invalid IL or missing references)
				//IL_03de: Unknown result type (might be due to invalid IL or missing references)
				//IL_044f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0562: Unknown result type (might be due to invalid IL or missing references)
				if (Singleton<GameMaster>.Instance.CurrentGameRun == null || (!WidePlayer.Value && !LongPlayer.Value && !ThinPlayer.Value && !ShortPlayer.Value) || ((GameEntity)Singleton<GameMaster>.Instance.CurrentGameRun.Player).Id == "AyaPlayerUnit" || ((GameEntity)Singleton<GameMaster>.Instance.CurrentGameRun.Player).Id == "LongPlayerUnit")
				{
					return;
				}
				float num = Math.Max(Math.Min((float)((Unit)Singleton<GameMaster>.Instance.CurrentGameRun.Player).MaxHp / Math.Max(PlayerUnitConfig.FromId(((GameEntity)Singleton<GameMaster>.Instance.CurrentGameRun.Player).Id).MaxHp, 50f), WidePlayer.Value ? 20f : 1f), ThinPlayer.Value ? 0.2f : 1f);
				float num2 = Math.Max(Math.Min((float)((Unit)Singleton<GameMaster>.Instance.CurrentGameRun.Player).MaxHp / Math.Max(PlayerUnitConfig.FromId(((GameEntity)Singleton<GameMaster>.Instance.CurrentGameRun.Player).Id).MaxHp, 50f), LongPlayer.Value ? 20f : 1f), ShortPlayer.Value ? 0.2f : 1f);
				if (WideCards.Value && WidePlayer.Value && Singleton<GameMaster>.Instance.CurrentGameRun.BaseDeck.Any((Card c) => c is ExtraTurnEveryone))
				{
					num += 1f;
				}
				if (WideCards.Value && Singleton<GameMaster>.Instance.CurrentGameRun.BaseDeck.Any((Card c) => c is KnifeAim))
				{
					if (ThinPlayer.Value)
					{
						num -= 0.5f;
					}
					if (ShortPlayer.Value)
					{
						num2 -= 0.5f;
					}
				}
				if (WideDeck.Value)
				{
					if (WidePlayer.Value)
					{
						num += 0.025f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.BaseDeck.Count;
					}
					if (LongPlayer.Value)
					{
						num2 += 0.025f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.BaseDeck.Count;
					}
				}
				if (WideExhibits.Value)
				{
					if (WidePlayer.Value)
					{
						num += 0.05f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.Player.Exhibits.Count;
					}
					if (LongPlayer.Value)
					{
						num2 += 0.05f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.Player.Exhibits.Count;
					}
				}
				if (WideMana.Value && Singleton<GameMaster>.Instance.CurrentGameRun.Battle != null)
				{
					ManaGroup battleMana;
					if (WidePlayer.Value)
					{
						float num3 = num;
						battleMana = Singleton<GameMaster>.Instance.CurrentGameRun.Battle.BattleMana;
						num = num3 + 0.01f * (float)((ManaGroup)(ref battleMana)).Amount;
					}
					if (LongPlayer.Value)
					{
						float num4 = num2;
						battleMana = Singleton<GameMaster>.Instance.CurrentGameRun.Battle.BattleMana;
						num2 = num4 + 0.01f * (float)((ManaGroup)(ref battleMana)).Amount;
					}
				}
				if (WideRequests.Value)
				{
					if (WidePlayer.Value)
					{
						num += 0.15f * (float)PuzzleFlags.GetPuzzleLevel(Singleton<GameMaster>.Instance.CurrentGameRun.Puzzles);
					}
					if (LongPlayer.Value)
					{
						num2 += 0.15f * (float)PuzzleFlags.GetPuzzleLevel(Singleton<GameMaster>.Instance.CurrentGameRun.Puzzles);
					}
				}
				if (WideTeammates.Value && Singleton<GameMaster>.Instance.CurrentGameRun.Battle != null)
				{
					if (WidePlayer.Value)
					{
						num += 0.1f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.Battle.HandZone.Count((Card c) => (int)c.CardType == 5 && c.Summoned);
					}
					if (LongPlayer.Value)
					{
						num2 += 0.1f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.Battle.HandZone.Count((Card c) => (int)c.CardType == 5 && c.Summoned);
					}
				}
				TweenExtensions.WaitForCompletion((Tween)(object)TweenSettingsExtensions.SetAutoKill<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetUpdate<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetEase<TweenerCore<Vector3, Vector3, VectorOptions>>(ShortcutExtensions.DOScale(((Component)((Unit)Singleton<GameMaster>.Instance.CurrentGameRun.Player).GetView<UnitView>()).transform, new Vector3(Math.Max(num, 0.2f), Math.Max(num2, 0.2f)), 0f), (Ease)1), true), true));
			}
		}

		[HarmonyPatch(typeof(BattleManaPanel), "UpdateAmountText")]
		private class BattleManaPanel_UpdateAmountText_Patch
		{
			private static void Postfix(BattleManaPanel __instance)
			{
				//IL_03ac: Unknown result type (might be due to invalid IL or missing references)
				//IL_03b1: Unknown result type (might be due to invalid IL or missing references)
				//IL_042b: Unknown result type (might be due to invalid IL or missing references)
				//IL_03e5: Unknown result type (might be due to invalid IL or missing references)
				//IL_03ea: Unknown result type (might be due to invalid IL or missing references)
				//IL_045b: Unknown result type (might be due to invalid IL or missing references)
				//IL_056e: Unknown result type (might be due to invalid IL or missing references)
				if (!WideMana.Value || Singleton<GameMaster>.Instance.CurrentGameRun == null || (!WidePlayer.Value && !LongPlayer.Value && !ThinPlayer.Value && !ShortPlayer.Value) || ((GameEntity)Singleton<GameMaster>.Instance.CurrentGameRun.Player).Id == "AyaPlayerUnit" || ((GameEntity)Singleton<GameMaster>.Instance.CurrentGameRun.Player).Id == "LongPlayerUnit")
				{
					return;
				}
				float num = Math.Max(Math.Min((float)((Unit)Singleton<GameMaster>.Instance.CurrentGameRun.Player).MaxHp / Math.Max(PlayerUnitConfig.FromId(((GameEntity)Singleton<GameMaster>.Instance.CurrentGameRun.Player).Id).MaxHp, 50f), WidePlayer.Value ? 20f : 1f), ThinPlayer.Value ? 0.2f : 1f);
				float num2 = Math.Max(Math.Min((float)((Unit)Singleton<GameMaster>.Instance.CurrentGameRun.Player).MaxHp / Math.Max(PlayerUnitConfig.FromId(((GameEntity)Singleton<GameMaster>.Instance.CurrentGameRun.Player).Id).MaxHp, 50f), LongPlayer.Value ? 20f : 1f), ShortPlayer.Value ? 0.2f : 1f);
				if (WideCards.Value && WidePlayer.Value && Singleton<GameMaster>.Instance.CurrentGameRun.BaseDeck.Any((Card c) => c is ExtraTurnEveryone))
				{
					num += 1f;
				}
				if (WideCards.Value && Singleton<GameMaster>.Instance.CurrentGameRun.BaseDeck.Any((Card c) => c is KnifeAim))
				{
					if (ThinPlayer.Value)
					{
						num -= 0.5f;
					}
					if (ShortPlayer.Value)
					{
						num2 -= 0.5f;
					}
				}
				if (WideDeck.Value)
				{
					if (WidePlayer.Value)
					{
						num += 0.025f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.BaseDeck.Count;
					}
					if (LongPlayer.Value)
					{
						num2 += 0.025f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.BaseDeck.Count;
					}
				}
				if (WideExhibits.Value)
				{
					if (WidePlayer.Value)
					{
						num += 0.05f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.Player.Exhibits.Count;
					}
					if (LongPlayer.Value)
					{
						num2 += 0.05f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.Player.Exhibits.Count;
					}
				}
				if (WideMana.Value && Singleton<GameMaster>.Instance.CurrentGameRun.Battle != null)
				{
					ManaGroup battleMana;
					if (WidePlayer.Value)
					{
						float num3 = num;
						battleMana = Singleton<GameMaster>.Instance.CurrentGameRun.Battle.BattleMana;
						num = num3 + 0.01f * (float)((ManaGroup)(ref battleMana)).Amount;
					}
					if (LongPlayer.Value)
					{
						float num4 = num2;
						battleMana = Singleton<GameMaster>.Instance.CurrentGameRun.Battle.BattleMana;
						num2 = num4 + 0.01f * (float)((ManaGroup)(ref battleMana)).Amount;
					}
				}
				if (WideRequests.Value)
				{
					if (WidePlayer.Value)
					{
						num += 0.15f * (float)PuzzleFlags.GetPuzzleLevel(Singleton<GameMaster>.Instance.CurrentGameRun.Puzzles);
					}
					if (LongPlayer.Value)
					{
						num2 += 0.15f * (float)PuzzleFlags.GetPuzzleLevel(Singleton<GameMaster>.Instance.CurrentGameRun.Puzzles);
					}
				}
				if (WideTeammates.Value && Singleton<GameMaster>.Instance.CurrentGameRun.Battle != null)
				{
					if (WidePlayer.Value)
					{
						num += 0.1f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.Battle.HandZone.Count((Card c) => (int)c.CardType == 5 && c.Summoned);
					}
					if (LongPlayer.Value)
					{
						num2 += 0.1f * (float)Singleton<GameMaster>.Instance.CurrentGameRun.Battle.HandZone.Count((Card c) => (int)c.CardType == 5 && c.Summoned);
					}
				}
				TweenExtensions.WaitForCompletion((Tween)(object)TweenSettingsExtensions.SetAutoKill<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetUpdate<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetEase<TweenerCore<Vector3, Vector3, VectorOptions>>(ShortcutExtensions.DOScale(((Component)((Unit)Singleton<GameMaster>.Instance.CurrentGameRun.Player).GetView<UnitView>()).transform, new Vector3(Math.Max(num, 0.2f), Math.Max(num2, 0.2f)), 0f), (Ease)1), true), true));
			}
		}

		private static readonly Harmony harmony = PInfo.harmony;

		internal static ManualLogSource log;

		public static ConfigEntry<bool> WidePlayer;

		public static ConfigEntry<bool> LongPlayer;

		public static ConfigEntry<bool> ThinPlayer;

		public static ConfigEntry<bool> ShortPlayer;

		public static ConfigEntry<bool> WideCards;

		public static ConfigEntry<bool> WideDeck;

		public static ConfigEntry<bool> WideExhibits;

		public static ConfigEntry<bool> WideMana;

		public static ConfigEntry<bool> WideRequests;

		public static ConfigEntry<bool> WideTeammates;

		private void Awake()
		{
			log = ((BaseUnityPlugin)this).Logger;
			Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
			((Object)((Component)this).gameObject).hideFlags = (HideFlags)61;
			WidePlayer = ((BaseUnityPlugin)this).Config.Bind<bool>("A. Size Up", "Wide Player", true, "Player gets wider when maximum life is higher than default.");
			LongPlayer = ((BaseUnityPlugin)this).Config.Bind<bool>("A. Size Up", "Long Player", false, "Player gets longer when maximum life is higher than default.");
			ThinPlayer = ((BaseUnityPlugin)this).Config.Bind<bool>("B. Size Down", "Thin Player", false, "Player gets thinner when maximum life is lower than default.");
			ShortPlayer = ((BaseUnityPlugin)this).Config.Bind<bool>("B. Size Down", "Short Player", false, "Player gets shorter when maximum life is lower than default.");
			WideCards = ((BaseUnityPlugin)this).Config.Bind<bool>("C. Additional Modifier", "Wide Cards", false, "Some cards in the library can now affect the player's size. Related configs needs to be enabled.\nList of cards that affect size can be found in README.md");
			WideDeck = ((BaseUnityPlugin)this).Config.Bind<bool>("C. Additional Modifier", "Wide Deck", false, "Each card in the library increases player's size by 2.5%. Wide Player or Tall Player needs to be enabled.");
			WideExhibits = ((BaseUnityPlugin)this).Config.Bind<bool>("C. Additional Modifier", "Wide Exhibits", false, "Each exhibit in player's possession increases player's size by 5%. Wide Player or Tall Player needs to be enabled.");
			WideMana = ((BaseUnityPlugin)this).Config.Bind<bool>("C. Additional Modifier", "Wide Mana", false, "Each remaining mana in battle increases player's size by 1%. May look annoying due to size changes very frequently. Wide Player or Tall Player needs to be enabled.");
			WideRequests = ((BaseUnityPlugin)this).Config.Bind<bool>("C. Additional Modifier", "Wide Requests", false, "Each request increases player's size by 15%. Wide Player or Tall Player needs to be enabled.");
			WideTeammates = ((BaseUnityPlugin)this).Config.Bind<bool>("C. Additional Modifier", "Wide Teammates", false, "Each summoned teammate in the hand increases player's size by 10%. Wide Player or Tall Player needs to be enabled.");
			harmony.PatchAll();
			if (Chainloader.PluginInfos.ContainsKey("neo.lbol.tools.watermark"))
			{
				WatermarkWrapper.ActivateWatermark();
			}
		}

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

		public const string Name = "Wide Player";

		public const string version = "1.1.3";

		public static readonly Harmony harmony = new Harmony("intoxicatedkid.wideplayer");
	}
	internal class WatermarkWrapper
	{
		[MethodImpl(MethodImplOptions.NoInlining)]
		internal static void ActivateWatermark()
		{
			API.ActivateWatermark();
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		internal IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}