BepInEx/plugins/com.yourname.rounds.mymod/rounds-mods.dll

Decompiled 2 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using Dron.Cards;
using Dron.Effects;
using Dron.MonoBehaviors;
using Dron.Utils;
using HarmonyLib;
using Jotunn.Utils;
using Microsoft.CodeAnalysis;
using ModdingUtils.MonoBehaviours;
using ModdingUtils.RoundsEffects;
using ModdingUtils.Utils;
using Photon.Pun;
using RarityLib.Utils;
using Sonigon;
using UnboundLib;
using UnboundLib.Cards;
using UnboundLib.GameModes;
using UnboundLib.Utils;
using UnityEngine;
using UnityEngine.SceneManagement;

[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: AssemblyCompany("rounds-mods")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("rounds-mods")]
[assembly: AssemblyTitle("rounds-mods")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
public class CurseVisualEffect : MonoBehaviour
{
	private SpriteRenderer spriteRenderer;

	private Color originalColor;

	private void Start()
	{
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		spriteRenderer = ((Component)this).GetComponent<SpriteRenderer>();
		if ((Object)(object)spriteRenderer != (Object)null)
		{
			originalColor = spriteRenderer.color;
			spriteRenderer.color = Color.red;
			Debug.Log("[CurseVisualEffect] Цвет врага изменён на красный.");
		}
		else
		{
			Debug.Log("[CurseVisualEffect] У врага нет SpriteRenderer!");
		}
	}

	private void OnDestroy()
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)spriteRenderer != (Object)null)
		{
			spriteRenderer.color = originalColor;
			Debug.Log("[CurseVisualEffect] Цвет врага восстановлен.");
		}
	}
}
public class MyEmpower : MonoBehaviour
{
	public SoundEvent soundEmpowerSpawn;

	public GameObject addObjectToBullet;

	public float dmgMultiplier = 2f;

	public float speedMultiplier = 2f;

	public Color empowerColor = Color.yellow;

	private CharacterData data;

	private ParticleSystem[] parts;

	private Transform particleTransform;

	private bool empowered;

	private bool isOn;

	private GameObject effectObject;

	private void Start()
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Expected O, but got Unknown
		effectObject = new GameObject("EmpowerEffect");
		particleTransform = effectObject.transform;
		data = ((Component)this).GetComponentInParent<CharacterData>();
		parts = ((Component)this).GetComponentsInChildren<ParticleSystem>();
		HealthHandler healthHandler = ((Component)this).GetComponentInParent<Player>().data.healthHandler;
		healthHandler.reviveAction = (Action)Delegate.Combine(healthHandler.reviveAction, new Action(ResetEmpower));
		Gun gun = data.weaponHandler.gun;
		gun.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(gun.ShootPojectileAction, new Action<GameObject>(Attack));
		Block componentInParent = ((Component)this).GetComponentInParent<Block>();
		componentInParent.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(componentInParent.BlockAction, new Action<BlockTriggerType>(Block));
	}

	private void OnDestroy()
	{
		HealthHandler healthHandler = ((Component)this).GetComponentInParent<Player>().data.healthHandler;
		healthHandler.reviveAction = (Action)Delegate.Remove(healthHandler.reviveAction, new Action(ResetEmpower));
		Gun gun = data.weaponHandler.gun;
		gun.ShootPojectileAction = (Action<GameObject>)Delegate.Remove(gun.ShootPojectileAction, new Action<GameObject>(Attack));
		Block componentInParent = ((Component)this).GetComponentInParent<Block>();
		componentInParent.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(componentInParent.BlockAction, new Action<BlockTriggerType>(Block));
		if ((Object)(object)effectObject != (Object)null)
		{
			Object.Destroy((Object)(object)effectObject);
		}
	}

	private void ResetEmpower()
	{
		empowered = false;
	}

	public void Block(BlockTriggerType trigger)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0003: Invalid comparison between Unknown and I4
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Invalid comparison between Unknown and I4
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Invalid comparison between Unknown and I4
		if ((int)trigger != 3 && (int)trigger != 4 && (int)trigger != 2)
		{
			empowered = true;
		}
	}

	public void Attack(GameObject projectile)
	{
		//IL_0039: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0065: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Unknown result type (might be due to invalid IL or missing references)
		//IL_008d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0098: Unknown result type (might be due to invalid IL or missing references)
		SpawnedAttack component = projectile.GetComponent<SpawnedAttack>();
		if (!Object.op_Implicit((Object)(object)component))
		{
			return;
		}
		if (empowered)
		{
			ProjectileHit component2 = projectile.GetComponent<ProjectileHit>();
			MoveTransform component3 = projectile.GetComponent<MoveTransform>();
			component.SetColor(Color.yellow);
			component2.damage *= dmgMultiplier;
			component3.localForce *= speedMultiplier;
			if (Object.op_Implicit((Object)(object)addObjectToBullet))
			{
				Object.Instantiate<GameObject>(addObjectToBullet, projectile.transform.position, projectile.transform.rotation, projectile.transform);
			}
		}
		empowered = false;
	}

	private void Update()
	{
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		if (empowered)
		{
			particleTransform.position = ((Component)data.weaponHandler.gun).transform.position;
			particleTransform.rotation = ((Component)data.weaponHandler.gun).transform.rotation;
			if (!isOn)
			{
				SoundManager.Instance.PlayAtPosition(soundEmpowerSpawn, SoundManager.Instance.GetTransform(), ((Component)this).transform);
				for (int i = 0; i < parts.Length; i++)
				{
					parts[i].Play();
				}
				isOn = true;
			}
		}
		else if (isOn)
		{
			for (int j = 0; j < parts.Length; j++)
			{
				parts[j].Stop();
			}
			isOn = false;
		}
	}
}
public static class CurseCardTracker
{
	public static HashSet<GameObject> playersWithCurse = new HashSet<GameObject>();

	public static void AddPlayer(GameObject player)
	{
		playersWithCurse.Add(player);
		Debug.Log("[CurseCardTracker] Игрок " + ((Object)player).name + " добавлен в трекер.");
	}

	public static void RemovePlayer(GameObject player)
	{
		playersWithCurse.Remove(player);
		Debug.Log("[CurseCardTracker] Игрок " + ((Object)player).name + " удалён из трекера.");
	}

	public static bool HasCurseCard(GameObject player)
	{
		bool flag = playersWithCurse.Contains(player);
		Debug.Log($"[CurseCardTracker] Проверка карта у {((Object)player).name}: {flag}");
		return flag;
	}
}
public static class TurretTracker
{
	private static readonly Dictionary<int, bool> hasTurret;

	public static bool HasTurret(Player player)
	{
		bool value;
		return hasTurret.TryGetValue(player.playerID, out value) && value;
	}

	public static void GiveTurret(Player player)
	{
		hasTurret[player.playerID] = true;
	}

	static TurretTracker()
	{
		hasTurret = new Dictionary<int, bool>();
		GameModeManager.AddHook("GameStart", (Func<IGameModeHandler, IEnumerator>)delegate
		{
			hasTurret.Clear();
			return null;
		});
	}
}
namespace Dron
{
	public static class Assets
	{
		private static readonly AssetBundle CardArtBundle = AssetUtils.LoadAssetBundleFromResources("my-asset", typeof(Dron).Assembly);

		public static GameObject KamikazeArt = CardArtBundle.LoadAsset<GameObject>("C_Kamikaze");

		public static GameObject SpeedDemonArt = CardArtBundle.LoadAsset<GameObject>("С_Speed_Demon");

		public static GameObject QuickReloadArt = CardArtBundle.LoadAsset<GameObject>("C_QuickReload");

		public static GameObject MinigunArt = CardArtBundle.LoadAsset<GameObject>("C_Minigun");

		public static GameObject PhoenixArt = CardArtBundle.LoadAsset<GameObject>("C_Phoenix");

		public static GameObject TankArt = CardArtBundle.LoadAsset<GameObject>("C_Tank");

		public static GameObject SprayArt = CardArtBundle.LoadAsset<GameObject>("C_Spray");

		public static GameObject FriendlyBounceArt = CardArtBundle.LoadAsset<GameObject>("C_FriendlyBounce");

		public static GameObject JumperArt = CardArtBundle.LoadAsset<GameObject>("C_Jumper");

		public static GameObject HealMeArt = CardArtBundle.LoadAsset<GameObject>("C_HealMe");

		public static GameObject ThornShieldArt = CardArtBundle.LoadAsset<GameObject>("C_ThornShield");

		public static GameObject SmallButToughArt = CardArtBundle.LoadAsset<GameObject>("C_SmallButTough");

		public static GameObject BulletTeleporterArt = CardArtBundle.LoadAsset<GameObject>("C_BulletTeleporter");

		public static GameObject ComeToMeArt = CardArtBundle.LoadAsset<GameObject>("C_ComeToMe");

		public static GameObject AntiradarArt = CardArtBundle.LoadAsset<GameObject>("C_Antiradar");

		public static GameObject RandomTeleportArt = CardArtBundle.LoadAsset<GameObject>("С_RandomTeleport");

		public static GameObject DestroyerArt = CardArtBundle.LoadAsset<GameObject>("C_Destroyer");

		public static Sprite RedSquare = CardArtBundle.LoadAsset<Sprite>("RedSquare");

		public static GameObject MyBulletPrefab = CardArtBundle.LoadAsset<GameObject>("MyBullet");
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.willuwontu.rounds.Dron", "Dron", "1.0.0")]
	[BepInProcess("Rounds.exe")]
	public class Dron : BaseUnityPlugin
	{
		private const string ModId = "com.willuwontu.rounds.Dron";

		private const string ModName = "Dron";

		public const string Version = "1.0.0";

		public const string ModInitials = "DRON";

		public static CardCategory TurretUpgradeCategory;

		public static List<CardInfo> hiddenCards = new List<CardInfo>();

		internal static AssetBundle ArtAssetsOther;

		internal static CardCategory TurretCard;

		public static Dron instance { get; private set; }

