Esempio n. 1
0
        // Token: 0x0600013F RID: 319 RVA: 0x0000D468 File Offset: 0x0000B668
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Cube Of Tungsten", "tungstencube");

            Game.Items.Rename("outdated_gun_mods:cube_of_tungsten", "bny:cube_of_tungsten");
            gun.gameObject.AddComponent <TungstenCube>();
            GunExt.SetShortDescription(gun, "THE CUBE");
            GunExt.SetLongDescription(gun, "A large cube of tungsten, perfect for chucking at your enemies!");
            GunExt.SetupSprite(gun, null, "tungstencube_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 20);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 3);
            GunExt.SetAnimationFPS(gun, gun.chargeAnimation, 7);
            GunExt.AddProjectileModuleFrom(gun, PickupObjectDatabase.GetById(8) as Gun, true, false);
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Charged;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 1.9f;
            gun.DefaultModule.cooldownTime              = 1f;
            gun.DefaultModule.numberOfShotsInClip       = 1;
            gun.DefaultModule.preventFiringDuringCharge = true;
            gun.SetBaseMaxAmmo(200);
            gun.quality = PickupObject.ItemQuality.C;
            gun.encounterTrackable.EncounterGuid = "THE CUBE THE CUBE THE CUBE THE CUBE THE CUBE THE CUBE THE CUBE THE CUBE THE CUBE THE CUBE THE CUBE THE CUBE THE CUBE THE CUBE THE CUBE THE CUBE THE CUBE THE CUBE THE CUBE THE CUBE THE CUBE THE CUBE THE CUBE THE CUBE THE CUBE ";
            ProjectileModule.ChargeProjectile item = new ProjectileModule.ChargeProjectile();
            gun.DefaultModule.chargeProjectiles = new List <ProjectileModule.ChargeProjectile>
            {
                item
            };
            gun.DefaultModule.chargeProjectiles[0].ChargeTime     = 0.9f;
            gun.DefaultModule.chargeProjectiles[0].UsedProperties = ((Gun)ETGMod.Databases.Items[8]).DefaultModule.chargeProjectiles[0].UsedProperties;
            gun.DefaultModule.chargeProjectiles[0].VfxPool        = ((Gun)ETGMod.Databases.Items[8]).DefaultModule.chargeProjectiles[0].VfxPool;
            gun.DefaultModule.chargeProjectiles[0].VfxPool.type   = ((Gun)ETGMod.Databases.Items[8]).DefaultModule.chargeProjectiles[0].VfxPool.type;
            ProjectileModule.ChargeProjectile chargeProjectile = gun.DefaultModule.chargeProjectiles[0];
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(((Gun)ETGMod.Databases.Items[8]).DefaultModule.chargeProjectiles[0].Projectile);

            chargeProjectile.Projectile = projectile;
            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).wrapMode  = tk2dSpriteAnimationClip.WrapMode.LoopSection;
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).loopStart = 3;
            projectile.transform.parent = gun.barrelOffset;
            projectile.baseData.damage  = 30f;
            projectile.baseData.range   = 50f;
            projectile.baseData.force   = 350f;
            projectile.shouldRotate     = true;
            BounceProjModifier bouncy = projectile.gameObject.AddComponent <BounceProjModifier>();

            bouncy.numberOfBounces = 0;
            PierceProjModifier spook = projectile.gameObject.AddComponent <PierceProjModifier>();

            spook.penetration = 1;
            projectile.SetProjectileSpriteRight("tungstencube_projectile_001", 17, 16, true, tk2dBaseSprite.Anchor.MiddleCenter, new int?(11), new int?(5), null, null, null);
            gun.AddToSubShop(ItemBuilder.ShopType.Trorc, 1f);
            gun.AddToSubShop(ItemBuilder.ShopType.Cursula, 1f);
            ETGMod.Databases.Items.Add(gun, null, "ANY");
        }
Esempio n. 2
0
        // Token: 0x0600013F RID: 319 RVA: 0x0000D468 File Offset: 0x0000B668
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Hammer Of The Moon", "lunarhammer");

            Game.Items.Rename("outdated_gun_mods:hammer_of_the_moon", "bny:hammer_of_the_moon");
            gun.gameObject.AddComponent <MithrixHammer>();
            GunExt.SetShortDescription(gun, "Commencement");
            GunExt.SetLongDescription(gun, "You're Gonna Need A Bigger Hammer.");
            GunExt.SetupSprite(gun, null, "lunarhammer_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 20);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 8);
            GunExt.SetAnimationFPS(gun, gun.chargeAnimation, 7);
            GunExt.AddProjectileModuleFrom(gun, PickupObjectDatabase.GetById(481) as Gun, true, false);
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Charged;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 3.5f;
            gun.DefaultModule.cooldownTime              = 1f;
            gun.carryPixelOffset                        = new IntVector2((int)-2f, (int)-1f);
            gun.DefaultModule.numberOfShotsInClip       = 1;
            gun.DefaultModule.preventFiringDuringCharge = true;
            gun.SetBaseMaxAmmo(40);
            gun.InfiniteAmmo = true;
            gun.quality      = PickupObject.ItemQuality.S;
            gun.encounterTrackable.EncounterGuid = "The Big Ukulele";
            ProjectileModule.ChargeProjectile item = new ProjectileModule.ChargeProjectile();
            gun.DefaultModule.chargeProjectiles = new List <ProjectileModule.ChargeProjectile>
            {
                item
            };
            gun.DefaultModule.chargeProjectiles[0].ChargeTime     = 1.25f;
            gun.DefaultModule.chargeProjectiles[0].UsedProperties = ((Gun)ETGMod.Databases.Items[481]).DefaultModule.chargeProjectiles[0].UsedProperties;
            gun.DefaultModule.chargeProjectiles[0].VfxPool        = ((Gun)ETGMod.Databases.Items[481]).DefaultModule.chargeProjectiles[0].VfxPool;
            gun.DefaultModule.chargeProjectiles[0].VfxPool.type   = ((Gun)ETGMod.Databases.Items[481]).DefaultModule.chargeProjectiles[0].VfxPool.type;
            MithRixOnReloadModifier mithRixOnReloadModifier = gun.gameObject.AddComponent <MithRixOnReloadModifier>();

            ProjectileModule.ChargeProjectile chargeProjectile = gun.DefaultModule.chargeProjectiles[0];
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(((Gun)ETGMod.Databases.Items[481]).DefaultModule.chargeProjectiles[0].Projectile);

            chargeProjectile.Projectile = projectile;
            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).wrapMode  = tk2dSpriteAnimationClip.WrapMode.LoopSection;
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).loopStart = 5;
            projectile.transform.parent = gun.barrelOffset;
            projectile.baseData.damage  = 0f;
            projectile.baseData.range   = 0f;
            projectile.baseData.force   = 350f;
            gun.AddToSubShop(ItemBuilder.ShopType.Trorc, 1f);
            gun.AddToSubShop(ItemBuilder.ShopType.Cursula, 1f);
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.EXAMPLE_BLUEPRINTBEETLEE, true);
            gun.AddItemToDougMetaShop(1000, null);
        }
Esempio n. 3
0
        // Token: 0x06000036 RID: 54 RVA: 0x000037D8 File Offset: 0x000019D8
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Matter Translocator", "mattertranslocator");

            Game.Items.Rename("outdated_gun_mods:matter_translocator", "bny:matter_translocator");
            gun.gameObject.AddComponent <MatterTranslocator>();
            GunExt.SetShortDescription(gun, "Tele-Tech");
            GunExt.SetLongDescription(gun, "The most stable and well-calibrated portable teleporter available for use. As with all things, it's weaponized.");
            GunExt.SetupSprite(gun, null, "mattertranslocator_idle_001", 11);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 15);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 12);
            GunExt.SetAnimationFPS(gun, gun.idleAnimation, 5);
            GunExt.AddProjectileModuleFrom(gun, "magnum", true, false);
            gun.barrelOffset.transform.localPosition = new Vector3(2.3125f, 0.625f, 0f);
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 3f;
            gun.DefaultModule.cooldownTime        = .1f;
            gun.DefaultModule.numberOfShotsInClip = 1;
            gun.SetBaseMaxAmmo(30);
            gun.quality = PickupObject.ItemQuality.A;
            gun.DefaultModule.angleVariance  = 0f;
            gun.DefaultModule.burstShotCount = 1;
            //gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.EXAMPLE_BLUEPRINTTRUCK, true);
            gun.AddItemToTrorcMetaShop(50, null);
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0]     = projectile;
            projectile.baseData.damage           = 60f;
            projectile.baseData.speed           *= .35f;
            projectile.AdditionalScaleMultiplier = 0.85f;
            projectile.shouldRotate          = true;
            projectile.pierceMinorBreakables = true;
            projectile.baseData.range        = 9f;
            projectile.SetProjectileSpriteRight("mattertranslocator_projectile_001", 22, 22, true, tk2dBaseSprite.Anchor.MiddleCenter, new int?(30), new int?(30), null, null, null);
            BounceProjModifier bouncy = projectile.gameObject.AddComponent <BounceProjModifier>();

            bouncy.numberOfBounces = 100;
            PierceProjModifier spook = projectile.gameObject.AddComponent <PierceProjModifier>();

            spook.penetration = 100;
            gun.encounterTrackable.EncounterGuid = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToSubShop(ItemBuilder.ShopType.Trorc, 1f);
            gun.AddToSubShop(ItemBuilder.ShopType.Goopton, 1f);
        }
