diff --git a/Items/Weapons/Melee/Orderbringer.cs b/Items/Weapons/Melee/Orderbringer.cs index d40af9be52..48d61d46ad 100644 --- a/Items/Weapons/Melee/Orderbringer.cs +++ b/Items/Weapons/Melee/Orderbringer.cs @@ -23,14 +23,14 @@ namespace CalamityMod.Items.Weapons.Melee private int time = 0; private Color mainColor; private int swordDirection; - private int useTime = 15; + private int useTime = 18; private int opacityAdjust = 0; private float smearOpacity = 0; private bool smearGrowth = true; public override void SetDefaults() { Item.width = Item.height = 108; - Item.damage = 160; + Item.damage = 210; Item.DamageType = DamageClass.Melee; Item.useTime = Item.useAnimation = useTime; Item.useStyle = ItemUseStyleID.Swing; @@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons.Melee for (int i = 0; i < 2; i++) { Vector2 targetPos = Main.MouseWorld; - NPC target = Main.MouseWorld.ClosestNPCAt(350); + NPC target = Main.MouseWorld.ClosestNPCAt(650); if (target != null) targetPos = target.Center + target.velocity * 14; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index ec7a798662..b30c1c2a6c 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -910,8 +910,8 @@ Orderbringer: { DisplayName: Orderbringer Tooltip: ''' -Fires a piercing energy wave along with two blades from the sky and four homing stars that are created near your cursor -Energy waves deal more damage as they pierce enemies + Fires a piercing energy wave along with two blades from the sky and four homing stars that are created near your cursor + Energy waves deal more damage as they pierce enemies 'No matter where you may be you are never alone' ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson index 70ff268fe3..a8c2868f6f 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson @@ -191,6 +191,7 @@ Orbacle.DisplayName: Auric Orb OrderbringerAura.DisplayName: Aura OrderbringerBeam.DisplayName: Orderbringer Beam OrderbringerRain.DisplayName: Rain +OrderbringerWaveProj.DisplayName: Orderbringer Wave Proj OrderbringerWhiteOrb.DisplayName: Orderbringer Orb PhoenixsPride.DisplayName: Phoenix's Pride PhosphorescentGauntletPunches.DisplayName: Gauntlet Punch @@ -240,6 +241,7 @@ SpineOfThanatosProjectile.DisplayName: Spine of Thanatos StarburstBeam.DisplayName: Star Shiv StarburstSHIV.DisplayName: SHIV StarnightBeam.DisplayName: Starnight Beam +StarofJudgement.DisplayName: Star of Judgement StellarContemptBlast.DisplayName: Stellar Blast StellarContemptEcho.DisplayName: Echoes of Contempt StellarContemptHammer.DisplayName: Stellar Contempt diff --git a/Particles/SemiCircularSmearFade.cs b/Particles/SemiCircularSmearFade.cs index f7e3f0a425..fcff0bd3eb 100644 --- a/Particles/SemiCircularSmearFade.cs +++ b/Particles/SemiCircularSmearFade.cs @@ -19,7 +19,8 @@ namespace CalamityMod.Particles public bool RotateToVelocity; public Vector2 Squish; public bool ProduceLight; - public SemiCircularSmearFade(Vector2 position, Vector2 velocity, Color color, float rotation, float scale, Vector2 squish, int lifetime, bool playerCentered = false, bool rotateToVelocity = false, bool produceLight = true) + public int Direction = 1; + public SemiCircularSmearFade(Vector2 position, Vector2 velocity, Color color, float rotation, float scale, Vector2 squish, int lifetime, bool playerCentered = false, bool rotateToVelocity = false, bool produceLight = true, int direction = 1) { Position = position; Velocity = velocity; @@ -31,7 +32,7 @@ namespace CalamityMod.Particles PlayerCentered = playerCentered; RotateToVelocity = rotateToVelocity; ProduceLight = produceLight; - + Direction = direction; } public override void Update() { @@ -53,7 +54,7 @@ namespace CalamityMod.Particles public override void CustomDraw(SpriteBatch spriteBatch) { Texture2D tex = ModContent.Request(Texture).Value; - spriteBatch.Draw(tex, Position - Main.screenPosition, null, Color, Rotation, tex.Size() * 0.5f, Scale * Squish, 0, 0f); + spriteBatch.Draw(tex, Position - Main.screenPosition, null, Color, Rotation, tex.Size() * 0.5f, Scale * Squish, Direction == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0f); } } } diff --git a/Projectiles/Melee/JudgementProj.cs b/Projectiles/Melee/JudgementProj.cs index db06039330..21d50f0f50 100644 --- a/Projectiles/Melee/JudgementProj.cs +++ b/Projectiles/Melee/JudgementProj.cs @@ -8,16 +8,19 @@ using Terraria.ModLoader; using CalamityMod.Projectiles.Ranged; using Microsoft.Xna.Framework.Graphics; using System.ComponentModel; +using Terraria.Utilities.Terraria.Utilities; namespace CalamityMod.Projectiles.Melee { public class JudgementProj : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; + public override string Texture => "CalamityMod/Projectiles/Melee/JudgementProj"; public ref float time => ref Projectile.ai[0]; public float hitboxSize = 10; public Color mainColor; public float fade = 1; + public float fadeOut = 1; public override void SetDefaults() { Projectile.width = 336; @@ -35,8 +38,8 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - Vector2 topCorner = Projectile.Center + (Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(100f)) * Projectile.scale) * 157; - Vector2 bottomCorner = Projectile.Center + (Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-100f)) * Projectile.scale) * 157; + Vector2 topCorner = Projectile.Center + (Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(100f)) * Projectile.scale) * 137; + Vector2 bottomCorner = Projectile.Center + (Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-100f)) * Projectile.scale) * 137; if (time == 0) { @@ -97,22 +100,14 @@ namespace CalamityMod.Projectiles.Melee GeneralParticleHandler.SpawnParticle(orb2); } } - + fadeOut = Utils.GetLerpValue(0, 180, Projectile.timeLeft, true); time++; } - public override Color? GetAlpha(Color lightColor) - { - Color color = Color.White; - color.A = (byte)(color.A * fade); - return color; - } public override bool PreDraw(ref Color lightColor) { Texture2D tex = ModContent.Request(Texture).Value; - Main.spriteBatch.EnterShaderRegion(BlendState.NonPremultiplied); - - Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); - Main.spriteBatch.ExitShaderRegion(); + float waveFade = Utils.GetLerpValue(0, 300, Projectile.timeLeft); + Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition, null, mainColor with { A = 0 } * fadeOut, Projectile.rotation, tex.Size() / 2f, new Vector2(1 - (0.2f * waveFade), 1 + (0.45f * waveFade)) * Projectile.scale, SpriteEffects.None, 0); return false; } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) diff --git a/Projectiles/Melee/JudgementProj.png b/Projectiles/Melee/JudgementProj.png index 4336a9a177..983f63e892 100644 Binary files a/Projectiles/Melee/JudgementProj.png and b/Projectiles/Melee/JudgementProj.png differ diff --git a/Projectiles/Melee/OrderbringerBeam.cs b/Projectiles/Melee/OrderbringerBeam.cs index 4c38cbca6e..d5ee0c9bec 100644 --- a/Projectiles/Melee/OrderbringerBeam.cs +++ b/Projectiles/Melee/OrderbringerBeam.cs @@ -11,6 +11,7 @@ namespace CalamityMod.Projectiles.Melee public class OrderbringerBeam : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; + public override string Texture => "CalamityMod/Projectiles/Melee/OrderbringerBeam"; private int whiteLightTimer = 5; public int time = 0; public Color mainColor = Color.White; @@ -23,8 +24,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { - Projectile.width = 74; - Projectile.height = 74; + Projectile.width = 100; + Projectile.height = 100; Projectile.tileCollide = false; Projectile.friendly = true; Projectile.ignoreWater = true; @@ -45,7 +46,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; Player Owner = Main.player[Projectile.owner]; - float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); //used for some drawing prevention for when it's offscreen since it makes a fuck load of particles + float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); if (Projectile.timeLeft % 3 == 0 && targetDist < 1400f) { Particle spark = new SparkParticle(Projectile.Center - Projectile.velocity * 3, -Projectile.velocity * 0.05f, false, 17, 1.5f, mainColor * 0.7f); @@ -53,22 +54,14 @@ namespace CalamityMod.Projectiles.Melee } time++; } - - public override Color? GetAlpha(Color lightColor) - { - return Color.White; - } - public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Lerp(mainColor, Color.White, 0.5f), 1, null, true, true); - return true; + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Lerp(mainColor, Color.White, 0.3f) with { A = 0 }, 1, null, true, true); + return false; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - SoundStyle fire = new("CalamityMod/Sounds/Item/WulfrumKnifeTileHit", 2); - SoundEngine.PlaySound(fire with { Volume = 0.7f, Pitch = 0.4f }, Projectile.Center); if (Projectile.numHits < 1) { Particle orb = new GlowSparkParticle(target.Center, Projectile.velocity.SafeNormalize(Vector2.UnitY), false, 12, 0.07f, mainColor, new Vector2(1.5f, 0.8f), true); diff --git a/Projectiles/Melee/OrderbringerBeam.png b/Projectiles/Melee/OrderbringerBeam.png index 02a976b169..48b2f67cde 100644 Binary files a/Projectiles/Melee/OrderbringerBeam.png and b/Projectiles/Melee/OrderbringerBeam.png differ diff --git a/Projectiles/Melee/OrderbringerWaveProj.cs b/Projectiles/Melee/OrderbringerWaveProj.cs index 92c6f7d05b..bdb4d99b0f 100644 --- a/Projectiles/Melee/OrderbringerWaveProj.cs +++ b/Projectiles/Melee/OrderbringerWaveProj.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Projectiles.Melee public Color mainColor; public float fade = 1; public float damageMult = 1; + public float fadeOut = 1; public override void SetDefaults() { Projectile.width = 336; @@ -78,37 +79,33 @@ namespace CalamityMod.Projectiles.Melee trailDust.noGravity = true; } - if (time % 12 == 0) + if (time % 9 == 0) { - Particle orb = new GlowSparkParticle(topCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(170f)), false, 11, Main.rand.NextFloat(0.03f, 0.055f) * Utils.GetLerpValue(250, 150, time, true), mainColor, new Vector2(1, 0.8f), true, false); + Particle orb = new GlowSparkParticle(topCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(170f)), false, 15, Main.rand.NextFloat(0.03f, 0.055f) * Utils.GetLerpValue(250, 150, time, true), mainColor, new Vector2(1, 0.8f), true, false, 0.3f); GeneralParticleHandler.SpawnParticle(orb); - Particle orb2 = new GlowSparkParticle(bottomCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-170f)), false, 11, Main.rand.NextFloat(0.03f, 0.055f) * Utils.GetLerpValue(250, 150, time, true), mainColor, new Vector2(1, 0.8f), true, false); + Particle orb2 = new GlowSparkParticle(bottomCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-170f)), false, 15, Main.rand.NextFloat(0.03f, 0.055f) * Utils.GetLerpValue(250, 150, time, true), mainColor, new Vector2(1, 0.8f), true, false, 0.3f); GeneralParticleHandler.SpawnParticle(orb2); - if (Main.rand.NextBool(3)) - { - GlowOrbParticle orb3 = new GlowOrbParticle(topCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(170f)) * Main.rand.NextFloat(20f, 40f), false, 17, Main.rand.NextFloat(0.8f, 1.25f), mainColor, true, true); - GeneralParticleHandler.SpawnParticle(orb3); - GlowOrbParticle orb4 = new GlowOrbParticle(bottomCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-170f)) * Main.rand.NextFloat(20f, 40f), false, 17, Main.rand.NextFloat(0.8f, 1.25f), mainColor, true, true); - GeneralParticleHandler.SpawnParticle(orb4); - } + } + if (Main.rand.NextBool(12)) + { + Particle orb3 = new SparkParticle(topCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(170f)) * Main.rand.NextFloat(5f, 20f), false, 15, Main.rand.NextFloat(0.8f, 1.35f), mainColor); + GeneralParticleHandler.SpawnParticle(orb3); + Particle orb4 = new SparkParticle(bottomCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-170f)) * Main.rand.NextFloat(5f, 20f), false, 15, Main.rand.NextFloat(0.8f, 1.35f), mainColor); + GeneralParticleHandler.SpawnParticle(orb4); } } + fadeOut = Utils.GetLerpValue(0, 180, Projectile.timeLeft, true); + time++; } - public override Color? GetAlpha(Color lightColor) - { - Color color = Color.White; - color.A = (byte)(color.A * fade); - return color; - } public override bool PreDraw(ref Color lightColor) { Texture2D tex = ModContent.Request(Texture).Value; - Main.spriteBatch.EnterShaderRegion(BlendState.NonPremultiplied); - - Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); - Main.spriteBatch.ExitShaderRegion(); + + float waveFade = Utils.GetLerpValue(0, 300, Projectile.timeLeft); + for (int i = 1; i < 6; i++) // Weird for loop because of squash code + Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition, null, mainColor with { A = 0 } * fadeOut, Projectile.rotation, tex.Size() / 2f, new Vector2(1 - (i * 0.2f * waveFade), 1 + (i * 0.35f * waveFade)) * Projectile.scale * 1.1f, SpriteEffects.None, 0); return false; } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) diff --git a/Projectiles/Melee/StarofJudgement.cs b/Projectiles/Melee/StarofJudgement.cs index 3c4a69c6c1..d01ca7dc7d 100644 --- a/Projectiles/Melee/StarofJudgement.cs +++ b/Projectiles/Melee/StarofJudgement.cs @@ -12,6 +12,7 @@ namespace CalamityMod.Projectiles.Melee public class StarofJudgement : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; + public override string Texture => "CalamityMod/Projectiles/Melee/StarofJudgement"; public ref float time => ref Projectile.ai[0]; public Color mainColor; public override void SetStaticDefaults() @@ -71,19 +72,15 @@ namespace CalamityMod.Projectiles.Melee time++; } - public override Color? GetAlpha(Color lightColor) - { - return lightColor; - } public override bool PreDraw(ref Color lightColor) { Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Melee/StarofJudgement").Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; - Color drawColor = Color.White; + Color drawColor = Color.Lerp(mainColor, Color.White, 0.2f) with { A = 0 }; float drawRotation = Projectile.rotation; Vector2 rotationPoint = texture.Size() * 0.5f; - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Lerp(mainColor, Color.White, 0.3f) * 0.4f, 1, texture, true, true); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], drawColor * 0.5f, 1, texture, true, true); Main.EntitySpriteDraw(texture, drawPosition, null, drawColor, drawRotation, rotationPoint, Projectile.scale, SpriteEffects.None); return false; } diff --git a/Projectiles/Melee/StarofJudgement.png b/Projectiles/Melee/StarofJudgement.png index fc8bb56d73..d11469686b 100644 Binary files a/Projectiles/Melee/StarofJudgement.png and b/Projectiles/Melee/StarofJudgement.png differ