Exemplo n.º 1
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Sliver Beam", "sliver_beam");

            Game.Items.Rename("outdated_gun_mods:sliver_beam", "cel:sliver_beam");
            var behav = gun.gameObject.AddComponent <SliverBeam>();

            behav.overrideNormalFireAudio = "Play_ENM_shelleton_beam_01";
            behav.preventNormalFireAudio  = true;
            gun.SetShortDescription("Like A Pike Through Butter");
            gun.SetLongDescription("Can cut across rooms, assuming there is no walls in the way.");
            gun.SetupSprite(null, "sliver_beam_idle_001", 8);
            gun.SetAnimationFPS(gun.shootAnimation, 8);
            gun.isAudioLoop = true;
            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(86) as Gun, true, false);
            gun.doesScreenShake             = false;
            gun.DefaultModule.ammoCost      = 10;
            gun.DefaultModule.angleVariance = 0;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Beam;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 1f;
            gun.muzzleFlashEffects.type              = VFXPoolType.None;
            gun.DefaultModule.cooldownTime           = 0.001f;
            gun.DefaultModule.numberOfShotsInClip    = 3000;
            gun.DefaultModule.ammoType               = GameUIAmmoType.AmmoType.BEAM;
            gun.barrelOffset.transform.localPosition = new Vector3(1.75f, 0.5f, 0f);
            gun.SetBaseMaxAmmo(3000);
            gun.ammo = 3000;

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

            List <string> BeamAnimPaths = new List <string>()
            {
                "Items/Resources/Beams/sliver_beam_mid_001",
            };
            List <string> BeamEndPaths = new List <string>()
            {
                "Items/Resources/Beams/sliver_beam_end_001",
            };

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

            BasicBeamController beamComp = projectile.GenerateBeamPrefab(
                "Items/Resources/Beams/sliver_beam_mid_001",
                new Vector2(10, 4),
                new Vector2(0, 1),
                BeamAnimPaths,
                9,
                //Impact
                null,
                -1,
                null,
                null,
                //End
                BeamEndPaths,
                9,
                new Vector2(10, 3),
                new Vector2(0, 1),
                //Beginning
                null,
                -1,
                null,
                null
                );

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            projectile.baseData.damage = 15f;
            projectile.baseData.force *= 0.1f;
            projectile.baseData.range  = float.MaxValue;
            projectile.baseData.speed *= 5f;

            beamComp.penetration = 10000;
            beamComp.boneType    = BasicBeamController.BeamBoneType.Straight;
            beamComp.interpolateStretchedBones = false;

            gun.DefaultModule.projectiles[0]     = projectile;
            gun.encounterTrackable.EncounterGuid = "FWOZZOOOOOMMMMM";
            gun.quality = PickupObject.ItemQuality.C; //D
            ETGMod.Databases.Items.Add(gun, null, "ANY");
        }
Exemplo n.º 2
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Photon Blade", "Photon Blade");

            Game.Items.Rename("outdated_gun_mods:photon_blade", "sts:photon_blade");
            gun.gameObject.AddComponent <PhotonBlade>();
            gun.SetShortDescription("Not Just The Children...");
            gun.SetLongDescription("Slices with deadly power.");
            gun.SetupSprite(null, "photon_blade_idle_001", 8);
            gun.SetAnimationFPS(gun.shootAnimation, 10);
            gun.SetAnimationFPS(gun.reloadAnimation, 2);
            gun.AddProjectileModuleFrom("38_special", true, false);
            gun.DefaultModule.ammoType      = GameUIAmmoType.AmmoType.SMALL_BULLET;
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 0f;
            gun.DefaultModule.angleVariance       = 0f;
            gun.DefaultModule.cooldownTime        = .5f;
            gun.DefaultModule.numberOfShotsInClip = 350;
            Gun gun2 = PickupObjectDatabase.GetById(151) as Gun;

            gun.muzzleFlashEffects.type = VFXPoolType.None;
            gun.SetBaseMaxAmmo(350);
            gun.barrelOffset.transform.localPosition = new Vector3(1.5f, 0f, 0f);
            gun.quality = PickupObject.ItemQuality.EXCLUDED;
            gun.encounterTrackable.EncounterGuid = "zwoooop.";
            gun.sprite.IsPerpendicular           = true;
            gun.gunClass = GunClass.NONE;
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.transform.parent      = gun.barrelOffset;
            projectile.baseData.damage      *= 3f;
            projectile.baseData.speed        = 0;
            ProjectileSlashingBehaviour slashingBehaviour = projectile.gameObject.AddComponent <ProjectileSlashingBehaviour>();

            slashingBehaviour.SlashDimensions = 90;
            slashingBehaviour.SlashRange      = 2.5f;
            VFXPool SlashVFX = VFXLibrary.CreateMuzzleflash("photon_blade_slice", new List <string> {
                "katanaslice_001", "katanaslice_002", "katanaslice_003",
            }, 10, new List <IntVector2> {
                new IntVector2(72, 67), new IntVector2(72, 67), new IntVector2(72, 67),
            }, new List <tk2dBaseSprite.Anchor> {
                tk2dBaseSprite.Anchor.MiddleLeft, tk2dBaseSprite.Anchor.MiddleLeft, tk2dBaseSprite.Anchor.MiddleLeft
            }, new List <Vector2> {
                Vector2.zero, Vector2.zero, Vector2.zero
            }, false, false, false, false, 0, VFXAlignment.Fixed, true, new List <float> {
                0, 0, 0
            }, new List <Color> {
                VFXLibrary.emptyColor, VFXLibrary.emptyColor, VFXLibrary.emptyColor
            });

            slashingBehaviour.SlashVFX = SlashVFX;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToSubShop(ItemBuilder.ShopType.Goopton);
            gun.AddToSubShop(ItemBuilder.ShopType.Trorc);
        }
