示例#1
0
        public static void Init()
        {
            string     itemName     = "Honey Pot";
            string     resourceName = "NevernamedsItems/Resources/honeypot_icon";
            GameObject obj          = new GameObject(itemName);
            var        item         = obj.AddComponent <HoneyPot>();

            ItemBuilder.AddSpriteToObject(itemName, resourceName, obj);
            string shortDesc = "A Little Something";
            string longDesc  = "A handy, throwable pot of sticky honey." + "\n\nSome Gundead tell whispers of buzzing coming from the Oubliette...";

            ItemBuilder.SetupItem(item, shortDesc, longDesc, "nn");
            ItemBuilder.SetCooldownType(item, ItemBuilder.CooldownType.Damage, 250);

            item.consumable = false;
            item.quality    = ItemQuality.D;

            PotProjectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(86) as Gun).DefaultModule.projectiles[0]);
            PotProjectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(PotProjectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(PotProjectile);
            PotProjectile.baseData.damage        *= 0f;
            PotProjectile.baseData.speed         *= 0.5f;
            PotProjectile.baseData.range         *= 0.5f;
            PotProjectile.collidesWithEnemies     = false;
            PotProjectile.collidesWithPlayer      = false;
            PotProjectile.collidesWithProjectiles = false;
            PotProjectile.pierceMinorBreakables   = true;
            PierceProjModifier keepComponent = PotProjectile.gameObject.GetOrAddComponent <PierceProjModifier>();

            keepComponent.penetratesBreakables = true;
            keepComponent.penetration         += 100;
            BounceProjModifier Bouncing = PotProjectile.gameObject.GetOrAddComponent <BounceProjModifier>();

            Bouncing.numberOfBounces += 100;

            PotProjectile.AnimateProjectile(new List <string> {
                "honeypotproj_1",
                "honeypotproj_2",
                "honeypotproj_3",
                "honeypotproj_4",
            }, 8, true, new List <IntVector2> {
                new IntVector2(19, 16), //1
                new IntVector2(16, 19), //2
                new IntVector2(19, 16), //3
                new IntVector2(16, 19), //4
            }, AnimateBullet.ConstructListOfSameValues(false, 4), AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 4),
                                            AnimateBullet.ConstructListOfSameValues(true, 4),
                                            AnimateBullet.ConstructListOfSameValues(false, 4),
                                            AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 4),
                                            new List <IntVector2?> {
                new IntVector2(14, 14), //1
                new IntVector2(14, 14), //2
                new IntVector2(14, 14), //3
                new IntVector2(14, 14), //3
            },
                                            AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 4),
                                            AnimateBullet.ConstructListOfSameValues <Projectile>(null, 4));
        }
示例#2
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);
        }
示例#3
0
        public static void Init()
        {
            string itemName     = "Ultraviolet Guon Stone";                                          //The name of the item
            string resourceName = "NevernamedsItems/Resources/GuonStones/ultravioletguonstone_icon"; //Refers to an embedded png in the project. Make sure to embed your resources!

            GameObject obj = new GameObject();

            var item = obj.AddComponent <UltraVioletGuonStone>();

            ItemBuilder.AddSpriteToObject(itemName, resourceName, obj);

            string shortDesc = "Beyond the Pale";
            string longDesc  = "A jittery crystal from a realm beyond the Gungeon." + "\n\nErratically jumps to different orbits.";

            ItemBuilder.SetupItem(item, shortDesc, longDesc, "nn");
            item.quality = PickupObject.ItemQuality.C;

            BuildPrefab();
            item.OrbitalPrefab = orbitalPrefab;
            BuildSynergyPrefab();

            item.HasAdvancedUpgradeSynergy    = true;
            item.AdvancedUpgradeSynergy       = "Ultravioleter Guon Stone";
            item.AdvancedUpgradeOrbitalPrefab = UltraVioletGuonStone.upgradeOrbitalPrefab.gameObject;

            xenochromePrefab = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(86) as Gun).DefaultModule.projectiles[0]);
            xenochromePrefab.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(xenochromePrefab.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(xenochromePrefab);
            xenochromePrefab.baseData.damage = 20f;
            xenochromePrefab.baseData.speed  = 0f;
            xenochromePrefab.AnimateProjectile(new List <string> {
                "thinline_pinkproj_001",
                "thinline_pinkproj_002",
                "thinline_pinkproj_003",
                "thinline_pinkproj_004",
                "thinline_pinkproj_005",
                "thinline_pinkproj_006",
            }, 10, true, new List <IntVector2> {
                new IntVector2(10, 10),
                new IntVector2(10, 10),
                new IntVector2(10, 10),
                new IntVector2(10, 10),
                new IntVector2(10, 10),
                new IntVector2(10, 10),
            }, AnimateBullet.ConstructListOfSameValues(true, 6), AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 6), AnimateBullet.ConstructListOfSameValues(true, 6), AnimateBullet.ConstructListOfSameValues(false, 6),
                                               AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 6), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 6), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 6), AnimateBullet.ConstructListOfSameValues <Projectile>(null, 6));
            BulletLifeTimer timer = xenochromePrefab.gameObject.AddComponent <BulletLifeTimer>();

            timer.secondsTillDeath = 2;
            ExplosiveModifier splode = xenochromePrefab.gameObject.AddComponent <ExplosiveModifier>();

            splode.doExplosion   = true;
            splode.explosionData = StaticExplosionDatas.explosiveRoundsExplosion;
            splode.IgnoreQueues  = true;
        }
示例#4
0
        public static void Init()
        {
            //The name of the item
            string itemName = "Cardinals Mitre";

            //Refers to an embedded png in the project. Make sure to embed your resources! Google it
            string resourceName = "NevernamedsItems/Resources/cardinalsmitre_icon";

            //Create new GameObject
            GameObject obj = new GameObject(itemName);

            //Add a PassiveItem component to the object
            var item = obj.AddComponent <CardinalsMitre>();

            //Adds a tk2dSprite component to the object and adds your texture to the item sprite collection
            ItemBuilder.AddSpriteToObject(itemName, resourceName, obj);

            //Ammonomicon entry variables
            string shortDesc = "Ex Cathedra";
            string longDesc  = "Fires a homing bullet upon reloading." + "\n\nImbued with power by a Bishop of the True Gun, hats like these are worn by Kaliber-devout Cardinals.";

            //Adds the item to the gungeon item list, the ammonomicon, the loot table, etc.
            //Do this after ItemBuilder.AddSpriteToObject!
            ItemBuilder.SetupItem(item, shortDesc, longDesc, "nn");


            //Set the rarity of the item
            item.quality = PickupObject.ItemQuality.C;

            //MITRE PROJECTILES
            MitreProjectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(86) as Gun).DefaultModule.projectiles[0]);
            MitreProjectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(MitreProjectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(MitreProjectile);
            MitreProjectile.baseData.damage *= 5f;
            MitreProjectile.baseData.speed  *= 0.4f;
            MitreProjectile.SetProjectileSpriteRight("mitreproj_1", 22, 22, true, tk2dBaseSprite.Anchor.MiddleCenter, 22, 22);

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

            homing.AngularVelocity = 80f;
            homing.HomingRadius    = 1000f;

            MitreProjectile.AnimateProjectile(new List <string> {
                "mitreproj_1",
                "mitreproj_2",
                "mitreproj_3",
            }, 10, true, new List <IntVector2> {
                new IntVector2(22, 22), //1
                new IntVector2(20, 20), //2
                new IntVector2(20, 20), //3
            }, AnimateBullet.ConstructListOfSameValues(true, 3), AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 3), AnimateBullet.ConstructListOfSameValues(true, 3), AnimateBullet.ConstructListOfSameValues(false, 3),
                                              AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 3), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 3), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 3), AnimateBullet.ConstructListOfSameValues <Projectile>(null, 3));
        }
