コード例 #1
0
        private static void InitForme8()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Junk Sword", "junk8_sword");

            Game.Items.Rename("outdated_gun_mods:junk_sword", "spapi:junk_sword+junk_8");
            gun.gameObject.AddComponent <JunkSwordController>();
            GunExt.SetShortDescription(gun, "Next Time... What is This?");
            GunExt.SetLongDescription(gun, "Just a sword made out of junk. Some of the junk seems enchanted and may react different the more normal junk is around.");
            GunExt.SetupSprite(gun, null, "junk8_sword_idle_001", 8);
            GunExt.AddProjectileModuleFrom(gun, "klobb", true, false);
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(EnemyDatabase.GetOrLoadByGuid("c6c8e59d0f5d41969c74e802c9d67d07").bulletBank.GetBullet("angel").BulletObject.GetComponent <Projectile>());

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            projectile.name = "JunkSword_AngelForm_Projectile";
            gun.DefaultModule.projectiles[0]      = projectile;
            gun.DefaultModule.shootStyle          = ProjectileModule.ShootStyle.Automatic;
            gun.DefaultModule.angleVariance       = 30;
            gun.DefaultModule.cooldownTime        = 0.05f;
            gun.DefaultModule.ammoType            = GameUIAmmoType.AmmoType.CUSTOM;
            gun.DefaultModule.customAmmoType      = "white";
            gun.DefaultModule.numberOfShotsInClip = 999;
            gun.reloadTime   = 0;
            gun.InfiniteAmmo = true;
            gun.quality      = PickupObject.ItemQuality.EXCLUDED;
            gun.barrelOffset.transform.localPosition = new Vector3(0.65f, 1.7f, 0f);
            gun.encounterTrackable.EncounterGuid     = "junkan8_sword";
            gun.gunClass                = GunClass.SILLY;
            gun.gunSwitchGroup          = "Sack";
            gun.muzzleFlashEffects.type = VFXPoolType.None;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            JunkSwordController.AngelSwordID = gun.PickupObjectId;
        }
コード例 #2
0
        public static void Init()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Junk Sword", "junk1_sword");

            Game.Items.Rename("outdated_gun_mods:junk_sword", "spapi:junk_sword");
            gun.gameObject.AddComponent <JunkSwordController>();
            GunExt.SetShortDescription(gun, "Next Time... What is This?");
            GunExt.SetLongDescription(gun, "Just a sword made out of junk. Some of the junk seems enchanted and may react different the more normal junk is around.");
            GunExt.SetupSprite(gun, null, "junk1_sword_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 8);
            GunExt.AddProjectileModuleFrom(gun, "wonderboy", true, true);
            gun.DefaultModule.projectiles[0].baseData.damage = 5;
            gun.DefaultModule.shootStyle          = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.angleVariance       = 0;
            gun.DefaultModule.ammoType            = GameUIAmmoType.AmmoType.MEDIUM_BULLET;
            gun.DefaultModule.numberOfShotsInClip = 999;
            gun.reloadTime   = 0;
            gun.InfiniteAmmo = true;
            gun.quality      = PickupObject.ItemQuality.C;
            gun.barrelOffset.transform.localPosition = new Vector3(1.750f, 0.3f, 0f);
            gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(574) as Gun).muzzleFlashEffects;
            gun.encounterTrackable.EncounterGuid = "junkan1_sword";
            gun.OverrideNormalFireAudioEvent     = "Play_WPN_blasphemy_shot_01";
            gun.gunClass             = GunClass.SILLY;
            gun.gunSwitchGroup       = "Shotgun";
            gun.IsHeroSword          = true;
            gun.HeroSwordDoesntBlank = true;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToTrorkShop();
            gun.AddToBlacksmithShop();
            JunkSwordController.NormalSwordId = gun.PickupObjectId;
            JunkSwordController.InitFormes();
            gun.RemovePeskyQuestionmark();
            gun.PlaceItemInAmmonomiconAfterItemById(417);
        }
コード例 #3
0
        // Token: 0x06000116 RID: 278 RVA: 0x0000C598 File Offset: 0x0000A798
        public static void Init()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Big Gun", "big_gun");

            Game.Items.Rename("outdated_gun_mods:big_gun", "spapi:big_gun");
            gun.gameObject.AddComponent <BigGunController>();
            GunExt.SetShortDescription(gun, "A Gun That's Big");
            GunExt.SetLongDescription(gun, "A big gun.\n\nIn comparison with the Magnum, this one is bigger.");
            GunExt.SetupSprite(gun, null, "big_gun_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 16);
            GunExt.AddProjectileModuleFrom(gun, PickupObjectDatabase.GetById(601) as Gun, true, false);
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.angleVariance = 0f;
            gun.DefaultModule.ammoType      = GameUIAmmoType.AmmoType.MEDIUM_BULLET;
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(601) as 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      *= 2f;
            projectile.baseData.speed       *= 2f;
            projectile.name = "BigGun_Projectile";
            gun.DefaultModule.cooldownTime        = 0.15f;
            gun.DefaultModule.numberOfShotsInClip = 3;
            gun.reloadTime = 2.1f;
            gun.SetBaseMaxAmmo(60);
            gun.quality = PickupObject.ItemQuality.S;
            gun.barrelOffset.transform.localPosition = new Vector3(1.9f, 1f, 0f);
            gun.muzzleFlashEffects.type          = VFXPoolType.None;
            gun.encounterTrackable.EncounterGuid = "oh_look_this_gun_is_big";
            gun.gunClass = GunClass.PISTOL;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
        }
コード例 #4
0
        private static void InitForme9()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Junk Sword", "junk9_sword");

            Game.Items.Rename("outdated_gun_mods:junk_sword", "spapi:junk_sword+junk_9");
            gun.gameObject.AddComponent <JunkSwordController>();
            GunExt.SetShortDescription(gun, "Next Time... What is This?");
            GunExt.SetLongDescription(gun, "Just a sword made out of junk. Some of the junk seems enchanted and may react different the more normal junk is around.");
            GunExt.SetupSprite(gun, null, "junk9_sword_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 8);
            GunExt.AddProjectileModuleFrom(gun, "wonderboy", true, true);
            ProjectileModule mod = GunExt.AddProjectileModuleFrom(gun, (PickupObjectDatabase.GetById(345) as Gun), true, false);

            mod.angleVariance = 0;
            mod.cooldownTime  = 0;
            mod.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.projectiles[0].baseData.damage = 90;
            gun.DefaultModule.shootStyle          = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.angleVariance       = 0;
            gun.DefaultModule.ammoType            = GameUIAmmoType.AmmoType.MEDIUM_BULLET;
            gun.DefaultModule.numberOfShotsInClip = 999;
            gun.reloadTime   = 0;
            gun.InfiniteAmmo = true;
            gun.quality      = PickupObject.ItemQuality.EXCLUDED;
            gun.barrelOffset.transform.localPosition = new Vector3(1.750f, 0.3f, 0f);
            gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(574) as Gun).muzzleFlashEffects;
            gun.encounterTrackable.EncounterGuid = "junkan9_sword";
            gun.gunClass = GunClass.SILLY;
            gun.PreventNormalFireAudio = true;
            gun.IsHeroSword            = true;
            gun.HeroSwordDoesntBlank   = false;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            JunkSwordController.LightSaberId = gun.PickupObjectId;
        }
