Пример #1
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);
        }
Пример #2
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;
        }
Пример #3
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;
        }
Пример #4
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;
        }
Пример #5
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;
        }
Пример #6
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);
        }
Пример #7
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");
        }
        // 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)
            };
        }
Пример #9
0
        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";
        }
Пример #10
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");
        }
Пример #11
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);
        }
Пример #12
0
        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();
        }
Пример #13
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;
        }
Пример #14
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);
        }
Пример #15
0
        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);
        }
Пример #16
0
        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);
        }
Пример #17
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();
        }
Пример #18
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);
        }
        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);
        }
Пример #20
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("The Nail", "nail");

            Game.Items.Rename("outdated_gun_mods:the_nail", "spapi:the_nail");
            gun.gameObject.AddComponent <NailController>();
            GunExt.SetShortDescription(gun, "Trusty, Not Safe");
            GunExt.SetLongDescription(gun, "A well worn sword from far away.\n\nAs melee weapons are rejected in Gungeon, this thing is far from being safe.");
            GunExt.SetupSprite(gun, null, "nail_idle_001", 1);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 16);
            GunExt.SetAnimationFPS(gun, gun.idleAnimation, 1);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 1);
            GunExt.AddProjectileModuleFrom(gun, "wonderboy", true, true);
            if (KnightItemsModule.NailMode == "super" || KnightItemsModule.NailMode == "grubberfly")
            {
                GunExt.AddProjectileModuleFrom(gun, "boltRifle", true, false);
                foreach (ProjectileModule mod in gun.Volley.projectiles)
                {
                    if (mod != null)
                    {
                        if (mod != gun.DefaultModule)
                        {
                            Gun gun3 = (Gun)ETGMod.Databases.Items["boltRifle"];
                            if (gun3 != null)
                            {
                                mod.projectiles.Add(gun3.DefaultModule.GetCurrentProjectile());
                            }
                            mod.angleVariance = 0;
                        }
                    }
                }
            }
            gun.SetBaseMaxAmmo(100);
            gun.reloadTime = 0f;
            gun.DefaultModule.cooldownTime = 1.5f;
            gun.InfiniteAmmo = true;
            gun.DefaultModule.numberOfShotsInClip = int.MaxValue;
            gun.quality = PickupObject.ItemQuality.SPECIAL;
            gun.encounterTrackable.EncounterGuid = "the_nail";
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.CanBeDropped = false;
            gun.InfiniteAmmo = true;
            ItemBuilder.AddPassiveStatModifier(gun, PlayerStats.StatType.Curse, 1, StatModifier.ModifyMethod.ADDITIVE);
            Gun gun2 = (Gun)ETGMod.Databases.Items["wonderboy"];

            gun.muzzleFlashEffects = gun2.muzzleFlashEffects;
            gun.IsHeroSword        = true;
            bool doesntblank = KnightItemsModule.NailMode == "normal" || KnightItemsModule.NailMode == "grubberfly";

            gun.HeroSwordDoesntBlank = doesntblank;
            gun.DefaultModule.GetCurrentProjectile().baseData.damage = 20;
        }
