Decompiled source of League of Legends Items v1.1.0

LOLItems.dll

Decompiled 3 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using Alexandria.ItemAPI;
using Alexandria.Misc;
using Alexandria.SoundAPI;
using BepInEx;
using Dungeonator;
using LOLItems;
using LOLItems.active_items;
using LOLItems.custom_class_data;
using LOLItems.passive_items;
using Microsoft.CodeAnalysis;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Mod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Mod")]
[assembly: AssemblyCopyright("Copyright ©  2020")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("d6d7a494-722e-4763-959b-c2d6b6a42b01")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
[Serializable]
public class GameActorCrippleEffect : GameActorEffect
{
	public float CrippleAmount;

	public float CrippleDuration;

	public bool ShouldVanishOnDeath(GameActor actor)
	{
		if (Object.op_Implicit((Object)(object)((BraveBehaviour)actor).healthHaver) && ((BraveBehaviour)actor).healthHaver.IsBoss)
		{
			return false;
		}
		if (actor is AIActor && ((AIActor)((actor is AIActor) ? actor : null)).IsSignatureEnemy)
		{
			return false;
		}
		return true;
	}

	public override void OnEffectApplied(GameActor actor, RuntimeGameActorEffectData effectData, float partialAmount = 1f)
	{
		((BraveBehaviour)actor).behaviorSpeculator.CooldownScale = CrippleAmount;
		((BraveBehaviour)actor).aiShooter.AimTimeScale = CrippleAmount;
		((BraveBehaviour)actor).bulletBank.TimeScale = CrippleAmount;
	}

	public override void OnEffectRemoved(GameActor actor, RuntimeGameActorEffectData effectData)
	{
		if (Object.op_Implicit((Object)(object)((BraveBehaviour)actor).aiShooter))
		{
			((BraveBehaviour)actor).aiShooter.AimTimeScale = 1f;
		}
		if (Object.op_Implicit((Object)(object)((BraveBehaviour)actor).behaviorSpeculator))
		{
			((BraveBehaviour)actor).behaviorSpeculator.CooldownScale = 1f;
		}
		if (Object.op_Implicit((Object)(object)((BraveBehaviour)actor).bulletBank))
		{
			((BraveBehaviour)actor).bulletBank.TimeScale = 1f;
		}
		tk2dSpriteAnimator spriteAnimator = ((BraveBehaviour)actor).spriteAnimator;
		if (Object.op_Implicit((Object)(object)spriteAnimator) && Object.op_Implicit((Object)(object)((BraveBehaviour)actor).aiAnimator) && spriteAnimator.CurrentClip != null && !spriteAnimator.IsPlaying(spriteAnimator.CurrentClip))
		{
			((BraveBehaviour)actor).aiAnimator.PlayUntilFinished(((BraveBehaviour)actor).spriteAnimator.CurrentClip.name, false, (string)null, -1f, true);
		}
	}
}
public class CustomAuraItem : PassiveItem
{
	public float AuraRadius = 5f;

	public CoreDamageTypes damageTypes;

	public float DamagePerSecond = 5f;

	public bool DealsDamage = true;

	public bool DealsCripple = true;

	public float CrippleAmount = 0.8f;

	public GameObject AuraVFX;

	public NumericSynergyMultiplier[] damageMultiplierSynergies;

	public NumericSynergyMultiplier[] rangeMultiplierSynergies;

	private GameObject m_extantAuraVFX;

	private Action<AIActor, float> AuraAction;

	private bool didDamageEnemies;

	private float ModifiedAuraRadius => AuraRadius * GetRangeMultiplier();

	private float ModifiedDamagePerSecond => DamagePerSecond * GetDamageMultiplier();

	public override void Update()
	{
		((PassiveItem)this).Update();
		if (base.m_pickedUp && Object.op_Implicit((Object)(object)base.m_owner) && !((GameActor)base.m_owner).IsStealthed && !GameManager.Instance.IsLoadingLevel)
		{
			DoAura();
		}
	}

	public override DebrisObject Drop(PlayerController player)
	{
		if ((Object)(object)m_extantAuraVFX != (Object)null)
		{
			Object.Destroy((Object)(object)m_extantAuraVFX);
			m_extantAuraVFX = null;
		}
		return ((PassiveItem)this).Drop(player);
	}

	protected float GetDamageMultiplier()
	{
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		float num = 1f;
		if ((Object)(object)base.m_owner != (Object)null)
		{
			for (int i = 0; i < damageMultiplierSynergies.Length; i++)
			{
				if (base.m_owner.HasActiveBonusSynergy(damageMultiplierSynergies[i].RequiredSynergy, false))
				{
					num *= damageMultiplierSynergies[i].SynergyMultiplier;
				}
			}
		}
		return num;
	}

	protected float GetRangeMultiplier()
	{
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		float num = 1f;
		if ((Object)(object)base.m_owner != (Object)null)
		{
			for (int i = 0; i < rangeMultiplierSynergies.Length; i++)
			{
				if (base.m_owner.HasActiveBonusSynergy(rangeMultiplierSynergies[i].RequiredSynergy, false))
				{
					num *= rangeMultiplierSynergies[i].SynergyMultiplier;
				}
			}
		}
		return num;
	}

	protected virtual void DoAura()
	{
		//IL_0070: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)m_extantAuraVFX == (Object)null)
		{
		}
		didDamageEnemies = false;
		if (AuraAction == null)
		{
			AuraAction = delegate(AIActor actor, float dist)
			{
				//IL_0034: Unknown result type (might be due to invalid IL or missing references)
				//IL_003f: Unknown result type (might be due to invalid IL or missing references)
				float num = ModifiedDamagePerSecond * BraveTime.DeltaTime;
				if (num > 0f)
				{
					didDamageEnemies = true;
				}
				if (DealsDamage)
				{
					((BraveBehaviour)actor).healthHaver.ApplyDamage(num, Vector2.zero, "Aura", damageTypes, (DamageCategory)0, false, (PixelCollider)null, false);
				}
				if (DealsCripple)
				{
					((BraveBehaviour)actor).behaviorSpeculator.CooldownScale = CrippleAmount;
					((BraveBehaviour)actor).aiShooter.AimTimeScale = CrippleAmount;
					((BraveBehaviour)actor).bulletBank.TimeScale = CrippleAmount;
				}
			};
		}
		if ((Object)(object)base.m_owner != (Object)null && base.m_owner.CurrentRoom != null)
		{
			base.m_owner.CurrentRoom.ApplyActionToNearbyEnemies(((GameActor)base.m_owner).CenterPosition, ModifiedAuraRadius, AuraAction);
		}
		if (didDamageEnemies)
		{
			base.m_owner.DidUnstealthyAction();
		}
	}

	public override void OnDestroy()
	{
		if ((Object)(object)m_extantAuraVFX != (Object)null)
		{
			Object.Destroy((Object)(object)m_extantAuraVFX);
			m_extantAuraVFX = null;
		}
		((PassiveItem)this).OnDestroy();
	}
}
public class CustomLightningChainEnemiesModifier : BraveBehaviour
{
	[CompilerGenerated]
	private sealed class <HandleDamageCooldown>d__27 : IEnumerator<object>, IDisposable, IEnumerator
	{
		private int <>1__state;

		private object <>2__current;

		public AIActor damagedTarget;

		public CustomLightningChainEnemiesModifier <>4__this;

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

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

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

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

		private bool MoveNext()
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Expected O, but got Unknown
			switch (<>1__state)
			{
			default:
				return false;
			case 0:
				<>1__state = -1;
				<>4__this.m_damagedEnemies.Add(damagedTarget);
				<>2__current = (object)new WaitForSeconds(<>4__this.damageCooldown);
				<>1__state = 1;
				return true;
			case 1:
				<>1__state = -1;
				<>4__this.m_damagedEnemies.Remove(damagedTarget);
				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 GameObject LinkVFXPrefab;

	public CoreDamageTypes damageTypes;

	public bool RequiresSameProjectileClass;

	public float maximumLinkDistance;

	public float damagePerHit;

	public float damageCooldown = 1f;

	public float maxLinkCount;

	public List<string> sfxPath = new List<string>();

	[NonSerialized]
	public bool DamagesEnemies = true;

	[NonSerialized]
	public bool PlaysSFX = true;

	[Header("Dispersal")]
	public bool UsesDispersalParticles;

	[ShowInInspectorIf("UsesDispersalParticles", false)]
	public float DispersalDensity = 3f;

	[ShowInInspectorIf("UsesDispersalParticles", false)]
	public float DispersalMinCoherency = 0.2f;

	[ShowInInspectorIf("UsesDispersalParticles", false)]
	public float DispersalMaxCoherency = 1f;

	[ShowInInspectorIf("UsesDispersalParticles", false)]
	public GameObject DispersalParticleSystemPrefab;

	private Projectile m_frameLinkProjectile;

	private tk2dTiledSprite m_extantLink;

	private bool m_hasSetBlackBullet;

	private ParticleSystem m_dispersalParticles;

	private HashSet<AIActor> m_damagedEnemies = new HashSet<AIActor>();

	private void Start()
	{
		if ((Object)(object)((BraveBehaviour)this).projectile != (Object)null)
		{
			Projectile projectile = ((BraveBehaviour)this).projectile;
			projectile.OnHitEnemy = (Action<Projectile, SpeculativeRigidbody, bool>)Delegate.Combine(projectile.OnHitEnemy, new Action<Projectile, SpeculativeRigidbody, bool>(HandleHitEnemy));
		}
	}

	private void HandleHitEnemy(Projectile proj, SpeculativeRigidbody enemyRigidbody, bool fatal)
	{
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		if (!((Object)(object)enemyRigidbody == (Object)null) && !((Object)(object)((BraveBehaviour)enemyRigidbody).aiActor == (Object)null))
		{
			AIActor aiActor = ((BraveBehaviour)enemyRigidbody).aiActor;
			List<AIActor> list = ChainEnemies(((GameActor)aiActor).CenterPosition);
			if (PlaysSFX)
			{
				HelpfulMethods.PlayRandomSFX(aiActor, sfxPath);
			}
			if (list.Count > 0)
			{
				list.Insert(0, aiActor);
				UpdateLinkChain(list);
			}
		}
	}

	public void updateSFXList(string[] newSFXList)
	{
		foreach (string item in newSFXList)
		{
			sfxPath.Add(item);
		}
	}

	public override void OnDestroy()
	{
		ClearLink();
		((BraveBehaviour)this).OnDestroy();
	}

	private void Update()
	{
		m_frameLinkProjectile = null;
	}

	private void UpdateLinkChain(List<AIActor> chain)
	{
		//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)
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Unknown result type (might be due to invalid IL or missing references)
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_0065: 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_0090: 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_00b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_013e: Unknown result type (might be due to invalid IL or missing references)
		//IL_013f: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0105: Unknown result type (might be due to invalid IL or missing references)
		//IL_0122: Unknown result type (might be due to invalid IL or missing references)
		//IL_0123: Unknown result type (might be due to invalid IL or missing references)
		Vector2 val = ((BraveBehaviour)((BraveBehaviour)this).projectile).specRigidbody.UnitCenter;
		foreach (AIActor item in chain)
		{
			Vector2 unitCenter = ((BraveBehaviour)item).specRigidbody.UnitCenter;
			GameObject val2 = SpawnManager.SpawnVFX(LinkVFXPrefab, true);
			tk2dTiledSprite component = val2.GetComponent<tk2dTiledSprite>();
			((BraveBehaviour)component).transform.position = Vector2.op_Implicit(val);
			Vector2 val3 = unitCenter - val;
			float num = BraveMathCollege.Atan2Degrees(((Vector2)(ref val3)).normalized);
			int num2 = Mathf.RoundToInt(((Vector2)(ref val3)).magnitude / 0.0625f);
			component.dimensions = new Vector2((float)num2, component.dimensions.y);
			((BraveBehaviour)component).transform.rotation = Quaternion.Euler(0f, 0f, num);
			((tk2dBaseSprite)component).UpdateZDepth();
			Object.Destroy((Object)(object)val2, 0.25f);
			if (!m_damagedEnemies.Contains(item))
			{
				((BraveBehaviour)item).healthHaver.ApplyDamage(damagePerHit, Vector2.zero, "Chain Lightning", damageTypes, (DamageCategory)0, false, (PixelCollider)null, false);
				if (UsesDispersalParticles)
				{
					DoDispersalParticles(val, unitCenter);
				}
				((MonoBehaviour)GameManager.Instance).StartCoroutine(HandleDamageCooldown(item));
			}
			val = unitCenter;
		}
	}

	private void DoDispersalParticles(Vector2 posStart, Vector2 posEnd)
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: Invalid comparison between Unknown and I4
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: 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_0077: Unknown result type (might be due to invalid IL or missing references)
		//IL_007c: Unknown result type (might be due to invalid IL or missing references)
		//IL_007d: 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_0089: Unknown result type (might be due to invalid IL or missing references)
		//IL_008b: 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_0092: Unknown result type (might be due to invalid IL or missing references)
		//IL_0097: 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_00a6: 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)
		//IL_00d6: 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_00dd: 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_00f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0106: Unknown result type (might be due to invalid IL or missing references)
		//IL_0110: Unknown result type (might be due to invalid IL or missing references)
		//IL_011d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0156: 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_0166: Unknown result type (might be due to invalid IL or missing references)
		//IL_0168: Unknown result type (might be due to invalid IL or missing references)
		//IL_0170: Unknown result type (might be due to invalid IL or missing references)
		if ((int)GameManager.Options.ShaderQuality != 0 && (int)GameManager.Options.ShaderQuality != 3)
		{
			if (!Object.op_Implicit((Object)(object)m_dispersalParticles))
			{
				m_dispersalParticles = GlobalDispersalParticleManager.GetSystemForPrefab(DispersalParticleSystemPrefab);
			}
			int num = Mathf.Max(Mathf.CeilToInt(Vector2.Distance(posStart, posEnd) * DispersalDensity), 1);
			for (int i = 0; i < num; i++)
			{
				float num2 = (float)i / (float)num;
				Vector3 val = Vector3.Lerp(Vector2.op_Implicit(posStart), Vector2.op_Implicit(posEnd), num2);
				val += Vector3.back;
				float num3 = Mathf.PerlinNoise(val.x / 3f, val.y / 3f);
				Vector3 val2 = Quaternion.Euler(0f, 0f, num3 * 360f) * Vector3.right;
				Vector3 val3 = Vector3.Lerp(val2, Random.insideUnitSphere, Random.Range(DispersalMinCoherency, DispersalMaxCoherency));
				EmitParams val4 = default(EmitParams);
				((EmitParams)(ref val4)).position = val;
				((EmitParams)(ref val4)).velocity = val3 * m_dispersalParticles.startSpeed;
				((EmitParams)(ref val4)).startSize = m_dispersalParticles.startSize;
				((EmitParams)(ref val4)).startLifetime = m_dispersalParticles.startLifetime;
				((EmitParams)(ref val4)).startColor = Color32.op_Implicit(m_dispersalParticles.startColor);
				EmitParams val5 = val4;
				m_dispersalParticles.Emit(val5, 1);
			}
		}
	}

	private IEnumerator HandleDamageCooldown(AIActor damagedTarget)
	{
		//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
		return new <HandleDamageCooldown>d__27(0)
		{
			<>4__this = this,
			damagedTarget = damagedTarget
		};
	}

	private void ClearLink()
	{
		if ((Object)(object)m_extantLink != (Object)null)
		{
			SpawnManager.Despawn(((Component)m_extantLink).gameObject);
			m_extantLink = null;
		}
	}

	private List<AIActor> ChainEnemies(Vector2 startPos)
	{
		//IL_000d: 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_0108: Unknown result type (might be due to invalid IL or missing references)
		//IL_010d: Unknown result type (might be due to invalid IL or missing references)
		//IL_009b: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
		List<AIActor> list = new List<AIActor>();
		HashSet<AIActor> hashSet = new HashSet<AIActor>();
		Vector2 val = startPos;
		for (int i = 0; (float)i < maxLinkCount; i++)
		{
			AIActor val2 = null;
			float num = maximumLinkDistance * maximumLinkDistance;
			foreach (AIActor allEnemy in StaticReferenceManager.AllEnemies)
			{
				if (!((Object)(object)allEnemy == (Object)null) && Object.op_Implicit((Object)(object)((BraveBehaviour)allEnemy).healthHaver) && !((BraveBehaviour)allEnemy).healthHaver.IsDead && allEnemy.IsNormalEnemy && allEnemy.HasBeenEngaged && !hashSet.Contains(allEnemy))
				{
					Vector2 val3 = ((GameActor)allEnemy).CenterPosition - val;
					float sqrMagnitude = ((Vector2)(ref val3)).sqrMagnitude;
					if (sqrMagnitude < num)
					{
						val2 = allEnemy;
						num = sqrMagnitude;
					}
				}
			}
			if ((Object)(object)val2 != (Object)null)
			{
				list.Add(val2);
				hashSet.Add(val2);
				val = ((GameActor)val2).CenterPosition;
				continue;
			}
			break;
		}
		return list;
	}
}
namespace LOLItems
{
	internal class Collector : PassiveItem
	{
		private static float DamageStat = 1.1f;

		private static int DeathGoldStat = 1;

		private static float ExecuteThreshold = 0.05f;

		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			string text = "The Collector";
			string text2 = "LOLItems/Resources/passive_item_sprites/the_collector_pixelart_sprite";
			GameObject val = new GameObject(text);
			Collector collector = val.AddComponent<Collector>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "\"death and taxes\"";
			string text4 = "A weapon that once belonged to a legendary pirate. It now rests in your hands and lends you a desire for gold. An orange sounds good right about now.\n";
			ItemBuilder.SetupItem((PickupObject)(object)collector, text3, text4, "LOLItems");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)collector, (StatType)5, DamageStat, (ModifyMethod)1);
			((PickupObject)collector).quality = (ItemQuality)4;
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.PostProcessProjectile += OnPostProcessProjectile;
			player.PostProcessBeamTick += OnPostProcessProjectile;
			player.OnKilledEnemyContext += DeathGoldDrop;
		}

		public override void DisableEffect(PlayerController player)
		{
			((PassiveItem)this).DisableEffect(player);
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.PostProcessProjectile -= OnPostProcessProjectile;
			player.PostProcessBeamTick -= OnPostProcessProjectile;
			player.OnKilledEnemyContext -= DeathGoldDrop;
		}

		private void OnPostProcessProjectile(BeamController beam, SpeculativeRigidbody hitRigidbody, float tickrate)
		{
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)hitRigidbody != (Object)null || (Object)(object)((BraveBehaviour)hitRigidbody).aiActor != (Object)null)
			{
				float currentHealthPercentage = ((BraveBehaviour)((BraveBehaviour)hitRigidbody).aiActor).healthHaver.GetCurrentHealthPercentage();
				if (currentHealthPercentage <= ExecuteThreshold)
				{
					((BraveBehaviour)((BraveBehaviour)hitRigidbody).aiActor).healthHaver.ApplyDamage(((BraveBehaviour)((BraveBehaviour)hitRigidbody).aiActor).healthHaver.GetMaxHealth(), Vector2.zero, "the_collector_death_execute", (CoreDamageTypes)0, (DamageCategory)5, false, (PixelCollider)null, false);
				}
			}
		}

		private void OnPostProcessProjectile(Projectile proj, float f)
		{
			proj.OnHitEnemy = (Action<Projectile, SpeculativeRigidbody, bool>)Delegate.Combine(proj.OnHitEnemy, (Action<Projectile, SpeculativeRigidbody, bool>)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal)
			{
				//IL_002e: Unknown result type (might be due to invalid IL or missing references)
				float currentHealthPercentage = ((BraveBehaviour)enemy).healthHaver.GetCurrentHealthPercentage();
				if (currentHealthPercentage <= ExecuteThreshold)
				{
					((BraveBehaviour)enemy).healthHaver.ApplyDamage(((BraveBehaviour)enemy).healthHaver.GetMaxHealth(), Vector2.zero, "the_collector_death_execute", (CoreDamageTypes)0, (DamageCategory)5, false, (PixelCollider)null, false);
				}
			});
		}

		private void DeathGoldDrop(PlayerController player, HealthHaver enemy)
		{
			((BraveBehaviour)enemy).healthHaver.OnDeath += delegate
			{
				//IL_0059: 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)
				if (((BraveBehaviour)enemy).healthHaver.IsBoss || ((BraveBehaviour)enemy).healthHaver.IsSubboss)
				{
					LootEngine.SpawnCurrency(((BraveBehaviour)enemy).specRigidbody.UnitCenter, DeathGoldStat * 10, false);
				}
				else
				{
					LootEngine.SpawnCurrency(((BraveBehaviour)enemy).specRigidbody.UnitCenter, DeathGoldStat, false);
				}
			};
		}
	}
	internal class FrozenHeart : AuraItem
	{
		private static int ArmorStat = 1;

		private static float WintersCaressCrippleRatio = 0.8f;

		private static float WintersCaressRange = 8f;

		private static GameActorCrippleEffect WintersCaressCrippleEffect = new GameActorCrippleEffect
		{
			duration = 1f,
			effectIdentifier = "frozen_heart_cripple_effect",
			resistanceType = (EffectResistanceType)0,
			AppliesOutlineTint = true,
			OutlineTintColor = ExtendedColours.skyblue
		};

		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			string text = "Frozen Heart-LOLItems";
			string text2 = "LOLItems/Resources/passive_item_sprites/frozen_heart_pixelart_sprite";
			GameObject val = new GameObject(text);
			FrozenHeart frozenHeart = val.AddComponent<FrozenHeart>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "Warning: Do not thaw!";
			string text4 = "Emits a chilling air that causes those nearby to have cold hands. It might just be a disguised AC unit. They keep complaining that they would've killed you if it weren't for their cold hands.\n";
			ItemBuilder.SetupItem((PickupObject)(object)frozenHeart, text3, text4, "LOLItems");
			((PassiveItem)frozenHeart).ArmorToGainOnInitialPickup = ArmorStat;
			((AuraItem)frozenHeart).AuraRadius = WintersCaressRange;
			((AuraItem)frozenHeart).DamagePerSecond = 0f;
			((PickupObject)frozenHeart).quality = (ItemQuality)3;
			GunExt.SetName((PickupObject)(object)frozenHeart, "Frozen Heart");
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName);
		}

		public override void DisableEffect(PlayerController player)
		{
			((PassiveItem)this).DisableEffect(player);
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName);
		}

		public override void DoAura()
		{
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)base.m_extantAuraVFX == (Object)null)
			{
			}
			base.didDamageEnemies = false;
			if (base.AuraAction == null)
			{
				base.AuraAction = delegate(AIActor actor, float dist)
				{
					WintersCaressCrippleEffect.CrippleAmount = WintersCaressCrippleRatio;
					WintersCaressCrippleEffect.CrippleDuration = 0.5f;
					((GameActor)actor).ApplyEffect((GameActorEffect)(object)WintersCaressCrippleEffect, 1f, (Projectile)null);
				};
			}
			if ((Object)(object)((PassiveItem)this).m_owner != (Object)null && ((PassiveItem)this).m_owner.CurrentRoom != null)
			{
				((PassiveItem)this).m_owner.CurrentRoom.ApplyActionToNearbyEnemies(((GameActor)((PassiveItem)this).m_owner).CenterPosition, ((AuraItem)this).ModifiedAuraRadius, base.AuraAction);
			}
			if (base.didDamageEnemies)
			{
				((PassiveItem)this).m_owner.DidUnstealthyAction();
			}
		}
	}
	public static class HelpfulMethods
	{
		public static string[,] FloorNames = new string[10, 2]
		{
			{ "tt_castle", "Keep of the Lead Lord / Floor 1" },
			{ "tt_sewer", "Oubliette / Floor 1.5" },
			{ "tt5", "Gungeon Proper / Floor 2" },
			{ "tt_cathedral", "Abbey of the True Gun / Floor 2.5" },
			{ "tt_mines", "Black Powder Mine / Floor 3" },
			{ "ss_resourcefulrat", "Resourceful Rat's Lair / Floor 3.5" },
			{ "tt_catacombs", "Hollow / Floor 4" },
			{ "tt_nakatomi", "R&G Dept / Floor 4.5" },
			{ "tt_forge", "Forge / Floor 5" },
			{ "tt_bullethell", "Bullet Hell / Floor 6" }
		};

		public static float GetFloorDamageScale()
		{
			return GameManager.Instance.GetLastLoadedLevelDefinition().dungeonSceneName switch
			{
				"tt_castle" => 1f, 
				"tt_sewer" => 1.25f, 
				"tt5" => 1.25f, 
				"tt_cathedral" => 1.5f, 
				"tt_mines" => 1.5f, 
				"ss_resourcefulrat" => 1.75f, 
				"tt_catacombs" => 1.75f, 
				"tt_nakatomi" => 2f, 
				"tt_forge" => 2f, 
				"tt_bullethell" => 2.25f, 
				_ => 0f, 
			};
		}

		public static float GetFloorPriceMod()
		{
			return GameManager.Instance.GetLastLoadedLevelDefinition().priceMultiplier;
		}

		public static void PlayRandomSFX(AIActor enemy, List<string> sfxList)
		{
			Random random = new Random();
			int index = random.Next(sfxList.Count);
			string text = sfxList[index];
			AkSoundEngine.PostEvent(text, ((Component)enemy).gameObject);
		}

		public static void PlayRandomSFX(Projectile proj, string[] sfxList)
		{
			Random random = new Random();
			int num = random.Next(sfxList.Length);
			string text = sfxList[num];
			AkSoundEngine.PostEvent(text, ((Component)proj).gameObject);
		}

		public static float GetFloorValue()
		{
			string dungeonSceneName = GameManager.Instance.GetLastLoadedLevelDefinition().dungeonSceneName;
			for (int i = 0; i < FloorNames.GetLength(0); i++)
			{
				string text = FloorNames[i, 0];
				if (dungeonSceneName == text)
				{
					return text switch
					{
						"tt_castle" => 1f, 
						"tt_sewer" => 1.5f, 
						"tt5" => 2f, 
						"tt_cathedral" => 2.5f, 
						"tt_mines" => 3f, 
						"ss_resourcefulrat" => 3.5f, 
						"tt_catacombs" => 4f, 
						"tt_nakatomi" => 4.5f, 
						"tt_forge" => 5f, 
						"tt_bullethell" => 6f, 
						_ => 0f, 
					};
				}
			}
			return 0f;
		}
	}
	internal class HorizonFocus : PassiveItem
	{
		private static float DamageStat = 1.1f;

		private static float HyperShotMaxDistance = 15f;

		private static float HyperShotMinDistance = 3f;

		private static float HyperShotMaxDamageInc = 0.25f;

		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			string text = "Horizon Focus";
			string text2 = "LOLItems/Resources/passive_item_sprites/horizon_focus_pixelart_sprite";
			GameObject val = new GameObject(text);
			HorizonFocus horizonFocus = val.AddComponent<HorizonFocus>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "*not camping btw*";
			string text4 = "A futuristic gauntlet that seems to improve your aim at far ranges, allowing your long range attacks to deal increased damage. There seems to be a signature: Ja-c- -nd Vi--or\n";
			ItemBuilder.SetupItem((PickupObject)(object)horizonFocus, text3, text4, "LOLItems");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)horizonFocus, (StatType)5, DamageStat, (ModifyMethod)1);
			((PickupObject)horizonFocus).quality = (ItemQuality)4;
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.PostProcessProjectile += OnPostProcessProjectile;
			player.PostProcessBeamTick += OnPostProcessProjectile;
		}

		public override void DisableEffect(PlayerController player)
		{
			((PassiveItem)this).DisableEffect(player);
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.PostProcessProjectile -= OnPostProcessProjectile;
			player.PostProcessBeamTick -= OnPostProcessProjectile;
		}

		private void OnPostProcessProjectile(BeamController beam, SpeculativeRigidbody hitRigidbody, float tickrate)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)beam))
			{
				return;
			}
			GameActor owner = beam.Owner;
			PlayerController val = (PlayerController)(object)((owner is PlayerController) ? owner : null);
			if (val != null)
			{
				float num = Vector2.Distance(Vector2.op_Implicit(((BraveBehaviour)val).transform.position), Vector2.op_Implicit(((BraveBehaviour)((BraveBehaviour)hitRigidbody).aiActor).transform.position));
				if (!(num <= HyperShotMinDistance))
				{
					float num2 = Mathf.Min(num, HyperShotMaxDistance) / HyperShotMaxDistance * HyperShotMaxDamageInc;
					float num3 = ((BraveBehaviour)beam).projectile.baseData.damage * num2 * tickrate;
					((BraveBehaviour)((BraveBehaviour)hitRigidbody).aiActor).healthHaver.ApplyDamage(num3, Vector2.zero, "horizon_focus_hypershot_amp", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false);
				}
			}
		}

		private void OnPostProcessProjectile(Projectile proj, float f)
		{
			if (!Object.op_Implicit((Object)(object)proj))
			{
				return;
			}
			GameActor owner = proj.Owner;
			PlayerController player = (PlayerController)(object)((owner is PlayerController) ? owner : null);
			if (player == null)
			{
				return;
			}
			proj.OnHitEnemy = (Action<Projectile, SpeculativeRigidbody, bool>)Delegate.Combine(proj.OnHitEnemy, (Action<Projectile, SpeculativeRigidbody, bool>)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal)
			{
				//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)
				//IL_001c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0021: Unknown result type (might be due to invalid IL or missing references)
				//IL_006b: Unknown result type (might be due to invalid IL or missing references)
				float num = Vector2.Distance(Vector2.op_Implicit(((BraveBehaviour)player).transform.position), Vector2.op_Implicit(((BraveBehaviour)projHit).transform.position));
				if (!(num <= HyperShotMinDistance))
				{
					float num2 = Mathf.Min(num, HyperShotMaxDistance) / HyperShotMaxDistance * HyperShotMaxDamageInc;
					float num3 = projHit.baseData.damage * num2;
					((BraveBehaviour)enemy).healthHaver.ApplyDamage(num3, Vector2.zero, "horizon_focus_hypershot_amp", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false);
				}
			});
		}
	}
	public class Muramana : PassiveItem
	{
		private static float DamageStat = 1.2f;

		private static float ClipAndAmmoIncrease = 1.5f;

		private static float MuramanaShockBaseDamage = 5f;

		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			string text = "Muramana";
			string text2 = "LOLItems/Resources/passive_item_sprites/muramana_pixelart_sprite_outline";
			GameObject val = new GameObject(text);
			Muramana muramana = val.AddComponent<Muramana>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "The Peak of Swordsmithing";
			string text4 = "A blade forged by Masamune and wielded by the worthy, the Manamune's true power has been unlocked and empowers your every attack.\n";
			ItemBuilder.SetupItem((PickupObject)(object)muramana, text3, text4, "LOLItems");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)muramana, (StatType)5, DamageStat, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)muramana, (StatType)16, ClipAndAmmoIncrease, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)muramana, (StatType)9, ClipAndAmmoIncrease, (ModifyMethod)1);
			((PickupObject)muramana).quality = (ItemQuality)(-100);
			((PickupObject)muramana).ShouldBeExcludedFromShops = true;
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.PostProcessProjectile += MuramanaShock;
			player.PostProcessBeamTick += MuramanaShock;
		}

		public override void DisableEffect(PlayerController player)
		{
			((PassiveItem)this).DisableEffect(player);
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.PostProcessProjectile -= MuramanaShock;
			player.PostProcessBeamTick -= MuramanaShock;
		}

		private void MuramanaShock(BeamController beam, SpeculativeRigidbody hitRigidbody, float tickrate)
		{
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			GameActor owner = beam.Owner;
			PlayerController val = (PlayerController)(object)((owner is PlayerController) ? owner : null);
			if (val != null)
			{
				Gun currentGun = ((GameActor)val).CurrentGun;
				if (currentGun != null && (Object)(object)hitRigidbody != (Object)null && (Object)(object)((BraveBehaviour)hitRigidbody).aiActor != (Object)null)
				{
					float num = Mathf.Max(0f, (val.stats.GetStatValue((StatType)16) - 1f) / 5f);
					float num2 = Mathf.Max(0f, (val.stats.GetStatValue((StatType)9) - 1f) / 5f);
					float num3 = Mathf.Max(1f, 1f + num + num2);
					float num4 = Mathf.Max(1f, MuramanaShockBaseDamage * num3) * tickrate;
					((BraveBehaviour)((BraveBehaviour)hitRigidbody).aiActor).healthHaver.ApplyDamage(num4, Vector2.zero, "muramana_shock_damage", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false);
				}
			}
		}

		private void MuramanaShock(Projectile proj, float f)
		{
			GameActor owner = proj.Owner;
			PlayerController player = (PlayerController)(object)((owner is PlayerController) ? owner : null);
			if (player == null)
			{
				return;
			}
			Gun currentGun = ((GameActor)player).CurrentGun;
			if (currentGun == null)
			{
				return;
			}
			proj.OnHitEnemy = (Action<Projectile, SpeculativeRigidbody, bool>)Delegate.Combine(proj.OnHitEnemy, (Action<Projectile, SpeculativeRigidbody, bool>)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal)
			{
				//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)enemy != (Object)null && (Object)(object)((BraveBehaviour)enemy).healthHaver != (Object)null)
				{
					float num = Mathf.Max(0f, (player.stats.GetStatValue((StatType)16) - 1f) / 5f);
					float num2 = Mathf.Max(0f, (player.stats.GetStatValue((StatType)9) - 1f) / 5f);
					float num3 = Mathf.Max(1f, 1f + num + num2);
					float num4 = Mathf.Max(1f, MuramanaShockBaseDamage * num3);
					((BraveBehaviour)enemy).healthHaver.ApplyDamage(num4, Vector2.zero, "muramana_shock_damage", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false);
				}
			});
		}
	}
	internal class RodOfAges : PassiveItem
	{
		[CompilerGenerated]
		private sealed class <TimelessStackingTracker>d__11 : IEnumerator<object>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private object <>2__current;

			public PlayerController player;

			public RodOfAges <>4__this;

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

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

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

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

			private bool MoveNext()
			{
				//IL_002c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0036: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					break;
				case 1:
					<>1__state = -1;
					ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)<>4__this, (StatType)5);
					ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)<>4__this, (StatType)9);
					ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)<>4__this, (StatType)16);
					<>4__this.TimelessStackCount++;
					Plugin.Log($"Rod of Ages Timeless Stack Count: {<>4__this.TimelessStackCount}");
					ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)5, 1f + TimelessDamageIncrementValue * (float)<>4__this.TimelessStackCount, (ModifyMethod)1);
					ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)9, 1f + TimelessIncrementValue * (float)<>4__this.TimelessStackCount, (ModifyMethod)1);
					ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)16, 1f + TimelessIncrementValue * (float)<>4__this.TimelessStackCount, (ModifyMethod)1);
					player.stats.RecalculateStats(player, false, false);
					break;
				}
				if ((float)<>4__this.TimelessStackCount * TimelessIncrementValue < TimelessIncreaseMax)
				{
					<>2__current = (object)new WaitForSeconds(TimelessIncrementTimeInterval);
					<>1__state = 1;
					return true;
				}
				Plugin.Log("Rod of Ages has reached max Timeless stacks");
				ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)3, TimelessMaxStackHealthIncrease, (ModifyMethod)0);
				player.OnReceivedDamage += <>4__this.EternityEffect;
				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 static float TimelessDamageIncreaseMax = 0.3f;

		private static float TimelessDamageIncrementValue = 0.02f;

		private static float TimelessIncreaseMax = 0.75f;

		private static float TimelessIncrementValue = 0.05f;

		private static float TimelessIncrementTimeInterval = 90f;

		private int TimelessStackCount = 0;

		private static float TimelessMaxStackHealthIncrease = 1f;

		private static float EternityAmmoRestorePercent = 0.25f;

		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			string text = "Rod of Ages";
			string text2 = "LOLItems/Resources/passive_item_sprites/rod_of_ages_pixelart_sprite_outline";
			GameObject val = new GameObject(text);
			RodOfAges rodOfAges = val.AddComponent<RodOfAges>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "Power through wisdom";
			string text4 = "A staff once wielded by a legendary sorcerer, said to have achieved immortality and still lives on to this day. The vast knowledge within this tool takes ages to fully grasp.\n";
			ItemBuilder.SetupItem((PickupObject)(object)rodOfAges, text3, text4, "LOLItems");
			((PickupObject)rodOfAges).quality = (ItemQuality)3;
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName);
			((MonoBehaviour)player).StartCoroutine(TimelessStackingTracker(player));
		}

		public override void DisableEffect(PlayerController player)
		{
			((PassiveItem)this).DisableEffect(player);
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName);
			((MonoBehaviour)player).StopAllCoroutines();
		}

		private IEnumerator TimelessStackingTracker(PlayerController player)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <TimelessStackingTracker>d__11(0)
			{
				<>4__this = this,
				player = player
			};
		}

		private void EternityEffect(PlayerController source)
		{
			for (int i = 0; i < source.inventory.AllGuns.Count; i++)
			{
				Gun val = source.inventory.AllGuns[i];
				if (!val.InfiniteAmmo && val.CanGainAmmo)
				{
					int num = Mathf.CeilToInt((float)val.AdjustedMaxAmmo * EternityAmmoRestorePercent);
					val.GainAmmo(num);
				}
			}
		}
	}
	internal class Shadowflame : PassiveItem
	{
		private static float DamageStat = 1.15f;

		private static float CinderbloomThreshold = 0.4f;

		private static float CinderbloomDamageAmp = 0.2f;

		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			string text = "Shadowflame";
			string text2 = "LOLItems/Resources/passive_item_sprites/shadowflame_pixelart_sprite_outline";
			GameObject val = new GameObject(text);
			Shadowflame shadowflame = val.AddComponent<Shadowflame>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "*hiring janitors*";
			string text4 = "A magical necklace that empowers you to finish off targets quicker. You begin to feel like you like a character called \"Shadow\"? This cannot be good\n";
			ItemBuilder.SetupItem((PickupObject)(object)shadowflame, text3, text4, "LOLItems");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)shadowflame, (StatType)5, DamageStat, (ModifyMethod)1);
			((PickupObject)shadowflame).quality = (ItemQuality)4;
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.PostProcessProjectile += OnPostProcessProjectile;
			player.PostProcessBeamTick += OnPostProcessProjectile;
		}

		public override void DisableEffect(PlayerController player)
		{
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.PostProcessProjectile -= OnPostProcessProjectile;
			player.PostProcessBeamTick -= OnPostProcessProjectile;
		}

		private void OnPostProcessProjectile(BeamController beam, SpeculativeRigidbody hitRigidbody, float tickrate)
		{
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)hitRigidbody != (Object)null && (Object)(object)((BraveBehaviour)hitRigidbody).aiActor != (Object)null)
			{
				float currentHealthPercentage = ((BraveBehaviour)((BraveBehaviour)hitRigidbody).aiActor).healthHaver.GetCurrentHealthPercentage();
				if (currentHealthPercentage <= CinderbloomThreshold)
				{
					float num = ((BraveBehaviour)beam).projectile.baseData.damage * CinderbloomDamageAmp * tickrate;
					((BraveBehaviour)((BraveBehaviour)hitRigidbody).aiActor).healthHaver.ApplyDamage(num, Vector2.zero, "shadowflame_low_health_crit_damage", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false);
				}
			}
		}

		private void OnPostProcessProjectile(Projectile proj, float f)
		{
			proj.OnHitEnemy = (Action<Projectile, SpeculativeRigidbody, bool>)Delegate.Combine(proj.OnHitEnemy, (Action<Projectile, SpeculativeRigidbody, bool>)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal)
			{
				//IL_0053: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)enemy != (Object)null && (Object)(object)((BraveBehaviour)enemy).aiActor != (Object)null)
				{
					float currentHealthPercentage = ((BraveBehaviour)enemy).healthHaver.GetCurrentHealthPercentage();
					if (currentHealthPercentage <= CinderbloomThreshold)
					{
						float num = projHit.baseData.damage * CinderbloomDamageAmp;
						((BraveBehaviour)enemy).healthHaver.ApplyDamage(num, Vector2.zero, "shadowflame_low_health_crit_damage", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false);
					}
				}
			});
		}
	}
	internal class SunfireAegis : AuraItem
	{
		private static float HealthStat = 1f;

		private static int ArmorStat = 1;

		private static float ImmolateBaseDamage = 0f;

		private static float ImmolateDamagePerHeart = 1.5f;

		private static float ImmolateBaseRadius = 2f;

		private static float ImmolateRadiusPerHeart = 1f;

		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			string text = "Sunfire Aegis";
			string text2 = "LOLItems/Resources/passive_item_sprites/sunfire_aegis_pixelart_sprite_small";
			GameObject val = new GameObject(text);
			SunfireAegis sunfireAegis = val.AddComponent<SunfireAegis>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "Radiates Heat";
			string text4 = "The golden armor glows with a warmth not unlike the sun. Appears to have been blessed by the gods to burn the wicked around it.\n";
			ItemBuilder.SetupItem((PickupObject)(object)sunfireAegis, text3, text4, "LOLItems");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)sunfireAegis, (StatType)3, HealthStat, (ModifyMethod)0);
			((PassiveItem)sunfireAegis).ArmorToGainOnInitialPickup = ArmorStat;
			((AuraItem)sunfireAegis).AuraRadius = ImmolateBaseRadius;
			((AuraItem)sunfireAegis).DamagePerSecond = ImmolateBaseDamage;
			((PickupObject)sunfireAegis).quality = (ItemQuality)3;
		}

		public override void Pickup(PlayerController player)
		{
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Expected O, but got Unknown
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName);
			((BraveBehaviour)player).healthHaver.OnHealthChanged += new OnHealthChangedEvent(UpdateImmolateStats);
		}

		public override void DisableEffect(PlayerController player)
		{
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Expected O, but got Unknown
			((PassiveItem)this).DisableEffect(player);
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName);
			((BraveBehaviour)player).healthHaver.OnHealthChanged -= new OnHealthChangedEvent(UpdateImmolateStats);
		}

		private void UpdateImmolateStats(float oldHealth, float newHealth)
		{
			base.DamagePerSecond = newHealth * ImmolateDamagePerHeart;
			base.AuraRadius = ImmolateBaseRadius + newHealth * ImmolateRadiusPerHeart;
			((PassiveItem)this).Update();
		}
	}
	internal class BladeOfTheRuinedKing : PassiveItem
	{
		private bool shouldApplySlow = false;

		private static float DamageStat = 1.25f;

		private static float RateOfFireStat = 1.2f;

		private static float PercentCurrentHealthStat = 0.12f;

		private static float slowPercent = 0.5f;

		private static float slowDuration = 3f;

		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			string text = "Blade of the Ruined King";
			string text2 = "LOLItems/Resources/passive_item_sprites/blade_of_the_ruined_king_pixelart_sprite_small";
			GameObject val = new GameObject(text);
			BladeOfTheRuinedKing bladeOfTheRuinedKing = val.AddComponent<BladeOfTheRuinedKing>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "\"The mist devours all!\"";
			string text4 = "No price is too great.\nNo atrocity beyond my reach.\nFor her, I will do anything.\n\n- King of Camavor\n";
			ItemBuilder.SetupItem((PickupObject)(object)bladeOfTheRuinedKing, text3, text4, "LOLItems");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)bladeOfTheRuinedKing, (StatType)5, DamageStat, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)bladeOfTheRuinedKing, (StatType)1, RateOfFireStat, (ModifyMethod)1);
			((PickupObject)bladeOfTheRuinedKing).quality = (ItemQuality)5;
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.OnReloadedGun = (Action<PlayerController, Gun>)Delegate.Combine(player.OnReloadedGun, new Action<PlayerController, Gun>(OnGunReloaded));
			shouldApplySlow = true;
			player.PostProcessProjectile += OnPostProcessProjectile;
			player.PostProcessBeamTick += OnPostProcessProjectile;
		}

		public override void DisableEffect(PlayerController player)
		{
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.OnReloadedGun = (Action<PlayerController, Gun>)Delegate.Remove(player.OnReloadedGun, new Action<PlayerController, Gun>(OnGunReloaded));
			player.PostProcessProjectile -= OnPostProcessProjectile;
			player.PostProcessBeamTick -= OnPostProcessProjectile;
			shouldApplySlow = false;
		}

		private void OnGunReloaded(PlayerController player, Gun gun)
		{
			shouldApplySlow = true;
		}

		private void OnPostProcessProjectile(BeamController beam, SpeculativeRigidbody hitRigidbody, float tickrate)
		{
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)hitRigidbody != (Object)null && (Object)(object)((BraveBehaviour)hitRigidbody).aiActor != (Object)null)
			{
				float currentHealth = ((BraveBehaviour)((BraveBehaviour)hitRigidbody).aiActor).healthHaver.GetCurrentHealth();
				float num = Mathf.Max(1f, currentHealth * PercentCurrentHealthStat) * tickrate;
				if (((BraveBehaviour)((BraveBehaviour)hitRigidbody).aiActor).healthHaver.IsBoss || ((BraveBehaviour)((BraveBehaviour)hitRigidbody).aiActor).healthHaver.IsSubboss)
				{
					num *= 0.25f;
				}
				((BraveBehaviour)((BraveBehaviour)hitRigidbody).aiActor).healthHaver.ApplyDamage(num, Vector2.zero, "botrk_current_health_damage", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false);
			}
		}

		private void OnPostProcessProjectile(Projectile proj, float f)
		{
			if (shouldApplySlow)
			{
				ApplySlowEffect(proj);
				shouldApplySlow = false;
			}
			proj.OnHitEnemy = (Action<Projectile, SpeculativeRigidbody, bool>)Delegate.Combine(proj.OnHitEnemy, (Action<Projectile, SpeculativeRigidbody, bool>)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal)
			{
				//IL_006c: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)enemy != (Object)null && (Object)(object)((BraveBehaviour)enemy).aiActor != (Object)null)
				{
					float currentHealth = ((BraveBehaviour)enemy).healthHaver.GetCurrentHealth();
					float num = Mathf.Max(1f, currentHealth * PercentCurrentHealthStat);
					if (((BraveBehaviour)enemy).healthHaver.IsBoss || ((BraveBehaviour)enemy).healthHaver.IsSubboss)
					{
						num *= 0.25f;
					}
					((BraveBehaviour)enemy).healthHaver.ApplyDamage(num, Vector2.zero, "botrk_current_health_damage", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false);
				}
			});
		}

		private void ApplySlowEffect(Projectile projectile)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: 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_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Expected O, but got Unknown
			GameActorSpeedEffect slowEffect = new GameActorSpeedEffect
			{
				duration = slowDuration,
				effectIdentifier = "botrk_slow",
				resistanceType = (EffectResistanceType)3,
				AppliesOutlineTint = true,
				OutlineTintColor = Color.cyan,
				SpeedMultiplier = slowPercent
			};
			projectile.OnHitEnemy = (Action<Projectile, SpeculativeRigidbody, bool>)Delegate.Combine(projectile.OnHitEnemy, (Action<Projectile, SpeculativeRigidbody, bool>)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal)
			{
				if ((Object)(object)enemy != (Object)null && (Object)(object)((BraveBehaviour)enemy).aiActor != (Object)null)
				{
					((GameActor)((BraveBehaviour)enemy).aiActor).ApplyEffect((GameActorEffect)(object)slowEffect, 1f, (Projectile)null);
				}
			});
		}
	}
	public class ExamplePassive : PassiveItem
	{
		public static void Register()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			string text = "Example Item Name";
			string text2 = "LOLItems/Resources/example_item_sprite";
			GameObject val = new GameObject(text);
			ExamplePassive examplePassive = val.AddComponent<ExamplePassive>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "Example Short Desc.";
			string text4 = "1234567890123456789012345678901234567890123456789012345678901234567890\n\n---------------------------------------------------------------------------\n\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\n...........................................................................\n\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";
			ItemBuilder.SetupItem((PickupObject)(object)examplePassive, text3, text4, "example");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)examplePassive, (StatType)3, 1f, (ModifyMethod)0);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)examplePassive, (StatType)4, 1f, (ModifyMethod)0);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)examplePassive, (StatType)1, 1.5f, (ModifyMethod)1);
			((PickupObject)examplePassive).quality = (ItemQuality)(-100);
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName);
		}

		public override void DisableEffect(PlayerController player)
		{
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName);
		}
	}
	internal class ExperimentalHexplate : PassiveItem
	{
		[CompilerGenerated]
		private sealed class <ApplyOverdriveBuff>d__12 : IEnumerator<object>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private object <>2__current;

			public PlayerController player;

			public ExperimentalHexplate <>4__this;

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

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

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

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

			private bool MoveNext()
			{
				//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b8: Expected O, but got Unknown
				//IL_011a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0124: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>4__this.isOverdriveActive = true;
					ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)1, OverdriveRateOfFireStat, (ModifyMethod)1);
					ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)0, overdriveMovementSpeedStat, (ModifyMethod)1);
					player.stats.RecalculateStats(player, false, false);
					AkSoundEngine.PostEvent("experimental_hexplate_passive_triggered_SFX", ((Component)player).gameObject);
					AkSoundEngine.PostEvent("experimental_hexplate_passive_effect_SFX", ((Component)player).gameObject);
					<>2__current = (object)new WaitForSeconds(OverdriveDuration);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)<>4__this, (StatType)1);
					ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)<>4__this, (StatType)0);
					ItemBuilder.AddPassiveStatModifier((PickupObject)(object)<>4__this, (StatType)1, RateOfFireStat, (ModifyMethod)1);
					player.stats.RecalculateStats(player, false, false);
					<>2__current = (object)new WaitForSeconds(OverdriveCooldown - OverdriveDuration);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					<>4__this.isOverdriveActive = false;
					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 static float DamageStat = 1.1f;

		private static float RateOfFireStat = 1.1f;

		private static float HealthStat = 1f;

		private static float OverdriveDuration = 8f;

		private static float OverdriveCooldown = 30f;

		private static float OverdriveRateOfFireStat = 1.5f;

		private static float overdriveMovementSpeedStat = 1.25f;

		private bool isOverdriveActive = false;

		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			string text = "Experimental Hexplate";
			string text2 = "LOLItems/Resources/passive_item_sprites/experimental_hexplate_pixelart_sprite";
			GameObject val = new GameObject(text);
			ExperimentalHexplate experimentalHexplate = val.AddComponent<ExperimentalHexplate>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "Ethically Questionable";
			string text4 = "This strange piece of armor appears to be mechanically equipped to help the user enhance their physical abilities. There's an extra mechanism on the armor, but you can't figure out what the trigger is.\n\n It never passed testing phase for a reason.\n";
			ItemBuilder.SetupItem((PickupObject)(object)experimentalHexplate, text3, text4, "LOLItems");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)experimentalHexplate, (StatType)5, DamageStat, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)experimentalHexplate, (StatType)1, RateOfFireStat, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)experimentalHexplate, (StatType)3, HealthStat, (ModifyMethod)0);
			((PickupObject)experimentalHexplate).quality = (ItemQuality)4;
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.OnUsedPlayerItem += OnPlayerItemUsed;
		}

		public override void DisableEffect(PlayerController player)
		{
			((PassiveItem)this).DisableEffect(player);
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.OnUsedPlayerItem -= OnPlayerItemUsed;
		}

		private void OnPlayerItemUsed(PlayerController player, PlayerItem item)
		{
			if (!isOverdriveActive)
			{
				((MonoBehaviour)this).StartCoroutine(ApplyOverdriveBuff(player));
			}
		}

		private IEnumerator ApplyOverdriveBuff(PlayerController player)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <ApplyOverdriveBuff>d__12(0)
			{
				<>4__this = this,
				player = player
			};
		}
	}
	internal class GuardianAngel : PassiveItem
	{
		[CompilerGenerated]
		private sealed class <ReviveCoroutine>d__7 : IEnumerator<object>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private object <>2__current;

			public PlayerController player;

			public GuardianAngel <>4__this;

			private Color <originalPlayerColor>5__1;

			private Color <originalGunColor>5__2;

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

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

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

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

			private bool MoveNext()
			{
				//IL_009b: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
				//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e6: 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_0116: Expected O, but got Unknown
				//IL_0132: 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)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					((BraveBehaviour)player).healthHaver.TriggerInvulnerabilityPeriod(4f);
					((BraveBehaviour)player).healthHaver.ForceSetCurrentHealth(((BraveBehaviour)player).healthHaver.GetMaxHealth() / 2f);
					player.CurrentInputState = (PlayerInputState)1;
					((BraveBehaviour)player).healthHaver.OnPreDeath -= <>4__this.Rebirth;
					<originalPlayerColor>5__1 = ((BraveBehaviour)player).sprite.color;
					<originalGunColor>5__2 = ((BraveBehaviour)((GameActor)player).CurrentGun).sprite.color;
					((BraveBehaviour)player).sprite.color = ExtendedColours.paleYellow;
					((BraveBehaviour)((GameActor)player).CurrentGun).sprite.color = ExtendedColours.paleYellow;
					AkSoundEngine.PostEvent("guardian_angel_passive_SFX", ((Component)GameManager.Instance).gameObject);
					<>2__current = (object)new WaitForSeconds(4f);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					((BraveBehaviour)player).sprite.color = <originalPlayerColor>5__1;
					((BraveBehaviour)((GameActor)player).CurrentGun).sprite.color = <originalGunColor>5__2;
					player.ForceBlank(25f, 0.5f, false, true, (Vector2?)null, true, -1f);
					player.CurrentInputState = (PlayerInputState)0;
					((BraveBehaviour)player).healthHaver.PreventAllDamage = false;
					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 static float DamageStat = 1.25f;

		private static int ArmorStat = 2;

		private bool hasRevived = false;

		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			string text = "Guardian Angel";
			string text2 = "LOLItems/Resources/passive_item_sprites/guardian_angel_pixelart_sprite_small";
			GameObject val = new GameObject(text);
			GuardianAngel guardianAngel = val.AddComponent<GuardianAngel>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "\"Heroes never die!\"";
			string text4 = "A blade imbued with the hope of a cult who believed in rebirth. You almost feel like you could defy even death with it in hand.\n";
			ItemBuilder.SetupItem((PickupObject)(object)guardianAngel, text3, text4, "LOLItems");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)guardianAngel, (StatType)5, DamageStat, (ModifyMethod)1);
			((PassiveItem)guardianAngel).ArmorToGainOnInitialPickup = ArmorStat;
			((PickupObject)guardianAngel).quality = (ItemQuality)5;
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName);
			((BraveBehaviour)player).healthHaver.OnPreDeath += Rebirth;
		}

		public override void DisableEffect(PlayerController player)
		{
			((PassiveItem)this).DisableEffect(player);
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName);
			((BraveBehaviour)player).healthHaver.OnPreDeath -= Rebirth;
		}

		private void Rebirth(Vector2 DeathPositon)
		{
			if (!hasRevived)
			{
				PlayerController owner = ((PassiveItem)this).Owner;
				if (owner != null)
				{
					hasRevived = true;
					((MonoBehaviour)owner).StartCoroutine(ReviveCoroutine(owner));
				}
			}
		}

		private IEnumerator ReviveCoroutine(PlayerController player)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <ReviveCoroutine>d__7(0)
			{
				<>4__this = this,
				player = player
			};
		}
	}
	internal class Hubris : PassiveItem
	{
		private int eminenceCount = 0;

		private float eminenceDamageIncrease = 0.002f;

		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			string text = "Hubris";
			string text2 = "LOLItems/Resources/passive_item_sprites/hubris_pixelart_sprite_small";
			GameObject val = new GameObject(text);
			Hubris hubris = val.AddComponent<Hubris>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "A symbol of victory";
			string text4 = "A congratulatory laurel wreath gifted to the victor. With each triumph, one's strength increases. Legends speak of a statue that manifests once you reach the pinnacle of victory.\n";
			ItemBuilder.SetupItem((PickupObject)(object)hubris, text3, text4, "LOLItems");
			((PickupObject)hubris).quality = (ItemQuality)4;
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.OnKilledEnemy += KillEnemyCount;
		}

		public override void DisableEffect(PlayerController player)
		{
			((PassiveItem)this).DisableEffect(player);
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.OnKilledEnemy -= KillEnemyCount;
		}

		private void KillEnemyCount(PlayerController player)
		{
			ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)5);
			eminenceCount++;
			float num = (float)eminenceCount * eminenceDamageIncrease;
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)5, 1f + num, (ModifyMethod)1);
			player.stats.RecalculateStats(player, false, false);
		}
	}
	internal class KrakenSlayer : PassiveItem
	{
		private int bringItDownCount = 0;

		private float bringItDownDamage = 20f;

		private static float bringItDownDamageScale = 0.25f;

		private static float DamageStat = 1.25f;

		private static float RateOfFireStat = 1.25f;

		private string[] sfxList = new string[3] { "kraken_slayer_passive_SFX_1", "kraken_slayer_passive_SFX_2", "kraken_slayer_passive_SFX_3" };

		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			string text = "Kraken Slayer";
			string text2 = "LOLItems/Resources/passive_item_sprites/kraken_slayer_pixelart_sprite_outline";
			GameObject val = new GameObject(text);
			KrakenSlayer krakenSlayer = val.AddComponent<KrakenSlayer>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "The Ultimate fishing tool";
			string text4 = "A fishing tool passed down through generations. It's said that the original user felled a kraken with it and freed the seas from its terror.\n";
			ItemBuilder.SetupItem((PickupObject)(object)krakenSlayer, text3, text4, "LOLItems");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)krakenSlayer, (StatType)5, DamageStat, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)krakenSlayer, (StatType)1, RateOfFireStat, (ModifyMethod)1);
			((PickupObject)krakenSlayer).quality = (ItemQuality)5;
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.PostProcessProjectile += OnPostProcessProjectile;
			player.PostProcessBeamTick += OnPostProcessProjectile;
		}

		public override void DisableEffect(PlayerController player)
		{
			((PassiveItem)this).DisableEffect(player);
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.PostProcessProjectile -= OnPostProcessProjectile;
			player.PostProcessBeamTick -= OnPostProcessProjectile;
			bringItDownCount = 0;
		}

		private void OnPostProcessProjectile(BeamController beam, SpeculativeRigidbody hitRigidbody, float tickrate)
		{
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			bringItDownCount++;
			if (bringItDownCount < 3)
			{
				return;
			}
			if ((Object)(object)hitRigidbody != (Object)null && (Object)(object)((BraveBehaviour)hitRigidbody).aiActor != (Object)null)
			{
				float num = 0.75f * (1f - ((BraveBehaviour)((BraveBehaviour)hitRigidbody).aiActor).healthHaver.GetCurrentHealthPercentage());
				float num2 = bringItDownDamage * (1f + num) * HelpfulMethods.GetFloorDamageScale() * tickrate;
				if (((BraveBehaviour)((BraveBehaviour)hitRigidbody).aiActor).healthHaver.IsBoss || ((BraveBehaviour)((BraveBehaviour)hitRigidbody).aiActor).healthHaver.IsSubboss)
				{
					num2 *= 0.25f;
				}
				((BraveBehaviour)((BraveBehaviour)hitRigidbody).aiActor).healthHaver.ApplyDamage(num2, Vector2.zero, "kraken_slayer_bring_it_down_damage", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false);
			}
			bringItDownCount = 0;
		}

		private void OnPostProcessProjectile(Projectile proj, float f)
		{
			//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_003b: Unknown result type (might be due to invalid IL or missing references)
			bringItDownCount++;
			if (bringItDownCount < 3)
			{
				return;
			}
			((BraveBehaviour)proj).sprite.color = Color.Lerp(((BraveBehaviour)proj).sprite.color, Color.cyan, 0.7f);
			HelpfulMethods.PlayRandomSFX(proj, sfxList);
			proj.OnHitEnemy = (Action<Projectile, SpeculativeRigidbody, bool>)Delegate.Combine(proj.OnHitEnemy, (Action<Projectile, SpeculativeRigidbody, bool>)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal)
			{
				//IL_007b: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)enemy != (Object)null && (Object)(object)((BraveBehaviour)enemy).aiActor != (Object)null)
				{
					float num = 0.75f * (1f - ((BraveBehaviour)enemy).healthHaver.GetCurrentHealthPercentage());
					float num2 = bringItDownDamage * (1f + num) * HelpfulMethods.GetFloorPriceMod();
					if (((BraveBehaviour)enemy).healthHaver.IsBoss || ((BraveBehaviour)enemy).healthHaver.IsSubboss)
					{
						num2 *= 0.25f;
					}
					((BraveBehaviour)enemy).healthHaver.ApplyDamage(num2, Vector2.zero, "kraken_slayer_bring_it_down_damage", (CoreDamageTypes)0, (DamageCategory)0, false, (PixelCollider)null, false);
				}
			});
			bringItDownCount = 0;
		}

		private void OnGunReloaded(PlayerController player, Gun gun)
		{
			bringItDownCount = 0;
		}
	}
	internal class LiandrysTorment : PassiveItem
	{
		private static float DamageStat = 1.15f;

		private static float HealthStat = 1f;

		private static float TormentPercentHealthDamage = 0.03f;

		private static float TormentDuration = 3f;

		private static Gun phoenix;

		private static GameActorFireEffect TormentBurnEffect;

		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			string text = "Liandry's Torment";
			string text2 = "LOLItems/Resources/passive_item_sprites/liandrys_torment_pixelart_sprite_small";
			GameObject val = new GameObject(text);
			LiandrysTorment liandrysTorment = val.AddComponent<LiandrysTorment>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "Cursed Mask";
			string text4 = "Once belonged to a theatre company and used as a prop in their most infamous act. Rumors claim that each run of the act needed new actors since one actor always died mysteriously. \nSomething tells you that this mask was connected to these incidents.\n";
			ItemBuilder.SetupItem((PickupObject)(object)liandrysTorment, text3, text4, "LOLItems");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)liandrysTorment, (StatType)5, DamageStat, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)liandrysTorment, (StatType)3, HealthStat, (ModifyMethod)0);
			((PickupObject)liandrysTorment).quality = (ItemQuality)3;
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.PostProcessProjectile += OnPostProcessProjectile;
			player.PostProcessBeamTick += OnPostProcessProjectile;
		}

		public override void DisableEffect(PlayerController player)
		{
			((PassiveItem)this).DisableEffect(player);
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.PostProcessProjectile -= OnPostProcessProjectile;
			player.PostProcessBeamTick -= OnPostProcessProjectile;
		}

		private void OnPostProcessProjectile(BeamController beam, SpeculativeRigidbody hitRigidbody, float tickrate)
		{
			if ((Object)(object)hitRigidbody != (Object)null && (Object)(object)((BraveBehaviour)hitRigidbody).aiActor != (Object)null)
			{
				AIActor aiActor = ((BraveBehaviour)hitRigidbody).aiActor;
				((GameActorHealthEffect)TormentBurnEffect).DamagePerSecondToEnemies = ((BraveBehaviour)aiActor).healthHaver.GetMaxHealth() * TormentPercentHealthDamage;
				if (((BraveBehaviour)aiActor).healthHaver.IsBoss || ((BraveBehaviour)aiActor).healthHaver.IsSubboss)
				{
					GameActorFireEffect tormentBurnEffect = TormentBurnEffect;
					((GameActorHealthEffect)tormentBurnEffect).DamagePerSecondToEnemies = ((GameActorHealthEffect)tormentBurnEffect).DamagePerSecondToEnemies * 0.25f;
				}
				((GameActor)aiActor).ApplyEffect((GameActorEffect)(object)TormentBurnEffect, 1f, (Projectile)null);
			}
		}

		private void OnPostProcessProjectile(Projectile proj, float f)
		{
			proj.OnHitEnemy = (Action<Projectile, SpeculativeRigidbody, bool>)Delegate.Combine(proj.OnHitEnemy, (Action<Projectile, SpeculativeRigidbody, bool>)delegate(Projectile projHit, SpeculativeRigidbody enemy, bool fatal)
			{
				if ((Object)(object)enemy != (Object)null && (Object)(object)((BraveBehaviour)enemy).aiActor != (Object)null)
				{
					AIActor aiActor = ((BraveBehaviour)enemy).aiActor;
					((GameActorHealthEffect)TormentBurnEffect).DamagePerSecondToEnemies = ((BraveBehaviour)aiActor).healthHaver.GetMaxHealth() * TormentPercentHealthDamage;
					if (((BraveBehaviour)aiActor).healthHaver.IsBoss || ((BraveBehaviour)aiActor).healthHaver.IsSubboss)
					{
						GameActorFireEffect tormentBurnEffect = TormentBurnEffect;
						((GameActorHealthEffect)tormentBurnEffect).DamagePerSecondToEnemies = ((GameActorHealthEffect)tormentBurnEffect).DamagePerSecondToEnemies * 0.25f;
					}
					((GameActor)aiActor).ApplyEffect((GameActorEffect)(object)TormentBurnEffect, 1f, (Projectile)null);
				}
			});
		}

		static LiandrysTorment()
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: 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_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Expected O, but got Unknown
			PickupObject byId = PickupObjectDatabase.GetById(99);
			phoenix = (Gun)(object)((byId is Gun) ? byId : null);
			TormentBurnEffect = new GameActorFireEffect
			{
				duration = TormentDuration,
				DamagePerSecondToEnemies = 0f,
				effectIdentifier = "liandrys_torment_burn",
				ignitesGoops = false,
				FlameVfx = phoenix.DefaultModule.projectiles[0].fireEffect.FlameVfx
			};
		}
	}
	public class Manamune : PassiveItem
	{
		private static float DamageStat = 1.05f;

		private static float ManaflowIncreaseMax = 0.5f;

		private static float ManaflowIncrementValue = 0.05f;

		private static float ManaflowIncrementKillReq = 25f;

		private static float MuramanaShockBaseDamage = 5f;

		private float CurrentManaflowKillCount = 0f;

		private int ManaflowStackCount = 0;

		public static void Init()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Expected O, but got Unknown
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			string text = "Manamune";
			string text2 = "LOLItems/Resources/passive_item_sprites/manamune_pixelart_sprite_small";
			string text3 = "LOLItems/Resources/passive_item_sprites/muramana_pixelart_sprite";
			GameObject val = new GameObject(text);
			Manamune manamune = val.AddComponent<Manamune>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			tk2dBaseSprite sprite = ((BraveBehaviour)manamune).sprite;
			tk2dSpriteCollectionData collection = sprite.collection;
			SpriteBuilder.AddSpriteToCollection(text3, collection, (Assembly)null);
			string text4 = "from the Greatest Swordsmith";
			string text5 = "Created by the Greatest Swordsmith, Masamune, this sword increases the wielder's capacity for battle.\n\nLegends hint at the blade's true strength being sealed away.";
			ItemBuilder.SetupItem((PickupObject)(object)manamune, text4, text5, "LOLItems");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)manamune, (StatType)5, DamageStat, (ModifyMethod)1);
			((PickupObject)manamune).quality = (ItemQuality)3;
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.OnKilledEnemy += ManaflowStack;
		}

		public override void DisableEffect(PlayerController player)
		{
			((PassiveItem)this).DisableEffect(player);
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.OnKilledEnemy -= ManaflowStack;
		}

		private void ManaflowStack(PlayerController player)
		{
			CurrentManaflowKillCount += 1f;
			if (CurrentManaflowKillCount >= ManaflowIncrementKillReq)
			{
				CurrentManaflowKillCount = 0f;
				ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)16);
				ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)9);
				ManaflowStackCount++;
				ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)16, 1f + ManaflowIncrementValue * (float)ManaflowStackCount, (ModifyMethod)1);
				ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)9, 1f + ManaflowIncrementValue * (float)ManaflowStackCount, (ModifyMethod)1);
				player.stats.RecalculateStats(player, false, false);
				if ((float)ManaflowStackCount * ManaflowIncrementValue >= ManaflowIncreaseMax)
				{
					UpgradeToMuramana(player);
				}
			}
		}

		private void UpgradeToMuramana(PlayerController player)
		{
			player.OnKilledEnemy -= ManaflowStack;
			player.RemovePassiveItem(((PickupObject)this).PickupObjectId);
			PickupObject byName = PickupObjectDatabase.GetByName("Muramana");
			PassiveItem val = (PassiveItem)(object)((byName is PassiveItem) ? byName : null);
			if ((Object)(object)val != (Object)null)
			{
				player.AcquirePassiveItem(val);
				Plugin.Log("Manamune has been upgraded to Muramana");
			}
			else
			{
				Plugin.Log("Muramana not found in the database!");
			}
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("Ricky2148.etg.LOLItems", "League of legends Items", "1.1.0")]
	public class Plugin : BaseUnityPlugin
	{
		public const string GUID = "Ricky2148.etg.LOLItems";

		public const string NAME = "League of legends Items";

		public const string VERSION = "1.1.0";

		public const string TEXT_COLOR = "#FF007F";

		public void Start()
		{
			ETGModMainBehaviour.WaitForGameManagerStart((Action<GameManager>)GMStart);
		}

		public void GMStart(GameManager g)
		{
			BladeOfTheRuinedKing.Init();
			ExamplePassive.Register();
			ExperimentalHexplate.Init();
			GuardianAngel.Init();
			GuinsoosRageblade.Init();
			Hubris.Init();
			KrakenSlayer.Init();
			LiandrysTorment.Init();
			Manamune.Init();
			Muramana.Init();
			StatikkShiv.Init();
			Stridebreaker.Init();
			SunfireAegis.Init();
			Thornmail.Init();
			ZhonyasHourglass.Init();
			Collector.Init();
			FrozenHeart.Init();
			RodOfAges.Init();
			HorizonFocus.Init();
			Puppeteer.Init();
			Galeforce.Init();
			RylaisCrystalScepter.Init();
			Shadowflame.Init();
			NavoriQuickblades.Init();
			SoundManager.LoadSoundbanksFromAssembly((Assembly)null);
			Log("League of legends Items v1.1.0 started successfully.");
		}

		public static void Log(string text, string color = "#FF007F")
		{
			ETGModConsole.Log((object)("<color=" + color + ">" + text + "</color>"), false);
		}
	}
	public class GuinsoosRageblade : PassiveItem
	{
		[CompilerGenerated]
		private sealed class <FirePhantomProjectileDelayed>d__8 : IEnumerator<object>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private object <>2__current;

			public Projectile proj;

			public GuinsoosRageblade <>4__this;

			private PlayerController <player>5__1;

			private float <baseDelayRatio>5__2;

			private float <gunRateOfFire>5__3;

			private float <delay>5__4;

			private Projectile <phantomHit>5__5;

			private ProjectileData <newData>5__6;

			private Vector2 <direction>5__7;

			private float <angle>5__8;

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

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

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

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<player>5__1 = null;
				<phantomHit>5__5 = null;
				<newData>5__6 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0134: Unknown result type (might be due to invalid IL or missing references)
				//IL_013e: Expected O, but got Unknown
				//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
				//IL_0204: Unknown result type (might be due to invalid IL or missing references)
				//IL_020e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0234: Unknown result type (might be due to invalid IL or missing references)
				//IL_0246: 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_024e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0253: Unknown result type (might be due to invalid IL or missing references)
				//IL_029a: Unknown result type (might be due to invalid IL or missing references)
				//IL_02ac: Unknown result type (might be due to invalid IL or missing references)
				//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
				//IL_0108: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
				{
					<>1__state = -1;
					if ((Object)(object)proj == (Object)null || (Object)(object)proj.Owner == (Object)null)
					{
						Plugin.Log("fail 1");
						return false;
					}
					if (!Object.op_Implicit((Object)(object)proj))
					{
						Plugin.Log("fail 2");
						return false;
					}
					ref PlayerController reference = ref <player>5__1;
					GameActor owner = proj.Owner;
					reference = (PlayerController)(object)((owner is PlayerController) ? owner : null);
					<baseDelayRatio>5__2 = 0.3f;
					<gunRateOfFire>5__3 = ((GameActor)<player>5__1).CurrentGun.DefaultModule.cooldownTime;
					<delay>5__4 = Mathf.Max(<gunRateOfFire>5__3 * <baseDelayRatio>5__2, 0.01f);
					<delay>5__4 = Mathf.Ceil(<delay>5__4 * 100f) / 100f;
					<>2__current = (object)new WaitForSeconds(<delay>5__4);
					<>1__state = 1;
					return true;
				}
				case 1:
				{
					<>1__state = -1;
					<phantomHit>5__5 = Object.Instantiate<GameObject>(((Component)proj).gameObject).GetComponent<Projectile>();
					<newData>5__6 = new ProjectileData();
					<newData>5__6.damage = proj.baseData.damage;
					<newData>5__6.speed = proj.baseData.speed;
					<newData>5__6.range = proj.baseData.range;
					<newData>5__6.force = proj.baseData.force;
					<phantomHit>5__5.baseData = <newData>5__6;
					<phantomHit>5__5.Owner = proj.Owner;
					<phantomHit>5__5.Shooter = proj.Shooter;
					((BraveBehaviour)<phantomHit>5__5).sprite.color = Color.Lerp(((BraveBehaviour)proj).sprite.color, ExtendedColours.carrionRed, 0.7f);
					((BraveBehaviour)<phantomHit>5__5).transform.position = ((GameActor)<player>5__1).CurrentGun.barrelOffset.position;
					Vector2 lastVelocity = proj.LastVelocity;
					<direction>5__7 = ((Vector2)(ref lastVelocity)).normalized;
					<angle>5__8 = Mathf.Atan2(<direction>5__7.y, <direction>5__7.x) * 57.29578f;
					((BraveBehaviour)<phantomHit>5__5).transform.rotation = Quaternion.Euler(0f, 0f, <angle>5__8);
					<phantomHit>5__5.SendInDirection(<direction>5__7, true, true);
					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 int phantomHitCount = 0;

		private static float DamageStat = 1.25f;

		private static float RateOfFireStat = 1.2f;

		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			string text = "Guinsoo's Rageblade";
			string text2 = "LOLItems/Resources/passive_item_sprites/guinsoos_rageblade_pixelart_sprite_small";
			GameObject val = new GameObject(text);
			GuinsoosRageblade guinsoosRageblade = val.AddComponent<GuinsoosRageblade>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "*not affiliated with Kratos*";
			string text4 = "Forged in the foulest depths of the Void. These blades increase one's capacity for rage and destruction. Perhaps you should not wield them.\n";
			ItemBuilder.SetupItem((PickupObject)(object)guinsoosRageblade, text3, text4, "LOLItems");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)guinsoosRageblade, (StatType)5, DamageStat, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)guinsoosRageblade, (StatType)1, RateOfFireStat, (ModifyMethod)1);
			((PickupObject)guinsoosRageblade).quality = (ItemQuality)5;
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.PostProcessProjectile += OnPostProcessProjectile;
			player.OnReloadedGun = (Action<PlayerController, Gun>)Delegate.Combine(player.OnReloadedGun, new Action<PlayerController, Gun>(OnGunReloaded));
		}

		public override void DisableEffect(PlayerController player)
		{
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName);
			player.PostProcessProjectile -= OnPostProcessProjectile;
			phantomHitCount = 0;
			player.OnReloadedGun = (Action<PlayerController, Gun>)Delegate.Remove(player.OnReloadedGun, new Action<PlayerController, Gun>(OnGunReloaded));
		}

		private void OnPostProcessProjectile(Projectile proj, float f)
		{
			phantomHitCount++;
			if (phantomHitCount >= 3)
			{
				GameActor owner = proj.Owner;
				PlayerController val = (PlayerController)(object)((owner is PlayerController) ? owner : null);
				phantomHitCount = 0;
				((MonoBehaviour)val).StartCoroutine(FirePhantomProjectileDelayed(proj));
			}
		}

		private void OnGunReloaded(PlayerController player, Gun gun)
		{
			phantomHitCount = 0;
		}

		private IEnumerator FirePhantomProjectileDelayed(Projectile proj)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <FirePhantomProjectileDelayed>d__8(0)
			{
				<>4__this = this,
				proj = proj
			};
		}
	}
	internal class Redemption : TargetedAttackPlayerItem
	{
		private static float HealthStat = 1f;

		private static float InterventionPercentMaxHealth = 10f;

		private static float InterventionHealAmount = 0.5f;

		private static float InterventionActivationRange = 10f;

		private static float InterventionEffectRadius = 5f;

		private static float InterventionCooldown = 90f;

		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			string text = "Redemption";
			string text2 = "LOLItems/Resources/active_item_sprites/redemption_pixelart_sprite";
			GameObject val = new GameObject(text);
			Redemption redemption = val.AddComponent<Redemption>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "Break their stride.";
			string text4 = "Increases health, damage, and fire rate. Active attacks in a circle around the player, slowing enemies hit and dealing set damage.";
			ItemBuilder.SetupItem((PickupObject)(object)redemption, text3, text4, "LOLItems");
			ItemBuilder.SetCooldownType((PlayerItem)(object)redemption, (CooldownType)0, InterventionCooldown);
			((PlayerItem)redemption).consumable = false;
			((TargetedAttackPlayerItem)redemption).minDistance = 0f;
			((TargetedAttackPlayerItem)redemption).maxDistance = InterventionActivationRange;
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)redemption, (StatType)3, HealthStat, (ModifyMethod)0);
			((PickupObject)redemption).quality = (ItemQuality)4;
		}

		public override void Pickup(PlayerController player)
		{
			((PlayerItem)this).Pickup(player);
			Plugin.Log("Player picked up " + ((PickupObject)this).EncounterNameOrDisplayName);
		}

		public DebrisObject Drop(PlayerController player)
		{
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).EncounterNameOrDisplayName);
			return ((PlayerItem)this).Drop(player, 4f);
		}

		public override void DoEffect(PlayerController player)
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_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)
			((PlayerItem)this).IsCurrentlyActive = true;
			base.m_currentUser = player;
			PickupObject byId = PickupObjectDatabase.GetById(462);
			GameObject reticleQuad = ((TargetedAttackPlayerItem)((byId is TargetedAttackPlayerItem) ? byId : null)).reticleQuad;
			base.m_extantReticleQuad = reticleQuad.GetComponent<tk2dBaseSprite>();
			base.m_currentAngle = BraveMathCollege.Atan2Degrees(Vector3Extensions.XY(base.m_currentUser.unadjustedAimPoint) - ((GameActor)base.m_currentUser).CenterPosition);
			base.m_currentDistance = 5f;
			((TargetedAttackPlayerItem)this).UpdateReticlePosition();
			((BraveBehaviour)this).spriteAnimator.Play("Activate");
		}

		public override void DoActiveEffect(PlayerController user)
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: 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_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: 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_0088: 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_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: 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_00b6: 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_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: 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_00ef: Expected O, but got Unknown
			if (Object.op_Implicit((Object)(object)user) && user.CurrentRoom != null)
			{
				Vector2 val = Vector2.op_Implicit(((Component)base.m_extantReticleQuad).gameObject.transform.position + new Vector3(0f, 0.25f));
				if (Object.op_Implicit((Object)(object)base.m_extantReticleQuad))
				{
					Object.Destroy((Object)(object)((Component)base.m_extantReticleQuad).gameObject);
				}
				((PlayerItem)this).IsCurrentlyActive = true;
				AkSoundEngine.PostEvent("Play_OBJ_computer_boop_01", ((Component)user).gameObject);
				Exploder.Explode(Vector2.op_Implicit(val), new ExplosionData
				{
					damage = 40f,
					damageRadius = 5f,
					doDamage = true,
					doForce = true,
					force = 25f,
					debrisForce = 10f,
					preventPlayerForce = true,
					doScreenShake = true,
					playDefaultSFX = true
				}, Vector2.zero, (Action)null, false, (CoreDamageTypes)0, false);
				((PlayerItem)this).IsCurrentlyActive = false;
				user.DropActiveItem((PlayerItem)(object)this, 4f, false);
			}
		}
	}
	internal class StatikkShiv : PassiveItem
	{
		private static float DamageStat = 1.2f;

		private static float RateOfFireStat = 1.1f;

		private int ElectroSparkShotCount = 3;

		private static float ElectroSparkDamage = 5f;

		private static float ElectroSparkChainCount = 5f;

		private static float ElectroSparkChainRange = 5f;

		public static void Init()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			string text = "Statikk Shiv";
			string text2 = "LOLItems/Resources/passive_item_sprites/statikk_shiv_pixelart_sprite";
			GameObject val = new GameObject(text);
			StatikkShiv statikkShiv = val.AddComponent<StatikkShiv>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "*shocks you*";
			string text4 = "Supposed to be a replica of Zeus's Lightning Bolt.\njust a shiv with a taser\n";
			ItemBuilder.SetupItem((PickupObject)(object)statikkShiv, text3, text4, "LOLItems");
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)statikkShiv, (StatType)5, DamageStat, (ModifyMethod)1);
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)statikkShiv, (StatType)1, RateOfFireStat, (ModifyMethod)1);
			((PickupObject)statikkShiv).quality = (ItemQuality)4;
		}

		public override void Pickup(PlayerController player)
		{
			((PassiveIte