コード例 #5
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Aerial Bombardment", "aerialbombardment");

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

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

            Game.Items.Rename("outdated_gun_mods:billiard_bouncer", "cel:billiard_bouncer");
            gun.gameObject.AddComponent <BilliardBouncer>();
            gun.SetShortDescription("Solids Or Stripes?");
            gun.SetLongDescription("Shoots bouncing billiard balls that collide with other player projectiles. \n\nInvented by a gambler who enjoyed the sound of clinking billiard balls a little too much.");
            gun.SetupSprite(null, "billiard_bouncer_idle_001", 13);
            gun.SetAnimationFPS(gun.shootAnimation, 12);
            for (int i = 0; i < 3; i++)
            {
                GunExt.AddProjectileModuleFrom(gun, "38_special", true, false);
            }
            foreach (ProjectileModule projectileModule in gun.Volley.projectiles)
            {
                projectileModule.shootStyle = ProjectileModule.ShootStyle.SemiAutomatic;
                Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(projectileModule.projectiles[0]);
                projectile.gameObject.SetActive(false);
                FakePrefab.MarkAsFakePrefab(projectile.gameObject);
                UnityEngine.Object.DontDestroyOnLoad(projectile);
                projectileModule.projectiles[0]      = projectile;
                projectileModule.angleVariance       = 10;
                projectile.transform.parent          = gun.barrelOffset;
                gun.DefaultModule.projectiles[0]     = projectile;
                projectile.baseData.damage          *= 1;
                projectile.baseData.speed           *= 1f;
                projectileModule.numberOfShotsInClip = 8;
                projectileModule.cooldownTime        = .6f;
                BounceProjModifier bounce = projectile.gameObject.AddComponent <BounceProjModifier>();
                projectile.gameObject.AddComponent <BilliardBounceAdder>();
                bounce.damageMultiplierOnBounce = 1;
                bounce.numberOfBounces          = 6;
                projectile.baseData.range      *= 10f;
                projectileModule.ammoType       = GameUIAmmoType.AmmoType.SHOTGUN;
                projectile.shouldRotate         = true;
                projectile.SetProjectileSpriteRight("billiard_1", 9, 9, null, null);
                bool flag = projectileModule == gun.DefaultModule;
                if (flag)
                {
                    projectileModule.ammoCost = 1;
                }
                else
                {
                    projectileModule.ammoCost = 0;
                }
            }
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 1.5f;
            gun.Volley.UsesShotgunStyleVelocityRandomizer = true;
            gun.Volley.DecreaseFinalSpeedPercentMin       = -10f;
            gun.Volley.IncreaseFinalSpeedPercentMax       = 10f;
            gun.SetBaseMaxAmmo(150);
            gun.gunClass = GunClass.SILLY;
            gun.muzzleFlashEffects.type = VFXPoolType.None;
            gun.quality = PickupObject.ItemQuality.A;
            gun.encounterTrackable.EncounterGuid = "Billiard Shotgun";
            gun.sprite.IsPerpendicular           = true;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
        }
コード例 #7
0
        public static void Init()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Lich's Faithful Gun", "lichs_favorite");

            Game.Items.Rename("outdated_gun_mods:lich's_faithful_gun", "spapi:lichs_faithful_gun");
            gun.gameObject.AddComponent <LichsFavoriteController>();
            GunExt.SetShortDescription(gun, "Iron Fights");
            GunExt.SetLongDescription(gun, "Doesn't shoot. Once used by the lord of the Sixth Chamber as his favorite weapon.\n\nThis gun radiates unfathomable magical power.");
            GunExt.SetupSprite(gun, null, "lichs_favorite_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 16);
            GunExt.AddProjectileModuleFrom(gun, "klobb", true, false);
            gun.DefaultModule.shootStyle          = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.angleVariance       = 0;
            gun.DefaultModule.ammoType            = GameUIAmmoType.AmmoType.MEDIUM_BULLET;
            gun.DefaultModule.cooldownTime        = 0;
            gun.DefaultModule.numberOfShotsInClip = 1;
            gun.InfiniteAmmo = true;
            gun.quality      = PickupObject.ItemQuality.S;
            gun.barrelOffset.transform.localPosition = new Vector3(1.7f, 0.65f, 0f);
            gun.encounterTrackable.EncounterGuid     = "lichs_favorite_gun";
            gun.gunClass = GunClass.PISTOL;
            gun.muzzleFlashEffects.type = VFXPoolType.None;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToBlacksmithShop();
            gun.RemovePeskyQuestionmark();
            gun.PlaceItemInAmmonomiconAfterItemById(198);
            gun.SetupUnlockOnFlag(GungeonFlags.GUNSLINGER_PAST_KILLED, true);
        }
コード例 #8
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Infinite AK", "infinite_ak");

            Game.Items.Rename("outdated_gun_mods:infinite_ak", "cel:infinite_ak");
            gun.gameObject.AddComponent <InfiniteAK>();
            gun.SetShortDescription("Witness Perfection");
            gun.SetLongDescription("Perfect, brilliant. This gun might not be the strongest around, but it is the most refined. Every aspect of it is flawless. Each bullet it shoots is symmetrical and expertly crafted. Be grateful to witness such beauty.");
            gun.SetupSprite(null, "infinite_ak_idle_001", 8);
            gun.SetAnimationFPS(gun.shootAnimation, 9);
            gun.SetAnimationFPS(gun.reloadAnimation, 10);
            for (int i = 0; i < 1; i++)
            {
                GunExt.AddProjectileModuleFrom(gun, "ak-47", true, false);
            }
            foreach (ProjectileModule projectileModule in gun.Volley.projectiles)
            {
                projectileModule.shootStyle = ProjectileModule.ShootStyle.Automatic;
                Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(projectileModule.projectiles[0]);
                projectile.gameObject.SetActive(false);
                FakePrefab.MarkAsFakePrefab(projectile.gameObject);
                UnityEngine.Object.DontDestroyOnLoad(projectile);
                projectileModule.projectiles[0]      = projectile;
                projectileModule.angleVariance       = 4;
                projectile.transform.parent          = gun.barrelOffset;
                gun.DefaultModule.projectiles[0]     = projectile;
                projectile.baseData.damage          *= 1.5f;
                projectile.baseData.speed           *= 2f;
                projectileModule.numberOfShotsInClip = 1;
                projectileModule.cooldownTime        = .08f;
                projectile.ignoreDamageCaps          = true;
                projectileModule.ammoType            = GameUIAmmoType.AmmoType.SMALL_BULLET;

                bool flag = projectileModule == gun.DefaultModule;
                if (flag)
                {
                    projectileModule.ammoCost = 1;
                }
                else
                {
                    projectileModule.ammoCost = 0;
                }
            }

            gun.reloadTime              = -1f;
            gun.CanBeDropped            = false;
            gun.CanBeSold               = false;
            gun.muzzleFlashEffects.type = VFXPoolType.None;
            gun.InfiniteAmmo            = true;
            gun.gunSwitchGroup          = (PickupObjectDatabase.GetById(15) as Gun).gunSwitchGroup;
            gun.muzzleFlashEffects      = (PickupObjectDatabase.GetById(15) as Gun).muzzleFlashEffects;
            gun.SetBaseMaxAmmo(2000);
            gun.quality = PickupObject.ItemQuality.EXCLUDED;
            gun.encounterTrackable.EncounterGuid     = "the condition, state, or quality of being free or as free as possible from all flaws or defects.";
            gun.sprite.IsPerpendicular               = true;
            gun.barrelOffset.transform.localPosition = new Vector3(2.25f, 0.3125f, 0f);
            gun.gunClass = GunClass.FULLAUTO;

            ETGMod.Databases.Items.Add(gun, null, "ANY");
        }
コード例 #9
0
        public static void Init()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Impostor's Sidearm", "impgun");

            Game.Items.Rename("outdated_gun_mods:impostor's_sidearm", "spapi:impostors_sidearm");
            GunExt.SetShortDescription(gun, "No!! Please!");
            GunExt.SetLongDescription(gun, "\n\nNormally locked up in the weapons cache, This gun my be responsible for countless accounts of cold blooded murder. Now why would a mere crewmate need such a bulky, powerful weapon.. " +
                                      "as one fellow crewmate once stated \"That's kind of sus\"");
            GunExt.SetupSprite(gun, null, "impgun_idle_001", 12);
            GunExt.AddProjectileModuleFrom(gun, "klobb", true, false);
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.angleVariance = 0;
            gun.gameObject.AddComponent <ImpostersSidearm>();
            gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.MEDIUM_BULLET;
            Projectile projectile = UnityEngine.Object.Instantiate((PickupObjectDatabase.GetById(56) as Gun).DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.damage       = 12f;
            projectile.name = "ImposterGun_Projectile";
            gun.DefaultModule.cooldownTime        = 0.69f;
            gun.DefaultModule.numberOfShotsInClip = 8;
            gun.reloadTime         = 1.89f;
            gun.InfiniteAmmo       = true;
            gun.quality            = PickupObject.ItemQuality.SPECIAL;
            gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(56) as Gun).muzzleFlashEffects;
            gun.barrelOffset.transform.localPosition = new Vector3(1.0625f, 0.5625f, 0f);
            gun.gunClass = GunClass.PISTOL;
            for (int i = 0; i < gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).frames.Length; i++)
            {
                gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).frames[i].triggerEvent = true;
                tk2dSpriteDefinition def = gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).frames[i].spriteCollection.spriteDefinitions[gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).frames[i].spriteId];
                Vector2 offset           = new Vector2(((float)fireOffsets[i].x) / 16f, ((float)fireOffsets[i].y) / 16f);
                ImpostersKnife.MakeOffset(def, offset);
            }
            for (int i = 0; i < gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.reloadAnimation).frames.Length; i++)
            {
                gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.reloadAnimation).frames[i].triggerEvent = true;
                tk2dSpriteDefinition def = gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.reloadAnimation).frames[i].spriteCollection.spriteDefinitions[gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.reloadAnimation).frames[i].spriteId];
                Vector2 offset           = new Vector2(((float)reloadOffsets[i].x) / 16f, ((float)reloadOffsets[i].y) / 16f);
                ImpostersKnife.MakeOffset(def, offset);
            }
            for (int i = 0; i < gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.introAnimation).frames.Length; i++)
            {
                gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.introAnimation).frames[i].triggerEvent = true;
                tk2dSpriteDefinition def = gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.introAnimation).frames[i].spriteCollection.spriteDefinitions[gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.introAnimation).frames[i].spriteId];
                Vector2 offset           = new Vector2(((float)introOffsets[i].x) / 16f, ((float)introOffsets[i].y) / 16f);
                ImpostersKnife.MakeOffset(def, offset);
            }
            for (int i = 0; i < gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.emptyAnimation).frames.Length; i++)
            {
                gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.emptyAnimation).frames[i].triggerEvent = true;
                tk2dSpriteDefinition def = gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.emptyAnimation).frames[i].spriteCollection.spriteDefinitions[gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.emptyAnimation).frames[i].spriteId];
                Vector2 offset           = new Vector2(((float)emptyOffsets[i].x) / 16f, ((float)emptyOffsets[i].y) / 16f);
                ImpostersKnife.MakeOffset(def, offset);
            }
            ETGMod.Databases.Items.Add(gun, null, "ANY");
        }
