public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Uterine Polyp", "uterinepolyp");

            Game.Items.Rename("outdated_gun_mods:uterine_polyp", "nn:uterine_polyp");
            var obj = gun.gameObject.AddComponent <UterinePolyp>();

            obj.preventNormalFireAudio    = true;
            obj.preventNormalReloadAudio  = true;
            obj.overrideNormalReloadAudio = "Play_OBJ_cauldron_splash_01";
            obj.overrideNormalFireAudio   = "Play_ENM_cult_spew_01";
            gun.SetShortDescription("Endometrial");
            gun.SetLongDescription("A disgusting teratoma-esque growth cut from a demon's womb." + "\n\nGenuinely unpleasant to look at, touch, and think about.");

            gun.SetupSprite(null, "uterinepolyp_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.5f;
            gun.DefaultModule.cooldownTime           = 0.2f;
            gun.DefaultModule.numberOfShotsInClip    = 3;
            gun.barrelOffset.transform.localPosition = new Vector3(1.25f, 0.43f, 0f);
            gun.SetBaseMaxAmmo(200);
            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.transform.parent      = gun.barrelOffset;
            projectile.baseData.speed       *= 0.9f;
            projectile.baseData.damage       = 15;
            projectile.SetProjectileSpriteRight("uterinepolyp_projectile", 7, 7, true, tk2dBaseSprite.Anchor.MiddleCenter, 6, 6);
            GoopModifier gooper = projectile.gameObject.AddComponent <GoopModifier>();

            gooper.SpawnGoopInFlight    = false;
            gooper.SpawnGoopOnCollision = true;
            gooper.CollisionSpawnRadius = 1;
            gooper.goopDefinition       = EasyGoopDefinitions.GenerateBloodGoop(10, ExtendedColours.orange, 10);

            gun.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("UterinePolyp Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/uterinepolyp_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/uterinepolyp_clipempty");

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

            UterinePolypID = gun.PickupObjectId;
        }
Ejemplo n.º 2
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Gunycomb", "gunycomb");

            Game.Items.Rename("outdated_gun_mods:gunycomb", "nn:gunycomb");
            gun.gameObject.AddComponent <Gunycomb>();
            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(10) as Gun, true, false);

            //GUN STATS
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Beam;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 0.0001f;
            gun.DefaultModule.cooldownTime           = 0.10f;
            gun.muzzleFlashEffects.type              = VFXPoolType.None;
            gun.DefaultModule.numberOfShotsInClip    = 900;
            gun.barrelOffset.transform.localPosition = new Vector3(2.75f, 0.56f, 0f);
            gun.SetBaseMaxAmmo(900);

            //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       *= 1f;
            projectile.DefaultTintColor      = ExtendedColours.honeyYellow;
            GoopModifier goopmod = projectile.GetComponent <GoopModifier>();

            goopmod.goopDefinition = EasyGoopDefinitions.HoneyGoop;


            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.EXCLUDED;
            gun.encounterTrackable.EncounterGuid = "this is the Antimateriel Rifle";
            ETGMod.Databases.Items.Add(gun, null, "ANY");
        }
Ejemplo n.º 3
0
 private void OnPostProcessProjectile(Projectile proj, float f)
 {
     if (this.m_owner.PlayerHasActiveSynergy("#DYNAMO-MACHINE"))
     {
         this.shotsFired++;
         if (this.shotsFired > 10)
         {
             this.shotsFired = 0;
         }
         if (shotsFired < 10)
         {
             proj.damageTypes |= CoreDamageTypes.Electric;
         }
         else
         {
             if (proj.GetAnySprite() != null)
             {
                 GoopModifier mod = proj.gameObject.AddComponent <GoopModifier>();
                 mod.goopDefinition         = Toolbox.DefaultWaterGoop;
                 mod.IsSynergyContingent    = false;
                 mod.SpawnGoopInFlight      = true;
                 mod.InFlightSpawnFrequency = 0f;
                 mod.InFlightSpawnRadius    = 0.5f;
                 mod.SpawnGoopOnCollision   = false;
                 mod.SpawnAtBeamEnd         = false;
                 mod.spawnOffset            = Vector2.zero;
                 mod.UsesInitialDelay       = false;
                 mod.SynergyViable          = false;
             }
             else
             {
                 proj.damageTypes |= CoreDamageTypes.Electric;
             }
         }
     }
 }
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Greek Fire", "greekfire");

            Game.Items.Rename("outdated_gun_mods:greek_fire", "nn:greek_fire");
            gun.gunSwitchGroup = (PickupObjectDatabase.GetById(37) as Gun).gunSwitchGroup;
            gun.SetShortDescription("Fire of Man");
            gun.SetLongDescription("Used by ancient civilisations as a primitive flamethrower." + "\n\nThe potent chemical mixture used to create the flames makes it remarkably dangerous.");
            gun.SetupSprite(null, "greekfire_idle_001", 8);
            gun.SetAnimationFPS(gun.shootAnimation, 16);
            gun.SetAnimationFPS(gun.chargeAnimation, 3);

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

            //GUN STATS
            foreach (ProjectileModule mod in gun.Volley.projectiles)
            {
                mod.ammoCost            = 1;
                mod.shootStyle          = ProjectileModule.ShootStyle.Charged;
                mod.sequenceStyle       = ProjectileModule.ProjectileSequenceStyle.Random;
                mod.cooldownTime        = 1f;
                mod.angleVariance       = 20f;
                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.damage           *= 5f;
                projectile.AdditionalScaleMultiplier *= 2f;
                projectile.baseData.range            *= 0.5f;
                if (mod != gun.DefaultModule)
                {
                    mod.ammoCost = 0;
                }
                projectile.transform.parent = gun.barrelOffset;
                PrefabStatusEffectsToApply statusE = projectile.gameObject.AddComponent <PrefabStatusEffectsToApply>();
                statusE.effects = new List <GameActorEffect>()
                {
                    StaticStatusEffects.greenFireEffect
                };
                if (projectile.gameObject.GetComponent <GoopModifier>())
                {
                    Destroy(projectile.gameObject.GetComponent <GoopModifier>());
                }
                GoopModifier goopSpawned = projectile.gameObject.AddComponent <GoopModifier>();
                goopSpawned.SpawnGoopOnCollision   = true;
                goopSpawned.InFlightSpawnFrequency = 0.05f;
                goopSpawned.InFlightSpawnRadius    = 0.5f;
                goopSpawned.SpawnGoopInFlight      = true;
                goopSpawned.CollisionSpawnRadius   = 3f;
                goopSpawned.goopDefinition         = EasyGoopDefinitions.GreenFireDef;
                PierceProjModifier orAddComponent = projectile.gameObject.GetOrAddComponent <PierceProjModifier>();
                orAddComponent.penetratesBreakables = true;
                orAddComponent.penetration++;
                ProjectileModule.ChargeProjectile chargeProj = new ProjectileModule.ChargeProjectile
                {
                    Projectile = projectile,
                    ChargeTime = 1f,
                };
                mod.chargeProjectiles = new List <ProjectileModule.ChargeProjectile> {
                    chargeProj
                };
            }
            gun.reloadTime = 1f;
            gun.SetBaseMaxAmmo(65);
            gun.quality  = PickupObject.ItemQuality.B;
            gun.gunClass = GunClass.FIRE;
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).wrapMode  = tk2dSpriteAnimationClip.WrapMode.LoopSection;
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).loopStart = 1;

            gun.encounterTrackable.EncounterGuid = "this is Greek Fire";
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.barrelOffset.transform.localPosition = new Vector3(1.37f, 0.37f, 0f);
            GreekFireID = gun.PickupObjectId;
        }