Esempio n. 4
0
        // Token: 0x06000036 RID: 54 RVA: 0x000037D8 File Offset: 0x000019D8
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Reaver Claw", "reaverclaw");

            Game.Items.Rename("outdated_gun_mods:reaver_claw", "bny:reaver_claw");
            gun.gameObject.AddComponent <ReaverClaw>();
            GunExt.SetShortDescription(gun, "A Rifle Eventually Reloads");
            GunExt.SetLongDescription(gun, "The foot ripped from a Void Reaver. Though detached, it's powers still flow in from the Void.");
            GunExt.SetupSprite(gun, null, "reaverclaw_idle_001", 11);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 18);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 3);
            GunExt.SetAnimationFPS(gun, gun.idleAnimation, 4);
            GunExt.AddProjectileModuleFrom(gun, PickupObjectDatabase.GetById(35) as Gun, true, false);
            gun.gunSwitchGroup              = (PickupObjectDatabase.GetById(377) as Gun).gunSwitchGroup;
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Burst;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 2.3f;
            gun.DefaultModule.burstShotCount      = 2;
            gun.DefaultModule.burstCooldownTime   = 0.2f;
            gun.DefaultModule.cooldownTime        = .6f;
            gun.DefaultModule.numberOfShotsInClip = 4;
            gun.SetBaseMaxAmmo(120);
            gun.quality = PickupObject.ItemQuality.A;
            gun.DefaultModule.angleVariance      = 7f;
            gun.DefaultModule.burstShotCount     = 1;
            gun.encounterTrackable.EncounterGuid = "And don't you listen to the Song Of Life";
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            ReaveOnReloadModifier reaveonReloadModifier = gun.gameObject.AddComponent <ReaveOnReloadModifier>();

            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.damage       = 8f;
            projectile.baseData.speed        = 18f;
            projectile.baseData.range        = 8f;
            projectile.SetProjectileSpriteRight("reaverclaw_projectile_002", 10, 10, true, tk2dBaseSprite.Anchor.MiddleCenter, new int?(5), new int?(2), null, null, null);
            PierceProjModifier spook = projectile.gameObject.AddComponent <PierceProjModifier>();

            spook.penetration                = 1;
            projectile.baseData.force        = 0f;
            projectile.shouldRotate          = true;
            projectile.pierceMinorBreakables = true;
            projectile.transform.parent      = gun.barrelOffset;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToSubShop(ItemBuilder.ShopType.Goopton, 1f);
            gun.AddToSubShop(ItemBuilder.ShopType.Trorc, 1f);
        }
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Riot Gun", "riotgun");

            Game.Items.Rename("outdated_gun_mods:riot_gun", "nn:riot_gun");
            gun.gameObject.AddComponent <RiotGun>();
            gun.SetShortDescription("Definitely Humane");
            gun.SetLongDescription("Fires elastic rubber bullets." + "\n\nWhile rubber bullets are generally considered non-lethal, a more accurate term would be 'less-lethal'." + "\nThese bullets can still cause damage.");

            gun.SetupSprite(null, "riotgun_idle_001", 8);

            gun.SetAnimationFPS(gun.shootAnimation, 12);
            gun.SetAnimationFPS(gun.reloadAnimation, 1);
            gun.gunSwitchGroup = (PickupObjectDatabase.GetById(150) as Gun).gunSwitchGroup;

            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false);

            //GUN STATS
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Automatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 1f;
            gun.DefaultModule.cooldownTime           = 0.5f;
            gun.DefaultModule.numberOfShotsInClip    = 5;
            gun.barrelOffset.transform.localPosition = new Vector3(2.06f, 0.75f, 0f);
            gun.SetBaseMaxAmmo(200);
            gun.gunClass = GunClass.RIFLE;
            //BULLET STATS
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.damage       = 7f;
            projectile.baseData.force       *= 5f;
            projectile.baseData.speed       *= 1f;
            projectile.baseData.range       *= 1f;
            BounceProjModifier Bouncing = projectile.gameObject.GetOrAddComponent <BounceProjModifier>();

            Bouncing.numberOfBounces       = 1;
            projectile.AppliesStun         = true;
            projectile.StunApplyChance     = 0.2f;
            projectile.AppliedStunDuration = 2f;
            projectile.SetProjectileSpriteRight("riotgun_projectile", 12, 12, true, tk2dBaseSprite.Anchor.MiddleCenter, 10, 10);


            projectile.pierceMinorBreakables = true;
            gun.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("RiotGun Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/riotgun_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/riotgun_clipempty");

            gun.quality = PickupObject.ItemQuality.D;
            ETGMod.Databases.Items.Add(gun, null, "ANY");

            gun.AddToSubShop(ItemBuilder.ShopType.Trorc);

            RiotGunID = gun.PickupObjectId;
            gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.PURCHASED_RIOTGUN, true);
            gun.AddItemToTrorcMetaShop(10);
        }
Esempio n. 6
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Aerial Bombardment", "aerialbombardment");

            Game.Items.Rename("outdated_gun_mods:aerial_bombardment", "bny:aerial_bombardment");
            gun.gameObject.AddComponent <AerialBombardment>();
            gun.SetShortDescription("Unfortunate Gun");
            gun.SetLongDescription("A pocket device for calling in airstrikes. Pressing the button plays a cool riff!");
            gun.SetupSprite(null, "aerialbombardment_idle_001", 11);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 32);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 100);
            GunExt.SetAnimationFPS(gun, gun.idleAnimation, 2);
            for (int i = 0; i < 9; i++)
            {
                gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(38) as Gun, true, false);
            }
            foreach (ProjectileModule projectileModule in gun.Volley.projectiles)
            {
                projectileModule.ammoCost            = 1;
                projectileModule.shootStyle          = ProjectileModule.ShootStyle.SemiAutomatic;
                projectileModule.sequenceStyle       = ProjectileModule.ProjectileSequenceStyle.Random;
                projectileModule.cooldownTime        = 0.9f;
                projectileModule.angleVariance       = 45f;
                projectileModule.numberOfShotsInClip = 1;
                Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(projectileModule.projectiles[0]);
                projectile.gameObject.SetActive(false);
                PierceProjModifier pierce = projectile.gameObject.AddComponent <PierceProjModifier>();
                pierce.penetration          = 10;
                projectile.baseData.range   = (UnityEngine.Random.Range(3f, 9f));
                pierce.penetratesBreakables = true;
                projectile.baseData.damage  = 0;
                FakePrefab.MarkAsFakePrefab(projectile.gameObject);
                UnityEngine.Object.DontDestroyOnLoad(projectile);
                gun.DefaultModule.projectiles[0] = projectile;
                bool flag = projectileModule != gun.DefaultModule;
                if (flag)
                {
                    projectileModule.ammoCost = 0;
                }
                projectile.transform.parent = gun.barrelOffset;
            }
            gun.reloadTime = 1.2f;
            gun.SetBaseMaxAmmo(70);
            gun.AddToSubShop(ItemBuilder.ShopType.Trorc, 1f);
            // Here we just set the quality of the gun and the "EncounterGuid", which is used by Gungeon to identify the gun.
            gun.quality = PickupObject.ItemQuality.C;
            gun.encounterTrackable.EncounterGuid = "Cheer up Bunny ^ᴗ^";
            //thanks Hunter, i really needed that, i wish you the best, cause you da best o7

            //This block of code helps clone our projectile. Basically it makes it so things like Shadow Clone and Hip Holster keep the stats/sprite of your custom gun's projectiles.
            //This block of code helps clone our projectile. Basically it makes it so things like Shadow Clone and Hip Holster keep the stats/sprite of your custom gun's projectiles.
            //projectile.baseData allows you to modify the base properties of your projectile module.
            //In our case, our gun uses modified projectiles from the ak-47.
            //Setting static values for a custom gun's projectile stats prevents them from scaling with player stats and bullet modifiers (damage, shotspeed, knockback)
            //You have to multiply the value of the original projectile you're using instead so they scale accordingly. For example if the projectile you're using as a base has 10 damage and you want it to be 6 you use this
            //In our case, our projectile has a base damage of 5.5, so we multiply it by 1.1 so it does 10% more damage from the ak-47.
            //This determines what sprite you want your projectile to use. Note this isn't necessary if you don't want to have a custom projectile sprite.
            //The x and y values determine the size of your custom projectile
            ETGMod.Databases.Items.Add(gun, null, "ANY");
        }