コード例 #10
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Dwarven Mallet", "dwarven_mallet");

            Game.Items.Rename("outdated_gun_mods:dwarven_mallet", "cel:dwarven_mallet");
            gun.gameObject.AddComponent <DwarvenMallet>();
            GunExt.SetShortDescription(gun, "Trusty, Not Safe");
            GunExt.SetLongDescription(gun, "A simple Dwarven smithing hammer.\n\nWhile it is a techinally used as a melee weapon, it also is used to create firearms. " +
                                      "This has led the Gungeon to simply ignore the fact it is a melee weapon.");
            GunExt.SetupSprite(gun, null, "dwarven_mallet_idle_001", 1);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 8);
            GunExt.SetAnimationFPS(gun, gun.idleAnimation, 1);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 1);
            GunExt.AddProjectileModuleFrom(gun, "wonderboy", true, true);
            gun.SetBaseMaxAmmo(100);
            gun.reloadTime = 0f;
            gun.DefaultModule.cooldownTime = .2f;
            gun.InfiniteAmmo = true;
            gun.DefaultModule.numberOfShotsInClip = int.MaxValue;
            gun.quality = PickupObject.ItemQuality.SPECIAL;
            gun.encounterTrackable.EncounterGuid = "dwarven_mallet";
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.CanBeDropped = false;
            gun.InfiniteAmmo = true;
            //ItemBuilder.AddPassiveStatModifier(gun, PlayerStats.StatType.Curse, 1f, StatModifier.ModifyMethod.ADDITIVE);
            Gun gun2 = (Gun)ETGMod.Databases.Items["wonderboy"];

            gun.muzzleFlashEffects   = gun2.muzzleFlashEffects;
            gun.IsHeroSword          = true;
            gun.HeroSwordDoesntBlank = false;
            gun.DefaultModule.GetCurrentProjectile().baseData.damage = 20f;
        }
コード例 #11
0
        public static void Init()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Mimigun", "mimigun");

            Game.Items.Rename("outdated_gun_mods:mimigun", "spapi:mimigun");
            gun.gameObject.AddComponent <MimigunController>();
            GunExt.SetShortDescription(gun, "Baby Good Mimigun");
            GunExt.SetLongDescription(gun, "Despite most mimics being evil, and trying to stop gungeoneers in any ways, this one is good and will try to help it's owner as it can. It isn't very powerful, but as all mimics, it has the ability to mimic anything" +
                                      " it sees. It one will try to use it to help.");
            GunExt.SetupSprite(gun, null, "mimigun_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 16);
            GunExt.AddProjectileModuleFrom(gun, Toolbox.GetGunById(734), true, false);
            gun.reloadTime = 2.0f;
            gun.SetBaseMaxAmmo(900);
            gun.quality = PickupObject.ItemQuality.A;
            gun.barrelOffset.transform.localPosition = new Vector3(1.85f, 0.6f, 0f);
            gun.encounterTrackable.EncounterGuid     = "mimigun_very_cute";
            gun.gunClass           = GunClass.SILLY;
            gun.gunSwitchGroup     = Toolbox.GetGunById(734).gunSwitchGroup;
            gun.muzzleFlashEffects = Toolbox.GetGunById(734).muzzleFlashEffects;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToCursulaShop();
            gun.AddToBlacksmithShop();
            gun.RemovePeskyQuestionmark();
            gun.PlaceItemInAmmonomiconAfterItemById(369);
            gun.SetupUnlockOnFlag(GungeonFlags.ITEMSPECIFIC_HAS_BEEN_PEDESTAL_MIMICKED, true);
            mimigunId = gun.PickupObjectId;
        }
コード例 #12
0
        public static void Init()
        {
            Gun bulletkinGun = ETGMod.Databases.Items.NewGun("The Bullet Kin Gun", "bulletkin_gun");

            Game.Items.Rename("outdated_gun_mods:the_bullet_kin_gun", "ex:bulletkin_gun");
            bulletkinGun.SetShortDescription("Fires Bullet Kin...");
            bulletkinGun.SetLongDescription("This gun fires Bullet Kins....Don't ask questions. Just accept it.");
            GunExt.SetupSprite(bulletkinGun, null, "bulletkin_gun_idle_001", 18);
            bulletkinGun.AddProjectileModuleFrom("Magnum", true, false);
            bulletkinGun.DefaultModule.ammoCost            = 1;
            bulletkinGun.DefaultModule.angleVariance       = 0;
            bulletkinGun.DefaultModule.numberOfShotsInClip = 1;
            bulletkinGun.DefaultModule.shootStyle          = ProjectileModule.ShootStyle.SemiAutomatic;
            bulletkinGun.DefaultModule.sequenceStyle       = ProjectileModule.ProjectileSequenceStyle.Random;
            bulletkinGun.DefaultModule.cooldownTime        = 0.15f;
            bulletkinGun.DefaultModule.positionOffset      = new Vector3(0.05f, 0.01f);
            bulletkinGun.reloadTime = 0.6f;
            bulletkinGun.gunClass   = GunClass.PISTOL;
            bulletkinGun.ammo       = 140;
            bulletkinGun.SetBaseMaxAmmo(140);
            bulletkinGun.quality = ItemQuality.C;
            if (!ExpandSettings.EnableEXItems)
            {
                bulletkinGun.quality = ItemQuality.EXCLUDED;
            }
            bulletkinGun.alternateSwitchGroup             = (PickupObjectDatabase.GetById(150) as Gun).gunSwitchGroup;
            bulletkinGun.gunSwitchGroup                   = (PickupObjectDatabase.GetById(150) as Gun).gunSwitchGroup;
            bulletkinGun.encounterTrackable.EncounterGuid = "43a080b46fa448ef8d2be35f93ab6e64";
            bulletkinGun.gameObject.AddComponent <ExpandFireEnemiesGunMod>();

            ETGMod.Databases.Items.Add(bulletkinGun);

            BulletKinGunID = bulletkinGun.PickupObjectId;
        }
コード例 #13
0
 public static void SetupEXItem(PickupObject item, string name, string shortDesc, string longDesc, string idPool = "ex", bool createEncounterTrackable = true)
 {
     try {
         item.encounterTrackable = null;
         ETGMod.Databases.Items.SetupItem(item, item.name);
         SpriteBuilder.AddToAmmonomicon(item.sprite.GetCurrentSpriteDef());
         item.encounterTrackable.journalData.AmmonomiconSprite = item.sprite.GetCurrentSpriteDef().name;
         GunExt.SetName(item, name);
         GunExt.SetShortDescription(item, shortDesc);
         GunExt.SetLongDescription(item, longDesc);
         bool isPlayerItem = item is PlayerItem;
         if (isPlayerItem)
         {
             (item as PlayerItem).consumable = false;
         }
         Game.Items.Add(idPool + ":" + name.ToLower().Replace(" ", "_"), item);
         ETGMod.Databases.Items.Add(item, false, "ANY");
         if (!createEncounterTrackable)
         {
             UnityEngine.Object.Destroy(item.encounterTrackable);
         }
     } catch (Exception ex) {
         UnityEngine.Debug.LogException(ex);
         ETGModConsole.Log(ex.Message, false);
         ETGModConsole.Log(ex.StackTrace, false);
     }
 }