示例#5
0
        public static void Init()
        {
            string        name          = "Fun Guy";
            string        resourcePath  = "NevernamedsItems/Resources/Companions/FunGuy/funguy_icon";
            GameObject    gameObject    = new GameObject();
            CompanionItem companionItem = gameObject.AddComponent <FunGuy>();

            ItemBuilder.AddSpriteToObject(name, resourcePath, gameObject);
            string shortDesc = "Myc-inda Fella";
            string longDesc  = "This young fungun has become dissilusioned with the ways of the Gungeon. Or at least, it seems that way. It's unclear if it really knows what's going on.";

            companionItem.SetupItem(shortDesc, longDesc, "nn");
            companionItem.quality       = PickupObject.ItemQuality.C;
            companionItem.CompanionGuid = FunGuy.guid;
            FunGuy.BuildPrefab();

            synergyFungusProj = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(86) as Gun).DefaultModule.projectiles[0]);
            synergyFungusProj.gameObject.MakeFakePrefab();
            synergyFungusProj.SetProjectileSpriteRight("yellowtriangleproj_001", 19, 17, true, tk2dBaseSprite.Anchor.MiddleCenter, 9, 9);
            FungoRandomBullets orAddComponent = synergyFungusProj.gameObject.GetOrAddComponent <FungoRandomBullets>();

            synergyFungusProj.baseData.speed *= 0.2f;
            synergyFungusProj.baseData.damage = 12.5f;
            PierceProjModifier pierce = synergyFungusProj.gameObject.AddComponent <PierceProjModifier>();

            pierce.penetration          = 1;
            pierce.penetratesBreakables = true;
            synergyFungusProj.gameObject.AddComponent <PierceDeadActors>();
            synergyFungusProj.pierceMinorBreakables = true;
            synergyFungusProj.AnimateProjectile(new List <string> {
                "yellowtriangleproj_001",
                "yellowtriangleproj_002",
                "yellowtriangleproj_003",
                "yellowtriangleproj_004",
            }, 10, true, new List <IntVector2> {
                new IntVector2(19, 17),
                new IntVector2(19, 17),
                new IntVector2(19, 17),
                new IntVector2(19, 17),
            },
                                                AnimateBullet.ConstructListOfSameValues(true, 4),
                                                AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 4),
                                                AnimateBullet.ConstructListOfSameValues(true, 4),
                                                AnimateBullet.ConstructListOfSameValues(false, 4),
                                                AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 4),
                                                AnimateBullet.ConstructListOfSameValues <IntVector2?>(new IntVector2(9, 9), 4),
                                                AnimateBullet.ConstructListOfSameValues <IntVector2?>(new IntVector2(5, 3), 4),
                                                AnimateBullet.ConstructListOfSameValues <Projectile>(null, 4));
        }
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Pillarocket", "pillarocket");

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

            behav.preventNormalFireAudio    = true;
            behav.preventNormalReloadAudio  = true;
            behav.overrideNormalFireAudio   = "Play_ENM_statue_stomp_01";
            behav.overrideNormalReloadAudio = "Play_ENM_statue_charge_01";
            gun.SetShortDescription("Ancient Shrine");
            gun.SetLongDescription("Fires vengeful effigies, under your command." + "\n\nInhabited by the souls of ancient gundead heroes.");

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


            gun.gunSwitchGroup = (PickupObjectDatabase.GetById(37) as Gun).gunSwitchGroup;
            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.DefaultModule.angleVariance       = 20;
            gun.DefaultModule.numberOfShotsInClip = 4;
            gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(372) as Gun).muzzleFlashEffects;
            gun.barrelOffset.transform.localPosition = new Vector3(2.18f, 1.68f, 0f);
            gun.SetBaseMaxAmmo(30);
            gun.ammo = 30;

            //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.speed        = 6.5f;
            projectile.baseData.damage       = 80f;
            projectile.baseData.range        = 100;
            projectile.baseData.force        = 10;
            projectile.pierceMinorBreakables = true;
            RemoteBulletsProjectileBehaviour remote = projectile.gameObject.GetOrAddComponent <RemoteBulletsProjectileBehaviour>();

            remote.trackingTime = 1000;
            PillarocketFiring firing = projectile.gameObject.GetOrAddComponent <PillarocketFiring>();

            projectile.AnimateProjectile(new List <string> {
                "pillarocket_proj_001",
                "pillarocket_proj_002",
                "pillarocket_proj_003",
                "pillarocket_proj_004",
                "pillarocket_proj_005",
                "pillarocket_proj_006",
                "pillarocket_proj_007",
                "pillarocket_proj_008",
                "pillarocket_proj_008",
                "pillarocket_proj_008",
                "pillarocket_proj_008",
                "pillarocket_proj_008",
                "pillarocket_proj_008",
                "pillarocket_proj_008",
                "pillarocket_proj_009",
                "pillarocket_proj_010",
                "pillarocket_proj_011",
                "pillarocket_proj_012",
                "pillarocket_proj_013",
                "pillarocket_proj_014",
            }, 20,                                                                                                        //FPS
                                         true,                                                                            //LOOPS
                                         AnimateBullet.ConstructListOfSameValues <IntVector2>(new IntVector2(15, 8), 20), //PIXELSIZES
                                         AnimateBullet.ConstructListOfSameValues(false, 20),                              //LIGHTENEDS
                                         AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleLeft, 20),   //ANCHORS
                                         AnimateBullet.ConstructListOfSameValues(false, 20),                              //ANCHORSCHANGECOLLIDERS
                                         AnimateBullet.ConstructListOfSameValues(false, 20),
                                         AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 20),
                                         AnimateBullet.ConstructListOfSameValues <IntVector2?>(new IntVector2(15, 6), 20),
                                         AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 20),
                                         AnimateBullet.ConstructListOfSameValues <Projectile>(null, 20));

            gun.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Pillarocket Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/pillarocket_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/pillarocket_clipempty");

            gun.DefaultModule.projectiles[0] = projectile;
            gun.gunClass = GunClass.EXPLOSIVE;
            gun.quality  = PickupObject.ItemQuality.S;
            ETGMod.Databases.Items.Add(gun, null, "ANY");

            Projectile akproj = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(15) as Gun).DefaultModule.projectiles[0]);

            akproj.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(akproj.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(akproj);
            akproj.SetProjectileSpriteRight("pillarocket_subprojectile", 5, 5, true, tk2dBaseSprite.Anchor.MiddleCenter, 3, 3);
            PillarocketAKProj = akproj;

            Projectile magnum = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(38) as Gun).DefaultModule.projectiles[0]);

            magnum.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(magnum.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(magnum);
            magnum.SetProjectileSpriteRight("pillarocket_subprojectile", 5, 5, true, tk2dBaseSprite.Anchor.MiddleCenter, 3, 3);
            PillarocketMagnumProj = magnum;

            Projectile shotproj = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(51) as Gun).DefaultModule.projectiles[0]);

            shotproj.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(shotproj.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(shotproj);
            shotproj.SetProjectileSpriteRight("pillarocket_subprojectile", 5, 5, true, tk2dBaseSprite.Anchor.MiddleCenter, 3, 3);
            PillarocketShotgunProj = shotproj;
            ID = gun.PickupObjectId;
        }
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Dimensionaliser", "dimensionaliser");

            Game.Items.Rename("outdated_gun_mods:dimensionaliser", "nn:dimensionaliser");
            gun.gameObject.AddComponent <Dimensionaliser>();
            gun.SetShortDescription("The Multiverse!");
            gun.SetLongDescription("Opens portals to random segments of the multiverse, letting kaliber-knows-what through." + "\n\n");

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

            gun.SetAnimationFPS(gun.shootAnimation, 14);

            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           = 2f;
            gun.DefaultModule.angleVariance          = 7;
            gun.muzzleFlashEffects                   = (PickupObjectDatabase.GetById(89) as Gun).muzzleFlashEffects;
            gun.DefaultModule.numberOfShotsInClip    = 2;
            gun.barrelOffset.transform.localPosition = new Vector3(0.81f, 0.43f, 0f);
            gun.SetBaseMaxAmmo(100);
            gun.ammo     = 100;
            gun.gunClass = GunClass.SILLY;
            Projectile portalSubProj = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            portalSubProj.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(portalSubProj.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(portalSubProj);
            portalSubProj.baseData.damage = 5f;
            portalSubProj.baseData.speed *= 1f;
            portalSubProj.hitEffects.overrideMidairDeathVFX = EasyVFXDatabase.GreenLaserCircleVFX;
            portalSubProj.hitEffects.alwaysUseMidair        = true;
            portalSubProj.SetProjectileSpriteRight("dimensionaliser_projectile", 12, 7, true, tk2dBaseSprite.Anchor.MiddleCenter, 10, 5);

            Projectile portal = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(86) as Gun).DefaultModule.projectiles[0]);

            portal.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(portal.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(portal);
            portal.baseData.damage = 0f;
            portal.baseData.speed  = 0f;
            portal.specRigidbody.CollideWithTileMap = false;
            portal.pierceMinorBreakables            = true;
            DimensionaliserPortal portalComp = portal.gameObject.GetOrAddComponent <DimensionaliserPortal>();

            portalComp.subProj = portalSubProj;
            NoCollideBehaviour noCollide = portal.gameObject.GetOrAddComponent <NoCollideBehaviour>();

            noCollide.worksOnEnemies                 = true;
            noCollide.worksOnProjectiles             = true;
            portal.hitEffects.overrideMidairDeathVFX = EasyVFXDatabase.GreenLaserCircleVFX;
            portal.hitEffects.alwaysUseMidair        = true;
            portal.AnimateProjectile(new List <string> {
                "dimensionaliser_portal_001",
                "dimensionaliser_portal_002",
                "dimensionaliser_portal_003",
                "dimensionaliser_portal_004",
                "dimensionaliser_portal_005",
                "dimensionaliser_portal_006",
                "dimensionaliser_portal_007",
                "dimensionaliser_portal_008",
                "dimensionaliser_portal_009",
                "dimensionaliser_portal_010", //TEN
                "dimensionaliser_portal_011",
                "dimensionaliser_portal_012",
                "dimensionaliser_portal_013",
                "dimensionaliser_portal_014",
                "dimensionaliser_portal_015",
                "dimensionaliser_portal_016",
                "dimensionaliser_portal_017",
                "dimensionaliser_portal_018",
                "dimensionaliser_portal_019",
                "dimensionaliser_portal_020", //TEN
                "dimensionaliser_portal_021",
                "dimensionaliser_portal_022",
                "dimensionaliser_portal_023",
                "dimensionaliser_portal_024",
                "dimensionaliser_portal_025",
                "dimensionaliser_portal_026",
                "dimensionaliser_portal_027",
                "dimensionaliser_portal_028",
                "dimensionaliser_portal_029",
                "dimensionaliser_portal_030", //TEN
                "dimensionaliser_portal_031",
                "dimensionaliser_portal_032",
                "dimensionaliser_portal_033",
                "dimensionaliser_portal_034",
                "dimensionaliser_portal_035",
                "dimensionaliser_portal_036",
                "dimensionaliser_portal_037",
                "dimensionaliser_portal_038",
                "dimensionaliser_portal_039",
                "dimensionaliser_portal_040", //TEN
                "dimensionaliser_portal_041",
                "dimensionaliser_portal_042",
                "dimensionaliser_portal_043",
                "dimensionaliser_portal_044",
                "dimensionaliser_portal_045",
                "dimensionaliser_portal_046",
                "dimensionaliser_portal_047",
                "dimensionaliser_portal_048",
                "dimensionaliser_portal_049",
                "dimensionaliser_portal_050", //TEN
                "dimensionaliser_portal_051",
                "dimensionaliser_portal_052",
                "dimensionaliser_portal_053",
                "dimensionaliser_portal_054",
                "dimensionaliser_portal_055",
                "dimensionaliser_portal_056",
                "dimensionaliser_portal_057",
                "dimensionaliser_portal_058",
                "dimensionaliser_portal_059",
                "dimensionaliser_portal_060", //TEN
                "dimensionaliser_portal_061",
                "dimensionaliser_portal_062",
                "dimensionaliser_portal_063",
                "dimensionaliser_portal_064",
                "dimensionaliser_portal_065",
                "dimensionaliser_portal_066",
                "dimensionaliser_portal_067",
                "dimensionaliser_portal_068",
                "dimensionaliser_portal_069",
                "dimensionaliser_portal_070", //TEN
                "dimensionaliser_portal_071",
                "dimensionaliser_portal_072",
                "dimensionaliser_portal_073",
                "dimensionaliser_portal_074",
                "dimensionaliser_portal_075",
                "dimensionaliser_portal_076",
                "dimensionaliser_portal_077",
                "dimensionaliser_portal_078",
                "dimensionaliser_portal_079",
                "dimensionaliser_portal_080", //TEN
                "dimensionaliser_portal_081",
                "dimensionaliser_portal_082",
                "dimensionaliser_portal_083",
                "dimensionaliser_portal_084",
                "dimensionaliser_portal_085",
                "dimensionaliser_portal_086",
                "dimensionaliser_portal_087",
                "dimensionaliser_portal_088",
                "dimensionaliser_portal_089",
                "dimensionaliser_portal_090",                                                                           //TEN
            },
                                     40,                                                                                //FPS
                                     true,                                                                              //Loops
                                     AnimateBullet.ConstructListOfSameValues(new IntVector2(55, 55), 90),               //Sprite Sizes
                                     AnimateBullet.ConstructListOfSameValues(true, 90),                                 //Lightened
                                     AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 90),   //Anchors
                                     AnimateBullet.ConstructListOfSameValues(true, 90),                                 //Anchors Change Colliders
                                     AnimateBullet.ConstructListOfSameValues(false, 90),                                //Fixes Scales
                                     AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 90),                      //Manual Offsets
                                     AnimateBullet.ConstructListOfSameValues <IntVector2?>(new IntVector2(30, 30), 90), //Collider Pixel Sizes
                                     AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 90),                   //Override Collider Offsets
                                     AnimateBullet.ConstructListOfSameValues <Projectile>(null, 90));


            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 = 1f;
            projectile.baseData.speed *= 3f;
            projectile.hitEffects.overrideMidairDeathVFX = EasyVFXDatabase.GreenLaserCircleVFX;
            projectile.hitEffects.alwaysUseMidair        = true;
            DimensionaliserProjectile dimensionaliserProj = projectile.gameObject.GetOrAddComponent <DimensionaliserProjectile>();

            dimensionaliserProj.portalPrefab = portal.gameObject;
            projectile.SetProjectileSpriteRight("dimensionaliser_projectile", 12, 7, true, tk2dBaseSprite.Anchor.MiddleCenter, 10, 5);
            gun.DefaultModule.projectiles[0] = projectile;

            gun.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Dimensionaliser Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/dimensionaliser_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/dimensionaliser_clipempty");

            gun.quality = PickupObject.ItemQuality.S;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            DimensionaliserID = gun.PickupObjectId;
        }