Esempio n. 7
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Grenade Shotgun", "grenadeshotgun");

            Game.Items.Rename("outdated_gun_mods:grenade_shotgun", "nn:grenade_shotgun");
            gun.gameObject.AddComponent <GrenadeShotgun>();
            gun.SetShortDescription("Sit Down");
            gun.SetLongDescription("The product of combining two of the most entertaining classes of weaponry- Shotguns, and the ones that explode.");

            gun.SetupSprite(null, "grenadeshotgun_idle_001", 8);

            gun.SetAnimationFPS(gun.shootAnimation, 13);

            for (int i = 0; i < 4; i++)
            {
                gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(19) as Gun, true, false);
            }

            //GUN STATS
            foreach (ProjectileModule mod in gun.Volley.projectiles)
            {
                mod.ammoCost            = 1;
                mod.shootStyle          = ProjectileModule.ShootStyle.SemiAutomatic;
                mod.sequenceStyle       = ProjectileModule.ProjectileSequenceStyle.Random;
                mod.cooldownTime        = 1f;
                mod.angleVariance       = 15f;
                mod.numberOfShotsInClip = 1;
                Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(mod.projectiles[0]);
                mod.projectiles[0] = projectile;
                projectile.gameObject.SetActive(false);
                FakePrefab.MarkAsFakePrefab(projectile.gameObject);
                UnityEngine.Object.DontDestroyOnLoad(projectile);
                projectile.baseData.range = 7;
                BounceProjModifier Bouncing = projectile.gameObject.GetOrAddComponent <BounceProjModifier>();
                Bouncing.numberOfBounces = 1;
                if (mod != gun.DefaultModule)
                {
                    mod.ammoCost = 0;
                }
                projectile.transform.parent = gun.barrelOffset;
            }

            gun.reloadTime = 2f;
            gun.barrelOffset.transform.localPosition = new Vector3(2.18f, 0.68f, 0f);
            gun.SetBaseMaxAmmo(40);
            gun.gunClass           = GunClass.EXPLOSIVE;
            gun.gunSwitchGroup     = (PickupObjectDatabase.GetById(150) as Gun).gunSwitchGroup;
            gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(37) as Gun).muzzleFlashEffects;

            gun.quality = PickupObject.ItemQuality.A;
            ETGMod.Databases.Items.Add(gun, null, "ANY");

            gun.Volley.UsesShotgunStyleVelocityRandomizer = true;
            gun.AddToSubShop(ItemBuilder.ShopType.Trorc);

            GrenadeShotgunID = gun.PickupObjectId;
            gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.PURCHASED_GRENADESHOTGUN, true);
            gun.AddItemToTrorcMetaShop(40);
        }
Esempio n. 8
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Bazooka", "bazooka");

            Game.Items.Rename("outdated_gun_mods:bazooka", "nn:bazooka");
            gun.gameObject.AddComponent <NNBazooka>();
            gun.SetShortDescription("Boom Boom Boom Boom");
            gun.SetLongDescription("It takes a lunatic to be a legend." + "\n\nThis powerful explosive weapon has one major drawback; it is capable of damaging it's bearer. You'd think more bombs would do that, but the Gungeon forgives.");

            gun.SetupSprite(null, "bazooka_idle_001", 8);

            gun.SetAnimationFPS(gun.shootAnimation, 12);

            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(39) as Gun, true, false);

            //GUN STATS
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 4f;
            gun.DefaultModule.cooldownTime           = 2f;
            gun.muzzleFlashEffects.type              = VFXPoolType.None;
            gun.DefaultModule.numberOfShotsInClip    = 3;
            gun.barrelOffset.transform.localPosition = new Vector3(2.5f, 0.68f, 0f);
            gun.SetBaseMaxAmmo(100);
            gun.gunClass = GunClass.EXPLOSIVE;
            //BULLET STATS
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.damage      *= 3f;
            projectile.baseData.speed       *= 1.2f;
            projectile.ignoreDamageCaps      = true;
            projectile.pierceMinorBreakables = true;

            if (projectile.GetComponent <ExplosiveModifier>())
            {
                Destroy(projectile.GetComponent <ExplosiveModifier>());
            }
            FuckingExplodeYouCunt explosiveModifier = projectile.gameObject.AddComponent <FuckingExplodeYouCunt>();

            projectile.SetProjectileSpriteRight("bazooka_projectile", 26, 7, false, tk2dBaseSprite.Anchor.MiddleCenter, 26, 7);

            projectile.transform.parent = gun.barrelOffset;

            // Here we just set the quality of the gun and the "EncounterGuid", which is used by Gungeon to identify the gun.
            gun.quality = PickupObject.ItemQuality.B;
            gun.encounterTrackable.EncounterGuid = "this is the Bazooka";
            ETGMod.Databases.Items.Add(gun, null, "ANY");

            gun.AddToSubShop(ItemBuilder.ShopType.Trorc);
            BazookaID = gun.PickupObjectId;

            gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.PURCHASED_BAZOOKA, true);
            gun.AddItemToTrorcMetaShop(20);
        }
Esempio n. 9
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Glooper", "glooper");

            Game.Items.Rename("outdated_gun_mods:glooper", "nn:glooper");
            gun.gameObject.AddComponent <Glooper>();
            gun.SetShortDescription("Slippery");
            gun.SetLongDescription("Made of strange soapy goo, this weapon slips out of your hands when reloaded.");

            gun.SetupSprite(null, "glooper_idle_001", 8);
            gun.gunSwitchGroup = (PickupObjectDatabase.GetById(599) as Gun).gunSwitchGroup;

            gun.SetAnimationFPS(gun.shootAnimation, 12);

            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false);

            //GUN STATS
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 0f;
            gun.DefaultModule.angleVariance          = 12;
            gun.DefaultModule.cooldownTime           = 0.2f;
            gun.DefaultModule.numberOfShotsInClip    = 10;
            gun.muzzleFlashEffects.type              = VFXPoolType.None;
            gun.barrelOffset.transform.localPosition = new Vector3(1.06f, 0.93f, 0f);
            gun.SetBaseMaxAmmo(200);
            gun.ammo     = 200;
            gun.gunClass = GunClass.SHITTY;
            //BULLET STATS
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            projectile.baseData.damage = 10f;
            projectile.baseData.speed *= 1f;
            projectile.baseData.range *= 1f;
            projectile.baseData.force *= 2.5f;

            projectile.AnimateProjectile(new List <string> {
                "glooperproj_1",
                "glooperproj_2",
                "glooperproj_1",
                "glooperproj_3",
            }, 8, true, new List <IntVector2> {
                new IntVector2(7, 7), //1
                new IntVector2(5, 9), //2
                new IntVector2(7, 7), //3
                new IntVector2(9, 5), //4
            }, AnimateBullet.ConstructListOfSameValues(false, 4), AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 4), AnimateBullet.ConstructListOfSameValues(true, 4), AnimateBullet.ConstructListOfSameValues(false, 4),
                                         AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 4), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 4), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 4), AnimateBullet.ConstructListOfSameValues <Projectile>(null, 4));
            gun.DefaultModule.projectiles[0] = projectile;

            gun.quality = PickupObject.ItemQuality.D;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            GlooperID = gun.PickupObjectId;
            gun.AddToSubShop(ItemBuilder.ShopType.Goopton);
        }