		private void Awake()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			Harmony val = new Harmony("com.willuwontu.rounds.Dron");
			val.PatchAll();
		}

		private void Start()
		{
			ArtAssetsOther = AssetUtils.LoadAssetBundleFromResources("jerome_loadout", typeof(Dron).Assembly);
			CustomCard.BuildCard<Tank>();
			CustomCard.BuildCard<Spray>();
			CustomCard.BuildCard<Kamikaze>();
			CustomCard.BuildCard<Phoenix>();
			CustomCard.BuildCard<FriendlyBounce>();
			CustomCard.BuildCard<SpeedDemon>();
			CustomCard.BuildCard<Jumper>();
			CustomCard.BuildCard<HealMe>();
			CustomCard.BuildCard<ThornShield>();
			CustomCard.BuildCard<Minigun>();
			CustomCard.BuildCard<SmallButTough>();
			CustomCard.BuildCard<BulletTeleporter>();
			CustomCard.BuildCard<ComeToMe>();
			CustomCard.BuildCard<AntiRadar>();
			CustomCard.BuildCard<RandomTeleport>();
			CustomCard.BuildCard<Destroyer>();
			instance = this;
		}
	}
}
namespace Dron.Utils
{
	public class MapUtils : MonoBehaviour
	{
		public class MapObject
		{
			public enum MapObjectType
			{
				Invalid = -1,
				Generic,
				Background,
				BuzzSaw,
				BoxDestructible,
				MapExtendedZones
			}

			public GameObject gameObject;

			public MapObjectType type;

			public MapObject(GameObject obj, MapObjectType t)
			{
				gameObject = obj;
				type = t;
			}

			public static MapObjectType CheckMapObject(GameObject obj)
			{
				if (!obj.activeInHierarchy)
				{
					return MapObjectType.Invalid;
				}
				if (Object.op_Implicit((Object)(object)obj.GetComponent<CircleCollider2D>()) && Object.op_Implicit((Object)(object)obj.GetComponent<DamageBox>()))
				{
					return MapObjectType.BuzzSaw;
				}
				if (Object.op_Implicit((Object)(object)obj.GetComponent<PolygonCollider2D>()) && Object.op_Implicit((Object)(object)obj.GetComponent<DamageBox>()))
				{
					return MapObjectType.BuzzSaw;
				}
				if (Object.op_Implicit((Object)(object)obj.GetComponent<BoxCollider2D>()) && Object.op_Implicit((Object)(object)obj.GetComponent<DestructibleBoxDestruction>()))
				{
					return MapObjectType.BoxDestructible;
				}
				if (Object.op_Implicit((Object)(object)obj.GetComponent<SpriteRenderer>()) && Object.op_Implicit((Object)(object)obj.GetComponent<BoxCollider2D>()))
				{
					if (((Object)obj).name.Contains("WWMO.MapObjects"))
					{
						return MapObjectType.MapExtendedZones;
					}
					if (!((Behaviour)obj.GetComponent<SFPolygon>()).isActiveAndEnabled)
					{
						return MapObjectType.Background;
					}
					return MapObjectType.Generic;
				}
				if (Object.op_Implicit((Object)(object)obj.GetComponent<SpriteRenderer>()) && Object.op_Implicit((Object)(object)obj.GetComponent<CircleCollider2D>()))
				{
					if (!((Behaviour)obj.GetComponent<SFPolygon>()).isActiveAndEnabled)
					{
						return MapObjectType.Background;
					}
					return MapObjectType.Generic;
				}
				if (Object.op_Implicit((Object)(object)obj.GetComponent<SpriteRenderer>()) && Object.op_Implicit((Object)(object)obj.GetComponent<PolygonCollider2D>()))
				{
					if (!((Behaviour)obj.GetComponent<SFPolygon>()).isActiveAndEnabled)
					{
						return MapObjectType.Background;
					}
					return MapObjectType.Generic;
				}
				return MapObjectType.Invalid;
			}
		}

		public static List<MapObject> mapObjects;

		public static Scene mapScene;

		[PunRPC]
		public static bool RPCA_UpdateMapObjectsList()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				if (mapObjects != null)
				{
					ClearMapObjectsList();
				}
				mapScene = SceneManager.GetSceneAt(1);
				if (!((Scene)(ref mapScene)).IsValid())
				{
					return false;
				}
				GameObject val = ((Scene)(ref mapScene)).GetRootGameObjects()[0];
				if (!Object.op_Implicit((Object)(object)val))
				{
					return false;
				}
				Transform[] componentsInChildren = val.GetComponentsInChildren<Transform>();
				mapObjects = new List<MapObject>();
				Transform[] array = componentsInChildren;
				foreach (Transform val2 in array)
				{
					MapObject.MapObjectType mapObjectType = MapObject.CheckMapObject(((Component)val2).gameObject);
					if (mapObjectType != MapObject.MapObjectType.Invalid)
					{
						mapObjects.Add(new MapObject(((Component)val2).gameObject, mapObjectType));
					}
				}
				return true;
			}
			catch (Exception ex)
			{
				Debug.LogError("[Dron] MapUtils.RPCA_UpdateMapObjectsList failed!");
				Debug.LogError(ex.ToString());
				return false;
			}
		}

		[PunRPC]
		public static bool RPCA_DestroyMapObject(GameObject gameObject)
		{
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)gameObject == (Object)null)
			{
				Debug.Log("[Dron] RPCA_DestroyMapObject: GameObject is null!");
				return false;
			}
			if (!RPCA_UpdateMapObjectsList())
			{
				return false;
			}
			string name = ((Scene)(ref mapScene)).name;
			Scene scene = gameObject.scene;
			if (name != ((Scene)(ref scene)).name)
			{
				Debug.Log("[Dron] RPCA_DestroyMapObject: Not a map object!");
				return false;
			}
			bool flag = false;
			foreach (MapObject mapObject in mapObjects)
			{
				if ((Object)(object)mapObject.gameObject == (Object)(object)gameObject)
				{
					flag = true;
					break;
				}
			}
			if (flag)
			{
				Debug.Log("[Dron] RPCA_DestroyMapObject: Destroying [" + ((Object)gameObject).name + "]");
				Object.Destroy((Object)(object)gameObject);
				return true;
			}
			Debug.Log("[Dron] RPCA_DestroyMapObject: Target object not found!");
			return false;
		}

		public static void ClearMapObjectsList()
		{
			if (mapObjects != null)
			{
				mapObjects.Clear();
			}
			mapObjects = null;
		}
	}
}
namespace Dron.Patches
{
	[HarmonyPatch(typeof(ProjectileHit))]
	public static class BulletHitPatch
	{
		[HarmonyPostfix]
		[HarmonyPatch("Hit")]
		public static void OnBulletHit(ProjectileHit __instance, HitInfo hit)
		{
			Transform transform = hit.transform;
			Debug.Log("[BulletHitPatch] Пуля попала в " + (((transform != null) ? ((Object)transform).name : null) ?? "null"));
			Player ownPlayer = __instance.ownPlayer;
			if ((Object)(object)ownPlayer != (Object)null)
			{
				Debug.Log("[BulletHitPatch] Владелец пули: " + ((Object)ownPlayer).name);
				if (((Component)ownPlayer).CompareTag("Player"))
				{
					Debug.Log("[BulletHitPatch] Владелец — игрок, проверяем, есть ли у него карта.");
					if (CurseCardTracker.HasCurseCard(((Component)ownPlayer).gameObject))
					{
						Debug.Log("[BulletHitPatch] Владелец имеет карту, проверяем врага.");
						Transform transform2 = hit.transform;
						HealthHandler val = ((transform2 != null) ? ((Component)transform2).GetComponentInParent<HealthHandler>() : null);
						if ((Object)(object)val != (Object)null)
						{
							Debug.Log("[BulletHitPatch] Найден враг: " + ((Object)val).name + ", проверяем, не враг ли это игрок.");
							if (!((Component)val).CompareTag("Player"))
							{
								Debug.Log("[BulletHitPatch] Цель — враг, добавляем CurseVisualEffect.");
								if (!Object.op_Implicit((Object)(object)((Component)val).gameObject.GetComponent<CurseVisualEffect>()))
								{
									((Component)val).gameObject.AddComponent<CurseVisualEffect>();
									Debug.Log("[BulletHitPatch] Добавлен CurseVisualEffect на врага " + ((Object)val).name + ".");
								}
								else
								{
									Debug.Log("[BulletHitPatch] У врага " + ((Object)val).name + " уже есть CurseVisualEffect.");
								}
							}
							else
							{
								Debug.Log("[BulletHitPatch] Цель — игрок, не применяем эффект.");
							}
						}
						else
						{
							Debug.Log("[BulletHitPatch] Не найден HealthHandler у цели.");
						}
					}
					else
					{
						Debug.Log("[BulletHitPatch] У владельца нет карты, эффект не применяется.");
					}
				}
				else
				{
					Debug.Log("[BulletHitPatch] Владелец пули не является игроком.");
				}
			}
			else
			{
				Debug.Log("[BulletHitPatch] Владелец пули не найден (null).");
			}
		}
	}
	[HarmonyPatch(typeof(HealthHandler), "RPCA_Die")]
	public class DeathPatchNormal
	{
		[HarmonyPostfix]
		public static void Postfix(HealthHandler __instance)
		{
			KamikazeHelper.ProcessKamikaze(__instance);
		}
	}
	[HarmonyPatch(typeof(HealthHandler), "RPCA_Die_Phoenix")]
	public class DeathPatchPhoenix
	{
		[HarmonyPostfix]
		public static void Postfix(HealthHandler __instance)
		{
			KamikazeHelper.ProcessKamikaze(__instance);
		}
	}
	public static class KamikazeHelper
	{
		public static void ProcessKamikaze(HealthHandler healthHandler)
		{
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Expected O, but got Unknown
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			Player component = ((Component)healthHandler).GetComponent<Player>();
			if ((Object)(object)component == (Object)null)
			{
				return;
			}
			bool flag = false;
			foreach (CardInfo currentCard in component.data.currentCards)
			{
				if (currentCard.cardName == "Kamikaze")
				{
					flag = true;
					break;
				}
			}
			if (flag)
			{
				GameObject val = new GameObject("KamikazeOnDeath");
				val.transform.position = ((Component)component).transform.position;
				KamikazeOnDeathComponent kamikazeOnDeathComponent = val.AddComponent<KamikazeOnDeathComponent>();
				kamikazeOnDeathComponent.SourcePlayer = component;
				kamikazeOnDeathComponent.MaxDistance = 6f;
			}
		}
	}
	public class KamikazeOnDeathComponent : MonoBehaviour
	{
		public Player SourcePlayer;