コード例 #14
0
 // Token: 0x06000024 RID: 36 RVA: 0x00002EE8 File Offset: 0x000010E8
 public static void SetupItem(this PickupObject item, string shortDesc, string longDesc, string idPool = "customItems")
 {
     try
     {
         item.encounterTrackable = null;
         ETGMod.Databases.Items.SetupItem(item, item.name);
         SpriteBuilder.AddToAmmonomicon(item.sprite.GetCurrentSpriteDef());
         item.encounterTrackable.journalData.AmmonomiconSprite = item.sprite.GetCurrentSpriteDef().name;
         GunExt.SetName(item, item.name);
         GunExt.SetShortDescription(item, shortDesc);
         GunExt.SetLongDescription(item, longDesc);
         bool flag = item is PlayerItem;
         if (flag)
         {
             (item as PlayerItem).consumable = false;
         }
         Game.Items.Add(idPool + ":" + item.name.ToLower().Replace(" ", "_"), item);
         ETGMod.Databases.Items.Add(item, false, "ANY");
         FakePrefab.MarkAsFakePrefab(item.gameObject);
         item.gameObject.SetActive(false);
     }
     catch (Exception ex)
     {
         ETGModConsole.Log(ex.Message, false);
         ETGModConsole.Log(ex.StackTrace, false);
     }
 }
コード例 #15
0
ファイル: LichsGun.cs プロジェクト: SpecialAPI/LichItems
        public static void InitSynergyForm(Gun original)
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Synergy Lich's Gun", "lichsgun2");

            Game.Items.Rename("outdated_gun_mods:synergy_lich's_gun", "spapi:lichs_gun+master_of_the_gungeon");
            GunExt.SetShortDescription(gun, "Bullet Dance");
            GunExt.SetLongDescription(gun, "This is Gun from Gungeon Master.");
            GunExt.SetupSprite(gun, null, "lichsgun2_idle_001", 10);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 12);
            GunExt.AddProjectileModuleFrom(gun, "klobb", true, false);
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.angleVariance = 0;
            gun.DefaultModule.ammoType      = GameUIAmmoType.AmmoType.MEDIUM_BULLET;
            InputGuidedProjectile projectile = CopyFields <InputGuidedProjectile>(UnityEngine.Object.Instantiate((PickupObjectDatabase.GetById(183) as Gun).DefaultModule.projectiles[0]));

            projectile.trackingSpeed = 500f;
            projectile.dumbfireTime  = -1f;
            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.damage       = 8f;
            projectile.shouldRotate          = true;
            projectile.name           = "LichsGun2_Projectile";
            projectile.baseData.range = 40f;
            projectile.baseData.speed = 22f;
            SetProjectileSpriteRight(projectile, "lichsgun_projectile_001", 6, 6, false, tk2dBaseSprite.Anchor.MiddleCenter, true, false, null, null, null, null, (PickupObjectDatabase.GetById(183) as Gun).DefaultModule.projectiles[0]);
            gun.reloadClipLaunchFrame             = 0;
            gun.DefaultModule.cooldownTime        = 0.1f;
            gun.DefaultModule.numberOfShotsInClip = 17;
            for (int i = 0; i < gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).frames.Length; i++)
            {
                gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).frames[i].triggerEvent = true;
                tk2dSpriteDefinition def = gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).frames[i].spriteCollection.spriteDefinitions[gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.shootAnimation).frames[i].spriteId];
                Vector2 offset           = new Vector2(((float)synergyFireOffsets[i].x) / 16f, ((float)synergyFireOffsets[i].y) / 16f);
                LichsBookItem.MakeOffset(def, offset);
            }
            for (int i = 0; i < gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.reloadAnimation).frames.Length; i++)
            {
                gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.reloadAnimation).frames[i].triggerEvent = true;
                tk2dSpriteDefinition def = gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.reloadAnimation).frames[i].spriteCollection.spriteDefinitions[gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.reloadAnimation).frames[i].spriteId];
                Vector2 offset           = new Vector2(((float)synergyReloadOffsets[i].x) / 16f, ((float)synergyReloadOffsets[i].y) / 16f);
                LichsBookItem.MakeOffset(def, offset);
            }
            gun.gunSwitchGroup     = "Colt1851";
            gun.gunHandedness      = GunHandedness.HiddenOneHanded;
            gun.muzzleFlashEffects = original.muzzleFlashEffects;
            gun.reloadTime         = 1.1f;
            gun.SetBaseMaxAmmo(700);
            gun.quality = PickupObject.ItemQuality.SPECIAL;
            gun.barrelOffset.transform.localPosition = new Vector3(1.1875f, 0.5625f, 0f);
            gun.gunClass = GunClass.PISTOL;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            AdvancedTransformGunSynergyProcessor processor = original.gameObject.AddComponent <AdvancedTransformGunSynergyProcessor>();

            processor.NonSynergyGunId = original.PickupObjectId;
            processor.SynergyGunId    = gun.PickupObjectId;
            processor.SynergyToCheck  = "Master of Gungeon";
        }
コード例 #16
0
        public static void Add()
        {
            SHonk = (PickupObjectDatabase.GetById(202) as Gun);

            Gun gun = ETGMod.Databases.Items.NewGun("Sawed-off Honker", "sawed-off_honker");

            Game.Items.Rename("outdated_gun_mods:sawed-off_honker", "honkies:sawed-off_honker");
            gun.gameObject.AddComponent <HonkerShotgun>();
            gun.SetShortDescription("No Butts About It");
            gun.SetLongDescription("A trombone modified for easy concealment. The shorter barrel widens the spread, but up-close, it's just as deadly as its full-barreled cousin.");
            gun.SetupSprite(null, "sawed-off_honker_idle_001", 8);
            gun.SetAnimationFPS(gun.shootAnimation, 10);
            gun.SetAnimationFPS(gun.reloadAnimation, 10);
            for (int i = 0; i < 4; i++)
            {
                GunExt.AddProjectileModuleFrom(gun, SHonk, true, false);
            }
            foreach (ProjectileModule projectileModule in gun.Volley.projectiles)
            {
                gun.DefaultModule.ammoType            = SHonk.AmmoType;
                gun.DefaultModule.ammoCost            = SHonk.DefaultModule.ammoCost;
                gun.DefaultModule.shootStyle          = SHonk.DefaultModule.shootStyle;
                gun.DefaultModule.sequenceStyle       = SHonk.DefaultModule.sequenceStyle;
                gun.DefaultModule.angleVariance       = SHonk.DefaultModule.angleVariance;
                gun.DefaultModule.cooldownTime        = SHonk.DefaultModule.cooldownTime;
                gun.DefaultModule.numberOfShotsInClip = SHonk.DefaultModule.numberOfShotsInClip;
                Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(projectileModule.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      *= 1f;
                projectile.baseData.speed       *= 1f;
                projectile.baseData.force       *= 1f;

                bool flag = projectileModule == gun.DefaultModule;
                if (flag)
                {
                    projectileModule.ammoCost = 1;
                }
                else
                {
                    projectileModule.ammoCost = 0;
                }
            }

            gun.reloadTime         = SHonk.reloadTime;
            gun.gunSwitchGroup     = SHonk.gunSwitchGroup;
            gun.muzzleFlashEffects = SHonk.muzzleFlashEffects;
            gun.SetBaseMaxAmmo(SHonk.GetBaseMaxAmmo());
            gun.quality = SHonk.quality;
            gun.encounterTrackable.EncounterGuid     = "why did i make this f*****g mod i hate it whyyyyy";
            gun.sprite.IsPerpendicular               = true;
            gun.barrelOffset.transform.localPosition = new Vector3(1.625f, 0.5f, 0f);
            gun.gunClass = SHonk.gunClass;

            ETGMod.Databases.Items.Add(gun, null, "ANY");
        }
コード例 #17
0
        // Token: 0x06000192 RID: 402 RVA: 0x0000CD0C File Offset: 0x0000AF0C
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Rhythminator", "rhythminator");

            Game.Items.Rename("outdated_gun_mods:rhythminator", "bb:rhythminator");
            gun.gameObject.AddComponent <Rhythminator>();
            GunExt.SetShortDescription(gun, "Keeping The Beat");
            GunExt.SetLongDescription(gun, "A strange gun that seems to pulse at a steady rate. As you hold the gun, the pulse finds its way into your every move...\n\nLet's dance.");
            GunExt.SetupSprite(gun, null, "rhythminator_idle_001", 10);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 10);
            GunExt.AddProjectileModuleFrom(gun, PickupObjectDatabase.GetById(577) as Gun, true, false);
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Automatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 4f;
            gun.DefaultModule.cooldownTime        = 0.133333f;
            gun.DefaultModule.numberOfShotsInClip = 25;
            gun.barrelOffset.position            += new Vector3(1f, 0f, 0f);
            gun.SetBaseMaxAmmo(500);
            gun.quality = PickupObject.ItemQuality.B;
            gun.encounterTrackable.EncounterGuid = "72687974686d";
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.AdditionalScaleMultiplier = 1.5f;
            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.damage      *= 0.667f;
            projectile.baseData.speed       *= 1.33333f;
            projectile.transform.parent      = gun.barrelOffset;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            MultiActiveReloadController multiActiveReloadController = gun.gameObject.AddComponent <MultiActiveReloadController>();

            multiActiveReloadController.activeReloadEnabled = true;
            multiActiveReloadController.reloads             = new List <MultiActiveReloadData>
            {
                new MultiActiveReloadData(0.37f, 36, 38, 3, 3, false, true, new ActiveReloadData
                {
                    damageMultiply = 1.75f
                }, true),
                new MultiActiveReloadData(0.5f, 49, 51, 5, 9, false, true, new ActiveReloadData
                {
                    damageMultiply = 2f
                }, true),
                new MultiActiveReloadData(0.62f, 61, 63, 3, 3, false, true, new ActiveReloadData
                {
                    damageMultiply = 2.25f
                }, true),
                new MultiActiveReloadData(0.75f, 74, 76, 3, 3, false, true, new ActiveReloadData
                {
                    damageMultiply = 2.5f
                }, true),
                new MultiActiveReloadData(0.87f, 86, 88, 3, 3, false, true, new ActiveReloadData
                {
                    damageMultiply = 2.75f
                }, true)
            };
        }