Ejemplo n.º 5
0
        // Token: 0x0600028C RID: 652 RVA: 0x000162F8 File Offset: 0x000144F8
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Explodergun", "ExplodeCharge");

            Game.Items.Rename("outdated_gun_mods:explodergun", "cak:explodergun");
            GunExt.SetShortDescription(gun, "Crowbot");
            GunExt.SetLongDescription(gun, "A covering that can be applied to the arm. it shoots grenades at rapid pace, but has an obnoxious purple colouring.");
            GunExt.SetupSprite(gun, null, "ExplodeCharge_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 16);
            GunExt.SetAnimationFPS(gun, gun.chargeAnimation, 6);
            GunExt.AddProjectileModuleFrom(gun, PickupObjectDatabase.GetById(19) as Gun, true, false);



            foreach (ProjectileModule projectileModule in gun.Volley.projectiles)
            {
                projectileModule.ammoCost            = 1;
                projectileModule.shootStyle          = ProjectileModule.ShootStyle.Charged;
                projectileModule.sequenceStyle       = ProjectileModule.ProjectileSequenceStyle.Random;
                projectileModule.cooldownTime        = 1f;
                projectileModule.angleVariance       = 20f;
                projectileModule.numberOfShotsInClip = 1;
                Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(projectileModule.projectiles[0]);
                projectileModule.projectiles[0] = projectile;
                projectile.gameObject.SetActive(false);
                FakePrefab.MarkAsFakePrefab(projectile.gameObject);
                UnityEngine.Object.DontDestroyOnLoad(projectile);
                projectile.baseData.damage           *= 2f;
                projectile.AdditionalScaleMultiplier *= 1.2f;
                projectile.baseData.range            *= 0.5f;
                GoopModifier goop = projectile.gameObject.AddComponent <GoopModifier>();
                bool         flag = projectileModule != gun.DefaultModule;
                if (flag)
                {
                    projectileModule.ammoCost = 0;
                }
                projectile.transform.parent = gun.barrelOffset;
                ProjectileModule.ChargeProjectile item = new ProjectileModule.ChargeProjectile
                {
                    Projectile = projectile,
                    ChargeTime = 1f
                };
                PierceProjModifier orAddComponent = projectile.gameObject.GetOrAddComponent <PierceProjModifier>();
                orAddComponent.penetratesBreakables = true;
                orAddComponent.penetration++;
                projectileModule.chargeProjectiles = new List <ProjectileModule.ChargeProjectile>
                {
                    item
                };
            }
            gun.reloadTime = 1f;
            gun.SetBaseMaxAmmo(100);
            gun.DefaultModule.angleVariance = 0.2f;
            gun.quality = PickupObject.ItemQuality.SPECIAL;
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).wrapMode  = tk2dSpriteAnimationClip.WrapMode.LoopSection;
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).loopStart = 3;
            gun.encounterTrackable.EncounterGuid = "goboomlolololol";
            gun.gunHandedness = GunHandedness.HiddenOneHanded;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.barrelOffset.transform.localPosition = new Vector3(1.37f, 0.37f, 0f);
            Explodergun.ExplodergunID = gun.PickupObjectId;
            CakeIDs.Explodergun       = gun.PickupObjectId;
        }
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Vacuum Gun", "vacuumgun");

            Game.Items.Rename("outdated_gun_mods:vacuum_gun", "nn:vacuum_gun");
            gun.gameObject.AddComponent <VacuumGun>();
            gun.SetShortDescription("Ranged Weapon");
            gun.SetLongDescription("Pressing reload sucks up nearby blobs, and uses them as ammo. Cannot gain ammo by any other method." + "\n\nDesigned specifically to combat Blobulonian creatures, in the case of a potential re-emergence of the empire." + "\n\nZZZZZZZ");

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

            gun.SetAnimationFPS(gun.shootAnimation, 12);

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

            //GUN STATS
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Automatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime  = 1f;
            gun.ammo        = 0;
            gun.CanGainAmmo = false;
            gun.DefaultModule.cooldownTime           = 0.3f;
            gun.DefaultModule.numberOfShotsInClip    = 10000;
            gun.barrelOffset.transform.localPosition = new Vector3(1.75f, 0.81f, 0f);
            gun.SetBaseMaxAmmo(10000);
            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       = 30f;
            projectile.baseData.speed       *= 1f;
            projectile.baseData.range       *= 1f;
            projectile.SetProjectileSpriteRight("vacuumgun_projectile", 16, 14, false, tk2dBaseSprite.Anchor.MiddleCenter, 15, 13);
            GoopModifier gooper = projectile.gameObject.AddComponent <GoopModifier>();

            gooper.SpawnGoopInFlight    = false;
            gooper.SpawnGoopOnCollision = true;
            gooper.CollisionSpawnRadius = 2;
            gooper.goopDefinition       = EasyGoopDefinitions.BlobulonGoopDef;
            CustomImpactSoundBehav sound = projectile.gameObject.AddComponent <CustomImpactSoundBehav>();

            sound.ImpactSFX = "Play_BlobulonDeath";

            projectile.transform.parent = gun.barrelOffset;

            gun.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Vacuum Gun Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/vacuumgun_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/vacuumgun_clipempty");

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

            gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.PURCHASED_VACUUMGUN, true);
            gun.AddItemToGooptonMetaShop(16);
            gun.AddToSubShop(ItemBuilder.ShopType.Goopton);
        }
Ejemplo n.º 7
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Icicle", "icicle");

            Game.Items.Rename("outdated_gun_mods:icicle", "nn:icicle");
            gun.gameObject.AddComponent <Icicle>();
            gun.SetShortDescription("Begins Anew");
            gun.SetLongDescription("Becomes more powerful the cooler it's owner is." + "\n\nSnapped off of the ceiling of the Hollow's deepest catacomb, and somehow hasn't thawed ever since.");

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

            gun.SetAnimationFPS(gun.shootAnimation, 14);
            gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(97) as Gun).muzzleFlashEffects;
            gun.AddPassiveStatModifier(PlayerStats.StatType.Coolness, 1, StatModifier.ModifyMethod.ADDITIVE);

            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.5f;
            gun.DefaultModule.numberOfShotsInClip    = 10;
            gun.barrelOffset.transform.localPosition = new Vector3(1.62f, 0.56f, 0f);
            gun.SetBaseMaxAmmo(220);
            gun.ammo     = 220;
            gun.gunClass = GunClass.ICE;
            //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 *= 1.6f;
            projectile.baseData.speed  *= 1f;
            projectile.damageTypes     |= CoreDamageTypes.Ice;

            ScaleProjectileStatOffPlayerStat coolnessScaling = projectile.gameObject.AddComponent <ScaleProjectileStatOffPlayerStat>();

            coolnessScaling.multiplierPerLevelOfStat = 0.2f;
            coolnessScaling.projstat   = ScaleProjectileStatOffPlayerStat.ProjectileStatType.DAMAGE;
            coolnessScaling.playerstat = PlayerStats.StatType.Coolness;

            SimpleFreezingBulletBehaviour freezing = projectile.gameObject.AddComponent <SimpleFreezingBulletBehaviour>();

            freezing.freezeAmount          = 40;
            freezing.useSpecialTint        = false;
            freezing.freezeAmountForBosses = 40;

            GoopModifier watering = projectile.gameObject.AddComponent <GoopModifier>();

            watering.CollisionSpawnRadius = 0.8f;
            watering.SpawnGoopOnCollision = true;
            watering.SpawnGoopInFlight    = false;
            watering.goopDefinition       = EasyGoopDefinitions.WaterGoop;

            projectile.SetProjectileSpriteRight("icicle_projectile", 13, 5, false, tk2dBaseSprite.Anchor.MiddleCenter, 13, 5);
            gun.DefaultModule.projectiles[0] = projectile;

            gun.quality = PickupObject.ItemQuality.B;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            IcicleID = gun.PickupObjectId;
        }
