Decompiled source of TheRatPack v1.1.5

plugins/TheRatPack.dll

Decompiled 2 months 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 Gungeon;
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 agents47 : GunBehaviour
	{
		public static int ID;

		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_0255: 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, "A 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(12);
			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]);
			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)val).quality = (ItemQuality)4;
			Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
			ID = ((PickupObject)val).PickupObjectId;
		}
	}
	public class bbgun : GunBehaviour
	{
		public static int ID;

		public static void Add()
		{
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: 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_01f7: 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, 8);
			GunExt.SetAnimationFPS(val, val.reloadAnimation, 10);
			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.carryPixelOffset = new IntVector2(5, 2);
			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_gun_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.");
			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 = 1f;
			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_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: 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_00c8: 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)
			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);
			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);
			}
			if (CustomSynergies.PlayerHasActiveSynergy(((GunBehaviour)this).PlayerOwner, "Nuclear defense"))
			{
				projectile.baseData.range = 10f;
			}
			((GunBehaviour)this).PostProcessProjectile(projectile);
			if (Vector2.Distance(projectile.SafeCenter, ((GameActor)((GunBehaviour)this).PlayerOwner).CenterPosition) <= 5.25f)
			{
				((BraveBehaviour)((GunBehaviour)this).PlayerOwner).healthHaver.ApplyDamage(1f, Vector2.zero, "Cancer", (CoreDamageTypes)0, (DamageCategory)0, true, (PixelCollider)null, false);
			}
		}

		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 = 7f;
			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 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 with randomized 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)
		{
			ProjectileData baseData = bullet.baseData;
			baseData.speed *= Random.Range(0.2f, 1.2f);
			ProjectileData baseData2 = bullet.baseData;
			baseData2.damage *= Random.Range(0.8f, 1.5f);
			ProjectileData baseData3 = bullet.baseData;
			baseData3.range *= Random.Range(0.8f, 1.2f);
			bullet.RuntimeUpdateScale(Random.Range(0.8f, 2f));
			bullet.UpdateSpeed();
		}
	}
	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 gunbeingeatenbyalligator : 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_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
			Gun val = Databases.Items.NewGun("gunbeingeatenbyalligator", "gunbeingeatenbyalligator");
			Game.Items.Rename("outdated_gun_mods:gunbeingeatenbyalligator", "rqm:skreee90_gunbeingeatenbyalligator");
			gunbeingeatenbyalligator gunbeingeatenbyalligator2 = ((Component)val).gameObject.AddComponent<gunbeingeatenbyalligator>();
			GunExt.SetShortDescription((PickupObject)(object)val, "AAAAAAAAAAAAAAAH");
			GunExt.SetLongDescription((PickupObject)(object)val, "It will not stop screaming");
			GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "gun_being_eaten_by_alligator_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 = 2;
			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)4;
			val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0;
			val.DefaultModule.burstShotCount = 1;
			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;
			Projectile val2 = ProjectileUtility.InstantiateAndFakeprefab(val.DefaultModule.projectiles[0]);
			val.DefaultModule.projectiles[0] = val2;
			val2.baseData.speed = 18f;
			val2.baseData.damage = 6f;
			val2.baseData.force = 30f;
			((PickupObject)val).quality = (ItemQuality)(-100);
			Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
			ID = ((PickupObject)val).PickupObjectId;
		}
	}
	public class GunGradualReload : MonoBehaviour
	{
		public float emptyclipPunishtime;

		public 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) || !((Object)(object)((GameActor)player).CurrentGun == (Object)(object)gun))
			{
				return;
			}
			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);
					if (maintaincount != gun.ClipShotsRemaining)
					{
						((BraveBehaviour)gun).spriteAnimator.PlayFromFrame(gun.reloadAnimation, 0);
					}
					gun.ClipShotsRemaining = maintaincount;
				}
			}
			else if (gun.ClipShotsRemaining <= 0 && Key((GungeonActionType)8, (PlayerController)/*isinst with value type is only supported in some contexts*/))
			{
				gun.ClipShotsRemaining = 0;
				gun.reloadTime = (float)(gun.ClipCapacity - gun.ClipShotsRemaining) * reloadrate;
				timer = reloadrate + emptyclipPunishtime;
				gun.Reload();
			}
			if (!gun.IsReloading)
			{
				gun.reloadTime = (float)(gun.ClipCapacity - gun.ClipShotsRemaining) * reloadrate;
			}
			if (!gun.IsReloading)
			{
				return;
			}
			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 (gun.ClipCapacity == gun.ClipShotsRemaining)
			{
				maintaincount = gun.ClipShotsRemaining;
				gun.ForceImmediateReload(false);
				GameUIRoot.Instance.ForceClearReload(player.PlayerIDX);
				gun.ClipShotsRemaining = maintaincount;
			}
		}

		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 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;
		}

		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)
		{
			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_005b: 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_00ba: 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_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: 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);
			if ((Object)(object)player1 != (Object)null && Vector2.Distance(projectile.SafeCenter, ((GameActor)player1).CenterPosition) <= damageradius)
			{
				((BraveBehaviour)player1).healthHaver.ApplyDamage(damage, 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(damage, 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)
		{
			skreee90.Add();
			bigguy.Add();
			bbgun.Add();
			agents47.Add();
			burstedshells.Register();
			sleepytyme.Add();
			windmillrifle.Add();
			beenelli.Add();
			brasstax.Add();
			honeycylinder.Register();
			trashyglasses.Register();
			pocketshotgun.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_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: 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]);
			GameObject val2 = SpawnManager.SpawnProjectile(((Component)val).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 component = val2.GetComponent<Projectile>();
			if ((Object)(object)component != (Object)null)
			{
				component.Owner = (GameActor)(object)user;
				component.Shooter = ((BraveBehaviour)user).specRigidbody;
			}
		}
	}
	public class skreee90 : GunBehaviour
	{
		public static int ID;

		public bool isAudioLooping = false;

		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_0268: 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 = 2;
			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;
			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);
			SoundManager.AddCustomSwitchData("WPN_Guns", "rqm_scree90", "Play_WPN_Gun_Shot_01", (SwitchedEvent[])(object)new SwitchedEvent[0]);
			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 override void OwnedUpdatePlayer(PlayerController owner, GunInventory inventory)
		{
			if (Object.op_Implicit((Object)(object)base.gun))
			{
				if (base.gun.IsFiring && !isAudioLooping)
				{
					AkSoundEngine.PostEvent("Play_WPN_SeriousCannon_Scream_01", ((Component)this).gameObject);
					isAudioLooping = true;
				}
				if (!base.gun.IsFiring && isAudioLooping)
				{
					AkSoundEngine.PostEvent("Stop_WPN_All", ((Component)this).gameObject);
					isAudioLooping = false;
				}
			}
			((GunBehaviour)this).OwnedUpdatePlayer(owner, inventory);
		}

		public override void OnSwitchedAwayFromPlayer(PlayerController owner, GunInventory inventory, Gun newGun, bool isNewGun)
		{
			AkSoundEngine.PostEvent("Stop_WPN_All", ((Component)this).gameObject);
			isAudioLooping = false;
			((GunBehaviour)this).OnSwitchedAwayFromPlayer(owner, inventory, newGun, isNewGun);
		}

		public override void OnSwitchedToPlayer(PlayerController owner, GunInventory inventory, Gun oldGun, bool isNewGun)
		{
			AkSoundEngine.PostEvent("Stop_WPN_All", ((Component)this).gameObject);
			isAudioLooping = false;
			((GunBehaviour)this).OnSwitchedToPlayer(owner, inventory, oldGun, isNewGun);
		}
	}
	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 static class Synergyadder
	{
		public static void addsynergies()
		{
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Expected O, but got Unknown
			//IL_0184: 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("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("bloodier 9mm", new List<string> { "rqm:abeline_kid_bbgun", "bloody_9mm" }, (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);
			AdvancedSynergyEntry val5 = CustomSynergies.Add("Big sting", new List<string> { "rqm:honey_cylinder", "bee_hive" }, (List<string>)null, true);
		}
	}
	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\nDespite being extremely tacky these glasses are still an improvement over nothing when put on junk";
			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();
		}
	}
	public class windmillrifle : GunBehaviour
	{
		public static int ID;

		public static void Add()
		{
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: 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_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0246: Unknown result type (might be due to invalid IL or missing references)
			Gun val = Databases.Items.NewGun("Windmill Rifle", "windmill_rifle");
			Game.Items.Rename("outdated_gun_mods:windmill_rifle", "rqm:windmillrifle");
			windmillrifle windmillrifle2 = ((Component)val).gameObject.AddComponent<windmillrifle>();
			GunExt.SetShortDescription((PickupObject)(object)val, "test");
			GunExt.SetLongDescription((PickupObject)(object)val, "test");
			GunExt.SetupSprite(val, (tk2dSpriteCollectionData)null, "windmill_rifle_idle_001", 10);
			GunTools.TrimGunSprites(val);
			GunExt.SetAnimationFPS(val, val.shootAnimation, 12);
			GunExt.SetAnimationFPS(val, val.reloadAnimation, 8);
			PickupObject byId = PickupObjectDatabase.GetById(56);
			GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId is Gun) ? byId : null), true, false);
			val.usesContinuousFireAnimation = true;
			((Component)val).GetComponent<tk2dSpriteAnimator>().GetClipByName(val.shootAnimation).wrapMode = (WrapMode)0;
			PickupObject byId2 = PickupObjectDatabase.GetById(5);
			GunExt.AddProjectileModuleFrom(val, (Gun)(object)((byId2 is Gun) ? byId2 : null), true, false);
			val.clipObject = ((Component)BreakableAPIToolbox.GenerateDebrisObject("TheRatPack/Resources/Debris/windmillrifle_debris", true, 0.33f, 2f, 540f, 180f, (tk2dSprite)null, 1f, (string)null, (GameObject)null, 0, false, (GoopDefinition)null, 1f)).gameObject;
			val.carryPixelOffset = new IntVector2(5, 0);
			val.clipsToLaunchOnReload = 1;
			val.reloadClipLaunchFrame = 5;
			val.shellsToLaunchOnFire = 1;
			val.shellCasingOnFireFrameDelay = 1;
			ref GameObject shellCasing = ref val.shellCasing;
			PickupObject byId3 = PickupObjectDatabase.GetById(5);
			shellCasing = ((Gun)((byId3 is Gun) ? byId3 : null)).shellCasing;
			val.shellsToLaunchOnReload = 0;
			val.DefaultModule.ammoCost = 1;
			val.DefaultModule.shootStyle = (ShootStyle)1;
			val.DefaultModule.sequenceStyle = (ProjectileSequenceStyle)0;
			val.reloadTime = 1.5f;
			val.DefaultModule.cooldownTime = 0.1f;
			val.DefaultModule.angleVariance = 12f;
			val.DefaultModule.numberOfShotsInClip = 40;
			((Component)val.barrelOffset).transform.localPosition = new Vector3(2.8125f, 0.75f, 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)(-100);
			Databases.Items.Add(val, (tk2dSpriteCollectionData)null, "ANY");
			ID = ((PickupObject)val).PickupObjectId;
		}
	}
}