Exemplo n.º 3
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Nen Fist", "nen_fist");

            Game.Items.Rename("outdated_gun_mods:nen_fist", "cel:nen_fist");
            gun.gameObject.AddComponent <NenFist>();
            gun.SetShortDescription("Hunted");
            gun.SetLongDescription("Cycles between a long range fireball, a medium range energy spear, and a powerful dash with each shot.");
            gun.SetupSprite(null, "nen_fist_idle_001", 8);
            gun.SetAnimationFPS(gun.shootAnimation, 24);
            gun.AddProjectileModuleFrom("38_special", true, false);
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Charged;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = .8f;
            gun.DefaultModule.cooldownTime        = .2f;
            gun.DefaultModule.numberOfShotsInClip = 5;
            gun.gunClass      = GunClass.FIRE;
            gun.gunHandedness = GunHandedness.HiddenOneHanded;
            Gun gun2 = PickupObjectDatabase.GetById(748) as Gun;

            gun.gunSwitchGroup          = gun2.gunSwitchGroup;
            gun.muzzleFlashEffects.type = VFXPoolType.None;
            gun.SetBaseMaxAmmo(200);
            gun.DefaultModule.angleVariance = 0f;
            gun.sprite.IsPerpendicular      = true;
            gun.quality = PickupObject.ItemQuality.EXCLUDED;
            gun.encounterTrackable.EncounterGuid = "NN doesnt watch Hunter x Hunter.";
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            Projectile         nenProj1 = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(336) as Gun).DefaultModule.projectiles[0]);
            PierceProjModifier pierce1  = nenProj1.gameObject.GetComponent <PierceProjModifier>();

            pierce1.penetration -= 4;
            nenProj1.AdditionalScaleMultiplier *= 1.5f;
            nenProj1.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(nenProj1.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(nenProj1);
            nenProj1.baseData.damage *= 1.5f;
            nenProj1.baseData.speed  *= 1f;
            nenProj1.transform.parent = gun.barrelOffset;
            Projectile nenProj2 = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(748) as Gun).DefaultModule.chargeProjectiles[0].Projectile);

            nenProj2.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(nenProj2.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(nenProj2);
            nenProj2.baseData.damage *= 1f;
            nenProj2.baseData.speed  *= 1f;
            nenProj2.baseData.range   = 7.5f;
            nenProj2.transform.parent = gun.barrelOffset;
            Projectile origProj = (PickupObjectDatabase.GetById(56) as Gun).DefaultModule.projectiles[0];
            Projectile nenProj3 = UnityEngine.Object.Instantiate(origProj);

            nenProj3.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(nenProj3.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(nenProj3);
            nenProj3.baseData.damage        *= 14f;
            nenProj3.baseData.speed         *= 2f;
            nenProj3.baseData.range          = 14;
            nenProj3.sprite.renderer.enabled = false;
            PierceProjModifier orAddComponent = nenProj3.gameObject.GetOrAddComponent <PierceProjModifier>();

            nenProj3.gameObject.AddComponent <UnchangeableRangeController>();
            orAddComponent.penetration -= 50;
            nenProj3.GetComponent <TrailController>();
            nenProj3.transform.parent = gun.barrelOffset;
            NenForms.Add(nenProj1);
            NenForms.Add(nenProj2);
            NenForms.Add(nenProj3);
            ProjectileModule.ChargeProjectile chargeProj1 = new ProjectileModule.ChargeProjectile()
            {
                Projectile = nenProj1,
                ChargeTime = 0f,
            };
            ProjectileModule.ChargeProjectile chargeProj2 = new ProjectileModule.ChargeProjectile()
            {
                Projectile = nenProj2,
                ChargeTime = .4f,
            };
            ProjectileModule.ChargeProjectile chargeProj3 = new ProjectileModule.ChargeProjectile()
            {
                Projectile = nenProj3,
                ChargeTime = 1.2f,
            };
            gun.DefaultModule.chargeProjectiles = new List <ProjectileModule.ChargeProjectile>
            {
                chargeProj1,
                chargeProj2,
                chargeProj3
            };
        }
Exemplo n.º 4
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("R.G.G.", "r.g.g.");

            RGG.rng_gun = gun;

            Game.Items.Rename("outdated_gun_mods:r.g.g.", "cel:r.g.g.");
            gun.gameObject.AddComponent <RGG>();
            gun.SetShortDescription("ShortDescription.txt");
            gun.SetLongDescription("Stats randomize each run. \n\nA gun from the fabled 3rd dimension, it has become unstable in this realm and is constantly shifting.");


            gun.SetupSprite(null, "r.g.g._idle_001", 8);

            gun.SetAnimationFPS(gun.shootAnimation, 24);
            gun.SetAnimationFPS(gun.reloadAnimation, 3);

            gun.AddProjectileModuleFrom("ak-47", true, false);

            gun.sprite.IsPerpendicular      = true;
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Automatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = RGG.rng_gun.reloadTime;
            gun.DefaultModule.cooldownTime        = RGG.rng_gun.DefaultModule.cooldownTime;
            gun.DefaultModule.numberOfShotsInClip = RGG.rng_gun.DefaultModule.numberOfShotsInClip;
            gun.muzzleFlashEffects = RGG.rng_gun.muzzleFlashEffects;
            gun.SetBaseMaxAmmo(RGG.rng_gun.GetBaseMaxAmmo());
            gun.quality  = PickupObject.ItemQuality.D;
            gun.gunClass = GunClass.SILLY;
            gun.encounterTrackable.EncounterGuid = "Thanks for the idea Reto! <3";
            gun.AddToSubShop(ItemBuilder.ShopType.Trorc);
            gun.AddToSubShop(ItemBuilder.ShopType.Cursula);
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

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

            projectile.transform.parent = gun.barrelOffset;

            if (SaveAPIManager.GetFlag(CustomDungeonFlags.EYESTRAINDISABLE) == true)
            {
                gun.sprite.usesOverrideMaterial = true;
                Material material = gun.sprite.renderer.material;
                material.shader = ShaderCache.Acquire("Brave/Internal/Glitch");
                material.SetFloat("_GlitchInterval", 0.05f);
                material.SetFloat("_DispProbability", 0.4f);
                material.SetFloat("_DispIntensity", 0.04f);
                material.SetFloat("_ColorProbability", 0.4f);
                material.SetFloat("_ColorIntensity", 0.04f);

                Material material2 = projectile.sprite.renderer.material;
                projectile.sprite.renderer.material = material;
                material2.shader = ShaderCache.Acquire("Brave/Internal/Glitch");
                material2.SetFloat("_GlitchInterval", 0.08f);
                material2.SetFloat("_DispProbability", 0.3f);
                material2.SetFloat("_DispIntensity", 0.014f);
                material2.SetFloat("_ColorProbability", 0.45f);
                material2.SetFloat("_ColorIntensity", 0.033f);
            }
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            RandomizeStats();
        }