Пример #21
0
        // Token: 0x06000192 RID: 402 RVA: 0x0000CD0C File Offset: 0x0000AF0C
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Prize Rifle", "prize_rifle");

            Game.Items.Rename("outdated_gun_mods:prize_rifle", "bb:prize_rifle");
            gun.gameObject.AddComponent <PrizeRifle>();
            GunExt.SetShortDescription(gun, "Definitely Not Fair");
            GunExt.SetLongDescription(gun, "Hit targets while reloading to gain a damage boost for your next clip.\n\nA personal gun of Winchester's. He used it all the time for his leisure, but it seems that it has other uses as well...");
            GunExt.SetupSprite(gun, null, "prize_rifle_idle_001", 1);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 1);
            GunExt.SetAnimationFPS(gun, gun.idleAnimation, 1);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 10);
            tk2dSpriteAnimationClip fireClip = gun.sprite.spriteAnimator.GetClipByName("prize_rifle_fire");

            fireClip.wrapMode  = tk2dSpriteAnimationClip.WrapMode.LoopSection;
            fireClip.loopStart = 1;
            GunExt.AddProjectileModuleFrom(gun, PickupObjectDatabase.GetById(251) as Gun, true, false);
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Automatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 3f;
            gun.DefaultModule.cooldownTime        = 0.133333f;
            gun.DefaultModule.numberOfShotsInClip = 20;
            gun.barrelOffset.position            += new Vector3(1f, 0f, 0f);
            gun.carryPixelOffset = new IntVector2(1, 0);
            gun.SetBaseMaxAmmo(500);
            gun.quality = PickupObject.ItemQuality.B;
            gun.encounterTrackable.EncounterGuid = "77696e63686573746572";
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>((PickupObjectDatabase.GetById(86) 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       = 6;
            projectile.baseData.range        = 60;
            projectile.SetProjectileSpriteRight("game_projectile_001", 18, 8, 15, 5);
            projectile.shouldRotate = true;
            projectile.name         = "ArtfulDodgerRifleProjectile";
            BounceProjModifier bounce = projectile.gameObject.GetOrAddComponent <BounceProjModifier>();

            bounce.numberOfBounces      = 5;
            projectile.transform.parent = gun.barrelOffset;
            GameObject trail = UnityEngine.Object.Instantiate <GameObject>((PickupObjectDatabase.GetById(251) as Gun).DefaultModule.projectiles[0].transform.Find("Trail").gameObject);

            ItemAPI.FakePrefab.MarkAsFakePrefab(trail);
            UnityEngine.Object.DontDestroyOnLoad(trail);
            trail.SetActive(true);
            trail.transform.parent = projectile.transform;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            BuildTarget();
        }
Пример #22
0
        // Token: 0x06000036 RID: 54 RVA: 0x000037D8 File Offset: 0x000019D8
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Robotic Injector", "directiveinject");

            Game.Items.Rename("outdated_gun_mods:robotic_injector", "bny:robotic_injector");
            gun.gameObject.AddComponent <REXNeedler>();
            GunExt.SetShortDescription(gun, "Directive: Inject");
            GunExt.SetLongDescription(gun, "An injector commonly used by hydroponic robots. Looks like its original carrier is off protocol.");
            GunExt.SetupSprite(gun, null, "directiveinject_idle_001", 11);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 36);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 7);
            GunExt.SetAnimationFPS(gun, gun.idleAnimation, 1);
            GunExt.AddProjectileModuleFrom(gun, PickupObjectDatabase.GetById(26) as Gun, true, false);
            gun.gunHandedness  = GunHandedness.HiddenOneHanded;
            gun.gunSwitchGroup = (PickupObjectDatabase.GetById(26) as Gun).gunSwitchGroup;
            gun.DefaultModule.burstShotCount    = 3;
            gun.DefaultModule.burstCooldownTime = 0.0833f;
            gun.DefaultModule.ammoCost          = 1;
            gun.DefaultModule.shootStyle        = ProjectileModule.ShootStyle.Burst;
            gun.DefaultModule.sequenceStyle     = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 0f;
            gun.DefaultModule.cooldownTime        = .7f;
            gun.DefaultModule.numberOfShotsInClip = 300;
            gun.SetBaseMaxAmmo(300);
            gun.quality = PickupObject.ItemQuality.C;
            gun.DefaultModule.angleVariance      = 0f;
            gun.encounterTrackable.EncounterGuid = "THE PLANT, THE PLANT, ITS THE PLANT";
            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.PoisonApplyChance     = 1f;
            projectile.baseData.damage       = 3f;
            projectile.baseData.speed        = 20f;
            projectile.baseData.range       *= 10f;
            projectile.baseData.force       *= 0.3f;
            projectile.HasDefaultTint        = true;
            projectile.SetProjectileSpriteRight("directiveinject_projectile_001", 11, 3, true, tk2dBaseSprite.Anchor.MiddleCenter, new int?(8), new int?(2), null, null, null);
            projectile.AdditionalScaleMultiplier = 1.1f;
            projectile.pierceMinorBreakables     = true;
            projectile.transform.parent          = gun.barrelOffset;
            projectile.damageTypes |= CoreDamageTypes.Poison;
            PoisonForDummiesLikeMe auegh = projectile.gameObject.AddComponent <PoisonForDummiesLikeMe>();

            auegh.procChance     = 1;
            auegh.useSpecialTint = false;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToSubShop(ItemBuilder.ShopType.Goopton, 1f);
        }