Esempio n. 10
0
        // Token: 0x06000036 RID: 54 RVA: 0x000037D8 File Offset: 0x000019D8
        public static void Add()
        {
            Gun flakcannon = ETGMod.Databases.Items.NewGun("Reaver Heart", "reaverheart");

            Game.Items.Rename("outdated_gun_mods:reaver_heart", "bny:reaver_heart");
            flakcannon.gameObject.AddComponent <ReaverHeart>();
            GunExt.SetShortDescription(flakcannon, "A Glacier Eventually...");
            GunExt.SetLongDescription(flakcannon, "The still-beating heart of a Void Reaver, an ancient guardian of a time-looping planet. It slowly pulsates with energy funneled straight from the Void.");
            GunExt.SetupSprite(flakcannon, null, "reaverheart_idle_001", 11);
            GunExt.SetAnimationFPS(flakcannon, flakcannon.shootAnimation, 35);
            GunExt.SetAnimationFPS(flakcannon, flakcannon.reloadAnimation, 1);
            GunExt.SetAnimationFPS(flakcannon, flakcannon.idleAnimation, 2);
            GunExt.AddProjectileModuleFrom(flakcannon, PickupObjectDatabase.GetById(223) as Gun, true, false);
            flakcannon.DefaultModule.ammoCost      = 1;
            flakcannon.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            flakcannon.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            flakcannon.reloadTime = 2f;
            flakcannon.barrelOffset.transform.localPosition = new Vector3(.375f, 0.375f, 0f);
            flakcannon.DefaultModule.cooldownTime           = 1.1f;
            flakcannon.DefaultModule.numberOfShotsInClip    = 5;
            flakcannon.SetBaseMaxAmmo(200);
            flakcannon.quality = PickupObject.ItemQuality.C;
            flakcannon.DefaultModule.angleVariance  = 0f;
            flakcannon.DefaultModule.burstShotCount = 1;
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(flakcannon.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            flakcannon.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.damage          *= 3f;
            projectile.baseData.speed           *= 0.1f;
            projectile.AdditionalScaleMultiplier = 0.1f;
            projectile.shouldRotate            = true;
            projectile.pierceMinorBreakables   = true;
            projectile.baseData.range          = 0.01f;
            projectile.sprite.renderer.enabled = false;
            ExplosiveModifier explosiveModifier = projectile.gameObject.AddComponent <ExplosiveModifier>();

            explosiveModifier.doExplosion               = true;
            explosiveModifier.explosionData             = ReaverHeart.ReaverExplosion;
            flakcannon.encounterTrackable.EncounterGuid = "Void reavers be like 'waaaaaaAAAAAAAAAAAAAA- BWOOM WAUU WAUU'";
            ETGMod.Databases.Items.Add(flakcannon, null, "ANY");
            flakcannon.AddToSubShop(ItemBuilder.ShopType.Goopton, 1f);
            flakcannon.AddToSubShop(ItemBuilder.ShopType.OldRed, 1f);
        }
Esempio n. 11
0
        // Token: 0x06000036 RID: 54 RVA: 0x000037D8 File Offset: 0x000019D8
        public static void Add()
        {
            Gun trollmimic = ETGMod.Databases.Items.NewGun("Soul Stealer", "soulstealer");

            Game.Items.Rename("outdated_gun_mods:soul_stealer", "bny:soul_stealer");
            trollmimic.gameObject.AddComponent <SoulStealer>();
            GunExt.SetShortDescription(trollmimic, "S u c c");
            GunExt.SetLongDescription(trollmimic, "Although very weak, it has the ability to suck the souls of those it slays.");
            GunExt.SetupSprite(trollmimic, null, "soulstealer_idle_001", 11);
            GunExt.SetAnimationFPS(trollmimic, trollmimic.shootAnimation, 36);
            GunExt.SetAnimationFPS(trollmimic, trollmimic.reloadAnimation, 14);
            GunExt.SetAnimationFPS(trollmimic, trollmimic.idleAnimation, 8);
            GunExt.AddProjectileModuleFrom(trollmimic, PickupObjectDatabase.GetById(56) as Gun, true, false);
            trollmimic.gunSwitchGroup = (PickupObjectDatabase.GetById(336) as Gun).gunSwitchGroup;
            trollmimic.barrelOffset.transform.localPosition = new Vector3(2f, 0.375f, 0f);
            trollmimic.DefaultModule.ammoCost      = 1;
            trollmimic.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Automatic;
            trollmimic.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            trollmimic.reloadTime = 1.5f;
            trollmimic.DefaultModule.cooldownTime        = .1f;
            trollmimic.DefaultModule.numberOfShotsInClip = 100;
            trollmimic.SetBaseMaxAmmo(300);
            trollmimic.quality = PickupObject.ItemQuality.A;
            trollmimic.DefaultModule.angleVariance      = 2f;
            trollmimic.DefaultModule.burstShotCount     = 1;
            trollmimic.encounterTrackable.EncounterGuid = "bonk";
            trollmimic.muzzleFlashEffects = (PickupObjectDatabase.GetById(223) as Gun).muzzleFlashEffects;
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(trollmimic.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            trollmimic.DefaultModule.projectiles[0] = projectile;
            projectile.DefaultTintColor             = new Color(0f, 0f, 10f).WithAlpha(0.5f);
            projectile.HasDefaultTint            = true;
            projectile.baseData.damage           = 2.5f;
            projectile.baseData.speed           *= 1.25f;
            projectile.AdditionalScaleMultiplier = 1.1f;
            projectile.pierceMinorBreakables     = true;
            projectile.shouldRotate     = true;
            projectile.transform.parent = trollmimic.barrelOffset;
            projectile.SetProjectileSpriteRight("soulstealer_projectile_001", 18, 9, true, tk2dBaseSprite.Anchor.MiddleCenter, new int?(9), new int?(5), null, null, null);
            ETGMod.Databases.Items.Add(trollmimic, null, "ANY");
            trollmimic.AddToSubShop(ItemBuilder.ShopType.Goopton, 1f);
            trollmimic.AddToSubShop(ItemBuilder.ShopType.Cursula, 1f);
        }
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Heavy Assault Rifle", "heavyassaultrifle");

            Game.Items.Rename("outdated_gun_mods:heavy_assault_rifle", "nn:heavy_assault_rifle");
            gun.gameObject.AddComponent <HeavyAssaultRifle>();
            gun.SetShortDescription("It's so big...");
            gun.SetLongDescription("An oversized assault rifle from the FUTURE... which by now has already become the past.");

            gun.gunSwitchGroup = (PickupObjectDatabase.GetById(81) as Gun).gunSwitchGroup;

            gun.SetupSprite(null, "heavyassaultrifle_idle_001", 8);

            gun.SetAnimationFPS(gun.shootAnimation, 15);

            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false);

            //GUN STATS
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Automatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 2.5f;
            gun.DefaultModule.cooldownTime           = 0.11f;
            gun.DefaultModule.numberOfShotsInClip    = 40;
            gun.barrelOffset.transform.localPosition = new Vector3(4.18f, 0.87f, 0f);
            gun.SetBaseMaxAmmo(250);
            gun.gunClass = GunClass.FULLAUTO;
            //BULLET STATS
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);

            projectile.baseData.damage *= 6f;
            projectile.SetProjectileSpriteRight("heavyassaultrifle_projectile", 22, 7, false, tk2dBaseSprite.Anchor.MiddleCenter, 22, 7);

            projectile.transform.parent = gun.barrelOffset;
            PierceProjModifier orAddComponent = projectile.gameObject.GetOrAddComponent <PierceProjModifier>();

            orAddComponent.penetratesBreakables = true;
            orAddComponent.penetration          = 5;

            gun.AddCurrentGunStatModifier(PlayerStats.StatType.MovementSpeed, 0.8f, StatModifier.ModifyMethod.MULTIPLICATIVE);
            gun.AddCurrentGunStatModifier(PlayerStats.StatType.DodgeRollSpeedMultiplier, 0.8f, StatModifier.ModifyMethod.MULTIPLICATIVE);

            gun.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("HeavyAssaultRifle Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/heavyassaultrifle_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/heavyassaultrifle_clipempty");

            gun.DefaultModule.projectiles[0] = projectile;
            gun.quality = PickupObject.ItemQuality.S;
            gun.encounterTrackable.EncounterGuid = "this is the Heavy Assault Rifle";
            ETGMod.Databases.Items.Add(gun, null, "ANY");

            HeavyAssaultRifleID = gun.PickupObjectId;

            gun.AddToSubShop(ItemBuilder.ShopType.Trorc);
        }
Esempio n. 13
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Spiral", "spiral");

            Game.Items.Rename("outdated_gun_mods:spiral", "nn:spiral");
            gun.gameObject.AddComponent <Spiral>();
            gun.SetShortDescription("Come Join Me...");
            gun.SetLongDescription("Forever. Inescapable. Beautiful." + "\n\nAll will become a part of the Spiral.");

            gun.SetupSprite(null, "spiral_idle_001", 16);

            gun.SetAnimationFPS(gun.shootAnimation, 30);

            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false);

            //GUN STATS
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 2f;
            gun.DefaultModule.cooldownTime           = 1f;
            gun.DefaultModule.numberOfShotsInClip    = 1;
            gun.barrelOffset.transform.localPosition = new Vector3(1.12f, 0.62f, 0f);
            gun.SetBaseMaxAmmo(150);
            gun.gunClass = GunClass.SILLY;
            //SUBBULLET
            Projectile swirly = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(56) as Gun).DefaultModule.projectiles[0]);

            swirly.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(swirly.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(swirly);
            swirlyProj = swirly;

            //BULLET STATS
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.damage      *= 5f;
            projectile.baseData.speed       *= 0.1f;
            projectile.pierceMinorBreakables = true;
            SpiralHandler spiralBehaviour = projectile.gameObject.AddComponent <SpiralHandler>();

            spiralBehaviour.projectileToSpawn = swirlyProj;
            projectile.SetProjectileSpriteRight("spiral_projectile", 15, 15, true, tk2dBaseSprite.Anchor.MiddleCenter, 14, 14);

            projectile.transform.parent = gun.barrelOffset;

            gun.quality = PickupObject.ItemQuality.A;
            ETGMod.Databases.Items.Add(gun, null, "ANY");

            gun.AddToSubShop(ItemBuilder.ShopType.Cursula);
            SpiralID = gun.PickupObjectId;
            gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.PURCHASED_SPIRAL, true);
        }
Esempio n. 14
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Uzi SPINE-mm", "uzispinemm");

            Game.Items.Rename("outdated_gun_mods:uzi_spine-mm", "nn:uzi_spine_mm");
            var behav = gun.gameObject.AddComponent <UziSpineMM>();

            gun.SetShortDescription("Boned");
            gun.SetLongDescription("The favoured sidearm of the dark sorcerer Nuign, and his first foray into the apocryphal field of necro-gunsmithing.");

            gun.SetupSprite(null, "uzispinemm_idle_001", 8);

            gun.SetAnimationFPS(gun.shootAnimation, 12);
            gun.gunSwitchGroup = (PickupObjectDatabase.GetById(29) as Gun).gunSwitchGroup;

            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false);

            //GUN STATS
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Automatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 0.8f;
            gun.DefaultModule.cooldownTime           = 0.11f;
            gun.muzzleFlashEffects                   = (PickupObjectDatabase.GetById(29) as Gun).muzzleFlashEffects;
            gun.DefaultModule.numberOfShotsInClip    = 20;
            gun.barrelOffset.transform.localPosition = new Vector3((19f / 16f), (9f / 16f), 0f);
            gun.SetBaseMaxAmmo(600);
            gun.gunClass = GunClass.FULLAUTO;

            //BULLET STATS
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0]             = projectile;
            projectile.baseData.damage                   = 3f;
            projectile.baseData.range                    = 15f;
            projectile.hitEffects.alwaysUseMidair        = true;
            projectile.hitEffects.overrideMidairDeathVFX = EasyVFXDatabase.SmoothLightBlueLaserCircleVFX;

            HomingModifier homing = projectile.gameObject.AddComponent <HomingModifier>();

            homing.AngularVelocity = 40f;
            homing.HomingRadius    = 50f;

            projectile.SetProjectileSpriteRight("uzispinemm_proj", 8, 11, false, tk2dBaseSprite.Anchor.MiddleCenter, 8, 7);

            gun.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("UziSpineMM Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/uzispinemm_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/uzispinemm_clipempty");

            gun.quality = PickupObject.ItemQuality.C;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToSubShop(ItemBuilder.ShopType.Cursula);

            ID = gun.PickupObjectId;
        }