Exemplo n.º 5
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Ancient Katana", "ancient_katana");

            Game.Items.Rename("outdated_gun_mods:ancient_katana", "sts:ancient_katana");
            gun.gameObject.AddComponent <Katana>();
            gun.SetShortDescription("Blade Breathing, 1st Form");
            gun.SetLongDescription("Can be charged to release a flurry of attacks.");
            gun.SetupSprite(null, "ancient_katana_idle_001", 8);
            gun.SetAnimationFPS(gun.shootAnimation, 12);
            gun.SetAnimationFPS(gun.reloadAnimation, 2);
            gun.AddProjectileModuleFrom("38_special", true, false);
            gun.DefaultModule.ammoType      = GameUIAmmoType.AmmoType.SMALL_BULLET;
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Charged;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 0f;
            gun.DefaultModule.angleVariance       = 0f;
            gun.DefaultModule.cooldownTime        = .5f;
            gun.DefaultModule.numberOfShotsInClip = 350;
            Gun gun2 = PickupObjectDatabase.GetById(151) as Gun;

            gun.muzzleFlashEffects.type = VFXPoolType.None;
            gun.SetBaseMaxAmmo(350);
            gun.barrelOffset.transform.localPosition = new Vector3(2.5f, 0f, 0f);
            gun.quality = PickupObject.ItemQuality.EXCLUDED;
            gun.encounterTrackable.EncounterGuid = "wht the f**k did this break MTG AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaAAAA.";
            gun.sprite.IsPerpendicular           = true;
            gun.gunClass = GunClass.NONE;
            Projectile projectile  = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);
            Projectile projectile2 = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            projectile.transform.parent = gun.barrelOffset;
            projectile.baseData.damage *= 3f;
            projectile.baseData.speed   = 0;
            ProjectileSlashingBehaviour slashingBehaviour = projectile.gameObject.AddComponent <ProjectileSlashingBehaviour>();

            slashingBehaviour.SlashDimensions  = 135;
            slashingBehaviour.SlashRange       = 5f;
            slashingBehaviour.delayBeforeSlash = .1f;


            projectile2.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile2.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile2);
            projectile2.transform.parent = gun.barrelOffset;
            projectile2.baseData.damage *= 3f;
            projectile2.baseData.speed   = 0;
            ProjectileSlashingBehaviour slashingBehaviour2 = projectile2.gameObject.AddComponent <ProjectileSlashingBehaviour>();

            slashingBehaviour2.SlashDimensions          = 135;
            slashingBehaviour2.SlashRange               = 5f;
            slashingBehaviour2.delayBeforeSlash         = .2f;
            slashingBehaviour2.DoesMultipleSlashes      = true;
            slashingBehaviour2.AmountOfMultiSlashes     = 5;
            slashingBehaviour2.DelayBetweenMultiSlashes = .2f;
            slashingBehaviour2.UsesAngleVariance        = true;
            slashingBehaviour2.MinSlashAngleOffset      = -8;
            slashingBehaviour2.MaxSlashAngleOffset      = 8;
            ProjectileModule.ChargeProjectile chargeProjectile1 = new ProjectileModule.ChargeProjectile()
            {
                Projectile = projectile,
                ChargeTime = 0
            };
            ProjectileModule.ChargeProjectile chargeProjectile2 = new ProjectileModule.ChargeProjectile()
            {
                Projectile = projectile2,
                ChargeTime = .7f
            };
            gun.DefaultModule.chargeProjectiles = new List <ProjectileModule.ChargeProjectile>
            {
                chargeProjectile1,
                chargeProjectile2
            };
            VFXPool SlashVFX = VFXLibrary.CreateMuzzleflash("katanaslice", new List <string> {
                "katanaslice_001", "katanaslice_002", "katanaslice_003",
            }, 10, new List <IntVector2> {
                new IntVector2(72, 67), new IntVector2(72, 67), new IntVector2(72, 67),
            }, new List <tk2dBaseSprite.Anchor> {
                tk2dBaseSprite.Anchor.MiddleLeft, tk2dBaseSprite.Anchor.MiddleLeft, tk2dBaseSprite.Anchor.MiddleLeft
            }, new List <Vector2> {
                Vector2.zero, Vector2.zero, Vector2.zero
            }, false, false, false, false, 0, VFXAlignment.Fixed, true, new List <float> {
                0, 0, 0
            }, new List <Color> {
                VFXLibrary.emptyColor, VFXLibrary.emptyColor, VFXLibrary.emptyColor
            });

            slashingBehaviour.SlashVFX  = SlashVFX;
            slashingBehaviour2.SlashVFX = SlashVFX;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToSubShop(ItemBuilder.ShopType.Goopton);
            gun.AddToSubShop(ItemBuilder.ShopType.Trorc);
        }
