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

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

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

            chargeProjectile.Projectile = projectile;
            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).wrapMode  = tk2dSpriteAnimationClip.WrapMode.LoopSection;
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).loopStart = 5;
            projectile.transform.parent = gun.barrelOffset;
            projectile.baseData.damage  = 0f;
            projectile.baseData.range   = 0f;
            projectile.baseData.force   = 350f;
            gun.AddToSubShop(ItemBuilder.ShopType.Trorc, 1f);
            gun.AddToSubShop(ItemBuilder.ShopType.Cursula, 1f);
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.EXAMPLE_BLUEPRINTBEETLEE, true);
            gun.AddItemToDougMetaShop(1000, null);
        }
Esempio n. 2
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;
        }
        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);
        }