Ejemplo n.º 8
0
        // Token: 0x0600028C RID: 652 RVA: 0x000162F8 File Offset: 0x000144F8
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("HONK", "horn");

            Game.Items.Rename("outdated_gun_mods:honk", "cak:honk");
            GunExt.SetShortDescription(gun, "Prince Charming");
            GunExt.SetLongDescription(gun, "Wielded by a legendary ringmaster at one point, it was lost in the gungeon and it's magicks shifted into a violate weapon.");
            GunExt.SetupSprite(gun, null, "horn_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 16);
            GunExt.SetAnimationFPS(gun, gun.chargeAnimation, 6);
            GunExt.AddProjectileModuleFrom(gun, PickupObjectDatabase.GetById(124) as Gun, true, false);



            foreach (ProjectileModule projectileModule in gun.Volley.projectiles)
            {
                projectileModule.ammoCost            = 1;
                projectileModule.shootStyle          = ProjectileModule.ShootStyle.Charged;
                projectileModule.sequenceStyle       = ProjectileModule.ProjectileSequenceStyle.Random;
                projectileModule.cooldownTime        = 1f;
                projectileModule.angleVariance       = 20f;
                projectileModule.numberOfShotsInClip = 1;
                Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(projectileModule.projectiles[0]);
                projectileModule.projectiles[0] = projectile;
                projectile.gameObject.SetActive(false);
                FakePrefab.MarkAsFakePrefab(projectile.gameObject);
                UnityEngine.Object.DontDestroyOnLoad(projectile);
                projectile.baseData.damage           *= 10f;
                projectile.AdditionalScaleMultiplier *= 2f;
                projectile.baseData.range            *= 0.5f;
                GoopModifier   goop  = projectile.gameObject.AddComponent <GoopModifier>();
                PickupObject   byId  = PickupObjectDatabase.GetById(310);
                bool           flagf = byId == null;
                GoopDefinition defaultCharmGoop;
                if (flagf)
                {
                    defaultCharmGoop = null;
                }
                else
                {
                    WingsItem component = byId.GetComponent <WingsItem>();
                    defaultCharmGoop = ((component != null) ? component.RollGoop : null);
                }
                goop.SpawnGoopInFlight                       = true;
                goop.goopDefinition                          = UnityEngine.Object.Instantiate <GoopDefinition>(defaultCharmGoop);
                goop.goopDefinition.CanBeIgnited             = true;
                goop.goopDefinition.CanBeFrozen              = true;
                goop.goopDefinition.CanBeElectrified         = true;
                goop.goopDefinition.damagePerSecondtoEnemies = 1f;
                goop.InFlightSpawnRadius                     = 2f;
                goop.goopDefinition.damagesEnemies           = true;
                bool flag = projectileModule != gun.DefaultModule;
                if (flag)
                {
                    projectileModule.ammoCost = 0;
                }
                projectile.transform.parent = gun.barrelOffset;
                ProjectileModule.ChargeProjectile item = new ProjectileModule.ChargeProjectile
                {
                    Projectile = projectile,
                    ChargeTime = 1f
                };
                PierceProjModifier orAddComponent = projectile.gameObject.GetOrAddComponent <PierceProjModifier>();
                orAddComponent.penetratesBreakables = true;
                orAddComponent.penetration++;
                projectileModule.chargeProjectiles = new List <ProjectileModule.ChargeProjectile>
                {
                    item
                };
            }
            gun.reloadTime = 1f;
            gun.SetBaseMaxAmmo(100);
            gun.DefaultModule.angleVariance = 0.2f;
            gun.quality = PickupObject.ItemQuality.B;
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).wrapMode  = tk2dSpriteAnimationClip.WrapMode.LoopSection;
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).loopStart = 3;
            gun.encounterTrackable.EncounterGuid = "HONKERWONK";
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.barrelOffset.transform.localPosition = new Vector3(1.37f, 0.37f, 0f);
            Horn.HornID = gun.PickupObjectId;
        }