示例#8
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Big Shot", "bigshot");

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

            behav.preventNormalFireAudio    = true;
            behav.preventNormalReloadAudio  = true;
            behav.overrideNormalReloadAudio = "Play_NowsYourChanceToBeABigShot";
            gun.SetShortDescription("Now's Your Chance!");
            gun.SetLongDescription("The sign4ture weap0n of a [ONCE IN A LIFETIME OPPORTUNITY] that came to the Gungeon [ON AN ALL EXPENSES PAID HOLIDAY] seeking $$fr33$$! KROMER." + "\n\nYou're fill3d with [Hyperlink Blocked.].");

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

            gun.SetAnimationFPS(gun.shootAnimation, 12);
            gun.gunSwitchGroup = (PickupObjectDatabase.GetById(519) as Gun).gunSwitchGroup;
            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false);
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.reloadAnimation).wrapMode = tk2dSpriteAnimationClip.WrapMode.Loop;

            //GUN STATS
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Automatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 1.6f;
            gun.DefaultModule.cooldownTime           = 0.45f;
            gun.DefaultModule.numberOfShotsInClip    = 3;
            gun.barrelOffset.transform.localPosition = new Vector3(1.75f, 0.62f, 0f);
            gun.SetBaseMaxAmmo(100);
            gun.ammo     = 100;
            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       = 29.99f;
            projectile.baseData.speed       *= 0.7f;
            projectile.baseData.range       *= 2f;
            //ANIMATE BULLET
            projectile.AnimateProjectile(new List <string> {
                "bigshot_orangeproj_001",
                "bigshot_orangeproj_002",
                "bigshot_orangeproj_003",
            }, 10, true, new List <IntVector2> {
                new IntVector2(17, 16),  //1
                new IntVector2(17, 16),  //2
                new IntVector2(17, 16),  //3
            },
                                         AnimateBullet.ConstructListOfSameValues(true, 3),
                                         AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 3),
                                         AnimateBullet.ConstructListOfSameValues(true, 3),
                                         AnimateBullet.ConstructListOfSameValues(false, 3),
                                         AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 3),
                                         AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 3),
                                         AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 3),
                                         AnimateBullet.ConstructListOfSameValues <Projectile>(null, 3));
            projectile.gameObject.AddComponent <BigShotProjectileComp>();
            projectile.DestroyMode = Projectile.ProjectileDestroyMode.BecomeDebris;
            projectile.SetProjectileSpriteRight("bigshot_orangeproj_001", 17, 16, true, tk2dBaseSprite.Anchor.MiddleCenter, 17, 16);

            Projectile projectile2 = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(86) as Gun).DefaultModule.projectiles[0]);

            projectile2.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile2.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile2);
            projectile2.baseData.damage = 29.99f;
            projectile2.baseData.speed *= 0.7f;
            projectile2.baseData.range *= 2f;

            //ANIMATE BULLET
            projectile2.AnimateProjectile(new List <string> {
                "bigshot_pinkproj_001",
                "bigshot_pinkproj_002",
                "bigshot_pinkproj_003",
            }, 16, true, new List <IntVector2> {
                new IntVector2(17, 15), //1
                new IntVector2(17, 15), //2
                new IntVector2(17, 15), //3
            }, AnimateBullet.ConstructListOfSameValues(true, 3),
                                          AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 3),
                                          AnimateBullet.ConstructListOfSameValues(true, 3),
                                          AnimateBullet.ConstructListOfSameValues(false, 3),
                                          AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 3),
                                          AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 3),
                                          AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 3),
                                          AnimateBullet.ConstructListOfSameValues <Projectile>(null, 3));
            projectile2.SetProjectileSpriteRight("bigshot_pinkproj_001", 17, 15, true, tk2dBaseSprite.Anchor.MiddleCenter, 17, 15);
            projectile2.DestroyMode = Projectile.ProjectileDestroyMode.BecomeDebris;
            projectile2.gameObject.AddComponent <BigShotProjectileComp>();
            gun.DefaultModule.projectiles.Add(projectile2);


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

            BigShotID = gun.PickupObjectId;



            //SPAMTON HEAD
            Projectile spamtonHead = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(56) as Gun).DefaultModule.projectiles[0]);

            spamtonHead.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(spamtonHead.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(spamtonHead);
            spamtonHead.baseData.damage                   = 7f;
            spamtonHead.baseData.speed                   *= 1.2f;
            spamtonHead.hitEffects.alwaysUseMidair        = true;
            spamtonHead.hitEffects.overrideMidairDeathVFX = EasyVFXDatabase.WhiteCircleVFX;
            spamtonHead.AnimateProjectile(new List <string> {
                "spamtonhead_001",
                "spamtonhead_002",
            }, 4, true, new List <IntVector2> {
                new IntVector2(10, 13), //1
                new IntVector2(10, 11), //2
            }, AnimateBullet.ConstructListOfSameValues(true, 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(5, 5), 2),
                                          AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 2),
                                          AnimateBullet.ConstructListOfSameValues <Projectile>(null, 2));
            spamtonHead.SetProjectileSpriteRight("spamtonhead_001", 10, 13, true, tk2dBaseSprite.Anchor.MiddleCenter, 5, 5);

            //PIPIS
            Projectile pipisProj = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(86) as Gun).DefaultModule.projectiles[0]);

            pipisProj.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(pipisProj.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(pipisProj);
            pipisProj.baseData.damage = 29.99f;
            pipisProj.baseData.speed *= 0.7f;
            pipisProj.baseData.range *= 0.7f;
            pipisProj.AnimateProjectile(new List <string> {
                "pipis_001",
                "pipis_002",
                "pipis_003",
                "pipis_004",
            }, 8, true, new List <IntVector2> {
                new IntVector2(12, 12), //1
                new IntVector2(12, 12), //2
                new IntVector2(12, 12), //3
                new IntVector2(12, 12), //3
            }, AnimateBullet.ConstructListOfSameValues(true, 4),
                                        AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 4),
                                        AnimateBullet.ConstructListOfSameValues(true, 4),
                                        AnimateBullet.ConstructListOfSameValues(false, 4),
                                        AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 4),
                                        AnimateBullet.ConstructListOfSameValues <IntVector2?>(new IntVector2(5, 5), 4),
                                        AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 4),
                                        AnimateBullet.ConstructListOfSameValues <Projectile>(null, 4));
            pipisProj.SetProjectileSpriteRight("pipis_001", 12, 12, true, tk2dBaseSprite.Anchor.MiddleCenter, 5, 5);
            pipisProj.DestroyMode = Projectile.ProjectileDestroyMode.BecomeDebris;
            pipisProj.gameObject.AddComponent <BigShotProjectileComp>();
            SpawnProjModifier projMod = pipisProj.gameObject.AddComponent <SpawnProjModifier>();

            projMod.spawnOnObjectCollisions      = true;
            projMod.spawnProjecitlesOnDieInAir   = true;
            projMod.spawnProjectilesOnCollision  = true;
            projMod.spawnProjectilesInFlight     = false;
            projMod.collisionSpawnStyle          = SpawnProjModifier.CollisionSpawnStyle.FLAK_BURST;
            projMod.alignToSurfaceNormal         = true;
            projMod.numberToSpawnOnCollison      = 5;
            projMod.projectileToSpawnOnCollision = spamtonHead;
            pipis = pipisProj;
        }
示例#9
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("The Thin Line", "thinline");

            Game.Items.Rename("outdated_gun_mods:the_thin_line", "nn:the_thin_line");
            gun.gameObject.AddComponent <TheThinLine>();
            gun.SetShortDescription("Scienced To The Max");
            gun.SetLongDescription("A slimmed down, pocket version of the tachyon projectile emmitter known as the Fat Line." + "\n\nIt's projectiles defy each other, and have volatile effects upon meeting.");

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

            gun.SetAnimationFPS(gun.shootAnimation, 10);

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

            //GUN STATS
            gun.reloadTime = 1f;
            gun.barrelOffset.transform.localPosition = new Vector3(1.37f, 0.87f, 0f);
            gun.SetBaseMaxAmmo(260);
            gun.ammo     = 200;
            gun.gunClass = GunClass.PISTOL;
            foreach (ProjectileModule mod in gun.Volley.projectiles)
            {
                mod.shootStyle          = ProjectileModule.ShootStyle.SemiAutomatic;
                mod.sequenceStyle       = ProjectileModule.ProjectileSequenceStyle.Random;
                mod.cooldownTime        = 0.20f;
                mod.numberOfShotsInClip = 6;
                mod.angleVariance       = 0f;

                if (mod != gun.DefaultModule)
                {
                    Projectile projectile = DataCloners.CopyFields <TachyonProjectile>(Instantiate(mod.projectiles[0]));
                    projectile.gameObject.SetActive(false);
                    FakePrefab.MarkAsFakePrefab(projectile.gameObject);
                    UnityEngine.Object.DontDestroyOnLoad(projectile);
                    projectile.baseData.damage      *= 2f;
                    projectile.baseData.speed       *= 0.5f;
                    projectile.pierceMinorBreakables = true;
                    ThinLineCollidee collidee = projectile.gameObject.GetOrAddComponent <ThinLineCollidee>();
                    mod.ammoCost = 0;
                    projectile.AnimateProjectile(new List <string> {
                        "thinline_pinkproj_001",
                        "thinline_pinkproj_002",
                        "thinline_pinkproj_003",
                        "thinline_pinkproj_004",
                        "thinline_pinkproj_005",
                        "thinline_pinkproj_006",
                    }, 10, true, new List <IntVector2> {
                        new IntVector2(10, 10),
                        new IntVector2(10, 10),
                        new IntVector2(10, 10),
                        new IntVector2(10, 10),
                        new IntVector2(10, 10),
                        new IntVector2(10, 10),
                    }, AnimateBullet.ConstructListOfSameValues(true, 6), AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 6), AnimateBullet.ConstructListOfSameValues(true, 6), AnimateBullet.ConstructListOfSameValues(false, 6),
                                                 AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 6), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 6), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 6), AnimateBullet.ConstructListOfSameValues <Projectile>(null, 6));
                    mod.projectiles[0] = projectile;
                }
                else
                {
                    Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(mod.projectiles[0]);
                    projectile.gameObject.SetActive(false);
                    FakePrefab.MarkAsFakePrefab(projectile.gameObject);
                    UnityEngine.Object.DontDestroyOnLoad(projectile);
                    projectile.baseData.damage *= 2f;
                    projectile.baseData.speed  *= 0.5f;
                    projectile.AnimateProjectile(new List <string> {
                        "thinline_blueproj_001",
                        "thinline_blueproj_002",
                        "thinline_blueproj_003",
                        "thinline_blueproj_004",
                        "thinline_blueproj_005",
                        "thinline_blueproj_006",
                    }, 10, true, new List <IntVector2> {
                        new IntVector2(10, 10),
                        new IntVector2(10, 10),
                        new IntVector2(10, 10),
                        new IntVector2(10, 10),
                        new IntVector2(10, 10),
                        new IntVector2(10, 10),
                    }, AnimateBullet.ConstructListOfSameValues(true, 6), AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 6), AnimateBullet.ConstructListOfSameValues(true, 6), AnimateBullet.ConstructListOfSameValues(false, 6),
                                                 AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 6), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 6), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 6), AnimateBullet.ConstructListOfSameValues <Projectile>(null, 6));
                    mod.ammoCost = 1;
                    ThinLineCollision collider = projectile.gameObject.GetOrAddComponent <ThinLineCollision>();
                    mod.projectiles[0] = projectile;
                }
            }
            gun.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Thinline Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/thinline_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/thinline_clipempty");

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

            gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.PURCHASED_THETHINLINE, true);
            gun.AddItemToDougMetaShop(25);
            ID = gun.PickupObjectId;
        }