コード例 #18
0
ファイル: ThunderStorm.cs プロジェクト: Some-Bunny/BunnyMod
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Thunder Storm", "thunderstorm");

            Game.Items.Rename("outdated_gun_mods:thunder_storm", "bny:thunder_storm");
            gun.gameObject.AddComponent <ThunderStorm>();
            GunExt.SetShortDescription(gun, "Electric Music");
            GunExt.SetLongDescription(gun, "A master-craft weapon near-paradoxically made by a musician with no prior knowledge of guncraft. The letters 'C.C' are engraved on its side.");
            GunExt.SetupSprite(gun, null, "thunderstorm_idle_001", 2);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 16);
            GunExt.SetAnimationFPS(gun, gun.idleAnimation, 2);
            GunExt.SetAnimationFPS(gun, gun.chargeAnimation, 3);
            GunExt.AddProjectileModuleFrom(gun, PickupObjectDatabase.GetById(390) as Gun, true, false);
            gun.DefaultModule.chargeProjectiles = new List <ProjectileModule.ChargeProjectile>();
            foreach (ProjectileModule.ChargeProjectile chargeProj in (PickupObjectDatabase.GetById(390) as Gun).DefaultModule.chargeProjectiles)
            {
                gun.DefaultModule.chargeProjectiles.Add(new ProjectileModule.ChargeProjectile
                {
                    AdditionalWwiseEvent       = chargeProj.AdditionalWwiseEvent,
                    AmmoCost                   = chargeProj.AmmoCost = 3,
                    ChargeTime                 = chargeProj.ChargeTime,
                    LightIntensity             = chargeProj.LightIntensity = .1f,
                    MegaReflection             = chargeProj.MegaReflection,
                    OverrideMuzzleFlashVfxPool = chargeProj.OverrideMuzzleFlashVfxPool,
                    OverrideShootAnimation     = chargeProj.OverrideShootAnimation,
                    previousChargeProjectile   = chargeProj.previousChargeProjectile,
                    Projectile                 = chargeProj.Projectile,
                    ScreenShake                = chargeProj.ScreenShake,
                    UsedProperties             = chargeProj.UsedProperties,
                    VfxPool = chargeProj.VfxPool
                });
            }
            gun.DefaultModule.ammoCost                  = 1;
            gun.DefaultModule.shootStyle                = ProjectileModule.ShootStyle.Charged;
            gun.DefaultModule.sequenceStyle             = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.DefaultModule.cooldownTime              = 1f;
            gun.DefaultModule.angleVariance             = 0f;
            gun.DefaultModule.numberOfShotsInClip       = 3;
            gun.DefaultModule.preventFiringDuringCharge = true;
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            gun.DefaultModule.projectiles[0] = projectile;
            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            projectile.baseData.damage          *= 2f;
            projectile.AdditionalScaleMultiplier = 1f;
            projectile.baseData.range            = 6.25f;
            gun.reloadTime = 1f;
            gun.SetBaseMaxAmmo(90);
            gun.quality = PickupObject.ItemQuality.S;
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).wrapMode  = tk2dSpriteAnimationClip.WrapMode.LoopSection;
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).loopStart = 3;
            gun.encounterTrackable.EncounterGuid = "jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj";
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.barrelOffset.transform.localPosition = new Vector3(1.37f, 0.37f, 0f);
            gun.DefaultModule.chargeProjectiles[0].UsedProperties = new ProjectileModule.ChargeProjectileProperties();
        }
コード例 #19
0
        public static void Init()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Celebration", "mk1");

            Game.Items.Rename("outdated_gun_mods:celebration", "spapi:celebration");
            gun.gameObject.AddComponent <CelebrationMk1>();
            GunExt.SetShortDescription(gun, "Great For Gunparties!");
            GunExt.SetLongDescription(gun, "Shoots fireworks. Yes, fireworks.\n\nGun originally designed for being in highest-tier chests, but because of hate it got it was moved to lower-tier chests.");
            GunExt.SetupSprite(gun, null, "mk1_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 16);
            for (int i = 0; i < 3; i++)
            {
                GunExt.AddProjectileModuleFrom(gun, "klobb", true, false);
            }
            foreach (ProjectileModule mod in gun.Volley.projectiles)
            {
                mod.shootStyle     = ProjectileModule.ShootStyle.SemiAutomatic;
                mod.angleVariance /= 1.25f;
                mod.ammoType       = GameUIAmmoType.AmmoType.GRENADE;
                Projectile projectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(275) as Gun).DefaultModule.projectiles[0]);
                projectile.gameObject.SetActive(false);
                FakePrefab.MarkAsFakePrefab(projectile.gameObject);
                UnityEngine.Object.DontDestroyOnLoad(projectile);
                mod.projectiles[0]          = projectile;
                projectile.transform.parent = gun.barrelOffset;
                projectile.name             = "Firework_Rocket";
                ExplosiveModifier explosiveMod = projectile.gameObject.AddComponent <ExplosiveModifier>();
                explosiveMod.explosionData = new ExplosionData();
                explosiveMod.explosionData.CopyFrom((PickupObjectDatabase.GetById(593) as Gun).DefaultModule.projectiles[0].GetComponent <ExplosiveModifier>().explosionData);
                explosiveMod.explosionData.effect = EnemyDatabase.GetOrLoadByGuid(RnGEnemyDatabase.GetRnGEnemyGuid(RnGEnemyDatabase.RnGEnemyType.DynaM80_Guy)).GetComponent <ExplodeOnDeath>().explosionData.effect;
                explosiveMod.IgnoreQueues         = true;
                projectile.SuppressHitEffects     = true;
                projectile.damageTypes            = CoreDamageTypes.None;
                projectile.AppliesFire            = false;
                mod.cooldownTime        = 1f;
                mod.numberOfShotsInClip = 1;
                if (mod != gun.DefaultModule)
                {
                    mod.ammoCost = 0;
                }
            }
            gun.Volley.UsesShotgunStyleVelocityRandomizer = true;
            gun.Volley.DecreaseFinalSpeedPercentMin       = -10f;
            gun.Volley.IncreaseFinalSpeedPercentMax       = 10f;
            gun.reloadTime     = 2.5f;
            gun.gunSwitchGroup = Toolbox.GetGunById(39).gunSwitchGroup;
            gun.SetBaseMaxAmmo(75);
            gun.quality = PickupObject.ItemQuality.A;
            gun.barrelOffset.transform.localPosition = new Vector3(1f, 0.35f, 0f);
            gun.encounterTrackable.EncounterGuid     = "celebration_mk1";
            gun.gunClass = GunClass.EXPLOSIVE;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToTrorkShop();
            gun.AddToCursulaShop();
            gun.AddToBlacksmithShop();
            gun.RemovePeskyQuestionmark();
            gun.PlaceItemInAmmonomiconAfterItemById(275);
        }