Пример #23
0
        // Token: 0x06000036 RID: 54 RVA: 0x000037D8 File Offset: 0x000019D8
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Reaver Claw", "reaverclaw");

            Game.Items.Rename("outdated_gun_mods:reaver_claw", "bny:reaver_claw");
            gun.gameObject.AddComponent <ReaverClaw>();
            GunExt.SetShortDescription(gun, "A Rifle Eventually Reloads");
            GunExt.SetLongDescription(gun, "The foot ripped from a Void Reaver. Though detached, it's powers still flow in from the Void.");
            GunExt.SetupSprite(gun, null, "reaverclaw_idle_001", 11);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 18);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 3);
            GunExt.SetAnimationFPS(gun, gun.idleAnimation, 4);
            GunExt.AddProjectileModuleFrom(gun, PickupObjectDatabase.GetById(35) as Gun, true, false);
            gun.gunSwitchGroup              = (PickupObjectDatabase.GetById(377) as Gun).gunSwitchGroup;
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Burst;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 2.3f;
            gun.DefaultModule.burstShotCount      = 2;
            gun.DefaultModule.burstCooldownTime   = 0.2f;
            gun.DefaultModule.cooldownTime        = .6f;
            gun.DefaultModule.numberOfShotsInClip = 4;
            gun.SetBaseMaxAmmo(120);
            gun.quality = PickupObject.ItemQuality.A;
            gun.DefaultModule.angleVariance      = 7f;
            gun.DefaultModule.burstShotCount     = 1;
            gun.encounterTrackable.EncounterGuid = "And don't you listen to the Song Of Life";
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            ReaveOnReloadModifier reaveonReloadModifier = gun.gameObject.AddComponent <ReaveOnReloadModifier>();

            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.baseData.damage       = 8f;
            projectile.baseData.speed        = 18f;
            projectile.baseData.range        = 8f;
            projectile.SetProjectileSpriteRight("reaverclaw_projectile_002", 10, 10, true, tk2dBaseSprite.Anchor.MiddleCenter, new int?(5), new int?(2), null, null, null);
            PierceProjModifier spook = projectile.gameObject.AddComponent <PierceProjModifier>();

            spook.penetration                = 1;
            projectile.baseData.force        = 0f;
            projectile.shouldRotate          = true;
            projectile.pierceMinorBreakables = true;
            projectile.transform.parent      = gun.barrelOffset;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToSubShop(ItemBuilder.ShopType.Goopton, 1f);
            gun.AddToSubShop(ItemBuilder.ShopType.Trorc, 1f);
        }
Пример #24
0
        // Token: 0x06000036 RID: 54 RVA: 0x000037D8 File Offset: 0x000019D8
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Gunslayers Gauntlet", "gauntlets");

            Game.Items.Rename("outdated_gun_mods:gunslayers_gauntlet", "bny:gunslayers_gauntlet");
            gun.gameObject.AddComponent <GunslayerGauntlets>();
            GunExt.SetShortDescription(gun, "Rip And Tear");
            GunExt.SetLongDescription(gun, "The Gauntlet of the Gunslayer. In most circumstances, these would only be used to bear the burden of the Slayers weapons, but if needed to...");
            GunExt.SetupSprite(gun, null, "gauntlets_idle_001", 11);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 36);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 20);
            GunExt.SetAnimationFPS(gun, gun.idleAnimation, 2);
            GunExt.AddProjectileModuleFrom(gun, PickupObjectDatabase.GetById(539) as Gun, true, false);
            gun.gunSwitchGroup              = (PickupObjectDatabase.GetById(539) as Gun).gunSwitchGroup;
            gun.carryPixelOffset            = new IntVector2((int)11f, (int)-1f);
            gun.gunHandedness               = GunHandedness.HiddenOneHanded;
            gun.InfiniteAmmo                = true;
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.Automatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 0f;
            gun.DefaultModule.cooldownTime        = .4f;
            gun.DefaultModule.numberOfShotsInClip = 1;
            gun.SetBaseMaxAmmo(50);
            gun.quality = PickupObject.ItemQuality.C;
            gun.DefaultModule.angleVariance      = 0f;
            gun.encounterTrackable.EncounterGuid = "RIP AND TEAR UNTIL IT IS DONE. *BAW NAW NANANANAU NANANAU BANAW NANANAUUU*";
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            PierceProjModifier spook = projectile.gameObject.AddComponent <PierceProjModifier>();

            spook.penetration = 10;
            gun.DefaultModule.projectiles[0]     = projectile;
            projectile.sprite.renderer.enabled   = false;
            projectile.AdditionalScaleMultiplier = 3f;
            projectile.baseData.damage           = 20f;
            projectile.baseData.speed           *= 3f;
            projectile.baseData.range            = 2f;
            projectile.AdditionalScaleMultiplier = 0.7f;
            projectile.pierceMinorBreakables     = true;
            projectile.shouldRotate        = true;
            projectile.AppliesStun         = true;
            projectile.AppliedStunDuration = 1.2f;
            projectile.transform.parent    = gun.barrelOffset;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToSubShop(ItemBuilder.ShopType.Trorc, 1f);
        }