示例#10
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Killithid Tendril", "killithidtendril");

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

            behav.preventNormalFireAudio    = true;
            behav.preventNormalReloadAudio  = true;
            behav.overrideNormalFireAudio   = "Play_ENM_squidface_cast_01";
            behav.overrideNormalReloadAudio = "Play_ENM_squidface_chant_01";
            gun.SetShortDescription("Wiggle Wiggle");
            gun.SetLongDescription("A tadpole of the Killithid species, capable of opening up portals to it's home dimension." + "\n\nWhile currently dormant, one day it will become active and burrow into the head of a sapient humanoid, eat their brain, and turn them into another Killithid.");

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

            gun.SetAnimationFPS(gun.shootAnimation, 10);

            gun.gunSwitchGroup = (PickupObjectDatabase.GetById(35) as Gun).gunSwitchGroup;
            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.Ordered;
            gun.reloadTime = 1f;
            gun.DefaultModule.cooldownTime           = 0.4f;
            gun.muzzleFlashEffects.type              = VFXPoolType.None;
            gun.DefaultModule.numberOfShotsInClip    = 200;
            gun.barrelOffset.transform.localPosition = new Vector3(0.93f, 0.56f, 0f);
            gun.SetBaseMaxAmmo(200);
            gun.ammo     = 200;
            gun.gunClass = GunClass.SILLY;
            Projectile subproj = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            subproj.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(subproj.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(subproj);
            subproj.baseData.damage = 8f;
            subproj.SetProjectileSpriteRight("enemystyleproj", 10, 10, true, tk2dBaseSprite.Anchor.MiddleCenter, 8, 8);
            subProjectile = subproj;


            //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 = 15f;
            projectile.baseData.speed  = 0;
            RandomRoomPosBehaviour roompos  = projectile.gameObject.AddComponent <RandomRoomPosBehaviour>();
            BulletLifeTimer        lifespan = projectile.gameObject.AddComponent <BulletLifeTimer>();

            lifespan.secondsTillDeath = 15f;
            PierceProjModifier piercing = projectile.gameObject.AddComponent <PierceProjModifier>();

            piercing.penetration          = 100;
            piercing.penetratesBreakables = true;
            SpawnProjModifier firing = projectile.gameObject.AddComponent <SpawnProjModifier>();

            firing.InFlightSourceTransform               = projectile.transform;
            firing.projectileToSpawnInFlight             = subProjectile;
            firing.PostprocessSpawnedProjectiles         = true;
            firing.spawnProjectilesInFlight              = true;
            firing.spawnProjecitlesOnDieInAir            = false;
            firing.spawnOnObjectCollisions               = false;
            firing.inFlightAimAtEnemies                  = true;
            firing.usesComplexSpawnInFlight              = true;
            firing.numToSpawnInFlight                    = 1;
            firing.inFlightSpawnCooldown                 = 1;
            projectile.baseData.force                   *= 1.2f;
            projectile.hitEffects.alwaysUseMidair        = true;
            projectile.hitEffects.overrideMidairDeathVFX = EasyVFXDatabase.YellowLaserCircleVFX;
            projectile.AnimateProjectile(new List <string> {
                "goopyproj_001",
                "goopyproj_002",
                "goopyproj_003",
                "goopyproj_004",
            }, 10, true, new List <IntVector2> {
                new IntVector2(16, 16),
                new IntVector2(20, 20),
                new IntVector2(24, 24),
                new IntVector2(20, 20),
            }, AnimateBullet.ConstructListOfSameValues(true, 4), AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 4), AnimateBullet.ConstructListOfSameValues(true, 4), AnimateBullet.ConstructListOfSameValues(false, 4),
                                         AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 4), AnimateBullet.ConstructListOfSameValues <IntVector2?>(new IntVector2(16, 16), 4), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 4), AnimateBullet.ConstructListOfSameValues <Projectile>(null, 4));

            gun.DefaultModule.projectiles[0] = projectile;

            gun.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("KillithidTendril Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/killithidtendril_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/killithidtendril_clipempty");

            gun.quality = PickupObject.ItemQuality.B;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            KillithidTendrilID = gun.PickupObjectId;
        }
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Protean", "protean");

            Game.Items.Rename("outdated_gun_mods:protean", "nn:protean");
            gun.gameObject.AddComponent <Protean>();
            gun.SetShortDescription("Inexplicable");
            gun.SetLongDescription("These loosely bound motes of gun floated into existence through a tear in the curtain eons before the Great Bullet struck." + "\n\nIt's fractal bullets carve hauntingly beautiful patterns in the air, at least for those who can understand them.");

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

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

            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.4f;
            gun.muzzleFlashEffects                   = (PickupObjectDatabase.GetById(97) as Gun).muzzleFlashEffects;
            gun.DefaultModule.numberOfShotsInClip    = 6;
            gun.barrelOffset.transform.localPosition = new Vector3(1.56f, 0.62f, 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.baseData.damage      *= 3f;
            projectile.baseData.speed       *= 0.7f;
            projectile.baseData.range       *= 10f;
            BounceProjModifier Bouncing = projectile.gameObject.GetOrAddComponent <BounceProjModifier>();

            Bouncing.numberOfBounces = 5;
            RepeatedRandomReAim erraticmovement = projectile.gameObject.AddComponent <RepeatedRandomReAim>();

            projectile.pierceMinorBreakables = true;


            projectile.AnimateProjectile(new List <string> {
                "proteanproj_1",
                "proteanproj_2",
                "proteanproj_3",
                "proteanproj_4",
                "proteanproj_5",
                "proteanproj_6",
                "proteanproj_7",
                "proteanproj_8",
            }, 8, true, new List <IntVector2> {
                new IntVector2(9, 9), //1
                new IntVector2(9, 9), //2
                new IntVector2(9, 9), //3
                new IntVector2(9, 9), //4
                new IntVector2(9, 9), //5
                new IntVector2(9, 9), //6
                new IntVector2(9, 9), //7
                new IntVector2(9, 9), //8
            }, AnimateBullet.ConstructListOfSameValues(true, 8), AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 8), AnimateBullet.ConstructListOfSameValues(true, 8), AnimateBullet.ConstructListOfSameValues(false, 8),
                                         AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 8), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 8), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 8), AnimateBullet.ConstructListOfSameValues <Projectile>(null, 8));

            projectile.transform.parent = gun.barrelOffset;


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

            ProteanID = gun.PickupObjectId;
        }
示例#12
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Dynamite Launcher", "dynamitelauncher");

            Game.Items.Rename("outdated_gun_mods:dynamite_launcher", "nn:dynamite_launcher");
            gun.gameObject.AddComponent <DynamiteLauncher>();
            gun.SetShortDescription("Dynamight makes Dynaright");
            gun.SetLongDescription("Fires a potent stick of nitroglycerin." + "\n\nCreated by mad Nitra Gunsmith, before he realised that he didn't have hands.");

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

            gun.outOfAmmoAnimation = "empty";

            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.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.56f, 0.62f, 0f);
            gun.SetBaseMaxAmmo(40);
            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      *= 6f;
            projectile.baseData.speed       *= 0.4f;
            projectile.baseData.range       *= 1f;
            BounceProjModifier Bouncing = projectile.gameObject.GetOrAddComponent <BounceProjModifier>();

            Bouncing.numberOfBounces = 1;
            ExplosiveModifier exploding = projectile.gameObject.GetOrAddComponent <ExplosiveModifier>();

            exploding.doExplosion   = true;
            exploding.explosionData = StaticExplosionDatas.customDynamiteExplosion;

            projectile.pierceMinorBreakables = true;


            projectile.AnimateProjectile(new List <string> {
                "dynamiteproj_1",
                "dynamiteproj_2",
                "dynamiteproj_3",
                "dynamiteproj_4",
            }, 8, true, new List <IntVector2> {
                new IntVector2(14, 15), //1
                new IntVector2(15, 14), //2
                new IntVector2(14, 15), //3
                new IntVector2(15, 14), //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.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Dynamite Launcher Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/dynamitelauncher_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/dynamitelauncher_clipempty");

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

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

            gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.NITRA_QUEST_REWARDED, true);
        }
示例#13
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("AM-0 Spread Forme", "am0spreadforme");

            Game.Items.Rename("outdated_gun_mods:am-0_spread_forme", "nn:am0+spreadshot");
            gun.gameObject.AddComponent <AM0SpreadForme>();
            gun.SetShortDescription("Fires Ammunition");
            gun.SetLongDescription("" + "\n\nThis gun is comically stuffed with whole ammo boxes.");

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

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

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

            //GUN STATS
            gun.reloadTime = 0.8f;
            gun.barrelOffset.transform.localPosition = new Vector3(2.43f, 0.75f, 0f);
            gun.SetBaseMaxAmmo(500);
            gun.ammo = 500;



            foreach (ProjectileModule mod in gun.Volley.projectiles)
            {
                mod.angleVariance       = 35;
                mod.cooldownTime        = 0.11f;
                mod.numberOfShotsInClip = 30;
                mod.ammoCost            = 1;
                mod.shootStyle          = ProjectileModule.ShootStyle.Automatic;
                mod.sequenceStyle       = ProjectileModule.ProjectileSequenceStyle.Random;

                //BULLET STATS
                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.baseData.damage *= 0.55f;
                projectile.baseData.speed  *= 0.7f;
                projectile.baseData.range  *= 2f;
                if (mod != gun.DefaultModule)
                {
                    mod.ammoCost = 0;
                }

                projectile.AnimateProjectile(new List <string> {
                    "spreadammoproj_1",
                    "spreadammoproj_2",
                    "spreadammoproj_3",
                    "spreadammoproj_4",
                    "spreadammoproj_5",
                    "spreadammoproj_6",
                    "spreadammoproj_7",
                    "spreadammoproj_8",
                    "spreadammoproj_9",
                    "spreadammoproj_10",
                    "spreadammoproj_11",
                    "spreadammoproj_12",
                    "spreadammoproj_13",
                    "spreadammoproj_14",
                    "spreadammoproj_15",
                    "spreadammoproj_16"
                }, 16, true, new List <IntVector2> {
                    new IntVector2(11, 14), //1
                    new IntVector2(13, 16), //2            All frames are 13x16 except select ones that are 11-14
                    new IntVector2(13, 16), //3
                    new IntVector2(13, 16), //4
                    new IntVector2(11, 14), //5
                    new IntVector2(13, 16), //6
                    new IntVector2(13, 16), //7
                    new IntVector2(13, 16), //8
                    new IntVector2(11, 14), //9
                    new IntVector2(13, 16), //10
                    new IntVector2(13, 16), //11
                    new IntVector2(13, 16), //12
                    new IntVector2(11, 14), //13
                    new IntVector2(13, 16), //14
                    new IntVector2(13, 16), //15
                    new IntVector2(13, 16), //16
                }, AnimateBullet.ConstructListOfSameValues(false, 16), AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 16), AnimateBullet.ConstructListOfSameValues(true, 16), AnimateBullet.ConstructListOfSameValues(false, 16),
                                             AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 16), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 16), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 16), AnimateBullet.ConstructListOfSameValues <Projectile>(null, 16));

                projectile.SetProjectileSpriteRight("spreadammoproj_1", 11, 14, false, tk2dBaseSprite.Anchor.MiddleCenter, 11, 14);



                projectile.transform.parent = gun.barrelOffset;
            }

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

            AM0SpreadFormeID = gun.PickupObjectId;
        }
        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");
        }