Ejemplo n.º 9
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Phaser Spiderling", "phaserspiderling");

            Game.Items.Rename("outdated_gun_mods:phaser_spiderling", "nn:phaser_spiderling");
            var behav = gun.gameObject.AddComponent <PhaserSpiderling>();

            behav.preventNormalReloadAudio  = true;
            behav.overrideNormalReloadAudio = "Play_ENM_PhaseSpider_Weave_01";
            behav.preventNormalFireAudio    = true;
            behav.overrideNormalFireAudio   = "Play_ENM_PhaseSpider_Spray_01";

            gun.SetShortDescription("Arachnikov");
            gun.SetLongDescription("The hatchling spawn of a Phaser Spider." + "\n\nOne of the first organs to fully develop are the spinnerets.");

            gun.SetupSprite(null, "phaserspiderling_idle_001", 8);
            gun.gunSwitchGroup          = (PickupObjectDatabase.GetById(86) as Gun).gunSwitchGroup;
            gun.muzzleFlashEffects.type = VFXPoolType.None;


            gun.SetAnimationFPS(gun.shootAnimation, 15);
            gun.SetAnimationFPS(gun.idleAnimation, 9);

            for (int i = 0; i < 7; i++)
            {
                gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false);
            }
            //Easy Variables to Change all the Modules
            float AllModCooldown    = 0.1f;
            int   AllModClipshots   = 500;
            float LesserModCooldown = 0.4f;


            int i2 = 0;

            foreach (ProjectileModule mod in gun.Volley.projectiles)
            {
                mod.numberOfShotsInClip = AllModClipshots;

                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.damage *= 1f;
                projectile.baseData.speed  *= 0.5f;
                projectile.baseData.range  *= 2f;

                GoopModifier webbing = projectile.gameObject.AddComponent <GoopModifier>();
                webbing.goopDefinition         = EasyGoopDefinitions.PlayerFriendlyWebGoop;
                webbing.SpawnGoopInFlight      = true;
                webbing.InFlightSpawnFrequency = 0.05f;
                webbing.InFlightSpawnRadius    = 1f;
                webbing.SpawnGoopOnCollision   = true;
                webbing.CollisionSpawnRadius   = 2f;

                projectile.SetProjectileSpriteRight("yellow_enemystyle_projectile", 10, 10, true, tk2dBaseSprite.Anchor.MiddleCenter, 8, 8);

                if (i2 <= 0) //First Common Proj (-30)
                {
                    mod.ammoCost      = 0;
                    mod.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
                    mod.shootStyle    = ProjectileModule.ShootStyle.Automatic;
                    mod.cooldownTime  = AllModCooldown;
                    mod.angleVariance = 0.01f;
                    mod.angleFromAim  = -30f;
                    i2++;
                }
                else if (i2 == 1) //Second Common Proj (0)
                {
                    mod.ammoCost      = 1;
                    mod.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
                    mod.shootStyle    = ProjectileModule.ShootStyle.Automatic;
                    mod.cooldownTime  = AllModCooldown;
                    mod.angleVariance = 0.01f;
                    mod.angleFromAim  = 0.01f;

                    i2++;
                }
                else if (i2 == 2) //Third Common Proj (30)
                {
                    mod.ammoCost      = 0;
                    mod.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
                    mod.shootStyle    = ProjectileModule.ShootStyle.Automatic;
                    mod.cooldownTime  = AllModCooldown;
                    mod.angleFromAim  = 30f;
                    mod.angleVariance = 0.1f;

                    i2++;
                }
                else if (i2 == 3) //First uncommon Proj
                {
                    mod.ammoCost              = 0;
                    mod.sequenceStyle         = ProjectileModule.ProjectileSequenceStyle.Random;
                    mod.shootStyle            = ProjectileModule.ShootStyle.Automatic;
                    mod.cooldownTime          = LesserModCooldown;
                    mod.angleFromAim          = -10f;
                    mod.angleVariance         = 0.1f;
                    webbing.SpawnGoopInFlight = false;

                    i2++;
                }
                else if (i2 == 4) //Second uncommon Proj
                {
                    mod.ammoCost              = 0;
                    mod.sequenceStyle         = ProjectileModule.ProjectileSequenceStyle.Random;
                    mod.shootStyle            = ProjectileModule.ShootStyle.Automatic;
                    mod.cooldownTime          = LesserModCooldown;
                    mod.angleFromAim          = -20f;
                    mod.angleVariance         = 0.1f;
                    webbing.SpawnGoopInFlight = false;

                    i2++;
                }
                else if (i2 == 5) //First uncommon Proj
                {
                    mod.ammoCost              = 0;
                    mod.sequenceStyle         = ProjectileModule.ProjectileSequenceStyle.Random;
                    mod.shootStyle            = ProjectileModule.ShootStyle.Automatic;
                    mod.cooldownTime          = LesserModCooldown;
                    mod.angleFromAim          = 10f;
                    mod.angleVariance         = 0.1f;
                    webbing.SpawnGoopInFlight = false;

                    i2++;
                }
                else if (i2 >= 6) //First uncommon Proj
                {
                    mod.ammoCost              = 0;
                    mod.sequenceStyle         = ProjectileModule.ProjectileSequenceStyle.Random;
                    mod.shootStyle            = ProjectileModule.ShootStyle.Automatic;
                    mod.cooldownTime          = LesserModCooldown;
                    mod.angleFromAim          = 20f;
                    mod.angleVariance         = 0.1f;
                    webbing.SpawnGoopInFlight = false;

                    i2++;
                }
            }
            gun.reloadTime = 1.4f;
            gun.barrelOffset.transform.localPosition = new Vector3(1.25f, 0.62f, 0f);
            gun.SetBaseMaxAmmo(600);

            gun.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("PhaserSpiderling Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/phaserspiderling_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/phaserspiderling_clipempty");

            gun.gunClass = GunClass.FULLAUTO;
            gun.quality  = PickupObject.ItemQuality.S;
            ETGMod.Databases.Items.Add(gun, null, "ANY");

            PhaserSpiderlingID = gun.PickupObjectId;
            gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.PHASERSPIDER_QUEST_REWARDED, true);
        }
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("The Outbreak", "theoutbreak");

            Game.Items.Rename("outdated_gun_mods:the_outbreak", "nn:the_outbreak");
            gun.gameObject.AddComponent <TheOutbreak>();
            gun.SetShortDescription("Epidemical!");
            gun.SetLongDescription("A terrifying piece of bioweaponry. The final shot is a highly concentrated gel projectile containing a virulent load.");
            gun.SetupSprite(null, "theoutbreak_idle_001", 8);
            gun.SetAnimationFPS(gun.shootAnimation, 20);

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

            //GUN STATS
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Automatic;
            gun.DefaultModule.angleVariance = 6.5f;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 1.5f;
            gun.DefaultModule.cooldownTime           = 0.15f;
            gun.DefaultModule.numberOfShotsInClip    = 13;
            gun.barrelOffset.transform.localPosition = new Vector3(2.43f, 0.81f, 0f);
            gun.SetBaseMaxAmmo(330);
            gun.gunClass = GunClass.POISON;


            //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       *= 1.1f;
            projectile.baseData.damage       = 6f;
            projectile.SetProjectileSpriteRight("theoutbreak_proj", 10, 10, true, tk2dBaseSprite.Anchor.MiddleCenter, 9, 9);
            projectile.hitEffects.alwaysUseMidair        = true;
            projectile.hitEffects.overrideMidairDeathVFX = RainbowGuonStone.GreyGuonTransitionVFX;

            projectile.transform.parent = gun.barrelOffset;

            //END OF CLIP GLOB
            Projectile projectile2 = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(56) as Gun).DefaultModule.projectiles[0]);

            projectile2.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile2.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile2);
            projectile2.baseData.speed *= 0.8f;
            projectile2.baseData.damage = 14.1414f;
            projectile2.baseData.range *= 2;
            PrefabStatusEffectsToApply statusE = projectile2.gameObject.AddComponent <PrefabStatusEffectsToApply>();

            statusE.effects = new List <GameActorEffect>()
            {
                StaticStatusEffects.StandardPlagueEffect
            };

            GoopModifier goopmod = projectile2.gameObject.AddComponent <GoopModifier>();

            goopmod.SpawnGoopOnCollision = true;
            goopmod.CollisionSpawnRadius = 4f;
            goopmod.SpawnGoopInFlight    = false;
            goopmod.goopDefinition       = EasyGoopDefinitions.PlagueGoop;

            projectile2.hitEffects.alwaysUseMidair        = true;
            projectile2.hitEffects.overrideMidairDeathVFX = RainbowGuonStone.RedGuonTransitionVFX;
            projectile2.AnimateProjectile(new List <string> {
                "theoutbreakfinalproj_1",
                "theoutbreakfinalproj_2",
                "theoutbreakfinalproj_1",
                "theoutbreakfinalproj_3",
            }, 12, true, new List <IntVector2> {
                new IntVector2(13, 8),  //1
                new IntVector2(11, 10), //2
                new IntVector2(13, 8),  //3
                new IntVector2(10, 11), //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.usesOptionalFinalProjectile = true;
            gun.DefaultModule.finalProjectile             = projectile2;
            gun.DefaultModule.numberOfFinalProjectiles    = 1;
            // gun.DefaultModule.finalCustomAmmoType = gun.DefaultModule.customAmmoType;
            // gun.DefaultModule.finalAmmoType = gun.DefaultModule.ammoType;
            // gun.finalMuzzleFlashEffects = gun.muzzleFlashEffects;

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

            gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.PURCHASED_THEOUTBREAK, true);
            gun.AddItemToDougMetaShop(45);
            gun.AddToSubShop(ItemBuilder.ShopType.Goopton);
        }
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("GlobbitMedium", "globbitmed");

            Game.Items.Rename("outdated_gun_mods:globbitmedium", "nn:globbit_medium_forme");
            gun.gameObject.AddComponent <GlobbitMED>();
            gun.SetShortDescription("no");
            gun.SetLongDescription("no");
            gun.SetupSprite(null, "globbitmed_idle_001", 8);

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

            gun.SetAnimationFPS(gun.shootAnimation, 10);

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

            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 1.1f;;
            gun.DefaultModule.cooldownTime        = 0.3f;
            gun.DefaultModule.numberOfShotsInClip = 6;
            gun.SetBaseMaxAmmo(250);
            // 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.EXCLUDED; //C

            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.baseData.speed       *= 0.8f;
            projectile.baseData.range       *= 2f;
            GoopModifier blood = projectile.gameObject.AddComponent <GoopModifier>();

            blood.goopDefinition         = EasyGoopDefinitions.BlobulonGoopDef;
            blood.SpawnGoopInFlight      = true;
            blood.InFlightSpawnFrequency = 0.05f;
            blood.InFlightSpawnRadius    = 0.5f;
            blood.SpawnGoopOnCollision   = true;
            blood.CollisionSpawnRadius   = 1f;


            projectile.SetProjectileSpriteRight("globbitmed_projectile", 7, 7, false, tk2dBaseSprite.Anchor.MiddleCenter, 6, 6);



            projectile.transform.parent = gun.barrelOffset;


            gun.barrelOffset.transform.localPosition = new Vector3(1.31f, 0.81f, 0f);

            // Add the custom component here
            //AmmoBasedFormeChanger formes = gun.gameObject.AddComponent<AmmoBasedFormeChanger>();



            ETGMod.Databases.Items.Add(gun, null, "ANY");
            GlobbitMediumID = gun.PickupObjectId;
        }