Exemplo n.º 6
0
        public static void Add()
        {

            Gun gun = ETGMod.Databases.Items.NewGun("Plasma Cannon", "plasma_cannon");
            Game.Items.Rename("outdated_gun_mods:plasma_cannon", "cel:plasma_cannon");
            gun.gameObject.AddComponent<PlasmaCannon>();
            gun.SetShortDescription("Spelunk'd");
            gun.SetLongDescription("Shoots extremely powerful explosions. Use with extreme caution.\n\nIt was built by aliens from Earth's moon, but sadly the recoil proved to be too strong for them to use it easily.");
            gun.SetupSprite(null, "plasma_cannon_idle_001", 8);
            gun.SetAnimationFPS(gun.shootAnimation, 18);
            gun.SetAnimationFPS(gun.reloadAnimation, 6);
            gun.AddProjectileModuleFrom("38_special", true, false);
            gun.DefaultModule.ammoCost = 1;
            gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 2f;
            gun.DefaultModule.angleVariance = 0f;
            gun.DefaultModule.cooldownTime = .2f;
            gun.DefaultModule.numberOfShotsInClip = 1;
            gun.InfiniteAmmo = true;
            gun.DefaultModule.ammoType = (PickupObjectDatabase.GetById(16) as Gun).DefaultModule.ammoType;
            Gun gun2 = PickupObjectDatabase.GetById(32) as Gun;
            gun.muzzleFlashEffects = gun2.muzzleFlashEffects;
            gun.SetBaseMaxAmmo(150);
            gun.barrelOffset.transform.localPosition = new Vector3(1.2f, .3f);
            gun.quality = PickupObject.ItemQuality.B;
            gun.encounterTrackable.EncounterGuid = "Good Luck Kiddo.";
            gun.sprite.IsPerpendicular = true;
            gun.gunClass = GunClass.EXPLOSIVE;
            Projectile projectile = UnityEngine.Object.Instantiate<Projectile>(gun.DefaultModule.projectiles[0]);
            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.transform.parent = gun.barrelOffset;
            projectile.baseData.damage *= 3;
            projectile.baseData.range *= 10000;
            projectile.baseData.speed *= 4;
            projectile.shouldRotate = true;
            //projectile.AppliesKnockbackToPlayer = true;
            //projectile.PlayerKnockbackForce = 100;
            Gun gun3 = PickupObjectDatabase.GetById(32) as Gun;
            gun.gunSwitchGroup = gun3.gunSwitchGroup;
            projectile.SetProjectileSpriteRight("plasma_shot", 32, 20, null, null);
            AIActor Firecracker = EnemyDatabase.GetOrLoadByGuid("4d37ce3d666b4ddda8039929225b7ede");
            ExplosiveModifier Spelunked = projectile.gameObject.AddComponent<ExplosiveModifier>();

            ExplosionData YourAreDecease = new ExplosionData
            {
                damageRadius = 5f,
                damageToPlayer = 0.5f,
                doDamage = true,
                damage = 35f,
                doExplosionRing = true,
                doDestroyProjectiles = true,
                doForce = true,
                debrisForce = 100f,
                pushRadius = 7f,
                force = 50f,
                preventPlayerForce = false,
                explosionDelay = 0f,
                usesComprehensiveDelay = false,
                doScreenShake = false,
                playDefaultSFX = true,
                effect = Firecracker.GetComponent<ExplodeOnDeath>().explosionData.effect,
                forceUseThisRadius = true,
                //AssetBundle assetBundle = ResourceManager.LoadAssetBundle("shared_auto_001");
                //  GameObject TestingVFX = assetBundle.LoadAsset<GameObject>("VFX_Dust_Explosion");
            };
            Spelunked.explosionData = YourAreDecease;
            Spelunked.IgnoreQueues = true;

            ETGMod.Databases.Items.Add(gun, null, "ANY");

            gun.AddToSubShop(ItemBuilder.ShopType.Trorc);

        }