コード例 #20
0
        // Token: 0x0600013F RID: 319 RVA: 0x0000D468 File Offset: 0x0000B668
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Cube Of Tungsten", "tungstencube");

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

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

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

            spook.penetration = 1;
            projectile.SetProjectileSpriteRight("tungstencube_projectile_001", 17, 16, true, tk2dBaseSprite.Anchor.MiddleCenter, new int?(11), new int?(5), null, null, null);
            gun.AddToSubShop(ItemBuilder.ShopType.Trorc, 1f);
            gun.AddToSubShop(ItemBuilder.ShopType.Cursula, 1f);
            ETGMod.Databases.Items.Add(gun, null, "ANY");
        }
コード例 #21
0
        // Token: 0x0600028C RID: 652 RVA: 0x000162F8 File Offset: 0x000144F8
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("HONK", "horn");

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

            foreach (ProjectileModule projectileModule in gun.Volley.projectiles)
            {
                projectileModule.ammoCost            = 1;
                projectileModule.shootStyle          = ProjectileModule.ShootStyle.Charged;
                projectileModule.sequenceStyle       = ProjectileModule.ProjectileSequenceStyle.Random;
                projectileModule.cooldownTime        = 1f;
                projectileModule.angleVariance       = 20f;
                projectileModule.numberOfShotsInClip = 1;
                Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(projectileModule.projectiles[0]);
                projectileModule.projectiles[0] = projectile;
                projectile.gameObject.SetActive(false);
                FakePrefab.MarkAsFakePrefab(projectile.gameObject);
                UnityEngine.Object.DontDestroyOnLoad(projectile);
                projectile.baseData.damage           *= 10f;
                projectile.AdditionalScaleMultiplier *= 2f;
                projectile.baseData.range            *= 0.5f;
                bool flag = projectileModule != gun.DefaultModule;
                if (flag)
                {
                    projectileModule.ammoCost = 0;
                }
                projectile.transform.parent = gun.barrelOffset;
                ProjectileModule.ChargeProjectile item = new ProjectileModule.ChargeProjectile
                {
                    Projectile = projectile,
                    ChargeTime = 1f
                };
                PierceProjModifier orAddComponent = projectile.gameObject.GetOrAddComponent <PierceProjModifier>();
                orAddComponent.penetratesBreakables = true;
                orAddComponent.penetration++;
                projectileModule.chargeProjectiles = new List <ProjectileModule.ChargeProjectile>
                {
                    item
                };
            }
            gun.reloadTime = 1f;
            gun.SetBaseMaxAmmo(100);
            gun.quality = PickupObject.ItemQuality.B;
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).wrapMode  = tk2dSpriteAnimationClip.WrapMode.LoopSection;
            gun.GetComponent <tk2dSpriteAnimator>().GetClipByName(gun.chargeAnimation).loopStart = 3;
            gun.encounterTrackable.EncounterGuid = "HONKERWONK";
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.barrelOffset.transform.localPosition = new Vector3(1.37f, 0.37f, 0f);
            Horn.HornID = gun.PickupObjectId;
        }
コード例 #22
0
        public static void Add()
        {
            // Get yourself a new gun "base" first.
            // Let's just call it "Basic Gun", and use "jpxfrd" for all sprites and as "codename" All sprites must begin with the same word as the codename. For example, your firing sprite would be named "jpxfrd_fire_001".
            Gun gun = ETGMod.Databases.Items.NewGun("lil Boom", "lil");

            // "kp:basic_gun determines how you spawn in your gun through the console. You can change this command to whatever you want, as long as it follows the "name:itemname" template.
            Game.Items.Rename("outdated_gun_mods:lil_boom", "ski:lil_boom");
            gun.gameObject.AddComponent <Lil_Boom>();
            //These two lines determines the description of your gun, ".SetShortDescription" being the description that appears when you pick up the gun and ".SetLongDescription" being the description in the Ammonomicon entry.
            gun.SetShortDescription("You are already dead.");
            gun.SetLongDescription("This cursed blade once struck down the entire guyon dynasty in a single strike. After which it and its ruler grew to power until" +
                                   " the day that the blade became tired of its weilder's peaceful nature and turned on him seeking out a new host to give it the bloodshed it required." +
                                   " It somehow made its way to the gungeon the only place that could feed its need for bloodshed.\n\n" +
                                   "___________________________________________\n" +
                                   "Damage increses the longer the charge is held. Reflects projectiles in a radius and slows time." +
                                   "\n\n\n - Knife_to_a_Gunfight");
            gun.SetupSprite(null, "lil_idle_001", 8);
            gun.SetAnimationFPS(gun.shootAnimation, 24);
            gun.SetAnimationFPS(gun.reloadAnimation, 24);

            GunExt.AddProjectileModuleFrom(gun, PickupObjectDatabase.GetById(541) as Gun, false, false);
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.angleVariance = 0f;

            gun.DefaultModule.shootStyle                = ProjectileModule.ShootStyle.Charged;
            gun.DefaultModule.sequenceStyle             = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.DefaultModule.preventFiringDuringCharge = true;
            Gun gun3 = (Gun)ETGMod.Databases.Items["wonderboy"];

            gun.muzzleFlashEffects                = gun3.muzzleFlashEffects;
            gun.reloadTime                        = 5f;
            gun.DefaultModule.cooldownTime        = .0f;
            gun.DefaultModule.numberOfShotsInClip = 1;
            gun.InfiniteAmmo                      = true;
            gun.quality = PickupObject.ItemQuality.S;
            gun.encounterTrackable.EncounterGuid = "teleports behind you";
            //This block of code helps clone our projectile. Basically it makes it so things like Shadow Clone and Hip Holster keep the stats/sprite of your custom gun's projectiles.
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

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

            projectile.baseData.damage = 4f;
            projectile.baseData.speed  = 1f;
            projectile.baseData.range  = .001f;

            projectile.transform.parent = gun.barrelOffset;
            projectile.AppliesBleed     = true;



            ETGMod.Databases.Items.Add(gun, null, "ANY");
        }
コード例 #23
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);
        }
コード例 #24
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Nine-Barreled Shotgun", "nine-barreled_shotgun");

            Game.Items.Rename("outdated_gun_mods:nine-barreled_shotgun", "cel:nine-barreled_shotgun");
            gun.gameObject.AddComponent <NineBarreledGun>();
            gun.SetShortDescription("Slightly Overkill");
            gun.SetLongDescription("Do I even need to say what it does?");
            gun.SetupSprite(null, "nine-barreled_shotgun_idle_001", 8);
            gun.SetAnimationFPS(gun.shootAnimation, 7);
            gun.SetAnimationFPS(gun.reloadAnimation, 5);
            for (int i = 0; i < 36; i++)
            {
                GunExt.AddProjectileModuleFrom(gun, (PickupObjectDatabase.GetById(82) as Gun), true, false);
            }
            foreach (ProjectileModule projectileModule in gun.Volley.projectiles)
            {
                projectileModule.shootStyle = ProjectileModule.ShootStyle.SemiAutomatic;
                Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(projectileModule.projectiles[0]);
                projectile.gameObject.SetActive(false);
                FakePrefab.MarkAsFakePrefab(projectile.gameObject);
                UnityEngine.Object.DontDestroyOnLoad(projectile);
                projectileModule.projectiles[0]      = projectile;
                projectileModule.angleVariance       = 50;
                projectile.transform.parent          = gun.barrelOffset;
                projectile.baseData.damage          *= .5f;
                projectile.baseData.speed           *= 1f;
                projectileModule.numberOfShotsInClip = 1;
                projectileModule.cooldownTime        = .4f;
                projectile.baseData.range           *= 1f;
                projectileModule.ammoType            = GameUIAmmoType.AmmoType.SHOTGUN;

                bool flag = projectileModule == gun.DefaultModule;
                if (flag)
                {
                    projectileModule.ammoCost = 9;
                }
                else
                {
                    projectileModule.ammoCost = 0;
                }
            }
            gun.reloadTime = 2.8f;

            gun.gunSwitchGroup     = (PickupObjectDatabase.GetById(82) as Gun).gunSwitchGroup;
            gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(84) as Gun).muzzleFlashEffects;
            gun.SetBaseMaxAmmo(540);

            gun.quality = PickupObject.ItemQuality.B;
            gun.encounterTrackable.EncounterGuid     = "oh lord o f**k what have i f*****g done shit o f**k";
            gun.sprite.IsPerpendicular               = true;
            gun.barrelOffset.transform.localPosition = new Vector3(2.1875f, 1.4375f, 0f);
            gun.gunClass = GunClass.SHOTGUN;

            ETGMod.Databases.Items.Add(gun, null, "ANY");
        }
