diff --git a/Items/Weapons/Melee/FaultLine.cs b/Items/Weapons/Melee/FaultLine.cs index 54d89e087b..1136906020 100644 --- a/Items/Weapons/Melee/FaultLine.cs +++ b/Items/Weapons/Melee/FaultLine.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Yoyo[Item.type] = true; + ItemID.Sets.Yoyo[Item.type] = true; ItemID.Sets.GamepadExtraRange[Item.type] = 15; ItemID.Sets.GamepadSmartQuickReach[Item.type] = true; } @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 30; Item.height = 26; Item.DamageType = DamageClass.MeleeNoSpeed; - Item.damage = 88; // 110 pre-nerf + Item.damage = 60; // 110 pre-nerf Item.knockBack = 4f; Item.useTime = 22; Item.useAnimation = 22; diff --git a/Items/Weapons/Melee/FracturedArk.cs b/Items/Weapons/Melee/FracturedArk.cs index 761b733c4d..4b5ffb090f 100644 --- a/Items/Weapons/Melee/FracturedArk.cs +++ b/Items/Weapons/Melee/FracturedArk.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { Item.width = Item.height = 60; - Item.damage = 70; + Item.damage = 60; Item.DamageType = DamageClass.MeleeNoSpeed; Item.noUseGraphic = true; Item.noMelee = true; diff --git a/Items/Weapons/Melee/SulphurousGrabber.cs b/Items/Weapons/Melee/SulphurousGrabber.cs index f4962c2d14..5e7f18f83c 100644 --- a/Items/Weapons/Melee/SulphurousGrabber.cs +++ b/Items/Weapons/Melee/SulphurousGrabber.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Melee public new string LocalizationCategory => "Items.Weapons.Melee"; public override void SetStaticDefaults() { - ItemID.Sets.Yoyo[Item.type] = true; + ItemID.Sets.Yoyo[Item.type] = true; ItemID.Sets.GamepadExtraRange[Item.type] = 15; ItemID.Sets.GamepadSmartQuickReach[Item.type] = true; } @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 50; Item.height = 36; Item.DamageType = DamageClass.MeleeNoSpeed; - Item.damage = 82; + Item.damage = 55; Item.knockBack = 3.5f; Item.useTime = 25; Item.useAnimation = 25; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index a5211dfb37..c14822f477 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -157,7 +157,7 @@ Azathoth: { Tooltip: ''' Fires cosmic orbs that blast nearby enemies with lasers - A very agile yoyo + An exceptionally agile yoyo 'Destroy the universe in the blink of an eye' ''' } @@ -687,7 +687,7 @@ Lacerator: { Tooltip: ''' Enemies that are hit by the yoyo will have their life drained - A very agile yoyo + An exceptionally agile yoyo [GFB] ''' TooltipNormal: Someone thought this was a viable weapon against DoG at one point lol @@ -923,7 +923,11 @@ Pwnagehammer: { Quagmire: { DisplayName: Quagmire - Tooltip: Fires spore clouds + Tooltip: + ''' + Fires spore clouds + A very agile yoyo + ''' } RedSun: { @@ -1017,7 +1021,7 @@ SolarFlare: { Tooltip: ''' Emits large holy explosions on hit - A very agile yoyo + An exceptionally agile yoyo ''' } @@ -1210,7 +1214,7 @@ TheMicrowave: { Tooltip: ''' Fries nearby enemies with radiation - A very agile yoyo + An exceptionally agile yoyo 'Cooking, Astral Infection style' ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson index 650cef1892..6cbdbe48db 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson @@ -72,7 +72,6 @@ CrescentMoonFlail.DisplayName: Crescent Moon CrescentMoonProj.DisplayName: Crescent Moon CrystylCrusherRay.DisplayName: Crystyl Crusher Ray Cyclone.DisplayName: Cyclone -Dark.DisplayName: Dark DarkBall.DisplayName: Dark Ball DarkBeam.DisplayName: Dark Beam DarkIceZero.DisplayName: Dark Ice @@ -121,6 +120,8 @@ Exoboom.DisplayName: Exoplasma Explosion Exocomet.DisplayName: Comet ExtantAbhorrence.DisplayName: Extant Abhorrence ExtantAbhorrenceMonolith.DisplayName: Abhorrent Monolith +FallenBlast.DisplayName: Fallen Paladin's Wrath +FallenPaladinsHammerEcho.DisplayName: Fallen Paladin's Hammer Echo FallenPaladinsHammerProj.DisplayName: Fallen Paladin's Hammer Feather.DisplayName: Feather Flarefrost.DisplayName: Flarefrost @@ -135,7 +136,10 @@ GalaxiaTropicRing.DisplayName: Star Ring GalaxyBlast.DisplayName: Blast GalaxyBlastType2.DisplayName: Blast GalaxyBlastType3.DisplayName: Blast +GalaxySmasherBlast.DisplayName: Galactic Blast +GalaxySmasherEcho.DisplayName: Galaxy Smasher Echo GalaxySmasherHammer.DisplayName: Galaxy Smasher +GalaxySmasherMini.DisplayName: Galaxy Smasher GalaxyStar.DisplayName: Star GalileosMoon.DisplayName: Crescent Moon GalileosPlanet.DisplayName: Planet @@ -162,7 +166,6 @@ JudgementProj.DisplayName: Judgement LamentationsOfTheChained.DisplayName: Lamentations of the Chained LaserFountain.DisplayName: Fountain LifeScythe.DisplayName: Scythe -Light.DisplayName: Light LightBeam.DisplayName: Light Beam LightningThing.DisplayName: Lightning LuxorsGiftMelee.DisplayName: Gift @@ -204,7 +207,10 @@ PrismTooth.DisplayName: Photon Ripper PurityProjection.DisplayName: Purity Projection PurityProjectionSigil.DisplayName: Purity Sigil PwnagehammerEcho.DisplayName: Pwnagehammer Echo +PwnagehammerExplosionSmall.DisplayName: Pwnage Blast +PwnagehammerExplosionBig.DisplayName: Pwnage Blast PwnagehammerProj.DisplayName: Pwnagehammer +PwnagehammerSmallExplosion.DisplayName: Pwnage Blast RainBolt.DisplayName: Bolt RainbowBoom.DisplayName: Boom Razorwind.DisplayName: Razorwind @@ -261,6 +267,8 @@ VulcaniteLanceProj.DisplayName: Lance YateveoBloomSpear.DisplayName: Yateveo Bloom SpineOfThanatosProjectile.DisplayName: Spine of Thanatos StarnightBeam.DisplayName: Beam +StellarContemptBlast.DisplayName: Stellar Blast +StellarContemptEcho.DisplayName: Echoes of Contempt StellarContemptHammer.DisplayName: Stellar Contempt StormBeam.DisplayName: Beam StormMark.DisplayName: Mark @@ -333,6 +341,8 @@ Whiterain.DisplayName: Rain WulfrumScrew.DisplayName: Screw WulfrumScrewdriverProj.DisplayName: Screwdriver YateveoBloomProj.DisplayName: Yateveo Bloom +YinYoDark.DisplayName: Dark Shard +YinYoLight.DisplayName: Light Shard AirSpinnerYoyo.DisplayName: Air Spinner AortaYoyo.DisplayName: Aorta AzathothYoyo.DisplayName: Azathoth @@ -350,14 +360,4 @@ ShimmersparkYoyo.DisplayName: Shimmerspark SmokingCometYoyo.DisplayName: Smoking Comet SolarFlareYoyo.DisplayName: Solar Flare SulphurousGrabberYoyo.DisplayName: Sulphurous Grabber -YinYoyo.DisplayName: Yin-Yo -FallenPaladinsHammerEcho.DisplayName: Fallen Paladin's Hammer Echo -FallenBlast.DisplayName: Fallen Paladin's Wrath -StellarContemptEcho.DisplayName: Echoes of Contempt -PwnagehammerSmallExplosion.DisplayName: Pwnage Blast -PwnagehammerExplosionSmall.DisplayName: Pwnage Blast -PwnagehammerExplosionBig.DisplayName: Pwnage Blast -GalaxySmasherMini.DisplayName: Galaxy Smasher -GalaxySmasherEcho.DisplayName: Galaxy Smasher Echo -StellarContemptBlast.DisplayName: Stellar Blast -GalaxySmasherBlast.DisplayName: Galactic Blast \ No newline at end of file +YinYoyo.DisplayName: Yin-Yo \ No newline at end of file diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index 36aec74363..8ce81aa1d1 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -92,7 +92,9 @@ namespace CalamityMod.Projectiles // original: INF lifetime | 400px range | 17.5px/f top speed | 0 extra updates { ProjectileID.Terrarian, RebalanceYoyo(-1f, 512f, 60f, 2) }, - { ProjectileID.TerrarianBeam, Do(LocalIFrames(-1)) }, // Terrarian yoyo orbs + // Due to Terrarian's increased updates and thus increased orb spawns, giving orbs local iframes basically multiplies orb DPS by 3 + // Vanilla currently uses ID static iframes which prevents such an issue. Change this with extreme caution. + // { ProjectileID.TerrarianBeam, Do(LocalIFrames(-1)) }, // Terrarian yoyo orbs // original: INF lifetime | 360px range | 16.5px/f top speed | 0 extra updates { ProjectileID.TheEyeOfCthulhu, RebalanceYoyo(-1f, 480f, 36f, 1) }, // the yoyo, of course diff --git a/Projectiles/Melee/MicrowaveAura.cs b/Projectiles/Melee/MicrowaveAura.cs index 2763674ca1..f0249d327c 100644 --- a/Projectiles/Melee/MicrowaveAura.cs +++ b/Projectiles/Melee/MicrowaveAura.cs @@ -18,16 +18,15 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { Projectile.DamageType = DamageClass.MeleeNoSpeed; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; - Projectile.width = 200; - Projectile.height = 200; + Projectile.width = Projectile.height = 200; Projectile.friendly = true; Projectile.tileCollide = false; Projectile.penetrate = -1; Projectile.alpha = 255; Projectile.ignoreWater = true; Projectile.timeLeft = 300; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; } public override void AI() diff --git a/Projectiles/Melee/Dark.cs b/Projectiles/Melee/YinYoDark.cs similarity index 78% rename from Projectiles/Melee/Dark.cs rename to Projectiles/Melee/YinYoDark.cs index f409414656..f4a3ad684b 100644 --- a/Projectiles/Melee/Dark.cs +++ b/Projectiles/Melee/YinYoDark.cs @@ -3,10 +3,10 @@ using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee { - public class Dark : ModProjectile, ILocalizedModType + public class YinYoDark : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; - private const int speedTimerMax = 60; + private const int speedTimerMax = 30; private int speedTimer = speedTimerMax; public override void SetStaticDefaults() @@ -17,14 +17,15 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { - Projectile.width = 10; - Projectile.height = 10; + Projectile.width = Projectile.height = 10; Projectile.friendly = true; Projectile.DamageType = DamageClass.MeleeNoSpeed; Projectile.ignoreWater = true; Projectile.tileCollide = false; - Projectile.penetrate = -1; - Projectile.timeLeft = 300; + Projectile.penetrate = 3; + Projectile.timeLeft = 120; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 30; } public override void AI() diff --git a/Projectiles/Melee/Dark.png b/Projectiles/Melee/YinYoDark.png similarity index 100% rename from Projectiles/Melee/Dark.png rename to Projectiles/Melee/YinYoDark.png diff --git a/Projectiles/Melee/Light.cs b/Projectiles/Melee/YinYoLight.cs similarity index 77% rename from Projectiles/Melee/Light.cs rename to Projectiles/Melee/YinYoLight.cs index e3656853df..13a31524b7 100644 --- a/Projectiles/Melee/Light.cs +++ b/Projectiles/Melee/YinYoLight.cs @@ -3,10 +3,10 @@ using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee { - public class Light : ModProjectile, ILocalizedModType + public class YinYoLight : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; - private const int speedTimerMax = 60; + private const int speedTimerMax = 30; private int speedTimer = 0; public override void SetStaticDefaults() @@ -17,14 +17,15 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { - Projectile.width = 10; - Projectile.height = 10; + Projectile.width = Projectile.height = 10; Projectile.friendly = true; Projectile.DamageType = DamageClass.MeleeNoSpeed; Projectile.ignoreWater = true; Projectile.tileCollide = false; - Projectile.penetrate = -1; - Projectile.timeLeft = 300; + Projectile.penetrate = 3; + Projectile.timeLeft = 120; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 30; } public override void AI() diff --git a/Projectiles/Melee/Light.png b/Projectiles/Melee/YinYoLight.png similarity index 100% rename from Projectiles/Melee/Light.png rename to Projectiles/Melee/YinYoLight.png diff --git a/Projectiles/Melee/Yoyos/AzathothYoyo.cs b/Projectiles/Melee/Yoyos/AzathothYoyo.cs index edc11c3595..5655fa8df8 100644 --- a/Projectiles/Melee/Yoyos/AzathothYoyo.cs +++ b/Projectiles/Melee/Yoyos/AzathothYoyo.cs @@ -8,11 +8,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public class AzathothYoyo : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; + public const int MaxUpdates = 3; + public override void SetStaticDefaults() { ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 700f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 18f; + ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 880f; + ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 72f / MaxUpdates; ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; ProjectileID.Sets.TrailingMode[Projectile.type] = 1; @@ -21,20 +23,18 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetDefaults() { Projectile.aiStyle = ProjAIStyleID.Yoyo; - Projectile.width = 24; - Projectile.height = 24; - Projectile.scale = 1.2f; + Projectile.width = Projectile.height = 24; Projectile.friendly = true; Projectile.DamageType = DamageClass.MeleeNoSpeed; Projectile.penetrate = -1; - Projectile.MaxUpdates = 2; + Projectile.MaxUpdates = MaxUpdates; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 6; + Projectile.localNPCHitCooldown = 2 * MaxUpdates; } public override void AI() { - if (Main.rand.NextBool(6)) + if (Main.rand.NextBool(2 * MaxUpdates)) { if (Projectile.owner == Main.myPlayer) Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity * 0.35f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f); diff --git a/Projectiles/Melee/Yoyos/FaultLineYoyo.cs b/Projectiles/Melee/Yoyos/FaultLineYoyo.cs index 38cc9dbc74..7377ce3799 100644 --- a/Projectiles/Melee/Yoyos/FaultLineYoyo.cs +++ b/Projectiles/Melee/Yoyos/FaultLineYoyo.cs @@ -9,11 +9,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public class FaultLineYoyo : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; + public const int MaxUpdates = 2; + public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = 14f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 420f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 13f; + ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; + ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 480f; + ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 40f / MaxUpdates; ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; ProjectileID.Sets.TrailingMode[Projectile.type] = 0; @@ -22,15 +24,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetDefaults() { Projectile.aiStyle = ProjAIStyleID.Yoyo; - Projectile.width = 16; - Projectile.height = 16; - Projectile.scale = 1.15f; + Projectile.width = Projectile.height = 16; Projectile.friendly = true; Projectile.DamageType = DamageClass.MeleeNoSpeed; Projectile.penetrate = -1; - Projectile.MaxUpdates = 2; + Projectile.MaxUpdates = MaxUpdates; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 20; + Projectile.localNPCHitCooldown = 10 * MaxUpdates; } public override void AI() diff --git a/Projectiles/Melee/Yoyos/LaceratorYoyo.cs b/Projectiles/Melee/Yoyos/LaceratorYoyo.cs index bc093d5b76..6b1b026992 100644 --- a/Projectiles/Melee/Yoyos/LaceratorYoyo.cs +++ b/Projectiles/Melee/Yoyos/LaceratorYoyo.cs @@ -8,11 +8,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public class LaceratorYoyo : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; + public const int MaxUpdates = 3; + public override void SetStaticDefaults() { ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 560f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 18f; + ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 72f / MaxUpdates; ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; ProjectileID.Sets.TrailingMode[Projectile.type] = 1; @@ -21,15 +23,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetDefaults() { Projectile.aiStyle = ProjAIStyleID.Yoyo; - Projectile.width = 16; - Projectile.height = 16; - Projectile.scale = 1.1f; + Projectile.width = Projectile.height = 16; Projectile.friendly = true; Projectile.DamageType = DamageClass.MeleeNoSpeed; Projectile.penetrate = -1; - Projectile.MaxUpdates = 2; + Projectile.MaxUpdates = MaxUpdates; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 8; + Projectile.localNPCHitCooldown = 3 * MaxUpdates; } public override void AI() diff --git a/Projectiles/Melee/Yoyos/MicrowaveYoyo.cs b/Projectiles/Melee/Yoyos/MicrowaveYoyo.cs index 6b74f239d8..0acbd26745 100644 --- a/Projectiles/Melee/Yoyos/MicrowaveYoyo.cs +++ b/Projectiles/Melee/Yoyos/MicrowaveYoyo.cs @@ -15,6 +15,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public class MicrowaveYoyo : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; + public const int MaxUpdates = 3; private const float Radius = 100f; private SlotId mmmmmm; private bool spawnedAura = false; @@ -23,8 +24,8 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetStaticDefaults() { ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 450f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 14f; + ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 512f; + ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 54f / MaxUpdates; ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; ProjectileID.Sets.TrailingMode[Projectile.type] = 0; @@ -33,15 +34,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetDefaults() { Projectile.aiStyle = ProjAIStyleID.Yoyo; - Projectile.width = 16; - Projectile.height = 16; - Projectile.scale = 1f; + Projectile.width = Projectile.height = 16; Projectile.friendly = true; Projectile.DamageType = DamageClass.MeleeNoSpeed; Projectile.penetrate = -1; - Projectile.MaxUpdates = 2; + Projectile.MaxUpdates = MaxUpdates; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 20; + Projectile.localNPCHitCooldown = 10 * MaxUpdates; } public override void SendExtraAI(BinaryWriter writer) => writer.Write(soundCooldown); diff --git a/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs b/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs index 0daf39aca4..7ea54c74ec 100644 --- a/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs +++ b/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs @@ -15,13 +15,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos // Ensures that the main AI only runs once per frame, despite the projectile's multiple updates private int extraUpdateCounter = 0; - private const int UpdatesPerFrame = 2; + private const int UpdatesPerFrame = 3; public override void SetStaticDefaults() { ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 640f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 13f; + ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 72f / UpdatesPerFrame; ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; ProjectileID.Sets.TrailingMode[Projectile.type] = 1; @@ -30,15 +30,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetDefaults() { Projectile.aiStyle = ProjAIStyleID.Yoyo; - Projectile.width = 16; - Projectile.height = 16; - Projectile.scale = 1.6f; + Projectile.width = Projectile.height = 16; Projectile.friendly = true; Projectile.DamageType = DamageClass.MeleeNoSpeed; Projectile.penetrate = -1; Projectile.MaxUpdates = UpdatesPerFrame; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 3 * UpdatesPerFrame; + Projectile.localNPCHitCooldown = 6 * UpdatesPerFrame; } // localAI[1] is the shot counter. Every 5 frames, The Obliterator tries to fire a laser at a nearby target. @@ -98,13 +96,11 @@ namespace CalamityMod.Projectiles.Melee.Yoyos ref NPC target = ref Main.npc[targets[Main.rand.Next(targets.Count)]]; const float laserSpeed = 6f; - int laserDamage = (int)(Projectile.damage * 0.5f); - const float laserKB = 3f; Vector2 velocity = target.Center - Projectile.Center; velocity = velocity.SafeNormalize(Vector2.Zero) * laserSpeed; if (Projectile.owner == Main.myPlayer) { - int proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), laserSpawnPosition, velocity, ModContent.ProjectileType(), laserDamage, laserKB, Projectile.owner); + int proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), laserSpawnPosition, velocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].DamageType = DamageClass.MeleeNoSpeed; } @@ -123,9 +119,6 @@ namespace CalamityMod.Projectiles.Melee.Yoyos Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Projectiles/Melee/Yoyos/ObliteratorYoyoGlow").Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 2f, SpriteEffects.None, 0); } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(ModContent.BuffType(), 180); - } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 180); } } diff --git a/Projectiles/Melee/Yoyos/OblivionYoyo.cs b/Projectiles/Melee/Yoyos/OblivionYoyo.cs index bf02402e41..9d0bf6b829 100644 --- a/Projectiles/Melee/Yoyos/OblivionYoyo.cs +++ b/Projectiles/Melee/Yoyos/OblivionYoyo.cs @@ -8,11 +8,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public class OblivionYoyo : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; + public const int MaxUpdates = 2; + public override void SetStaticDefaults() { ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 400f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 16.5f; + ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 448f; + ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 48f / MaxUpdates; ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; ProjectileID.Sets.TrailingMode[Projectile.type] = 0; @@ -21,15 +23,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetDefaults() { Projectile.aiStyle = ProjAIStyleID.Yoyo; - Projectile.width = 16; - Projectile.height = 16; - Projectile.scale = 1.1f; + Projectile.width = Projectile.height = 16; Projectile.friendly = true; Projectile.DamageType = DamageClass.MeleeNoSpeed; Projectile.penetrate = -1; - Projectile.MaxUpdates = 2; + Projectile.MaxUpdates = MaxUpdates; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 20; + Projectile.localNPCHitCooldown = 10 * MaxUpdates; } public override void AI() @@ -39,10 +39,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos Projectile.Kill(); } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(ModContent.BuffType(), 240); - } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 240); public override bool PreDraw(ref Color lightColor) { diff --git a/Projectiles/Melee/Yoyos/OracleYoyo.cs b/Projectiles/Melee/Yoyos/OracleYoyo.cs index def3d9dae5..3e329af066 100644 --- a/Projectiles/Melee/Yoyos/OracleYoyo.cs +++ b/Projectiles/Melee/Yoyos/OracleYoyo.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos private const int HitsPerOrbVolley = 3; // The aura hits once per this many frames. - private const int AuraLocalIFrames = 10; + private const int AuraLocalIFrames = 12; // Ensures that the main AI only runs once per frame, despite the projectile's multiple updates private const int UpdatesPerFrame = 3; @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos { ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 800f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 16f; + ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 72f / UpdatesPerFrame; ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; ProjectileID.Sets.TrailingMode[Projectile.type] = 1; @@ -62,15 +62,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetDefaults() { Projectile.aiStyle = ProjAIStyleID.Yoyo; - Projectile.width = 20; - Projectile.height = 20; - Projectile.scale = 1.2f; + Projectile.width = Projectile.height = 20; Projectile.friendly = true; Projectile.DamageType = DamageClass.MeleeNoSpeed; Projectile.penetrate = -1; Projectile.MaxUpdates = UpdatesPerFrame; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 7 * UpdatesPerFrame; + Projectile.localNPCHitCooldown = 6 * UpdatesPerFrame; } public override void AI() diff --git a/Projectiles/Melee/Yoyos/PandemicYoyo.cs b/Projectiles/Melee/Yoyos/PandemicYoyo.cs index a42041fddf..11822e074a 100644 --- a/Projectiles/Melee/Yoyos/PandemicYoyo.cs +++ b/Projectiles/Melee/Yoyos/PandemicYoyo.cs @@ -10,25 +10,24 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public class PandemicYoyo : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; + public const int MaxUpdates = 2; public override void SetStaticDefaults() { ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 450f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 16.5f; + ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 48f / MaxUpdates; } public override void SetDefaults() { Projectile.aiStyle = ProjAIStyleID.Yoyo; - Projectile.width = 16; - Projectile.height = 16; - Projectile.scale = 1f; + Projectile.width = Projectile.height = 16; Projectile.friendly = true; Projectile.DamageType = DamageClass.MeleeNoSpeed; Projectile.penetrate = -1; - Projectile.MaxUpdates = 2; + Projectile.MaxUpdates = MaxUpdates; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 20; + Projectile.localNPCHitCooldown = 10 * MaxUpdates; } public override void AI() diff --git a/Projectiles/Melee/Yoyos/QuagmireYoyo.cs b/Projectiles/Melee/Yoyos/QuagmireYoyo.cs index 7f24085fb8..46dd6142fa 100644 --- a/Projectiles/Melee/Yoyos/QuagmireYoyo.cs +++ b/Projectiles/Melee/Yoyos/QuagmireYoyo.cs @@ -9,72 +9,46 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public class QuagmireYoyo : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; + public const int MaxUpdates = 2; + public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = 12f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 400f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 15f; + ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; + ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 480f; + ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 40f / MaxUpdates; } public override void SetDefaults() { Projectile.aiStyle = ProjAIStyleID.Yoyo; - Projectile.width = 16; - Projectile.height = 16; - Projectile.scale = 1.25f; + Projectile.width = Projectile.height = 16; Projectile.friendly = true; Projectile.DamageType = DamageClass.MeleeNoSpeed; Projectile.penetrate = -1; + Projectile.MaxUpdates = MaxUpdates; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; + Projectile.localNPCHitCooldown = 10 * MaxUpdates; } public override void AI() { if ((Projectile.position - Main.player[Projectile.owner].position).Length() > 3200f) //200 blocks Projectile.Kill(); - if (Main.rand.NextBool(5)) + if (Main.rand.NextBool(5 * MaxUpdates)) Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, 44, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f); if (Projectile.owner == Main.myPlayer) { - int proj; - if (Main.rand.NextBool(10)) + if (Main.rand.NextBool(5 * MaxUpdates)) { - proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, Projectile.velocity.X * 0.35f, Projectile.velocity.Y * 0.35f, ProjectileID.SporeGas, (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner); - if (proj.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[proj].DamageType = DamageClass.MeleeNoSpeed; - Main.projectile[proj].usesLocalNPCImmunity = true; - Main.projectile[proj].localNPCHitCooldown = 30; - } - } - if (Main.rand.NextBool(30)) - { - proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, Projectile.velocity.X * 0.25f, Projectile.velocity.Y * 0.25f, ProjectileID.SporeGas2, (int)(Projectile.damage * 0.6), Projectile.knockBack, Projectile.owner); - if (proj.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[proj].DamageType = DamageClass.MeleeNoSpeed; - Main.projectile[proj].usesLocalNPCImmunity = true; - Main.projectile[proj].localNPCHitCooldown = 30; - } - } - if (Main.rand.NextBool(50)) - { - proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, Projectile.velocity.X * 0.15f, Projectile.velocity.Y * 0.15f, ProjectileID.SporeGas3, (int)(Projectile.damage * 0.7), Projectile.knockBack, Projectile.owner); - if (proj.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[proj].DamageType = DamageClass.MeleeNoSpeed; - Main.projectile[proj].usesLocalNPCImmunity = true; - Main.projectile[proj].localNPCHitCooldown = 30; - } + Projectile spore = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity * Main.rand.NextFloat(0.15f, 0.35f), ProjectileID.SporeGas + Main.rand.Next(3), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner); + spore.DamageType = DamageClass.MeleeNoSpeed; + spore.usesLocalNPCImmunity = true; + spore.localNPCHitCooldown = 30; } } } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(BuffID.Venom, 180); - } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.Venom, 180); public override bool PreDraw(ref Color lightColor) { diff --git a/Projectiles/Melee/Yoyos/ShimmersparkYoyo.cs b/Projectiles/Melee/Yoyos/ShimmersparkYoyo.cs index 1ca80e3bd8..9d1fd40c94 100644 --- a/Projectiles/Melee/Yoyos/ShimmersparkYoyo.cs +++ b/Projectiles/Melee/Yoyos/ShimmersparkYoyo.cs @@ -9,11 +9,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public class ShimmersparkYoyo : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; + public const int MaxUpdates = 2; + public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = 16f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 350f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 17f; + ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; + ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 448f; + ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 40f / MaxUpdates; } public override void SetDefaults() @@ -25,9 +27,9 @@ namespace CalamityMod.Projectiles.Melee.Yoyos Projectile.friendly = true; Projectile.DamageType = DamageClass.MeleeNoSpeed; Projectile.penetrate = -1; - Projectile.MaxUpdates = 2; + Projectile.MaxUpdates = MaxUpdates; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 20; + Projectile.localNPCHitCooldown = 10 * MaxUpdates; } public override void AI() @@ -44,9 +46,6 @@ namespace CalamityMod.Projectiles.Melee.Yoyos return false; } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(BuffID.Frostburn2, 120); - } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.Frostburn2, 120); } } diff --git a/Projectiles/Melee/Yoyos/SolarFlareYoyo.cs b/Projectiles/Melee/Yoyos/SolarFlareYoyo.cs index 1406ce89d4..445525f389 100644 --- a/Projectiles/Melee/Yoyos/SolarFlareYoyo.cs +++ b/Projectiles/Melee/Yoyos/SolarFlareYoyo.cs @@ -10,11 +10,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public class SolarFlareYoyo : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; + public const int MaxUpdates = 3; + public override void SetStaticDefaults() { ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 560f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 18f; + ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 60f / MaxUpdates; ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; ProjectileID.Sets.TrailingMode[Projectile.type] = 1; @@ -23,15 +25,13 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetDefaults() { Projectile.aiStyle = ProjAIStyleID.Yoyo; - Projectile.width = 16; - Projectile.height = 16; - Projectile.scale = 1.15f; + Projectile.width = Projectile.height = 16; Projectile.friendly = true; Projectile.DamageType = DamageClass.MeleeNoSpeed; Projectile.penetrate = -1; - Projectile.MaxUpdates = 2; + Projectile.MaxUpdates = MaxUpdates; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 8; + Projectile.localNPCHitCooldown = 6 * MaxUpdates; } public override void AI() diff --git a/Projectiles/Melee/Yoyos/SulphurousGrabberYoyo.cs b/Projectiles/Melee/Yoyos/SulphurousGrabberYoyo.cs index 551e45654a..81119dd02c 100644 --- a/Projectiles/Melee/Yoyos/SulphurousGrabberYoyo.cs +++ b/Projectiles/Melee/Yoyos/SulphurousGrabberYoyo.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetStaticDefaults() { ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 350f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 16f; + ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 400f; + ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 16f; // 32 effective, 48 bubbled ProjectileID.Sets.TrailCacheLength[Projectile.type] = 4; ProjectileID.Sets.TrailingMode[Projectile.type] = 0; @@ -29,14 +29,12 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void SetDefaults() { Projectile.aiStyle = ProjAIStyleID.Yoyo; - Projectile.width = 18; - Projectile.height = 18; - Projectile.scale = 1f; + Projectile.width = Projectile.height = 18; Projectile.friendly = true; Projectile.DamageType = DamageClass.MeleeNoSpeed; Projectile.penetrate = -1; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; + // Hit cooldown set in AI } public override void AI() @@ -45,21 +43,17 @@ namespace CalamityMod.Projectiles.Melee.Yoyos { if (bubbleStronk) { - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 20f; - Projectile.extraUpdates = 2; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10 * Projectile.extraUpdates; + Projectile.MaxUpdates = 3; bubbleStronkCounter++; } else { - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 16f; - Projectile.extraUpdates = 1; - Projectile.usesLocalNPCImmunity = false; + Projectile.MaxUpdates = 2; bubbleStronkCounter = 0; } + Projectile.localNPCHitCooldown = 10 * Projectile.MaxUpdates; - if (bubbleStronkCounter >= 240) + if (bubbleStronkCounter >= 180) bubbleStronk = false; for (int i = 0; i < Main.maxProjectiles; i++) @@ -82,14 +76,14 @@ namespace CalamityMod.Projectiles.Melee.Yoyos bubbleCounter++; if (bubbleCounter >= 60) { - int bubbleAmt = 7; + int bubbleAmt = 3; for (float i = 0; i < bubbleAmt; i++) { int projType = ModContent.ProjectileType(); if (Main.rand.NextBool(10)) projType = ModContent.ProjectileType(); float angle = MathHelper.TwoPi / bubbleAmt * i + (float)Math.Sin(arbitraryTimer / 20f) * MathHelper.PiOver2; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, angle.ToRotationVector2() * 8f, projType, Projectile.damage / 4, Projectile.knockBack / 4, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, angle.ToRotationVector2() * 8f, projType, Projectile.damage / 2, Projectile.knockBack / 4, Projectile.owner); } bubbleCounter = 0; } @@ -111,9 +105,6 @@ namespace CalamityMod.Projectiles.Melee.Yoyos return false; } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(ModContent.BuffType(), 120); - } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 120); } } diff --git a/Projectiles/Melee/Yoyos/YinYoyo.cs b/Projectiles/Melee/Yoyos/YinYoyo.cs index 2f5c9412d7..4bf38ef624 100644 --- a/Projectiles/Melee/Yoyos/YinYoyo.cs +++ b/Projectiles/Melee/Yoyos/YinYoyo.cs @@ -9,30 +9,30 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public class YinYoyo : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; + public const int MaxUpdates = 2; + public override void SetStaticDefaults() { - ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = 14f; - ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 350f; - ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 17f; + ProjectileID.Sets.YoyosLifeTimeMultiplier[Projectile.type] = -1f; + ProjectileID.Sets.YoyosMaximumRange[Projectile.type] = 400f; + ProjectileID.Sets.YoyosTopSpeed[Projectile.type] = 32f / MaxUpdates; } public override void SetDefaults() { Projectile.aiStyle = ProjAIStyleID.Yoyo; - Projectile.width = 16; - Projectile.height = 16; - Projectile.scale = 1f; + Projectile.width = Projectile.height = 16; Projectile.friendly = true; Projectile.DamageType = DamageClass.MeleeNoSpeed; Projectile.penetrate = -1; - Projectile.MaxUpdates = 2; + Projectile.MaxUpdates = MaxUpdates; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 20; + Projectile.localNPCHitCooldown = 10 * MaxUpdates; } public override void AI() { - CalamityUtils.MagnetSphereHitscan(Projectile, 300f, 10f, 144f, 5, Main.rand.NextBool(2) ? ModContent.ProjectileType() : ModContent.ProjectileType()); + CalamityUtils.MagnetSphereHitscan(Projectile, 300f, 10f, 144f, 5, Main.rand.NextBool(2) ? ModContent.ProjectileType() : ModContent.ProjectileType()); if ((Projectile.position - Main.player[Projectile.owner].position).Length() > 3200f) //200 blocks Projectile.Kill(); }