Exemplo n.º 7
0
        public static void Add()
        {
            string shorthandName = "reloaded_rifle";
            Gun    gun           = ETGMod.Databases.Items.NewGun("Reloaded Rifle", shorthandName);

            Game.Items.Rename("outdated_gun_mods:" + shorthandName, "cel:" + shorthandName);
            var behav = gun.gameObject.AddComponent <ReloadedRifle>();

            gun.SetShortDescription("Of The Highest Quality");
            gun.SetLongDescription("Has multiple active reloads with different effects. If the first active reload is performed with an empty clip, the empty clip is thrown, stunning hit enemies.\n\nNothing is more satisfying, more sweet to a gunslinger than a crisp, fluid reload.");
            gun.SetupSprite(null, shorthandName + "_idle_001", 6);
            gun.SetAnimationFPS(gun.shootAnimation, 12);
            gun.AddProjectileModuleFrom("ak-47", true, false);
            gun.SetBaseMaxAmmo(500);
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Automatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 1.4f;
            gun.DefaultModule.cooldownTime = 0.11f;
            gun.gunClass = GunClass.RIFLE;
            gun.DefaultModule.numberOfShotsInClip = 25;
            gun.quality = PickupObject.ItemQuality.S;
            Gun gun2 = PickupObjectDatabase.GetById(15) as Gun;

            gun.muzzleFlashEffects = gun2.muzzleFlashEffects;
            gun.gunSwitchGroup     = gun2.gunSwitchGroup;
            gun.gunHandedness      = GunHandedness.TwoHanded;
            gun.barrelOffset.transform.localPosition = new Vector3(2.5f, .5f, 0f);
            gun.DefaultModule.angleVariance          = 4f;
            gun.encounterTrackable.EncounterGuid     = "r/HighQualityReloads";
            gun.sprite.IsPerpendicular = true;

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

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.damage      *= 1f;
            projectile.baseData.speed       *= 1f;
            projectile.baseData.force       *= 1f;
            projectile.transform.parent      = gun.barrelOffset;
            ProjectileSlashingBehaviour projectileSlashing = projectile.gameObject.AddComponent <ProjectileSlashingBehaviour>();

            projectileSlashing.SlashDimensions = 45;

            ETGMod.Databases.Items.Add(gun, null, "ANY");
            behav.activeReloadEnabled = true;
            behav.reloads             = new List <MultiActiveReloadData>
            {
                new MultiActiveReloadData(0.675f, 65, 69, 1, 1 * 3, false, true, new ActiveReloadData
                {
                    damageMultiply = 2f,
                }, true, "DamageUp"),
                new MultiActiveReloadData(.5f, 48, 52, 1, 1 * 3, false, true, new ActiveReloadData
                {
                    damageMultiply = 1,
                }, true, "AccuracyUp"),
                new MultiActiveReloadData(.85f, 83, 87, 1, 1 * 3, true, true, new ActiveReloadData
                {
                    damageMultiply = 1,
                }, true, "FireRateUp")
            };
        }
