Beispiel #1
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Photon Blade", "Photon Blade");

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

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

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

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

            slashingBehaviour.SlashVFX = SlashVFX;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToSubShop(ItemBuilder.ShopType.Goopton);
            gun.AddToSubShop(ItemBuilder.ShopType.Trorc);
        }
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Royal Guard's Knife", "royal_guard's_knife");

            Game.Items.Rename("outdated_gun_mods:royal_guard's_knife", "sts:royal_guard's_knife");
            gun.gameObject.AddComponent <RoyalGuardsKnife>();
            gun.SetShortDescription("Stab Stab Stab");
            gun.SetLongDescription("A weak hunting knife used by The Royal Guard for cutting up game or sawing rope.");
            gun.SetupSprite(null, "royal_guard's_knife_idle_001", 8);
            gun.SetAnimationFPS(gun.shootAnimation, 12);
            gun.SetAnimationFPS(gun.reloadAnimation, 2);
            gun.AddProjectileModuleFrom("38_special", true, false);
            gun.DefaultModule.ammoType      = GameUIAmmoType.AmmoType.SMALL_BULLET;
            gun.DefaultModule.ammoCost      = 1;
            gun.DefaultModule.shootStyle    = ProjectileModule.ShootStyle.SemiAutomatic;
            gun.DefaultModule.sequenceStyle = ProjectileModule.ProjectileSequenceStyle.Random;
            gun.reloadTime = 0f;
            gun.DefaultModule.angleVariance       = 0f;
            gun.DefaultModule.cooldownTime        = .2f;
            gun.DefaultModule.numberOfShotsInClip = 350;
            Gun gun2 = PickupObjectDatabase.GetById(151) as Gun;

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

            projectile.gameObject.SetActive(false);
            FakePrefab.MarkAsFakePrefab(projectile.gameObject);
            UnityEngine.Object.DontDestroyOnLoad(projectile);
            gun.DefaultModule.projectiles[0] = projectile;
            projectile.transform.parent      = gun.barrelOffset;
            projectile.baseData.damage      *= .5f;
            VFXPool fuckyouyoustupidfuckingvfxihateyousofuckingmuchyougoddamnmistakefuckyourubelaswellihateyousomuchformakingthevfxpoolcodesofuckingbadAAAAAAAAAAAAAAAAAAAAAAAAA = VFXLibrary.CreateMuzzleflash("royal_guard's_knife_slash", new List <string> {
                "royal_guard's_knife_slash_001", "royal_guard's_knife_slash_002", "royal_guard's_knife_slash_003", "royal_guard's_knife_slash_004",
            }, 10, new List <IntVector2> {
                new IntVector2(27, 27), new IntVector2(27, 27), new IntVector2(27, 27), new IntVector2(27, 27),
            }, new List <tk2dBaseSprite.Anchor> {
                tk2dBaseSprite.Anchor.MiddleLeft, tk2dBaseSprite.Anchor.MiddleLeft, tk2dBaseSprite.Anchor.MiddleLeft, tk2dBaseSprite.Anchor.MiddleLeft
            }, new List <Vector2> {
                Vector2.zero, Vector2.zero, Vector2.zero, Vector2.zero,
            }, false, false, false, false, 0, VFXAlignment.Fixed, true, new List <float> {
                0, 0, 0, 0
            }, new List <Color> {
                VFXLibrary.emptyColor, VFXLibrary.emptyColor, VFXLibrary.emptyColor, VFXLibrary.emptyColor,
            });

            ProjectileSlashingBehaviour slashingBehaviour = projectile.gameObject.AddComponent <ProjectileSlashingBehaviour>();

            slashingBehaviour.SlashVFX        = fuckyouyoustupidfuckingvfxihateyousofuckingmuchyougoddamnmistakefuckyourubelaswellihateyousomuchformakingthevfxpoolcodesofuckingbadAAAAAAAAAAAAAAAAAAAAAAAAA;
            slashingBehaviour.SlashDimensions = 65;
            slashingBehaviour.SlashRange      = 2.5f;

            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToSubShop(ItemBuilder.ShopType.Goopton);
            gun.AddToSubShop(ItemBuilder.ShopType.Trorc);
        }
Beispiel #3
0
        public static void Add()
        {
            Gun gun = ETGMod.Databases.Items.NewGun("Ancient Katana", "ancient_katana");

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

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

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

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


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

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

            slashingBehaviour.SlashVFX  = SlashVFX;
            slashingBehaviour2.SlashVFX = SlashVFX;
            ETGMod.Databases.Items.Add(gun, null, "ANY");
            gun.AddToSubShop(ItemBuilder.ShopType.Goopton);
            gun.AddToSubShop(ItemBuilder.ShopType.Trorc);
        }