示例#15
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;
        }
        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);
        }
示例#17
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Hot Glue Gun", "hotgluegun");

            Game.Items.Rename("outdated_gun_mods:hot_glue_gun", "nn:hot_glue_gun");
            gun.gameObject.AddComponent <HotGlueGun>();
            gun.SetShortDescription("Ow!.. Heat was Hot!");
            gun.SetLongDescription("Glues your foes in place, and has a chance to set them ablaze." + "\n\nPioneered by amateur guncrafters, and generally considered one of the most painful methods of adhesive application.");

            gun.SetupSprite(null, "hotgluegun_idle_001", 8);
            gun.gunSwitchGroup = (PickupObjectDatabase.GetById(199) 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 = 0.7f;
            gun.DefaultModule.cooldownTime           = 0.4f;
            gun.DefaultModule.numberOfShotsInClip    = 5;
            gun.barrelOffset.transform.localPosition = new Vector3(0.75f, 0.31f, 0f);
            gun.SetBaseMaxAmmo(150);
            gun.ammo     = 150;
            gun.gunClass = GunClass.FIRE;
            //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  *= 0.5f;
            projectile.baseData.range  *= 0.5f;

            ApplyLockdownBulletBehaviour applylockdown = projectile.gameObject.AddComponent <ApplyLockdownBulletBehaviour>();

            applylockdown.useSpecialBulletTint = false;
            applylockdown.duration             = 5f;
            applylockdown.enemyTintColour      = ExtendedColours.paleYellow;
            applylockdown.TintEnemy            = true;
            applylockdown.TintCorpse           = true;
            applylockdown.corpseTintColour     = ExtendedColours.paleYellow;

            ExtremelySimpleStatusEffectBulletBehaviour burning = projectile.gameObject.AddComponent <ExtremelySimpleStatusEffectBulletBehaviour>();

            burning.onHitProcChance   = 0.07f;
            burning.onFiredProcChance = 1f;
            burning.usesFireEffect    = true;
            burning.fireEffect        = StaticStatusEffects.hotLeadEffect;

            projectile.AnimateProjectile(new List <string> {
                "gluegunproj_1",
                "gluegunproj_2",
                "gluegunproj_1",
                "gluegunproj_3",
            }, 8, true, new List <IntVector2> {
                new IntVector2(5, 5), //1
                new IntVector2(4, 6), //2
                new IntVector2(5, 5), //3
                new IntVector2(6, 4), //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.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("HotGlueGun Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/hotgluegun_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/hotgluegun_clipempty");
            gun.quality = PickupObject.ItemQuality.B;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            HotGlueGunID = gun.PickupObjectId;
        }
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Ferrobolt", "ferrobolt");

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

            behav.preventNormalFireAudio = true;
            gun.SetShortDescription("Law of Attraction");
            gun.SetLongDescription("Fires alternating monopolar electromagnetic blasts." + "\n\nUpon the discovery of the first monopole, the tech was immediately weaponised.");

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

            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) 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.Ordered;
            gun.reloadTime = 0.5f;
            gun.DefaultModule.cooldownTime  = 0.2f;
            gun.DefaultModule.angleVariance = 0;
            gun.muzzleFlashEffects          = (PickupObjectDatabase.GetById(23) as Gun).muzzleFlashEffects;

            gun.DefaultModule.numberOfShotsInClip    = 8;
            gun.barrelOffset.transform.localPosition = new Vector3(35f / 16f, 7f / 16f, 0f);
            gun.SetBaseMaxAmmo(100);
            gun.ammo     = 100;
            gun.gunClass = GunClass.CHARGE;
            gun.SetAnimationFPS(gun.chargeAnimation, 8);
            gun.SetAnimationFPS(gun.reloadAnimation, 10);
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).wrapMode  = tk2dSpriteAnimationClip.WrapMode.LoopSection;
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).loopStart = 2;

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

            //BULLET STATS
            Projectile projectile = gun.DefaultModule.projectiles[0].gameObject.InstantiateAndFakeprefab().GetComponent <Projectile>();

            projectile.baseData.damage = 0f;
            projectile.baseData.force  = 0f;

            NoCollideBehaviour nocollide = projectile.gameObject.AddComponent <NoCollideBehaviour>();

            nocollide.worksOnEnemies     = true;
            nocollide.worksOnProjectiles = true;

            BounceProjModifier bounce = projectile.gameObject.AddComponent <BounceProjModifier>();

            bounce.numberOfBounces = 100;

            FerroboltOrbController orb = projectile.gameObject.AddComponent <FerroboltOrbController>();

            SlowDownOverTimeModifier slowDown = projectile.gameObject.AddComponent <SlowDownOverTimeModifier>();

            slowDown.timeToSlowOver                = 0.5f;
            slowDown.killAfterCompleteStop         = true;
            slowDown.timeTillKillAfterCompleteStop = 12f;

            projectile.hitEffects.overrideMidairDeathVFX = (PickupObjectDatabase.GetById(57) as Gun).DefaultModule.projectiles[0].hitEffects.overrideMidairDeathVFX;
            projectile.hitEffects.alwaysUseMidair        = true;
            projectile.AnimateProjectile(new List <string> {
                "ferrobolt_orb_001",
                "ferrobolt_orb_002",
                "ferrobolt_orb_003",
                "ferrobolt_orb_004",
            }, 10, true, new List <IntVector2> {
                new IntVector2(14, 14),  //1
                new IntVector2(14, 14),  //1
                new IntVector2(14, 14),  //1
                new IntVector2(14, 14),  //1
            },
                                         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?>(new IntVector2(8, 8), 4),
                                         AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 4),
                                         AnimateBullet.ConstructListOfSameValues <Projectile>(null, 4));

            projectile.SetProjectileSpriteRight("ferrobolt_orb_001", 14, 14, true, tk2dBaseSprite.Anchor.MiddleCenter, 8, 8);

            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("Ferrobolt Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/ferrobolt_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/ferrobolt_clipempty");

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


            Projectile bolt = (PickupObjectDatabase.GetById(56) as Gun).DefaultModule.projectiles[0].gameObject.InstantiateAndFakeprefab().GetComponent <Projectile>();

            bolt.baseData.damage = 30f;
            bolt.baseData.speed *= 2f;
            bolt.baseData.force *= 2f;
            PierceProjModifier piercing = bolt.gameObject.AddComponent <PierceProjModifier>();

            piercing.penetration       = 100;
            bolt.pierceMinorBreakables = true;
            bolt.SetProjectileSpriteRight("ferrobolt_bolt_001", 19, 8, true, tk2dBaseSprite.Anchor.MiddleCenter, 16, 6);
            bolt.hitEffects.overrideMidairDeathVFX = (PickupObjectDatabase.GetById(57) as Gun).DefaultModule.chargeProjectiles[0].Projectile.hitEffects.overrideMidairDeathVFX;
            bolt.hitEffects.alwaysUseMidair        = true;
            bolt.gameObject.AddComponent <FerroboltBoltController>();
            launchProj = bolt;
        }
示例#19
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("AM-0", "am0");

            Game.Items.Rename("outdated_gun_mods:am-0", "nn:am0");
            gun.gameObject.AddComponent <AM0>();
            gun.SetShortDescription("Fires Ammunition");
            gun.SetLongDescription("Becomes more powerful the more times it's ammo is refilled." + "\n\nThis gun is comically stuffed with whole ammo boxes.");

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

            gun.SetAnimationFPS(gun.shootAnimation, 12);
            gun.gunSwitchGroup = (PickupObjectDatabase.GetById(519) 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 = 0.8f;
            gun.DefaultModule.cooldownTime           = 0.11f;
            gun.DefaultModule.numberOfShotsInClip    = 30;
            gun.barrelOffset.transform.localPosition = new Vector3(2.43f, 0.75f, 0f);
            gun.SetBaseMaxAmmo(500);
            gun.ammo     = 500;
            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       *= 0.7f;
            projectile.baseData.range       *= 2f;

            //ANIMATE BULLET
            projectile.AnimateProjectile(new List <string> {
                "ammoproj_1",
                "ammoproj_2",
                "ammoproj_3",
                "ammoproj_4",
                "ammoproj_5",
                "ammoproj_6",
                "ammoproj_7",
                "ammoproj_8",
                "ammoproj_9",
                "ammoproj_10",
                "ammoproj_11",
                "ammoproj_12",
                "ammoproj_13",
                "ammoproj_14",
                "ammoproj_15",
                "ammoproj_16"
            }, 16, true, new List <IntVector2> {
                new IntVector2(11, 14), //1
                new IntVector2(13, 16), //2            All frames are 13x16 except select ones that are 11-14
                new IntVector2(13, 16), //3
                new IntVector2(13, 16), //4
                new IntVector2(11, 14), //5
                new IntVector2(13, 16), //6
                new IntVector2(13, 16), //7
                new IntVector2(13, 16), //8
                new IntVector2(11, 14), //9
                new IntVector2(13, 16), //10
                new IntVector2(13, 16), //11
                new IntVector2(13, 16), //12
                new IntVector2(11, 14), //13
                new IntVector2(13, 16), //14
                new IntVector2(13, 16), //15
                new IntVector2(13, 16), //16
            }, AnimateBullet.ConstructListOfSameValues(false, 16), AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 16), AnimateBullet.ConstructListOfSameValues(true, 16), AnimateBullet.ConstructListOfSameValues(false, 16),
                                         AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 16), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 16), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 16), AnimateBullet.ConstructListOfSameValues <Projectile>(null, 16));

            projectile.SetProjectileSpriteRight("ammoproj_1", 11, 14, false, tk2dBaseSprite.Anchor.MiddleCenter, 11, 14);

            projectile.transform.parent      = gun.barrelOffset;
            gun.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("AM0 Ammo Boxes", "NevernamedsItems/Resources/CustomGunAmmoTypes/am0_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/am0_clipempty");
            gun.quality = PickupObject.ItemQuality.B;
            gun.encounterTrackable.EncounterGuid = "this is the AM-0";
            ETGMod.Databases.Items.Add(gun, null, "ANY");

            gun.AddToSubShop(ItemBuilder.ShopType.Trorc);
            AM0ID = gun.PickupObjectId;
        }