Exemplo n.º 8
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Firework Rifle", "firework_rifle");

            Game.Items.Rename("outdated_gun_mods:firework_rifle", "cel:firework_rifle");
            gun.gameObject.AddComponent <FireworkRifle>();
            gun.SetShortDescription("Bang, Bang, Bang! Here We Go!");
            gun.SetLongDescription("Shoots powerful fireworks.\n\nThis gun came from a world caught in an eternal struggle for balance. It was created to celebrate the journey of a hero.");

            gun.SetupSprite(null, "firework_rifle_idle_001", 8);
            gun.SetAnimationFPS(gun.shootAnimation, 18);
            gun.SetAnimationFPS(gun.reloadAnimation, 2);
            gun.AddProjectileModuleFrom("ak-47", true, false);

            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Automatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = .8f;
            gun.DefaultModule.angleVariance       = 4f;
            gun.DefaultModule.cooldownTime        = .2f;
            gun.DefaultModule.numberOfShotsInClip = 12;
            gun.DefaultModule.ammoType            = (PickupObjectDatabase.GetById(16) as Gun).DefaultModule.ammoType;
            Gun gun2 = PickupObjectDatabase.GetById(32) as Gun;

            gun.muzzleFlashEffects = gun2.muzzleFlashEffects;
            gun.SetBaseMaxAmmo(150);
            gun.barrelOffset.transform.localPosition = new Vector3(2, .3f);
            gun.quality = PickupObject.ItemQuality.S;
            gun.encounterTrackable.EncounterGuid = "pewpewgoboomboomdeath.";
            gun.sprite.IsPerpendicular           = true;
            gun.gunClass = GunClass.EXPLOSIVE;
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.transform.parent      = gun.barrelOffset;
            projectile.shouldRotate          = true;
            projectile.SetProjectileSpriteRight("firework_proj", 13, 7, null, null);
            AIActor           Firecracker = EnemyDatabase.GetOrLoadByGuid("5f15093e6f684f4fb09d3e7e697216b4");
            ExplosiveModifier GetFucked   = projectile.gameObject.AddComponent <ExplosiveModifier>();

            ExplosionData die = new ExplosionData
            {
                damageRadius         = 1.5f,
                damageToPlayer       = 0f,
                doDamage             = true,
                damage               = 15f,
                doExplosionRing      = true,
                doDestroyProjectiles = true,
                doForce              = true,
                debrisForce          = 5f,
                pushRadius           = 1.6f,
                force = 8f,
                preventPlayerForce     = true,
                explosionDelay         = 0f,
                usesComprehensiveDelay = false,
                doScreenShake          = false,
                playDefaultSFX         = true,
                effect = Firecracker.GetComponent <ExplodeOnDeath>().explosionData.effect,
                //AssetBundle assetBundle = ResourceManager.LoadAssetBundle("shared_auto_001");
                //  GameObject TestingVFX = assetBundle.LoadAsset<GameObject>("VFX_Dust_Explosion");
            };

            GetFucked.explosionData = die;


            ETGMod.Databases.Items.Add(gun, null, "ANY");

            gun.AddToSubShop(ItemBuilder.ShopType.Trorc);
        }