Esempio n. 15
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("St4ke", "st4ke");

            Game.Items.Rename("outdated_gun_mods:st4ke", "nn:st4ke");
            gun.gameObject.AddComponent <St4ke>();
            gun.SetShortDescription("For Robot Vampires");
            gun.SetLongDescription("Fires miniature tesla coils that stick into walls." + "\n\nFollowing the success of her remote diote transmitter experiment, the tinker set about seeing if she could make both ends of the tesla-relay mobile.");

            gun.SetupSprite(null, "st4ke_idle_001", 8);

            gun.SetAnimationFPS(gun.shootAnimation, 17);

            gun.gunSwitchGroup = (PickupObjectDatabase.GetById(153) as Gun).gunSwitchGroup;

            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false);

            //GUN STATS
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 1f;
            gun.DefaultModule.cooldownTime           = 0.15f;
            gun.DefaultModule.numberOfShotsInClip    = 4;
            gun.barrelOffset.transform.localPosition = new Vector3(1.68f, 0.62f, 0f);
            gun.SetBaseMaxAmmo(175);
            gun.gunSwitchGroup = (PickupObjectDatabase.GetById(153) as Gun).gunSwitchGroup;
            gun.ammo           = 175;
            gun.gunClass       = GunClass.PISTOL;
            //BULLET STATS
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.damage       = 8f;
            projectile.pierceMinorBreakables = true;
            projectile.SetProjectileSpriteRight("st4keproj", 13, 7, true, tk2dBaseSprite.Anchor.MiddleCenter, 9, 5);
            St4keProj          orAddComponent = projectile.gameObject.GetOrAddComponent <St4keProj>();
            PierceProjModifier piercing       = projectile.gameObject.GetOrAddComponent <PierceProjModifier>();

            piercing.penetration++;

            gun.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Stk4ke Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/st4ke_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/st4ke_clipempty");

            gun.quality = PickupObject.ItemQuality.A;
            ETGMod.Databases.Items.Add(gun, null, "ANY");

            St4keID = gun.PickupObjectId;
            gun.AddToSubShop(ItemBuilder.ShopType.Trorc);

            LinkVFXPrefab = FakePrefab.Clone(Game.Items["shock_rounds"].GetComponent <ComplexProjectileModifier>().ChainLightningVFX);
            FakePrefab.MarkAsFakePrefab(LinkVFXPrefab);
            UnityEngine.Object.DontDestroyOnLoad(LinkVFXPrefab);
        }
Esempio n. 16
0
        // Token: 0x06000036 RID: 54 RVA: 0x000037D8 File Offset: 0x000019D8
        public static void Add()
        {
            Gun chaosgun = ETGMod.Databases.Items.NewGun("Chaos Revolver", "chaosrevolver");

            Game.Items.Rename("outdated_gun_mods:chaos_revolver", "bny:chaos_revolver");
            chaosgun.gameObject.AddComponent <ChaosRevolver>();
            GunExt.SetShortDescription(chaosgun, "Predictable Gun");
            GunExt.SetLongDescription(chaosgun, "A legendary gun that was pulled apart because it was thought to speak ancient secrets.\n\nSome say if one is able to assemble it back together, they will have a weapon of immeasurable power on their hands.");
            GunExt.SetupSprite(chaosgun, null, "chaosrevolver_idle_001", 25);
            GunExt.SetAnimationFPS(chaosgun, chaosgun.shootAnimation, 14);
            GunExt.SetAnimationFPS(chaosgun, chaosgun.reloadAnimation, 8);
            GunExt.SetAnimationFPS(chaosgun, chaosgun.idleAnimation, 5);
            GunExt.AddProjectileModuleFrom(chaosgun, "ak-47", true, false);
            chaosgun.DefaultModule.ammoCost      = 1;
            chaosgun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            chaosgun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            chaosgun.reloadTime = 1.8f;
            chaosgun.DefaultModule.cooldownTime        = .2f;
            chaosgun.DefaultModule.numberOfShotsInClip = 6;
            chaosgun.SetBaseMaxAmmo(150);
            chaosgun.quality = PickupObject.ItemQuality.A;
            chaosgun.DefaultModule.angleVariance      = 15f;
            chaosgun.DefaultModule.burstShotCount     = 1;
            chaosgun.encounterTrackable.EncounterGuid = "chaosgun";
            chaosgun.AddToSubShop(ItemBuilder.ShopType.Cursula, 1f);
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(chaosgun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            chaosgun.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.damage            = 25f;
            projectile.baseData.speed            *= 1.1f;
            projectile.transform.parent           = chaosgun.barrelOffset;
            PierceProjModifier spook = projectile.gameObject.AddComponent <PierceProjModifier>();

            spook.penetration = 4;
            projectile.SetProjectileSpriteRight("chaosrevolver_projectile_001", 10, 10, true, tk2dBaseSprite.Anchor.MiddleCenter, new int?(7), new int?(7), null, null, null);
            ETGMod.Databases.Items.Add(chaosgun, null, "ANY");
            ChaosRevolver.ChaosRevolverID = chaosgun.PickupObjectId;
            chaosgun.AddToSubShop(ItemBuilder.ShopType.Cursula, 1f);
        }
Esempio n. 17
0
        public static void Add()
        {
            Gun boomrevolver = ETGMod.Databases.Items.NewGun("Time-Zoner", "timezoner");

            Game.Items.Rename("outdated_gun_mods:time-zoner", "bny:time-zoner");
            boomrevolver.gameObject.AddComponent <TimeZoner>();
            GunExt.SetShortDescription(boomrevolver, "Time travel, Yeah!");
            GunExt.SetLongDescription(boomrevolver, "A test-version revolver made for spies to adapt to sudden time-zone switches. On its first experiment, it slipped through a crack in time and ended up here.");
            GunExt.SetupSprite(boomrevolver, null, "timezoner_idle_001", 19);
            GunExt.SetAnimationFPS(boomrevolver, boomrevolver.shootAnimation, 24);
            GunExt.SetAnimationFPS(boomrevolver, boomrevolver.reloadAnimation, 10);
            GunExt.SetAnimationFPS(boomrevolver, boomrevolver.idleAnimation, 5);
            GunExt.AddProjectileModuleFrom(boomrevolver, "magnum", true, false);
            boomrevolver.gunSwitchGroup              = (PickupObjectDatabase.GetById(577) as Gun).gunSwitchGroup;
            boomrevolver.DefaultModule.ammoCost      = 1;
            boomrevolver.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            boomrevolver.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            boomrevolver.reloadTime = 2.2f;
            boomrevolver.DefaultModule.cooldownTime        = .2f;
            boomrevolver.DefaultModule.numberOfShotsInClip = 20;
            boomrevolver.SetBaseMaxAmmo(400);
            boomrevolver.quality = PickupObject.ItemQuality.C;
            boomrevolver.DefaultModule.angleVariance      = 3f;
            boomrevolver.encounterTrackable.EncounterGuid = "ZA WARUDO *BFPPFPFPFPFPFPFPFPFPFPFPFPT T TT T T *";
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(boomrevolver.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            projectile.SetProjectileSpriteRight("timezoner_projectile_001", 11, 5, true, tk2dBaseSprite.Anchor.MiddleCenter, new int?(5), new int?(2), null, null, null);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            boomrevolver.DefaultModule.projectiles[0] = projectile;
            projectile.shouldRotate              = true;
            projectile.baseData.damage           = 7f;
            projectile.baseData.speed           *= 1.2f;
            projectile.AdditionalScaleMultiplier = 1.2f;
            projectile.transform.parent          = boomrevolver.barrelOffset;
            ETGMod.Databases.Items.Add(boomrevolver, null, "ANY");
            boomrevolver.AddToSubShop(ItemBuilder.ShopType.Goopton, 1f);
            boomrevolver.AddToSubShop(ItemBuilder.ShopType.Trorc, 1f);
            boomrevolver.SetupUnlockOnCustomFlag(CustomDungeonFlags.ZONER_TRORC_FLAG, true);
            boomrevolver.AddItemToTrorcMetaShop(18, null);
        }
Esempio n. 18
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Antimateriel Rifle", "antimaterielrifle");

            Game.Items.Rename("outdated_gun_mods:antimateriel_rifle", "nn:antimateriel_rifle");
            gun.gameObject.AddComponent <AntimaterielRifle>();
            gun.SetShortDescription("Shreddin' Vapours");
            gun.SetLongDescription("Used in rebel attacks on remote Hegemony of Man outposts, this high-tech tool of destruction is geared to take out heavy targets." + "\n\nIgnores boss DPS cap.");

            gun.SetupSprite(null, "antimaterielrifle_idle_001", 8);

            gun.SetAnimationFPS(gun.shootAnimation, 15);

            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false);
            gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(334) as Gun).muzzleFlashEffects;

            //GUN STATS
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Automatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 2f;
            gun.DefaultModule.cooldownTime           = 0.04f;
            gun.muzzleFlashEffects.type              = VFXPoolType.None;
            gun.DefaultModule.numberOfShotsInClip    = 55;
            gun.barrelOffset.transform.localPosition = new Vector3(2.75f, 0.56f, 0f);
            gun.SetBaseMaxAmmo(720);
            gun.gunClass = GunClass.FULLAUTO;
            //BULLET STATS
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.damage      *= 1f;
            projectile.baseData.speed       *= 1.2f;
            projectile.ignoreDamageCaps      = true;
            projectile.pierceMinorBreakables = true;
            PierceProjModifier orAddComponent = projectile.gameObject.GetOrAddComponent <PierceProjModifier>();

            orAddComponent.penetratesBreakables = true;
            orAddComponent.penetration++;
            projectile.SetProjectileSpriteRight("antimaterielrifle_projectile", 15, 7, true, tk2dBaseSprite.Anchor.MiddleCenter, 15, 7);

            gun.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = "Thinline Bullets";

            gun.quality = PickupObject.ItemQuality.S;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToSubShop(ItemBuilder.ShopType.Trorc);
            AntimaterielRifleID = gun.PickupObjectId;
            gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.PURCHASED_ANTIMATERIELRIFLE, true);
            gun.AddItemToTrorcMetaShop(28);
        }
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Beastclaw", "beastclaw");

            Game.Items.Rename("outdated_gun_mods:beastclaw", "nn:beastclaw");
            gun.gameObject.AddComponent <Beastclaw>();
            gun.SetShortDescription("Out of Place");
            gun.SetLongDescription("The weaponised claw of a mighty Misfire Beast." + "\n\nRumour has it that infamous big game hunter Emmitt Calx had one of the beasts as a tame pet and lap cat.");

            gun.SetupSprite(null, "beastclaw_idle_001", 8);

            gun.SetAnimationFPS(gun.shootAnimation, 12);
            gun.SetAnimationFPS(gun.reloadAnimation, 1);

            gun.muzzleFlashEffects.type = VFXPoolType.None;

            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false);

            //GUN STATS
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Automatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 1f;
            gun.DefaultModule.cooldownTime           = 0.05f;
            gun.DefaultModule.angleVariance          = 20f;
            gun.DefaultModule.numberOfShotsInClip    = 100;
            gun.barrelOffset.transform.localPosition = new Vector3(0.93f, 0.37f, 0f);
            gun.SetBaseMaxAmmo(1500);
            gun.ammo     = 1500;
            gun.gunClass = GunClass.SILLY;


            //BULLET STATS
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.damage      *= 0.8f;
            projectile.baseData.speed       *= 1f;
            projectile.baseData.range       *= 1f;
            projectile.SetProjectileSpriteRight("enemystyle_projectile", 10, 10, true, tk2dBaseSprite.Anchor.MiddleCenter, 8, 8);
            InstantTeleportToPlayerCursorBehav tp = projectile.gameObject.GetOrAddComponent <InstantTeleportToPlayerCursorBehav>();


            gun.quality = PickupObject.ItemQuality.A;
            ETGMod.Databases.Items.Add(gun, null, "ANY");

            gun.AddToSubShop(ItemBuilder.ShopType.Cursula);

            BeastclawID = gun.PickupObjectId;
            gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.MISFIREBEAST_QUEST_REWARDED, true);
        }