		public float MaxDistance = 18f;

		private void Start()
		{
			ExecuteKamikazeEffectOnDeath();
		}

		private void ExecuteKamikazeEffectOnDeath()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)SourcePlayer == (Object)null)
			{
				Debug.LogError("SourcePlayer is null in KamikazeOnDeathComponent");
				return;
			}
			Object.Instantiate<GameObject>(KamikazeMono.kamikazeVisual, ((Component)this).transform.position, Quaternion.identity);
			Vector2 val = Vector2.op_Implicit(((Component)this).transform.position);
			Player[] array = PlayerManager.instance.players.ToArray();
			Player[] array2 = array;
			foreach (Player val2 in array2)
			{
				if (val2.teamID != SourcePlayer.teamID && Vector2.Distance(val, Vector2.op_Implicit(((Component)val2).transform.position)) < MaxDistance && PlayerManager.instance.CanSeePlayer(Vector2.op_Implicit(((Component)this).transform.position), val2).canSee)
				{
					HealthHandler component = ((Component)val2).GetComponent<HealthHandler>();
					if ((Object)(object)component != (Object)null)
					{
						((Damagable)component).TakeDamage(200f * Vector2.down, Vector2.op_Implicit(((Component)val2).transform.position), ((Component)SourcePlayer.data.weaponHandler).gameObject, SourcePlayer, true, false);
						component.TakeForce(Vector2.MoveTowards(Vector2.op_Implicit(((Component)val2).transform.position), new Vector2(((Component)val2).transform.position.x, ((Component)val2).transform.position.y - 12000f), 12000f), (ForceMode2D)1, true, true, 0.8f);
						((Component)component).gameObject.AddComponent<CrushTestEffect>();
					}
				}
			}
			Object.Destroy((Object)(object)((Component)this).gameObject, 0.1f);
		}
	}
	[HarmonyPatch(typeof(ProjectileHit), "Update")]
	public class HomingImmunityForBees
	{
		[HarmonyPostfix]
		public static void Postfix(ProjectileHit __instance)
		{
			//IL_0022: 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)
			Homing component = ((Component)__instance).GetComponent<Homing>();
			if (!((Object)(object)component != (Object)null))
			{
				return;
			}
			Player closestPlayer = PlayerManager.instance.GetClosestPlayer(Vector2.op_Implicit(((Component)__instance).transform.position), true);
			if (!((Object)(object)closestPlayer != (Object)null))
			{
				return;
			}
			bool flag = false;
			foreach (CardInfo currentCard in closestPlayer.data.currentCards)
			{
				if (currentCard.cardName == "Anti radar")
				{
					flag = true;
					break;
				}
			}
			if (flag)
			{
				((Behaviour)component).enabled = false;
			}
		}
	}
	[HarmonyPatch(typeof(Homing), "Update")]
	public class HomingImmunityPatch
	{
		[HarmonyPrefix]
		public static bool Prefix(Homing __instance)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			Player closestPlayer = PlayerManager.instance.GetClosestPlayer(Vector2.op_Implicit(((Component)__instance).transform.position), true);
			if ((Object)(object)closestPlayer != (Object)null)
			{
				bool flag = false;
				foreach (CardInfo currentCard in closestPlayer.data.currentCards)
				{
					if (currentCard.cardName == "Anti radar")
					{
						flag = true;
						break;
					}
				}
				if (flag)
				{
					((Behaviour)__instance).enabled = false;
					return false;
				}
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(BounceEffectRetarget), "FindTarget")]
	public class TargetBouncePatch
	{
		[HarmonyPostfix]
		public static void Postfix(BounceEffectRetarget __instance, ref Player __result)
		{
			if (!((Object)(object)__result != (Object)null))
			{
				return;
			}
			bool flag = false;
			foreach (CardInfo currentCard in __result.data.currentCards)
			{
				if (currentCard.cardName == "Anti radar")
				{
					flag = true;
					break;
				}
			}
			if (flag)
			{
				__result = null;
			}
		}
	}
	[HarmonyPatch(typeof(HealthHandler), "DoDamage")]
	public class ThornShieldPatch
	{
		[HarmonyPostfix]
		public static void Postfix(HealthHandler __instance, Vector2 damage, GameObject damagingWeapon, Player damagingPlayer, bool lethal)
		{
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			Player component = ((Component)__instance).GetComponent<Player>();
			if ((Object)(object)component == (Object)null)
			{
				return;
			}
			int num = 0;
			foreach (CardInfo currentCard in component.data.currentCards)
			{
				if (currentCard.cardName == "Thorn Shield")
				{
					num++;
				}
			}
			if (num > 0 && (Object)(object)damagingPlayer != (Object)null && (Object)(object)damagingPlayer != (Object)(object)component)
			{
				float num2 = ((Vector2)(ref damage)).magnitude * 0.15f * (float)num;
				HealthHandler component2 = ((Component)damagingPlayer).GetComponent<HealthHandler>();
				if ((Object)(object)component2 != (Object)null)
				{
					((Damagable)component2).TakeDamage(num2 * Vector2.down, Vector2.op_Implicit(((Component)damagingPlayer).transform.position), ((Component)component.data.weaponHandler).gameObject, component, true, false);
				}
			}
		}
	}
}
namespace Dron.Effects
{
	public class CrushTestEffect : ReversibleEffect
	{
		private readonly Color color = new Color(1f, 0.3f, 0f, 1f);

		private ReversibleColorEffect colorEffect;

		private readonly float updateDelay = 0.1f;

		private float startTime;

		private float count;

		public override void OnOnEnable()
		{
			if ((Object)(object)colorEffect != (Object)null)
			{
				((ColorEffect)colorEffect).Destroy();
			}
		}

		public override void OnStart()
		{
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			base.characterStatModifiersModifier.movementSpeed_mult = 0.5f;
			base.characterStatModifiersModifier.jump_mult = 0.3f;
			base.gravityModifier.gravityForce_mult = 3f;
			ResetTimer();
			count = 0f;
			colorEffect = ((Component)base.player).gameObject.AddComponent<ReversibleColorEffect>();
			((ColorEffect)colorEffect).SetColor(color);
			colorEffect.SetLivesToEffect(1);
		}

		public override void OnUpdate()
		{
			if (Time.time >= startTime + updateDelay)
			{
				ResetTimer();
				count += 0.1f;
				if (count >= 2f)
				{
					((ReversibleEffect)this).Destroy();
				}
				if (((Component)this).GetComponent<Player>().data.dead || ((Component)this).GetComponent<Player>().data.health <= 0f || !((Component)((Component)this).GetComponent<Player>()).gameObject.activeInHierarchy)
				{
					ResetTimer();
					((ReversibleEffect)this).Destroy();
				}
			}
		}

		public override void OnOnDisable()
		{
			if ((Object)(object)colorEffect != (Object)null)
			{
				((ColorEffect)colorEffect).Destroy();
			}
		}

		public override void OnOnDestroy()
		{
			if ((Object)(object)colorEffect != (Object)null)
			{
				((ColorEffect)colorEffect).Destroy();
			}
		}

		private void ResetTimer()
		{
			startTime = Time.time;
		}
	}
	public class EnemyPulseEffect : MonoBehaviour
	{
		public float totalDuration = 2f;

		public int pulseCount = 3;

		public float startRadius = 3f;

		public float endRadius = 0.5f;

		public Color color = Color.white;

		public float lineWidth = 0.08f;

		private LineRenderer lineRenderer;

		private float pulseInterval;

		private int currentPulse = 0;

		private float timer = 0f;

		private bool isPlaying = true;

		private void Start()
		{
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Expected O, but got Unknown
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			pulseInterval = totalDuration / (float)pulseCount;
			lineRenderer = ((Component)this).gameObject.AddComponent<LineRenderer>();
			lineRenderer.useWorldSpace = true;
			lineRenderer.positionCount = 32;
			lineRenderer.startWidth = lineWidth;
			lineRenderer.endWidth = lineWidth;
			((Renderer)lineRenderer).material = new Material(Shader.Find("Sprites/Default"));
			lineRenderer.startColor = color;
			lineRenderer.endColor = color;
		}

		private void Update()
		{
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			if (!isPlaying || currentPulse >= pulseCount)
			{
				return;
			}
			timer += Time.deltaTime;
			float num = Mathf.Clamp01(timer / pulseInterval);
			float radius = Mathf.Lerp(startRadius, endRadius, num);
			DrawCircle(((Component)this).transform.position, radius);
			if (num >= 1f)
			{
				currentPulse++;
				timer = 0f;
				if (currentPulse >= pulseCount)
				{
					isPlaying = false;
					Object.Destroy((Object)(object)((Component)this).gameObject);
				}
			}
		}