コード例 #25
0
ファイル: UglyGun.cs プロジェクト: SpecialAPI/SpecialItemPack
        public static void Init()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Ugly Gun", "ugly_gun");

            Game.Items.Rename("outdated_gun_mods:ugly_gun", "spapi:ugly_gun");
            gun.gameObject.AddComponent <UglyGun>();
            GunExt.SetShortDescription(gun, "Ew!");
            GunExt.SetLongDescription(gun, "A very ugly gun. It doesn't even have a clip, how the heck does it shoot!?\n\nThis gun is a result of a mage trying to smith his own gun. That mage was very expirienced in magic and " +
                                      "enchantments, but he suck at gunsmithing.\n\nThis gun turned out to be a total fail. It has some parts missing, and light doesn't even affect it. Why the hell did you pick it up???");
            GunExt.SetupSprite(gun, null, "ugly_gun_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 16);
            GunExt.AddProjectileModuleFrom(gun, "klobb", true, false);
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.angleVariance = 0;
            gun.DefaultModule.ammoType      = GameUIAmmoType.AmmoType.MEDIUM_BULLET;
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(35) as 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       = 12.123412342348102398f;
            projectile.baseData.speed       /= 4.412387401289374012438523f;
            projectile.SetProjectileSpriteRight("ugly_projectile_001", 11, 11);
            projectile.name        = "uGLy_PR0jeCt1L3";
            gun.clipObject         = Toolbox.CreateCustomClip("ugly_clip_001", 14, 10);
            gun.muzzleFlashEffects = Toolbox.CreateMuzzleflash("UglyMuzzleflash", new List <string> {
                "kill_me", "kill_me2"
            }, 1, new List <IntVector2> {
                new IntVector2(64, 46), new IntVector2(64, 46)
            }, new List <tk2dBaseSprite.Anchor> {
                tk2dBaseSprite.Anchor.MiddleLeft, tk2dBaseSprite.Anchor.MiddleLeft
            }, new List <Vector2> {
                Vector2.zero, Vector2.zero
            }, false, false, false, false, 0, VFXAlignment.Fixed, true, new List <float> {
                100f, 100f
            }, new List <Color> {
                Color.red,
                Color.red
            });
            gun.reloadClipLaunchFrame             = 0;
            gun.DefaultModule.cooldownTime        = 0.369817263493402345209387f;
            gun.DefaultModule.numberOfShotsInClip = 7;
            gun.reloadTime = 1.34871023948710239481f;
            gun.SetBaseMaxAmmo(513);
            gun.quality = PickupObject.ItemQuality.C;
            gun.barrelOffset.transform.localPosition = new Vector3(1.7f, 0.65f, 0f);
            gun.encounterTrackable.EncounterGuid     = "very_ugly_gun";
            gun.gunClass = GunClass.PISTOL;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToTrorkShop();
            gun.AddToBlacksmithShop();
            gun.RemovePeskyQuestionmark();
            gun.PlaceItemInAmmonomiconAfterItemById(22);
        }
コード例 #26
0
        // Token: 0x060000A0 RID: 160 RVA: 0x000063DC File Offset: 0x000045DC
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("custom gun", "syntest");

            Game.Items.Rename("outdated_gun_mods:custom_gun", "bot:custom_gun");
            gun.gameObject.AddComponent <CustomGun>();
            gun.SetShortDescription("test");
            gun.SetLongDescription("a gun only for testing");
            GunExt.SetupSprite(gun, null, "syntest_idle_001", 8);
            gun.SetAnimationFPS(gun.shootAnimation, 24);


            gun.AddProjectileModuleFrom(PickupObjectDatabase.GetById(GunConfigManager.Instance.configuration.ProjectileToCopy) as Gun, true, false);
            Gun gun3 = PickupObjectDatabase.GetById(383) as Gun;

            //gun.alternateVolley = gun3.Volley;

            gun.DefaultModule.ammoCost      = GunConfigManager.Instance.configuration.AmmoCost;
            gun.DefaultModule.shootStyle    = (PickupObjectDatabase.GetById(GunConfigManager.Instance.configuration.ProjectileToCopy) as Gun).DefaultModule.shootStyle;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = GunConfigManager.Instance.configuration.ReloadTime;

            gun.DefaultModule.cooldownTime = GunConfigManager.Instance.configuration.FireRate;
            gun.InfiniteAmmo = GunConfigManager.Instance.configuration.InfiniteAmmo;
            gun.DefaultModule.numberOfShotsInClip = GunConfigManager.Instance.configuration.ClipSize;
            gun.SetBaseMaxAmmo(GunConfigManager.Instance.configuration.MaxAmmo);
            gun.gunHandedness = GunHandedness.OneHanded;

            gun.quality = GunConfigManager.Instance.configuration.Quality;

            gun.DefaultModule.angleVariance = GunConfigManager.Instance.configuration.Spread;


            //gun.DefaultModule.ammoType = GameUIAmmoType.AmmoType.SKULL;
            Guid.NewGuid().ToString();
            //gun.encounterTrackable.EncounterGuid = "why wont you work please work im going mad";
            ETGMod.Databases.Items.Add(gun, null, "ANY");

            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       = GunConfigManager.Instance.configuration.Damage;
            //projectile.baseData.speed *= 0.7f;
            ///	projectile.SetProjectileSpriteRight("locrtfsf_projectile_001", 7, 7, null, null);

            gunId = gun.PickupObjectId;

            gun.PlaceItemInAmmonomiconAfterItemById(88);
            gun.RemovePeskyQuestionmark();
        }
コード例 #27
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Auto Shotgun", "auto_shotgun");

            Game.Items.Rename("outdated_gun_mods:auto_shotgun", "cel:auto_shotgun");
            gun.gameObject.AddComponent <AutoShotgun>();
            gun.SetShortDescription("Become Decease");
            gun.SetLongDescription("An automatic shotgun. Prefered by those who want the coverage of a shotgun paired with the speed of an assault rifle.");
            gun.SetupSprite(null, "auto_shotgun_idle_001", 8);
            gun.SetAnimationFPS(gun.shootAnimation, 10);
            gun.SetAnimationFPS(gun.reloadAnimation, 5);
            for (int i = 0; i < 4; i++)
            {
                GunExt.AddProjectileModuleFrom(gun, "38_special", true, false);
            }
            foreach (ProjectileModule projectileModule in gun.Volley.projectiles)
            {
                projectileModule.shootStyle = ProjectileModule.ShootStyle.Automatic;
                Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(projectileModule.projectiles[0]);
                projectile.gameObject.SetActive(false);
                FakePrefab.MarkAsFakePrefab(projectile.gameObject);
                UnityEngine.Object.DontDestroyOnLoad(projectile);
                projectileModule.projectiles[0]      = projectile;
                projectileModule.angleVariance       = 6;
                projectile.transform.parent          = gun.barrelOffset;
                projectile.baseData.damage          *= .72f;
                projectile.baseData.speed           *= 1f;
                projectileModule.numberOfShotsInClip = 8;
                projectileModule.cooldownTime        = .4f;
                projectile.baseData.range            = 35f;
                projectileModule.ammoType            = GameUIAmmoType.AmmoType.SHOTGUN;
                bool flag = projectileModule == gun.DefaultModule;
                if (flag)
                {
                    projectileModule.ammoCost = 1;
                }
                else
                {
                    projectileModule.ammoCost = 0;
                }
            }
            gun.gunSwitchGroup     = (PickupObjectDatabase.GetById(51) as Gun).gunSwitchGroup;
            gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(51) as Gun).muzzleFlashEffects;
            gun.Volley.UsesShotgunStyleVelocityRandomizer = true;
            gun.Volley.DecreaseFinalSpeedPercentMin       = -10f;
            gun.Volley.IncreaseFinalSpeedPercentMax       = 10f;
            gun.SetBaseMaxAmmo(360);

            gun.quality = PickupObject.ItemQuality.C;
            gun.encounterTrackable.EncounterGuid = "fricc u spapi imma use guids all i want >:c";
            gun.sprite.IsPerpendicular           = true;
            gun.gunClass   = GunClass.FULLAUTO;
            gun.reloadTime = 2.2f;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
        }