Esempio n. 20
0
        // Token: 0x06000036 RID: 54 RVA: 0x000037D8 File Offset: 0x000019D8
        public static void Add()
        {
            Gun chaoshand = ETGMod.Databases.Items.NewGun("Hand Of ChaosGod", "chaoshand");

            Game.Items.Rename("outdated_gun_mods:hand_of_chaosgod", "bny:hand_of_chaosgod");
            chaoshand.gameObject.AddComponent <ChaosHand>();
            GunExt.SetShortDescription(chaoshand, "Soul Puller");
            GunExt.SetLongDescription(chaoshand, "The replica hand of the ChaosGod, with just as much soul-tearing power.");
            GunExt.SetupSprite(chaoshand, null, "chaoshand_idle_001", 11);
            GunExt.SetAnimationFPS(chaoshand, chaoshand.shootAnimation, 15);
            GunExt.SetAnimationFPS(chaoshand, chaoshand.reloadAnimation, 12);
            GunExt.SetAnimationFPS(chaoshand, chaoshand.idleAnimation, 4);
            GunExt.AddProjectileModuleFrom(chaoshand, PickupObjectDatabase.GetById(223) as Gun, true, false);
            chaoshand.gunHandedness               = GunHandedness.HiddenOneHanded;
            chaoshand.DefaultModule.ammoCost      = 1;
            chaoshand.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            chaoshand.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            chaoshand.reloadTime = 1.8f;
            chaoshand.DefaultModule.cooldownTime        = .4f;
            chaoshand.DefaultModule.numberOfShotsInClip = 5;
            chaoshand.SetBaseMaxAmmo(60);
            chaoshand.quality = PickupObject.ItemQuality.A;
            chaoshand.DefaultModule.angleVariance  = 10f;
            chaoshand.DefaultModule.burstShotCount = 1;
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(chaoshand.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            chaoshand.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.damage             = 25f;
            projectile.baseData.speed           *= 1.5f;
            projectile.AdditionalScaleMultiplier = 1f;
            projectile.shouldRotate                    = true;
            projectile.pierceMinorBreakables           = true;
            projectile.baseData.range                  = .1f;
            chaoshand.encounterTrackable.EncounterGuid = "iuhxzdcuhdxzsuaadassadsasaassdasasasdsdsdahuzashduzlkmkj,lmkjolkjmkijnkjnhdjnhhkjashduhsaduahusai";
            ETGMod.Databases.Items.Add(chaoshand, null, "ANY");
            chaoshand.AddToSubShop(ItemBuilder.ShopType.Cursula, 1f);
            chaoshand.AddToSubShop(ItemBuilder.ShopType.Goopton, 1f);
        }
Esempio n. 21
0
        public static void Add()
        {
            Gun pocketpistol = ETGMod.Databases.Items.NewGun("Pocket Pistol", "pocketpistol");

            Game.Items.Rename("outdated_gun_mods:pocket_pistol", "bny:pocket_pistol");
            pocketpistol.gameObject.AddComponent <PocketPistol>();
            GunExt.SetShortDescription(pocketpistol, "Happy to see me?");
            GunExt.SetLongDescription(pocketpistol, "An incredibly small firearm. How do bullets even fit in there?");
            GunExt.SetupSprite(pocketpistol, null, "pocketpistol_idle_001", 19);
            GunExt.SetAnimationFPS(pocketpistol, pocketpistol.shootAnimation, 15);
            GunExt.SetAnimationFPS(pocketpistol, pocketpistol.reloadAnimation, 7);
            GunExt.SetAnimationFPS(pocketpistol, pocketpistol.idleAnimation, 1);
            GunExt.AddProjectileModuleFrom(pocketpistol, "magnum", true, false);
            pocketpistol.gunSwitchGroup              = (PickupObjectDatabase.GetById(79) as Gun).gunSwitchGroup;
            pocketpistol.DefaultModule.ammoCost      = 1;
            pocketpistol.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            pocketpistol.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            pocketpistol.reloadTime = 0.9f;
            pocketpistol.barrelOffset.transform.localPosition = new Vector3(.5f, 0.25f, 0f);
            pocketpistol.DefaultModule.cooldownTime           = .3f;
            pocketpistol.DefaultModule.numberOfShotsInClip    = 6;
            pocketpistol.SetBaseMaxAmmo(327);
            pocketpistol.quality = PickupObject.ItemQuality.D;
            pocketpistol.DefaultModule.angleVariance = 4f;
            pocketpistol.AddPassiveStatModifier(PlayerStats.StatType.AmmoCapacityMultiplier, .1f, StatModifier.ModifyMethod.ADDITIVE);
            pocketpistol.encounterTrackable.EncounterGuid = "The Small Gun Hell Yeah Brother";
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(pocketpistol.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            pocketpistol.DefaultModule.projectiles[0] = projectile;
            projectile.shouldRotate              = true;
            projectile.baseData.damage           = 7.5f;
            projectile.baseData.speed           *= 1.5f;
            projectile.AdditionalScaleMultiplier = 0.7f;
            projectile.transform.parent          = pocketpistol.barrelOffset;
            ETGMod.Databases.Items.Add(pocketpistol, null, "ANY");
            List <string> mandatoryConsoleIDs1 = new List <string>
            {
                "bny:pocket_pistol"
            };
            List <string> optionalConsoleID1s = new List <string>
            {
                "stout_bullets",
                "fat_bullets",
                "+1_bullets",
                "flak_bullets"
            };

            CustomSynergies.Add("How do these even fit in?", mandatoryConsoleIDs1, optionalConsoleID1s, true);
            pocketpistol.AddToSubShop(ItemBuilder.ShopType.Trorc, 1f);
        }
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Skorpion", "skorpion");

            Game.Items.Rename("outdated_gun_mods:skorpion", "nn:skorpion");
            gun.gameObject.AddComponent <Skorpion>();
            gun.SetShortDescription("Model 59");
            gun.SetLongDescription("A military sidearm most notable for not actually incorporating scorpions at any stage during construction.");

            gun.SetupSprite(null, "skorpion_idle_001", 8);

            gun.SetAnimationFPS(gun.shootAnimation, 12);

            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false);

            gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(23) as Gun).muzzleFlashEffects;
            //GUN STATS
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Automatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 1.4f;
            gun.DefaultModule.cooldownTime           = 0.06f;
            gun.DefaultModule.numberOfShotsInClip    = 45;
            gun.DefaultModule.angleVariance          = 10f;
            gun.barrelOffset.transform.localPosition = new Vector3(42f / 16f, 13f / 16f, 0f);
            gun.SetBaseMaxAmmo(660);
            gun.ammo     = 660;
            gun.gunClass = GunClass.FULLAUTO;

            //BULLET STATS
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.damage       = 4f;

            gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.SMALL_BULLET;

            gun.quality = PickupObject.ItemQuality.C;
            ETGMod.Databases.Items.Add(gun, null, "ANY");

            AdvancedFireOnReloadSynergyProcessor reloadfire = gun.gameObject.AddComponent <AdvancedFireOnReloadSynergyProcessor>();

            reloadfire.synergyToCheck = "Skorpion Sting";
            reloadfire.angleVariance  = 5f;
            reloadfire.numToFire      = 1;
            reloadfire.projToFire     = (PickupObjectDatabase.GetById(406) as Gun).Volley.projectiles[1].projectiles[0];

            gun.AddToSubShop(ItemBuilder.ShopType.Trorc);
            ID = gun.PickupObjectId;
        }