		private void DrawCircle(Vector3 center, float radius)
		{
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < lineRenderer.positionCount; i++)
			{
				float num = (float)i / (float)lineRenderer.positionCount * 2f * MathF.PI;
				float num2 = Mathf.Cos(num) * radius;
				float num3 = Mathf.Sin(num) * radius;
				lineRenderer.SetPosition(i, center + new Vector3(num2, num3, 0f));
			}
		}
	}
	public class FriendlyBulletsDealtDamageEffect : DealtDamageEffect
	{
		public float multiplier = 1f;

		public override void DealtDamage(Vector2 damage, bool selfDamage, Player damagedPlayer = null)
		{
			//IL_000e: 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)
			Player damagedPlayer2 = damagedPlayer;
			if (!selfDamage && (!((Object)(object)damagedPlayer2 != (Object)null) || damagedPlayer2.teamID != ((Component)this).gameObject.GetComponent<Player>().teamID))
			{
				return;
			}
			if (damagedPlayer2.data.health - ((Vector2)(ref damage)).magnitude <= 0f)
			{
				damagedPlayer2.data.healthHandler.Heal(((Vector2)(ref damage)).magnitude * (1f - multiplier));
				return;
			}
			ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)Unbound.Instance, 2, (Action)delegate
			{
				damagedPlayer2.data.healthHandler.Heal(((Vector2)(ref damage)).magnitude * (1f - multiplier));
			});
		}
	}
}
namespace Dron.MonoBehaviors
{
	public class CircleWaveEffect : MonoBehaviour
	{
		private class PulseRunner : MonoBehaviour
		{
			[CompilerGenerated]
			private sealed class <RunPulses>d__1 : IEnumerator<object>, IEnumerator, IDisposable
			{
				private int <>1__state;

				private object <>2__current;

				public Transform owner;

				public Vector3 worldPos;

				public float totalDur;

				public int count;

				public float pulseDur;

				public float startRad;

				public float endRad;

				public Color color;

				public PulseRunner <>4__this;

				private float <interval>5__1;

				private int <i>5__2;

				private GameObject <effect>5__3;

				object IEnumerator<object>.Current
				{
					[DebuggerHidden]
					get
					{
						return <>2__current;
					}
				}

				object IEnumerator.Current
				{
					[DebuggerHidden]
					get
					{
						return <>2__current;
					}
				}

				[DebuggerHidden]
				public <RunPulses>d__1(int <>1__state)
				{
					this.<>1__state = <>1__state;
				}

				[DebuggerHidden]
				void IDisposable.Dispose()
				{
					<effect>5__3 = null;
					<>1__state = -2;
				}

				private bool MoveNext()
				{
					//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
					//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
					//IL_005b: Unknown result type (might be due to invalid IL or missing references)
					//IL_0065: Expected O, but got Unknown
					//IL_0088: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
					//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
					//IL_00fe: Expected O, but got Unknown
					switch (<>1__state)
					{
					default:
						return false;
					case 0:
						<>1__state = -1;
						<interval>5__1 = totalDur / (float)count;
						<i>5__2 = 0;
						break;
					case 1:
						<>1__state = -1;
						<i>5__2++;
						break;
					}
					if (<i>5__2 < count)
					{
						if ((Object)(object)owner != (Object)null)
						{
							<effect>5__3 = new GameObject("CircleWavePulse");
							<effect>5__3.transform.SetParent(owner, true);
							<effect>5__3.transform.localPosition = Vector3.zero;
							<>4__this.SetupEffect(<effect>5__3, pulseDur, startRad, endRad, color);
							<effect>5__3 = null;
						}
						else
						{
							CreateEffect(worldPos, pulseDur, startRad, endRad, color);
						}
						<>2__current = (object)new WaitForSeconds(<interval>5__1);
						<>1__state = 1;
						return true;
					}
					Object.Destroy((Object)(object)((Component)<>4__this).gameObject);
					return false;
				}

				bool IEnumerator.MoveNext()
				{
					//ILSpy generated this explicit interface implementation from .override directive in MoveNext
					return this.MoveNext();
				}

				[DebuggerHidden]
				void IEnumerator.Reset()
				{
					throw new NotSupportedException();
				}
			}

			public void StartPulsing(Transform owner, Vector3 worldPos, float totalDur, int count, float pulseDur, float startRad, float endRad, Color color)
			{
				//IL_0004: 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)
				((MonoBehaviour)this).StartCoroutine(RunPulses(owner, worldPos, totalDur, count, pulseDur, startRad, endRad, color));
			}

			[IteratorStateMachine(typeof(<RunPulses>d__1))]
			private IEnumerator RunPulses(Transform owner, Vector3 worldPos, float totalDur, int count, float pulseDur, float startRad, float endRad, Color color)
			{
				//IL_0015: Unknown result type (might be due to invalid IL or missing references)
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_0043: 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)
				//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
				return new <RunPulses>d__1(0)
				{
					<>4__this = this,
					owner = owner,
					worldPos = worldPos,
					totalDur = totalDur,
					count = count,
					pulseDur = pulseDur,
					startRad = startRad,
					endRad = endRad,
					color = color
				};
			}

			private void SetupEffect(GameObject go, float dur, float startRad, float endRad, Color color)
			{
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				//IL_001d: Expected O, but got Unknown
				//IL_001f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0028: Unknown result type (might be due to invalid IL or missing references)
				//IL_009a: Unknown result type (might be due to invalid IL or missing references)
				//IL_009f: Unknown result type (might be due to invalid IL or missing references)
				//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
				LineRenderer val = go.AddComponent<LineRenderer>();
				((Renderer)val).material = new Material(Shader.Find("Sprites/Default"));
				val.startColor = color;
				val.endColor = color;
				float startWidth = (val.endWidth = 0.1f);
				val.startWidth = startWidth;
				val.useWorldSpace = false;
				int num2 = 64;
				val.positionCount = num2 + 1;
				Vector3[] array = (Vector3[])(object)new Vector3[num2 + 1];
				for (int i = 0; i <= num2; i++)
				{
					float num3 = (float)i / (float)num2 * MathF.PI * 2f;
					array[i] = new Vector3(Mathf.Cos(num3) * startRad, Mathf.Sin(num3) * startRad, 0f);
				}
				val.SetPositions(array);
				CircleWaveEffect circleWaveEffect = go.AddComponent<CircleWaveEffect>();
				circleWaveEffect.Setup(val, num2, dur, startRad, endRad, color);
			}
		}

		private LineRenderer lineRenderer;

		private int segments;

		private float elapsed = 0f;

		private float duration = 0.5f;

		private float startRadius = 0f;

		private float endRadius = 3f;

		private Color startColor = Color.white;