Ejemplo n.º 12
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Viscerifle", "viscerifle");

            Game.Items.Rename("outdated_gun_mods:viscerifle", "nn:viscerifle");
            gun.gameObject.AddComponent <Viscerifle>();
            gun.SetShortDescription("Bloody Stream");
            gun.SetLongDescription("Fires hearts and armour as ammunition." + "\n\nThis, by definition, is not a rifle. The name is purely marketing." + "\n\nFires nothing if fired while invincible.");

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

            gun.SetAnimationFPS(gun.shootAnimation, 12);

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

            //GUN STATS
            gun.DefaultModule.ammoCost      = 0;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 0.8f;

            gun.DefaultModule.angleVariance       = 0f;
            gun.DefaultModule.cooldownTime        = 0.5f;
            gun.DefaultModule.numberOfShotsInClip = 10;
            gun.CanGainAmmo = false;
            gun.barrelOffset.transform.localPosition = new Vector3(1.5f, 0.81f, 0f);
            gun.SetBaseMaxAmmo(0);
            gun.gunClass = GunClass.SHITTY;


            //HEART 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      *= 20f;
            projectile.pierceMinorBreakables = true;
            projectile.baseData.speed       *= 1f;
            projectile.ignoreDamageCaps      = true;
            projectile.baseData.range       *= 10f;
            projectile.SetProjectileSpriteRight("viscerifle_heart_projectile", 16, 7, false, tk2dBaseSprite.Anchor.MiddleCenter, 16, 7);
            GoopModifier blood = projectile.gameObject.AddComponent <GoopModifier>();

            blood.goopDefinition         = EasyGoopDefinitions.BlobulonGoopDef;
            blood.SpawnGoopInFlight      = true;
            blood.InFlightSpawnFrequency = 0.05f;
            blood.InFlightSpawnRadius    = 1f;
            blood.SpawnGoopOnCollision   = true;
            blood.CollisionSpawnRadius   = 2f;

            //SHADE BULLETS
            shadeProjectile = ProjectileSetupUtility.MakeProjectile(56, 20, 35, 23);
            shadeProjectile.SetProjectileSpriteRight("shadeviscerifle_proj", 16, 7, false, tk2dBaseSprite.Anchor.MiddleCenter, 16, 7);

            //ARMOUR
            armourProjectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(56) as Gun).DefaultModule.projectiles[0]);
            armourProjectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(armourProjectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(armourProjectile);
            armourProjectile.baseData.damage      *= 24f;
            armourProjectile.ignoreDamageCaps      = true;
            armourProjectile.baseData.speed       *= 1f;
            armourProjectile.baseData.range       *= 10;
            armourProjectile.pierceMinorBreakables = true;
            armourProjectile.SetProjectileSpriteRight("viscerifle_armour_projectile", 12, 8, false, tk2dBaseSprite.Anchor.MiddleCenter, 12, 8);
            armourProjectile.transform.parent = gun.barrelOffset;
            BlankOnHitModifier blankingArmour = armourProjectile.gameObject.GetOrAddComponent <BlankOnHitModifier>();

            blankingArmour.useTinyBlank = false;


            //CREST
            crestProjectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(56) as Gun).DefaultModule.projectiles[0]);
            crestProjectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(crestProjectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(crestProjectile);
            crestProjectile.ignoreDamageCaps      = true;
            crestProjectile.baseData.damage      *= 1000f;
            crestProjectile.baseData.speed       *= 1f;
            crestProjectile.baseData.range       *= 10;
            crestProjectile.pierceMinorBreakables = true;
            crestProjectile.SetProjectileSpriteRight("viscerifle_crest_projectile", 12, 9, false, tk2dBaseSprite.Anchor.MiddleCenter, 12, 9);
            crestProjectile.transform.parent = gun.barrelOffset;
            BlankOnHitModifier blankingCrest = crestProjectile.gameObject.GetOrAddComponent <BlankOnHitModifier>();

            blankingCrest.useTinyBlank = false;
            BounceProjModifier Bouncing = crestProjectile.gameObject.GetOrAddComponent <BounceProjModifier>();

            Bouncing.numberOfBounces = 1;

            //FUCKYOUPROJECTILE
            fuckyouprojectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(56) as Gun).DefaultModule.projectiles[0]);
            fuckyouprojectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(fuckyouprojectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(fuckyouprojectile);
            fuckyouprojectile.baseData.damage *= 0f;
            fuckyouprojectile.baseData.speed  *= 0f;
            fuckyouprojectile.baseData.range  *= 0;
            DieFuckYou fuckingdie = fuckyouprojectile.gameObject.GetOrAddComponent <DieFuckYou>();

            fuckyouprojectile.sprite.renderer.enabled = false;
            fuckyouprojectile.transform.parent        = gun.barrelOffset;


            projectile.transform.parent = gun.barrelOffset;

            gun.quality = PickupObject.ItemQuality.C;
            gun.encounterTrackable.EncounterGuid = "this is the Viscerifle";
            ETGMod.Databases.Items.Add(gun, null, "ANY");

            gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.PURCHASED_VISCERIFLE, true);
            gun.AddItemToGooptonMetaShop(23);
        }