Esempio n. 23
0
        public static void Add()
        {
            Gun boomrevolver = ETGMod.Databases.Items.NewGun("Bloated Revolver", "bloatedrevolver");

            Game.Items.Rename("outdated_gun_mods:bloated_revolver", "bny:bloated_revolver");
            boomrevolver.gameObject.AddComponent <BloatedRevolver>();
            GunExt.SetShortDescription(boomrevolver, "A Bit Too Full");
            GunExt.SetLongDescription(boomrevolver, "A normal revolver that's been packed with so much gunpowder that it explodes if theres nothing left to shoot. Only the forces of the Gungeon prevent the self-destruction of the weapon.");
            GunExt.SetupSprite(boomrevolver, null, "bloatedrevolver_idle_001", 19);
            GunExt.SetAnimationFPS(boomrevolver, boomrevolver.shootAnimation, 24);
            GunExt.SetAnimationFPS(boomrevolver, boomrevolver.reloadAnimation, 10);
            GunExt.SetAnimationFPS(boomrevolver, boomrevolver.idleAnimation, 3);
            GunExt.AddProjectileModuleFrom(boomrevolver, "magnum", true, false);
            boomrevolver.gunSwitchGroup              = (PickupObjectDatabase.GetById(38) as Gun).gunSwitchGroup;
            boomrevolver.DefaultModule.ammoCost      = 1;
            boomrevolver.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            boomrevolver.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            boomrevolver.reloadTime = 1.2f;
            boomrevolver.DefaultModule.cooldownTime        = .1f;
            boomrevolver.DefaultModule.numberOfShotsInClip = 7;
            boomrevolver.SetBaseMaxAmmo(350);
            boomrevolver.quality = PickupObject.ItemQuality.D;
            boomrevolver.DefaultModule.angleVariance = 5f;

            boomrevolver.encounterTrackable.EncounterGuid = "garbage";
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(boomrevolver.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            boomrevolver.DefaultModule.projectiles[0] = projectile;
            projectile.shouldRotate     = true;
            projectile.baseData.damage *= .75f;
            projectile.baseData.speed  *= 0.9f;
            projectile.transform.parent = boomrevolver.barrelOffset;
            ETGMod.Databases.Items.Add(boomrevolver, null, "ANY");
            boomrevolver.AddToSubShop(ItemBuilder.ShopType.Cursula, 1f);
            boomrevolver.AddToSubShop(ItemBuilder.ShopType.Trorc, 1f);
        }
Esempio n. 24
0
        // Token: 0x06000036 RID: 54 RVA: 0x000037D8 File Offset: 0x000019D8
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Robotic Injector", "directiveinject");

            Game.Items.Rename("outdated_gun_mods:robotic_injector", "bny:robotic_injector");
            gun.gameObject.AddComponent <REXNeedler>();
            GunExt.SetShortDescription(gun, "Directive: Inject");
            GunExt.SetLongDescription(gun, "An injector commonly used by hydroponic robots. Looks like its original carrier is off protocol.");
            GunExt.SetupSprite(gun, null, "directiveinject_idle_001", 11);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 36);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 7);
            GunExt.SetAnimationFPS(gun, gun.idleAnimation, 1);
            GunExt.AddProjectileModuleFrom(gun, PickupObjectDatabase.GetById(26) as Gun, true, false);
            gun.gunHandedness  = GunHandedness.HiddenOneHanded;
            gun.gunSwitchGroup = (PickupObjectDatabase.GetById(26) as Gun).gunSwitchGroup;
            gun.DefaultModule.burstShotCount    = 3;
            gun.DefaultModule.burstCooldownTime = 0.0833f;
            gun.DefaultModule.ammoCost          = 1;
            gun.DefaultModule.shootStyle        = ProjectileModule.ShootStyle.Burst;
            gun.DefaultModule.sequenceStyle     = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 0f;
            gun.DefaultModule.cooldownTime        = .7f;
            gun.DefaultModule.numberOfShotsInClip = 300;
            gun.SetBaseMaxAmmo(300);
            gun.quality = PickupObject.ItemQuality.C;
            gun.DefaultModule.angleVariance      = 0f;
            gun.encounterTrackable.EncounterGuid = "THE PLANT, THE PLANT, ITS THE PLANT";
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.PoisonApplyChance     = 1f;
            projectile.baseData.damage       = 3f;
            projectile.baseData.speed        = 20f;
            projectile.baseData.range       *= 10f;
            projectile.baseData.force       *= 0.3f;
            projectile.HasDefaultTint        = true;
            projectile.SetProjectileSpriteRight("directiveinject_projectile_001", 11, 3, true, tk2dBaseSprite.Anchor.MiddleCenter, new int?(8), new int?(2), null, null, null);
            projectile.AdditionalScaleMultiplier = 1.1f;
            projectile.pierceMinorBreakables     = true;
            projectile.transform.parent          = gun.barrelOffset;
            projectile.damageTypes |= CoreDamageTypes.Poison;
            PoisonForDummiesLikeMe auegh = projectile.gameObject.AddComponent <PoisonForDummiesLikeMe>();

            auegh.procChance     = 1;
            auegh.useSpecialTint = false;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToSubShop(ItemBuilder.ShopType.Goopton, 1f);
        }
Esempio n. 25
0
        // Token: 0x06000036 RID: 54 RVA: 0x000037D8 File Offset: 0x000019D8
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Gunslayers Gauntlet", "gauntlets");

            Game.Items.Rename("outdated_gun_mods:gunslayers_gauntlet", "bny:gunslayers_gauntlet");
            gun.gameObject.AddComponent <GunslayerGauntlets>();
            GunExt.SetShortDescription(gun, "Rip And Tear");
            GunExt.SetLongDescription(gun, "The Gauntlet of the Gunslayer. In most circumstances, these would only be used to bear the burden of the Slayers weapons, but if needed to...");
            GunExt.SetupSprite(gun, null, "gauntlets_idle_001", 11);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 36);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 20);
            GunExt.SetAnimationFPS(gun, gun.idleAnimation, 2);
            GunExt.AddProjectileModuleFrom(gun, PickupObjectDatabase.GetById(539) as Gun, true, false);
            gun.gunSwitchGroup              = (PickupObjectDatabase.GetById(539) as Gun).gunSwitchGroup;
            gun.carryPixelOffset            = new IntVector2((int)11f, (int)-1f);
            gun.gunHandedness               = GunHandedness.HiddenOneHanded;
            gun.InfiniteAmmo                = true;
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Automatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 0f;
            gun.DefaultModule.cooldownTime        = .4f;
            gun.DefaultModule.numberOfShotsInClip = 1;
            gun.SetBaseMaxAmmo(50);
            gun.quality = PickupObject.ItemQuality.C;
            gun.DefaultModule.angleVariance      = 0f;
            gun.encounterTrackable.EncounterGuid = "RIP AND TEAR UNTIL IT IS DONE. *BAW NAW NANANANAU NANANAU BANAW NANANAUUU*";
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            PierceProjModifier spook = projectile.gameObject.AddComponent <PierceProjModifier>();

            spook.penetration = 10;
            gun.DefaultModule.projectiles[0]     = projectile;
            projectile.sprite.renderer.enabled   = false;
            projectile.AdditionalScaleMultiplier = 3f;
            projectile.baseData.damage           = 20f;
            projectile.baseData.speed           *= 3f;
            projectile.baseData.range            = 2f;
            projectile.AdditionalScaleMultiplier = 0.7f;
            projectile.pierceMinorBreakables     = true;
            projectile.shouldRotate        = true;
            projectile.AppliesStun         = true;
            projectile.AppliedStunDuration = 1.2f;
            projectile.transform.parent    = gun.barrelOffset;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToSubShop(ItemBuilder.ShopType.Trorc, 1f);
        }