コード例 #28
0
ファイル: Decagun.cs プロジェクト: SpecialAPI/SpecialItemPack
        public static void Init()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Decagun", "decagun");

            Game.Items.Rename("outdated_gun_mods:decagun", "spapi:decagun");
            gun.gameObject.AddComponent <Decagun>();
            GunExt.SetShortDescription(gun, "A Regular Decagun");
            GunExt.SetLongDescription(gun, "In gunometry, a decagun is a ten-sided polygun or 10-gun.");
            GunExt.SetupSprite(gun, null, "decagun_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 13);
            GunExt.SetAnimationFPS(gun, gun.introAnimation, 16);
            for (int i = 0; i < 10; i++)
            {
                GunExt.AddProjectileModuleFrom(gun, "klobb", true, false);
            }
            int index = 0;

            foreach (ProjectileModule mod in gun.Volley.projectiles)
            {
                mod.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
                mod.angleVariance = 0;
                mod.ammoType      = GameUIAmmoType.AmmoType.MEDIUM_BULLET;
                Projectile projectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(38) as Gun).DefaultModule.projectiles[0]);
                projectile.gameObject.SetActive(false);
                FakePrefab.MarkAsFakePrefab(projectile.gameObject);
                UnityEngine.Object.DontDestroyOnLoad(projectile);
                mod.projectiles[0]          = projectile;
                projectile.transform.parent = gun.barrelOffset;
                projectile.baseData.damage  = 5.10f;
                projectile.baseData.speed   = 10;
                projectile.baseData.force   = 10;
                mod.cooldownTime            = 1;
                mod.numberOfShotsInClip     = 10;
                mod.positionOffset         += new Vector3(projOffsets[index].x, projOffsets[index].y, 0f);
                if (mod != gun.DefaultModule)
                {
                    mod.ammoCost = 0;
                }
                else
                {
                    mod.ammoCost = 10;
                }
                index++;
            }
            gun.reloadTime = 1.10f;
            gun.SetBaseMaxAmmo(1000);
            gun.quality = PickupObject.ItemQuality.A;
            gun.barrelOffset.transform.localPosition = new Vector3(1.7f, 0.65f, 0f);
            gun.encounterTrackable.EncounterGuid     = "decagun";
            gun.gunClass = GunClass.PISTOL;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToBlacksmithShop();
            gun.RemovePeskyQuestionmark();
            gun.PlaceItemInAmmonomiconAfterItemById(385);
        }
コード例 #29
0
        public static void Init()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Aegis Gun", "aegis");

            Game.Items.Rename("outdated_gun_mods:aegis_gun", "spapi:aegis_gun");
            gun.gameObject.AddComponent <AegisGunController>();
            GunExt.SetShortDescription(gun, "En Guarde!");
            GunExt.SetLongDescription(gun, "Reloading shields enemy bullets.\n\nThis handgun was made out of a sword. Through, the melee abilities of the sword it was made from were completelly nullified, so this weapon doesn't anger the" +
                                      " jammed.");
            GunExt.SetupSprite(gun, null, "aegis_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 16);
            GunExt.AddProjectileModuleFrom(gun, "klobb", true, false);
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.angleVariance = 0;
            gun.DefaultModule.ammoType      = GameUIAmmoType.AmmoType.MEDIUM_BULLET;
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(464) as 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.DefaultTintColor      = new Color(1, 1, 1).WithAlpha(0.45f);
            projectile.HasDefaultTint        = true;
            projectile.name = "Explosive_Aegis_Shell";
            ExplosionData data = (PickupObjectDatabase.GetById(81) as Gun).DefaultModule.projectiles[0].GetComponent <ExplosiveModifier>().explosionData.CopyExplosionData();

            data.doDestroyProjectiles = false;
            data.doForce = false;
            data.damage *= 0.35f;
            ExplosiveModifier mod = projectile.gameObject.GetOrAddComponent <ExplosiveModifier>();

            mod.explosionData                     = data;
            gun.reloadClipLaunchFrame             = 0;
            gun.DefaultModule.cooldownTime        = 0.2f;
            gun.DefaultModule.numberOfShotsInClip = 4;
            gun.reloadTime = 1.4f;
            gun.SetBaseMaxAmmo(150);
            gun.quality            = PickupObject.ItemQuality.B;
            gun.gunSwitchGroup     = Toolbox.GetGunById(380).gunSwitchGroup;
            gun.muzzleFlashEffects = Toolbox.GetGunById(334).muzzleFlashEffects;
            gun.barrelOffset.transform.localPosition = new Vector3(0.9f, 0.55f, 0f);
            gun.encounterTrackable.EncounterGuid     = "aegis_junk";
            AdvancedDualWieldSynergyProcessor dualWieldController = gun.gameObject.AddComponent <AdvancedDualWieldSynergyProcessor>();

            dualWieldController.SynergyNameToCheck = "#SHIELD_BROS";
            dualWieldController.PartnerGunID       = 380;
            gun.gunClass = GunClass.PISTOL;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToCursulaShop();
            gun.AddToBlacksmithShop();
            gun.RemovePeskyQuestionmark();
            gun.PlaceItemInAmmonomiconAfterItemById(380);
        }
コード例 #30
0
        public static void Init()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Suspicious Shotgun", "jail_npc_shotgun");

            Game.Items.Rename("outdated_gun_mods:suspicious_shotgun", "spapi:suspicious_shotgun");
            gun.gameObject.AddComponent <BowBowController>();
            GunExt.SetShortDescription(gun, "Covered in rainbow sparkles?");
            GunExt.SetLongDescription(gun, "A weird shotgun. Internal part of the barrel was painted in rainbow paint. A name \"Bow-Bow\" is also engraved on the barrel.\n\nThis strange shotgun was found in a cell. Probably someone forgot it there while they were moving to breach.");
            GunExt.SetupSprite(gun, null, "jail_npc_shotgun_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 16);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 8);
            for (int i = 0; i < 5; i++)
            {
                GunExt.AddProjectileModuleFrom(gun, "klobb", true, false);
            }
            foreach (ProjectileModule mod in gun.Volley.projectiles)
            {
                mod.shootStyle = ProjectileModule.ShootStyle.SemiAutomatic;
                Projectile projectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(51) as Gun).DefaultModule.projectiles[0]);
                projectile.gameObject.SetActive(false);
                FakePrefab.MarkAsFakePrefab(projectile.gameObject);
                UnityEngine.Object.DontDestroyOnLoad(projectile);
                mod.projectiles[0]          = projectile;
                projectile.transform.parent = gun.barrelOffset;
                mod.numberOfShotsInClip     = 7;
                projectile.baseData.damage  = 7f;
                mod.cooldownTime            = 0.6f;
                projectile.baseData.range  /= 2.25f;
                projectile.name             = "Suspicious_Shotgun_Projectile";
                mod.ammoType = GameUIAmmoType.AmmoType.SHOTGUN;
                if (mod != gun.DefaultModule)
                {
                    mod.ammoCost = 0;
                }
            }
            gun.shellCasing                 = Toolbox.GetGunById(202).shellCasing;
            gun.reloadShellLaunchFrame      = 5;
            gun.shellCasingOnFireFrameDelay = 0;
            gun.shellsToLaunchOnFire        = 1;
            gun.shellsToLaunchOnReload      = 3;
            gun.reloadTime = 1f;
            gun.SetBaseMaxAmmo(200);
            gun.quality = PickupObject.ItemQuality.B;
            gun.encounterTrackable.EncounterGuid = "boiled_bowler_shotga";
            gun.gunClass = GunClass.SHOTGUN;
            gun.barrelOffset.transform.localPosition = new Vector3(1.4f, 0.2f, 0f);
            gun.muzzleFlashEffects = (PickupObjectDatabase.GetById(51) as Gun).muzzleFlashEffects;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToCursulaShop();
            gun.AddToBlacksmithShop();
            gun.RemovePeskyQuestionmark();
            gun.PlaceItemInAmmonomiconAfterItemById(100);
            gun.SetupUnlockOnFlag(GungeonFlags.BOWLER_ACTIVE_IN_FOYER, true);
        }