Ejemplo n.º 13
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Bottle Rocket", "bottlerocket");

            Game.Items.Rename("outdated_gun_mods:bottle_rocket", "nn:bottle_rocket");
            var behav = gun.gameObject.AddComponent <BottleRocket>();

            behav.preventNormalFireAudio = true;
            gun.SetShortDescription("Waterarms Afficionado");
            gun.SetLongDescription("A pressurised bottle of fluid. Pumping it any fuller will send it flying off in erratic directions." + "\n\nProne to exploding.");

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

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

            //GUN STATS
            gun.DefaultModule.ammoCost      = 1;
            gun.doesScreenShake             = true;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Charged;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 0.5f;
            gun.DefaultModule.cooldownTime  = 1f;
            gun.DefaultModule.angleVariance = 5;
            gun.muzzleFlashEffects          = (PickupObjectDatabase.GetById(359) as Gun).muzzleFlashEffects;

            gun.DefaultModule.numberOfShotsInClip    = 1;
            gun.barrelOffset.transform.localPosition = new Vector3(1.43f, 0.62f, 0f);
            gun.SetBaseMaxAmmo(100);
            gun.ammo     = 100;
            gun.gunClass = GunClass.CHARGE;
            gun.SetAnimationFPS(gun.chargeAnimation, 8);
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).wrapMode               = tk2dSpriteAnimationClip.WrapMode.LoopSection;
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).loopStart              = 0;
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).frames[3].eventAudio   = "Play_WPN_trashgun_impact_01";
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).frames[3].triggerEvent = true;

            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).frames[0].eventAudio   = "Play_ENV_water_splash_01";
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).frames[0].triggerEvent = true;

            //Explosion
            bottleRocketBoom = new ExplosionData()
            {
                effect                 = (PickupObjectDatabase.GetById(36) as Gun).DefaultModule.chargeProjectiles[1].Projectile.hitEffects.overrideMidairDeathVFX,
                ignoreList             = new List <SpeculativeRigidbody>(),
                ss                     = StaticExplosionDatas.tetrisBlockExplosion.ss,
                damageRadius           = 3.5f,
                damageToPlayer         = 0f,
                doDamage               = true,
                damage                 = 19,
                doDestroyProjectiles   = false,
                doForce                = true,
                debrisForce            = 20f,
                preventPlayerForce     = true,
                explosionDelay         = 0.1f,
                usesComprehensiveDelay = false,
                doScreenShake          = true,
                playDefaultSFX         = false,
                force                  = 20,
                breakSecretWalls       = false,
            };

            //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 = 19f;
            projectile.baseData.force *= 2f;
            projectile.baseData.speed *= 1.4f;
            projectile.baseData.range *= 2f;
            projectile.hitEffects.overrideMidairDeathVFX = (PickupObjectDatabase.GetById(33) as Gun).DefaultModule.projectiles[0].hitEffects.overrideMidairDeathVFX;
            projectile.hitEffects.alwaysUseMidair        = true;
            projectile.AnimateProjectile(new List <string> {
                "bottlerocketproj_001",
                "bottlerocketproj_002",
            }, 10, true, new List <IntVector2> {
                new IntVector2(24, 16),  //1
                new IntVector2(24, 16),  //2
            },
                                         AnimateBullet.ConstructListOfSameValues(false, 2),
                                         AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 2),
                                         AnimateBullet.ConstructListOfSameValues(true, 2),
                                         AnimateBullet.ConstructListOfSameValues(false, 2),
                                         AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 2),
                                         AnimateBullet.ConstructListOfSameValues <IntVector2?>(new IntVector2(15, 8), 2),
                                         AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 2),
                                         AnimateBullet.ConstructListOfSameValues <Projectile>(null, 2));
            projectile.SetProjectileSpriteRight("bottlerocketproj_001", 24, 16, true, tk2dBaseSprite.Anchor.MiddleCenter, 15, 8);
            projectile.gameObject.AddComponent <ProjectileMotionDrift>();
            projectile.gameObject.AddComponent <BounceProjModifier>();
            GoopModifier gooper = projectile.gameObject.AddComponent <GoopModifier>();

            gooper.SpawnGoopInFlight      = true;
            gooper.SpawnGoopOnCollision   = true;
            gooper.CollisionSpawnRadius   = 5;
            gooper.InFlightSpawnRadius    = 1;
            gooper.InFlightSpawnFrequency = 0.05f;
            gooper.goopDefinition         = EasyGoopDefinitions.WaterGoop;
            CustomImpactSoundBehav impactSound = projectile.gameObject.AddComponent <CustomImpactSoundBehav>();

            impactSound.ImpactSFX = "Play_ENM_blobulord_splash_01";
            ExplosiveModifier boom = projectile.gameObject.GetOrAddComponent <ExplosiveModifier>();

            boom.explosionData = bottleRocketBoom;
            boom.doExplosion   = true;
            BeamBulletsBehaviour squirt = projectile.gameObject.AddComponent <BeamBulletsBehaviour>();

            squirt.firetype  = BeamBulletsBehaviour.FireType.BACKWARDS;
            highPressureBeam = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(10) as Gun).DefaultModule.projectiles[0]);
            highPressureBeam.baseData.speed *= 2;
            highPressureBeam.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(highPressureBeam.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(highPressureBeam);
            squirt.beamToFire = highPressureBeam;
            ProjectileModule.ChargeProjectile chargeProj = new ProjectileModule.ChargeProjectile
            {
                Projectile = projectile,
                ChargeTime = 0.5f,
            };
            gun.DefaultModule.chargeProjectiles = new List <ProjectileModule.ChargeProjectile> {
                chargeProj
            };

            gun.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Bottle Rocket Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/bottlerocket_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/bottlerocket_clipempty");

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

            highPressurePoison = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(208) as Gun).DefaultModule.projectiles[0]);
            highPressurePoison.baseData.speed *= 2;
            highPressurePoison.GetComponent <GoopModifier>().goopDefinition = EasyGoopDefinitions.PlayerFriendlyPoisonGoop;
            highPressurePoison.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(highPressurePoison.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(highPressurePoison);
            ID = gun.PickupObjectId;
        }