Пример #25
0
        // Token: 0x06000036 RID: 54 RVA: 0x000037D8 File Offset: 0x000019D8
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Matter Translocator", "mattertranslocator");

            Game.Items.Rename("outdated_gun_mods:matter_translocator", "bny:matter_translocator");
            gun.gameObject.AddComponent <MatterTranslocator>();
            GunExt.SetShortDescription(gun, "Tele-Tech");
            GunExt.SetLongDescription(gun, "The most stable and well-calibrated portable teleporter available for use. As with all things, it's weaponized.");
            GunExt.SetupSprite(gun, null, "mattertranslocator_idle_001", 11);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 15);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 12);
            GunExt.SetAnimationFPS(gun, gun.idleAnimation, 5);
            GunExt.AddProjectileModuleFrom(gun, "magnum", true, false);
            gun.barrelOffset.transform.localPosition = new Vector3(2.3125f, 0.625f, 0f);
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 3f;
            gun.DefaultModule.cooldownTime        = .1f;
            gun.DefaultModule.numberOfShotsInClip = 1;
            gun.SetBaseMaxAmmo(30);
            gun.quality = PickupObject.ItemQuality.A;
            gun.DefaultModule.angleVariance  = 0f;
            gun.DefaultModule.burstShotCount = 1;
            //gun.SetupUnlockOnCustomFlag(CustomDungeonFlags.EXAMPLE_BLUEPRINTTRUCK, true);
            gun.AddItemToTrorcMetaShop(50, null);
            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           = 60f;
            projectile.baseData.speed           *= .35f;
            projectile.AdditionalScaleMultiplier = 0.85f;
            projectile.shouldRotate          = true;
            projectile.pierceMinorBreakables = true;
            projectile.baseData.range        = 9f;
            projectile.SetProjectileSpriteRight("mattertranslocator_projectile_001", 22, 22, true, tk2dBaseSprite.Anchor.MiddleCenter, new int?(30), new int?(30), null, null, null);
            BounceProjModifier bouncy = projectile.gameObject.AddComponent <BounceProjModifier>();

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

            spook.penetration = 100;
            gun.encounterTrackable.EncounterGuid = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToSubShop(ItemBuilder.ShopType.Trorc, 1f);
            gun.AddToSubShop(ItemBuilder.ShopType.Goopton, 1f);
        }
Пример #26
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Prismatic Shot", "prismaticshot");

            Game.Items.Rename("outdated_gun_mods:prismatic_shot", "bny:prismatic_shot");
            gun.gameObject.AddComponent <PrismaticShot>();
            GunExt.SetShortDescription(gun, "Rainguns!");
            GunExt.SetLongDescription(gun, "A gun made from pure, compressed crystals. Although weak in firepower, it makes up for it with the pretty colours it shoots.");
            GunExt.SetupSprite(gun, null, "prismaticshot_idle_001", 8);
            GunExt.SetAnimationFPS(gun, gun.shootAnimation, 16);
            GunExt.SetAnimationFPS(gun, gun.reloadAnimation, 16);
            GunExt.AddProjectileModuleFrom(gun, PickupObjectDatabase.GetById(56) as Gun, true, false);
            gun.gunSwitchGroup                       = (PickupObjectDatabase.GetById(199) as Gun).gunSwitchGroup;
            gun.DefaultModule.ammoCost               = 1;
            gun.DefaultModule.burstShotCount         = 7;
            gun.DefaultModule.burstCooldownTime      = 0.05f;
            gun.barrelOffset.transform.localPosition = new Vector3(2f, 0.4375f, 0f);
            gun.DefaultModule.shootStyle             = ProjectileModule.ShootStyle.Burst;
            gun.DefaultModule.sequenceStyle          = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 0.8f;
            gun.DefaultModule.cooldownTime        = 0.3f;
            gun.muzzleFlashEffects.type           = VFXPoolType.None;
            gun.DefaultModule.numberOfShotsInClip = 70;
            gun.SetBaseMaxAmmo(700);
            gun.DefaultModule.angleVariance = 1f;
            Projectile projectile = UnityEngine.Object.Instantiate <Projectile>(gun.DefaultModule.projectiles[0]);

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0]     = projectile;
            gun.muzzleFlashEffects               = (PickupObjectDatabase.GetById(199) as Gun).muzzleFlashEffects;
            projectile.baseData.damage           = 4f;
            projectile.baseData.speed           *= 0.9f;
            projectile.AdditionalScaleMultiplier = 0.4f;
            projectile.baseData.force            = 3f;
            projectile.pierceMinorBreakables     = true;
            PierceProjModifier orAddComponent = projectile.gameObject.GetOrAddComponent <PierceProjModifier>();

            orAddComponent.penetratesBreakables = true;
            projectile.SetProjectileSpriteRight("prismaticshot_projectile_001", 10, 10, true, tk2dBaseSprite.Anchor.MiddleCenter, new int?(5), new int?(2), null, null, null);
            projectile.transform.parent = gun.barrelOffset;
            projectile.shouldRotate     = true;
            //projectile.DefaultTintColor = new Color(50f, 0f, 0f).WithAlpha(2f);
            projectile.HasDefaultTint = true;
            gun.quality = PickupObject.ItemQuality.C;
            gun.encounterTrackable.EncounterGuid = "Ok, this gun is now officially an ad for Prismatism.";
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToSubShop(ItemBuilder.ShopType.Goopton, 1f);
        }