Exemplo n.º 9
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Prime Cannon", "prime_cannon");

            Game.Items.Rename("outdated_gun_mods:prime_cannon", "cel:prime_cannon");
            gun.gameObject.AddComponent <PrimeCannon>();
            gun.SetShortDescription("Leedle");
            gun.SetLongDescription("u-u");
            gun.SetupSprite(null, "prime_cannon_idle_001", 8);
            gun.SetAnimationFPS(gun.shootAnimation, 4);
            gun.SetAnimationFPS(gun.reloadAnimation, 2);
            gun.AddProjectileModuleFrom("38_special", true, false);
            gun.DefaultModule.ammoType      = GameUIAmmoType.AmmoType.SMALL_BULLET;
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Automatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime     = 0f;
            gun.gunSwitchGroup = (PickupObjectDatabase.GetById(19) as Gun).gunSwitchGroup;
            gun.DefaultModule.angleVariance       = 0f;
            gun.DefaultModule.cooldownTime        = 1f;
            gun.DefaultModule.numberOfShotsInClip = 150;
            Gun gun2 = PickupObjectDatabase.GetById(15) as Gun;

            gun.muzzleFlashEffects = gun2.muzzleFlashEffects;
            gun.SetBaseMaxAmmo(150);
            gun.quality = PickupObject.ItemQuality.EXCLUDED;
            gun.encounterTrackable.EncounterGuid = "For what purpose are you reading this????? why would you?? creep.";
            gun.sprite.IsPerpendicular           = true;
            gun.gunClass = GunClass.RIFLE;
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0]          = projectile;
            gun.barrelOffset.transform.localPosition -= new Vector3(0, .4f);
            projectile.transform.parent = gun.barrelOffset;
            AIActor           Grenat    = EnemyDatabase.GetOrLoadByGuid("b4666cb6ef4f4b038ba8924fd8adf38f");
            ExplosiveModifier GetFucked = projectile.gameObject.AddComponent <ExplosiveModifier>();
            ExplosionData     die       = new ExplosionData
            {
                damageRadius         = 1.5f,
                damageToPlayer       = 0f,
                doDamage             = true,
                damage               = 20f,
                doExplosionRing      = true,
                doDestroyProjectiles = true,
                doForce              = true,
                debrisForce          = 5f,
                pushRadius           = 1.6f,
                force = 8f,
                preventPlayerForce     = true,
                explosionDelay         = 0f,
                usesComprehensiveDelay = false,
                doScreenShake          = false,
                playDefaultSFX         = true,
                effect = Grenat.GetComponent <ExplodeOnDeath>().explosionData.effect
            };

            GetFucked.explosionData = die;
            projectile.SetProjectileSpriteRight("prime_bomb", 9, 9, null, null);
            ETGMod.Databases.Items.Add(gun, null, "ANY");
        }