示例#20
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Gun of a Thousand Sins", "gunofathousandsins");

            Game.Items.Rename("outdated_gun_mods:gun_of_a_thousand_sins", "nn:gun_of_a_thousand_sins");
            gun.gameObject.AddComponent <GunOfAThousandSins>();
            gun.SetShortDescription("Evisceration");
            gun.SetLongDescription("This sidearm was once carried by an accursed sorcerer who put countless innocents to death in order to secure his grab at penultimate power.");

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

            gun.SetAnimationFPS(gun.shootAnimation, 12);
            gun.gunSwitchGroup = (PickupObjectDatabase.GetById(198) as Gun).gunSwitchGroup;
            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false);

            gun.AddPassiveStatModifier(PlayerStats.StatType.Curse, 1f, StatModifier.ModifyMethod.ADDITIVE);


            //GUN STATS
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime                           = 1f;
            gun.muzzleFlashEffects                   = (PickupObjectDatabase.GetById(83) as Gun).muzzleFlashEffects;
            gun.DefaultModule.cooldownTime           = 0.11f;
            gun.DefaultModule.numberOfShotsInClip    = 7;
            gun.barrelOffset.transform.localPosition = new Vector3(2.37f, 0.81f, 0f);
            gun.SetBaseMaxAmmo(200);
            gun.ammo     = 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.baseData.damage       = 20f;
            projectile.baseData.speed       *= 1f;
            projectile.baseData.range       *= 2f;
            PierceProjModifier             piercing = projectile.gameObject.GetOrAddComponent <PierceProjModifier>();
            ThousandSinsProjectileModifier sins     = projectile.gameObject.GetOrAddComponent <ThousandSinsProjectileModifier>();

            projectile.hitEffects.alwaysUseMidair        = true;
            projectile.hitEffects.overrideMidairDeathVFX = EasyVFXDatabase.BloodiedScarfPoofVFX;

            //ANIMATE BULLET
            projectile.AnimateProjectile(new List <string> {
                "gunofathousandsins_projectile_001",
                "gunofathousandsins_projectile_002",
                "gunofathousandsins_projectile_003",
                "gunofathousandsins_projectile_004",
            }, 12, true, new List <IntVector2> {
                new IntVector2(23, 22),                                                                                    //1
                new IntVector2(23, 22),                                                                                    //2
                new IntVector2(23, 22),                                                                                    //3
                new IntVector2(23, 22),                                                                                    //4
            }, AnimateBullet.ConstructListOfSameValues(true, 4),                                                           //Lightened
                                         AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 4),   //Anchors
                                         AnimateBullet.ConstructListOfSameValues(true, 4),                                 //Anchors Change Colliders
                                         AnimateBullet.ConstructListOfSameValues(false, 4),                                //Fixes Scales
                                         AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 4),                      //Offsets
                                         AnimateBullet.ConstructListOfSameValues <IntVector2?>(new IntVector2(20, 11), 4), //Override Collider Sizes
                                         AnimateBullet.ConstructListOfSameValues <IntVector2?>(new IntVector2(2, 5), 4),   //Override Collider Offsets
                                         AnimateBullet.ConstructListOfSameValues <Projectile>(null, 4));

            projectile.SetProjectileSpriteRight("gunofathousandsins_projectile_001", 23, 22, true, tk2dBaseSprite.Anchor.MiddleCenter, 20, 11);

            projectile.transform.parent = gun.barrelOffset;

            gun.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Thousand Sins Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/thousandsins_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/thousandsins_clipempty");

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

            GunOfAThousandSinsID = gun.PickupObjectId;
            gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.ALLJAMMED_BEATEN_HELL, true);
        }
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Wrinkler", "wrinkler");

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

            behav.overrideNormalReloadAudio = "Play_ENM_Tarnisher_Bite_01";
            behav.overrideNormalFireAudio   = "Play_ENM_Tarnisher_Spit_01";
            behav.preventNormalFireAudio    = true;
            behav.preventNormalReloadAudio  = true;
            gun.SetShortDescription("Bite The Bullet");
            gun.SetLongDescription("Eats bullets on reload, resulting in a net ammo profit overall." + "\n\nAn elder-ich being whose gluttony knows no grounds. \nIt's odd fractal digestive tract seems to allow it to regurgitate more material than it ingests.");

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

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


            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.muzzleFlashEffects.type              = VFXPoolType.None;
            gun.DefaultModule.cooldownTime           = 0.3f;
            gun.DefaultModule.numberOfShotsInClip    = 10;
            gun.barrelOffset.transform.localPosition = new Vector3(3.0f, 0.59f, 0f);
            gun.SetBaseMaxAmmo(100);
            gun.ammo     = 100;
            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);
            projectile.baseData.damage = 8.5f;
            projectile.AnimateProjectile(new List <string> {
                "wrinklerproj_001",
                "wrinklerproj_002",
                "wrinklerproj_003",
                "wrinklerproj_004",
                "wrinklerproj_005",
            },
                                         14,                                                                              //FPS
                                         true,                                                                            //Loops
                                         AnimateBullet.ConstructListOfSameValues(new IntVector2(18, 10), 5),              //Sprite Sizes
                                         AnimateBullet.ConstructListOfSameValues(false, 5),                               //Lightened
                                         AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 5),  //Anchors
                                         AnimateBullet.ConstructListOfSameValues(true, 5),                                //Anchors Change Colliders
                                         AnimateBullet.ConstructListOfSameValues(false, 5),                               //Fixes Scales
                                         AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 5),                     //Manual Offsets
                                         AnimateBullet.ConstructListOfSameValues <IntVector2?>(new IntVector2(14, 8), 5), //Collider Pixel Sizes
                                         AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 5),                  //Override Collider Offsets
                                         AnimateBullet.ConstructListOfSameValues <Projectile>(null, 5));

            gun.DefaultModule.ammoType       = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("Wrinkler Bullets", "NevernamedsItems/Resources/CustomGunAmmoTypes/wrinkler_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/wrinkler_clipempty");

            gun.DefaultModule.projectiles[0] = projectile;
            gun.quality = PickupObject.ItemQuality.A;
            ETGMod.Databases.Items.Add(gun, null, "ANY");

            WrinklerID = gun.PickupObjectId;
        }
示例#22
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Gumgun", "gumgun");

            Game.Items.Rename("outdated_gun_mods:gumgun", "nn:gumgun");
            gun.gameObject.AddComponent <Gumgun>();
            gun.SetShortDescription("Wumderful");
            gun.SetLongDescription("Fires globs of gum at your foes." + "\nHolding down fire causes it to enter 'Gumzooka' mode." + "\n\nThis tiny handcannon was designed for use by small creatures with no hands." + "\nCan you still call it a handcannon then?");

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

            gun.SetAnimationFPS(gun.shootAnimation, 15);
            gun.SetAnimationFPS(gun.chargeAnimation, 3);
            gun.gunSwitchGroup = (PickupObjectDatabase.GetById(13) as Gun).gunSwitchGroup;
            gun.gunHandedness  = GunHandedness.HiddenOneHanded;
            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(56) as Gun, true, false);

            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).wrapMode  = tk2dSpriteAnimationClip.WrapMode.LoopSection;
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).loopStart = 1;

            //GUN STATS
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Charged;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime                           = 1.1f;
            gun.muzzleFlashEffects                   = (PickupObjectDatabase.GetById(334) as Gun).muzzleFlashEffects;
            gun.gunClass                             = GunClass.CHARGE;
            gun.DefaultModule.cooldownTime           = 0.2f;
            gun.DefaultModule.numberOfShotsInClip    = 25;
            gun.barrelOffset.transform.localPosition = new Vector3(0.56f, 0.31f, 0f);
            gun.SetBaseMaxAmmo(300);
            gun.ammo = 300;

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

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            RandomiseProjectileColourComponent colour = projectile.gameObject.GetOrAddComponent <RandomiseProjectileColourComponent>();

            projectile.baseData.damage *= 1.4f;
            projectile.AnimateProjectile(new List <string> {
                "gumgun_smallproj_001",
                "gumgun_smallproj_002",
                "gumgun_smallproj_001",
                "gumgun_smallproj_003",
            }, 10, true, new List <IntVector2> {
                new IntVector2(13, 10),
                new IntVector2(15, 8),
                new IntVector2(13, 10),
                new IntVector2(11, 12),
            }, 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?>(new IntVector2(12, 9), 4), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 4), AnimateBullet.ConstructListOfSameValues <Projectile>(null, 4));


            //CHARGE BULLET STATS
            Projectile chargeprojectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(56) as Gun).DefaultModule.projectiles[0]);

            chargeprojectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(chargeprojectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(chargeprojectile);
            RandomiseProjectileColourComponent colour2 = chargeprojectile.gameObject.GetOrAddComponent <RandomiseProjectileColourComponent>();

            chargeprojectile.baseData.damage *= 4;
            chargeprojectile.AnimateProjectile(new List <string> {
                "gumgun_bigproj_001",
                "gumgun_bigproj_002",
                "gumgun_bigproj_001",
                "gumgun_bigproj_003",
            }, 10, true, new List <IntVector2> {
                new IntVector2(21, 14),
                new IntVector2(23, 12),
                new IntVector2(21, 14),
                new IntVector2(19, 16),
            }, 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?>(new IntVector2(14, 8), 4), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 4), AnimateBullet.ConstructListOfSameValues <Projectile>(null, 4));

            ProjectileModule.ChargeProjectile chargeProj1 = new ProjectileModule.ChargeProjectile
            {
                Projectile = projectile,
                ChargeTime = 0f,
                VfxPool    = null,
            };

            ProjectileModule.ChargeProjectile chargeProj2 = new ProjectileModule.ChargeProjectile
            {
                Projectile = chargeprojectile,
                ChargeTime = 1f,
            };
            gun.DefaultModule.chargeProjectiles = new List <ProjectileModule.ChargeProjectile> {
                chargeProj1, chargeProj2
            };

            gun.quality = PickupObject.ItemQuality.C;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            GumgunID = gun.PickupObjectId;
            Gumgun.BuildDenkSnavelPrefab();
        }