Esempio n. 26
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Prismatic Shot", "prismaticshot");

            Game.Items.Rename("outdated_gun_mods:prismatic_shot", "bny:prismatic_shot");
            gun.gameObject.AddComponent <PrismaticShot>();
            GunExt.SetShortDescription(gun, "Rainguns!");
            GunExt.SetLongDescription(gun, "A gun made from pure, compressed crystals. Although weak in firepower, it makes up for it with the pretty colours it shoots.");
            GunExt.SetupSprite(gun, null, "prismaticshot_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 16);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 16);
            GunExt.AddProjectileModuleFrom(gun, PickupObjectDatabase.GetById(56) as Gun, true, false);
            gun.gunSwitchGroup                       = (PickupObjectDatabase.GetById(199) as Gun).gunSwitchGroup;
            gun.DefaultModule.ammoCost               = 1;
            gun.DefaultModule.burstShotCount         = 7;
            gun.DefaultModule.burstCooldownTime      = 0.05f;
            gun.barrelOffset.transform.localPosition = new Vector3(2f, 0.4375f, 0f);
            gun.DefaultModule.shootStyle             = ProjectileModule.ShootStyle.Burst;
            gun.DefaultModule.sequenceStyle          = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 0.8f;
            gun.DefaultModule.cooldownTime        = 0.3f;
            gun.muzzleFlashEffects.type           = VFXPoolType.None;
            gun.DefaultModule.numberOfShotsInClip = 70;
            gun.SetBaseMaxAmmo(700);
            gun.DefaultModule.angleVariance = 1f;
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0]     = projectile;
            gun.muzzleFlashEffects               = (PickupObjectDatabase.GetById(199) as Gun).muzzleFlashEffects;
            projectile.baseData.damage           = 4f;
            projectile.baseData.speed           *= 0.9f;
            projectile.AdditionalScaleMultiplier = 0.4f;
            projectile.baseData.force            = 3f;
            projectile.pierceMinorBreakables     = true;
            PierceProjModifier orAddComponent = projectile.gameObject.GetOrAddComponent <PierceProjModifier>();

            orAddComponent.penetratesBreakables = true;
            projectile.SetProjectileSpriteRight("prismaticshot_projectile_001", 10, 10, true, tk2dBaseSprite.Anchor.MiddleCenter, new int?(5), new int?(2), null, null, null);
            projectile.transform.parent = gun.barrelOffset;
            projectile.shouldRotate     = true;
            //projectile.DefaultTintColor = new Color(50f, 0f, 0f).WithAlpha(2f);
            projectile.HasDefaultTint = true;
            gun.quality = PickupObject.ItemQuality.C;
            gun.encounterTrackable.EncounterGuid = "Ok, this gun is now officially an ad for Prismatism.";
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToSubShop(ItemBuilder.ShopType.Goopton, 1f);
        }
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Maiden Rifle", "maidenrifle");

            Game.Items.Rename("outdated_gun_mods:maiden_rifle", "nn:maiden_rifle");
            gun.gameObject.AddComponent <MaidenRifle>();
            gun.SetShortDescription("Lady Death");
            gun.SetLongDescription("Reverse engineered Lead Maiden technology." + "\n\nOriginally, the projectiles would rotate when in walls, but this was removed for efficiency, and definitely not because quaternions and vectors are more painful than tapdancing on an echidna.");

            gun.SetupSprite(null, "maidenrifle_idle_001", 8);

            gun.SetAnimationFPS(gun.shootAnimation, 17);

            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false);

            //GUN STATS
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Automatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 2f;
            gun.DefaultModule.cooldownTime           = 0.15f;
            gun.DefaultModule.numberOfShotsInClip    = 30;
            gun.barrelOffset.transform.localPosition = new Vector3(1.68f, 0.62f, 0f);
            gun.SetBaseMaxAmmo(400);
            gun.ammo     = 400;
            gun.gunClass = GunClass.FULLAUTO;
            //BULLET STATS
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.damage      *= 1.6f;
            projectile.pierceMinorBreakables = true;
            projectile.SetProjectileSpriteRight("friendlymaiden_projectile", 25, 12, true, tk2dBaseSprite.Anchor.MiddleCenter, 6, 8);
            LeadMaidenProjectileReAiming orAddComponent = projectile.gameObject.GetOrAddComponent <LeadMaidenProjectileReAiming>();

            gun.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("MaidenRifle Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/maidenrifle_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/maidenrifle_clipempty");

            gun.quality = PickupObject.ItemQuality.B;
            ETGMod.Databases.Items.Add(gun, null, "ANY");



            MaidenRifleID = gun.PickupObjectId;
            gun.AddToSubShop(ItemBuilder.ShopType.Cursula);
        }
        // Token: 0x0600013F RID: 319 RVA: 0x0000D468 File Offset: 0x0000B668
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Artemis", "artemissile");

            Game.Items.Rename("outdated_gun_mods:artemis", "bny:artemis");
            gun.gameObject.AddComponent <ArtemissileRocket>();
            GunExt.SetShortDescription(gun, "Not To Be Confused With Leto");
            GunExt.SetLongDescription(gun, "A large ship-mounted missile launcher. Originally fitted with an auto-charger, the user now has to charge it manually for it to fire.");
            GunExt.SetupSprite(gun, null, "artemissile_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 20);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 2);
            GunExt.SetAnimationFPS(gun, gun.chargeAnimation, 1);
            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false);
            gun.muzzleFlashEffects          = (PickupObjectDatabase.GetById(384) as Gun).muzzleFlashEffects;
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Charged;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 2.2f;
            gun.DefaultModule.cooldownTime        = 1f;
            gun.DefaultModule.numberOfShotsInClip = 1;
            gun.SetBaseMaxAmmo(60);

            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).wrapMode  = tk2dSpriteAnimationClip.WrapMode.LoopSection;
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).loopStart = 4;
            gun.encounterTrackable.EncounterGuid = "da beeg gun da shoota da beeg rocket";
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.damage       = 70f;
            projectile.baseData.speed       *= 1.8f;
            projectile.baseData.range       *= 100f;
            projectile.SetProjectileSpriteRight("artemissile_projectile_001", 17, 6, true, tk2dBaseSprite.Anchor.MiddleCenter, 15, 4);
            projectile.shouldRotate = true;
            ProjectileModule.ChargeProjectile chargeProj = new ProjectileModule.ChargeProjectile
            {
                Projectile = projectile,
                ChargeTime = 4f,
            };
            gun.DefaultModule.chargeProjectiles = new List <ProjectileModule.ChargeProjectile> {
                chargeProj
            };

            gun.quality = PickupObject.ItemQuality.B;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToSubShop(ItemBuilder.ShopType.Trorc, 1f);
        }
Esempio n. 29
0
        // Token: 0x06000036 RID: 54 RVA: 0x000037D8 File Offset: 0x000019D8
        public static void Add()
        {
            Gun gunsword = ETGMod.Databases.Items.NewGun("Gun", "gun");

            Game.Items.Rename("outdated_gun_mods:gun", "bny:gun");
            gunsword.gameObject.AddComponent <AGunSword>();
            GunExt.SetShortDescription(gunsword, "Nothing Unusual");
            GunExt.SetLongDescription(gunsword, "This gun is completely ordinary. Just a normal gun, I promise you.");
            GunExt.SetupSprite(gunsword, null, "gun_idle_001", 11);
            GunExt.SetAnimationFPS(gunsword, gunsword.shootAnimation, 15);
            GunExt.SetAnimationFPS(gunsword, gunsword.reloadAnimation, 12);
            GunExt.SetAnimationFPS(gunsword, gunsword.idleAnimation, 1);
            GunExt.AddProjectileModuleFrom(gunsword, "magnum", true, false);
            gunsword.DefaultModule.ammoCost      = 1;
            gunsword.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gunsword.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gunsword.reloadTime = 0f;
            gunsword.DefaultModule.cooldownTime        = .6f;
            gunsword.DefaultModule.numberOfShotsInClip = 6;
            gunsword.SetBaseMaxAmmo(80);
            gunsword.quality = PickupObject.ItemQuality.C;
            gunsword.DefaultModule.angleVariance  = 0f;
            gunsword.DefaultModule.burstShotCount = 1;
            gunsword.InfiniteAmmo       = true;
            gunsword.muzzleFlashEffects = (PickupObjectDatabase.GetById(417) as Gun).muzzleFlashEffects;
            gunsword.AddToSubShop(ItemBuilder.ShopType.Trorc, 1f);
            gunsword.IsHeroSword = false;
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gunsword.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gunsword.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.damage           *= .9f;
            projectile.baseData.speed            *= 8f;
            projectile.AdditionalScaleMultiplier  = 5f;
            projectile.shouldRotate            = true;
            projectile.pierceMinorBreakables   = true;
            projectile.baseData.range          = 1.3f;
            projectile.sprite.renderer.enabled = false;
            PierceProjModifier spook = projectile.gameObject.AddComponent <PierceProjModifier>();

            spook.penetration = 10;
            projectile.SetProjectileSpriteRight("gun_projectile_001", 16, 26, true, tk2dBaseSprite.Anchor.MiddleCenter, new int?(8), new int?(13), null, null, null);
            gunsword.encounterTrackable.EncounterGuid = "you fool, you absolute buffoon. you thought this was a GUN? HAHA YOU FOOL! ITS a SWORD!!!!";
            ETGMod.Databases.Items.Add(gunsword, null, "ANY");
        }
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Love Pistol", "lovepistol");

            Game.Items.Rename("outdated_gun_mods:love_pistol", "nn:love_pistol");
            gun.gameObject.AddComponent <LovePistol>();
            gun.SetShortDescription(";)");
            gun.SetLongDescription("A low powered pistol, formerly kept in the back pocket of Hespera, the Pride of Venus, for times of need.");
            gun.SetupSprite(null, "lovepistol_idle_001", 8);
            gun.SetAnimationFPS(gun.shootAnimation, 15);

            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false);

            //GUN STATS
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 0.8f;
            gun.DefaultModule.cooldownTime           = 0.2f;
            gun.DefaultModule.numberOfShotsInClip    = 9;
            gun.barrelOffset.transform.localPosition = new Vector3(1.12f, 0.62f, 0f);
            gun.SetBaseMaxAmmo(400);
            gun.gunClass = GunClass.CHARM;
            //BULLET STATS
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.speed       *= 0.9f;
            projectile.baseData.damage      *= 0.8f;
            LovePistolCharmBehaviour charmBehaviour = projectile.gameObject.AddComponent <LovePistolCharmBehaviour>();

            projectile.SetProjectileSpriteRight("lovepistol_projectile", 7, 6, true, tk2dBaseSprite.Anchor.MiddleCenter, 7, 6);

            projectile.transform.parent      = gun.barrelOffset;
            gun.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Love Pistol Hearts", "NevernamedsItems/Resources/CustomGunAmmoTypes/lovepistol_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/lovepistol_clipempty");
            gun.quality = PickupObject.ItemQuality.B;
            gun.encounterTrackable.EncounterGuid = "this is the Love Pistol";
            ETGMod.Databases.Items.Add(gun, null, "ANY");

            gun.AddToSubShop(ItemBuilder.ShopType.Cursula);
            LovePistolID = gun.PickupObjectId;
        }