		public void Setup(LineRenderer lr, int segs, float dur = 0.5f, float startRad = 0f, float endRad = 3f, Color color = default(Color))
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: 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_0039: 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)
			lineRenderer = lr;
			segments = segs;
			duration = dur;
			startRadius = startRad;
			endRadius = endRad;
			startColor = ((color == default(Color)) ? Color.white : color);
		}

		private void Update()
		{
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			elapsed += Time.deltaTime;
			if (elapsed > duration)
			{
				Object.Destroy((Object)(object)((Component)this).gameObject);
				return;
			}
			float num = startRadius + elapsed / duration * (endRadius - startRadius);
			Vector3[] array = (Vector3[])(object)new Vector3[segments + 1];
			for (int i = 0; i <= segments; i++)
			{
				float num2 = (float)i / (float)segments * MathF.PI * 2f;
				float num3 = Mathf.Cos(num2) * num;
				float num4 = Mathf.Sin(num2) * num;
				array[i] = new Vector3(num3, num4, 0f);
			}
			lineRenderer.SetPositions(array);
			float num5 = 1f - elapsed / duration;
			Color endColor = default(Color);
			((Color)(ref endColor))..ctor(startColor.r, startColor.g, startColor.b, num5);
			lineRenderer.startColor = endColor;
			lineRenderer.endColor = endColor;
		}

		public static GameObject CreateEffect(Vector3 position, float duration = 0.5f, float startRadius = 0f, float endRadius = 3f, Color color = default(Color))
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Expected O, but got Unknown
			//IL_0036: 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_0040: 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_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject("ExpandFadeEffect");
			val.transform.position = position;
			LineRenderer val2 = val.AddComponent<LineRenderer>();
			((Renderer)val2).material = new Material(Shader.Find("Sprites/Default"));
			Color endColor = (val2.startColor = ((color == default(Color)) ? Color.white : color));
			val2.endColor = endColor;
			val2.startWidth = 0.1f;
			val2.endWidth = 0.1f;
			val2.useWorldSpace = false;
			int num = 64;
			Vector3[] array = (Vector3[])(object)new Vector3[num + 1];
			for (int i = 0; i <= num; i++)
			{
				float num2 = (float)i / (float)num * MathF.PI * 2f;
				float num3 = Mathf.Cos(num2) * startRadius;
				float num4 = Mathf.Sin(num2) * startRadius;
				array[i] = new Vector3(num3, num4, 0f);
			}
			val2.positionCount = num + 1;
			val2.SetPositions(array);
			CircleWaveEffect circleWaveEffect = val.AddComponent<CircleWaveEffect>();
			circleWaveEffect.Setup(val2, num, duration, startRadius, endRadius, color);
			return val;
		}

		public static void CreatePulsingEffect(Transform owner = null, Vector3 position = default(Vector3), float totalDuration = 2f, int pulseCount = 3, float pulseDuration = 0.5f, float startRadius = 0.2f, float endRadius = 3.5f, Color color = default(Color))
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: 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_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			PulseRunner pulseRunner = new GameObject("CircleWavePulseRunner").AddComponent<PulseRunner>();
			pulseRunner.StartPulsing(owner, position, totalDuration, pulseCount, pulseDuration, startRadius, endRadius, (color == default(Color)) ? Color.white : color);
		}
	}
	public class BeetleMono : MonoBehaviour
	{
		internal Player player;

		internal Gun gun;

		internal GunAmmo gunAmmo;

		internal Gravity gravity;

		internal HealthHandler healthHandler;

		internal CharacterData data;

		internal Block block;

		private readonly float updateDelay = 0.1f;

		private float startTime;

		public int numcheck;

		public bool active;

		private void Start()
		{
			data = ((Component)this).GetComponentInParent<CharacterData>();
			HealthHandler val = data.healthHandler;
			val.reviveAction = (Action)Delegate.Combine(val.reviveAction, new Action(ResetTimer));
		}

		private void OnDestroy()
		{
			HealthHandler val = data.healthHandler;
			val.reviveAction = (Action)Delegate.Combine(val.reviveAction, new Action(ResetTimer));
		}

		public void Destroy()
		{
			Object.Destroy((Object)(object)this);
		}

		public void Awake()
		{
			player = ((Component)this).gameObject.GetComponent<Player>();
			gun = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>();
			data = ((Component)player).GetComponent<CharacterData>();
			healthHandler = ((Component)player).GetComponent<HealthHandler>();
			gravity = ((Component)player).GetComponent<Gravity>();
			block = ((Component)player).GetComponent<Block>();
			gunAmmo = ((Component)gun).GetComponentInChildren<GunAmmo>();
			numcheck = 0;
		}

		private void Update()
		{
			if (!(Time.time >= startTime + updateDelay))
			{
				return;
			}
			ResetTimer();
			for (int i = 0; i <= player.data.currentCards.Count - 1; i++)
			{
				if (player.data.currentCards[i].cardName == "Beetle")
				{
					numcheck++;
				}
			}
			if (numcheck > 0)
			{
				ResetTimer();
				if (player.data.health < player.data.maxHealth && !active)
				{
					active = true;
					((Component)((Component)player).transform).gameObject.AddComponent<BeetleRegenMono>();
				}
			}
		}

		private void ResetTimer()
		{
			startTime = Time.time;
			numcheck = 0;
		}
	}
	public class BeetleRegenMono : ReversibleEffect
	{
		private readonly Color color = Color.blue;

		private ReversibleColorEffect colorEffect;

		private BeetleMono effect;

		private readonly float updateDelay = 0.1f;

		private float startTime;

		public override void OnOnEnable()
		{
		}

		public override void OnStart()
		{
			HealthHandler healthHandler = base.player.data.healthHandler;
			healthHandler.regeneration += 5f;
			effect = ((Component)base.player).GetComponent<BeetleMono>();
			ResetTimer();
		}

		public override void OnUpdate()
		{
			if (Time.time >= startTime + updateDelay)
			{
				ResetTimer();
				if (base.player.data.health >= base.player.data.maxHealth)
				{
					((ReversibleEffect)this).Destroy();
				}
				if (((Component)this).GetComponent<Player>().data.dead || ((Component)this).GetComponent<Player>().data.health <= 0f || !((Component)((Component)this).GetComponent<Player>()).gameObject.activeInHierarchy)
				{
					ResetTimer();
					((ReversibleEffect)this).Destroy();
				}
			}
		}

		public override void OnOnDisable()
		{
		}

		public override void OnOnDestroy()
		{
			effect.active = false;
			if (base.player.data.healthHandler.regeneration >= 5f)
			{
				HealthHandler healthHandler = base.player.data.healthHandler;
				healthHandler.regeneration -= 5f;
			}
		}

		private void ResetTimer()
		{
			startTime = Time.time;
		}
	}
	public class BulletDamageChecker : MonoBehaviour
	{
		public float bulletDamage;

		private void Start()
		{
			ProjectileHit component = ((Component)this).GetComponent<ProjectileHit>();
			if ((Object)(object)component != (Object)null)
			{
				bulletDamage = component.damage;
			}
		}
	}
	public class BulletTracker : MonoBehaviour
	{
		public Player player;

		private void Start()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = GameObject.CreatePrimitive((PrimitiveType)0);
			val.transform.position = ((Component)player).transform.position;
			val.AddComponent<BulletComponent>().tracker = this;
		}
	}
	public class BulletComponent : MonoBehaviour
	{
		public BulletTracker tracker;

		private void OnTriggerEnter2D(Collider2D other)
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)tracker.player != (Object)null)
			{
				((Component)tracker.player).transform.position = ((Component)this).transform.position;
			}
			Object.Destroy((Object)(object)((Component)this).gameObject);
		}
	}
	public class CrushTestMono : MonoBehaviour
	{
		private class CrushTestSpawner : MonoBehaviour
		{
			private void Start()
			{
				//IL_0026: Unknown result type (might be due to invalid IL or missing references)
				Debug.Log((object)"[DRON][CrushTestMono] private class CrushTestSpawner : MonoBehaviour");
				((Component)this).gameObject.transform.localScale = new Vector3(1f, 1f, 1f);
				((Component)this).gameObject.AddComponent<RemoveAfterSeconds>().seconds = 1f;
				ExtensionMethods.SetFieldValue((object)((Component)((Component)this).gameObject.transform.GetChild(1)).GetComponent<LineEffect>(), "inited", (object)false);
				typeof(LineEffect).InvokeMember("Init", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, ((Component)((Component)this).gameObject.transform.GetChild(1)).GetComponent<LineEffect>(), new object[0]);
				Debug.Log((object)"[DRON][CrushTestMono] 5");
				((Component)((Component)this).gameObject.transform.GetChild(1)).GetComponent<LineEffect>().radius = 4.4f;
				ExtensionMethods.SetFieldValue((object)((Component)((Component)this).gameObject.transform.GetChild(1)).GetComponent<LineEffect>(), "startWidth", (object)3.8f);
				((Component)((Component)this).gameObject.transform.GetChild(1)).GetComponent<LineEffect>().Play();
				Debug.Log((object)"[DRON][CrushTestMono] 6");
			}
		}

		private bool hasDied = false;

		private readonly float maxDistance = 8f;

		public Block block;

		public Player player;

		public CharacterData data;

		public Gun gun;

		private Action<BlockTriggerType> gravy;

		private Action<BlockTriggerType> basic;

		private static GameObject crushtestvisual;

		private readonly float updateDelay = 0.1f;

		private readonly float effectCooldown;

		private float startTime;

		private float timeOfLastEffect;

		private bool canTrigger;

		private bool hasTriggered;

		public int numcheck;

		public static SoundEvent fieldsound;

		private SoundParameterIntensity soundParameterIntensity = new SoundParameterIntensity(0.3f, (UpdateMode)0);

		public static GameObject crushTestVisual
		{
			get
			{
				//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
				//IL_0142: 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_019d: Unknown result type (might be due to invalid IL or missing references)
				//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
				Debug.Log((object)"[DRON][CrushTestMono] 7");
				GameObject result;
				if ((Object)(object)crushtestvisual != (Object)null)
				{
					Debug.Log((object)"[DRON][CrushTestMono] 8");
					result = crushtestvisual;
					Debug.Log((object)"[DRON][CrushTestMono] 9");
				}
				else
				{
					Debug.Log((object)"[DRON][CrushTestMono] 10");
					IEnumerable<CardInfo> first = ((ObservableCollection<CardInfo>)typeof(CardManager).GetField("activeCards", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null)).ToList();
					List<CardInfo> second = (List<CardInfo>)typeof(CardManager).GetField("inactiveCards", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null);
					crushtestvisual = Object.Instantiate<GameObject>(((Component)(from card in first.Concat(second).ToList()
						where card.cardName.ToLower() == "overpower"
						select card).First()).GetComponent<CharacterStatModifiers>().AddObjectToPlayer.GetComponent<SpawnObjects>().objectToSpawn[0], new Vector3(0f, 100000f, 0f), Quaternion.identity);
					((Object)crushtestvisual).name = "E_Crush_Test";
					Object.DontDestroyOnLoad((Object)(object)crushtestvisual);
					ParticleSystem[] componentsInChildren = crushtestvisual.GetComponentsInChildren<ParticleSystem>();
					for (int i = 0; i < componentsInChildren.Length; i++)
					{
						componentsInChildren[i].startColor = new Color(255f, 20f, 20f);
					}
					((Component)crushtestvisual.transform.GetChild(1)).GetComponent<LineEffect>().colorOverTime.colorKeys = (GradientColorKey[])(object)new GradientColorKey[1]
					{
						new GradientColorKey(new Color(255f, 0f, 0f), 0.3f)
					};
					Object.Destroy((Object)(object)((Component)crushtestvisual.transform.GetChild(2)).gameObject);
					((Component)crushtestvisual.transform.GetChild(1)).GetComponent<LineEffect>().offsetMultiplier = 0f;
					((Component)crushtestvisual.transform.GetChild(1)).GetComponent<LineEffect>().playOnAwake = true;
					Object.Destroy((Object)(object)crushtestvisual.GetComponent<FollowPlayer>());
					Object.Destroy((Object)(object)crushtestvisual.GetComponent<DelayEvent>());
					Explosion component = crushtestvisual.GetComponent<Explosion>();
					Debug.Log((object)string.Format("[{0}][CrushTestMono] explosion {1}", "DRON", component));
					if ((Object)(object)component != (Object)null)
					{
						Debug.Log((object)"[DRON][CrushTestMono] Удаляем");
						component.hitPlayerAction = null;
						Object.Destroy((Object)(object)component);
					}
					Object.Destroy((Object)(object)crushtestvisual.GetComponent<RemoveAfterSeconds>());
					crushtestvisual.AddComponent<CrushTestSpawner>();
					result = crushtestvisual;
					Debug.Log((object)"[DRON][CrushTestMono] 11");
				}
				return result;
			}
			set
			{
			}
		}

		private void Start()
		{
			Debug.Log((object)"[DRON][CrushTestMono]  Start()");
			player = ((Component)this).GetComponent<Player>();
			block = ((Component)this).GetComponent<Block>();
			data = ((Component)this).GetComponent<CharacterData>();
			gun = ((Component)this).GetComponent<Gun>();
			ResetEffectTimer();
			ResetTimer();
			canTrigger = true;
			hasTriggered = false;
			basic = block.BlockAction;
			if (Object.op_Implicit((Object)(object)block))
			{
				gravy = GetDoBlockAction(player, block).Invoke;
				block.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(block.BlockAction, gravy);
			}
		}

		public void OnDestroy()
		{
			if ((Object)(object)data != (Object)null && data.dead && !hasDied)
			{
				Debug.Log((object)"[DRON][CrushTestMono] OnDestroy: Player died, triggering crush effect.");
				hasDied = true;
				OnPlayerDeath();
			}
			block.BlockAction = basic;
		}

		private void OnPlayerDeath()
		{
			Debug.Log((object)"[DRON][CrushTestMono] Player died, triggering crush effect.");
			TriggerCrushEffect();
		}

		private void TriggerCrushEffect()
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: 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)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			Debug.Log((object)"[DRON][CrushTestMono]  1");
			Debug.Log((object)"[DRON][CrushTestMono]  2");
			Object.Instantiate<GameObject>(crushTestVisual, ((Component)player).transform.position, Quaternion.identity);
			Vector2 val = Vector2.op_Implicit(((Component)block).transform.position);
			Player[] array = PlayerManager.instance.players.ToArray();
			Debug.Log((object)"[DRON][CrushTestMono]  3");
			for (int i = 0; i < array.Length; i++)
			{
				if (array[i].teamID != player.teamID && Vector2.Distance(val, Vector2.op_Implicit(((Component)array[i]).transform.position)) < maxDistance && PlayerManager.instance.CanSeePlayer(Vector2.op_Implicit(((Component)player).transform.position), array[i]).canSee)
				{
					HealthHandler component = ((Component)((Component)array[i]).transform).GetComponent<HealthHandler>();
					if (canTrigger)
					{
						((Damagable)component).TakeDamage(20f * Vector2.down, Vector2.op_Implicit(((Component)array[i]).transform.position), ((Component)player.data.weaponHandler).gameObject, player, true, false);
						component.TakeForce(Vector2.MoveTowards(Vector2.op_Implicit(((Component)array[i]).transform.position), new Vector2(((Component)array[i]).transform.position.x, ((Component)array[i]).transform.position.y - 12000f), 12000f), (ForceMode2D)1, true, false, 0.8f);
						((Component)component).gameObject.AddComponent<CrushTestEffect>();
						hasTriggered = true;
					}
				}
			}
		}

		public void Destroy()
		{
			Object.Destroy((Object)(object)this);
		}

		private void Update()
		{
			if (!(Time.time >= startTime + updateDelay))
			{
				return;
			}
			for (int i = 0; i <= player.data.currentCards.Count - 1; i++)
			{
				if (player.data.currentCards[i].cardName == "CrushTest")
				{
					numcheck++;
				}
			}
			if (numcheck > 0)
			{
				ResetTimer();
				if (Time.time >= timeOfLastEffect + effectCooldown)
				{
					canTrigger = true;
				}
				else
				{
					canTrigger = false;
				}
			}
			else
			{
				Object.Destroy((Object)(object)this);
			}
		}

		public Action<BlockTriggerType> GetDoBlockAction(Player player, Block block)
		{
			Debug.Log((object)"[DRON][CrushTestMono]  public Action");
			return delegate(BlockTriggerType trigger)
			{
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				//IL_0019: Invalid comparison between Unknown and I4
				Debug.Log((object)"delegate (BlockTrigger.BlockTriggerType trigger)");
				Debug.Log((object)"[DRON][CrushTestMono]  delegate");
				if ((int)trigger != 1)
				{
					Debug.Log((object)"[DRON][CrushTestMono]  if ((int)trigger != 1)");
					TriggerCrushEffect();
					Debug.Log((object)"[DRON][CrushTestMono]  4");
					if (hasTriggered)
					{
						hasTriggered = false;
						canTrigger = false;
						ResetEffectTimer();
					}
				}
			};
		}

		private void ResetTimer()
		{
			startTime = Time.time;
			numcheck = 0;
		}

		private void ResetEffectTimer()
		{
			timeOfLastEffect = Time.time;
		}
	}
	public class DestroyAfterSeconds : MonoBehaviour
	{
		public float seconds = 2f;

		private float timer;

		private void Update()
		{
			timer += Time.deltaTime;
			if (timer >= seconds)
			{
				Object.Destroy((Object)(object)((Component)this).gameObject);
			}
		}
	}
	public class HealMeMono : MonoBehaviour
	{
		internal Player player;

		internal Gun gun;

		internal GunAmmo gunAmmo;

		internal Gravity gravity;

		internal HealthHandler healthHandler;

		internal CharacterData data;

		internal Block block;

		private readonly float updateDelay = 0.1f;

		private float startTime;

		public int numcheck;

		public bool active;

		private void Start()
		{
			data = ((Component)this).GetComponentInParent<CharacterData>();
			HealthHandler val = data.healthHandler;
			val.reviveAction = (Action)Delegate.Combine(val.reviveAction, new Action(ResetTimer));
		}

		private void OnDestroy()
		{
			HealthHandler val = data.healthHandler;
			val.reviveAction = (Action)Delegate.Combine(val.reviveAction, new Action(ResetTimer));
		}

		public void Destroy()
		{
			Object.Destroy((Object)(object)this);
		}

		public void Awake()
		{
			player = ((Component)this).gameObject.GetComponent<Player>();
			gun = ((Component)((Component)player).GetComponent<Holding>().holdable).GetComponent<Gun>();
			data = ((Component)player).GetComponent<CharacterData>();
			healthHandler = ((Component)player).GetComponent<HealthHandler>();
			gravity = ((Component)player).GetComponent<Gravity>();
			block = ((Component)player).GetComponent<Block>();
			gunAmmo = ((Component)gun).GetComponentInChildren<GunAmmo>();
			numcheck = 0;
		}

		private void Update()
		{
			if (!(Time.time >= startTime + updateDelay))
			{
				return;
			}
			ResetTimer();
			for (int i = 0; i <= player.data.currentCards.Count - 1; i++)
			{
				if (player.data.currentCards[i].cardName == "Heal me")
				{
					numcheck++;
				}
			}
			if (numcheck > 0)
			{
				ResetTimer();
				if (player.data.health < player.data.maxHealth && !active)
				{
					active = true;
					((Component)((Component)player).transform).gameObject.AddComponent<HealMeRegenMono>();
				}
			}
		}

		private void ResetTimer()
		{
			startTime = Time.time;
			numcheck = 0;
		}
	}
	public class HealMeRegenMono : ReversibleEffect
	{
		private readonly Color color = Color.blue;

		private ReversibleColorEffect colorEffect;

		private HealMeMono effect;

		private readonly float updateDelay = 0.1f;

		private float startTime;

		public override void OnOnEnable()
		{
		}

		public override void OnStart()
		{
			HealthHandler healthHandler = base.player.data.healthHandler;
			healthHandler.regeneration += 20f;
			effect = ((Component)base.player).GetComponent<HealMeMono>();
			ResetTimer();
		}

		public override void OnUpdate()
		{
			if (Time.time >= startTime + updateDelay)
			{
				ResetTimer();
				if (base.player.data.health >= base.player.data.maxHealth)
				{
					((ReversibleEffect)this).Destroy();
				}
				if (((Component)this).GetComponent<Player>().data.dead || ((Component)this).GetComponent<Player>().data.health <= 0f || !((Component)((Component)this).GetComponent<Player>()).gameObject.activeInHierarchy)
				{
					ResetTimer();
					((ReversibleEffect)this).Destroy();
				}
			}
		}

		public override void OnOnDisable()
		{
		}

		public override void OnOnDestroy()
		{
			effect.active = false;
			if (base.player.data.healthHandler.regeneration >= 20f)
			{
				HealthHandler healthHandler = base.player.data.healthHandler;
				healthHandler.regeneration -= 20f;
			}
		}

		private void ResetTimer()
		{
			startTime = Time.time;
		}
	}
	public class KamikazeMono : MonoBehaviour
	{
		private class KamikazeSpawner : MonoBehaviour
		{
			private void Start()
			{
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				((Component)this).gameObject.transform.localScale = new Vector3(1f, 1f, 1f);
				((Component)this).gameObject.AddComponent<RemoveAfterSeconds>().seconds = 1f;
				ExtensionMethods.SetFieldValue((object)((Component)((Component)this).gameObject.transform.GetChild(1)).GetComponent<LineEffect>(), "inited", (object)false);
				typeof(LineEffect).InvokeMember("Init", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, ((Component)((Component)this).gameObject.transform.GetChild(1)).GetComponent<LineEffect>(), new object[0]);
				((Component)((Component)this).gameObject.transform.GetChild(1)).GetComponent<LineEffect>().radius = 9f;
				ExtensionMethods.SetFieldValue((object)((Component)((Component)this).gameObject.transform.GetChild(1)).GetComponent<LineEffect>(), "startWidth", (object)7.6f);
				((Component)((Component)this).gameObject.transform.GetChild(1)).GetComponent<LineEffect>().Play();
			}
		}

		private bool hasDied = false;

		public static SoundEvent kamikazeSound;

		private readonly float maxDistance = 18f;

		public Block block;

		public Player player;

		public CharacterData data;

		public Gun gun;

		private Action<BlockTriggerType> gravy;

		private Action<BlockTriggerType> basic;

		private static GameObject kamikazevisual;

		private readonly float updateDelay = 0.1f;

		private readonly float effectCooldown;

		private float startTime;

		private float timeOfLastEffect;

		private bool canTrigger;

		private bool hasTriggered;

		public int numcheck;

		public static SoundEvent fieldsound;

		private SoundParameterIntensity soundParameterIntensity = new SoundParameterIntensity(0.3f, (UpdateMode)0);

		public static GameObject kamikazeVisual
		{
			get
			{
				//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
				//IL_0107: Unknown result type (might be due to invalid IL or missing references)
				//IL_010c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0115: Unknown result type (might be due to invalid IL or missing references)
				//IL_0127: Unknown result type (might be due to invalid IL or missing references)
				//IL_0139: Unknown result type (might be due to invalid IL or missing references)
				//IL_015a: Unknown result type (might be due to invalid IL or missing references)
				//IL_015f: Unknown result type (might be due to invalid IL or missing references)
				//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
				//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
				//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)kamikazevisual != (Object)null)
				{
					return kamikazevisual;
				}
				IEnumerable<CardInfo> first = ((ObservableCollection<CardInfo>)typeof(CardManager).GetField("activeCards", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null)).ToList();
				List<CardInfo> second = (List<CardInfo>)typeof(CardManager).GetField("inactiveCards", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null);
				kamikazevisual = Object.Instantiate<GameObject>(((Component)(from card in first.Concat(second).ToList()
					where card.cardName.ToLower() == "overpower"
					select card).First()).GetComponent<CharacterStatModifiers>().AddObjectToPlayer.GetComponent<SpawnObjects>().objectToSpawn[0], new Vector3(0f, 100000f, 0f), Quaternion.identity);
				((Object)kamikazevisual).name = "E_Kamikaze";
				Object.DontDestroyOnLoad((Object)(object)kamikazevisual);
				ParticleSystem[] componentsInChildren = kamikazevisual.GetComponentsInChildren<ParticleSystem>();
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					MainModule main = componentsInChildren[i].main;
					((MainModule)(ref main)).startSize = MinMaxCurve.op_Implicit(0.5f);
					((MainModule)(ref main)).startSpeed = MinMaxCurve.op_Implicit(15f);
					((MainModule)(ref main)).startLifetime = MinMaxCurve.op_Implicit(2f);
					((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(new Color(1f, 0.3f, 0f, 1f));
				}
				((Component)kamikazevisual.transform.GetChild(1)).GetComponent<LineEffect>().colorOverTime.colorKeys = (GradientColorKey[])(object)new GradientColorKey[1]
				{
					new GradientColorKey(new Color(1f, 0.4f, 0f, 1f), 0.3f)
				};
				Object.Destroy((Object)(object)((Component)kamikazevisual.transform.GetChild(2)).gameObject);
				((Component)kamikazevisual.transform.GetChild(1)).GetComponent<LineEffect>().offsetMultiplier = 0f;
				((Component)kamikazevisual.transform.GetChild(1)).GetComponent<LineEffect>().playOnAwake = true;
				Object.Destroy((Object)(object)kamikazevisual.GetComponent<FollowPlayer>());
				Object.Destroy((Object)(object)kamikazevisual.GetComponent<DelayEvent>());
				Explosion component = kamikazevisual.GetComponent<Explosion>();
				if ((Object)(object)component != (Object)null)
				{
					component.hitPlayerAction = null;
					Object.Destroy((Object)(object)component);
				}
				Object.Destroy((Object)(object)kamikazevisual.GetComponent<RemoveAfterSeconds>());
				kamikazevisual.AddComponent<KamikazeSpawner>();
				return kamikazevisual;
			}
			set
			{
			}
		}

		private void Start()
		{
			player = ((Component)this).GetComponent<Player>();
			block = ((Component)this).GetComponent<Block>();
			data = ((Component)this).GetComponent<CharacterData>();
			gun = ((Component)this).GetComponent<Gun>();
			ResetEffectTimer();
			ResetTimer();
			canTrigger = true;
			hasTriggered = false;
			basic = block.BlockAction;
		}

		public void OnDestroy()
		{
			if ((Object)(object)data != (Object)null && data.dead && !hasDied)
			{
				hasDied = true;
				OnPlayerDeath();
			}
			block.BlockAction = basic;
		}

		private void OnPlayerDeath()
		{
			TriggerKamikazeEffect();
		}

		private void TriggerKamikazeEffect()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: 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_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			Object.Instantiate<GameObject>(kamikazeVisual, ((Component)player).transform.position, Quaternion.identity);
			Vector2 val = Vector2.op_Implicit(((Component)block).transform.position);
			Player[] array = PlayerManager.instance.players.ToArray();
			for (int i = 0; i < array.Length; i++)
			{
				if (array[i].teamID != player.teamID && Vector2.Distance(val, Vector2.op_Implicit(((Component)array[i]).transform.position)) < maxDistance && PlayerManager.instance.CanSeePlayer(Vector2.op_Implicit(((Component)player).transform.position), array[i]).canSee)
				{
					HealthHandler component = ((Component)((Component)array[i]).transform).GetComponent<HealthHandler>();
					if (canTrigger)
					{
						((Damagable)component).TakeDamage(200f * Vector2.down, Vector2.op_Implicit(((Component)array[i]).transform.position), ((Component)player.data.weaponHandler).gameObject, player, true, false);
						component.TakeForce(Vector2.MoveTowards(Vector2.op_Implicit(((Component)array[i]).transform.position), new Vector2(((Component)array[i]).transform.position.x, ((Component)array[i]).transform.position.y - 12000f), 12000f), (ForceMode2D)1, true, false, 0.8f);
						((Component)component).gameObject.AddComponent<CrushTestEffect>();
						hasTriggered = true;
					}
				}
			}
		}

		public void Destroy()
		{
			Object.Destroy((Object)(object)this);
		}

		private void Update()
		{
			if (!(Time.time >= startTime + updateDelay))
			{
				return;
			}
			for (int i = 0; i <= player.data.currentCards.Count - 1; i++)
			{
				if (player.data.currentCards[i].cardName == "Kamikaze")
				{
					numcheck++;
				}
			}
			if (numcheck > 0)
			{
				ResetTimer();
				if (Time.time >= timeOfLastEffect + effectCooldown)
				{
					canTrigger = true;
				}
				else
				{
					canTrigger = false;
				}
			}
			else
			{
				Object.Destroy((Object)(object)this);
			}
		}

		public Action<BlockTriggerType> GetDoBlockAction(Player player, Block block)
		{
			return delegate(BlockTriggerType trigger)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Invalid comparison between Unknown and I4
				if ((int)trigger != 1)
				{
					TriggerKamikazeEffect();
					if (hasTriggered)
					{
						hasTriggered = false;
						canTrigger = false;
						ResetEffectTimer();
					}
				}
			};
		}

		private void ResetTimer()
		{
			startTime = Time.time;
			numcheck = 0;
		}

		private void ResetEffectTimer()
		{
			timeOfLastEffect = Time.time;
		}
	}
	public class LaserBeamMono : MonoBehaviour
	{
		public Player player;

		private LineRenderer laserLine;

		private float laserDamage = 50f;

		private float damageInterval = 0.1f;

		private float lastDamageTime = 0f;

		private void Start()
		{
			if ((Object)(object)player == (Object)null)
			{
				Debug.LogError((object)"[DRON][LaserBeamMono] Player is null!");
				return;
			}
			Debug.Log((object)string.Format("[{0}][LaserBeamMono] Started on player: {1}", "DRON", player.playerID));
			CreateLaserLine();
		}

		private void CreateLaserLine()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Expected O, but got Unknown
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Expected O, but got Unknown
			GameObject val = new GameObject("LaserBeam");
			val.transform.SetParent(((Component)player).transform);
			laserLine = val.AddComponent<LineRenderer>();
			((Renderer)laserLine).material = new Material(Shader.Find("Sprites/Default"));
			laserLine.startColor = Color.red;
			laserLine.endColor = Color.red;
			laserLine.startWidth = 0.2f;
			laserLine.endWidth = 0.2f;
			laserLine.positionCount = 2;
			laserLine.useWorldSpace = true;
			((Renderer)laserLine).enabled = false;
			val.layer = LayerMask.NameToLayer("Default");
			foreach (Transform item in val.transform)
			{
				Transform val2 = item;
				((Component)val2).gameObject.layer = LayerMask.NameToLayer("Default");
			}
		}

		private void Update()
		{
			//IL_005f: 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_0069: 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_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_024b: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0203: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)player == (Object)null)
			{
				return;
			}
			bool mouseButton = Input.GetMouseButton(0);
			Debug.Log((object)string.Format("[{0}][LaserBeamMono] Is shooting: {1}", "DRON", mouseButton));
			if (mouseButton)
			{
				((Renderer)laserLine).enabled = true;
				Debug.Log((object)"[DRON][LaserBeamMono] Laser enabled");
				Vector3 val = Camera.main.ScreenToWorldPoint(Input.mousePosition);
				val.z = 0f;
				Vector3 val2 = val - ((Component)player).transform.position;
				Vector3 normalized = ((Vector3)(ref val2)).normalized;
				float num = 20f;
				RaycastHit2D val3 = Physics2D.Raycast(Vector2.op_Implicit(((Component)player).transform.position), Vector2.op_Implicit(normalized), num, ~LayerMask.GetMask(new string[1] { "Player" }));
				Debug.Log((object)string.Format("[{0}][LaserBeamMono] Raycast hit: {1}", "DRON", (Object)(object)((RaycastHit2D)(ref val3)).collider != (Object)null));
				Vector3 val4 = ((Component)player).transform.position + normalized * num;
				if ((Object)(object)((RaycastHit2D)(ref val3)).collider != (Object)null)
				{
					val4 = Vector2.op_Implicit(((RaycastHit2D)(ref val3)).point);
					Debug.Log((object)string.Format("[{0}][LaserBeamMono] Hit point: {1}", "DRON", ((RaycastHit2D)(ref val3)).point));
					if (Time.time >= lastDamageTime + damageInterval)
					{
						Player component = ((Component)((RaycastHit2D)(ref val3)).collider).GetComponent<Player>();
						if ((Object)(object)component != (Object)null && (Object)(object)component != (Object)(object)player)
						{
							float num2 = laserDamage * damageInterval;
							Debug.Log((object)string.Format("[{0}][LaserBeamMono] Dealing damage: {1} to {2}", "DRON", num2, component.playerID));
							((Damagable)((Component)component).GetComponent<HealthHandler>()).TakeDamage(num2 * Vector2.down, ((RaycastHit2D)(ref val3)).point, ((Component)player.data.weaponHandler).gameObject, player, true, false);
							lastDamageTime = Time.time;
						}
					}
				}
				laserLine.SetPosition(0, ((Component)player).transform.position);
				laserLine.SetPosition(1, val4);
				Debug.Log((object)"[DRON][LaserBeamMono] Line updated");
			}
			else if ((Object)(object)laserLine != (Object)null)
			{
				((Renderer)laserLine).enabled = false;
				Debug.Log((object)"[DRON][LaserBeamMono] Laser disabled");
			}
		}

		private void OnDestroy()
		{
			if ((Object)(object)laserLine != (Object)null)
			{
				Object.Destroy((Object)(object)((Component)laserLine).gameObject);
			}
		}
	}
}
namespace Dron.Cards
{
	internal class AntiRadar : CardBase
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			Debug.Log((object)("[DRON][Card] " + ((CustomCard)this).GetTitle() + " has been setup."));
			cardInfo.allowMultiple = false;
			statModifiers.health = 1.2f;
			gun.projectileSpeed = 1.15f;
			block.cdAdd = 0.25f;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
		}

		protected override string GetTitle()
		{
			return "Anti radar";
		}

		protected override string GetDescription()
		{
			return "Immune to homing bullets.";
		}

		protected override GameObject GetCardArt()
		{
			return Assets.AntiradarArt;
		}

		protected override Rarity GetRarity()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (Rarity)1;
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0009: 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)
			//IL_0015: 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_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0035: 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_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Expected O, but got Unknown
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[4]
			{
				new CardInfoStat
				{
					positive = true,
					stat = "Homing",
					amount = "Immunity",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "HP",
					amount = "+20%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = true,
					stat = "Bullet speed",
					amount = "+15%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Block CD",
					amount = "+0.25s",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

		protected override CardThemeColorType GetTheme()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (CardThemeColorType)3;
		}

		public override string GetModName()
		{
			return "DRON";
		}
	}
	public class BulletTeleporter : CustomCard
	{
		private bool isBulletActive = false;

		private GameObject effectObject;

		private Transform particleTransform;

		private ParticleSystem[] parts;

		private Player player;

		private Block block;

		private Gun gun;

		private Action<BlockTriggerType> basic;

		private Action<GameObject> goon;

		private Action<BlockTriggerType> bee;

		private BulletTeleportMonitor monitor;

		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			Debug.Log((object)"[DRON][BulletTeleporter] SetupCard called");
			cardInfo.allowMultiple = false;
			statModifiers.health = 0.75f;
			block.cdAdd = 0.5f;
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Expected O, but got Unknown
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			this.player = player;
			this.block = block;
			this.gun = gun;
			gun.damage *= 0.75f;
			gun.projectileSpeed *= 0.75f;
			GameObject val = (GameObject)Resources.Load("0 cards/Empower");
			GameObject addObjectToPlayer = val.GetComponent<CharacterStatModifiers>().AddObjectToPlayer;
			GameObject gameObject = ((Component)addObjectToPlayer.transform.GetChild(0)).gameObject;
			effectObject = Object.Instantiate<GameObject>(gameObject, ((Component)player).transform);
			particleTransform = effectObject.transform;
			particleTransform.SetParent(((Component)gun).transform);
			particleTransform.localPosition = new Vector3(0f, 0.8f, 0f);
			particleTransform.localRotation = Quaternion.identity;
			parts = effectObject.GetComponentsInChildren<ParticleSystem>();
			basic = this.block.BlockAction;
			bee = GetDoBlockAction(this.player, this.block).Invoke;
			this.block.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(this.block.BlockAction, bee);
			goon = this.gun.ShootPojectileAction;
			this.gun.ShootPojectileAction = (Action<GameObject>)Delegate.Combine(this.gun.ShootPojectileAction, new Action<GameObject>(Attack));
			monitor = ((Component)player).gameObject.AddComponent<BulletTeleportMonitor>();
			monitor.Initialize(this.player);
		}

		private Action<BlockTriggerType> GetDoBlockAction(Player player, Block block)
		{
			return delegate(BlockTriggerType trigger)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Invalid comparison between Unknown and I4
				if ((int)trigger != 3)
				{
					isBulletActive = true;
					ParticleSystem[] array = parts;
					foreach (ParticleSystem val in array)
					{
						val.Play();
					}
					Debug.Log((object)"[DRON][BulletTeleporter] Bullet activated for next shot");
				}
			};
		}

		private void Attack(GameObject projectile)
		{
			if (isBulletActive)
			{
				Debug.Log((object)("[DRON][BulletTeleporter] Processing active bullet: " + ((Object)projectile).name));
				if ((Object)(object)monitor != (Object)null)
				{
					monitor.ActivateTeleport();
				}
				isBulletActive = false;
				ParticleSystem[] array = parts;
				foreach (ParticleSystem val in array)
				{
					val.Stop();
				}
			}
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			this.block.BlockAction = basic;
			this.gun.ShootPojectileAction = goon;
			if ((Object)(object)effectObject != (Object)null)
			{
				Object.Destroy((Object)(object)effectObject);
			}
			if ((Object)(object)monitor != (Object)null)
			{
				Object.Destroy((Object)(object)monitor);
			}
		}

		protected override string GetTitle()
		{
			return "Bullet Teleporter";
		}

		protected override string GetDescription()
		{
			return "Press block to activate bullet teleport. Teleports to first bullet impact location.";
		}

		protected override GameObject GetCardArt()
		{
			return Assets.BulletTeleporterArt;
		}

		protected override Rarity GetRarity()
		{
			return (Rarity)1;
		}

		protected override CardInfoStat[] GetStats()
		{
			//IL_0009: 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)
			//IL_0015: 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_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0035: 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_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Expected O, but got Unknown
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Expected O, but got Unknown
			return (CardInfoStat[])(object)new CardInfoStat[4]
			{
				new CardInfoStat
				{
					positive = false,
					stat = "HP",
					amount = "-25%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = false,
					stat = "DMG",
					amount = "-25%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Bullet speed",
					amount = "-25%",
					simepleAmount = (SimpleAmount)0
				},
				new CardInfoStat
				{
					positive = false,
					stat = "Block CD",
					amount = "+0.5s",
					simepleAmount = (SimpleAmount)0
				}
			};
		}

		protected override CardThemeColorType GetTheme()
		{
			return (CardThemeColorType)8;
		}

		public override string GetModName()
		{
			return "DRON";
		}
	}
	public class BulletTeleportMonitor : HitSurfaceEffect
	{
		[CompilerGenerated]
		private sealed class <DelayedTeleport>d__7 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public Vector2 position;

			public BulletTeleportMonitor <>4__this;

			private PlayerCollision <playerCollision>5__1;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <DelayedTeleport>d__7(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<playerCollision>5__1 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0026: Unknown result type (might be due to invalid IL or missing references)
				//IL_0030: Expected O, but got Unknown
				//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = (object)new WaitForSeconds(0.2f);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					if ((Object)(object)<>4__this.player == (Object)null)
					{
						return false;
					}
					<playerCollision>5__1 = ((Component)<>4__this.player).GetComponent<PlayerCollision>();
					if ((Object)(object)<playerCollision>5__1 != (Object)null)
					{
						<playerCollision>5__1.IgnoreWallForFrames(2);
					}
					((Component)<>4__this.player).transform.root.position = Vector2.op_Implicit(position);
					CircleWaveEffect.CreateEffect(Vector2.op_Implicit(position), 0.5f, 0f, 3f, Color.green);
					Debug.Log((object)string.Format("[{0}][BulletTeleportMonitor] Player teleported to: {1} after delay", "DRON", position));
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		private Player player;

		private bool isTeleportActive = false;

		private bool hasTeleported = false;

		private Coroutine teleportCoroutine = null;

		public void Initialize(Player player)
		{
			this.player = player;
			Debug.Log((object)"[DRON][BulletTeleportMonitor] Initialized");
		}

		public void ActivateTeleport()
		{
			isTeleportActive = true;
			hasTeleported = false;
			Debug.Log((object)"[DRON][BulletTeleportMonitor] Teleport activated");
		}

		public override void Hit(Vector2 position, Vector2 normal, Vector2 velocity)
		{
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			if (isTeleportActive && !hasTeleported)
			{
				hasTeleported = true;
				isTeleportActive = false;
				Debug.Log((object)string.Format("[{0}][BulletTeleportMonitor] First bounce detected at: {1}", "DRON", position));
				if (teleportCoroutine != null)
				{
					((MonoBehaviour)this).StopCoroutine(teleportCoroutine);
				}
				teleportCoroutine = ((MonoBehaviour)this).StartCoroutine(DelayedTeleport(position));
			}
		}

		[IteratorStateMachine(typeof(<DelayedTeleport>d__7))]
		private IEnumerator DelayedTeleport(Vector2 position)
		{
			//IL_000e: 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)
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <DelayedTeleport>d__7(0)
			{
				<>4__this = this,
				position = position
			};
		}
	}
	internal abstract class CardBase : CustomCard
	{
		public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
		{
			Debug.Log((object)("[DRON][Card] " + ((CustomCard)this).GetTitle() + " has been setup."));
		}

		public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			Debug.Log((object)$"Card {((CustomCard)this).GetTitle()} has been added to player {player.playerID}");
		}

		public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
		{
			Debug.Log((object)$"Card {((CustomCard)this).GetTitle()} has been removed from player {player.playerID}");
		}

		protected override GameObject GetCardArt()
		{
			return Dron.ArtAssetsOther.LoadAsset<GameObject>("C_" + ((object)this).GetType().Name.ToUpper());
		}

		protected override CardInfoStat[] GetStats()
		{
			return (CardInfoStat[])(object)new CardInfoStat[0];
		}

		protected override string GetDescription()
		{
			return "";
		}

		protected override Rarity GetRarity()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (Rarity)0;
		}

		protected override CardThemeColorType GetTheme()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (CardThemeColorType)0;
		}

		protected override string GetTitle()
		{
			return ((object)this).GetType().Name.Replace('_', ' ');
		}

		public override string GetModName()
		{
			return "DRON";
		}
	}
	internal class ComeToMe : CardBase
	{
		[CompilerGenerated]
		private sealed class <DelayedTeleport>d__6 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public Player player;

			public ComeToMe <>4__this;

			private Player <target>5__1;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <DelayedTeleport>d__6(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<target>5__1 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
				//IL_00af: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
				//IL_00de: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e3: Unknown result type (might be due to invalid IL or missin