示例#23
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Head of the Order", "headoftheorder");

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

            behav.preventNormalFireAudio  = true;
            behav.overrideNormalFireAudio = "Play_ENM_highpriest_blast_01";
            gun.SetShortDescription("Guns, Immortal");
            gun.SetLongDescription("Though torn from the rest of it's corporeal form, the immortal soul of the High Priest remains bound to this weapon.");
            gun.AddPassiveStatModifier(PlayerStats.StatType.Curse, 1f, StatModifier.ModifyMethod.ADDITIVE);
            gun.SetupSprite(null, "headoftheorder_idle_001", 8);

            gun.SetAnimationFPS(gun.shootAnimation, 10);

            gun.gunSwitchGroup = (PickupObjectDatabase.GetById(79) as Gun).gunSwitchGroup;
            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.Ordered;
            gun.reloadTime = 2f;
            gun.DefaultModule.cooldownTime        = 0.65f;
            gun.DefaultModule.numberOfShotsInClip = 6;
            gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(79) as Gun).muzzleFlashEffects;
            gun.barrelOffset.transform.localPosition = new Vector3(1.62f, 0.75f, 0f);
            gun.SetBaseMaxAmmo(100);
            gun.ammo     = 100;
            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);
            projectile.baseData.damage      *= 6f;
            projectile.baseData.force       *= 2f;
            projectile.baseData.speed       *= 2f;
            projectile.pierceMinorBreakables = true;
            HomingModifier homing = projectile.gameObject.GetOrAddComponent <HomingModifier>();

            homing.HomingRadius    = 20f;
            homing.AngularVelocity = 400;

            projectile.AnimateProjectile(new List <string> {
                "atomic_projectile_001",
                "atomic_projectile_002",
                "atomic_projectile_003",
                "atomic_projectile_004",
                "atomic_projectile_005",
                "atomic_projectile_006",
                "atomic_projectile_007",
                "atomic_projectile_008",
                "atomic_projectile_009",
                "atomic_projectile_010",
            }, 15, true, AnimateBullet.ConstructListOfSameValues <IntVector2>(new IntVector2(24, 20), 10), AnimateBullet.ConstructListOfSameValues(true, 10), AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 10), AnimateBullet.ConstructListOfSameValues(true, 10), AnimateBullet.ConstructListOfSameValues(false, 10),
                                         AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 10), AnimateBullet.ConstructListOfSameValues <IntVector2?>(new IntVector2(8, 8), 10), AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 10), AnimateBullet.ConstructListOfSameValues <Projectile>(null, 10));

            gun.DefaultModule.projectiles[0] = projectile;

            gun.quality = PickupObject.ItemQuality.S;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            HeadOfTheOrderID = gun.PickupObjectId;
        }
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Agar Gun", "agargun");

            Game.Items.Rename("outdated_gun_mods:agar_gun", "nn:agar_gun");
            gun.gameObject.AddComponent <AgarGun>();
            gun.SetShortDescription("Feeda Me");
            gun.SetLongDescription("An old historical remnant reinvigorated for bio warfare." + "\n\nThe final shot launches a hungry macrobacteria, who gobbles up agar to fuel its own destructive power.");

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

            gun.SetAnimationFPS(gun.shootAnimation, 12);
            gun.SetAnimationFPS(gun.reloadAnimation, 0);
            gun.gunSwitchGroup = (PickupObjectDatabase.GetById(33) as Gun).gunSwitchGroup;
            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false);

            //GUN STATS
            gun.muzzleFlashEffects          = (PickupObjectDatabase.GetById(33) as Gun).muzzleFlashEffects;
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Automatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 1.15f;
            gun.DefaultModule.cooldownTime           = 0.15f;
            gun.DefaultModule.numberOfShotsInClip    = 15;
            gun.barrelOffset.transform.localPosition = new Vector3(48f / 16f, 8f / 16, 0f);
            gun.SetBaseMaxAmmo(470);
            gun.ammo     = 470;
            gun.gunClass = GunClass.FULLAUTO;

            //BULLET STATS
            #region MainBullet
            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;
            BounceProjModifier bounce = projectile.gameObject.GetOrAddComponent <BounceProjModifier>();
            bounce.numberOfBounces = 2;
            projectile.gameObject.AddComponent <AgarGunSmallProj>();

            projectile.hitEffects.overrideMidairDeathVFX = (PickupObjectDatabase.GetById(33) as Gun).DefaultModule.projectiles[0].hitEffects.overrideMidairDeathVFX;
            projectile.hitEffects.alwaysUseMidair        = true;

            //ANIMATE BULLET
            projectile.AnimateProjectile(new List <string> {
                "agargun_smallproj_1",
                "agargun_smallproj_2",
                "agargun_smallproj_1",
                "agargun_smallproj_3",
            }, 12, true, AnimateBullet.ConstructListOfSameValues(new IntVector2(12, 11), 4),
                                         AnimateBullet.ConstructListOfSameValues(true, 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.SetProjectileSpriteRight("agargun_smallproj_1", 12, 11, true, tk2dBaseSprite.Anchor.MiddleCenter, 12, 11);
            #endregion
            #region SubProjectile
            Projectile subProj = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(56) as Gun).DefaultModule.projectiles[0]);
            subProj.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(subProj.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(subProj);
            subProj.baseData.damage = 10f;
            subProj.baseData.speed *= 0.7f;
            subProj.baseData.range *= 2f;
            subProj.gameObject.AddComponent <PierceProjModifier>();
            subProj.hitEffects.overrideMidairDeathVFX = (PickupObjectDatabase.GetById(755) as Gun).DefaultModule.projectiles[0].hitEffects.overrideMidairDeathVFX;
            subProj.hitEffects.alwaysUseMidair        = true;

            subProj.gameObject.AddComponent <AgarGunBigProj>();

            //ANIMATE BULLET
            subProj.AnimateProjectile(new List <string> {
                "agargun_bigproj_1",
                "agargun_bigproj_2",
                "agargun_bigproj_1",
                "agargun_bigproj_3",
            }, 12, true, AnimateBullet.ConstructListOfSameValues(new IntVector2(17, 12), 4),
                                      AnimateBullet.ConstructListOfSameValues(true, 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));

            subProj.SetProjectileSpriteRight("agargun_bigproj_1", 17, 12, true, tk2dBaseSprite.Anchor.MiddleCenter, 17, 12);
            #endregion

            gun.DefaultModule.finalProjectile             = subProj;
            gun.DefaultModule.usesOptionalFinalProjectile = true;
            gun.DefaultModule.numberOfFinalProjectiles    = 1;

            //gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.CUSTOM;
            //gun.DefaultModule.customAmmoType = CustomClipAmmoTypeToolbox.AddCustomAmmoType("AM0 Ammo Boxes", "NevernamedsItems/Resources/CustomGunAmmoTypes/am0_clipfull", "NevernamedsItems/Resources/CustomGunAmmoTypes/am0_clipempty");
            gun.quality = PickupObject.ItemQuality.C;
            ETGMod.Databases.Items.Add(gun, null, "ANY");

            gun.AddToSubShop(ItemBuilder.ShopType.Goopton);
            ID = gun.PickupObjectId;
        }
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Lorebook", "lorebook");

            Game.Items.Rename("outdated_gun_mods:lorebook", "nn:lorebook");

            var behav = gun.gameObject.AddComponent <Lorebook>();

            behav.preventNormalFireAudio    = true;
            behav.preventNormalReloadAudio  = true;
            behav.overrideNormalFireAudio   = "Play_ENM_wizard_summon_01";
            behav.overrideNormalReloadAudio = "Play_ENM_book_blast_01";

            gun.SetShortDescription("Party Cohesion");
            gun.SetLongDescription("Summons brave and noble bullet warriors of several different classes to destroy everything in sight and wreak havoc." + "\n(Like real heroes!)" + "\n\nThis magical tome of stories and scenarios was stolen from one of the most evil creatures in the Gungeon; a Lore Gunjurer.");

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

            gun.SetAnimationFPS(gun.shootAnimation, 18);

            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false);
            //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 = 1f;
            gun.DefaultModule.cooldownTime           = 0.6f;
            gun.muzzleFlashEffects.type              = VFXPoolType.None;
            gun.DefaultModule.numberOfShotsInClip    = 4;
            gun.barrelOffset.transform.localPosition = new Vector3(0.93f, 0.87f, 0f);
            gun.SetBaseMaxAmmo(110);
            gun.gunClass = GunClass.SILLY;
            Projectile wizardSpellProjectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(86) as Gun).DefaultModule.projectiles[0]);

            wizardSpellProjectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(wizardSpellProjectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(wizardSpellProjectile);
            wizardSpellProjectile.baseData.damage *= 1f;
            wizardSpellProjectile.baseData.speed  *= 0.7f;
            wizardSpellProjectile.baseData.range  *= 5f;
            wizardSpellProjectile.SetProjectileSpriteRight("smallspark_projectile", 7, 7, true, tk2dBaseSprite.Anchor.MiddleCenter, 6, 6);

            Projectile wizardProjectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(86) as Gun).DefaultModule.projectiles[0]);

            wizardProjectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(wizardProjectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(wizardProjectile);
            wizardProjectile.baseData.damage *= 3f;
            wizardProjectile.baseData.speed  *= 0.08f;
            wizardProjectile.baseData.range  *= 5f;
            LorebookFantasyBullet wizardClassing = wizardProjectile.gameObject.GetOrAddComponent <LorebookFantasyBullet>();

            wizardClassing.Class = LorebookFantasyBullet.PartyMember.WIZARD;
            wizardProjectile.pierceMinorBreakables = true;
            SpawnProjModifier wizardshot = wizardProjectile.gameObject.GetOrAddComponent <SpawnProjModifier>();

            wizardshot.usesComplexSpawnInFlight      = true;
            wizardshot.spawnOnObjectCollisions       = false;
            wizardshot.spawnProjecitlesOnDieInAir    = false;
            wizardshot.spawnProjectilesOnCollision   = false;
            wizardshot.spawnProjectilesInFlight      = true;
            wizardshot.projectileToSpawnInFlight     = wizardSpellProjectile;
            wizardshot.inFlightAimAtEnemies          = true;
            wizardshot.inFlightSpawnCooldown         = 1.15f;
            wizardshot.numberToSpawnOnCollison       = 0;
            wizardshot.numToSpawnInFlight            = 1;
            wizardshot.PostprocessSpawnedProjectiles = true;
            HomingModifier wizardHoming = wizardProjectile.gameObject.AddComponent <HomingModifier>();

            wizardHoming.AngularVelocity = 120f;
            wizardHoming.HomingRadius    = 1000f;
            BounceProjModifier wizardBouncing = wizardProjectile.gameObject.GetOrAddComponent <BounceProjModifier>();

            wizardBouncing.numberOfBounces = 10;
            wizardProjectile.AnimateProjectile(new List <string> {
                "playerwizardprojectile_001",
                "playerwizardprojectile_002",
                "playerwizardprojectile_003",
                "playerwizardprojectile_004",
            }, 10, true, new List <IntVector2> {
                new IntVector2(17, 22), //1
                new IntVector2(17, 22), //2
                new IntVector2(17, 22), //3
                new IntVector2(17, 22), //3
            }, AnimateBullet.ConstructListOfSameValues(true, 4),
                                               AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 4),
                                               AnimateBullet.ConstructListOfSameValues(true, 4),
                                               AnimateBullet.ConstructListOfSameValues(false, 4),
                                               AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 4),
                                               new List <IntVector2?> {
                new IntVector2(11, 16), //1
                new IntVector2(11, 16), //2
                new IntVector2(11, 16), //3
                new IntVector2(11, 16), //3
            },
                                               AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 4),
                                               AnimateBullet.ConstructListOfSameValues <Projectile>(null, 4));
            wizardProjectile.shouldFlipHorizontally = true;

            Projectile bardProjectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(86) as Gun).DefaultModule.projectiles[0]);

            bardProjectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(bardProjectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(bardProjectile);
            bardProjectile.baseData.damage *= 4f;
            bardProjectile.baseData.range  *= 5f;
            bardProjectile.baseData.speed  *= 0.25f;
            LorebookFantasyBullet bardClassing = bardProjectile.gameObject.GetOrAddComponent <LorebookFantasyBullet>();

            bardClassing.Class = LorebookFantasyBullet.PartyMember.BARD;
            bardProjectile.pierceMinorBreakables = true;
            HomingModifier bardHoming = bardProjectile.gameObject.AddComponent <HomingModifier>();

            bardHoming.AngularVelocity = 120f;
            bardHoming.HomingRadius    = 1000f;
            ExtremelySimpleStatusEffectBulletBehaviour bardCharming = bardProjectile.gameObject.AddComponent <ExtremelySimpleStatusEffectBulletBehaviour>();

            bardCharming.usesCharmEffect = true;
            bardCharming.charmEffect     = StaticStatusEffects.charmingRoundsEffect;
            BounceProjModifier bardBouncing = bardProjectile.gameObject.GetOrAddComponent <BounceProjModifier>();

            bardBouncing.numberOfBounces = 10;
            bardProjectile.AnimateProjectile(new List <string> {
                "playerbardbullet_001",
                "playerbardbullet_002",
                "playerbardbullet_003",
                "playerbardbullet_004",
            }, 10, true, new List <IntVector2> {
                new IntVector2(16, 15), //1
                new IntVector2(16, 15), //2
                new IntVector2(16, 15), //3
                new IntVector2(16, 15), //3
            }, AnimateBullet.ConstructListOfSameValues(true, 4),
                                             AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 4),
                                             AnimateBullet.ConstructListOfSameValues(true, 4),
                                             AnimateBullet.ConstructListOfSameValues(false, 4),
                                             AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 4),
                                             new List <IntVector2?> {
                new IntVector2(10, 9), //1
                new IntVector2(10, 9), //2
                new IntVector2(10, 9), //3
                new IntVector2(10, 9), //3
            },
                                             AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 4),
                                             AnimateBullet.ConstructListOfSameValues <Projectile>(null, 4));
            bardProjectile.shouldFlipHorizontally = true;


            Projectile rogueProjectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(86) as Gun).DefaultModule.projectiles[0]);

            rogueProjectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(rogueProjectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(rogueProjectile);
            rogueProjectile.baseData.damage *= 4f;
            rogueProjectile.baseData.speed  *= 0.3f;
            rogueProjectile.baseData.range  *= 5f;
            LorebookFantasyBullet rogueClassing = rogueProjectile.gameObject.GetOrAddComponent <LorebookFantasyBullet>();

            rogueClassing.Class = LorebookFantasyBullet.PartyMember.ROGUE;
            rogueProjectile.shouldFlipHorizontally = true;
            rogueProjectile.pierceMinorBreakables  = true;
            HomingModifier rogueHoming = rogueProjectile.gameObject.AddComponent <HomingModifier>();

            rogueHoming.AngularVelocity = 120f;
            rogueHoming.HomingRadius    = 1000f;
            BounceProjModifier rogueBouncing = rogueProjectile.gameObject.GetOrAddComponent <BounceProjModifier>();

            rogueBouncing.numberOfBounces = 10;
            //Set Up Teleport Effect
            GameObject BaseEnemyRogueBullet         = EnemyDatabase.GetOrLoadByGuid("56fb939a434140308b8f257f0f447829").bulletBank.GetBullet("rogue").BulletObject;
            Projectile BaseEnemyProjectileComponent = BaseEnemyRogueBullet.GetComponent <Projectile>();

            if (BaseEnemyProjectileComponent != null)
            {
                TeleportProjModifier tp = BaseEnemyProjectileComponent.GetComponent <TeleportProjModifier>();
                if (tp != null)
                {
                    PlayerProjectileTeleportModifier rogueTeleport = rogueProjectile.gameObject.AddComponent <PlayerProjectileTeleportModifier>();
                    rogueTeleport.teleportVfx          = tp.teleportVfx;
                    rogueTeleport.teleportCooldown     = tp.teleportCooldown;
                    rogueTeleport.teleportPauseTime    = tp.teleportPauseTime;
                    rogueTeleport.trigger              = PlayerProjectileTeleportModifier.TeleportTrigger.DistanceFromTarget;
                    rogueTeleport.distToTeleport       = tp.distToTeleport * 2f;
                    rogueTeleport.behindTargetDistance = tp.behindTargetDistance;
                    rogueTeleport.leadAmount           = tp.leadAmount;
                    rogueTeleport.minAngleToTeleport   = tp.minAngleToTeleport;
                    rogueTeleport.numTeleports         = tp.numTeleports;
                    rogueTeleport.type = PlayerProjectileTeleportModifier.TeleportType.BehindTarget;
                }
                else
                {
                    ETGModConsole.Log("Base Eney TeleportProjModifier was null???");
                }
            }
            else
            {
                ETGModConsole.Log("Base Enemy Rogue Bullet had no projectile component???");
            }
            rogueProjectile.AnimateProjectile(new List <string> {
                "playerroguebullet_001",
                "playerroguebullet_002",
                "playerroguebullet_003",
                "playerroguebullet_004",
            }, 10, true, new List <IntVector2> {
                new IntVector2(16, 15), //1
                new IntVector2(16, 15), //2
                new IntVector2(16, 15), //3
                new IntVector2(16, 15), //3
            }, AnimateBullet.ConstructListOfSameValues(true, 4),
                                              AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 4),
                                              AnimateBullet.ConstructListOfSameValues(true, 4),
                                              AnimateBullet.ConstructListOfSameValues(false, 4),
                                              AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 4),
                                              new List <IntVector2?> {
                new IntVector2(10, 9), //1
                new IntVector2(10, 9), //2
                new IntVector2(10, 9), //3
                new IntVector2(10, 9), //3
            },
                                              AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 4),
                                              AnimateBullet.ConstructListOfSameValues <Projectile>(null, 4));

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

            knightProjectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(knightProjectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(knightProjectile);
            knightProjectile.baseData.range  *= 5f;
            knightProjectile.baseData.damage *= 5f;
            LorebookFantasyBullet knightClassing = knightProjectile.gameObject.GetOrAddComponent <LorebookFantasyBullet>();

            knightClassing.Class = LorebookFantasyBullet.PartyMember.KNIGHT;
            knightProjectile.pierceMinorBreakables = true;
            knightProjectile.baseData.speed       *= 0.25f;
            HomingModifier knightHoming = knightProjectile.gameObject.AddComponent <HomingModifier>();

            knightHoming.AngularVelocity = 120f;
            knightHoming.HomingRadius    = 1000f;
            BounceProjModifier knightBouncing = knightProjectile.gameObject.GetOrAddComponent <BounceProjModifier>();

            knightBouncing.numberOfBounces = 10;
            knightProjectile.AnimateProjectile(new List <string> {
                "playerknightbullet_001",
                "playerknightbullet_002",
                "playerknightbullet_003",
                "playerknightbullet_004",
            }, 10, true, new List <IntVector2> {
                new IntVector2(19, 15), //1
                new IntVector2(19, 15), //2
                new IntVector2(19, 15), //3
                new IntVector2(19, 15), //3
            }, AnimateBullet.ConstructListOfSameValues(true, 4),
                                               AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 4),
                                               AnimateBullet.ConstructListOfSameValues(true, 4),
                                               AnimateBullet.ConstructListOfSameValues(false, 4),
                                               AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 4),
                                               new List <IntVector2?> {
                new IntVector2(13, 9), //1
                new IntVector2(13, 9), //2
                new IntVector2(13, 9), //3
                new IntVector2(13, 9), //3
            },
                                               AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 4),
                                               AnimateBullet.ConstructListOfSameValues <Projectile>(null, 4));
            knightProjectile.shouldFlipHorizontally = true;


            gun.DefaultModule.projectiles[0] = knightProjectile;
            gun.DefaultModule.projectiles.Add(wizardProjectile);
            gun.DefaultModule.projectiles.Add(bardProjectile);
            gun.DefaultModule.projectiles.Add(rogueProjectile);



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

            LorebookID = gun.PickupObjectId;
        }
