Decompiled source of TheRatPack v1.1.6

plugins/TheRatPack.dll

Decompiled a week ago
using System;
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.BreakableAPI;
using Alexandria.ItemAPI;
using Alexandria.Misc;
using Alexandria.SoundAPI;
using Alexandria.VisualAPI;
using BepInEx;
using Dungeonator;
using Gungeon;
using HarmonyLib;
using InControl;
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;
		}
	}
}
namespace TheRatPack
{
	public class Agent47BulletTracker : MonoBehaviour
	{
		public static AIActor CurrentTarget;

		private Projectile Projectile;

		public static PlayerController player;

		private void Start()
		{
			Projectile = ((Component)this).GetComponent<Projectile>();
			Projectile.OnHitEnemy = OnHitEnemy;
		}

		private void OnHitEnemy(Projectile proj, SpeculativeRigidbody arg2, bool fatal)
		{
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)CurrentTarget != (Object)null) || !((Object)(object)((BraveBehaviour)arg2).aiActor != (Object)null) || !((Object)(object)CurrentTarget == (Object)(object)((BraveBehaviour)arg2).aiActor) || !((Object)(object)((BraveBehaviour)CurrentTarget).healthHaver != (Object)null) || !fatal)
			{
				return;
			}
			CurrentTarget.CanDropCurrency = true;
			AIActor currentTarget = CurrentTarget;
			currentTarget.AssignedCurrencyToDrop++;
			AIActor currentTarget2 = CurrentTarget;
			currentTarget2.AssignedCurrencyToDrop *= 10;
			List<AIActor> list = new List<AIActor>();
			RoomHandler absoluteRoom = Vector3Extensions.GetAbsoluteRoom(((BraveBehaviour)player).transform.position);
			list = absoluteRoom.GetActiveEnemies((ActiveEnemyType)0);
			absoluteRoom.ClearReinforcementLayers();
			GameObject gameObject = ((Component)PickupObjectDatabase.GetById(436)).GetComponent<BlinkPassiveItem>().BlinkpoofVfx.gameObject;
			if (list.Count <= 0)
			{
				return;
			}
			for (int num = list.Count - 1; num >= 0; num--)
			{
				if ((Object)(object)list[num] != (Object)(object)CurrentTarget && list[num].EnemyGuid != "a446c626b56d4166915a4e29869737fd" && list[num].EnemyGuid != "699cd24270af4cd183d671090d8323a1")
				{
					SpawnManager.SpawnVFX(gameObject, list[num].Position, Quaternion.identity);
					list[num].EraseFromExistence(false);
				}
			}
		}

		private void Update()
		{
		}
	}
	internal class HitManMarkedStatus : MonoBehaviour
	{
		public class GameActorDecorationEffect : GameActorEffect
		{
		}

		public static GameObject HolderCrown;

		public static GameActorDecorationEffect HolderDummyEffect;

		public AIActor holder = null;

		public static List<string> Excluded_bois = new List<string>
		{
			"42be66373a3d4d89b91a35c9ff8adfec", "249db525a9464e5282d02162c88e0357", "c2f902b7cbe745efb3db4399927eab34", "2feb50a6a40f4f50982e89fd276f6f15", "2d4f8b5404614e7d8b235006acde427a", "7ec3e8146f634c559a7d58b19191cd43", "b4666cb6ef4f4b038ba8924fd8adf38f", "4d37ce3d666b4ddda8039929225b7ede", "c0260c286c8d4538a697c5bf24976ccf", "4538456236f64ea79f483784370bc62f",
			"5f15093e6f684f4fb09d3e7e697216b4", "19b420dec96d4e9ea4aebc3398c0ba7a", "b5e699a0abb94666bda567ab23bd91c4", "d4dd2b2bbda64cc9bcec534b4e920518", "02a14dec58ab45fb8aacde7aacd25b01"
		};

		public PlayerController player;

		public static void Initialise()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Expected O, but got Unknown
			//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_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: 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_00df: Unknown result type (might be due to invalid IL or missing references)
			HolderCrown = SpriteBuilder.SpriteFromResource("TheRatPack/Resources/VFX/StatusEffects/markedretical", new GameObject("MarkedIcon"), (Assembly)null);
			HolderCrown.SetActive(false);
			tk2dBaseSprite component = HolderCrown.GetComponent<tk2dBaseSprite>();
			GunTools.ConstructOffsetsFromAnchor(component.GetCurrentSpriteDef(), (Anchor)4, (Vector2?)Vector2.op_Implicit(component.GetCurrentSpriteDef().position3), false, true);
			FakePrefab.MarkAsFakePrefab(HolderCrown);
			Object.DontDestroyOnLoad((Object)(object)HolderCrown);
			HolderDummyEffect = new GameActorDecorationEffect
			{
				AffectsEnemies = true,
				OverheadVFX = HolderCrown,
				AffectsPlayers = false,
				AppliesTint = false,
				AppliesDeathTint = false,
				AppliesOutlineTint = true,
				duration = float.MaxValue,
				effectIdentifier = "MarkedCrown",
				resistanceType = (EffectResistanceType)0,
				PlaysVFXOnActor = false,
				stackMode = (EffectStackingMode)2,
				OutlineTintColor = new Color(0.25f, 0f, 0f)
			};
		}

		public void Start()
		{
			Initialise();
			player = ((Component)this).GetComponent<PlayerController>();
			Agent47BulletTracker.player = player;
			player.OnEnteredCombat = (Action)Delegate.Combine(player.OnEnteredCombat, new Action(OnEnteredCombat));
		}

		public void OnEnteredCombat()
		{
			if (!player.HasGun(agents47.ID) || !(Random.Range(0f, 5f) < 1f))
			{
				return;
			}
			List<AIActor> list = new List<AIActor>();
			RoomHandler currentRoom = player.CurrentRoom;
			if (currentRoom.HasActiveEnemies((ActiveEnemyType)0))
			{
				list = RandomNoRepeats(currentRoom.GetActiveEnemies((ActiveEnemyType)1), 1);
			}
			if (list.Count > 0)
			{
				if ((Object)(object)list[0] != (Object)null)
				{
					holder = list[0];
					if ((Object)(object)holder != (Object)null)
					{
						list.Clear();
						if (!((BraveBehaviour)holder).healthHaver.IsBoss)
						{
							((GameActor)holder).ApplyEffect((GameActorEffect)(object)HolderDummyEffect, 1f, (Projectile)null);
							Agent47BulletTracker.CurrentTarget = holder;
							AkSoundEngine.PostEvent("Play_ENM_jammer_curse_01", ((Component)this).gameObject);
						}
					}
				}
				else
				{
					ETGModConsole.Log((object)"Mark had no target in [0]", false);
				}
			}
			else
			{
				ETGModConsole.Log((object)"Mark had no targets at all. Who's agent 47 gonna kill now?", false);
			}
		}

		public void Update()
		{
		}

		public static List<T> RandomNoRepeats<T>(List<T> candidates, int count)
		{
			for (int num = candidates.Count - 1; num >= 0; num--)
			{
				List<string> excluded_bois = Excluded_bois;
				object obj = candidates[num];
				if (excluded_bois.Contains(((AIActor)((obj is AIActor) ? obj : null)).EnemyGuid))
				{
					candidates.Remove(candidates[num]);
				}
			}
			List<T> list = new List<T>();
			int num2 = 0;
			do
			{
				num2++;
				int index = Random.Range(0, candidates.Count);
				if (!list.Contains(candidates[index]))
				{
					list.Add(candidates[index]);
				}
			}
			while (num2 < count * 3 && list.Count < count);
			return list;
		}
	}
	public class agents47 : GunBehaviour
	{
		public static int ID;

		private bool HasReloaded;

		public static Projectile synergyprojectile;

		public static void Add()
		{
			//IL_00c6: 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_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_037f: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03db: Unknown result type (might be due to invalid IL or missing references)
			//IL_0405: Unknown result type (might be due to invalid IL or missing references)
			Gun val = Databases.Items.NewGun("Agent's 47", "agents47");
			Game.Items.Rename("outdated_gun_mods:agent's_47", "rqm:agents47");
			((Component)val).gameObject.AddComponent<agents47>();
			GunExt.SetShortDescription((PickupObject)(object)val, "A Hit With Men");
			GunExt.SetLongDescription((PickupObject)(object)val, "Has a 10% chance every room to mark a random enemy. Marked enemies clear the room and drop 10x casings on death\n\nA heavily modified kalashnikov rifle chambered to take a higher caliber.Its scope, long barrel, and supressor make it the ideal weapon for assasinations.");
			GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "agents47_idle_001", 8);
			GunTools.TrimGunSprites(val);
			GunExt.SetAnimationFPS(val, val.shootAnimation, 12);
			GunExt.SetAnimationFPS(val, val.reloadAnimation, 6);
			PickupObject byId = PickupObjectDatabase.GetById(5);
			GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false);
			ref string gunSwitchGroup = ref val.gunSwitchGroup;
			PickupObject byId2 = PickupObjectDatabase.GetById(49);
			gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup;
			ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects;
			PickupObject byId3 = PickupObjectDatabase.GetById(25);
			muzzleFlashEffects = ((Gun)((byId3 is Gun) ? byId3 : null)).muzzleFlashEffects;
			val.carryPixelOffset = new IntVector2(5, 1);
			ref ScreenShakeSettings gunScreenShake = ref val.gunScreenShake;
			PickupObject byId4 = PickupObjectDatabase.GetById(5);
			gunScreenShake = ((Gun)((byId4 is Gun) ? byId4 : null)).gunScreenShake;
			ref GameObject clipObject = ref val.clipObject;
			PickupObject byId5 = PickupObjectDatabase.GetById(15);
			clipObject = ((Gun)((byId5 is Gun) ? byId5 : null)).clipObject;
			val.clipsToLaunchOnReload = 1;
			val.reloadClipLaunchFrame = 2;
			val.shellsToLaunchOnFire = 1;
			val.shellCasingOnFireFrameDelay = 1;
			ref GameObject shellCasing = ref val.shellCasing;
			PickupObject byId6 = PickupObjectDatabase.GetById(5);
			shellCasing = ((Gun)((byId6 is Gun) ? byId6 : null)).shellCasing;
			val.shellsToLaunchOnReload = 0;
			val.DefaultModule.ammoCost = 1;
			val.DefaultModule.shootStyle = (ShootStyle)0;
			val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0;
			val.reloadTime = 2.5f;
			val.DefaultModule.cooldownTime = 1f;
			val.DefaultModule.angleVariance = 0f;
			val.DefaultModule.numberOfShotsInClip = 6;
			((Component)val.barrelOffset).transform.localPosition = new Vector3(2.3125f, 0.3125f, 0f);
			val.SetBaseMaxAmmo(100);
			val.ammo = 100;
			val.gunClass = (GunClass)15;
			Projectile val2 = ProjectileUtility.InstantiateAndFakeprefab(val.DefaultModule.projectiles[0]);
			GameObjectExtensions.GetOrAddComponent<Agent47BulletTracker>(((Component)val2).gameObject);
			val.DefaultModule.projectiles[0] = val2;
			ProjectileData baseData = val2.baseData;
			baseData.speed *= 1.2f;
			val2.baseData.damage = 25f;
			SoundManager.AddCustomSwitchData("WPN_Guns", "rqm_agents47", "Play_WPN_Gun_Shot_01", (SwitchedEvent[])(object)new SwitchedEvent[1] { SwitchedEvent.op_Implicit("Play_WPN_sniperrifle_shot_01") });
			val.gunSwitchGroup = "rqm_agents47";
			PickupObject byId7 = PickupObjectDatabase.GetById(86);
			synergyprojectile = ProjectileUtility.InstantiateAndFakeprefab(((Gun)((byId7 is Gun) ? byId7 : null)).DefaultModule.projectiles[0]);
			synergyprojectile.baseData.damage = 1f;
			ProjectileData baseData2 = synergyprojectile.baseData;
			baseData2.speed *= 0.8f;
			synergyprojectile.AppliesStun = true;
			synergyprojectile.StunApplyChance = 1f;
			synergyprojectile.AppliedStunDuration = 8f;
			HomingModifier orAddComponent = GameObjectExtensions.GetOrAddComponent<HomingModifier>(((Component)synergyprojectile).gameObject);
			orAddComponent.AngularVelocity = 720f;
			orAddComponent.HomingRadius = 4f;
			GunTools.SetProjectileSpriteRight(synergyprojectile, "Agents_briefcase_projectile_001", 14, 14, false, (Anchor)4, (int?)null, (int?)null, true, false, (int?)null, (int?)null, (Projectile)null);
			GunTools.AddAnimationToProjectile(synergyprojectile, new List<string> { "Agents_briefcase_projectile_001", "Agents_briefcase_projectile_002", "Agents_briefcase_projectile_003", "Agents_briefcase_projectile_004" }, 8, Toolbox.DupeList<IntVector2>(new IntVector2(15, 15), 4), Toolbox.DupeList(value: false, 4), Toolbox.DupeList<Anchor>((Anchor)4, 4), Toolbox.DupeList(value: false, 4), Toolbox.DupeList(value: false, 4), Toolbox.DupeList((Vector3?)new Vector3(0f, 0f, 0f), 4), Toolbox.DupeList((IntVector2?)new IntVector2(14, 14), 4), Toolbox.DupeList((IntVector2?)new IntVector2(0, 0), 4), Toolbox.DupeList<Projectile>(null, 4), (WrapMode)0, "idle", "idle");
			((PickupObject)val).quality = (ItemQuality)4;
			Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
			ID = ((PickupObject)val).PickupObjectId;
		}

		public override void Update()
		{
			if (Object.op_Implicit((Object)(object)base.gun.CurrentOwner))
			{
				GameActor currentOwner = base.gun.CurrentOwner;
				GameObjectExtensions.GetOrAddComponent<HitManMarkedStatus>(((Component)((currentOwner is PlayerController) ? currentOwner : null)).gameObject);
				if (!base.gun.PreventNormalFireAudio)
				{
					base.gun.PreventNormalFireAudio = true;
				}
				if (!base.gun.IsReloading && !HasReloaded)
				{
					HasReloaded = true;
				}
			}
		}

		public override void OnReloadedPlayer(PlayerController owner, Gun gun)
		{
			//IL_004e: 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_0082: Unknown result type (might be due to invalid IL or missing references)
			((GunBehaviour)this).OnReloadedPlayer(owner, gun);
			if (Object.op_Implicit((Object)(object)owner) && CustomSynergies.PlayerHasActiveSynergy(owner, "Tactical Briefcase") && gun.ClipShotsRemaining != gun.ClipCapacity)
			{
				GameObject val = SpawnManager.SpawnProjectile(((Component)synergyprojectile).gameObject, Vector2.op_Implicit(((BraveBehaviour)owner).sprite.WorldCenter), Quaternion.Euler(0f, 0f, ((Object)(object)((GameActor)owner).CurrentGun == (Object)null) ? 0f : ((GameActor)owner).CurrentGun.CurrentAngle), true);
				Projectile component = val.GetComponent<Projectile>();
				if ((Object)(object)component != (Object)null)
				{
					component.Owner = (GameActor)(object)owner;
					component.Shooter = ((BraveBehaviour)owner).specRigidbody;
				}
			}
		}
	}
	public class bbgun : GunBehaviour
	{
		public static int ID;

		public static void Add()
		{
			//IL_00b1: 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_00ce: 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_0131: 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_01f8: Unknown result type (might be due to invalid IL or missing references)
			Gun val = Databases.Items.NewGun("Abeline Kid BBgun", "bbgun");
			Game.Items.Rename("outdated_gun_mods:abeline_kid_bbgun", "rqm:abeline_kid_bbgun");
			((Component)val).gameObject.AddComponent<bbgun>();
			GunExt.SetShortDescription((PickupObject)(object)val, "Out Of The Well");
			GunExt.SetLongDescription((PickupObject)(object)val, "Has a 1% chance to critical hit dealing 20x damage, this effects chance to trigger increases by 5% for every coolness you have.\n\nWhile this childrens toy may seem unnasuming at first it has been said that in the hands of an unknown lucky gungeoneer it turned even the largest foes into puddles of blood on the ground");
			GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "bbgun_idle_001", 8);
			GunTools.TrimGunSprites(val);
			GunExt.SetAnimationFPS(val, val.shootAnimation, 10);
			GunExt.SetAnimationFPS(val, val.reloadAnimation, 11);
			PickupObject byId = PickupObjectDatabase.GetById(56);
			GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false);
			ref string gunSwitchGroup = ref val.gunSwitchGroup;
			PickupObject byId2 = PickupObjectDatabase.GetById(94);
			gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup;
			val.carryPixelOffset = new IntVector2(5, 1);
			val.DefaultModule.ammoCost = 1;
			val.DefaultModule.shootStyle = (ShootStyle)0;
			val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0;
			val.reloadTime = 1f;
			val.DefaultModule.cooldownTime = 0.8f;
			val.DefaultModule.angleVariance = 0f;
			val.DefaultModule.numberOfShotsInClip = 100;
			((Component)val.barrelOffset).transform.localPosition = new Vector3(2.375f, 0.5625f, 0f);
			val.SetBaseMaxAmmo(500);
			val.ammo = 500;
			val.gunClass = (GunClass)15;
			Projectile val2 = ProjectileUtility.InstantiateAndFakeprefab(val.DefaultModule.projectiles[0]);
			val.DefaultModule.projectiles[0] = val2;
			ProjectileData baseData = val2.baseData;
			baseData.speed *= 1.2f;
			val2.baseData.damage = 2.5f;
			GunTools.SetProjectileSpriteRight(val2, "bb_proj_001", 2, 2, true, (Anchor)4, (int?)2, (int?)2, true, false, (int?)null, (int?)null, (Projectile)null);
			BloodCritProjectileComponent orAddComponent = GameObjectExtensions.GetOrAddComponent<BloodCritProjectileComponent>(((Component)val2).gameObject);
			orAddComponent.critchance = 0.01f;
			((PickupObject)val).quality = (ItemQuality)1;
			Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
			ID = ((PickupObject)val).PickupObjectId;
			PickupObject byId3 = PickupObjectDatabase.GetById(524);
			RandomProjectileReplacementItem val3 = (RandomProjectileReplacementItem)(object)((byId3 is RandomProjectileReplacementItem) ? byId3 : null);
			Projectile replacementProjectile = val3.ReplacementProjectile;
			BloodCritProjectileComponent orAddComponent2 = GameObjectExtensions.GetOrAddComponent<BloodCritProjectileComponent>(((Component)replacementProjectile).gameObject);
			orAddComponent2.critchance = 1f;
			orAddComponent2.requiresynergy = true;
		}

		public override void PostProcessProjectile(Projectile projectile)
		{
			BloodCritProjectileComponent orAddComponent = GameObjectExtensions.GetOrAddComponent<BloodCritProjectileComponent>(((Component)projectile).gameObject);
			if (CustomSynergies.PlayerHasActiveSynergy(((GunBehaviour)this).PlayerOwner, "Beebee gun"))
			{
				orAddComponent.critchance = 0.01f;
			}
		}
	}
	public class beenelli : GunBehaviour
	{
		public static int ID;

		public bool haschangedfirerate = false;

		public static void Add()
		{
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_0375: Unknown result type (might be due to invalid IL or missing references)
			//IL_037a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0399: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0402: Unknown result type (might be due to invalid IL or missing references)
			//IL_0420: Unknown result type (might be due to invalid IL or missing references)
			Gun val = Databases.Items.NewGun("Beenelli M4", "beenelli_m4");
			Game.Items.Rename("outdated_gun_mods:beenelli_m4", "rqm:beenelli");
			((Component)val).gameObject.AddComponent<beenelli>();
			GunExt.SetShortDescription((PickupObject)(object)val, "Bee");
			GunExt.SetLongDescription((PickupObject)(object)val, "Created by a cruel gunsmith that decided that shoving bees into shotgun shells would be funny. Unfortunately for the bees this crushed them to death.,\n\nBees fired from this gun do not home");
			GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "beenelli_m4_idle_001", 8);
			GunTools.TrimGunSprites(val);
			GunExt.SetAnimationFPS(val, val.shootAnimation, 10);
			GunExt.SetAnimationFPS(val, val.reloadAnimation, 6);
			GameObject gameObject = ((Component)BreakableAPIToolbox.GenerateDebrisObject("TheRatPack/Resources/Debris/debee_debris", true, 0.33f, 2f, 720f, 180f, (tk2dSprite)null, 1f, (string)null, (GameObject)null, 0, false, (GoopDefinition)null, 1f)).gameObject;
			GunTools.ConstructOffsetsFromAnchor(gameObject.GetComponent<tk2dBaseSprite>().CurrentSprite, (Anchor)4, (Vector2?)null, false, true);
			VFXPool val2 = VFXBuilder.CreateBlankVFXPool(gameObject);
			val2.type = (VFXPoolType)1;
			for (int i = 0; i < 6; i++)
			{
				PickupObject byId = PickupObjectDatabase.GetById(51);
				GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false);
			}
			foreach (ProjectileModule projectile in val.Volley.projectiles)
			{
				projectile.ammoCost = 0;
				projectile.shootStyle = (ShootStyle)0;
				projectile.sequenceStyle = (ProjectileSequenceStyle)0;
				projectile.cooldownTime = 0.4f;
				val.reloadTime = 3f;
				projectile.angleVariance = 25f;
				projectile.numberOfShotsInClip = 6;
				Projectile val3 = ProjectileUtility.InstantiateAndFakeprefab(projectile.projectiles[0]);
				projectile.projectiles[0] = val3;
				ProjectileData baseData = val3.baseData;
				baseData.speed *= 1f;
				val3.baseData.damage = 5f;
				val.shellsToLaunchOnFire = 1;
				val.shellCasingOnFireFrameDelay = 2;
				val.shellCasing = ((Component)BreakableAPIToolbox.GenerateDebrisObject("TheRatPack/Resources/Debris/beenelli_debris.png", true, 0.33f, 2f, 540f, 180f, (tk2dSprite)null, 1f, (string)null, (GameObject)null, 0, false, (GoopDefinition)null, 1f)).gameObject;
				val.shellsToLaunchOnReload = 0;
				val3.hitEffects.deathAny = val2;
				val3.hitEffects.HasProjectileDeathVFX = true;
				GunTools.SetProjectileSpriteRight(val3, "beenohoming_proj_A", 6, 7, false, (Anchor)4, (int?)6, (int?)7, true, false, (int?)null, (int?)null, (Projectile)null);
				tk2dSpriteDefinition currentSprite = ((BraveBehaviour)val3).sprite.CurrentSprite;
				List<Material> list = new List<Material> { currentSprite.material, currentSprite.materialInst };
				foreach (Material item in list)
				{
					if (!((Object)(object)item == (Object)null))
					{
						item.SetFloat("_EmissivePower", 0f);
					}
				}
			}
			val.Volley.UsesShotgunStyleVelocityRandomizer = true;
			val.Volley.DecreaseFinalSpeedPercentMin = 8f;
			val.Volley.IncreaseFinalSpeedPercentMax = 16f;
			val.DefaultModule.ammoCost = 1;
			val.gunSwitchGroup = "rqm_beenelli";
			ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects;
			PickupObject byId2 = PickupObjectDatabase.GetById(51);
			muzzleFlashEffects = ((Gun)((byId2 is Gun) ? byId2 : null)).muzzleFlashEffects;
			ref ScreenShakeSettings gunScreenShake = ref val.gunScreenShake;
			PickupObject byId3 = PickupObjectDatabase.GetById(51);
			gunScreenShake = ((Gun)((byId3 is Gun) ? byId3 : null)).gunScreenShake;
			val.carryPixelOffset = new IntVector2(3, -3);
			((Component)val.barrelOffset).transform.localPosition = new Vector3(2.5f, 0.5f, 0f);
			val.SetBaseMaxAmmo(100);
			val.ammo = 100;
			val.gunClass = (GunClass)5;
			SoundManager.AddCustomSwitchData("WPN_Guns", "rqm_beenelli", "Play_WPN_Gun_Shot_01", (SwitchedEvent[])(object)new SwitchedEvent[1] { SwitchedEvent.op_Implicit("Play_WPN_shotgun_shot_01") });
			GunGradualReload orAddComponent = GameObjectExtensions.GetOrAddComponent<GunGradualReload>(((Component)val).gameObject);
			((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.reloadAnimation).wrapMode = (WrapMode)1;
			((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.reloadAnimation).loopStart = 0;
			((PickupObject)val).quality = (ItemQuality)3;
			Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
			ID = ((PickupObject)val).PickupObjectId;
		}

		public override void PostProcessProjectile(Projectile projectile)
		{
			if (CustomSynergies.PlayerHasActiveSynergy(((GunBehaviour)this).PlayerOwner, "Revitalized"))
			{
				ProjectileData baseData = projectile.baseData;
				baseData.damage *= 2f;
			}
			((GunBehaviour)this).PostProcessProjectile(projectile);
		}

		public override void Update()
		{
			if ((Object)(object)base.gun != (Object)null)
			{
			}
			((GunBehaviour)this).Update();
		}
	}
	public class bigguy : GunBehaviour
	{
		public static int ID;

		public static ExplosionData nukeexplosion;

		public static GameObject nukevfx;

		public static void Add()
		{
			//IL_013a: 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_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_021f: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0410: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			Gun val = Databases.Items.NewGun("Big Guy", "bigguy");
			Game.Items.Rename("outdated_gun_mods:big_guy", "rqm:big_guy");
			((Component)val).gameObject.AddComponent<bigguy>();
			GunExt.SetShortDescription((PickupObject)(object)val, "War, War Never Changes");
			GunExt.SetLongDescription((PickupObject)(object)val, "Deals Massive Damage to everything in its explosion radius including you if you do not move out of the way after firing.\n\nCreated by a group of rebels against the hegemony, who later confiscated this weapon.Unfortunately while storing the weapon it misfired killing everyone in the facility ");
			GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "bigguy_idle_001", 8);
			GunTools.TrimGunSprites(val);
			GunExt.SetAnimationFPS(val, val.shootAnimation, 12);
			GunExt.SetAnimationFPS(val, val.reloadAnimation, 6);
			tk2dSpriteAnimationClip clipByName = ((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.shootAnimation);
			tk2dSpriteAnimationFrame[] frames = clipByName.frames;
			foreach (tk2dSpriteAnimationFrame val2 in frames)
			{
				tk2dSpriteDefinition val3 = val2.spriteCollection.spriteDefinitions[val2.spriteId];
				if (val3 != null)
				{
					GunTools.MakeOffset(val3, new Vector2(-0.125f, -0.25f), false);
				}
			}
			PickupObject byId = PickupObjectDatabase.GetById(56);
			GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false);
			ref string gunSwitchGroup = ref val.gunSwitchGroup;
			PickupObject byId2 = PickupObjectDatabase.GetById(12);
			gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup;
			ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects;
			PickupObject byId3 = PickupObjectDatabase.GetById(12);
			muzzleFlashEffects = ((Gun)((byId3 is Gun) ? byId3 : null)).muzzleFlashEffects;
			val.carryPixelOffset = new IntVector2(10, 3);
			val.carryPixelDownOffset = new IntVector2(-5, -5);
			val.carryPixelUpOffset = new IntVector2(-5, 5);
			val.DefaultModule.ammoType = (AmmoType)14;
			val.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("bigguy Ammo", "TheRatPack/Resources/ammotypes/bigguy_clipfull", "TheRatPack/Resources/ammotypes/bigguy_clipempty");
			val.DefaultModule.ammoCost = 1;
			val.DefaultModule.shootStyle = (ShootStyle)0;
			val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0;
			val.reloadTime = 5f;
			val.DefaultModule.angleVariance = 12f;
			val.DefaultModule.cooldownTime = 2f;
			val.DefaultModule.numberOfShotsInClip = 1;
			((Component)val.barrelOffset).transform.localPosition = new Vector3(2.8125f, 0.875f, 0f);
			val.SetBaseMaxAmmo(5);
			val.ammo = 5;
			val.gunClass = (GunClass)45;
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)val, (StatType)14, 2f, (ModifyMethod)0);
			Projectile val4 = ProjectileUtility.InstantiateAndFakeprefab(val.DefaultModule.projectiles[0]);
			val.DefaultModule.projectiles[0] = val4;
			ProjectileData baseData = val4.baseData;
			baseData.speed *= 0.6f;
			val4.baseData.range = 4.75f;
			val4.baseData.damage = 400f;
			GunTools.SetProjectileSpriteRight(val4, "bigguy_prog_A_001", 14, 7, true, (Anchor)4, (int?)10, (int?)4, true, false, (int?)null, (int?)null, (Projectile)null);
			val4.ignoreDamageCaps = true;
			Nukeselfdamage orAddComponent = GameObjectExtensions.GetOrAddComponent<Nukeselfdamage>(((Component)val4).gameObject);
			orAddComponent.damageradius = 5.25f;
			nukevfx = VFXBuilder.CreateVFX("Nuclear Explosion", new List<string>
			{
				"TheRatPack/Resources/VFX/BigguyVFX/explosion_nuke_001.png", "TheRatPack/Resources/VFX/BigguyVFX/explosion_nuke_002.png", "TheRatPack/Resources/VFX/BigguyVFX/explosion_nuke_003.png", "TheRatPack/Resources/VFX/BigguyVFX/explosion_nuke_004.png", "TheRatPack/Resources/VFX/BigguyVFX/explosion_nuke_005.png", "TheRatPack/Resources/VFX/BigguyVFX/explosion_nuke_006.png", "TheRatPack/Resources/VFX/BigguyVFX/explosion_nuke_007.png", "TheRatPack/Resources/VFX/BigguyVFX/explosion_nuke_008.png", "TheRatPack/Resources/VFX/BigguyVFX/explosion_nuke_009.png", "TheRatPack/Resources/VFX/BigguyVFX/explosion_nuke_010.png",
				"TheRatPack/Resources/VFX/BigguyVFX/explosion_nuke_011.png", "TheRatPack/Resources/VFX/BigguyVFX/explosion_nuke_012.png", "TheRatPack/Resources/VFX/BigguyVFX/explosion_nuke_013.png", "TheRatPack/Resources/VFX/BigguyVFX/explosion_nuke_014.png", "TheRatPack/Resources/VFX/BigguyVFX/explosion_nuke_015.png", "TheRatPack/Resources/VFX/BigguyVFX/explosion_nuke_016.png"
			}, 12, new IntVector2(168, 166), (Anchor)4, false, 0f, -1f, (Color?)null, (WrapMode)2, false);
			ExplosiveModifier orAddComponent2 = GameObjectExtensions.GetOrAddComponent<ExplosiveModifier>(((Component)val4).gameObject);
			orAddComponent2.explosionData = nukeexplosion;
			orAddComponent2.explosionData.effect = nukevfx;
			((PickupObject)val).quality = (ItemQuality)5;
			Databases.Items.Add((PickupObject)(object)val, false, "ANY");
			ID = ((PickupObject)val).PickupObjectId;
		}

		public override void PostProcessProjectile(Projectile projectile)
		{
			((GunBehaviour)this).PostProcessProjectile(projectile);
		}

		public void explode(Projectile projectile)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			AkSoundEngine.PostEvent("Play_OBJ_nuke_blast_01", ((Component)projectile).gameObject);
			Pixelator.Instance.FadeToColor(0.5f, Color.white, true, 0.1f);
			StickyFrictionManager.Instance.RegisterCustomStickyFriction(0.15f, 1f, false, false);
			projectile.baseData.range = 10f;
			if (Vector2.Distance(projectile.SafeCenter, ((GameActor)((GunBehaviour)this).PlayerOwner).CenterPosition) <= 5.25f)
			{
				((BraveBehaviour)((GunBehaviour)this).PlayerOwner).healthHaver.ApplyDamage(2f, Vector2.zero, "Cancer", (CoreDamageTypes)0, (DamageCategory)0, true, (PixelCollider)null, false);
			}
			((GunBehaviour)this).PostProcessProjectile(projectile);
		}

		public override void Update()
		{
			if (base.gun.ammo == 0)
			{
				((BraveBehaviour)((BraveBehaviour)base.gun).sprite).spriteAnimator.Play(base.gun.outOfAmmoAnimation);
			}
			((GunBehaviour)this).Update();
		}

		static bigguy()
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Expected O, but got Unknown
			ExplosionData val = new ExplosionData();
			val.useDefaultExplosion = false;
			val.doExplosionRing = true;
			val.damageRadius = 10f;
			val.pushRadius = 5f;
			val.damage = 800f;
			val.doDamage = true;
			val.damageToPlayer = 2f;
			val.secretWallsRadius = 6f;
			val.forcePreventSecretWallDamage = false;
			val.doDestroyProjectiles = true;
			val.doForce = true;
			val.force = 20f;
			val.debrisForce = 24f;
			val.preventPlayerForce = false;
			val.explosionDelay = 0.1f;
			val.usesComprehensiveDelay = false;
			val.comprehensiveDelay = 0f;
			val.doScreenShake = true;
			val.playDefaultSFX = false;
			val.effect = null;
			ref List<SpeculativeRigidbody> ignoreList = ref val.ignoreList;
			PickupObject byId = PickupObjectDatabase.GetById(443);
			ignoreList = ((TargetedAttackPlayerItem)((byId is TargetedAttackPlayerItem) ? byId : null)).strikeExplosionData.ignoreList;
			val.ss = GameManager.Instance.Dungeon.sharedSettingsPrefab.DefaultExplosionData.ss;
			nukeexplosion = val;
		}
	}
	public class BloodCritProjectileComponent : MonoBehaviour
	{
		private Projectile proj;

		public float critchance = 0.01f;

		private bool hascrit;

		public bool requiresynergy = false;

		public void Start()
		{
			proj = ((Component)this).GetComponent<Projectile>();
			PlayerController val = ProjectileUtility.ProjectilePlayerOwner(proj);
			if ((Object)(object)val == (Object)null)
			{
				return;
			}
			Projectile obj = proj;
			obj.OnHitEnemy = (Action<Projectile, SpeculativeRigidbody, bool>)Delegate.Combine(obj.OnHitEnemy, new Action<Projectile, SpeculativeRigidbody, bool>(OnHitEnemy));
			if (!requiresynergy || CustomSynergies.PlayerHasActiveSynergy(val, "bloodier 9mm"))
			{
				float num = (((Object)(object)val != (Object)null) ? (val.stats.GetStatValue((StatType)4) * 0.05f) : 0f);
				hascrit = Random.value <= critchance + num;
				if (hascrit)
				{
					ProjectileData baseData = proj.baseData;
					baseData.damage *= 20f;
				}
			}
		}

		public void OnHitEnemy(Projectile proj, SpeculativeRigidbody enemy, bool fatal)
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			if (hascrit)
			{
				Object.Instantiate<GameObject>(((Component)PickupObjectDatabase.GetById(449)).GetComponent<TeleporterPrototypeItem>().TelefragVFXPrefab.gameObject, Vector2.op_Implicit(enemy.UnitCenter), Quaternion.identity);
			}
		}
	}
	public class brasstax : GunBehaviour
	{
		public static int ID;

		public static void Add()
		{
			//IL_00d5: 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_0238: Unknown result type (might be due to invalid IL or missing references)
			//IL_0256: Unknown result type (might be due to invalid IL or missing references)
			//IL_025e: Unknown result type (might be due to invalid IL or missing references)
			Gun val = Databases.Items.NewGun("Brass Tax", "brass_tax");
			Game.Items.Rename("outdated_gun_mods:brass_tax", "rqm:brasstax");
			((Component)val).gameObject.AddComponent<brasstax>();
			GunExt.SetShortDescription((PickupObject)(object)val, "");
			GunExt.SetLongDescription((PickupObject)(object)val, "");
			GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "brass_tax_idle_001", 8);
			GunTools.TrimGunSprites(val);
			GunExt.SetAnimationFPS(val, val.shootAnimation, 16);
			GunExt.SetAnimationFPS(val, val.reloadAnimation, 14);
			for (int i = 0; i < 4; i++)
			{
				PickupObject byId = PickupObjectDatabase.GetById(51);
				GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false);
			}
			foreach (ProjectileModule projectile in val.Volley.projectiles)
			{
				projectile.ammoCost = 0;
				projectile.shootStyle = (ShootStyle)0;
				projectile.sequenceStyle = (ProjectileSequenceStyle)0;
				projectile.cooldownTime = 0.8f;
				val.reloadTime = 1f;
				projectile.angleVariance = 15f;
				projectile.numberOfShotsInClip = 4;
				Projectile val2 = ProjectileUtility.InstantiateAndFakeprefab(projectile.projectiles[0]);
				projectile.projectiles[0] = val2;
				ProjectileData baseData = val2.baseData;
				baseData.speed *= 1f;
				val2.baseData.damage = 5f;
				val.shellsToLaunchOnFire = 1;
				val.shellCasingOnFireFrameDelay = 2;
				ref GameObject shellCasing = ref val.shellCasing;
				PickupObject byId2 = PickupObjectDatabase.GetById(51);
				shellCasing = ((Gun)((byId2 is Gun) ? byId2 : null)).shellCasing;
				val.shellsToLaunchOnReload = 0;
			}
			val.Volley.UsesShotgunStyleVelocityRandomizer = true;
			val.Volley.DecreaseFinalSpeedPercentMin = 8f;
			val.Volley.IncreaseFinalSpeedPercentMax = 16f;
			val.DefaultModule.ammoCost = 1;
			ref string gunSwitchGroup = ref val.gunSwitchGroup;
			PickupObject byId3 = PickupObjectDatabase.GetById(1);
			gunSwitchGroup = ((Gun)((byId3 is Gun) ? byId3 : null)).gunSwitchGroup;
			ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects;
			PickupObject byId4 = PickupObjectDatabase.GetById(1);
			muzzleFlashEffects = ((Gun)((byId4 is Gun) ? byId4 : null)).muzzleFlashEffects;
			ref ScreenShakeSettings gunScreenShake = ref val.gunScreenShake;
			PickupObject byId5 = PickupObjectDatabase.GetById(1);
			gunScreenShake = ((Gun)((byId5 is Gun) ? byId5 : null)).gunScreenShake;
			((Component)val.barrelOffset).transform.localPosition = new Vector3(1.25f, 0.5625f, 0f);
			val.SetBaseMaxAmmo(100);
			val.ammo = 100;
			val.gunClass = (GunClass)5;
			((PickupObject)val).quality = (ItemQuality)(-100);
			Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
			ID = ((PickupObject)val).PickupObjectId;
		}
	}
	public class breaktechtrash : 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_0045: Unknown result type (might be due to invalid IL or missing references)
			string text = "Break tech trash";
			string text2 = "TheRatPack/Resources/break_tech_trash";
			GameObject val = new GameObject(text);
			breaktechtrash breaktechtrash2 = val.AddComponent<breaktechtrash>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "test.";
			string text4 = "test.";
			ItemBuilder.SetupItem((PickupObject)(object)breaktechtrash2, text3, text4, "rqm");
			((PickupObject)breaktechtrash2).quality = (ItemQuality)2;
		}

		public override void Pickup(PlayerController player)
		{
			CustomActions.TableBroken = (Action<GameObject>)Delegate.Combine(CustomActions.TableBroken, new Action<GameObject>(TableBroken));
			((PassiveItem)this).Pickup(player);
		}

		public override void DisableEffect(PlayerController player)
		{
			CustomActions.TableBroken = (Action<GameObject>)Delegate.Remove(CustomActions.TableBroken, new Action<GameObject>(TableBroken));
			((PassiveItem)this).DisableEffect(player);
		}

		public void TableBroken(GameObject table)
		{
			if (!(Random.value <= 0.5f))
			{
			}
		}
	}
	public class breaktechvolatile : 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_0045: Unknown result type (might be due to invalid IL or missing references)
			string text = "Break tech volatile";
			string text2 = "TheRatPack/Resources/break_tech_volatile";
			GameObject val = new GameObject(text);
			breaktechvolatile breaktechvolatile2 = val.AddComponent<breaktechvolatile>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "test.";
			string text4 = "test.";
			ItemBuilder.SetupItem((PickupObject)(object)breaktechvolatile2, text3, text4, "rqm");
			((PickupObject)breaktechvolatile2).quality = (ItemQuality)2;
		}

		public override void Pickup(PlayerController player)
		{
			CustomActions.TableBroken = (Action<GameObject>)Delegate.Combine(CustomActions.TableBroken, new Action<GameObject>(TableBroken));
			((PassiveItem)this).Pickup(player);
		}

		public override void DisableEffect(PlayerController player)
		{
			CustomActions.TableBroken = (Action<GameObject>)Delegate.Remove(CustomActions.TableBroken, new Action<GameObject>(TableBroken));
			((PassiveItem)this).DisableEffect(player);
		}

		public void TableBroken(GameObject table)
		{
			//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_00e1: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)table.GetComponent<SpeculativeRigidbody>() != (Object)null)
			{
				ExplosionData val = CopyExplosionData(GameManager.Instance.Dungeon.sharedSettingsPrefab.DefaultExplosionData);
				val.ignoreList = new List<SpeculativeRigidbody>();
				if ((Object)(object)GameManager.Instance.PrimaryPlayer != (Object)null && (Object)(object)((BraveBehaviour)GameManager.Instance.PrimaryPlayer).specRigidbody != (Object)null)
				{
					val.ignoreList.Add(((BraveBehaviour)GameManager.Instance.PrimaryPlayer).specRigidbody);
				}
				if ((Object)(object)GameManager.Instance.SecondaryPlayer != (Object)null && (Object)(object)((BraveBehaviour)GameManager.Instance.SecondaryPlayer).specRigidbody != (Object)null)
				{
					val.ignoreList.Add(((BraveBehaviour)GameManager.Instance.SecondaryPlayer).specRigidbody);
				}
				Exploder.Explode(Vector2.op_Implicit(table.GetComponent<SpeculativeRigidbody>().UnitCenter), val, Vector2.zero, (Action)null, false, (CoreDamageTypes)0, false);
			}
		}

		public static ExplosionData CopyExplosionData(ExplosionData other)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//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_001e: 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_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Expected O, but got Unknown
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0209: Unknown result type (might be due to invalid IL or missing references)
			//IL_0215: Unknown result type (might be due to invalid IL or missing references)
			//IL_0221: Unknown result type (might be due to invalid IL or missing references)
			//IL_022e: Expected O, but got Unknown
			return new ExplosionData
			{
				useDefaultExplosion = other.useDefaultExplosion,
				doDamage = other.doDamage,
				forceUseThisRadius = other.forceUseThisRadius,
				damageRadius = other.damageRadius,
				damageToPlayer = other.damageToPlayer,
				damage = other.damage,
				breakSecretWalls = other.breakSecretWalls,
				secretWallsRadius = other.secretWallsRadius,
				forcePreventSecretWallDamage = other.forcePreventSecretWallDamage,
				doDestroyProjectiles = other.doDestroyProjectiles,
				doForce = other.doForce,
				pushRadius = other.pushRadius,
				force = other.force,
				debrisForce = other.debrisForce,
				preventPlayerForce = other.preventPlayerForce,
				explosionDelay = other.explosionDelay,
				usesComprehensiveDelay = other.usesComprehensiveDelay,
				comprehensiveDelay = other.comprehensiveDelay,
				effect = other.effect,
				doScreenShake = other.doScreenShake,
				ss = new ScreenShakeSettings
				{
					magnitude = other.ss.magnitude,
					speed = other.ss.speed,
					time = other.ss.time,
					falloff = other.ss.falloff,
					direction = new Vector2
					{
						x = other.ss.direction.x,
						y = other.ss.direction.y
					},
					vibrationType = other.ss.vibrationType,
					simpleVibrationTime = other.ss.simpleVibrationTime,
					simpleVibrationStrength = other.ss.simpleVibrationStrength
				},
				doStickyFriction = other.doStickyFriction,
				doExplosionRing = other.doExplosionRing,
				isFreezeExplosion = other.isFreezeExplosion,
				freezeRadius = other.freezeRadius,
				freezeEffect = other.freezeEffect,
				playDefaultSFX = other.playDefaultSFX,
				IsChandelierExplosion = other.IsChandelierExplosion,
				rotateEffectToNormal = other.rotateEffectToNormal,
				ignoreList = other.ignoreList,
				overrideRangeIndicatorEffect = other.overrideRangeIndicatorEffect
			};
		}
	}
	public class burstedshells : 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_0045: Unknown result type (might be due to invalid IL or missing references)
			string text = "Bursted Shells";
			string text2 = "TheRatPack/Resources/bursted_shells.png";
			GameObject val = new GameObject(text);
			burstedshells burstedshells2 = val.AddComponent<burstedshells>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "Kersplat.";
			string text4 = "Splits bullets into 5, randomizing their speed, range, and damage\n\nThe construction of these shells are so poor they have split open causing them to be fired with an inconsistent pattern";
			ItemBuilder.SetupItem((PickupObject)(object)burstedshells2, text3, text4, "rqm");
			((PickupObject)burstedshells2).quality = (ItemQuality)3;
			ItemBuilder.AddPassiveStatModifier((PickupObject)(object)burstedshells2, (StatType)5, 0.35f, (ModifyMethod)1);
		}

		public override void Pickup(PlayerController player)
		{
			player.PostProcessProjectile += projectiledeviance;
			player.stats.AdditionalVolleyModifiers += ModifyVolley;
			player.stats.RecalculateStats(player, false, false);
			((PassiveItem)this).Pickup(player);
		}

		public override void DisableEffect(PlayerController player)
		{
			if (Object.op_Implicit((Object)(object)player))
			{
				player.PostProcessProjectile -= projectiledeviance;
				player.stats.AdditionalVolleyModifiers -= ModifyVolley;
				player.stats.RecalculateStats(player, false, false);
			}
			((PassiveItem)this).DisableEffect(player);
		}

		public void ModifyVolley(ProjectileVolleyData volleyToModify)
		{
			int num = 4;
			int count = volleyToModify.projectiles.Count;
			for (int i = 0; i < num; i++)
			{
				for (int j = 0; j < count; j++)
				{
					ProjectileModule val = volleyToModify.projectiles[j];
					int num2 = j;
					if (val.CloneSourceIndex >= 0)
					{
						num2 = val.CloneSourceIndex;
					}
					ProjectileModule val2 = ProjectileModule.CreateClone(val, false, num2);
					val2.ignoredForReloadPurposes = true;
					val2.ammoCost = 0;
					val2.angleVariance += 20f;
					volleyToModify.projectiles.Add(val2);
				}
			}
		}

		public void projectiledeviance(Projectile bullet, float i)
		{
			if (CustomSynergies.PlayerHasActiveSynergy(((PassiveItem)this).Owner, "Dumb and Dumber"))
			{
				ProjectileData baseData = bullet.baseData;
				baseData.speed *= Random.Range(0.1f, 2.4f);
				ProjectileData baseData2 = bullet.baseData;
				baseData2.damage *= Random.Range(0.2f, 2f);
				ProjectileData baseData3 = bullet.baseData;
				baseData3.range *= Random.Range(0.1f, 2.4f);
				bullet.RuntimeUpdateScale(Random.Range(0.8f, 2f));
				bullet.UpdateSpeed();
			}
			else
			{
				ProjectileData baseData4 = bullet.baseData;
				baseData4.speed *= Random.Range(0.2f, 1.2f);
				ProjectileData baseData5 = bullet.baseData;
				baseData5.damage *= Random.Range(0.8f, 1.5f);
				ProjectileData baseData6 = bullet.baseData;
				baseData6.range *= Random.Range(0.8f, 1.2f);
				bullet.RuntimeUpdateScale(Random.Range(0.8f, 2f));
				bullet.UpdateSpeed();
			}
		}
	}
	public class congregation : GunBehaviour
	{
		public static int ID;

		public static void Add()
		{
			//IL_00d5: 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_02bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_031b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0339: Unknown result type (might be due to invalid IL or missing references)
			//IL_0368: Unknown result type (might be due to invalid IL or missing references)
			Gun val = Databases.Items.NewGun("Congregation", "Congregation");
			Game.Items.Rename("outdated_gun_mods:congregation", "rqm:congregation");
			((Component)val).gameObject.AddComponent<congregation>();
			GunExt.SetShortDescription((PickupObject)(object)val, "A Cure For Your Affliction");
			GunExt.SetLongDescription((PickupObject)(object)val, "Deals significantly increased damage to jammed enemies \n\nThe hallowed weapon of a beloved gungeoneer, driven to madness from facing nigh endless hordes of gundead in the depths of the gungeon.");
			GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "Congregation_idle_001", 8);
			GunTools.TrimGunSprites(val);
			GunExt.SetAnimationFPS(val, val.shootAnimation, 12);
			GunExt.SetAnimationFPS(val, val.reloadAnimation, 6);
			for (int i = 0; i < 4; i++)
			{
				PickupObject byId = PickupObjectDatabase.GetById(51);
				GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false);
			}
			foreach (ProjectileModule projectile in val.Volley.projectiles)
			{
				projectile.ammoCost = 0;
				projectile.shootStyle = (ShootStyle)0;
				projectile.sequenceStyle = (ProjectileSequenceStyle)0;
				projectile.cooldownTime = 0.8f;
				val.reloadTime = 6f;
				projectile.angleVariance = 15f;
				projectile.numberOfShotsInClip = 8;
				Projectile val2 = ProjectileUtility.InstantiateAndFakeprefab(projectile.projectiles[0]);
				projectile.projectiles[0] = val2;
				ProjectileData baseData = val2.baseData;
				baseData.speed *= 1f;
				val2.baseData.damage = 8f;
				val2.BlackPhantomDamageMultiplier = 2.25f;
				val.shellsToLaunchOnFire = 1;
				val.shellCasingOnFireFrameDelay = 6;
				ref GameObject shellCasing = ref val.shellCasing;
				PickupObject byId2 = PickupObjectDatabase.GetById(51);
				shellCasing = ((Gun)((byId2 is Gun) ? byId2 : null)).shellCasing;
				val.shellsToLaunchOnReload = 1;
				val.reloadShellLaunchFrame = 4;
				val2.hitEffects.HasProjectileDeathVFX = true;
				tk2dSpriteDefinition currentSprite = ((BraveBehaviour)val2).sprite.CurrentSprite;
				List<Material> list = new List<Material> { currentSprite.material, currentSprite.materialInst };
				foreach (Material item in list)
				{
					if (!((Object)(object)item == (Object)null))
					{
						item.SetFloat("_EmissivePower", 0f);
					}
				}
			}
			val.Volley.UsesShotgunStyleVelocityRandomizer = true;
			val.Volley.DecreaseFinalSpeedPercentMin = 16f;
			val.Volley.IncreaseFinalSpeedPercentMax = 32f;
			val.DefaultModule.ammoCost = 1;
			val.gunSwitchGroup = "rqm_congregation";
			ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects;
			PickupObject byId3 = PickupObjectDatabase.GetById(51);
			muzzleFlashEffects = ((Gun)((byId3 is Gun) ? byId3 : null)).muzzleFlashEffects;
			ref ScreenShakeSettings gunScreenShake = ref val.gunScreenShake;
			PickupObject byId4 = PickupObjectDatabase.GetById(51);
			gunScreenShake = ((Gun)((byId4 is Gun) ? byId4 : null)).gunScreenShake;
			val.carryPixelOffset = new IntVector2(3, -2);
			GunGradualReload orAddComponent = GameObjectExtensions.GetOrAddComponent<GunGradualReload>(((Component)val).gameObject);
			((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.reloadAnimation).wrapMode = (WrapMode)1;
			((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.reloadAnimation).loopStart = 0;
			((Component)val.barrelOffset).transform.localPosition = new Vector3(2.5f, 0.5f, 0f);
			val.SetBaseMaxAmmo(100);
			val.ammo = 100;
			val.gunClass = (GunClass)5;
			SoundManager.AddCustomSwitchData("WPN_Guns", "rqm_congregation", "Play_WPN_Gun_Shot_01", (SwitchedEvent[])(object)new SwitchedEvent[1] { SwitchedEvent.op_Implicit("Play_WPN_shotgun_shot_01") });
			((PickupObject)val).quality = (ItemQuality)3;
			Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
			ID = ((PickupObject)val).PickupObjectId;
		}
	}
	public static class CustomActions
	{
		public static Action<GameObject> TableBroken;
	}
	[HarmonyPatch(typeof(MajorBreakable))]
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	[HarmonyPatch]
	public class MajorBreakableBreakCatcher
	{
		[HarmonyPrefix]
		public static void HarmonyPrefix(MajorBreakable __instance, Vector2 sourceDirection)
		{
			if ((Object)(object)__instance != (Object)null && !__instance.m_isBroken && Object.op_Implicit((Object)(object)((Component)__instance).gameObject) && (Object)(object)((Component)__instance).gameObject.GetComponentInParent<FlippableCover>() != (Object)null && CustomActions.TableBroken != null)
			{
				CustomActions.TableBroken(((Component)__instance).gameObject);
			}
		}
	}
	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_0061: Unknown result type (might be due to invalid IL or missing references)
			string text = "Example Item Name";
			string text2 = "Mod/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 = "Example Long Description\n\nWow this description is really looooooooooong!";
			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);
			((PickupObject)examplePassive).quality = (ItemQuality)2;
		}

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

		public override void DisableEffect(PlayerController player)
		{
			Plugin.Log("Player dropped or got rid of " + ((PickupObject)this).DisplayName);
		}
	}
	public class GunGradualReload : MonoBehaviour
	{
		public bool holding = false;

		public bool hasRepeatingAnimation;

		public int frameToRepeatAnimationFrom;

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

		public string IntroSound;

		public string reloadStartSound;

		public string reloadSustainPlaySound;

		public string reloadSustainStopSound;

		public string reloadEndSound;

		private bool startreload = false;

		public float emptyclipPunishtime;

		private int maintaincount;

		private float timer;

		private float reloadrate;

		private float origiReloadtime;

		public int reloadnumber;

		public Gun gun;

		public PlayerController player;

		public GunGradualReload()
		{
			reloadnumber = 1;
			emptyclipPunishtime = 0.5f;
		}

		private void Start()
		{
			gun = ((Component)this).GetComponent<Gun>();
			player = GunPlayerOwner(gun);
			origiReloadtime = gun.reloadTime;
			reloadrate = gun.reloadTime / (float)gun.ClipCapacity;
		}

		private void Update()
		{
			if (!(Time.timeScale > 0f))
			{
				return;
			}
			if ((Object)(object)((GameActor)player).CurrentGun == (Object)(object)gun)
			{
				if (!holding)
				{
					if (IntroSound != null)
					{
						AkSoundEngine.PostEvent(IntroSound, ((Component)this).gameObject);
					}
					holding = true;
				}
				if (gun.ClipShotsRemaining > 0)
				{
					if (gun.IsReloading && gun.IsReloading && Key((GungeonActionType)8, (PlayerController)/*isinst with value type is only supported in some contexts*/) && gun.ClipShotsRemaining > 0)
					{
						maintaincount = gun.ClipShotsRemaining;
						gun.ForceImmediateReload(false);
						GameUIRoot.Instance.ForceClearReload(player.PlayerIDX);
						gun.ClipShotsRemaining = maintaincount;
					}
				}
				else if (gun.ClipShotsRemaining <= 0 && Key((GungeonActionType)8, (PlayerController)/*isinst with value type is only supported in some contexts*/) && !gun.IsReloading)
				{
					gun.ClipShotsRemaining = 0;
					gun.reloadTime = (float)(gun.ClipCapacity - gun.ClipShotsRemaining) * reloadrate + emptyclipPunishtime;
					timer = reloadrate + emptyclipPunishtime;
					gun.Reload();
				}
				if (!gun.IsReloading)
				{
					if (startreload)
					{
						if (reloadSustainStopSound != null)
						{
							AkSoundEngine.PostEvent(reloadSustainStopSound, ((Component)this).gameObject);
						}
						if (gun.ClipCapacity == gun.ClipShotsRemaining && reloadEndSound != null)
						{
							AkSoundEngine.PostEvent(reloadEndSound, ((Component)this).gameObject);
						}
						startreload = false;
					}
					gun.reloadTime = (float)(gun.ClipCapacity - gun.ClipShotsRemaining) * reloadrate;
					if (gun.ClipShotsRemaining == 0)
					{
						gun.reloadTime += emptyclipPunishtime;
					}
				}
				if (!gun.IsReloading)
				{
					return;
				}
				if (!startreload)
				{
					if (reloadStartSound != null)
					{
						AkSoundEngine.PostEvent(reloadStartSound, ((Component)this).gameObject);
					}
					if (reloadSustainPlaySound != null)
					{
						AkSoundEngine.PostEvent(reloadSustainPlaySound, ((Component)this).gameObject);
					}
					startreload = true;
				}
				if (gun.ClipShotsRemaining == 0)
				{
					gun.reloadTime -= emptyclipPunishtime;
				}
				reloadrate = gun.reloadTime / (float)gun.ClipCapacity;
				gun.reloadTime = origiReloadtime;
				if (timer > 0f)
				{
					timer -= BraveTime.DeltaTime;
					return;
				}
				gun.MoveBulletsIntoClip(reloadnumber);
				timer = reloadrate * player.stats.GetStatModifier((StatType)10);
				if (hasRepeatingAnimation)
				{
					((BraveBehaviour)gun).spriteAnimator.PlayFromFrame(gun.reloadAnimation, frameToRepeatAnimationFrom);
				}
				foreach (string item in additionalAudioEventsPerReload)
				{
					AkSoundEngine.PostEvent(item, ((Component)this).gameObject);
				}
				if (gun.ClipCapacity == gun.ClipShotsRemaining)
				{
					maintaincount = gun.ClipShotsRemaining;
					gun.ForceImmediateReload(false);
					GameUIRoot.Instance.ForceClearReload(player.PlayerIDX);
					gun.ClipShotsRemaining = maintaincount;
				}
			}
			else if (holding)
			{
				startreload = false;
				gun.reloadTime = origiReloadtime;
				holding = false;
			}
		}

		public bool Key(GungeonActionType action, PlayerController user)
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			return ((OneAxisInputControl)BraveInput.GetInstanceForPlayer(user.PlayerIDX).ActiveActions.GetActionFromType(action)).IsPressed;
		}

		public PlayerController GunPlayerOwner(Gun bullet)
		{
			if (Object.op_Implicit((Object)(object)bullet) && Object.op_Implicit((Object)(object)bullet.CurrentOwner) && bullet.CurrentOwner is PlayerController)
			{
				GameActor currentOwner = bullet.CurrentOwner;
				return (PlayerController)(object)((currentOwner is PlayerController) ? currentOwner : null);
			}
			return null;
		}
	}
	public class honeycylinder : PassiveItem
	{
		public static Projectile largebee;

		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_0045: Unknown result type (might be due to invalid IL or missing references)
			string text = "Honey Cylinder";
			string text2 = "TheRatPack/Resources/honey_cyllinder.png";
			GameObject val = new GameObject(text);
			honeycylinder honeycylinder2 = val.AddComponent<honeycylinder>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "A Sweet Scent.";
			string text4 = "Replaces all bullets with bees.\n\nThe sweet scent of this cylinder has attracted a colony of bees who have now taken the place of the bullets in your guns";
			ItemBuilder.SetupItem((PickupObject)(object)honeycylinder2, text3, text4, "rqm");
			((PickupObject)honeycylinder2).quality = (ItemQuality)2;
			PickupObject byId = PickupObjectDatabase.GetById(14);
			largebee = ((Component)ProjectileUtility.InstantiateAndFakeprefab(((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0])).GetComponent<Projectile>();
			largebee.AdditionalScaleMultiplier = 3f;
			largebee.baseData.damage = 20f;
			ProjectileData baseData = largebee.baseData;
			baseData.speed *= 0.5f;
			PierceProjModifier val2 = ((Component)largebee).gameObject.AddComponent<PierceProjModifier>();
			val2.penetration = 5;
		}

		public override void Pickup(PlayerController player)
		{
			player.OnPreFireProjectileModifier = (Func<Gun, Projectile, Projectile>)Delegate.Combine(player.OnPreFireProjectileModifier, new Func<Gun, Projectile, Projectile>(Spawn));
			((PassiveItem)this).Pickup(player);
		}

		public override void DisableEffect(PlayerController player)
		{
			if (Object.op_Implicit((Object)(object)player))
			{
				player.OnPreFireProjectileModifier = (Func<Gun, Projectile, Projectile>)Delegate.Remove(player.OnPreFireProjectileModifier, new Func<Gun, Projectile, Projectile>(Spawn));
			}
			((PassiveItem)this).DisableEffect(player);
		}

		public Projectile Spawn(Gun gun, Projectile bullet)
		{
			if (((Object)bullet).name.Contains("Stinger_Projectile"))
			{
				return largebee;
			}
			PickupObject byId = PickupObjectDatabase.GetById(14);
			return ((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0];
		}
	}
	public class Nukeselfdamage : MonoBehaviour
	{
		private PlayerController player1;

		private PlayerController player2;

		public float damageradius;

		private Projectile self;

		public float damage = 2f;

		public Projectile GetProjectile()
		{
			return self;
		}

		public void dealplayerdamage(Projectile projectile)
		{
			//IL_0021: 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_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			AkSoundEngine.PostEvent("Play_OBJ_nuke_blast_01", ((Component)self).gameObject);
			Pixelator.Instance.FadeToColor(0.5f, Color.white, true, 0.1f);
			StickyFrictionManager.Instance.RegisterCustomStickyFriction(0.15f, 1f, false, false);
			float num = damage;
			GameActor owner = projectile.Owner;
			PlayerController val = (PlayerController)(object)((owner is PlayerController) ? owner : null);
			if (val != null && CustomSynergies.PlayerHasActiveSynergy(val, "Nuclear defense"))
			{
				num /= 2f;
			}
			if ((Object)(object)player1 != (Object)null && Vector2.Distance(projectile.SafeCenter, ((GameActor)player1).CenterPosition) <= damageradius)
			{
				((BraveBehaviour)player1).healthHaver.ApplyDamage(num, Vector2.zero, "Cancer", (CoreDamageTypes)0, (DamageCategory)0, true, (PixelCollider)null, false);
			}
			if ((Object)(object)player2 != (Object)null && Vector2.Distance(projectile.SafeCenter, ((GameActor)player2).CenterPosition) <= damageradius)
			{
				((BraveBehaviour)player2).healthHaver.ApplyDamage(num, Vector2.zero, "Cancer", (CoreDamageTypes)0, (DamageCategory)0, true, (PixelCollider)null, false);
			}
		}

		public void Start()
		{
			self = ((Component)this).GetComponent<Projectile>();
			self.OnDestruction += dealplayerdamage;
			player1 = GameManager.Instance.PrimaryPlayer;
			player2 = GameManager.Instance.SecondaryPlayer;
		}

		public void Update()
		{
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("marcy.etg.theratpack", "TheRatPack", "1.1.5")]
	public class Plugin : BaseUnityPlugin
	{
		public const string GUID = "marcy.etg.theratpack";

		public const string NAME = "TheRatPack";

		public const string VERSION = "1.1.5";

		public const string TEXT_COLOR = "#00FFFF";

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

		public void GMStart(GameManager g)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			Harmony val = new Harmony("marcy.etg.theratpack");
			val.PatchAll(Assembly.GetExecutingAssembly());
			SoundManager.LoadSoundbanksFromAssembly((Assembly)null);
			skreee90.Add();
			bigguy.Add();
			bbgun.Add();
			agents47.Add();
			burstedshells.Register();
			sleepytyme.Add();
			beenelli.Add();
			honeycylinder.Register();
			trashyglasses.Register();
			pocketshotgun.Register();
			congregation.Add();
			skreee90synnergy.Add();
			TestActive.Register();
			Synergyadder.addsynergies();
			Log("TheRatPack v1.1.5 started successfully.", "#00FFFF");
		}

		public static void Log(string text, string color = "#FFFFFF")
		{
			ETGModConsole.Log((object)("<color=" + color + ">" + text + "</color>"), false);
		}
	}
	public class pocketshotgun : PlayerItem
	{
		public static int ID;

		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_0059: Unknown result type (might be due to invalid IL or missing references)
			string text = "Pocket shotgun";
			string text2 = "TheRatPack/Resources/pocketshotgun.png";
			GameObject val = new GameObject(text);
			pocketshotgun pocketshotgun2 = val.AddComponent<pocketshotgun>();
			ItemBuilder.SetCooldownType((PlayerItem)(object)pocketshotgun2, (CooldownType)1, 50f);
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "A Solid Backup";
			string text4 = "throws a shotgun at your energy with a short cooldownn.\n\nThrowing a shotgun may seem like a waste of a perfectly good shotgun, but this is the gungeon there is plenty to go around.";
			ItemBuilder.SetupItem((PickupObject)(object)pocketshotgun2, text3, text4, "rqm");
			((PlayerItem)pocketshotgun2).consumable = false;
			((PickupObject)pocketshotgun2).quality = (ItemQuality)1;
			ID = ((PickupObject)pocketshotgun2).PickupObjectId;
		}

		public override void DoEffect(PlayerController user)
		{
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			PickupObject byId = PickupObjectDatabase.GetById(512);
			Projectile val = ProjectileUtility.InstantiateAndFakeprefab(((Gun)((byId is Gun) ? byId : null)).DefaultModule.projectiles[0]);
			int num = 1;
			float num2 = 0f;
			if (CustomSynergies.PlayerHasActiveSynergy(user, "More shotgun per shotgun"))
			{
				num = 3;
				num2 = 20f;
			}
			for (int i = 0; i < num; i++)
			{
				float num3 = (((Object)(object)((GameActor)user).CurrentGun == (Object)null) ? 0f : ((GameActor)user).CurrentGun.CurrentAngle);
				num3 += Random.Range(-1f, 1f) * num2;
				GameObject val2 = SpawnManager.SpawnProjectile(((Component)val).gameObject, Vector2.op_Implicit(((BraveBehaviour)user).sprite.WorldCenter), Quaternion.Euler(0f, 0f, num3), true);
				Projectile component = val2.GetComponent<Projectile>();
				if ((Object)(object)component != (Object)null)
				{
					component.Owner = (GameActor)(object)user;
					component.Shooter = ((BraveBehaviour)user).specRigidbody;
				}
			}
			if (CustomSynergies.PlayerHasActiveSynergy(user, "Use another gun"))
			{
				PickupObject byId2 = PickupObjectDatabase.GetById(503);
				Projectile val3 = ProjectileUtility.InstantiateAndFakeprefab(((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule.projectiles[0]);
				GameObject val4 = SpawnManager.SpawnProjectile(((Component)val3).gameObject, Vector2.op_Implicit(((BraveBehaviour)user).sprite.WorldCenter), Quaternion.Euler(0f, 0f, ((Object)(object)((GameActor)user).CurrentGun == (Object)null) ? 0f : ((GameActor)user).CurrentGun.CurrentAngle), true);
				Projectile component2 = val4.GetComponent<Projectile>();
				if ((Object)(object)component2 != (Object)null)
				{
					component2.Owner = (GameActor)(object)user;
					component2.Shooter = ((BraveBehaviour)user).specRigidbody;
				}
			}
		}
	}
	public class skreee90synnergy : GunBehaviour
	{
		public static int ID;

		public static void Add()
		{
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_032a: Unknown result type (might be due to invalid IL or missing references)
			Gun val = Databases.Items.NewGun("Skreee90synnergy", "Skreee90wilhelm");
			Game.Items.Rename("outdated_gun_mods:skreee90synnergy", "rqm:skreee90synergy");
			skreee90synnergy skreee90synnergy2 = ((Component)val).gameObject.AddComponent<skreee90synnergy>();
			GunExt.SetShortDescription((PickupObject)(object)val, "AAAAAAAAAAAAAAAH");
			GunExt.SetLongDescription((PickupObject)(object)val, "It will not stop screaming");
			GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "Skreee90wilhelm_idle_001", 10);
			GunExt.SetAnimationFPS(val, val.shootAnimation, 7);
			GunExt.SetAnimationFPS(val, val.reloadAnimation, 8);
			val.usesContinuousFireAnimation = false;
			PickupObject byId = PickupObjectDatabase.GetById(56);
			GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false);
			ref string gunSwitchGroup = ref val.gunSwitchGroup;
			PickupObject byId2 = PickupObjectDatabase.GetById(12);
			gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup;
			val.muzzleFlashEffects.type = (VFXPoolType)0;
			val.carryPixelOffset = new IntVector2(10, 0);
			val.gunSwitchGroup = "rqm_skreee90synergy";
			SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Shot_01", (SwitchedEvent[])(object)new SwitchedEvent[1] { SwitchedEvent.op_Implicit("") });
			SoundManager.AddCustomSwitchData("WPN_Guns", val.gunSwitchGroup, "Play_WPN_Gun_Reload_01", (SwitchedEvent[])(object)new SwitchedEvent[1] { SwitchedEvent.op_Implicit("Play_WPN_crossbow_reload_01") });
			Databases.Strings.Items.Set(((BraveBehaviour)val).encounterTrackable.journalData.PrimaryDisplayName, "Skreee90");
			val.DefaultModule.ammoCost = 1;
			val.DefaultModule.shootStyle = (ShootStyle)4;
			val.DefaultModule.burstShotCount = 7;
			val.DefaultModule.burstCooldownTime = 0.1f;
			val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0;
			val.reloadTime = 1f;
			val.DefaultModule.cooldownTime = 0.75f;
			val.DefaultModule.angleVariance = 6f;
			val.DefaultModule.numberOfShotsInClip = 49;
			val.SetBarrel(28, 6);
			val.SetBaseMaxAmmo(1000);
			val.ammo = 1000;
			val.gunClass = (GunClass)50;
			Projectile val2 = ProjectileUtility.InstantiateAndFakeprefab(val.DefaultModule.projectiles[0]);
			val.DefaultModule.projectiles[0] = val2;
			val2.baseData.speed = 24f;
			val2.baseData.damage = 9f;
			val2.baseData.force = 10f;
			val2.AdditionalScaleMultiplier = 1f;
			GunTools.SetProjectileSpriteRight(val2, "Toothproj", 6, 5, false, (Anchor)4, (int?)6, (int?)5, true, false, (int?)null, (int?)null, (Projectile)null);
			ETGModConsole.Log((object)((Object)((Component)val2).GetComponentInChildren<tk2dBaseSprite>().CurrentSprite.material.shader).name, false);
			tk2dSpriteDefinition currentSprite = ((Component)val2).GetComponentInChildren<tk2dBaseSprite>().CurrentSprite;
			Material[] array = (Material[])(object)new Material[2] { currentSprite.material, currentSprite.materialInst };
			Material[] array2 = array;
			foreach (Material val3 in array2)
			{
				if (Object.op_Implicit((Object)(object)val3))
				{
					val3.SetFloat("_EmissivePower", 0f);
					val3.SetFloat("_EmissiveColorPower", 0f);
				}
			}
			GunTools.TrimGunSprites(val);
			((PickupObject)val).quality = (ItemQuality)(-100);
			Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
			ID = ((PickupObject)val).PickupObjectId;
			PickupObject byId3 = PickupObjectDatabase.GetById(skreee90.ID);
			GunTools.AddTransformSynergy((Gun)(object)((byId3 is Gun) ? byId3 : null), ID, true, "Gun_being_eaten_by_alligator.mp3", false);
		}
	}
	public class skreee90 : GunBehaviour
	{
		public static int ID;

		public static void Add()
		{
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_016c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c8: Unknown result type (might be due to invalid IL or missing references)
			Gun val = Databases.Items.NewGun("Skreee90", "skree90");
			Game.Items.Rename("outdated_gun_mods:skreee90", "rqm:skreee90");
			skreee90 skreee91 = ((Component)val).gameObject.AddComponent<skreee90>();
			GunExt.SetShortDescription((PickupObject)(object)val, "AAAAAAAAAAAAAAAH");
			GunExt.SetLongDescription((PickupObject)(object)val, "It will not stop screaming");
			GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "skree90_idle_001", 10);
			GunExt.SetAnimationFPS(val, val.shootAnimation, 12);
			GunExt.SetAnimationFPS(val, val.reloadAnimation, 8);
			val.usesContinuousFireAnimation = true;
			((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.shootAnimation).wrapMode = (WrapMode)1;
			((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.shootAnimation).loopStart = 3;
			PickupObject byId = PickupObjectDatabase.GetById(56);
			GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false);
			ref string gunSwitchGroup = ref val.gunSwitchGroup;
			PickupObject byId2 = PickupObjectDatabase.GetById(12);
			gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup;
			val.muzzleFlashEffects.type = (VFXPoolType)0;
			val.carryPixelOffset = new IntVector2(10, 0);
			val.DefaultModule.ammoCost = 1;
			val.DefaultModule.shootStyle = (ShootStyle)1;
			val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0;
			val.reloadTime = 1.8f;
			val.DefaultModule.cooldownTime = 0.08f;
			val.DefaultModule.angleVariance = 12f;
			val.DefaultModule.numberOfShotsInClip = 50;
			((Component)val.barrelOffset).transform.localPosition = new Vector3(1.25f, 0.5f, 0f);
			val.SetBaseMaxAmmo(1000);
			val.ammo = 1000;
			val.gunClass = (GunClass)50;
			SpecialSoundDoer specialSoundDoer = ((Component)val).gameObject.AddComponent<SpecialSoundDoer>();
			specialSoundDoer.StartOfBurstSound = "Rat_Wilhelm_Scream";
			specialSoundDoer.StartOfBurstRequiredNamePrefix = "Skreee90wilhelm";
			Projectile val2 = ProjectileUtility.InstantiateAndFakeprefab(val.DefaultModule.projectiles[0]);
			val.DefaultModule.projectiles[0] = val2;
			val2.baseData.speed = 18f;
			val2.baseData.damage = 3f;
			val2.baseData.force = 30f;
			GunTools.SetProjectileSpriteRight(val2, "Skreee90_proj_A_001", 9, 10, true, (Anchor)4, (int?)9, (int?)10, true, false, (int?)null, (int?)null, (Projectile)null);
			val.isAudioLoop = true;
			SoundManager.AddCustomSwitchData("WPN_Guns", "rqm_scree90", "Stop_WPN_gun_loop_01", (SwitchedEvent[])(object)new SwitchedEvent[1] { SwitchedEvent.op_Implicit("Stop_WPN_All") });
			SoundManager.AddCustomSwitchData("WPN_Guns", "rqm_scree90", "Play_WPN_Gun_Shot_01", (SwitchedEvent[])(object)new SwitchedEvent[1] { SwitchedEvent.op_Implicit("Play_WPN_SeriousCannon_Scream_01") });
			SoundManager.AddCustomSwitchData("WPN_Guns", "rqm_scree90", "Play_WPN_Gun_Reload_01", (SwitchedEvent[])(object)new SwitchedEvent[0]);
			val.gunSwitchGroup = "rqm_scree90";
			((PickupObject)val).quality = (ItemQuality)2;
			Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
			ID = ((PickupObject)val).PickupObjectId;
		}
	}
	public class sleepytyme : GunBehaviour
	{
		public static int ID;

		public static void Add()
		{
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_01be: Unknown result type (might be due to invalid IL or missing references)
			//IL_021f: Unknown result type (might be due to invalid IL or missing references)
			Gun val = Databases.Items.NewGun("Sleepytyme", "Sleepytyme");
			Game.Items.Rename("outdated_gun_mods:sleepytyme", "rqm:sleepytyme");
			sleepytyme sleepytyme2 = ((Component)val).gameObject.AddComponent<sleepytyme>();
			GunExt.SetShortDescription((PickupObject)(object)val, "Lights Out");
			GunExt.SetLongDescription((PickupObject)(object)val, "Despite being an expert gunsmith this is the only gun this creator ever managed to finish, as he never could stay awake long enough to complete anything else.");
			GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "Sleepytyme_idle_001", 10);
			GunTools.TrimGunSprites(val);
			GunExt.SetAnimationFPS(val, val.shootAnimation, 12);
			GunExt.SetAnimationFPS(val, val.reloadAnimation, 19);
			PickupObject byId = PickupObjectDatabase.GetById(56);
			GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false);
			ref string gunSwitchGroup = ref val.gunSwitchGroup;
			PickupObject byId2 = PickupObjectDatabase.GetById(94);
			gunSwitchGroup = ((Gun)((byId2 is Gun) ? byId2 : null)).gunSwitchGroup;
			ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects;
			PickupObject byId3 = PickupObjectDatabase.GetById(94);
			muzzleFlashEffects = ((Gun)((byId3 is Gun) ? byId3 : null)).muzzleFlashEffects;
			val.carryPixelOffset = new IntVector2(0, 0);
			ref GameObject clipObject = ref val.clipObject;
			PickupObject byId4 = PickupObjectDatabase.GetById(15);
			clipObject = ((Gun)((byId4 is Gun) ? byId4 : null)).clipObject;
			val.clipsToLaunchOnReload = 1;
			val.reloadClipLaunchFrame = 3;
			val.shellsToLaunchOnFire = 1;
			val.shellCasingOnFireFrameDelay = 1;
			ref GameObject shellCasing = ref val.shellCasing;
			PickupObject byId5 = PickupObjectDatabase.GetById(5);
			shellCasing = ((Gun)((byId5 is Gun) ? byId5 : null)).shellCasing;
			val.shellsToLaunchOnReload = 0;
			val.DefaultModule.ammoCost = 1;
			val.DefaultModule.shootStyle = (ShootStyle)1;
			val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0;
			val.reloadTime = 1f;
			val.DefaultModule.cooldownTime = 0.1f;
			val.DefaultModule.angleVariance = 12f;
			val.DefaultModule.numberOfShotsInClip = 40;
			((Component)val.barrelOffset).transform.localPosition = new Vector3(2.125f, 0.875f, 0f);
			val.SetBaseMaxAmmo(500);
			val.ammo = 500;
			val.gunClass = (GunClass)10;
			Projectile val2 = ProjectileUtility.InstantiateAndFakeprefab(val.DefaultModule.projectiles[0]);
			val.DefaultModule.projectiles[0] = val2;
			val2.baseData.speed = 23f;
			val2.baseData.damage = 5f;
			val2.baseData.force = 5f;
			((PickupObject)val).quality = (ItemQuality)3;
			Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
			ID = ((PickupObject)val).PickupObjectId;
		}

		public override void PostProcessProjectile(Projectile projectile)
		{
			if (CustomSynergies.PlayerHasActiveSynergy(((GunBehaviour)this).PlayerOwner, "Night,night"))
			{
				projectile.AppliesStun = true;
			}
			projectile.StunApplyChance = 0.1f;
			((GunBehaviour)this).PostProcessProjectile(projectile);
		}
	}
	public class sr410 : GunBehaviour
	{
		public static int ID;

		public static void Add()
		{
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: 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_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0320: Unknown result type (might be due to invalid IL or missing references)
			Gun val = Databases.Items.NewGun("SR410", "sr410");
			Game.Items.Rename("outdated_gun_mods:sr410", "rqm:sr410");
			((Component)val).gameObject.AddComponent<sr410>();
			GunExt.SetShortDescription((PickupObject)(object)val, "");
			GunExt.SetLongDescription((PickupObject)(object)val, "");
			GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "sr410_idle_001", 8);
			GunTools.TrimGunSprites(val);
			val.carryPixelOffset = new IntVector2(3, 0);
			GunExt.SetAnimationFPS(val, val.shootAnimation, 12);
			GunExt.SetAnimationFPS(val, val.reloadAnimation, 7);
			for (int i = 0; i < 6; i++)
			{
				PickupObject byId = PickupObjectDatabase.GetById(51);
				GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false);
			}
			foreach (ProjectileModule projectile in val.Volley.projectiles)
			{
				projectile.ammoCost = 0;
				projectile.shootStyle = (ShootStyle)0;
				projectile.sequenceStyle = (ProjectileSequenceStyle)0;
				projectile.cooldownTime = 0.8f;
				val.reloadTime = 1.5f;
				projectile.angleVariance = 15f;
				projectile.numberOfShotsInClip = 5;
				Projectile val2 = ProjectileUtility.InstantiateAndFakeprefab(projectile.projectiles[0]);
				projectile.projectiles[0] = val2;
				ProjectileData baseData = val2.baseData;
				baseData.speed *= 1f;
				val2.baseData.damage = 5f;
				val.shellsToLaunchOnFire = 0;
				val.shellCasingOnFireFrameDelay = 0;
				ref GameObject shellCasing = ref val.shellCasing;
				PickupObject byId2 = PickupObjectDatabase.GetById(51);
				shellCasing = ((Gun)((byId2 is Gun) ? byId2 : null)).shellCasing;
				val.shellsToLaunchOnReload = 5;
				val.reloadShellLaunchFrame = 6;
				val2.hitEffects.HasProjectileDeathVFX = true;
				tk2dSpriteDefinition currentSprite = ((BraveBehaviour)val2).sprite.CurrentSprite;
				List<Material> list = new List<Material> { currentSprite.material, currentSprite.materialInst };
				foreach (Material item in list)
				{
					if (!((Object)(object)item == (Object)null))
					{
						item.SetFloat("_EmissivePower", 0f);
					}
				}
			}
			val.Volley.UsesShotgunStyleVelocityRandomizer = true;
			val.Volley.DecreaseFinalSpeedPercentMin = 24f;
			val.Volley.IncreaseFinalSpeedPercentMax = 48f;
			val.DefaultModule.ammoCost = 1;
			val.gunSwitchGroup = "rqm_sr410";
			ref VFXPool muzzleFlashEffects = ref val.muzzleFlashEffects;
			PickupObject byId3 = PickupObjectDatabase.GetById(51);
			muzzleFlashEffects = ((Gun)((byId3 is Gun) ? byId3 : null)).muzzleFlashEffects;
			ref ScreenShakeSettings gunScreenShake = ref val.gunScreenShake;
			PickupObject byId4 = PickupObjectDatabase.GetById(51);
			gunScreenShake = ((Gun)((byId4 is Gun) ? byId4 : null)).gunScreenShake;
			((Component)val.barrelOffset).transform.localPosition = new Vector3(2.5f, 0.5f, 0f);
			val.SetBaseMaxAmmo(100);
			val.ammo = 100;
			val.gunClass = (GunClass)5;
			SoundManager.AddCustomSwitchData("WPN_Guns", "rqm_sr410", "Play_WPN_Gun_Shot_01", (SwitchedEvent[])(object)new SwitchedEvent[1] { SwitchedEvent.op_Implicit("Play_WPN_shotgun_shot_01") });
			((PickupObject)val).quality = (ItemQuality)3;
			Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
			ID = ((PickupObject)val).PickupObjectId;
		}

		public override void OnReloadPressed(PlayerController player, Gun gun, bool manual)
		{
			if (gun.ClipShotsRemaining == gun.ClipCapacity)
			{
			}
			((GunBehaviour)this).OnReloadPressed(player, gun, manual);
		}
	}
	public static class Synergyadder
	{
		public static void addsynergies()
		{
			//IL_026e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0273: Unknown result type (might be due to invalid IL or missing references)
			//IL_029d: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c9: Expected O, but got Unknown
			//IL_02d4: Unknown result type (might be due to invalid IL or missing references)
			CustomSynergies.Add("Revitalized", new List<string> { "rqm:beenelli", "rqm:honey_cylinder" }, (List<string>)null, true);
			CustomSynergies.Add("More shotgun per shotgun", new List<string> { "rqm:pocket_shotgun", "shell" }, (List<string>)null, true);
			CustomSynergies.Add("Use more gun", new List<string> { "rqm:pocket_shotgun", "bullet" }, (List<string>)null, true);
			CustomSynergies.Add("Night,night", new List<string> { "rqm:sleepytyme", "silencer" }, (List<string>)null, true);
			CustomSynergies.Add("Beebee gun", new List<string> { "rqm:abeline_kid_bbgun", "rqm:honey_cylinder" }, (List<string>)null, true);
			CustomSynergies.Add("Nuclear defense", new List<string> { "rqm:big_guy", "blast_helmet" }, (List<string>)null, true);
			CustomSynergies.Add("Nuclear defense", new List<string> { "rqm:big_guy", "hazmat_suit" }, (List<string>)null, true);
			CustomSynergies.Add("Bloodier 9mm", new List<string> { "rqm:abeline_kid_bbgun", "bloody_9mm" }, (List<string>)null, true);
			CustomSynergies.Add("Gun_being_eaten_by_alligator.mp3", new List<string> { "rqm:skreee90", "fightsabre" }, (List<string>)null, true);
			CustomSynergies.Add("Gun_being_eaten_by_alligator.mp3", new List<string> { "rqm:skreee90", "r2g2" }, (List<string>)null, true);
			CustomSynergies.Add("Tactical Briefcase", new List<string> { "rqm:agents47", "briefcase_of_cash" }, (List<string>)null, true);
			CustomSynergies.Add("Dumb and Dumber", new List<string> { "rqm:bursted_shells", "scattershot" }, (List<string>)null, true);
			CustomSynergies.Add("Big Sting", new List<string> { "rqm:honey_cylinder", "stinger" }, (List<string>)null, true);
			AdvancedSynergyEntry val = CustomSynergies.Add("Bees x2", new List<string> { "rqm:honey_cylinder", "bee_hive" }, (List<string>)null, true);
			PickupObject byId = PickupObjectDatabase.GetById(14);
			VolleyModificationSynergyProcessor val2 = ((Component)((byId is Gun) ? byId : null)).gameObject.AddComponent<VolleyModificationSynergyProcessor>();
			CustomSynergyType val3 = ETGModCompatibility.ExtendEnum<CustomSynergyType>("rqm", "BEESYNERGY");
			PickupObject byId2 = PickupObjectDatabase.GetById(14);
			ProjectileModule val4 = ProjectileModule.CreateClone(((Gun)((byId2 is Gun) ? byId2 : null)).DefaultModule, true, -1);
			val4.ammoCost = 0;
			val2.synergies = (VolleyModificationSynergyData[])(object)new VolleyModificationSynergyData[1]
			{
				new VolleyModificationSynergyData
				{
					RequiredSynergy = val3,
					AddsModules = true,
					ModulesToAdd = new List<ProjectileModule> { val4 }.ToArray()
				}
			};
			val.bonusSynergies.Add(val3);
		}
	}
	public class TestActive : PlayerItem
	{
		public static int ID;

		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_005a: Unknown result type (might be due to invalid IL or missing references)
			string text = "TestActive";
			string text2 = "TheRatPack/Resources/pocketshotgun.png";
			GameObject val = new GameObject(text);
			TestActive testActive = val.AddComponent<TestActive>();
			ItemBuilder.SetCooldownType((PlayerItem)(object)testActive, (CooldownType)3, 1f);
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "Test";
			string text4 = "Test";
			ItemBuilder.SetupItem((PickupObject)(object)testActive, text3, text4, "rqm");
			((PlayerItem)testActive).consumable = false;
			((PickupObject)testActive).quality = (ItemQuality)(-100);
			ID = ((PickupObject)testActive).PickupObjectId;
		}

		public override void DoEffect(PlayerController user)
		{
			AkSoundEngine.PostEvent("Rat_Wilhelm_Scream", ((Component)user).gameObject);
		}
	}
	public static class Toolbox
	{
		public static List<T> DupeList<T>(T value, int length)
		{
			List<T> list = new List<T>();
			for (int i = 0; i < length; i++)
			{
				list.Add(value);
			}
			return list;
		}

		public static void SetBarrel(this Gun gun, int xoffset, int yoffset)
		{
			//IL_000c: 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)
			((Component)gun.barrelOffset).transform.localScale = Vector3.one;
			((Component)gun.barrelOffset).transform.localPosition = new Vector3((float)xoffset / 16f, (float)yoffset / 16f, 0f);
		}
	}
	public class SpecialSoundDoer : MonoBehaviour
	{
		public string StartOfBurstRequiredNamePrefix = null;

		public string StartOfBurstRequiredSynergy = null;

		public string StartOfBurstSound = null;

		private Gun m_gun;

		private bool m_hasPlayedAudioThisShot;

		public void Awake()
		{
			m_gun = ((Component)this).GetComponent<Gun>();
			Gun gun = m_gun;
			gun.OnPostFired = (Action<PlayerController, Gun>)Delegate.Combine(gun.OnPostFired, new Action<PlayerController, Gun>(HandlePostFired));
			Gun gun2 = m_gun;
			gun2.OnFinishAttack = (Action<PlayerController, Gun>)Delegate.Combine(gun2.OnFinishAttack, new Action<PlayerController, Gun>(HandleFinishAttack));
			Gun gun3 = m_gun;
			gun3.OnBurstContinued = (Action<PlayerController, Gun>)Delegate.Combine(gun3.OnBurstContinued, new Action<PlayerController, Gun>(HandleBurstContinued));
		}

		private void HandleBurstContinued(PlayerController arg1, Gun arg2)
		{
			HandleFinishAttack(arg1, arg2);
		}

		private void HandlePostFired(PlayerController arg1, Gun arg2)
		{
			if (!m_hasPlayedAudioThisShot)
			{
				m_hasPlayedAudioThisShot = true;
				if (!string.IsNullOrEmpty(StartOfBurstSound) && (string.IsNullOrEmpty(StartOfBurstRequiredSynergy) || (Object.op_Implicit((Object)(object)GunTools.GunPlayerOwner(arg2)) && CustomSynergies.PlayerHasActiveSynergy(GunTools.GunPlayerOwner(arg2), StartOfBurstRequiredSynergy))) && (string.IsNullOrEmpty(StartOfBurstRequiredNamePrefix) || ((Object)(object)((BraveBehaviour)arg2).sprite != (Object)null && ((BraveBehaviour)arg2).sprite.CurrentSprite != null && ((BraveBehaviour)arg2).sprite.CurrentSprite.name.StartsWith(StartOfBurstRequiredNamePrefix))))
				{
					AkSoundEngine.PostEvent(StartOfBurstSound, ((Component)arg2).gameObject);
				}
			}
		}

		private void HandleFinishAttack(PlayerController sourcePlayer, Gun sourceGun)
		{
			m_hasPlayedAudioThisShot = false;
		}
	}
	public class trashyglasses : PassiveItem
	{
		public int lastItems;

		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_0046: Unknown result type (might be due to invalid IL or missing references)
			string text = "Trashy glasses";
			string text2 = "TheRatPack/Resources/Trashy Glasses.png";
			GameObject val = new GameObject(text);
			trashyglasses trashyglasses2 = val.AddComponent<trashyglasses>();
			ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
			string text3 = "Fashionable?.";
			string text4 = "Adds 0.5 coolness for every piece of junk .\n\nAn Extremeley worn and tacky pair of glasses probably recovered from a dumpster based on the smell";
			ItemBuilder.SetupItem((PickupObject)(object)trashyglasses2, text3, text4, "rqm");
			((PickupObject)trashyglasses2).quality = (ItemQuality)2;
		}

		public override void Update()
		{
			if ((Object)(object)((PassiveItem)this).Owner != (Object)null)
			{
				int count = ((PassiveItem)this).Owner.passiveItems.Count;
				if (count != lastItems)
				{
					ItemBuilder.RemovePassiveStatModifier((PickupObject)(object)this, (StatType)4);
					foreach (PassiveItem passiveItem in ((PassiveItem)this).Owner.passiveItems)
					{
						if (((PickupObject)passiveItem).PickupObjectId == 127 || ((PickupObject)passiveItem).PickupObjectId == 580 || ((PickupObject)passiveItem).PickupObjectId == 641 || ((PickupObject)passiveItem).PickupObjectId == 148)
						{
							ItemBuilder.AddPassiveStatModifier((PickupObject)(object)this, (StatType)4, 0.5f, (ModifyMethod)0);
						}
					}
					lastItems = count;
					((PassiveItem)this).Owner.stats.RecalculateStats(((PassiveItem)this).Owner, true, false);
				}
			}
			((PassiveItem)this).Update();
		}
	}
}