Ejemplo n.º 14
0
        public IEnumerator WaitAndStart(Projectile proj, PlayerController player, float deg)
        {
            yield return(null);

            try
            {
                this.damage = proj.baseData.damage * 3;
                if (player.stats.GetStatValue(PlayerStats.StatType.DodgeRollDamage) > 0)
                {
                    this.damage *= player.stats.GetStatValue(PlayerStats.StatType.DodgeRollDamage);
                }
                this.speed = proj.baseData.speed;
                if (speed <= 0)
                {
                    this.speed = 1f;
                }
                this.damageTypes             = proj.damageTypes;
                this.ignoreDamageCaps        = proj.ignoreDamageCaps;
                this.AppliesBleed            = proj.AppliesBleed;
                this.BleedApplyChance        = proj.BleedApplyChance;
                this.bleedEffect             = proj.bleedEffect;
                this.AppliesCharm            = proj.AppliesCharm;
                this.CharmApplyChance        = proj.CharmApplyChance;
                this.charmEffect             = proj.charmEffect;
                this.AppliesCheese           = proj.AppliesCheese;
                this.CheeseApplyChance       = proj.CheeseApplyChance;
                this.cheeseEffect            = proj.cheeseEffect;
                this.AppliesFire             = proj.AppliesFire;
                this.FireApplyChance         = proj.FireApplyChance;
                this.fireEffect              = proj.fireEffect;
                this.AppliesFreeze           = proj.AppliesFreeze;
                this.FreezeApplyChance       = proj.FreezeApplyChance;
                this.freezeEffect            = proj.freezeEffect;
                this.AppliesPoison           = proj.AppliesPoison;
                this.PoisonApplyChance       = proj.PoisonApplyChance;
                this.healthEffect            = proj.healthEffect;
                this.AppliesSpeedModifier    = proj.AppliesSpeedModifier;
                this.SpeedApplyChance        = proj.SpeedApplyChance;
                this.speedEffect             = proj.speedEffect;
                this.AppliesStun             = proj.AppliesStun;
                this.StunApplyChance         = proj.StunApplyChance;
                this.AppliedStunDuration     = proj.AppliedStunDuration;
                this.statusEffectsToApply    = proj.statusEffectsToApply;
                this.CanTransmogrify         = proj.CanTransmogrify;
                this.ChanceToTransmogrify    = proj.ChanceToTransmogrify;
                this.TransmogrifyTargetGuids = proj.TransmogrifyTargetGuids;
                this.isDoingLivingGunSynergy = false;
                if (player.passiveItems != null)
                {
                    bool found = false;
                    foreach (PassiveItem passive in player.passiveItems)
                    {
                        if (passive is ModifyProjectileOnEnemyImpact)
                        {
                            found = true;
                            this.bounceOffEnemies = true;
                        }
                    }
                    if (!found)
                    {
                        this.bounceOffEnemies = false;
                    }
                }
                try
                {
                    this.appliedEffects = proj.GetComponents <AppliedEffectBase>();
                }
                catch
                {
                    this.appliedEffects = new AppliedEffectBase[0];
                }
                try
                {
                    if (proj.GetComponent <PierceProjModifier>() != null)
                    {
                        this.penetration = proj.GetComponent <PierceProjModifier>().penetration;
                    }
                    else
                    {
                        this.penetration = 0;
                    }
                }
                catch
                {
                    this.penetration = 0;
                }
                try
                {
                    if (proj.GetComponent <BounceProjModifier>() != null)
                    {
                        this.bounces = proj.GetComponent <BounceProjModifier>().numberOfBounces;
                    }
                    else
                    {
                        this.bounces = 0;
                    }
                }
                catch
                {
                    this.bounces = 0;
                }
                if (this.bounces > 40)
                {
                    this.bounces = 40;
                }
                try
                {
                    if (proj.GetComponent <GoopModifier>() != null)
                    {
                        GoopModifier goopMod = proj.GetComponent <GoopModifier>();
                        this.goopDefinition         = goopMod.goopDefinition;
                        this.SpawnGoopInFlight      = goopMod.SpawnGoopInFlight;
                        this.InFlightSpawnFrequency = goopMod.InFlightSpawnFrequency;
                        this.InFlightSpawnRadius    = goopMod.InFlightSpawnRadius;
                        this.SpawnGoopOnCollision   = goopMod.SpawnGoopOnCollision;
                        this.CollisionSpawnRadius   = goopMod.CollisionSpawnRadius;
                        this.spawnOffset            = goopMod.spawnOffset;
                        this.UsesInitialDelay       = goopMod.UsesInitialDelay;
                        this.InitialDelay           = goopMod.InitialDelay;
                        this.m_totalElapsed         = 0f;
                        this.elapsed   = 0f;
                        this.m_manager = null;
                        this.doGoop    = true;
                    }
                    else
                    {
                        this.doGoop = false;
                    }
                }
                catch
                {
                    this.doGoop = false;
                }
                Projectile result = null;
                if (proj.PossibleSourceGun != null)
                {
                    Gun  gun   = proj.PossibleSourceGun;
                    bool found = false;
                    if (gun.Volley != null)
                    {
                        foreach (ProjectileModule mod in gun.Volley.projectiles)
                        {
                            if (mod != null)
                            {
                                if (mod.shootStyle == ProjectileModule.ShootStyle.Charged)
                                {
                                    foreach (ProjectileModule.ChargeProjectile chargeProj in mod.chargeProjectiles)
                                    {
                                        if (chargeProj != null && chargeProj.Projectile != null && proj.name.Contains(chargeProj.Projectile.name))
                                        {
                                            result = chargeProj.Projectile;
                                            found  = true;
                                            break;
                                        }
                                    }
                                }
                                else
                                {
                                    foreach (Projectile proj2 in mod.projectiles)
                                    {
                                        if (proj2 != null && proj.name.Contains(proj2.name))
                                        {
                                            result = proj2;
                                            found  = true;
                                            break;
                                        }
                                    }
                                }
                            }
                            if (found == true)
                            {
                                break;
                            }
                        }
                    }
                    else
                    {
                        if (gun.singleModule != null)
                        {
                            if (gun.singleModule.shootStyle == ProjectileModule.ShootStyle.Charged)
                            {
                                foreach (ProjectileModule.ChargeProjectile chargeProj in gun.singleModule.chargeProjectiles)
                                {
                                    if (chargeProj != null && chargeProj.Projectile != null && proj.name.Contains(chargeProj.Projectile.name))
                                    {
                                        result = chargeProj.Projectile;
                                        found  = true;
                                        break;
                                    }
                                }
                            }
                            else
                            {
                                foreach (Projectile proj2 in gun.singleModule.projectiles)
                                {
                                    if (proj2 != null && proj.name.Contains(proj2.name))
                                    {
                                        result = proj2;
                                        found  = true;
                                        break;
                                    }
                                }
                            }
                        }
                    }
                    if (!found)
                    {
                        result = Toolbox.GetGunById(38).DefaultModule.projectiles[0];
                    }
                    else
                    {
                        if (livingGuns.Contains(gun.PickupObjectId))
                        {
                            this.isDoingLivingGunSynergy = true;
                        }
                    }
                }
                else
                {
                    result = Toolbox.GetGunById(38).DefaultModule.projectiles[0];
                }
                this.sourceProjectile = result;
                if (proj.sprite != null)
                {
                    if (proj.sprite.renderer != null)
                    {
                        proj.sprite.renderer.enabled = false;
                    }
                }
                proj.specRigidbody.CollideWithOthers  = false;
                proj.specRigidbody.CollideWithTileMap = false;
                proj.baseData.damage   = 0;
                proj.baseData.range    = float.MaxValue;
                proj.baseData.speed    = 0;
                proj.Owner             = this.m_owner;
                proj.Shooter           = this.m_owner.specRigidbody;
                this.currentProjectile = proj;
                player.StartCoroutine(this.HandleLaunch(player, deg));
            }
            catch
            {
                this.isLaunching = false;
            }
            yield break;
        }
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Globbit", "globbitlarge");

            Game.Items.Rename("outdated_gun_mods:globbit", "nn:globbit");
            gun.gameObject.AddComponent <GlobbitMEGA>();
            gun.SetShortDescription("Oh!");
            gun.SetLongDescription("Shrinks slowly as it's ammo depletes." + "\n\nA former Blobulonian soldier, genetically modified beyond the point of sapience until only a gun remained.");
            gun.SetupSprite(null, "globbitlarge_idle_001", 8);

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

            gun.SetAnimationFPS(gun.shootAnimation, 10);

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

            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 1.1f;;
            gun.DefaultModule.cooldownTime        = 0.5f;
            gun.DefaultModule.numberOfShotsInClip = 3;
            gun.SetBaseMaxAmmo(250);
            // 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.EXCLUDED; //B

            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       *= 0.5f;
            projectile.pierceMinorBreakables = true;
            projectile.baseData.range       *= 2f;
            GoopModifier blood = projectile.gameObject.AddComponent <GoopModifier>();

            blood.goopDefinition         = EasyGoopDefinitions.BlobulonGoopDef;
            blood.SpawnGoopInFlight      = true;
            blood.InFlightSpawnFrequency = 0.05f;
            blood.InFlightSpawnRadius    = 1f;
            blood.SpawnGoopOnCollision   = true;
            blood.CollisionSpawnRadius   = 2f;


            //ANIMATE BULLETS
            projectile.AnimateProjectile(new List <string> {
                "globbitlargeproj_1",
                "globbitlargeproj_2",
                "globbitlargeproj_1",
                "globbitlargeproj_3",
            }, 8, true, new List <IntVector2> {
                new IntVector2(15, 15), //1
                new IntVector2(13, 17), //2
                new IntVector2(15, 15), //3
                new IntVector2(17, 13), //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));


            projectile.transform.parent = gun.barrelOffset;


            gun.barrelOffset.transform.localPosition = new Vector3(1.93f, 1.12f, 0f);

            // Add the custom component here
            AmmoBasedFormeChanger formes = gun.gameObject.AddComponent <AmmoBasedFormeChanger>();

            formes.baseGunID        = gun.PickupObjectId;
            formes.lowerAmmoGunID   = GlobbitMED.GlobbitMediumID;
            formes.lowerAmmoAmount  = 200;
            formes.lowestAmmoGunID  = GlobbitSMALL.GlobbitSmallID;
            formes.lowestAmmoAmount = 100;


            GlobbitLargeID = gun.PickupObjectId;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
        }
Ejemplo n.º 16
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Orgun", "orgun");

            Game.Items.Rename("outdated_gun_mods:orgun", "nn:orgun");
            gun.gameObject.AddComponent <Orgun>();
            gun.SetShortDescription("My Heart Will Go On");
            gun.SetLongDescription("Hespera, the Pride of Venus, always wished that her fighting spirit, her courage... her heart, if you will, would go on to inspire and aid others." + "\n\nShe never realised how literal that would be.");

            gun.SetupSprite(null, "orgun_idle_001", 8);
            //ItemBuilder.AddPassiveStatModifier(gun, PlayerStats.StatType.GlobalPriceMultiplier, 0.925f, StatModifier.ModifyMethod.MULTIPLICATIVE);

            gun.SetAnimationFPS(gun.shootAnimation, 8);
            gun.SetAnimationFPS(gun.idleAnimation, 5);
            gun.AddPassiveStatModifier(PlayerStats.StatType.Health, 1f, StatModifier.ModifyMethod.ADDITIVE);

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

            //GUN STATS
            foreach (ProjectileModule mod in gun.Volley.projectiles)
            {
                mod.ammoCost            = 1;
                mod.shootStyle          = ProjectileModule.ShootStyle.Burst;
                mod.burstShotCount      = 2;
                mod.burstCooldownTime   = 0.2f;
                mod.sequenceStyle       = ProjectileModule.ProjectileSequenceStyle.Random;
                mod.cooldownTime        = 0.5f;
                mod.angleVariance       = 20f;
                mod.numberOfShotsInClip = 6;
                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.hitEffects.overrideMidairDeathVFX = (PickupObjectDatabase.GetById(369) as Gun).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.tileMapVertical.effects[0].effects[0].effect;
                projectile.hitEffects.alwaysUseMidair        = true;
                projectile.baseData.damage *= 1.4f;
                projectile.baseData.speed  *= 1.2f;
                GoopModifier blood = projectile.gameObject.AddComponent <GoopModifier>();
                blood.goopDefinition         = EasyGoopDefinitions.BlobulonGoopDef;
                blood.SpawnGoopInFlight      = true;
                blood.InFlightSpawnFrequency = 0.05f;
                blood.InFlightSpawnRadius    = 1f;
                blood.SpawnGoopOnCollision   = true;
                blood.CollisionSpawnRadius   = 2f;
                projectile.SetProjectileSpriteRight("orgun_projectile", 12, 7, true, tk2dBaseSprite.Anchor.MiddleCenter, 7, 7);
                if (mod != gun.DefaultModule)
                {
                    mod.ammoCost = 0;
                }
                projectile.transform.parent = gun.barrelOffset;
            }

            gun.reloadTime = 1.3f;
            gun.barrelOffset.transform.localPosition = new Vector3(2.62f, 0.81f, 0f);
            gun.SetBaseMaxAmmo(80);
            gun.gunClass = GunClass.SHOTGUN;
            //BULLET STATS
            gun.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Orgun Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/orgun_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/orgun_clipempty");


            // 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.A;
            gun.encounterTrackable.EncounterGuid = "this is the Orgun";
            ETGMod.Databases.Items.Add(gun, null, "ANY");

            OrgunID = gun.PickupObjectId;
            gun.SetupUnlockOnCustomMaximum(CustomTrackedMaximums.MAX_HEART_CONTAINERS_EVER, 7, DungeonPrerequisite.PrerequisiteOperation.GREATER_THAN);
        }
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Blizzkrieg", "blizzkrieg");

            Game.Items.Rename("outdated_gun_mods:blizzkrieg", "nn:blizzkrieg");
            var behav = gun.gameObject.AddComponent <Blizzkrieg>();

            gun.SetShortDescription("Kalt Action");
            gun.SetLongDescription("Fires chunks of hypercold H2O." + "\n\nSecret Blobulonian technology, developed during their ill-fated winter campaign.");

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


            gun.SetAnimationFPS(gun.shootAnimation, 12);

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

            foreach (ProjectileModule mod in gun.Volley.projectiles)
            {
                Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(mod.projectiles[0]);
                projectile.gameObject.SetActive(false);
                FakePrefab.MarkAsFakePrefab(projectile.gameObject);
                UnityEngine.Object.DontDestroyOnLoad(projectile);
                mod.projectiles[0] = (projectile);

                Projectile projectile2 = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(56) as Gun).DefaultModule.projectiles[0]);
                projectile2.gameObject.SetActive(false);
                FakePrefab.MarkAsFakePrefab(projectile2.gameObject);
                UnityEngine.Object.DontDestroyOnLoad(projectile2);
                projectile2.baseData.damage *= 1.6f;
                projectile2.baseData.speed  *= 1f;
                projectile2.damageTypes     |= CoreDamageTypes.Ice;

                ScaleProjectileStatOffPlayerStat coolnessScaling = projectile2.gameObject.AddComponent <ScaleProjectileStatOffPlayerStat>();
                coolnessScaling.multiplierPerLevelOfStat = 0.2f;
                coolnessScaling.projstat   = ScaleProjectileStatOffPlayerStat.ProjectileStatType.DAMAGE;
                coolnessScaling.playerstat = PlayerStats.StatType.Coolness;

                SimpleFreezingBulletBehaviour freezing = projectile2.gameObject.AddComponent <SimpleFreezingBulletBehaviour>();
                freezing.freezeAmount          = 40;
                freezing.useSpecialTint        = false;
                freezing.freezeAmountForBosses = 40;

                GoopModifier watering = projectile2.gameObject.AddComponent <GoopModifier>();
                watering.CollisionSpawnRadius = 0.8f;
                watering.SpawnGoopOnCollision = true;
                watering.SpawnGoopInFlight    = false;
                watering.goopDefinition       = EasyGoopDefinitions.WaterGoop;
                projectile2.SetProjectileSpriteRight("icicle_projectile", 13, 5, false, tk2dBaseSprite.Anchor.MiddleCenter, 13, 5);
                mod.projectiles.Add(projectile2);


                mod.ammoCost            = 1;
                mod.sequenceStyle       = ProjectileModule.ProjectileSequenceStyle.Random;
                mod.shootStyle          = ProjectileModule.ShootStyle.Automatic;
                mod.cooldownTime        = 0.1f;
                mod.angleVariance       = 34f;
                mod.numberOfShotsInClip = 30;
                if (mod != gun.DefaultModule)
                {
                    mod.ammoCost = 0;
                }
            }
            gun.reloadTime = 1.5f;
            gun.barrelOffset.transform.localPosition = new Vector3(2.56f, 0.81f, 0f);
            gun.SetBaseMaxAmmo(400);
            gun.gunClass = GunClass.ICE;
            gun.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Blizzkrieg Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/blizzkreig_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/blizzkreig_clipempty");


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

            BlizzkriegID = gun.PickupObjectId;
            gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.CHALLENGE_KEEPITCOOL_BEATEN, true);
        }