示例#26
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Creditor", "creditor");

            Game.Items.Rename("outdated_gun_mods:creditor", "nn:creditor");
            gun.gameObject.AddComponent <Creditor>();
            gun.SetShortDescription("Credit To The Team");
            gun.SetLongDescription("Converts the sheer economic potential of the Hegemony Credit into a powerful blast." + "\n\nDraws from the bearer's stored funds.");

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

            gun.SetAnimationFPS(gun.shootAnimation, 10);

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

            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 = 5f;
            gun.DefaultModule.cooldownTime        = 0.1f;
            gun.DefaultModule.angleVariance       = 3;
            gun.DefaultModule.numberOfShotsInClip = 5;
            gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(89) as Gun).muzzleFlashEffects;
            gun.barrelOffset.transform.localPosition = new Vector3(1.37f, 0.81f, 0f);
            gun.SetBaseMaxAmmo(0);
            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);
            projectile.baseData.damage                   = 35f;
            projectile.baseData.force                   *= 2f;
            projectile.baseData.speed                   *= 1f;
            projectile.pierceMinorBreakables             = true;
            projectile.hitEffects.alwaysUseMidair        = true;
            projectile.hitEffects.overrideMidairDeathVFX = EasyVFXDatabase.GreenLaserCircleVFX;

            projectile.AnimateProjectile(new List <string> {
                "creditorproj_001",
                "creditorproj_002",
                "creditorproj_003",
                "creditorproj_004",
                "creditorproj_005",
                "creditorproj_006",
                "creditorproj_007",
                "creditorproj_008",
                "creditorproj_009",
                "creditorproj_010",
            },
                                         10,                                                                               //FPS
                                         true,                                                                             //Loops
                                         AnimateBullet.ConstructListOfSameValues <IntVector2>(new IntVector2(15, 11), 10), //Pixel Sizes
                                         AnimateBullet.ConstructListOfSameValues(true, 10),                                //Lightened
                                         AnimateBullet.ConstructListOfSameValues(tk2dBaseSprite.Anchor.MiddleCenter, 10),  //Anchors
                                         AnimateBullet.ConstructListOfSameValues(true, 10),                                //Anchors Change Colliders
                                         AnimateBullet.ConstructListOfSameValues(false, 10),
                                         AnimateBullet.ConstructListOfSameValues <Vector3?>(null, 10),
                                         AnimateBullet.ConstructListOfSameValues <IntVector2?>(new IntVector2(13, 7), 10), //Override Colliders
                                         AnimateBullet.ConstructListOfSameValues <IntVector2?>(null, 10),                  //Override Collider Offsets
                                         AnimateBullet.ConstructListOfSameValues <Projectile>(null, 10));                  //Override Proj to Copy From


            gun.DefaultModule.projectiles[0] = projectile;

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

            CreditorID = gun.PickupObjectId;
        }