Exemplo n.º 10
0
        public static void Add()
        {
            string shorthandName = "ion_fist";
            Gun    gun           = ETGMod.Databases.Items.NewGun("Ion Fist", shorthandName);

            Game.Items.Rename("outdated_gun_mods:" + shorthandName, "cel:" + shorthandName);
            gun.gameObject.AddComponent <IonFist>();
            gun.SetShortDescription("Casually Approach Child");
            gun.SetLongDescription("Charge up for powerful dashes. Grants melee immunity and flight while dashing. A fully-charged dash reflects projectiles.\n\nThis guantlet is charged to the brim with ions. Simply touching another object creates a powerful electric surge.");
            gun.SetupSprite(null, shorthandName + "_idle_001", 8);
            gun.SetAnimationFPS(gun.shootAnimation, 24);
            gun.AddProjectileModuleFrom("38_special", true, false);
            gun.SetBaseMaxAmmo(180);
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Charged;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 1.2f;
            gun.DefaultModule.cooldownTime = 0.5f;
            gun.gunClass = GunClass.CHARGE;
            gun.DefaultModule.numberOfShotsInClip = 5;
            gun.quality = PickupObject.ItemQuality.A;
            gun.muzzleFlashEffects.type          = VFXPoolType.None;
            gun.DefaultModule.angleVariance      = 0f;
            gun.encounterTrackable.EncounterGuid = "ion dash fist gun owo";
            gun.sprite.IsPerpendicular           = true;
            Projectile projectile1 = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(153) as Gun).DefaultModule.projectiles[0]);

            projectile1.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile1.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile1);
            gun.DefaultModule.projectiles[0] = projectile1;
            projectile1.gameObject.AddComponent <UnchangeableRangeController>();
            projectile1.baseData.damage          *= 1.2f;
            projectile1.baseData.speed           *= 1f;
            projectile1.baseData.force           *= 1f;
            projectile1.baseData.range            = 4f;
            projectile1.AdditionalScaleMultiplier = 1.1f;
            projectile1.transform.parent          = gun.barrelOffset;
            projectile1.sprite.renderer.enabled   = false;
            Projectile projectile2 = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(153) as Gun).DefaultModule.projectiles[0]);

            projectile2.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile2.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile2);
            gun.DefaultModule.projectiles[0] = projectile2;
            gun.gunHandedness = GunHandedness.HiddenOneHanded;
            projectile2.gameObject.AddComponent <UnchangeableRangeController>();
            projectile2.baseData.damage          *= 2.5f;
            projectile2.baseData.speed           *= .75f;
            projectile2.baseData.force           *= 1f;
            projectile2.baseData.range            = 7.5f;
            projectile2.AdditionalScaleMultiplier = 1.1f;
            projectile2.transform.parent          = gun.barrelOffset;
            projectile2.sprite.renderer.enabled   = false;
            Projectile projectile3 = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(153) as Gun).DefaultModule.projectiles[0]);

            projectile3.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile3.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile3);
            gun.DefaultModule.projectiles[0] = projectile3;
            projectile3.gameObject.AddComponent <UnchangeableRangeController>();
            projectile3.baseData.damage          *= 5f;
            projectile3.baseData.speed           *= .75f;
            projectile3.baseData.force           *= 1f;
            projectile3.baseData.range            = 14f;
            projectile3.AdditionalScaleMultiplier = 1.1f;
            projectile3.transform.parent          = gun.barrelOffset;
            projectile3.sprite.renderer.enabled   = false;
            ProjectileModule.ChargeProjectile chargeProj1 = new ProjectileModule.ChargeProjectile()
            {
                Projectile = projectile1,
                ChargeTime = .0f,
            };
            ProjectileModule.ChargeProjectile chargeProj2 = new ProjectileModule.ChargeProjectile()
            {
                Projectile = projectile2,
                ChargeTime = .6f,
            };
            ProjectileModule.ChargeProjectile chargeProj3 = new ProjectileModule.ChargeProjectile()
            {
                Projectile = projectile3,
                ChargeTime = 1.2f,
            };
            gun.DefaultModule.chargeProjectiles = new List <ProjectileModule.ChargeProjectile>
            {
                chargeProj1,
                chargeProj2,
                chargeProj3
            };

            ETGMod.Databases.Items.Add(gun, null, "ANY");
        }