From c35880f11915b650150b21c0a6b574be4fdf6b39 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Thu, 30 Dec 2021 23:27:09 +0100 Subject: [PATCH 01/76] Unjanded the biome blade (wip) --- CalPlayer/CalamityPlayerMiscEffects.cs | 1 + Items/Weapons/Melee/BiomeBlade.cs | 982 +++++++++++++++++- Items/Weapons/Melee/BiomeBlade.png | Bin 688 -> 975 bytes .../Melee/BrokenBiomeBlade_AridGrandeur.png | Bin 0 -> 822 bytes .../BrokenBiomeBlade_AridGrandeurExtra.png | Bin 0 -> 1413 bytes .../BrokenBiomeBlade_BitingEmbraceBig.png | Bin 0 -> 1169 bytes .../BrokenBiomeBlade_BitingEmbraceSmall.png | Bin 0 -> 760 bytes .../BrokenBiomeBlade_BitingEmbraceThrust.png | Bin 0 -> 7433 bytes .../Melee/BrokenBiomeBlade_DecaysRetort.png | Bin 0 -> 1266 bytes .../BrokenBiomeBlade_PurityProjection.png | Bin 0 -> 1182 bytes 10 files changed, 973 insertions(+), 10 deletions(-) create mode 100644 Projectiles/Melee/BrokenBiomeBlade_AridGrandeur.png create mode 100644 Projectiles/Melee/BrokenBiomeBlade_AridGrandeurExtra.png create mode 100644 Projectiles/Melee/BrokenBiomeBlade_BitingEmbraceBig.png create mode 100644 Projectiles/Melee/BrokenBiomeBlade_BitingEmbraceSmall.png create mode 100644 Projectiles/Melee/BrokenBiomeBlade_BitingEmbraceThrust.png create mode 100644 Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.png create mode 100644 Projectiles/Melee/BrokenBiomeBlade_PurityProjection.png diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 53ba762882..b4f2406adb 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -161,6 +161,7 @@ namespace CalamityMod.CalPlayer // This must be done here instead of in the item logic because these sets are not properly instanced // in the global classes. Attempting to update them there will cause multiple updates to one set for multiple items. CalamityGlobalItem.UpdateAllParticleSets(); + BiomeBlade.UpdateAllParticleSets(); // Update the gem tech armor set. modPlayer.GemTechState.Update(); diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index eb4d414893..261bbd7f38 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -1,23 +1,113 @@ +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.CalPlayer; +using CalamityMod.DataStructures; using CalamityMod.Items.Placeables; +using CalamityMod.Particles; using CalamityMod.Projectiles.Melee; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using static Terraria.ModLoader.ModContent; namespace CalamityMod.Items.Weapons.Melee { public class BiomeBlade : ModItem { + public enum Attunement : byte { Default, Hot, Cold, Tropical, Evil } + public Attunement? mainAttunement = null; + public Attunement? secondaryAttunement = null; + public int Combo = 0; + public int CanLunge = 1; + public override void SetStaticDefaults() { - DisplayName.SetDefault("Biome Blade"); - Tooltip.SetDefault("Fires different projectiles based on what biome you're in"); + DisplayName.SetDefault("Broken Biome Blade"); //Broken Ecoliburn lmfao. Tbh a proper name instead of just "biome blade" may be neat given the importance of the sword + Tooltip.SetDefault("Use RMB while standing still on the ground to attune the weapon to the powers of the surrounding biome\n" + + "Using RMB while moving or in the air switches between the current attunement and an extra stored one\n" + + "Main attunement : None\n" + + "Secondary attunement: None\n"); //Theres potential for flavor text as well but im not a writer + } + + public override void ModifyTooltips(List list) + { + Player player = Main.player[Main.myPlayer]; + if (player is null) + return; + CalamityPlayer modPlayer = player.Calamity(); + + foreach (TooltipLine l in list) //I gave the attunement silly pseudo-fantasy names, ideas appreciated. + { + if (l.text.StartsWith("Main attunement")) + { + switch (mainAttunement) + { + case Attunement.Default: + l.text = "Main Attumenent : [Pure Clarity]"; + l.overrideColor = new Color(171, 180, 73); + break; + case Attunement.Hot: + l.text = "Main Attumenent : [Arid Grandeur]"; + l.overrideColor = new Color(238, 156, 73); + break; + case Attunement.Cold: + l.text = "Main Attumenent : [Biting Embrace]"; + l.overrideColor = new Color(165, 235, 235); + break; + case Attunement.Tropical: + l.text = "Main Attumenent : [Grovetender's Touch]"; + l.overrideColor = new Color(162, 200, 85); + break; + case Attunement.Evil: + l.text = "Main Attumenent : [Decay's Retort]"; + l.overrideColor = new Color(211, 64, 147); + break; + default: + l.text = "Main Attumenent : [None]"; + break; + } + } + + if (l.text.StartsWith("Secondary attunement")) + { + switch (secondaryAttunement) + { + case Attunement.Default: + l.text = "Secondary Attumenent : [Pure Clarity]"; + l.overrideColor = new Color(171, 180, 73); + break; + case Attunement.Hot: + l.text = "Secondary Attumenent : [Arid Grandeur]"; + l.overrideColor = new Color(238, 156, 73); + break; + case Attunement.Cold: + l.text = "Secondary Attumenent : [Biting Embrace]"; + l.overrideColor = new Color(165, 235, 235); + break; + case Attunement.Tropical: + l.text = "Secondary Attumenent : [Grovetender's Touch]"; + l.overrideColor = new Color(162, 200, 85); + break; + case Attunement.Evil: + l.text = "Secondary Attumenent : [Decay's Retort]"; + l.overrideColor = new Color(211, 64, 147); + break; + default: + l.text = "Secondary Attumenent : [None]"; + break; + } + } + } } public override void SetDefaults() { - item.width = 42; + item.width = item.height = 36; item.damage = 55; item.melee = true; item.useAnimation = 30; @@ -25,9 +115,7 @@ namespace CalamityMod.Items.Weapons.Melee item.useTurn = true; item.useStyle = ItemUseStyleID.SwingThrow; item.knockBack = 5f; - item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 42; item.value = Item.buyPrice(0, 4, 0, 0); item.rare = ItemRarityID.Orange; item.shoot = ModContent.ProjectileType(); @@ -42,11 +130,11 @@ namespace CalamityMod.Items.Weapons.Melee recipe.AddIngredient(ItemID.SandBlock, 20); recipe.AddIngredient(ItemID.IceBlock, 20); //intentionally not any ice recipe.AddRecipeGroup("AnyEvilBlock", 20); - recipe.AddIngredient(ItemID.GlowingMushroom, 20); - recipe.AddIngredient(ItemID.Marble, 20); - recipe.AddIngredient(ItemID.Granite, 20); - recipe.AddIngredient(ItemID.Hellstone, 20); - recipe.AddIngredient(ItemID.Coral, 20); + // recipe.AddIngredient(ItemID.GlowingMushroom, 20); Cut these ingredients due to no longer synergizing with these specific biomes + // recipe.AddIngredient(ItemID.Marble, 20); + // recipe.AddIngredient(ItemID.Granite, 20); + // recipe.AddIngredient(ItemID.Hellstone, 20); + // recipe.AddIngredient(ItemID.Coral, 20); recipe.AddTile(TileID.Anvils); recipe.SetResult(this); recipe.AddRecipe(); @@ -59,5 +147,879 @@ namespace CalamityMod.Items.Weapons.Melee int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 0); } } + + public override bool AltFunctionUse(Player player) => true; + + public override bool CloneNewInstances => true; + + public override ModItem Clone(Item item) + { + var clone = base.Clone(item); + + if (Main.mouseItem.type == ItemType()) + item.modItem.HoldItem(Main.player[Main.myPlayer]); + + (clone as BiomeBlade).mainAttunement = (item.modItem as BiomeBlade).mainAttunement; + (clone as BiomeBlade).secondaryAttunement = (item.modItem as BiomeBlade).secondaryAttunement; + + return clone; + } + + public override void NetSend(BinaryWriter writer) + { + writer.Write((byte)mainAttunement); + writer.Write((byte)secondaryAttunement); + } + + public override void NetRecieve(BinaryReader reader) + { + mainAttunement = (Attunement?)reader.ReadByte(); + secondaryAttunement = (Attunement?)reader.ReadByte(); + } + + public override void HoldItem(Player player) + { + //Change the swords function based on its attunement + switch (mainAttunement) + { + case Attunement.Default: + item.channel = false; + item.noUseGraphic = false; + item.useStyle = ItemUseStyleID.SwingThrow; + item.shoot = ProjectileType(); + item.shootSpeed = 12f; + item.UseSound = SoundID.Item1; + item.noMelee = false; + + Combo = 0; + break; + case Attunement.Hot: + item.channel = true; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.HoldingOut; + item.shoot = ProjectileType(); + item.shootSpeed = 12f; + item.UseSound = null; + item.noMelee = true; + + Combo = 0; + break; + case Attunement.Cold: + item.channel = true; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.HoldingOut; + item.shoot = ProjectileType(); + item.shootSpeed = 12f; + item.UseSound = null; + item.noMelee = true; + break; + case Attunement.Tropical: + break; + case Attunement.Evil: + item.channel = false; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.Stabbing; + item.shoot = ProjectileType(); + item.shootSpeed = 12f; + item.UseSound = null; + item.noMelee = true; + + Combo = 0; + if (player.velocity.Y == 0) //Reset the lunge ability on ground contact + CanLunge = 1; + break; + default: + item.noUseGraphic = false; + item.useStyle = ItemUseStyleID.SwingThrow; + item.shoot = 0; + item.shootSpeed = 12f; + item.UseSound = SoundID.Item1; + + Combo = 0; + break; + } + + if (player.altFunctionUse == 2) + { + if (Main.projectile.Any(n => n.active && n.type == ProjectileType() && n.owner == player.whoAmI)) + return; + if (!player.StandingStill()) //Swap attunements + { + if (secondaryAttunement == null) //Don't let the player swap to an empty attunement + return; + Projectile.NewProjectile(player.position, Vector2.Zero, ProjectileType(), 0, 0, player.whoAmI, 0f); + Attunement? temporaryAttunementStorage = mainAttunement; + mainAttunement = secondaryAttunement; + secondaryAttunement = temporaryAttunementStorage; + if (player.whoAmI == Main.myPlayer) + Main.PlaySound(SoundID.DD2_DarkMageHealImpact); + } + + else //Chargeup + { + if (player.mount.Active) + return; + Vector2 displace = new Vector2((player.direction >= 0 ? 2 : -1) * 20f, 0); + Projectile.NewProjectile(player.position + displace, Vector2.Zero, ProjectileType(), 0, 0, player.whoAmI, 1f); + if (player.whoAmI == Main.myPlayer) + Main.PlaySound(SoundID.DD2_DarkMageHealImpact); + } + } + + + } + public override bool CanUseItem(Player player) + { + return !Main.projectile.Any(n => n.active && n.owner == player.whoAmI && + (n.type == ProjectileType())); + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (player.altFunctionUse == 2) + return false; + + switch (mainAttunement) + { + case Attunement.Cold: + switch (Combo) + { + case 0: + Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 0, 15); + break; + + case 1: + Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 1, 20); + break; + + case 2: + Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 2, 30); + break; + } + Combo++; + if (Combo > 2) + Combo = 0; + return false; + case Attunement.Evil: + Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage*2, knockBack, player.whoAmI, 26, (float) CanLunge); + CanLunge = 0; + return false; + + default: + return base.Shoot(player, ref position, ref speedX, ref speedY, ref type, ref damage, ref knockBack); + } + } + + + + + internal static ChargingEnergyParticleSet BiomeEnergyParticles = new ChargingEnergyParticleSet(-1, 2, Color.DarkViolet, Color.White, 0.04f, 20f); + internal static void UpdateAllParticleSets() + { + BiomeEnergyParticles.Update(); + } + + public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) + { + // I want to strangle somebody. + Texture2D itemTexture = Main.itemTexture[item.type]; + Rectangle itemFrame = (Main.itemAnimations[item.type] == null) ? itemTexture.Frame() : Main.itemAnimations[item.type].GetFrame(itemTexture); + + if (mainAttunement == null) + return true; + + // Draw all particles. + + Vector2 particleDrawCenter = position + new Vector2(12f, 16f) * Main.inventoryScale; + + switch (mainAttunement) + { + case Attunement.Default: + BiomeEnergyParticles.EdgeColor = new Color(117, 126, 72); + BiomeEnergyParticles.CenterColor = new Color(200, 184, 136); + break; + case Attunement.Hot: + BiomeEnergyParticles.EdgeColor = new Color(137, 32, 0); + BiomeEnergyParticles.CenterColor = new Color(209, 154, 0); + break; + case Attunement.Cold: + BiomeEnergyParticles.EdgeColor = new Color(165, 235, 235); + BiomeEnergyParticles.CenterColor = new Color(58, 110, 141); + break; + case Attunement.Tropical: + BiomeEnergyParticles.EdgeColor = new Color(53, 112, 4); + BiomeEnergyParticles.CenterColor = new Color(131, 173, 39); + break; + case Attunement.Evil: + BiomeEnergyParticles.EdgeColor = new Color(112, 4, 35); + BiomeEnergyParticles.CenterColor = new Color(195, 42, 200); + break; + } + BiomeEnergyParticles.InterpolationSpeed = 0.1f; + BiomeEnergyParticles.DrawSet(particleDrawCenter + Main.screenPosition); + + Vector2 displacement = Vector2.UnitX.RotatedBy(Main.GlobalTime * 3f) * 2f * (float)Math.Sin(Main.GlobalTime); + + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive); + spriteBatch.Draw(itemTexture, position + displacement, itemFrame, BiomeEnergyParticles.CenterColor, 0f, origin, scale, SpriteEffects.None, 0f); + spriteBatch.Draw(itemTexture, position - displacement, itemFrame, BiomeEnergyParticles.CenterColor, 0f, origin, scale, SpriteEffects.None, 0f); + spriteBatch.End(); + spriteBatch.Begin(default, default); + + return true; + } + + + } + + public class BrokenBiomeBladeVisuals : ModProjectile //Visuals + { + private Player Owner => Main.player[projectile.owner]; + public ref float AnimationMode => ref projectile.ai[0]; + private BezierCurve bezierCurve; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Broken Biome Blade"); + } + public override string Texture => "CalamityMod/Items/Weapons/Melee/BiomeBlade"; + public override void SetDefaults() + { + projectile.width = projectile.height = 36; + projectile.aiStyle = -1; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.timeLeft = 30; + projectile.tileCollide = false; + projectile.damage = 0; + } + + public override void AI() + { + if (Owner.HeldItem.type != ItemType()) + { + projectile.timeLeft = 0; + return; + } + + if (AnimationMode == 1f) + { + if (!Owner.StandingStill()) + { + projectile.timeLeft = 0; + return; + } + if (projectile.timeLeft == 30) + { + List bezierPoints = new List() { projectile.position, projectile.position - Vector2.UnitY * 16f, projectile.position + Vector2.UnitY * 56f, projectile.position + Vector2.UnitY * 42f }; + bezierCurve = new BezierCurve(bezierPoints.ToArray()); + } + + projectile.position = bezierCurve.Evaluate(1f - projectile.timeLeft / 30f); + //projectile.rotation = MathHelper.Lerp(MathHelper.PiOver4, -(MathHelper.PiOver2 + MathHelper.PiOver4), 1f - MathHelper.Clamp((projectile.timeLeft / 10), 0f, 1f)); + //projectile.rotation = MathHelper.PiOver4 + MathHelper.PiOver2; + projectile.rotation = Utils.AngleLerp(MathHelper.PiOver4 + MathHelper.PiOver2, -MathHelper.PiOver4, MathHelper.Clamp(((projectile.timeLeft - 20f) / 10f), 0f, 1f)); + + if (projectile.timeLeft == 2) + { + bool jungle = Owner.ZoneJungle; + bool ocean = Owner.ZoneBeach; + bool snow = Owner.ZoneSnow; + bool evil = Owner.ZoneCorrupt || Owner.ZoneCrimson; + bool desert = Owner.ZoneDesert; + bool hell = Owner.ZoneUnderworldHeight; + + BiomeBlade.Attunement attunement = BiomeBlade.Attunement.Default; + + if (jungle || ocean) + { + attunement = BiomeBlade.Attunement.Tropical; + } + if (desert || hell) + { + attunement = BiomeBlade.Attunement.Hot; + } + if (snow) + { + attunement = BiomeBlade.Attunement.Cold; + } + if (evil) + { + attunement = BiomeBlade.Attunement.Evil; + } + + if ((Owner.HeldItem.modItem as BiomeBlade).mainAttunement == attunement) + { + Main.PlaySound(SoundID.DD2_LightningBugZap, projectile.Center); + return; + } + Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.Center); + (Owner.HeldItem.modItem as BiomeBlade).secondaryAttunement = (Owner.HeldItem.modItem as BiomeBlade).mainAttunement; + (Owner.HeldItem.modItem as BiomeBlade).mainAttunement = attunement; + + //Lots of particles!!! yay!! visuals!! + } + } + + //Cool particles + } + + public override void Kill(int timeLeft) + { + //Cool particles + } + } + + public class PurityProjection : ModProjectile //The boring plain one + { + private int dustType = 3; + + public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_PurityProjection"; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Purity Projection"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 2; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void SetDefaults() + { + projectile.width = projectile.height = 32; + projectile.aiStyle = 27; + aiType = ProjectileID.LightBeam; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.timeLeft = 100; + projectile.melee = true; + projectile.tileCollide = false; + } + + public override void AI() //Dust doesnt look great + { + if (projectile.timeLeft < 95) + projectile.tileCollide = true; + int dustParticle = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0f, 0f, 100, default, 0.9f); + Main.dust[dustParticle].noGravity = true; + Main.dust[dustParticle].velocity *= 0.5f; + Main.dust[dustParticle].velocity += projectile.velocity * 0.1f; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (projectile.timeLeft > 295) + return false; + + CalamityUtils.DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1); + return false; + } + + public override void Kill(int timeLeft) + { + //Explode into dust or whatever, + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + int debuffTime = 90; + target.AddBuff(ModContent.BuffType(), debuffTime); + } + } + + public class DecaysRetort : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort"; + private bool initialized = false; + Vector2 direction = Vector2.Zero; + public ref float MaxTime => ref projectile.ai[0]; + public ref float CanLunge => ref projectile.ai[1]; + public float Timer => MaxTime - projectile.timeLeft; + public Player Owner => Main.player[projectile.owner]; + public const float LungeSpeed = 16; + public ref float CanBounce => ref projectile.localAI[0]; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Decay's retort"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 84; + projectile.width = projectile.height = 84; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + float bladeLenght = 120f * projectile.scale; + Vector2 displace = direction * ((float)Math.Sin(Timer / MaxTime * 3.14f) * 60); + + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center + displace, Owner.Center + displace + (direction * bladeLenght), 24, ref collisionPoint); + } + + public override void AI() + { + if (!initialized) //Initialization + { + CanBounce = 1f; + projectile.timeLeft = (int)MaxTime; + //Take the direction the sword is swung. FUCK not controlling the swing direction more than just left/right :| + //The direction to mouseworld may need to be turned into the custom synced player mouse variables . not on the branch currently tho + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + projectile.rotation = direction.ToRotation(); + if (CanLunge == 1f) + Lunge(); + Main.PlaySound(SoundID.Item103, projectile.Center); + initialized = true; + } + + //Manage position and rotation + projectile.scale = 1f + ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 0.6f); //SWAGGER + projectile.Center = Owner.Center + (direction * ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 60)); + + //Make the owner look like theyre holding the sword bla bla + Owner.heldProj = projectile.whoAmI; + Owner.direction = Math.Sign(direction.X); + Owner.itemRotation = direction.ToRotation(); + if (Owner.direction != 1) + { + Owner.itemRotation -= 3.14f; + } + Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); + } + + public void Lunge() + { + if (Main.myPlayer != projectile.owner) + return; + //Check if the owner is on the ground + Owner.velocity = direction.SafeNormalize(Vector2.UnitX * Owner.direction) * LungeSpeed; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => OnHitEffects(!target.canGhostHeal || Main.player[projectile.owner].moonLeech); + public override void OnHitPvp(Player target, int damage, bool crit) => OnHitEffects(Main.player[projectile.owner].moonLeech); + + private void OnHitEffects(bool cannotLifesteal) + { + if (!cannotLifesteal) //trolled + { + Owner.statLife += 3; + Owner.HealEffect(3); //Idk if its too much or what but at the same time its close range as fuck + } + if (Main.myPlayer != Owner.whoAmI || CanBounce == 0f) + return; + // Bounce off + float bounceStrength = Math.Max((LungeSpeed / 2f), Owner.velocity.Length()); + bounceStrength *= Owner.velocity.Y == 0 ? 0.2f : 1f; //Reduce the bounce if the player is on the ground + Owner.velocity = -direction.SafeNormalize(Vector2.Zero) * MathHelper.Clamp(bounceStrength, 0f, 22f); + CanBounce = 0f; + Owner.GiveIFrames(10); // 10 i frames for free! + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/BiomeBlade"); + Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort"); + + float drawAngle = direction.ToRotation(); + float drawRotation = drawAngle + MathHelper.PiOver4; + + Vector2 displace = direction * ((float)Math.Sin(Timer / MaxTime * 3.14f) * 60); + Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOffset = Owner.Center + direction * 10f - Main.screenPosition; + + spriteBatch.Draw(handle, drawOffset + displace, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Update the parameters + drawOrigin = new Vector2(0f, tex.Height); + drawOffset = Owner.Center + (drawAngle.ToRotationVector2() * 24f * projectile.scale) - Main.screenPosition; + + spriteBatch.Draw(tex, drawOffset + displace, null, lightColor * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + } + + public class BitingEmbrace : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_BitingEmbraceSmall"; + private bool initialized = false; + Vector2 direction = Vector2.Zero; + public float rotation; + public ref float SwingMode => ref projectile.ai[0]; //0 = Up-Down small slash, 1 = Down-Up large slash, 2 = Thrust + public ref float MaxTime => ref projectile.ai[1]; + public float Timer => MaxTime - projectile.timeLeft; + + public int SwingDirection + { + get + { + switch (SwingMode) + { + case 0: + return -1 * Math.Sign(direction.X); + case 1: + return 1 * Math.Sign(direction.X); + default: + return 0; + + } + } + } + public float SwingWidth + { + get + { + switch (SwingMode) + { + case 0: + return 2.3f; + default: + return 1.8f; + } + } + } + + public Player Owner => Main.player[projectile.owner]; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Biting Embrace"); + Main.projFrames[projectile.type] = 6; //The true trolling is that we only really use this for the third swing. + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 75; + projectile.width = projectile.height = 75; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + //The hitbox is simplified into a line collision. + float collisionPoint = 0f; + float bladeLenght = 0f; + Vector2 displace = Vector2.Zero; + switch (SwingMode) + { + case 0: + bladeLenght = 90f * projectile.scale; + break; + case 1: + bladeLenght = 110f * projectile.scale; + break; + case 2: + bladeLenght = projectile.frame <= 2 ? 85f : 150f; //Only use the extended hitbox after the blade actually extends. For realism. + bladeLenght *= projectile.scale; + displace = direction * ((float)Math.Sin(Timer / MaxTime * 3.14f) * 60); + break; + + } + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center + displace, Owner.Center + displace +(rotation.ToRotationVector2() * bladeLenght), 24, ref collisionPoint); + } + + public override void AI() + { + if (!initialized) //Initialization + { + projectile.timeLeft = (int)MaxTime; + switch (SwingMode) + { + case 0: + projectile.width = projectile.height = 100; + Main.PlaySound(SoundID.DD2_MonkStaffSwing, projectile.Center); + projectile.damage = (int)(projectile.damage * 1.5); + break; + case 1: + projectile.width = projectile.height = 140; + Main.PlaySound(SoundID.DD2_OgreSpit, projectile.Center); + projectile.damage = (int)(projectile.damage * 1.8); + break; + case 2: + projectile.width = projectile.height = 130; + Main.PlaySound(SoundID.DD2_PhantomPhoenixShot, projectile.Center); + projectile.damage *= 3; + break; + } + + //Take the direction the sword is swung. FUCK not controlling the swing direction more than just left/right :| + //The direction to mouseworld may need to be turned into the custom synced player mouse variables . not on the branch currently tho + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + projectile.rotation = direction.ToRotation(); + + initialized = true; + } + //Manage position and rotation + projectile.Center = Owner.Center + (direction * 30); + //rotation = projectile.rotation + MathHelper.SmoothStep(SwingWidth / 2 * SwingDirection, -SwingWidth / 2 * SwingDirection, Timer / MaxTime); + float factor = 1 - (float)Math.Pow((double)-(Timer / MaxTime) + 1, 2d); + rotation = projectile.rotation + MathHelper.Lerp(SwingWidth / 2 * SwingDirection, -SwingWidth / 2 * SwingDirection, factor); + projectile.scale = 1f + ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 0.6f); //SWAGGER + + //Add the thrust motion & animation for the third combo state + if (SwingMode == 2) + { + projectile.Center = Owner.Center + (direction * ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 60)); + projectile.frameCounter++; + if (projectile.frameCounter % 5 == 0 && projectile.frame + 1 < Main.projFrames[projectile.type]) + projectile.frame++; + } + + //Make the owner look like theyre holding the sword bla bla + Owner.heldProj = projectile.whoAmI; + Owner.direction = Math.Sign(rotation.ToRotationVector2().X); + Owner.itemRotation = rotation; + if (Owner.direction != 1) + { + Owner.itemRotation -= 3.14f; + } + Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Color color = Color.White; + color.A = 120; + color *= 0.8f; + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/BiomeBlade"); + + if (SwingMode != 2) + { + Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace" + (SwingMode == 0 ? "Small" : "Big")); + float drawAngle = rotation; + float drawRotation = rotation + MathHelper.PiOver4; + Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition; + + spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Update the parameters + drawOrigin = new Vector2(0f, tex.Height); + drawOffset = Owner.Center + (drawAngle.ToRotationVector2() * 28f * projectile.scale)- Main.screenPosition; + spriteBatch.Draw(tex, drawOffset, null, lightColor * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + } + else + { + Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_BitingEmbraceThrust"); + Vector2 displace = direction * ((float)Math.Sin(Timer / MaxTime * 3.14f) * 60); + + float drawAngle = rotation; + float drawRotation = rotation + MathHelper.PiOver4; + Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition; + + spriteBatch.Draw(handle, drawOffset + displace, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Update the parameters + drawOrigin = new Vector2(0f, 114f); + drawOffset = Owner.Center + (drawAngle.ToRotationVector2() * 28f * projectile.scale) -Main.screenPosition; + //Anim stuff + Rectangle frameRectangle = new Rectangle(0, 0 + (116 * projectile.frame), 114, 114); + + spriteBatch.Draw(tex, drawOffset + displace, frameRectangle, lightColor * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + } + + return false; + } + + } + + public class AridGrandeur : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur"; + private bool initialized = false; + Vector2 direction = Vector2.Zero; + public ref float Shred => ref projectile.ai[0]; //How much the attack is, attacking + public float ShredRatio => MathHelper.Clamp(Shred / (maxShred * 0.5f), 0f, 1f); + public ref float PogoCooldown => ref projectile.ai[1]; //Cooldown for the pogo + public Player Owner => Main.player[projectile.owner]; + public bool CanPogo => Owner.velocity.Y != 0 && PogoCooldown <= 0; //Only pogo when in the air and if the cooldown is zero + private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; + + public const float pogoStrenght = 16f; //How much the player gets pogoed up + public const float maxShred = 500; //How much shred you get + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Arid Grandeur"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 46; + projectile.width = projectile.height = 46; + projectile.tileCollide = true; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 16; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + float bladeLenght = 84 * projectile.scale; + float bladeWidth = 76 * projectile.scale; + + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center, Owner.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + if (CanPogo && Main.myPlayer == Owner.whoAmI) + { + Owner.velocity = -direction.SafeNormalize(Vector2.Zero) * pogoStrenght; //Bounce + Owner.fallStart = (int)(Owner.position.Y / 16f); + PogoCooldown = 30; //Cooldown + Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.position); + } + return false; + } + + public override void AI() + { + if (!initialized) //Initialization. Here its litterally just playing a sound tho lmfao + { + Main.PlaySound(SoundID.Item90, projectile.Center); + initialized = true; + } + + if (!OwnerCanShoot) + { + projectile.Kill(); + return; + } + + if (Shred >= maxShred) + Shred = maxShred; + if (Shred < 0) + Shred = 0; + + //Manage position and rotation + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + projectile.rotation = direction.ToRotation(); + projectile.Center = Owner.Center + (direction * 60); + + //Scaling based on shred + projectile.localNPCHitCooldown = 16 - (int)(MathHelper.Lerp(0, 8, ShredRatio)); //Increase the hit frequency + projectile.scale = 1f + (ShredRatio * 1f); //SWAGGER + + //Make the owner look like theyre holding the sword bla bla + Owner.heldProj = projectile.whoAmI; + Owner.direction = Math.Sign(direction.X); + Owner.itemRotation = direction.ToRotation(); + if (Owner.direction != 1) + { + Owner.itemRotation -= 3.14f; + } + Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); + Owner.itemTime = 2; + Owner.itemAnimation = 2; + + Shred--; + PogoCooldown--; + projectile.timeLeft = 2; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => ShredTarget(target); + public override void OnHitPvp(Player target, int damage, bool crit) => ShredTarget(target); + + private void ShredTarget(Entity target) + { + Main.PlaySound(SoundID.NPCHit30, projectile.Center); //Sizzle + Shred += 62; //Augment the shredspeed + if (Main.myPlayer != Owner.whoAmI) + return; + // get lifted up + if (PogoCooldown <= 0) + { + Owner.velocity += target.velocity * 0.5f; //Get "stuck" into the enemy partly + Owner.GiveIFrames(5); // i framez. Do 5 iframes even matter? idk but you get a lot of em so lol... + PogoCooldown = 20; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/BiomeBlade"); + Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur"); + + int bladeAmount = 4; + + float drawAngle = direction.ToRotation(); + float drawRotation = drawAngle + MathHelper.PiOver4; + + Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOffset = Owner.Center + direction * 10f - Main.screenPosition; + + spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Update the parameters + drawOrigin = new Vector2(0f, tex.Height); + drawOffset = Owner.Center + (drawAngle.ToRotationVector2() * 32f * projectile.scale) - Main.screenPosition; + + spriteBatch.Draw(tex, drawOffset, null, lightColor * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + + for (int i = 0; i < bladeAmount; i++) //Draw extra copies + { + tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeurExtra"); + + drawAngle = direction.ToRotation(); + + float circleCompletion = (float)Math.Sin(Main.GlobalTime * 5 + i * MathHelper.PiOver2); + drawRotation = drawAngle + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi/7f) * ShredRatio); + + drawOrigin = new Vector2(0f, tex.Height); + + + Vector2 drawOffsetStraight = Owner.Center + direction * (float)Math.Sin(Main.GlobalTime*7)*10 - Main.screenPosition; //How far from the player + Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly + + spriteBatch.Draw(tex, drawOffsetStraight + drawDisplacementAngle, null, lightColor * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + } + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + } } + + diff --git a/Items/Weapons/Melee/BiomeBlade.png b/Items/Weapons/Melee/BiomeBlade.png index 785aff563e62472eb7a63cbe7a4b79804ac26d67..d6f1f3e56f0ed36460f167fee226022698aefea4 100644 GIT binary patch literal 975 zcmV;=12FuFP)Px&iAh93R9J=W)=O+vRTReY-$7b>5qd!^u@4IcX^}?2AP7Vd0|S%+@ez$-f)ht3 zCYlh(#26ju%)~?oPBFw-192h}3Go3@QWIX50)2t@iu6TW8t8SfyD10SN+N?p;y1Z_ z-?P_#{Li=7I{dGxmE7$Kw{Ly{EPL@;&{60v-u!&w1Nj90JktuU6)uB;virfbyS<_R zs!0jGvu)dyf$#6%pXx_4v-3I7-#b)%;g%zaYzmZY7eh zCE$UhQMVFm@4A@kpZ={A)NfpykU>JzVG&2B;Y$Qn{=e9Q}AtdV>1J7$-A3pG)BPLq8#lgocNPKv^y~ z;eeaG1NwS;QXYG#I*=G0J9$(jb8fF!a-FJ0#fHO-T2AgUYfX;)5!}yDXA--}ZIB?=`P*F8Efx?AQ z!;YRyzk%!#+PQKiZn`xiBPoxpTDun1JsCU@iLLtV*9j-wa6Fv2XL<0{(D%o|{PNNS zy8A|OJDI5L5sHoH8&`pR$@L=RWTLjcx&`ch^Ig#R&DY?)U7vtQ4j%-$ryDU&=Dv#Z z1g;nQFgcm1>=Jrz=@X!EwIt=CJ)ggw3W$UTHU)x%FO{4hnVp|%R+c_(VY_7$M)SUWh~e)-n#sMP$EDRYEw+wEjt znzJMj=xJ#N4YhMqan);q6*$hhhL-lPe3%8>#p9lL| znp1(1Ks|7CcjD}mcuRYYBc{7p( z24;oo-PY8c@>oafC9r9IV`_o6rjXGG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)slI8#vP#PrN$=WoV2P?#j%UUH0Co8mBV!Z literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/BrokenBiomeBlade_AridGrandeurExtra.png b/Projectiles/Melee/BrokenBiomeBlade_AridGrandeurExtra.png new file mode 100644 index 0000000000000000000000000000000000000000..bc84b51a7cb40ade7a3ada19f9a525d65f5dac94 GIT binary patch literal 1413 zcmV;01$z34P)Px)KS@MERA_+oRTRg6v&(LG+d@kVO(+Cukw<7OXoa>42}DhdpvD9-2Hz2k zuaHPEK4RhnBax^vMiLE*Ml?PelA2=pAfl!QK@p1)!G=d4RBY*!cH3@ucl>Z>I(xSd zJ4@Rw+4+B&J9qBgIXAyKbI+Z7R^u|4e*3jjC@hlWu_LH*Noe+9rbKITn4 zX^A!~q$l<1kmpP*`a zd@TU(U@rigt_$hz05FiWuE|hbA*pv8*Q2D2HED@YO0)s7YJBP*0CaQ!p1^{$pUhXH|)d@hvARY3i02b*XrK>(Y zY0uBfWruj8RQuwSKosc|pAL}H*#SVrEhdIie1Lt@-mfYLZRQXkZ=HT^ixgr>Uu*{~ z(qW$;uunR5_qW3~cZiRd{(kcXDHySK$RO?OXag+Lef~7SKIthRRE)?Dhxl0Q_`9!4 z!6fbT3+eV&AnNU%nhw|}owcLPmOT#fvC^@fZ%84Qbel>#m^K+0329v+o%7c2xa@L> zkG76{vO@~S`q?DyZ*2jrRaQ^>NJ*6Ixd2$J ztlr5}0Q;n8zx2+i*y#|D)ibMC58H9u-o48CPvxHh14*Z~Gy#@RcTdR#z!mNr-m)0d z`Oj@1zP(L3#A69(Ocx()Z|aEMn^H*puy2o4cFQ-he$vg207P5{>8z=MeV?Ac`IY}0 zLtIK;;wI_*1#8|W7 zz&`0kPdsmbG&YpH#La?9dgId%0&x8Fi9tIAx`gl_75f0VYR%0;y6HS%`E+1fHejE0 z;fBq&1`w~3mv~RNteSj&|DX+GeY>NrO$YdW|BnDHTTu*H^K|FbX@GswMfW{s%kWE8 z@)8gANd$GiMOIDkzrG8w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w21Ou~Gc+Hm$95rBY$QgfYKiDB+${)DB9Nrrzynw{)!2HecQ|9@BseI0B?XKl zF3FhsD=lbDFlS^lc%V zIBTp+)fK!=-ZEzzy#G~QDpp!&7}5=$nBZ^9=&I&W1XF%7ezA&bF%E-YJ;9Vnr(6yT zchvblh`-Uugu)Wisshw-)Um;?>JJsQU-o6=9w^I69G5Jia+oMEi(4fS+(9}pCD_c~ z0KeUwzXaWVaMmfMmtwRIzRcv~?<085p9+HVi73+_7ccv#wt7jY4z>Zkl{tLATzJUc zKEa(Rsjqun+WS}dX76q*qEKey)4Y}Ei#@vC-!Wb(^afzfZ%mx6ulLNV@OodH7*6^P z-uKQ-pKl*4lwM|fnQC^ewN&=_C(DnnNVf^eK)O%v<|{A|2(8*oJszvFl*lLsL`zEX z;GsB!`i8HUkQf;q53J`u6gF`Rr(XW3s{%KYG+TGN7j=wtWLXk_L*5u%amd{Q!H>hK zb)U&2G4pTLy~0!ky#spUXta;Z^lWuv)@(dmBoWdx>%Bd$hpI|VQRPmo>E}OBqigQ7 zD%x6?SQC8)j@K%CyMq9bgSN-gN-r%Ad&3jkrxH`f>XsX)D1wER-FkV|L`Nnh#BLSz zm(2~A^C*-f9x3+Pv1=W7GU&Qf@ip;swoy3*EXYw^%k@MBE`+^rYRpS9N)SF5g6h~~ z#K9ydKNq}h3*K<_i47On&^5YZ#(hG2&v+5DgvVQD9x<8o#cYdfCdt3&Ah&4f$hzG)p5;vRm{0@Okux8WU9c5h1K=E9iG!5%NytG zf41o#mdJ$A3;U@>=`a5_=DRPOlHV13e%XW);8g)^htcMC6uUDplLIlLB~bY;== sx-K5Cx+40nUx7WML6e2$MAy%wLkUMdoc%1Y1P%PP)OAsXsy3nj1B{Z}$N&HU literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.png b/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.png new file mode 100644 index 0000000000000000000000000000000000000000..e9ea44de32b5af756ef62f0883b453e346f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{n)vsc8@xH!R2)zRS12#dx*JLdOY5)KL07*qoM6N<$f~wOxdjJ3c literal 0 HcmV?d00001 From d36c1474cf6176870f850f2434bdbdefd37c8366 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Fri, 31 Dec 2021 20:44:03 +0100 Subject: [PATCH 02/76] Fixed the pogo breaking by using custom collision checking --- Items/Weapons/Melee/BiomeBlade.cs | 159 +++++++++++++++++++++++++++--- 1 file changed, 144 insertions(+), 15 deletions(-) diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index 261bbd7f38..d16e40a39f 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -293,7 +293,7 @@ namespace CalamityMod.Items.Weapons.Melee break; case 2: - Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 2, 30); + Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 2, 50); break; } Combo++; @@ -777,10 +777,13 @@ namespace CalamityMod.Items.Weapons.Melee //Add the thrust motion & animation for the third combo state if (SwingMode == 2) { - projectile.Center = Owner.Center + (direction * ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 60)); + projectile.scale = 1f + (thrustRatio() * 0.6f); + projectile.Center = Owner.Center + (direction * thrustRatio() * 60); + projectile.frameCounter++; - if (projectile.frameCounter % 5 == 0 && projectile.frame + 1 < Main.projFrames[projectile.type]) - projectile.frame++; + if (projectile.frameCounter % 5 == 0 && projectile.frame + 1 < Main.projFrames[projectile.type]) + projectile.frame++; + } //Make the owner look like theyre holding the sword bla bla @@ -794,6 +797,23 @@ namespace CalamityMod.Items.Weapons.Melee Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); } + internal float thrustRatio() + { + float ratio; //L + Ratio + if (Timer / MaxTime < 0.2) + ratio = (float)(Math.Sin(Timer / (MaxTime) * MathHelper.PiOver2) * 0.2f); //Small anticipation period. + else + ratio = MathHelper.Clamp((float)Math.Sin((Timer / (MaxTime * 2) + 0.5f) * 3.14f) * 1.5f, 0f, 1f); + + + //if (Timer/MaxTime > 0.6) + //{ + // ratio = MathHelper.Lerp(ratio, 1f, ((Timer - (MaxTime / 5f * 3)) / (MaxTime - (MaxTime / 5f * 2))) + 0.6f); + //} + + return ratio; + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { Color color = Color.White; @@ -824,12 +844,12 @@ namespace CalamityMod.Items.Weapons.Melee else { Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_BitingEmbraceThrust"); - Vector2 displace = direction * ((float)Math.Sin(Timer / MaxTime * 3.14f) * 60); + Vector2 displace = direction * (thrustRatio() * 60); float drawAngle = rotation; float drawRotation = rotation + MathHelper.PiOver4; Vector2 drawOrigin = new Vector2(0f, handle.Height); - Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition; + Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition + (direction * 20f * CalamityUtils.Convert01To010((Timer - (MaxTime / 5f)) / (MaxTime / 5f))); spriteBatch.Draw(handle, drawOffset + displace, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); //Turn on additive blending @@ -837,7 +857,7 @@ namespace CalamityMod.Items.Weapons.Melee spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); //Update the parameters drawOrigin = new Vector2(0f, 114f); - drawOffset = Owner.Center + (drawAngle.ToRotationVector2() * 28f * projectile.scale) -Main.screenPosition; + drawOffset = Owner.Center + (drawAngle.ToRotationVector2() * 28f * projectile.scale) - Main.screenPosition + (direction * 20f * CalamityUtils.Convert01To010((Timer - (MaxTime / 5f)) / (MaxTime / 5f))); //Anim stuff Rectangle frameRectangle = new Rectangle(0, 0 + (116 * projectile.frame), 114, 114); @@ -874,9 +894,8 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { projectile.melee = true; - projectile.width = projectile.height = 46; - projectile.width = projectile.height = 46; - projectile.tileCollide = true; + projectile.width = projectile.height = 70; + projectile.tileCollide = false; projectile.friendly = true; projectile.penetrate = -1; projectile.extraUpdates = 1; @@ -893,16 +912,15 @@ namespace CalamityMod.Items.Weapons.Melee return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center, Owner.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); } - public override bool OnTileCollide(Vector2 oldVelocity) - { - if (CanPogo && Main.myPlayer == Owner.whoAmI) + public void Pogo() + { + if (CanPogo && Main.myPlayer == Owner.whoAmI) { Owner.velocity = -direction.SafeNormalize(Vector2.Zero) * pogoStrenght; //Bounce Owner.fallStart = (int)(Owner.position.Y / 16f); PogoCooldown = 30; //Cooldown Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.position); } - return false; } public override void AI() @@ -919,6 +937,7 @@ namespace CalamityMod.Items.Weapons.Melee return; } + if (Shred >= maxShred) Shred = maxShred; if (Shred < 0) @@ -934,6 +953,12 @@ namespace CalamityMod.Items.Weapons.Melee projectile.localNPCHitCooldown = 16 - (int)(MathHelper.Lerp(0, 8, ShredRatio)); //Increase the hit frequency projectile.scale = 1f + (ShredRatio * 1f); //SWAGGER + + if (Collision.SolidCollision(Owner.Center + (direction * 84 * projectile.scale) - Vector2.One*5f , 10, 10)) + { + Pogo(); + } + //Make the owner look like theyre holding the sword bla bla Owner.heldProj = projectile.whoAmI; Owner.direction = Math.Sign(direction.X); @@ -963,12 +988,24 @@ namespace CalamityMod.Items.Weapons.Melee // get lifted up if (PogoCooldown <= 0) { - Owner.velocity += target.velocity * 0.5f; //Get "stuck" into the enemy partly + if (Owner.velocity.Y > 0) + Owner.velocity.Y = -2f ; //Get "stuck" into the enemy partly + Owner.GiveIFrames(5); // i framez. Do 5 iframes even matter? idk but you get a lot of em so lol... PogoCooldown = 20; } } + public override void Kill(int timeLeft) + { + Main.PlaySound(SoundID.NPCHit43, projectile.Center); + if (ShredRatio > 0.5 && Owner.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(projectile.Center, direction * 16f, ProjectileType(), projectile.damage, projectile.knockBack, Owner.whoAmI, Shred); + //sharticles + } + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/BiomeBlade"); @@ -1020,6 +1057,98 @@ namespace CalamityMod.Items.Weapons.Melee } } + + public class AridGrandeurShot : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeurExtra"; + private bool initialized = false; + Vector2 direction = Vector2.Zero; + public ref float Shred => ref projectile.ai[0]; + public float ShredRatio => MathHelper.Clamp(Shred / (maxShred * 0.5f), 0f, 1f); + public Player Owner => Main.player[projectile.owner]; + + public const float pogoStrenght = 16f; //How much the player gets pogoed up + public const float maxShred = 500; //How much shred you get + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Arid Shredder"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 70; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + float bladeLenght = 84 * projectile.scale; + float bladeWidth = 76 * projectile.scale; + + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center - direction * bladeLenght / 2, projectile.Center + direction * bladeLenght / 2, bladeWidth, ref collisionPoint); + } + + public override void AI() + { + if (!initialized) + { + Main.PlaySound(SoundID.Item90, projectile.Center); + projectile.timeLeft = (int)(30f + ShredRatio * 30f); + initialized = true; + + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + projectile.rotation = direction.ToRotation(); + + projectile.velocity = direction * 6f; + projectile.damage *= 10; + + projectile.scale = 1f + (ShredRatio * 1f); //SWAGGER + projectile.netUpdate = true; + + } + + projectile.position += projectile.velocity; + + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + for (int i = 0; i < 4; i++) //Draw extra copies + { + var tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeurExtra"); + + float drawAngle = direction.ToRotation(); + + float circleCompletion = (float)Math.Sin(Main.GlobalTime * 5 + i * MathHelper.PiOver2); + float drawRotation = drawAngle + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi / 7f) * ShredRatio); + + Vector2 drawOrigin = new Vector2(0f, tex.Height); + + + Vector2 drawOffsetStraight = projectile.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10 - Main.screenPosition; //How far from the player + Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly + + spriteBatch.Draw(tex, drawOffsetStraight + drawDisplacementAngle, null, lightColor * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + } + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + } + } From 4efb113078a6e1a00cbfd3bfc6a2ef0cb5b5903b Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Fri, 31 Dec 2021 23:06:53 +0100 Subject: [PATCH 03/76] Edited recipe --- Items/Weapons/Melee/BiomeBlade.cs | 19 +++++++------------ Utilities/CalamityRecipes.cs | 12 ++++++++++++ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index d16e40a39f..a570cef232 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -1,6 +1,7 @@ using CalamityMod.Buffs.StatDebuffs; using CalamityMod.CalPlayer; using CalamityMod.DataStructures; +using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Particles; using CalamityMod.Projectiles.Melee; @@ -118,23 +119,17 @@ namespace CalamityMod.Items.Weapons.Melee item.autoReuse = true; item.value = Item.buyPrice(0, 4, 0, 0); item.rare = ItemRarityID.Orange; - item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; } public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ItemID.WoodenSword); - recipe.AddIngredient(ItemID.DirtBlock, 20); - recipe.AddIngredient(ItemID.SandBlock, 20); - recipe.AddIngredient(ItemID.IceBlock, 20); //intentionally not any ice - recipe.AddRecipeGroup("AnyEvilBlock", 20); - // recipe.AddIngredient(ItemID.GlowingMushroom, 20); Cut these ingredients due to no longer synergizing with these specific biomes - // recipe.AddIngredient(ItemID.Marble, 20); - // recipe.AddIngredient(ItemID.Granite, 20); - // recipe.AddIngredient(ItemID.Hellstone, 20); - // recipe.AddIngredient(ItemID.Coral, 20); + recipe.AddRecipeGroup("AnyWoodenSword"); + recipe.AddIngredient(ItemID.DirtBlock, 50); + recipe.AddIngredient(ItemID.StoneBlock, 50); + recipe.AddIngredient(ItemID.HellstoneBar, 5); + recipe.AddIngredient(ItemType(), 5); recipe.AddTile(TileID.Anvils); recipe.SetResult(this); recipe.AddRecipe(); @@ -152,7 +147,7 @@ namespace CalamityMod.Items.Weapons.Melee public override bool CloneNewInstances => true; - public override ModItem Clone(Item item) + public override ModItem Clone(Item item) //need to add shit to properly save those { var clone = base.Clone(item); diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs index e2626591ce..0a3bdad1c0 100644 --- a/Utilities/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -1297,6 +1297,18 @@ namespace CalamityMod }); RecipeGroup.RegisterGroup("LunarHamaxe", group); + group = new RecipeGroup(() => "Any Wooden Sword", new int[] + { + ItemID.WoodenSword, + ItemID.BorealWoodSword, + ItemID.RichMahoganySword, + ItemID.PalmWoodSword, + ItemID.EbonwoodSword, + ItemID.ShadewoodSword, + ItemID.PearlwoodSword + }); + RecipeGroup.RegisterGroup("AnyWoodenSword", group); + group = new RecipeGroup(() => "Any Large Gem", new int[] { ItemID.LargeAmber, From 3431e8adda4cb32da62633c000cac2e78c2846dd Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sat, 1 Jan 2022 05:02:55 +0100 Subject: [PATCH 04/76] Better animation curve for ice attunement & removed the hot attunement projectile --- Items/Weapons/Melee/BiomeBlade.cs | 116 +++++++++++++++++++++++------- 1 file changed, 89 insertions(+), 27 deletions(-) diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index a570cef232..e3946bd1af 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -5,6 +5,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Particles; using CalamityMod.Projectiles.Melee; +using Terraria.Graphics.Shaders; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -651,6 +652,7 @@ namespace CalamityMod.Items.Weapons.Melee public class BitingEmbrace : ModProjectile { public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_BitingEmbraceSmall"; + private bool initialized = false; Vector2 direction = Vector2.Zero; public float rotation; @@ -658,6 +660,13 @@ namespace CalamityMod.Items.Weapons.Melee public ref float MaxTime => ref projectile.ai[1]; public float Timer => MaxTime - projectile.timeLeft; + //Animation key constants + public const float anticipationTime = 0.2f; //Get ready to thrust + public const float thrustBurstTime = 0.15f; //Thrust in a quick burst + public const float heldDownTime = 0.35f; //Remain extended + public float retractTime => 1f - anticipationTime - thrustBurstTime - heldDownTime; //Retract. Its simply all the time left from the other stuff + + public int SwingDirection { get @@ -723,7 +732,7 @@ namespace CalamityMod.Items.Weapons.Melee case 2: bladeLenght = projectile.frame <= 2 ? 85f : 150f; //Only use the extended hitbox after the blade actually extends. For realism. bladeLenght *= projectile.scale; - displace = direction * ((float)Math.Sin(Timer / MaxTime * 3.14f) * 60); + displace = direction * ThrustDisplaceRatio() * 60f; break; } @@ -772,8 +781,8 @@ namespace CalamityMod.Items.Weapons.Melee //Add the thrust motion & animation for the third combo state if (SwingMode == 2) { - projectile.scale = 1f + (thrustRatio() * 0.6f); - projectile.Center = Owner.Center + (direction * thrustRatio() * 60); + projectile.scale = 1f + (ThrustScaleRatio() * 0.6f); + projectile.Center = Owner.Center + (direction * ThrustDisplaceRatio() * 60); projectile.frameCounter++; if (projectile.frameCounter % 5 == 0 && projectile.frame + 1 < Main.projFrames[projectile.type]) @@ -792,28 +801,80 @@ namespace CalamityMod.Items.Weapons.Melee Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); } - internal float thrustRatio() + internal float ThrustDisplaceRatio() { + float linearRatio = (Timer / MaxTime); //How far along the animation are you float ratio; //L + Ratio - if (Timer / MaxTime < 0.2) - ratio = (float)(Math.Sin(Timer / (MaxTime) * MathHelper.PiOver2) * 0.2f); //Small anticipation period. - else - ratio = MathHelper.Clamp((float)Math.Sin((Timer / (MaxTime * 2) + 0.5f) * 3.14f) * 1.5f, 0f, 1f); + float displaceRatio = 1f; + if (linearRatio <= anticipationTime) //Anticipation phase. A small bump in the negatives + { + ratio = MathHelper.Lerp(0f, 1f, linearRatio / anticipationTime); //Turn that mf into a workable 0 - 1 range + displaceRatio = (float)(Math.Sin(ratio * MathHelper.Pi) * -0.15f); + } + else if (linearRatio <= anticipationTime + thrustBurstTime) //Burst phase. Quickly step into almost a full ratio + { + ratio = linearRatio - anticipationTime; + ratio = MathHelper.Lerp(0f, 1f, ratio / thrustBurstTime); //Turn that mf into a workable 0 - 1 range + displaceRatio = MathHelper.SmoothStep(0f, 0.9f, ratio); + } + else if (linearRatio <= anticipationTime + thrustBurstTime + heldDownTime) //Holding down phase. Small bump up to reach a full ratio and then start going down + { + ratio = linearRatio - anticipationTime - thrustBurstTime; + ratio = MathHelper.Lerp(0f, 1f, ratio / heldDownTime); //Turn that mf into a workable 0 - 1 range + displaceRatio = 0.9f + (float)(Math.Sin(ratio * MathHelper.Pi) * 0.1f); + } + else //Retraction phase. Smooth step back to 0 + { + ratio = linearRatio - (1f - retractTime); + ratio = MathHelper.Lerp(0f, 1f, ratio / retractTime); //Turn that mf into a workable 0 - 1 range + displaceRatio = MathHelper.SmoothStep(0.9f, 0, ratio); + } - //if (Timer/MaxTime > 0.6) - //{ - // ratio = MathHelper.Lerp(ratio, 1f, ((Timer - (MaxTime / 5f * 3)) / (MaxTime - (MaxTime / 5f * 2))) + 0.6f); - //} - - return ratio; + return displaceRatio; } + //The ratio rapidly increases from 0 to 1 (reaches 1 at the midway point of the anticipation.). It remains at 1 for the rest of the thrust, and then decreases down to 0 at the midway point of the retraction) + internal float ThrustScaleRatio() + { + float linearRatio = (Timer / MaxTime); //How far along the animation are you + float ratio; //L + Ratio + float scaleRatio = 1f; + + if (linearRatio <= anticipationTime / 2f) //Growth phase + { + ratio = MathHelper.Lerp(0f, 1f, linearRatio / (anticipationTime / 2f)); //Turn that mf into a workable 0 - 1 range + scaleRatio = (float)(1f - Math.Exp(-ratio + 1)); + } + if (linearRatio >= 1f - retractTime / 2f) //Retract phase + { + ratio = linearRatio - (1f - retractTime / 2f); + ratio = MathHelper.Lerp(0f, 1f, ratio / (retractTime / 2f)); //Turn that mf into a workable 0 - 1 range + scaleRatio = (float)(1f - Math.Exp(ratio)); + } + + return scaleRatio; + } + + internal float PrimitiveWidthFunction(float completionRatio) + { + var tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace" + (SwingMode == 0 ? "Small" : "Big")); + return Vector2.Distance(Vector2.Zero, tex.Size()); + } + + internal Color PrimitiveColorFunction(float completionRatio) + { + float opacity = Utils.InverseLerp(0.8f, 0.52f, completionRatio, true) * Utils.InverseLerp(1f, 0.81f, Timer/MaxTime, true); + Color startingColor = Color.White; + Color endingColor = Color.Lerp(Color.DarkCyan, Color.DarkBlue, 0.77f); + return Color.Lerp(startingColor, endingColor, (float)Math.Pow(completionRatio, 0.37f)) * opacity; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Color color = Color.White; - color.A = 120; - color *= 0.8f; + + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/BiomeBlade"); if (SwingMode != 2) @@ -839,24 +900,25 @@ namespace CalamityMod.Items.Weapons.Melee else { Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_BitingEmbraceThrust"); - Vector2 displace = direction * (thrustRatio() * 60); + Vector2 thrustDisplace = direction * (ThrustDisplaceRatio() * 60); float drawAngle = rotation; float drawRotation = rotation + MathHelper.PiOver4; Vector2 drawOrigin = new Vector2(0f, handle.Height); - Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition + (direction * 20f * CalamityUtils.Convert01To010((Timer - (MaxTime / 5f)) / (MaxTime / 5f))); + Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition; - spriteBatch.Draw(handle, drawOffset + displace, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + spriteBatch.Draw(handle, drawOffset + thrustDisplace, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); //Turn on additive blending spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); //Update the parameters + drawOrigin = new Vector2(0f, 114f); - drawOffset = Owner.Center + (drawAngle.ToRotationVector2() * 28f * projectile.scale) - Main.screenPosition + (direction * 20f * CalamityUtils.Convert01To010((Timer - (MaxTime / 5f)) / (MaxTime / 5f))); + drawOffset = Owner.Center + (direction * 28f * projectile.scale) - Main.screenPosition; //Anim stuff Rectangle frameRectangle = new Rectangle(0, 0 + (116 * projectile.frame), 114, 114); - spriteBatch.Draw(tex, drawOffset + displace, frameRectangle, lightColor * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + spriteBatch.Draw(tex, drawOffset + thrustDisplace, frameRectangle, lightColor * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); //Back to normal spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); @@ -994,11 +1056,11 @@ namespace CalamityMod.Items.Weapons.Melee public override void Kill(int timeLeft) { Main.PlaySound(SoundID.NPCHit43, projectile.Center); - if (ShredRatio > 0.5 && Owner.whoAmI == Main.myPlayer) - { - Projectile.NewProjectile(projectile.Center, direction * 16f, ProjectileType(), projectile.damage, projectile.knockBack, Owner.whoAmI, Shred); + //if (ShredRatio > 0.5 && Owner.whoAmI == Main.myPlayer) //Keep this for the True biome blade/Repaired biome blade. + //{ + // Projectile.NewProjectile(projectile.Center, direction * 16f, ProjectileType(), projectile.damage, projectile.knockBack, Owner.whoAmI, Shred); //sharticles - } + //} } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) @@ -1053,7 +1115,7 @@ namespace CalamityMod.Items.Weapons.Melee } - public class AridGrandeurShot : ModProjectile + public class AridGrandeurShot : ModProjectile //Only use this for the upgrade actually lol { public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeurExtra"; private bool initialized = false; From 4c30f3b64f7c7d1ddb1d17bac38003215441235b Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sat, 1 Jan 2022 13:50:15 +0100 Subject: [PATCH 05/76] Broken Broken Biome Blade becomes Legendary Broken Biome Blade --- Items/Weapons/Melee/BiomeBlade.cs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index e3946bd1af..0e3e71ecd0 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -136,14 +136,6 @@ namespace CalamityMod.Items.Weapons.Melee recipe.AddRecipe(); } - public override void MeleeEffects(Player player, Rectangle hitbox) - { - if (Main.rand.NextBool(5)) - { - int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 0); - } - } - public override bool AltFunctionUse(Player player) => true; public override bool CloneNewInstances => true; @@ -157,6 +149,9 @@ namespace CalamityMod.Items.Weapons.Melee (clone as BiomeBlade).mainAttunement = (item.modItem as BiomeBlade).mainAttunement; (clone as BiomeBlade).secondaryAttunement = (item.modItem as BiomeBlade).secondaryAttunement; + //As funny as a Broken Broken Biome Blade would be, its also quite funny to make it turn into that. This is only done for a new instance of the item since the goblin tinkerer changes prevent it from happening through reforging + if (clone.item.prefix == PrefixID.Broken) + clone.item.prefix = PrefixID.Legendary; return clone; } From 2277c5140a947a72d65f3d1299016dda41faee5e Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sat, 1 Jan 2022 14:36:15 +0100 Subject: [PATCH 06/76] oops fix --- Items/Weapons/Melee/BiomeBlade.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index 0e3e71ecd0..408af8fe2e 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -149,9 +149,12 @@ namespace CalamityMod.Items.Weapons.Melee (clone as BiomeBlade).mainAttunement = (item.modItem as BiomeBlade).mainAttunement; (clone as BiomeBlade).secondaryAttunement = (item.modItem as BiomeBlade).secondaryAttunement; + //As funny as a Broken Broken Biome Blade would be, its also quite funny to make it turn into that. This is only done for a new instance of the item since the goblin tinkerer changes prevent it from happening through reforging - if (clone.item.prefix == PrefixID.Broken) - clone.item.prefix = PrefixID.Legendary; + if (clone.item.prefix == PrefixID.Broken) + { + clone.item.Prefix(PrefixID.Legendary); + } return clone; } @@ -312,7 +315,6 @@ namespace CalamityMod.Items.Weapons.Melee public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) { - // I want to strangle somebody. Texture2D itemTexture = Main.itemTexture[item.type]; Rectangle itemFrame = (Main.itemAnimations[item.type] == null) ? itemTexture.Frame() : Main.itemAnimations[item.type].GetFrame(itemTexture); From 29dcc63d140f0cfa436cce9c50db145ab327e775 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sun, 2 Jan 2022 17:25:12 +0100 Subject: [PATCH 07/76] Whip start --- Items/Weapons/Melee/BiomeBlade.cs | 301 ++++++++++++++++-- Items/Weapons/Melee/TrueBiomeBlade.png | Bin 1080 -> 1607 bytes ...rokenBiomeBlade_GrovetendersTouchBlade.png | Bin 0 -> 1024 bytes ...rokenBiomeBlade_GrovetendersTouchChain.png | Bin 0 -> 253 bytes ...BrokenBiomeBlade_GrovetendersTouchGlow.png | Bin 0 -> 597 bytes 5 files changed, 267 insertions(+), 34 deletions(-) create mode 100644 Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchBlade.png create mode 100644 Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchChain.png create mode 100644 Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchGlow.png diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index 408af8fe2e..175981fae8 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -116,6 +116,7 @@ namespace CalamityMod.Items.Weapons.Melee item.useTime = 30; item.useTurn = true; item.useStyle = ItemUseStyleID.SwingThrow; + item.shoot = ProjectileID.PurificationPowder; // item.knockBack = 5f; item.autoReuse = true; item.value = Item.buyPrice(0, 4, 0, 0); @@ -154,6 +155,7 @@ namespace CalamityMod.Items.Weapons.Melee if (clone.item.prefix == PrefixID.Broken) { clone.item.Prefix(PrefixID.Legendary); + clone.item.prefix = PrefixID.Legendary; } return clone; @@ -173,6 +175,10 @@ namespace CalamityMod.Items.Weapons.Melee public override void HoldItem(Player player) { + + if (player.velocity.Y == 0) //Reset the lunge ability on ground contact + CanLunge = 1; + //Change the swords function based on its attunement switch (mainAttunement) { @@ -208,6 +214,15 @@ namespace CalamityMod.Items.Weapons.Melee item.noMelee = true; break; case Attunement.Tropical: + item.channel = false; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.SwingThrow; + item.shoot = ProjectileType(); + item.shootSpeed = 30; + item.UseSound = null; + item.noMelee = true; + + Combo = 0; break; case Attunement.Evil: item.channel = false; @@ -219,58 +234,60 @@ namespace CalamityMod.Items.Weapons.Melee item.noMelee = true; Combo = 0; - if (player.velocity.Y == 0) //Reset the lunge ability on ground contact - CanLunge = 1; break; default: item.noUseGraphic = false; item.useStyle = ItemUseStyleID.SwingThrow; - item.shoot = 0; + item.shoot = ProjectileID.PurificationPowder; item.shootSpeed = 12f; item.UseSound = SoundID.Item1; Combo = 0; break; } - - if (player.altFunctionUse == 2) - { - if (Main.projectile.Any(n => n.active && n.type == ProjectileType() && n.owner == player.whoAmI)) - return; - if (!player.StandingStill()) //Swap attunements - { - if (secondaryAttunement == null) //Don't let the player swap to an empty attunement - return; - Projectile.NewProjectile(player.position, Vector2.Zero, ProjectileType(), 0, 0, player.whoAmI, 0f); - Attunement? temporaryAttunementStorage = mainAttunement; - mainAttunement = secondaryAttunement; - secondaryAttunement = temporaryAttunementStorage; - if (player.whoAmI == Main.myPlayer) - Main.PlaySound(SoundID.DD2_DarkMageHealImpact); - } - - else //Chargeup - { - if (player.mount.Active) - return; - Vector2 displace = new Vector2((player.direction >= 0 ? 2 : -1) * 20f, 0); - Projectile.NewProjectile(player.position + displace, Vector2.Zero, ProjectileType(), 0, 0, player.whoAmI, 1f); - if (player.whoAmI == Main.myPlayer) - Main.PlaySound(SoundID.DD2_DarkMageHealImpact); - } - } - - } + public override bool CanUseItem(Player player) { return !Main.projectile.Any(n => n.active && n.owner == player.whoAmI && - (n.type == ProjectileType())); + (n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType())); } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { if (player.altFunctionUse == 2) + { + if (Main.projectile.Any(n => n.active && n.type == ProjectileType() && n.owner == player.whoAmI)) + return false; + + if (!player.StandingStill()) //Swap attunements + { + if (secondaryAttunement == null) //Don't let the player swap to an empty attunement + return false; + + Projectile.NewProjectile(player.position, Vector2.Zero, ProjectileType(), 0, 0, player.whoAmI, 0f); + Attunement? temporaryAttunementStorage = mainAttunement; + mainAttunement = secondaryAttunement; + secondaryAttunement = temporaryAttunementStorage; + if (player.whoAmI == Main.myPlayer) + { + Main.PlaySound(SoundID.DD2_DarkMageHealImpact); + } + } + + else //Chargeup + { + if (player.mount.Active) + return false; + Vector2 displace = new Vector2((player.direction >= 0 ? 2 : -1) * 20f, 0); + Projectile.NewProjectile(player.position + displace, Vector2.Zero, ProjectileType(), 0, 0, player.whoAmI, 1f); + if (player.whoAmI == Main.myPlayer) + Main.PlaySound(SoundID.DD2_DarkMageHealImpact); + } + return false; + } + + if (mainAttunement == null) return false; switch (mainAttunement) @@ -294,6 +311,7 @@ namespace CalamityMod.Items.Weapons.Melee if (Combo > 2) Combo = 0; return false; + case Attunement.Evil: Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage*2, knockBack, player.whoAmI, 26, (float) CanLunge); CanLunge = 0; @@ -973,7 +991,10 @@ namespace CalamityMod.Items.Weapons.Melee Owner.velocity = -direction.SafeNormalize(Vector2.Zero) * pogoStrenght; //Bounce Owner.fallStart = (int)(Owner.position.Y / 16f); PogoCooldown = 30; //Cooldown - Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.position); + Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.position); + + if (Owner.HeldItem.type == ItemType()) + (Owner.HeldItem.modItem as BiomeBlade).CanLunge = 1; // Reset the lunge counter on pogo. This should make for more interesting and fun synergies } } @@ -1203,6 +1224,218 @@ namespace CalamityMod.Items.Weapons.Melee } + public class GrovetendersTouch : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchBlade"; + private bool initialized = false; + + Vector2 direction = Vector2.Zero; + public Player Owner => Main.player[projectile.owner]; + + public float MaxTime = 60; + public float Timer => MaxTime - projectile.timeLeft; + public ref float HasSnapped => ref projectile.ai[0]; + public ref float SnapCoyoteTime => ref projectile.ai[1]; + + const int coyoteTimeFrames = 6; //How many frames does the whip stay extended + + public BezierCurve curve; + private Vector2 controlPoint1; + private Vector2 controlPoint2; + + const int MaxReach = 400; + const float SnappingPoint = 0.7f; //When does the snap occur. + internal bool ReelingBack => Timer / MaxTime > SnappingPoint; + + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Grovetender's Touch"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 36; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 16; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + float bladeLenght = 84 * projectile.scale; + float bladeWidth = 76 * projectile.scale; + + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center, Owner.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); + } + + public override void AI() + { + if (!initialized) //Initialization. create control points & shit) + { + projectile.velocity = Owner.DirectionTo(Main.MouseWorld); + Main.PlaySound(SoundID.DD2_OgreSpit, projectile.Center); + controlPoint1 = projectile.Center; + controlPoint2 = projectile.Center; + projectile.timeLeft = (int)MaxTime; + initialized = true; + } + + if (ReelingBack && HasSnapped == 0f) //Snap & also small coyote time for the hook + { + Main.PlaySound(SoundID.Item41, projectile.Center); //Snap + HasSnapped = 1f; + SnapCoyoteTime = coyoteTimeFrames; + } + + if (SnapCoyoteTime > 0) //keep checking for the tile hook + { + HookToTile(); + SnapCoyoteTime --; + } + + + + projectile.rotation = projectile.AngleFrom(Owner.Center); //Point away from playah + + float ratio = GetSwingRatio(); + projectile.Center = Owner.MountedCenter + SwingPosition(ratio); + projectile.direction = projectile.spriteDirection = -Owner.direction; + + MessWithTiles(); + + Owner.itemRotation = MathHelper.WrapAngle(Owner.AngleTo(Main.MouseWorld) - (Owner.direction < 0 ? MathHelper.Pi : 0)); + } + public void HookToTile() + { + if (Main.myPlayer == Owner.whoAmI) + { + //Shmoove the player + if (Collision.SolidCollision(projectile.position, 32, 32)) + { + if (Owner.velocity.Length() != 0) + { + Owner.velocity *= 1.2f; + Owner.velocity = (Owner.velocity.SafeNormalize(Vector2.Zero) * 0.5f * Owner.velocity.Length()) + (Owner.DirectionTo(projectile.Center) * 0.5f * Owner.velocity.Length()); + } + else + { + Owner.velocity = Owner.DirectionTo(projectile.Center) * 15; + } + } + Main.PlaySound(SoundID.Item65, projectile.position); + } + } + + public void MessWithTiles() + { + //FLowers and gras s . + } + + internal float EaseInFunction(float progress) => progress == 0 ? 0f : (float)Math.Pow(2, 10 * progress - 10); //Potion seller i need your strongest easeIns + + private float GetSwingRatio() + { + float ratio = (Timer - SnappingPoint * MaxTime) / (MaxTime * (1 - SnappingPoint)); //The ratio for the last section of the snap is a new curve. + if (!ReelingBack) + ratio = EaseInFunction(Timer / (MaxTime * SnappingPoint)); //Watch this ratio get eased + if (SnapCoyoteTime > 0) + ratio = 0f; + return ratio; + } + + private Vector2 SwingPosition(float progress) + { + //Whip windup and snap part + if (!ReelingBack) + { + float distance = MaxReach * MathHelper.Lerp((float)Math.Sin(progress * MathHelper.PiOver2), 1, 0.04f); //half arc + distance = Math.Max(distance, 65); //Dont be too close to player + + float angleDeviation = MathHelper.Pi / 1.2f; + float angleOffset = Owner.direction * MathHelper.Lerp(-angleDeviation, 0, progress); //Go from very angled to straight at the zenith of the attack + return projectile.velocity.RotatedBy(angleOffset) * distance; + } + else + { + float distance = MathHelper.Lerp(MaxReach, 0f, progress); //Quickly zip back to the player . No angles or minimum distance from player. + return projectile.velocity * distance; + } + } + + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (Timer == 0) + return false; + Texture2D handle = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchBlade"); + Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchGlow"); + + Vector2 projBottom = projectile.Center + new Vector2(-handle.Width/ 2, handle.Height / 2).RotatedBy(projectile.rotation + MathHelper.PiOver4) * 0.75f; + DrawChain(spriteBatch, projBottom, out Vector2[] chainPositions); + + float drawRotation = (projBottom - chainPositions[chainPositions.Length - 2]).ToRotation() + MathHelper.PiOver4; //Face away from the last point of the bezier curve + + Vector2 drawOrigin = new Vector2(0f, handle.Height); + SpriteEffects flip = (projectile.spriteDirection < 0) ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + lightColor = Lighting.GetColor((int)(projectile.Center.X / 16f), (int)(projectile.Center.Y / 16f)); + + spriteBatch.Draw(handle, projBottom - Main.screenPosition, null, lightColor, drawRotation, drawOrigin, projectile.scale, flip, 0f); + + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Only update the origin for once + drawOrigin = new Vector2(0f, blade.Height); + spriteBatch.Draw(blade, projBottom - Main.screenPosition, null, lightColor * 0.9f, drawRotation, drawOrigin, projectile.scale, flip, 0f); + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + private void DrawChain(SpriteBatch spriteBatch, Vector2 projBottom, out Vector2[] chainPositions) + { + Texture2D chainTex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchChain"); + + float ratio = GetSwingRatio(); + + if (!ReelingBack) //Make the curve be formed from points slightly ahead of the projectile, but clamped to the max rotation (straight line ahead) + { + controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Clamp(ratio + 0.5f, 0f, 1f)) * 0.5f; + controlPoint2 = Owner.MountedCenter + SwingPosition(MathHelper.Clamp(ratio + 0.2f, 0f, 1f)) * 0.5f; + } + else //After the whip snaps, make the curve be a wave + { + Vector2 perpendicular = SwingPosition(ratio).SafeNormalize(Vector2.Zero).RotatedBy(MathHelper.PiOver2); + controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Lerp( 1f, 0f, ratio/2)) + perpendicular * ratio * -95f; + controlPoint2 = Owner.MountedCenter + SwingPosition(MathHelper.Lerp(1f, 0f, ratio / 3)) + perpendicular * ratio * 40f; + } + + BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, projBottom }); + int numPoints = 30; //"Should make dynamic based on curve length, but I'm not sure how to smoothly do that while using a bezier curve" -Graydee, from the code i referenced. I do agree. + chainPositions = curve.GetPoints(numPoints).ToArray(); + + //Draw each chain segment bar the very first one + for (int i = 1; i < numPoints; i++) + { + Vector2 position = chainPositions[i]; + float rotation = (chainPositions[i] - chainPositions[i - 1]).ToRotation() - MathHelper.PiOver2; //Calculate rotation based on direction from last point + float yScale = Vector2.Distance(chainPositions[i], chainPositions[i - 1]) / chainTex.Height; //Calculate how much to squash/stretch for smooth chain based on distance between points + Vector2 scale = new Vector2(1, yScale); + Color chainLightColor = Lighting.GetColor((int)position.X / 16, (int)position.Y / 16); //Lighting of the position of the chain segment + if (ReelingBack) + chainLightColor *= 1 - EaseInFunction(ratio); //Make the chain fade when reeling it back + Vector2 origin = new Vector2(chainTex.Width / 2, chainTex.Height); //Draw from center bottom of texture + spriteBatch.Draw(chainTex, position - Main.screenPosition, null, chainLightColor, rotation, origin, scale, SpriteEffects.None, 0); + } + } + } } diff --git a/Items/Weapons/Melee/TrueBiomeBlade.png b/Items/Weapons/Melee/TrueBiomeBlade.png index 0d870cd122d5068b8ed698a3a0bf68cd0269f36d..c9cc25a15789034c3fb106bf6dc8e597a5a12767 100644 GIT binary patch literal 1607 zcmV-N2Dtf&P)Px*0ZBwbRCt{2n{7;$RUE*7kHGbUc&`jW2|>{*zLeVVg5a*kanuWz7|4FJePw43Kvd34t42F5vCMxqt4?x%Z+d zTrTbWzFeO3oaf=d^V|RbKj%3YES8aQCVBv4P3h)mwBzaCQ~*4lX#lh|-3X3!{giPU z*Q90A8zM$z&hlvO9e;OgCKN8813-RmPSpFHI&mJbhD0!F4G}XWM)Y*`1tDyLAV%aY z%?04xso%8o)fbxqm^C}Y0c%JElg^NLH*N&r){;U1F4Wx6%vif+6#z3Ie-?o9{riEi z2|{aK8vyx>?sEVJ2UWjO!uXdldPG!Pq%@C|11`{4bZfC}D1zPnN5NU=Ok>*Nr0Mgy+Px6h@48a;= zFkyz6bw(^RPHZdHt}|nX&>I*6MsI|PHN+t9hU{Ls5`cl3nW`aFfl8er*`(&gQ2;Lc zrveb{?9}cvoJ~@usBAKDYfQ#x4KawDA!5eVteF5b*VY9ARz0^XYX9?xkA;3xhAhoV z1K{+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3Wd^pscGTefckyWai)Y&=#DcE2B@X6%bV zu4qFY#>q@8D~aG{rXQ1&i7j^ty|DBtkohY=p`ksWzngG~2@N&`g4Ow9pZRWYOQK$3 zsyKp?zM%;_o;n)ZF>@vuD+!tyjPgNVZMYA$jJ9SWT_46?S{fW1OFm3A^nG^+C_L5) zPIvZB+9y+p(CyPcuRnYptSKu4N21>n_wDN1khUBc12Zx|BpRw-wHWl=%Fo}rJn_Dx z>G*vOD0d0P_Ug89bNsaRd=`oVFzu&8I-CjV$dgqVpLyk~WO;0D-8aDO1?3UkxNzm3 z1Ij%@ZPkx~bb26yh6~MEShgXI_2j{znVqvYfPF{9&U~yhsfn)ktDs?RU820B>1!}l z5l|nWayxa+bB&3edEOJvi3;5(0-=pZXC}%o6$ef9%?TomcXupUl zc$VFcvijv=AL(ccXHRccn91C+Y2hAI8lt7VH@H*`g=o1vI5%!$!v6&KOD49QBNRQo uaLt5kKU#b>g6nh6fU^hxn*rqPx#w@E}nR49>^k+BMbU=)SFKa-G_NQ$BtsGudN*=TZTs+a0b9NU`2T5IzOA{xS= zArc`&8!m!v{%5)O!o44dd(>n@p`4Q1T@=7GlDS4j)!noQz}~zAFki~;$6kVPy7D>$jp00000NkvXXu0mjf D!BAw3 literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchGlow.png b/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..252f0bd13776ffbf3e5016c9d40e8f0191258790 GIT binary patch literal 597 zcmV-b0;>IqP)Px%4@pEpRA_4_*1|@e2^Gx74Z=Xwu%pI96psLA|_GR-?5g6d)5MQjr3L z(DK!l3`+MHOvVKbK!x^YvHfv)s+w z4i8{}>b^s(p0^Lp@`idZUJ#-8^LE~04USN` zAr_w$O8K9Wea0!gPZiW}a{ALLFCi2ih&Cub+ckTpUatu0G;!bYC4?FWj80MHY{#o$ zX6v6%!Z+Tw5<(UErwjuC%H4Y!_9@S6eQ9un7JirGlLI0bAAWn7KhtsPNY-+>KkDYC z!4c|nl?!^x#Z5iv-=k)PQme)OHG?D6``dQKQ#D=fe*pllU+q1rd~tQwqxU|W)7_zX jNF)-8L?V$$wBh;(Qf}i{)2>d!00000NkvXXu0mjfNi_(d literal 0 HcmV?d00001 From e93b522082b52f8f2fcf0fa9c0ad87b926887f29 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sun, 2 Jan 2022 20:53:48 +0100 Subject: [PATCH 08/76] More extraupdates to avoid missing the enemy & other tweaks --- Items/Weapons/Melee/BiomeBlade.cs | 117 ++++++++++++++++++++++-------- 1 file changed, 87 insertions(+), 30 deletions(-) diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index 175981fae8..6c74bc4454 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -1231,20 +1231,23 @@ namespace CalamityMod.Items.Weapons.Melee Vector2 direction = Vector2.Zero; public Player Owner => Main.player[projectile.owner]; - - public float MaxTime = 60; public float Timer => MaxTime - projectile.timeLeft; public ref float HasSnapped => ref projectile.ai[0]; public ref float SnapCoyoteTime => ref projectile.ai[1]; - const int coyoteTimeFrames = 6; //How many frames does the whip stay extended + const float MaxTime = 90; + const int coyoteTimeFrames = 15; //How many frames does the whip stay extended + const int MaxReach = 400; + const float SnappingPoint = 0.7f; //When does the snap occur. + const float ReelBackStrenght = 14f; + const float ChainDamageReduction = 0.5f; + public BezierCurve curve; private Vector2 controlPoint1; private Vector2 controlPoint2; - const int MaxReach = 400; - const float SnappingPoint = 0.7f; //When does the snap occur. + internal bool ReelingBack => Timer / MaxTime > SnappingPoint; @@ -1259,18 +1262,41 @@ namespace CalamityMod.Items.Weapons.Melee projectile.tileCollide = false; projectile.friendly = true; projectile.penetrate = -1; - projectile.extraUpdates = 1; + projectile.extraUpdates = 2; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 16; + projectile.localNPCHitCooldown = 30; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { - float collisionPoint = 0f; - float bladeLenght = 84 * projectile.scale; - float bladeWidth = 76 * projectile.scale; + BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, projectile.Center }); - return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center, Owner.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); + int numPoints = 32; + Vector2[] chainPositions = curve.GetPoints(numPoints).ToArray(); + float collisionPoint = 0; + for (int i = 1; i < numPoints; i++) + { + Vector2 position = chainPositions[i]; + Vector2 previousPosition = chainPositions[i - 1]; + if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), position, previousPosition, 6, ref collisionPoint)) + return true; + } + return base.Colliding(projHitbox, targetHitbox); + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + base.ModifyHitNPC(target, ref damage, ref knockback, ref crit, ref hitDirection); + Vector2 projectileHalfLenght = (projectile.Size / 2f) * projectile.rotation.ToRotationVector2(); + float collisionPoint = 0; + //If you hit the enemy during the coyote time with the blade of the whip, guarantee a crit + if (Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), projectile.Center - projectileHalfLenght, projectile.Center + projectileHalfLenght, 32, ref collisionPoint)) + { + if (SnapCoyoteTime > 0f) + crit = true; + } + else + damage = (int)(damage * ChainDamageReduction); //If the enemy is hit with the chain of the whip, the damage gets reduced } public override void AI() @@ -1298,15 +1324,14 @@ namespace CalamityMod.Items.Weapons.Melee SnapCoyoteTime --; } - - + Owner.direction = Math.Sign(projectile.velocity.X); projectile.rotation = projectile.AngleFrom(Owner.Center); //Point away from playah float ratio = GetSwingRatio(); projectile.Center = Owner.MountedCenter + SwingPosition(ratio); projectile.direction = projectile.spriteDirection = -Owner.direction; - MessWithTiles(); + MessWithTiles(); //This is quite the headache for something mostly visual. If someone else wants to do it, or has any idea on how to force a tile to update itself it would be aprpeciated Owner.itemRotation = MathHelper.WrapAngle(Owner.AngleTo(Main.MouseWorld) - (Owner.direction < 0 ? MathHelper.Pi : 0)); } @@ -1314,18 +1339,11 @@ namespace CalamityMod.Items.Weapons.Melee { if (Main.myPlayer == Owner.whoAmI) { - //Shmoove the player - if (Collision.SolidCollision(projectile.position, 32, 32)) + //Shmoove the player if a tile is hit. This movement always happens if the owner isnt on the ground, but will only happen if the projectile is above the player if they are standing on the ground) + if (Collision.SolidCollision(projectile.position, 32, 32) && (Owner.velocity.Y != 0 || projectile.position.Y < Owner.position.Y) ) { - if (Owner.velocity.Length() != 0) - { - Owner.velocity *= 1.2f; - Owner.velocity = (Owner.velocity.SafeNormalize(Vector2.Zero) * 0.5f * Owner.velocity.Length()) + (Owner.DirectionTo(projectile.Center) * 0.5f * Owner.velocity.Length()); - } - else - { - Owner.velocity = Owner.DirectionTo(projectile.Center) * 15; - } + Owner.velocity = Owner.DirectionTo(projectile.Center) * ReelBackStrenght; + SnapCoyoteTime = 0f; } Main.PlaySound(SoundID.Item65, projectile.position); } @@ -1333,7 +1351,45 @@ namespace CalamityMod.Items.Weapons.Melee public void MessWithTiles() { - //FLowers and gras s . + BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, projectile.Center }); + int numPoints = 30; + Vector2[] chainPositions = curve.GetPoints(numPoints).ToArray(); + + for (int i = 0; i < numPoints; i++) + { + Vector2 position = chainPositions[i]; + Tile targetTile = Main.tile[(int)position.X / 16, (int)position.Y / 16]; //Grab the tile + + if ((targetTile.type != TileID.Dirt && targetTile.type != TileID.Mud) || !targetTile.active()) + continue; + + if (targetTile.type == TileID.Dirt) + { + targetTile.active(true); + targetTile.type = TileID.Grass; + + if (Owner.ZoneCorrupt) + targetTile.type = TileID.CorruptGrass; + if (Owner.ZoneCrimson) + targetTile.type = TileID.FleshGrass; + if (Owner.ZoneHoly) + targetTile.type = TileID.HallowedGrass; + } + if (targetTile.type == TileID.Mud) + { + targetTile.active(true); + targetTile.type = TileID.JungleGrass; + if (Owner.ZoneGlowshroom) + { + targetTile.type = TileID.MushroomGrass; + } + } + + //SOMEHOW update the changed tile??? + + if (Main.netMode == NetmodeID.MultiplayerClient) + NetMessage.SendTileSquare(-1, (int)position.X / 16, (int)position.Y / 16, 1, TileChangeType.None); + } } internal float EaseInFunction(float progress) => progress == 0 ? 0f : (float)Math.Pow(2, 10 * progress - 10); //Potion seller i need your strongest easeIns @@ -1367,7 +1423,6 @@ namespace CalamityMod.Items.Weapons.Melee } } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { if (Timer == 0) @@ -1379,9 +1434,11 @@ namespace CalamityMod.Items.Weapons.Melee DrawChain(spriteBatch, projBottom, out Vector2[] chainPositions); float drawRotation = (projBottom - chainPositions[chainPositions.Length - 2]).ToRotation() + MathHelper.PiOver4; //Face away from the last point of the bezier curve + drawRotation += SnapCoyoteTime > 0 ? MathHelper.Pi : 0; //During coyote time the blade flips for some reason. Prevent that from happening + drawRotation += projectile.spriteDirection < 0 ? 0f : 0f; Vector2 drawOrigin = new Vector2(0f, handle.Height); - SpriteEffects flip = (projectile.spriteDirection < 0) ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + SpriteEffects flip = (projectile.spriteDirection < 0) ? SpriteEffects.None : SpriteEffects.None; lightColor = Lighting.GetColor((int)(projectile.Center.X / 16f), (int)(projectile.Center.Y / 16f)); spriteBatch.Draw(handle, projBottom - Main.screenPosition, null, lightColor, drawRotation, drawOrigin, projectile.scale, flip, 0f); @@ -1413,8 +1470,8 @@ namespace CalamityMod.Items.Weapons.Melee else //After the whip snaps, make the curve be a wave { Vector2 perpendicular = SwingPosition(ratio).SafeNormalize(Vector2.Zero).RotatedBy(MathHelper.PiOver2); - controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Lerp( 1f, 0f, ratio/2)) + perpendicular * ratio * -95f; - controlPoint2 = Owner.MountedCenter + SwingPosition(MathHelper.Lerp(1f, 0f, ratio / 3)) + perpendicular * ratio * 40f; + controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Lerp(ratio, 1f, ratio)) + perpendicular * MathHelper.SmoothStep(0f, 1f, ratio) * -155f; + controlPoint2 = Owner.MountedCenter + SwingPosition(MathHelper.Lerp(ratio, 1f, ratio/2)) + perpendicular * MathHelper.SmoothStep(0f, 1f, ratio) * 100f; } BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, projBottom }); From d84db8fd3c2a2c075dfc8aed53b9d53c9af3c69c Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Mon, 3 Jan 2022 02:34:22 +0100 Subject: [PATCH 09/76] Split the projectiles into their own (singular) file (trolled) --- Items/Weapons/Melee/BiomeBlade.cs | 1012 --------------- .../Melee/BrokenBiomeBladeProjectiles.cs | 1089 +++++++++++++++++ 2 files changed, 1089 insertions(+), 1012 deletions(-) create mode 100644 Projectiles/Melee/BrokenBiomeBladeProjectiles.cs diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index 6c74bc4454..fc51c5de30 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -481,1018 +481,6 @@ namespace CalamityMod.Items.Weapons.Melee } } - public class PurityProjection : ModProjectile //The boring plain one - { - private int dustType = 3; - - public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_PurityProjection"; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Purity Projection"); - ProjectileID.Sets.TrailCacheLength[projectile.type] = 2; - ProjectileID.Sets.TrailingMode[projectile.type] = 0; - } - - public override void SetDefaults() - { - projectile.width = projectile.height = 32; - projectile.aiStyle = 27; - aiType = ProjectileID.LightBeam; - projectile.friendly = true; - projectile.penetrate = 1; - projectile.timeLeft = 100; - projectile.melee = true; - projectile.tileCollide = false; - } - - public override void AI() //Dust doesnt look great - { - if (projectile.timeLeft < 95) - projectile.tileCollide = true; - int dustParticle = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0f, 0f, 100, default, 0.9f); - Main.dust[dustParticle].noGravity = true; - Main.dust[dustParticle].velocity *= 0.5f; - Main.dust[dustParticle].velocity += projectile.velocity * 0.1f; - } - - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - if (projectile.timeLeft > 295) - return false; - - CalamityUtils.DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1); - return false; - } - - public override void Kill(int timeLeft) - { - //Explode into dust or whatever, - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - int debuffTime = 90; - target.AddBuff(ModContent.BuffType(), debuffTime); - } - } - - public class DecaysRetort : ModProjectile - { - public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort"; - private bool initialized = false; - Vector2 direction = Vector2.Zero; - public ref float MaxTime => ref projectile.ai[0]; - public ref float CanLunge => ref projectile.ai[1]; - public float Timer => MaxTime - projectile.timeLeft; - public Player Owner => Main.player[projectile.owner]; - public const float LungeSpeed = 16; - public ref float CanBounce => ref projectile.localAI[0]; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Decay's retort"); - } - public override void SetDefaults() - { - projectile.melee = true; - projectile.width = projectile.height = 84; - projectile.width = projectile.height = 84; - projectile.tileCollide = false; - projectile.friendly = true; - projectile.penetrate = -1; - projectile.extraUpdates = 1; - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - float collisionPoint = 0f; - float bladeLenght = 120f * projectile.scale; - Vector2 displace = direction * ((float)Math.Sin(Timer / MaxTime * 3.14f) * 60); - - return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center + displace, Owner.Center + displace + (direction * bladeLenght), 24, ref collisionPoint); - } - - public override void AI() - { - if (!initialized) //Initialization - { - CanBounce = 1f; - projectile.timeLeft = (int)MaxTime; - //Take the direction the sword is swung. FUCK not controlling the swing direction more than just left/right :| - //The direction to mouseworld may need to be turned into the custom synced player mouse variables . not on the branch currently tho - direction = Owner.DirectionTo(Main.MouseWorld); - direction.Normalize(); - projectile.rotation = direction.ToRotation(); - if (CanLunge == 1f) - Lunge(); - Main.PlaySound(SoundID.Item103, projectile.Center); - initialized = true; - } - - //Manage position and rotation - projectile.scale = 1f + ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 0.6f); //SWAGGER - projectile.Center = Owner.Center + (direction * ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 60)); - - //Make the owner look like theyre holding the sword bla bla - Owner.heldProj = projectile.whoAmI; - Owner.direction = Math.Sign(direction.X); - Owner.itemRotation = direction.ToRotation(); - if (Owner.direction != 1) - { - Owner.itemRotation -= 3.14f; - } - Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); - } - - public void Lunge() - { - if (Main.myPlayer != projectile.owner) - return; - //Check if the owner is on the ground - Owner.velocity = direction.SafeNormalize(Vector2.UnitX * Owner.direction) * LungeSpeed; - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => OnHitEffects(!target.canGhostHeal || Main.player[projectile.owner].moonLeech); - public override void OnHitPvp(Player target, int damage, bool crit) => OnHitEffects(Main.player[projectile.owner].moonLeech); - - private void OnHitEffects(bool cannotLifesteal) - { - if (!cannotLifesteal) //trolled - { - Owner.statLife += 3; - Owner.HealEffect(3); //Idk if its too much or what but at the same time its close range as fuck - } - if (Main.myPlayer != Owner.whoAmI || CanBounce == 0f) - return; - // Bounce off - float bounceStrength = Math.Max((LungeSpeed / 2f), Owner.velocity.Length()); - bounceStrength *= Owner.velocity.Y == 0 ? 0.2f : 1f; //Reduce the bounce if the player is on the ground - Owner.velocity = -direction.SafeNormalize(Vector2.Zero) * MathHelper.Clamp(bounceStrength, 0f, 22f); - CanBounce = 0f; - Owner.GiveIFrames(10); // 10 i frames for free! - } - - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/BiomeBlade"); - Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort"); - - float drawAngle = direction.ToRotation(); - float drawRotation = drawAngle + MathHelper.PiOver4; - - Vector2 displace = direction * ((float)Math.Sin(Timer / MaxTime * 3.14f) * 60); - Vector2 drawOrigin = new Vector2(0f, handle.Height); - Vector2 drawOffset = Owner.Center + direction * 10f - Main.screenPosition; - - spriteBatch.Draw(handle, drawOffset + displace, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - - //Turn on additive blending - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - //Update the parameters - drawOrigin = new Vector2(0f, tex.Height); - drawOffset = Owner.Center + (drawAngle.ToRotationVector2() * 24f * projectile.scale) - Main.screenPosition; - - spriteBatch.Draw(tex, drawOffset + displace, null, lightColor * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - //Back to normal - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - return false; - } - - } - - public class BitingEmbrace : ModProjectile - { - public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_BitingEmbraceSmall"; - - private bool initialized = false; - Vector2 direction = Vector2.Zero; - public float rotation; - public ref float SwingMode => ref projectile.ai[0]; //0 = Up-Down small slash, 1 = Down-Up large slash, 2 = Thrust - public ref float MaxTime => ref projectile.ai[1]; - public float Timer => MaxTime - projectile.timeLeft; - - //Animation key constants - public const float anticipationTime = 0.2f; //Get ready to thrust - public const float thrustBurstTime = 0.15f; //Thrust in a quick burst - public const float heldDownTime = 0.35f; //Remain extended - public float retractTime => 1f - anticipationTime - thrustBurstTime - heldDownTime; //Retract. Its simply all the time left from the other stuff - - - public int SwingDirection - { - get - { - switch (SwingMode) - { - case 0: - return -1 * Math.Sign(direction.X); - case 1: - return 1 * Math.Sign(direction.X); - default: - return 0; - - } - } - } - public float SwingWidth - { - get - { - switch (SwingMode) - { - case 0: - return 2.3f; - default: - return 1.8f; - } - } - } - - public Player Owner => Main.player[projectile.owner]; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Biting Embrace"); - Main.projFrames[projectile.type] = 6; //The true trolling is that we only really use this for the third swing. - } - public override void SetDefaults() - { - projectile.melee = true; - projectile.width = projectile.height = 75; - projectile.width = projectile.height = 75; - projectile.tileCollide = false; - projectile.friendly = true; - projectile.penetrate = -1; - projectile.extraUpdates = 1; - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - //The hitbox is simplified into a line collision. - float collisionPoint = 0f; - float bladeLenght = 0f; - Vector2 displace = Vector2.Zero; - switch (SwingMode) - { - case 0: - bladeLenght = 90f * projectile.scale; - break; - case 1: - bladeLenght = 110f * projectile.scale; - break; - case 2: - bladeLenght = projectile.frame <= 2 ? 85f : 150f; //Only use the extended hitbox after the blade actually extends. For realism. - bladeLenght *= projectile.scale; - displace = direction * ThrustDisplaceRatio() * 60f; - break; - - } - return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center + displace, Owner.Center + displace +(rotation.ToRotationVector2() * bladeLenght), 24, ref collisionPoint); - } - - public override void AI() - { - if (!initialized) //Initialization - { - projectile.timeLeft = (int)MaxTime; - switch (SwingMode) - { - case 0: - projectile.width = projectile.height = 100; - Main.PlaySound(SoundID.DD2_MonkStaffSwing, projectile.Center); - projectile.damage = (int)(projectile.damage * 1.5); - break; - case 1: - projectile.width = projectile.height = 140; - Main.PlaySound(SoundID.DD2_OgreSpit, projectile.Center); - projectile.damage = (int)(projectile.damage * 1.8); - break; - case 2: - projectile.width = projectile.height = 130; - Main.PlaySound(SoundID.DD2_PhantomPhoenixShot, projectile.Center); - projectile.damage *= 3; - break; - } - - //Take the direction the sword is swung. FUCK not controlling the swing direction more than just left/right :| - //The direction to mouseworld may need to be turned into the custom synced player mouse variables . not on the branch currently tho - direction = Owner.DirectionTo(Main.MouseWorld); - direction.Normalize(); - projectile.rotation = direction.ToRotation(); - - initialized = true; - } - //Manage position and rotation - projectile.Center = Owner.Center + (direction * 30); - //rotation = projectile.rotation + MathHelper.SmoothStep(SwingWidth / 2 * SwingDirection, -SwingWidth / 2 * SwingDirection, Timer / MaxTime); - float factor = 1 - (float)Math.Pow((double)-(Timer / MaxTime) + 1, 2d); - rotation = projectile.rotation + MathHelper.Lerp(SwingWidth / 2 * SwingDirection, -SwingWidth / 2 * SwingDirection, factor); - projectile.scale = 1f + ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 0.6f); //SWAGGER - - //Add the thrust motion & animation for the third combo state - if (SwingMode == 2) - { - projectile.scale = 1f + (ThrustScaleRatio() * 0.6f); - projectile.Center = Owner.Center + (direction * ThrustDisplaceRatio() * 60); - - projectile.frameCounter++; - if (projectile.frameCounter % 5 == 0 && projectile.frame + 1 < Main.projFrames[projectile.type]) - projectile.frame++; - - } - - //Make the owner look like theyre holding the sword bla bla - Owner.heldProj = projectile.whoAmI; - Owner.direction = Math.Sign(rotation.ToRotationVector2().X); - Owner.itemRotation = rotation; - if (Owner.direction != 1) - { - Owner.itemRotation -= 3.14f; - } - Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); - } - - internal float ThrustDisplaceRatio() - { - float linearRatio = (Timer / MaxTime); //How far along the animation are you - float ratio; //L + Ratio - float displaceRatio = 1f; - - if (linearRatio <= anticipationTime) //Anticipation phase. A small bump in the negatives - { - ratio = MathHelper.Lerp(0f, 1f, linearRatio / anticipationTime); //Turn that mf into a workable 0 - 1 range - displaceRatio = (float)(Math.Sin(ratio * MathHelper.Pi) * -0.15f); - } - else if (linearRatio <= anticipationTime + thrustBurstTime) //Burst phase. Quickly step into almost a full ratio - { - ratio = linearRatio - anticipationTime; - ratio = MathHelper.Lerp(0f, 1f, ratio / thrustBurstTime); //Turn that mf into a workable 0 - 1 range - displaceRatio = MathHelper.SmoothStep(0f, 0.9f, ratio); - } - else if (linearRatio <= anticipationTime + thrustBurstTime + heldDownTime) //Holding down phase. Small bump up to reach a full ratio and then start going down - { - ratio = linearRatio - anticipationTime - thrustBurstTime; - ratio = MathHelper.Lerp(0f, 1f, ratio / heldDownTime); //Turn that mf into a workable 0 - 1 range - displaceRatio = 0.9f + (float)(Math.Sin(ratio * MathHelper.Pi) * 0.1f); - } - else //Retraction phase. Smooth step back to 0 - { - ratio = linearRatio - (1f - retractTime); - ratio = MathHelper.Lerp(0f, 1f, ratio / retractTime); //Turn that mf into a workable 0 - 1 range - displaceRatio = MathHelper.SmoothStep(0.9f, 0, ratio); - } - - return displaceRatio; - } - - //The ratio rapidly increases from 0 to 1 (reaches 1 at the midway point of the anticipation.). It remains at 1 for the rest of the thrust, and then decreases down to 0 at the midway point of the retraction) - internal float ThrustScaleRatio() - { - float linearRatio = (Timer / MaxTime); //How far along the animation are you - float ratio; //L + Ratio - float scaleRatio = 1f; - - if (linearRatio <= anticipationTime / 2f) //Growth phase - { - ratio = MathHelper.Lerp(0f, 1f, linearRatio / (anticipationTime / 2f)); //Turn that mf into a workable 0 - 1 range - scaleRatio = (float)(1f - Math.Exp(-ratio + 1)); - } - if (linearRatio >= 1f - retractTime / 2f) //Retract phase - { - ratio = linearRatio - (1f - retractTime / 2f); - ratio = MathHelper.Lerp(0f, 1f, ratio / (retractTime / 2f)); //Turn that mf into a workable 0 - 1 range - scaleRatio = (float)(1f - Math.Exp(ratio)); - } - - return scaleRatio; - } - - internal float PrimitiveWidthFunction(float completionRatio) - { - var tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace" + (SwingMode == 0 ? "Small" : "Big")); - return Vector2.Distance(Vector2.Zero, tex.Size()); - } - - internal Color PrimitiveColorFunction(float completionRatio) - { - float opacity = Utils.InverseLerp(0.8f, 0.52f, completionRatio, true) * Utils.InverseLerp(1f, 0.81f, Timer/MaxTime, true); - Color startingColor = Color.White; - Color endingColor = Color.Lerp(Color.DarkCyan, Color.DarkBlue, 0.77f); - return Color.Lerp(startingColor, endingColor, (float)Math.Pow(completionRatio, 0.37f)) * opacity; - } - - - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - - - Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/BiomeBlade"); - - if (SwingMode != 2) - { - Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace" + (SwingMode == 0 ? "Small" : "Big")); - float drawAngle = rotation; - float drawRotation = rotation + MathHelper.PiOver4; - Vector2 drawOrigin = new Vector2(0f, handle.Height); - Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition; - - spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - //Turn on additive blending - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - //Update the parameters - drawOrigin = new Vector2(0f, tex.Height); - drawOffset = Owner.Center + (drawAngle.ToRotationVector2() * 28f * projectile.scale)- Main.screenPosition; - spriteBatch.Draw(tex, drawOffset, null, lightColor * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - //Back to normal - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - } - else - { - Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_BitingEmbraceThrust"); - Vector2 thrustDisplace = direction * (ThrustDisplaceRatio() * 60); - - float drawAngle = rotation; - float drawRotation = rotation + MathHelper.PiOver4; - Vector2 drawOrigin = new Vector2(0f, handle.Height); - Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition; - - spriteBatch.Draw(handle, drawOffset + thrustDisplace, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - //Turn on additive blending - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - //Update the parameters - - drawOrigin = new Vector2(0f, 114f); - drawOffset = Owner.Center + (direction * 28f * projectile.scale) - Main.screenPosition; - //Anim stuff - Rectangle frameRectangle = new Rectangle(0, 0 + (116 * projectile.frame), 114, 114); - - spriteBatch.Draw(tex, drawOffset + thrustDisplace, frameRectangle, lightColor * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - //Back to normal - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - } - - return false; - } - - } - - public class AridGrandeur : ModProjectile - { - public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur"; - private bool initialized = false; - Vector2 direction = Vector2.Zero; - public ref float Shred => ref projectile.ai[0]; //How much the attack is, attacking - public float ShredRatio => MathHelper.Clamp(Shred / (maxShred * 0.5f), 0f, 1f); - public ref float PogoCooldown => ref projectile.ai[1]; //Cooldown for the pogo - public Player Owner => Main.player[projectile.owner]; - public bool CanPogo => Owner.velocity.Y != 0 && PogoCooldown <= 0; //Only pogo when in the air and if the cooldown is zero - private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; - - public const float pogoStrenght = 16f; //How much the player gets pogoed up - public const float maxShred = 500; //How much shred you get - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Arid Grandeur"); - } - public override void SetDefaults() - { - projectile.melee = true; - projectile.width = projectile.height = 70; - projectile.tileCollide = false; - projectile.friendly = true; - projectile.penetrate = -1; - projectile.extraUpdates = 1; - projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 16; - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - float collisionPoint = 0f; - float bladeLenght = 84 * projectile.scale; - float bladeWidth = 76 * projectile.scale; - - return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center, Owner.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); - } - - public void Pogo() - { - if (CanPogo && Main.myPlayer == Owner.whoAmI) - { - Owner.velocity = -direction.SafeNormalize(Vector2.Zero) * pogoStrenght; //Bounce - Owner.fallStart = (int)(Owner.position.Y / 16f); - PogoCooldown = 30; //Cooldown - Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.position); - - if (Owner.HeldItem.type == ItemType()) - (Owner.HeldItem.modItem as BiomeBlade).CanLunge = 1; // Reset the lunge counter on pogo. This should make for more interesting and fun synergies - } - } - - public override void AI() - { - if (!initialized) //Initialization. Here its litterally just playing a sound tho lmfao - { - Main.PlaySound(SoundID.Item90, projectile.Center); - initialized = true; - } - - if (!OwnerCanShoot) - { - projectile.Kill(); - return; - } - - - if (Shred >= maxShred) - Shred = maxShred; - if (Shred < 0) - Shred = 0; - - //Manage position and rotation - direction = Owner.DirectionTo(Main.MouseWorld); - direction.Normalize(); - projectile.rotation = direction.ToRotation(); - projectile.Center = Owner.Center + (direction * 60); - - //Scaling based on shred - projectile.localNPCHitCooldown = 16 - (int)(MathHelper.Lerp(0, 8, ShredRatio)); //Increase the hit frequency - projectile.scale = 1f + (ShredRatio * 1f); //SWAGGER - - - if (Collision.SolidCollision(Owner.Center + (direction * 84 * projectile.scale) - Vector2.One*5f , 10, 10)) - { - Pogo(); - } - - //Make the owner look like theyre holding the sword bla bla - Owner.heldProj = projectile.whoAmI; - Owner.direction = Math.Sign(direction.X); - Owner.itemRotation = direction.ToRotation(); - if (Owner.direction != 1) - { - Owner.itemRotation -= 3.14f; - } - Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); - Owner.itemTime = 2; - Owner.itemAnimation = 2; - - Shred--; - PogoCooldown--; - projectile.timeLeft = 2; - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => ShredTarget(target); - public override void OnHitPvp(Player target, int damage, bool crit) => ShredTarget(target); - - private void ShredTarget(Entity target) - { - Main.PlaySound(SoundID.NPCHit30, projectile.Center); //Sizzle - Shred += 62; //Augment the shredspeed - if (Main.myPlayer != Owner.whoAmI) - return; - // get lifted up - if (PogoCooldown <= 0) - { - if (Owner.velocity.Y > 0) - Owner.velocity.Y = -2f ; //Get "stuck" into the enemy partly - - Owner.GiveIFrames(5); // i framez. Do 5 iframes even matter? idk but you get a lot of em so lol... - PogoCooldown = 20; - } - } - - public override void Kill(int timeLeft) - { - Main.PlaySound(SoundID.NPCHit43, projectile.Center); - //if (ShredRatio > 0.5 && Owner.whoAmI == Main.myPlayer) //Keep this for the True biome blade/Repaired biome blade. - //{ - // Projectile.NewProjectile(projectile.Center, direction * 16f, ProjectileType(), projectile.damage, projectile.knockBack, Owner.whoAmI, Shred); - //sharticles - //} - } - - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/BiomeBlade"); - Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur"); - - int bladeAmount = 4; - - float drawAngle = direction.ToRotation(); - float drawRotation = drawAngle + MathHelper.PiOver4; - - Vector2 drawOrigin = new Vector2(0f, handle.Height); - Vector2 drawOffset = Owner.Center + direction * 10f - Main.screenPosition; - - spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - - //Turn on additive blending - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - //Update the parameters - drawOrigin = new Vector2(0f, tex.Height); - drawOffset = Owner.Center + (drawAngle.ToRotationVector2() * 32f * projectile.scale) - Main.screenPosition; - - spriteBatch.Draw(tex, drawOffset, null, lightColor * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - - - for (int i = 0; i < bladeAmount; i++) //Draw extra copies - { - tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeurExtra"); - - drawAngle = direction.ToRotation(); - - float circleCompletion = (float)Math.Sin(Main.GlobalTime * 5 + i * MathHelper.PiOver2); - drawRotation = drawAngle + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi/7f) * ShredRatio); - - drawOrigin = new Vector2(0f, tex.Height); - - - Vector2 drawOffsetStraight = Owner.Center + direction * (float)Math.Sin(Main.GlobalTime*7)*10 - Main.screenPosition; //How far from the player - Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly - - spriteBatch.Draw(tex, drawOffsetStraight + drawDisplacementAngle, null, lightColor * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - } - - //Back to normal - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - return false; - } - - } - - public class AridGrandeurShot : ModProjectile //Only use this for the upgrade actually lol - { - public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeurExtra"; - private bool initialized = false; - Vector2 direction = Vector2.Zero; - public ref float Shred => ref projectile.ai[0]; - public float ShredRatio => MathHelper.Clamp(Shred / (maxShred * 0.5f), 0f, 1f); - public Player Owner => Main.player[projectile.owner]; - - public const float pogoStrenght = 16f; //How much the player gets pogoed up - public const float maxShred = 500; //How much shred you get - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Arid Shredder"); - } - public override void SetDefaults() - { - projectile.melee = true; - projectile.width = projectile.height = 70; - projectile.tileCollide = false; - projectile.friendly = true; - projectile.penetrate = -1; - projectile.extraUpdates = 1; - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - float collisionPoint = 0f; - float bladeLenght = 84 * projectile.scale; - float bladeWidth = 76 * projectile.scale; - - return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center - direction * bladeLenght / 2, projectile.Center + direction * bladeLenght / 2, bladeWidth, ref collisionPoint); - } - - public override void AI() - { - if (!initialized) - { - Main.PlaySound(SoundID.Item90, projectile.Center); - projectile.timeLeft = (int)(30f + ShredRatio * 30f); - initialized = true; - - direction = Owner.DirectionTo(Main.MouseWorld); - direction.Normalize(); - projectile.rotation = direction.ToRotation(); - - projectile.velocity = direction * 6f; - projectile.damage *= 10; - - projectile.scale = 1f + (ShredRatio * 1f); //SWAGGER - projectile.netUpdate = true; - - } - - projectile.position += projectile.velocity; - - } - - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - for (int i = 0; i < 4; i++) //Draw extra copies - { - var tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeurExtra"); - - float drawAngle = direction.ToRotation(); - - float circleCompletion = (float)Math.Sin(Main.GlobalTime * 5 + i * MathHelper.PiOver2); - float drawRotation = drawAngle + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi / 7f) * ShredRatio); - - Vector2 drawOrigin = new Vector2(0f, tex.Height); - - - Vector2 drawOffsetStraight = projectile.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10 - Main.screenPosition; //How far from the player - Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly - - spriteBatch.Draw(tex, drawOffsetStraight + drawDisplacementAngle, null, lightColor * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - } - - //Back to normal - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - return false; - } - - } - - public class GrovetendersTouch : ModProjectile - { - public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchBlade"; - private bool initialized = false; - - Vector2 direction = Vector2.Zero; - public Player Owner => Main.player[projectile.owner]; - public float Timer => MaxTime - projectile.timeLeft; - public ref float HasSnapped => ref projectile.ai[0]; - public ref float SnapCoyoteTime => ref projectile.ai[1]; - - const float MaxTime = 90; - const int coyoteTimeFrames = 15; //How many frames does the whip stay extended - const int MaxReach = 400; - const float SnappingPoint = 0.7f; //When does the snap occur. - const float ReelBackStrenght = 14f; - const float ChainDamageReduction = 0.5f; - - - public BezierCurve curve; - private Vector2 controlPoint1; - private Vector2 controlPoint2; - - - internal bool ReelingBack => Timer / MaxTime > SnappingPoint; - - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Grovetender's Touch"); - } - public override void SetDefaults() - { - projectile.melee = true; - projectile.width = projectile.height = 36; - projectile.tileCollide = false; - projectile.friendly = true; - projectile.penetrate = -1; - projectile.extraUpdates = 2; - projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 30; - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, projectile.Center }); - - int numPoints = 32; - Vector2[] chainPositions = curve.GetPoints(numPoints).ToArray(); - float collisionPoint = 0; - for (int i = 1; i < numPoints; i++) - { - Vector2 position = chainPositions[i]; - Vector2 previousPosition = chainPositions[i - 1]; - if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), position, previousPosition, 6, ref collisionPoint)) - return true; - } - return base.Colliding(projHitbox, targetHitbox); - } - - public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - base.ModifyHitNPC(target, ref damage, ref knockback, ref crit, ref hitDirection); - Vector2 projectileHalfLenght = (projectile.Size / 2f) * projectile.rotation.ToRotationVector2(); - float collisionPoint = 0; - //If you hit the enemy during the coyote time with the blade of the whip, guarantee a crit - if (Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), projectile.Center - projectileHalfLenght, projectile.Center + projectileHalfLenght, 32, ref collisionPoint)) - { - if (SnapCoyoteTime > 0f) - crit = true; - } - else - damage = (int)(damage * ChainDamageReduction); //If the enemy is hit with the chain of the whip, the damage gets reduced - } - - public override void AI() - { - if (!initialized) //Initialization. create control points & shit) - { - projectile.velocity = Owner.DirectionTo(Main.MouseWorld); - Main.PlaySound(SoundID.DD2_OgreSpit, projectile.Center); - controlPoint1 = projectile.Center; - controlPoint2 = projectile.Center; - projectile.timeLeft = (int)MaxTime; - initialized = true; - } - - if (ReelingBack && HasSnapped == 0f) //Snap & also small coyote time for the hook - { - Main.PlaySound(SoundID.Item41, projectile.Center); //Snap - HasSnapped = 1f; - SnapCoyoteTime = coyoteTimeFrames; - } - - if (SnapCoyoteTime > 0) //keep checking for the tile hook - { - HookToTile(); - SnapCoyoteTime --; - } - - Owner.direction = Math.Sign(projectile.velocity.X); - projectile.rotation = projectile.AngleFrom(Owner.Center); //Point away from playah - - float ratio = GetSwingRatio(); - projectile.Center = Owner.MountedCenter + SwingPosition(ratio); - projectile.direction = projectile.spriteDirection = -Owner.direction; - - MessWithTiles(); //This is quite the headache for something mostly visual. If someone else wants to do it, or has any idea on how to force a tile to update itself it would be aprpeciated - - Owner.itemRotation = MathHelper.WrapAngle(Owner.AngleTo(Main.MouseWorld) - (Owner.direction < 0 ? MathHelper.Pi : 0)); - } - public void HookToTile() - { - if (Main.myPlayer == Owner.whoAmI) - { - //Shmoove the player if a tile is hit. This movement always happens if the owner isnt on the ground, but will only happen if the projectile is above the player if they are standing on the ground) - if (Collision.SolidCollision(projectile.position, 32, 32) && (Owner.velocity.Y != 0 || projectile.position.Y < Owner.position.Y) ) - { - Owner.velocity = Owner.DirectionTo(projectile.Center) * ReelBackStrenght; - SnapCoyoteTime = 0f; - } - Main.PlaySound(SoundID.Item65, projectile.position); - } - } - - public void MessWithTiles() - { - BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, projectile.Center }); - int numPoints = 30; - Vector2[] chainPositions = curve.GetPoints(numPoints).ToArray(); - - for (int i = 0; i < numPoints; i++) - { - Vector2 position = chainPositions[i]; - Tile targetTile = Main.tile[(int)position.X / 16, (int)position.Y / 16]; //Grab the tile - - if ((targetTile.type != TileID.Dirt && targetTile.type != TileID.Mud) || !targetTile.active()) - continue; - - if (targetTile.type == TileID.Dirt) - { - targetTile.active(true); - targetTile.type = TileID.Grass; - - if (Owner.ZoneCorrupt) - targetTile.type = TileID.CorruptGrass; - if (Owner.ZoneCrimson) - targetTile.type = TileID.FleshGrass; - if (Owner.ZoneHoly) - targetTile.type = TileID.HallowedGrass; - } - if (targetTile.type == TileID.Mud) - { - targetTile.active(true); - targetTile.type = TileID.JungleGrass; - if (Owner.ZoneGlowshroom) - { - targetTile.type = TileID.MushroomGrass; - } - } - - //SOMEHOW update the changed tile??? - - if (Main.netMode == NetmodeID.MultiplayerClient) - NetMessage.SendTileSquare(-1, (int)position.X / 16, (int)position.Y / 16, 1, TileChangeType.None); - } - } - - internal float EaseInFunction(float progress) => progress == 0 ? 0f : (float)Math.Pow(2, 10 * progress - 10); //Potion seller i need your strongest easeIns - - private float GetSwingRatio() - { - float ratio = (Timer - SnappingPoint * MaxTime) / (MaxTime * (1 - SnappingPoint)); //The ratio for the last section of the snap is a new curve. - if (!ReelingBack) - ratio = EaseInFunction(Timer / (MaxTime * SnappingPoint)); //Watch this ratio get eased - if (SnapCoyoteTime > 0) - ratio = 0f; - return ratio; - } - - private Vector2 SwingPosition(float progress) - { - //Whip windup and snap part - if (!ReelingBack) - { - float distance = MaxReach * MathHelper.Lerp((float)Math.Sin(progress * MathHelper.PiOver2), 1, 0.04f); //half arc - distance = Math.Max(distance, 65); //Dont be too close to player - - float angleDeviation = MathHelper.Pi / 1.2f; - float angleOffset = Owner.direction * MathHelper.Lerp(-angleDeviation, 0, progress); //Go from very angled to straight at the zenith of the attack - return projectile.velocity.RotatedBy(angleOffset) * distance; - } - else - { - float distance = MathHelper.Lerp(MaxReach, 0f, progress); //Quickly zip back to the player . No angles or minimum distance from player. - return projectile.velocity * distance; - } - } - - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - if (Timer == 0) - return false; - Texture2D handle = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchBlade"); - Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchGlow"); - - Vector2 projBottom = projectile.Center + new Vector2(-handle.Width/ 2, handle.Height / 2).RotatedBy(projectile.rotation + MathHelper.PiOver4) * 0.75f; - DrawChain(spriteBatch, projBottom, out Vector2[] chainPositions); - - float drawRotation = (projBottom - chainPositions[chainPositions.Length - 2]).ToRotation() + MathHelper.PiOver4; //Face away from the last point of the bezier curve - drawRotation += SnapCoyoteTime > 0 ? MathHelper.Pi : 0; //During coyote time the blade flips for some reason. Prevent that from happening - drawRotation += projectile.spriteDirection < 0 ? 0f : 0f; - - Vector2 drawOrigin = new Vector2(0f, handle.Height); - SpriteEffects flip = (projectile.spriteDirection < 0) ? SpriteEffects.None : SpriteEffects.None; - lightColor = Lighting.GetColor((int)(projectile.Center.X / 16f), (int)(projectile.Center.Y / 16f)); - - spriteBatch.Draw(handle, projBottom - Main.screenPosition, null, lightColor, drawRotation, drawOrigin, projectile.scale, flip, 0f); - - //Turn on additive blending - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - //Only update the origin for once - drawOrigin = new Vector2(0f, blade.Height); - spriteBatch.Draw(blade, projBottom - Main.screenPosition, null, lightColor * 0.9f, drawRotation, drawOrigin, projectile.scale, flip, 0f); - //Back to normal - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - return false; - } - - private void DrawChain(SpriteBatch spriteBatch, Vector2 projBottom, out Vector2[] chainPositions) - { - Texture2D chainTex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchChain"); - - float ratio = GetSwingRatio(); - - if (!ReelingBack) //Make the curve be formed from points slightly ahead of the projectile, but clamped to the max rotation (straight line ahead) - { - controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Clamp(ratio + 0.5f, 0f, 1f)) * 0.5f; - controlPoint2 = Owner.MountedCenter + SwingPosition(MathHelper.Clamp(ratio + 0.2f, 0f, 1f)) * 0.5f; - } - else //After the whip snaps, make the curve be a wave - { - Vector2 perpendicular = SwingPosition(ratio).SafeNormalize(Vector2.Zero).RotatedBy(MathHelper.PiOver2); - controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Lerp(ratio, 1f, ratio)) + perpendicular * MathHelper.SmoothStep(0f, 1f, ratio) * -155f; - controlPoint2 = Owner.MountedCenter + SwingPosition(MathHelper.Lerp(ratio, 1f, ratio/2)) + perpendicular * MathHelper.SmoothStep(0f, 1f, ratio) * 100f; - } - - BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, projBottom }); - int numPoints = 30; //"Should make dynamic based on curve length, but I'm not sure how to smoothly do that while using a bezier curve" -Graydee, from the code i referenced. I do agree. - chainPositions = curve.GetPoints(numPoints).ToArray(); - - //Draw each chain segment bar the very first one - for (int i = 1; i < numPoints; i++) - { - Vector2 position = chainPositions[i]; - float rotation = (chainPositions[i] - chainPositions[i - 1]).ToRotation() - MathHelper.PiOver2; //Calculate rotation based on direction from last point - float yScale = Vector2.Distance(chainPositions[i], chainPositions[i - 1]) / chainTex.Height; //Calculate how much to squash/stretch for smooth chain based on distance between points - Vector2 scale = new Vector2(1, yScale); - Color chainLightColor = Lighting.GetColor((int)position.X / 16, (int)position.Y / 16); //Lighting of the position of the chain segment - if (ReelingBack) - chainLightColor *= 1 - EaseInFunction(ratio); //Make the chain fade when reeling it back - Vector2 origin = new Vector2(chainTex.Width / 2, chainTex.Height); //Draw from center bottom of texture - spriteBatch.Draw(chainTex, position - Main.screenPosition, null, chainLightColor, rotation, origin, scale, SpriteEffects.None, 0); - } - } - } } diff --git a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs new file mode 100644 index 0000000000..508c578d9b --- /dev/null +++ b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs @@ -0,0 +1,1089 @@ +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.CalPlayer; +using CalamityMod.DataStructures; +using CalamityMod.Particles; +using CalamityMod.Items.Weapons.Melee; +using Terraria.Graphics.Shaders; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using static Terraria.ModLoader.ModContent; + +namespace CalamityMod.Projectiles.Melee +{ + public class PurityProjection : ModProjectile //The boring plain one + { + private int dustType = 3; + + public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_PurityProjection"; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Purity Projection"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 2; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void SetDefaults() + { + projectile.width = projectile.height = 32; + projectile.aiStyle = 27; + aiType = ProjectileID.LightBeam; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.timeLeft = 100; + projectile.melee = true; + projectile.tileCollide = false; + } + + public override void AI() //Dust doesnt look great + { + if (projectile.timeLeft < 95) + projectile.tileCollide = true; + int dustParticle = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0f, 0f, 100, default, 0.9f); + Main.dust[dustParticle].noGravity = true; + Main.dust[dustParticle].velocity *= 0.5f; + Main.dust[dustParticle].velocity += projectile.velocity * 0.1f; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (projectile.timeLeft > 295) + return false; + + CalamityUtils.DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1); + return false; + } + + public override void Kill(int timeLeft) + { + //Explode into dust or whatever, + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + int debuffTime = 90; + target.AddBuff(ModContent.BuffType(), debuffTime); + } + } + + public class DecaysRetort : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort"; + private bool initialized = false; + Vector2 direction = Vector2.Zero; + public ref float MaxTime => ref projectile.ai[0]; + public ref float CanLunge => ref projectile.ai[1]; + public float Timer => MaxTime - projectile.timeLeft; + public Player Owner => Main.player[projectile.owner]; + public const float LungeSpeed = 16; + public ref float CanBounce => ref projectile.localAI[0]; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Decay's retort"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 84; + projectile.width = projectile.height = 84; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + float bladeLenght = 120f * projectile.scale; + Vector2 displace = direction * ((float)Math.Sin(Timer / MaxTime * 3.14f) * 60); + + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center + displace, Owner.Center + displace + (direction * bladeLenght), 24, ref collisionPoint); + } + + public override void AI() + { + if (!initialized) //Initialization + { + CanBounce = 1f; + projectile.timeLeft = (int)MaxTime; + //Take the direction the sword is swung. FUCK not controlling the swing direction more than just left/right :| + //The direction to mouseworld may need to be turned into the custom synced player mouse variables . not on the branch currently tho + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + projectile.rotation = direction.ToRotation(); + if (CanLunge == 1f) + Lunge(); + Main.PlaySound(SoundID.Item103, projectile.Center); + initialized = true; + } + + //Manage position and rotation + projectile.scale = 1f + ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 0.6f); //SWAGGER + projectile.Center = Owner.Center + (direction * ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 60)); + + //Make the owner look like theyre holding the sword bla bla + Owner.heldProj = projectile.whoAmI; + Owner.direction = Math.Sign(direction.X); + Owner.itemRotation = direction.ToRotation(); + if (Owner.direction != 1) + { + Owner.itemRotation -= 3.14f; + } + Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); + } + + public void Lunge() + { + if (Main.myPlayer != projectile.owner) + return; + //Check if the owner is on the ground + Owner.velocity = direction.SafeNormalize(Vector2.UnitX * Owner.direction) * LungeSpeed; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => OnHitEffects(!target.canGhostHeal || Main.player[projectile.owner].moonLeech); + public override void OnHitPvp(Player target, int damage, bool crit) => OnHitEffects(Main.player[projectile.owner].moonLeech); + + private void OnHitEffects(bool cannotLifesteal) + { + if (!cannotLifesteal) //trolled + { + Owner.statLife += 3; + Owner.HealEffect(3); //Idk if its too much or what but at the same time its close range as fuck + } + if (Main.myPlayer != Owner.whoAmI || CanBounce == 0f) + return; + // Bounce off + float bounceStrength = Math.Max((LungeSpeed / 2f), Owner.velocity.Length()); + bounceStrength *= Owner.velocity.Y == 0 ? 0.2f : 1f; //Reduce the bounce if the player is on the ground + Owner.velocity = -direction.SafeNormalize(Vector2.Zero) * MathHelper.Clamp(bounceStrength, 0f, 22f); + CanBounce = 0f; + Owner.GiveIFrames(10); // 10 i frames for free! + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/BiomeBlade"); + Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort"); + + float drawAngle = direction.ToRotation(); + float drawRotation = drawAngle + MathHelper.PiOver4; + + Vector2 displace = direction * ((float)Math.Sin(Timer / MaxTime * 3.14f) * 60); + Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOffset = Owner.Center + direction * 10f - Main.screenPosition; + + spriteBatch.Draw(handle, drawOffset + displace, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Update the parameters + drawOrigin = new Vector2(0f, tex.Height); + drawOffset = Owner.Center + (drawAngle.ToRotationVector2() * 24f * projectile.scale) - Main.screenPosition; + + spriteBatch.Draw(tex, drawOffset + displace, null, lightColor * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + } + + public class BitingEmbrace : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_BitingEmbraceSmall"; + + private bool initialized = false; + Vector2 direction = Vector2.Zero; + public float rotation; + public ref float SwingMode => ref projectile.ai[0]; //0 = Up-Down small slash, 1 = Down-Up large slash, 2 = Thrust + public ref float MaxTime => ref projectile.ai[1]; + public float Timer => MaxTime - projectile.timeLeft; + + //Animation key constants + public const float anticipationTime = 0.2f; //Get ready to thrust + public const float thrustBurstTime = 0.15f; //Thrust in a quick burst + public const float heldDownTime = 0.35f; //Remain extended + public float retractTime => 1f - anticipationTime - thrustBurstTime - heldDownTime; //Retract. Its simply all the time left from the other stuff + + + public int SwingDirection + { + get + { + switch (SwingMode) + { + case 0: + return -1 * Math.Sign(direction.X); + case 1: + return 1 * Math.Sign(direction.X); + default: + return 0; + + } + } + } + public float SwingWidth + { + get + { + switch (SwingMode) + { + case 0: + return 2.3f; + default: + return 1.8f; + } + } + } + + public Player Owner => Main.player[projectile.owner]; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Biting Embrace"); + Main.projFrames[projectile.type] = 6; //The true trolling is that we only really use this for the third swing. + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 75; + projectile.width = projectile.height = 75; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + //The hitbox is simplified into a line collision. + float collisionPoint = 0f; + float bladeLenght = 0f; + Vector2 displace = Vector2.Zero; + switch (SwingMode) + { + case 0: + bladeLenght = 90f * projectile.scale; + break; + case 1: + bladeLenght = 110f * projectile.scale; + break; + case 2: + bladeLenght = projectile.frame <= 2 ? 85f : 150f; //Only use the extended hitbox after the blade actually extends. For realism. + bladeLenght *= projectile.scale; + displace = direction * ThrustDisplaceRatio() * 60f; + break; + + } + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center + displace, Owner.Center + displace + (rotation.ToRotationVector2() * bladeLenght), 24, ref collisionPoint); + } + + public override void AI() + { + if (!initialized) //Initialization + { + projectile.timeLeft = (int)MaxTime; + switch (SwingMode) + { + case 0: + projectile.width = projectile.height = 100; + Main.PlaySound(SoundID.DD2_MonkStaffSwing, projectile.Center); + projectile.damage = (int)(projectile.damage * 1.5); + break; + case 1: + projectile.width = projectile.height = 140; + Main.PlaySound(SoundID.DD2_OgreSpit, projectile.Center); + projectile.damage = (int)(projectile.damage * 1.8); + break; + case 2: + projectile.width = projectile.height = 130; + Main.PlaySound(SoundID.DD2_PhantomPhoenixShot, projectile.Center); + projectile.damage *= 3; + break; + } + + //Take the direction the sword is swung. FUCK not controlling the swing direction more than just left/right :| + //The direction to mouseworld may need to be turned into the custom synced player mouse variables . not on the branch currently tho + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + projectile.rotation = direction.ToRotation(); + + initialized = true; + } + //Manage position and rotation + projectile.Center = Owner.Center + (direction * 30); + //rotation = projectile.rotation + MathHelper.SmoothStep(SwingWidth / 2 * SwingDirection, -SwingWidth / 2 * SwingDirection, Timer / MaxTime); + float factor = 1 - (float)Math.Pow((double)-(Timer / MaxTime) + 1, 2d); + rotation = projectile.rotation + MathHelper.Lerp(SwingWidth / 2 * SwingDirection, -SwingWidth / 2 * SwingDirection, factor); + projectile.scale = 1f + ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 0.6f); //SWAGGER + + //Add the thrust motion & animation for the third combo state + if (SwingMode == 2) + { + projectile.scale = 1f + (ThrustScaleRatio() * 0.6f); + projectile.Center = Owner.Center + (direction * ThrustDisplaceRatio() * 60); + + projectile.frameCounter++; + if (projectile.frameCounter % 5 == 0 && projectile.frame + 1 < Main.projFrames[projectile.type]) + projectile.frame++; + + } + + //Make the owner look like theyre holding the sword bla bla + Owner.heldProj = projectile.whoAmI; + Owner.direction = Math.Sign(rotation.ToRotationVector2().X); + Owner.itemRotation = rotation; + if (Owner.direction != 1) + { + Owner.itemRotation -= 3.14f; + } + Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); + } + + internal float ThrustDisplaceRatio() + { + float linearRatio = (Timer / MaxTime); //How far along the animation are you + float ratio; //L + Ratio + float displaceRatio = 1f; + + if (linearRatio <= anticipationTime) //Anticipation phase. A small bump in the negatives + { + ratio = MathHelper.Lerp(0f, 1f, linearRatio / anticipationTime); //Turn that mf into a workable 0 - 1 range + displaceRatio = (float)(Math.Sin(ratio * MathHelper.Pi) * -0.15f); + } + else if (linearRatio <= anticipationTime + thrustBurstTime) //Burst phase. Quickly step into almost a full ratio + { + ratio = linearRatio - anticipationTime; + ratio = MathHelper.Lerp(0f, 1f, ratio / thrustBurstTime); //Turn that mf into a workable 0 - 1 range + displaceRatio = MathHelper.SmoothStep(0f, 0.9f, ratio); + } + else if (linearRatio <= anticipationTime + thrustBurstTime + heldDownTime) //Holding down phase. Small bump up to reach a full ratio and then start going down + { + ratio = linearRatio - anticipationTime - thrustBurstTime; + ratio = MathHelper.Lerp(0f, 1f, ratio / heldDownTime); //Turn that mf into a workable 0 - 1 range + displaceRatio = 0.9f + (float)(Math.Sin(ratio * MathHelper.Pi) * 0.1f); + } + else //Retraction phase. Smooth step back to 0 + { + ratio = linearRatio - (1f - retractTime); + ratio = MathHelper.Lerp(0f, 1f, ratio / retractTime); //Turn that mf into a workable 0 - 1 range + displaceRatio = MathHelper.SmoothStep(0.9f, 0, ratio); + } + + return displaceRatio; + } + + //The ratio rapidly increases from 0 to 1 (reaches 1 at the midway point of the anticipation.). It remains at 1 for the rest of the thrust, and then decreases down to 0 at the midway point of the retraction) + internal float ThrustScaleRatio() + { + float linearRatio = (Timer / MaxTime); //How far along the animation are you + float ratio; //L + Ratio + float scaleRatio = 1f; + + if (linearRatio <= anticipationTime / 2f) //Growth phase + { + ratio = MathHelper.Lerp(0f, 1f, linearRatio / (anticipationTime / 2f)); //Turn that mf into a workable 0 - 1 range + scaleRatio = (float)(1f - Math.Exp(-ratio + 1)); + } + if (linearRatio >= 1f - retractTime / 2f) //Retract phase + { + ratio = linearRatio - (1f - retractTime / 2f); + ratio = MathHelper.Lerp(0f, 1f, ratio / (retractTime / 2f)); //Turn that mf into a workable 0 - 1 range + scaleRatio = (float)(1f - Math.Exp(ratio)); + } + + return scaleRatio; + } + + internal float PrimitiveWidthFunction(float completionRatio) + { + var tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace" + (SwingMode == 0 ? "Small" : "Big")); + return Vector2.Distance(Vector2.Zero, tex.Size()); + } + + internal Color PrimitiveColorFunction(float completionRatio) + { + float opacity = Utils.InverseLerp(0.8f, 0.52f, completionRatio, true) * Utils.InverseLerp(1f, 0.81f, Timer / MaxTime, true); + Color startingColor = Color.White; + Color endingColor = Color.Lerp(Color.DarkCyan, Color.DarkBlue, 0.77f); + return Color.Lerp(startingColor, endingColor, (float)Math.Pow(completionRatio, 0.37f)) * opacity; + } + + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + + + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/BiomeBlade"); + + if (SwingMode != 2) + { + Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace" + (SwingMode == 0 ? "Small" : "Big")); + float drawAngle = rotation; + float drawRotation = rotation + MathHelper.PiOver4; + Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition; + + spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Update the parameters + drawOrigin = new Vector2(0f, tex.Height); + drawOffset = Owner.Center + (drawAngle.ToRotationVector2() * 28f * projectile.scale) - Main.screenPosition; + spriteBatch.Draw(tex, drawOffset, null, lightColor * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + } + else + { + Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_BitingEmbraceThrust"); + Vector2 thrustDisplace = direction * (ThrustDisplaceRatio() * 60); + + float drawAngle = rotation; + float drawRotation = rotation + MathHelper.PiOver4; + Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition; + + spriteBatch.Draw(handle, drawOffset + thrustDisplace, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Update the parameters + + drawOrigin = new Vector2(0f, 114f); + drawOffset = Owner.Center + (direction * 28f * projectile.scale) - Main.screenPosition; + //Anim stuff + Rectangle frameRectangle = new Rectangle(0, 0 + (116 * projectile.frame), 114, 114); + + spriteBatch.Draw(tex, drawOffset + thrustDisplace, frameRectangle, lightColor * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + } + + return false; + } + + } + + public class AridGrandeur : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur"; + private bool initialized = false; + Vector2 direction = Vector2.Zero; + public ref float Shred => ref projectile.ai[0]; //How much the attack is, attacking + public float ShredRatio => MathHelper.Clamp(Shred / (maxShred * 0.5f), 0f, 1f); + public ref float PogoCooldown => ref projectile.ai[1]; //Cooldown for the pogo + public Player Owner => Main.player[projectile.owner]; + public bool CanPogo => Owner.velocity.Y != 0 && PogoCooldown <= 0; //Only pogo when in the air and if the cooldown is zero + private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; + + public const float pogoStrenght = 16f; //How much the player gets pogoed up + public const float maxShred = 500; //How much shred you get + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Arid Grandeur"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 70; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 16; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + float bladeLenght = 84 * projectile.scale; + float bladeWidth = 76 * projectile.scale; + + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center, Owner.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); + } + + public void Pogo() + { + if (CanPogo && Main.myPlayer == Owner.whoAmI) + { + Owner.velocity = -direction.SafeNormalize(Vector2.Zero) * pogoStrenght; //Bounce + Owner.fallStart = (int)(Owner.position.Y / 16f); + PogoCooldown = 30; //Cooldown + Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.position); + + if (Owner.HeldItem.type == ItemType()) + (Owner.HeldItem.modItem as BiomeBlade).CanLunge = 1; // Reset the lunge counter on pogo. This should make for more interesting and fun synergies + } + } + + public override void AI() + { + if (!initialized) //Initialization. Here its litterally just playing a sound tho lmfao + { + Main.PlaySound(SoundID.Item90, projectile.Center); + initialized = true; + } + + if (!OwnerCanShoot) + { + projectile.Kill(); + return; + } + + + if (Shred >= maxShred) + Shred = maxShred; + if (Shred < 0) + Shred = 0; + + //Manage position and rotation + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + projectile.rotation = direction.ToRotation(); + projectile.Center = Owner.Center + (direction * 60); + + //Scaling based on shred + projectile.localNPCHitCooldown = 16 - (int)(MathHelper.Lerp(0, 8, ShredRatio)); //Increase the hit frequency + projectile.scale = 1f + (ShredRatio * 1f); //SWAGGER + + + if (Collision.SolidCollision(Owner.Center + (direction * 84 * projectile.scale) - Vector2.One * 5f, 10, 10)) + { + Pogo(); + } + + //Make the owner look like theyre holding the sword bla bla + Owner.heldProj = projectile.whoAmI; + Owner.direction = Math.Sign(direction.X); + Owner.itemRotation = direction.ToRotation(); + if (Owner.direction != 1) + { + Owner.itemRotation -= 3.14f; + } + Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); + Owner.itemTime = 2; + Owner.itemAnimation = 2; + + Shred--; + PogoCooldown--; + projectile.timeLeft = 2; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => ShredTarget(target); + public override void OnHitPvp(Player target, int damage, bool crit) => ShredTarget(target); + + private void ShredTarget(Entity target) + { + Main.PlaySound(SoundID.NPCHit30, projectile.Center); //Sizzle + Shred += 62; //Augment the shredspeed + if (Main.myPlayer != Owner.whoAmI) + return; + // get lifted up + if (PogoCooldown <= 0) + { + if (Owner.velocity.Y > 0) + Owner.velocity.Y = -2f; //Get "stuck" into the enemy partly + + Owner.GiveIFrames(5); // i framez. Do 5 iframes even matter? idk but you get a lot of em so lol... + PogoCooldown = 20; + } + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(SoundID.NPCHit43, projectile.Center); + //if (ShredRatio > 0.5 && Owner.whoAmI == Main.myPlayer) //Keep this for the True biome blade/Repaired biome blade. + //{ + // Projectile.NewProjectile(projectile.Center, direction * 16f, ProjectileType(), projectile.damage, projectile.knockBack, Owner.whoAmI, Shred); + //sharticles + //} + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/BiomeBlade"); + Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur"); + + int bladeAmount = 4; + + float drawAngle = direction.ToRotation(); + float drawRotation = drawAngle + MathHelper.PiOver4; + + Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOffset = Owner.Center + direction * 10f - Main.screenPosition; + + spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Update the parameters + drawOrigin = new Vector2(0f, tex.Height); + drawOffset = Owner.Center + (drawAngle.ToRotationVector2() * 32f * projectile.scale) - Main.screenPosition; + + spriteBatch.Draw(tex, drawOffset, null, lightColor * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + + for (int i = 0; i < bladeAmount; i++) //Draw extra copies + { + tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeurExtra"); + + drawAngle = direction.ToRotation(); + + float circleCompletion = (float)Math.Sin(Main.GlobalTime * 5 + i * MathHelper.PiOver2); + drawRotation = drawAngle + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi / 7f) * ShredRatio); + + drawOrigin = new Vector2(0f, tex.Height); + + + Vector2 drawOffsetStraight = Owner.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10 - Main.screenPosition; //How far from the player + Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly + + spriteBatch.Draw(tex, drawOffsetStraight + drawDisplacementAngle, null, lightColor * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + } + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + } + + public class AridGrandeurShot : ModProjectile //Only use this for the upgrade actually lol + { + public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeurExtra"; + private bool initialized = false; + Vector2 direction = Vector2.Zero; + public ref float Shred => ref projectile.ai[0]; + public float ShredRatio => MathHelper.Clamp(Shred / (maxShred * 0.5f), 0f, 1f); + public Player Owner => Main.player[projectile.owner]; + + public const float pogoStrenght = 16f; //How much the player gets pogoed up + public const float maxShred = 500; //How much shred you get + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Arid Shredder"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 70; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + float bladeLenght = 84 * projectile.scale; + float bladeWidth = 76 * projectile.scale; + + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center - direction * bladeLenght / 2, projectile.Center + direction * bladeLenght / 2, bladeWidth, ref collisionPoint); + } + + public override void AI() + { + if (!initialized) + { + Main.PlaySound(SoundID.Item90, projectile.Center); + projectile.timeLeft = (int)(30f + ShredRatio * 30f); + initialized = true; + + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + projectile.rotation = direction.ToRotation(); + + projectile.velocity = direction * 6f; + projectile.damage *= 10; + + projectile.scale = 1f + (ShredRatio * 1f); //SWAGGER + projectile.netUpdate = true; + + } + + projectile.position += projectile.velocity; + + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + for (int i = 0; i < 4; i++) //Draw extra copies + { + var tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeurExtra"); + + float drawAngle = direction.ToRotation(); + + float circleCompletion = (float)Math.Sin(Main.GlobalTime * 5 + i * MathHelper.PiOver2); + float drawRotation = drawAngle + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi / 7f) * ShredRatio); + + Vector2 drawOrigin = new Vector2(0f, tex.Height); + + + Vector2 drawOffsetStraight = projectile.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10 - Main.screenPosition; //How far from the player + Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly + + spriteBatch.Draw(tex, drawOffsetStraight + drawDisplacementAngle, null, lightColor * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + } + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + } + + public class GrovetendersTouch : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchBlade"; + private bool initialized = false; + + Vector2 direction = Vector2.Zero; + public Player Owner => Main.player[projectile.owner]; + public float Timer => MaxTime - projectile.timeLeft; + public ref float HasSnapped => ref projectile.ai[0]; + public ref float SnapCoyoteTime => ref projectile.ai[1]; + + const float MaxTime = 90; + const int coyoteTimeFrames = 15; //How many frames does the whip stay extended + const int MaxReach = 400; + const float SnappingPoint = 0.7f; //When does the snap occur. + const float ReelBackStrenght = 14f; + const float ChainDamageReduction = 0.5f; + + public BezierCurve curve; + private Vector2 controlPoint1; + private Vector2 controlPoint2; + internal bool ReelingBack => Timer / MaxTime > SnappingPoint; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Grovetender's Touch"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 36; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 2; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 30; + } + + public override bool? CanCutTiles() => false; //Itd be quite counterproductive to make the whip cut the tiles it just grew + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, projectile.Center }); + + int numPoints = 32; + Vector2[] chainPositions = curve.GetPoints(numPoints).ToArray(); + float collisionPoint = 0; + for (int i = 1; i < numPoints; i++) + { + Vector2 position = chainPositions[i]; + Vector2 previousPosition = chainPositions[i - 1]; + if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), position, previousPosition, 6, ref collisionPoint)) + return true; + } + return base.Colliding(projHitbox, targetHitbox); + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + base.ModifyHitNPC(target, ref damage, ref knockback, ref crit, ref hitDirection); + Vector2 projectileHalfLenght = (projectile.Size / 2f) * projectile.rotation.ToRotationVector2(); + float collisionPoint = 0; + //If you hit the enemy during the coyote time with the blade of the whip, guarantee a crit + if (Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), projectile.Center - projectileHalfLenght, projectile.Center + projectileHalfLenght, 32, ref collisionPoint)) + { + if (SnapCoyoteTime > 0f) + crit = true; + } + else + damage = (int)(damage * ChainDamageReduction); //If the enemy is hit with the chain of the whip, the damage gets reduced + } + + public override void AI() + { + if (!initialized) //Initialization. create control points & shit) + { + projectile.velocity = Owner.DirectionTo(Main.MouseWorld); + Main.PlaySound(SoundID.DD2_OgreSpit, projectile.Center); + controlPoint1 = projectile.Center; + controlPoint2 = projectile.Center; + projectile.timeLeft = (int)MaxTime; + initialized = true; + } + + if (ReelingBack && HasSnapped == 0f) //Snap & also small coyote time for the hook + { + Main.PlaySound(SoundID.Item41, projectile.Center); //Snap + HasSnapped = 1f; + SnapCoyoteTime = coyoteTimeFrames; + } + + if (SnapCoyoteTime > 0) //keep checking for the tile hook + { + HookToTile(); + SnapCoyoteTime--; + } + + Owner.direction = Math.Sign(projectile.velocity.X); + projectile.rotation = projectile.AngleFrom(Owner.Center); //Point away from playah + + float ratio = GetSwingRatio(); + projectile.Center = Owner.MountedCenter + SwingPosition(ratio); + projectile.direction = projectile.spriteDirection = -Owner.direction; + + //MessWithTiles(); + + Owner.itemRotation = MathHelper.WrapAngle(Owner.AngleTo(Main.MouseWorld) - (Owner.direction < 0 ? MathHelper.Pi : 0)); + } + public void HookToTile() + { + if (Main.myPlayer == Owner.whoAmI) + { + //Shmoove the player if a tile is hit. This movement always happens if the owner isnt on the ground, but will only happen if the projectile is above the player if they are standing on the ground) + if (Collision.SolidCollision(projectile.position, 32, 32) && (Owner.velocity.Y != 0 || projectile.position.Y < Owner.position.Y)) + { + Owner.velocity = Owner.DirectionTo(projectile.Center) * ReelBackStrenght; + SnapCoyoteTime = 0f; + } + Main.PlaySound(SoundID.Item65, projectile.position); + } + } + + public void MessWithTiles() //This DESTROYS the grass growing meta and shall remain sealed away + { + BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, projectile.Center }); + int numPoints = 30; + Vector2[] chainPositions = curve.GetPoints(numPoints).ToArray(); + + for (int i = 0; i < numPoints; i++) + { + Vector2 position = chainPositions[i]; + Tile targetTile = Main.tile[(int)position.X / 16, (int)position.Y / 16]; //Grab the tile + + if ((targetTile.type == TileID.Dirt || targetTile.type == TileID.Mud) && targetTile.active()) + { + if (targetTile.type == TileID.Dirt) + { + targetTile.active(true); + targetTile.type = TileID.Grass; + + if (Owner.ZoneCorrupt) + targetTile.type = TileID.CorruptGrass; + if (Owner.ZoneCrimson) + targetTile.type = TileID.FleshGrass; + if (Owner.ZoneHoly) + targetTile.type = TileID.HallowedGrass; + } + if (targetTile.type == TileID.Mud) + { + targetTile.active(true); + targetTile.type = TileID.JungleGrass; + if (Owner.ZoneGlowshroom) + { + targetTile.type = TileID.MushroomGrass; + } + } + + WorldGen.SquareTileFrame((int)position.X / 16, (int)position.Y / 16, true); //Update the tile framing + if (Main.netMode == NetmodeID.MultiplayerClient) + NetMessage.SendTileSquare(-1, (int)position.X / 16, (int)position.Y / 16, 1, TileChangeType.None); + } + + Tile targetTileAbove = Main.tile[(int)position.X / 16, (int)position.Y / 16 - 1]; + if (!targetTileAbove.active() && ((targetTile.type == TileID.Grass || targetTile.type == TileID.HallowedGrass || targetTile.type == TileID.JungleGrass) && targetTile.active())) //If theres air above + { + if (targetTile.type == TileID.Grass) + { + if (Main.rand.NextBool(2)) + { + targetTileAbove.active(true); + targetTileAbove.type = TileID.Plants; + targetTileAbove.frameX = (short)(18 * Main.rand.Next(0, 11)); + while (targetTileAbove.frameX == 144) //Exclude the mushroom + { + targetTileAbove.frameX = (short)(18 * Main.rand.Next(0, 11)); + } + } + else + { + targetTileAbove.active(true); + targetTileAbove.type = TileID.Plants2; + targetTileAbove.frameX = (short)(18 * Main.rand.Next(0, 21)); + while (targetTileAbove.frameX == 144) + { + targetTileAbove.frameX = (short)(18 * Main.rand.Next(0, 21)); + } + } + } + //On hallowed grass, grow hallowed plants + else if (targetTile.type == TileID.Grass) + { + if (Main.rand.NextBool(2)) + { + targetTileAbove.active(true); + targetTileAbove.type = TileID.HallowedPlants; + targetTileAbove.frameX = (short)(18 * Main.rand.Next(0, 7)); + } + else + { + targetTileAbove.active(true); + targetTileAbove.type = TileID.HallowedPlants2; + targetTileAbove.frameX = (short)(18 * Main.rand.Next(0, 8)); + while (targetTileAbove.frameX == 90) + { + targetTileAbove.frameX = (short)(18 * Main.rand.Next(0, 8)); + } + } + } + //On jungle grass, grow jungle flowers + else if (targetTile.type == TileID.JungleGrass) + { + targetTileAbove.active(true); + targetTileAbove.type = TileID.JunglePlants2; + targetTileAbove.frameX = (short)(18 * Main.rand.Next(0, 17)); + } + + if (Main.netMode == NetmodeID.MultiplayerClient) + NetMessage.SendTileSquare(-1, (int)position.X / 16, (int)position.Y / 16 - 1, 1, TileChangeType.None); + } + + } + + } + + internal float EaseInFunction(float progress) => progress == 0 ? 0f : (float)Math.Pow(2, 10 * progress - 10); //Potion seller i need your strongest easeIns + + private float GetSwingRatio() + { + float ratio = (Timer - SnappingPoint * MaxTime) / (MaxTime * (1 - SnappingPoint)); //The ratio for the last section of the snap is a new curve. + if (!ReelingBack) + ratio = EaseInFunction(Timer / (MaxTime * SnappingPoint)); //Watch this ratio get eased + if (SnapCoyoteTime > 0) + ratio = 0f; + return ratio; + } + + private Vector2 SwingPosition(float progress) + { + //Whip windup and snap part + if (!ReelingBack) + { + float distance = MaxReach * MathHelper.Lerp((float)Math.Sin(progress * MathHelper.PiOver2), 1, 0.04f); //half arc + distance = Math.Max(distance, 65); //Dont be too close to player + + float angleDeviation = MathHelper.Pi / 1.2f; + float angleOffset = Owner.direction * MathHelper.Lerp(-angleDeviation, 0, progress); //Go from very angled to straight at the zenith of the attack + return projectile.velocity.RotatedBy(angleOffset) * distance; + } + else + { + float distance = MathHelper.Lerp(MaxReach, 0f, progress); //Quickly zip back to the player . No angles or minimum distance from player. + return projectile.velocity * distance; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (Timer == 0) + return false; + Texture2D handle = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchBlade"); + Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchGlow"); + + Vector2 projBottom = projectile.Center + new Vector2(-handle.Width / 2, handle.Height / 2).RotatedBy(projectile.rotation + MathHelper.PiOver4) * 0.75f; + DrawChain(spriteBatch, projBottom, out Vector2[] chainPositions); + + float drawRotation = (projBottom - chainPositions[chainPositions.Length - 2]).ToRotation() + MathHelper.PiOver4; //Face away from the last point of the bezier curve + drawRotation += SnapCoyoteTime > 0 ? MathHelper.Pi : 0; //During coyote time the blade flips for some reason. Prevent that from happening + drawRotation += projectile.spriteDirection < 0 ? 0f : 0f; + + Vector2 drawOrigin = new Vector2(0f, handle.Height); + SpriteEffects flip = (projectile.spriteDirection < 0) ? SpriteEffects.None : SpriteEffects.None; + lightColor = Lighting.GetColor((int)(projectile.Center.X / 16f), (int)(projectile.Center.Y / 16f)); + + spriteBatch.Draw(handle, projBottom - Main.screenPosition, null, lightColor, drawRotation, drawOrigin, projectile.scale, flip, 0f); + + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Only update the origin for once + drawOrigin = new Vector2(0f, blade.Height); + spriteBatch.Draw(blade, projBottom - Main.screenPosition, null, lightColor * 0.9f, drawRotation, drawOrigin, projectile.scale, flip, 0f); + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + private void DrawChain(SpriteBatch spriteBatch, Vector2 projBottom, out Vector2[] chainPositions) + { + Texture2D chainTex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchChain"); + + float ratio = GetSwingRatio(); + + if (!ReelingBack) //Make the curve be formed from points slightly ahead of the projectile, but clamped to the max rotation (straight line ahead) + { + controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Clamp(ratio + 0.5f, 0f, 1f)) * 0.5f; + controlPoint2 = Owner.MountedCenter + SwingPosition(MathHelper.Clamp(ratio + 0.2f, 0f, 1f)) * 0.5f; + } + else //After the whip snaps, make the curve be a wave + { + Vector2 perpendicular = SwingPosition(ratio).SafeNormalize(Vector2.Zero).RotatedBy(MathHelper.PiOver2); + controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Lerp(ratio, 1f, ratio)) + perpendicular * MathHelper.SmoothStep(0f, 1f, ratio) * -155f; + controlPoint2 = Owner.MountedCenter + SwingPosition(MathHelper.Lerp(ratio, 1f, ratio / 2)) + perpendicular * MathHelper.SmoothStep(0f, 1f, ratio) * 100f; + } + + BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, projBottom }); + int numPoints = 30; //"Should make dynamic based on curve length, but I'm not sure how to smoothly do that while using a bezier curve" -Graydee, from the code i referenced. I do agree. + chainPositions = curve.GetPoints(numPoints).ToArray(); + + //Draw each chain segment bar the very first one + for (int i = 1; i < numPoints; i++) + { + Vector2 position = chainPositions[i]; + float rotation = (chainPositions[i] - chainPositions[i - 1]).ToRotation() - MathHelper.PiOver2; //Calculate rotation based on direction from last point + float yScale = Vector2.Distance(chainPositions[i], chainPositions[i - 1]) / chainTex.Height; //Calculate how much to squash/stretch for smooth chain based on distance between points + Vector2 scale = new Vector2(1, yScale); + Color chainLightColor = Lighting.GetColor((int)position.X / 16, (int)position.Y / 16); //Lighting of the position of the chain segment + if (ReelingBack) + chainLightColor *= 1 - EaseInFunction(ratio); //Make the chain fade when reeling it back + Vector2 origin = new Vector2(chainTex.Width / 2, chainTex.Height); //Draw from center bottom of texture + spriteBatch.Draw(chainTex, position - Main.screenPosition, null, chainLightColor, rotation, origin, scale, SpriteEffects.None, 0); + } + } + } +} From 5714a6db2beeea48d98920e54fe299f00f51f0d6 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Wed, 5 Jan 2022 05:09:23 +0100 Subject: [PATCH 10/76] Using the cleaner piecewise animation curves --- .../Melee/BrokenBiomeBladeProjectiles.cs | 73 ++++--------------- 1 file changed, 13 insertions(+), 60 deletions(-) diff --git a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs index 508c578d9b..36a79fccf0 100644 --- a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs @@ -14,6 +14,8 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using static Terraria.ModLoader.ModContent; +using static CalamityMod.CalamityUtils; + namespace CalamityMod.Projectiles.Melee { @@ -211,13 +213,6 @@ namespace CalamityMod.Projectiles.Melee public ref float MaxTime => ref projectile.ai[1]; public float Timer => MaxTime - projectile.timeLeft; - //Animation key constants - public const float anticipationTime = 0.2f; //Get ready to thrust - public const float thrustBurstTime = 0.15f; //Thrust in a quick burst - public const float heldDownTime = 0.35f; //Remain extended - public float retractTime => 1f - anticipationTime - thrustBurstTime - heldDownTime; //Retract. Its simply all the time left from the other stuff - - public int SwingDirection { get @@ -352,60 +347,18 @@ namespace CalamityMod.Projectiles.Melee Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); } - internal float ThrustDisplaceRatio() - { - float linearRatio = (Timer / MaxTime); //How far along the animation are you - float ratio; //L + Ratio - float displaceRatio = 1f; + //Animation keys + public CurveSegment anticipation = new CurveSegment(EasingType.SineBump, 0f, 0f, -0.15f); + public CurveSegment thrust = new CurveSegment(EasingType.PolyInOut, 0.2f, 0f, 0.9f, 3); + public CurveSegment hold = new CurveSegment(EasingType.SineBump, 0.35f, 0.9f, 0.1f); + public CurveSegment retract = new CurveSegment(EasingType.PolyInOut, 0.7f, 0.9f, -0.9f, 3); + internal float ThrustDisplaceRatio() => PiecewiseAnimation(Timer / MaxTime, new CurveSegment[] { anticipation, thrust, hold, retract }); - if (linearRatio <= anticipationTime) //Anticipation phase. A small bump in the negatives - { - ratio = MathHelper.Lerp(0f, 1f, linearRatio / anticipationTime); //Turn that mf into a workable 0 - 1 range - displaceRatio = (float)(Math.Sin(ratio * MathHelper.Pi) * -0.15f); - } - else if (linearRatio <= anticipationTime + thrustBurstTime) //Burst phase. Quickly step into almost a full ratio - { - ratio = linearRatio - anticipationTime; - ratio = MathHelper.Lerp(0f, 1f, ratio / thrustBurstTime); //Turn that mf into a workable 0 - 1 range - displaceRatio = MathHelper.SmoothStep(0f, 0.9f, ratio); - } - else if (linearRatio <= anticipationTime + thrustBurstTime + heldDownTime) //Holding down phase. Small bump up to reach a full ratio and then start going down - { - ratio = linearRatio - anticipationTime - thrustBurstTime; - ratio = MathHelper.Lerp(0f, 1f, ratio / heldDownTime); //Turn that mf into a workable 0 - 1 range - displaceRatio = 0.9f + (float)(Math.Sin(ratio * MathHelper.Pi) * 0.1f); - } - else //Retraction phase. Smooth step back to 0 - { - ratio = linearRatio - (1f - retractTime); - ratio = MathHelper.Lerp(0f, 1f, ratio / retractTime); //Turn that mf into a workable 0 - 1 range - displaceRatio = MathHelper.SmoothStep(0.9f, 0, ratio); - } - - return displaceRatio; - } - - //The ratio rapidly increases from 0 to 1 (reaches 1 at the midway point of the anticipation.). It remains at 1 for the rest of the thrust, and then decreases down to 0 at the midway point of the retraction) - internal float ThrustScaleRatio() - { - float linearRatio = (Timer / MaxTime); //How far along the animation are you - float ratio; //L + Ratio - float scaleRatio = 1f; - - if (linearRatio <= anticipationTime / 2f) //Growth phase - { - ratio = MathHelper.Lerp(0f, 1f, linearRatio / (anticipationTime / 2f)); //Turn that mf into a workable 0 - 1 range - scaleRatio = (float)(1f - Math.Exp(-ratio + 1)); - } - if (linearRatio >= 1f - retractTime / 2f) //Retract phase - { - ratio = linearRatio - (1f - retractTime / 2f); - ratio = MathHelper.Lerp(0f, 1f, ratio / (retractTime / 2f)); //Turn that mf into a workable 0 - 1 range - scaleRatio = (float)(1f - Math.Exp(ratio)); - } - - return scaleRatio; - } + //Animation keys + public CurveSegment expandSize = new CurveSegment(EasingType.ExpIn, 0f, 0f, 1f); + public CurveSegment holdSize = new CurveSegment(EasingType.Linear, 0.1f, 1f, 0f); + public CurveSegment shrinkSize = new CurveSegment(EasingType.ExpIn, 0.85f, 1f, -1f); + internal float ThrustScaleRatio() => PiecewiseAnimation(Timer / MaxTime, new CurveSegment[] { expandSize, holdSize, shrinkSize }); internal float PrimitiveWidthFunction(float completionRatio) { From f5a8896192b9d9c3074fb4b5d04520d9dc3b55ae Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Wed, 5 Jan 2022 05:10:16 +0100 Subject: [PATCH 11/76] Return to ashes --- Projectiles/Melee/BrokenBiomeBladeProjectiles.cs | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs index 36a79fccf0..867376821a 100644 --- a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs @@ -360,21 +360,6 @@ namespace CalamityMod.Projectiles.Melee public CurveSegment shrinkSize = new CurveSegment(EasingType.ExpIn, 0.85f, 1f, -1f); internal float ThrustScaleRatio() => PiecewiseAnimation(Timer / MaxTime, new CurveSegment[] { expandSize, holdSize, shrinkSize }); - internal float PrimitiveWidthFunction(float completionRatio) - { - var tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace" + (SwingMode == 0 ? "Small" : "Big")); - return Vector2.Distance(Vector2.Zero, tex.Size()); - } - - internal Color PrimitiveColorFunction(float completionRatio) - { - float opacity = Utils.InverseLerp(0.8f, 0.52f, completionRatio, true) * Utils.InverseLerp(1f, 0.81f, Timer / MaxTime, true); - Color startingColor = Color.White; - Color endingColor = Color.Lerp(Color.DarkCyan, Color.DarkBlue, 0.77f); - return Color.Lerp(startingColor, endingColor, (float)Math.Pow(completionRatio, 0.37f)) * opacity; - } - - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { From adb77934f432f890f33268cc8523696f1172bab2 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Wed, 5 Jan 2022 15:54:18 +0100 Subject: [PATCH 12/76] Made the tooltip editing cleaner --- Items/Weapons/Melee/BiomeBlade.cs | 121 ++++++++++++++++-------------- 1 file changed, 65 insertions(+), 56 deletions(-) diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index fc51c5de30..04965530c2 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -30,7 +30,8 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { DisplayName.SetDefault("Broken Biome Blade"); //Broken Ecoliburn lmfao. Tbh a proper name instead of just "biome blade" may be neat given the importance of the sword - Tooltip.SetDefault("Use RMB while standing still on the ground to attune the weapon to the powers of the surrounding biome\n" + + Tooltip.SetDefault("FUNCTION_DESC\n" + + "Use RMB while standing still on the ground to attune the weapon to the powers of the surrounding biome\n" + "Using RMB while moving or in the air switches between the current attunement and an extra stored one\n" + "Main attunement : None\n" + "Secondary attunement: None\n"); //Theres potential for flavor text as well but im not a writer @@ -41,72 +42,80 @@ namespace CalamityMod.Items.Weapons.Melee Player player = Main.player[Main.myPlayer]; if (player is null) return; - CalamityPlayer modPlayer = player.Calamity(); foreach (TooltipLine l in list) //I gave the attunement silly pseudo-fantasy names, ideas appreciated. { + if (l.text.StartsWith("FUNCTION_DESC")) + { + AttunementInfo info = GetAttunementInfo(mainAttunement); + l.overrideColor = info.color; + l.text = info.function_description; + } + if (l.text.StartsWith("Main attunement")) { - switch (mainAttunement) - { - case Attunement.Default: - l.text = "Main Attumenent : [Pure Clarity]"; - l.overrideColor = new Color(171, 180, 73); - break; - case Attunement.Hot: - l.text = "Main Attumenent : [Arid Grandeur]"; - l.overrideColor = new Color(238, 156, 73); - break; - case Attunement.Cold: - l.text = "Main Attumenent : [Biting Embrace]"; - l.overrideColor = new Color(165, 235, 235); - break; - case Attunement.Tropical: - l.text = "Main Attumenent : [Grovetender's Touch]"; - l.overrideColor = new Color(162, 200, 85); - break; - case Attunement.Evil: - l.text = "Main Attumenent : [Decay's Retort]"; - l.overrideColor = new Color(211, 64, 147); - break; - default: - l.text = "Main Attumenent : [None]"; - break; - } + AttunementInfo info = GetAttunementInfo(mainAttunement); + l.overrideColor = info.color; + l.text = "Main Attumenent : ["+ info.name + "]"; } if (l.text.StartsWith("Secondary attunement")) { - switch (secondaryAttunement) - { - case Attunement.Default: - l.text = "Secondary Attumenent : [Pure Clarity]"; - l.overrideColor = new Color(171, 180, 73); - break; - case Attunement.Hot: - l.text = "Secondary Attumenent : [Arid Grandeur]"; - l.overrideColor = new Color(238, 156, 73); - break; - case Attunement.Cold: - l.text = "Secondary Attumenent : [Biting Embrace]"; - l.overrideColor = new Color(165, 235, 235); - break; - case Attunement.Tropical: - l.text = "Secondary Attumenent : [Grovetender's Touch]"; - l.overrideColor = new Color(162, 200, 85); - break; - case Attunement.Evil: - l.text = "Secondary Attumenent : [Decay's Retort]"; - l.overrideColor = new Color(211, 64, 147); - break; - default: - l.text = "Secondary Attumenent : [None]"; - break; - } - } + AttunementInfo info = GetAttunementInfo(secondaryAttunement); + l.overrideColor = Color.Lerp(info.color, Color.Gray, 0.5f); + l.text = "Secondary Attumenent : [" + info.name + "]"; + } } } + internal struct AttunementInfo + { + public string name; + public string function_description; + public Color color; + } + + internal AttunementInfo GetAttunementInfo(Attunement? attunement) + { + AttunementInfo AttunementInfo = new AttunementInfo(); + + switch (attunement) + { + case Attunement.Default: + AttunementInfo.name = "Pure Clarity"; + AttunementInfo.function_description = "Fires a weak projectile that crushes enemy defenses"; + AttunementInfo.color = new Color(171, 180, 73); + break; + case Attunement.Hot: + AttunementInfo.name = "Arid Grandeur"; + AttunementInfo.function_description = "Conjures searing blades in front of you that get larger and stronger the more you hit enemies. The blades can also be used to bounce off tiles when in the air"; + AttunementInfo.color = new Color(238, 156, 73); + break; + case Attunement.Cold: + AttunementInfo.name = "Biting Embrace"; + AttunementInfo.function_description = "Perform a 3 strike combo with a glacial blade. The final strike freezes foes for a split second"; + AttunementInfo.color = new Color(165, 235, 235); + break; + case Attunement.Tropical: + AttunementInfo.name = "Grovetender's Touch"; + AttunementInfo.function_description = "Throw out the blade using a vine whip. Striking enemies with the tip of the whip as it cracks guarantees a critical hit. The whip will also propel you towards struck tiles"; + AttunementInfo.color = new Color(162, 200, 85); + break; + case Attunement.Evil: + AttunementInfo.name = "Decay's Retort"; + AttunementInfo.function_description = "Lunge forward using a ghostly rapier projection that leeches life off any struck foes. You also get bounced away from hit targets"; + AttunementInfo.color = new Color(211, 64, 147); + break; + default: + AttunementInfo.name = "None"; + AttunementInfo.function_description = "Does nothing... yet"; + AttunementInfo.color = new Color(163, 163, 163); + break; + } + + return AttunementInfo; + } + public override void SetDefaults() { item.width = item.height = 36; @@ -116,7 +125,7 @@ namespace CalamityMod.Items.Weapons.Melee item.useTime = 30; item.useTurn = true; item.useStyle = ItemUseStyleID.SwingThrow; - item.shoot = ProjectileID.PurificationPowder; // + item.shoot = ProjectileID.PurificationPowder; item.knockBack = 5f; item.autoReuse = true; item.value = Item.buyPrice(0, 4, 0, 0); From f91d724f03cd7c398d9c21058b84a0b46672eb66 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Wed, 5 Jan 2022 18:03:47 +0100 Subject: [PATCH 13/76] Multiplayer syncing & glowing blades --- .../Melee/BrokenBiomeBladeProjectiles.cs | 209 ++++++++---------- 1 file changed, 91 insertions(+), 118 deletions(-) diff --git a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs index 867376821a..343f56f442 100644 --- a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs @@ -21,8 +21,6 @@ namespace CalamityMod.Projectiles.Melee { public class PurityProjection : ModProjectile //The boring plain one { - private int dustType = 3; - public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_PurityProjection"; public override void SetStaticDefaults() @@ -39,16 +37,18 @@ namespace CalamityMod.Projectiles.Melee aiType = ProjectileID.LightBeam; projectile.friendly = true; projectile.penetrate = 1; - projectile.timeLeft = 100; + projectile.timeLeft = 40; projectile.melee = true; projectile.tileCollide = false; } - public override void AI() //Dust doesnt look great + public override void AI() { - if (projectile.timeLeft < 95) + if (projectile.timeLeft < 35) projectile.tileCollide = true; - int dustParticle = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0f, 0f, 100, default, 0.9f); + + Lighting.AddLight(projectile.Center, 0.75f, 1f, 0.24f); + int dustParticle = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.CursedTorch, 0f, 0f, 100, default, 0.9f); Main.dust[dustParticle].noGravity = true; Main.dust[dustParticle].velocity *= 0.5f; Main.dust[dustParticle].velocity += projectile.velocity * 0.1f; @@ -56,22 +56,29 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - if (projectile.timeLeft > 295) + if (projectile.timeLeft > 35) return false; - CalamityUtils.DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1); + DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1); return false; } public override void Kill(int timeLeft) { - //Explode into dust or whatever, + Main.PlaySound(SoundID.Item43, projectile.Center); + for (int i = 0; i <= 15; i++) + { + Vector2 displace = (projectile.rotation - MathHelper.PiOver4).ToRotationVector2() * (-0.5f + (i / 15f)) * 88f; + int dustParticle = Dust.NewDust(projectile.Center + displace, projectile.width, projectile.height, DustID.CursedTorch, 0f, 0f, 100, default, 2f); + Main.dust[dustParticle].noGravity = true; + Main.dust[dustParticle].velocity = projectile.oldVelocity; + } } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { int debuffTime = 90; - target.AddBuff(ModContent.BuffType(), debuffTime); + target.AddBuff(BuffType(), debuffTime); } } @@ -117,8 +124,6 @@ namespace CalamityMod.Projectiles.Melee { CanBounce = 1f; projectile.timeLeft = (int)MaxTime; - //Take the direction the sword is swung. FUCK not controlling the swing direction more than just left/right :| - //The direction to mouseworld may need to be turned into the custom synced player mouse variables . not on the branch currently tho direction = Owner.DirectionTo(Main.MouseWorld); direction.Normalize(); projectile.rotation = direction.ToRotation(); @@ -126,12 +131,16 @@ namespace CalamityMod.Projectiles.Melee Lunge(); Main.PlaySound(SoundID.Item103, projectile.Center); initialized = true; + projectile.netUpdate = true; + projectile.netSpam = 0; } //Manage position and rotation projectile.scale = 1f + ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 0.6f); //SWAGGER projectile.Center = Owner.Center + (direction * ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 60)); + Lighting.AddLight(projectile.Center, 0.9f, 0f, 0.35f); + //Make the owner look like theyre holding the sword bla bla Owner.heldProj = projectile.whoAmI; Owner.direction = Math.Sign(direction.X); @@ -147,7 +156,6 @@ namespace CalamityMod.Projectiles.Melee { if (Main.myPlayer != projectile.owner) return; - //Check if the owner is on the ground Owner.velocity = direction.SafeNormalize(Vector2.UnitX * Owner.direction) * LungeSpeed; } @@ -156,6 +164,9 @@ namespace CalamityMod.Projectiles.Melee private void OnHitEffects(bool cannotLifesteal) { + projectile.netUpdate = true; + projectile.netSpam = 0; + if (!cannotLifesteal) //trolled { Owner.statLife += 3; @@ -192,7 +203,7 @@ namespace CalamityMod.Projectiles.Melee drawOrigin = new Vector2(0f, tex.Height); drawOffset = Owner.Center + (drawAngle.ToRotationVector2() * 24f * projectile.scale) - Main.screenPosition; - spriteBatch.Draw(tex, drawOffset + displace, null, lightColor * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + spriteBatch.Draw(tex, drawOffset + displace, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); //Back to normal spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); @@ -200,6 +211,18 @@ namespace CalamityMod.Projectiles.Melee return false; } + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(initialized); + writer.WriteVector2(direction); + writer.Write(CanBounce); + } + public override void ReceiveExtraAI(BinaryReader reader) + { + initialized = reader.ReadBoolean(); + direction = reader.ReadVector2(); + CanBounce = reader.ReadSingle(); + } } public class BitingEmbrace : ModProjectile @@ -285,6 +308,13 @@ namespace CalamityMod.Projectiles.Melee return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center + displace, Owner.Center + displace + (rotation.ToRotationVector2() * bladeLenght), 24, ref collisionPoint); } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + base.OnHitNPC(target, damage, knockback, crit); + if (SwingMode == 2) + target.AddBuff(BuffType(), 20); + } + public override void AI() { if (!initialized) //Initialization @@ -316,7 +346,10 @@ namespace CalamityMod.Projectiles.Melee projectile.rotation = direction.ToRotation(); initialized = true; + projectile.netUpdate = true; + projectile.netSpam = 0; } + //Manage position and rotation projectile.Center = Owner.Center + (direction * 30); //rotation = projectile.rotation + MathHelper.SmoothStep(SwingWidth / 2 * SwingDirection, -SwingWidth / 2 * SwingDirection, Timer / MaxTime); @@ -362,13 +395,11 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - - Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/BiomeBlade"); if (SwingMode != 2) { - Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace" + (SwingMode == 0 ? "Small" : "Big")); + Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace" + (SwingMode == 0 ? "Small" : "Big")); float drawAngle = rotation; float drawRotation = rotation + MathHelper.PiOver4; Vector2 drawOrigin = new Vector2(0f, handle.Height); @@ -379,16 +410,16 @@ namespace CalamityMod.Projectiles.Melee spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); //Update the parameters - drawOrigin = new Vector2(0f, tex.Height); + drawOrigin = new Vector2(0f, blade.Height); drawOffset = Owner.Center + (drawAngle.ToRotationVector2() * 28f * projectile.scale) - Main.screenPosition; - spriteBatch.Draw(tex, drawOffset, null, lightColor * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + spriteBatch.Draw(blade, drawOffset, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); //Back to normal spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); } else { - Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_BitingEmbraceThrust"); + Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_BitingEmbraceThrust"); Vector2 thrustDisplace = direction * (ThrustDisplaceRatio() * 60); float drawAngle = rotation; @@ -407,7 +438,7 @@ namespace CalamityMod.Projectiles.Melee //Anim stuff Rectangle frameRectangle = new Rectangle(0, 0 + (116 * projectile.frame), 114, 114); - spriteBatch.Draw(tex, drawOffset + thrustDisplace, frameRectangle, lightColor * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + spriteBatch.Draw(blade, drawOffset + thrustDisplace, frameRectangle, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); //Back to normal spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); @@ -416,6 +447,18 @@ namespace CalamityMod.Projectiles.Melee return false; } + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(initialized); + writer.WriteVector2(direction); + writer.Write(rotation); + } + public override void ReceiveExtraAI(BinaryReader reader) + { + initialized = reader.ReadBoolean(); + direction = reader.ReadVector2(); + rotation = reader.ReadSingle(); + } } public class AridGrandeur : ModProjectile @@ -486,7 +529,6 @@ namespace CalamityMod.Projectiles.Melee return; } - if (Shred >= maxShred) Shred = maxShred; if (Shred < 0) @@ -506,6 +548,8 @@ namespace CalamityMod.Projectiles.Melee if (Collision.SolidCollision(Owner.Center + (direction * 84 * projectile.scale) - Vector2.One * 5f, 10, 10)) { Pogo(); + projectile.netUpdate = true; + projectile.netSpam = 0; } //Make the owner look like theyre holding the sword bla bla @@ -558,7 +602,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/BiomeBlade"); - Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur"); + Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur"); int bladeAmount = 4; @@ -574,28 +618,28 @@ namespace CalamityMod.Projectiles.Melee spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); //Update the parameters - drawOrigin = new Vector2(0f, tex.Height); + drawOrigin = new Vector2(0f, blade.Height); drawOffset = Owner.Center + (drawAngle.ToRotationVector2() * 32f * projectile.scale) - Main.screenPosition; - spriteBatch.Draw(tex, drawOffset, null, lightColor * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + spriteBatch.Draw(blade, drawOffset, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); for (int i = 0; i < bladeAmount; i++) //Draw extra copies { - tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeurExtra"); + blade = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeurExtra"); drawAngle = direction.ToRotation(); float circleCompletion = (float)Math.Sin(Main.GlobalTime * 5 + i * MathHelper.PiOver2); drawRotation = drawAngle + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi / 7f) * ShredRatio); - drawOrigin = new Vector2(0f, tex.Height); + drawOrigin = new Vector2(0f, blade.Height); Vector2 drawOffsetStraight = Owner.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10 - Main.screenPosition; //How far from the player Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly - spriteBatch.Draw(tex, drawOffsetStraight + drawDisplacementAngle, null, lightColor * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + spriteBatch.Draw(blade, drawOffsetStraight + drawDisplacementAngle, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); } //Back to normal @@ -605,105 +649,22 @@ namespace CalamityMod.Projectiles.Melee return false; } - } - - public class AridGrandeurShot : ModProjectile //Only use this for the upgrade actually lol - { - public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeurExtra"; - private bool initialized = false; - Vector2 direction = Vector2.Zero; - public ref float Shred => ref projectile.ai[0]; - public float ShredRatio => MathHelper.Clamp(Shred / (maxShred * 0.5f), 0f, 1f); - public Player Owner => Main.player[projectile.owner]; - - public const float pogoStrenght = 16f; //How much the player gets pogoed up - public const float maxShred = 500; //How much shred you get - - public override void SetStaticDefaults() + public override void SendExtraAI(BinaryWriter writer) { - DisplayName.SetDefault("Arid Shredder"); + writer.Write(initialized); + writer.WriteVector2(direction); } - public override void SetDefaults() + public override void ReceiveExtraAI(BinaryReader reader) { - projectile.melee = true; - projectile.width = projectile.height = 70; - projectile.tileCollide = false; - projectile.friendly = true; - projectile.penetrate = -1; - projectile.extraUpdates = 1; + initialized = reader.ReadBoolean(); + direction = reader.ReadVector2(); } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - float collisionPoint = 0f; - float bladeLenght = 84 * projectile.scale; - float bladeWidth = 76 * projectile.scale; - - return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center - direction * bladeLenght / 2, projectile.Center + direction * bladeLenght / 2, bladeWidth, ref collisionPoint); - } - - public override void AI() - { - if (!initialized) - { - Main.PlaySound(SoundID.Item90, projectile.Center); - projectile.timeLeft = (int)(30f + ShredRatio * 30f); - initialized = true; - - direction = Owner.DirectionTo(Main.MouseWorld); - direction.Normalize(); - projectile.rotation = direction.ToRotation(); - - projectile.velocity = direction * 6f; - projectile.damage *= 10; - - projectile.scale = 1f + (ShredRatio * 1f); //SWAGGER - projectile.netUpdate = true; - - } - - projectile.position += projectile.velocity; - - } - - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - for (int i = 0; i < 4; i++) //Draw extra copies - { - var tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeurExtra"); - - float drawAngle = direction.ToRotation(); - - float circleCompletion = (float)Math.Sin(Main.GlobalTime * 5 + i * MathHelper.PiOver2); - float drawRotation = drawAngle + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi / 7f) * ShredRatio); - - Vector2 drawOrigin = new Vector2(0f, tex.Height); - - - Vector2 drawOffsetStraight = projectile.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10 - Main.screenPosition; //How far from the player - Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly - - spriteBatch.Draw(tex, drawOffsetStraight + drawDisplacementAngle, null, lightColor * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - } - - //Back to normal - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - return false; - } - } public class GrovetendersTouch : ModProjectile { public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchBlade"; private bool initialized = false; - - Vector2 direction = Vector2.Zero; public Player Owner => Main.player[projectile.owner]; public float Timer => MaxTime - projectile.timeLeft; public ref float HasSnapped => ref projectile.ai[0]; @@ -781,6 +742,8 @@ namespace CalamityMod.Projectiles.Melee controlPoint2 = projectile.Center; projectile.timeLeft = (int)MaxTime; initialized = true; + projectile.netUpdate = true; + projectile.netSpam = 0; } if (ReelingBack && HasSnapped == 0f) //Snap & also small coyote time for the hook @@ -979,7 +942,7 @@ namespace CalamityMod.Projectiles.Melee spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); //Only update the origin for once drawOrigin = new Vector2(0f, blade.Height); - spriteBatch.Draw(blade, projBottom - Main.screenPosition, null, lightColor * 0.9f, drawRotation, drawOrigin, projectile.scale, flip, 0f); + spriteBatch.Draw(blade, projBottom - Main.screenPosition, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, flip, 0f); //Back to normal spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); @@ -1023,5 +986,15 @@ namespace CalamityMod.Projectiles.Melee spriteBatch.Draw(chainTex, position - Main.screenPosition, null, chainLightColor, rotation, origin, scale, SpriteEffects.None, 0); } } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(initialized); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + initialized = reader.ReadBoolean(); + } } } From de42d1bf91f493d55f1d828cffad4a92e14b7969 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Wed, 5 Jan 2022 18:08:20 +0100 Subject: [PATCH 14/76] Little glow --- Projectiles/Melee/BrokenBiomeBladeProjectiles.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs index 343f56f442..32f2f7557d 100644 --- a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs @@ -357,6 +357,8 @@ namespace CalamityMod.Projectiles.Melee rotation = projectile.rotation + MathHelper.Lerp(SwingWidth / 2 * SwingDirection, -SwingWidth / 2 * SwingDirection, factor); projectile.scale = 1f + ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 0.6f); //SWAGGER + Lighting.AddLight(Owner.MountedCenter, 0.75f, 1f, 1f); + //Add the thrust motion & animation for the third combo state if (SwingMode == 2) { @@ -509,6 +511,7 @@ namespace CalamityMod.Projectiles.Melee Owner.fallStart = (int)(Owner.position.Y / 16f); PogoCooldown = 30; //Cooldown Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.position); + Lighting.AddLight(projectile.Center, 1f, 0.56f, 0.56f); if (Owner.HeldItem.type == ItemType()) (Owner.HeldItem.modItem as BiomeBlade).CanLunge = 1; // Reset the lunge counter on pogo. This should make for more interesting and fun synergies @@ -583,7 +586,7 @@ namespace CalamityMod.Projectiles.Melee { if (Owner.velocity.Y > 0) Owner.velocity.Y = -2f; //Get "stuck" into the enemy partly - + Lighting.AddLight(projectile.Center, 1f, 0.56f, 0.56f); Owner.GiveIFrames(5); // i framez. Do 5 iframes even matter? idk but you get a lot of em so lol... PogoCooldown = 20; } @@ -748,6 +751,7 @@ namespace CalamityMod.Projectiles.Melee if (ReelingBack && HasSnapped == 0f) //Snap & also small coyote time for the hook { + Lighting.AddLight(projectile.Center, 0.8f, 1f, 0.35f); Main.PlaySound(SoundID.Item41, projectile.Center); //Snap HasSnapped = 1f; SnapCoyoteTime = coyoteTimeFrames; @@ -759,6 +763,8 @@ namespace CalamityMod.Projectiles.Melee SnapCoyoteTime--; } + Lighting.AddLight(projectile.Center, 0.32f, 0.61f, 0.02f); + Owner.direction = Math.Sign(projectile.velocity.X); projectile.rotation = projectile.AngleFrom(Owner.Center); //Point away from playah From 0102987cf9a89e80520ea49af04fa477afdc5e00 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Wed, 5 Jan 2022 18:25:33 +0100 Subject: [PATCH 15/76] Reduced the harshness of the lighting effects --- .../Melee/BrokenBiomeBladeProjectiles.cs | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs index 32f2f7557d..9c5d24c9b4 100644 --- a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs @@ -139,7 +139,7 @@ namespace CalamityMod.Projectiles.Melee projectile.scale = 1f + ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 0.6f); //SWAGGER projectile.Center = Owner.Center + (direction * ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 60)); - Lighting.AddLight(projectile.Center, 0.9f, 0f, 0.35f); + Lighting.AddLight(projectile.Center, new Vector3(0.9f, 0f, 0.35f) * (float)Math.Sin(Timer / MaxTime * MathHelper.Pi)); //Make the owner look like theyre holding the sword bla bla Owner.heldProj = projectile.whoAmI; @@ -357,7 +357,7 @@ namespace CalamityMod.Projectiles.Melee rotation = projectile.rotation + MathHelper.Lerp(SwingWidth / 2 * SwingDirection, -SwingWidth / 2 * SwingDirection, factor); projectile.scale = 1f + ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 0.6f); //SWAGGER - Lighting.AddLight(Owner.MountedCenter, 0.75f, 1f, 1f); + Lighting.AddLight(Owner.MountedCenter, new Vector3(0.75f, 1f, 1f) * (float)Math.Sin(Timer/MaxTime * MathHelper.Pi)); //Add the thrust motion & animation for the third combo state if (SwingMode == 2) @@ -511,7 +511,6 @@ namespace CalamityMod.Projectiles.Melee Owner.fallStart = (int)(Owner.position.Y / 16f); PogoCooldown = 30; //Cooldown Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.position); - Lighting.AddLight(projectile.Center, 1f, 0.56f, 0.56f); if (Owner.HeldItem.type == ItemType()) (Owner.HeldItem.modItem as BiomeBlade).CanLunge = 1; // Reset the lunge counter on pogo. This should make for more interesting and fun synergies @@ -537,6 +536,8 @@ namespace CalamityMod.Projectiles.Melee if (Shred < 0) Shred = 0; + Lighting.AddLight(projectile.Center, new Vector3(1f, 0.56f, 0.56f) * ShredRatio); + //Manage position and rotation direction = Owner.DirectionTo(Main.MouseWorld); direction.Normalize(); @@ -576,17 +577,16 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitPvp(Player target, int damage, bool crit) => ShredTarget(target); private void ShredTarget(Entity target) - { - Main.PlaySound(SoundID.NPCHit30, projectile.Center); //Sizzle - Shred += 62; //Augment the shredspeed + { if (Main.myPlayer != Owner.whoAmI) return; // get lifted up if (PogoCooldown <= 0) { + Main.PlaySound(SoundID.NPCHit30, projectile.Center); //Sizzle + Shred += 62; //Augment the shredspeed if (Owner.velocity.Y > 0) Owner.velocity.Y = -2f; //Get "stuck" into the enemy partly - Lighting.AddLight(projectile.Center, 1f, 0.56f, 0.56f); Owner.GiveIFrames(5); // i framez. Do 5 iframes even matter? idk but you get a lot of em so lol... PogoCooldown = 20; } @@ -750,8 +750,7 @@ namespace CalamityMod.Projectiles.Melee } if (ReelingBack && HasSnapped == 0f) //Snap & also small coyote time for the hook - { - Lighting.AddLight(projectile.Center, 0.8f, 1f, 0.35f); + { Main.PlaySound(SoundID.Item41, projectile.Center); //Snap HasSnapped = 1f; SnapCoyoteTime = coyoteTimeFrames; @@ -759,12 +758,11 @@ namespace CalamityMod.Projectiles.Melee if (SnapCoyoteTime > 0) //keep checking for the tile hook { + Lighting.AddLight(projectile.Center, 0.8f, 1f, 0.35f); HookToTile(); SnapCoyoteTime--; } - Lighting.AddLight(projectile.Center, 0.32f, 0.61f, 0.02f); - Owner.direction = Math.Sign(projectile.velocity.X); projectile.rotation = projectile.AngleFrom(Owner.Center); //Point away from playah From 7054ef5fe6b01cb1a7ff661bef474dbd8d6266d7 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Wed, 5 Jan 2022 19:44:39 +0100 Subject: [PATCH 16/76] Attunements get saved --- Items/Weapons/Melee/BiomeBlade.cs | 49 ++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index 04965530c2..14989b999d 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -16,6 +16,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using static Terraria.ModLoader.ModContent; +using Terraria.ModLoader.IO; namespace CalamityMod.Items.Weapons.Melee { @@ -148,9 +149,10 @@ namespace CalamityMod.Items.Weapons.Melee public override bool AltFunctionUse(Player player) => true; + #region Saving and syncing attunements public override bool CloneNewInstances => true; - public override ModItem Clone(Item item) //need to add shit to properly save those + public override ModItem Clone(Item item) { var clone = base.Clone(item); @@ -170,6 +172,49 @@ namespace CalamityMod.Items.Weapons.Melee return clone; } + public override ModItem Clone() //ditto + { + var clone = base.Clone(); + + (clone as BiomeBlade).mainAttunement = mainAttunement; + (clone as BiomeBlade).secondaryAttunement = secondaryAttunement; + + if (clone.item.prefix == PrefixID.Broken) + { + clone.item.Prefix(PrefixID.Legendary); + clone.item.prefix = PrefixID.Legendary; + } + + return clone; + } + + public override TagCompound Save() + { + int attunement1 = mainAttunement == null? -1 : (int)mainAttunement; + int attunement2 = secondaryAttunement == null ? -1 : (int)secondaryAttunement; + TagCompound tag = new TagCompound + { + { "mainAttunement", attunement1 }, + { "secondaryAttunement", attunement2 } + }; + return tag; + } + + public override void Load(TagCompound tag) + { + int attunement1 = tag.GetInt("mainAttunement"); + int attunement2 = tag.GetInt("secondaryAttunement"); + if (attunement1 == -1) + mainAttunement = null; + else + mainAttunement = (Attunement?)attunement1; + + if (attunement2 == -1) + secondaryAttunement = null; + else + secondaryAttunement = (Attunement?)attunement2; + } + public override void NetSend(BinaryWriter writer) { writer.Write((byte)mainAttunement); @@ -182,6 +227,8 @@ namespace CalamityMod.Items.Weapons.Melee secondaryAttunement = (Attunement?)reader.ReadByte(); } + #endregion + public override void HoldItem(Player player) { From 4e4cc2ffc439bfebef3d2dd7df8f4a1cf1465325 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Fri, 7 Jan 2022 05:23:07 +0100 Subject: [PATCH 17/76] Started work on the proper channel anim --- Items/Weapons/Melee/BiomeBlade.cs | 229 ++++++++++++++++++------------ 1 file changed, 137 insertions(+), 92 deletions(-) diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index 14989b999d..60abd273bb 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -17,6 +17,7 @@ using Terraria.ID; using Terraria.ModLoader; using static Terraria.ModLoader.ModContent; using Terraria.ModLoader.IO; +using static CalamityMod.Items.Weapons.Melee.BiomeBlade; namespace CalamityMod.Items.Weapons.Melee { @@ -44,7 +45,7 @@ namespace CalamityMod.Items.Weapons.Melee if (player is null) return; - foreach (TooltipLine l in list) //I gave the attunement silly pseudo-fantasy names, ideas appreciated. + foreach (TooltipLine l in list) { if (l.text.StartsWith("FUNCTION_DESC")) { @@ -147,8 +148,6 @@ namespace CalamityMod.Items.Weapons.Melee recipe.AddRecipe(); } - public override bool AltFunctionUse(Player player) => true; - #region Saving and syncing attunements public override bool CloneNewInstances => true; @@ -209,7 +208,7 @@ namespace CalamityMod.Items.Weapons.Melee else mainAttunement = (Attunement?)attunement1; - if (attunement2 == -1) + if (attunement2 == -1 || (attunement1 == attunement2)) secondaryAttunement = null; else secondaryAttunement = (Attunement?)attunement2; @@ -232,6 +231,8 @@ namespace CalamityMod.Items.Weapons.Melee public override void HoldItem(Player player) { + player.Calamity().rightClickListener = true; + if (player.velocity.Y == 0) //Reset the lunge ability on ground contact CanLunge = 1; @@ -301,6 +302,23 @@ namespace CalamityMod.Items.Weapons.Melee Combo = 0; break; } + + if (player.Calamity().mouseRight && CanUseItem(player) && player.whoAmI == Main.myPlayer && !Main.mapFullscreen) + { + //Don't shoot out a visual blade if you already have one out + if (Main.projectile.Any(n => n.active && n.type == ProjectileType() && n.owner == player.whoAmI)) + return; + + int x = (int)player.Center.X / 16; + int y = (int)(player.position.Y + (float)player.height - 1f) / 16; + Tile tileStandingOn = Main.tile[x, y + 1]; + + bool mayAttune = player.StandingStill() && !player.mount.Active && tileStandingOn.IsTileSolidGround(); + if (player.whoAmI == Main.myPlayer) + Main.PlaySound(SoundID.DD2_DarkMageHealImpact); + Vector2 displace = new Vector2(18f, 0f); + Projectile.NewProjectile(player.Top + displace, Vector2.Zero, ProjectileType(), 0, 0, player.whoAmI, mayAttune ? 0f : 1f); + } } public override bool CanUseItem(Player player) @@ -311,38 +329,6 @@ namespace CalamityMod.Items.Weapons.Melee public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - if (player.altFunctionUse == 2) - { - if (Main.projectile.Any(n => n.active && n.type == ProjectileType() && n.owner == player.whoAmI)) - return false; - - if (!player.StandingStill()) //Swap attunements - { - if (secondaryAttunement == null) //Don't let the player swap to an empty attunement - return false; - - Projectile.NewProjectile(player.position, Vector2.Zero, ProjectileType(), 0, 0, player.whoAmI, 0f); - Attunement? temporaryAttunementStorage = mainAttunement; - mainAttunement = secondaryAttunement; - secondaryAttunement = temporaryAttunementStorage; - if (player.whoAmI == Main.myPlayer) - { - Main.PlaySound(SoundID.DD2_DarkMageHealImpact); - } - } - - else //Chargeup - { - if (player.mount.Active) - return false; - Vector2 displace = new Vector2((player.direction >= 0 ? 2 : -1) * 20f, 0); - Projectile.NewProjectile(player.position + displace, Vector2.Zero, ProjectileType(), 0, 0, player.whoAmI, 1f); - if (player.whoAmI == Main.myPlayer) - Main.PlaySound(SoundID.DD2_DarkMageHealImpact); - } - return false; - } - if (mainAttunement == null) return false; @@ -437,103 +423,162 @@ namespace CalamityMod.Items.Weapons.Melee return true; } - } public class BrokenBiomeBladeVisuals : ModProjectile //Visuals { private Player Owner => Main.player[projectile.owner]; - public ref float AnimationMode => ref projectile.ai[0]; + + public Tile OwnerGround => Main.tile[(int)Owner.Center.X / 16, (int)(Owner.position.Y + (float)Owner.height - 1f) / 16 + 1]; + public bool OwnerCanUseItem => Owner.HeldItem == associatedItem ? (Owner.HeldItem.modItem as BiomeBlade).CanUseItem(Owner) : false; + public bool OwnerMayChannel => OwnerCanUseItem && Owner.Calamity().mouseRight && Owner.active && !Owner.dead && Owner.StandingStill() && !Owner.mount.Active && OwnerGround.IsTileSolidGround(); + public ref float ChanneledState => ref projectile.ai[0]; + public ref float ChannelTimer => ref projectile.ai[1]; + public ref float Initialized => ref projectile.localAI[0]; + + private Item associatedItem; + private BezierCurve bezierCurve; + + const int ChannelTime = 120; + public override void SetStaticDefaults() { DisplayName.SetDefault("Broken Biome Blade"); } public override string Texture => "CalamityMod/Items/Weapons/Melee/BiomeBlade"; + public bool drawIndrawHeldProjInFrontOfHeldItemAndArms = true; public override void SetDefaults() { projectile.width = projectile.height = 36; projectile.aiStyle = -1; projectile.friendly = true; projectile.penetrate = -1; - projectile.timeLeft = 30; + projectile.timeLeft = 60; projectile.tileCollide = false; projectile.damage = 0; } + //Cancellable if the player uses the sword again. + public override void AI() { - if (Owner.HeldItem.type != ItemType()) + + if (Initialized == 0f) { - projectile.timeLeft = 0; + associatedItem = Owner.HeldItem; + //Switch up the attunements + Attunement? temporaryAttunementStorage = (associatedItem.modItem as BiomeBlade).mainAttunement; + (associatedItem.modItem as BiomeBlade).mainAttunement = (associatedItem.modItem as BiomeBlade).secondaryAttunement; + (associatedItem.modItem as BiomeBlade).secondaryAttunement = temporaryAttunementStorage; + Initialized = 1f; + } + + if (!OwnerMayChannel && ChanneledState == 0f) //IF the channeling gets interrupted for any reason + { + ChanneledState = 1f; + projectile.timeLeft = 60; return; } - if (AnimationMode == 1f) + if (ChanneledState == 0f) { - if (!Owner.StandingStill()) + //Use an animationcurve instead plea,,se + if (bezierCurve == null) { - projectile.timeLeft = 0; - return; - } - if (projectile.timeLeft == 30) - { - List bezierPoints = new List() { projectile.position, projectile.position - Vector2.UnitY * 16f, projectile.position + Vector2.UnitY * 56f, projectile.position + Vector2.UnitY * 42f }; + List bezierPoints = new List() {projectile.position + Vector2.UnitY * 42f, projectile.position + Vector2.UnitY * 56f, projectile.position - Vector2.UnitY * 16f, projectile.position}; bezierCurve = new BezierCurve(bezierPoints.ToArray()); } - projectile.position = bezierCurve.Evaluate(1f - projectile.timeLeft / 30f); - //projectile.rotation = MathHelper.Lerp(MathHelper.PiOver4, -(MathHelper.PiOver2 + MathHelper.PiOver4), 1f - MathHelper.Clamp((projectile.timeLeft / 10), 0f, 1f)); - //projectile.rotation = MathHelper.PiOver4 + MathHelper.PiOver2; - projectile.rotation = Utils.AngleLerp(MathHelper.PiOver4 + MathHelper.PiOver2, -MathHelper.PiOver4, MathHelper.Clamp(((projectile.timeLeft - 20f) / 10f), 0f, 1f)); + Owner.heldProj = projectile.whoAmI; - if (projectile.timeLeft == 2) + projectile.position = bezierCurve.Evaluate(1f - ChannelTimer / ChannelTime); + projectile.rotation = Utils.AngleLerp(-MathHelper.PiOver4, MathHelper.PiOver4 + MathHelper.PiOver2, MathHelper.Clamp(((ChannelTimer - 20f) / 10f), 0f, 1f)); + ChannelTimer++; + projectile.timeLeft = 60; + + if (ChannelTimer >= ChannelTime) { - bool jungle = Owner.ZoneJungle; - bool ocean = Owner.ZoneBeach; - bool snow = Owner.ZoneSnow; - bool evil = Owner.ZoneCorrupt || Owner.ZoneCrimson; - bool desert = Owner.ZoneDesert; - bool hell = Owner.ZoneUnderworldHeight; - - BiomeBlade.Attunement attunement = BiomeBlade.Attunement.Default; - - if (jungle || ocean) - { - attunement = BiomeBlade.Attunement.Tropical; - } - if (desert || hell) - { - attunement = BiomeBlade.Attunement.Hot; - } - if (snow) - { - attunement = BiomeBlade.Attunement.Cold; - } - if (evil) - { - attunement = BiomeBlade.Attunement.Evil; - } - - if ((Owner.HeldItem.modItem as BiomeBlade).mainAttunement == attunement) - { - Main.PlaySound(SoundID.DD2_LightningBugZap, projectile.Center); - return; - } - Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.Center); - (Owner.HeldItem.modItem as BiomeBlade).secondaryAttunement = (Owner.HeldItem.modItem as BiomeBlade).mainAttunement; - (Owner.HeldItem.modItem as BiomeBlade).mainAttunement = attunement; - - //Lots of particles!!! yay!! visuals!! + Attune((BiomeBlade)associatedItem.modItem); + projectile.timeLeft = 120; + ChanneledState = 2f; } } + if (ChanneledState == 1f) + projectile.position += Vector2.UnitY * -0.3f * (1f + projectile.timeLeft/60f); + } + + public void Attune(BiomeBlade item) + { + bool jungle = Owner.ZoneJungle; + bool snow = Owner.ZoneSnow; + bool evil = Owner.ZoneCorrupt || Owner.ZoneCrimson; + bool desert = Owner.ZoneDesert; + bool hell = Owner.ZoneUnderworldHeight; + + Attunement attunement = Attunement.Default; + + if (jungle) + { + attunement = Attunement.Tropical; + } + if (desert || hell) + { + attunement = Attunement.Hot; + } + if (snow) + { + attunement = Attunement.Cold; + } + if (evil) + { + attunement = Attunement.Evil; + } + + //If the owner already had the attunement , break out of it (And unswap) + if (item.secondaryAttunement == attunement) + { + Main.PlaySound(SoundID.DD2_LightningBugZap, projectile.Center); + item.secondaryAttunement = item.mainAttunement; + item.mainAttunement = attunement; + return; + } + + Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.Center); + item.mainAttunement = attunement; + + //Lots of particles!!! yay!! visuals!! + } + + public override void Kill(int timeLeft) + { + //If we swapped out the main attunement for the second one despite the second attunement being empty at the time, unswap them. + if ((associatedItem.modItem as BiomeBlade).mainAttunement == null && (associatedItem.modItem as BiomeBlade).secondaryAttunement != null) + { + (associatedItem.modItem as BiomeBlade).mainAttunement = (associatedItem.modItem as BiomeBlade).secondaryAttunement; + (associatedItem.modItem as BiomeBlade).secondaryAttunement = null; + } + //Cool particles } - public override void Kill(int timeLeft) + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - //Cool particles + if (ChanneledState == 0f && ChannelTimer > 6f) + return base.PreDraw(spriteBatch, lightColor); + + else if (ChanneledState == 1f) + { + Texture2D tex = GetTexture(Texture); + Vector2 squishyScale = new Vector2((float)Math.Sin(MathHelper.Pi + MathHelper.TwoPi * projectile.timeLeft / 30f), 1f); + spriteBatch.Draw(tex, projectile.position - Main.screenPosition, null, lightColor * (projectile.timeLeft / 60f), 0, tex.Size() / 2, squishyScale * (2f - (projectile.timeLeft / 60f)), SpriteEffects.None, 0); + + return false; + } + + else + return false; } } From 2c98ceec90a67362223da8f46fd1723cf4663bae Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Fri, 7 Jan 2022 18:20:13 +0100 Subject: [PATCH 18/76] Prettified the channeling and switching anims --- Items/Weapons/Melee/BiomeBlade.cs | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index 60abd273bb..dc9c92c605 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -18,6 +18,7 @@ using Terraria.ModLoader; using static Terraria.ModLoader.ModContent; using Terraria.ModLoader.IO; using static CalamityMod.Items.Weapons.Melee.BiomeBlade; +using static CalamityMod.CalamityUtils; namespace CalamityMod.Items.Weapons.Melee { @@ -429,17 +430,14 @@ namespace CalamityMod.Items.Weapons.Melee { private Player Owner => Main.player[projectile.owner]; - public Tile OwnerGround => Main.tile[(int)Owner.Center.X / 16, (int)(Owner.position.Y + (float)Owner.height - 1f) / 16 + 1]; + public bool OwnerOnGround => Main.tile[(int)Owner.Center.X / 16, (int)(Owner.position.Y + (float)Owner.height - 1f) / 16 + 1].IsTileSolidGround() && Main.tile[(int)Owner.Center.X / 16 + Owner.direction, (int)(Owner.position.Y + (float)Owner.height - 1f) / 16 + 1].IsTileSolidGround(); public bool OwnerCanUseItem => Owner.HeldItem == associatedItem ? (Owner.HeldItem.modItem as BiomeBlade).CanUseItem(Owner) : false; - public bool OwnerMayChannel => OwnerCanUseItem && Owner.Calamity().mouseRight && Owner.active && !Owner.dead && Owner.StandingStill() && !Owner.mount.Active && OwnerGround.IsTileSolidGround(); + public bool OwnerMayChannel => OwnerCanUseItem && Owner.Calamity().mouseRight && Owner.active && !Owner.dead && Owner.StandingStill() && !Owner.mount.Active && OwnerOnGround; public ref float ChanneledState => ref projectile.ai[0]; public ref float ChannelTimer => ref projectile.ai[1]; public ref float Initialized => ref projectile.localAI[0]; private Item associatedItem; - - private BezierCurve bezierCurve; - const int ChannelTime = 120; public override void SetStaticDefaults() @@ -459,7 +457,12 @@ namespace CalamityMod.Items.Weapons.Melee projectile.damage = 0; } - //Cancellable if the player uses the sword again. + public CurveSegment anticipation = new CurveSegment(EasingType.SineOut, 0f, 1f, 0.35f); + public CurveSegment thrust = new CurveSegment(EasingType.ExpIn, 0.85f, 1.35f, -1.45f); + public CurveSegment bounceback = new CurveSegment(EasingType.SineOut, 0.95f, -0.1f, 0.1f); + internal float SwordHeight() => PiecewiseAnimation(ChannelTimer / (float)ChannelTime, new CurveSegment[] { anticipation, thrust, bounceback }); + + public override void AI() { @@ -476,6 +479,7 @@ namespace CalamityMod.Items.Weapons.Melee if (!OwnerMayChannel && ChanneledState == 0f) //IF the channeling gets interrupted for any reason { + projectile.Center = Owner.Top + new Vector2(18f, 0f); ChanneledState = 1f; projectile.timeLeft = 60; return; @@ -483,16 +487,9 @@ namespace CalamityMod.Items.Weapons.Melee if (ChanneledState == 0f) { - //Use an animationcurve instead plea,,se - if (bezierCurve == null) - { - List bezierPoints = new List() {projectile.position + Vector2.UnitY * 42f, projectile.position + Vector2.UnitY * 56f, projectile.position - Vector2.UnitY * 16f, projectile.position}; - bezierCurve = new BezierCurve(bezierPoints.ToArray()); - } - Owner.heldProj = projectile.whoAmI; - projectile.position = bezierCurve.Evaluate(1f - ChannelTimer / ChannelTime); + projectile.Center = Owner.Center + new Vector2(16f * Owner.direction, -30 * SwordHeight() + 10f) ; projectile.rotation = Utils.AngleLerp(-MathHelper.PiOver4, MathHelper.PiOver4 + MathHelper.PiOver2, MathHelper.Clamp(((ChannelTimer - 20f) / 10f), 0f, 1f)); ChannelTimer++; projectile.timeLeft = 60; @@ -571,8 +568,9 @@ namespace CalamityMod.Items.Weapons.Melee else if (ChanneledState == 1f) { Texture2D tex = GetTexture(Texture); - Vector2 squishyScale = new Vector2((float)Math.Sin(MathHelper.Pi + MathHelper.TwoPi * projectile.timeLeft / 30f), 1f); - spriteBatch.Draw(tex, projectile.position - Main.screenPosition, null, lightColor * (projectile.timeLeft / 60f), 0, tex.Size() / 2, squishyScale * (2f - (projectile.timeLeft / 60f)), SpriteEffects.None, 0); + Vector2 squishyScale = new Vector2(Math.Abs((float)Math.Sin(MathHelper.Pi + MathHelper.TwoPi * projectile.timeLeft / 30f)), 1f); + SpriteEffects flip = (float)Math.Sin(MathHelper.Pi + MathHelper.TwoPi * projectile.timeLeft / 30f) > 0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + spriteBatch.Draw(tex, projectile.position - Main.screenPosition, null, lightColor * (projectile.timeLeft / 60f), 0, tex.Size() / 2, squishyScale * (2f - (projectile.timeLeft / 60f)), flip, 0); return false; } From 46b24365773589d712c7fd6a68efd4a65ea9e544 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sat, 8 Jan 2022 00:03:03 +0100 Subject: [PATCH 19/76] Lots of particle effects. Broken biome blade is done --- Dusts/PumplerDust.cs | 51 --------------- Items/Weapons/Melee/BiomeBlade.cs | 19 +++++- Particles/CritSpark.cs | 55 ++++++++++++++++ Particles/CritSpark.png | Bin 0 -> 362 bytes Particles/GeneralParticleHandler.cs | 10 ++- Particles/GenericBloom.cs | 43 ++++++++++++ Particles/HalfIceStar.png | Bin 0 -> 608 bytes Particles/HalfStar.png | Bin 0 -> 502 bytes Particles/MediumMist.png | Bin 0 -> 4973 bytes Particles/MediumMistParticle.cs | 57 ++++++++++++++++ Particles/SmallSmokeParticle.cs | 53 +++++++++++++++ Particles/SnowflakeSparkle.cs | 61 ++++++++++++++++++ Particles/StoneDebris.png | Bin 0 -> 604 bytes Particles/StoneDebrisParticle.cs | 40 ++++++++++++ Particles/StrongBloom.cs | 43 ++++++++++++ Particles/ThinSparkle.png | Bin 0 -> 401 bytes .../Melee/BrokenBiomeBladeProjectiles.cs | 44 +++++++++++++ Projectiles/Ranged/PumplerGrenade.cs | 10 ++- Projectiles/Ranged/PumplerHoldout.cs | 9 ++- 19 files changed, 428 insertions(+), 67 deletions(-) delete mode 100644 Dusts/PumplerDust.cs create mode 100644 Particles/CritSpark.cs create mode 100644 Particles/CritSpark.png create mode 100644 Particles/GenericBloom.cs create mode 100644 Particles/HalfIceStar.png create mode 100644 Particles/HalfStar.png create mode 100644 Particles/MediumMist.png create mode 100644 Particles/MediumMistParticle.cs create mode 100644 Particles/SmallSmokeParticle.cs create mode 100644 Particles/SnowflakeSparkle.cs create mode 100644 Particles/StoneDebris.png create mode 100644 Particles/StoneDebrisParticle.cs create mode 100644 Particles/StrongBloom.cs create mode 100644 Particles/ThinSparkle.png diff --git a/Dusts/PumplerDust.cs b/Dusts/PumplerDust.cs deleted file mode 100644 index ea6b3fc929..0000000000 --- a/Dusts/PumplerDust.cs +++ /dev/null @@ -1,51 +0,0 @@ -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ModLoader; - - -namespace CalamityMod.Dusts { - public class PumplerDust : ModDust //TURN THAT INTO A PARTICLE WHEN I REMEMBER - { - public override bool Autoload(ref string name, ref string texture) - { - texture = "CalamityMod/Particles/SmallSmoke"; - return true; - } - public override void OnSpawn(Dust dust) - { - dust.noGravity = true; - dust.frame = new Rectangle(0, 0, 24, 24); - } - - public override Color? GetAlpha(Dust dust, Color lightColor) - { - Color gray = new Color(40, 40, 40); - Color ret; - ret = Color.Lerp(Color.Orange, gray, MathHelper.Clamp((float)(dust.alpha - 100) / 80, 0f, 1f)); - return ret * ((255 - dust.alpha) / 255f); - } - - public override bool Update(Dust dust) - { - dust.velocity *= 0.85f; - - if (dust.alpha < 165) - { - Lighting.AddLight(dust.position, dust.color.ToVector3() * 0.1f); - dust.scale += 0.01f; - dust.alpha += 3; - } - else - { - dust.scale *= 0.975f; - dust.alpha += 2; - } - - dust.position += dust.velocity; - if (dust.alpha >= 255) - dust.active = false; - - return false; - } - } -} \ No newline at end of file diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index dc9c92c605..74a6e9e308 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -490,7 +490,7 @@ namespace CalamityMod.Items.Weapons.Melee Owner.heldProj = projectile.whoAmI; projectile.Center = Owner.Center + new Vector2(16f * Owner.direction, -30 * SwordHeight() + 10f) ; - projectile.rotation = Utils.AngleLerp(-MathHelper.PiOver4, MathHelper.PiOver4 + MathHelper.PiOver2, MathHelper.Clamp(((ChannelTimer - 20f) / 10f), 0f, 1f)); + projectile.rotation = Utils.AngleLerp(-MathHelper.PiOver4, MathHelper.PiOver4 + MathHelper.PiOver2, MathHelper.Clamp(((ChannelTimer - 20f) / 50f), 0f, 1f)); ChannelTimer++; projectile.timeLeft = 60; @@ -498,7 +498,22 @@ namespace CalamityMod.Items.Weapons.Melee { Attune((BiomeBlade)associatedItem.modItem); projectile.timeLeft = 120; - ChanneledState = 2f; + ChanneledState = 2f; //State where it stays invisible doing nothing. Acts as a cooldown + + Color particleColor = (associatedItem.modItem as BiomeBlade).GetAttunementInfo((associatedItem.modItem as BiomeBlade).mainAttunement).color; + + for (int i = 0; i <= 5; i++) + { + Vector2 displace = Vector2.UnitX * 20 * Main.rand.NextFloat(-1f, 1f); + Particle Glow = new GenericBloom(Owner.Bottom + displace, -Vector2.UnitY * Main.rand.NextFloat(1f, 5f), particleColor, 0.02f + Main.rand.NextFloat(0f, 0.2f), 20 + Main.rand.Next(30)); + GeneralParticleHandler.SpawnParticle(Glow); + } + for (int i = 0; i <= 10; i++) + { + Vector2 displace = Vector2.UnitX * 16 * Main.rand.NextFloat(-1f, 1f); + Particle Sparkle = new GenericSparkle(Owner.Bottom + displace, -Vector2.UnitY * Main.rand.NextFloat(1f, 5f), particleColor, particleColor, 0.5f + Main.rand.NextFloat(-0.2f, 0.2f), 20 + Main.rand.Next(30), 1, 2f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } } } diff --git a/Particles/CritSpark.cs b/Particles/CritSpark.cs new file mode 100644 index 0000000000..e41b8cd284 --- /dev/null +++ b/Particles/CritSpark.cs @@ -0,0 +1,55 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Particles +{ + public class CritSpark : Particle + { + public override string Texture => "CalamityMod/Particles/ThinSparkle"; + public override bool UseAdditiveBlend => true; + public override bool UseCustomDraw => true; + public override bool SetLifetime => true; + + private float Spin; + private float opacity; + private Color Bloom; + private Color LightColor => Bloom * opacity; + private float BloomScale; + + public CritSpark(Vector2 position, Vector2 velocity, Color color, Color bloom, float scale, int lifeTime, float rotationSpeed = 1f, float bloomScale = 1f) + { + Position = position; + Velocity = velocity; + Color = color; + Bloom = bloom; + Scale = scale; + Lifetime = lifeTime; + Rotation = Main.rand.NextFloat(MathHelper.TwoPi); + Spin = rotationSpeed; + BloomScale = bloomScale; + } + + public override void Update() + { + opacity = (float)Math.Sin(MathHelper.PiOver2 + LifetimeCompletion * MathHelper.PiOver2); + Velocity *= 0.80f; + Rotation += Spin * ((Velocity.X > 0) ? 1f : -1f) * (LifetimeCompletion > 0.5 ? 1f : 0.5f); + + Lighting.AddLight(Position, LightColor.R / 255f, LightColor.G / 255f, LightColor.B / 255f); + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + Texture2D sparkTexture = GeneralParticleHandler.GetTexture(Type); + Texture2D bloomTexture = ModContent.GetTexture("CalamityMod/Particles/BloomCircle"); + //Ajust the bloom's texture to be the same size as the star's + float properBloomSize = (float)sparkTexture.Height / (float)bloomTexture.Height; + + spriteBatch.Draw(bloomTexture, Position - Main.screenPosition, null, Bloom * opacity * 0.5f, 0, bloomTexture.Size() / 2f, Scale * BloomScale * properBloomSize, SpriteEffects.None, 0); + spriteBatch.Draw(sparkTexture, Position - Main.screenPosition, null, Color * opacity, Rotation, sparkTexture.Size() / 2f, Scale, SpriteEffects.None, 0); + } + } +} diff --git a/Particles/CritSpark.png b/Particles/CritSpark.png new file mode 100644 index 0000000000000000000000000000000000000000..13ee17462da2a4b5c283b949b62fa4bf4fbcca77 GIT binary patch literal 362 zcmV-w0hRuVP)Px$BuPX;R7i>KmO+YyFc3vwhB<+EQV-xl_kw~45+bTUQsOq^Sy(_P3->8q~x>#U0O@5dwkcv>Gn!H?%JTqj4>dORM$HnW=1BuRj+`u;?bhG77p zX&L~Eq5vR{OMaX0e2aU*y90N#MXm*^Zzb^rhX07*qo IM6N<$g4I@@i~s-t literal 0 HcmV?d00001 diff --git a/Particles/GeneralParticleHandler.cs b/Particles/GeneralParticleHandler.cs index 2be3028795..bfb5a3153b 100644 --- a/Particles/GeneralParticleHandler.cs +++ b/Particles/GeneralParticleHandler.cs @@ -14,7 +14,8 @@ namespace CalamityMod.Particles public static class GeneralParticleHandler { private static List particles; - private static int nextVacantIndex; + //List containing the particles to delete + private static List particlesToKill; //Static list for details concerning every particle type private static Dictionary particleTypes; private static Dictionary particleTextures; @@ -26,6 +27,7 @@ namespace CalamityMod.Particles internal static void Load() { particles = new List(); + particlesToKill = new List(); particleTypes = new Dictionary(); particleTextures = new Dictionary(); particleInstances = new List(); @@ -57,6 +59,7 @@ namespace CalamityMod.Particles internal static void Unload() { particles = null; + particlesToKill = null; particleTypes = null; particleTextures = null; particleInstances = null; @@ -87,12 +90,13 @@ namespace CalamityMod.Particles particle.Update(); } //Clear out particles whose time is up - particles.RemoveAll(particle => particle.Time >= particle.Lifetime && particle.SetLifetime); + particles.RemoveAll(particle => (particle.Time >= particle.Lifetime && particle.SetLifetime) || particlesToKill.Contains(particle)); + particlesToKill.Clear(); } public static void RemoveParticle(Particle particle) { - particles.Remove(particle); + particlesToKill.Add(particle); } public static void DrawAllParticles(SpriteBatch sb) diff --git a/Particles/GenericBloom.cs b/Particles/GenericBloom.cs new file mode 100644 index 0000000000..031a426111 --- /dev/null +++ b/Particles/GenericBloom.cs @@ -0,0 +1,43 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Particles +{ + public class GenericBloom : Particle + { + public override string Texture => "CalamityMod/Particles/Light"; + public override bool UseAdditiveBlend => true; + public override bool SetLifetime => true; + + private float opacity; + private Color BaseColor; + + public GenericBloom(Vector2 position, Vector2 velocity, Color color, float scale, int lifeTime) + { + Position = position; + Velocity = velocity; + BaseColor = color; + Scale = scale; + Lifetime = lifeTime; + Rotation = Main.rand.NextFloat(MathHelper.TwoPi); + } + + public override void Update() + { + opacity = (float)Math.Sin(LifetimeCompletion * MathHelper.Pi); + Color = BaseColor * opacity; + Lighting.AddLight(Position, Color.R / 255f, Color.G / 255f, Color.B / 255f); + Velocity *= 0.95f; + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + Texture2D tex = GeneralParticleHandler.GetTexture(Type); + + spriteBatch.Draw(tex, Position - Main.screenPosition, null, Color * opacity, Rotation, tex.Size() / 2f, Scale, SpriteEffects.None, 0); + } + } +} diff --git a/Particles/HalfIceStar.png b/Particles/HalfIceStar.png new file mode 100644 index 0000000000000000000000000000000000000000..1dae18cc577e5756e2a5080152d787be4c85c269 GIT binary patch literal 608 zcmV-m0-ybfP)Px%8c9S!R9J<*n9phyK^Vk;J+o*u2K<9~$T`9a3webEyyuj2@RFO46j>t4A-;qU z;CVsNdkmAr()mbNsttB5-0%Afr|xoFM*$UH*JfYbs_+RhPnaKZrY^@ zfY*uT|3&Yv14zSgeQjtySDt#nX*5y03Q47;L*2%q%Zt=?;?715ft~?9;5;gO1x$cn zw;s@CK|ePO7+(J*8A4e922dvAVE)^ zkYn>{?k<{pvKmsYirZ8}ux&jg<7AZtzu_D6x}R#uL?2JvC?VmdOW@=q>N<|A}jifE}?ZAMMTn0000Px$ut`KgR9J<@m`!fNFc3zc6O_`bT~Mi4=#D*0&cSuK3+JFa_TBXgmCB-3OA*O* z;jus_4zbgOPeQ{CvHkorj*THwB4YHb0SX`kDqs%?fH6j5>dX=W9K;xSQELLv{V#+k z1LRsqehLw*R0!9g1IWDiAP~ZFO+2VI8XpY8fw+ZPqylt>$gvqQQk!1`VgyXEqcBmw zUx=EtYs`+AH0_$AQ|ulw^&w)^3L?;}0=Nb4)fO$wg&{=5gg$|CQ(&R~LjAK&wW&9Y zAwJOKP0@L*tc>FBh=74i?=mI-s>ow5^B4s)Rdz@Q(@ukM2-=?W+;uqL>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jYxxd7(ek*))VOUAX zCQsU)R_>>mKjQ1}KlgO#Fy+CuZ-F9r8-2jJfL#XGAB>?;>zI1)6#%2J8bNnhA+xc7 z5p}eQGrmvfzLr>cm6ab@`3CF7jHn|?3WWk3V&B1kionx=LR+&;5tqF*N`QAFpi3$$ zBzJdr^LFD{W@f6ojLX&k02o{|SI*x*pf!P^fe7%$eFe^C2lTtp#7K63rzz@+e<-PH zoqUN`iZ4e_TLkxd+Se#fDfHVC7u)Dhq>|t?nQUJ}UssKo>&xssp*8idh@S49AM?yX z!4xF1i*T?A(?z`3jr2(9pe~U)5b^hB)+3)>tvD>0d**B*P&8IGDodl$THYB}TDD>~ z|E>MTIV4tM791G3SyHVsU}5rdtMYGTr+cqMlRjew|;VAVL``@rFlc+as~m!!{^$Nkrud?mNWd2@fbJS zvG~cNwS)mWIXxeL^cg3OJ73N0*BVcFxA$20s2ukN9)#Xt(Ci;6k}vqu+Fa z^d_tAN0jDYb^bCg_tp=^%t1e!B?L1qE(A|6%Dtfv9z5VoykkOqx$61!X)(|w5Hc-m z4gO5WJp{=O*hSC^@Vr6HqtEt+{~%y5_4jXybLXyk5p(`T`&Zh@L;0ES$pLTX` zENba z1lMSP%%6cdFvhd#6oLn#!eItv z@}OH3zmA_#|B4o@ze_Q)V^ua0>)xzijfL*V~ X0n)5*WdjAz&me|+X1a|!E;0WHVBE#d literal 0 HcmV?d00001 diff --git a/Particles/MediumMistParticle.cs b/Particles/MediumMistParticle.cs new file mode 100644 index 0000000000..5be71415c8 --- /dev/null +++ b/Particles/MediumMistParticle.cs @@ -0,0 +1,57 @@ +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + + +namespace CalamityMod.Particles { + public class MediumMistParticle : Particle + { + public override string Texture => "CalamityMod/Particles/MediumMist"; + public override int FrameVariants => 3; + public override bool UseAdditiveBlend => true; + + + private float Opacity; + private Color ColorFire; + private Color ColorFade; + private float Spin; + + public MediumMistParticle(Vector2 position, Vector2 velocity, Color colorFire, Color colorFade, float scale, float opacity, float rotationSpeed = 0f) + { + Position = position; + Velocity = velocity; + ColorFire = colorFire; + ColorFade = colorFade; + Scale = scale; + Opacity = opacity; + Rotation = Main.rand.NextFloat(MathHelper.TwoPi); + Spin = rotationSpeed; + Variant = Main.rand.Next(3); + } + + public override void Update() + { + + Rotation += Spin * ((Velocity.X > 0) ? 1f : -1f); + Velocity *= 0.85f; + + if (Opacity > 90) + { + Lighting.AddLight(Position, Color.ToVector3() * 0.1f); + Scale += 0.01f; + Opacity -= 3; + } + else + { + Scale *= 0.975f; + Opacity -= 2; + } + if (Opacity < 0) + Kill(); + + Color = Color.Lerp(ColorFire, ColorFade, MathHelper.Clamp((float)((255 -Opacity) - 100) / 80, 0f, 1f)) * (Opacity / 255f); + + } + } +} \ No newline at end of file diff --git a/Particles/SmallSmokeParticle.cs b/Particles/SmallSmokeParticle.cs new file mode 100644 index 0000000000..08bc36c0a6 --- /dev/null +++ b/Particles/SmallSmokeParticle.cs @@ -0,0 +1,53 @@ +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + + +namespace CalamityMod.Particles { + public class SmallSmokeParticle : Particle + { + public override string Texture => "CalamityMod/Particles/SmallSmoke"; + + private float Opacity; + private Color ColorFire; + private Color ColorFade; + private float Spin; + + public SmallSmokeParticle(Vector2 position, Vector2 velocity, Color colorFire, Color colorFade, float scale, float opacity, float rotationSpeed = 0f) + { + Position = position; + Velocity = velocity; + ColorFire = colorFire; + ColorFade = colorFade; + Scale = scale; + Opacity = opacity; + Rotation = Main.rand.NextFloat(MathHelper.TwoPi); + Spin = rotationSpeed; + } + + public override void Update() + { + + Rotation += Spin * ((Velocity.X > 0) ? 1f : -1f); + Velocity *= 0.85f; + + if (Opacity > 90) + { + Lighting.AddLight(Position, Color.ToVector3() * 0.1f); + Scale += 0.01f; + Opacity -= 3; + } + else + { + Scale *= 0.975f; + Opacity -= 2; + } + if (Opacity < 0) + Kill(); + + Color = Color.Lerp(ColorFire, ColorFade, MathHelper.Clamp((float)((255 -Opacity) - 100) / 80, 0f, 1f)) * (Opacity / 255f); + + } + } +} \ No newline at end of file diff --git a/Particles/SnowflakeSparkle.cs b/Particles/SnowflakeSparkle.cs new file mode 100644 index 0000000000..6e143e6ea6 --- /dev/null +++ b/Particles/SnowflakeSparkle.cs @@ -0,0 +1,61 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Particles +{ + public class SnowflakeSparkle : Particle + { + public override string Texture => "CalamityMod/Particles/HalfIceStar"; + public override bool UseAdditiveBlend => true; + public override bool UseCustomDraw => true; + public override bool SetLifetime => true; + + private float Spin; + private float opacity; + private Color Bloom; + private Color LightColor => Bloom * opacity; + private float BloomScale; + private int Spokes; + + public SnowflakeSparkle(Vector2 position, Vector2 velocity, Color color, Color bloom, float scale, int lifeTime, float rotationSpeed = 1f, float bloomScale = 1f, int spokes = 3) + { + Position = position; + Velocity = velocity; + Color = color; + Bloom = bloom; + Scale = scale; + Lifetime = lifeTime; + Rotation = Main.rand.NextFloat(MathHelper.TwoPi); + Spin = rotationSpeed; + BloomScale = bloomScale; + Spokes = spokes; + } + + public override void Update() + { + opacity = (float)Math.Sin(LifetimeCompletion * MathHelper.Pi); + Lighting.AddLight(Position, LightColor.R / 255f, LightColor.G / 255f, LightColor.B / 255f); + Velocity *= 0.95f; + Rotation += Spin * ((Velocity.X > 0) ? 1f : -1f); + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + Texture2D spokesTexture = GeneralParticleHandler.GetTexture(Type); + Texture2D bloomTexture = ModContent.GetTexture("CalamityMod/Particles/BloomCircle"); + //Ajust the bloom's texture to be the same size as the star's + float properBloomSize = (float)spokesTexture.Height / (float)bloomTexture.Height; + + spriteBatch.Draw(bloomTexture, Position - Main.screenPosition, null, Bloom * opacity * 0.5f, 0, bloomTexture.Size()/2f, Scale * BloomScale * properBloomSize, SpriteEffects.None, 0); + + for (int i = 0; i < Spokes; i++) + { + float rotation = Rotation + MathHelper.Lerp(0f, MathHelper.Pi, i/(float)Spokes); + spriteBatch.Draw(spokesTexture, Position - Main.screenPosition, null, Color * opacity * 0.5f, Rotation + rotation, spokesTexture.Size() / 2f, Scale, SpriteEffects.None, 0); + } + } + } +} diff --git a/Particles/StoneDebris.png b/Particles/StoneDebris.png new file mode 100644 index 0000000000000000000000000000000000000000..9dad21abf46e2074f166bd477dc37fdc6ad7da17 GIT binary patch literal 604 zcmV-i0;BzjP)Px%7D+@wR9J<@mrahUKomw#wXGNiBqk=#+<;?8uD}($2*zx{8NtM;6M;l};@3~= zQD7doUw&}HCGCKlU@Cnj1?cHEJ!Rd5*YoWhx zHk%p6fp$8bPED63X*!)cfV!>$sHzGZ0__C2rzHR;lSymglSq{~OEX!K-cDXQQIi%49A7xp7SJ;2rU@XC>tlw_8)*q^oQm8JN=0dMU zMWV9TE*o{>*9Bj`W&3ROy&jV9oAEx78a~+4(?HuM9~!U{5eKA80x+iUP3w3i|#}1Hmq>>6{b)#V$`N&MU*ids{|r=P)q|H_X+-eu zl&*RpABn^+4nn7PNfG)ICq^e0#k#y2nhWG3|71J9FYI "CalamityMod/Particles/StoneDebris"; + public override bool SetLifetime => true; + public override int FrameVariants => 5; + + private float Spin; + private float opacity; + Color originalColor; + + public StoneDebrisParticle(Vector2 position, Vector2 velocity, Color color, float scale, int lifeTime, float rotationSpeed = 1f) + { + Position = position; + Velocity = velocity; + Color = color; + originalColor = color; + Scale = scale; + Lifetime = lifeTime; + Rotation = Main.rand.NextFloat(MathHelper.TwoPi); + Spin = rotationSpeed; + Variant = Main.rand.Next(3); + } + + public override void Update() + { + opacity = LifetimeCompletion < 0.5f ? 1f : (float)Math.Sin(LifetimeCompletion * MathHelper.Pi); + Color = originalColor * opacity; + Velocity = Velocity * 0.95f + Vector2.UnitY * 0.1f; + Rotation += Spin * ((Velocity.X > 0) ? 1f : -1f); + } + } +} diff --git a/Particles/StrongBloom.cs b/Particles/StrongBloom.cs new file mode 100644 index 0000000000..8af6bee27c --- /dev/null +++ b/Particles/StrongBloom.cs @@ -0,0 +1,43 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Particles +{ + public class StrongBloom : Particle + { + public override string Texture => "CalamityMod/Particles/BloomCircle"; + public override bool UseAdditiveBlend => true; + public override bool SetLifetime => true; + + private float opacity; + private Color BaseColor; + + public StrongBloom(Vector2 position, Vector2 velocity, Color color, float scale, int lifeTime) + { + Position = position; + Velocity = velocity; + BaseColor = color; + Scale = scale; + Lifetime = lifeTime; + Rotation = Main.rand.NextFloat(MathHelper.TwoPi); + } + + public override void Update() + { + opacity = (float)Math.Sin(LifetimeCompletion * MathHelper.Pi); + Color = BaseColor * opacity; + Lighting.AddLight(Position, Color.R / 255f, Color.G / 255f, Color.B / 255f); + Velocity *= 0.95f; + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + Texture2D tex = GeneralParticleHandler.GetTexture(Type); + + spriteBatch.Draw(tex, Position - Main.screenPosition, null, Color * opacity, Rotation, tex.Size() / 2f, Scale, SpriteEffects.None, 0); + } + } +} diff --git a/Particles/ThinSparkle.png b/Particles/ThinSparkle.png new file mode 100644 index 0000000000000000000000000000000000000000..1d698a9c8361702f27b38bc3f23907fffd34a989 GIT binary patch literal 401 zcmV;C0dD?@P)Px$OG!jQR49>sk};~|Fcd|Pq%Q)-g+VqdUASO zn`Uf&J~MMGNk>-?uC4+^Yt45#=kVUMEDJG4eoAi!tuxu zk*@0`gz&+wwet0TztLLnDUIWZbB^cp$uv!jE$ v+k_2n`^V$)F=1P$lu&?tH~p`B+k?LWGxN0nv*k 0.75f) + { + Vector2 particlePosition = Owner.Center + (rotation.ToRotationVector2() * 100f * projectile.scale); + Particle snowflake = new SnowflakeSparkle(particlePosition, rotation.ToRotationVector2() * 3f, Color.White, new Color(75, 177, 250), Main.rand.NextFloat(0.3f, 1.5f), 40, 0.5f); + GeneralParticleHandler.SpawnParticle(snowflake); } //Make the owner look like theyre holding the sword bla bla @@ -512,6 +526,27 @@ namespace CalamityMod.Projectiles.Melee PogoCooldown = 30; //Cooldown Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.position); + Vector2 hitPosition = Owner.Center + (direction * 84 * projectile.scale); + + for (int i = 0; i < 8; i++) + { + Vector2 hitPositionDisplace = direction.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(-10f, 10f); + Vector2 flyDirection = -direction.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4)); + Particle smoke = new SmallSmokeParticle(hitPosition + hitPositionDisplace, flyDirection * 9f, Color.OrangeRed, new Color(130, 130, 130), Main.rand.NextFloat(1.8f, 2.6f), 115 - Main.rand.Next(30)); + GeneralParticleHandler.SpawnParticle(smoke); + + Particle Glow = new StrongBloom(hitPosition - hitPositionDisplace * 3, -direction * 6 * Main.rand.NextFloat(0.5f, 1f), Color.Orange * 0.5f, 0.01f + Main.rand.NextFloat(0f, 0.2f), 20 + Main.rand.Next(40)); + GeneralParticleHandler.SpawnParticle(Glow); + } + for (int i = 0; i < 3; i++) + { + Vector2 hitPositionDisplace = direction.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(-10f, 10f); + Vector2 flyDirection = -direction.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4)); + + Particle Rock = new StoneDebrisParticle(hitPosition - hitPositionDisplace * 3, flyDirection * Main.rand.NextFloat(3f, 6f), Color.Beige, 1f + Main.rand.NextFloat(0f, 0.4f), 30 + Main.rand.Next(50), 0.1f); + GeneralParticleHandler.SpawnParticle(Rock); + } + if (Owner.HeldItem.type == ItemType()) (Owner.HeldItem.modItem as BiomeBlade).CanLunge = 1; // Reset the lunge counter on pogo. This should make for more interesting and fun synergies } @@ -729,7 +764,16 @@ namespace CalamityMod.Projectiles.Melee if (Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), projectile.Center - projectileHalfLenght, projectile.Center + projectileHalfLenght, 32, ref collisionPoint)) { if (SnapCoyoteTime > 0f) + { crit = true; + for (int i = 0; i < 3; i++) + { + Vector2 sparkSpeed = Owner.DirectionTo(target.Center).RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver2, MathHelper.PiOver2)) * 9f; + Particle Spark = new CritSpark(target.Center, sparkSpeed, Color.White, Color.LimeGreen, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 0.6f); + GeneralParticleHandler.SpawnParticle(Spark); + } + + } } else damage = (int)(damage * ChainDamageReduction); //If the enemy is hit with the chain of the whip, the damage gets reduced diff --git a/Projectiles/Ranged/PumplerGrenade.cs b/Projectiles/Ranged/PumplerGrenade.cs index f6578cade1..dcfa1c4db2 100644 --- a/Projectiles/Ranged/PumplerGrenade.cs +++ b/Projectiles/Ranged/PumplerGrenade.cs @@ -4,6 +4,7 @@ using Terraria; using Terraria.ModLoader; using Terraria.ID; using CalamityMod.Dusts; +using CalamityMod.Particles; namespace CalamityMod.Projectiles.Ranged { @@ -35,13 +36,10 @@ namespace CalamityMod.Projectiles.Ranged { for (int i = 0; i < 15; i++) { - Dust dust = Dust.NewDustPerfect(projectile.Center + Main.rand.NextVector2Circular(15f, 15f), ModContent.DustType()); - dust.velocity = (dust.position - projectile.Center) * 0.2f + projectile.velocity; - dust.scale = Main.rand.NextFloat(0.8f, 1.6f); - dust.alpha = Main.rand.Next(30) + 100; - dust.rotation = Main.rand.NextFloat(6.28f); + Particle smoke = new SmallSmokeParticle(projectile.Center + Main.rand.NextVector2Circular(15f, 15f), Vector2.Zero, Color.Orange, new Color(40, 40, 40), Main.rand.NextFloat(0.8f, 1.6f), 145 - Main.rand.Next(30)); + smoke.Velocity = (smoke.Position - projectile.Center) * 0.2f + projectile.velocity; + GeneralParticleHandler.SpawnParticle(smoke); } - //CalamityUtils.ExplosionGores(projectile.Center, 1); } projectile.Kill(); } diff --git a/Projectiles/Ranged/PumplerHoldout.cs b/Projectiles/Ranged/PumplerHoldout.cs index 182df02321..9b9c23fadf 100644 --- a/Projectiles/Ranged/PumplerHoldout.cs +++ b/Projectiles/Ranged/PumplerHoldout.cs @@ -10,6 +10,7 @@ using Terraria.Graphics.Effects; using System.Collections.Generic; using Terraria.Graphics.Shaders; using CalamityMod.Dusts; +using CalamityMod.Particles; //TY dom for coding condemnation, great reference, would steal code from again :) @@ -128,11 +129,9 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 2 * PumpkinsCharge; i++) { - Dust dust = Dust.NewDustPerfect(tipPosition + Main.rand.NextVector2Circular(10f, 10f), ModContent.DustType()); - dust.velocity = (dust.position - Owner.Center) * 0.3f + Owner.velocity; - dust.scale = Main.rand.NextFloat(0.3f, 0.8f); - dust.alpha = Main.rand.Next(50) + 100; - dust.rotation = Main.rand.NextFloat(6.28f); + Particle smoke = new SmallSmokeParticle(tipPosition + Main.rand.NextVector2Circular(10f, 10f), Vector2.Zero, Color.Orange, new Color(40, 40, 40), Main.rand.NextFloat(0.3f, 0.8f), 145 - Main.rand.Next(50)); + smoke.Velocity = (smoke.Position - Owner.Center) * 0.3f + Owner.velocity; + GeneralParticleHandler.SpawnParticle(smoke); } } From 90e218460c4cad0fe81b6b749c9ae5d6b9762b93 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sat, 8 Jan 2022 00:05:27 +0100 Subject: [PATCH 20/76] Tooltip update --- Items/Weapons/Melee/BiomeBlade.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index 74a6e9e308..27e0979493 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Melee DisplayName.SetDefault("Broken Biome Blade"); //Broken Ecoliburn lmfao. Tbh a proper name instead of just "biome blade" may be neat given the importance of the sword Tooltip.SetDefault("FUNCTION_DESC\n" + "Use RMB while standing still on the ground to attune the weapon to the powers of the surrounding biome\n" + - "Using RMB while moving or in the air switches between the current attunement and an extra stored one\n" + + "Using RMB otherwise switches between the current attunement and an extra stored one\n" + "Main attunement : None\n" + "Secondary attunement: None\n"); //Theres potential for flavor text as well but im not a writer } From dfbb6f60b22c74673bb90dd313be6d71af86e861 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sat, 8 Jan 2022 01:17:22 +0100 Subject: [PATCH 21/76] Base for the mended biome blade --- CalPlayer/CalamityPlayerMiscEffects.cs | 2 + Items/Weapons/Melee/TrueBiomeBlade.cs | 631 ++++++++++++++++++++++++- 2 files changed, 620 insertions(+), 13 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 5b3dad776b..5741d2c930 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -160,6 +160,8 @@ namespace CalamityMod.CalPlayer // in the global classes. Attempting to update them there will cause multiple updates to one set for multiple items. CalamityGlobalItem.UpdateAllParticleSets(); BiomeBlade.UpdateAllParticleSets(); + TrueBiomeBlade.UpdateAllParticleSets(); + // Update the gem tech armor set. GemTechState.Update(); diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index d3798af489..bf29b07b69 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -1,24 +1,161 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; +using CalamityMod.Particles; using CalamityMod.Projectiles.Melee; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using Terraria.ModLoader.IO; +using static CalamityMod.CalamityUtils; +using static CalamityMod.Items.Weapons.Melee.TrueBiomeBlade; +using static Terraria.ModLoader.ModContent; namespace CalamityMod.Items.Weapons.Melee { public class TrueBiomeBlade : ModItem { + public enum Attunement : byte { Default, Hot, Cold, Tropical, Evil, Holy, HolyStar, Marine } + public Attunement? mainAttunement = null; + public Attunement? secondaryAttunement = null; + public int Combo = 0; + public int StoredLunges = 2; + public int PowerLungeCounter = 0; + public override void SetStaticDefaults() { - DisplayName.SetDefault("True Biome Blade"); - Tooltip.SetDefault("Fires different projectiles based on what biome you're in"); + DisplayName.SetDefault("Mended Biome Blade"); + Tooltip.SetDefault("FUNCTION_DESC\n" + + "FUNCTION_EXTRA\n" + + "Use RMB while standing still on the ground to attune the weapon to the powers of the surrounding biome\n" + + "Using RMB otherwise switches between the current attunement and an extra stored one\n" + + "Main attunement : None\n" + + "Secondary attunement: None\n"); //Theres potential for flavor text as well but im not a writer } + #region tooltip editing + + public override void ModifyTooltips(List list) + { + Player player = Main.player[Main.myPlayer]; + if (player is null) + return; + + foreach (TooltipLine l in list) + { + if (l.text.StartsWith("FUNCTION_DESC")) + { + AttunementInfo info = GetAttunementInfo(mainAttunement); + l.overrideColor = info.color; + l.text = info.function_description; + } + + if (l.text.StartsWith("FUNCTION_Extra")) + { + AttunementInfo info = GetAttunementInfo(mainAttunement); + l.overrideColor = info.color; + l.text = info.function_description; + } + + if (l.text.StartsWith("Main attunement")) + { + AttunementInfo info = GetAttunementInfo(mainAttunement); + l.overrideColor = info.color; + l.text = "Main Attumenent : [" + info.name + "]"; + } + + if (l.text.StartsWith("Secondary attunement")) + { + AttunementInfo info = GetAttunementInfo(secondaryAttunement); + l.overrideColor = Color.Lerp(info.color, Color.Gray, 0.5f); + l.text = "Secondary Attumenent : [" + info.name + "]"; + } + } + } + + internal struct AttunementInfo + { + public string name; + public string function_description; + public string function_extra; + public Color color; + } + + internal AttunementInfo GetAttunementInfo(Attunement? attunement) + { + AttunementInfo AttunementInfo = new AttunementInfo(); + + switch (attunement) + { + case Attunement.Default: + AttunementInfo.name = "Pure Clarity"; + AttunementInfo.function_description = "Fires a weak projectile that crushes enemy defenses"; + AttunementInfo.function_extra = ""; //WHAT DO I MAKE IT DO AS AN EXTRA PLLSS IDK ITS SUCH A BORING ATTUNEMENT,,, + AttunementInfo.color = new Color(171, 180, 73); + break; + case Attunement.Hot: + AttunementInfo.name = "Arid Grandeur"; + AttunementInfo.function_description = "Conjures searing blades in front of you that get larger and stronger the more you hit enemies. The blades can also be used to bounce off tiles when in the air"; + AttunementInfo.function_extra = "Releasing LMB after charging up the blades sends them out flying to shred your foes"; + AttunementInfo.color = new Color(238, 156, 73); + break; + case Attunement.Cold: + AttunementInfo.name = "Biting Embrace"; + AttunementInfo.function_description = "Perform a 3 strike combo with a glacial blade. The final strike freezes foes for a split second"; + AttunementInfo.function_extra = "Lingering glacial mist is released on each swing, dealing damage to enemies wandering into it"; + AttunementInfo.color = new Color(165, 235, 235); + break; + case Attunement.Tropical: + AttunementInfo.name = "Grovetender's Touch"; + AttunementInfo.function_description = "Throw out the blade using a vine whip. Striking enemies with the tip of the whip as it cracks guarantees a critical hit. The whip will also propel you towards struck tiles"; + AttunementInfo.function_extra = "Critical strikes do (SOMETHING)"; + AttunementInfo.color = new Color(162, 200, 85); + break; + case Attunement.Evil: + AttunementInfo.name = "Decay's Retort"; + AttunementInfo.function_description = "Lunge forward using a ghostly rapier projection that leeches life off any struck foes. You also get bounced away from hit targets"; + AttunementInfo.function_extra = "Lining up three strikes without touching the ground empowers the next strike into a powerful dash thrust "; + AttunementInfo.color = new Color(211, 64, 147); + break; + case Attunement.Holy: + AttunementInfo.name = "Heaven's Might"; + AttunementInfo.function_description = "Hold LMB to charge up a heaven-piercing sword thrust, and release to unleash the devastating blow"; + AttunementInfo.function_extra = "Striking the ground will create an impact so powerful, massive fragments of crystal will rise up from the earth"; + AttunementInfo.color = new Color(220, 143, 255); + break; + case Attunement.HolyStar: + AttunementInfo.name = "Heaven's Abhorrence"; + AttunementInfo.function_description = "Hold LMB to charge up a star-ravaging sword thrust, and release to unleash the devastating blow"; + AttunementInfo.function_extra = "Striking the ground will create an impact so powerful, massive otherwordly monoliths will rise up from the earth"; + AttunementInfo.color = new Color(136, 133, 23); + break; + case Attunement.Marine: + AttunementInfo.name = "Gesture for the Drowned"; + AttunementInfo.function_description = "Shoot out two water balls at your sides. On ground contact the water balls will turn into small waves that ride along the ground"; + AttunementInfo.function_extra = "If used while submerged, or if the waves contact water, the waves will expand and move much faster"; + AttunementInfo.color = new Color(98, 225, 255); + break; + default: + AttunementInfo.name = "None"; + AttunementInfo.function_description = "Does nothing... yet"; + AttunementInfo.function_extra = "Repairing the blade did increase its attuning capacities"; + AttunementInfo.color = new Color(163, 163, 163); + break; + } + + return AttunementInfo; + } + + #endregion + public override void SetDefaults() { - item.width = 54; + item.width = item.height = 68; item.damage = 160; item.melee = true; item.useAnimation = 21; @@ -28,33 +165,501 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 7.5f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 54; item.value = Item.buyPrice(0, 80, 0, 0); item.rare = ItemRarityID.Yellow; - item.shoot = ModContent.ProjectileType(); + item.shoot = ProjectileID.PurificationPowder; item.shootSpeed = 12f; } public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType()); - recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ItemType()); + recipe.AddIngredient(ItemType(), 5); recipe.AddIngredient(ItemID.Ectoplasm, 5); - recipe.AddIngredient(ModContent.ItemType(), 10); - recipe.AddIngredient(ModContent.ItemType(), 10); - recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ItemType(), 10); //Hilarious abyss mats moment. Shall we change that since the abyss gets a attunement anyways + recipe.AddIngredient(ItemType(), 10); + recipe.AddIngredient(ItemType(), 5); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); } - public override void MeleeEffects(Player player, Rectangle hitbox) + #region Saving and syncing attunements + public override bool CloneNewInstances => true; + + public override ModItem Clone(Item item) { - if (Main.rand.NextBool(5)) + var clone = base.Clone(item); + if (Main.mouseItem.type == ItemType()) + item.modItem.HoldItem(Main.player[Main.myPlayer]); + (clone as TrueBiomeBlade).mainAttunement = (item.modItem as TrueBiomeBlade).mainAttunement; + (clone as TrueBiomeBlade).secondaryAttunement = (item.modItem as TrueBiomeBlade).secondaryAttunement; + + return clone; + } + + public override ModItem Clone() //ditto + { + var clone = base.Clone(); + (clone as TrueBiomeBlade).mainAttunement = mainAttunement; + (clone as TrueBiomeBlade).secondaryAttunement = secondaryAttunement; + + return clone; + } + + public override TagCompound Save() + { + int attunement1 = mainAttunement == null ? -1 : (int)mainAttunement; + int attunement2 = secondaryAttunement == null ? -1 : (int)secondaryAttunement; + TagCompound tag = new TagCompound { - int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 0); + { "mainAttunement", attunement1 }, + { "secondaryAttunement", attunement2 } + }; + return tag; + } + + public override void Load(TagCompound tag) + { + int attunement1 = tag.GetInt("mainAttunement"); + int attunement2 = tag.GetInt("secondaryAttunement"); + if (attunement1 == -1) + mainAttunement = null; + else + mainAttunement = (Attunement?)attunement1; + + if (attunement2 == -1 || (attunement1 == attunement2)) + secondaryAttunement = null; + else + secondaryAttunement = (Attunement?)attunement2; + } + + public override void NetSend(BinaryWriter writer) + { + writer.Write((byte)mainAttunement); + writer.Write((byte)secondaryAttunement); + } + + public override void NetRecieve(BinaryReader reader) + { + mainAttunement = (Attunement?)reader.ReadByte(); + secondaryAttunement = (Attunement?)reader.ReadByte(); + } + + #endregion + + + public override void HoldItem(Player player) + { + + player.Calamity().rightClickListener = true; + + if (player.velocity.Y == 0) //reset the amount of lunges on ground contact, but also set the power lunge counter back to zero + { + StoredLunges = 2; + PowerLungeCounter = 0; } + + //Change the swords function based on its attunement + switch (mainAttunement) + { + case Attunement.Default: + item.channel = false; + item.noUseGraphic = false; + item.useStyle = ItemUseStyleID.SwingThrow; + item.shoot = ProjectileType(); + item.shootSpeed = 12f; + item.UseSound = SoundID.Item1; + item.noMelee = false; + + Combo = 0; + PowerLungeCounter = 0; + break; + case Attunement.Hot: + item.channel = true; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.HoldingOut; + item.shoot = ProjectileType(); + item.shootSpeed = 12f; + item.UseSound = null; + item.noMelee = true; + + Combo = 0; + PowerLungeCounter = 0; + break; + case Attunement.Cold: + item.channel = true; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.HoldingOut; + item.shoot = ProjectileType(); + item.shootSpeed = 12f; + item.UseSound = null; + item.noMelee = true; + + PowerLungeCounter = 0; + break; + case Attunement.Tropical: + item.channel = false; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.SwingThrow; + item.shoot = ProjectileType(); + item.shootSpeed = 30; + item.UseSound = null; + item.noMelee = true; + + Combo = 0; + PowerLungeCounter = 0; + break; + case Attunement.Evil: + item.channel = false; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.Stabbing; + item.shoot = ProjectileType(); + item.shootSpeed = 12f; + item.UseSound = null; + item.noMelee = true; + + Combo = 0; + break; + case Attunement.Holy: + case Attunement.HolyStar: + item.channel = true; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.Stabbing; + item.shoot = ProjectileType(); + item.shootSpeed = 12f; + item.UseSound = null; + item.noMelee = true; + + Combo = 0; + PowerLungeCounter = 0; + break; + case Attunement.Marine: + item.channel = false; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.Stabbing; + item.shoot = ProjectileType(); + item.shootSpeed = 12f; + item.UseSound = null; + item.noMelee = true; + + Combo = 0; + PowerLungeCounter = 0; + break; + default: + item.noUseGraphic = false; + item.useStyle = ItemUseStyleID.SwingThrow; + item.shoot = ProjectileID.PurificationPowder; + item.shootSpeed = 12f; + item.UseSound = SoundID.Item1; + + Combo = 0; + PowerLungeCounter = 0; + break; + } + + if (player.Calamity().mouseRight && CanUseItem(player) && player.whoAmI == Main.myPlayer && !Main.mapFullscreen) + { + //Don't shoot out a visual blade if you already have one out + if (Main.projectile.Any(n => n.active && n.type == ProjectileType() && n.owner == player.whoAmI)) + return; + + int x = (int)player.Center.X / 16; + int y = (int)(player.position.Y + (float)player.height - 1f) / 16; + Tile tileStandingOn = Main.tile[x, y + 1]; + + bool mayAttune = player.StandingStill() && !player.mount.Active && tileStandingOn.IsTileSolidGround(); + if (player.whoAmI == Main.myPlayer) + Main.PlaySound(SoundID.DD2_DarkMageHealImpact); + Vector2 displace = new Vector2(18f, 0f); + Projectile.NewProjectile(player.Top + displace, Vector2.Zero, ProjectileType(), 0, 0, player.whoAmI, mayAttune ? 0f : 1f); + } + } + + public override bool CanUseItem(Player player) + { + return !Main.projectile.Any(n => n.active && n.owner == player.whoAmI && + (n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType())); + } + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (mainAttunement == null) + return false; + + switch (mainAttunement) + { + case Attunement.Cold: + switch (Combo) + { + case 0: + Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 0, 15); + break; + + case 1: + Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 1, 20); + break; + + case 2: + Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 2, 50); + break; + } + Combo++; + if (Combo > 2) + Combo = 0; + return false; + + case Attunement.Evil: + float powerLungeAvailable = 0f; + if (PowerLungeCounter == 3) + { + powerLungeAvailable = 1f; + PowerLungeCounter = 0; + } + Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage * 2, knockBack, player.whoAmI, (float)StoredLunges), (float)powerLungeAvailable); + StoredLunges --; + if (StoredLunges < 0) + StoredLunges = 0; + return false; + + case Attunement.Holy: + case Attunement.HolyStar: + float astralVariant = mainAttunement == Attunement.HolyStar ? 1f : 0f; + Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage * 2, knockBack, player.whoAmI, astralVariant); + return false; + + default: + return base.Shoot(player, ref position, ref speedX, ref speedY, ref type, ref damage, ref knockBack); + } + } + + internal static ChargingEnergyParticleSet BiomeEnergyParticles = new ChargingEnergyParticleSet(-1, 2, Color.White, Color.White, 0.04f, 20f); + internal static void UpdateAllParticleSets() + { + BiomeEnergyParticles.Update(); + } + + public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) + { + Texture2D itemTexture = Main.itemTexture[item.type]; + Rectangle itemFrame = (Main.itemAnimations[item.type] == null) ? itemTexture.Frame() : Main.itemAnimations[item.type].GetFrame(itemTexture); + + if (mainAttunement == null) + return true; + + // Draw all particles. + + Vector2 particleDrawCenter = position + new Vector2(12f, 16f) * Main.inventoryScale; + + switch (mainAttunement) + { + case Attunement.Default: + BiomeEnergyParticles.EdgeColor = new Color(117, 126, 72); + BiomeEnergyParticles.CenterColor = new Color(200, 184, 136); + break; + case Attunement.Hot: + BiomeEnergyParticles.EdgeColor = new Color(137, 32, 0); + BiomeEnergyParticles.CenterColor = new Color(209, 154, 0); + break; + case Attunement.Cold: + BiomeEnergyParticles.EdgeColor = new Color(165, 235, 235); + BiomeEnergyParticles.CenterColor = new Color(58, 110, 141); + break; + case Attunement.Tropical: + BiomeEnergyParticles.EdgeColor = new Color(53, 112, 4); + BiomeEnergyParticles.CenterColor = new Color(131, 173, 39); + break; + case Attunement.Evil: + BiomeEnergyParticles.EdgeColor = new Color(112, 4, 35); + BiomeEnergyParticles.CenterColor = new Color(195, 42, 200); + break; + case Attunement.Holy: + case Attunement.HolyStar: + BiomeEnergyParticles.EdgeColor = new Color(62, 55, 110); + BiomeEnergyParticles.CenterColor = new Color(255, 143, 255); + break; + case Attunement.Marine: + BiomeEnergyParticles.EdgeColor = new Color(27, 59, 101); + BiomeEnergyParticles.CenterColor = new Color(27, 112643, 255); + break; + } + BiomeEnergyParticles.InterpolationSpeed = 0.1f; + BiomeEnergyParticles.DrawSet(particleDrawCenter + Main.screenPosition); + + Vector2 displacement = Vector2.UnitX.RotatedBy(Main.GlobalTime * 3f) * 2f * (float)Math.Sin(Main.GlobalTime); + + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive); + spriteBatch.Draw(itemTexture, position + displacement, itemFrame, BiomeEnergyParticles.CenterColor, 0f, origin, scale, SpriteEffects.None, 0f); + spriteBatch.Draw(itemTexture, position - displacement, itemFrame, BiomeEnergyParticles.CenterColor, 0f, origin, scale, SpriteEffects.None, 0f); + spriteBatch.End(); + spriteBatch.Begin(default, default); + + return true; + } + } + + public class MendedBiomeBladeVisuals : ModProjectile //Visuals + { + private Player Owner => Main.player[projectile.owner]; + public bool OwnerOnGround => Main.tile[(int)Owner.Center.X / 16, (int)(Owner.position.Y + (float)Owner.height - 1f) / 16 + 1].IsTileSolidGround() && Main.tile[(int)Owner.Center.X / 16 + Owner.direction, (int)(Owner.position.Y + (float)Owner.height - 1f) / 16 + 1].IsTileSolidGround(); + public bool OwnerCanUseItem => Owner.HeldItem == associatedItem ? (Owner.HeldItem.modItem as TrueBiomeBlade).CanUseItem(Owner) : false; + public bool OwnerMayChannel => OwnerCanUseItem && Owner.Calamity().mouseRight && Owner.active && !Owner.dead && Owner.StandingStill() && !Owner.mount.Active && OwnerOnGround; + public ref float ChanneledState => ref projectile.ai[0]; + public ref float ChannelTimer => ref projectile.ai[1]; + public ref float Initialized => ref projectile.localAI[0]; + + private Item associatedItem; + const int ChannelTime = 120; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Mended Biome Blade"); + } + public override string Texture => "CalamityMod/Items/Weapons/Melee/TrueBiomeBlade"; + public bool drawIndrawHeldProjInFrontOfHeldItemAndArms = true; + public override void SetDefaults() + { + projectile.width = projectile.height = 36; + projectile.aiStyle = -1; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.timeLeft = 60; + projectile.tileCollide = false; + projectile.damage = 0; + } + + public CurveSegment anticipation = new CurveSegment(EasingType.SineOut, 0f, 1f, 0.35f); + public CurveSegment thrust = new CurveSegment(EasingType.ExpIn, 0.85f, 1.35f, -1.45f); + public CurveSegment bounceback = new CurveSegment(EasingType.SineOut, 0.95f, -0.1f, 0.1f); + internal float SwordHeight() => PiecewiseAnimation(ChannelTimer / (float)ChannelTime, new CurveSegment[] { anticipation, thrust, bounceback }); + + public override void AI() + { + + if (Initialized == 0f) + { + associatedItem = Owner.HeldItem; + //Switch up the attunements + Attunement? temporaryAttunementStorage = (associatedItem.modItem as TrueBiomeBlade).mainAttunement; + (associatedItem.modItem as TrueBiomeBlade).mainAttunement = (associatedItem.modItem as TrueBiomeBlade).secondaryAttunement; + (associatedItem.modItem as TrueBiomeBlade).secondaryAttunement = temporaryAttunementStorage; + Initialized = 1f; + } + + if (!OwnerMayChannel && ChanneledState == 0f) //IF the channeling gets interrupted for any reason + { + projectile.Center = Owner.Top + new Vector2(18f, 0f); + ChanneledState = 1f; + projectile.timeLeft = 60; + return; + } + + if (ChanneledState == 0f) + { + Owner.heldProj = projectile.whoAmI; + + projectile.Center = Owner.Center + new Vector2(16f * Owner.direction, -30 * SwordHeight() + 10f); + projectile.rotation = MathHelper.PiOver4 + MathHelper.PiOver2; // No more silly turnaround with the repaired one? + ChannelTimer++; + projectile.timeLeft = 60; + + if (ChannelTimer >= ChannelTime) + { + Attune((TrueBiomeBlade)associatedItem.modItem); + projectile.timeLeft = 120; + ChanneledState = 2f; //State where it stays invisible doing nothing. Acts as a cooldown + + Color particleColor = (associatedItem.modItem as TrueBiomeBlade).GetAttunementInfo((associatedItem.modItem as TrueBiomeBlade).mainAttunement).color; + + for (int i = 0; i <= 5; i++) + { + Vector2 displace = Vector2.UnitX * 20 * Main.rand.NextFloat(-1f, 1f); + Particle Glow = new GenericBloom(Owner.Bottom + displace, -Vector2.UnitY * Main.rand.NextFloat(1f, 5f), particleColor, 0.02f + Main.rand.NextFloat(0f, 0.2f), 20 + Main.rand.Next(30)); + GeneralParticleHandler.SpawnParticle(Glow); + } + for (int i = 0; i <= 10; i++) + { + Vector2 displace = Vector2.UnitX * 16 * Main.rand.NextFloat(-1f, 1f); + Particle Sparkle = new GenericSparkle(Owner.Bottom + displace, -Vector2.UnitY * Main.rand.NextFloat(1f, 5f), particleColor, particleColor, 0.5f + Main.rand.NextFloat(-0.2f, 0.2f), 20 + Main.rand.Next(30), 1, 2f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + } + } + + if (ChanneledState == 1f) + projectile.position += Vector2.UnitY * -0.3f * (1f + projectile.timeLeft / 60f); + } + + public void Attune(TrueBiomeBlade item) + { + bool jungle = Owner.ZoneJungle; + bool snow = Owner.ZoneSnow; + bool evil = Owner.ZoneCorrupt || Owner.ZoneCrimson; + bool desert = Owner.ZoneDesert; + bool hell = Owner.ZoneUnderworldHeight; + bool holy = Owner.ZoneHoly; + bool astral = Owner.Calamity().ZoneAstral; + bool marine = Owner.Calamity().ZoneAbyss || Owner.Calamity().ZoneSunkenSea; + + Attunement attunement = Attunement.Default; + + if (jungle) + attunement = Attunement.Tropical; + if (desert || hell) + attunement = Attunement.Hot; + if (snow) + attunement = Attunement.Cold; + if (evil) + attunement = Attunement.Evil; + if (holy) + attunement = Attunement.Holy; + if (astral) + attunement = Attunement.HolyStar; + if (marine) + attunement = Attunement.Marine; + + //If the owner already had the attunement , break out of it (And unswap) + if (item.secondaryAttunement == attunement) + { + Main.PlaySound(SoundID.DD2_LightningBugZap, projectile.Center); + item.secondaryAttunement = item.mainAttunement; + item.mainAttunement = attunement; + return; + } + + Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.Center); + item.mainAttunement = attunement; + } + + public override void Kill(int timeLeft) + { + //If we swapped out the main attunement for the second one despite the second attunement being empty at the time, unswap them. + if ((associatedItem.modItem as TrueBiomeBlade).mainAttunement == null && (associatedItem.modItem as TrueBiomeBlade).secondaryAttunement != null) + { + (associatedItem.modItem as TrueBiomeBlade).mainAttunement = (associatedItem.modItem as TrueBiomeBlade).secondaryAttunement; + (associatedItem.modItem as TrueBiomeBlade).secondaryAttunement = null; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (ChanneledState == 0f && ChannelTimer > 6f) + return base.PreDraw(spriteBatch, lightColor); + + else if (ChanneledState == 1f) + { + Texture2D tex = GetTexture(Texture); + Vector2 squishyScale = new Vector2(Math.Abs((float)Math.Sin(MathHelper.Pi + MathHelper.TwoPi * projectile.timeLeft / 30f)), 1f); + SpriteEffects flip = (float)Math.Sin(MathHelper.Pi + MathHelper.TwoPi * projectile.timeLeft / 30f) > 0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + spriteBatch.Draw(tex, projectile.position - Main.screenPosition, null, lightColor * (projectile.timeLeft / 60f), 0, tex.Size() / 2, squishyScale * (2f - (projectile.timeLeft / 60f)), flip, 0); + + return false; + } + + else + return false; } } } From efc16e4cb31787d412c57951ac65f5892ea621c0 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sat, 8 Jan 2022 02:18:02 +0100 Subject: [PATCH 22/76] Base projectiles for the upgrade --- Items/Weapons/Melee/TrueBiomeBlade.cs | 15 +- .../Melee/MendedBiomeBladeProjectiles.cs | 1052 +++++++++++++++++ .../Melee/MendedBiomeBlade_AridGrandeur.png | Bin 0 -> 990 bytes .../MendedBiomeBlade_AridGrandeurExtra.png | Bin 0 -> 1860 bytes .../Melee/MendedBiomeBlade_BitingEmbrace.png | Bin 0 -> 1774 bytes .../MendedBiomeBlade_BitingEmbraceThrust.png | Bin 0 -> 4034 bytes .../Melee/MendedBiomeBlade_DecaysRetort.png | Bin 0 -> 970 bytes ...endedBiomeBlade_GrovetendersTouchBlade.png | Bin 0 -> 1697 bytes ...MendedBiomeBlade_GrovetendersTouchGlow.png | Bin 0 -> 858 bytes 9 files changed, 1060 insertions(+), 7 deletions(-) create mode 100644 Projectiles/Melee/MendedBiomeBladeProjectiles.cs create mode 100644 Projectiles/Melee/MendedBiomeBlade_AridGrandeur.png create mode 100644 Projectiles/Melee/MendedBiomeBlade_AridGrandeurExtra.png create mode 100644 Projectiles/Melee/MendedBiomeBlade_BitingEmbrace.png create mode 100644 Projectiles/Melee/MendedBiomeBlade_BitingEmbraceThrust.png create mode 100644 Projectiles/Melee/MendedBiomeBlade_DecaysRetort.png create mode 100644 Projectiles/Melee/MendedBiomeBlade_GrovetendersTouchBlade.png create mode 100644 Projectiles/Melee/MendedBiomeBlade_GrovetendersTouchGlow.png diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index bf29b07b69..d20684666f 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -327,7 +327,7 @@ namespace CalamityMod.Items.Weapons.Melee item.channel = true; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.Stabbing; - item.shoot = ProjectileType(); + //item.shoot = ProjectileType(); item.shootSpeed = 12f; item.UseSound = null; item.noMelee = true; @@ -339,7 +339,7 @@ namespace CalamityMod.Items.Weapons.Melee item.channel = false; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.Stabbing; - item.shoot = ProjectileType(); + //item.shoot = ProjectileType(); item.shootSpeed = 12f; item.UseSound = null; item.noMelee = true; @@ -380,7 +380,7 @@ namespace CalamityMod.Items.Weapons.Melee public override bool CanUseItem(Player player) { return !Main.projectile.Any(n => n.active && n.owner == player.whoAmI && - (n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType())); + (n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType())); // || n.type == ProjectileType() } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) @@ -411,13 +411,14 @@ namespace CalamityMod.Items.Weapons.Melee return false; case Attunement.Evil: - float powerLungeAvailable = 0f; + bool powerLungeAvailable = false; if (PowerLungeCounter == 3) { - powerLungeAvailable = 1f; + powerLungeAvailable = true; PowerLungeCounter = 0; } - Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage * 2, knockBack, player.whoAmI, (float)StoredLunges), (float)powerLungeAvailable); + Projectile rapier = Projectile.NewProjectileDirect(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage * 2, knockBack, player.whoAmI, 26f, StoredLunges > 0 ? 1f : 0f); + (rapier.modProjectile as TrueDecaysRetort).ChargedUp = powerLungeAvailable; StoredLunges --; if (StoredLunges < 0) StoredLunges = 0; @@ -426,7 +427,7 @@ namespace CalamityMod.Items.Weapons.Melee case Attunement.Holy: case Attunement.HolyStar: float astralVariant = mainAttunement == Attunement.HolyStar ? 1f : 0f; - Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage * 2, knockBack, player.whoAmI, astralVariant); + // Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage * 2, knockBack, player.whoAmI, astralVariant); return false; default: diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs new file mode 100644 index 0000000000..8bc9456aeb --- /dev/null +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -0,0 +1,1052 @@ +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.CalPlayer; +using CalamityMod.DataStructures; +using CalamityMod.Particles; +using CalamityMod.Items.Weapons.Melee; +using Terraria.Graphics.Shaders; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using static Terraria.ModLoader.ModContent; +using static CalamityMod.CalamityUtils; + + +namespace CalamityMod.Projectiles.Melee +{ + public class TruePurityProjection : ModProjectile //The boring plain one. I need to find something different to make it do compared to the original one. + { + public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_PurityProjection"; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Purity Projection"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 2; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void SetDefaults() + { + projectile.width = projectile.height = 32; + projectile.aiStyle = 27; + aiType = ProjectileID.LightBeam; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.timeLeft = 40; + projectile.melee = true; + projectile.tileCollide = false; + } + + public override void AI() + { + if (projectile.timeLeft < 35) + projectile.tileCollide = true; + + Lighting.AddLight(projectile.Center, 0.75f, 1f, 0.24f); + int dustParticle = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.CursedTorch, 0f, 0f, 100, default, 0.9f); + Main.dust[dustParticle].noGravity = true; + Main.dust[dustParticle].velocity *= 0.5f; + Main.dust[dustParticle].velocity += projectile.velocity * 0.1f; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (projectile.timeLeft > 35) + return false; + + DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1); + return false; + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(SoundID.Item43, projectile.Center); + for (int i = 0; i <= 15; i++) + { + Vector2 displace = (projectile.rotation - MathHelper.PiOver4).ToRotationVector2() * (-0.5f + (i / 15f)) * 88f; + int dustParticle = Dust.NewDust(projectile.Center + displace, projectile.width, projectile.height, DustID.CursedTorch, 0f, 0f, 100, default, 2f); + Main.dust[dustParticle].noGravity = true; + Main.dust[dustParticle].velocity = projectile.oldVelocity; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + int debuffTime = 90; + target.AddBuff(BuffType(), debuffTime); + } + } + + public class TrueDecaysRetort : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_DecaysRetort"; + private bool initialized = false; + Vector2 direction = Vector2.Zero; + public ref float MaxTime => ref projectile.ai[0]; + public ref float CanLunge => ref projectile.ai[1]; + public float Timer => MaxTime - projectile.timeLeft; + public bool ChargedUp; + public Player Owner => Main.player[projectile.owner]; + public const float LungeSpeed = 16; + public ref float CanBounce => ref projectile.localAI[0]; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Decay's retort"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 84; + projectile.width = projectile.height = 84; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + float bladeLenght = 140f * projectile.scale; + Vector2 displace = direction * ((float)Math.Sin(Timer / MaxTime * 3.14f) * 60); + + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center + displace, Owner.Center + displace + (direction * bladeLenght), 24, ref collisionPoint); + } + + public override void AI() + { + if (!initialized) //Initialization + { + CanBounce = 1f; + projectile.timeLeft = (int)MaxTime; + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + projectile.rotation = direction.ToRotation(); + if (CanLunge == 1f && !ChargedUp) + Lunge(); + Main.PlaySound(SoundID.Item103, projectile.Center); + initialized = true; + projectile.netUpdate = true; + projectile.netSpam = 0; + } + + if (ChargedUp && Timer / MaxTime > 0.5) + { + PowerLunge(); + } + + //Manage position and rotation + projectile.scale = 1f + ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 0.6f); //SWAGGER + projectile.Center = Owner.Center + (direction * ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 60)); + + Lighting.AddLight(projectile.Center, new Vector3(0.9f, 0f, 0.35f) * (float)Math.Sin(Timer / MaxTime * MathHelper.Pi)); + + //Make the owner look like theyre holding the sword bla bla + Owner.heldProj = projectile.whoAmI; + Owner.direction = Math.Sign(direction.X); + Owner.itemRotation = direction.ToRotation(); + if (Owner.direction != 1) + { + Owner.itemRotation -= 3.14f; + } + Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); + } + + public void Lunge() + { + if (Main.myPlayer != projectile.owner) + return; + Owner.velocity = direction.SafeNormalize(Vector2.UnitX * Owner.direction) * LungeSpeed; + } + + public void PowerLunge() + { + + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => OnHitEffects(!target.canGhostHeal || Main.player[projectile.owner].moonLeech); + public override void OnHitPvp(Player target, int damage, bool crit) => OnHitEffects(Main.player[projectile.owner].moonLeech); + + private void OnHitEffects(bool cannotLifesteal) + { + projectile.netUpdate = true; + projectile.netSpam = 0; + + if (!cannotLifesteal) //trolled + { + Owner.statLife += 3; + Owner.HealEffect(3); //Idk if its too much or what but at the same time its close range as fuck + } + if (Main.myPlayer != Owner.whoAmI || CanBounce == 0f) + return; + // Bounce off + float bounceStrength = Math.Max((LungeSpeed / 2f), Owner.velocity.Length()); + bounceStrength *= Owner.velocity.Y == 0 ? 0.2f : 1f; //Reduce the bounce if the player is on the ground + Owner.velocity = -direction.SafeNormalize(Vector2.Zero) * MathHelper.Clamp(bounceStrength, 0f, 22f); + CanBounce = 0f; + Owner.GiveIFrames(10); // 10 i frames for free! + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/TrueBiomeBlade"); + Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_DecaysRetort"); + + float drawAngle = direction.ToRotation(); + float drawRotation = drawAngle + MathHelper.PiOver4; + + Vector2 displace = direction * ((float)Math.Sin(Timer / MaxTime * 3.14f) * 60); + Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOffset = Owner.Center + direction * 10f - Main.screenPosition; + + spriteBatch.Draw(handle, drawOffset + displace, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Update the parameters + drawOrigin = new Vector2(0f, tex.Height); + + spriteBatch.Draw(tex, drawOffset + displace, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(initialized); + writer.WriteVector2(direction); + writer.Write(CanBounce); + writer.Write(ChargedUp); + } + public override void ReceiveExtraAI(BinaryReader reader) + { + initialized = reader.ReadBoolean(); + direction = reader.ReadVector2(); + CanBounce = reader.ReadSingle(); + ChargedUp = reader.ReadBoolean(); + } + } + + public class TrueBitingEmbrace : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_BitingEmbrace"; + + private bool initialized = false; + Vector2 direction = Vector2.Zero; + public float rotation; + public ref float SwingMode => ref projectile.ai[0]; //0 = Up-Down small slash, 1 = Down-Up large slash, 2 = Thrust + public ref float MaxTime => ref projectile.ai[1]; + public float Timer => MaxTime - projectile.timeLeft; + + public int SwingDirection + { + get + { + switch (SwingMode) + { + case 0: + return -1 * Math.Sign(direction.X); + case 1: + return 1 * Math.Sign(direction.X); + default: + return 0; + + } + } + } + public float SwingWidth + { + get + { + switch (SwingMode) + { + case 0: + return 2.3f; + default: + return 1.8f; + } + } + } + + public Player Owner => Main.player[projectile.owner]; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Biting Embrace"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 75; + projectile.width = projectile.height = 75; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + //The hitbox is simplified into a line collision. + float collisionPoint = 0f; + float bladeLenght = 0f; + Vector2 displace = Vector2.Zero; + switch (SwingMode) + { + case 0: + case 1: + bladeLenght = 150 * projectile.scale; + break; + case 2: + bladeLenght = 225f; //In awe e + bladeLenght *= projectile.scale; + displace = direction * ThrustDisplaceRatio() * 60f; + break; + + } + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center + displace, Owner.Center + displace + (rotation.ToRotationVector2() * bladeLenght), 26, ref collisionPoint); + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + base.OnHitNPC(target, damage, knockback, crit); + if (SwingMode == 2) + target.AddBuff(BuffType(), 40); + } + + public override void AI() + { + if (!initialized) //Initialization + { + projectile.timeLeft = (int)MaxTime; + switch (SwingMode) + { + case 0: + projectile.width = projectile.height = 100; + Main.PlaySound(SoundID.DD2_MonkStaffSwing, projectile.Center); + projectile.damage = (int)(projectile.damage * 1.5); + break; + case 1: + projectile.width = projectile.height = 100; + projectile.width = projectile.height = 100; + Main.PlaySound(SoundID.DD2_OgreSpit, projectile.Center); + projectile.damage = (int)(projectile.damage * 1.8); + break; + case 2: + projectile.width = projectile.height = 170; + Main.PlaySound(SoundID.DD2_PhantomPhoenixShot, projectile.Center); + projectile.damage *= 3; + break; + } + + //Take the direction the sword is swung. FUCK not controlling the swing direction more than just left/right :| + //The direction to mouseworld may need to be turned into the custom synced player mouse variables . not on the branch currently tho + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + projectile.rotation = direction.ToRotation(); + + initialized = true; + projectile.netUpdate = true; + projectile.netSpam = 0; + } + + //Manage position and rotation + projectile.Center = Owner.Center + (direction * 30); + //rotation = projectile.rotation + MathHelper.SmoothStep(SwingWidth / 2 * SwingDirection, -SwingWidth / 2 * SwingDirection, Timer / MaxTime); + float factor = 1 - (float)Math.Pow((double)-(Timer / MaxTime) + 1, 2d); + rotation = projectile.rotation + MathHelper.Lerp(SwingWidth / 2 * SwingDirection, -SwingWidth / 2 * SwingDirection, factor); + projectile.scale = 1f + ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 0.6f); //SWAGGER + + Lighting.AddLight(Owner.MountedCenter, new Vector3(0.75f, 1f, 1f) * (float)Math.Sin(Timer/MaxTime * MathHelper.Pi)); + + //Add the thrust motion & animation for the third combo state + if (SwingMode == 2) + { + projectile.scale = 1f + (ThrustScaleRatio() * 0.6f); + projectile.Center = Owner.Center + (direction * ThrustDisplaceRatio() * 60); + + projectile.frameCounter++; + if (projectile.frameCounter % 5 == 0 && projectile.frame + 1 < Main.projFrames[projectile.type]) + projectile.frame++; + + if (Main.rand.NextBool()) + { + Particle mist = new MediumMistParticle(Owner.Center + direction * 40 + Main.rand.NextVector2Circular(30f, 30f), Vector2.Zero, new Color(172, 238, 255), new Color(145, 170, 188), Main.rand.NextFloat(0.5f, 1.5f), 245 - Main.rand.Next(50), 0.02f); + mist.Velocity = (mist.Position - Owner.Center) * 0.2f + Owner.velocity; + GeneralParticleHandler.SpawnParticle(mist); + } + + } + + else + { + //Shit out lingering damaging mist + if (Main.rand.NextFloat(0f, 1f) > 0.75f) + { + Vector2 particlePosition = Owner.Center + (rotation.ToRotationVector2() * 100f * projectile.scale); + Particle snowflake = new SnowflakeSparkle(particlePosition, rotation.ToRotationVector2() * 3f, Color.White, new Color(75, 177, 250), Main.rand.NextFloat(0.3f, 1.5f), 40, 0.5f); + GeneralParticleHandler.SpawnParticle(snowflake); + } + } + + //Make the owner look like theyre holding the sword bla bla + Owner.heldProj = projectile.whoAmI; + Owner.direction = Math.Sign(rotation.ToRotationVector2().X); + Owner.itemRotation = rotation; + if (Owner.direction != 1) + { + Owner.itemRotation -= 3.14f; + } + Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); + } + + //Animation keys + public CurveSegment anticipation = new CurveSegment(EasingType.SineBump, 0f, 0f, -0.15f); + public CurveSegment thrust = new CurveSegment(EasingType.PolyInOut, 0.2f, 0f, 0.9f, 3); + public CurveSegment hold = new CurveSegment(EasingType.SineBump, 0.35f, 0.9f, 0.1f); + public CurveSegment retract = new CurveSegment(EasingType.PolyInOut, 0.7f, 0.9f, -0.9f, 3); + internal float ThrustDisplaceRatio() => PiecewiseAnimation(Timer / MaxTime, new CurveSegment[] { anticipation, thrust, hold, retract }); + + //Animation keys + public CurveSegment expandSize = new CurveSegment(EasingType.ExpIn, 0f, 0f, 1f); + public CurveSegment holdSize = new CurveSegment(EasingType.Linear, 0.1f, 1f, 0f); + public CurveSegment shrinkSize = new CurveSegment(EasingType.ExpIn, 0.85f, 1f, -1f); + internal float ThrustScaleRatio() => PiecewiseAnimation(Timer / MaxTime, new CurveSegment[] { expandSize, holdSize, shrinkSize }); + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/TrueBiomeBlade"); + + if (SwingMode != 2) + { + Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_BitingEmbrace"); + float drawAngle = rotation; + float drawRotation = rotation + MathHelper.PiOver4; + Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition; + + spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Update the parameters + drawOrigin = new Vector2(0f, blade.Height); + spriteBatch.Draw(blade, drawOffset, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + } + else + { + Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_BitingEmbraceThrust"); + Vector2 thrustDisplace = direction * (ThrustDisplaceRatio() * 60); + + float drawAngle = rotation; + float drawRotation = rotation + MathHelper.PiOver4; + Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOffset = Owner.Center + drawAngle.ToRotationVector2() * 10f - Main.screenPosition; + + spriteBatch.Draw(handle, drawOffset + thrustDisplace, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Update the parameters + + drawOrigin = new Vector2(0f, blade.Height); + drawOffset = Owner.Center + (direction * 28f * projectile.scale) - Main.screenPosition; + //Anim stuff + + spriteBatch.Draw(blade, drawOffset + thrustDisplace, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + } + + return false; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(initialized); + writer.WriteVector2(direction); + writer.Write(rotation); + } + public override void ReceiveExtraAI(BinaryReader reader) + { + initialized = reader.ReadBoolean(); + direction = reader.ReadVector2(); + rotation = reader.ReadSingle(); + } + } + + public class TrueAridGrandeur : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_AridGrandeur"; + private bool initialized = false; + Vector2 direction = Vector2.Zero; + public ref float Shred => ref projectile.ai[0]; //How much the attack is, attacking + public float ShredRatio => MathHelper.Clamp(Shred / (maxShred * 0.5f), 0f, 1f); + public ref float PogoCooldown => ref projectile.ai[1]; //Cooldown for the pogo + public Player Owner => Main.player[projectile.owner]; + public bool CanPogo => Owner.velocity.Y != 0 && PogoCooldown <= 0; //Only pogo when in the air and if the cooldown is zero + private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; + + public const float pogoStrenght = 16f; //How much the player gets pogoed up + public const float maxShred = 500; //How much shred you get + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Arid Grandeur"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 70; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 16; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + float bladeLenght = 100 * projectile.scale; + float bladeWidth = 76 * projectile.scale; + + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center, Owner.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); + } + + public void Pogo() + { + if (CanPogo && Main.myPlayer == Owner.whoAmI) + { + Owner.velocity = -direction.SafeNormalize(Vector2.Zero) * pogoStrenght; //Bounce + Owner.fallStart = (int)(Owner.position.Y / 16f); + PogoCooldown = 30; //Cooldown + Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.position); + + Vector2 hitPosition = Owner.Center + (direction * 100 * projectile.scale); + + for (int i = 0; i < 8; i++) + { + Vector2 hitPositionDisplace = direction.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(-10f, 10f); + Vector2 flyDirection = -direction.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4)); + Particle smoke = new SmallSmokeParticle(hitPosition + hitPositionDisplace, flyDirection * 9f, Color.OrangeRed, new Color(130, 130, 130), Main.rand.NextFloat(1.8f, 2.6f), 115 - Main.rand.Next(30)); + GeneralParticleHandler.SpawnParticle(smoke); + + Particle Glow = new StrongBloom(hitPosition - hitPositionDisplace * 3, -direction * 6 * Main.rand.NextFloat(0.5f, 1f), Color.Orange * 0.5f, 0.01f + Main.rand.NextFloat(0f, 0.2f), 20 + Main.rand.Next(40)); + GeneralParticleHandler.SpawnParticle(Glow); + } + for (int i = 0; i < 3; i++) + { + Vector2 hitPositionDisplace = direction.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(-10f, 10f); + Vector2 flyDirection = -direction.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4)); + + Particle Rock = new StoneDebrisParticle(hitPosition - hitPositionDisplace * 3, flyDirection * Main.rand.NextFloat(3f, 6f), Color.Beige, 1f + Main.rand.NextFloat(0f, 0.4f), 30 + Main.rand.Next(50), 0.1f); + GeneralParticleHandler.SpawnParticle(Rock); + } + + if (Owner.HeldItem.type == ItemType()) + (Owner.HeldItem.modItem as BiomeBlade).CanLunge = 1; // Reset the lunge counter on pogo. This should make for more interesting and fun synergies + } + } + + public override void AI() + { + if (!initialized) //Initialization. Here its litterally just playing a sound tho lmfao + { + Main.PlaySound(SoundID.Item90, projectile.Center); + initialized = true; + } + + if (!OwnerCanShoot) + { + projectile.Kill(); + return; + } + + if (Shred >= maxShred) + Shred = maxShred; + if (Shred < 0) + Shred = 0; + + Lighting.AddLight(projectile.Center, new Vector3(1f, 0.56f, 0.56f) * ShredRatio); + + //Manage position and rotation + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + projectile.rotation = direction.ToRotation(); + projectile.Center = Owner.Center + (direction * 60); + + //Scaling based on shred + projectile.localNPCHitCooldown = 16 - (int)(MathHelper.Lerp(0, 8, ShredRatio)); //Increase the hit frequency + projectile.scale = 1f + (ShredRatio * 1f); //SWAGGER + + + if (Collision.SolidCollision(Owner.Center + (direction * 100 * projectile.scale) - Vector2.One * 5f, 10, 10)) + { + Pogo(); + projectile.netUpdate = true; + projectile.netSpam = 0; + } + + //Make the owner look like theyre holding the sword bla bla + Owner.heldProj = projectile.whoAmI; + Owner.direction = Math.Sign(direction.X); + Owner.itemRotation = direction.ToRotation(); + if (Owner.direction != 1) + { + Owner.itemRotation -= 3.14f; + } + Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); + Owner.itemTime = 2; + Owner.itemAnimation = 2; + + Shred--; + PogoCooldown--; + projectile.timeLeft = 2; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => ShredTarget(); + public override void OnHitPvp(Player target, int damage, bool crit) => ShredTarget(); + + private void ShredTarget() + { + if (Main.myPlayer != Owner.whoAmI) + return; + // get lifted up + if (PogoCooldown <= 0) + { + Main.PlaySound(SoundID.NPCHit30, projectile.Center); //Sizzle + Shred += 62; //Augment the shredspeed + if (Owner.velocity.Y > 0) + Owner.velocity.Y = -2f; //Get "stuck" into the enemy partly + Owner.GiveIFrames(5); // i framez. Do 5 iframes even matter? idk but you get a lot of em so lol... + PogoCooldown = 20; + } + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(SoundID.NPCHit43, projectile.Center); + if (ShredRatio > 0.5 && Owner.whoAmI == Main.myPlayer) //Keep this for the True biome blade/Repaired biome blade. + { + Projectile.NewProjectile(projectile.Center, direction * 16f, ProjectileType(), projectile.damage, projectile.knockBack, Owner.whoAmI, Shred); + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/TrueBiomeBlade"); + Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_AridGrandeur"); + + int bladeAmount = 4; + + float drawAngle = direction.ToRotation(); + float drawRotation = drawAngle + MathHelper.PiOver4; + + Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOffset = Owner.Center + direction * 10f - Main.screenPosition; + + spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Update the parameters + drawOrigin = new Vector2(0f, blade.Height); + + spriteBatch.Draw(blade, drawOffset, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + + for (int i = 0; i < bladeAmount; i++) //Draw extra copies + { + blade = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_AridGrandeurExtra"); + + drawAngle = direction.ToRotation(); + + float circleCompletion = (float)Math.Sin(Main.GlobalTime * 5 + i * MathHelper.PiOver2); + drawRotation = drawAngle + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi / 7f) * ShredRatio); + + drawOrigin = new Vector2(0f, blade.Height); + + Vector2 drawOffsetStraight = Owner.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10 - Main.screenPosition; //How far from the player + Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly + Vector2 drawOffsetFromBounce = drawOffsetStraight.SafeNormalize(Vector2.Zero) * MathHelper.Clamp(PogoCooldown, 0f, 20f)/20f * 20f; + + spriteBatch.Draw(blade, drawOffsetStraight + drawDisplacementAngle + drawOffsetFromBounce, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + } + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(initialized); + writer.WriteVector2(direction); + } + public override void ReceiveExtraAI(BinaryReader reader) + { + initialized = reader.ReadBoolean(); + direction = reader.ReadVector2(); + } + } + + public class TrueAridGrandeurShot : ModProjectile //Only use this for the upgrade actually lol + { + public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_AridGrandeurExtra"; + private bool initialized = false; + Vector2 direction = Vector2.Zero; + public ref float Shred => ref projectile.ai[0]; + public float ShredRatio => MathHelper.Clamp(Shred / (maxShred * 0.5f), 0f, 1f); + public Player Owner => Main.player[projectile.owner]; + + public const float pogoStrenght = 16f; //How much the player gets pogoed up + public const float maxShred = 500; //How much shred you get + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Arid Shredder"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 70; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + float bladeLenght = 84 * projectile.scale; + float bladeWidth = 76 * projectile.scale; + + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center - direction * bladeLenght / 2, projectile.Center + direction * bladeLenght / 2, bladeWidth, ref collisionPoint); + } + + public override void AI() + { + if (!initialized) + { + Main.PlaySound(SoundID.Item90, projectile.Center); + projectile.timeLeft = (int)(30f + ShredRatio * 30f); + initialized = true; + + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + projectile.rotation = direction.ToRotation(); + + projectile.velocity = direction * 6f; + projectile.damage *= 10; + + projectile.scale = 1f + (ShredRatio * 1f); //SWAGGER + projectile.netUpdate = true; + + } + + projectile.position += projectile.velocity; + + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + for (int i = 0; i < 4; i++) //Draw extra copies + { + var tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeurExtra"); + + float drawAngle = direction.ToRotation(); + + float circleCompletion = (float)Math.Sin(Main.GlobalTime * 5 + i * MathHelper.PiOver2); + float drawRotation = drawAngle + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi / 7f) * ShredRatio); + + Vector2 drawOrigin = new Vector2(0f, tex.Height); + + + Vector2 drawOffsetStraight = projectile.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10 - Main.screenPosition; //How far from the player + Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly + + spriteBatch.Draw(tex, drawOffsetStraight + drawDisplacementAngle, null, lightColor * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + } + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + } + + public class TrueGrovetendersTouch : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_GrovetendersTouchBlade"; + private bool initialized = false; + public Player Owner => Main.player[projectile.owner]; + public float Timer => MaxTime - projectile.timeLeft; + public ref float HasSnapped => ref projectile.ai[0]; + public ref float SnapCoyoteTime => ref projectile.ai[1]; + + const float MaxTime = 90; + const int coyoteTimeFrames = 15; //How many frames does the whip stay extended + const int MaxReach = 400; + const float SnappingPoint = 0.7f; //When does the snap occur. + const float ReelBackStrenght = 14f; + const float ChainDamageReduction = 0.5f; + + public BezierCurve curve; + private Vector2 controlPoint1; + private Vector2 controlPoint2; + internal bool ReelingBack => Timer / MaxTime > SnappingPoint; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Grovetender's Touch"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 36; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 2; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 30; + } + + public override bool? CanCutTiles() => false; //Itd be quite counterproductive to make the whip cut the tiles it just grew + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, projectile.Center }); + + int numPoints = 32; + Vector2[] chainPositions = curve.GetPoints(numPoints).ToArray(); + float collisionPoint = 0; + for (int i = 1; i < numPoints; i++) + { + Vector2 position = chainPositions[i]; + Vector2 previousPosition = chainPositions[i - 1]; + if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), position, previousPosition, 6, ref collisionPoint)) + return true; + } + return base.Colliding(projHitbox, targetHitbox); + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + base.ModifyHitNPC(target, ref damage, ref knockback, ref crit, ref hitDirection); + Vector2 projectileHalfLenght = (projectile.Size / 2f) * projectile.rotation.ToRotationVector2(); + float collisionPoint = 0; + //If you hit the enemy during the coyote time with the blade of the whip, guarantee a crit + if (Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), projectile.Center - projectileHalfLenght, projectile.Center + projectileHalfLenght, 32, ref collisionPoint)) + { + if (SnapCoyoteTime > 0f) + { + crit = true; + for (int i = 0; i < 3; i++) + { + Vector2 sparkSpeed = Owner.DirectionTo(target.Center).RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver2, MathHelper.PiOver2)) * 9f; + Particle Spark = new CritSpark(target.Center, sparkSpeed, Color.White, Color.LimeGreen, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 0.6f); + GeneralParticleHandler.SpawnParticle(Spark); + } + + } + } + else + damage = (int)(damage * ChainDamageReduction); //If the enemy is hit with the chain of the whip, the damage gets reduced + + if (crit) + { + //Do something + } + } + + public override void AI() + { + if (!initialized) //Initialization. create control points & shit) + { + projectile.velocity = Owner.DirectionTo(Main.MouseWorld); + Main.PlaySound(SoundID.DD2_OgreSpit, projectile.Center); + controlPoint1 = projectile.Center; + controlPoint2 = projectile.Center; + projectile.timeLeft = (int)MaxTime; + initialized = true; + projectile.netUpdate = true; + projectile.netSpam = 0; + } + + if (ReelingBack && HasSnapped == 0f) //Snap & also small coyote time for the hook + { + Main.PlaySound(SoundID.Item41, projectile.Center); //Snap + HasSnapped = 1f; + SnapCoyoteTime = coyoteTimeFrames; + } + + if (SnapCoyoteTime > 0) //keep checking for the tile hook + { + Lighting.AddLight(projectile.Center, 0.8f, 1f, 0.35f); + HookToTile(); + SnapCoyoteTime--; + } + + Owner.direction = Math.Sign(projectile.velocity.X); + projectile.rotation = projectile.AngleFrom(Owner.Center); //Point away from playah + + float ratio = GetSwingRatio(); + projectile.Center = Owner.MountedCenter + SwingPosition(ratio); + projectile.direction = projectile.spriteDirection = -Owner.direction; + + //MessWithTiles(); + + Owner.itemRotation = MathHelper.WrapAngle(Owner.AngleTo(Main.MouseWorld) - (Owner.direction < 0 ? MathHelper.Pi : 0)); + } + public void HookToTile() + { + if (Main.myPlayer == Owner.whoAmI) + { + //Shmoove the player if a tile is hit. This movement always happens if the owner isnt on the ground, but will only happen if the projectile is above the player if they are standing on the ground) + if (Collision.SolidCollision(projectile.position, 32, 32) && (Owner.velocity.Y != 0 || projectile.position.Y < Owner.position.Y)) + { + Owner.velocity = Owner.DirectionTo(projectile.Center) * ReelBackStrenght; + SnapCoyoteTime = 0f; + } + Main.PlaySound(SoundID.Item65, projectile.position); + } + } + + internal float EaseInFunction(float progress) => progress == 0 ? 0f : (float)Math.Pow(2, 10 * progress - 10); //Potion seller i need your strongest easeIns + + private float GetSwingRatio() + { + float ratio = (Timer - SnappingPoint * MaxTime) / (MaxTime * (1 - SnappingPoint)); //The ratio for the last section of the snap is a new curve. + if (!ReelingBack) + ratio = EaseInFunction(Timer / (MaxTime * SnappingPoint)); //Watch this ratio get eased + if (SnapCoyoteTime > 0) + ratio = 0f; + return ratio; + } + + private Vector2 SwingPosition(float progress) + { + //Whip windup and snap part + if (!ReelingBack) + { + float distance = MaxReach * MathHelper.Lerp((float)Math.Sin(progress * MathHelper.PiOver2), 1, 0.04f); //half arc + distance = Math.Max(distance, 65); //Dont be too close to player + + float angleDeviation = MathHelper.Pi / 1.2f; + float angleOffset = Owner.direction * MathHelper.Lerp(-angleDeviation, 0, progress); //Go from very angled to straight at the zenith of the attack + return projectile.velocity.RotatedBy(angleOffset) * distance; + } + else + { + float distance = MathHelper.Lerp(MaxReach, 0f, progress); //Quickly zip back to the player . No angles or minimum distance from player. + return projectile.velocity * distance; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (Timer == 0) + return false; + Texture2D handle = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_GrovetendersTouchBlade"); + Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_GrovetendersTouchGlow"); + + Vector2 projBottom = projectile.Center + new Vector2(-handle.Width / 2, handle.Height / 2).RotatedBy(projectile.rotation + MathHelper.PiOver4) * 0.75f; + DrawChain(spriteBatch, projBottom, out Vector2[] chainPositions); + + float drawRotation = (projBottom - chainPositions[chainPositions.Length - 2]).ToRotation() + MathHelper.PiOver4; //Face away from the last point of the bezier curve + drawRotation += SnapCoyoteTime > 0 ? MathHelper.Pi : 0; //During coyote time the blade flips for some reason. Prevent that from happening + drawRotation += projectile.spriteDirection < 0 ? 0f : 0f; + + Vector2 drawOrigin = new Vector2(0f, handle.Height); + SpriteEffects flip = (projectile.spriteDirection < 0) ? SpriteEffects.None : SpriteEffects.None; + lightColor = Lighting.GetColor((int)(projectile.Center.X / 16f), (int)(projectile.Center.Y / 16f)); + + spriteBatch.Draw(handle, projBottom - Main.screenPosition, null, lightColor, drawRotation, drawOrigin, projectile.scale, flip, 0f); + + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Only update the origin for once + drawOrigin = new Vector2(0f, blade.Height); + spriteBatch.Draw(blade, projBottom - Main.screenPosition, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, flip, 0f); + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + private void DrawChain(SpriteBatch spriteBatch, Vector2 projBottom, out Vector2[] chainPositions) + { + Texture2D chainTex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchChain"); + + float ratio = GetSwingRatio(); + + if (!ReelingBack) //Make the curve be formed from points slightly ahead of the projectile, but clamped to the max rotation (straight line ahead) + { + controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Clamp(ratio + 0.5f, 0f, 1f)) * 0.5f; + controlPoint2 = Owner.MountedCenter + SwingPosition(MathHelper.Clamp(ratio + 0.2f, 0f, 1f)) * 0.5f; + } + else //After the whip snaps, make the curve be a wave + { + Vector2 perpendicular = SwingPosition(ratio).SafeNormalize(Vector2.Zero).RotatedBy(MathHelper.PiOver2); + controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Lerp(ratio, 1f, ratio)) + perpendicular * MathHelper.SmoothStep(0f, 1f, ratio) * -155f; + controlPoint2 = Owner.MountedCenter + SwingPosition(MathHelper.Lerp(ratio, 1f, ratio / 2)) + perpendicular * MathHelper.SmoothStep(0f, 1f, ratio) * 100f; + } + + BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, projBottom }); + int numPoints = 30; //"Should make dynamic based on curve length, but I'm not sure how to smoothly do that while using a bezier curve" -Graydee, from the code i referenced. I do agree. + chainPositions = curve.GetPoints(numPoints).ToArray(); + + //Draw each chain segment bar the very first one + for (int i = 1; i < numPoints; i++) + { + Vector2 position = chainPositions[i]; + float rotation = (chainPositions[i] - chainPositions[i - 1]).ToRotation() - MathHelper.PiOver2; //Calculate rotation based on direction from last point + float yScale = Vector2.Distance(chainPositions[i], chainPositions[i - 1]) / chainTex.Height; //Calculate how much to squash/stretch for smooth chain based on distance between points + Vector2 scale = new Vector2(1, yScale); + Color chainLightColor = Lighting.GetColor((int)position.X / 16, (int)position.Y / 16); //Lighting of the position of the chain segment + if (ReelingBack) + chainLightColor *= 1 - EaseInFunction(ratio); //Make the chain fade when reeling it back + Vector2 origin = new Vector2(chainTex.Width / 2, chainTex.Height); //Draw from center bottom of texture + spriteBatch.Draw(chainTex, position - Main.screenPosition, null, chainLightColor, rotation, origin, scale, SpriteEffects.None, 0); + } + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(initialized); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + initialized = reader.ReadBoolean(); + } + } +} diff --git a/Projectiles/Melee/MendedBiomeBlade_AridGrandeur.png b/Projectiles/Melee/MendedBiomeBlade_AridGrandeur.png new file mode 100644 index 0000000000000000000000000000000000000000..e767d2a2c4e98aacb8a0bd6248de7bd508b1f2d9 GIT binary patch literal 990 zcmV<410np0P)Px&m`OxIRCt{2n@x+;Kp23ZX}i7p1N;l(MZKseS8ppGloiBJSQJHN{X}$8a8VFN z!3B{O6cJ=s!Gj=zf*^i?h#tg)SI=I(*fxoWByDH%oeoWR_kAv5CX?hPefrM4X{uPE zI6Kw@;H}#Pfcx{C*S}w_-Jk%xA724zKKqz@zMB0IS0<|J0EW%q$;|*XIvoJUoQ?-j zn_JYzwa*>^@|!6}T4Kc*`Dfo&AZp^66SRYVRnkl`(h|$w$lp^FK+m|)#6C04{XlUu z#YjsmTO)rR+XX+#tiKeM}%@iXovFwceerhie&523IWf>Z7Nieg%W}N~t(i+Rg z$WIrhfb4Z*a&By=?jLg;|3ZeDoY)PBk=9u9M!vmr97xWIVSjh_&N44!7VnyAAVylE zQFQ=id3pT|0PVmSz|%(rP0!QXDrhTXn0c7lHph>-T{C6Yw#kw+a`DzB0NRdjVrYyC z&5Nj&jxx5Hbo`;AnPQ|RmW+{)=4OGEoS2d8R6?%HIzGlwt*iO`3m`^XW8{szH-8g| zG0{+^aE{A)T+Ma;Sy}ncwHy8|Tea|BA6M|YLINXe?~Ux{-T6 zzXQMt3~V)<+WU%0v=Eg{cqnS9f=kP$ml|_uS#4wG__3A^<%*+~FGx6Ha1B1ji zFk+-7hG}GIP(Cy34ecNjDwaDFy9W-;24bWos+hI&nHfH(49xV5b>jVPJM2d`0Ai#i zhW-w@S>cdnrl+qHpKcnr9FZNwNJ|XO$X4*r{g8vxSIr@&nYxJ^x7ZKLB4VT^s;F!f z^bG6EnX%uFQ8zI}j1&Yx5ClOG1VIo4K@bE%5ClOG1VIo4K@f(_e_)w)8W>IdcmMzZ M07*qoM6N<$g66!+?*IS* literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/MendedBiomeBlade_AridGrandeurExtra.png b/Projectiles/Melee/MendedBiomeBlade_AridGrandeurExtra.png new file mode 100644 index 0000000000000000000000000000000000000000..5af2eee020204d45dcfcd1640f3b935b68935ae3 GIT binary patch literal 1860 zcmV-K2fO%*P)Px*{z*hZRCt{2oM~(nRUE*7)7{om355`dSjr(nQ4C-Th#U!r#sdf*2nixbLNFqS zf)XN!QIy1p7(n=dsHh16Ats>21LF}TKEKvJMw8jf()Lc6;iKfHO}zL}jp+DE%B z@AqXhZ{E!Ocl+D_d;d4HwYbTMjO+z~UDzLh%0Kto)%RQ7ds_hZ{yhL>eYQQR^JeG^ z@#e;=?*QtG($NC|2!_J|WJba^K*ovjFH-C@J9YJcQTN8p6H(&Lvi-| zs zssFjW7S>>tPR8HCNtq+qAHV(!}P1Ku_FKpciq+YRD-dyLr#9j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N6u>LS~$r6I+e0X>3F|1@E6bLK<~P_)(8?oDT~{< zS4}j#%vV2;innM6y2$D<_iM`;jZ$HAQd@tAf63K$R{!A)cgET54oSRfo$}$rh@wtP z)RGTH+=gqVTQqhoCu~|bt#$b+#X;sdsqbshYx5%`j*xl>RlQn;=&(#5h2O2ET?r7Zt^%n0YI7yFm6>Ww6%*QYTW{Pt{{Ln{{@%G+Gd4arrSAbBh&t$Vy^e3rmYH|4zioxRwTa zzUjaHp?;r6ZN8S|NXdLiJ=PA+z#y>0VjSll3M&Dl;J-vgwP|kN#J+IEyUu77UY5P` zKv~6@ZZ$(RU7sLtlZC!bpcbi3N z$j0VCQOkL&E(F+TC9F3txAn3|ZQm_}}K F{{gc-NU{I` literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/MendedBiomeBlade_BitingEmbraceThrust.png b/Projectiles/Melee/MendedBiomeBlade_BitingEmbraceThrust.png new file mode 100644 index 0000000000000000000000000000000000000000..c1935882e72b0b750143e1a44d06855ca42d072f GIT binary patch literal 4034 zcmZu!c{o(<{}x$Fnh04Vl57bfOT09eLX&ljeJR^Cyvderk{3hNOWC)gq**O9)R?gw zUQ5zoEFo{AtTDzi3_qjq@B7#HT-Q0zbv@^K&gVY&eV_X|PwMSk76Qj5j&pEu2;8s) z+8wlL_Q}U{aGlk#7&&N;Jg~Dc<-mTF`pLloh`j+cafm8fDrVu%nu&DwFMkIN09hvG zkA2EyU)Ga^T`C``$s!&*pUQlk!3R8b`}!YB!c|F}rp?E@P_l$Itn(`#&h}H<8kxqg zBRgdxKK7PqX*I-@`mfLzzwEGfLrW)$izgI*rqud>>=ixQthqHiJidOZyza>?MLwnu z5X}nxG|A!Yowj^|<5Y3Xeb{g-6VKO&ga}ewt7KKYoIiDs<}S+0m9-9fQPt z>EZM@)$(o;76DFVa?O9HL5nhSr%ZqXS`v`C`4jWj68*=8DZ+iMb^`DDaT_T62_4?_ z#v_+yblj?+BM|A{--k|O7DfGe)A!(2Fb|Ps^cXs6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+; zaW)$=Hc5+*Z`|W`>w*TQU2p$*-2FQPU=d1aD#BMPB=Ux~6cEMPIiTyhAo4CT!7JhL z`;*~EJOYbQB3Kb!XFs7yDM@U~kJoG~b^!p~{PryHk@dqOl$hciQ91kRK=vDS?^w#% zB&Ph+yloWO((&B*`eMk-1;-+k2=+<8!a1U`h`Mt{!}pJ3Z0xp){P3uFP?wKhhkUug zScDRDtRrNEmsZMBM%!#_tR%Ljuk)3-4fbvj0*g>$&Xsj#85Pe@LduYpwM})6L0w0) z$3hm-bwp1(@@ro-b+aXRjVgw1+<$H?LJ7@RUxSjB_f*%s#$pjlOtG>Si<}D@bXwsr zg+(Y4e08~&GFSvvn(TVZjAhjQ4t1}`BB!PigqpI`ZqV2qorRNBDyL-xs@528&Q)jw0GV`NuNABGk}Ogm2XUr6<-_ z2#Zi+j&($*5nCvz?|NhCr_WVk5lT#U&wA*4bb$L9D(^S6VG&A9@kzf?m36qUu*!2l s8x}!CL_|bHL_|bHL_|bHM6~Bl0Ub{JwG1k9jQ{`u07*qoM6N<$f)Ufbod5s; literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/MendedBiomeBlade_GrovetendersTouchBlade.png b/Projectiles/Melee/MendedBiomeBlade_GrovetendersTouchBlade.png new file mode 100644 index 0000000000000000000000000000000000000000..55abcc13df9832966e1467fda4f3559581e4e83c GIT binary patch literal 1697 zcmV;S244AzP)Px*TS-JgRCt{2n_FyDMHqm;1Et+U+0yhvYoS01RH$4`xoIqvAOQqIR3gz3gE8`g zhJZ#i`XbRsOq5`Z_`rifNiY$j0wD+*5{eZ{F)cKtEiJturPj7f>3x0p_iuA%w}ryC z-6r$B?4Fr(rn7s#{pX*VQ?OVD!WrofgquyPUUD5zjE@Dt>zx2V&8@rsfvz7jMEx4I zjCw=Vh{VZWS9!xf%`OwN=1&12BRwr-JEu<+0M?KoMy(-ghQ^4Nru%;AGeJ=!(&nZE zaPjnCuKLoe)c{ORO>n>(62z!8e-R%L**q5^!04E{ARsOJM z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iYluN_9-9T r$^^`q)ZXMk-zX8Oqe8f`h8X-0x`Ic_AwHrP00000NkvXXu0mjf&7lq- literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/MendedBiomeBlade_GrovetendersTouchGlow.png b/Projectiles/Melee/MendedBiomeBlade_GrovetendersTouchGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..76fff1445646847ed06e8245a9ae4eb7ca9be41d GIT binary patch literal 858 zcmV-g1Eu_lP)Px&6iGxuRCt{2+B<6$Q5eSYXEOT%EWO|rudS7xh}dXl5wH>wAz&e*q!4VxMhGHk zwUvU}rP3w{no1C?tOO+{c>e?zG8c<^&)Gd^W@q;D&dl!m{EKX6H=8}X{5WUMBmiTK zv2hF99>BD9YGr%XkECS}F6a$~0Tfy$vQ%P00YIVZ{dYnYMVg$?kV2K4d!aRmG&!H$ z`tol86sq3b3N4U1sYp|yOcRAFH#b60-_Jy*;xO%bY(%DsLY3>ZJ%C9&`)CIMAc``G zagvElwOkG<(?p@l&8*P#-JJk{C^i&>>>H6x!*`mU74vjXTH9vBhy5o%1w>X+i&&*DB1xHkXAKU z+Q)sF+0Co#zx3Y(C{(@Hh2DL80Knk$%)GQA=gOXMN9N0`KXu=L7lkUXjc#BQK9am1|t+!w-i56rE?vVP2XXyE1cvg>WK7 zIs)|B#qYXrpdt!Yt}&tAkB0%2ooAXO@4T{VRTsg5fbK4Stz-B@N1@8qF7(O95dcH% zfb5laf5+opiO&gk&okSOLY1ps=t6JR^{!`*I9JN=>l5q9d~j~7mhq1og(_FO&>+ZU zhIS5=+p4+JzY=es=gPcyX0xuLj}?U~*Ti|KS$lCEn7_Zf>2}Xl{^WM4`$xDb$%u1KE6sgRjIpGH)FJ+|V#5i$axaYynH$V^V?ql!1}vCDF9qv+y(%MWv?H_nN0KFa!bcPH8n()D3meA7-Nhv#u#IaF~%5U kj4{R-V~jDz7-KE>52-|99r2yL)&Kwi07*qoM6N<$g79FKxBvhE literal 0 HcmV?d00001 From 55caf1171b1a450e50d1befe7f7371761543bea5 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sun, 9 Jan 2022 15:30:00 +0100 Subject: [PATCH 23/76] Small fixes --- Items/Weapons/Melee/TrueBiomeBlade.cs | 4 ++-- Projectiles/Melee/MendedBiomeBladeProjectiles.cs | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index d20684666f..42f4cefd9c 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -55,11 +55,11 @@ namespace CalamityMod.Items.Weapons.Melee l.text = info.function_description; } - if (l.text.StartsWith("FUNCTION_Extra")) + if (l.text.StartsWith("FUNCTION_EXTRA")) { AttunementInfo info = GetAttunementInfo(mainAttunement); l.overrideColor = info.color; - l.text = info.function_description; + l.text = info.function_extra; } if (l.text.StartsWith("Main attunement")) diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 8bc9456aeb..c469d1a739 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -463,7 +463,6 @@ namespace CalamityMod.Projectiles.Melee //Update the parameters drawOrigin = new Vector2(0f, blade.Height); - drawOffset = Owner.Center + (direction * 28f * projectile.scale) - Main.screenPosition; //Anim stuff spriteBatch.Draw(blade, drawOffset + thrustDisplace, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); @@ -559,8 +558,8 @@ namespace CalamityMod.Projectiles.Melee GeneralParticleHandler.SpawnParticle(Rock); } - if (Owner.HeldItem.type == ItemType()) - (Owner.HeldItem.modItem as BiomeBlade).CanLunge = 1; // Reset the lunge counter on pogo. This should make for more interesting and fun synergies + if (Owner.HeldItem.type == ItemType()) + (Owner.HeldItem.modItem as TrueBiomeBlade).StoredLunges = 2; // Reset the lunge counter on pogo. This should make for more interesting and fun synergies } } @@ -685,7 +684,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawOffsetStraight = Owner.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10 - Main.screenPosition; //How far from the player Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly - Vector2 drawOffsetFromBounce = drawOffsetStraight.SafeNormalize(Vector2.Zero) * MathHelper.Clamp(PogoCooldown, 0f, 20f)/20f * 20f; + Vector2 drawOffsetFromBounce = direction * MathHelper.Clamp(PogoCooldown, 0f, 20f)/20f * 20f; spriteBatch.Draw(blade, drawOffsetStraight + drawDisplacementAngle + drawOffsetFromBounce, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); } @@ -775,7 +774,7 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i < 4; i++) //Draw extra copies { - var tex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_AridGrandeurExtra"); + var tex = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_AridGrandeurExtra"); float drawAngle = direction.ToRotation(); From 6b9b4196342dafb8f0b84cd6f5e01cd5a6351e7b Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sun, 9 Jan 2022 18:23:57 +0100 Subject: [PATCH 24/76] Grovetender's Touch upgrade --- Items/Weapons/Melee/TrueBiomeBlade.cs | 7 +- .../Melee/MendedBiomeBladeProjectiles.cs | 133 ++++++++++++++++-- 2 files changed, 129 insertions(+), 11 deletions(-) diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 42f4cefd9c..f4f2910b04 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -113,7 +113,7 @@ namespace CalamityMod.Items.Weapons.Melee case Attunement.Tropical: AttunementInfo.name = "Grovetender's Touch"; AttunementInfo.function_description = "Throw out the blade using a vine whip. Striking enemies with the tip of the whip as it cracks guarantees a critical hit. The whip will also propel you towards struck tiles"; - AttunementInfo.function_extra = "Critical strikes do (SOMETHING)"; + AttunementInfo.function_extra = "Critical strikes sprout up extra vines that can hit up to three targets"; AttunementInfo.color = new Color(162, 200, 85); break; case Attunement.Evil: @@ -417,8 +417,9 @@ namespace CalamityMod.Items.Weapons.Melee powerLungeAvailable = true; PowerLungeCounter = 0; } - Projectile rapier = Projectile.NewProjectileDirect(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage * 2, knockBack, player.whoAmI, 26f, StoredLunges > 0 ? 1f : 0f); - (rapier.modProjectile as TrueDecaysRetort).ChargedUp = powerLungeAvailable; + Projectile proj = Projectile.NewProjectileDirect(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage * 2, knockBack, player.whoAmI, 26f, StoredLunges > 0 ? 1f : 0f); + if (proj.modProjectile is TrueDecaysRetort rapier) + rapier.ChargedUp = powerLungeAvailable; StoredLunges --; if (StoredLunges < 0) StoredLunges = 0; diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index c469d1a739..6045cfea82 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -321,7 +321,7 @@ namespace CalamityMod.Projectiles.Melee { base.OnHitNPC(target, damage, knockback, crit); if (SwingMode == 2) - target.AddBuff(BuffType(), 40); + target.AddBuff(BuffType(), 40); } public override void AI() @@ -367,7 +367,7 @@ namespace CalamityMod.Projectiles.Melee rotation = projectile.rotation + MathHelper.Lerp(SwingWidth / 2 * SwingDirection, -SwingWidth / 2 * SwingDirection, factor); projectile.scale = 1f + ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 0.6f); //SWAGGER - Lighting.AddLight(Owner.MountedCenter, new Vector3(0.75f, 1f, 1f) * (float)Math.Sin(Timer/MaxTime * MathHelper.Pi)); + Lighting.AddLight(Owner.MountedCenter, new Vector3(0.75f, 1f, 1f) * (float)Math.Sin(Timer / MaxTime * MathHelper.Pi)); //Add the thrust motion & animation for the third combo state if (SwingMode == 2) @@ -623,7 +623,7 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitPvp(Player target, int damage, bool crit) => ShredTarget(); private void ShredTarget() - { + { if (Main.myPlayer != Owner.whoAmI) return; // get lifted up @@ -684,7 +684,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawOffsetStraight = Owner.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10 - Main.screenPosition; //How far from the player Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly - Vector2 drawOffsetFromBounce = direction * MathHelper.Clamp(PogoCooldown, 0f, 20f)/20f * 20f; + Vector2 drawOffsetFromBounce = direction * MathHelper.Clamp(PogoCooldown, 0f, 20f) / 20f * 20f; spriteBatch.Draw(blade, drawOffsetStraight + drawDisplacementAngle + drawOffsetFromBounce, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); } @@ -801,6 +801,7 @@ namespace CalamityMod.Projectiles.Melee public class TrueGrovetendersTouch : ModProjectile { + private NPC[] excludedTargets = new NPC[4]; public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_GrovetendersTouchBlade"; private bool initialized = false; public Player Owner => Main.player[projectile.owner]; @@ -815,6 +816,8 @@ namespace CalamityMod.Projectiles.Melee const float ReelBackStrenght = 14f; const float ChainDamageReduction = 0.5f; + const float MaxTangleReach = 200f; //How long can tangling vines from crits be + public BezierCurve curve; private Vector2 controlPoint1; private Vector2 controlPoint2; @@ -866,7 +869,7 @@ namespace CalamityMod.Projectiles.Melee if (SnapCoyoteTime > 0f) { crit = true; - for (int i = 0; i < 3; i++) + for (int i = 0; i < 4; i++) { Vector2 sparkSpeed = Owner.DirectionTo(target.Center).RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver2, MathHelper.PiOver2)) * 9f; Particle Spark = new CritSpark(target.Center, sparkSpeed, Color.White, Color.LimeGreen, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 0.6f); @@ -877,13 +880,52 @@ namespace CalamityMod.Projectiles.Melee } else damage = (int)(damage * ChainDamageReduction); //If the enemy is hit with the chain of the whip, the damage gets reduced + } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { if (crit) { - //Do something + bool boing = false; + excludedTargets[0] = target; + for (int i = 0; i < 3; i++) + { + NPC potentialTarget = TargetNext(target.Center, i); + if (potentialTarget == null) + break; + if (!boing) + { + boing = true; + Main.PlaySound(SoundID.Item56); + } + Projectile.NewProjectile(target.Center, Vector2.Zero, ProjectileType(), damage / 2, 0, Owner.whoAmI, target.whoAmI, potentialTarget.whoAmI); + } + Array.Clear(excludedTargets, 0, 3); } } + public NPC TargetNext(Vector2 hitFrom, int index) + { + float longestReach = MaxTangleReach * 3; + NPC target = null; + for (int i = 0; i < 200; ++i) + { + NPC npc = Main.npc[i]; + if (!excludedTargets.Contains(npc) && npc.CanBeChasedBy() && !npc.friendly && !npc.townNPC) + { + float distance = Vector2.Distance(hitFrom, npc.Center); + if (distance < longestReach) + { + longestReach = distance; + target = npc; + } + } + } + if (index < 3) + excludedTargets[index + 1] = target; + return target; + } + public override void AI() { if (!initialized) //Initialization. create control points & shit) @@ -899,7 +941,7 @@ namespace CalamityMod.Projectiles.Melee } if (ReelingBack && HasSnapped == 0f) //Snap & also small coyote time for the hook - { + { Main.PlaySound(SoundID.Item41, projectile.Center); //Snap HasSnapped = 1f; SnapCoyoteTime = coyoteTimeFrames; @@ -1020,7 +1062,7 @@ namespace CalamityMod.Projectiles.Melee } BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, projBottom }); - int numPoints = 30; //"Should make dynamic based on curve length, but I'm not sure how to smoothly do that while using a bezier curve" -Graydee, from the code i referenced. I do agree. + int numPoints = 30; chainPositions = curve.GetPoints(numPoints).ToArray(); //Draw each chain segment bar the very first one @@ -1048,4 +1090,79 @@ namespace CalamityMod.Projectiles.Melee initialized = reader.ReadBoolean(); } } + + public class GrovetendersEntanglingVines : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchChain"; + public Player Owner => Main.player[projectile.owner]; + public float Timer => 20 - projectile.timeLeft; + public NPC NPCfrom + { + get => Main.npc[(int)projectile.ai[0]]; + set => projectile.ai[0] = value.whoAmI; + } + public NPC Target + { + get => Main.npc[(int)projectile.ai[1]]; + set => projectile.ai[1] = value.whoAmI; + } + + const float curvature = 16f; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Entangling Growth"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 8; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 30; + projectile.timeLeft = 20; + } + + public override bool? CanHitNPC(NPC target) => target == Target; + + public override void AI() + { + projectile.Center = Target.Center; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D chainTex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchChain"); + + float opacity = projectile.timeLeft > 10 ? 1 : projectile.timeLeft / 10f; + Vector2 Shake = projectile.timeLeft < 15 ? Vector2.Zero : Vector2.One.RotatedByRandom(MathHelper.TwoPi) * (15 - projectile.timeLeft / 5f) * 0.5f; + + Vector2 lineDirection = Vector2.Normalize(Target.Center - NPCfrom.Center); + int dist = (int)Vector2.Distance(Target.Center, NPCfrom.Center) / 16; + Vector2[] Nodes = new Vector2[dist + 1]; + Nodes[0] = NPCfrom.Center; + Nodes[dist] = Target.Center; + float pointUp = Target.Center.X > NPCfrom.Center.X ? -MathHelper.PiOver2 : MathHelper.PiOver2; + + for (int i = 1; i < dist+1; i++) + { + Vector2 positionAlongLine = Vector2.Lerp(NPCfrom.Center, Target.Center, i / (float)dist); //Get the position of the segment along the line, as if it were a flat line + float elevation = (float)Math.Sin(i / (float)dist * MathHelper.Pi) * curvature * dist / 10f; + Nodes[i] = positionAlongLine + lineDirection.RotatedBy(pointUp) * elevation + Shake * (float)Math.Sin(i / (float)dist * MathHelper.Pi); + + float rotation = (Nodes[i] - Nodes[i - 1]).ToRotation() - MathHelper.PiOver2; //Calculate rotation based on direction from last point + float yScale = Vector2.Distance(Nodes[i], Nodes[i - 1]) / chainTex.Height; //Calculate how much to squash/stretch for smooth chain based on distance between points + Vector2 scale = new Vector2(1, yScale); + + Color chainLightColor = Lighting.GetColor((int)Nodes[i].X / 16, (int)Nodes[i].Y / 16); //Lighting of the position of the chain segment + + Vector2 origin = new Vector2(chainTex.Width / 2, chainTex.Height); //Draw from center bottom of texture + spriteBatch.Draw(chainTex, Nodes[i] - Main.screenPosition, null, chainLightColor * opacity, rotation, origin, scale, SpriteEffects.None, 0); + } + return false; + } + + } } From 3975659493dee49ba4c4ec27c54ed20eac90fca0 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sun, 9 Jan 2022 20:54:56 +0100 Subject: [PATCH 25/76] Ice mist for biting embrace --- Items/Weapons/Melee/TrueBiomeBlade.cs | 2 +- Particles/MediumMist.png | Bin 4973 -> 4955 bytes .../Melee/MendedBiomeBladeProjectiles.cs | 120 ++++++++++++++++-- 3 files changed, 110 insertions(+), 12 deletions(-) diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index f4f2910b04..02ef9f5d05 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -562,7 +562,7 @@ namespace CalamityMod.Items.Weapons.Melee { Owner.heldProj = projectile.whoAmI; - projectile.Center = Owner.Center + new Vector2(16f * Owner.direction, -30 * SwordHeight() + 10f); + projectile.Center = Owner.Center + new Vector2(16f * Owner.direction + Owner.direction < 0 ? -26f : 16f, -30 * SwordHeight() + 10f); projectile.rotation = MathHelper.PiOver4 + MathHelper.PiOver2; // No more silly turnaround with the repaired one? ChannelTimer++; projectile.timeLeft = 60; diff --git a/Particles/MediumMist.png b/Particles/MediumMist.png index 37f4a196f6b94b97cde3ec728792a352d47523fe..34dcca01a82f76ad0ca8c3c4d7c61ecd24b93010 100644 GIT binary patch literal 4955 zcmW-ldpy(a|Hr3vH^<~mXbvGsV%2V;ni1NN5HcjkzJ!o-w1^SIawakCcAAjM980Vv zq}^I>F$_yf&N&sotKT2n9{U`x>-xOjuh;Ya!P{6}77>&egg_u77Un2h@CySUZ|Gm( zyE>Yf2!8lNY%e1rltG1g2t-240(HsG_rXG;Mc|S7VS3#6#AxCGw#IAtqoZ7}t{B2W zH_rt(BMD3LoXhKXxywje;=aAvnQ%(L9VQ?K`=pjk&x5KGJhU3oC)IlA23;8&-H}Q} z6)(c74!H$_6fgWG<^%qw6b683QsR1Ai24@!hh{|VI8>03VS`J zTWSN1UygXZxbu>7MU4Nk87XmtHPNSVkqHMomm`W?bdqk$7L}9`(dxtSG%IqCFI+_& zpJ7??A*|R@`w@?}wi8=0FqiheiwG&TNe)7w)rqB!+8^(<2qg7vc3Nvoo7mgOurD*= zaLlc+FewN<_^o#n|D}svY#&`&T_plHA(9N?EX!h9v+PR0j|=xs3qQQyb?S^HKi^bP z94p$2R{8TNg$z8)ry z=Rc%m2qQ9rxPyucbY=OpGM>R!jMC65G!f}r&=+BtQ!mE{rpNHi@`YQfi7QJAT5tt$ zkfGJ*0fk^vH)XX?og(oJ@F?8T-KC_*W~zGm!d;uary`an`5GM2dU!hLpK8len~e1N z$cb8kgqF)Hhy9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z2=%i4h8;8<7T>--=Le51mEq5#GQd9QeEfpG}p&fBIY z<2RCjJJe5p_H4C;yv`yL?*r6Sb{_% zSyohemv=TAcaS|)gn^m>*YE*D*Z;@x`=N4ji*IC6s59I7-{}jYxxd7(ek*))VOUAX zCQsU)R_>>mKjQ1}KlgO#Fy+CuZ-F9r8-2jJfL#XGAB>?;>zI1)6#%2J8bNnhA+xc7 z5p}eQGrmvfzLr>cm6ab@`3CF7jHn|?3WWk3V&B1kionx=LR+&;5tqF*N`QAFpi3$$ zBzJdr^LFD{W@f6ojLX&k02o{|SI*x*pf!P^fe7%$eFe^C2lTtp#7K63rzz@+e<-PH zoqUN`iZ4e_TLkxd+Se#fDfHVC7u)Dhq>|t?nQUJ}UssKo>&xssp*8idh@S49AM?yX z!4xF1i*T?A(?z`3jr2(9pe~U)5b^hB)+3)>tvD>0d**B*P&8IGDodl$THYB}TDD>~ z|E>MTIV4tM791G3SyHVsU}5rdtMYGTr+cqMlRjew|;VAVL``@rFlc+as~m!!{^$Nkrud?mNWd2@fbJS zvG~cNwS)mWIXxeL^cg3OJ73N0*BVcFxA$20s2ukN9)#Xt(Ci;6k}vqu+Fa z^d_tAN0jDYb^bCg_tp=^%t1e!B?L1qE(A|6%Dtfv9z5VoykkOqx$61!X)(|w5Hc-m z4gO5WJp{=O*hSC^@Vr6HqtEt+{~%y5_4jXybLXyk5p(`T`&Zh@L;0ES$pLTX` zENba z1lMSP%%6cdFvhd#6oLn#!eItv z@}OH3zmA_#|B4o@ze_Q)V^ua0>)xzijfL*V~ X0n)5*WdjAz&me|+X1a|!E;0WHVBE#d diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 6045cfea82..e84fb2efca 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -247,6 +247,7 @@ namespace CalamityMod.Projectiles.Melee public ref float SwingMode => ref projectile.ai[0]; //0 = Up-Down small slash, 1 = Down-Up large slash, 2 = Thrust public ref float MaxTime => ref projectile.ai[1]; public float Timer => MaxTime - projectile.timeLeft; + const float MistDamageReduction = 0.2f; public int SwingDirection { @@ -372,7 +373,7 @@ namespace CalamityMod.Projectiles.Melee //Add the thrust motion & animation for the third combo state if (SwingMode == 2) { - projectile.scale = 1f + (ThrustScaleRatio() * 0.6f); + projectile.scale = 1f + (ThrustScaleRatio() * 0.3f); projectile.Center = Owner.Center + (direction * ThrustDisplaceRatio() * 60); projectile.frameCounter++; @@ -381,18 +382,18 @@ namespace CalamityMod.Projectiles.Melee if (Main.rand.NextBool()) { - Particle mist = new MediumMistParticle(Owner.Center + direction * 40 + Main.rand.NextVector2Circular(30f, 30f), Vector2.Zero, new Color(172, 238, 255), new Color(145, 170, 188), Main.rand.NextFloat(0.5f, 1.5f), 245 - Main.rand.Next(50), 0.02f); - mist.Velocity = (mist.Position - Owner.Center) * 0.2f + Owner.velocity; - GeneralParticleHandler.SpawnParticle(mist); + Projectile mist = Projectile.NewProjectileDirect(Owner.Center + direction * 40 + Main.rand.NextVector2Circular(30f, 30f), Vector2.Zero, ProjectileType(), (int)(projectile.damage * MistDamageReduction), 0f, Owner.whoAmI); + mist.velocity = (mist.Center - Owner.Center) * 0.2f + Owner.velocity; } } else { - //Shit out lingering damaging mist if (Main.rand.NextFloat(0f, 1f) > 0.75f) { + Projectile.NewProjectile(Owner.Center + direction * 40, rotation.ToRotationVector2() * 5, ProjectileType(), (int)(projectile.damage * MistDamageReduction), 0f, Owner.whoAmI); + Vector2 particlePosition = Owner.Center + (rotation.ToRotationVector2() * 100f * projectile.scale); Particle snowflake = new SnowflakeSparkle(particlePosition, rotation.ToRotationVector2() * 3f, Color.White, new Color(75, 177, 250), Main.rand.NextFloat(0.3f, 1.5f), 40, 0.5f); GeneralParticleHandler.SpawnParticle(snowflake); @@ -488,6 +489,77 @@ namespace CalamityMod.Projectiles.Melee } } + public class BitingEmbraceMist : ModProjectile + { + public override string Texture => "CalamityMod/Particles/MediumMist"; + public Player Owner => Main.player[projectile.owner]; + public Color mistColor; + public int variant = -1; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Glacial Mist"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 34; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.timeLeft = 300; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + Vector2 size = projectile.Size * projectile.scale; + + return Collision.CheckAABBvAABBCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center - size / 2f, size); + } + + public override void AI() + { + if (variant == -1) + variant = Main.rand.Next(3); + + projectile.velocity *= 0.85f; + projectile.position += projectile.velocity; + projectile.rotation += 0.02f * projectile.timeLeft / 300f * ((projectile.velocity.X > 0) ? 1f : -1f); + + if (projectile.alpha < 165) + { + projectile.scale += 0.05f; + projectile.alpha += 2; + } + else + { + projectile.scale *= 0.975f; + projectile.alpha += 1; + } + if (projectile.alpha >= 200) + projectile.Kill(); + + mistColor = Color.Lerp(new Color(172, 238, 255), new Color(145, 170, 188), MathHelper.Clamp((float)(projectile.alpha - 100) / 80, 0f, 1f)) * (255 - projectile.alpha / 255f); + } + + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Additive, SamplerState.PointClamp, DepthStencilState.Default, null, null, Main.GameViewMatrix.ZoomMatrix); + + var tex = GetTexture("CalamityMod/Particles/MediumMist"); + Rectangle frame = tex.Frame(1, 3, 0, variant); + spriteBatch.Draw(tex, projectile.position - Main.screenPosition, frame, mistColor * ((255f - projectile.alpha) / 255f), projectile.rotation, frame.Size() * 0.5f, projectile.scale, SpriteEffects.None, 0f); + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + } + public class TrueAridGrandeur : ModProjectile { public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_AridGrandeur"; @@ -496,6 +568,7 @@ namespace CalamityMod.Projectiles.Melee public ref float Shred => ref projectile.ai[0]; //How much the attack is, attacking public float ShredRatio => MathHelper.Clamp(Shred / (maxShred * 0.5f), 0f, 1f); public ref float PogoCooldown => ref projectile.ai[1]; //Cooldown for the pogo + public ref float BounceTime => ref projectile.localAI[0]; public Player Owner => Main.player[projectile.owner]; public bool CanPogo => Owner.velocity.Y != 0 && PogoCooldown <= 0; //Only pogo when in the air and if the cooldown is zero private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; @@ -538,6 +611,7 @@ namespace CalamityMod.Projectiles.Melee Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.position); Vector2 hitPosition = Owner.Center + (direction * 100 * projectile.scale); + BounceTime = 20f; //Used only for animation for (int i = 0; i < 8; i++) { @@ -616,6 +690,7 @@ namespace CalamityMod.Projectiles.Melee Shred--; PogoCooldown--; + BounceTime--; projectile.timeLeft = 2; } @@ -678,13 +753,13 @@ namespace CalamityMod.Projectiles.Melee drawAngle = direction.ToRotation(); float circleCompletion = (float)Math.Sin(Main.GlobalTime * 5 + i * MathHelper.PiOver2); - drawRotation = drawAngle + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi / 7f) * ShredRatio); + drawRotation = drawAngle + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi / 9f) * ShredRatio); drawOrigin = new Vector2(0f, blade.Height); Vector2 drawOffsetStraight = Owner.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10 - Main.screenPosition; //How far from the player Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly - Vector2 drawOffsetFromBounce = direction * MathHelper.Clamp(PogoCooldown, 0f, 20f) / 20f * 20f; + Vector2 drawOffsetFromBounce = direction * MathHelper.Clamp(BounceTime, 0f, 20f) / 20f * 20f; spriteBatch.Draw(blade, drawOffsetStraight + drawDisplacementAngle + drawOffsetFromBounce, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); } @@ -779,7 +854,7 @@ namespace CalamityMod.Projectiles.Melee float drawAngle = direction.ToRotation(); float circleCompletion = (float)Math.Sin(Main.GlobalTime * 5 + i * MathHelper.PiOver2); - float drawRotation = drawAngle + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi / 7f) * ShredRatio); + float drawRotation = drawAngle + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi / 9f) * ShredRatio); Vector2 drawOrigin = new Vector2(0f, tex.Height); @@ -787,7 +862,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawOffsetStraight = projectile.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10 - Main.screenPosition; //How far from the player Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly - spriteBatch.Draw(tex, drawOffsetStraight + drawDisplacementAngle, null, lightColor * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + spriteBatch.Draw(tex, drawOffsetStraight + drawDisplacementAngle, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); } //Back to normal @@ -797,6 +872,29 @@ namespace CalamityMod.Projectiles.Melee return false; } + public override void Kill(int timeLeft) + { + for (int i = 0; i < 4; i++) //Particel + { + float drawAngle = direction.ToRotation(); + + float circleCompletion = (float)Math.Sin(Main.GlobalTime * 5 + i * MathHelper.PiOver2); + float drawRotation = drawAngle + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi / 9f) * ShredRatio); + + + Vector2 drawOffsetStraight = projectile.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10 - Main.screenPosition; //How far from the player + Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly + + for (int j = 0; j < 4; j++) + { + Particle Sparkle = new GenericSparkle(drawOffsetStraight + drawRotation.ToRotationVector2() * (j - 1) * 10f + drawDisplacementAngle, direction * Main.rand.NextFloat(1f, 5f), Color.White, Color.Orange, 0.5f + Main.rand.NextFloat(-0.2f, 0.2f), 20 + Main.rand.Next(30), 1, 2f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + + } + + } + } public class TrueGrovetendersTouch : ModProjectile @@ -816,7 +914,7 @@ namespace CalamityMod.Projectiles.Melee const float ReelBackStrenght = 14f; const float ChainDamageReduction = 0.5f; - const float MaxTangleReach = 200f; //How long can tangling vines from crits be + const float MaxTangleReach = 400f; //How long can tangling vines from crits be public BezierCurve curve; private Vector2 controlPoint1; @@ -906,7 +1004,7 @@ namespace CalamityMod.Projectiles.Melee public NPC TargetNext(Vector2 hitFrom, int index) { - float longestReach = MaxTangleReach * 3; + float longestReach = MaxTangleReach; NPC target = null; for (int i = 0; i < 200; ++i) { From 75c8aa3b8d2b23838db5a2ac865b4c6f7e0342b0 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Mon, 10 Jan 2022 01:50:55 +0100 Subject: [PATCH 26/76] Decay's retort dash + *cooler* mist --- CalPlayer/CalamityPlayerMiscEffects.cs | 5 + Items/Weapons/Melee/TrueBiomeBlade.cs | 14 +- .../Melee/MendedBiomeBladeProjectiles.cs | 191 +++++++++++++++++- .../MendedBiomeBlade_DecaysRetortDash.png | Bin 0 -> 114 bytes 4 files changed, 199 insertions(+), 11 deletions(-) create mode 100644 Projectiles/Melee/MendedBiomeBlade_DecaysRetortDash.png diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 213512007d..c451613917 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1094,6 +1094,11 @@ namespace CalamityMod.CalPlayer player.maxFallSpeed = 15f; if (gSabatonFall > 0 || player.PortalPhysicsEnabled) player.maxFallSpeed = 20f; + if (player.HeldItem.modItem is TrueBiomeBlade blade) + { + if (blade.mainAttunement == TrueBiomeBlade.Attunement.Evil && blade.strongLunge) + player.maxFallSpeed = 80f; + } } } diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 02ef9f5d05..8bef83a64d 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Melee public int Combo = 0; public int StoredLunges = 2; public int PowerLungeCounter = 0; - + public bool strongLunge = false; public override void SetStaticDefaults() { DisplayName.SetDefault("Mended Biome Blade"); @@ -308,7 +308,6 @@ namespace CalamityMod.Items.Weapons.Melee item.UseSound = null; item.noMelee = true; - Combo = 0; PowerLungeCounter = 0; break; case Attunement.Evil: @@ -385,6 +384,8 @@ namespace CalamityMod.Items.Weapons.Melee public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { + strongLunge = false; + if (mainAttunement == null) return false; @@ -410,6 +411,15 @@ namespace CalamityMod.Items.Weapons.Melee Combo = 0; return false; + case Attunement.Tropical: + Projectile whipProj = Projectile.NewProjectileDirect(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 0, 15); + if (whipProj.modProjectile is TrueGrovetendersTouch whip) + whip.flipped = Combo == 0 ? 1 : -1; + Combo++; + if (Combo > 1) + Combo = 0; + return false; + case Attunement.Evil: bool powerLungeAvailable = false; if (PowerLungeCounter == 3) diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index e84fb2efca..4a29defd73 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -86,14 +86,20 @@ namespace CalamityMod.Projectiles.Melee { public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_DecaysRetort"; private bool initialized = false; - Vector2 direction = Vector2.Zero; + public Vector2 direction = Vector2.Zero; public ref float MaxTime => ref projectile.ai[0]; public ref float CanLunge => ref projectile.ai[1]; public float Timer => MaxTime - projectile.timeLeft; public bool ChargedUp; public Player Owner => Main.player[projectile.owner]; public const float LungeSpeed = 16; + public const float PowerLungeDistance = 500; public ref float CanBounce => ref projectile.localAI[0]; + public ref float dashTimer => ref projectile.localAI[1]; + public const float maxDash = 20f; + + private Vector2 PowerLungeStart; + private Vector2 PowerLungeEnd; public override void SetStaticDefaults() { @@ -136,11 +142,36 @@ namespace CalamityMod.Projectiles.Melee projectile.netSpam = 0; } - if (ChargedUp && Timer / MaxTime > 0.5) + if (ChargedUp && Timer / MaxTime > 0.5 && dashTimer == 0f) { PowerLunge(); } + if (dashTimer >= 1f) + { + if (dashTimer < maxDash) + { + Owner.velocity = direction * 60f; + projectile.timeLeft = (int)(MaxTime / 2f); + dashTimer++; + } + + if (dashTimer == maxDash) + { + Owner.velocity *= 0.1f; //Abrupt stop + if (Owner.HeldItem.modItem is TrueBiomeBlade blade) + blade.strongLunge = false; + Projectile proj = Projectile.NewProjectileDirect(Owner.Center + (PowerLungeEnd - PowerLungeStart) / 2f, Vector2.Zero, ProjectileType(), projectile.damage, 0, Owner.whoAmI); + if (proj.modProjectile is DecaysRetortDash dash) + { + dash.DashStart = PowerLungeStart; + dash.DashEnd = Owner.Center; + } + + dashTimer = maxDash + 1; + } + } + //Manage position and rotation projectile.scale = 1f + ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 0.6f); //SWAGGER projectile.Center = Owner.Center + (direction * ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 60)); @@ -167,7 +198,26 @@ namespace CalamityMod.Projectiles.Melee public void PowerLunge() { - + if (Owner.HeldItem.modItem is TrueBiomeBlade blade) + blade.strongLunge = true; + PowerLungeStart = Owner.Center; + dashTimer = 1f; + Owner.GiveIFrames(60); + } + //Gives us the longest distance the dash can be + private static Vector2 LongestClearDistance(Vector2 start, Vector2 end) + { + Vector2 distance = end - start; + Vector2 longestDistance = Vector2.Zero; + //Check every block along the way + for (float i = 0; i < 1; i += 8.0f / distance.Length()) + { + Vector2 positionToCheck = start + (distance * i); + if (Main.tile[(int)(positionToCheck.X / 16), (int)(positionToCheck.Y / 16)].active()) + return longestDistance; + longestDistance = distance * i; + } + return distance; } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => OnHitEffects(!target.canGhostHeal || Main.player[projectile.owner].moonLeech); @@ -175,6 +225,9 @@ namespace CalamityMod.Projectiles.Melee private void OnHitEffects(bool cannotLifesteal) { + if (ChargedUp) + return; + projectile.netUpdate = true; projectile.netSpam = 0; @@ -191,6 +244,15 @@ namespace CalamityMod.Projectiles.Melee Owner.velocity = -direction.SafeNormalize(Vector2.Zero) * MathHelper.Clamp(bounceStrength, 0f, 22f); CanBounce = 0f; Owner.GiveIFrames(10); // 10 i frames for free! + if (Owner.whoAmI == Main.myPlayer) + { + if (Owner.HeldItem.modItem is TrueBiomeBlade sword) + { + sword.PowerLungeCounter++; + if (sword.PowerLungeCounter == 3) + Main.PlaySound(SoundID.Item79); //indicate the charge with a sound effect + } + } } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) @@ -214,6 +276,13 @@ namespace CalamityMod.Projectiles.Melee drawOrigin = new Vector2(0f, tex.Height); spriteBatch.Draw(tex, drawOffset + displace, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + if (dashTimer > 0f && dashTimer < maxDash) + { + float thrustRatio = (float)Math.Sin(dashTimer / maxDash * MathHelper.Pi); + spriteBatch.Draw(tex, drawOffset + displace, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale * (1 + thrustRatio * 0.2f), 0f, 0f); + } + //Back to normal spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); @@ -237,6 +306,98 @@ namespace CalamityMod.Projectiles.Melee } } + public class DecaysRetortDash : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public Player Owner => Main.player[projectile.owner]; + public float Timer => 20 - projectile.timeLeft; + + public Vector2 DashStart; + public Vector2 DashEnd; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Evisceration Lunge"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 8; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 60; + projectile.timeLeft = 20; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), DashStart, DashEnd); + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + for (int i = 0; i < 3; i++) + { + Vector2 sparkSpeed = Owner.DirectionTo(target.Center).RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4)) * 9f; + Particle Spark = new CritSpark(target.Center, sparkSpeed, Color.White, Color.Crimson, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 0.6f); + GeneralParticleHandler.SpawnParticle(Spark); + } + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) //OMw to reuse way too much code from the entangling vines + { + + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + Texture2D chainTex = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_DecaysRetortDash"); + + Vector2 Shake = projectile.timeLeft < 15 ? Vector2.Zero : Vector2.One.RotatedByRandom(MathHelper.TwoPi) * (15 - projectile.timeLeft / 5f) * 0.5f; + + Vector2 lineDirection = Vector2.Normalize(DashEnd - DashStart); + int dist = (int)Vector2.Distance(DashEnd, DashStart) / 16; + Vector2[] Nodes = new Vector2[dist + 1]; + Nodes[0] = DashStart; + Nodes[dist] = DashEnd; + + + for (int i = 1; i < dist + 1; i++) + { + Vector2 positionAlongLine = Vector2.Lerp(DashStart, DashEnd, i / (float)dist); //Get the position of the segment along the line + + Nodes[i] = positionAlongLine + Shake * (float)Math.Sin(i / (float)dist * MathHelper.PiOver2); + + float rotation = (Nodes[i] - Nodes[i - 1]).ToRotation() - MathHelper.PiOver2; //Calculate rotation based on direction from last point + float yScale = Vector2.Distance(Nodes[i], Nodes[i - 1]) / chainTex.Height; //Calculate how much to squash/stretch for smooth chain based on distance between points + float xScale = (i / (float)dist) * 5f; + Vector2 scale = new Vector2(xScale, yScale); + + float opacity = MathHelper.Clamp((float)Math.Sin(i / (float)dist * MathHelper.PiOver2) - (i / (float)dist * ((20f - projectile.timeLeft) / 25f)), 0f, 1f); + + Vector2 origin = new Vector2(chainTex.Width / 2, chainTex.Height); //Draw from center bottom of texture + spriteBatch.Draw(chainTex, Nodes[i] - Main.screenPosition, null, Color.Crimson * opacity, rotation, origin, scale, SpriteEffects.None, 0); + } + + Texture2D sparkTexture = GetTexture("CalamityMod/Particles/CritSpark"); + Texture2D bloomTexture = GetTexture("CalamityMod/Particles/BloomCircle"); + //Ajust the bloom's texture to be the same size as the star's + float properBloomSize = (float)sparkTexture.Width / (float)bloomTexture.Height; + + float bump = (float)Math.Sin(((20f - projectile.timeLeft) / 20f) * MathHelper.Pi); + float raise = (float)Math.Sin(((20f - projectile.timeLeft) / 20f) * MathHelper.PiOver2); + Rectangle frame = new Rectangle(0, 0, 14, 14); + + spriteBatch.Draw(bloomTexture, DashEnd - Main.screenPosition, null, Color.Crimson * bump * 0.5f, 0, bloomTexture.Size() / 2f, bump * 6f * properBloomSize, SpriteEffects.None, 0); + spriteBatch.Draw(sparkTexture, DashEnd - Main.screenPosition, frame, Color.Lerp(Color.White, Color.Crimson, raise) * bump, raise * MathHelper.TwoPi, frame.Size() / 2f, bump * 3f, SpriteEffects.None, 0); + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + return false; + } + } + public class TrueBitingEmbrace : ModProjectile { public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_BitingEmbrace"; @@ -505,7 +666,7 @@ namespace CalamityMod.Projectiles.Melee projectile.width = projectile.height = 34; projectile.tileCollide = false; projectile.friendly = true; - projectile.penetrate = -1; + projectile.penetrate = 2; projectile.timeLeft = 300; } @@ -521,6 +682,13 @@ namespace CalamityMod.Projectiles.Melee if (variant == -1) variant = Main.rand.Next(3); + if (Main.rand.Next(15) == 0 && projectile.alpha <= 140) //only try to spawn your particles if you're not close to dying + { + Vector2 particlePosition = projectile.Center + Main.rand.NextVector2Circular(projectile.width * projectile.scale * 0.5f, projectile.height * projectile.scale * 0.5f); + Particle snowflake = new SnowflakeSparkle(particlePosition, Vector2.Zero, Color.White, new Color(75, 177, 250), Main.rand.NextFloat(0.3f, 1.5f), 40, 0.5f); + GeneralParticleHandler.SpawnParticle(snowflake); + } + projectile.velocity *= 0.85f; projectile.position += projectile.velocity; projectile.rotation += 0.02f * projectile.timeLeft / 300f * ((projectile.velocity.X > 0) ? 1f : -1f); @@ -535,7 +703,7 @@ namespace CalamityMod.Projectiles.Melee projectile.scale *= 0.975f; projectile.alpha += 1; } - if (projectile.alpha >= 200) + if (projectile.alpha >= 170) projectile.Kill(); mistColor = Color.Lerp(new Color(172, 238, 255), new Color(145, 170, 188), MathHelper.Clamp((float)(projectile.alpha - 100) / 80, 0f, 1f)) * (255 - projectile.alpha / 255f); @@ -549,7 +717,7 @@ namespace CalamityMod.Projectiles.Melee var tex = GetTexture("CalamityMod/Particles/MediumMist"); Rectangle frame = tex.Frame(1, 3, 0, variant); - spriteBatch.Draw(tex, projectile.position - Main.screenPosition, frame, mistColor * ((255f - projectile.alpha) / 255f), projectile.rotation, frame.Size() * 0.5f, projectile.scale, SpriteEffects.None, 0f); + spriteBatch.Draw(tex, projectile.position - Main.screenPosition, frame, mistColor * 0.5f * ((255f - projectile.alpha) / 255f), projectile.rotation, frame.Size() * 0.5f, projectile.scale, SpriteEffects.None, 0f); //Back to normal spriteBatch.End(); @@ -862,7 +1030,9 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawOffsetStraight = projectile.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10 - Main.screenPosition; //How far from the player Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly - spriteBatch.Draw(tex, drawOffsetStraight + drawDisplacementAngle, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + float opacityFade = projectile.timeLeft > 15 ? 1 : projectile.timeLeft / 15f; + + spriteBatch.Draw(tex, drawOffsetStraight + drawDisplacementAngle, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.8f * opacityFade, drawRotation, drawOrigin, projectile.scale, 0f, 0f); } //Back to normal @@ -874,6 +1044,7 @@ namespace CalamityMod.Projectiles.Melee public override void Kill(int timeLeft) { + Main.PlaySound(SoundID.Item60, projectile.Center); for (int i = 0; i < 4; i++) //Particel { float drawAngle = direction.ToRotation(); @@ -882,12 +1053,12 @@ namespace CalamityMod.Projectiles.Melee float drawRotation = drawAngle + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi / 9f) * ShredRatio); - Vector2 drawOffsetStraight = projectile.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10 - Main.screenPosition; //How far from the player + Vector2 drawOffsetStraight = projectile.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10; //How far from the player Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly for (int j = 0; j < 4; j++) { - Particle Sparkle = new GenericSparkle(drawOffsetStraight + drawRotation.ToRotationVector2() * (j - 1) * 10f + drawDisplacementAngle, direction * Main.rand.NextFloat(1f, 5f), Color.White, Color.Orange, 0.5f + Main.rand.NextFloat(-0.2f, 0.2f), 20 + Main.rand.Next(30), 1, 2f); + Particle Sparkle = new GenericSparkle(drawOffsetStraight + (drawRotation - MathHelper.PiOver4).ToRotationVector2() * (60 + j * 50f) + drawDisplacementAngle, direction * projectile.velocity.Length() * Main.rand.NextFloat(0.9f, 1.1f), Color.Lerp(Color.Cyan, Color.Orange, (j + 1) / 4f), Color.OrangeRed, 0.5f + Main.rand.NextFloat(-0.2f, 0.2f), 20 + Main.rand.Next(30), 1, 2f); GeneralParticleHandler.SpawnParticle(Sparkle); } @@ -907,6 +1078,8 @@ namespace CalamityMod.Projectiles.Melee public ref float HasSnapped => ref projectile.ai[0]; public ref float SnapCoyoteTime => ref projectile.ai[1]; + public float flipped; + const float MaxTime = 90; const int coyoteTimeFrames = 15; //How many frames does the whip stay extended const int MaxReach = 400; diff --git a/Projectiles/Melee/MendedBiomeBlade_DecaysRetortDash.png b/Projectiles/Melee/MendedBiomeBlade_DecaysRetortDash.png new file mode 100644 index 0000000000000000000000000000000000000000..5bd65f8816be22fcf3958bcef27f010abb0b00c2 GIT binary patch literal 114 zcmeAS@N?(olHy`uVBq!ia0vp^>>xG=8<0#rS+W&KF%}28J29*~C-V}>(eZR~43U_c z{Nw-s{RjU4|Nj?=_rJ7f$!Yq;Iz!?EgO#_@rDHe#Z!w& KpUXO@geCy5awru5 literal 0 HcmV?d00001 From 346365a1392cc42d976a8de5dc185bce23191584 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Mon, 10 Jan 2022 03:25:54 +0100 Subject: [PATCH 27/76] When the whip has a combo! --- Items/Weapons/Melee/TrueBiomeBlade.cs | 4 +- .../Melee/BrokenBiomeBladeProjectiles.cs | 2 +- .../Melee/MendedBiomeBladeProjectiles.cs | 50 ++++++++++++------- 3 files changed, 35 insertions(+), 21 deletions(-) diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 8bef83a64d..64862de0fb 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Melee public bool strongLunge = false; public override void SetStaticDefaults() { - DisplayName.SetDefault("Mended Biome Blade"); + DisplayName.SetDefault("Biome Blade"); Tooltip.SetDefault("FUNCTION_DESC\n" + "FUNCTION_EXTRA\n" + "Use RMB while standing still on the ground to attune the weapon to the powers of the surrounding biome\n" + @@ -412,7 +412,7 @@ namespace CalamityMod.Items.Weapons.Melee return false; case Attunement.Tropical: - Projectile whipProj = Projectile.NewProjectileDirect(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 0, 15); + Projectile whipProj = Projectile.NewProjectileDirect(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 0, 0); if (whipProj.modProjectile is TrueGrovetendersTouch whip) whip.flipped = Combo == 0 ? 1 : -1; Combo++; diff --git a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs index 5ae391e777..f849d47d31 100644 --- a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs @@ -1006,7 +1006,7 @@ namespace CalamityMod.Projectiles.Melee if (!ReelingBack) //Make the curve be formed from points slightly ahead of the projectile, but clamped to the max rotation (straight line ahead) { - controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Clamp(ratio + 0.5f, 0f, 1f)) * 0.5f; + controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Clamp(ratio + 0.5f, 0f, 1f)) * 0.2f; controlPoint2 = Owner.MountedCenter + SwingPosition(MathHelper.Clamp(ratio + 0.2f, 0f, 1f)) * 0.5f; } else //After the whip snaps, make the curve be a wave diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 4a29defd73..4ee77bf15e 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -1083,7 +1083,7 @@ namespace CalamityMod.Projectiles.Melee const float MaxTime = 90; const int coyoteTimeFrames = 15; //How many frames does the whip stay extended const int MaxReach = 400; - const float SnappingPoint = 0.7f; //When does the snap occur. + const float SnappingPoint = 0.55f; //When does the snap occur. const float ReelBackStrenght = 14f; const float ChainDamageReduction = 0.5f; @@ -1101,7 +1101,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { projectile.melee = true; - projectile.width = projectile.height = 36; + projectile.width = projectile.height = 80; projectile.tileCollide = false; projectile.friendly = true; projectile.penetrate = -1; @@ -1125,14 +1125,21 @@ namespace CalamityMod.Projectiles.Melee Vector2 previousPosition = chainPositions[i - 1]; if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), position, previousPosition, 6, ref collisionPoint)) return true; + if (i == numPoints - 1) //Extra lenght collision for the blade itself + { + Vector2 projectileHalfLenght = 85 * projectile.rotation.ToRotationVector2(); + return (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center - projectileHalfLenght, projectile.Center + projectileHalfLenght, 32, ref collisionPoint)); + } + } + return base.Colliding(projHitbox, targetHitbox); } public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { base.ModifyHitNPC(target, ref damage, ref knockback, ref crit, ref hitDirection); - Vector2 projectileHalfLenght = (projectile.Size / 2f) * projectile.rotation.ToRotationVector2(); + Vector2 projectileHalfLenght = 85f * projectile.rotation.ToRotationVector2(); float collisionPoint = 0; //If you hit the enemy during the coyote time with the blade of the whip, guarantee a crit if (Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), projectile.Center - projectileHalfLenght, projectile.Center + projectileHalfLenght, 32, ref collisionPoint)) @@ -1230,7 +1237,7 @@ namespace CalamityMod.Projectiles.Melee float ratio = GetSwingRatio(); projectile.Center = Owner.MountedCenter + SwingPosition(ratio); - projectile.direction = projectile.spriteDirection = -Owner.direction; + projectile.direction = projectile.spriteDirection = -Owner.direction * (int)flipped; //MessWithTiles(); @@ -1271,7 +1278,9 @@ namespace CalamityMod.Projectiles.Melee distance = Math.Max(distance, 65); //Dont be too close to player float angleDeviation = MathHelper.Pi / 1.2f; - float angleOffset = Owner.direction * MathHelper.Lerp(-angleDeviation, 0, progress); //Go from very angled to straight at the zenith of the attack + float angleOffset = Owner.direction * flipped * MathHelper.Lerp(-angleDeviation, 0, progress); //Go from very angled to straight at the zenith of the attack + if (flipped == -1) + distance *= MathHelper.Lerp(0.1f, 0.3f, (float)Math.Sin(progress * MathHelper.Pi)); return projectile.velocity.RotatedBy(angleOffset) * distance; } else @@ -1295,22 +1304,27 @@ namespace CalamityMod.Projectiles.Melee drawRotation += SnapCoyoteTime > 0 ? MathHelper.Pi : 0; //During coyote time the blade flips for some reason. Prevent that from happening drawRotation += projectile.spriteDirection < 0 ? 0f : 0f; + if (ReelingBack) + drawRotation = Utils.AngleLerp(drawRotation, (projectile.Center - Owner.Center).ToRotation(), GetSwingRatio()); + Vector2 drawOrigin = new Vector2(0f, handle.Height); SpriteEffects flip = (projectile.spriteDirection < 0) ? SpriteEffects.None : SpriteEffects.None; lightColor = Lighting.GetColor((int)(projectile.Center.X / 16f), (int)(projectile.Center.Y / 16f)); spriteBatch.Draw(handle, projBottom - Main.screenPosition, null, lightColor, drawRotation, drawOrigin, projectile.scale, flip, 0f); - //Turn on additive blending - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - //Only update the origin for once - drawOrigin = new Vector2(0f, blade.Height); - spriteBatch.Draw(blade, projBottom - Main.screenPosition, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, flip, 0f); - //Back to normal - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - + if ((!ReelingBack || SnapCoyoteTime != 0f) && (Timer / MaxTime > 0.35f)) + { + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Only update the origin for once + drawOrigin = new Vector2(0f, blade.Height); + spriteBatch.Draw(blade, projBottom - Main.screenPosition, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, flip, 0f); + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + } return false; } @@ -1322,14 +1336,14 @@ namespace CalamityMod.Projectiles.Melee if (!ReelingBack) //Make the curve be formed from points slightly ahead of the projectile, but clamped to the max rotation (straight line ahead) { - controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Clamp(ratio + 0.5f, 0f, 1f)) * 0.5f; + controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Clamp(ratio + 0.5f, 0f, 1f)) * 0.2f; controlPoint2 = Owner.MountedCenter + SwingPosition(MathHelper.Clamp(ratio + 0.2f, 0f, 1f)) * 0.5f; } else //After the whip snaps, make the curve be a wave { Vector2 perpendicular = SwingPosition(ratio).SafeNormalize(Vector2.Zero).RotatedBy(MathHelper.PiOver2); - controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Lerp(ratio, 1f, ratio)) + perpendicular * MathHelper.SmoothStep(0f, 1f, ratio) * -155f; - controlPoint2 = Owner.MountedCenter + SwingPosition(MathHelper.Lerp(ratio, 1f, ratio / 2)) + perpendicular * MathHelper.SmoothStep(0f, 1f, ratio) * 100f; + controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Lerp(ratio, 1f, ratio)) + perpendicular * MathHelper.SmoothStep(0f, 1f, ratio) * 155f * Owner.direction; + controlPoint2 = Owner.MountedCenter + SwingPosition(MathHelper.Lerp(ratio, 1f, ratio / 2)) + perpendicular * MathHelper.SmoothStep(0f, 1f, ratio) * -100f * Owner.direction; } BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, projBottom }); From 34f33a1195ad85d045beded52c877884cc256f5c Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Mon, 10 Jan 2022 04:56:18 +0100 Subject: [PATCH 28/76] A beam sword WITH homing??? --- Items/Weapons/Melee/TrueBiomeBlade.cs | 17 +++- .../Melee/MendedBiomeBladeProjectiles.cs | 84 +++++++++++++++++- ...MendedBiomeBlade_PurityProjectionSigil.png | Bin 0 -> 622 bytes 3 files changed, 97 insertions(+), 4 deletions(-) create mode 100644 Projectiles/Melee/MendedBiomeBlade_PurityProjectionSigil.png diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 64862de0fb..a52521efc3 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -95,7 +95,7 @@ namespace CalamityMod.Items.Weapons.Melee case Attunement.Default: AttunementInfo.name = "Pure Clarity"; AttunementInfo.function_description = "Fires a weak projectile that crushes enemy defenses"; - AttunementInfo.function_extra = ""; //WHAT DO I MAKE IT DO AS AN EXTRA PLLSS IDK ITS SUCH A BORING ATTUNEMENT,,, + AttunementInfo.function_extra = "Landing true melee hits places a sigil of purity over the enemy. Your projectiles home onto the marked foes"; AttunementInfo.color = new Color(171, 180, 73); break; case Attunement.Hot: @@ -446,6 +446,21 @@ namespace CalamityMod.Items.Weapons.Melee } } + public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit) + { + foreach (Projectile proj in Main.projectile) + { + if (proj.active && proj.type == ProjectileType() && proj.owner == player.whoAmI) + { + //Reset the timeleft on the sigil & give it its new target (or the same, it doesnt matter really. + proj.ai[0] = target.whoAmI; + proj.timeLeft = 600; + return; + } + } + Projectile.NewProjectile(target.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0, player.whoAmI, target.whoAmI); + } + internal static ChargingEnergyParticleSet BiomeEnergyParticles = new ChargingEnergyParticleSet(-1, 2, Color.White, Color.White, 0.04f, 20f); internal static void UpdateAllParticleSets() { diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 4ee77bf15e..66b76ffe3c 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -21,6 +21,8 @@ namespace CalamityMod.Projectiles.Melee { public class TruePurityProjection : ModProjectile //The boring plain one. I need to find something different to make it do compared to the original one. { + public NPC target; + public Player Owner => Main.player[projectile.owner]; public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_PurityProjection"; public override void SetStaticDefaults() @@ -38,12 +40,34 @@ namespace CalamityMod.Projectiles.Melee projectile.friendly = true; projectile.penetrate = 1; projectile.timeLeft = 40; + projectile.extraUpdates = 1; projectile.melee = true; projectile.tileCollide = false; } public override void AI() { + + if (target == null) + { + foreach (Projectile proj in Main.projectile) + { + if (proj.active && proj.type == ProjectileType() && proj.owner == Owner.whoAmI) + { + target = Main.npc[(int)proj.ai[0]]; + break; + } + } + } + else if ((projectile.Center - target.Center).Length() >= (projectile.Center + projectile.velocity - target.Center).Length() && CalamityUtils.AngleBetween(projectile.velocity, target.Center - projectile.Center) < MathHelper.PiOver4 * 0.5f) //Home in + { + projectile.timeLeft = 30; //Remain alive + float angularTurnSpeed = MathHelper.ToRadians(MathHelper.Lerp(12.5f, 2.5f, MathHelper.Clamp(projectile.Distance(target.Center)/10f, 0f, 1f))); + float idealDirection = projectile.AngleTo(target.Center); + float updatedDirection = projectile.velocity.ToRotation().AngleTowards(idealDirection, angularTurnSpeed); + projectile.velocity = updatedDirection.ToRotationVector2() * projectile.velocity.Length(); + } + if (projectile.timeLeft < 35) projectile.tileCollide = true; @@ -82,6 +106,58 @@ namespace CalamityMod.Projectiles.Melee } } + public class PurityProjectionSigil : ModProjectile + { + private NPC target => Main.npc[(int)projectile.ai[0]]; + + public Player Owner => Main.player[projectile.owner]; + public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_PurityProjectionSigil"; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Purity Sigil"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 2; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void SetDefaults() + { + projectile.width = projectile.height = 40; + projectile.friendly = false; + projectile.hostile = false; + projectile.penetrate = -1; + projectile.timeLeft = 600; + projectile.melee = true; + projectile.tileCollide = false; + } + + public override Color? GetAlpha(Color lightColor) => Color.White; + + public override void AI() + { + + Lighting.AddLight(projectile.Center, 0.75f, 1f, 0.24f); + int dustParticle = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.CursedTorch, 0f, 0f, 100, default, 0.9f); + Main.dust[dustParticle].noGravity = true; + Main.dust[dustParticle].velocity *= 0.5f; + + if (target.active) + { + projectile.Center = target.Center; + } + else + projectile.active = false; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (Main.myPlayer != projectile.owner) // don't show for other players + return false; + DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1); + return false; + } + } + public class TrueDecaysRetort : ModProjectile { public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_DecaysRetort"; @@ -340,7 +416,7 @@ namespace CalamityMod.Projectiles.Melee { for (int i = 0; i < 3; i++) { - Vector2 sparkSpeed = Owner.DirectionTo(target.Center).RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4)) * 9f; + Vector2 sparkSpeed = target.DirectionTo(Owner.Center).RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4)) * 9f; Particle Spark = new CritSpark(target.Center, sparkSpeed, Color.White, Color.Crimson, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 0.6f); GeneralParticleHandler.SpawnParticle(Spark); } @@ -1311,7 +1387,9 @@ namespace CalamityMod.Projectiles.Melee SpriteEffects flip = (projectile.spriteDirection < 0) ? SpriteEffects.None : SpriteEffects.None; lightColor = Lighting.GetColor((int)(projectile.Center.X / 16f), (int)(projectile.Center.Y / 16f)); - spriteBatch.Draw(handle, projBottom - Main.screenPosition, null, lightColor, drawRotation, drawOrigin, projectile.scale, flip, 0f); + Vector2 nitpickCorrection = (flipped == -1 && (Timer / MaxTime < 0.35f)) ? drawRotation.ToRotationVector2() * 16f + (Owner.direction == -1f ? Vector2.UnitX * -12f : Vector2.Zero) : Vector2.Zero; + + spriteBatch.Draw(handle, projBottom - nitpickCorrection - Main.screenPosition, null, lightColor, drawRotation, drawOrigin, projectile.scale, flip, 0f); if ((!ReelingBack || SnapCoyoteTime != 0f) && (Timer / MaxTime > 0.35f)) { @@ -1320,7 +1398,7 @@ namespace CalamityMod.Projectiles.Melee spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); //Only update the origin for once drawOrigin = new Vector2(0f, blade.Height); - spriteBatch.Draw(blade, projBottom - Main.screenPosition, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, flip, 0f); + spriteBatch.Draw(blade, projBottom - nitpickCorrection - Main.screenPosition, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, flip, 0f); //Back to normal spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); diff --git a/Projectiles/Melee/MendedBiomeBlade_PurityProjectionSigil.png b/Projectiles/Melee/MendedBiomeBlade_PurityProjectionSigil.png new file mode 100644 index 0000000000000000000000000000000000000000..28fe39783b0f31c53f20ef73055beea7863c29b5 GIT binary patch literal 622 zcmV-!0+IcRP)Px%C`m*?R9J=Wm(NR7Q545NS7!zX-=vK?xiBY+2n>ldqBf>0H`Bg-o1mao8~=bd ztpWr8g!Z*@l}ez58YKl0g_@v_X+P%4;EZ-#ygAL>=ezR*f_Ub4^SI}pbKkw6ciwsD zDH_yt?k)fwyL|v`e4f$((f(ARe{m@bK=;{U1+d-v9)KH(Ck@@VsnL!8D=FKAkn^iE zav6ZH`>!>?kTYJ_jb_|?60b_}fqpj9p&=Tn!$(&RPBvdq0DUdD4JRSymk^ihdhsPt zej*jJK3zCsM1eAq&7Dclkn}E#&#!p%nfbstAuaJuxm|CZ95?1`DKtd?_;^zM3`OMtArc09{|=3LyXKMIcG3k45bQ5LFIvxZVoc__+}Uuys1G0i3BhV`HhS z*A>7)`w1XKL?bJOAKr;mX#jdMy*`%*0KC5oF%(yE+n24rhZ3lJhvXJDYkd(1a(b9U7WyB6?g$ z|F-JsM~ynTxihH%P9;Z6Z>9My_e)3$d0V{f<-h1hf%3`ECvF*bA!*G~Usv@j(OT8t zrXxkv$m4GZ9{~8c_Y^qX!P`{P69leXOQ9j!(5c|~zrLn^1Cxc`^7|2r-2eap07*qo IM6N<$f}&X*>Hq)$ literal 0 HcmV?d00001 From ac58cf289a6fb74efcb3a5cfa9009cdca1ae67c7 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Mon, 10 Jan 2022 05:52:58 +0100 Subject: [PATCH 29/76] Started work on the hallow attunement and gn --- Items/Weapons/Melee/TrueBiomeBlade.cs | 40 +++--- .../Melee/MendedBiomeBladeProjectiles.cs | 125 ++++++++++++++++++ .../Melee/MendedBiomeBlade_HeavensMight.png | Bin 0 -> 784 bytes 3 files changed, 150 insertions(+), 15 deletions(-) create mode 100644 Projectiles/Melee/MendedBiomeBlade_HeavensMight.png diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index a52521efc3..ff7a67e074 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee { public class TrueBiomeBlade : ModItem { - public enum Attunement : byte { Default, Hot, Cold, Tropical, Evil, Holy, HolyStar, Marine } + public enum Attunement : byte { Default, Hot, Cold, Tropical, Evil, Holy, Astral, Marine } public Attunement? mainAttunement = null; public Attunement? secondaryAttunement = null; public int Combo = 0; @@ -124,13 +124,13 @@ namespace CalamityMod.Items.Weapons.Melee break; case Attunement.Holy: AttunementInfo.name = "Heaven's Might"; - AttunementInfo.function_description = "Hold LMB to charge up a heaven-piercing sword thrust, and release to unleash the devastating blow"; - AttunementInfo.function_extra = "Striking the ground will create an impact so powerful, massive fragments of crystal will rise up from the earth"; + AttunementInfo.function_description = "Hold LMB to swing the sword around you, powering up as it spins"; + AttunementInfo.function_extra = "Releasing LMB will throw the sword in front of you, flying a short distance away before coming back"; AttunementInfo.color = new Color(220, 143, 255); break; - case Attunement.HolyStar: - AttunementInfo.name = "Heaven's Abhorrence"; - AttunementInfo.function_description = "Hold LMB to charge up a star-ravaging sword thrust, and release to unleash the devastating blow"; + case Attunement.Astral: + AttunementInfo.name = "The One Beyond's Abhorrence"; + AttunementInfo.function_description = "Hold LMB to charge up a star-piercing sword thrust, and release to unleash the devastating blow"; AttunementInfo.function_extra = "Striking the ground will create an impact so powerful, massive otherwordly monoliths will rise up from the earth"; AttunementInfo.color = new Color(136, 133, 23); break; @@ -255,10 +255,9 @@ namespace CalamityMod.Items.Weapons.Melee player.Calamity().rightClickListener = true; - if (player.velocity.Y == 0) //reset the amount of lunges on ground contact, but also set the power lunge counter back to zero + if (player.velocity.Y == 0) //reset the amount of lunges on ground contact { StoredLunges = 2; - PowerLungeCounter = 0; } //Change the swords function based on its attunement @@ -322,7 +321,18 @@ namespace CalamityMod.Items.Weapons.Melee Combo = 0; break; case Attunement.Holy: - case Attunement.HolyStar: + item.channel = true; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.HoldingOut; + item.shoot = ProjectileType(); + item.shootSpeed = 12f; + item.UseSound = null; + item.noMelee = true; + + Combo = 0; + PowerLungeCounter = 0; + break; + case Attunement.Astral: item.channel = true; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.Stabbing; @@ -379,7 +389,7 @@ namespace CalamityMod.Items.Weapons.Melee public override bool CanUseItem(Player player) { return !Main.projectile.Any(n => n.active && n.owner == player.whoAmI && - (n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType())); // || n.type == ProjectileType() + (n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType())); // || n.type == ProjectileType() } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) @@ -435,9 +445,8 @@ namespace CalamityMod.Items.Weapons.Melee StoredLunges = 0; return false; - case Attunement.Holy: - case Attunement.HolyStar: - float astralVariant = mainAttunement == Attunement.HolyStar ? 1f : 0f; + case Attunement.Astral: + float astralVariant = mainAttunement == Attunement.Astral ? 1f : 0f; // Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage * 2, knockBack, player.whoAmI, astralVariant); return false; @@ -446,6 +455,7 @@ namespace CalamityMod.Items.Weapons.Melee } } + //This is only used for the purity sigil effect of the default attunement public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit) { foreach (Projectile proj in Main.projectile) @@ -502,7 +512,7 @@ namespace CalamityMod.Items.Weapons.Melee BiomeEnergyParticles.CenterColor = new Color(195, 42, 200); break; case Attunement.Holy: - case Attunement.HolyStar: + case Attunement.Astral: BiomeEnergyParticles.EdgeColor = new Color(62, 55, 110); BiomeEnergyParticles.CenterColor = new Color(255, 143, 255); break; @@ -643,7 +653,7 @@ namespace CalamityMod.Items.Weapons.Melee if (holy) attunement = Attunement.Holy; if (astral) - attunement = Attunement.HolyStar; + attunement = Attunement.Astral; if (marine) attunement = Attunement.Marine; diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 66b76ffe3c..437557acd4 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -1528,4 +1528,129 @@ namespace CalamityMod.Projectiles.Melee } } + + public class HeavensMight : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_HeavensMight"; + private bool initialized = false; + Vector2 direction = Vector2.Zero; + public ref float CurrentState => ref projectile.ai[0]; + public Player Owner => Main.player[projectile.owner]; + private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; + public const float throwOutTime = 40f; + public const float throwOutDistance = 240f; + public const float maxEmpowerment = 1.7f; + public float Empowerment => (projectile.scale - 1f) / (maxEmpowerment - 1f); + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Heaven's Might"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 74; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 16; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + float bladeLenght = 100 * projectile.scale; + float bladeWidth = 20 * projectile.scale; + + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center, Owner.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); + } + + public override void AI() + { + if (!initialized) //Initialization. Here its litterally just playing a sound tho lmfao + { + Main.PlaySound(SoundID.Item90, projectile.Center); + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + initialized = true; + } + + if (!OwnerCanShoot) + { + if (CurrentState == 2f) + { + projectile.Kill(); + return; + } + + else if (CurrentState == 0f) + { + CurrentState = 1f; + direction = Owner.DirectionTo(Main.MouseWorld); + } + } + + if (CurrentState == 0f) + { + //Manage position and rotation + projectile.scale *= 1.01f; + if (projectile.scale > maxEmpowerment) + projectile.scale = maxEmpowerment; + + direction = direction.RotatedBy((Empowerment) * MathHelper.PiOver4 * 0.25); + projectile.rotation = direction.ToRotation(); + projectile.Center = Owner.Center + (direction * projectile.scale * 10); + projectile.timeLeft = (int)throwOutTime + 1; + } + + if (CurrentState == 1f) + { + projectile.Center = Owner.Center + (direction * projectile.scale * 10) + ( direction * throwOutDistance * (float)Math.Sin(projectile.timeLeft / throwOutTime * MathHelper.Pi)); + } + + //Make the owner look like theyre holding the sword bla bla + Owner.heldProj = projectile.whoAmI; + Owner.direction = Math.Sign(direction.X); + Owner.itemRotation = direction.ToRotation(); + if (Owner.direction != 1) + { + Owner.itemRotation -= 3.14f; + } + Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); + Owner.itemTime = 2; + Owner.itemAnimation = 2; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/TrueBiomeBlade"); + Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_HeavensMight"); + + float drawAngle = direction.ToRotation(); + float drawRotation = drawAngle + MathHelper.PiOver4; + + Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOffset = projectile.Center - Main.screenPosition; + + spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Update the parameters + drawOrigin = new Vector2(0f, blade.Height); + + spriteBatch.Draw(blade, drawOffset, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + } } + diff --git a/Projectiles/Melee/MendedBiomeBlade_HeavensMight.png b/Projectiles/Melee/MendedBiomeBlade_HeavensMight.png new file mode 100644 index 0000000000000000000000000000000000000000..3e41ca145a0bc3f8a351aaf35b205ae8686898a5 GIT binary patch literal 784 zcmV+r1MmEaP)Px%%1J~)RCt{2nlY=>P#A{a)Fk)npU_DZ1jXqhs7nzPMO~b3{Q**N7D3zu7r{YX z<%%v&6~RHBii491ii3jpPk4K4(m0&+_1e?q=1ZFA+lTigU+Q7Sd3Sir z9ZHJ4zrEe@0H9S?L932mcL9rHUXxsCl#-P*s%(=48l_}qjCy_i1pwgha0CDdqNEg) z1RAAe>5Y1R<`n>7Fo*#F>o$|T#F*vB<%mV2lq{`LPcHWW0E3-ah7tfsS{?u(@{Lj9 z(98$B=5ErDGJPd=-Y8?SUjG0)=757iRlv93~O(9CeBZzlr-L`Tlf0_if7WaK{lIq zC)Xuj>&^AZc67kVzkA4(>}FE`;?a2yp9_srQv1E$40r%AJZMV)x^bkE zlhP<9%VgBV4*la~H6{r(N=cPQi4jG2zgkTaXq1wLUzrOtT%k9@B!NaLS-4T||GvAu zvxVMYw@CtxQc}gPCt2hH%`v1XG>Q;H2qA Date: Mon, 10 Jan 2022 14:29:06 +0100 Subject: [PATCH 30/76] Flip --- Items/Weapons/Melee/TrueBiomeBlade.png | Bin 1607 -> 1637 bytes Projectiles/Melee/MendedBiomeBlade.png | Bin 0 -> 1602 bytes .../Melee/MendedBiomeBladeProjectiles.cs | 8 ++++---- 3 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 Projectiles/Melee/MendedBiomeBlade.png diff --git a/Items/Weapons/Melee/TrueBiomeBlade.png b/Items/Weapons/Melee/TrueBiomeBlade.png index c9cc25a15789034c3fb106bf6dc8e597a5a12767..662f488bd5ee3303e4d7d3d715446c42415a21a6 100644 GIT binary patch delta 1607 zcmV-N2Dtgh4CM@vF@GOPL_t(|ob8%jY*a-QfWJ$(?b2?$)>5Ewogvf(pVtkOG2_!xkg@pJZBw~;!Nf1Je20}<0tY8YUAPEp8{AiKVKxt_yv^4#( zu1o*chqKe|3~hJ8rMt!XUbgq{+}pdmU(PvmW*q(}tXTRc0DqGvX8>^Lc3WWZ`(?)t zIsoHF`@!NJSF9i4QBzW|5CE6U0YYXhTV4V{#o@Escx#BkV{3>q!=35|p#JKu0Kk$r zN=CfS8e;I+8Dg5@|Jxq`$e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!7$RoOFPsNJUG-JXh=+GP1i;xc^~C&reNO08j)MTRb5&honj*2~v#>2L`klBY&|YH!lx>m)>~`fG_qQ)UJDB&yxTguBZiI zdO(@c<5II)tRaa(M3#AV{dxd=Jv~~sknAG$gTxfm80ja}pHn+`ey^y|+GQQ&OmhPO zRn3Fim@b!nKI%VaEU<M9~TP~LifIuLi#fYNfVgL%(sy$s|%&y&swEH~&=zj_z zY(`a=9+P}U%K+F@yZ{Kt609MKMMRc4a^V61PcJJ1z#A$v#0){qkU7fEpT7a%>vbwN ze0oF0g!GUZ?xb4|fX_1nfILU7g&wY`9dYk@ys?HD#H>{Nhg5i}>Qzs;>bpt+jvaYD zYX5T|ybpw9gGn$+sg~TS)>zv^A%7z|!=v_zW_U+8@^Qi%Vi0pZWOadFPb|n&>m9XC zo%**7@>P5B_VrqSsW04rHUd!HsK0qL$1qWI7ZYoU!EM)6pIEH+j<@%x1Ob+L)m*0~ zTVIU=2x7VrChsScgLYvut;tc7I;X5X1m^ z^0{mDc0uMWGv;Nh>~i(`-Hm*lu!a~!7$VtaF!UlW8GjI`s_g)vWSw4@G#pnIZEsE%0F?<6I|OTpfwO4SX02haqh`4`>u&}Dw&km1 zF(W5U?aOHEjlN?iHQfzBpMTFEb&fK3f%*nhLv1UNIN3$8h8Q@jpHjR0y1IPY6Wv>= z>WD8xbC}Gjjswuque!y0vSx)Fi$pU+u!a~oi#BZz0xVy#P&;w4QdOAVtHb+36RM&d zFRUR3!*xi>oVfseT>d=}He(=7?IBO;9g6$lCIV}Sfm2$lzQx#ju_8&!GNu{-_t+s= bLk#`{Jia&?@tu{~00000NkvXXu0mjf*9PNe diff --git a/Projectiles/Melee/MendedBiomeBlade.png b/Projectiles/Melee/MendedBiomeBlade.png new file mode 100644 index 0000000000000000000000000000000000000000..b4d0142515b6a83309c6e7f3ce57e71f0937891a GIT binary patch literal 1602 zcmV-I2EF--P)Px){7FPXRCt{2n{8;7RUE*7k9+ZM&O684bX|9Kiq4l(V@{W(PE5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0r2dy0szuOX@-~~h#9g*+4;+N0DQYv#fHysshE%!GQ*Q_#{mdK)Y$?fSP2{HncZ`#P<^j9{&*WbLE zW0zJBpf}n@b+!O>@zG9(v;&QplFw?IO?+cBqjB>oNh8PUzA;oj%0`TeaAAqnK1F32cc~bXK z%m+6SSVIh)k`nbT#^%cn+AL$5@qdpUf;Gh8Kjl|88Kx%DxBvhE07*qoM6N<$f_Oyi A9RL6T literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 437557acd4..2172fa052d 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -333,7 +333,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/TrueBiomeBlade"); + Texture2D handle = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade"); Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_DecaysRetort"); float drawAngle = direction.ToRotation(); @@ -663,7 +663,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/TrueBiomeBlade"); + Texture2D handle = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade"); if (SwingMode != 2) { @@ -968,7 +968,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/TrueBiomeBlade"); + Texture2D handle = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade"); Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_AridGrandeur"); int bladeAmount = 4; @@ -1625,7 +1625,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/TrueBiomeBlade"); + Texture2D handle = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade"); Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_HeavensMight"); float drawAngle = direction.ToRotation(); From 765f5f7852938d1ea91847476ca4bed4ae20c9fd Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Mon, 10 Jan 2022 15:45:32 +0100 Subject: [PATCH 31/76] Workin --- Items/Weapons/Melee/TrueBiomeBlade.cs | 2 +- Particles/SeaFoam.png | Bin 0 -> 830 bytes Particles/SeaFoamParticle.cs | 41 ++++++++++++++++++ .../Melee/MendedBiomeBladeProjectiles.cs | 16 +++++-- 4 files changed, 54 insertions(+), 5 deletions(-) create mode 100644 Particles/SeaFoam.png create mode 100644 Particles/SeaFoamParticle.cs diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index ff7a67e074..1309b8abdd 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -132,7 +132,7 @@ namespace CalamityMod.Items.Weapons.Melee AttunementInfo.name = "The One Beyond's Abhorrence"; AttunementInfo.function_description = "Hold LMB to charge up a star-piercing sword thrust, and release to unleash the devastating blow"; AttunementInfo.function_extra = "Striking the ground will create an impact so powerful, massive otherwordly monoliths will rise up from the earth"; - AttunementInfo.color = new Color(136, 133, 23); + AttunementInfo.color = new Color(91, 73, 196); break; case Attunement.Marine: AttunementInfo.name = "Gesture for the Drowned"; diff --git a/Particles/SeaFoam.png b/Particles/SeaFoam.png new file mode 100644 index 0000000000000000000000000000000000000000..22129adf9c2a6e44bd4b86d24806a327345c60a1 GIT binary patch literal 830 zcmV-E1Ht@>P)Px%_(?=TRA_$;p4E2YDA?PieGV^gh-JpC8XujVtuTy6Xg7Qy$%3yyQ$(1dOqP;Di%_I0A4HVg#su0tGRIYH%{!Ai0miXrhO4N{YsaP^?kala zdJcO&p927l<7hqzjUu_xH=))g@U9!jF*}OWDB`*S!W;Y&E=AtvDjIO+kuODdyIlZ) zzVFSo?p#FS?RFagU>JrZZ_y|+={2wJC7LMq$YVs_EPZ#3c+e&+OVQKULXX3SCDx&Y?+Na_7=trDgEW)Ylo*4%E1 zCcNDeg6E3})QXrH(`#YLCCJ1IXN=_5z9uj5Nyy(|8D&*5;?a;#IAf%kM>d;HliOIk z?@U9jNb;c zjwY#VdFvX@6P{YrdPbm8q{c%NTAhPsI!4X@h){A17VD3E0w08x?h-8-2mk;807*qo IM6N<$g45xN)c^nh literal 0 HcmV?d00001 diff --git a/Particles/SeaFoamParticle.cs b/Particles/SeaFoamParticle.cs new file mode 100644 index 0000000000..e1290cb487 --- /dev/null +++ b/Particles/SeaFoamParticle.cs @@ -0,0 +1,41 @@ +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + + +namespace CalamityMod.Particles { + public class SeaFoamParticle : Particle + { + public override string Texture => "CalamityMod/Particles/SeaFoam"; + public override int FrameVariants => 3; + public override bool UseAdditiveBlend => true; + + + private float Opacity; + private Color ColorStart; + private Color ColorFade; + private float Spin; + + public SeaFoamParticle(Vector2 position, Vector2 velocity, Color colorStart, Color colorFade, float scale, float opacity, float rotationSpeed = 1f) + { + Position = position; + Velocity = velocity; + ColorStart = colorStart; + ColorFade = colorFade; + Scale = scale; + Opacity = opacity; + Rotation = Main.rand.NextFloat(MathHelper.TwoPi); + Spin = rotationSpeed; + Variant = Main.rand.Next(3); + } + + public override void Update() + { + + Opacity--; + + Color = Color.Lerp(ColorStart, ColorFade, MathHelper.Clamp((float)((255 -Opacity) - 100) / 80, 0f, 1f)) * (Opacity / 255f); + } + } +} \ No newline at end of file diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 2172fa052d..38ec50c54a 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -1537,9 +1537,9 @@ namespace CalamityMod.Projectiles.Melee public ref float CurrentState => ref projectile.ai[0]; public Player Owner => Main.player[projectile.owner]; private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; - public const float throwOutTime = 40f; - public const float throwOutDistance = 240f; - public const float maxEmpowerment = 1.7f; + public float throwOutTime = 60f; + public float throwOutDistance = 440f; //Turn these into constants when im doine tweakin em + public float maxEmpowerment = 1.7f; public float Empowerment => (projectile.scale - 1f) / (maxEmpowerment - 1f); public override void SetStaticDefaults() @@ -1567,11 +1567,18 @@ namespace CalamityMod.Projectiles.Melee return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center, Owner.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); } + + public CurveSegment launch = new CurveSegment(EasingType.SineInOut, 0f, 0f, 1f, 4); + public CurveSegment hold = new CurveSegment(EasingType.Linear, 0.65f, 1f, 0f); + public CurveSegment retract = new CurveSegment(EasingType.PolyInOut, 0.8f, 1f, -1.05f, 3); + internal float ThrowCurve() => PiecewiseAnimation((throwOutTime - projectile.timeLeft) / throwOutTime, new CurveSegment[] { launch , hold, retract}); + public override void AI() { if (!initialized) //Initialization. Here its litterally just playing a sound tho lmfao { Main.PlaySound(SoundID.Item90, projectile.Center); + projectile.velocity = Vector2.Zero; direction = Owner.DirectionTo(Main.MouseWorld); direction.Normalize(); initialized = true; @@ -1600,6 +1607,7 @@ namespace CalamityMod.Projectiles.Melee projectile.scale = maxEmpowerment; direction = direction.RotatedBy((Empowerment) * MathHelper.PiOver4 * 0.25); + direction.Normalize(); projectile.rotation = direction.ToRotation(); projectile.Center = Owner.Center + (direction * projectile.scale * 10); projectile.timeLeft = (int)throwOutTime + 1; @@ -1607,7 +1615,7 @@ namespace CalamityMod.Projectiles.Melee if (CurrentState == 1f) { - projectile.Center = Owner.Center + (direction * projectile.scale * 10) + ( direction * throwOutDistance * (float)Math.Sin(projectile.timeLeft / throwOutTime * MathHelper.Pi)); + projectile.Center = Owner.Center + (direction * projectile.scale * 10) + ( direction * throwOutDistance * ThrowCurve()); } //Make the owner look like theyre holding the sword bla bla From 6d3efbc9845e89f37eab01e5938a6566aee90142 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Mon, 10 Jan 2022 17:08:43 +0100 Subject: [PATCH 32/76] Edge cases fixed --- Items/Weapons/Melee/BiomeBlade.cs | 17 +++++++++++++++-- Items/Weapons/Melee/TrueBiomeBlade.cs | 18 ++++++++++++++++-- Particles/SeaFoamParticle.cs | 5 +++-- .../Melee/MendedBiomeBladeProjectiles.cs | 18 +++++++++++++----- 4 files changed, 47 insertions(+), 11 deletions(-) diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index 27e0979493..6c35b6db23 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -315,8 +315,6 @@ namespace CalamityMod.Items.Weapons.Melee Tile tileStandingOn = Main.tile[x, y + 1]; bool mayAttune = player.StandingStill() && !player.mount.Active && tileStandingOn.IsTileSolidGround(); - if (player.whoAmI == Main.myPlayer) - Main.PlaySound(SoundID.DD2_DarkMageHealImpact); Vector2 displace = new Vector2(18f, 0f); Projectile.NewProjectile(player.Top + displace, Vector2.Zero, ProjectileType(), 0, 0, player.whoAmI, mayAttune ? 0f : 1f); } @@ -469,6 +467,16 @@ namespace CalamityMod.Items.Weapons.Melee if (Initialized == 0f) { + //If dropped, kill it instantly + if (Owner.HeldItem.type != ItemType()) + { + projectile.Kill(); + return; + } + + if (Owner.whoAmI == Main.myPlayer) + Main.PlaySound(SoundID.DD2_DarkMageHealImpact); + associatedItem = Owner.HeldItem; //Switch up the attunements Attunement? temporaryAttunementStorage = (associatedItem.modItem as BiomeBlade).mainAttunement; @@ -565,6 +573,11 @@ namespace CalamityMod.Items.Weapons.Melee public override void Kill(int timeLeft) { + if (associatedItem == null) + { + return; + } + //If we swapped out the main attunement for the second one despite the second attunement being empty at the time, unswap them. if ((associatedItem.modItem as BiomeBlade).mainAttunement == null && (associatedItem.modItem as BiomeBlade).secondaryAttunement != null) { diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 1309b8abdd..26cbadf0c7 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -258,6 +258,8 @@ namespace CalamityMod.Items.Weapons.Melee if (player.velocity.Y == 0) //reset the amount of lunges on ground contact { StoredLunges = 2; + if (PowerLungeCounter != 3) + PowerLungeCounter = 0; } //Change the swords function based on its attunement @@ -379,8 +381,6 @@ namespace CalamityMod.Items.Weapons.Melee Tile tileStandingOn = Main.tile[x, y + 1]; bool mayAttune = player.StandingStill() && !player.mount.Active && tileStandingOn.IsTileSolidGround(); - if (player.whoAmI == Main.myPlayer) - Main.PlaySound(SoundID.DD2_DarkMageHealImpact); Vector2 displace = new Vector2(18f, 0f); Projectile.NewProjectile(player.Top + displace, Vector2.Zero, ProjectileType(), 0, 0, player.whoAmI, mayAttune ? 0f : 1f); } @@ -577,6 +577,16 @@ namespace CalamityMod.Items.Weapons.Melee if (Initialized == 0f) { + //If dropped, kill it instantly + if (Owner.HeldItem.type != ItemType()) + { + projectile.Kill(); + return; + } + + if (Owner.whoAmI == Main.myPlayer) + Main.PlaySound(SoundID.DD2_DarkMageHealImpact); + associatedItem = Owner.HeldItem; //Switch up the attunements Attunement? temporaryAttunementStorage = (associatedItem.modItem as TrueBiomeBlade).mainAttunement; @@ -672,6 +682,10 @@ namespace CalamityMod.Items.Weapons.Melee public override void Kill(int timeLeft) { + if (associatedItem == null) + { + return; + } //If we swapped out the main attunement for the second one despite the second attunement being empty at the time, unswap them. if ((associatedItem.modItem as TrueBiomeBlade).mainAttunement == null && (associatedItem.modItem as TrueBiomeBlade).secondaryAttunement != null) { diff --git a/Particles/SeaFoamParticle.cs b/Particles/SeaFoamParticle.cs index e1290cb487..b484c97b84 100644 --- a/Particles/SeaFoamParticle.cs +++ b/Particles/SeaFoamParticle.cs @@ -32,9 +32,10 @@ namespace CalamityMod.Particles { public override void Update() { - + Rotation += Spin * ((Velocity.X > 0) ? 1f : -1f); Opacity--; - + if (Opacity <= 0) + Kill(); Color = Color.Lerp(ColorStart, ColorFade, MathHelper.Clamp((float)((255 -Opacity) - 100) / 80, 0f, 1f)) * (Opacity / 255f); } } diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 38ec50c54a..68a7ab15a5 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -237,7 +237,7 @@ namespace CalamityMod.Projectiles.Melee Owner.velocity *= 0.1f; //Abrupt stop if (Owner.HeldItem.modItem is TrueBiomeBlade blade) blade.strongLunge = false; - Projectile proj = Projectile.NewProjectileDirect(Owner.Center + (PowerLungeEnd - PowerLungeStart) / 2f, Vector2.Zero, ProjectileType(), projectile.damage, 0, Owner.whoAmI); + Projectile proj = Projectile.NewProjectileDirect(Owner.Center + (PowerLungeEnd - PowerLungeStart) / 2f, Vector2.Zero, ProjectileType(), projectile.damage * 2, 0, Owner.whoAmI); if (proj.modProjectile is DecaysRetortDash dash) { dash.DashStart = PowerLungeStart; @@ -1568,10 +1568,10 @@ namespace CalamityMod.Projectiles.Melee } - public CurveSegment launch = new CurveSegment(EasingType.SineInOut, 0f, 0f, 1f, 4); - public CurveSegment hold = new CurveSegment(EasingType.Linear, 0.65f, 1f, 0f); - public CurveSegment retract = new CurveSegment(EasingType.PolyInOut, 0.8f, 1f, -1.05f, 3); - internal float ThrowCurve() => PiecewiseAnimation((throwOutTime - projectile.timeLeft) / throwOutTime, new CurveSegment[] { launch , hold, retract}); + public CurveSegment launch = new CurveSegment(EasingType.CircOut, 0f, 0f, 1f, 4); + public CurveSegment hold = new CurveSegment(EasingType.SineBump, 0.5f, 1f, 0.2f); + public CurveSegment retract = new CurveSegment(EasingType.PolyInOut, 0.6f, 1f, -1.05f, 3); + internal float ThrowCurve() => PiecewiseAnimation((throwOutTime - projectile.timeLeft) / throwOutTime, new CurveSegment[] { launch , retract}); public override void AI() { @@ -1611,6 +1611,14 @@ namespace CalamityMod.Projectiles.Melee projectile.rotation = direction.ToRotation(); projectile.Center = Owner.Center + (direction * projectile.scale * 10); projectile.timeLeft = (int)throwOutTime + 1; + + //if (Main.rand.NextBool()) + //{ + // Particle foam = new SeaFoamParticle(Owner.Center + direction * 40 + Main.rand.NextVector2Circular(30f, 30f), Vector2.Zero, Color.White, new Color(65, 129, 192), Main.rand.NextFloat(0.5f, 1.5f), 245 - Main.rand.Next(50), 0.04f); + // foam.Velocity = (foam.Position - Owner.Center) * 0.01f + Owner.velocity; + // GeneralParticleHandler.SpawnParticle(foam); + //} + } if (CurrentState == 1f) From d3674fa234550d1e6c716ff5cf637e33e389cc7d Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Mon, 10 Jan 2022 23:24:08 +0100 Subject: [PATCH 33/76] Throwing glitter into your foes' eyes --- Particles/CircularSmear.png | Bin 0 -> 17788 bytes Particles/CircularSmearVFX.cs | 35 ++++ .../Melee/BrokenBiomeBladeProjectiles.cs | 4 +- .../Melee/MendedBiomeBladeProjectiles.cs | 198 +++++++++++++++--- .../Melee/MendedBiomeBlade_HeavensMight.png | Bin 784 -> 772 bytes ...endedBiomeBlade_HeavensMightAfterimage.png | Bin 0 -> 1640 bytes .../MendedBiomeBlade_HeavensMightChain.png | Bin 0 -> 400 bytes 7 files changed, 211 insertions(+), 26 deletions(-) create mode 100644 Particles/CircularSmear.png create mode 100644 Particles/CircularSmearVFX.cs create mode 100644 Projectiles/Melee/MendedBiomeBlade_HeavensMightAfterimage.png create mode 100644 Projectiles/Melee/MendedBiomeBlade_HeavensMightChain.png diff --git a/Particles/CircularSmear.png b/Particles/CircularSmear.png new file mode 100644 index 0000000000000000000000000000000000000000..d2b9bdd19c97d09f6c30bb33d115fe383420a30f GIT binary patch literal 17788 zcmXwh1yodB_xI4Dgn)pwq;!Xrihy)?OXtvylp+r(APhqz4Z_gf3?MDt-O>$$i1M9z z|La@pimWG?d(S;*?_X`AG}PV@;8Wp4AP@pY1z9cdcLwSYE;jfY-PolH{=#!pF!Y2# z9+05^piL|X-+_Nf?Ima6rR{3#<@?sd2J+g*+0);XLEFpQ+QF4U$JN!jvuHgC0%3qC z%D&R^TR1Y^b2Yj4mZ~|SA-tAL{5DL+Vwhm_#H^rk<;XAottjGC*Go+X`!I5}iJy7t zL~>t#sVo(rF)PAIqh_)F@vWZ$ybf+I_Kl!_sVSapf6X^O;fMvW2hk=<# z@Zx9N#j(e6+m1M-_Vfw^GPbz*$zCYhw8f|M!wk8T(5fNBZ2i`geU6Zze$4w@Lzk}#vPh6{k=}jtGE^*6O^k*RTtexpwMN`RR0QDX zqP{u`gKtn5_{LFKhvPBo!`g$M6zkycjAp%&q`aAwK@m;anAl zgzxe9{(ju>PKLYS7wBP-AZdE=1WQm+6Q1N-4>1}y@yz`Pp|{C#@_Au;hypItnt9na zvo|&KCOAl?f^cwoG<^nN{Ul>QQSfdI!Z{TRw7%(Zm}49d-GXQ6EH`bb^gS_qNJz*? z`H+!@uzTm?DKRc`^9*$zTya=5nef>3+uv^NoZyFpADI0}Sz23T=4jx8E4YKc(?X-i<}LxMX~c`(z3!Gh?N}@}OsI08W=nzGIyiuo>LH#b z4?Tk`fd>X(!PUR*p}-2e*@CH`&f8_Z+v~h8z*^efeMaZEhPLE6Dh2k*D|K}uu+U(+ z?}G1}Q&iAp!to(s!S}BMsCOx|ydQ{#H%(q#UME#_f37#H$kXA-(RlU@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>kx)bP{4J82CAZ^;#Ue?l6;cXll!3=hIAB~3 zOekhr>rpoT3Bw9-fL}gWq~*Kqfi-(KH-E{;SNZ#=;q{kWpRf_3sE`JFV|2G5FhLF` zVBZ3-4r~OFPjf87;3j|%+0d}D6X6LUA|6k;RKI`i;Z@kx!JgAd`e3t^gT_bTPqPtH z53-PiNmHgQL?y>e@`{VxSl?w0Z<|of)bS-@!0vk%R%FVJAj~VwVb4(X7(vZBgQv0l zZ-n_pJserjg2tv!H*1ujJgF>~;q*lp=iN*F1~(EF6=s!5liOd`;ik>*oI?&clANdB zn*ypKOf}FFDrdQD7k{Lp=ps%@+uqwXd7c<-O9cKermfP&4}iVpEv!J4HD1fv6A4eu=6nE8zsz z!Hj}$(XB=8KOZ1Ob{zalL%T;(F^jlV-Lg)?jQF9!a`m*R@v!$A*8--388SQU9H!{}NLfC06HT&<@QYTPF3bhvtxKQmS- zoPNR4GN6iJ)ObO}6oj6WX!bDcxvCsHiv_gP6CBd%u*!Z1E?X-7C2W3YyU?M2eC~ua z)FAS*s{PO`jpr|6c)RibV4^^G!-+o@CNt+#vS*GJ`feM|4vwoptfXIZpZRaMu;LJb pTUvqEfS0}WLkeL&-FJ`C7mX#aWmNeE{N@yhqMVv+xr{~l{{uE0)=dBa literal 0 HcmV?d00001 diff --git a/Particles/CircularSmearVFX.cs b/Particles/CircularSmearVFX.cs new file mode 100644 index 0000000000..e890ba908c --- /dev/null +++ b/Particles/CircularSmearVFX.cs @@ -0,0 +1,35 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Particles +{ + public class CircularSmearVFX : Particle //Also check out Split mod! + { + public override string Texture => "CalamityMod/Particles/CircularSmear"; + public override bool UseAdditiveBlend => true; + public override bool UseCustomDraw => false; + + public override bool SetLifetime => true; + public float opacity; + + public CircularSmearVFX(Vector2 position, Color color, float rotation, float scale) + { + Position = position; + Velocity = Vector2.Zero; + Color = color; + Scale = scale; + Rotation = rotation; + Lifetime = 2; + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + Texture2D tex = GeneralParticleHandler.GetTexture(Type); + + spriteBatch.Draw(tex, Position - Main.screenPosition, null, Color * opacity * 0.5f, 0, tex.Size()/2f, Scale, SpriteEffects.None, 0); + } + } +} diff --git a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs index f849d47d31..712a2b658a 100644 --- a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs @@ -26,8 +26,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { DisplayName.SetDefault("Purity Projection"); - ProjectileID.Sets.TrailCacheLength[projectile.type] = 2; - ProjectileID.Sets.TrailingMode[projectile.type] = 0; + ProjectileID.Sets.TrailCacheLength[projectile.type] = 5; + ProjectileID.Sets.TrailingMode[projectile.type] = 2; } public override void SetDefaults() diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 68a7ab15a5..7b5ac9fb62 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -1534,17 +1534,35 @@ namespace CalamityMod.Projectiles.Melee public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_HeavensMight"; private bool initialized = false; Vector2 direction = Vector2.Zero; + Vector2 oldDirection = Vector2.Zero; public ref float CurrentState => ref projectile.ai[0]; public Player Owner => Main.player[projectile.owner]; private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; - public float throwOutTime = 60f; + public float throwOutTime = 90f; public float throwOutDistance = 440f; //Turn these into constants when im doine tweakin em - public float maxEmpowerment = 1.7f; - public float Empowerment => (projectile.scale - 1f) / (maxEmpowerment - 1f); + + public static float snapPoint = 0.45f; + public float snapTimer => (throwTimer / throwOutTime) < snapPoint ? 0 : ((throwTimer / throwOutTime) - snapPoint) / (1f - snapPoint); + public static float retractionPoint = 0.6f; + public float retractionTimer => (throwTimer / throwOutTime) < retractionPoint ? 0 : ((throwTimer / throwOutTime) - retractionPoint) / (1f - retractionPoint); + public ref float Empowerment => ref projectile.ai[1]; + public ref float hasMadeSound => ref projectile.localAI[0]; + public ref float hasMadeChargeSound => ref projectile.localAI[1]; + + public float maxEmpowerment = 600f; + //How much damage reduction applies on uncharged attacks + public float initialDamage = 0.2f; + //How much extra damage applies when fully charged. This goes ontop of the initial damage, so a max empowerment boost of 2 with an initial damage of 0.1 makes the total damage multiplier be 1.9 + public float maxEmpowermentBoost = 2f; + public float throwTimer => throwOutTime - projectile.timeLeft; + + public Particle smear; public override void SetStaticDefaults() { DisplayName.SetDefault("Heaven's Might"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; + ProjectileID.Sets.TrailingMode[projectile.type] = 2; } public override void SetDefaults() { @@ -1563,15 +1581,14 @@ namespace CalamityMod.Projectiles.Melee float collisionPoint = 0f; float bladeLenght = 100 * projectile.scale; float bladeWidth = 20 * projectile.scale; - - return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center, Owner.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center, projectile.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); } public CurveSegment launch = new CurveSegment(EasingType.CircOut, 0f, 0f, 1f, 4); - public CurveSegment hold = new CurveSegment(EasingType.SineBump, 0.5f, 1f, 0.2f); - public CurveSegment retract = new CurveSegment(EasingType.PolyInOut, 0.6f, 1f, -1.05f, 3); - internal float ThrowCurve() => PiecewiseAnimation((throwOutTime - projectile.timeLeft) / throwOutTime, new CurveSegment[] { launch , retract}); + public CurveSegment hold = new CurveSegment(EasingType.Linear, snapPoint, 1f, 0f); + public CurveSegment retract = new CurveSegment(EasingType.PolyInOut, retractionPoint, 1f, -1.05f, 3); + internal float ThrowCurve() => PiecewiseAnimation((throwOutTime - projectile.timeLeft) / throwOutTime, new CurveSegment[] { launch , hold, retract }); public override void AI() { @@ -1581,13 +1598,17 @@ namespace CalamityMod.Projectiles.Melee projectile.velocity = Vector2.Zero; direction = Owner.DirectionTo(Main.MouseWorld); direction.Normalize(); + oldDirection = direction; initialized = true; } + projectile.rotation = direction.ToRotation(); //Only done for afterimages + if (!OwnerCanShoot) { - if (CurrentState == 2f) + if (CurrentState == 2f || (CurrentState == 0f && Empowerment / maxEmpowerment < 0.5)) { + Main.PlaySound(SoundID.Item77, projectile.Center); projectile.Kill(); return; } @@ -1595,35 +1616,84 @@ namespace CalamityMod.Projectiles.Melee else if (CurrentState == 0f) { CurrentState = 1f; + Main.PlaySound(SoundID.Item80, projectile.Center); direction = Owner.DirectionTo(Main.MouseWorld); + //PARTICLES LOTS OF PARTICLES LOTS OF SPARKLES YES YES MH YES YES + for (int i = 0; i <= 8; i++) + { + float variation = Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4); + float strength = (float)Math.Sin(variation * 2f + MathHelper.PiOver2); + Particle Sparkle = new CritSpark(projectile.Center, Owner.velocity + direction.RotatedBy(variation) * (1 + strength) * 2f * Main.rand.NextFloat(7.5f, 20f), Color.White, Color.HotPink, 2f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 2f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + for (int i = 0; i <= 8; i++) + { + float variation = Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4); + float strength = (float)Math.Sin(variation * 2f + MathHelper.PiOver2); + Particle Sparkle = new CritSpark(projectile.Center, Owner.velocity + direction.RotatedBy(variation) * (1 + strength) * Main.rand.NextFloat(7.5f, 20f), Color.White, Color.Cyan, 2f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 2f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } } } if (CurrentState == 0f) { - //Manage position and rotation - projectile.scale *= 1.01f; - if (projectile.scale > maxEmpowerment) - projectile.scale = maxEmpowerment; + if (Owner.whoAmI == Main.myPlayer) + { + if (hasMadeChargeSound == 0f && Empowerment / maxEmpowerment >= 0.5) + { + hasMadeChargeSound = 1f; + Main.PlaySound(SoundID.Item76); + } - direction = direction.RotatedBy((Empowerment) * MathHelper.PiOver4 * 0.25); + float rotation = direction.ToRotation(); + if (rotation > -MathHelper.PiOver2 - MathHelper.PiOver4 && rotation < -MathHelper.PiOver2 + MathHelper.PiOver4 && hasMadeSound == 1f) + hasMadeSound = 0f; + + else if (rotation > MathHelper.PiOver2 - MathHelper.PiOver4 && rotation < MathHelper.PiOver2 + MathHelper.PiOver4 && hasMadeSound == 0f) + { + hasMadeSound = 1f; + Main.PlaySound(SoundID.Item71); + } + } + + if (Empowerment/maxEmpowerment >= 0.75) + { + if (smear == null) + { + smear = new CircularSmearVFX(Owner.Center, Color.HotPink, direction.ToRotation(), projectile.scale * 1.5f); + GeneralParticleHandler.SpawnParticle(smear); + } + //Update the variables of the smear + else + { + smear.Rotation = direction.ToRotation() + MathHelper.PiOver2 ; + smear.Time = 0; + smear.Position = Owner.Center; + smear.Scale = projectile.scale * 1.5f; + smear.Color = Color.Lerp(Color.HotPink, Color.Cyan, (float)Math.Sin(Main.GlobalTime * 2f)) * (((Empowerment / maxEmpowerment) - 0.75f) / 0.25f * 0.8f); + } + } + + + //Manage position and rotation + projectile.scale = 1 + Empowerment/maxEmpowerment * 1.5f; + + oldDirection = direction; + direction = direction.RotatedBy(MathHelper.Clamp(Empowerment / maxEmpowerment, 0.4f, 1f) * MathHelper.PiOver4 * 0.20f); direction.Normalize(); projectile.rotation = direction.ToRotation(); projectile.Center = Owner.Center + (direction * projectile.scale * 10); projectile.timeLeft = (int)throwOutTime + 1; - - //if (Main.rand.NextBool()) - //{ - // Particle foam = new SeaFoamParticle(Owner.Center + direction * 40 + Main.rand.NextVector2Circular(30f, 30f), Vector2.Zero, Color.White, new Color(65, 129, 192), Main.rand.NextFloat(0.5f, 1.5f), 245 - Main.rand.Next(50), 0.04f); - // foam.Velocity = (foam.Position - Owner.Center) * 0.01f + Owner.velocity; - // GeneralParticleHandler.SpawnParticle(foam); - //} - + Empowerment++; + if (Empowerment > maxEmpowerment) + Empowerment = maxEmpowerment; } if (CurrentState == 1f) { projectile.Center = Owner.Center + (direction * projectile.scale * 10) + ( direction * throwOutDistance * ThrowCurve()); + projectile.scale = (1 + Empowerment / maxEmpowerment * 1.5f) * MathHelper.Clamp(1 - retractionTimer, 0.3f, 1f); } //Make the owner look like theyre holding the sword bla bla @@ -1639,9 +1709,20 @@ namespace CalamityMod.Projectiles.Melee Owner.itemAnimation = 2; } + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + damage = (int)(damage * (initialDamage + (maxEmpowermentBoost * Empowerment / maxEmpowerment))); + } + + public override void Kill(int timeLeft) + { + if (smear != null) + smear.Kill(); + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D handle = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade"); + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/TrueBiomeBlade"); Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_HeavensMight"); float drawAngle = direction.ToRotation(); @@ -1650,6 +1731,31 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawOrigin = new Vector2(0f, handle.Height); Vector2 drawOffset = projectile.Center - Main.screenPosition; + //Afterimages + if (CalamityConfig.Instance.Afterimages && CurrentState == 0f && Empowerment / maxEmpowerment > 0.4f) + { + for (int i = 0; i < projectile.oldRot.Length; ++i) + { + Color color = projectile.GetAlpha(lightColor) * (1f - (i / (float)projectile.oldRot.Length)); + float afterimageRotation = projectile.oldRot[i] + MathHelper.PiOver4; + Main.spriteBatch.Draw(handle, drawOffset, null, color * MathHelper.Lerp(0f, 0.5f, MathHelper.Clamp(Empowerment / maxEmpowerment - 0.4f / 0.1f, 0f, 1f) ), afterimageRotation, drawOrigin, projectile.scale - 0.2f * ((i / (float)projectile.oldRot.Length)), 0f, 0f); + } + + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + Vector2 afterimageDrawOrigin = new Vector2(0f, blade.Height); + for (int i = 0; i < projectile.oldRot.Length; ++i) + { + Color color = projectile.GetAlpha(lightColor) * (1f - (i / (float)projectile.oldRot.Length)); + float afterimageRotation = projectile.oldRot[i] + MathHelper.PiOver4; + Main.spriteBatch.Draw(blade, drawOffset, null, color * MathHelper.Lerp(0f, 0.5f, MathHelper.Clamp((Empowerment / maxEmpowerment - 0.4f) / 0.1f, 0f, 1f)), afterimageRotation, afterimageDrawOrigin, projectile.scale - 0.2f * ((i / (float)projectile.oldRot.Length)), 0f, 0f); + } + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + } + + spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); //Turn on additive blending @@ -1658,7 +1764,22 @@ namespace CalamityMod.Projectiles.Melee //Update the parameters drawOrigin = new Vector2(0f, blade.Height); - spriteBatch.Draw(blade, drawOffset, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + //Don't draw the glowing blade after the retraction + float opacityFade = CurrentState == 0f ? 1f : 1f - retractionTimer; + //Add basic tint (my beloved) during the snap + if (snapTimer > 0 && retractionTimer <= 0) + { + GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(MathHelper.Clamp(0.8f - snapTimer, 0f, 1f)); + GameShaders.Misc["CalamityMod:BasicTint"].UseColor(Color.White); + GameShaders.Misc["CalamityMod:BasicTint"].Apply(); + } + + spriteBatch.Draw(blade, drawOffset, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f * opacityFade, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + if (CurrentState == 1f && snapTimer > 0) + { + drawChain(spriteBatch, snapTimer, retractionTimer); + } //Back to normal spriteBatch.End(); @@ -1667,6 +1788,35 @@ namespace CalamityMod.Projectiles.Melee return false; } + public void drawChain(SpriteBatch spriteBatch, float snapProgress, float retractProgress) + { + Texture2D chainTex = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_HeavensMightChain"); + + float opacity = retractProgress < 0.5 ? 1 : (retractProgress - 0.5f) / 0.5f; + + Vector2 Shake = retractProgress > 0 ? Vector2.Zero : Vector2.One.RotatedByRandom(MathHelper.TwoPi) * (1f - snapProgress) * 10f; + + int dist = (int)Vector2.Distance(Owner.Center, projectile.Center) / 16; + Vector2[] Nodes = new Vector2[dist + 1]; + Nodes[0] = Owner.Center; + Nodes[dist] = projectile.Center; + + for (int i = 1; i < dist + 1; i++) + { + Rectangle frame = new Rectangle(0, 0 + 18 * (i % 2), 12, 18); + Vector2 positionAlongLine = Vector2.Lerp(Owner.Center, projectile.Center, i / (float)dist); //Get the position of the segment along the line, as if it were a flat line + Nodes[i] = positionAlongLine + Shake * (float)Math.Sin(i / (float)dist * MathHelper.Pi); + + float rotation = (Nodes[i] - Nodes[i - 1]).ToRotation() - MathHelper.PiOver2; //Calculate rotation based on direction from last point + float yScale = Vector2.Distance(Nodes[i], Nodes[i - 1]) / frame.Height; //Calculate how much to squash/stretch for smooth chain based on distance between points + Vector2 scale = new Vector2(1, yScale); + + Color chainLightColor = Lighting.GetColor((int)Nodes[i].X / 16, (int)Nodes[i].Y / 16); //Lighting of the position of the chain segment + + Vector2 origin = new Vector2(frame.Width / 2, frame.Height); //Draw from center bottom of texture + spriteBatch.Draw(chainTex, Nodes[i] - Main.screenPosition, frame, chainLightColor * opacity * 0.7f, rotation, origin, scale, SpriteEffects.None, 0); + } + } } } diff --git a/Projectiles/Melee/MendedBiomeBlade_HeavensMight.png b/Projectiles/Melee/MendedBiomeBlade_HeavensMight.png index 3e41ca145a0bc3f8a351aaf35b205ae8686898a5..16ff22f0e6d0c85c9ac77c6f3daa980504130035 100644 GIT binary patch delta 735 zcmV<50wDd6280HXF@L^EL_t(|ob8)Ei_}mQhTnX+(O;oxp^aE9TUacDUm#YBq6mV8 z7J?wyScrw4#e%)UHrl9&Vj+TSp_N!H3Kk*=`X}7oB$I5BduAthHkp&`OfnhYr@71} zlY3wu-h1av1|VddIBgfuG%I_b+Ec0KeeU>6nN9v1qw1O@(0?c;GjG)U1J3{eZZ8wa zO{@5CPf|qAdIq%nhTRk_oq=xI&akdn=1f{Gs%lHlYC>6AGv1C zjB-bBf(}5V)PHo=sN45G0~no2Vp14nPI$2~%8bE!VOHh7wa_Rfoipm%(iZ^5CWR)G zyx7j9{1_VJJjt$JKdf>lo&0+h0F6@98KcfGuL3AJaYx(lZo}DRt`pSSW0PHgJ zVv<0kluW%*Ctm*mP_nxjLqcOh-<+Xr%Ad?VGw&px1AhR!&E3!ZzOro{G)l?T8ny80 z7l7)SWM@-RCW%SH#nnrt_0T9KQ)kqn?|%RQ8*7uzB;oqUbE>*%l#;12N=y>MJysV$ znMs~9lkU7cTd6)8rKEMEY?EO9f*S>SL&DfPXmW2rNt?S~wTA#4 z$trW=4$3p>)s6Wb7dQxwQquZ4sw%PB{i1?Q`f%a!MAoHIN;+qh5C(3}q_4*hPINsQ zrKF2SIRKFO*=PK1et#p2(kLZu8YLN{Jx}E_=~(BHedDcW1T;!XW6zn}{~WmWcG141 z$gEaP5@?i?CNoNmaeyr|2D%BQcDH4cK%)pDgb+dqA%qY@2qAzhTqgA_v)X}NfZRd=_0605fnvToNoOA zQg9YQ+yocFL0sjEE>0D}L7j?&lM0H1g7;5&du!4-ob&bC)8yt$nnB~Xih()86EUi&bF82TcgPmB0 z5&%eA9snTnjZ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9ueOp__{)5&#oIHb4J@H`E#QdK*yM|02Etdk9%i*Q(C_Tb*C^!Y2vyv?~aK0YU~t7 zH2%;4z*oDsC7pll{da+Q_Be^<3N<~gw*k0rN0MjU7z-dguAqOF4>86lO#bk7h3zQ;kWZg-NrKlW0WQ-pA;{jwE%$Y z-QF0$>;iEwc)3t?!CPlVc1g1&MGI$$dB@KJ5PWp9G9K99pwwWD8X>rLJ-I@U*ni7H zf0r^YO_E4sq$x!U)#DO*Pd9c-q3Cwa*9KPk5MzweB*7@z?ZWnhUk||;z|;b<&iU>_ z2!Q-tvCxW)6;EdZ`x}&Qc(Lgw0E;TrbyZ-$SiyHroB%*WhG&z+7^R6dbMX@8K#3)G z4Q`#k6$4l~S-h4eP0SY`+r846{5!dMqx}GMbp(^%!<9_G-vS6UiBBVBdbg7pqcpL~ zR#yYi*4CjIu(?#MgFdtG@y3s`EP$KcVw#%?&K12I*cJHq!IwO*B%1mCiUct4^MhKBMEQ5n=nRcVpUg*Z)dlh myr^_Nr%88fHc5<8n*0X@CR7N;zRSe`0000 literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/MendedBiomeBlade_HeavensMightChain.png b/Projectiles/Melee/MendedBiomeBlade_HeavensMightChain.png new file mode 100644 index 0000000000000000000000000000000000000000..70bee87d0b300a0282aac7bfe2a8ca42778a5991 GIT binary patch literal 400 zcmV;B0dM|^P)Px$N=ZaPR5*>blfO#CP!xy1Yl0Nfg3v%gK|v^8BZ!C*pTKSoPQHNP;N(Me>kEj3 zgPW^GD2+oAEjksU(7_=Pp`s$8(8eK6=)D-EH+rUf4!?W8d(R(He(a%GsQ6;inNiih znQ6N|0By%oGfPC<^@SEe)K|_!fTOD&0BV({Bv9k}gu7iU$}kM2s*DT~0&FyVJ%XtQ zMuzxFmsoZ}ue2cftIr>QL^wMs15kQ;lLU>uB_KnU#Od)30QvqPoFv6|SnUAtzBsEl zOJ=@5h~75taIMmmruN<`i17>1A|!3S*t`V5@&bwA7jpvOptY|@Nc!;L6adJ54JAP^ zXGDh<842y}XdhnI<|V;$_cJI*LtKrtDs?gw?AvIgwyr%%5O=zs unXvA@0$_Q8B=Czl$=4^SnbYD^6TSgX9ba3} Date: Tue, 11 Jan 2022 01:50:07 +0100 Subject: [PATCH 34/76] Astral attunement start (sucks) --- Items/Weapons/Melee/TrueBiomeBlade.cs | 15 +- .../Melee/MendedBiomeBladeProjectiles.cs | 200 +++++++++++++++++- ...endedBiomeBlade_HeavensMightAfterimage.png | Bin 1640 -> 0 bytes .../MendedBiomeBlade_TheirAbhorrence.png | Bin 0 -> 1218 bytes ...ndedBiomeBlade_TheirAbhorrenceMonolith.png | Bin 0 -> 9062 bytes 5 files changed, 202 insertions(+), 13 deletions(-) delete mode 100644 Projectiles/Melee/MendedBiomeBlade_HeavensMightAfterimage.png create mode 100644 Projectiles/Melee/MendedBiomeBlade_TheirAbhorrence.png create mode 100644 Projectiles/Melee/MendedBiomeBlade_TheirAbhorrenceMonolith.png diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 26cbadf0c7..6630dd76d1 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -129,7 +129,7 @@ namespace CalamityMod.Items.Weapons.Melee AttunementInfo.color = new Color(220, 143, 255); break; case Attunement.Astral: - AttunementInfo.name = "The One Beyond's Abhorrence"; + AttunementInfo.name = "Their Abhorrence"; AttunementInfo.function_description = "Hold LMB to charge up a star-piercing sword thrust, and release to unleash the devastating blow"; AttunementInfo.function_extra = "Striking the ground will create an impact so powerful, massive otherwordly monoliths will rise up from the earth"; AttunementInfo.color = new Color(91, 73, 196); @@ -338,7 +338,7 @@ namespace CalamityMod.Items.Weapons.Melee item.channel = true; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.Stabbing; - //item.shoot = ProjectileType(); + item.shoot = ProjectileType(); item.shootSpeed = 12f; item.UseSound = null; item.noMelee = true; @@ -389,7 +389,11 @@ namespace CalamityMod.Items.Weapons.Melee public override bool CanUseItem(Player player) { return !Main.projectile.Any(n => n.active && n.owner == player.whoAmI && - (n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType())); // || n.type == ProjectileType() + (n.type == ProjectileType() || + n.type == ProjectileType() || + n.type == ProjectileType() || + n.type == ProjectileType() || + n.type == ProjectileType())); } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) @@ -445,11 +449,6 @@ namespace CalamityMod.Items.Weapons.Melee StoredLunges = 0; return false; - case Attunement.Astral: - float astralVariant = mainAttunement == Attunement.Astral ? 1f : 0f; - // Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage * 2, knockBack, player.whoAmI, astralVariant); - return false; - default: return base.Shoot(player, ref position, ref speedX, ref speedY, ref type, ref damage, ref knockBack); } diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 7b5ac9fb62..73e3458c01 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -1538,8 +1538,8 @@ namespace CalamityMod.Projectiles.Melee public ref float CurrentState => ref projectile.ai[0]; public Player Owner => Main.player[projectile.owner]; private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; - public float throwOutTime = 90f; - public float throwOutDistance = 440f; //Turn these into constants when im doine tweakin em + public const float throwOutTime = 90f; + public const float throwOutDistance = 440f; public static float snapPoint = 0.45f; public float snapTimer => (throwTimer / throwOutTime) < snapPoint ? 0 : ((throwTimer / throwOutTime) - snapPoint) / (1f - snapPoint); @@ -1549,9 +1549,9 @@ namespace CalamityMod.Projectiles.Melee public ref float hasMadeSound => ref projectile.localAI[0]; public ref float hasMadeChargeSound => ref projectile.localAI[1]; - public float maxEmpowerment = 600f; + public const float maxEmpowerment = 600f; //How much damage reduction applies on uncharged attacks - public float initialDamage = 0.2f; + public const float initialDamage = 0.2f; //How much extra damage applies when fully charged. This goes ontop of the initial damage, so a max empowerment boost of 2 with an initial damage of 0.1 makes the total damage multiplier be 1.9 public float maxEmpowermentBoost = 2f; public float throwTimer => throwOutTime - projectile.timeLeft; @@ -1741,7 +1741,7 @@ namespace CalamityMod.Projectiles.Melee Main.spriteBatch.Draw(handle, drawOffset, null, color * MathHelper.Lerp(0f, 0.5f, MathHelper.Clamp(Empowerment / maxEmpowerment - 0.4f / 0.1f, 0f, 1f) ), afterimageRotation, drawOrigin, projectile.scale - 0.2f * ((i / (float)projectile.oldRot.Length)), 0f, 0f); } - spriteBatch.End(); + spriteBatch.End(); //Haha sup babe what if i restarted the spritebatch way too many times haha /blushes spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); Vector2 afterimageDrawOrigin = new Vector2(0f, blade.Height); @@ -1817,6 +1817,196 @@ namespace CalamityMod.Projectiles.Melee spriteBatch.Draw(chainTex, Nodes[i] - Main.screenPosition, frame, chainLightColor * opacity * 0.7f, rotation, origin, scale, SpriteEffects.None, 0); } } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(initialized); + writer.WriteVector2(direction); + } + public override void ReceiveExtraAI(BinaryReader reader) + { + initialized = reader.ReadBoolean(); + direction = reader.ReadVector2(); + } + } + + public class TheirAbhorrence : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_TheirAbhorrence"; + private bool initialized = false; + Vector2 direction = Vector2.Zero; + public Player Owner => Main.player[projectile.owner]; + public ref float Charge => ref projectile.ai[0]; //Charge + public ref float State => ref projectile.ai[1]; //State 0 is "charging", State 1 is "thrusting" + public ref float HasPlayedSound => ref projectile.localAI[0]; + public ref float OverCharge => ref projectile.localAI[1]; + + private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; + const float MaxCharge = 500; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Their Abhorrence"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 70; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 16; + } + + public override bool CanDamage() + { + return (State == 1); + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + float bladeLenght = 120 * projectile.scale; + float bladeWidth = 20 * projectile.scale; + + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center, Owner.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); + } + + public override void AI() + { + if (!initialized) //Initialization. Here its litterally just playing a sound tho lmfao + { + Main.PlaySound(SoundID.Item101, projectile.Center); + initialized = true; + } + + if (!OwnerCanShoot) + { + if (State == 0f) + { + if (Charge / MaxCharge < 0.25f) + { + Main.PlaySound(SoundID.Item109, projectile.Center); + projectile.Kill(); + return; + } + else + { + Main.PlaySound(SoundID.Item120, projectile.Center); + State = 1f; + projectile.timeLeft = 40; + } + } + } + + if (State == 0f) + { + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + projectile.Center = Owner.Center + (direction * 60f * (1f - (Charge / MaxCharge))); + + Charge++; + OverCharge--; + projectile.timeLeft = 2; + if (Charge >= MaxCharge) + { + Charge = MaxCharge; + if (Owner.whoAmI == Main.myPlayer && HasPlayedSound == 0f) + { + OverCharge = 30f; + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/CorvinaScream"), projectile.Center); + HasPlayedSound = 1f; + } + } + } + + if (State == 1f) + { + Owner.velocity = direction * 10f; + if (Owner.HeldItem.modItem is TrueBiomeBlade blade) + { + blade.strongLunge = true; //Needed for the downwards velocity uncap. + } + + if (Collision.SolidCollision(Owner.Center + (direction * 120 * projectile.scale) - Vector2.One * 5f, 10, 10)) + { + SlamDown(); + projectile.timeLeft = 0; + Main.PlaySound(SoundID.Item105, projectile.Center); + projectile.netUpdate = true; + projectile.netSpam = 0; + } + } + + Lighting.AddLight(projectile.Center, new Vector3(1f, 0.56f, 0.56f) * Charge / MaxCharge); + + //Manage position and rotation + projectile.rotation = direction.ToRotation(); + + //Scaling based on charge + projectile.scale = 1f + (Charge / MaxCharge * 0.5f); + + Owner.direction = Math.Sign(direction.X); + Owner.itemRotation = direction.ToRotation(); + + if (Owner.direction != 1) + { + Owner.itemRotation -= 3.14f; + } + + Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); + Owner.itemTime = 2; + Owner.itemAnimation = 2; + } + + public void SlamDown() + { + + + + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D handle = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade"); + Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_TheirAbhorrence"); + + float drawAngle = direction.ToRotation(); + float drawRotation = drawAngle + MathHelper.PiOver4; + + Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOffset = Owner.Center + direction * 60f * (1f - (Charge / MaxCharge)) - Main.screenPosition; + + spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Update the parameters + drawOrigin = new Vector2(0f, blade.Height); + + spriteBatch.Draw(blade, drawOffset, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(initialized); + writer.WriteVector2(direction); + } + public override void ReceiveExtraAI(BinaryReader reader) + { + initialized = reader.ReadBoolean(); + direction = reader.ReadVector2(); + } } } + diff --git a/Projectiles/Melee/MendedBiomeBlade_HeavensMightAfterimage.png b/Projectiles/Melee/MendedBiomeBlade_HeavensMightAfterimage.png deleted file mode 100644 index 83a6325ff492f534d86bcc3b1ab3b8129d832b02..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1640 zcmV-u2ABDXP)Px*B1uF+RCt{2n_FyDMI48})9xAU^m2Vl)~a1Z_lvib(?nqf$%}f`u-ZLb#-q)^@wyiw|?A>zv)w zowiH6TjqOd_RQ=#|F&O#|2cDZEk-zpO7=Pr#rpI9s=x*dASYb~jdVQ2UBI1UuqHV% zMrktQj7qmj5@VDmBgUw2ANT@*o=_A3Z#b3~lO)C{O|sso&nxx;5DZ2D@Y|VW#e`X& zNP5IFMro3@M(tX80DxduL>`I(#BwYE!X9CiFC@mj-QsnQzF^k>Ul^k_$vUIn+i(zw zXA%yRB3@xm*dxZnUUA%K8|Dp3)1q#du#z1#Mro2YM!mk}XCQSZg}q|j=dq95hDCbE z9rI*%MPg!?z|OF$zy{^|#wblP-l&(}sss9;Nr?v8+0?Dhi&h3$EMheBbhYG}NQ4bGUP@{lO$1(xL*%?#Q!Yu?mopXK#ENIxjsxK4wbmHK&62#m zi7`r(1f!%$(@MpE?%bJX#h@pje;k0ieMbQZc6C|yPx(3qa9>dokZ6|7u2<$IePDk}l#Xm3}#m+W>APMZb9Gs|h1oF_Sd>=FRK z*Vik@7pz|gz~M^)02(iam70uESxSOYo9501z~}P;5DJBq44Pjqo@z{eY!VPRY~7|0 zmGf+Tb`B6Xsj*GXypH*^0eHE5IuOq)j8WN5Lf6}ULVP}H&FuLA6xhooX_7>mB=6zY z9ueOp__{)5&#oIHb4J@H`E#QdK*yM|02Etdk9%i*Q(C_Tb*C^!Y2vyv?~aK0YU~t7 zH2%;4z*oDsC7pll{da+Q_Be^<3N<~gw*k0rN0MjU7z-dguAqOF4>86lO#bk7h3zQ;kWZg-NrKlW0WQ-pA;{jwE%$Y z-QF0$>;iEwc)3t?!CPlVc1g1&MGI$$dB@KJ5PWp9G9K99pwwWD8X>rLJ-I@U*ni7H zf0r^YO_E4sq$x!U)#DO*Pd9c-q3Cwa*9KPk5MzweB*7@z?ZWnhUk||;z|;b<&iU>_ z2!Q-tvCxW)6;EdZ`x}&Qc(Lgw0E;TrbyZ-$SiyHroB%*WhG&z+7^R6dbMX@8K#3)G z4Q`#k6$4l~S-h4eP0SY`+r846{5!dMqx}GMbp(^%!<9_G-vS6UiBBVBdbg7pqcpL~ zR#yYi*4CjIu(?#MgFdtG@y3s`EP$KcVw#%?&K12I*cJHq!IwO*B%1mCiUct4^MhKBMEQ5n=nRcVpUg*Z)dlh myr^_Nr%88fHc5<8n*0X@CR7N;zRSe`0000 diff --git a/Projectiles/Melee/MendedBiomeBlade_TheirAbhorrence.png b/Projectiles/Melee/MendedBiomeBlade_TheirAbhorrence.png new file mode 100644 index 0000000000000000000000000000000000000000..4ec0fdebc3e4f1cd55dbbaa1a96a83e5e55570b4 GIT binary patch literal 1218 zcmV;z1U>tSP)Px(d`Uz>RCt{2oXd+GMI6UJ)zdxu$Zqfj0g+@cK3ODqkl+J71P?*cKVTyP!Go7v zBjUl6;>lacL0EDT#8X5NSw&$_o`UEisG#BlG$!iC>`YH}kB48??(}4`Gqck*Grjx! zT#Bl$nXcOX%y+75dd8p>SbO?dcT>BoZaOO`KmTdh=Zi)klCm47f0u*70OocxkjZLr zU=F;&doZ_~T}@Vl0~1er0F$BwbGskcGY!<>z#LeEI~delZ|JT1_cU1z4$OfwxJUN( zW2BXq8XTAdWALa~Y6JA|i5eW3eQ)p>&DC}AB-pnGmvE&vlDQr=I57KeH?71yhJNUN z@HDV*4F2%R2LXsp3P2LsiJI$Cg9B6fRm2C6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w-Y>V8bW@Oy(A~k5A`Ws0j2G4$;ztaVB%u1QDL8(%w5v#vw9)ZLMl`K81W7- z^kBXvcDr&vg8juog$QAG#@TtqvT!Px=F~f5NUx7%AimHF=%3_&hk1aHh??w>>cIwX g Date: Tue, 11 Jan 2022 22:42:57 +0100 Subject: [PATCH 35/76] When the monolith is sizeable --- CalPlayer/CalamityPlayerMiscEffects.cs | 5 +- Items/Weapons/Melee/TrueBiomeBlade.cs | 4 + .../Melee/MendedBiomeBladeProjectiles.cs | 334 +++++++++++++++--- ...ndedBiomeBlade_TheirAbhorrenceMonolith.png | Bin 9062 -> 16464 bytes ...iomeBlade_TheirAbhorrenceMonolith_Glow.png | Bin 0 -> 4994 bytes 5 files changed, 295 insertions(+), 48 deletions(-) create mode 100644 Projectiles/Melee/MendedBiomeBlade_TheirAbhorrenceMonolith_Glow.png diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index c451613917..d3e7625f5b 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1096,8 +1096,11 @@ namespace CalamityMod.CalPlayer player.maxFallSpeed = 20f; if (player.HeldItem.modItem is TrueBiomeBlade blade) { - if (blade.mainAttunement == TrueBiomeBlade.Attunement.Evil && blade.strongLunge) + if (blade.strongLunge) + { player.maxFallSpeed = 80f; + player.noFallDmg = true; + } } } } diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 6630dd76d1..268a7300eb 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -262,6 +262,10 @@ namespace CalamityMod.Items.Weapons.Melee PowerLungeCounter = 0; } + //Reset the strong lunge thing just in case it didnt get caught beofre. + if (CanUseItem(player)) + strongLunge = false; + //Change the swords function based on its attunement switch (mainAttunement) { diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 73e3458c01..75e9be392c 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Melee else if ((projectile.Center - target.Center).Length() >= (projectile.Center + projectile.velocity - target.Center).Length() && CalamityUtils.AngleBetween(projectile.velocity, target.Center - projectile.Center) < MathHelper.PiOver4 * 0.5f) //Home in { projectile.timeLeft = 30; //Remain alive - float angularTurnSpeed = MathHelper.ToRadians(MathHelper.Lerp(12.5f, 2.5f, MathHelper.Clamp(projectile.Distance(target.Center)/10f, 0f, 1f))); + float angularTurnSpeed = MathHelper.ToRadians(MathHelper.Lerp(12.5f, 2.5f, MathHelper.Clamp(projectile.Distance(target.Center) / 10f, 0f, 1f))); float idealDirection = projectile.AngleTo(target.Center); float updatedDirection = projectile.velocity.ToRotation().AngleTowards(idealDirection, angularTurnSpeed); projectile.velocity = updatedDirection.ToRotationVector2() * projectile.velocity.Length(); @@ -106,7 +106,7 @@ namespace CalamityMod.Projectiles.Melee } } - public class PurityProjectionSigil : ModProjectile + public class PurityProjectionSigil : ModProjectile { private NPC target => Main.npc[(int)projectile.ai[0]]; @@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Melee { projectile.width = projectile.height = 40; projectile.friendly = false; - projectile.hostile = false; + projectile.hostile = false; projectile.penetrate = -1; projectile.timeLeft = 600; projectile.melee = true; @@ -227,6 +227,7 @@ namespace CalamityMod.Projectiles.Melee { if (dashTimer < maxDash) { + Owner.fallStart = (int)(Owner.position.Y / 16f); Owner.velocity = direction * 60f; projectile.timeLeft = (int)(MaxTime / 2f); dashTimer++; @@ -280,21 +281,6 @@ namespace CalamityMod.Projectiles.Melee dashTimer = 1f; Owner.GiveIFrames(60); } - //Gives us the longest distance the dash can be - private static Vector2 LongestClearDistance(Vector2 start, Vector2 end) - { - Vector2 distance = end - start; - Vector2 longestDistance = Vector2.Zero; - //Check every block along the way - for (float i = 0; i < 1; i += 8.0f / distance.Length()) - { - Vector2 positionToCheck = start + (distance * i); - if (Main.tile[(int)(positionToCheck.X / 16), (int)(positionToCheck.Y / 16)].active()) - return longestDistance; - longestDistance = distance * i; - } - return distance; - } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => OnHitEffects(!target.canGhostHeal || Main.player[projectile.owner].moonLeech); public override void OnHitPvp(Player target, int damage, bool crit) => OnHitEffects(Main.player[projectile.owner].moonLeech); @@ -426,7 +412,7 @@ namespace CalamityMod.Projectiles.Melee spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - + Texture2D chainTex = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_DecaysRetortDash"); Vector2 Shake = projectile.timeLeft < 15 ? Vector2.Zero : Vector2.One.RotatedByRandom(MathHelper.TwoPi) * (15 - projectile.timeLeft / 5f) * 0.5f; @@ -473,7 +459,7 @@ namespace CalamityMod.Projectiles.Melee return false; } } - + public class TrueBitingEmbrace : ModProjectile { public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_BitingEmbrace"; @@ -1137,7 +1123,7 @@ namespace CalamityMod.Projectiles.Melee Particle Sparkle = new GenericSparkle(drawOffsetStraight + (drawRotation - MathHelper.PiOver4).ToRotationVector2() * (60 + j * 50f) + drawDisplacementAngle, direction * projectile.velocity.Length() * Main.rand.NextFloat(0.9f, 1.1f), Color.Lerp(Color.Cyan, Color.Orange, (j + 1) / 4f), Color.OrangeRed, 0.5f + Main.rand.NextFloat(-0.2f, 0.2f), 20 + Main.rand.Next(30), 1, 2f); GeneralParticleHandler.SpawnParticle(Sparkle); } - + } } @@ -1251,7 +1237,7 @@ namespace CalamityMod.Projectiles.Melee { boing = true; Main.PlaySound(SoundID.Item56); - } + } Projectile.NewProjectile(target.Center, Vector2.Zero, ProjectileType(), damage / 2, 0, Owner.whoAmI, target.whoAmI, potentialTarget.whoAmI); } Array.Clear(excludedTargets, 0, 3); @@ -1270,7 +1256,7 @@ namespace CalamityMod.Projectiles.Melee float distance = Vector2.Distance(hitFrom, npc.Center); if (distance < longestReach) { - longestReach = distance; + longestReach = distance; target = npc; } } @@ -1387,7 +1373,7 @@ namespace CalamityMod.Projectiles.Melee SpriteEffects flip = (projectile.spriteDirection < 0) ? SpriteEffects.None : SpriteEffects.None; lightColor = Lighting.GetColor((int)(projectile.Center.X / 16f), (int)(projectile.Center.Y / 16f)); - Vector2 nitpickCorrection = (flipped == -1 && (Timer / MaxTime < 0.35f)) ? drawRotation.ToRotationVector2() * 16f + (Owner.direction == -1f ? Vector2.UnitX * -12f : Vector2.Zero) : Vector2.Zero; + Vector2 nitpickCorrection = (flipped == -1 && (Timer / MaxTime < 0.35f)) ? drawRotation.ToRotationVector2() * 16f + (Owner.direction == -1f ? Vector2.UnitX * -12f : Vector2.Zero) : Vector2.Zero; spriteBatch.Draw(handle, projBottom - nitpickCorrection - Main.screenPosition, null, lightColor, drawRotation, drawOrigin, projectile.scale, flip, 0f); @@ -1425,7 +1411,7 @@ namespace CalamityMod.Projectiles.Melee } BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, projBottom }); - int numPoints = 30; + int numPoints = 30; chainPositions = curve.GetPoints(numPoints).ToArray(); //Draw each chain segment bar the very first one @@ -1509,7 +1495,7 @@ namespace CalamityMod.Projectiles.Melee Nodes[dist] = Target.Center; float pointUp = Target.Center.X > NPCfrom.Center.X ? -MathHelper.PiOver2 : MathHelper.PiOver2; - for (int i = 1; i < dist+1; i++) + for (int i = 1; i < dist + 1; i++) { Vector2 positionAlongLine = Vector2.Lerp(NPCfrom.Center, Target.Center, i / (float)dist); //Get the position of the segment along the line, as if it were a flat line float elevation = (float)Math.Sin(i / (float)dist * MathHelper.Pi) * curvature * dist / 10f; @@ -1539,7 +1525,7 @@ namespace CalamityMod.Projectiles.Melee public Player Owner => Main.player[projectile.owner]; private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; public const float throwOutTime = 90f; - public const float throwOutDistance = 440f; + public const float throwOutDistance = 440f; public static float snapPoint = 0.45f; public float snapTimer => (throwTimer / throwOutTime) < snapPoint ? 0 : ((throwTimer / throwOutTime) - snapPoint) / (1f - snapPoint); @@ -1588,7 +1574,7 @@ namespace CalamityMod.Projectiles.Melee public CurveSegment launch = new CurveSegment(EasingType.CircOut, 0f, 0f, 1f, 4); public CurveSegment hold = new CurveSegment(EasingType.Linear, snapPoint, 1f, 0f); public CurveSegment retract = new CurveSegment(EasingType.PolyInOut, retractionPoint, 1f, -1.05f, 3); - internal float ThrowCurve() => PiecewiseAnimation((throwOutTime - projectile.timeLeft) / throwOutTime, new CurveSegment[] { launch , hold, retract }); + internal float ThrowCurve() => PiecewiseAnimation((throwOutTime - projectile.timeLeft) / throwOutTime, new CurveSegment[] { launch, hold, retract }); public override void AI() { @@ -1657,7 +1643,7 @@ namespace CalamityMod.Projectiles.Melee } } - if (Empowerment/maxEmpowerment >= 0.75) + if (Empowerment / maxEmpowerment >= 0.75) { if (smear == null) { @@ -1667,7 +1653,7 @@ namespace CalamityMod.Projectiles.Melee //Update the variables of the smear else { - smear.Rotation = direction.ToRotation() + MathHelper.PiOver2 ; + smear.Rotation = direction.ToRotation() + MathHelper.PiOver2; smear.Time = 0; smear.Position = Owner.Center; smear.Scale = projectile.scale * 1.5f; @@ -1677,7 +1663,7 @@ namespace CalamityMod.Projectiles.Melee //Manage position and rotation - projectile.scale = 1 + Empowerment/maxEmpowerment * 1.5f; + projectile.scale = 1 + Empowerment / maxEmpowerment * 1.5f; oldDirection = direction; direction = direction.RotatedBy(MathHelper.Clamp(Empowerment / maxEmpowerment, 0.4f, 1f) * MathHelper.PiOver4 * 0.20f); @@ -1692,7 +1678,7 @@ namespace CalamityMod.Projectiles.Melee if (CurrentState == 1f) { - projectile.Center = Owner.Center + (direction * projectile.scale * 10) + ( direction * throwOutDistance * ThrowCurve()); + projectile.Center = Owner.Center + (direction * projectile.scale * 10) + (direction * throwOutDistance * ThrowCurve()); projectile.scale = (1 + Empowerment / maxEmpowerment * 1.5f) * MathHelper.Clamp(1 - retractionTimer, 0.3f, 1f); } @@ -1738,7 +1724,7 @@ namespace CalamityMod.Projectiles.Melee { Color color = projectile.GetAlpha(lightColor) * (1f - (i / (float)projectile.oldRot.Length)); float afterimageRotation = projectile.oldRot[i] + MathHelper.PiOver4; - Main.spriteBatch.Draw(handle, drawOffset, null, color * MathHelper.Lerp(0f, 0.5f, MathHelper.Clamp(Empowerment / maxEmpowerment - 0.4f / 0.1f, 0f, 1f) ), afterimageRotation, drawOrigin, projectile.scale - 0.2f * ((i / (float)projectile.oldRot.Length)), 0f, 0f); + Main.spriteBatch.Draw(handle, drawOffset, null, color * MathHelper.Lerp(0f, 0.5f, MathHelper.Clamp(Empowerment / maxEmpowerment - 0.4f / 0.1f, 0f, 1f)), afterimageRotation, drawOrigin, projectile.scale - 0.2f * ((i / (float)projectile.oldRot.Length)), 0f, 0f); } spriteBatch.End(); //Haha sup babe what if i restarted the spritebatch way too many times haha /blushes @@ -1775,7 +1761,7 @@ namespace CalamityMod.Projectiles.Melee } spriteBatch.Draw(blade, drawOffset, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f * opacityFade, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - + if (CurrentState == 1f && snapTimer > 0) { drawChain(spriteBatch, snapTimer, retractionTimer); @@ -1838,7 +1824,7 @@ namespace CalamityMod.Projectiles.Melee public Player Owner => Main.player[projectile.owner]; public ref float Charge => ref projectile.ai[0]; //Charge public ref float State => ref projectile.ai[1]; //State 0 is "charging", State 1 is "thrusting" - public ref float HasPlayedSound => ref projectile.localAI[0]; + public ref float CurrentIndicator => ref projectile.localAI[0]; //What "indicator" stage are you on. public ref float OverCharge => ref projectile.localAI[1]; private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; @@ -1878,6 +1864,7 @@ namespace CalamityMod.Projectiles.Melee { if (!initialized) //Initialization. Here its litterally just playing a sound tho lmfao { + projectile.velocity = Vector2.Zero; Main.PlaySound(SoundID.Item101, projectile.Center); initialized = true; } @@ -1905,26 +1892,36 @@ namespace CalamityMod.Projectiles.Melee { direction = Owner.DirectionTo(Main.MouseWorld); direction.Normalize(); - projectile.Center = Owner.Center + (direction * 60f * (1f - (Charge / MaxCharge))); + projectile.Center = Owner.Center + (direction * 100f * (0.5f - (Charge / MaxCharge))); Charge++; OverCharge--; projectile.timeLeft = 2; + + if ((Charge / MaxCharge >= 0.25f && CurrentIndicator == 0f) || (Charge / MaxCharge >= 0.5f && CurrentIndicator == 1f) || (Charge / MaxCharge >= 0.75f && CurrentIndicator == 2f)) + { + Main.PlaySound(SoundID.DD2_WitherBeastAuraPulse, projectile.Center); + CurrentIndicator++; + OverCharge = 20f; + } + if (Charge >= MaxCharge) { Charge = MaxCharge; - if (Owner.whoAmI == Main.myPlayer && HasPlayedSound == 0f) + if (Owner.whoAmI == Main.myPlayer && CurrentIndicator < 4f) { - OverCharge = 30f; + OverCharge = 20f; Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/CorvinaScream"), projectile.Center); - HasPlayedSound = 1f; + CurrentIndicator++; } } } if (State == 1f) { - Owner.velocity = direction * 10f; + projectile.Center = Owner.Center + direction * 60f; + Owner.fallStart = (int)(Owner.position.Y / 16f); + if (Owner.HeldItem.modItem is TrueBiomeBlade blade) { blade.strongLunge = true; //Needed for the downwards velocity uncap. @@ -1934,10 +1931,17 @@ namespace CalamityMod.Projectiles.Melee { SlamDown(); projectile.timeLeft = 0; - Main.PlaySound(SoundID.Item105, projectile.Center); + projectile.active = false; projectile.netUpdate = true; projectile.netSpam = 0; } + + Owner.velocity = direction * 30f; + + float variation = Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4); + float strength = (float)Math.Sin(variation * 2f + MathHelper.PiOver2); + Particle Sparkle = new CritSpark(projectile.Center, Owner.velocity - direction.RotatedBy(variation) * (1 + strength) * 2f * Main.rand.NextFloat(7.5f, 20f), Color.White, Main.rand.NextBool() ? Color.MediumTurquoise : Color.DarkOrange, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); + GeneralParticleHandler.SpawnParticle(Sparkle); } Lighting.AddLight(projectile.Center, new Vector3(1f, 0.56f, 0.56f) * Charge / MaxCharge); @@ -1946,7 +1950,7 @@ namespace CalamityMod.Projectiles.Melee projectile.rotation = direction.ToRotation(); //Scaling based on charge - projectile.scale = 1f + (Charge / MaxCharge * 0.5f); + projectile.scale = 1f + (Charge / MaxCharge * 0.2f); Owner.direction = Math.Sign(direction.X); Owner.itemRotation = direction.ToRotation(); @@ -1962,10 +1966,69 @@ namespace CalamityMod.Projectiles.Melee } public void SlamDown() - { - - - + { + if (Owner.whoAmI != Main.myPlayer || Owner.velocity.Y == 0f) + return; + + //Only create the central monolith if over half charge + if (Charge / MaxCharge < 0.5f) + return; + + if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 5) + Main.LocalPlayer.Calamity().GeneralScreenShakePower = 5; + Projectile.NewProjectile(Owner.Center + (direction * 120 * projectile.scale), -direction, ProjectileType(), projectile.damage * 2, 10f, Owner.whoAmI, Main.rand.Next(4), 1f); + + //Only create the side monoliths if over 3/4th charge + if (Charge / MaxCharge < 0.75f) + return; + + if (SideSprouts(1, 150f, 0.8f) && Charge >= MaxCharge ) + SideSprouts(1, 250f, 0.5f); + + if (SideSprouts(-1, 150f, 0.8f) && Charge >= MaxCharge) + SideSprouts(-1, 250f, 0.5f); + + } + + public bool SideSprouts(float facing, float distance, float projSize) + { + float widestAngle = 0f; + float widestSurfaceAngle = 0f; + bool validPositionFound = false; + for (float i = 0f; i < 1; i += 1 / distance) + { + Vector2 positionToCheck = Owner.Center + (direction * 120 * projectile.scale) + direction.RotatedBy((i * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; + + if (Main.tile[(int)(positionToCheck.X / 16), (int)(positionToCheck.Y / 16)].IsTileSolidGround()) + widestAngle = i; + + else if (widestAngle != 0) + { + validPositionFound = true; + widestSurfaceAngle = widestAngle; + } + } + + if (validPositionFound) + { + Vector2 projPosition = Owner.Center + (direction * 120 * projectile.scale) + direction.RotatedBy((widestSurfaceAngle * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; + Vector2 monolithRotation = direction.RotatedBy(Utils.AngleLerp(widestSurfaceAngle * -facing, 0f, projSize)); + Projectile proj = Projectile.NewProjectileDirect(projPosition, -monolithRotation, ProjectileType(), projectile.damage * 2, 10f, Owner.whoAmI, Main.rand.Next(4), projSize); + if (proj.modProjectile is TheirAbhorrenceMonolith monolith) + monolith.WaitTimer = (1 - projSize) * 34f; + } + + return validPositionFound; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + Owner.GiveIFrames(30); + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + damage = (int)(damage * (1f + Charge / MaxCharge)); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) @@ -1977,13 +2040,22 @@ namespace CalamityMod.Projectiles.Melee float drawRotation = drawAngle + MathHelper.PiOver4; Vector2 drawOrigin = new Vector2(0f, handle.Height); - Vector2 drawOffset = Owner.Center + direction * 60f * (1f - (Charge / MaxCharge)) - Main.screenPosition; + Vector2 drawOffset = projectile.Center - Main.screenPosition; spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); //Turn on additive blending spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + //Just in case + if (OverCharge < 0) + OverCharge = 0f; + //When the blink is + GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(OverCharge / 20f); + GameShaders.Misc["CalamityMod:BasicTint"].UseColor(new Color(154, 244, 240)); + GameShaders.Misc["CalamityMod:BasicTint"].Apply(); + //Update the parameters drawOrigin = new Vector2(0f, blade.Height); @@ -1996,6 +2068,18 @@ namespace CalamityMod.Projectiles.Melee return false; } + public override void Kill(int timeLeft) + { + //Cut the velocity short if dashing + if (State == 1f) + Owner.velocity *= 0.33f; + + if (Owner.HeldItem.modItem is TrueBiomeBlade blade) + { + blade.strongLunge = false; //Needed for the downwards velocity uncap. + } + } + public override void SendExtraAI(BinaryWriter writer) { writer.Write(initialized); @@ -2007,6 +2091,162 @@ namespace CalamityMod.Projectiles.Melee direction = reader.ReadVector2(); } } + + public class TheirAbhorrenceMonolith : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_TheirAbhorrenceMonolith"; + public Player Owner => Main.player[projectile.owner]; + public float Timer => (100f - projectile.timeLeft) / 100f; + public ref float Variant => ref projectile.ai[0]; //Yes + public ref float Size => ref projectile.ai[1]; //Yes + public float WaitTimer; //How long till it appears fr. GOtta remember to sync that one + public const float BaseWidth = 90f; + public const float BaseHeight = 420f; + + public CurveSegment StaySmall = new CurveSegment(EasingType.Linear, 0f, 0.2f, 0f); + public CurveSegment GoBig = new CurveSegment(EasingType.SineOut, 0.25f, 0.2f, 1f); + public CurveSegment GoNormal = new CurveSegment(EasingType.CircIn, 0.4f, 1.2f, -0.2f); + public CurveSegment StayNormal = new CurveSegment(EasingType.Linear, 0.5f, 1f, 0f); + + internal float Width() => PiecewiseAnimation(Timer, new CurveSegment[] { StaySmall, GoBig, GoNormal, StayNormal }) * BaseWidth * Size; + + public CurveSegment Anticipate = new CurveSegment(EasingType.CircIn, 0f, 0f, 0.15f); + public CurveSegment Overextend = new CurveSegment(EasingType.SineOut, 0.2f, 0.15f, 1f); + public CurveSegment Unextend = new CurveSegment(EasingType.CircIn, 0.25f , 1.15f, -0.15f); + public CurveSegment Hold = new CurveSegment(EasingType.ExpOut, 0.70f, 1f, -0.1f); + internal float Height() => PiecewiseAnimation(Timer, new CurveSegment[] { Anticipate, Overextend, Unextend, Hold}) * BaseHeight * Size; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Their Abhorrence"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 70; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.timeLeft = 102; + projectile.hide = true; + } + + public override bool CanDamage() => WaitTimer <= 0; + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center, projectile.Center + ((projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * Height()), Width(), ref collisionPoint); + } + + public override void DrawBehind(int index, List drawCacheProjsBehindNPCsAndTiles, List drawCacheProjsBehindNPCs, List drawCacheProjsBehindProjectiles, List drawCacheProjsOverWiresUI) + { + drawCacheProjsBehindNPCsAndTiles.Add(index); + } + + public override void AI() + { + if (WaitTimer > 0) + { + projectile.timeLeft = 102; + WaitTimer--; + } + + if (projectile.timeLeft == 100) + { + SurfaceUp(); + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; + projectile.velocity = Vector2.Zero; + } + + if (projectile.timeLeft == 80) + { + Vector2 particleDirection = (projectile.rotation - MathHelper.PiOver2).ToRotationVector2(); + Main.PlaySound(SoundID.DD2_EtherianPortalDryadTouch, projectile.Center); + + for (int i = 0; i < 8; i++) + { + Vector2 hitPositionDisplace = particleDirection.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(0f, 10f); + Vector2 flyDirection = particleDirection.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver2, MathHelper.PiOver2)) * Main.rand.NextFloat(5f, 15f); + Particle smoke = new SmallSmokeParticle(projectile.Center + hitPositionDisplace, flyDirection , Color.Lerp(Color.DarkOrange, Color.MediumTurquoise, Main.rand.NextFloat()), new Color(130, 130, 130), Main.rand.NextFloat(2.8f, 3.6f) * Size, 165 - Main.rand.Next(30), 0.1f); + GeneralParticleHandler.SpawnParticle(smoke); + } + for (int i = 0; i < 6; i++) + { + Vector2 hitPositionDisplace = particleDirection.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(10f, 30f); + Vector2 flyDirection = particleDirection.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4)); + + Particle Rock = new StoneDebrisParticle(projectile.Center + hitPositionDisplace * 3, flyDirection * Main.rand.NextFloat(3f, 6f), Color.Lerp(Color.DarkSlateBlue, Color.LightSlateGray, Main.rand.NextFloat()), (1f + Main.rand.NextFloat(0f, 2.4f)) * Size, 30 + Main.rand.Next(50), 0.1f); + GeneralParticleHandler.SpawnParticle(Rock); + } + } + } + + //Go up to the "surface" so you're not stuck in the middle of the ground like a complete moron. + public void SurfaceUp() + { + for (float i = 0; i < 40; i += 0.5f) + { + Vector2 positionToCheck = projectile.Center + projectile.velocity * i; + if (!Main.tile[(int)(positionToCheck.X / 16), (int)(positionToCheck.Y / 16)].IsTileSolidGround()) + { + projectile.Center = projectile.Center + projectile.velocity * i; + return; + } + } + projectile.Center = projectile.Center + projectile.velocity * 40f; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (WaitTimer > 0) + return false; + + Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_TheirAbhorrenceMonolith"); + + float drawAngle = projectile.rotation; + Rectangle frame = new Rectangle(0 + (int)Variant * 94, 0, 94, 420); + + Vector2 drawScale = new Vector2(Width() / BaseWidth, Height() / BaseHeight); + Vector2 drawPosition = projectile.Center - Main.screenPosition - (projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * 26f; + Vector2 drawOrigin = new Vector2(frame.Width/2f, frame.Height); + + float opacity = MathHelper.Clamp(1f - ((Timer - 0.85f )/ 0.15f), 0f, 1f); + + spriteBatch.Draw(tex, drawPosition, frame, lightColor * opacity, drawAngle, drawOrigin, drawScale, 0f, 0f); + + return false; + } + public override void PostDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (WaitTimer > 0) + return; + + Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_TheirAbhorrenceMonolith_Glow"); + + float drawAngle = projectile.rotation; + Rectangle frame = new Rectangle(0 + (int)Variant * 94, 0, 94, 420); + + Vector2 drawScale = new Vector2(Width() / BaseWidth, Height() / BaseHeight); + Vector2 drawPosition = projectile.Center - Main.screenPosition - (projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * 26f; + Vector2 drawOrigin = new Vector2(frame.Width / 2f, frame.Height); + + float opacity = MathHelper.Clamp(1f - ((Timer - 0.85f) / 0.15f), 0f, 1f); + + spriteBatch.Draw(tex, drawPosition, frame, Color.White * opacity, drawAngle, drawOrigin, drawScale, 0f, 0f); + } + + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(WaitTimer); + } + public override void ReceiveExtraAI(BinaryReader reader) + { + WaitTimer = reader.ReadSingle(); + } + + } } diff --git a/Projectiles/Melee/MendedBiomeBlade_TheirAbhorrenceMonolith.png b/Projectiles/Melee/MendedBiomeBlade_TheirAbhorrenceMonolith.png index ae51436e18ecd3e8ca262f79ffcae62166f6496d..4ccb1e449da165167b16d87f35063385a42a6b25 100644 GIT binary patch literal 16464 zcmX|Ic{r5o`*%)<&XJOeLMXD6lObh2S+hl$!Pv^qgb;(VoTDsRD?1G##28Er#u$!d z8_OV!7&8?^wi)|iEWbHT-`^iD7uWT^@AKTxy?pM^{dt~S-ZMJQEyT^i!ExI7uD%rq z$1h>5pSQnrvHqj+Pz80FBVCS~q05UL99KAu_3zk(yIctYf>2>zeqHPCs-p8gsS=>FeN00sc}p( zg~I!_nUOGh{V`?#2!fRKErj}5kOsDXG5r*Cq*p%pE62Zeq#IjjSZkK)#1Csce*G=U zX__`lvi*hQ-`>AtPjdWy&*yH3m^Ce!pZOWU@Z1~gcL;F*%zB`K>w+c+#}kti+|ie) ztiN$5IC(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Ki` z4DSX92!_7)^<0GIQu-#jfB4z`Hov6hug}6PZOv%m=UoLVPU<%< zsKU}N@!NdY70r7_e1Hbaa+|wxJpP^_>fODa8(Nb-@YG?J$aNoyh-W-M+=maCQ`b8D z9dNkm+6xpcQS=csNQw1>|8F?yyGKjhhvkiremhc7aHa7-EH@6ED694%x!_5FcC27z z#2yML+b8P43)9;JJ?s!w-1Q=FKB_>z{14v${X(%Ej~cF#UTw=HIU!GimJTP&PMlBr EPgeST82|tP literal 0 HcmV?d00001 From 09434ed40ebd48d4c7e26650b16b1c7070561abd Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Wed, 12 Jan 2022 01:01:44 +0100 Subject: [PATCH 36/76] Their Abhorrence is done woo hoo --- Items/Weapons/Melee/TrueBiomeBlade.cs | 3 + .../Melee/MendedBiomeBladeProjectiles.cs | 58 ++++++++++++++++--- 2 files changed, 52 insertions(+), 9 deletions(-) diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 268a7300eb..76be014dcb 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -461,6 +461,9 @@ namespace CalamityMod.Items.Weapons.Melee //This is only used for the purity sigil effect of the default attunement public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit) { + if (mainAttunement != Attunement.Default) + return; + foreach (Projectile proj in Main.projectile) { if (proj.active && proj.type == ProjectileType() && proj.owner == player.whoAmI) diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 75e9be392c..7e6411bb26 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -1830,6 +1830,9 @@ namespace CalamityMod.Projectiles.Melee private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; const float MaxCharge = 500; + public Vector2 lastDisplacement; + public float dashDuration; + public override void SetStaticDefaults() { DisplayName.SetDefault("Their Abhorrence"); @@ -1860,6 +1863,14 @@ namespace CalamityMod.Projectiles.Melee return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center, Owner.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); } + public CurveSegment QuickOut = new CurveSegment(EasingType.PolyIn, 0f, 0f, 0.2f, 3); + public CurveSegment Bump = new CurveSegment(EasingType.SineBump, 0.06f, 0.2f, 0.1f); + public CurveSegment QuickDraw = new CurveSegment(EasingType.Linear, 0.25f, 0.2f, -0.45f); + public CurveSegment SlowDrawOut = new CurveSegment(EasingType.PolyIn, 0.50f, -0.25f, -0.2f, 3); + public CurveSegment OverShoot = new CurveSegment(EasingType.SineBump, 0.93f, -0.45f, -0.1f); + + internal float ChargeDisplacement() => PiecewiseAnimation(Charge / MaxCharge, new CurveSegment[] { QuickOut, Bump, QuickDraw, SlowDrawOut, OverShoot }); + public override void AI() { if (!initialized) //Initialization. Here its litterally just playing a sound tho lmfao @@ -1881,9 +1892,16 @@ namespace CalamityMod.Projectiles.Melee } else { - Main.PlaySound(SoundID.Item120, projectile.Center); + + var dashSound = Main.PlaySound(SoundID.Item120, projectile.Center); + if (dashSound != null) + dashSound.Volume *= 0.5f; State = 1f; - projectile.timeLeft = 40; + projectile.timeLeft = (7 + (int)((Charge / MaxCharge - 0.25f) * 20)) * 2; //Keep that even, if its an odd number itll fuck off and wont reset the players velocity on death + dashDuration = projectile.timeLeft; + lastDisplacement = projectile.Center - Owner.Center; + projectile.netUpdate = true; + projectile.netSpam = 0; } } } @@ -1892,7 +1910,7 @@ namespace CalamityMod.Projectiles.Melee { direction = Owner.DirectionTo(Main.MouseWorld); direction.Normalize(); - projectile.Center = Owner.Center + (direction * 100f * (0.5f - (Charge / MaxCharge))); + projectile.Center = Owner.Center + (direction * 70f * ChargeDisplacement()); Charge++; OverCharge--; @@ -1919,7 +1937,7 @@ namespace CalamityMod.Projectiles.Melee if (State == 1f) { - projectile.Center = Owner.Center + direction * 60f; + projectile.Center = Owner.Center + Vector2.Lerp(lastDisplacement, direction * 40f, MathHelper.Clamp(((dashDuration - projectile.timeLeft) / dashDuration) * 2f, 0f, 1f)); Owner.fallStart = (int)(Owner.position.Y / 16f); if (Owner.HeldItem.modItem is TrueBiomeBlade blade) @@ -1950,7 +1968,7 @@ namespace CalamityMod.Projectiles.Melee projectile.rotation = direction.ToRotation(); //Scaling based on charge - projectile.scale = 1f + (Charge / MaxCharge * 0.2f); + projectile.scale = 1f + (Charge / MaxCharge * 0.3f); Owner.direction = Math.Sign(direction.X); Owner.itemRotation = direction.ToRotation(); @@ -1967,15 +1985,19 @@ namespace CalamityMod.Projectiles.Melee public void SlamDown() { - if (Owner.whoAmI != Main.myPlayer || Owner.velocity.Y == 0f) - return; + var slamSound = Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.Center); + if (slamSound != null) + slamSound.Volume *= 1.5f; - //Only create the central monolith if over half charge - if (Charge / MaxCharge < 0.5f) + if (Owner.whoAmI != Main.myPlayer || Owner.velocity.Y == 0f) return; if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 5) Main.LocalPlayer.Calamity().GeneralScreenShakePower = 5; + + //Only create the central monolith if over half charge + if (Charge / MaxCharge < 0.5f) + return; Projectile.NewProjectile(Owner.Center + (direction * 120 * projectile.scale), -direction, ProjectileType(), projectile.damage * 2, 10f, Owner.whoAmI, Main.rand.Next(4), 1f); //Only create the side monoliths if over 3/4th charge @@ -2078,17 +2100,25 @@ namespace CalamityMod.Projectiles.Melee { blade.strongLunge = false; //Needed for the downwards velocity uncap. } + + projectile.active = false; } public override void SendExtraAI(BinaryWriter writer) { writer.Write(initialized); writer.WriteVector2(direction); + writer.Write(CurrentIndicator); + writer.WriteVector2(lastDisplacement); + writer.Write(dashDuration); } public override void ReceiveExtraAI(BinaryReader reader) { initialized = reader.ReadBoolean(); direction = reader.ReadVector2(); + CurrentIndicator = reader.ReadSingle(); + lastDisplacement = reader.ReadVector2(); + dashDuration = reader.ReadSingle(); } } @@ -2157,6 +2187,16 @@ namespace CalamityMod.Projectiles.Melee SurfaceUp(); projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; projectile.velocity = Vector2.Zero; + + if (Size >= 1) //Big monoliths create sparkles even before sprouting up + { + + for (int i = 0; i < 20; i++) + { + Particle Sparkle = new CritSpark(projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(7.5f, 20f), Color.White, Main.rand.NextBool() ? Color.MediumTurquoise : Color.DarkOrange, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + } } if (projectile.timeLeft == 80) From af1209604be95987aba3136c48be35c7cb661a42 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Thu, 13 Jan 2022 00:42:38 +0100 Subject: [PATCH 37/76] When the wave --- Items/Weapons/Melee/TrueBiomeBlade.cs | 7 +- Particles/FakeDust.png | Bin 0 -> 172 bytes Particles/FakeDustBig.png | Bin 0 -> 193 bytes Particles/FakeDustParticle.cs | 57 ++++ Particles/SeaFoamParticle.cs | 9 +- Particles/WaterGlob.png | Bin 0 -> 420 bytes Particles/WaterGlobParticle.cs | 39 +++ .../Melee/MendedBiomeBladeProjectiles.cs | 249 +++++++++++++++++- .../MendedBiomeBlade_GestureForTheDrowned.png | Bin 0 -> 546 bytes ...dedBiomeBlade_GestureForTheDrownedWave.png | Bin 0 -> 988 bytes 10 files changed, 347 insertions(+), 14 deletions(-) create mode 100644 Particles/FakeDust.png create mode 100644 Particles/FakeDustBig.png create mode 100644 Particles/FakeDustParticle.cs create mode 100644 Particles/WaterGlob.png create mode 100644 Particles/WaterGlobParticle.cs create mode 100644 Projectiles/Melee/MendedBiomeBlade_GestureForTheDrowned.png create mode 100644 Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedWave.png diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 76be014dcb..e4dd69596e 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -131,7 +131,7 @@ namespace CalamityMod.Items.Weapons.Melee case Attunement.Astral: AttunementInfo.name = "Their Abhorrence"; AttunementInfo.function_description = "Hold LMB to charge up a star-piercing sword thrust, and release to unleash the devastating blow"; - AttunementInfo.function_extra = "Striking the ground will create an impact so powerful, massive otherwordly monoliths will rise up from the earth"; + AttunementInfo.function_extra = "Striking the ground after a jump will create an impact so powerful massive otherwordly monoliths will rise up from the earth"; AttunementInfo.color = new Color(91, 73, 196); break; case Attunement.Marine: @@ -354,7 +354,7 @@ namespace CalamityMod.Items.Weapons.Melee item.channel = false; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.Stabbing; - //item.shoot = ProjectileType(); + item.shoot = ProjectileType(); item.shootSpeed = 12f; item.UseSound = null; item.noMelee = true; @@ -397,7 +397,8 @@ namespace CalamityMod.Items.Weapons.Melee n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType() || - n.type == ProjectileType())); + n.type == ProjectileType() || + n.type == ProjectileType())); } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Particles/FakeDust.png b/Particles/FakeDust.png new file mode 100644 index 0000000000000000000000000000000000000000..e18edfa242d2bf6444f2f53292da98eff80df8f6 GIT binary patch literal 172 zcmeAS@N?(olHy`uVBq!ia0vp^Y(Ol;0U|59*B=E^jKx9jP7LeL$-D$|(mY)pLnNm5 zPE_P$P~>50KW*9c(D?6u7h#_M0|F*1x|AQDTGe&;ok{7|FovjXVTEHa807e>u4*bV zESd5w|IpJpj1tK{4FXLU7oLlK-op1iWT^;4)%*E+yPcozHGg;E?)Q-2_CBjvukJBy U`BHM7A7~?kr>mdKI;Vst0OnplVgLXD literal 0 HcmV?d00001 diff --git a/Particles/FakeDustBig.png b/Particles/FakeDustBig.png new file mode 100644 index 0000000000000000000000000000000000000000..114f49f5b0a3d080f9675a35eb44d4b564284656 GIT binary patch literal 193 zcmeAS@N?(olHy`uVBq!ia0vp^96&6=!3HFc-`pbrq!^2X+?^QKos)S9wp4}>-?p&E9BnqpUJ$Vf@AuFh+9kf7*}3$x-TYdZyz7))j3 "CalamityMod/Particles/FakeDust"; + public override bool UseAdditiveBlend => true; + public override bool UseCustomDraw => true; + public override bool SetLifetime => true; + + private float Spin; + private float opacity; + private bool Big; + private bool EmitsLight; + private Vector2 Gravity; + + public FakeGlowDust(Vector2 position, Vector2 velocity, Color color, float scale, int lifeTime, float rotationSpeed = 1f, bool bigSize = false, bool emitsLight = false, Vector2? gravity = null) + { + Position = position; + Velocity = velocity; + Color = color; + Scale = scale; + Lifetime = lifeTime; + Rotation = Main.rand.NextFloat(MathHelper.TwoPi); + Spin = rotationSpeed; + Big = bigSize; + EmitsLight = emitsLight; + Gravity = (Vector2)(gravity == null ? Vector2.Zero : gravity); + Variant = Main.rand.Next(3); + } + + public override void Update() + { + Velocity += Gravity; + opacity = (float)Math.Sin(LifetimeCompletion * MathHelper.Pi); + + if (EmitsLight) + Lighting.AddLight(Position, opacity * Color.R / 255f, opacity * Color.G / 255f, opacity * Color.B / 255f); + + Velocity *= 0.95f; + Rotation += Spin * ((Velocity.X > 0) ? 1f : -1f); + Scale *= 0.98f; + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + Texture2D dustTexture = Big ? ModContent.GetTexture("CalamityMod/Particles/FakeDustBig") : GeneralParticleHandler.GetTexture(Type); + Rectangle frame = new Rectangle(0, (Big ? 8 : 6) * Variant, (Big ? 8 : 6), (Big ? 8 : 6)); + spriteBatch.Draw(dustTexture, Position - Main.screenPosition, frame, Color * opacity, Rotation, frame.Size() / 2f, Scale, SpriteEffects.None, 0); + } + } +} diff --git a/Particles/SeaFoamParticle.cs b/Particles/SeaFoamParticle.cs index b484c97b84..89fb167934 100644 --- a/Particles/SeaFoamParticle.cs +++ b/Particles/SeaFoamParticle.cs @@ -12,10 +12,11 @@ namespace CalamityMod.Particles { public override bool UseAdditiveBlend => true; - private float Opacity; + public float Opacity; private Color ColorStart; private Color ColorFade; private float Spin; + private float BaseScale; public SeaFoamParticle(Vector2 position, Vector2 velocity, Color colorStart, Color colorFade, float scale, float opacity, float rotationSpeed = 1f) { @@ -23,7 +24,7 @@ namespace CalamityMod.Particles { Velocity = velocity; ColorStart = colorStart; ColorFade = colorFade; - Scale = scale; + BaseScale = scale; Opacity = opacity; Rotation = Main.rand.NextFloat(MathHelper.TwoPi); Spin = rotationSpeed; @@ -32,8 +33,10 @@ namespace CalamityMod.Particles { public override void Update() { + Velocity *= 0.85f; Rotation += Spin * ((Velocity.X > 0) ? 1f : -1f); - Opacity--; + Opacity -= 10; + Scale = BaseScale + Opacity / 255f; if (Opacity <= 0) Kill(); Color = Color.Lerp(ColorStart, ColorFade, MathHelper.Clamp((float)((255 -Opacity) - 100) / 80, 0f, 1f)) * (Opacity / 255f); diff --git a/Particles/WaterGlob.png b/Particles/WaterGlob.png new file mode 100644 index 0000000000000000000000000000000000000000..56f3b81a66532b8a75e61cf8fd4417ef4791f322 GIT binary patch literal 420 zcmV;V0bBlwP)Px$UP(kjR5*?8)v;;fFz2< zfTYSIK|!!*w{+Iz-tz)LF`tZf^8A(n$b?jb__32n)eNd@jZXAolewx)0OSBx(QrKN z)lC}@tu$_R&2F(c5R_4b--5qO1kB?XutQENV()$Itii3v z9>2Foy<5AgTmXJHpNv-Zf)oI9wx%c#n=I17(^Q "CalamityMod/Particles/WaterGlob"; + + public override bool SetLifetime => true; + + public override bool Important => true; + + private float Spin; + + public WaterGlobParticle(Vector2 position, Vector2 velocity, float scale, float rotationSpeed = 0f, int lifeTime = 50) + { + Position = position; + Velocity = velocity; + Color = Color.White * 0.5f; + Scale = scale; + Rotation = Main.rand.NextFloat(MathHelper.TwoPi); + Spin = rotationSpeed; + Lifetime = lifeTime; + } + + public override void Update() + { + + Color *= 0.985f; + Rotation += Spin * ((Velocity.X > 0) ? 1f : -1f); + Velocity *= 0.85f; + Scale *= 0.975f; + + } + } +} \ No newline at end of file diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 7e6411bb26..28d3a2a964 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -15,7 +15,7 @@ using Terraria.ID; using Terraria.ModLoader; using static Terraria.ModLoader.ModContent; using static CalamityMod.CalamityUtils; - +using Terraria.Audio; namespace CalamityMod.Projectiles.Melee { @@ -1929,7 +1929,7 @@ namespace CalamityMod.Projectiles.Melee if (Owner.whoAmI == Main.myPlayer && CurrentIndicator < 4f) { OverCharge = 20f; - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/CorvinaScream"), projectile.Center); + Main.PlaySound(mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/CorvinaScream"), projectile.Center); CurrentIndicator++; } } @@ -2004,7 +2004,7 @@ namespace CalamityMod.Projectiles.Melee if (Charge / MaxCharge < 0.75f) return; - if (SideSprouts(1, 150f, 0.8f) && Charge >= MaxCharge ) + if (SideSprouts(1, 150f, 0.8f) && Charge >= MaxCharge) SideSprouts(1, 250f, 0.5f); if (SideSprouts(-1, 150f, 0.8f) && Charge >= MaxCharge) @@ -2142,9 +2142,9 @@ namespace CalamityMod.Projectiles.Melee public CurveSegment Anticipate = new CurveSegment(EasingType.CircIn, 0f, 0f, 0.15f); public CurveSegment Overextend = new CurveSegment(EasingType.SineOut, 0.2f, 0.15f, 1f); - public CurveSegment Unextend = new CurveSegment(EasingType.CircIn, 0.25f , 1.15f, -0.15f); + public CurveSegment Unextend = new CurveSegment(EasingType.CircIn, 0.25f, 1.15f, -0.15f); public CurveSegment Hold = new CurveSegment(EasingType.ExpOut, 0.70f, 1f, -0.1f); - internal float Height() => PiecewiseAnimation(Timer, new CurveSegment[] { Anticipate, Overextend, Unextend, Hold}) * BaseHeight * Size; + internal float Height() => PiecewiseAnimation(Timer, new CurveSegment[] { Anticipate, Overextend, Unextend, Hold }) * BaseHeight * Size; public override void SetStaticDefaults() { @@ -2208,7 +2208,7 @@ namespace CalamityMod.Projectiles.Melee { Vector2 hitPositionDisplace = particleDirection.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(0f, 10f); Vector2 flyDirection = particleDirection.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver2, MathHelper.PiOver2)) * Main.rand.NextFloat(5f, 15f); - Particle smoke = new SmallSmokeParticle(projectile.Center + hitPositionDisplace, flyDirection , Color.Lerp(Color.DarkOrange, Color.MediumTurquoise, Main.rand.NextFloat()), new Color(130, 130, 130), Main.rand.NextFloat(2.8f, 3.6f) * Size, 165 - Main.rand.Next(30), 0.1f); + Particle smoke = new SmallSmokeParticle(projectile.Center + hitPositionDisplace, flyDirection, Color.Lerp(Color.DarkOrange, Color.MediumTurquoise, Main.rand.NextFloat()), new Color(130, 130, 130), Main.rand.NextFloat(2.8f, 3.6f) * Size, 165 - Main.rand.Next(30), 0.1f); GeneralParticleHandler.SpawnParticle(smoke); } for (int i = 0; i < 6; i++) @@ -2249,9 +2249,9 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawScale = new Vector2(Width() / BaseWidth, Height() / BaseHeight); Vector2 drawPosition = projectile.Center - Main.screenPosition - (projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * 26f; - Vector2 drawOrigin = new Vector2(frame.Width/2f, frame.Height); + Vector2 drawOrigin = new Vector2(frame.Width / 2f, frame.Height); - float opacity = MathHelper.Clamp(1f - ((Timer - 0.85f )/ 0.15f), 0f, 1f); + float opacity = MathHelper.Clamp(1f - ((Timer - 0.85f) / 0.15f), 0f, 1f); spriteBatch.Draw(tex, drawPosition, frame, lightColor * opacity, drawAngle, drawOrigin, drawScale, 0f, 0f); @@ -2287,6 +2287,239 @@ namespace CalamityMod.Projectiles.Melee } } + + public class GestureForTheDrowned : ModProjectile + { + public override string Texture => "CalamityMod/Items/Weapons/Melee/TrueBiomeBlade"; + Vector2 direction = Vector2.Zero; + public Player Owner => Main.player[projectile.owner]; + public float Timer => 40 - projectile.timeLeft; + public float HalfTimer => (Timer % 20); + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Biome Blade"); //This is litterally just the biome blade without even any extra magic effects so + } + + public override void SetDefaults() + { + projectile.width = projectile.height = 32; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.timeLeft = 40; + projectile.melee = true; + projectile.tileCollide = false; + } + + public override bool CanDamage() => false; + + public override void AI() + { + if (Math.Abs(HalfTimer / 20f) == 0.5f) //Why is this only playing on the first swing + { + var splash = new LegacySoundStyle(SoundID.Splash, 0).WithPitchVariance(Main.rand.NextFloat()); + Main.PlaySound(splash, projectile.Center); + + Projectile.NewProjectile(Owner.Center, direction * 0.1f + Owner.velocity , ProjectileType(), projectile.damage, 0, Owner.whoAmI); + + Particle Sparkle = new CritSpark(projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(7.5f, 20f), Color.White, Main.rand.NextBool() ? Color.MediumTurquoise : Color.DarkOrange, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); + GeneralParticleHandler.SpawnParticle(Sparkle); + + } + + + direction = Vector2.UnitY.RotatedBy((MathHelper.PiOver4 + Utils.AngleLerp(0f, MathHelper.PiOver4 * 1.5f, HalfTimer / 20f)) * Math.Sign(Timer-1 - 20f)) * (float)Math.Sin(HalfTimer / 20f * MathHelper.Pi) * 30; + Owner.direction = Math.Sign(direction.X); + Owner.itemRotation = direction.ToRotation(); + if (Owner.direction != 1) + { + Owner.itemRotation -= 3.14f; + } + + projectile.Center = Owner.Center + direction; + projectile.rotation = direction.ToRotation() + MathHelper.PiOver2; + projectile.spriteDirection = Math.Sign(Timer - 20f); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D blade = GetTexture("CalamityMod/Items/Weapons/Melee/TrueBiomeBlade"); + + float drawAngle = direction.ToRotation(); + float drawRotation = drawAngle + MathHelper.PiOver4; + Vector2 drawOrigin = new Vector2(0f, blade.Height); + Vector2 drawOffset = projectile.Center - Main.screenPosition; + + spriteBatch.Draw(blade, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + return false; + } + + } + + public class GestureForTheDrownedOrb : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrowned"; + Vector2 direction = Vector2.Zero; + public Player Owner => Main.player[projectile.owner]; + public ref float HasLanded => ref projectile.ai[0]; //Charge + public float Timer => MaxTime - projectile.timeLeft; + public const float MaxTime = 200f; + public Particle[] FoamParticles = new Particle[5]; + + public bool BounceX => projectile.oldPosition.X == projectile.position.X; + + + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Gesture for the Drowned"); + + ProjectileID.Sets.TrailCacheLength[projectile.type] = 5; + ProjectileID.Sets.TrailingMode[projectile.type] = 2; + + Main.projFrames[projectile.type] = 3; + } + + public override void SetDefaults() + { + projectile.width = projectile.height = 26; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.timeLeft = (int)MaxTime; + projectile.melee = true; + projectile.alpha = 90; + projectile.ignoreWater = true; + projectile.hide = true; + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + HasLanded = 1f; + projectile.velocity.Y = -4f; + return false; + } + + public override void DrawBehind(int index, List drawCacheProjsBehindNPCsAndTiles, List drawCacheProjsBehindNPCs, List drawCacheProjsBehindProjectiles, List drawCacheProjsOverWiresUI) + { + drawCacheProjsBehindNPCsAndTiles.Add(index); + } + + public override void AI() + { + + if (FoamParticles[0] == null) + { + for (int i = 0; i < 5; i++) + { + Vector2 rot = projectile.velocity.RotatedByRandom(MathHelper.Pi).RotatedBy(-MathHelper.PiOver2); + Particle foam = new SeaFoamParticle(projectile.Center + rot, projectile.velocity, Color.LightSlateGray, Color.CornflowerBlue, Main.rand.NextFloat(0f, 0.5f), 150f, 0.1f); + GeneralParticleHandler.SpawnParticle(foam); + FoamParticles[i] = foam; + } + } + + if (projectile.timeLeft % 2 == 0) + { + int index = (projectile.timeLeft / 2) % 5; + Particle foam = FoamParticles[index]; + Vector2 rotation = (Vector2.UnitX).RotatedByRandom(MathHelper.PiOver2).RotatedBy(-MathHelper.PiOver4) * 16f; + rotation.X *= Math.Sign(projectile.velocity.X); + foam.Position = projectile.Center + rotation; + foam.Velocity = (-Vector2.UnitY * 5f).RotatedBy(MathHelper.PiOver4 * Math.Sign(projectile.velocity.X)) + new Vector2(projectile.velocity.X * -0.6f, 0f); + //foam.Velocity = Vector2.Zero; + (foam as SeaFoamParticle).Opacity = 150; + } + + projectile.rotation += 0.1f * ((projectile.velocity.X > 0) ? 1f : -1f); + + if (Main.rand.NextBool()) + { + Particle blob = new WaterGlobParticle(projectile.Center + Main.rand.NextVector2Circular(projectile.width / 2f, projectile.height / 2f), projectile.velocity / 2f, Main.rand.NextFloat(0.2f, 2f), 0.1f); + GeneralParticleHandler.SpawnParticle(blob); + } + Particle foamSmall = new FakeGlowDust(projectile.Center + Main.rand.NextVector2Circular(projectile.width / 2f, projectile.height / 2f), projectile.velocity / 2f, Color.LightSlateGray, Main.rand.NextFloat(0.2f, 2f), 25, 0.1f, gravity: (-projectile.velocity + Vector2.UnitY) * 0.1f); + GeneralParticleHandler.SpawnParticle(foamSmall); + + + if (projectile.velocity.Y < 15f) + { + projectile.velocity.Y += 0.3f; + } + + if (Math.Abs(projectile.velocity.X) < 5f) + { + projectile.velocity.X += 0.3f * ((projectile.velocity.X > 0) ? 1f : -1f); + } + + if (BounceX) + { + //Die lmao + projectile.Kill(); + } + + projectile.frameCounter++; + if (projectile.frameCounter % 10 == 0) + projectile.frame = (projectile.frame + 1) % 3; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + bool balled = (HasLanded == 0f); + float? lowestGroundBelow = null; + + if (!balled) + { + for (int i = 0; i < 5; i++) + { + Vector2 positionToCheck = projectile.Center; + if (Main.tile[(int)(positionToCheck.X / 16), (int)(positionToCheck.Y / 16) + 1 * i].IsTileSolidGround() && lowestGroundBelow == null) + { + lowestGroundBelow = i * 16; + break; + } + } + if (lowestGroundBelow == null) + { + balled = true; + HasLanded = 0f; + } + } + + if(!balled) + { + Texture2D wave = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedWave"); + Rectangle frame = new Rectangle(0, 0 + 110 * projectile.frame, 40, 110); + + float drawRotation = 0f; + Vector2 drawOrigin = new Vector2(0f, frame.Height); + + + Vector2 drawOffset = projectile.Center + Vector2.UnitY * (float)lowestGroundBelow - Main.screenPosition; + + //Wobble + Vector2 Scale = new Vector2(0.5f + 0.5f * (float)Math.Sin(Timer * 0.1), 0.5f + 0.5f * (1 - (float)Math.Sin(Timer * 0.1))); + + SpriteEffects flip = projectile.velocity.X < 0 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + + spriteBatch.Draw(wave, drawOffset, frame, lightColor, drawRotation, drawOrigin, Scale, flip, 0f); + return false; + } + + else + { + Texture2D ball = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrowned"); + float drawRotation = projectile.rotation; + Vector2 drawOrigin = projectile.Size / 2f; + Vector2 drawOffset = projectile.Center - Main.screenPosition; + + spriteBatch.Draw(ball, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + return false; + } + + } + + } } diff --git a/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrowned.png b/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrowned.png new file mode 100644 index 0000000000000000000000000000000000000000..0454d6961e3de6d93b969c521ea77c7fd6441c7b GIT binary patch literal 546 zcmV+-0^R+IP)Px$+(|@1R7i=<);~y#mUEt$a~{t3{hf236G?UT z&LdDh*#}Pa9s%`2DYgq0TB{L!S*wH9Uu)p`-D{v_H%b15qCj${uLR~6R${m?G73gd z{oGZe=}!m2{Q44T+gFHSyJz zhLgB|CTZu_mtq*~X^qH}D0Di9&Z7BW7Z<-}CQPR7xho^!;o#wH#=#*lHT?>Ft`(6d zQFSr#rg*FynQ)N~SmommFm!(CgB&#xX` zfABQv^>oBEpQpy%7tU3q#x`o1xYAkxM}OCHzP+pU4N!ga0n86&S6JDGAdm*aKoGQ= z=BuXlF4x-|9O!J1(v`$eN$XQkqX$Y!oe{`WqCgVzh5Y&Ly3h%)q40(X3iWCy9q%ng kuoAU|dEn)f`^b^#4?ww{E3J-RHvj+t07*qoM6N<$f}Yd?AOHXW literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedWave.png b/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedWave.png new file mode 100644 index 0000000000000000000000000000000000000000..7b27acc5bb14bd729d91e03973b0bee4dbdfb325 GIT binary patch literal 988 zcmeAS@N?(olHy`uVBq!ia0vp^8Vn4KUL0&dR{mDm4j{!?9OUlAu_G;9C<-23}a{8#0xPw%~ApKtn|?>n3S-fry}({hvQw(91qX&+j4 zs^6Pw{LH-K>YdPMrV$D2UUV4FcPxE&Ze3imU9)6p_-nz>5_e|q-R$xF_Yb!0xtidxMEafkOGe3Ko%`g%eBga$2^5XA+jY%Oj7NxtJ13TTB0a508*tZ;G= zWm+Ww5<1IVS5xO*?-+6GfpX}MXK}X@M3JQ3UM`;{z?Q%A;J!&bFN1wKn%5~ln6`Sg zWV56zkZ_+f*Olj8L8jPU={;NTiGP2!^)q|ock%!A;xkX)`)+XL-om$P4=xs7^gW>b zE$xDYQFq(f6q)8@2d?JWq!#6W2t9BuyxQGn?&`bJHYQIJLYGfbk~Xorv$F2X?43(Z znjJ;A`XnG2*dnYaW z4{}}C*y1L6>FV98wSkMj%O5wN5olH2z0K|FyuC}K7iYYwbUl4+p4JiL84r{0Z>(-+ z3CX31qx0?=v}B>;`Dr?SN}ZL zP64*v2Bp{CvtRs@;9}hFbNB1RO*@b8Jt(NlSp1hicb8pA8+%Q8jEvj|S!L#Vvs}Nk z*_wpdFo zg;M@YUO$#Mou&2Smj$b@DEpKzIu}AFUS6E;sI=~2*L8(%v(S`~nR`oTY3+F%0!%80 zkNV98rjxVt1dk`Ut-Tq&CVipk zlbk9y*Zs>`p4NuwW$$KZo}E)`e3)t8+@k?()o(NBug*_%d493~x}WBUb4Mn!)u(u9 zK6rOyZ^K?`t+;hrK)-KY>a*#1ZHck#tYzs3y^H&+o73MtH9x)A*Di=F;e-Ac7wOB4 TYU{dz*_FZ5)z4*}Q$iB}SUbn4 literal 0 HcmV?d00001 From e8483c70d24c1402d449428bf87f3059bb28c6a1 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Thu, 13 Jan 2022 21:25:06 +0100 Subject: [PATCH 38/76] When the (every bone in my body is broken) --- Items/Weapons/Melee/TrueBiomeBlade.cs | 2 +- Particles/WaterGlob.png | Bin 420 -> 216 bytes .../Melee/MendedBiomeBladeProjectiles.cs | 215 +++++++++++++----- ...iomeBlade_GestureForTheDrownedAquaWave.png | Bin 0 -> 1160 bytes ...dedBiomeBlade_GestureForTheDrownedWave.png | Bin 988 -> 3842 bytes 5 files changed, 160 insertions(+), 57 deletions(-) create mode 100644 Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedAquaWave.png diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index e4dd69596e..584f4db806 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -137,7 +137,7 @@ namespace CalamityMod.Items.Weapons.Melee case Attunement.Marine: AttunementInfo.name = "Gesture for the Drowned"; AttunementInfo.function_description = "Shoot out two water balls at your sides. On ground contact the water balls will turn into small waves that ride along the ground"; - AttunementInfo.function_extra = "If used while submerged, or if the waves contact water, the waves will expand and move much faster"; + AttunementInfo.function_extra = "If used while submerged, or if the waves contact water, the waves will turn into bigger and faster ones"; AttunementInfo.color = new Color(98, 225, 255); break; default: diff --git a/Particles/WaterGlob.png b/Particles/WaterGlob.png index 56f3b81a66532b8a75e61cf8fd4417ef4791f322..73ba7bee0cf413d8fa8541b4e1bb9fb3ae61c365 100644 GIT binary patch delta 176 zcmV;h08js<1K0tOFn<7&Nkl3vvCn<6O%q-fvc+_Cp8%(G`AqBw9qM3_npQT|E|Ni|Y*(tz(|Ndf>a5O76>08hv e19Gb-ngIY;_B%KB^4mrL0000 delta 381 zcmV-@0fPS60i*+vFngebT6m)awaAUiOf;ML^`KN=PIGR%E;s;q0_~qNa2v-@7r#%1}fD~a_0?6l+ z(W<_P&fpV(B#OjeL9l1Hbk^kF^8!FIpNw|${FVU7gnv|n__32n)eNd@jZXAo zlewx)0OSBx(QrKN)lC}@tu$_R&2F(c5R_4b--5qO1kB?Xut(), projectile.damage, 0, Owner.whoAmI); - Particle Sparkle = new CritSpark(projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(7.5f, 20f), Color.White, Main.rand.NextBool() ? Color.MediumTurquoise : Color.DarkOrange, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); + Projectile proj = Projectile.NewProjectileDirect(Owner.Center, direction * 0.1f + Owner.velocity , ProjectileType(), projectile.damage, 0, Owner.whoAmI); + + + Particle Sparkle = new CritSpark(projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(7.5f, 20f), Color.White, Main.rand.NextBool() ? Color.CornflowerBlue : Color.DodgerBlue, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); GeneralParticleHandler.SpawnParticle(Sparkle); } @@ -2361,14 +2363,17 @@ namespace CalamityMod.Projectiles.Melee public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrowned"; Vector2 direction = Vector2.Zero; public Player Owner => Main.player[projectile.owner]; - public ref float HasLanded => ref projectile.ai[0]; //Charge + public ref float HasLanded => ref projectile.ai[0]; //Is the orb in the air or is it on the ground? + public ref float TimeSinceLanding => ref projectile.ai[1]; //How long has it been on the ground for public float Timer => MaxTime - projectile.timeLeft; - public const float MaxTime = 200f; - public Particle[] FoamParticles = new Particle[5]; - + public const float MaxTime = 160f; + public float groundOffset; public bool BounceX => projectile.oldPosition.X == projectile.position.X; + public bool WaterMode = false; + public float scaleX => 1 + 0.2f * (1f + -(float)Math.Sin((TimeSinceLanding - 10f) * 0.1f)) * 0.5f; + public float scaleY => (1 + 0.4f * (1f + (float)Math.Sin((TimeSinceLanding - 10f) * 0.1f)) * 0.5f) * MathHelper.Clamp((TimeSinceLanding - 10) / 30f, 0f, 1f) * MathHelper.Clamp(projectile.timeLeft / 30f, 0f, 1f); public override void SetStaticDefaults() { @@ -2376,7 +2381,6 @@ namespace CalamityMod.Projectiles.Melee ProjectileID.Sets.TrailCacheLength[projectile.type] = 5; ProjectileID.Sets.TrailingMode[projectile.type] = 2; - Main.projFrames[projectile.type] = 3; } @@ -2394,11 +2398,27 @@ namespace CalamityMod.Projectiles.Melee public override bool OnTileCollide(Vector2 oldVelocity) { + if (WaterMode) + { + return true; + } HasLanded = 1f; projectile.velocity.Y = -4f; return false; } + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (TimeSinceLanding < 10 && !WaterMode) + return base.Colliding(projHitbox, targetHitbox); + float collisionPoint = 0f; + if (!WaterMode) + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Bottom, projectile.Bottom - (Vector2.UnitY * scaleY * 110), scaleX * 40, ref collisionPoint); + + float halfLenght = 66f * projectile.scale; + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center + Vector2.Normalize(projectile.velocity.RotatedBy(MathHelper.PiOver2)) * halfLenght, projectile.Center - Vector2.Normalize(projectile.velocity.RotatedBy(MathHelper.PiOver2)) * halfLenght, 40f, ref collisionPoint); + } + public override void DrawBehind(int index, List drawCacheProjsBehindNPCsAndTiles, List drawCacheProjsBehindNPCs, List drawCacheProjsBehindProjectiles, List drawCacheProjsOverWiresUI) { drawCacheProjsBehindNPCsAndTiles.Add(index); @@ -2406,50 +2426,113 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - - if (FoamParticles[0] == null) + if (Collision.WetCollision(projectile.position, projectile.width, projectile.height)) { - for (int i = 0; i < 5; i++) + WaterMode = true; + projectile.velocity.Y *= 0.33f; + } + else if (WaterMode) + { + projectile.Kill(); + } + + if (WaterMode) + { + projectile.velocity *= 1.02f; + projectile.scale *= 1.01f; + projectile.timeLeft--; + + for (int i = 0; i <= 4; i++) { - Vector2 rot = projectile.velocity.RotatedByRandom(MathHelper.Pi).RotatedBy(-MathHelper.PiOver2); - Particle foam = new SeaFoamParticle(projectile.Center + rot, projectile.velocity, Color.LightSlateGray, Color.CornflowerBlue, Main.rand.NextFloat(0f, 0.5f), 150f, 0.1f); - GeneralParticleHandler.SpawnParticle(foam); - FoamParticles[i] = foam; + Dust waterTrail = Main.dust[Dust.NewDust(projectile.Center + Main.rand.NextVector2Circular(10f, 10f), 23, 0, DustID.Water, -3.7f * Math.Sign(projectile.velocity.X), -6f, 0, new Color(255, 255, 255), Main.rand.NextFloat(1f, 3f))]; + waterTrail.fadeIn = 3f; + } + + Dust foamDust = Main.dust[Dust.NewDust(projectile.Center + Main.rand.NextVector2Circular(10f, 10f), 9, 0, 16, 2.7f * Math.Sign(projectile.velocity.X), -3f, 0, new Color(255, 255, 255), 1.4f)]; + foamDust.noGravity = true; + + return; + } + + if (HasLanded == 1f) + { + TimeSinceLanding++; + + groundOffset = -1; + //Check 7 tiles under the projectile for solid ground + for (float i = 0; i < 7; i += 0.5f) + { + Vector2 positionToCheck = projectile.position; + if (Main.tile[(int)(positionToCheck.X / 16), (int)((positionToCheck.Y / 16) + 1 * i)].IsTileSolidGround() && groundOffset == -1) + { + groundOffset = i * 16; + break; + } + } + //If no ground has been found, go back to the airborne state + if (groundOffset == -1) + { + HasLanded = 0f; + TimeSinceLanding = 0f; + } + + if (TimeSinceLanding > 10) + { + //Trailing water!! Dust spam!!! + Dust waterTrail = Main.dust[Dust.NewDust(projectile.Top + Vector2.UnitY * groundOffset, 23, 0, DustID.Water, -3.7f * Math.Sign(projectile.velocity.X), -6f, 0, new Color(255, 255, 255), Main.rand.NextFloat(1f, 3f))]; + waterTrail.fadeIn = 3f; + waterTrail = Main.dust[Dust.NewDust(projectile.TopRight + Vector2.UnitY * groundOffset + Main.rand.NextVector2Circular(16f, 16f) + Vector2.UnitX * projectile.velocity.X * 4f, 23, 0, DustID.Water, -3.7f * Math.Sign(projectile.velocity.X), -6f, 0, new Color(255, 255, 255), Main.rand.NextFloat(1f, 3f))]; + waterTrail.fadeIn = 3f; + waterTrail = Main.dust[Dust.NewDust(projectile.TopLeft + Vector2.UnitY * groundOffset + Main.rand.NextVector2Circular(16f, 16f) + Vector2.UnitX * projectile.velocity.X * 4f, 23, 0, DustID.Water, -3.7f * Math.Sign(projectile.velocity.X), -6f, 0, new Color(255, 255, 255), Main.rand.NextFloat(1f, 3f))]; + waterTrail.fadeIn = 3f; + + + Dust foamDust = Main.dust[Dust.NewDust(projectile.Top + Vector2.UnitY * groundOffset + Vector2.UnitX * 16 * Math.Sign(projectile.velocity.X), 9, 0, 16, 2.7f * Math.Sign(projectile.velocity.X), -3f, 0, new Color(255, 255, 255), 1.4f)]; + foamDust.noGravity = true; + + //Foam + float height = scaleY * 100f; + Vector2 origin = projectile.Top + Vector2.UnitY * groundOffset + Main.rand.NextVector2Circular(projectile.width / 4f, projectile.height / 4f) - (Vector2.UnitY * height); + Particle foamSmall = new FakeGlowDust(origin, projectile.velocity / 2f, Color.LightSlateGray, Main.rand.NextFloat(1f, 2f), 25, 0.1f, bigSize : true ,gravity: (-projectile.velocity + Vector2.UnitY) * 0.1f); + GeneralParticleHandler.SpawnParticle(foamSmall); + + if (Main.rand.Next(5) == 0) + { + Particle foamLarge = new MediumMistParticle(origin, projectile.velocity / 2f, Color.LightSlateGray, Color.LightBlue, Main.rand.NextFloat(1f, 2f), 245 - Main.rand.Next(50), 0.1f); + GeneralParticleHandler.SpawnParticle(foamLarge); + } } } - if (projectile.timeLeft % 2 == 0) + else { - int index = (projectile.timeLeft / 2) % 5; - Particle foam = FoamParticles[index]; - Vector2 rotation = (Vector2.UnitX).RotatedByRandom(MathHelper.PiOver2).RotatedBy(-MathHelper.PiOver4) * 16f; - rotation.X *= Math.Sign(projectile.velocity.X); - foam.Position = projectile.Center + rotation; - foam.Velocity = (-Vector2.UnitY * 5f).RotatedBy(MathHelper.PiOver4 * Math.Sign(projectile.velocity.X)) + new Vector2(projectile.velocity.X * -0.6f, 0f); - //foam.Velocity = Vector2.Zero; - (foam as SeaFoamParticle).Opacity = 150; + Particle foamSmall = new FakeGlowDust(projectile.Center + Main.rand.NextVector2Circular(projectile.width / 2f, projectile.height / 2f), projectile.velocity / 2f, Color.LightSlateGray, Main.rand.NextFloat(0.2f, 2f), 25, 0.1f, gravity: (-projectile.velocity + Vector2.UnitY) * 0.1f); + GeneralParticleHandler.SpawnParticle(foamSmall); + + if (Main.rand.NextBool()) + { + Particle blob = new WaterGlobParticle(projectile.Center + Main.rand.NextVector2Circular(projectile.width / 2f, projectile.height / 2f), projectile.velocity / 2f, Main.rand.NextFloat(0.2f, 2f), 0.1f); + GeneralParticleHandler.SpawnParticle(blob); + } + } projectile.rotation += 0.1f * ((projectile.velocity.X > 0) ? 1f : -1f); - if (Main.rand.NextBool()) - { - Particle blob = new WaterGlobParticle(projectile.Center + Main.rand.NextVector2Circular(projectile.width / 2f, projectile.height / 2f), projectile.velocity / 2f, Main.rand.NextFloat(0.2f, 2f), 0.1f); - GeneralParticleHandler.SpawnParticle(blob); - } - Particle foamSmall = new FakeGlowDust(projectile.Center + Main.rand.NextVector2Circular(projectile.width / 2f, projectile.height / 2f), projectile.velocity / 2f, Color.LightSlateGray, Main.rand.NextFloat(0.2f, 2f), 25, 0.1f, gravity: (-projectile.velocity + Vector2.UnitY) * 0.1f); - GeneralParticleHandler.SpawnParticle(foamSmall); - if (projectile.velocity.Y < 15f) { projectile.velocity.Y += 0.3f; } - if (Math.Abs(projectile.velocity.X) < 5f) + if (Math.Abs(projectile.velocity.X) < 8) { projectile.velocity.X += 0.3f * ((projectile.velocity.X > 0) ? 1f : -1f); } + else + { + projectile.velocity.X = Math.Sign(projectile.velocity.X) * 8; + } if (BounceX) { @@ -2458,34 +2541,41 @@ namespace CalamityMod.Projectiles.Melee } projectile.frameCounter++; - if (projectile.frameCounter % 10 == 0) + if (projectile.frameCounter % 6 == 0) projectile.frame = (projectile.frame + 1) % 3; } + public override void Kill(int timeLeft) + { + var splash = new LegacySoundStyle(SoundID.Splash, 0).WithPitchVariance(Main.rand.NextFloat()); + Main.PlaySound(splash, projectile.Center); + + for (int i = 0; i < 4; i++) + { + Particle foamLarge = new MediumMistParticle(projectile.Center + Main.rand.NextVector2Circular(projectile.width, projectile.height), projectile.oldVelocity / 2f, Color.LightSlateGray, Color.LightBlue, Main.rand.NextFloat(1f, 2f), 245 - Main.rand.Next(50), 0.1f); + GeneralParticleHandler.SpawnParticle(foamLarge); + } + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - bool balled = (HasLanded == 0f); - float? lowestGroundBelow = null; + if (BounceX) + return false; - if (!balled) + if (WaterMode) { - for (int i = 0; i < 5; i++) - { - Vector2 positionToCheck = projectile.Center; - if (Main.tile[(int)(positionToCheck.X / 16), (int)(positionToCheck.Y / 16) + 1 * i].IsTileSolidGround() && lowestGroundBelow == null) - { - lowestGroundBelow = i * 16; - break; - } - } - if (lowestGroundBelow == null) - { - balled = true; - HasLanded = 0f; - } + Texture2D wave = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedAquaWave"); + float drawRotation = projectile.velocity.ToRotation() + MathHelper.Pi ; + Vector2 drawOrigin = new Vector2(wave.Width/2f, wave.Height / 2f); + Vector2 drawOffset = projectile.Center - Main.screenPosition; + + spriteBatch.Draw(wave, drawOffset - projectile.velocity, null, Color.Lerp(lightColor, Color.White, 0.5f) * 0.2f, drawRotation, drawOrigin, projectile.scale - 0.2f, 0f, 0f); + spriteBatch.Draw(wave, drawOffset, null, Color.Lerp(lightColor, Color.White, 0.5f) * 0.5f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + return false; } - if(!balled) + + if (HasLanded == 1f && TimeSinceLanding > 10f) { Texture2D wave = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedWave"); Rectangle frame = new Rectangle(0, 0 + 110 * projectile.frame, 40, 110); @@ -2494,14 +2584,27 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawOrigin = new Vector2(0f, frame.Height); - Vector2 drawOffset = projectile.Center + Vector2.UnitY * (float)lowestGroundBelow - Main.screenPosition; + Vector2 drawOffset; //Wobble - Vector2 Scale = new Vector2(0.5f + 0.5f * (float)Math.Sin(Timer * 0.1), 0.5f + 0.5f * (1 - (float)Math.Sin(Timer * 0.1))); + Vector2 Scale; - SpriteEffects flip = projectile.velocity.X < 0 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + SpriteEffects flip = projectile.velocity.X > 0 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + + for (int i = 2; i >= 0; i--) + { + drawOffset = projectile.position + Vector2.UnitY * groundOffset + Vector2.UnitY / 2f - Main.screenPosition; + drawOffset -= Vector2.UnitX * 10f * i * Math.Sign(projectile.velocity.X); + float ScaleYAlter = (1 + 0.4f * (1f + (float)Math.Sin((TimeSinceLanding - 10f) * 0.1f + 0.2 * i)) * 0.5f) * MathHelper.Clamp((TimeSinceLanding - 10) / 30f, 0f, 1f) * MathHelper.Clamp(projectile.timeLeft / 30f, 0f, 1f); + Scale = new Vector2(scaleX, ScaleYAlter - 0.05f * i); + float slightfade = 1f - 0.24f * i; + Color darkenedColor = Color.Lerp(lightColor, Color.Black, i * 0.15f); + + spriteBatch.Draw(wave, drawOffset, frame, darkenedColor * MathHelper.Clamp(TimeSinceLanding / 30f, 0f, 1f) * slightfade, drawRotation, drawOrigin, Scale, flip, 0f); + } + + - spriteBatch.Draw(wave, drawOffset, frame, lightColor, drawRotation, drawOrigin, Scale, flip, 0f); return false; } @@ -2512,7 +2615,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 drawOrigin = projectile.Size / 2f; Vector2 drawOffset = projectile.Center - Main.screenPosition; - spriteBatch.Draw(ball, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + spriteBatch.Draw(ball, drawOffset, null, lightColor * MathHelper.Clamp(1 - TimeSinceLanding / 10f, 0f, 1f), drawRotation, drawOrigin, projectile.scale, 0f, 0f); return false; } diff --git a/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedAquaWave.png b/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedAquaWave.png new file mode 100644 index 0000000000000000000000000000000000000000..30a5b3e99ecf1f834b4e8b8c9fa557bd0eec1b9b GIT binary patch literal 1160 zcmV;31b6$1P)Px(LP~M#n|MNCX#3lz@Lg5V8{&LN+pkgFj-x zg)q!&Rx>+6#)Z1l>;j@oH$sz0T2K;i0dK9?ZA|y%Vw{@A>2G>YbyfOyDs@WpLLfV*KUIpSv+(Jz?uTPiH01*;*xBJ4(zz_hXN>L;Ak?(&sJ~bZyWgdW@ z#CrffuV=N%6qI7At;qfw3+Yg18GvF*k)D{y18_fgM0>0O;-0`_@#NMbQ(BdU@_bt#3uSx@B@_vWM8K>qY%%pEHEE z6dkclstwen>g72AQ`Jdz`{{K6o*3$1QS>$LT284nk52hMF{rk!_OB>S(U5CiPvLP8A*Tp<#72S}0Vs2fPzYBzqoj{yf!@adgBBg^CMs`P|lL2C~Od zURyC@Y)`61drJN@I@OmpVjLOqw`bh_anwJ}Z{M7(epk?b-=9nvF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$fPIs+~KYCryod)>F!J%`AO~xy7FRw7ch& z58he2bN=-Nx69AEe)4>~chaK&AlG$`EpC#RuHLO$8@Twp{BiRcfmYSs+uW|s+q*P+ zamJfU*VD)5X&o`1@vuJW{>JKNmXOSA?sKQTzMED0Cwh6g_Ti%+&x1p5i`&WzQcGc> za7_aiSfCJv1RyAYE>tdYdOp#se;#Y60NZYZ((CToFMdgIF>d#{`}N_boyYec6x3xb z{>z`c%Pypiy{0@yM(%^GGV{DyuHWm~Y)wLawrwvidEX;gUT+vHFTU`#^U>n#$5nhq z7yBMF&oJ2${5jRT%dr38>I+{3xnkv)LMi_xuOG{s&eD4E%YxNclzqw$*a>S!hbg%)OlfF>&^7ncjVB}9@ z5RGCALB#evR_y)+rxTWtg}Sb-+e9Er_DN2ao9q7NEKh4g^s;xeGtbVcH9pKVZ|>0m zw(7T;^H=Amxjetvf89^>!?`09+3Hg~G#|XXvA1Ebv{u}@tnX~L##@*AY&u?BV(dC= tS^7cm;{NL9^mk9qPw(}$3*t)np#Q~1`ZA;1x^4y_@O1TaS?83{1OTLT#Gn8G From f235b489de875b9678b75f45fdb08af631f6df6d Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Thu, 13 Jan 2022 22:01:23 +0100 Subject: [PATCH 39/76] Aggressively throwing glitter into people's eyes --- Projectiles/Melee/MendedBiomeBladeProjectiles.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 39d115eaf0..7777d9cf80 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -2451,6 +2451,14 @@ namespace CalamityMod.Projectiles.Melee Dust foamDust = Main.dust[Dust.NewDust(projectile.Center + Main.rand.NextVector2Circular(10f, 10f), 9, 0, 16, 2.7f * Math.Sign(projectile.velocity.X), -3f, 0, new Color(255, 255, 255), 1.4f)]; foamDust.noGravity = true; + if (Main.rand.NextBool()) + { + float angle = Main.rand.NextFloat(-MathHelper.PiOver2, MathHelper.PiOver2); + float distance = 10f + 50 * Math.Abs(angle) / MathHelper.PiOver2 * projectile.scale; + Vector2 sparkSpeed = -projectile.velocity; + Particle Spark = new CritSpark(projectile.Center + Vector2.Normalize(projectile.velocity.RotatedBy(angle)) * distance, sparkSpeed, Color.SkyBlue, Color.CornflowerBlue, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 0.6f); + GeneralParticleHandler.SpawnParticle(Spark); + } return; } From a764fa5293b8c004e088d2c1c4527f0e1e4c2361 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Thu, 13 Jan 2022 22:34:05 +0100 Subject: [PATCH 40/76] Removed some quixels from the recipe --- Items/Weapons/Melee/TrueBiomeBlade.cs | 7 +++---- Projectiles/Melee/MendedBiomeBladeProjectiles.cs | 9 +++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 584f4db806..535e07d7e3 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -176,10 +176,9 @@ namespace CalamityMod.Items.Weapons.Melee ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemType()); recipe.AddIngredient(ItemType(), 5); - recipe.AddIngredient(ItemID.Ectoplasm, 5); - recipe.AddIngredient(ItemType(), 10); //Hilarious abyss mats moment. Shall we change that since the abyss gets a attunement anyways - recipe.AddIngredient(ItemType(), 10); - recipe.AddIngredient(ItemType(), 5); + recipe.AddIngredient(ItemType(), 5); + recipe.AddIngredient(ItemType(), 5); + recipe.AddIngredient(ItemType(), 5); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 7777d9cf80..0e99e544f3 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -2630,6 +2630,15 @@ namespace CalamityMod.Projectiles.Melee } + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(WaterMode); + } + public override void ReceiveExtraAI(BinaryReader reader) + { + WaterMode = reader.ReadBoolean(); + } + } } From dfe640024e729decc3b6b5a7e6696d9ba7b62345 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Thu, 13 Jan 2022 22:39:13 +0100 Subject: [PATCH 41/76] Dusted the recipe up --- Items/Weapons/Melee/TrueBiomeBlade.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 535e07d7e3..1c309431a4 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -176,6 +176,8 @@ namespace CalamityMod.Items.Weapons.Melee ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemType()); recipe.AddIngredient(ItemType(), 5); + recipe.AddIngredient(ItemID.PixieDust, 2); + recipe.AddIngredient(ItemType(), 10); recipe.AddIngredient(ItemType(), 5); recipe.AddIngredient(ItemType(), 5); recipe.AddIngredient(ItemType(), 5); From be7ea5bdf0a05b0fc39ee1066529868aa775d476 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Fri, 14 Jan 2022 01:01:14 +0100 Subject: [PATCH 42/76] Turbo barebones start for omega biome blade's rework --- CalPlayer/CalamityPlayerMiscEffects.cs | 2 +- Items/Weapons/Melee/OmegaBiomeBlade.cs | 524 ++++++++++++++++++- Items/Weapons/Melee/OmegaBiomeBlade.png | Bin 1317 -> 2123 bytes Items/Weapons/Melee/OmegaBiomeBladeExtra.png | Bin 0 -> 3410 bytes 4 files changed, 501 insertions(+), 25 deletions(-) create mode 100644 Items/Weapons/Melee/OmegaBiomeBladeExtra.png diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index d3e7625f5b..ff505ef68e 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -161,7 +161,7 @@ namespace CalamityMod.CalPlayer CalamityGlobalItem.UpdateAllParticleSets(); BiomeBlade.UpdateAllParticleSets(); TrueBiomeBlade.UpdateAllParticleSets(); - + OmegaBiomeBlade.UpdateAllParticleSets(); // Update the gem tech armor set. GemTechState.Update(); diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index abe904e2f2..79b9805a5e 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -1,24 +1,155 @@ using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables; +using CalamityMod.Particles; using CalamityMod.Projectiles.Melee; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using Terraria.ModLoader.IO; +using static CalamityMod.CalamityUtils; +using static CalamityMod.Items.Weapons.Melee.OmegaBiomeBlade; +using static Terraria.ModLoader.ModContent; namespace CalamityMod.Items.Weapons.Melee { public class OmegaBiomeBlade : ModItem { + public enum Attunement : byte { SuperPogo, Whirlwind, Shockwave, FlailBlade } + public Attunement? mainAttunement = null; + public Attunement? secondaryAttunement = null; + public int Combo = 0; + public bool strongLunge = false; + public override void SetStaticDefaults() { - DisplayName.SetDefault("Omega Biome Blade"); - Tooltip.SetDefault("Fires different homing projectiles based on what biome you're in\n" + - "Projectiles also change based on moon events"); + DisplayName.SetDefault("True Biome Blade"); + Tooltip.SetDefault("FUNCTION_DESC\n" + + "FUNCTION_EXTRA\n" + + "FUNCTION_PASSIVE\n" + + "Holding down RMB for 2 seconds attunes the weapon to the powers of the surrounding biome\n" + + "Using RMB for a shorter period of time switches your active and passive attunements around\n" + + "Active attunement : None\n" + + "Passive attunement: None\n"); } + #region tooltip editing + public override void ModifyTooltips(List list) + { + Player player = Main.player[Main.myPlayer]; + if (player is null) + return; + + foreach (TooltipLine l in list) + { + if (l.text.StartsWith("FUNCTION_DESC")) + { + AttunementInfo info = GetAttunementInfo(mainAttunement); + l.overrideColor = info.color; + l.text = info.function_description; + } + + if (l.text.StartsWith("FUNCTION_EXTRA")) + { + AttunementInfo info = GetAttunementInfo(mainAttunement); + l.overrideColor = info.color; + l.text = info.function_extra; + } + + if (l.text.StartsWith("FUNCTION_PASSIVE")) + { + AttunementInfo info = GetAttunementInfo(secondaryAttunement); + l.overrideColor = info.color; + l.text = info.function_passive; + } + + if (l.text.StartsWith("Active attunement")) + { + AttunementInfo info = GetAttunementInfo(mainAttunement); + l.overrideColor = Color.Lerp(info.color, info.color2, 0.5f + (float)Math.Sin(Main.GlobalTime) * 0.5f); + l.text = "Active Attumenent : [" + info.name + "]"; + } + + if (l.text.StartsWith("Passive attunement")) + { + AttunementInfo info = GetAttunementInfo(secondaryAttunement); + l.overrideColor = Color.Lerp(Color.Lerp(info.color, info.color2, 0.5f + (float)Math.Sin(Main.GlobalTime) * 0.5f), Color.Gray, 0.5f); + l.text = "Passive Attumenent : [" + info.name + "]"; + } + } + } + + internal struct AttunementInfo + { + public string name; + public string function_description; + public string function_extra; + public string function_passive; + public Color color; + public Color color2; + } + + internal AttunementInfo GetAttunementInfo(Attunement? attunement) + { + AttunementInfo AttunementInfo = new AttunementInfo(); + + switch (attunement) + { + case Attunement.Whirlwind: + AttunementInfo.name = "Swordsmith's Pride"; + AttunementInfo.function_description = "Hold LMB to swing the sword around you, powering up as it spins. Extra ghostly swords are summoned during the spin"; + AttunementInfo.function_extra = "Releasing LMB during a spin will throw the sword out. Ghostly swords will home onto enemies hit by the sword throw"; + AttunementInfo.function_passive = "IDK"; + AttunementInfo.color = new Color(188, 155, 185); + AttunementInfo.color2 = new Color(204, 184, 144); + break; + case Attunement.SuperPogo: + AttunementInfo.name = "Sanguine Fury"; + AttunementInfo.function_description = "Conjures molten blades in front of you that get larger and stronger the more you hit enemies. The blades can also be used to bounce off tiles when in the air"; + AttunementInfo.function_extra = "Releasing LMB sends the charged blades flying in a wheel. Using LMB right after the throw makes the player perform dash towards the blade wheel, shredding anything inbetween"; + AttunementInfo.function_passive = "IDK"; + AttunementInfo.color = new Color(216, 55, 22); + AttunementInfo.color2 = new Color(216, 131, 22); + break; + case Attunement.Shockwave: + AttunementInfo.name = "Mercurial Tides"; + AttunementInfo.function_description = "Hold LMB to charge up a heaven-shattering sword thrust, and release to unleash the devastating blow. Small shockwaves are released as you charge the sword"; + AttunementInfo.function_extra = "Striking the ground after a jump will create an impact so powerful, a shockwave of ancient monoliths will rise up and propagate through the ground"; + AttunementInfo.function_passive = "IDK"; + AttunementInfo.color = new Color(132, 109, 233); + AttunementInfo.color2 = new Color(122, 213, 233); + break; + case Attunement.FlailBlade: + AttunementInfo.name = "Lamentations of the Chained"; + AttunementInfo.function_description = "Throw out a flurry of chained blades in front of you. Striking enemies with the tip of the blades guarantees a critical hit."; + AttunementInfo.function_extra = "Critical strikes create extra ghostly chains to latch onto extra targets or onto the struck foe"; + AttunementInfo.function_passive = "IDK"; + AttunementInfo.color = new Color(127, 173, 168); + AttunementInfo.color2 = new Color(203, 201, 168); + break; + default: + AttunementInfo.name = "None"; + AttunementInfo.function_description = "Does nothing... yet"; + AttunementInfo.function_extra = "It seems upgrading the blade expanded the scope of the previous attunements"; + AttunementInfo.function_passive = "Your secondary attunement can now provide passive bonuses"; + AttunementInfo.color = new Color(163, 163, 163); + AttunementInfo.color2 = new Color(163, 163, 163); + break; + } + return AttunementInfo; + } + + #endregion + + public override void SetDefaults() { - item.width = 62; + item.width = item.height = 92; item.damage = 130; item.melee = true; item.useAnimation = 18; @@ -28,43 +159,388 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 8; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 62; item.value = CalamityGlobalItem.Rarity11BuyPrice; item.rare = ItemRarityID.Purple; - item.shoot = ModContent.ProjectileType(); + item.shoot = ProjectileID.PurificationPowder; item.shootSpeed = 15f; } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) - { - for (int projectiles = 0; projectiles < 3; projectiles++) - { - float SpeedX = speedX + Main.rand.Next(-40, 41) * 0.05f; - float SpeedY = speedY + Main.rand.Next(-40, 41) * 0.05f; - Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI); - } - return false; - } - public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType()); - recipe.AddIngredient(ModContent.ItemType()); - recipe.AddIngredient(ModContent.ItemType(), 3); - recipe.AddIngredient(ModContent.ItemType(), 3); + recipe.AddIngredient(ItemType()); + recipe.AddIngredient(ItemType()); + recipe.AddIngredient(ItemType(), 3); + recipe.AddIngredient(ItemType(), 3); recipe.AddIngredient(ItemID.LunarBar, 5); recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); recipe.AddRecipe(); } - public override void MeleeEffects(Player player, Rectangle hitbox) + #region Saving and syncing attunements + public override bool CloneNewInstances => true; + + public override ModItem Clone(Item item) { - if (Main.rand.NextBool(5)) + var clone = base.Clone(item); + if (Main.mouseItem.type == ItemType()) + item.modItem.HoldItem(Main.player[Main.myPlayer]); + (clone as OmegaBiomeBlade).mainAttunement = (item.modItem as OmegaBiomeBlade).mainAttunement; + (clone as OmegaBiomeBlade).secondaryAttunement = (item.modItem as OmegaBiomeBlade).secondaryAttunement; + + return clone; + } + + public override ModItem Clone() //ditto + { + var clone = base.Clone(); + (clone as OmegaBiomeBlade).mainAttunement = mainAttunement; + (clone as OmegaBiomeBlade).secondaryAttunement = secondaryAttunement; + + return clone; + } + + public override TagCompound Save() + { + int attunement1 = mainAttunement == null ? -1 : (int)mainAttunement; + int attunement2 = secondaryAttunement == null ? -1 : (int)secondaryAttunement; + TagCompound tag = new TagCompound { - int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 0); + { "mainAttunement", attunement1 }, + { "secondaryAttunement", attunement2 } + }; + return tag; + } + + public override void Load(TagCompound tag) + { + int attunement1 = tag.GetInt("mainAttunement"); + int attunement2 = tag.GetInt("secondaryAttunement"); + if (attunement1 == -1) + mainAttunement = null; + else + mainAttunement = (Attunement?)attunement1; + + if (attunement2 == -1 || (attunement1 == attunement2)) + secondaryAttunement = null; + else + secondaryAttunement = (Attunement?)attunement2; + } + + public override void NetSend(BinaryWriter writer) + { + writer.Write((byte)mainAttunement); + writer.Write((byte)secondaryAttunement); + } + + public override void NetRecieve(BinaryReader reader) + { + mainAttunement = (Attunement?)reader.ReadByte(); + secondaryAttunement = (Attunement?)reader.ReadByte(); + } + + #endregion + + public override void HoldItem(Player player) + { + player.Calamity().rightClickListener = true; + + //Reset the strong lunge thing just in case it didnt get caught beofre. + if (CanUseItem(player)) + strongLunge = false; + + //Change the swords function based on its attunement + switch (mainAttunement) + { + case Attunement.Whirlwind: + item.channel = false; + item.noUseGraphic = false; + item.useStyle = ItemUseStyleID.SwingThrow; + item.shoot = ProjectileType(); + item.shootSpeed = 12f; + item.UseSound = SoundID.Item1; + item.noMelee = false; + break; + case Attunement.SuperPogo: + item.channel = true; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.HoldingOut; + item.shoot = ProjectileType(); + item.shootSpeed = 12f; + item.UseSound = null; + item.noMelee = true; + break; + case Attunement.Shockwave: + item.channel = true; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.HoldingOut; + item.shoot = ProjectileType(); + item.shootSpeed = 12f; + item.UseSound = null; + item.noMelee = true; + break; + case Attunement.FlailBlade: + item.channel = false; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.SwingThrow; + item.shoot = ProjectileType(); + item.shootSpeed = 30; + item.UseSound = null; + item.noMelee = true; + break; + default: + item.noUseGraphic = false; + item.useStyle = ItemUseStyleID.SwingThrow; + item.shoot = ProjectileID.PurificationPowder; + item.shootSpeed = 12f; + item.UseSound = SoundID.Item1; + break; + } + + if (player.Calamity().mouseRight && CanUseItem(player) && player.whoAmI == Main.myPlayer && !Main.mapFullscreen) + { + //Don't shoot out a visual blade if you already have one out + if (Main.projectile.Any(n => n.active && n.type == ProjectileType() && n.owner == player.whoAmI)) + return; + + Projectile.NewProjectile(player.Top, Vector2.Zero, ProjectileType(), 0, 0, player.whoAmI); } } + + public override bool CanUseItem(Player player) + { + return true; + //!Main.projectile.Any(n => n.active && n.owner == player.whoAmI && + //(n.type == ProjectileType() || + // n.type == ProjectileType() || + // n.type == ProjectileType() || + // n.type == ProjectileType())); + } + + + internal static ChargingEnergyParticleSet BiomeEnergyParticles = new ChargingEnergyParticleSet(-1, 2, Color.White, Color.White, 0.04f, 20f); + internal static void UpdateAllParticleSets() + { + BiomeEnergyParticles.Update(); + } + + public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) + { + if (mainAttunement == null) + return true; + + Texture2D itemTexture = GetTexture("CalamityMod/Items/Weapons/Melee/OmegaBiomeBladeExtra"); + Rectangle itemFrame = (Main.itemAnimations[item.type] == null) ? itemTexture.Frame() : Main.itemAnimations[item.type].GetFrame(itemTexture); + + // Draw all particles. + + Vector2 particleDrawCenter = position + new Vector2(12f, 16f) * Main.inventoryScale; + + AttunementInfo info = GetAttunementInfo(mainAttunement); + BiomeEnergyParticles.EdgeColor = Color.Lerp(info.color2, Color.Black, 0.5f); + BiomeEnergyParticles.CenterColor = Color.Lerp(info.color, Color.White, 0.5f); + BiomeEnergyParticles.InterpolationSpeed = 0.1f; + BiomeEnergyParticles.DrawSet(particleDrawCenter + Main.screenPosition); + + Vector2 displacement = Vector2.UnitX.RotatedBy(Main.GlobalTime * 3f) * 2f * (float)Math.Sin(Main.GlobalTime); + + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive); + spriteBatch.Draw(itemTexture, position + displacement, itemFrame, BiomeEnergyParticles.CenterColor, 0f, origin, scale, SpriteEffects.None, 0f); + spriteBatch.Draw(itemTexture, position - displacement, itemFrame, BiomeEnergyParticles.CenterColor, 0f, origin, scale, SpriteEffects.None, 0f); + spriteBatch.End(); + spriteBatch.Begin(default, default); + + spriteBatch.Draw(itemTexture, position, itemFrame, Color.White, 0f, origin, scale, SpriteEffects.None, 0f); + return false; + } + + public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) + { + if (mainAttunement == null) + return true; + + //Draw the charged version if you can + Texture2D itemTexture = GetTexture("CalamityMod/Items/Weapons/Melee/OmegaBiomeBladeExtra"); + spriteBatch.Draw(itemTexture, item.Center - Main.screenPosition, null, Color.White, rotation, item.Size * 0.5f, scale, SpriteEffects.None, 0f); + return false; + } } + + public class TrueBiomeBladeVisuals : ModProjectile //Visuals + { + private Player Owner => Main.player[projectile.owner]; + public bool OwnerCanUseItem => Owner.HeldItem == associatedItem ? (Owner.HeldItem.modItem as OmegaBiomeBlade).CanUseItem(Owner) : false; + public bool OwnerMayChannel => OwnerCanUseItem && Owner.Calamity().mouseRight && Owner.active && !Owner.dead; + public ref float ChanneledState => ref projectile.ai[0]; + public ref float ChannelTimer => ref projectile.ai[1]; + public ref float Initialized => ref projectile.localAI[0]; + + private Item associatedItem; + const int ChannelTime = 120; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("True Biome Blade"); + } + public override string Texture => "CalamityMod/Items/Weapons/Melee/OmegaBiomeBlade"; + public bool drawIndrawHeldProjInFrontOfHeldItemAndArms = true; + public override void SetDefaults() + { + projectile.width = projectile.height = 36; + projectile.aiStyle = -1; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.timeLeft = 60; + projectile.tileCollide = false; + projectile.damage = 0; + } + + public CurveSegment anticipation = new CurveSegment(EasingType.SineBump, 0f, 0f, -0.2f); + public CurveSegment rise = new CurveSegment(EasingType.ExpIn, 0.1f, 0f, 1f); + public CurveSegment overshoot = new CurveSegment(EasingType.SineBump, 0.95f, 1f, 0.1f); + internal float SwordHeight() => PiecewiseAnimation(ChannelTimer / (float)ChannelTime, new CurveSegment[] { anticipation, rise, overshoot }); + + public override void AI() + { + + if (Initialized == 0f) + { + //If dropped, kill it instantly + if (Owner.HeldItem.type != ItemType()) + { + projectile.Kill(); + return; + } + + if (Owner.whoAmI == Main.myPlayer) + Main.PlaySound(SoundID.DD2_DarkMageHealImpact); + + associatedItem = Owner.HeldItem; + //Switch up the attunements + Attunement? temporaryAttunementStorage = (associatedItem.modItem as OmegaBiomeBlade).mainAttunement; + (associatedItem.modItem as OmegaBiomeBlade).mainAttunement = (associatedItem.modItem as OmegaBiomeBlade).secondaryAttunement; + (associatedItem.modItem as OmegaBiomeBlade).secondaryAttunement = temporaryAttunementStorage; + Initialized = 1f; + } + + if (!OwnerMayChannel && ChanneledState == 0f) //IF the channeling gets interrupted for any reason + { + projectile.Center = Owner.Top + new Vector2(18f, 0f); + ChanneledState = 1f; + projectile.timeLeft = 60; + return; + } + + if (ChanneledState == 0f) + { + Owner.heldProj = projectile.whoAmI; + Owner.itemRotation = (-Vector2.UnitY).ToRotation(); + + projectile.Center = Owner.Top + new Vector2(16f * Owner.direction, 20f * SwordHeight() + 10f); + projectile.rotation = -MathHelper.PiOver4; // No more silly turnaround with the repaired one? + ChannelTimer++; + projectile.timeLeft = 60; + + if (ChannelTimer >= ChannelTime) + { + Attune((OmegaBiomeBlade)associatedItem.modItem); + projectile.timeLeft = 120; + ChanneledState = 2f; //State where it stays invisible doing nothing. Acts as a cooldown + + Color particleColor = (associatedItem.modItem as OmegaBiomeBlade).GetAttunementInfo((associatedItem.modItem as OmegaBiomeBlade).mainAttunement).color; + + for (int i = 0; i <= 5; i++) + { + Vector2 displace = Vector2.UnitX * 20 * Main.rand.NextFloat(-1f, 1f); + Particle Glow = new GenericBloom(Owner.Bottom + displace, -Vector2.UnitY * Main.rand.NextFloat(1f, 5f), particleColor, 0.02f + Main.rand.NextFloat(0f, 0.2f), 20 + Main.rand.Next(30)); + GeneralParticleHandler.SpawnParticle(Glow); + } + for (int i = 0; i <= 10; i++) + { + Vector2 displace = Vector2.UnitX * 16 * Main.rand.NextFloat(-1f, 1f); + Particle Sparkle = new GenericSparkle(Owner.Bottom + displace, -Vector2.UnitY * Main.rand.NextFloat(1f, 5f), particleColor, particleColor, 0.5f + Main.rand.NextFloat(-0.2f, 0.2f), 20 + Main.rand.Next(30), 1, 2f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + } + } + + if (ChanneledState == 1f) + projectile.position += Vector2.UnitY * -0.3f * (1f + projectile.timeLeft / 60f); + } + + public void Attune(OmegaBiomeBlade item) + { + bool jungle = Owner.ZoneJungle; + bool snow = Owner.ZoneSnow; + bool evil = Owner.ZoneCorrupt || Owner.ZoneCrimson; + bool desert = Owner.ZoneDesert; + bool hell = Owner.ZoneUnderworldHeight; + bool astral = Owner.Calamity().ZoneAstral; + bool marine = Owner.Calamity().ZoneAbyss || Owner.Calamity().ZoneSunkenSea; + + Attunement attunement = Attunement.Whirlwind; + if (jungle || snow) + attunement = Attunement.FlailBlade; + if (desert || hell ||evil) + attunement = Attunement.SuperPogo; + if (astral || marine) + attunement = Attunement.Shockwave; + + //If the owner already had the attunement , break out of it (And unswap) + if (item.secondaryAttunement == attunement) + { + Main.PlaySound(SoundID.DD2_LightningBugZap, projectile.Center); + item.secondaryAttunement = item.mainAttunement; + item.mainAttunement = attunement; + return; + } + //Chunger + Main.PlaySound(SoundID.DD2_ExplosiveTrapExplode, projectile.Center); + item.mainAttunement = attunement; + } + + public override void Kill(int timeLeft) + { + if (associatedItem == null) + { + return; + } + //If we swapped out the main attunement for the second one despite the second attunement being empty at the time, unswap them. + if ((associatedItem.modItem as OmegaBiomeBlade).mainAttunement == null && (associatedItem.modItem as OmegaBiomeBlade).secondaryAttunement != null) + { + (associatedItem.modItem as OmegaBiomeBlade).mainAttunement = (associatedItem.modItem as OmegaBiomeBlade).secondaryAttunement; + (associatedItem.modItem as OmegaBiomeBlade).secondaryAttunement = null; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + + + if (ChanneledState == 0f && ChannelTimer > 10f) + { + Texture2D tex = GetTexture(Texture); + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, lightColor, 0, tex.Size() / 2, 1, 0, 0); + + return false; + + } + else if (ChanneledState == 1f) + { + Texture2D tex = GetTexture(Texture); + Vector2 squishyScale = new Vector2(Math.Abs((float)Math.Sin(MathHelper.Pi + MathHelper.TwoPi * projectile.timeLeft / 30f)), 1f); + SpriteEffects flip = (float)Math.Sin(MathHelper.Pi + MathHelper.TwoPi * projectile.timeLeft / 30f) > 0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + spriteBatch.Draw(tex, projectile.position - Main.screenPosition, null, lightColor * (projectile.timeLeft / 60f), 0, tex.Size() / 2, squishyScale * (2f - (projectile.timeLeft / 60f)), flip, 0); + + return false; + } + + else + return false; + } + } + + } diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.png b/Items/Weapons/Melee/OmegaBiomeBlade.png index 993994f714f1f0cc6e5e33f2ac4ba036ced460b7..3f45a16e1b5b0d8561ac5a433ca325a0890b3df0 100644 GIT binary patch literal 2123 zcmXArc{~&RAHcsu3N4ajM3fvQAr>M^M6SskPeo+8M*NDIm~GwoQMvM@x$?AZM(!gt zzvpp0?pE8#O^(Moa>ZtT)APso`}yPhd3}!e=XibNotz`0O%E4D;I%u7aZ4p zqJkTi-N+LNNVtoQB`EGzngL+no-0-tU86_~q}Y&jmO>*z_ub_Bo8ZcPohKE=4hgvu z5jZ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_+uMA0t<-;pu-T_pPhjMsDfyz59t<7#- zTz8LNuI@wXt;Qu@iKF{nPMq&(1K_XO`yOd|cWd)$)tXiAn?C?3{C>hs^tf%ye8IhA zx@@1x)JKg=oVdHHs;n#D4s0adkv|fX_H8~?ok_B7tLBB<5hQ*4Qoa{}>pNU`ht$x- zfuy@?w_-C8y~5jgIjNJ?*#ShfBx<3o%tm-DkE;YtFmo*`?dUw z-a=(~oktfVfCKY>r=(O`*Kx{^AMZ&~!xE29_n+DHe=vzNx|P_rL$cmD?cEuv-c?vg b4NLrA2Z3cd-%pcQ00000NkvXXu0mjf+8d^3 diff --git a/Items/Weapons/Melee/OmegaBiomeBladeExtra.png b/Items/Weapons/Melee/OmegaBiomeBladeExtra.png new file mode 100644 index 0000000000000000000000000000000000000000..1e3cd0bf70a05774194f1d51d7162f120075cf44 GIT binary patch literal 3410 zcmV-Y4XyHtP)Px?3`s;mRCt{2oqKc?)g8w_lVy|LJV_uVgaC#Rg1n!CQ67Sbm4^aWe6^z17Oj+8 zEox7Xo_c7tsO5kyrE*SVOQoeE2*q;>9v^50g5e<;Dh&Yx2_`%eLY^eqo&GU{`+exGc+D`SxU+ z0q@bt{fv0&kn7x$kefb10JAkR1-xUGG?#!dRtD@GHe8c=dA>;!2z%TaG~!0xS3nM z9w*3-A`UzC0J5EW%%thoFDSGFkdh2mYmsw*cMLZuJM~CJ`(3}PTD^VE5UxYEh`Ew` zxgcE-jkA&knI-^PrkNN9>9!+WNkUq-R9mT>qx_sJymu4sr(~K8kzHF^; zlZtHZwqC4u9q5^CJy&w!#9n4R`<|*^H{l*+G*%1swwz|@sCgSOur3qbaw z$5s0W-~9vt7AafzI6WV3&bo)FtU0uD9vtNRB3nohj$43{elb~EOuuZwM|V*f6u+t8A3n(?ag>d1veVR4?v zL?R{<{c2P%cKf4ESYDX*4kBBEcZPIOq>IdpVJV~1?@ui53;dlO{0f6o7 z7P};Xiv7D(Aw`dDul~BCMR`s4o_5U|C`qSF6)W$aD{)gB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QJEsT)6B2AKH5235UppHZ$%%Mz89RP(dq z0O+5lpOg8dtQ3HnT1+(ifV{~TMXbrjQ$%J<{l)UuLO{r zZMHUKCq+wAO>1~R72BV*b;8ZVrqe9sQw2RM`!YbEnaSYIv}k|fAZN{XkZ zrVcc*bXl&l$nmecl&qeX>`>=AX5F^bYk9=R@S2)BtkxKBb(MO}GJRvOt+*RZNp7)Q z1{gJ3y=?dBm&z)qek~@cuH1ExMpw(?b(H)@wcKo@S6~1BAVs%4t4GGDF`PTn*aa+ literal 0 HcmV?d00001 From 7b9e7523235ba9b38da53d8d2031a2376a76decf Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sat, 15 Jan 2022 00:41:55 +0100 Subject: [PATCH 43/76] When the tides are mercurial Also i made the strong lunge thing better --- CalPlayer/CalamityPlayer.cs | 2 + CalPlayer/CalamityPlayerMiscEffects.cs | 17 +- Items/Weapons/Melee/OmegaBiomeBlade.cs | 45 +- Items/Weapons/Melee/TrueBiomeBlade.cs | 5 +- Particles/BloomRing.cs | 43 + Particles/BloomRing.png | Bin 0 -> 9573 bytes .../Melee/MendedBiomeBladeProjectiles.cs | 17 +- .../Melee/TrueBiomeBladeProjectiles.cs | 1018 +++++++++++++++++ .../Melee/TrueBiomeBlade_MercurialTides.png | Bin 0 -> 1535 bytes .../TrueBiomeBlade_MercurialTidesMonolith.png | Bin 0 -> 34100 bytes ...TrueBiomeBlade_MercurialTidesShockwave.png | Bin 0 -> 5794 bytes 11 files changed, 1111 insertions(+), 36 deletions(-) create mode 100644 Particles/BloomRing.cs create mode 100644 Particles/BloomRing.png create mode 100644 Projectiles/Melee/TrueBiomeBladeProjectiles.cs create mode 100644 Projectiles/Melee/TrueBiomeBlade_MercurialTides.png create mode 100644 Projectiles/Melee/TrueBiomeBlade_MercurialTidesMonolith.png create mode 100644 Projectiles/Melee/TrueBiomeBlade_MercurialTidesShockwave.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 610df8f528..c8dbefa58a 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -136,6 +136,7 @@ namespace CalamityMod.CalPlayer public bool GivenBrimstoneLocus = false; public DoGCartSegment[] DoGCartSegments = new DoGCartSegment[DoGCartMount.SegmentCount]; public float SmoothenedMinecartRotation; + public bool LungingDown = false; #endregion #region IL Editing Constants @@ -2562,6 +2563,7 @@ namespace CalamityMod.CalPlayer potionTimer = 0; bloodflareCoreLostDefense = 0; persecutedEnchantSummonTimer = 0; + LungingDown = false; if (BossRushEvent.BossRushActive) { diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index ff505ef68e..09d7f446a6 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1094,15 +1094,16 @@ namespace CalamityMod.CalPlayer player.maxFallSpeed = 15f; if (gSabatonFall > 0 || player.PortalPhysicsEnabled) player.maxFallSpeed = 20f; - if (player.HeldItem.modItem is TrueBiomeBlade blade) - { - if (blade.strongLunge) - { - player.maxFallSpeed = 80f; - player.noFallDmg = true; - } - } } + + if (LungingDown) + { + player.maxFallSpeed = 80f; + player.noFallDmg = true; + } + + + } // Omega Blue Armor bonus diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index 79b9805a5e..d7d8977246 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Melee public Attunement? mainAttunement = null; public Attunement? secondaryAttunement = null; public int Combo = 0; - public bool strongLunge = false; + public int UseTimer = 0; public override void SetStaticDefaults() { @@ -104,7 +104,7 @@ namespace CalamityMod.Items.Weapons.Melee AttunementInfo.name = "Swordsmith's Pride"; AttunementInfo.function_description = "Hold LMB to swing the sword around you, powering up as it spins. Extra ghostly swords are summoned during the spin"; AttunementInfo.function_extra = "Releasing LMB during a spin will throw the sword out. Ghostly swords will home onto enemies hit by the sword throw"; - AttunementInfo.function_passive = "IDK"; + AttunementInfo.function_passive = "While attacking, extra ghost swords have a chance to be shot out"; AttunementInfo.color = new Color(188, 155, 185); AttunementInfo.color2 = new Color(204, 184, 144); break; @@ -112,7 +112,7 @@ namespace CalamityMod.Items.Weapons.Melee AttunementInfo.name = "Sanguine Fury"; AttunementInfo.function_description = "Conjures molten blades in front of you that get larger and stronger the more you hit enemies. The blades can also be used to bounce off tiles when in the air"; AttunementInfo.function_extra = "Releasing LMB sends the charged blades flying in a wheel. Using LMB right after the throw makes the player perform dash towards the blade wheel, shredding anything inbetween"; - AttunementInfo.function_passive = "IDK"; + AttunementInfo.function_passive = "Successful strikes rarely grant lifesteal"; AttunementInfo.color = new Color(216, 55, 22); AttunementInfo.color2 = new Color(216, 131, 22); break; @@ -120,7 +120,7 @@ namespace CalamityMod.Items.Weapons.Melee AttunementInfo.name = "Mercurial Tides"; AttunementInfo.function_description = "Hold LMB to charge up a heaven-shattering sword thrust, and release to unleash the devastating blow. Small shockwaves are released as you charge the sword"; AttunementInfo.function_extra = "Striking the ground after a jump will create an impact so powerful, a shockwave of ancient monoliths will rise up and propagate through the ground"; - AttunementInfo.function_passive = "IDK"; + AttunementInfo.function_passive = "While attacking, release small shockwaves around you"; AttunementInfo.color = new Color(132, 109, 233); AttunementInfo.color2 = new Color(122, 213, 233); break; @@ -128,7 +128,7 @@ namespace CalamityMod.Items.Weapons.Melee AttunementInfo.name = "Lamentations of the Chained"; AttunementInfo.function_description = "Throw out a flurry of chained blades in front of you. Striking enemies with the tip of the blades guarantees a critical hit."; AttunementInfo.function_extra = "Critical strikes create extra ghostly chains to latch onto extra targets or onto the struck foe"; - AttunementInfo.function_passive = "IDK"; + AttunementInfo.function_passive = "Gain a magical chain hook. On enemy hits the hook quickly spins around you, freezing any struck foe"; //No way sentient meat hook AttunementInfo.color = new Color(127, 173, 168); AttunementInfo.color2 = new Color(203, 201, 168); break; @@ -246,9 +246,13 @@ namespace CalamityMod.Items.Weapons.Melee { player.Calamity().rightClickListener = true; + UseTimer++; //Reset the strong lunge thing just in case it didnt get caught beofre. if (CanUseItem(player)) - strongLunge = false; + { + player.Calamity().LungingDown = false; + UseTimer = 0; + } //Change the swords function based on its attunement switch (mainAttunement) @@ -275,7 +279,7 @@ namespace CalamityMod.Items.Weapons.Melee item.channel = true; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.HoldingOut; - item.shoot = ProjectileType(); + item.shoot = ProjectileType(); item.shootSpeed = 12f; item.UseSound = null; item.noMelee = true; @@ -298,6 +302,23 @@ namespace CalamityMod.Items.Weapons.Melee break; } + switch (secondaryAttunement) + { + case Attunement.Whirlwind: + break; + case Attunement.SuperPogo: + break; + case Attunement.Shockwave: + if (UseTimer % 120 == 119) + Projectile.NewProjectile(player.Center, Vector2.Zero, ProjectileType(), (int)(item.damage * 0.6f), 10f, player.whoAmI, 1f); + break; + case Attunement.FlailBlade: + break; + default: + break; + } + + if (player.Calamity().mouseRight && CanUseItem(player) && player.whoAmI == Main.myPlayer && !Main.mapFullscreen) { //Don't shoot out a visual blade if you already have one out @@ -310,12 +331,12 @@ namespace CalamityMod.Items.Weapons.Melee public override bool CanUseItem(Player player) { - return true; - //!Main.projectile.Any(n => n.active && n.owner == player.whoAmI && - //(n.type == ProjectileType() || - // n.type == ProjectileType() || + return !Main.projectile.Any(n => n.active && n.owner == player.whoAmI && + (n.type == ProjectileType() || + n.type == ProjectileType() //|| // n.type == ProjectileType() || - // n.type == ProjectileType())); + // n.type == ProjectileType() + )); } diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 1c309431a4..2d2d61a864 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -26,7 +26,6 @@ namespace CalamityMod.Items.Weapons.Melee public int Combo = 0; public int StoredLunges = 2; public int PowerLungeCounter = 0; - public bool strongLunge = false; public override void SetStaticDefaults() { DisplayName.SetDefault("Biome Blade"); @@ -265,7 +264,7 @@ namespace CalamityMod.Items.Weapons.Melee //Reset the strong lunge thing just in case it didnt get caught beofre. if (CanUseItem(player)) - strongLunge = false; + player.Calamity().LungingDown = false; //Change the swords function based on its attunement switch (mainAttunement) @@ -404,8 +403,6 @@ namespace CalamityMod.Items.Weapons.Melee public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - strongLunge = false; - if (mainAttunement == null) return false; diff --git a/Particles/BloomRing.cs b/Particles/BloomRing.cs new file mode 100644 index 0000000000..cba140f7c4 --- /dev/null +++ b/Particles/BloomRing.cs @@ -0,0 +1,43 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Particles +{ + public class BloomRing : Particle + { + public override string Texture => "CalamityMod/Particles/BloomRing"; + public override bool UseAdditiveBlend => true; + public override bool SetLifetime => true; + + private float opacity; + private Color BaseColor; + + public BloomRing(Vector2 position, Vector2 velocity, Color color, float scale, int lifeTime) + { + Position = position; + Velocity = velocity; + BaseColor = color; + Scale = scale; + Lifetime = lifeTime; + Rotation = Main.rand.NextFloat(MathHelper.TwoPi); + } + + public override void Update() + { + opacity = (float)Math.Sin(MathHelper.PiOver2 + LifetimeCompletion * MathHelper.PiOver2); + Color = BaseColor * opacity; + Lighting.AddLight(Position, Color.R / 255f, Color.G / 255f, Color.B / 255f); + Velocity *= 0.95f; + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + Texture2D tex = GeneralParticleHandler.GetTexture(Type); + + spriteBatch.Draw(tex, Position - Main.screenPosition, null, Color * opacity, Rotation, tex.Size() / 2f, Scale, SpriteEffects.None, 0); + } + } +} diff --git a/Particles/BloomRing.png b/Particles/BloomRing.png new file mode 100644 index 0000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yni z#I&9TOkaDo!0+_nUyA8|CE|Vd)}Sd8V$Ylg9&pNc4gt8?ewTyVez94{DUI?y=hu%l zuMQg{h^?v=D8(CigZo05>gq#I%>;rw$Z{6Q92F_fC&C;7p$j)8jyyO|=0@{u6l*UQ z1K6D)^nE}mNFfRm9hUi}e^Hz!&ZvlYS3FY>VBd7N`DjB46a&b*!(*w*at<6My2piL bGhrr~Z{E-%3k*3WQUHs~)|aX-xX1ku6Rbt| literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 0e99e544f3..8f139c9106 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -236,8 +236,8 @@ namespace CalamityMod.Projectiles.Melee if (dashTimer == maxDash) { Owner.velocity *= 0.1f; //Abrupt stop - if (Owner.HeldItem.modItem is TrueBiomeBlade blade) - blade.strongLunge = false; + Owner.Calamity().LungingDown = true; + Projectile proj = Projectile.NewProjectileDirect(Owner.Center + (PowerLungeEnd - PowerLungeStart) / 2f, Vector2.Zero, ProjectileType(), projectile.damage * 2, 0, Owner.whoAmI); if (proj.modProjectile is DecaysRetortDash dash) { @@ -275,8 +275,7 @@ namespace CalamityMod.Projectiles.Melee public void PowerLunge() { - if (Owner.HeldItem.modItem is TrueBiomeBlade blade) - blade.strongLunge = true; + Owner.Calamity().LungingDown = true; PowerLungeStart = Owner.Center; dashTimer = 1f; Owner.GiveIFrames(60); @@ -1940,10 +1939,7 @@ namespace CalamityMod.Projectiles.Melee projectile.Center = Owner.Center + Vector2.Lerp(lastDisplacement, direction * 40f, MathHelper.Clamp(((dashDuration - projectile.timeLeft) / dashDuration) * 2f, 0f, 1f)); Owner.fallStart = (int)(Owner.position.Y / 16f); - if (Owner.HeldItem.modItem is TrueBiomeBlade blade) - { - blade.strongLunge = true; //Needed for the downwards velocity uncap. - } + Owner.Calamity().LungingDown = true; if (Collision.SolidCollision(Owner.Center + (direction * 120 * projectile.scale) - Vector2.One * 5f, 10, 10)) { @@ -2096,10 +2092,7 @@ namespace CalamityMod.Projectiles.Melee if (State == 1f) Owner.velocity *= 0.33f; - if (Owner.HeldItem.modItem is TrueBiomeBlade blade) - { - blade.strongLunge = false; //Needed for the downwards velocity uncap. - } + Owner.Calamity().LungingDown = false; projectile.active = false; } diff --git a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs new file mode 100644 index 0000000000..bac48dbbb0 --- /dev/null +++ b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs @@ -0,0 +1,1018 @@ +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.CalPlayer; +using CalamityMod.DataStructures; +using CalamityMod.Particles; +using CalamityMod.Items.Weapons.Melee; +using Terraria.Graphics.Shaders; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using static Terraria.ModLoader.ModContent; +using static CalamityMod.CalamityUtils; +using Terraria.Audio; + +namespace CalamityMod.Projectiles.Melee +{ + public class SwordsmithsPride : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_HeavensMight"; + private bool initialized = false; + Vector2 direction = Vector2.Zero; + Vector2 oldDirection = Vector2.Zero; + public ref float CurrentState => ref projectile.ai[0]; + public Player Owner => Main.player[projectile.owner]; + private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; + public const float throwOutTime = 90f; + public const float throwOutDistance = 440f; + + public static float snapPoint = 0.45f; + public float snapTimer => (throwTimer / throwOutTime) < snapPoint ? 0 : ((throwTimer / throwOutTime) - snapPoint) / (1f - snapPoint); + public static float retractionPoint = 0.6f; + public float retractionTimer => (throwTimer / throwOutTime) < retractionPoint ? 0 : ((throwTimer / throwOutTime) - retractionPoint) / (1f - retractionPoint); + public ref float Empowerment => ref projectile.ai[1]; + public ref float hasMadeSound => ref projectile.localAI[0]; + public ref float hasMadeChargeSound => ref projectile.localAI[1]; + + public const float maxEmpowerment = 600f; + //How much damage reduction applies on uncharged attacks + public const float initialDamage = 0.2f; + //How much extra damage applies when fully charged. This goes ontop of the initial damage, so a max empowerment boost of 2 with an initial damage of 0.1 makes the total damage multiplier be 1.9 + public float maxEmpowermentBoost = 2f; + public float throwTimer => throwOutTime - projectile.timeLeft; + + public Particle smear; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Heaven's Might"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; + ProjectileID.Sets.TrailingMode[projectile.type] = 2; + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 74; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 16; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + float bladeLenght = 100 * projectile.scale; + float bladeWidth = 20 * projectile.scale; + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center, projectile.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); + } + + + public CurveSegment launch = new CurveSegment(EasingType.CircOut, 0f, 0f, 1f, 4); + public CurveSegment hold = new CurveSegment(EasingType.Linear, snapPoint, 1f, 0f); + public CurveSegment retract = new CurveSegment(EasingType.PolyInOut, retractionPoint, 1f, -1.05f, 3); + internal float ThrowCurve() => PiecewiseAnimation((throwOutTime - projectile.timeLeft) / throwOutTime, new CurveSegment[] { launch, hold, retract }); + + public override void AI() + { + if (!initialized) //Initialization. Here its litterally just playing a sound tho lmfao + { + Main.PlaySound(SoundID.Item90, projectile.Center); + projectile.velocity = Vector2.Zero; + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + oldDirection = direction; + initialized = true; + } + + projectile.rotation = direction.ToRotation(); //Only done for afterimages + + if (!OwnerCanShoot) + { + if (CurrentState == 2f || (CurrentState == 0f && Empowerment / maxEmpowerment < 0.5)) + { + Main.PlaySound(SoundID.Item77, projectile.Center); + projectile.Kill(); + return; + } + + else if (CurrentState == 0f) + { + CurrentState = 1f; + Main.PlaySound(SoundID.Item80, projectile.Center); + direction = Owner.DirectionTo(Main.MouseWorld); + //PARTICLES LOTS OF PARTICLES LOTS OF SPARKLES YES YES MH YES YES + for (int i = 0; i <= 8; i++) + { + float variation = Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4); + float strength = (float)Math.Sin(variation * 2f + MathHelper.PiOver2); + Particle Sparkle = new CritSpark(projectile.Center, Owner.velocity + direction.RotatedBy(variation) * (1 + strength) * 2f * Main.rand.NextFloat(7.5f, 20f), Color.White, Color.HotPink, 2f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 2f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + for (int i = 0; i <= 8; i++) + { + float variation = Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4); + float strength = (float)Math.Sin(variation * 2f + MathHelper.PiOver2); + Particle Sparkle = new CritSpark(projectile.Center, Owner.velocity + direction.RotatedBy(variation) * (1 + strength) * Main.rand.NextFloat(7.5f, 20f), Color.White, Color.Cyan, 2f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 2f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + } + } + + if (CurrentState == 0f) + { + if (Owner.whoAmI == Main.myPlayer) + { + if (hasMadeChargeSound == 0f && Empowerment / maxEmpowerment >= 0.5) + { + hasMadeChargeSound = 1f; + Main.PlaySound(SoundID.Item76); + } + + float rotation = direction.ToRotation(); + if (rotation > -MathHelper.PiOver2 - MathHelper.PiOver4 && rotation < -MathHelper.PiOver2 + MathHelper.PiOver4 && hasMadeSound == 1f) + hasMadeSound = 0f; + + else if (rotation > MathHelper.PiOver2 - MathHelper.PiOver4 && rotation < MathHelper.PiOver2 + MathHelper.PiOver4 && hasMadeSound == 0f) + { + hasMadeSound = 1f; + Main.PlaySound(SoundID.Item71); + } + } + + if (Empowerment / maxEmpowerment >= 0.75) + { + if (smear == null) + { + smear = new CircularSmearVFX(Owner.Center, Color.HotPink, direction.ToRotation(), projectile.scale * 1.5f); + GeneralParticleHandler.SpawnParticle(smear); + } + //Update the variables of the smear + else + { + smear.Rotation = direction.ToRotation() + MathHelper.PiOver2; + smear.Time = 0; + smear.Position = Owner.Center; + smear.Scale = projectile.scale * 1.5f; + smear.Color = Color.Lerp(Color.HotPink, Color.Cyan, (float)Math.Sin(Main.GlobalTime * 2f)) * (((Empowerment / maxEmpowerment) - 0.75f) / 0.25f * 0.8f); + } + } + + + //Manage position and rotation + projectile.scale = 1 + Empowerment / maxEmpowerment * 1.5f; + + oldDirection = direction; + direction = direction.RotatedBy(MathHelper.Clamp(Empowerment / maxEmpowerment, 0.4f, 1f) * MathHelper.PiOver4 * 0.20f); + direction.Normalize(); + projectile.rotation = direction.ToRotation(); + projectile.Center = Owner.Center + (direction * projectile.scale * 10); + projectile.timeLeft = (int)throwOutTime + 1; + Empowerment++; + if (Empowerment > maxEmpowerment) + Empowerment = maxEmpowerment; + } + + if (CurrentState == 1f) + { + projectile.Center = Owner.Center + (direction * projectile.scale * 10) + (direction * throwOutDistance * ThrowCurve()); + projectile.scale = (1 + Empowerment / maxEmpowerment * 1.5f) * MathHelper.Clamp(1 - retractionTimer, 0.3f, 1f); + } + + //Make the owner look like theyre holding the sword bla bla + Owner.heldProj = projectile.whoAmI; + Owner.direction = Math.Sign(direction.X); + Owner.itemRotation = direction.ToRotation(); + if (Owner.direction != 1) + { + Owner.itemRotation -= 3.14f; + } + Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); + Owner.itemTime = 2; + Owner.itemAnimation = 2; + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + damage = (int)(damage * (initialDamage + (maxEmpowermentBoost * Empowerment / maxEmpowerment))); + } + + public override void Kill(int timeLeft) + { + if (smear != null) + smear.Kill(); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/TrueBiomeBlade"); + Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_HeavensMight"); + + float drawAngle = direction.ToRotation(); + float drawRotation = drawAngle + MathHelper.PiOver4; + + Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOffset = projectile.Center - Main.screenPosition; + + //Afterimages + if (CalamityConfig.Instance.Afterimages && CurrentState == 0f && Empowerment / maxEmpowerment > 0.4f) + { + for (int i = 0; i < projectile.oldRot.Length; ++i) + { + Color color = projectile.GetAlpha(lightColor) * (1f - (i / (float)projectile.oldRot.Length)); + float afterimageRotation = projectile.oldRot[i] + MathHelper.PiOver4; + Main.spriteBatch.Draw(handle, drawOffset, null, color * MathHelper.Lerp(0f, 0.5f, MathHelper.Clamp(Empowerment / maxEmpowerment - 0.4f / 0.1f, 0f, 1f)), afterimageRotation, drawOrigin, projectile.scale - 0.2f * ((i / (float)projectile.oldRot.Length)), 0f, 0f); + } + + spriteBatch.End(); //Haha sup babe what if i restarted the spritebatch way too many times haha /blushes + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + Vector2 afterimageDrawOrigin = new Vector2(0f, blade.Height); + for (int i = 0; i < projectile.oldRot.Length; ++i) + { + Color color = projectile.GetAlpha(lightColor) * (1f - (i / (float)projectile.oldRot.Length)); + float afterimageRotation = projectile.oldRot[i] + MathHelper.PiOver4; + Main.spriteBatch.Draw(blade, drawOffset, null, color * MathHelper.Lerp(0f, 0.5f, MathHelper.Clamp((Empowerment / maxEmpowerment - 0.4f) / 0.1f, 0f, 1f)), afterimageRotation, afterimageDrawOrigin, projectile.scale - 0.2f * ((i / (float)projectile.oldRot.Length)), 0f, 0f); + } + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + } + + + spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Update the parameters + drawOrigin = new Vector2(0f, blade.Height); + + //Don't draw the glowing blade after the retraction + float opacityFade = CurrentState == 0f ? 1f : 1f - retractionTimer; + //Add basic tint (my beloved) during the snap + if (snapTimer > 0 && retractionTimer <= 0) + { + GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(MathHelper.Clamp(0.8f - snapTimer, 0f, 1f)); + GameShaders.Misc["CalamityMod:BasicTint"].UseColor(Color.White); + GameShaders.Misc["CalamityMod:BasicTint"].Apply(); + } + + spriteBatch.Draw(blade, drawOffset, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f * opacityFade, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + if (CurrentState == 1f && snapTimer > 0) + { + drawChain(spriteBatch, snapTimer, retractionTimer); + } + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + public void drawChain(SpriteBatch spriteBatch, float snapProgress, float retractProgress) + { + Texture2D chainTex = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_HeavensMightChain"); + + float opacity = retractProgress < 0.5 ? 1 : (retractProgress - 0.5f) / 0.5f; + + Vector2 Shake = retractProgress > 0 ? Vector2.Zero : Vector2.One.RotatedByRandom(MathHelper.TwoPi) * (1f - snapProgress) * 10f; + + int dist = (int)Vector2.Distance(Owner.Center, projectile.Center) / 16; + Vector2[] Nodes = new Vector2[dist + 1]; + Nodes[0] = Owner.Center; + Nodes[dist] = projectile.Center; + + for (int i = 1; i < dist + 1; i++) + { + Rectangle frame = new Rectangle(0, 0 + 18 * (i % 2), 12, 18); + Vector2 positionAlongLine = Vector2.Lerp(Owner.Center, projectile.Center, i / (float)dist); //Get the position of the segment along the line, as if it were a flat line + Nodes[i] = positionAlongLine + Shake * (float)Math.Sin(i / (float)dist * MathHelper.Pi); + + float rotation = (Nodes[i] - Nodes[i - 1]).ToRotation() - MathHelper.PiOver2; //Calculate rotation based on direction from last point + float yScale = Vector2.Distance(Nodes[i], Nodes[i - 1]) / frame.Height; //Calculate how much to squash/stretch for smooth chain based on distance between points + Vector2 scale = new Vector2(1, yScale); + + Color chainLightColor = Lighting.GetColor((int)Nodes[i].X / 16, (int)Nodes[i].Y / 16); //Lighting of the position of the chain segment + + Vector2 origin = new Vector2(frame.Width / 2, frame.Height); //Draw from center bottom of texture + spriteBatch.Draw(chainTex, Nodes[i] - Main.screenPosition, frame, chainLightColor * opacity * 0.7f, rotation, origin, scale, SpriteEffects.None, 0); + } + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(initialized); + writer.WriteVector2(direction); + } + public override void ReceiveExtraAI(BinaryReader reader) + { + initialized = reader.ReadBoolean(); + direction = reader.ReadVector2(); + } + } + + public class SwordsmithsPrideBeam : ModProjectile //The boring plain one. I need to find something different to make it do compared to the original one. + { + public NPC target; + public Player Owner => Main.player[projectile.owner]; + public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_PurityProjection"; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ghostly projection"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 2; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void SetDefaults() + { + projectile.width = projectile.height = 32; + projectile.aiStyle = 27; + aiType = ProjectileID.LightBeam; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.timeLeft = 40; + projectile.extraUpdates = 1; + projectile.melee = true; + projectile.tileCollide = false; + } + + public override void AI() + { + + if (target == null) + { + foreach (Projectile proj in Main.projectile) + { + if (proj.active && proj.type == ProjectileType() && proj.owner == Owner.whoAmI) + { + target = Main.npc[(int)proj.ai[0]]; + break; + } + } + } + else if ((projectile.Center - target.Center).Length() >= (projectile.Center + projectile.velocity - target.Center).Length() && CalamityUtils.AngleBetween(projectile.velocity, target.Center - projectile.Center) < MathHelper.PiOver4 * 0.5f) //Home in + { + projectile.timeLeft = 30; //Remain alive + float angularTurnSpeed = MathHelper.ToRadians(MathHelper.Lerp(12.5f, 2.5f, MathHelper.Clamp(projectile.Distance(target.Center) / 10f, 0f, 1f))); + float idealDirection = projectile.AngleTo(target.Center); + float updatedDirection = projectile.velocity.ToRotation().AngleTowards(idealDirection, angularTurnSpeed); + projectile.velocity = updatedDirection.ToRotationVector2() * projectile.velocity.Length(); + } + + if (projectile.timeLeft < 35) + projectile.tileCollide = true; + + Lighting.AddLight(projectile.Center, 0.75f, 1f, 0.24f); + int dustParticle = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.CursedTorch, 0f, 0f, 100, default, 0.9f); + Main.dust[dustParticle].noGravity = true; + Main.dust[dustParticle].velocity *= 0.5f; + Main.dust[dustParticle].velocity += projectile.velocity * 0.1f; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (projectile.timeLeft > 35) + return false; + + DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1); + return false; + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(SoundID.Item43, projectile.Center); + for (int i = 0; i <= 15; i++) + { + Vector2 displace = (projectile.rotation - MathHelper.PiOver4).ToRotationVector2() * (-0.5f + (i / 15f)) * 88f; + int dustParticle = Dust.NewDust(projectile.Center + displace, projectile.width, projectile.height, DustID.CursedTorch, 0f, 0f, 100, default, 2f); + Main.dust[dustParticle].noGravity = true; + Main.dust[dustParticle].velocity = projectile.oldVelocity; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + int debuffTime = 90; + target.AddBuff(BuffType(), debuffTime); + } + } + + public class MercurialTides : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_MercurialTides"; + private bool initialized = false; + Vector2 direction = Vector2.Zero; + public Player Owner => Main.player[projectile.owner]; + public ref float Charge => ref projectile.ai[0]; //Charge + public ref float State => ref projectile.ai[1]; //State 0 is "charging", State 1 is "thrusting" + public ref float CurrentIndicator => ref projectile.localAI[0]; //What "indicator" stage are you on. + public ref float OverCharge => ref projectile.localAI[1]; + + private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; + const float MaxCharge = 500; + + public Vector2 lastDisplacement; + public float dashDuration; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Mercurial Tides"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 70; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 16; + } + + public override bool CanDamage() + { + return (State == 1); + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + float bladeLenght = 120 * projectile.scale; + float bladeWidth = 20 * projectile.scale; + + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center, Owner.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); + } + + public CurveSegment QuickOut = new CurveSegment(EasingType.PolyIn, 0f, 0f, 0.2f, 3); + public CurveSegment Bump = new CurveSegment(EasingType.SineBump, 0.06f, 0.2f, 0.1f); + public CurveSegment QuickDraw = new CurveSegment(EasingType.Linear, 0.25f, 0.2f, -0.45f); + public CurveSegment SlowDrawOut = new CurveSegment(EasingType.PolyIn, 0.50f, -0.25f, -0.2f, 3); + public CurveSegment OverShoot = new CurveSegment(EasingType.SineBump, 0.93f, -0.45f, -0.1f); + + internal float ChargeDisplacement() => PiecewiseAnimation(Charge / MaxCharge, new CurveSegment[] { QuickOut, Bump, QuickDraw, SlowDrawOut, OverShoot }); + + public override void AI() + { + if (!initialized) //Initialization. Here its litterally just playing a sound tho lmfao + { + projectile.velocity = Vector2.Zero; + Main.PlaySound(SoundID.Item101, projectile.Center); + initialized = true; + } + + if (!OwnerCanShoot) + { + if (State == 0f) + { + if (Charge / MaxCharge < 0.25f) + { + Main.PlaySound(SoundID.Item109, projectile.Center); + projectile.Kill(); + return; + } + else + { + + var dashSound = Main.PlaySound(SoundID.Item120, projectile.Center); + if (dashSound != null) + dashSound.Volume *= 0.5f; + State = 1f; + projectile.timeLeft = (7 + (int)((Charge / MaxCharge - 0.25f) * 20)) * 2; //Keep that even, if its an odd number itll fuck off and wont reset the players velocity on death + dashDuration = projectile.timeLeft; + lastDisplacement = projectile.Center - Owner.Center; + projectile.netUpdate = true; + projectile.netSpam = 0; + } + } + } + + if (State == 0f) + { + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + projectile.Center = Owner.Center + (direction * 70f * ChargeDisplacement()); + + Charge++; + OverCharge--; + projectile.timeLeft = 2; + if ((Charge / MaxCharge >= 0.25f && CurrentIndicator == 0f) || (Charge / MaxCharge >= 0.5f && CurrentIndicator == 1f) || (Charge / MaxCharge >= 0.75f && CurrentIndicator == 2f)) + { + + Projectile.NewProjectile(Owner.Center, Vector2.Zero, ProjectileType(), (int)(projectile.damage * 0.6f), 10f, Owner.whoAmI, 1f + CurrentIndicator * 0.15f); + Main.PlaySound(SoundID.DD2_WitherBeastAuraPulse, projectile.Center); + CurrentIndicator++; + OverCharge = 20f; + } + + if (Charge >= MaxCharge) + { + Charge = MaxCharge; + if (Owner.whoAmI == Main.myPlayer && CurrentIndicator < 4f) + { + + Projectile.NewProjectile(Owner.Center, Vector2.Zero, ProjectileType(), (int)(projectile.damage * 0.6f), 10f, Owner.whoAmI, 1f + CurrentIndicator * 0.15f); + OverCharge = 20f; + Main.PlaySound(mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/CorvinaScream"), projectile.Center); + CurrentIndicator++; + } + } + } + + if (State == 1f) + { + projectile.Center = Owner.Center + Vector2.Lerp(lastDisplacement, direction * 40f, MathHelper.Clamp(((dashDuration - projectile.timeLeft) / dashDuration) * 2f, 0f, 1f)); + Owner.fallStart = (int)(Owner.position.Y / 16f); + + Owner.Calamity().LungingDown = true; + + if (Collision.SolidCollision(Owner.Center + (direction * 120 * projectile.scale) - Vector2.One * 5f, 10, 10)) + { + SlamDown(); + projectile.timeLeft = 0; + projectile.active = false; + projectile.netUpdate = true; + projectile.netSpam = 0; + } + + Owner.velocity = direction * 30f; + + float variation = Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4); + float strength = (float)Math.Sin(variation * 2f + MathHelper.PiOver2); + Particle Sparkle = new CritSpark(projectile.Center, Owner.velocity - direction.RotatedBy(variation) * (1 + strength) * 2f * Main.rand.NextFloat(7.5f, 20f), Color.White, Main.rand.NextBool() ? Color.MediumTurquoise : Color.DarkOrange, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + + Lighting.AddLight(projectile.Center, new Vector3(1f, 0.56f, 0.56f) * Charge / MaxCharge); + + //Manage position and rotation + projectile.rotation = direction.ToRotation(); + + //Scaling based on charge + projectile.scale = 1f + (Charge / MaxCharge * 0.3f); + + Owner.direction = Math.Sign(direction.X); + Owner.itemRotation = direction.ToRotation(); + + if (Owner.direction != 1) + { + Owner.itemRotation -= 3.14f; + } + + Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); + Owner.itemTime = 2; + Owner.itemAnimation = 2; + } + + public void SlamDown() + { + var slamSound = Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.Center); + if (slamSound != null) + slamSound.Volume *= 1.5f; + + if (Owner.whoAmI != Main.myPlayer || Owner.velocity.Y == 0f) + return; + + if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 5) + Main.LocalPlayer.Calamity().GeneralScreenShakePower = 5; + + Projectile.NewProjectile(Owner.Center + (direction * 120 * projectile.scale), -direction, ProjectileType(), projectile.damage * 2, 10f, Owner.whoAmI, Main.rand.Next(4), 1f); + + SideSprouts(1, 150f, 1f * Charge / MaxCharge); + SideSprouts(-1, 150f, 1f * Charge / MaxCharge); + + } + + public bool SideSprouts(float facing, float distance, float projSize) + { + float widestAngle = 0f; + float widestSurfaceAngle = 0f; + bool validPositionFound = false; + for (float i = 0f; i < 1; i += 1 / distance) + { + Vector2 positionToCheck = Owner.Center + (direction * 120 * projectile.scale) + direction.RotatedBy((i * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; + + if (Main.tile[(int)(positionToCheck.X / 16), (int)(positionToCheck.Y / 16)].IsTileSolidGround()) + widestAngle = i; + + else if (widestAngle != 0) + { + validPositionFound = true; + widestSurfaceAngle = widestAngle; + } + } + + if (validPositionFound) + { + Vector2 projPosition = Owner.Center + (direction * 120 * projectile.scale) + direction.RotatedBy((widestSurfaceAngle * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; + Vector2 monolithRotation = direction.RotatedBy(Utils.AngleLerp(widestSurfaceAngle * -facing, 0f, projSize)); + Projectile proj = Projectile.NewProjectileDirect(projPosition, -monolithRotation, ProjectileType(), projectile.damage * 2, 10f, Owner.whoAmI, Main.rand.Next(4), projSize); + if (proj.modProjectile is MercurialTidesMonolith monolith) + { + monolith.WaitTimer = (1 - projSize) * 34f; + monolith.OriginDirection = direction; + monolith.Facing = facing; + } + } + + return validPositionFound; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + Owner.GiveIFrames(30); + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + damage = (int)(damage * (1f + Charge / MaxCharge)); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/OmegaBiomeBlade"); + Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_MercurialTides"); + + float drawAngle = direction.ToRotation(); + float drawRotation = drawAngle + MathHelper.PiOver4; + + Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOffset = projectile.Center - Main.screenPosition; + + spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + //Just in case + if (OverCharge < 0) + OverCharge = 0f; + //When the blink is + GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(OverCharge / 20f); + GameShaders.Misc["CalamityMod:BasicTint"].UseColor(new Color(154, 244, 240)); + GameShaders.Misc["CalamityMod:BasicTint"].Apply(); + + //Update the parameters + drawOrigin = new Vector2(0f, blade.Height); + + spriteBatch.Draw(blade, drawOffset, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + public override void Kill(int timeLeft) + { + //Cut the velocity short if dashing + if (State == 1f) + Owner.velocity *= 0.33f; + + Owner.Calamity().LungingDown = false; + + projectile.active = false; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(initialized); + writer.WriteVector2(direction); + writer.Write(CurrentIndicator); + writer.WriteVector2(lastDisplacement); + writer.Write(dashDuration); + } + public override void ReceiveExtraAI(BinaryReader reader) + { + initialized = reader.ReadBoolean(); + direction = reader.ReadVector2(); + CurrentIndicator = reader.ReadSingle(); + lastDisplacement = reader.ReadVector2(); + dashDuration = reader.ReadSingle(); + } + } + + public class MercurialTidesMonolith : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_MercurialTidesMonolith"; + public Player Owner => Main.player[projectile.owner]; + public float Timer => (100f - projectile.timeLeft) / 100f; + public ref float Variant => ref projectile.ai[0]; //Yes + public ref float Size => ref projectile.ai[1]; //Yes + public float WaitTimer; //How long until the monoliths appears + public Vector2 OriginDirection; //The direction of the original strike + public float Facing; //The direction of the original strike + public const float BaseWidth = 90f; + public const float BaseHeight = 420f; + + public CurveSegment StaySmall = new CurveSegment(EasingType.Linear, 0f, 0.2f, 0f); + public CurveSegment GoBig = new CurveSegment(EasingType.SineOut, 0.25f, 0.2f, 1f); + public CurveSegment GoNormal = new CurveSegment(EasingType.CircIn, 0.4f, 1.2f, -0.2f); + public CurveSegment StayNormal = new CurveSegment(EasingType.Linear, 0.5f, 1f, 0f); + + internal float Width() => PiecewiseAnimation(Timer, new CurveSegment[] { StaySmall, GoBig, GoNormal, StayNormal }) * BaseWidth * Size; + + public CurveSegment Anticipate = new CurveSegment(EasingType.CircIn, 0f, 0f, 0.15f); + public CurveSegment Overextend = new CurveSegment(EasingType.SineOut, 0.2f, 0.15f, 1f); + public CurveSegment Unextend = new CurveSegment(EasingType.CircIn, 0.25f, 1.15f, -0.15f); + public CurveSegment Hold = new CurveSegment(EasingType.ExpOut, 0.70f, 1f, -0.1f); + internal float Height() => PiecewiseAnimation(Timer, new CurveSegment[] { Anticipate, Overextend, Unextend, Hold }) * BaseHeight * Size; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Mercurial Monolith"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 70; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.timeLeft = 102; + projectile.hide = true; + } + + public override bool CanDamage() => WaitTimer <= 0; + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center, projectile.Center + ((projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * Height()), Width(), ref collisionPoint); + } + + public override void DrawBehind(int index, List drawCacheProjsBehindNPCsAndTiles, List drawCacheProjsBehindNPCs, List drawCacheProjsBehindProjectiles, List drawCacheProjsOverWiresUI) + { + drawCacheProjsBehindNPCsAndTiles.Add(index); + } + + public override void AI() + { + if (projectile.velocity != Vector2.Zero) + { + SurfaceUp(); + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; + projectile.velocity = Vector2.Zero; + } + + if (WaitTimer > 0) + { + projectile.timeLeft = 102; + WaitTimer--; + } + + if (projectile.timeLeft == 100) + { + if (Size >= 1) //Big monoliths create sparkles even before sprouting up + { + + for (int i = 0; i < 20; i++) + { + Particle Sparkle = new CritSpark(projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(7.5f, 20f), Color.White, Main.rand.NextBool() ? Color.MediumTurquoise : Color.DarkOrange, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + } + + if (Size * 0.8 > 0.4 && Facing != 0) + { + SideSprouts(Facing, 150f, Size * 0.8f); + } + } + + if (projectile.timeLeft == 80) + { + Vector2 particleDirection = (projectile.rotation - MathHelper.PiOver2).ToRotationVector2(); + Main.PlaySound(SoundID.DD2_EtherianPortalDryadTouch, projectile.Center); + + for (int i = 0; i < 8; i++) + { + Vector2 hitPositionDisplace = particleDirection.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(0f, 10f); + Vector2 flyDirection = particleDirection.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver2, MathHelper.PiOver2)) * Main.rand.NextFloat(5f, 15f); + Particle smoke = new SmallSmokeParticle(projectile.Center + hitPositionDisplace, flyDirection, Color.Lerp(Color.DarkOrange, Color.MediumTurquoise, Main.rand.NextFloat()), new Color(130, 130, 130), Main.rand.NextFloat(2.8f, 3.6f) * Size, 165 - Main.rand.Next(30), 0.1f); + GeneralParticleHandler.SpawnParticle(smoke); + } + for (int i = 0; i < 6; i++) + { + Vector2 hitPositionDisplace = particleDirection.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(10f, 30f); + Vector2 flyDirection = particleDirection.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4)); + + Particle Rock = new StoneDebrisParticle(projectile.Center + hitPositionDisplace * 3, flyDirection * Main.rand.NextFloat(3f, 6f), Color.Lerp(Color.DarkSlateBlue, Color.LightSlateGray, Main.rand.NextFloat()), (1f + Main.rand.NextFloat(0f, 2.4f)) * Size, 30 + Main.rand.Next(50), 0.1f); + GeneralParticleHandler.SpawnParticle(Rock); + } + } + } + + //Go up to the "surface" so you're not stuck in the middle of the ground like a complete moron. + public void SurfaceUp() + { + for (float i = 0; i < 40; i += 0.5f) + { + Vector2 positionToCheck = projectile.Center + projectile.velocity * i; + if (!Main.tile[(int)(positionToCheck.X / 16), (int)(positionToCheck.Y / 16)].IsTileSolidGround()) + { + projectile.Center = projectile.Center + projectile.velocity * i; + return; + } + } + projectile.Center = projectile.Center + projectile.velocity * 40f; + } + + public bool SideSprouts(float facing, float distance, float projSize) + { + float widestAngle = 0f; + float widestSurfaceAngle = 0f; + bool validPositionFound = false; + for (float i = 0f; i < 1; i += 1 / distance) + { + Vector2 positionToCheck = projectile.Center + OriginDirection.RotatedBy((i * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; + + if (Main.tile[(int)(positionToCheck.X / 16), (int)(positionToCheck.Y / 16)].IsTileSolidGround()) + widestAngle = i; + + else if (widestAngle != 0) + { + validPositionFound = true; + widestSurfaceAngle = widestAngle; + } + } + + if (validPositionFound) + { + Vector2 projPosition = projectile.Center + OriginDirection.RotatedBy((widestSurfaceAngle * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; + Vector2 monolithRotation = OriginDirection.RotatedBy(Utils.AngleLerp(widestSurfaceAngle * -facing, 0f, projSize)); + Projectile proj = Projectile.NewProjectileDirect(projPosition, -monolithRotation, ProjectileType(), projectile.damage * 2, 10f, Owner.whoAmI, Main.rand.Next(4), projSize); + if (proj.modProjectile is MercurialTidesMonolith monolith) + { + monolith.WaitTimer = (float)Math.Sqrt(1.0 - Math.Pow(projSize - 1.0, 2)) * 3f ; + monolith.OriginDirection = OriginDirection; + monolith.Facing = facing; + } + } + + return validPositionFound; + } + + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (WaitTimer > 0) + return false; + + Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_MercurialTidesMonolith"); + + Vector2 Shake = projectile.timeLeft < 70 ? Vector2.Zero : Vector2.One.RotatedByRandom(MathHelper.TwoPi) * (70 - projectile.timeLeft / 30f) * 0.05f; + + float drawAngle = projectile.rotation; + Rectangle frame = new Rectangle(0 + (int)Variant * 94, 0, 94, 420); + + Vector2 drawScale = new Vector2(Width() / BaseWidth, Height() / BaseHeight); + Vector2 drawPosition = projectile.Center - Main.screenPosition - (projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * 26f; + Vector2 drawOrigin = new Vector2(frame.Width / 2f, frame.Height); + + float opacity = MathHelper.Clamp(1f - ((Timer - 0.85f) / 0.15f), 0f, 1f); + + spriteBatch.Draw(tex, drawPosition + Shake, frame, lightColor * opacity, drawAngle, drawOrigin, drawScale, 0f, 0f); + + return false; + } + public override void PostDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (WaitTimer > 0) + return; + + Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_TheirAbhorrenceMonolith_Glow"); + + float drawAngle = projectile.rotation; + Rectangle frame = new Rectangle(0 + (int)Variant * 94, 0, 94, 420); + + Vector2 drawScale = new Vector2(Width() / BaseWidth, Height() / BaseHeight); + Vector2 drawPosition = projectile.Center - Main.screenPosition - (projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * 26f; + Vector2 drawOrigin = new Vector2(frame.Width / 2f, frame.Height); + + float opacity = MathHelper.Clamp(1f - ((Timer - 0.85f) / 0.15f), 0f, 1f); + + spriteBatch.Draw(tex, drawPosition, frame, Color.White * opacity, drawAngle, drawOrigin, drawScale, 0f, 0f); + } + + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(WaitTimer); + writer.Write(Facing); + writer.WriteVector2(OriginDirection); + + } + public override void ReceiveExtraAI(BinaryReader reader) + { + WaitTimer = reader.ReadSingle(); + Facing = reader.ReadSingle(); + OriginDirection = reader.ReadVector2(); + } + } + + public class MercurialTidesBlast : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_MercurialTidesShockwave"; + public Player Owner => Main.player[projectile.owner]; + public float Timer => (60f - projectile.timeLeft) / 100f; + public ref float Variant => ref projectile.ai[0]; //Yes + public ref float Size => ref projectile.ai[0]; //Yes + + public Particle BloomRing; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Mercurial Blast"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 170; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.timeLeft = 60; + } + + public override bool CanDamage() => projectile.timeLeft < 40; + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + return Collision.CheckAABBvAABBCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center + (projHitbox.Size() * projectile.scale * 0.5f), projHitbox.Size() * projectile.scale); + } + + public override void AI() + { + projectile.velocity = Vector2.Zero; + projectile.scale = (1 + (float)Math.Sin(projectile.timeLeft / 60f * MathHelper.Pi) * 0.2f) * Size; + + if (projectile.timeLeft == 60) + { + Main.PlaySound(SoundID.Item79, projectile.Center); + Particle Sparkle = new GenericSparkle(projectile.Center, Vector2.Zero, Color.White, Main.rand.NextBool() ? Color.Aqua : Color.SpringGreen, projectile.scale, 20 ,0.2f, 2); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + + + + if (projectile.timeLeft == 40) + { + Main.PlaySound(SoundID.DD2_ExplosiveTrapExplode, projectile.Center); + + BloomRing = new BloomRing(projectile.Center, Vector2.Zero, Color.Aqua, projectile.scale, 40); + GeneralParticleHandler.SpawnParticle(BloomRing); + + Particle Bloom = new StrongBloom(projectile.Center, Vector2.Zero, Main.rand.NextBool() ? Color.Aqua * 0.6f : Color.SpringGreen * 0.6f, projectile.scale * (1f + Main.rand.NextFloat(0f, 1.5f)), 20); + GeneralParticleHandler.SpawnParticle(Bloom); + for (int i = 0; i < 10; i++) + { + Particle Sparkle = new CritSpark(projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(17.5f, 25f) * projectile.scale, Color.White, Main.rand.NextBool() ? Color.DarkSlateBlue : Color.Chocolate, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + + for (float i = 0f; i < 1; i += 0.05f) + { + float rotation = i * MathHelper.TwoPi; + Particle Sparkle = new CritSpark(projectile.Center + rotation.ToRotationVector2() * 65f * projectile.scale, rotation.ToRotationVector2() * 10f, Color.White, Main.rand.NextBool() ? Color.Aqua : Color.SpringGreen, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + } + + if (BloomRing != null) + { + BloomRing.Scale = projectile.scale; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_MercurialTidesShockwave"); + + float drawAngle = projectile.rotation; + int animFrame = 6 - (int)Math.Ceiling(projectile.timeLeft / 10f); + Rectangle frame = new Rectangle(0, 0 + animFrame * 168, 170, 166); + + Vector2 drawPosition = projectile.Center - Main.screenPosition; + Vector2 drawOrigin = frame.Size() / 2f; + + spriteBatch.Draw(tex, drawPosition, frame, Color.White, drawAngle, drawOrigin, projectile.scale, 0f, 0f); + + + return false; + } + } +} + + diff --git a/Projectiles/Melee/TrueBiomeBlade_MercurialTides.png b/Projectiles/Melee/TrueBiomeBlade_MercurialTides.png new file mode 100644 index 0000000000000000000000000000000000000000..a2f1e480c39074e032bf02a54d18807911f8d765 GIT binary patch literal 1535 zcmYjRc{tQt7(O$GY?Es@Lr5Bh5_RLTlw~X<1}TNiSVGO!MwVP8DP*Q8u9#xFH56IL znr%kIwJ)hLw$LW~a!2;<{yhD2pXYq%`{Uc*=RMzh5*+c?NKv#X004=z!JdXZX~%?x zp!>|;hE&MGf=*kTgMv<_2>=8uaagl6Vd*m&r{a|?6`HntO3XwOIUI~yv2q0BQ*(@H zid~Vt9B#S;5I&mg=`R0Bak+sHpGb4QDUXgE`Q;Am51x+DE|E}RZ ze?HdVc$B7>mK_f4_ua+)xb^s^q@rbP1KYAOLkUAGam^gv z;EE}nZ2QTu1vrS3K3Y(M?PMHyXN77|$h@xing2Nzn`}57fk~DLkdZW?Cbf64U|@WS zGj~;IzSso~z_S>rus}Qt4mKzh5dCo&S!s7#iv?vj4rk8<6#`HdwUXhn;12tnc9!QT zwTv%v!YT~9jy!zk0>BWxuutWSr>n2f{u+T#pKE0h@SSxCZ>x?TX$HonxxMLKOYU;XPe2P-U_Y(;qwD zgz+lvSuG-tdZ5}{eUoA+YUVza@bU8fz_gc2#ckqKbZD#60oEoV2TPP3MmUJm zRe0)xik1kz)gFQYs3TM-qF)aDYn6GpyMIA@rm^Q}b<#gJYLJS+P^AtyL}V<{@Gdn^umG8AL@ zLIfhZHpKsTwfrjy9+F4bF_XGE3#0Y8dSw(ef^?0`+@%6M3x{a3_ZJh3&&mWawfJ|E zsQ6i&%7(BPBi_-SfuANIpp5?B#P7PKSao;$s7U3e&6ZQ`@+yn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h?8xwg}k`xo1(kivnh|xh^9AP z;$!PoyiPvPH;v^xs(o4yiDrL!S2WIjBZ%YEqXB!%Ag4qqDLT5~W6N4W_pL76ukYBh z>oM+wL$x~)IM24|Xamb+OaIFz-NWl|g%!<}VnanrbyAgS(-e5O%-346*C|&&k5)%E zz~TdfO^p>E@}l<>WAY5VjI5tz!dR9~{|45R#pN|G&5b#*q`zqu*QKb$l8U&ZA(|&nx#~pCfjFhG^PRVI5+pkG^5{j`fJViUbT-hxO zQ)IJENEe$gGNyg}>jvMz!l{040Yju-TdMeDPumdnb&rLIlv%d%OmH3rdeBV$V^_4$ zAAzV9^+lmlU&;Qx3B8DnvCHorrhTwmvD=-omM&H{!o@bu{68BZ6PNQy!)wCpL~2NR zGW|HP8v!N>LO&gE-~$=<8CJ9VT2=6Ye#3V?AFW990B-yhHIzwhzm$n_v$kXU58G=F ze|hWluzD-Zu$UDrG>YCAgWp7G4eFTaP#6{7K^Ug57WKjRZh5-o>fGbSB9<<7et4;- zt-T{nV4a4`{_{1_$3RNA| z+P42=>;-{{eZtq&ffq literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/TrueBiomeBlade_MercurialTidesShockwave.png b/Projectiles/Melee/TrueBiomeBlade_MercurialTidesShockwave.png new file mode 100644 index 0000000000000000000000000000000000000000..55dd6345b9849b755cf464bedbf545d34c7c5d89 GIT binary patch literal 5794 zcmbVQd0diNzjx|wDx2)J)Rxh_Q?FC*O}XSsmPBbT$d;g3GnomwBrfGf+2T#hrbVq> z!zBa-Q*jL`oi6I; zL?f3`@$)gs@&(xfdroSL>))H^@i%zh`|SD6u!S1SrJtNt{@3S3e6Yt;cycv20Hx1@P5QMG#&pwK(+7j;C+${d$h|C18Iy+&K{?`H4+ z+z%}s6C3}B07qSjV`_M?#aBGp;@#oa&A25k--F0?E~b;@(d;cr75cR|XdB&-Avf;T z)D%)ixQaGaE(EjycHnoehvQZSjU z;U3@XCki({KVXuw6E&yWdHAuRBm_M2d9U-IqZW)q>EiOT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mEnLqL>? zrCo7?^!gs~Ucn9dBgXeVQLyYdcGUh{s_(p(O)uoI6wrG@=x`H~>MeBosjBc0)K+(O zKi(c;*`4;-!kRnuuGGo74_LPoF!98Ao1BFv7r=NQ7TPbU%I*`P!gWK!>S9Nd`9|x~ jlk>4{4shgmAFvwZ<5NUV%~FULMEav}Z+F(g6Dj`%Ao& Date: Sat, 15 Jan 2022 02:37:06 +0100 Subject: [PATCH 44/76] Spin 2 win start --- Items/Weapons/Melee/OmegaBiomeBlade.cs | 19 ++-- Items/Weapons/Melee/OmegaBiomeBlade.png | Bin 2123 -> 2127 bytes .../Melee/MendedBiomeBladeProjectiles.cs | 2 +- .../Melee/TrueBiomeBladeProjectiles.cs | 94 +++++++++++++----- .../Melee/TrueBiomeBlade_SwordsmithsPride.png | Bin 0 -> 1332 bytes .../TrueBiomeBlade_SwordsmithsPrideBeam.png | Bin 0 -> 1857 bytes 6 files changed, 83 insertions(+), 32 deletions(-) create mode 100644 Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.png create mode 100644 Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideBeam.png diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index d7d8977246..634312c073 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -258,13 +258,13 @@ namespace CalamityMod.Items.Weapons.Melee switch (mainAttunement) { case Attunement.Whirlwind: - item.channel = false; - item.noUseGraphic = false; - item.useStyle = ItemUseStyleID.SwingThrow; - item.shoot = ProjectileType(); + item.channel = true; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.HoldingOut; + item.shoot = ProjectileType(); item.shootSpeed = 12f; - item.UseSound = SoundID.Item1; - item.noMelee = false; + item.UseSound = null; + item.noMelee = true; break; case Attunement.SuperPogo: item.channel = true; @@ -332,7 +332,7 @@ namespace CalamityMod.Items.Weapons.Melee public override bool CanUseItem(Player player) { return !Main.projectile.Any(n => n.active && n.owner == player.whoAmI && - (n.type == ProjectileType() || + (n.type == ProjectileType() || n.type == ProjectileType() //|| // n.type == ProjectileType() || // n.type == ProjectileType() @@ -351,6 +351,8 @@ namespace CalamityMod.Items.Weapons.Melee if (mainAttunement == null) return true; + position.Y -= 6f * scale; + Texture2D itemTexture = GetTexture("CalamityMod/Items/Weapons/Melee/OmegaBiomeBladeExtra"); Rectangle itemFrame = (Main.itemAnimations[item.type] == null) ? itemTexture.Frame() : Main.itemAnimations[item.type].GetFrame(itemTexture); @@ -498,6 +500,7 @@ namespace CalamityMod.Items.Weapons.Melee bool evil = Owner.ZoneCorrupt || Owner.ZoneCrimson; bool desert = Owner.ZoneDesert; bool hell = Owner.ZoneUnderworldHeight; + bool holy = Owner.ZoneHoly; bool astral = Owner.Calamity().ZoneAstral; bool marine = Owner.Calamity().ZoneAbyss || Owner.Calamity().ZoneSunkenSea; @@ -508,6 +511,8 @@ namespace CalamityMod.Items.Weapons.Melee attunement = Attunement.SuperPogo; if (astral || marine) attunement = Attunement.Shockwave; + if (holy) + attunement = Attunement.Whirlwind; //Necessary to override biome overlap //If the owner already had the attunement , break out of it (And unswap) if (item.secondaryAttunement == attunement) diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.png b/Items/Weapons/Melee/OmegaBiomeBlade.png index 3f45a16e1b5b0d8561ac5a433ca325a0890b3df0..8c2adfd24bd7259d106846a65bb5e7e6bf1b0b1b 100644 GIT binary patch delta 2005 zcmV;`2P*i>5YG^h7aLXx1^@s6RaRm500001b5ch_0Itp)=>Px-36U~=e}cm?p76$c z0^^0BR#gFze$$Nr^nBbA8Ls~%`%{{jOdjhABr9rYBrga+RxlfY@Ug}S!1See08mg~ z1VH`HcL6whpc!z+TEoTID1Jk;eTH6`bu$19moEU|#(N$BVB5NNK+M$a+;k6|vDTRI zG4`UVS(yNMXF?HxuDlxne^~hNw}6= zhS%gmwBM0lF*SSApv2Y-DaL)ySW8TpJa#BkANb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zxY?|3B|FYoOC)UU(Lc(!^i+Ivft>AMF4u#D68oNSn-=%JlePN+sC-t=^6zF4xZKb{ z$^{P~oHG@GVo&y}Hq;#-HoHhxoUxV|e{~+a^*b*Bu;SHK04#m{O#q%>`y-=Y@$Nqv zpTAVP1c31TIRIq&#_b)Hzwv+fy#v7P(ucGuX;146hcng^3ENP6zpQu)7nTChS}%K4 zPu1TRxBr}6sSRj8I``2Z8|}}neFTWbV4X{{*8md58Ec7A$FE24C;_0UTcYGge_dG- zfMw-382vOq4d1mW?l_v)K2|C#x$LP@z3TqNJS{k04R*#_B4J}IN*4PsMIaVSb?raY zN^0hPW-PvI`b+?tPM-qcuQmTM+O_@~AQga=v;Y8sJjs`L?sy^5sgDWHSW6^q?ALCQ zwf)C^sm4l3W9v|+YTnxL`bGfme}8ou04Z-20zfQ~BJ$Km?#9Hy40EH}(%Zf0oA9VEKFi zLJfNjb31muHn{-dTZSOo{|j7GHQ3699MN&XRIYW zH8nR^*8ZKHVZ)5oUnm3MfA{Z56{;XZ-bQKr^xC|Qviz&7hHZB-c7owu5?dnx^KL6M zIvm*lApoU)lO?9M$&zQhR-LXD&R9!KE}SR%YU=?x$EsB)U9;!@PwJyBQzf50=uAxr zXRIYApKj@l0Q_K!oDzIxiR@A7F6#N9d~a$X)HMdv8^1VXE#b{xEBTO-x6a6v%Kh2h jdyI}Q3m6^FSWEmLqLeU%YB!(Q00000NkvXXu0mjfvQp8N diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 8f139c9106..29f5742d9a 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -19,7 +19,7 @@ using Terraria.Audio; namespace CalamityMod.Projectiles.Melee { - public class TruePurityProjection : ModProjectile //The boring plain one. I need to find something different to make it do compared to the original one. + public class TruePurityProjection : ModProjectile //The boring plain one. With cool homing now { public NPC target; public Player Owner => Main.player[projectile.owner]; diff --git a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs index bac48dbbb0..94da220b7d 100644 --- a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs @@ -19,12 +19,13 @@ using Terraria.Audio; namespace CalamityMod.Projectiles.Melee { + + public class SwordsmithsPride : ModProjectile { - public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_HeavensMight"; + public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride"; private bool initialized = false; Vector2 direction = Vector2.Zero; - Vector2 oldDirection = Vector2.Zero; public ref float CurrentState => ref projectile.ai[0]; public Player Owner => Main.player[projectile.owner]; private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; @@ -36,6 +37,7 @@ namespace CalamityMod.Projectiles.Melee public static float retractionPoint = 0.6f; public float retractionTimer => (throwTimer / throwOutTime) < retractionPoint ? 0 : ((throwTimer / throwOutTime) - retractionPoint) / (1f - retractionPoint); public ref float Empowerment => ref projectile.ai[1]; + public float OverEmpowerment = 0f; //Used to keep cooldowns working when the spin is full public ref float hasMadeSound => ref projectile.localAI[0]; public ref float hasMadeChargeSound => ref projectile.localAI[1]; @@ -47,10 +49,11 @@ namespace CalamityMod.Projectiles.Melee public float throwTimer => throwOutTime - projectile.timeLeft; public Particle smear; + public NPC lastTarget; public override void SetStaticDefaults() { - DisplayName.SetDefault("Heaven's Might"); + DisplayName.SetDefault("Swordsmith's Pride"); ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; ProjectileID.Sets.TrailingMode[projectile.type] = 2; } @@ -69,8 +72,8 @@ namespace CalamityMod.Projectiles.Melee public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { float collisionPoint = 0f; - float bladeLenght = 100 * projectile.scale; - float bladeWidth = 20 * projectile.scale; + float bladeLenght = 140 * projectile.scale; + float bladeWidth = 25 * projectile.scale; return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center, projectile.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); } @@ -88,7 +91,6 @@ namespace CalamityMod.Projectiles.Melee projectile.velocity = Vector2.Zero; direction = Owner.DirectionTo(Main.MouseWorld); direction.Normalize(); - oldDirection = direction; initialized = true; } @@ -120,7 +122,7 @@ namespace CalamityMod.Projectiles.Melee { float variation = Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4); float strength = (float)Math.Sin(variation * 2f + MathHelper.PiOver2); - Particle Sparkle = new CritSpark(projectile.Center, Owner.velocity + direction.RotatedBy(variation) * (1 + strength) * Main.rand.NextFloat(7.5f, 20f), Color.White, Color.Cyan, 2f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 2f); + Particle Sparkle = new CritSpark(projectile.Center, Owner.velocity + direction.RotatedBy(variation) * (1 + strength) * Main.rand.NextFloat(7.5f, 20f), Color.White, Color.GreenYellow, 2f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 2f); GeneralParticleHandler.SpawnParticle(Sparkle); } } @@ -147,8 +149,24 @@ namespace CalamityMod.Projectiles.Melee } } + if (Empowerment / maxEmpowerment >= 0.5) + { + + if ((Empowerment + OverEmpowerment) % (40 + (int)(40 * (1 - Empowerment / maxEmpowerment))) == 9) + { + Vector2 shotDirection = Main.rand.NextVector2CircularEdge(15f, 15f); + if (lastTarget != null && lastTarget.active) //If you've got an actual target, angle your shots towards them + { + shotDirection = (shotDirection.ToRotation().AngleTowards(Owner.AngleTo(lastTarget.Center), MathHelper.PiOver2)).ToRotationVector2() * 15f; + } + Projectile.NewProjectile(Owner.Center, shotDirection, ProjectileType(), (int)(projectile.damage * 0.5f), 0f, Owner.whoAmI); + } + } + + if (Empowerment / maxEmpowerment >= 0.75) { + Color currentColor = Color.Lerp(Color.HotPink, Color.GreenYellow, (float)Math.Sin(Main.GlobalTime * 2f)) * (((Empowerment / maxEmpowerment) - 0.75f) / 0.25f * 0.8f); if (smear == null) { smear = new CircularSmearVFX(Owner.Center, Color.HotPink, direction.ToRotation(), projectile.scale * 1.5f); @@ -160,8 +178,17 @@ namespace CalamityMod.Projectiles.Melee smear.Rotation = direction.ToRotation() + MathHelper.PiOver2; smear.Time = 0; smear.Position = Owner.Center; - smear.Scale = projectile.scale * 1.5f; - smear.Color = Color.Lerp(Color.HotPink, Color.Cyan, (float)Math.Sin(Main.GlobalTime * 2f)) * (((Empowerment / maxEmpowerment) - 0.75f) / 0.25f * 0.8f); + smear.Scale = projectile.scale * 1.9f; + smear.Color = currentColor; + } + + if (Main.rand.NextBool()) + { + float maxDistance = projectile.scale * 1.9f * 78f; + Vector2 distance = Main.rand.NextVector2Circular(maxDistance, maxDistance); + Vector2 angularVelocity = Vector2.Normalize(distance.RotatedBy(MathHelper.PiOver2)) * 2f * (1f + distance.Length() / 15f); + Particle glitter = new CritSpark(Owner.Center + distance, Owner.velocity + angularVelocity, Color.White, currentColor, 1f + 1 * (distance.Length() / maxDistance), 10, 0.05f, 3f); + GeneralParticleHandler.SpawnParticle(glitter); } } @@ -169,7 +196,6 @@ namespace CalamityMod.Projectiles.Melee //Manage position and rotation projectile.scale = 1 + Empowerment / maxEmpowerment * 1.5f; - oldDirection = direction; direction = direction.RotatedBy(MathHelper.Clamp(Empowerment / maxEmpowerment, 0.4f, 1f) * MathHelper.PiOver4 * 0.20f); direction.Normalize(); projectile.rotation = direction.ToRotation(); @@ -177,7 +203,10 @@ namespace CalamityMod.Projectiles.Melee projectile.timeLeft = (int)throwOutTime + 1; Empowerment++; if (Empowerment > maxEmpowerment) + { Empowerment = maxEmpowerment; + OverEmpowerment++; + } } if (CurrentState == 1f) @@ -202,6 +231,24 @@ namespace CalamityMod.Projectiles.Melee public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { damage = (int)(damage * (initialDamage + (maxEmpowermentBoost * Empowerment / maxEmpowerment))); + + if (CurrentState != 1) + return; + + lastTarget = target; + + foreach (Projectile proj in Main.projectile) + { + if (proj.active && proj.type == ProjectileType() && proj.owner == Owner.whoAmI) + { + //Reset the timeleft on the sigil & give it its new target (or the same, it doesnt matter really. + proj.ai[0] = target.whoAmI; + proj.timeLeft = 1200; + return; + } + } + Projectile sigil = Projectile.NewProjectileDirect(target.Center, Vector2.Zero, ProjectileType(), 0, 0, Owner.whoAmI, target.whoAmI); + sigil.timeLeft = 1200; } public override void Kill(int timeLeft) @@ -212,8 +259,8 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/TrueBiomeBlade"); - Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_HeavensMight"); + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/OmegaBiomeBlade"); + Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride"); float drawAngle = direction.ToRotation(); float drawRotation = drawAngle + MathHelper.PiOver4; @@ -320,7 +367,7 @@ namespace CalamityMod.Projectiles.Melee } } - public class SwordsmithsPrideBeam : ModProjectile //The boring plain one. I need to find something different to make it do compared to the original one. + public class SwordsmithsPrideBeam : ModProjectile { public NPC target; public Player Owner => Main.player[projectile.owner]; @@ -340,7 +387,7 @@ namespace CalamityMod.Projectiles.Melee aiType = ProjectileID.LightBeam; projectile.friendly = true; projectile.penetrate = 1; - projectile.timeLeft = 40; + projectile.timeLeft = 80; projectile.extraUpdates = 1; projectile.melee = true; projectile.tileCollide = false; @@ -360,18 +407,16 @@ namespace CalamityMod.Projectiles.Melee } } } - else if ((projectile.Center - target.Center).Length() >= (projectile.Center + projectile.velocity - target.Center).Length() && CalamityUtils.AngleBetween(projectile.velocity, target.Center - projectile.Center) < MathHelper.PiOver4 * 0.5f) //Home in + + else if ((projectile.Center - target.Center).Length() >= (projectile.Center + projectile.velocity - target.Center).Length() && CalamityUtils.AngleBetween(projectile.velocity, target.Center - projectile.Center) < MathHelper.PiOver2 * 1.5f) //Home in { - projectile.timeLeft = 30; //Remain alive - float angularTurnSpeed = MathHelper.ToRadians(MathHelper.Lerp(12.5f, 2.5f, MathHelper.Clamp(projectile.Distance(target.Center) / 10f, 0f, 1f))); + projectile.timeLeft = 70; //Remain alive + float angularTurnSpeed = MathHelper.ToRadians(MathHelper.Lerp(25, 10.5f, MathHelper.Clamp(projectile.Distance(target.Center) / 10f, 0f, 1f))); float idealDirection = projectile.AngleTo(target.Center); float updatedDirection = projectile.velocity.ToRotation().AngleTowards(idealDirection, angularTurnSpeed); projectile.velocity = updatedDirection.ToRotationVector2() * projectile.velocity.Length(); } - if (projectile.timeLeft < 35) - projectile.tileCollide = true; - Lighting.AddLight(projectile.Center, 0.75f, 1f, 0.24f); int dustParticle = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.CursedTorch, 0f, 0f, 100, default, 0.9f); Main.dust[dustParticle].noGravity = true; @@ -381,7 +426,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - if (projectile.timeLeft > 35) + if (projectile.timeLeft > 75) return false; DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1); @@ -407,6 +452,8 @@ namespace CalamityMod.Projectiles.Melee } } + //Mercurial tides + public class MercurialTides : ModProjectile { public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_MercurialTides"; @@ -448,8 +495,8 @@ namespace CalamityMod.Projectiles.Melee public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { float collisionPoint = 0f; - float bladeLenght = 120 * projectile.scale; - float bladeWidth = 20 * projectile.scale; + float bladeLenght = 145 * projectile.scale; + float bladeWidth = 25 * projectile.scale; return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center, Owner.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); } @@ -520,7 +567,6 @@ namespace CalamityMod.Projectiles.Melee Charge = MaxCharge; if (Owner.whoAmI == Main.myPlayer && CurrentIndicator < 4f) { - Projectile.NewProjectile(Owner.Center, Vector2.Zero, ProjectileType(), (int)(projectile.damage * 0.6f), 10f, Owner.whoAmI, 1f + CurrentIndicator * 0.15f); OverCharge = 20f; Main.PlaySound(mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/CorvinaScream"), projectile.Center); diff --git a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.png b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.png new file mode 100644 index 0000000000000000000000000000000000000000..996e7ea3e2da41ba7f6d6137a41d414e19e5dab1 GIT binary patch literal 1332 zcmV-41Px(?ny*JRCt{2olmG0RUF5^=l*#{6c{43aN)-GLOTg+W0DXSf?$8hLX#xvg&{p9 zqIg=Nr5RG1L{brnAp{SsMMkv>s&#H$v=BsiyLjGvXIh+d=Dj&@&Yd%VuJj}ec(&|!L)w`RmubljSxa- z+!bgV3mYx~0HQk)0HD=tX%i~>KqJIJBLey1p>qIMm|z@;V;!@qS1oR7gb-*%4p%mx z1+dbDmNCIZL)$F-da2@aX3z*B&-DS#zt&7jw{SpaGtq~XZ&I1_IJL;Qrf7_h<^Lk63 z>`;TGt!J8Gp%FruIwQV#?HvF>wB#8vyDfiJi+4=%ma{h~A_Xj);hJEf5ki<6BR-#d z3qZh#*UMhIczj5u@d5P*P8 z2<-*sl#6DfR3<$6_x@7#rV&Dz7$Z)7H4C6XCUnfXe=z(Ww6C`mbqB_THUQwM-w#x( zKaCJV3@BOMrtlrrcIoE=c*%ogi>x zZ&$fyWcH4xt>ycm5ke@_YswtycH^!BfFAl;Uy~eYgb)fFv9NRv0Pw_`M*#r0qeTS( z>so8wqHg~1KYR^=MhKyBEB*K${oKIK=vE8>o7x){0POiM`)SLJ@kQpor@i+?BZN>m zBW^~w>_-Iv*9SL3H+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&jCKev}`0hS5V`h%&kp{#r!HA6Ch37MYou zfoO06TIn}Ny`y3v8lN`;$#xVL7Rs{h#78(B#_ou?0^CQwDRo?*`Hh$88;o$ZyRSyz z2TRmG+@NSAA#cgV!UZXiKI9#D~qz8N@F_OoDCZ^VZx$*V+pHkpqPL4Q! z4LcGN%a7N3G1q9F*28#{AI2&+|Dd$8wdw~_Qd33sClc~6MQ(fVb)VV^EMJPut&q=b z-`P;fK^pC~MgN4|Ed#N2G;^EJtA%bJKL1F+I0m+sS(xnlz{IVuuZt3QHkWatx2`%$ c!%o~5ebr$hDc9mG4gZM%W$R>9XN6DvKmN&>$p8QV literal 0 HcmV?d00001 From 6b3cb93b8eca83f8e5e2e0652692630606aaac7a Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sat, 15 Jan 2022 04:03:57 +0100 Subject: [PATCH 45/76] Spinning harder --- Particles/CircularSmearVFX.cs | 8 --- Particles/LineVFX.cs | 47 +++++++++++++++ Particles/ThickEndedLine.png | Bin 0 -> 2030 bytes Particles/ThinEndedLine.png | Bin 0 -> 2011 bytes .../Melee/TrueBiomeBladeProjectiles.cs | 57 ++++++++++++++++-- 5 files changed, 100 insertions(+), 12 deletions(-) create mode 100644 Particles/LineVFX.cs create mode 100644 Particles/ThickEndedLine.png create mode 100644 Particles/ThinEndedLine.png diff --git a/Particles/CircularSmearVFX.cs b/Particles/CircularSmearVFX.cs index e890ba908c..28ae240cc5 100644 --- a/Particles/CircularSmearVFX.cs +++ b/Particles/CircularSmearVFX.cs @@ -10,7 +10,6 @@ namespace CalamityMod.Particles { public override string Texture => "CalamityMod/Particles/CircularSmear"; public override bool UseAdditiveBlend => true; - public override bool UseCustomDraw => false; public override bool SetLifetime => true; public float opacity; @@ -24,12 +23,5 @@ namespace CalamityMod.Particles Rotation = rotation; Lifetime = 2; } - - public override void CustomDraw(SpriteBatch spriteBatch) - { - Texture2D tex = GeneralParticleHandler.GetTexture(Type); - - spriteBatch.Draw(tex, Position - Main.screenPosition, null, Color * opacity * 0.5f, 0, tex.Size()/2f, Scale, SpriteEffects.None, 0); - } } } diff --git a/Particles/LineVFX.cs b/Particles/LineVFX.cs new file mode 100644 index 0000000000..1589c0a522 --- /dev/null +++ b/Particles/LineVFX.cs @@ -0,0 +1,47 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Particles +{ + public class LineVFX : Particle + { + public override string Texture => "CalamityMod/Particles/ThinEndedLine"; + public override bool UseAdditiveBlend => true; + public override bool UseCustomDraw => true; + + public override bool SetLifetime => true; + public float opacity; + public Vector2 LineVector; + public bool Concave; + + public LineVFX(Vector2 startPoint, Vector2 lineVector, float thickness, Color color, bool concave = false) + { + Position = startPoint; + LineVector = lineVector; + Scale = thickness; + Color = color; + Concave = concave; + Velocity = Vector2.Zero; + Rotation = 0; + Lifetime = 2; + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + Texture2D tex; + if (Concave) + tex = ModContent.GetTexture("CalamityMod/Particles/ThickEndedLine"); //THICC :wearty: weary: :weary : oogogg;... ooog... that line be lookin' mighty fine... :hot: + else + tex = GeneralParticleHandler.GetTexture(Type); + + float rot = LineVector.ToRotation() + MathHelper.PiOver2; + Vector2 origin = new Vector2(tex.Width/2f, tex.Height); + Vector2 scale = new Vector2(Scale, LineVector.Length() / tex.Height); + + spriteBatch.Draw(tex, Position - Main.screenPosition, null, Color, rot, origin, scale, SpriteEffects.None, 0); + } + } +} diff --git a/Particles/ThickEndedLine.png b/Particles/ThickEndedLine.png new file mode 100644 index 0000000000000000000000000000000000000000..3ed82b15778b9e700c3c1a92bd57a93e94d24019 GIT binary patch literal 2030 zcmVPx+s7XXYRCt{2T+50aM-Yteu6bGh3xQ5Xu>T_j0->vJ24kOWF!-*E5C{bN9?1yw zDe~^j^uvd(*vX8|>e(5g%WmbRHmke3Ybqljm6g5C&gqDL|JioC-ChcR zW&8P@_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le&6v1Auf_Um53<)Qk8V9 zj*#Cx^Zy!{?-+R2SSv*V69;Gn7{mc#9zeYV+gGn%{bOIG`+p_9{_^F^zb*gv?b~00 za%5+|fesODzH4yj7!?6(19W$2&I{BQFyhk)@~qhZ=tRZ38;NT!Ge!OS1xu|D$dpQw zzojdM+@VUIt?IP?-yo%9|5qq@f9R!j-il=9D+075hzoROOGvp>9l*K7c`!4i?=78C z&a^cj0GN!BO0ZPp6I>7L1Rgzl^j#BME|-qi_m;fX%zQ&(KX?TE4+6yx&>Wy#IRF3v M07*qoM6N<$f{Ez%UH||9 literal 0 HcmV?d00001 diff --git a/Particles/ThinEndedLine.png b/Particles/ThinEndedLine.png new file mode 100644 index 0000000000000000000000000000000000000000..c954f46b96fa75d1d8efa179a36c9886d1366931 GIT binary patch literal 2011 zcmV<12PF83P)Px+l}SWFRCt{2TwAW&HV{3cWXndngYF@~T|{;f1PBmh2?YxDuRwt=AqWs4Kz5Nm zBt`bnC8XE3Ui~nSHFHeL*G|6f<^0f;D2diNGaL?wszL}Y08~{~;V2>2YZ$4jDo9yL zyDHPZN}d1w`SZWF{^G@pU*Tl}fN7doj+yfV0F2`}xRY~xy?(U!4S3?xnBPPcv7BNV z?0Ja-iV z^SRMukpWH9SbLPR{u2O1AWw)+)704WRaN!&dbY3YnoMvurZ7N}BNOVn*73fPc8&oC z`CzX%)*bdbm9}kHfJ2T5*R~!)7~*k`5^56=>%FayE2*f zRjX9H1f!C+;jAM~(*m>38yi4I5c$T|&G8NZhG8JW%HScMA6&n$ePfSJs_l0B3os*3 zU9ao9k>dfFtu@~u+mRteh~qlTj~_q&b4|xyy?S*A%(_1e1Fd%#j}HLQ_kC~c!!Y#r zI#UkPuGjzoXjJD}H=}? z0o8d$vT2%is$J7GD|?&>n0nIsZ?{`lzrVkC^|o!dfJ4^#13cdMeFwPF2C)v?j<~iu`)L zZezW*?JhCk`Sa(l{^iRT06^Du0M7jY_52Qp!|ow}&>%k9`<&tn54p)>md5!0Itz3N zUP9g+-^A+{J;6(&3{dNy(|wH}u>VBd#2(9B05~$hd2H&-^Nr<@r?plapdO@(9;WV7 zcwhDP6?qd8n(Xt<{C|wkqbEt5S8M>_*99E%T2hxeD>S2ns~d(mPx4wJqfBhkfu-vP zs{6w*u-~2S2S)*}9~1@{WYzksACQa#=;*-m?c2A1+Xw0VUq#QqdGqEkTYvZN-ETnN zvm>%O2A|deWF4b0Ky84|4$XRj+5&of>OtP*`(Ny+Sa*ZC#xk4K@xJf%|CO~t;K+a^ z@@Kk|i5)8PELErP?(P;lqUXPU{p#w8=O;%g?RO%lsW8CG*%+Ph3-rzAnDU@JfLn$A zU}Q+2n_Ht?C`&v5FcBd|Fqh+#IG@ZDc=qhs4|Qz4Uc0(JH#b@>^fw81VZcKh((`(3 zQW!vAnxdH*Dv9%&(>npc_wV0-sAGpiI=r8V?z*`_uAhlqV*rH#vklPbDc_hzQT5I1 zY)rGZf0pq6`rJ!QRMG!e7{DJnozh5)#@Z6OH$8B^-mkv>CEs7K*PI|-FHi<1`kDNH zg#jk2dMT?anT=&~ak^OEv<`4d7#&{dhsz$*|BY%Xzm!{1D4z?(qBf z?|%p8SmNu~um4=?i0b@@4ggd5n}0>U~+MsA91bF570eBiCJFK)6-J( z3d$%D9#m0Xf1cQD_4c!Gurmkftp#{>>=YyJ+{5XF#>tY~0@AT&|7o1l8{e zT-rsh^6AqjHyL>O@}=8Akjnr~WP}oNjQ}O1+s0!pnWDgPWytyPlpF&5ZUD2rPaakD z_^SD0j@BGLDfLJ@h(v|0mCY{{cte(nn9BHYorA002ovPDHLkV1m!``-=bo literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs index 94da220b7d..89d0b05634 100644 --- a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs @@ -48,7 +48,11 @@ namespace CalamityMod.Projectiles.Melee public float maxEmpowermentBoost = 2f; public float throwTimer => throwOutTime - projectile.timeLeft; + + public float AngleReset = 0f; + public bool CanDirectFire = true; public Particle smear; + public Particle sightLine; public NPC lastTarget; public override void SetStaticDefaults() @@ -144,6 +148,7 @@ namespace CalamityMod.Projectiles.Melee else if (rotation > MathHelper.PiOver2 - MathHelper.PiOver4 && rotation < MathHelper.PiOver2 + MathHelper.PiOver4 && hasMadeSound == 0f) { + CanDirectFire = true; hasMadeSound = 1f; Main.PlaySound(SoundID.Item71); } @@ -152,7 +157,7 @@ namespace CalamityMod.Projectiles.Melee if (Empowerment / maxEmpowerment >= 0.5) { - if ((Empowerment + OverEmpowerment) % (40 + (int)(40 * (1 - Empowerment / maxEmpowerment))) == 9) + if ((Empowerment + OverEmpowerment) % 30 == 29) { Vector2 shotDirection = Main.rand.NextVector2CircularEdge(15f, 15f); if (lastTarget != null && lastTarget.active) //If you've got an actual target, angle your shots towards them @@ -182,6 +187,35 @@ namespace CalamityMod.Projectiles.Melee smear.Color = currentColor; } + if (sightLine == null) + { + sightLine = new LineVFX(Owner.Center, Owner.DirectionTo(Main.MouseWorld), 0.2f, Color.HotPink, true); + GeneralParticleHandler.SpawnParticle(sightLine); + } + else + { + sightLine.Position = Owner.Center; + (sightLine as LineVFX).LineVector = Owner.DirectionTo(Main.MouseWorld) * projectile.scale * 1.88f * 78f; + sightLine.Scale = 0.2f; + sightLine.Time = 0; + sightLine.Color = currentColor * 0.7f; + } + + float rotationAdjusted = MathHelper.WrapAngle(projectile.rotation) + MathHelper.Pi; + float mouseAngleAdjusted = MathHelper.WrapAngle(Owner.DirectionTo(Main.MouseWorld).ToRotation()) + MathHelper.Pi; + float deltaAngleShoot = Math.Abs(MathHelper.WrapAngle(rotationAdjusted - mouseAngleAdjusted)); + + if (CanDirectFire && deltaAngleShoot < 0.1f) + { + Particle Blink = new GenericSparkle(Owner.Center + Owner.DirectionTo(Main.MouseWorld) * projectile.scale * 1.88f * 78f, Owner.velocity, Color.White, currentColor, 3f, 10, 0.1f, 3f); + GeneralParticleHandler.SpawnParticle(Blink); + + Projectile.NewProjectile(Owner.Center, Owner.DirectionTo(Main.MouseWorld) * 15f, ProjectileType(), (int)(projectile.damage * 0.5f), 0f, Owner.whoAmI); + CanDirectFire = false; + AngleReset = Owner.DirectionTo(Main.MouseWorld).ToRotation(); + } + + if (Main.rand.NextBool()) { float maxDistance = projectile.scale * 1.9f * 78f; @@ -255,6 +289,8 @@ namespace CalamityMod.Projectiles.Melee { if (smear != null) smear.Kill(); + if (sightLine != null) + sightLine.Kill(); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) @@ -371,7 +407,7 @@ namespace CalamityMod.Projectiles.Melee { public NPC target; public Player Owner => Main.player[projectile.owner]; - public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_PurityProjection"; + public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideBeam"; public override void SetStaticDefaults() { @@ -408,10 +444,10 @@ namespace CalamityMod.Projectiles.Melee } } - else if ((projectile.Center - target.Center).Length() >= (projectile.Center + projectile.velocity - target.Center).Length() && CalamityUtils.AngleBetween(projectile.velocity, target.Center - projectile.Center) < MathHelper.PiOver2 * 1.5f) //Home in + else if ((projectile.Center - target.Center).Length() >= (projectile.Center + projectile.velocity - target.Center).Length() && CalamityUtils.AngleBetween(projectile.velocity, target.Center - projectile.Center) < MathHelper.PiOver4) //Home in { projectile.timeLeft = 70; //Remain alive - float angularTurnSpeed = MathHelper.ToRadians(MathHelper.Lerp(25, 10.5f, MathHelper.Clamp(projectile.Distance(target.Center) / 10f, 0f, 1f))); + float angularTurnSpeed = MathHelper.ToRadians(MathHelper.Lerp(15, 2.5f, MathHelper.Clamp(projectile.Distance(target.Center) / 10f, 0f, 1f))); float idealDirection = projectile.AngleTo(target.Center); float updatedDirection = projectile.velocity.ToRotation().AngleTowards(idealDirection, angularTurnSpeed); projectile.velocity = updatedDirection.ToRotationVector2() * projectile.velocity.Length(); @@ -430,6 +466,17 @@ namespace CalamityMod.Projectiles.Melee return false; DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1); + + spriteBatch.End(); //Haha sup babe what if i restarted the spritebatch way too many times haha /blushes + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + Texture2D tex = Main.projectileTexture[projectile.type]; + + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, Color.Lerp(Color.HotPink, Color.GreenYellow, (float)Math.Sin(Main.GlobalTime * 2f)), projectile.rotation, tex.Size() * 0.5f, 1f, 0f, 0f); + + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + return false; } @@ -450,6 +497,8 @@ namespace CalamityMod.Projectiles.Melee int debuffTime = 90; target.AddBuff(BuffType(), debuffTime); } + + public override Color? GetAlpha(Color lightColor) => Color.Lerp(Color.HotPink, Color.GreenYellow, (float)Math.Sin(Main.GlobalTime * 2f)); } //Mercurial tides From 4262d73462448466cf206975c73969f50e03b491 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sat, 15 Jan 2022 04:23:06 +0100 Subject: [PATCH 46/76] ZANY passive --- Items/Weapons/Melee/OmegaBiomeBlade.cs | 9 +++++++++ Projectiles/Melee/TrueBiomeBladeProjectiles.cs | 8 ++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index 634312c073..018fe02112 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -302,9 +302,18 @@ namespace CalamityMod.Items.Weapons.Melee break; } + if (player.whoAmI != Main.myPlayer) + return; + switch (secondaryAttunement) { case Attunement.Whirlwind: + if (UseTimer % 30 == 29 && Main.rand.Next(2) == 0) + { + Main.PlaySound(SoundID.Item78); + Projectile beamSword = Projectile.NewProjectileDirect(player.Center, player.DirectionTo(Main.MouseWorld) * 15f, ProjectileType(), (int)(item.damage * 0.3f), 10f, player.whoAmI, 1f); + beamSword.timeLeft = 50; + } break; case Attunement.SuperPogo: break; diff --git a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs index 89d0b05634..b521fe4454 100644 --- a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs @@ -189,13 +189,13 @@ namespace CalamityMod.Projectiles.Melee if (sightLine == null) { - sightLine = new LineVFX(Owner.Center, Owner.DirectionTo(Main.MouseWorld), 0.2f, Color.HotPink, true); + sightLine = new LineVFX(Owner.Center, Owner.DirectionTo(Main.MouseWorld), 0.2f, Color.HotPink, false); GeneralParticleHandler.SpawnParticle(sightLine); } else { - sightLine.Position = Owner.Center; - (sightLine as LineVFX).LineVector = Owner.DirectionTo(Main.MouseWorld) * projectile.scale * 1.88f * 78f; + sightLine.Position = Owner.Center + Owner.DirectionTo(Main.MouseWorld) * projectile.scale * 1.88f * 40; + (sightLine as LineVFX).LineVector = Owner.DirectionTo(Main.MouseWorld) * projectile.scale * 1.88f * 38f; sightLine.Scale = 0.2f; sightLine.Time = 0; sightLine.Color = currentColor * 0.7f; @@ -207,7 +207,7 @@ namespace CalamityMod.Projectiles.Melee if (CanDirectFire && deltaAngleShoot < 0.1f) { - Particle Blink = new GenericSparkle(Owner.Center + Owner.DirectionTo(Main.MouseWorld) * projectile.scale * 1.88f * 78f, Owner.velocity, Color.White, currentColor, 3f, 10, 0.1f, 3f); + Particle Blink = new GenericSparkle(Owner.Center + Owner.DirectionTo(Main.MouseWorld) * projectile.scale * 1.88f * 78f, Owner.velocity, Color.White, currentColor, 1.5f, 10, 0.1f, 3f); GeneralParticleHandler.SpawnParticle(Blink); Projectile.NewProjectile(Owner.Center, Owner.DirectionTo(Main.MouseWorld) * 15f, ProjectileType(), (int)(projectile.damage * 0.5f), 0f, Owner.whoAmI); From 4425f3a4ed8f13cae23a30d8d56b86d9276bde52 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sat, 15 Jan 2022 05:12:06 +0100 Subject: [PATCH 47/76] Attunement fix --- Items/Weapons/Melee/OmegaBiomeBlade.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index 018fe02112..d170c9bf31 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -429,10 +429,10 @@ namespace CalamityMod.Items.Weapons.Melee projectile.damage = 0; } - public CurveSegment anticipation = new CurveSegment(EasingType.SineBump, 0f, 0f, -0.2f); - public CurveSegment rise = new CurveSegment(EasingType.ExpIn, 0.1f, 0f, 1f); - public CurveSegment overshoot = new CurveSegment(EasingType.SineBump, 0.95f, 1f, 0.1f); - internal float SwordHeight() => PiecewiseAnimation(ChannelTimer / (float)ChannelTime, new CurveSegment[] { anticipation, rise, overshoot }); + public CurveSegment anticipation = new CurveSegment(EasingType.SineBump, 0f, 0f, -0.3f); + public CurveSegment rise = new CurveSegment(EasingType.ExpIn, 0f, 0f, 1f); + public CurveSegment overshoot = new CurveSegment(EasingType.SineBump, 0.80f, 1f, 0.1f); + internal float SwordHeight() => PiecewiseAnimation(ChannelTimer / (float)ChannelTime, new CurveSegment[] {rise, overshoot }); public override void AI() { @@ -470,7 +470,7 @@ namespace CalamityMod.Items.Weapons.Melee Owner.heldProj = projectile.whoAmI; Owner.itemRotation = (-Vector2.UnitY).ToRotation(); - projectile.Center = Owner.Top + new Vector2(16f * Owner.direction, 20f * SwordHeight() + 10f); + projectile.Center = Owner.Top + new Vector2(0f, -20f * SwordHeight() - 50f); projectile.rotation = -MathHelper.PiOver4; // No more silly turnaround with the repaired one? ChannelTimer++; projectile.timeLeft = 60; @@ -557,7 +557,7 @@ namespace CalamityMod.Items.Weapons.Melee if (ChanneledState == 0f && ChannelTimer > 10f) { Texture2D tex = GetTexture(Texture); - spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, lightColor, 0, tex.Size() / 2, 1, 0, 0); + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, lightColor, projectile.rotation, tex.Size() / 2, 1, 0, 0); return false; From b1192799cac3ac002cd7fd9c7059e76b69c2905d Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sun, 16 Jan 2022 02:08:46 +0100 Subject: [PATCH 48/76] Sanguine fury work --- Items/Weapons/Melee/BiomeBlade.cs | 32 +- Items/Weapons/Melee/OmegaBiomeBlade.cs | 13 +- .../Melee/BrokenBiomeBladeProjectiles.cs | 21 +- .../Melee/MendedBiomeBladeProjectiles.cs | 10 +- .../Melee/TrueBiomeBladeProjectiles.cs | 494 +++++++++++++++++- ...rueBiomeBlade_LamentationsOfTheChained.png | Bin 0 -> 1079 bytes ...omeBlade_LamentationsOfTheChainedChain.png | Bin 0 -> 244 bytes ...iomeBlade_LamentationsOfTheChainedHook.png | Bin 0 -> 868 bytes ...Blade_LamentationsOfTheChainedHookBody.png | Bin 0 -> 841 bytes .../Melee/TrueBiomeBlade_SanguineFury.png | Bin 0 -> 1606 bytes .../TrueBiomeBlade_SanguineFuryExtra.png | Bin 0 -> 2584 bytes Sounds/Custom/MeatySlash.cs | 18 + Sounds/Custom/MeatySlash.ogg | Bin 0 -> 13878 bytes 13 files changed, 557 insertions(+), 31 deletions(-) create mode 100644 Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.png create mode 100644 Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedChain.png create mode 100644 Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedHook.png create mode 100644 Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedHookBody.png create mode 100644 Projectiles/Melee/TrueBiomeBlade_SanguineFury.png create mode 100644 Projectiles/Melee/TrueBiomeBlade_SanguineFuryExtra.png create mode 100644 Sounds/Custom/MeatySlash.cs create mode 100644 Sounds/Custom/MeatySlash.ogg diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index 6c35b6db23..7df7fe63e6 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -30,6 +30,24 @@ namespace CalamityMod.Items.Weapons.Melee public int Combo = 0; public int CanLunge = 1; + #region stats + public const int DefaultAttunement_BaseDamage = 55; + + public const int EvilAttunement_BaseDamage = 55; + public const int EvilAttunement_Lifesteal = 3; + public const int EvilAttunement_BounceIFrames = 10; + + public const int ColdAttunement_BaseDamage = 70; + public const float ColdAttunement_SecondSwingBoost = 1.8f; + public const float ColdAttunement_ThirdSwingBoost = 3f; + + public const int HotAttunement_BaseDamage = 70; + public const int HotAttunement_ShredIFrames = 8; + + public const int TropicalAttunement_BaseDamage = 55; + public const float TropicalAttunement_ChainDamageReduction = 0.5f; + #endregion + public override void SetStaticDefaults() { DisplayName.SetDefault("Broken Biome Blade"); //Broken Ecoliburn lmfao. Tbh a proper name instead of just "biome blade" may be neat given the importance of the sword @@ -40,6 +58,8 @@ namespace CalamityMod.Items.Weapons.Melee "Secondary attunement: None\n"); //Theres potential for flavor text as well but im not a writer } + #region tooltip editing + public override void ModifyTooltips(List list) { Player player = Main.player[Main.myPlayer]; @@ -119,6 +139,8 @@ namespace CalamityMod.Items.Weapons.Melee return AttunementInfo; } + #endregion + public override void SetDefaults() { item.width = item.height = 36; @@ -241,6 +263,7 @@ namespace CalamityMod.Items.Weapons.Melee switch (mainAttunement) { case Attunement.Default: + item.damage = DefaultAttunement_BaseDamage; item.channel = false; item.noUseGraphic = false; item.useStyle = ItemUseStyleID.SwingThrow; @@ -252,6 +275,7 @@ namespace CalamityMod.Items.Weapons.Melee Combo = 0; break; case Attunement.Hot: + item.damage = HotAttunement_BaseDamage; item.channel = true; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.HoldingOut; @@ -263,6 +287,7 @@ namespace CalamityMod.Items.Weapons.Melee Combo = 0; break; case Attunement.Cold: + item.damage = ColdAttunement_BaseDamage; item.channel = true; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.HoldingOut; @@ -272,6 +297,7 @@ namespace CalamityMod.Items.Weapons.Melee item.noMelee = true; break; case Attunement.Tropical: + item.damage = TropicalAttunement_BaseDamage; item.channel = false; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.SwingThrow; @@ -283,6 +309,7 @@ namespace CalamityMod.Items.Weapons.Melee Combo = 0; break; case Attunement.Evil: + item.damage = EvilAttunement_BaseDamage; item.channel = false; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.Stabbing; @@ -354,7 +381,7 @@ namespace CalamityMod.Items.Weapons.Melee return false; case Attunement.Evil: - Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage*2, knockBack, player.whoAmI, 26, (float) CanLunge); + Projectile.NewProjectile(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 26, (float) CanLunge); CanLunge = 0; return false; @@ -363,9 +390,6 @@ namespace CalamityMod.Items.Weapons.Melee } } - - - internal static ChargingEnergyParticleSet BiomeEnergyParticles = new ChargingEnergyParticleSet(-1, 2, Color.DarkViolet, Color.White, 0.04f, 20f); internal static void UpdateAllParticleSets() { diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index d170c9bf31..051e15a4a6 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -270,7 +270,7 @@ namespace CalamityMod.Items.Weapons.Melee item.channel = true; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.HoldingOut; - item.shoot = ProjectileType(); + item.shoot = ProjectileType(); item.shootSpeed = 12f; item.UseSound = null; item.noMelee = true; @@ -342,12 +342,19 @@ namespace CalamityMod.Items.Weapons.Melee { return !Main.projectile.Any(n => n.active && n.owner == player.whoAmI && (n.type == ProjectileType() || - n.type == ProjectileType() //|| - // n.type == ProjectileType() || + n.type == ProjectileType() || + n.type == ProjectileType() //|| // n.type == ProjectileType() )); } + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (mainAttunement == null) + return false; + return true; + } + internal static ChargingEnergyParticleSet BiomeEnergyParticles = new ChargingEnergyParticleSet(-1, 2, Color.White, Color.White, 0.04f, 20f); internal static void UpdateAllParticleSets() diff --git a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs index 712a2b658a..58ddcf994f 100644 --- a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs @@ -169,8 +169,8 @@ namespace CalamityMod.Projectiles.Melee if (!cannotLifesteal) //trolled { - Owner.statLife += 3; - Owner.HealEffect(3); //Idk if its too much or what but at the same time its close range as fuck + Owner.statLife += BiomeBlade.EvilAttunement_Lifesteal; + Owner.HealEffect(BiomeBlade.EvilAttunement_Lifesteal); //Idk if its too much or what but at the same time its close range as fuck } if (Main.myPlayer != Owner.whoAmI || CanBounce == 0f) return; @@ -179,7 +179,7 @@ namespace CalamityMod.Projectiles.Melee bounceStrength *= Owner.velocity.Y == 0 ? 0.2f : 1f; //Reduce the bounce if the player is on the ground Owner.velocity = -direction.SafeNormalize(Vector2.Zero) * MathHelper.Clamp(bounceStrength, 0f, 22f); CanBounce = 0f; - Owner.GiveIFrames(10); // 10 i frames for free! + Owner.GiveIFrames(BiomeBlade.EvilAttunement_BounceIFrames); // i frames for free! } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) @@ -325,17 +325,16 @@ namespace CalamityMod.Projectiles.Melee case 0: projectile.width = projectile.height = 100; Main.PlaySound(SoundID.DD2_MonkStaffSwing, projectile.Center); - projectile.damage = (int)(projectile.damage * 1.5); break; case 1: projectile.width = projectile.height = 140; Main.PlaySound(SoundID.DD2_OgreSpit, projectile.Center); - projectile.damage = (int)(projectile.damage * 1.8); + projectile.damage = (int)(projectile.damage * BiomeBlade.ColdAttunement_SecondSwingBoost); break; case 2: projectile.width = projectile.height = 130; Main.PlaySound(SoundID.DD2_PhantomPhoenixShot, projectile.Center); - projectile.damage *= 3; + projectile.damage = (int)(projectile.damage * BiomeBlade.ColdAttunement_ThirdSwingBoost); break; } @@ -622,7 +621,7 @@ namespace CalamityMod.Projectiles.Melee Shred += 62; //Augment the shredspeed if (Owner.velocity.Y > 0) Owner.velocity.Y = -2f; //Get "stuck" into the enemy partly - Owner.GiveIFrames(5); // i framez. Do 5 iframes even matter? idk but you get a lot of em so lol... + Owner.GiveIFrames(BiomeBlade.HotAttunement_ShredIFrames); // i framez. PogoCooldown = 20; } } @@ -630,11 +629,6 @@ namespace CalamityMod.Projectiles.Melee public override void Kill(int timeLeft) { Main.PlaySound(SoundID.NPCHit43, projectile.Center); - //if (ShredRatio > 0.5 && Owner.whoAmI == Main.myPlayer) //Keep this for the True biome blade/Repaired biome blade. - //{ - // Projectile.NewProjectile(projectile.Center, direction * 16f, ProjectileType(), projectile.damage, projectile.knockBack, Owner.whoAmI, Shred); - //sharticles - //} } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) @@ -713,7 +707,6 @@ namespace CalamityMod.Projectiles.Melee const int MaxReach = 400; const float SnappingPoint = 0.7f; //When does the snap occur. const float ReelBackStrenght = 14f; - const float ChainDamageReduction = 0.5f; public BezierCurve curve; private Vector2 controlPoint1; @@ -776,7 +769,7 @@ namespace CalamityMod.Projectiles.Melee } } else - damage = (int)(damage * ChainDamageReduction); //If the enemy is hit with the chain of the whip, the damage gets reduced + damage = (int)(damage * BiomeBlade.TropicalAttunement_ChainDamageReduction); //If the enemy is hit with the chain of the whip, the damage gets reduced } public override void AI() diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 29f5742d9a..0782c8806e 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -175,7 +175,6 @@ namespace CalamityMod.Projectiles.Melee public const float maxDash = 20f; private Vector2 PowerLungeStart; - private Vector2 PowerLungeEnd; public override void SetStaticDefaults() { @@ -236,9 +235,9 @@ namespace CalamityMod.Projectiles.Melee if (dashTimer == maxDash) { Owner.velocity *= 0.1f; //Abrupt stop - Owner.Calamity().LungingDown = true; + Owner.Calamity().LungingDown = false; - Projectile proj = Projectile.NewProjectileDirect(Owner.Center + (PowerLungeEnd - PowerLungeStart) / 2f, Vector2.Zero, ProjectileType(), projectile.damage * 2, 0, Owner.whoAmI); + Projectile proj = Projectile.NewProjectileDirect(Owner.Center - PowerLungeStart / 2f, Vector2.Zero, ProjectileType(), projectile.damage * 2, 0, Owner.whoAmI); if (proj.modProjectile is DecaysRetortDash dash) { dash.DashStart = PowerLungeStart; @@ -1012,7 +1011,7 @@ namespace CalamityMod.Projectiles.Melee } } - public class TrueAridGrandeurShot : ModProjectile //Only use this for the upgrade actually lol + public class TrueAridGrandeurShot : ModProjectile { public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_AridGrandeurExtra"; private bool initialized = false; @@ -1060,9 +1059,8 @@ namespace CalamityMod.Projectiles.Melee projectile.rotation = direction.ToRotation(); projectile.velocity = direction * 6f; - projectile.damage *= 10; - projectile.scale = 1f + (ShredRatio * 1f); //SWAGGER + projectile.scale = 1f + ShredRatio ; //SWAGGER projectile.netUpdate = true; } diff --git a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs index b521fe4454..6ba4bdee2e 100644 --- a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs @@ -20,6 +20,7 @@ using Terraria.Audio; namespace CalamityMod.Projectiles.Melee { + //Swordsmith's pride aka Whirlwind attunement public class SwordsmithsPride : ModProjectile { @@ -501,7 +502,490 @@ namespace CalamityMod.Projectiles.Melee public override Color? GetAlpha(Color lightColor) => Color.Lerp(Color.HotPink, Color.GreenYellow, (float)Math.Sin(Main.GlobalTime * 2f)); } - //Mercurial tides + //Sanguine fury aka Super Pogo attunement + + public class SanguineFury : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_SanguineFury"; + private bool initialized = false; + Vector2 direction = Vector2.Zero; + public ref float Shred => ref projectile.ai[0]; //How much the attack is, attacking + public float ShredRatio => MathHelper.Clamp(Shred / (maxShred * 0.5f), 0f, 1f); + public ref float PogoCooldown => ref projectile.ai[1]; //Cooldown for the pogo + public ref float BounceTime => ref projectile.localAI[0]; + public Player Owner => Main.player[projectile.owner]; + public bool CanPogo => Owner.velocity.Y != 0 && PogoCooldown <= 0; //Only pogo when in the air and if the cooldown is zero + private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; + + public const float pogoStrenght = 16f; //How much the player gets pogoed up + public const float maxShred = 500; //How much shred you get + + public Projectile Wheel; + public bool Dashing; + public Vector2 DashStart; + + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Sanguine Fury"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 70; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 16; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + float bladeLenght = 130 * projectile.scale; + float bladeWidth = 86 * projectile.scale; + + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center, Owner.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); + } + + public void Pogo() + { + if (CanPogo && Main.myPlayer == Owner.whoAmI) + { + Owner.velocity = -direction.SafeNormalize(Vector2.Zero) * pogoStrenght; //Bounce + Owner.fallStart = (int)(Owner.position.Y / 16f); + PogoCooldown = 30; //Cooldown + Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.position); + + Vector2 hitPosition = Owner.Center + (direction * 100 * projectile.scale); + BounceTime = 20f; //Used only for animation + + for (int i = 0; i < 8; i++) + { + Vector2 hitPositionDisplace = direction.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(-10f, 10f); + Vector2 flyDirection = -direction.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4)); + Particle smoke = new SmallSmokeParticle(hitPosition + hitPositionDisplace, flyDirection * 9f, Color.Crimson, new Color(130, 130, 130), Main.rand.NextFloat(1.8f, 2.6f), 155 - Main.rand.Next(30)); + GeneralParticleHandler.SpawnParticle(smoke); + + Particle Glow = new StrongBloom(hitPosition - hitPositionDisplace * 3, -direction * 6 * Main.rand.NextFloat(0.5f, 1f), Color.Crimson * 0.5f, 0.01f + Main.rand.NextFloat(0f, 0.2f), 20 + Main.rand.Next(40)); + GeneralParticleHandler.SpawnParticle(Glow); + } + for (int i = 0; i < 3; i++) + { + Vector2 hitPositionDisplace = direction.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(-10f, 10f); + Vector2 flyDirection = -direction.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4)); + + Particle Rock = new StoneDebrisParticle(hitPosition - hitPositionDisplace * 3, flyDirection * Main.rand.NextFloat(3f, 6f), Color.Beige, 1f + Main.rand.NextFloat(0f, 0.4f), 30 + Main.rand.Next(50), 0.1f); + GeneralParticleHandler.SpawnParticle(Rock); + } + } + } + + public override void AI() + { + if (!initialized) //Initialization. Here its litterally just playing a sound tho lmfao + { + Main.PlaySound(SoundID.Item90, projectile.Center); + initialized = true; + + foreach(Projectile proj in Main.projectile) + { + if (proj.active && proj.type == ProjectileType() && proj.owner == Owner.whoAmI) + { + if (CalamityUtils.AngleBetween(Owner.Center - Main.MouseWorld, Owner.Center - proj.Center) > MathHelper.PiOver4) + { + proj.Kill(); + break; + } + + Wheel = proj; + Dashing = true; + DashStart = Owner.Center; + Wheel.timeLeft = 60; + Owner.GiveIFrames(60); + break; + } + } + } + + if (!OwnerCanShoot) + { + projectile.Kill(); + return; + } + + if (Shred >= maxShred) + Shred = maxShred; + if (Shred < 0) + Shred = 0; + + Lighting.AddLight(projectile.Center, new Vector3(1f, 0.56f, 0.56f) * ShredRatio); + + //Manage position and rotation + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + projectile.rotation = direction.ToRotation(); + projectile.Center = Owner.Center + (direction * 60); + + //Scaling based on shred + projectile.localNPCHitCooldown = 16 - (int)(MathHelper.Lerp(0, 8, ShredRatio)); //Increase the hit frequency + projectile.scale = 1f + (ShredRatio * 1f); //SWAGGER + + + if ((Wheel == null || !Wheel.active) && Dashing) + { + Dashing = false; + Owner.velocity *= 0.1f; //Abrupt stop + + Main.PlaySound(mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/MeatySlash"), projectile.Center); + Projectile proj = Projectile.NewProjectileDirect(Owner.Center - DashStart / 2f, Vector2.Zero, ProjectileType(), projectile.damage * 10, 0, Owner.whoAmI); + if (proj.modProjectile is SanguineFuryDash dash) + { + dash.DashStart = DashStart; + dash.DashEnd = Owner.Center; + } + + } + + Owner.Calamity().LungingDown = false; + + if (Dashing) + { + Owner.Calamity().LungingDown = true; + Owner.fallStart = (int)(Owner.position.Y / 16f); + Owner.velocity = Owner.DirectionTo(Wheel.Center) * 60f; + + if (Owner.Distance(Wheel.Center) < 60f) + Wheel.active = false; + } + + + if (Collision.SolidCollision(Owner.Center + (direction * 100 * projectile.scale) - Vector2.One * 5f, 10, 10) && !Dashing) + { + Pogo(); + projectile.netUpdate = true; + projectile.netSpam = 0; + } + + //Make the owner look like theyre holding the sword bla bla + Owner.heldProj = projectile.whoAmI; + Owner.direction = Math.Sign(direction.X); + Owner.itemRotation = direction.ToRotation(); + if (Owner.direction != 1) + { + Owner.itemRotation -= 3.14f; + } + Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); + Owner.itemTime = 2; + Owner.itemAnimation = 2; + + Shred--; + PogoCooldown--; + BounceTime--; + projectile.timeLeft = 2; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => ShredTarget(); + public override void OnHitPvp(Player target, int damage, bool crit) => ShredTarget(); + + private void ShredTarget() + { + if (Main.myPlayer != Owner.whoAmI) + return; + // get lifted up + if (PogoCooldown <= 0) + { + Main.PlaySound(SoundID.NPCHit30, projectile.Center); //Sizzle + Shred += 62; //Augment the shredspeed + if (Owner.velocity.Y > 0) + Owner.velocity.Y = -2f; //Get "stuck" into the enemy partly + Owner.GiveIFrames(5); // i framez. Do 5 iframes even matter? idk but you get a lot of em so lol... + PogoCooldown = 20; + } + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(SoundID.NPCHit43, projectile.Center); + if (ShredRatio > 0.25 && Owner.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(projectile.Center, direction * 16f, ProjectileType(), projectile.damage, projectile.knockBack, Owner.whoAmI, Shred); + } + Owner.Calamity().LungingDown = false; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/OmegaBiomeBlade"); + Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_SanguineFury"); + + int bladeAmount = 4; + + float drawAngle = direction.ToRotation(); + float drawRotation = drawAngle + MathHelper.PiOver4; + + Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOffset = Owner.Center + direction * 10f - Main.screenPosition; + + spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(MathHelper.Clamp(BounceTime, 0f, 20f) / 20f); + GameShaders.Misc["CalamityMod:BasicTint"].UseColor(new Color(207, 248, 255)); + GameShaders.Misc["CalamityMod:BasicTint"].Apply(); + + //Update the parameters + drawOrigin = new Vector2(0f, blade.Height); + + spriteBatch.Draw(blade, drawOffset, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + + for (int i = 0; i < bladeAmount; i++) //Draw extra copies + { + blade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_SanguineFuryExtra"); + + drawAngle = direction.ToRotation(); + + float circleCompletion = (float)Math.Sin(Main.GlobalTime * 5 + i * MathHelper.PiOver2); + drawRotation = drawAngle + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi / 9f) * ShredRatio); + + drawOrigin = new Vector2(0f, blade.Height); + + Vector2 drawOffsetStraight = Owner.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10 - Main.screenPosition; //How far from the player + Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly + Vector2 drawOffsetFromBounce = direction * MathHelper.Clamp(BounceTime, 0f, 20f) / 20f * 20f; + + spriteBatch.Draw(blade, drawOffsetStraight + drawDisplacementAngle + drawOffsetFromBounce, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + } + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(initialized); + writer.WriteVector2(direction); + } + public override void ReceiveExtraAI(BinaryReader reader) + { + initialized = reader.ReadBoolean(); + direction = reader.ReadVector2(); + } + } + + public class SanguineFuryWheel : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_SanguineFuryExtra"; + private bool initialized = false; + Vector2 direction = Vector2.Zero; + public ref float Shred => ref projectile.ai[0]; + public float ShredRatio => MathHelper.Clamp(Shred / (maxShred * 0.5f), 0f, 1f); + public Player Owner => Main.player[projectile.owner]; + + public float Timer => MaxTime - projectile.timeLeft; + + public const float maxShred = 500; //How much shred you get + public const float MaxTime = 120; + + + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Sanguine Wheel"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 55; + projectile.tileCollide = true; + projectile.ignoreWater = true; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 3; + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + projectile.velocity *= 0.5f; + return false; + } + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + float bladeLenght = 84 * projectile.scale; + float bladeWidth = 76 * projectile.scale; + + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center - direction * bladeLenght / 2, projectile.Center + direction * bladeLenght / 2, bladeWidth, ref collisionPoint); + } + + public override void AI() + { + if (!initialized) + { + Main.PlaySound(SoundID.Item90, projectile.Center); + initialized = true; + + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + projectile.rotation = direction.ToRotation(); + + projectile.timeLeft = (int)MaxTime; + projectile.velocity = direction * 16f; + + projectile.scale = 1f + ShredRatio ; //SWAGGER + projectile.netUpdate = true; + + } + + projectile.velocity *= 0.96f; + projectile.position += projectile.velocity; + + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + for (int i = 0; i < 4; i++) //Draw extra copies + { + var tex = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_SanguineFuryExtra"); + + float transition = MathHelper.Clamp((Timer - 15 - (i * 20)) / (MaxTime * 0.2f), 0f, 1f); + transition = MathHelper.Clamp(Timer / MaxTime, 0f, 1f); + + //float circleCompletion = (float)Math.Sin(Main.GlobalTime * 5 + i * MathHelper.PiOver2); + //float drawAngleShot = MathHelper.WrapAngle(direction.ToRotation() + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi / 9f) * ShredRatio)); + float drawAngleWheel = MathHelper.WrapAngle(i * MathHelper.PiOver2 + (Main.GlobalTime * 6)); + //Lerp between the position in the shot and the position in the wheel + //float drawAngle = MathHelper.WrapAngle(Utils.AngleLerp(drawAngleShot, drawAngleWheel, transition)); + + Vector2 drawOrigin = new Vector2(0f, tex.Height); + + + //Vector2 drawOffsetStraight = projectile.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10 - Main.screenPosition; //How far from the player + //Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly + //Vector2 drawPositionShot = drawOffsetStraight + drawDisplacementAngle; + Vector2 drawPositionWheel = projectile.Center - drawAngleWheel.ToRotationVector2() * 20f - Main.screenPosition; + + //Vector2 drawPosition = Vector2.Lerp(drawPositionShot, drawPositionWheel, transition); + + float opacityFade = projectile.timeLeft > 15 ? 1 : projectile.timeLeft / 15f; + + spriteBatch.Draw(tex, drawPositionWheel, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.8f * opacityFade, drawAngleWheel, drawOrigin, projectile.scale * 0.85f, 0f, 0f); + } + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(SoundID.Item60, projectile.Center); + for (int i = 0; i < 10; i++) + { + Particle Sparkle = new CritSpark(projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(17.5f, 25f) * projectile.scale, Color.White, Main.rand.NextBool() ? Color.Crimson : Color.DarkRed, 0.4f + Main.rand.NextFloat(0f, 3.5f), 20 + Main.rand.Next(30), 1, 3f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + } + + } + + public class SanguineFuryDash : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public Player Owner => Main.player[projectile.owner]; + public float Timer => 20 - projectile.timeLeft; + + public Vector2 DashStart; + public Vector2 DashEnd; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Shredding Lunge"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 8; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 60; + projectile.timeLeft = 20; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), DashStart, DashEnd); + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + Particle bloom = new StrongBloom(target.Center, target.velocity, Color.Crimson * 0.5f, 1f, 30); + GeneralParticleHandler.SpawnParticle(bloom); + + for (int i = 0; i < 3; i++) + { + Vector2 sparkSpeed = target.DirectionTo(Owner.Center).RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4)) * 9f; + Particle Spark = new CritSpark(target.Center, sparkSpeed, Color.White, Color.Crimson, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 0.6f); + GeneralParticleHandler.SpawnParticle(Spark); + } + + Owner.statLife += 3; + Owner.HealEffect(3); + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) //OMw to reuse way too much code from the entangling vines + { + + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + Texture2D lineTex = GetTexture("CalamityMod/Particles/ThinEndedLine"); + + Vector2 Shake = projectile.timeLeft < 15 ? Vector2.Zero : Vector2.One.RotatedByRandom(MathHelper.TwoPi) * (15 - projectile.timeLeft / 5f) * 0.5f; + float bump = (float)Math.Sin(((20f - projectile.timeLeft) / 20f) * MathHelper.Pi); + float raise = (float)Math.Sin(((20f - projectile.timeLeft) / 20f) * MathHelper.PiOver2); + + float rot = (DashEnd - DashStart).ToRotation() + MathHelper.PiOver2; + Vector2 origin = new Vector2(lineTex.Width / 2f, lineTex.Height); + Vector2 scale = new Vector2(0.2f, (DashEnd - DashStart).Length() / lineTex.Height); + + spriteBatch.Draw(lineTex, DashStart - Main.screenPosition + Shake, null, Color.Lerp(Color.White, Color.Crimson * 0.7f, raise), rot, origin, scale, SpriteEffects.None, 0); + + Texture2D sparkTexture = GetTexture("CalamityMod/Particles/ThinSparkle"); + Texture2D bloomTexture = GetTexture("CalamityMod/Particles/BloomCircle"); + //Ajust the bloom's texture to be the same size as the star's + float properBloomSize = (float)sparkTexture.Width / (float)bloomTexture.Height; + + + Rectangle frame = new Rectangle(0, 0, 14, 14); + + spriteBatch.Draw(bloomTexture, DashEnd - Main.screenPosition, null, Color.Crimson * bump * 0.5f, 0, bloomTexture.Size() / 2f, bump * 6f * properBloomSize, SpriteEffects.None, 0); + spriteBatch.Draw(sparkTexture, DashEnd - Main.screenPosition, frame, Color.Lerp(Color.White, Color.Crimson, raise) * bump, raise * MathHelper.TwoPi, frame.Size() / 2f, bump * 3f, SpriteEffects.None, 0); + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + return false; + } + } + + + //Mercurial tides aka Shockwave attunement public class MercurialTides : ModProjectile { @@ -678,10 +1162,12 @@ namespace CalamityMod.Projectiles.Melee if (Owner.whoAmI != Main.myPlayer || Owner.velocity.Y == 0f) return; - if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 5) - Main.LocalPlayer.Calamity().GeneralScreenShakePower = 5; + if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 15) + Main.LocalPlayer.Calamity().GeneralScreenShakePower = 15; + + Projectile proj = Projectile.NewProjectileDirect(Owner.Center + (direction * 120 * projectile.scale), -direction, ProjectileType(), projectile.damage * 2, 10f, Owner.whoAmI, Main.rand.Next(4), 1f); + proj.timeLeft = 81; - Projectile.NewProjectile(Owner.Center + (direction * 120 * projectile.scale), -direction, ProjectileType(), projectile.damage * 2, 10f, Owner.whoAmI, Main.rand.Next(4), 1f); SideSprouts(1, 150f, 1f * Charge / MaxCharge); SideSprouts(-1, 150f, 1f * Charge / MaxCharge); diff --git a/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.png b/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.png new file mode 100644 index 0000000000000000000000000000000000000000..ab2f92269581526398d9c8aab81c4650682617dd GIT binary patch literal 1079 zcmeAS@N?(olHy`uVBq!ia0vp^DImVE*Xo;uumf z=j|N({L2m!?e)`5CjJVI_`${F8Y>|ok?7!IpcHuUSW`>LR*{ey5eW`H21aF%r42r~ zHf-CLJp180soP(F#=p7q`pI{m(wcooo|GqktTfm7!v1P))z&b3oj^^?Z`+4vo$X`zbTlo;?8N! zy|&e56JEPIw>Ua;eUY%{QmI<}CCt}}mEqL8*_SU0B)<6}*O2d(1L-=nS1@Ngo-r{8(OpZ;cc7;Mu!y{bc!mv?11uUYmg%XbD{Z5+wj zJel#0--V@b&2n;X+2|TMP1MQqjD(q4%=>UV9x0`s-d@FO_58DoANkCA(PnzQZP^8Z z#GE;b+waRVGX!b7SzXO`o0sG~>(H84X43Y&g2$evMxILXo-r#z@a5TANzNBJcK`kO zWXZ)3K>OX~oxl0V&vsw=GgIGl=6mV3wbBnN_-9K6wgBC+rR~lB`l5uQXJ81Nlh1#6XXUK9FM5+Z#f^1LTqGW8eLXz?JR^hWqW6F6 z^-HS-GM&5Bbdv7Aud?>Ky|{JXlS#i0ua*>(QsQ~vR`V;h_rmXkPWk_1GL+Xau9JM9 zm!Iahhb~XMecAY-L}z@8`b@>mkOJo=91A zd2Z)SDP!YBvBfq~JA4BAzGW4kYyK1a@O7B z2KjgUBy-NJc5rS{JSb4@pTAY-_O&?*m;T1zvwCN9p%f_o@azP3^F9Wh*AuzAwgxTr zbS+*M_^Q@)5iii2LP;InacSRbmc>82cy_T}TwVdt78S{$^dnyXKNsi#1H59kYq_0V zh}`!3-YJ_l__f{0$pZ;{bSNI3`F_*3U{`xHkQRv`PfyqQ@SXieyEg%)dD1*$#ilO2 z*rS)`EqZLqH+gQLWovmeqwG@(Qe977+%K4Hx_}QD)1gTx+)~YhfN}Q%$O=ETZy|`~ zQRur;ugqZEmWDQt#b4i)URB)pe_c{AP?f}+fA>msyVITm)kPftt~fP2QiUIwm+S=+ uKQId(v$7LlJ=T5f0yrx|2@myu%pVO8{+(KwsRS$u7(8A5T-G@yGywp;t>Fa# literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedChain.png b/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedChain.png new file mode 100644 index 0000000000000000000000000000000000000000..38667e05df2d38576b81a950d04f19e2db509f5b GIT binary patch literal 244 zcmeAS@N?(olHy`uVBq!ia0vp^Ahr+(8<0%e?(Yqx7>k44ofy`glX(f`tn+kn4AGc) z_L5;2Q=kCLh3};-h6WQD9c>!L1&#=xV3SLAEKWYit@EbPXHSE=1WTfUfk0yU-`Rf} zIYW8gtXQ>DZ`VsM`S@;*`u%em?61pgxuu$sHl2gFJS?oSZasTf^NfmyPck6EPMt>xi^ sX?3wSGv_^iIVC{u)t;HQJ09CV_-Z_V3-dk;pvxINUHx3vIVCg!0DgL2W&i*H literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedHook.png b/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedHook.png new file mode 100644 index 0000000000000000000000000000000000000000..b39836239c81be5b12e464454d122423922b3aa2 GIT binary patch literal 868 zcmV-q1DpJbP)Px&9!W$&RCt{2n?Y;TKoo$#nN88(A_#&7i$}qOP(7#@K@Xx-@Ml&W-SDL@&IiNiagq7=BJh8`q;ztS}>l?u`%= z)Qq@)=wN8V1k}nlbz_AYA#`3@-u?8l@c75ku#c4(eGh1t%merm0 z@WzEp@IDH4NiGX1&iTx>9<062oHrwcxivz$wYv#`^S$uue4!co+4;zYzYCYX|0u*P zGeYRRj%b^&k6!_B`{N5>Sf8i?$wdaSAxXGxd=uGO)(r`wPGFjoca!kaO-0@fq5QDV;-5Yl@Px&14%?dRCt{2*-uCmVHn5p?})3rvbGzds4M;}Q(8#FGL;0Q=#W7KL4+5(cnUfM z(m6uv(7i(kp;OSsP@+p+BrzeC*iuBd^-qDD_vvQ+Nn~weY&0>>dvW2W_5O zdSxB-1TsbT{sSrr)wPuX%uapQ0oKCn0Gz$n0>IGo;q=TfO(YSfghVJR3Ee$60r)sO zne@8I))oL=4Gos#edFWy%rH$P5vGJh>}+oX;B>i?4%put)>l_8tB5;4Kjli4$s`e` zgzDXDYXe|&V?zfh_W6MLYH_@}4v6=R;K%|1i}UjUyv_1z03W;+0IWRi{a16hl_bKH zkOP3h{a--9?;m_3_#VHG9aFi#wYJB_i=w)(g2Dl0|1N$Gkf15i7=(?@K^nf z0C*g`I>eKpblkWAz`fh|0r0^Qc-V>QSsGj zqj%JnAGVD1HPryH_--12os;F3^PzrY+-PuE5|K$#_K0KW&I91sFrG&J&IkZi9uEKm zW)c)taaCzwll8a~Soi^ex3b7cLh$b=ZzoBFDIpOm2}Qcm5givduO zt7!n6?mPfO{S%fRGC#8nKzpm-a{o}ju>*~i6x#C%Y$Ay;CF>D7z>-mLI`@q4v`Rur zUX}*%HL_=19o|3BdH&jBft4+`QsQsRj_5`C`u}u!$tXlycQLQE%)62Fz7J z^#qlKRL=;%JWC|qAE+c`$}@%{i7+Kpt@Yw%0KQKzC;cC1rd84|k_aJ$_ya!yM~%$? TPyXX-00000NkvXXu0mjfI*)nJ literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/TrueBiomeBlade_SanguineFury.png b/Projectiles/Melee/TrueBiomeBlade_SanguineFury.png new file mode 100644 index 0000000000000000000000000000000000000000..a0483da6c4aaddefbc1f089fea1dd4cc4f55c953 GIT binary patch literal 1606 zcmV-M2D$l(P)Px*07*naRCt{2olS@wMHI*X)ib+FvWg%T`c@en+?MA>9!x^k#`JySJZ(_b^w zZ)V@`Qd`}%{ju}@{k}RA1z{j(u^j-gy6*r0K;Lke?%lsJ*H8d({pF7HdvBgQSn7OH zsoxSthN}AlxUv-O1OTWwHY2nKfR%-Jopn2Yy6nuWDn=B-3{i;3nXS7408y)L#&%l+ zKolE`_Z8yfD+b=*I7=y_5N3!%EbrZX4*)>5S^$8kW0jF8#csDgg$OAoq!dxegt6%r z^3L}A0Q4w;d`2so!=0N^nV<`Q?0+luxS?pv$5)Ifgc;4cFMtbibH>TQZQ7ACHzO$~ z1xFdAfLHe~Cr9dCN84$gD1;fJ5JGDO0CA(K?c8op_NR__oI3%a>r1v?{22i7^0#jT z=qg}it^vUDDUMPIQ3x|OO_X(d&l9QJXV=#O0MXSeW{hJKWl_}S=OJFSmCQTF^4E9m zRRF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aM#T?A@sgO@F}So1?PDL?_W}K?R}yWFw%H3m**srn08Aff^IDAl8hrf_ z!`5n~qD0xJIfiBY;Y-hj&oIJpSz-96$-eR|Z7V$4ND!iL2iDO2pT zWhoEeSg^k>H&}F3-_<#7aZ{KOq6wQKq}&;RSKWaf^5aQLwyxE((XPw#f1%}g7?-dF z|A}HWP)Lu}ajmTCtTJ~aZCh6h=GMo$)zp^j5uQF4fG6w)hS6Ztt!hII6(%Y(tkS~D zS|_IyZ#gV0`B;L*)1$y@f<1PDtup)M+wKOfYgm|Q?$+KL zn{uj`@9n3*$Jl+>Wx$EBc!q9`?dILwri9j$W89_m4dVLtfzU>7(41GS&zmQ#huxnF zuK4rE*LwZ^H3dWqgcKl7VwmxHK1K;E3ocjURNq=BIuDAgc7IW3m*a&Ht=L~Kjjzf` z3&w?{=@_yv(O?5L3r?6@#<%vDnJs*bNQg7`_3D~KUA(o^UZHw$gmUkrRiGYFmM4=9 z5NxZNRQuA!+tr@VSut;H(*`-&ps|upxLUKOPM)OPvi!0^d)u9>tCJ{Lpw2~KDR%o6 zS#-FMu%%QT+LHdV<>P%r1zTs;?2r3zmctSe?91z-$$jWy*K2A!FpWhQmX5d^*I#3U z4|JhR+S1kPHpv>b=Ir5NFw5XQC=G#{BK3w4a{PJO*3+2V;=T_vU+pF9Uc%Bk%M1;L zBK>PT{5~;G2m#i8@FW|Izbs2(y3i+)uw`jT(GCzE!bLbz10ba?cG#44rEi;CR&C zDNi+|+|W<7yCTx)>96^7nZnR$nbu}4!C!j-(pN7iJ#;1u Date: Sun, 16 Jan 2022 02:38:22 +0100 Subject: [PATCH 49/76] Bundled together the balance stats --- Items/Weapons/Melee/BiomeBlade.cs | 22 ++++----- Items/Weapons/Melee/TrueBiomeBlade.cs | 48 ++++++++++++++++++- .../Melee/MendedBiomeBladeProjectiles.cs | 45 +++++++---------- 3 files changed, 75 insertions(+), 40 deletions(-) diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index 7df7fe63e6..29c8ed44ec 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -31,21 +31,21 @@ namespace CalamityMod.Items.Weapons.Melee public int CanLunge = 1; #region stats - public const int DefaultAttunement_BaseDamage = 55; + public static int DefaultAttunement_BaseDamage = 55; - public const int EvilAttunement_BaseDamage = 55; - public const int EvilAttunement_Lifesteal = 3; - public const int EvilAttunement_BounceIFrames = 10; + public static int EvilAttunement_BaseDamage = 102; + public static int EvilAttunement_Lifesteal = 3; + public static int EvilAttunement_BounceIFrames = 10; - public const int ColdAttunement_BaseDamage = 70; - public const float ColdAttunement_SecondSwingBoost = 1.8f; - public const float ColdAttunement_ThirdSwingBoost = 3f; + public static int ColdAttunement_BaseDamage = 70; + public static float ColdAttunement_SecondSwingBoost = 1.8f; + public static float ColdAttunement_ThirdSwingBoost = 3f; - public const int HotAttunement_BaseDamage = 70; - public const int HotAttunement_ShredIFrames = 8; + public static int HotAttunement_BaseDamage = 70; + public static int HotAttunement_ShredIFrames = 8; - public const int TropicalAttunement_BaseDamage = 55; - public const float TropicalAttunement_ChainDamageReduction = 0.5f; + public static int TropicalAttunement_BaseDamage = 55; + public static float TropicalAttunement_ChainDamageReduction = 0.5f; #endregion public override void SetStaticDefaults() diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 2d2d61a864..0b30331c81 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -26,6 +26,42 @@ namespace CalamityMod.Items.Weapons.Melee public int Combo = 0; public int StoredLunges = 2; public int PowerLungeCounter = 0; + + #region stats + public static int DefaultAttunement_BaseDamage = 160; + public static int DefaultAttunement_SigilTime = 600; + + public static int EvilAttunement_BaseDamage = 320; + public static int EvilAttunement_Lifesteal = 4; + public static int EvilAttunement_BounceIFrames = 10; + public static float EvilAttunement_SlashDamageBoost = 3f; + + public static int ColdAttunement_BaseDamage = 320; + public static float ColdAttunement_SecondSwingBoost = 1.8f; + public static float ColdAttunement_ThirdSwingBoost = 3f; + public static float ColdAttunement_MistDamageReduction = 0.2f; + + public static int HotAttunement_BaseDamage = 320; + public static int HotAttunement_ShredIFrames = 8; + public static float HotAttunement_ShotDamageBoost = 2; + + public static int TropicalAttunement_BaseDamage = 160; + public static float TropicalAttunement_ChainDamageReduction = 0.5f; + public static float TropicalAttunement_VineDamageReduction = 0.5f; + + public static int HolyAttunement_BaseDamage = 160; + public static float HolyAttunement_ZeroChargeDamageReduction = 0.2f; + public static float HolyAttunement_FullChargeDamageBoost = 2f; + + public static int AstralAttunement_BaseDamage = 500; + public static int AstralAttunement_DashHitIFrames = 30; + public static float AstralAttunement_FullChargeBoost = 1f; //The EXTRA damage boost. So putting 1 here will make it deal double damage. Putting 0.5 here will make it deal 1.5x the damage. + public static float AstralAttunement_MonolithDamageBoost = 2f; + + public static int MarineAttunement_BaseDamage = 160; + #endregion + + public override void SetStaticDefaults() { DisplayName.SetDefault("Biome Blade"); @@ -270,6 +306,7 @@ namespace CalamityMod.Items.Weapons.Melee switch (mainAttunement) { case Attunement.Default: + item.damage = DefaultAttunement_BaseDamage; item.channel = false; item.noUseGraphic = false; item.useStyle = ItemUseStyleID.SwingThrow; @@ -282,6 +319,7 @@ namespace CalamityMod.Items.Weapons.Melee PowerLungeCounter = 0; break; case Attunement.Hot: + item.damage = HotAttunement_BaseDamage; item.channel = true; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.HoldingOut; @@ -294,6 +332,7 @@ namespace CalamityMod.Items.Weapons.Melee PowerLungeCounter = 0; break; case Attunement.Cold: + item.damage = ColdAttunement_BaseDamage; item.channel = true; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.HoldingOut; @@ -305,6 +344,7 @@ namespace CalamityMod.Items.Weapons.Melee PowerLungeCounter = 0; break; case Attunement.Tropical: + item.damage = TropicalAttunement_BaseDamage; item.channel = false; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.SwingThrow; @@ -316,6 +356,7 @@ namespace CalamityMod.Items.Weapons.Melee PowerLungeCounter = 0; break; case Attunement.Evil: + item.damage = EvilAttunement_BaseDamage; item.channel = false; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.Stabbing; @@ -327,6 +368,7 @@ namespace CalamityMod.Items.Weapons.Melee Combo = 0; break; case Attunement.Holy: + item.damage = HolyAttunement_BaseDamage; item.channel = true; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.HoldingOut; @@ -339,6 +381,7 @@ namespace CalamityMod.Items.Weapons.Melee PowerLungeCounter = 0; break; case Attunement.Astral: + item.damage = AstralAttunement_BaseDamage; item.channel = true; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.Stabbing; @@ -351,6 +394,7 @@ namespace CalamityMod.Items.Weapons.Melee PowerLungeCounter = 0; break; case Attunement.Marine: + item.damage = MarineAttunement_BaseDamage; item.channel = false; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.Stabbing; @@ -444,7 +488,7 @@ namespace CalamityMod.Items.Weapons.Melee powerLungeAvailable = true; PowerLungeCounter = 0; } - Projectile proj = Projectile.NewProjectileDirect(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage * 2, knockBack, player.whoAmI, 26f, StoredLunges > 0 ? 1f : 0f); + Projectile proj = Projectile.NewProjectileDirect(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 26f, StoredLunges > 0 ? 1f : 0f); if (proj.modProjectile is TrueDecaysRetort rapier) rapier.ChargedUp = powerLungeAvailable; StoredLunges --; @@ -469,7 +513,7 @@ namespace CalamityMod.Items.Weapons.Melee { //Reset the timeleft on the sigil & give it its new target (or the same, it doesnt matter really. proj.ai[0] = target.whoAmI; - proj.timeLeft = 600; + proj.timeLeft = DefaultAttunement_SigilTime; return; } } diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 0782c8806e..99d69aed19 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -126,7 +126,7 @@ namespace CalamityMod.Projectiles.Melee projectile.friendly = false; projectile.hostile = false; projectile.penetrate = -1; - projectile.timeLeft = 600; + projectile.timeLeft = TrueBiomeBlade.DefaultAttunement_SigilTime; projectile.melee = true; projectile.tileCollide = false; } @@ -169,7 +169,6 @@ namespace CalamityMod.Projectiles.Melee public bool ChargedUp; public Player Owner => Main.player[projectile.owner]; public const float LungeSpeed = 16; - public const float PowerLungeDistance = 500; public ref float CanBounce => ref projectile.localAI[0]; public ref float dashTimer => ref projectile.localAI[1]; public const float maxDash = 20f; @@ -237,7 +236,7 @@ namespace CalamityMod.Projectiles.Melee Owner.velocity *= 0.1f; //Abrupt stop Owner.Calamity().LungingDown = false; - Projectile proj = Projectile.NewProjectileDirect(Owner.Center - PowerLungeStart / 2f, Vector2.Zero, ProjectileType(), projectile.damage * 2, 0, Owner.whoAmI); + Projectile proj = Projectile.NewProjectileDirect(Owner.Center - PowerLungeStart / 2f, Vector2.Zero, ProjectileType(), (int)(projectile.damage * TrueBiomeBlade.EvilAttunement_SlashDamageBoost), 0, Owner.whoAmI); if (proj.modProjectile is DecaysRetortDash dash) { dash.DashStart = PowerLungeStart; @@ -293,8 +292,8 @@ namespace CalamityMod.Projectiles.Melee if (!cannotLifesteal) //trolled { - Owner.statLife += 3; - Owner.HealEffect(3); //Idk if its too much or what but at the same time its close range as fuck + Owner.statLife += TrueBiomeBlade.EvilAttunement_Lifesteal; + Owner.HealEffect(TrueBiomeBlade.EvilAttunement_Lifesteal); //Idk if its too much or what but at the same time its close range as fuck } if (Main.myPlayer != Owner.whoAmI || CanBounce == 0f) return; @@ -303,7 +302,7 @@ namespace CalamityMod.Projectiles.Melee bounceStrength *= Owner.velocity.Y == 0 ? 0.2f : 1f; //Reduce the bounce if the player is on the ground Owner.velocity = -direction.SafeNormalize(Vector2.Zero) * MathHelper.Clamp(bounceStrength, 0f, 22f); CanBounce = 0f; - Owner.GiveIFrames(10); // 10 i frames for free! + Owner.GiveIFrames(TrueBiomeBlade.EvilAttunement_BounceIFrames); // i frames for free! if (Owner.whoAmI == Main.myPlayer) { if (Owner.HeldItem.modItem is TrueBiomeBlade sword) @@ -468,7 +467,6 @@ namespace CalamityMod.Projectiles.Melee public ref float SwingMode => ref projectile.ai[0]; //0 = Up-Down small slash, 1 = Down-Up large slash, 2 = Thrust public ref float MaxTime => ref projectile.ai[1]; public float Timer => MaxTime - projectile.timeLeft; - const float MistDamageReduction = 0.2f; public int SwingDirection { @@ -556,18 +554,17 @@ namespace CalamityMod.Projectiles.Melee case 0: projectile.width = projectile.height = 100; Main.PlaySound(SoundID.DD2_MonkStaffSwing, projectile.Center); - projectile.damage = (int)(projectile.damage * 1.5); break; case 1: projectile.width = projectile.height = 100; projectile.width = projectile.height = 100; Main.PlaySound(SoundID.DD2_OgreSpit, projectile.Center); - projectile.damage = (int)(projectile.damage * 1.8); + projectile.damage = (int)(projectile.damage * TrueBiomeBlade.ColdAttunement_SecondSwingBoost); break; case 2: projectile.width = projectile.height = 170; Main.PlaySound(SoundID.DD2_PhantomPhoenixShot, projectile.Center); - projectile.damage *= 3; + projectile.damage *= (int)(projectile.damage * TrueBiomeBlade.ColdAttunement_ThirdSwingBoost); break; } @@ -603,7 +600,7 @@ namespace CalamityMod.Projectiles.Melee if (Main.rand.NextBool()) { - Projectile mist = Projectile.NewProjectileDirect(Owner.Center + direction * 40 + Main.rand.NextVector2Circular(30f, 30f), Vector2.Zero, ProjectileType(), (int)(projectile.damage * MistDamageReduction), 0f, Owner.whoAmI); + Projectile mist = Projectile.NewProjectileDirect(Owner.Center + direction * 40 + Main.rand.NextVector2Circular(30f, 30f), Vector2.Zero, ProjectileType(), (int)(projectile.damage * TrueBiomeBlade.ColdAttunement_MistDamageReduction), 0f, Owner.whoAmI); mist.velocity = (mist.Center - Owner.Center) * 0.2f + Owner.velocity; } @@ -613,7 +610,7 @@ namespace CalamityMod.Projectiles.Melee { if (Main.rand.NextFloat(0f, 1f) > 0.75f) { - Projectile.NewProjectile(Owner.Center + direction * 40, rotation.ToRotationVector2() * 5, ProjectileType(), (int)(projectile.damage * MistDamageReduction), 0f, Owner.whoAmI); + Projectile.NewProjectile(Owner.Center + direction * 40, rotation.ToRotationVector2() * 5, ProjectileType(), (int)(projectile.damage * TrueBiomeBlade.ColdAttunement_MistDamageReduction), 0f, Owner.whoAmI); Vector2 particlePosition = Owner.Center + (rotation.ToRotationVector2() * 100f * projectile.scale); Particle snowflake = new SnowflakeSparkle(particlePosition, rotation.ToRotationVector2() * 3f, Color.White, new Color(75, 177, 250), Main.rand.NextFloat(0.3f, 1.5f), 40, 0.5f); @@ -936,7 +933,7 @@ namespace CalamityMod.Projectiles.Melee Shred += 62; //Augment the shredspeed if (Owner.velocity.Y > 0) Owner.velocity.Y = -2f; //Get "stuck" into the enemy partly - Owner.GiveIFrames(5); // i framez. Do 5 iframes even matter? idk but you get a lot of em so lol... + Owner.GiveIFrames(TrueBiomeBlade.HotAttunement_ShredIFrames); // i framez. Do 5 iframes even matter? idk but you get a lot of em so lol... PogoCooldown = 20; } } @@ -946,7 +943,7 @@ namespace CalamityMod.Projectiles.Melee Main.PlaySound(SoundID.NPCHit43, projectile.Center); if (ShredRatio > 0.5 && Owner.whoAmI == Main.myPlayer) //Keep this for the True biome blade/Repaired biome blade. { - Projectile.NewProjectile(projectile.Center, direction * 16f, ProjectileType(), projectile.damage, projectile.knockBack, Owner.whoAmI, Shred); + Projectile.NewProjectile(projectile.Center, direction * 16f, ProjectileType(), (int)(projectile.damage * TrueBiomeBlade.HotAttunement_ShotDamageBoost), projectile.knockBack, Owner.whoAmI, Shred); } } @@ -1144,7 +1141,6 @@ namespace CalamityMod.Projectiles.Melee const int MaxReach = 400; const float SnappingPoint = 0.55f; //When does the snap occur. const float ReelBackStrenght = 14f; - const float ChainDamageReduction = 0.5f; const float MaxTangleReach = 400f; //How long can tangling vines from crits be @@ -1197,7 +1193,6 @@ namespace CalamityMod.Projectiles.Melee public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - base.ModifyHitNPC(target, ref damage, ref knockback, ref crit, ref hitDirection); Vector2 projectileHalfLenght = 85f * projectile.rotation.ToRotationVector2(); float collisionPoint = 0; //If you hit the enemy during the coyote time with the blade of the whip, guarantee a crit @@ -1216,7 +1211,7 @@ namespace CalamityMod.Projectiles.Melee } } else - damage = (int)(damage * ChainDamageReduction); //If the enemy is hit with the chain of the whip, the damage gets reduced + damage = (int)(damage * TrueBiomeBlade.TropicalAttunement_ChainDamageReduction); //If the enemy is hit with the chain of the whip, the damage gets reduced } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) @@ -1235,7 +1230,7 @@ namespace CalamityMod.Projectiles.Melee boing = true; Main.PlaySound(SoundID.Item56); } - Projectile.NewProjectile(target.Center, Vector2.Zero, ProjectileType(), damage / 2, 0, Owner.whoAmI, target.whoAmI, potentialTarget.whoAmI); + Projectile.NewProjectile(target.Center, Vector2.Zero, ProjectileType(), (int)(damage * TrueBiomeBlade.TropicalAttunement_VineDamageReduction), 0, Owner.whoAmI, target.whoAmI, potentialTarget.whoAmI); } Array.Clear(excludedTargets, 0, 3); } @@ -1533,10 +1528,6 @@ namespace CalamityMod.Projectiles.Melee public ref float hasMadeChargeSound => ref projectile.localAI[1]; public const float maxEmpowerment = 600f; - //How much damage reduction applies on uncharged attacks - public const float initialDamage = 0.2f; - //How much extra damage applies when fully charged. This goes ontop of the initial damage, so a max empowerment boost of 2 with an initial damage of 0.1 makes the total damage multiplier be 1.9 - public float maxEmpowermentBoost = 2f; public float throwTimer => throwOutTime - projectile.timeLeft; public Particle smear; @@ -1694,7 +1685,7 @@ namespace CalamityMod.Projectiles.Melee public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - damage = (int)(damage * (initialDamage + (maxEmpowermentBoost * Empowerment / maxEmpowerment))); + damage = (int)(damage * (TrueBiomeBlade.HolyAttunement_ZeroChargeDamageReduction + (TrueBiomeBlade.HolyAttunement_FullChargeDamageBoost * Empowerment / maxEmpowerment))); } public override void Kill(int timeLeft) @@ -1992,7 +1983,7 @@ namespace CalamityMod.Projectiles.Melee //Only create the central monolith if over half charge if (Charge / MaxCharge < 0.5f) return; - Projectile.NewProjectile(Owner.Center + (direction * 120 * projectile.scale), -direction, ProjectileType(), projectile.damage * 2, 10f, Owner.whoAmI, Main.rand.Next(4), 1f); + Projectile.NewProjectile(Owner.Center + (direction * 120 * projectile.scale), -direction, ProjectileType(), (int)(projectile.damage * TrueBiomeBlade.AstralAttunement_MonolithDamageBoost), 10f, Owner.whoAmI, Main.rand.Next(4), 1f); //Only create the side monoliths if over 3/4th charge if (Charge / MaxCharge < 0.75f) @@ -2029,7 +2020,7 @@ namespace CalamityMod.Projectiles.Melee { Vector2 projPosition = Owner.Center + (direction * 120 * projectile.scale) + direction.RotatedBy((widestSurfaceAngle * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; Vector2 monolithRotation = direction.RotatedBy(Utils.AngleLerp(widestSurfaceAngle * -facing, 0f, projSize)); - Projectile proj = Projectile.NewProjectileDirect(projPosition, -monolithRotation, ProjectileType(), projectile.damage * 2, 10f, Owner.whoAmI, Main.rand.Next(4), projSize); + Projectile proj = Projectile.NewProjectileDirect(projPosition, -monolithRotation, ProjectileType(), (int)(projectile.damage * TrueBiomeBlade.AstralAttunement_MonolithDamageBoost), 10f, Owner.whoAmI, Main.rand.Next(4), projSize); if (proj.modProjectile is TheirAbhorrenceMonolith monolith) monolith.WaitTimer = (1 - projSize) * 34f; } @@ -2039,12 +2030,12 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - Owner.GiveIFrames(30); + Owner.GiveIFrames(TrueBiomeBlade.AstralAttunement_DashHitIFrames); } public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - damage = (int)(damage * (1f + Charge / MaxCharge)); + damage = (int)(damage * (1f + TrueBiomeBlade.AstralAttunement_FullChargeBoost * Charge / MaxCharge)); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) From 710456f22036e13ccf0baa111870eba2f950007d Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sun, 16 Jan 2022 03:02:07 +0100 Subject: [PATCH 50/76] More stat bundling --- Items/Weapons/Melee/OmegaBiomeBlade.cs | 48 ++++++++++++++++++- Items/Weapons/Melee/TrueBiomeBlade.cs | 3 +- .../Melee/MendedBiomeBladeProjectiles.cs | 4 +- .../Melee/TrueBiomeBladeProjectiles.cs | 40 +++++++--------- 4 files changed, 68 insertions(+), 27 deletions(-) diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index 051e15a4a6..e5c4cb30ae 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -25,6 +25,47 @@ namespace CalamityMod.Items.Weapons.Melee public Attunement? secondaryAttunement = null; public int Combo = 0; public int UseTimer = 0; + public bool OnHitProc = false; + + #region stats + public static int WhirlwindAttunement_BaseDamage = 400; + public static int WhirlwindAttunement_SigilTime = 1200; + public static float WhirlwindAttunement_BeamDamageReduction = 0.5f; + public static float WhirlwindAttunement_BaseDamageReduction = 0.2f; + public static float WhirlwindAttunement_FullChargeDamageBoost = 2f; + + public static int WhirlwindAttunement_PassiveBaseDamage = 200; + + + public static int ShockwaveAttunement_BaseDamage = 1500; + public static int ShockwaveAttunement_DashHitIFrames = 60; + public static float ShockwaveAttunement_FullChargeBoost = 1f; //The EXTRA damage boost. So putting 1 here will make it deal double damage. Putting 0.5 here will make it deal 1.5x the damage. + public static float ShockwaveAttunement_MonolithDamageBoost = 2f; + public static float ShockwaveAttunement_BlastDamageReduction = 0.6f; + + public static int ShockwaveAttunement_PassiveBaseDamage = 200; + + + public static int SuperPogoAttunement_BaseDamage = 500; + public static int SuperPogoAttunement_ShredIFrames = 10; + public static float SuperPogoAttunement_SlashDamageBoost = 10f; + public static int SuperPogoAttunementSlashLifesteal = 6; + public static int SuperPogoAttunement_SlashIFrames = 60; + public static float SuperPogoAttunement_ShotDamageBoost = 2f; + + public static float SuperPogoAttunement_PassiveLifeSteal = 10; + + + public static int ColdAttunement_BaseDamage = 320; + public static float ColdAttunement_SecondSwingBoost = 1.8f; + public static float ColdAttunement_ThirdSwingBoost = 3f; + public static float ColdAttunement_MistDamageReduction = 0.2f; + + + public static int TropicalAttunement_BaseDamage = 160; + public static float TropicalAttunement_ChainDamageReduction = 0.5f; + public static float TropicalAttunement_VineDamageReduction = 0.5f; + #endregion public override void SetStaticDefaults() { @@ -258,6 +299,7 @@ namespace CalamityMod.Items.Weapons.Melee switch (mainAttunement) { case Attunement.Whirlwind: + item.damage = WhirlwindAttunement_BaseDamage; item.channel = true; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.HoldingOut; @@ -267,6 +309,7 @@ namespace CalamityMod.Items.Weapons.Melee item.noMelee = true; break; case Attunement.SuperPogo: + item.damage = SuperPogoAttunement_BaseDamage; item.channel = true; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.HoldingOut; @@ -276,6 +319,7 @@ namespace CalamityMod.Items.Weapons.Melee item.noMelee = true; break; case Attunement.Shockwave: + item.damage = ShockwaveAttunement_BaseDamage; item.channel = true; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.HoldingOut; @@ -311,7 +355,7 @@ namespace CalamityMod.Items.Weapons.Melee if (UseTimer % 30 == 29 && Main.rand.Next(2) == 0) { Main.PlaySound(SoundID.Item78); - Projectile beamSword = Projectile.NewProjectileDirect(player.Center, player.DirectionTo(Main.MouseWorld) * 15f, ProjectileType(), (int)(item.damage * 0.3f), 10f, player.whoAmI, 1f); + Projectile beamSword = Projectile.NewProjectileDirect(player.Center, player.DirectionTo(Main.MouseWorld) * 15f, ProjectileType(), (int)(WhirlwindAttunement_PassiveBaseDamage * player.MeleeDamage()), 10f, player.whoAmI, 1f); beamSword.timeLeft = 50; } break; @@ -319,7 +363,7 @@ namespace CalamityMod.Items.Weapons.Melee break; case Attunement.Shockwave: if (UseTimer % 120 == 119) - Projectile.NewProjectile(player.Center, Vector2.Zero, ProjectileType(), (int)(item.damage * 0.6f), 10f, player.whoAmI, 1f); + Projectile.NewProjectile(player.Center, Vector2.Zero, ProjectileType(), (int)(ShockwaveAttunement_PassiveBaseDamage * player.MeleeDamage()), 10f, player.whoAmI, 1f); break; case Attunement.FlailBlade: break; diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 0b30331c81..5aa7293b14 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -35,6 +35,7 @@ namespace CalamityMod.Items.Weapons.Melee public static int EvilAttunement_Lifesteal = 4; public static int EvilAttunement_BounceIFrames = 10; public static float EvilAttunement_SlashDamageBoost = 3f; + public static int EvilAttunement_SlashIFrames = 60; public static int ColdAttunement_BaseDamage = 320; public static float ColdAttunement_SecondSwingBoost = 1.8f; @@ -50,7 +51,7 @@ namespace CalamityMod.Items.Weapons.Melee public static float TropicalAttunement_VineDamageReduction = 0.5f; public static int HolyAttunement_BaseDamage = 160; - public static float HolyAttunement_ZeroChargeDamageReduction = 0.2f; + public static float HolyAttunement_BaseDamageReduction = 0.2f; public static float HolyAttunement_FullChargeDamageBoost = 2f; public static int AstralAttunement_BaseDamage = 500; diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 99d69aed19..84f385dc62 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -276,7 +276,7 @@ namespace CalamityMod.Projectiles.Melee Owner.Calamity().LungingDown = true; PowerLungeStart = Owner.Center; dashTimer = 1f; - Owner.GiveIFrames(60); + Owner.GiveIFrames(TrueBiomeBlade.EvilAttunement_SlashIFrames); } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => OnHitEffects(!target.canGhostHeal || Main.player[projectile.owner].moonLeech); @@ -1685,7 +1685,7 @@ namespace CalamityMod.Projectiles.Melee public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - damage = (int)(damage * (TrueBiomeBlade.HolyAttunement_ZeroChargeDamageReduction + (TrueBiomeBlade.HolyAttunement_FullChargeDamageBoost * Empowerment / maxEmpowerment))); + damage = (int)(damage * (TrueBiomeBlade.HolyAttunement_BaseDamageReduction + (TrueBiomeBlade.HolyAttunement_FullChargeDamageBoost * Empowerment / maxEmpowerment))); } public override void Kill(int timeLeft) diff --git a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs index 6ba4bdee2e..db3db9433d 100644 --- a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs @@ -43,10 +43,6 @@ namespace CalamityMod.Projectiles.Melee public ref float hasMadeChargeSound => ref projectile.localAI[1]; public const float maxEmpowerment = 600f; - //How much damage reduction applies on uncharged attacks - public const float initialDamage = 0.2f; - //How much extra damage applies when fully charged. This goes ontop of the initial damage, so a max empowerment boost of 2 with an initial damage of 0.1 makes the total damage multiplier be 1.9 - public float maxEmpowermentBoost = 2f; public float throwTimer => throwOutTime - projectile.timeLeft; @@ -165,7 +161,7 @@ namespace CalamityMod.Projectiles.Melee { shotDirection = (shotDirection.ToRotation().AngleTowards(Owner.AngleTo(lastTarget.Center), MathHelper.PiOver2)).ToRotationVector2() * 15f; } - Projectile.NewProjectile(Owner.Center, shotDirection, ProjectileType(), (int)(projectile.damage * 0.5f), 0f, Owner.whoAmI); + Projectile.NewProjectile(Owner.Center, shotDirection, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.WhirlwindAttunement_BeamDamageReduction), 0f, Owner.whoAmI); } } @@ -211,7 +207,7 @@ namespace CalamityMod.Projectiles.Melee Particle Blink = new GenericSparkle(Owner.Center + Owner.DirectionTo(Main.MouseWorld) * projectile.scale * 1.88f * 78f, Owner.velocity, Color.White, currentColor, 1.5f, 10, 0.1f, 3f); GeneralParticleHandler.SpawnParticle(Blink); - Projectile.NewProjectile(Owner.Center, Owner.DirectionTo(Main.MouseWorld) * 15f, ProjectileType(), (int)(projectile.damage * 0.5f), 0f, Owner.whoAmI); + Projectile.NewProjectile(Owner.Center, Owner.DirectionTo(Main.MouseWorld) * 15f, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.WhirlwindAttunement_BeamDamageReduction), 0f, Owner.whoAmI); CanDirectFire = false; AngleReset = Owner.DirectionTo(Main.MouseWorld).ToRotation(); } @@ -265,7 +261,7 @@ namespace CalamityMod.Projectiles.Melee public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - damage = (int)(damage * (initialDamage + (maxEmpowermentBoost * Empowerment / maxEmpowerment))); + damage = (int)(damage * (OmegaBiomeBlade.WhirlwindAttunement_BaseDamageReduction + (OmegaBiomeBlade.WhirlwindAttunement_FullChargeDamageBoost * Empowerment / maxEmpowerment))); if (CurrentState != 1) return; @@ -278,12 +274,12 @@ namespace CalamityMod.Projectiles.Melee { //Reset the timeleft on the sigil & give it its new target (or the same, it doesnt matter really. proj.ai[0] = target.whoAmI; - proj.timeLeft = 1200; + proj.timeLeft = OmegaBiomeBlade.WhirlwindAttunement_SigilTime; return; } } Projectile sigil = Projectile.NewProjectileDirect(target.Center, Vector2.Zero, ProjectileType(), 0, 0, Owner.whoAmI, target.whoAmI); - sigil.timeLeft = 1200; + sigil.timeLeft = OmegaBiomeBlade.WhirlwindAttunement_SigilTime; } public override void Kill(int timeLeft) @@ -604,7 +600,7 @@ namespace CalamityMod.Projectiles.Melee Dashing = true; DashStart = Owner.Center; Wheel.timeLeft = 60; - Owner.GiveIFrames(60); + Owner.GiveIFrames(OmegaBiomeBlade.SuperPogoAttunement_SlashIFrames); break; } } @@ -640,7 +636,7 @@ namespace CalamityMod.Projectiles.Melee Owner.velocity *= 0.1f; //Abrupt stop Main.PlaySound(mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/MeatySlash"), projectile.Center); - Projectile proj = Projectile.NewProjectileDirect(Owner.Center - DashStart / 2f, Vector2.Zero, ProjectileType(), projectile.damage * 10, 0, Owner.whoAmI); + Projectile proj = Projectile.NewProjectileDirect(Owner.Center - DashStart / 2f, Vector2.Zero, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.SuperPogoAttunement_SlashDamageBoost), 0, Owner.whoAmI); if (proj.modProjectile is SanguineFuryDash dash) { dash.DashStart = DashStart; @@ -701,7 +697,7 @@ namespace CalamityMod.Projectiles.Melee Shred += 62; //Augment the shredspeed if (Owner.velocity.Y > 0) Owner.velocity.Y = -2f; //Get "stuck" into the enemy partly - Owner.GiveIFrames(5); // i framez. Do 5 iframes even matter? idk but you get a lot of em so lol... + Owner.GiveIFrames(OmegaBiomeBlade.SuperPogoAttunement_ShredIFrames); // i framez. PogoCooldown = 20; } } @@ -711,7 +707,7 @@ namespace CalamityMod.Projectiles.Melee Main.PlaySound(SoundID.NPCHit43, projectile.Center); if (ShredRatio > 0.25 && Owner.whoAmI == Main.myPlayer) { - Projectile.NewProjectile(projectile.Center, direction * 16f, ProjectileType(), projectile.damage, projectile.knockBack, Owner.whoAmI, Shred); + Projectile.NewProjectile(projectile.Center, direction * 16f, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.SuperPogoAttunement_ShotDamageBoost) , projectile.knockBack, Owner.whoAmI, Shred); } Owner.Calamity().LungingDown = false; } @@ -945,8 +941,8 @@ namespace CalamityMod.Projectiles.Melee GeneralParticleHandler.SpawnParticle(Spark); } - Owner.statLife += 3; - Owner.HealEffect(3); + Owner.statLife += OmegaBiomeBlade.SuperPogoAttunementSlashLifesteal; + Owner.HealEffect(OmegaBiomeBlade.SuperPogoAttunementSlashLifesteal); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) //OMw to reuse way too much code from the entangling vines { @@ -1089,7 +1085,7 @@ namespace CalamityMod.Projectiles.Melee if ((Charge / MaxCharge >= 0.25f && CurrentIndicator == 0f) || (Charge / MaxCharge >= 0.5f && CurrentIndicator == 1f) || (Charge / MaxCharge >= 0.75f && CurrentIndicator == 2f)) { - Projectile.NewProjectile(Owner.Center, Vector2.Zero, ProjectileType(), (int)(projectile.damage * 0.6f), 10f, Owner.whoAmI, 1f + CurrentIndicator * 0.15f); + Projectile.NewProjectile(Owner.Center, Vector2.Zero, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_BlastDamageReduction), 10f, Owner.whoAmI, 1f + CurrentIndicator * 0.15f); Main.PlaySound(SoundID.DD2_WitherBeastAuraPulse, projectile.Center); CurrentIndicator++; OverCharge = 20f; @@ -1100,7 +1096,7 @@ namespace CalamityMod.Projectiles.Melee Charge = MaxCharge; if (Owner.whoAmI == Main.myPlayer && CurrentIndicator < 4f) { - Projectile.NewProjectile(Owner.Center, Vector2.Zero, ProjectileType(), (int)(projectile.damage * 0.6f), 10f, Owner.whoAmI, 1f + CurrentIndicator * 0.15f); + Projectile.NewProjectile(Owner.Center, Vector2.Zero, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_BlastDamageReduction), 10f, Owner.whoAmI, 1f + CurrentIndicator * 0.15f); OverCharge = 20f; Main.PlaySound(mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/CorvinaScream"), projectile.Center); CurrentIndicator++; @@ -1165,7 +1161,7 @@ namespace CalamityMod.Projectiles.Melee if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 15) Main.LocalPlayer.Calamity().GeneralScreenShakePower = 15; - Projectile proj = Projectile.NewProjectileDirect(Owner.Center + (direction * 120 * projectile.scale), -direction, ProjectileType(), projectile.damage * 2, 10f, Owner.whoAmI, Main.rand.Next(4), 1f); + Projectile proj = Projectile.NewProjectileDirect(Owner.Center + (direction * 120 * projectile.scale), -direction, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_MonolithDamageBoost), 10f, Owner.whoAmI, Main.rand.Next(4), 1f); proj.timeLeft = 81; @@ -1197,7 +1193,7 @@ namespace CalamityMod.Projectiles.Melee { Vector2 projPosition = Owner.Center + (direction * 120 * projectile.scale) + direction.RotatedBy((widestSurfaceAngle * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; Vector2 monolithRotation = direction.RotatedBy(Utils.AngleLerp(widestSurfaceAngle * -facing, 0f, projSize)); - Projectile proj = Projectile.NewProjectileDirect(projPosition, -monolithRotation, ProjectileType(), projectile.damage * 2, 10f, Owner.whoAmI, Main.rand.Next(4), projSize); + Projectile proj = Projectile.NewProjectileDirect(projPosition, -monolithRotation, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_MonolithDamageBoost), 10f, Owner.whoAmI, Main.rand.Next(4), projSize); if (proj.modProjectile is MercurialTidesMonolith monolith) { monolith.WaitTimer = (1 - projSize) * 34f; @@ -1211,12 +1207,12 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - Owner.GiveIFrames(30); + Owner.GiveIFrames(OmegaBiomeBlade.ShockwaveAttunement_DashHitIFrames); } public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - damage = (int)(damage * (1f + Charge / MaxCharge)); + damage = (int)(damage * (1f + OmegaBiomeBlade.ShockwaveAttunement_FullChargeBoost * Charge / MaxCharge)); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) @@ -1433,7 +1429,7 @@ namespace CalamityMod.Projectiles.Melee { Vector2 projPosition = projectile.Center + OriginDirection.RotatedBy((widestSurfaceAngle * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; Vector2 monolithRotation = OriginDirection.RotatedBy(Utils.AngleLerp(widestSurfaceAngle * -facing, 0f, projSize)); - Projectile proj = Projectile.NewProjectileDirect(projPosition, -monolithRotation, ProjectileType(), projectile.damage * 2, 10f, Owner.whoAmI, Main.rand.Next(4), projSize); + Projectile proj = Projectile.NewProjectileDirect(projPosition, -monolithRotation, ProjectileType(), projectile.damage, 10f, Owner.whoAmI, Main.rand.Next(4), projSize); if (proj.modProjectile is MercurialTidesMonolith monolith) { monolith.WaitTimer = (float)Math.Sqrt(1.0 - Math.Pow(projSize - 1.0, 2)) * 3f ; From e6da0a1e54827a564ecdfca182b3dabaee9943ba Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Mon, 17 Jan 2022 21:40:15 +0100 Subject: [PATCH 51/76] Whip work start (dying,,, hh,h, --- Items/Weapons/Melee/OmegaBiomeBlade.cs | 89 +++-- .../Melee/TrueBiomeBladeProjectiles.cs | 351 +++++++++++++++++- Sounds/Custom/SwiftSlice.cs | 18 + Sounds/Custom/SwiftSlice.ogg | Bin 0 -> 12464 bytes 4 files changed, 434 insertions(+), 24 deletions(-) create mode 100644 Sounds/Custom/SwiftSlice.cs create mode 100644 Sounds/Custom/SwiftSlice.ogg diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index e5c4cb30ae..452ad60593 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -24,6 +24,8 @@ namespace CalamityMod.Items.Weapons.Melee public Attunement? mainAttunement = null; public Attunement? secondaryAttunement = null; public int Combo = 0; + + //Used for passive effects public int UseTimer = 0; public bool OnHitProc = false; @@ -37,7 +39,17 @@ namespace CalamityMod.Items.Weapons.Melee public static int WhirlwindAttunement_PassiveBaseDamage = 200; - public static int ShockwaveAttunement_BaseDamage = 1500; + public static int SuperPogoAttunement_BaseDamage = 500; + public static int SuperPogoAttunement_ShredIFrames = 10; + public static float SuperPogoAttunement_SlashDamageBoost = 5f; //Keep in mind the slice always crits + public static int SuperPogoAttunementSlashLifesteal = 6; + public static int SuperPogoAttunement_SlashIFrames = 60; + public static float SuperPogoAttunement_ShotDamageBoost = 2f; + + public static int SuperPogoAttunement_PassiveLifeSteal = 10; + + + public static int ShockwaveAttunement_BaseDamage = 2500; public static int ShockwaveAttunement_DashHitIFrames = 60; public static float ShockwaveAttunement_FullChargeBoost = 1f; //The EXTRA damage boost. So putting 1 here will make it deal double damage. Putting 0.5 here will make it deal 1.5x the damage. public static float ShockwaveAttunement_MonolithDamageBoost = 2f; @@ -46,25 +58,31 @@ namespace CalamityMod.Items.Weapons.Melee public static int ShockwaveAttunement_PassiveBaseDamage = 200; - public static int SuperPogoAttunement_BaseDamage = 500; - public static int SuperPogoAttunement_ShredIFrames = 10; - public static float SuperPogoAttunement_SlashDamageBoost = 10f; - public static int SuperPogoAttunementSlashLifesteal = 6; - public static int SuperPogoAttunement_SlashIFrames = 60; - public static float SuperPogoAttunement_ShotDamageBoost = 2f; + public static int FlailBladeAttunement_BaseDamage = 320; + public static int FlailBladeAttunement_MaxFlails = 3; + public static int FlailBladeAttunement_FlailTime = 150; + public static float FlailBladeAttunement_ChainDamageReduction = 0.5f; + public static float FlailBladeAttunement_GhostChainDamageReduction = 0.5f; - public static float SuperPogoAttunement_PassiveLifeSteal = 10; + public static int FlailBladeAttunement_PassiveBaseDamage = 500; + //Proc coefficients. aka the likelihood of any given attack to trigger a on-hit passive. + public static float WhirlwindAttunement_WhirlwindProc = 0.1f; + public static float WhirlwindAttunement_SwordThrowProc = 1f; + public static float WhirlwindAttunement_SwordBeamProc = 0.05f; - public static int ColdAttunement_BaseDamage = 320; - public static float ColdAttunement_SecondSwingBoost = 1.8f; - public static float ColdAttunement_ThirdSwingBoost = 3f; - public static float ColdAttunement_MistDamageReduction = 0.2f; + public static float SuperPogoAttunement_ShredderProc = 0.25f; + public static float SuperPogoAttunement_WheelProc = 0.4f; + public static float SuperPogoAttunement_DashProc = 1f; + public static float ShockwaveAttunement_SwordProc = 1f; + public static float ShockwaveAttunement_MonolithProc = 1f; + public static float ShockwaveAttunement_BlastProc = 0.5f; - public static int TropicalAttunement_BaseDamage = 160; - public static float TropicalAttunement_ChainDamageReduction = 0.5f; - public static float TropicalAttunement_VineDamageReduction = 0.5f; + public static float FlailBladeAttunement_BladeProc = 0.2f; + public static float FlailBladeAttunement_CritProc = 0.5f; + public static float FlailBladeAttunement_ChainProc = 0.1f; + public static float FlailBladeAttunement_GhostChainProc = 0.1f; #endregion public override void SetStaticDefaults() @@ -287,12 +305,17 @@ namespace CalamityMod.Items.Weapons.Melee { player.Calamity().rightClickListener = true; - UseTimer++; //Reset the strong lunge thing just in case it didnt get caught beofre. + //|| + // n.type == ProjectileType() + if (CanUseItem(player)) { player.Calamity().LungingDown = false; - UseTimer = 0; + } + else + { + UseTimer++; } //Change the swords function based on its attunement @@ -329,11 +352,12 @@ namespace CalamityMod.Items.Weapons.Melee item.noMelee = true; break; case Attunement.FlailBlade: + item.damage = FlailBladeAttunement_BaseDamage; item.channel = false; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.SwingThrow; - item.shoot = ProjectileType(); - item.shootSpeed = 30; + item.shoot = ProjectileType(); + item.shootSpeed = 12f; item.UseSound = null; item.noMelee = true; break; @@ -357,13 +381,23 @@ namespace CalamityMod.Items.Weapons.Melee Main.PlaySound(SoundID.Item78); Projectile beamSword = Projectile.NewProjectileDirect(player.Center, player.DirectionTo(Main.MouseWorld) * 15f, ProjectileType(), (int)(WhirlwindAttunement_PassiveBaseDamage * player.MeleeDamage()), 10f, player.whoAmI, 1f); beamSword.timeLeft = 50; + UseTimer++; } break; case Attunement.SuperPogo: + if (OnHitProc) + { + player.statLife += SuperPogoAttunement_PassiveLifeSteal; + player.HealEffect(SuperPogoAttunement_PassiveLifeSteal); + OnHitProc = false; + } break; case Attunement.Shockwave: if (UseTimer % 120 == 119) + { Projectile.NewProjectile(player.Center, Vector2.Zero, ProjectileType(), (int)(ShockwaveAttunement_PassiveBaseDamage * player.MeleeDamage()), 10f, player.whoAmI, 1f); + UseTimer++; + } break; case Attunement.FlailBlade: break; @@ -387,8 +421,8 @@ namespace CalamityMod.Items.Weapons.Melee return !Main.projectile.Any(n => n.active && n.owner == player.whoAmI && (n.type == ProjectileType() || n.type == ProjectileType() || - n.type == ProjectileType() //|| - // n.type == ProjectileType() + n.type == ProjectileType() || + n.type == ProjectileType() )); } @@ -396,6 +430,19 @@ namespace CalamityMod.Items.Weapons.Melee { if (mainAttunement == null) return false; + + if (mainAttunement == Attunement.FlailBlade) + { + Projectile whipProj = Projectile.NewProjectileDirect(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 0, 0); + if (whipProj.modProjectile is LamentationsOfTheChained whip) + { + whip.flipped = Combo % 2 == 0 ? 1 : -1; + whip.Size = 1f + Combo % 3 * 0.05f; + } + Combo++; + return false; + } + return true; } diff --git a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs index db3db9433d..6baf1d67a1 100644 --- a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs @@ -690,6 +690,8 @@ namespace CalamityMod.Projectiles.Melee { if (Main.myPlayer != Owner.whoAmI) return; + + Owner.fallStart = (int)(Owner.position.Y / 16f); // get lifted up if (PogoCooldown <= 0) { @@ -801,7 +803,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { projectile.melee = true; - projectile.width = projectile.height = 55; + projectile.width = projectile.height = 45; projectile.tileCollide = true; projectile.ignoreWater = true; projectile.friendly = true; @@ -811,7 +813,7 @@ namespace CalamityMod.Projectiles.Melee public override bool OnTileCollide(Vector2 oldVelocity) { - projectile.velocity *= 0.5f; + projectile.velocity *= 0.95f; return false; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) @@ -931,6 +933,8 @@ namespace CalamityMod.Projectiles.Melee public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { + crit = true; + Particle bloom = new StrongBloom(target.Center, target.velocity, Color.Crimson * 0.5f, 1f, 30); GeneralParticleHandler.SpawnParticle(bloom); @@ -980,7 +984,6 @@ namespace CalamityMod.Projectiles.Melee } } - //Mercurial tides aka Shockwave attunement public class MercurialTides : ModProjectile @@ -1590,6 +1593,348 @@ namespace CalamityMod.Projectiles.Melee return false; } } + + + + //Lamentations of the Chained aka FlailBlade attunement + + public class LamentationsOfTheChained : ModProjectile + { + private NPC[] excludedTargets = new NPC[4]; + + public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained"; + private bool initialized = false; + public Player Owner => Main.player[projectile.owner]; + public float Timer => MaxTime - projectile.timeLeft; + public ref float HasSnapped => ref projectile.ai[0]; + public ref float SnapCoyoteTime => ref projectile.ai[1]; + + public float Size; + public float flipped; + + public static readonly float MaxTime = (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime; + const int coyoteTimeFrames = 8; //How many frames does the whip stay extended + const int MaxReach = 400; + const float SnappingPoint = 0.55f; //When does the snap occur. + const float ReelBackStrenght = 14f; + + const float MaxTangleReach = 400f; //How long can tangling vines from crits be + + public BezierCurve curve; + private Vector2 controlPoint1; + private Vector2 controlPoint2; + internal bool ReelingBack => Timer / MaxTime > SnappingPoint; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Lamentations of the Chained"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 80; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 2; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 30; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, projectile.Center }); + + int numPoints = 32; + Vector2[] chainPositions = curve.GetPoints(numPoints).ToArray(); + float collisionPoint = 0; + for (int i = 1; i < numPoints; i++) + { + Vector2 position = chainPositions[i]; + Vector2 previousPosition = chainPositions[i - 1]; + if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), position, previousPosition, 6, ref collisionPoint)) + return true; + if (i == numPoints - 1) //Extra lenght collision for the blade itself + { + Vector2 projectileHalfLenght = 85 * projectile.rotation.ToRotationVector2(); + return (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center - projectileHalfLenght, projectile.Center + projectileHalfLenght, 32, ref collisionPoint)); + } + + } + + return base.Colliding(projHitbox, targetHitbox); + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + Vector2 projectileHalfLenght = 85f * projectile.rotation.ToRotationVector2(); + float collisionPoint = 0; + //If you hit the enemy during the coyote time with the blade of the whip, guarantee a crit + if (Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), projectile.Center - projectileHalfLenght, projectile.Center + projectileHalfLenght, 32, ref collisionPoint)) + { + if (SnapCoyoteTime > 0f) + { + crit = true; + for (int i = 0; i < 4; i++) + { + Vector2 sparkSpeed = Owner.DirectionTo(target.Center).RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver2, MathHelper.PiOver2)) * 9f; + Particle Spark = new CritSpark(target.Center, sparkSpeed, Color.White, Color.LimeGreen, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 0.6f); + GeneralParticleHandler.SpawnParticle(Spark); + } + + } + } + else + damage = (int)(damage * OmegaBiomeBlade.FlailBladeAttunement_ChainDamageReduction); //If the enemy is hit with the chain of the whip, the damage gets reduced + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (crit) + { + Main.PlaySound(mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/SwiftSlice"), projectile.Center); + excludedTargets[0] = target; + for (int i = 0; i < 3; i++) + { + NPC potentialTarget = TargetNext(target.Center, i); + if (potentialTarget == null) + break; + Projectile.NewProjectile(target.Center, Vector2.Zero, ProjectileType(), (int)(damage * OmegaBiomeBlade.FlailBladeAttunement_GhostChainDamageReduction), 0, Owner.whoAmI, target.whoAmI, potentialTarget.whoAmI); + } + Array.Clear(excludedTargets, 0, 3); + } + } + + public NPC TargetNext(Vector2 hitFrom, int index) + { + float longestReach = MaxTangleReach; + NPC target = null; + for (int i = 0; i < 200; ++i) + { + NPC npc = Main.npc[i]; + if (!excludedTargets.Contains(npc) && npc.CanBeChasedBy() && !npc.friendly && !npc.townNPC) + { + float distance = Vector2.Distance(hitFrom, npc.Center); + if (distance < longestReach) + { + longestReach = distance; + target = npc; + } + } + } + if (index < 3) + excludedTargets[index + 1] = target; + return target; + } + + public override void AI() + { + if (!initialized) //Initialization. create control points & shit) + { + projectile.velocity = Owner.DirectionTo(Main.MouseWorld); + Main.PlaySound(SoundID.DD2_OgreSpit, projectile.Center); + controlPoint1 = projectile.Center; + controlPoint2 = projectile.Center; + projectile.timeLeft = (int)MaxTime; + initialized = true; + projectile.netUpdate = true; + projectile.netSpam = 0; + } + + if (ReelingBack && HasSnapped == 0f) //Snap & also small coyote time for the hook + { + Main.PlaySound(SoundID.Item71, projectile.Center); //Slash + HasSnapped = 1f; + SnapCoyoteTime = coyoteTimeFrames; + } + + if (SnapCoyoteTime > 0) //keep checking for the tile hook + { + Lighting.AddLight(projectile.Center, 0.8f, 1f, 0.35f); + SnapCoyoteTime--; + } + + Owner.direction = Math.Sign(projectile.velocity.X); + projectile.rotation = projectile.AngleFrom(Owner.Center); //Point away from playah + + float ratio = GetSwingRatio(); + projectile.Center = Owner.MountedCenter + SwingPosition(ratio); + projectile.direction = projectile.spriteDirection = -Math.Sign(projectile.velocity.X) * (int)flipped; + + //MessWithTiles(); + + Owner.itemRotation = MathHelper.WrapAngle(Owner.AngleTo(Main.MouseWorld) - (Owner.direction < 0 ? MathHelper.Pi : 0)); + } + + + private float GetSwingRatio() => Timer / MaxTime; + + private Vector2 SwingPosition(float progress) + { + + float distance = MaxReach * Size * MathHelper.Lerp((float)Math.Sin(progress * MathHelper.Pi), 1, 0.04f); + distance = Math.Max(distance, 65); //Dont be too close to player + + float angleDeviation = MathHelper.Pi / 1.2f; + float angleOffset = Owner.direction * flipped * MathHelper.Lerp(-angleDeviation, angleDeviation, progress); //Go from very angled to straight at the zenith of the attack + return projectile.velocity.RotatedBy(angleOffset) * distance; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (Timer == 0) + return false; + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/OmegaBiomeBlade"); + Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained"); + + Vector2 projBottom = projectile.Center + new Vector2(-handle.Width / 2, handle.Height / 2).RotatedBy(projectile.rotation + MathHelper.PiOver4) * 0.75f; + DrawChain(spriteBatch, projBottom, out Vector2[] chainPositions); + + float drawRotation = (projBottom - chainPositions[chainPositions.Length - 2]).ToRotation() + MathHelper.PiOver4; //Face away from the last point of the bezier curve + drawRotation += projectile.spriteDirection < 0 ? 0f : 0f; + + if (ReelingBack) + drawRotation = Utils.AngleLerp(drawRotation, (projectile.Center - Owner.Center).ToRotation(), GetSwingRatio()); + + Vector2 drawOrigin = new Vector2(0f, handle.Height); + SpriteEffects flip = (projectile.spriteDirection < 0) ? SpriteEffects.None : SpriteEffects.None; + lightColor = Lighting.GetColor((int)(projectile.Center.X / 16f), (int)(projectile.Center.Y / 16f)); + + spriteBatch.Draw(handle, projBottom - Main.screenPosition, null, lightColor, drawRotation, drawOrigin, projectile.scale * Size, flip, 0f); + + + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Only update the origin for once + drawOrigin = new Vector2(0f, blade.Height); + spriteBatch.Draw(blade, projBottom - Main.screenPosition, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale * Size, flip, 0f); + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + private void DrawChain(SpriteBatch spriteBatch, Vector2 projBottom, out Vector2[] chainPositions) + { + Texture2D chainTex = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedChain"); + + float ratio = GetSwingRatio(); + + float rotationAngle = MathHelper.PiOver4 * Math.Sign(projectile.velocity.X) * flipped; + + controlPoint2 = Owner.MountedCenter + SwingPosition(ratio).RotatedBy(MathHelper.Lerp(rotationAngle * 0.5f, -rotationAngle * 0.5f, ratio)) * 0.5f; + controlPoint1 = Owner.MountedCenter + SwingPosition(ratio).RotatedBy(MathHelper.Lerp(rotationAngle, -rotationAngle, ratio)) * 0.1f; + + + BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, projBottom }); + int numPoints = 30; + chainPositions = curve.GetPoints(numPoints).ToArray(); + + //Draw each chain segment bar the very first one + for (int i = 1; i < numPoints; i++) + { + Vector2 position = chainPositions[i]; + float rotation = (chainPositions[i] - chainPositions[i - 1]).ToRotation() - MathHelper.PiOver2; //Calculate rotation based on direction from last point + float yScale = Vector2.Distance(chainPositions[i], chainPositions[i - 1]) / chainTex.Height; //Calculate how much to squash/stretch for smooth chain based on distance between points + Vector2 scale = new Vector2(1, yScale); + Color chainLightColor = Lighting.GetColor((int)position.X / 16, (int)position.Y / 16); //Lighting of the position of the chain segment + Vector2 origin = new Vector2(chainTex.Width / 2, chainTex.Height); //Draw from center bottom of texture + spriteBatch.Draw(chainTex, position - Main.screenPosition, null, chainLightColor, rotation, origin, scale, SpriteEffects.None, 0); + } + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(initialized); + writer.Write(flipped); + writer.Write(Size); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + initialized = reader.ReadBoolean(); + flipped = reader.ReadSingle(); + Size = reader.ReadSingle(); + } + } + + public class GhastlyChain : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedChain"; + public Player Owner => Main.player[projectile.owner]; + public float Timer => 20 - projectile.timeLeft; + public NPC NPCfrom + { + get => Main.npc[(int)projectile.ai[0]]; + set => projectile.ai[0] = value.whoAmI; + } + public NPC Target + { + get => Main.npc[(int)projectile.ai[1]]; + set => projectile.ai[1] = value.whoAmI; + } + + const float curvature = 16f; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ghastly Chain"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 8; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 30; + projectile.timeLeft = 20; + } + + public override bool? CanHitNPC(NPC target) => target == Target; + + public override void AI() + { + projectile.Center = Target.Center; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D chainTex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchChain"); + + float opacity = projectile.timeLeft > 10 ? 1 : projectile.timeLeft / 10f; + Vector2 Shake = projectile.timeLeft < 15 ? Vector2.Zero : Vector2.One.RotatedByRandom(MathHelper.TwoPi) * (15 - projectile.timeLeft / 5f) * 0.5f; + + Vector2 lineDirection = Vector2.Normalize(Target.Center - NPCfrom.Center); + int dist = (int)Vector2.Distance(Target.Center, NPCfrom.Center) / 16; + Vector2[] Nodes = new Vector2[dist + 1]; + Nodes[0] = NPCfrom.Center; + Nodes[dist] = Target.Center; + float pointUp = Target.Center.X > NPCfrom.Center.X ? -MathHelper.PiOver2 : MathHelper.PiOver2; + + for (int i = 1; i < dist + 1; i++) + { + Vector2 positionAlongLine = Vector2.Lerp(NPCfrom.Center, Target.Center, i / (float)dist); //Get the position of the segment along the line, as if it were a flat line + float elevation = (float)Math.Sin(i / (float)dist * MathHelper.Pi) * curvature * dist / 10f; + Nodes[i] = positionAlongLine + lineDirection.RotatedBy(pointUp) * elevation + Shake * (float)Math.Sin(i / (float)dist * MathHelper.Pi); + + float rotation = (Nodes[i] - Nodes[i - 1]).ToRotation() - MathHelper.PiOver2; //Calculate rotation based on direction from last point + float yScale = Vector2.Distance(Nodes[i], Nodes[i - 1]) / chainTex.Height; //Calculate how much to squash/stretch for smooth chain based on distance between points + Vector2 scale = new Vector2(1, yScale); + + Color chainLightColor = Lighting.GetColor((int)Nodes[i].X / 16, (int)Nodes[i].Y / 16); //Lighting of the position of the chain segment + + Vector2 origin = new Vector2(chainTex.Width / 2, chainTex.Height); //Draw from center bottom of texture + spriteBatch.Draw(chainTex, Nodes[i] - Main.screenPosition, null, chainLightColor * opacity, rotation, origin, scale, SpriteEffects.None, 0); + } + return false; + } + + } + } diff --git a/Sounds/Custom/SwiftSlice.cs b/Sounds/Custom/SwiftSlice.cs new file mode 100644 index 0000000000..3f8df43a0b --- /dev/null +++ b/Sounds/Custom/SwiftSlice.cs @@ -0,0 +1,18 @@ +using Microsoft.Xna.Framework.Audio; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Sounds.Custom +{ + public class SwiftSlice : ModSound + { + public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type) + { + soundInstance = sound.CreateInstance(); + soundInstance.Volume = volume * 1f; + soundInstance.Pan = pan; + Main.PlaySoundInstance(soundInstance); + return soundInstance; + } + } +} diff --git a/Sounds/Custom/SwiftSlice.ogg b/Sounds/Custom/SwiftSlice.ogg new file mode 100644 index 0000000000000000000000000000000000000000..bc9894c5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-6C$k*2={mVLXgj0!)_&DzO?0GhAkvPGFCco&M3mZia(}O{XYIRlTE@`p8O_>b3#r5T*L_bb zvU0x!`%bmF9hzzU?l zf%6GaUyI85_6BXRkY)a1wu@Kuu?eENL)IC{{2uLiGQy`QhtPD-`N)b75MNX35@e(Y z@*Fjnzj9{dxAk?ypazCG7BdD}Y!e6}Acx*FVBFWg>paf3KKG|{UEa&8A6 zY`G`Hur$^~!tVR1A^#RA0bj?8)?f>%dleQrX5-Aei|s4KHjwe4_s{T+AeH+(dU-Bz zASAu!$NgXX-@AK;el0QC-)?-@Zo6A_-wj=d)qlj#5g(5mE82Y9PT~kV5o?7zJP|e! zP3dvhGElk3&aT+ETi>SKcr}2nX5|ZdgXSS$`aVwe3VKN0c|z|kJ+~;Gt=GkCWsL)` zk^8(~A9X;{*m15xfua1{cfB5^lfG(eo^#<-)M~-9O=+_&LPt27+sUY!LK)6+v{T#% z@)+320C)UO$J=g;Vu_(H`5rQmq?PovD0Uw3?{0DpbA>x4Wy-DTo~jb`OEtp5Y6&fV zBQ4@ta&Iu5$x|G_s$-|w^Sj6JA<+jU=)(P^6>d8_aGL<~Aw7T2UDvCn zEz6NXs#^Zfk$0XMakiq>J~HKes~&$ngjHW$kh$?OVc|SB1lQ>Z8-R^B@t<#re*12{ zUw)+vx^Xxi2k80VEC|^dSY!?%4}s#t+&UeD-Hv<%u|mTJAV3@;u>~jz0MLeOv#(mu zUDR_Y24)$C$tj*oerFKA-p`a+Lu_HMfIA}Fx|^UaO>ws qymw0h64(j&Zx>*xB@}xPEoGGXy7O}|>uv7N6}VXFXbuHH@_ztFDUTfh literal 0 HcmV?d00001 From a20e0afc8f6040a19488e01868f9cb1106134480 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Wed, 19 Jan 2022 16:26:19 +0100 Subject: [PATCH 52/76] More flail + Ocean biome is tropical now --- Items/Weapons/Melee/BiomeBlade.cs | 9 +- Items/Weapons/Melee/OmegaBiomeBlade.cs | 45 ++---- Items/Weapons/Melee/TrueBiomeBlade.cs | 9 +- .../Melee/MendedBiomeBladeProjectiles.cs | 6 +- .../Melee/TrueBiomeBladeProjectiles.cs | 129 ++++++++++-------- ...omeBlade_LamentationsOfTheChainedFlail.png | Bin 0 -> 969 bytes 6 files changed, 102 insertions(+), 96 deletions(-) create mode 100644 Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedFlail.png diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index 29c8ed44ec..af33f7f179 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -560,13 +560,10 @@ namespace CalamityMod.Items.Weapons.Melee bool evil = Owner.ZoneCorrupt || Owner.ZoneCrimson; bool desert = Owner.ZoneDesert; bool hell = Owner.ZoneUnderworldHeight; + bool ocean = Owner.ZoneBeach; Attunement attunement = Attunement.Default; - if (jungle) - { - attunement = Attunement.Tropical; - } if (desert || hell) { attunement = Attunement.Hot; @@ -575,6 +572,10 @@ namespace CalamityMod.Items.Weapons.Melee { attunement = Attunement.Cold; } + if (jungle || ocean) + { + attunement = Attunement.Tropical; + } if (evil) { attunement = Attunement.Evil; diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index 452ad60593..b102e56eab 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Items.Weapons.Melee public static int FlailBladeAttunement_BaseDamage = 320; public static int FlailBladeAttunement_MaxFlails = 3; - public static int FlailBladeAttunement_FlailTime = 150; + public static int FlailBladeAttunement_FlailTime = 30; public static float FlailBladeAttunement_ChainDamageReduction = 0.5f; public static float FlailBladeAttunement_GhostChainDamageReduction = 0.5f; @@ -164,8 +164,8 @@ namespace CalamityMod.Items.Weapons.Melee AttunementInfo.function_description = "Hold LMB to swing the sword around you, powering up as it spins. Extra ghostly swords are summoned during the spin"; AttunementInfo.function_extra = "Releasing LMB during a spin will throw the sword out. Ghostly swords will home onto enemies hit by the sword throw"; AttunementInfo.function_passive = "While attacking, extra ghost swords have a chance to be shot out"; - AttunementInfo.color = new Color(188, 155, 185); - AttunementInfo.color2 = new Color(204, 184, 144); + AttunementInfo.color = new Color(249, 166, 224); + AttunementInfo.color2 = new Color(171, 239, 113); break; case Attunement.SuperPogo: AttunementInfo.name = "Sanguine Fury"; @@ -188,8 +188,8 @@ namespace CalamityMod.Items.Weapons.Melee AttunementInfo.function_description = "Throw out a flurry of chained blades in front of you. Striking enemies with the tip of the blades guarantees a critical hit."; AttunementInfo.function_extra = "Critical strikes create extra ghostly chains to latch onto extra targets or onto the struck foe"; AttunementInfo.function_passive = "Gain a magical chain hook. On enemy hits the hook quickly spins around you, freezing any struck foe"; //No way sentient meat hook - AttunementInfo.color = new Color(127, 173, 168); - AttunementInfo.color2 = new Color(203, 201, 168); + AttunementInfo.color = new Color(113, 239, 177); + AttunementInfo.color2 = new Color(169, 207, 255); break; default: AttunementInfo.name = "None"; @@ -353,9 +353,9 @@ namespace CalamityMod.Items.Weapons.Melee break; case Attunement.FlailBlade: item.damage = FlailBladeAttunement_BaseDamage; - item.channel = false; + item.channel = true; item.noUseGraphic = true; - item.useStyle = ItemUseStyleID.SwingThrow; + item.useStyle = ItemUseStyleID.HoldingOut; item.shoot = ProjectileType(); item.shootSpeed = 12f; item.UseSound = null; @@ -426,26 +426,8 @@ namespace CalamityMod.Items.Weapons.Melee )); } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) - { - if (mainAttunement == null) - return false; - - if (mainAttunement == Attunement.FlailBlade) - { - Projectile whipProj = Projectile.NewProjectileDirect(player.Center, new Vector2(speedX, speedY), ProjectileType(), damage, knockBack, player.whoAmI, 0, 0); - if (whipProj.modProjectile is LamentationsOfTheChained whip) - { - whip.flipped = Combo % 2 == 0 ? 1 : -1; - whip.Size = 1f + Combo % 3 * 0.05f; - } - Combo++; - return false; - } - - return true; - } - + //No need for any wacky zany hijinx in the shoot method for once??? damn + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) => mainAttunement == null ? false : true; internal static ChargingEnergyParticleSet BiomeEnergyParticles = new ChargingEnergyParticleSet(-1, 2, Color.White, Color.White, 0.04f, 20f); internal static void UpdateAllParticleSets() @@ -607,19 +589,22 @@ namespace CalamityMod.Items.Weapons.Melee bool evil = Owner.ZoneCorrupt || Owner.ZoneCrimson; bool desert = Owner.ZoneDesert; bool hell = Owner.ZoneUnderworldHeight; + bool ocean = Owner.ZoneBeach; bool holy = Owner.ZoneHoly; bool astral = Owner.Calamity().ZoneAstral; bool marine = Owner.Calamity().ZoneAbyss || Owner.Calamity().ZoneSunkenSea; Attunement attunement = Attunement.Whirlwind; - if (jungle || snow) + if (desert || hell) + attunement = Attunement.SuperPogo; + if (jungle || ocean || snow) //Check put after the desert check so ocean doesnt get overriden as desert attunement = Attunement.FlailBlade; - if (desert || hell ||evil) + if (evil) //Evil check separated so that it overrides corrupted beach & snow biomes attunement = Attunement.SuperPogo; if (astral || marine) attunement = Attunement.Shockwave; if (holy) - attunement = Attunement.Whirlwind; //Necessary to override biome overlap + attunement = Attunement.Whirlwind; //Putting holy attunement at the end so it may override hallowed variants of biomes //If the owner already had the attunement , break out of it (And unswap) if (item.secondaryAttunement == attunement) diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 5aa7293b14..27f5fd67e7 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -299,9 +299,7 @@ namespace CalamityMod.Items.Weapons.Melee PowerLungeCounter = 0; } - //Reset the strong lunge thing just in case it didnt get caught beofre. - if (CanUseItem(player)) - player.Calamity().LungingDown = false; + //Change the swords function based on its attunement switch (mainAttunement) @@ -696,18 +694,19 @@ namespace CalamityMod.Items.Weapons.Melee bool evil = Owner.ZoneCorrupt || Owner.ZoneCrimson; bool desert = Owner.ZoneDesert; bool hell = Owner.ZoneUnderworldHeight; + bool ocean = Owner.ZoneBeach; bool holy = Owner.ZoneHoly; bool astral = Owner.Calamity().ZoneAstral; bool marine = Owner.Calamity().ZoneAbyss || Owner.Calamity().ZoneSunkenSea; Attunement attunement = Attunement.Default; - if (jungle) - attunement = Attunement.Tropical; if (desert || hell) attunement = Attunement.Hot; if (snow) attunement = Attunement.Cold; + if (jungle || ocean) + attunement = Attunement.Tropical; if (evil) attunement = Attunement.Evil; if (holy) diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 84f385dc62..30276f3259 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -216,10 +216,8 @@ namespace CalamityMod.Projectiles.Melee projectile.netSpam = 0; } - if (ChargedUp && Timer / MaxTime > 0.5 && dashTimer == 0f) - { + if (ChargedUp && dashTimer == 0f) PowerLunge(); - } if (dashTimer >= 1f) { @@ -236,6 +234,8 @@ namespace CalamityMod.Projectiles.Melee Owner.velocity *= 0.1f; //Abrupt stop Owner.Calamity().LungingDown = false; + Main.PlaySound(mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/SwiftSlice"), Owner.Center); + Projectile proj = Projectile.NewProjectileDirect(Owner.Center - PowerLungeStart / 2f, Vector2.Zero, ProjectileType(), (int)(projectile.damage * TrueBiomeBlade.EvilAttunement_SlashDamageBoost), 0, Owner.whoAmI); if (proj.modProjectile is DecaysRetortDash dash) { diff --git a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs index 6baf1d67a1..db99f61704 100644 --- a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs @@ -1606,23 +1606,32 @@ namespace CalamityMod.Projectiles.Melee private bool initialized = false; public Player Owner => Main.player[projectile.owner]; public float Timer => MaxTime - projectile.timeLeft; - public ref float HasSnapped => ref projectile.ai[0]; + public ref float ChainSwapTimer => ref projectile.ai[0]; public ref float SnapCoyoteTime => ref projectile.ai[1]; + private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; + public float Size; public float flipped; public static readonly float MaxTime = (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime; const int coyoteTimeFrames = 8; //How many frames does the whip stay extended const int MaxReach = 400; - const float SnappingPoint = 0.55f; //When does the snap occur. + const float SnappingPoint = 0.45f; //When does the snap occur. const float ReelBackStrenght = 14f; const float MaxTangleReach = 400f; //How long can tangling vines from crits be - public BezierCurve curve; - private Vector2 controlPoint1; - private Vector2 controlPoint2; + public Vector2 whip1; + public BezierCurve curve1; + private Vector2 controlPoint11; + private Vector2 controlPoint12; + + public Vector2 whip2; + public BezierCurve curve2; + private Vector2 controlPoint21; + private Vector2 controlPoint22; + internal bool ReelingBack => Timer / MaxTime > SnappingPoint; public override void SetStaticDefaults() @@ -1636,7 +1645,6 @@ namespace CalamityMod.Projectiles.Melee projectile.tileCollide = false; projectile.friendly = true; projectile.penetrate = -1; - projectile.extraUpdates = 2; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 30; } @@ -1731,39 +1739,46 @@ namespace CalamityMod.Projectiles.Melee { if (!initialized) //Initialization. create control points & shit) { - projectile.velocity = Owner.DirectionTo(Main.MouseWorld); Main.PlaySound(SoundID.DD2_OgreSpit, projectile.Center); - controlPoint1 = projectile.Center; - controlPoint2 = projectile.Center; + + controlPoint11 = projectile.Center; + controlPoint12 = projectile.Center; + + controlPoint21 = projectile.Center; + controlPoint22 = projectile.Center; + projectile.timeLeft = (int)MaxTime; initialized = true; projectile.netUpdate = true; projectile.netSpam = 0; } - if (ReelingBack && HasSnapped == 0f) //Snap & also small coyote time for the hook + if (!OwnerCanShoot) { - Main.PlaySound(SoundID.Item71, projectile.Center); //Slash - HasSnapped = 1f; - SnapCoyoteTime = coyoteTimeFrames; + projectile.Kill(); + return; } - if (SnapCoyoteTime > 0) //keep checking for the tile hook - { - Lighting.AddLight(projectile.Center, 0.8f, 1f, 0.35f); - SnapCoyoteTime--; - } + projectile.velocity = Owner.DirectionTo(Main.MouseWorld); + projectile.velocity.Normalize(); + projectile.rotation = projectile.velocity.ToRotation(); + projectile.Center = Owner.Center + (projectile.velocity * 60); + //Make the owner look like theyre holding the sword bla bla + Owner.heldProj = projectile.whoAmI; Owner.direction = Math.Sign(projectile.velocity.X); - projectile.rotation = projectile.AngleFrom(Owner.Center); //Point away from playah + Owner.itemRotation = projectile.rotation; + if (Owner.direction != 1) + { + Owner.itemRotation -= 3.14f; + } + Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); + Owner.itemTime = 2; + Owner.itemAnimation = 2; + projectile.timeLeft = 2; - float ratio = GetSwingRatio(); - projectile.Center = Owner.MountedCenter + SwingPosition(ratio); - projectile.direction = projectile.spriteDirection = -Math.Sign(projectile.velocity.X) * (int)flipped; - //MessWithTiles(); - - Owner.itemRotation = MathHelper.WrapAngle(Owner.AngleTo(Main.MouseWorld) - (Owner.direction < 0 ? MathHelper.Pi : 0)); + ChainSwapTimer++; } @@ -1772,51 +1787,51 @@ namespace CalamityMod.Projectiles.Melee private Vector2 SwingPosition(float progress) { - float distance = MaxReach * Size * MathHelper.Lerp((float)Math.Sin(progress * MathHelper.Pi), 1, 0.04f); - distance = Math.Max(distance, 65); //Dont be too close to player + float distance = MaxReach * Size * MathHelper.Lerp((float)Math.Sin(progress * MathHelper.Pi), 1, 0.01f); + distance = Math.Max(distance, 65); //Dont be too close to player - float angleDeviation = MathHelper.Pi / 1.2f; - float angleOffset = Owner.direction * flipped * MathHelper.Lerp(-angleDeviation, angleDeviation, progress); //Go from very angled to straight at the zenith of the attack - return projectile.velocity.RotatedBy(angleOffset) * distance; + float angleDeviation = MathHelper.Pi / 1.2f; + float angleOffset = Owner.direction * flipped * MathHelper.Lerp(-angleDeviation, angleDeviation, progress); //Go from very angled to straight at the zenith of the attack + return projectile.velocity.RotatedBy(angleOffset) * distance; } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - if (Timer == 0) - return false; + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/OmegaBiomeBlade"); Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained"); - Vector2 projBottom = projectile.Center + new Vector2(-handle.Width / 2, handle.Height / 2).RotatedBy(projectile.rotation + MathHelper.PiOver4) * 0.75f; - DrawChain(spriteBatch, projBottom, out Vector2[] chainPositions); - float drawRotation = (projBottom - chainPositions[chainPositions.Length - 2]).ToRotation() + MathHelper.PiOver4; //Face away from the last point of the bezier curve - drawRotation += projectile.spriteDirection < 0 ? 0f : 0f; + //Vector2 projBottom = projectile.Center + new Vector2(-handle.Width / 2, handle.Height / 2).RotatedBy(projectile.rotation + MathHelper.PiOver4) * 0.75f; + //DrawChain(spriteBatch, projBottom, out Vector2[] chainPositions); - if (ReelingBack) - drawRotation = Utils.AngleLerp(drawRotation, (projectile.Center - Owner.Center).ToRotation(), GetSwingRatio()); + //float drawRotation = (projBottom - chainPositions[chainPositions.Length - 2]).ToRotation() + MathHelper.PiOver4; //Face away from the last point of the bezier curve + Vector2 drawPos = projectile.Center - projectile.velocity * 55f; Vector2 drawOrigin = new Vector2(0f, handle.Height); - SpriteEffects flip = (projectile.spriteDirection < 0) ? SpriteEffects.None : SpriteEffects.None; - lightColor = Lighting.GetColor((int)(projectile.Center.X / 16f), (int)(projectile.Center.Y / 16f)); + float drawRotation = projectile.rotation + MathHelper.PiOver4; - spriteBatch.Draw(handle, projBottom - Main.screenPosition, null, lightColor, drawRotation, drawOrigin, projectile.scale * Size, flip, 0f); + //lightColor = Lighting.GetColor((int)(projectile.Center.X / 16f), (int)(projectile.Center.Y / 16f)); + + spriteBatch.Draw(handle, drawPos - Main.screenPosition, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - //Turn on additive blending - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - //Only update the origin for once - drawOrigin = new Vector2(0f, blade.Height); - spriteBatch.Draw(blade, projBottom - Main.screenPosition, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale * Size, flip, 0f); - //Back to normal - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + //Draw the tip of the flails here + + drawOrigin = new Vector2(0f, blade.Height); + spriteBatch.Draw(blade, drawPos - Main.screenPosition, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); return false; } - private void DrawChain(SpriteBatch spriteBatch, Vector2 projBottom, out Vector2[] chainPositions) + private void DrawChain(SpriteBatch spriteBatch, Vector2 projBottom, out Vector2[] chainPositions1 out Vector2) { Texture2D chainTex = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedChain"); @@ -1824,11 +1839,17 @@ namespace CalamityMod.Projectiles.Melee float rotationAngle = MathHelper.PiOver4 * Math.Sign(projectile.velocity.X) * flipped; - controlPoint2 = Owner.MountedCenter + SwingPosition(ratio).RotatedBy(MathHelper.Lerp(rotationAngle * 0.5f, -rotationAngle * 0.5f, ratio)) * 0.5f; - controlPoint1 = Owner.MountedCenter + SwingPosition(ratio).RotatedBy(MathHelper.Lerp(rotationAngle, -rotationAngle, ratio)) * 0.1f; + //Set the first whip + if (ChainSwapTimer % OmegaBiomeBlade.FlailBladeAttunement_FlailTime == 0) + whip1 = projectile.velocity.RotatedBy(Main.rand.NextFloat(MathHelper.Pi / 8f, MathHelper.Pi / 8f)); + + //Set the second whip + if ((ChainSwapTimer - OmegaBiomeBlade.FlailBladeAttunement_FlailTime * 0.5f) % OmegaBiomeBlade.FlailBladeAttunement_FlailTime == 0) + whip2 = projectile.velocity.RotatedBy(Main.rand.NextFloat(MathHelper.Pi / 8f, MathHelper.Pi / 8f)); - BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, projBottom }); + //Watch this randomness float offsetBase = (sin(frameY * 17.07947 + uTime * 16) + sin(coords.y * 25.13274)) * 0.5 + int numPoints = 30; chainPositions = curve.GetPoints(numPoints).ToArray(); diff --git a/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedFlail.png b/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedFlail.png new file mode 100644 index 0000000000000000000000000000000000000000..1bc8a39aae3140c7a45935422891ba79f4e5bdeb GIT binary patch literal 969 zcmV;)12+7LP)Px&gGod|R9J=Wm{~|vQ5eU6$80K@tQlL(EiK5(q{S$Nf~2TGs25*^dJ2Q;A)f#pl}%A62pP5CdWbZe6#UMAT~Q|(`U6C=4hHUM8tcaCcuup>uI zoT1%%f_SG!;Ol)S>}eAX7ivF!GqhSykeHxHA|sv}hM=q4c;Q=5kdmN9IwEN3N#l(P z+CFHJyPd}M*6pSjU+x0H=hq@~#HxsPQ=dPe`uqS`Kl?CX#~ef&xq+Xxw~C=ZK*$`_ z)Oi)a%#36)7aR7U679|%*ktA>?AG5Z3Qpz$PPKR@LWAwWk?Z;=?nP#|?Qn-QVCNj@3YS%8|GloL6AWuu zgO_TE_+v6MS+W;J6~Ph$1>kj80r1i31)$mS34pZR835#7m?ubYuCG!6P4_whNbQ;o z!2HfkF+lWp)7|;`060dC0>IZTKUGS4rU3Bb`WfLkXH}6XC%I!3K&QV~*saSVUw1bE z$*HLTWGqerVB@rzKxo7#3ey32@Uk6%vbrwAY_#r7UQ&=ND(apziQhZ>R*U*wS8s`O zR*F2{tDF3Q6$C9_E$<(eJ{A?aUDy55(y`%Mr6_;N$r5F!ry8(=VDy+V3ZTX763sm8=SOOgt4839k5>RrPqpy(yEJ?B3BG^(^-3b{NNtYsT7#v_0VqDS7l6Z; zZv#+STL(Z~M;ic+Aph7-Z7;L$X1BO-2LP=d+GE7#{2Tz>OV$B!aL+c;NBxbnhW$jJ z!0b$Z?y3c#F-?1`J39G_Xt?upkpf7r83%-(1G+3B_)pH{V7*Ch0HAAu_6m7E{i+~c z`E;2!2d@(VJLkZxLSF}o6I=lZUCGxGt%I;%nfjh{>D*}mvinwYKY{^eKf&6( zMGD~2+jcFB-W~^FL5}vi^2}2)puhbD_08>OS!DKxA!I+n(9NROjt>A#pW;#g#pNFD rKQH$HFe`hm0(ezbY3Q#j>I6Rl(5(q!Bxqig00000NkvXXu0mjfFGj`= literal 0 HcmV?d00001 From dad06cdebafe1fe9acc534afbe6c6de077e4e486 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Thu, 20 Jan 2022 03:47:23 +0100 Subject: [PATCH 53/76] Productive progress --- Items/Weapons/Melee/OmegaBiomeBlade.cs | 6 +- .../Melee/BrokenBiomeBladeProjectiles.cs | 104 ------------ .../Melee/MendedBiomeBladeProjectiles.cs | 3 +- .../Melee/TrueBiomeBladeProjectiles.cs | 153 ++++++++++++------ ...omeBlade_LamentationsOfTheChainedFlail.png | Bin 969 -> 976 bytes 5 files changed, 105 insertions(+), 161 deletions(-) diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index b102e56eab..5ae05bf7ae 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Items.Weapons.Melee public static int FlailBladeAttunement_BaseDamage = 320; public static int FlailBladeAttunement_MaxFlails = 3; - public static int FlailBladeAttunement_FlailTime = 30; + public static int FlailBladeAttunement_FlailTime = 10; public static float FlailBladeAttunement_ChainDamageReduction = 0.5f; public static float FlailBladeAttunement_GhostChainDamageReduction = 0.5f; @@ -450,8 +450,8 @@ namespace CalamityMod.Items.Weapons.Melee Vector2 particleDrawCenter = position + new Vector2(12f, 16f) * Main.inventoryScale; AttunementInfo info = GetAttunementInfo(mainAttunement); - BiomeEnergyParticles.EdgeColor = Color.Lerp(info.color2, Color.Black, 0.5f); - BiomeEnergyParticles.CenterColor = Color.Lerp(info.color, Color.White, 0.5f); + BiomeEnergyParticles.EdgeColor = info.color2; + BiomeEnergyParticles.CenterColor = info.color; BiomeEnergyParticles.InterpolationSpeed = 0.1f; BiomeEnergyParticles.DrawSet(particleDrawCenter + Main.screenPosition); diff --git a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs index 58ddcf994f..f4b0c8aa58 100644 --- a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs @@ -807,8 +807,6 @@ namespace CalamityMod.Projectiles.Melee projectile.Center = Owner.MountedCenter + SwingPosition(ratio); projectile.direction = projectile.spriteDirection = -Owner.direction; - //MessWithTiles(); - Owner.itemRotation = MathHelper.WrapAngle(Owner.AngleTo(Main.MouseWorld) - (Owner.direction < 0 ? MathHelper.Pi : 0)); } public void HookToTile() @@ -825,108 +823,6 @@ namespace CalamityMod.Projectiles.Melee } } - public void MessWithTiles() //This DESTROYS the grass growing meta and shall remain sealed away - { - BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, projectile.Center }); - int numPoints = 30; - Vector2[] chainPositions = curve.GetPoints(numPoints).ToArray(); - - for (int i = 0; i < numPoints; i++) - { - Vector2 position = chainPositions[i]; - Tile targetTile = Main.tile[(int)position.X / 16, (int)position.Y / 16]; //Grab the tile - - if ((targetTile.type == TileID.Dirt || targetTile.type == TileID.Mud) && targetTile.active()) - { - if (targetTile.type == TileID.Dirt) - { - targetTile.active(true); - targetTile.type = TileID.Grass; - - if (Owner.ZoneCorrupt) - targetTile.type = TileID.CorruptGrass; - if (Owner.ZoneCrimson) - targetTile.type = TileID.FleshGrass; - if (Owner.ZoneHoly) - targetTile.type = TileID.HallowedGrass; - } - if (targetTile.type == TileID.Mud) - { - targetTile.active(true); - targetTile.type = TileID.JungleGrass; - if (Owner.ZoneGlowshroom) - { - targetTile.type = TileID.MushroomGrass; - } - } - - WorldGen.SquareTileFrame((int)position.X / 16, (int)position.Y / 16, true); //Update the tile framing - if (Main.netMode == NetmodeID.MultiplayerClient) - NetMessage.SendTileSquare(-1, (int)position.X / 16, (int)position.Y / 16, 1, TileChangeType.None); - } - - Tile targetTileAbove = Main.tile[(int)position.X / 16, (int)position.Y / 16 - 1]; - if (!targetTileAbove.active() && ((targetTile.type == TileID.Grass || targetTile.type == TileID.HallowedGrass || targetTile.type == TileID.JungleGrass) && targetTile.active())) //If theres air above - { - if (targetTile.type == TileID.Grass) - { - if (Main.rand.NextBool(2)) - { - targetTileAbove.active(true); - targetTileAbove.type = TileID.Plants; - targetTileAbove.frameX = (short)(18 * Main.rand.Next(0, 11)); - while (targetTileAbove.frameX == 144) //Exclude the mushroom - { - targetTileAbove.frameX = (short)(18 * Main.rand.Next(0, 11)); - } - } - else - { - targetTileAbove.active(true); - targetTileAbove.type = TileID.Plants2; - targetTileAbove.frameX = (short)(18 * Main.rand.Next(0, 21)); - while (targetTileAbove.frameX == 144) - { - targetTileAbove.frameX = (short)(18 * Main.rand.Next(0, 21)); - } - } - } - //On hallowed grass, grow hallowed plants - else if (targetTile.type == TileID.Grass) - { - if (Main.rand.NextBool(2)) - { - targetTileAbove.active(true); - targetTileAbove.type = TileID.HallowedPlants; - targetTileAbove.frameX = (short)(18 * Main.rand.Next(0, 7)); - } - else - { - targetTileAbove.active(true); - targetTileAbove.type = TileID.HallowedPlants2; - targetTileAbove.frameX = (short)(18 * Main.rand.Next(0, 8)); - while (targetTileAbove.frameX == 90) - { - targetTileAbove.frameX = (short)(18 * Main.rand.Next(0, 8)); - } - } - } - //On jungle grass, grow jungle flowers - else if (targetTile.type == TileID.JungleGrass) - { - targetTileAbove.active(true); - targetTileAbove.type = TileID.JunglePlants2; - targetTileAbove.frameX = (short)(18 * Main.rand.Next(0, 17)); - } - - if (Main.netMode == NetmodeID.MultiplayerClient) - NetMessage.SendTileSquare(-1, (int)position.X / 16, (int)position.Y / 16 - 1, 1, TileChangeType.None); - } - - } - - } - internal float EaseInFunction(float progress) => progress == 0 ? 0f : (float)Math.Pow(2, 10 * progress - 10); //Potion seller i need your strongest easeIns private float GetSwingRatio() diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 30276f3259..517c04a945 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -564,7 +564,7 @@ namespace CalamityMod.Projectiles.Melee case 2: projectile.width = projectile.height = 170; Main.PlaySound(SoundID.DD2_PhantomPhoenixShot, projectile.Center); - projectile.damage *= (int)(projectile.damage * TrueBiomeBlade.ColdAttunement_ThirdSwingBoost); + projectile.damage = (int)(projectile.damage * TrueBiomeBlade.ColdAttunement_ThirdSwingBoost); break; } @@ -1934,6 +1934,7 @@ namespace CalamityMod.Projectiles.Melee { SlamDown(); projectile.timeLeft = 0; + Owner.Calamity().LungingDown = false; projectile.active = false; projectile.netUpdate = true; projectile.netSpam = 0; diff --git a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs index db99f61704..5a5a048b6d 100644 --- a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs @@ -1118,6 +1118,7 @@ namespace CalamityMod.Projectiles.Melee { SlamDown(); projectile.timeLeft = 0; + Owner.Calamity().LungingDown = false; projectile.active = false; projectile.netUpdate = true; projectile.netSpam = 0; @@ -1594,8 +1595,6 @@ namespace CalamityMod.Projectiles.Melee } } - - //Lamentations of the Chained aka FlailBlade attunement public class LamentationsOfTheChained : ModProjectile @@ -1622,15 +1621,9 @@ namespace CalamityMod.Projectiles.Melee const float MaxTangleReach = 400f; //How long can tangling vines from crits be + //Doing your mom. Be warned that the X value of these vectors represents the angle of the whip while the Y value represents its RNG seed public Vector2 whip1; - public BezierCurve curve1; - private Vector2 controlPoint11; - private Vector2 controlPoint12; - public Vector2 whip2; - public BezierCurve curve2; - private Vector2 controlPoint21; - private Vector2 controlPoint22; internal bool ReelingBack => Timer / MaxTime > SnappingPoint; @@ -1651,24 +1644,23 @@ namespace CalamityMod.Projectiles.Melee public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { - BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, projectile.Center }); - int numPoints = 32; - Vector2[] chainPositions = curve.GetPoints(numPoints).ToArray(); - float collisionPoint = 0; - for (int i = 1; i < numPoints; i++) - { - Vector2 position = chainPositions[i]; - Vector2 previousPosition = chainPositions[i - 1]; - if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), position, previousPosition, 6, ref collisionPoint)) - return true; - if (i == numPoints - 1) //Extra lenght collision for the blade itself - { - Vector2 projectileHalfLenght = 85 * projectile.rotation.ToRotationVector2(); - return (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center - projectileHalfLenght, projectile.Center + projectileHalfLenght, 32, ref collisionPoint)); - } + //int numPoints = 32; + //Vector2[] chainPositions = curve.GetPoints(numPoints).ToArray(); + //float collisionPoint = 0; + //for (int i = 1; i < numPoints; i++) + //{ + // Vector2 position = chainPositions[i]; + // Vector2 previousPosition = chainPositions[i - 1]; + // if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), position, previousPosition, 6, ref collisionPoint)) + // return true; + // if (i == numPoints - 1) //Extra lenght collision for the blade itself + // { + // Vector2 projectileHalfLenght = 85 * projectile.rotation.ToRotationVector2(); + // return (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center - projectileHalfLenght, projectile.Center + projectileHalfLenght, 32, ref collisionPoint)); + // } - } + //} return base.Colliding(projHitbox, targetHitbox); } @@ -1741,12 +1733,6 @@ namespace CalamityMod.Projectiles.Melee { Main.PlaySound(SoundID.DD2_OgreSpit, projectile.Center); - controlPoint11 = projectile.Center; - controlPoint12 = projectile.Center; - - controlPoint21 = projectile.Center; - controlPoint22 = projectile.Center; - projectile.timeLeft = (int)MaxTime; initialized = true; projectile.netUpdate = true; @@ -1797,13 +1783,10 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/OmegaBiomeBlade"); Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained"); - - //Vector2 projBottom = projectile.Center + new Vector2(-handle.Width / 2, handle.Height / 2).RotatedBy(projectile.rotation + MathHelper.PiOver4) * 0.75f; - //DrawChain(spriteBatch, projBottom, out Vector2[] chainPositions); + DrawChain(spriteBatch, out Vector2[] chainPositions1, out Vector2[] chainPositions2); //float drawRotation = (projBottom - chainPositions[chainPositions.Length - 2]).ToRotation() + MathHelper.PiOver4; //Face away from the last point of the bezier curve @@ -1821,6 +1804,15 @@ namespace CalamityMod.Projectiles.Melee spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); //Draw the tip of the flails here + Texture2D flailBlade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedFlail"); + Rectangle bladeFrame = new Rectangle(0, 0, 24, 48); + Vector2 flailOrigin = new Vector2(bladeFrame.Width / 2, bladeFrame.Height); //Draw from center bottom of texture + + if (chainPositions1.Length > 1) + { + float flailRotation = (chainPositions1[chainPositions1.Length - 1] - chainPositions1[chainPositions1.Length - 2]).ToRotation() + MathHelper.PiOver2; + spriteBatch.Draw(flailBlade, chainPositions1[chainPositions1.Length - 1] - Main.screenPosition, bladeFrame, Color.White, flailRotation, flailOrigin, 1, SpriteEffects.None, 0); + } drawOrigin = new Vector2(0f, blade.Height); spriteBatch.Draw(blade, drawPos - Main.screenPosition, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); @@ -1831,41 +1823,96 @@ namespace CalamityMod.Projectiles.Melee return false; } - private void DrawChain(SpriteBatch spriteBatch, Vector2 projBottom, out Vector2[] chainPositions1 out Vector2) + //TLDR : https://media.discordapp.net/attachments/659100646397575208/933521303443501136/placeholder.gif + private void GenerateCurve(float seed, Vector2 direction, out Vector2 control0, out Vector2 control1, out Vector2 control2, out Vector2 control3, float angleShift = 0f) { - Texture2D chainTex = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedChain"); + float randomNumber = 0.5f + ((float)Math.Sin(seed * 17.07947) + (float)Math.Sin(seed * 0.2f * 25.13274)) * 0.25f ; //Ty dom for the awesome pseudo rng - float ratio = GetSwingRatio(); + float flip = randomNumber >= 0.5 ? 1f : -1f; - float rotationAngle = MathHelper.PiOver4 * Math.Sign(projectile.velocity.X) * flipped; + + control0 = Owner.MountedCenter + direction.RotatedBy(MathHelper.ToRadians(MathHelper.Lerp(MathHelper.PiOver4 * 0.3f * flip, MathHelper.PiOver4 * flip, randomNumber))) * MathHelper.Lerp(50f, 130f, (float)Math.Sin(randomNumber * MathHelper.Pi)); + + float Reach = MaxReach * (1f + 0.5f * randomNumber); + control3 = Owner.MountedCenter + direction * Reach; // The last point of the curve gets put straight at the front + + //Over the double fucking bezier rainbow + Vector2 point1 = control3 + direction.RotatedBy(MathHelper.PiOver2) * 50; + Vector2 point2 = control3 + direction.RotatedBy(MathHelper.PiOver2) * 50 + direction * 250; + Vector2 point3 = control3 + direction.RotatedBy(-MathHelper.PiOver2) * 50 + direction * 250; + Vector2 point4 = control3 + direction.RotatedBy(-MathHelper.PiOver2) * 50; + BezierCurve curve = new BezierCurve(new Vector2[] { point1, point2, point3, point4 }); + control3 = curve.Evaluate(randomNumber); + + Vector2 directionFromHead = direction.RotatedBy(MathHelper.ToRadians(MathHelper.Lerp(0, 160f * flip, (float)Math.Sin(randomNumber * MathHelper.Pi)))) * MathHelper.Lerp(130f, 200f, MathHelper.Clamp((float)Math.Sin(randomNumber * MathHelper.Pi) - 0.5f, 0f, 1f) * 2f); + control2 = control3 + directionFromHead; + + Vector2 directionFromSecondToLastPoint = Vector2.Normalize(directionFromHead.RotatedBy(MathHelper.Pi - MathHelper.ToRadians(MathHelper.Lerp(80f * flip, 110f * flip, (float)Math.Sin(randomNumber * MathHelper.Pi))))) * MathHelper.Lerp(120f, 280f, (float)Math.Sin(randomNumber * MathHelper.Pi)); + control1 = control2 + directionFromSecondToLastPoint; + + //Get new random numbers based on the same seed + float seed1 = 0.5f + ((float)Math.Sin(randomNumber * 100f * 17.07947) + (float)Math.Sin(randomNumber * 100f * 0.2f * 25.13274)) * 0.25f; + float seed2 = 0.5f + ((float)Math.Sin(seed1 * 50f * 17.07947) + (float)Math.Sin(seed1 * 50f * 0.2f * 25.13274)) * 0.25f; + float seed3 = 0.5f + ((float)Math.Sin(seed2 * 17.07947) + (float)Math.Sin(seed2 * 0.2f * 25.13274)) * 0.25f; + + control3 += Vector2.UnitX.RotatedBy(MathHelper.TwoPi * seed1) * seed3 * 30f; + control2 += Vector2.UnitX.RotatedBy(MathHelper.TwoPi * seed2) * seed1 * 30f; + control1 += Vector2.UnitX.RotatedBy(MathHelper.TwoPi * seed3) * seed2 * 30f; + } + + private void DrawChain(SpriteBatch spriteBatch, out Vector2[] chainPositions1, out Vector2[] chainPositions2) + { + + Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedFlail"); + Rectangle chainFrame = new Rectangle(0, 70, 24, 14); + Rectangle guardFrame = new Rectangle(0, 50, 24, 18); //Set the first whip - if (ChainSwapTimer % OmegaBiomeBlade.FlailBladeAttunement_FlailTime == 0) - whip1 = projectile.velocity.RotatedBy(Main.rand.NextFloat(MathHelper.Pi / 8f, MathHelper.Pi / 8f)); + if (ChainSwapTimer % 6 == 0 || whip1.Y == 0) + { + whip1.X = projectile.velocity.RotatedBy(Main.rand.NextFloat(MathHelper.Pi / 16f, -MathHelper.Pi / 16f)).ToRotation(); //X is the orientation + whip1.Y = Main.rand.NextFloat(0.2f, 100f);//Y is the "seed" - //Set the second whip - if ((ChainSwapTimer - OmegaBiomeBlade.FlailBladeAttunement_FlailTime * 0.5f) % OmegaBiomeBlade.FlailBladeAttunement_FlailTime == 0) - whip2 = projectile.velocity.RotatedBy(Main.rand.NextFloat(MathHelper.Pi / 8f, MathHelper.Pi / 8f)); + ChainSwapTimer++; + } - //Watch this randomness float offsetBase = (sin(frameY * 17.07947 + uTime * 16) + sin(coords.y * 25.13274)) * 0.5 + GenerateCurve(whip1.Y, projectile.velocity, out Vector2 control0, out Vector2 control1, out Vector2 control2, out Vector2 control3); - int numPoints = 30; - chainPositions = curve.GetPoints(numPoints).ToArray(); + //First chain + BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, control0, control1, control2, control3 }); + int numPoints = 40; + chainPositions1 = curve.GetPoints(numPoints).ToArray(); //Draw each chain segment bar the very first one for (int i = 1; i < numPoints; i++) { - Vector2 position = chainPositions[i]; - float rotation = (chainPositions[i] - chainPositions[i - 1]).ToRotation() - MathHelper.PiOver2; //Calculate rotation based on direction from last point - float yScale = Vector2.Distance(chainPositions[i], chainPositions[i - 1]) / chainTex.Height; //Calculate how much to squash/stretch for smooth chain based on distance between points - Vector2 scale = new Vector2(1, yScale); + Vector2 position = chainPositions1[i]; + + float rotation = (chainPositions1[i] - chainPositions1[i - 1]).ToRotation() + MathHelper.PiOver2; //Calculate rotation based on direction from last point Color chainLightColor = Lighting.GetColor((int)position.X / 16, (int)position.Y / 16); //Lighting of the position of the chain segment - Vector2 origin = new Vector2(chainTex.Width / 2, chainTex.Height); //Draw from center bottom of texture - spriteBatch.Draw(chainTex, position - Main.screenPosition, null, chainLightColor, rotation, origin, scale, SpriteEffects.None, 0); + + if (i < numPoints - 1) + { + float yScale = Vector2.Distance(chainPositions1[i], chainPositions1[i - 1]) / chainFrame.Height; //Calculate how much to squash/stretch for smooth chain based on distance between points + Vector2 scale = new Vector2(1, yScale); //Remember to make it get thicker and thinner based on whatever + Vector2 origin = new Vector2(chainFrame.Width / 2, chainFrame.Height); //Draw from center bottom of texture + spriteBatch.Draw(tex, chainPositions1[i] - Main.screenPosition, chainFrame, chainLightColor, rotation, origin, scale, SpriteEffects.None, 0); + } + else + { + Vector2 origin = new Vector2(guardFrame.Width / 2, guardFrame.Height); //Draw from center bottom of texture + spriteBatch.Draw(tex, chainPositions1[i] - Main.screenPosition, guardFrame, chainLightColor, rotation, origin, 1, SpriteEffects.None, 0); + } } + + chainPositions2 = new Vector2[1]; + chainPositions2[0] = Owner.Center; + + //Second chain } + public override void SendExtraAI(BinaryWriter writer) { writer.Write(initialized); diff --git a/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedFlail.png b/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedFlail.png index 1bc8a39aae3140c7a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%}oN{LX(}Q70Js14Ob82JUF&S3|q?1bQU? zo;YE5j%ysSBS%b}q1}3dc&A3->wPEeX%h_>YCnB5v|3M)n4m`@Bc2+DpsU+>;ag9T zlAuL8B53GI?AG5Z3Qpz$PPKR@LVttp!IA6wC+?$K@d<#m+!+AmUYI9H zZ?3OW08RHg0Z8qd48Z)(Off+8chlYZ`2aXZjRL^eEk9LCdZqyI;`$lkIA>LnC?~mN z6hNoHSAW>8%OYQQHvq}0sQ_dwP61%!w3$F?#3u^V0eJAT9e}dBF2iiJ?o3`%kSi+c zo-~QyJNs6P`dwFViE>toJl?CD{D2h%EnY3}AC^8A6}ny5{n65~;aa6Af62)bWv8ba zu!3Opm@x{V#p@MWpyJ&MAn@sZ0HEhbYLKf&;D3vcR{%~=wea`5G<)<3zJL4mN+Rw^ zZI1C;gQd#>C_c0ofWwz>15jC82S8j$8vu?V|JY7#FSGAvx43Wz0IeO`W5nkC901%) z)&X#E&o`Z>{ss*4iO?#_5I{Audxbt(70!XeI2ZWvjx-231PtN3E zy?;q=0HAAu_6m7E{i+~c`E;2!2d@(VJLkZxLSF}o6I=lZUCGxGt%I;%nfjh{ z>D*}mvinwYKY{^eKf&6(MGD~2+jcFB-W~^FL5}vi^2}2)puhbD_08>OS!DKxA!I+n z(9NROjt>A#pW;#g#pNFDKQH$HFe`hm0v~u)RcYw2E9wM40nn`pVI*i?lmGw#07*qo IM6N<$f+(oLc>n+a From 0a2609f469c825b19b4135e2a1d747d303df9722 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Thu, 20 Jan 2022 05:49:14 +0100 Subject: [PATCH 54/76] Whip progress --- Items/Weapons/Melee/BiomeBlade.cs | 3 + Items/Weapons/Melee/TrueBiomeBlade.cs | 4 + .../Melee/BrokenBiomeBladeProjectiles.cs | 6 +- .../Melee/MendedBiomeBladeProjectiles.cs | 8 +- .../Melee/TrueBiomeBladeProjectiles.cs | 141 +++++++++++------- 5 files changed, 100 insertions(+), 62 deletions(-) diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index af33f7f179..f7b0bc9831 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -43,9 +43,12 @@ namespace CalamityMod.Items.Weapons.Melee public static int HotAttunement_BaseDamage = 70; public static int HotAttunement_ShredIFrames = 8; + public static int HotAttunement_LocalIFrames = 30; //Be warned its got one extra update so all the iframes should be divided in 2 + public static int HotAttunement_LocalIFramesCharged = 16; public static int TropicalAttunement_BaseDamage = 55; public static float TropicalAttunement_ChainDamageReduction = 0.5f; + public static int TropicalAttunement_LocalIFrames = 60; //Be warned its got 2 extra updates so all the iframes should be divided in 3 #endregion public override void SetStaticDefaults() diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 27f5fd67e7..dfe5d7845a 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -45,14 +45,18 @@ namespace CalamityMod.Items.Weapons.Melee public static int HotAttunement_BaseDamage = 320; public static int HotAttunement_ShredIFrames = 8; public static float HotAttunement_ShotDamageBoost = 2; + public static int HotAttunement_LocalIFrames = 30; //Be warned its got one extra update so all the iframes should be divided in 2 + public static int HotAttunement_LocalIFramesCharged = 16; public static int TropicalAttunement_BaseDamage = 160; public static float TropicalAttunement_ChainDamageReduction = 0.5f; public static float TropicalAttunement_VineDamageReduction = 0.5f; + public static int TropicalAttunement_LocalIFrames = 60; //Be warned its got 2 extra updates so all the iframes should be divided in 3 public static int HolyAttunement_BaseDamage = 160; public static float HolyAttunement_BaseDamageReduction = 0.2f; public static float HolyAttunement_FullChargeDamageBoost = 2f; + public static int HolyAttunement_LocalIFrames = 16; //Be warned its got 1 extra update yadda yadda public static int AstralAttunement_BaseDamage = 500; public static int AstralAttunement_DashHitIFrames = 30; diff --git a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs index f4b0c8aa58..acf4babdb4 100644 --- a/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/BrokenBiomeBladeProjectiles.cs @@ -504,7 +504,7 @@ namespace CalamityMod.Projectiles.Melee projectile.penetrate = -1; projectile.extraUpdates = 1; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 16; + projectile.localNPCHitCooldown = BiomeBlade.HotAttunement_LocalIFrames; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) @@ -579,7 +579,7 @@ namespace CalamityMod.Projectiles.Melee projectile.Center = Owner.Center + (direction * 60); //Scaling based on shred - projectile.localNPCHitCooldown = 16 - (int)(MathHelper.Lerp(0, 8, ShredRatio)); //Increase the hit frequency + projectile.localNPCHitCooldown = BiomeBlade.HotAttunement_LocalIFrames - (int)(MathHelper.Lerp(0, BiomeBlade.HotAttunement_LocalIFrames - BiomeBlade.HotAttunement_LocalIFramesCharged, ShredRatio)); //Increase the hit frequency projectile.scale = 1f + (ShredRatio * 1f); //SWAGGER @@ -726,7 +726,7 @@ namespace CalamityMod.Projectiles.Melee projectile.penetrate = -1; projectile.extraUpdates = 2; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 30; + projectile.localNPCHitCooldown = BiomeBlade.TropicalAttunement_LocalIFrames; } public override bool? CanCutTiles() => false; //Itd be quite counterproductive to make the whip cut the tiles it just grew diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index 517c04a945..afbc4817a8 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -814,7 +814,7 @@ namespace CalamityMod.Projectiles.Melee projectile.penetrate = -1; projectile.extraUpdates = 1; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 16; + projectile.localNPCHitCooldown = TrueBiomeBlade.HotAttunement_LocalIFrames; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) @@ -890,7 +890,7 @@ namespace CalamityMod.Projectiles.Melee projectile.Center = Owner.Center + (direction * 60); //Scaling based on shred - projectile.localNPCHitCooldown = 16 - (int)(MathHelper.Lerp(0, 8, ShredRatio)); //Increase the hit frequency + projectile.localNPCHitCooldown = TrueBiomeBlade.HotAttunement_LocalIFrames - (int)(MathHelper.Lerp(0, TrueBiomeBlade.HotAttunement_LocalIFrames - TrueBiomeBlade.HotAttunement_LocalIFramesCharged, ShredRatio)); //Increase the hit frequency projectile.scale = 1f + (ShredRatio * 1f); //SWAGGER @@ -1162,7 +1162,7 @@ namespace CalamityMod.Projectiles.Melee projectile.penetrate = -1; projectile.extraUpdates = 2; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 30; + projectile.localNPCHitCooldown = TrueBiomeBlade.TropicalAttunement_LocalIFrames; } public override bool? CanCutTiles() => false; //Itd be quite counterproductive to make the whip cut the tiles it just grew @@ -1547,7 +1547,7 @@ namespace CalamityMod.Projectiles.Melee projectile.penetrate = -1; projectile.extraUpdates = 1; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 16; + projectile.localNPCHitCooldown = TrueBiomeBlade.HolyAttunement_LocalIFrames; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) diff --git a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs index 5a5a048b6d..097f101ecf 100644 --- a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs @@ -1624,6 +1624,7 @@ namespace CalamityMod.Projectiles.Melee //Doing your mom. Be warned that the X value of these vectors represents the angle of the whip while the Y value represents its RNG seed public Vector2 whip1; public Vector2 whip2; + public Vector2 whip3; internal bool ReelingBack => Timer / MaxTime > SnappingPoint; @@ -1731,8 +1732,6 @@ namespace CalamityMod.Projectiles.Melee { if (!initialized) //Initialization. create control points & shit) { - Main.PlaySound(SoundID.DD2_OgreSpit, projectile.Center); - projectile.timeLeft = (int)MaxTime; initialized = true; projectile.netUpdate = true; @@ -1763,30 +1762,24 @@ namespace CalamityMod.Projectiles.Melee Owner.itemAnimation = 2; projectile.timeLeft = 2; + if (ChainSwapTimer % 5 == 0) + { + Main.PlaySound(SoundID.DD2_OgreSpit, projectile.Center); + } + //if ((ChainSwapTimer - 12f) % 23 == 0) + //{ + // Main.PlaySound(SoundID.Item41, projectile.Center); + //} ChainSwapTimer++; } - - private float GetSwingRatio() => Timer / MaxTime; - - private Vector2 SwingPosition(float progress) - { - - float distance = MaxReach * Size * MathHelper.Lerp((float)Math.Sin(progress * MathHelper.Pi), 1, 0.01f); - distance = Math.Max(distance, 65); //Dont be too close to player - - float angleDeviation = MathHelper.Pi / 1.2f; - float angleOffset = Owner.direction * flipped * MathHelper.Lerp(-angleDeviation, angleDeviation, progress); //Go from very angled to straight at the zenith of the attack - return projectile.velocity.RotatedBy(angleOffset) * distance; - } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/OmegaBiomeBlade"); Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained"); - DrawChain(spriteBatch, out Vector2[] chainPositions1, out Vector2[] chainPositions2); + CalculateChains(spriteBatch, out Vector2[] chainPositions1, out Vector2[] chainPositions2, out Vector2[] chainPositions3); //float drawRotation = (projBottom - chainPositions[chainPositions.Length - 2]).ToRotation() + MathHelper.PiOver4; //Face away from the last point of the bezier curve @@ -1808,11 +1801,14 @@ namespace CalamityMod.Projectiles.Melee Rectangle bladeFrame = new Rectangle(0, 0, 24, 48); Vector2 flailOrigin = new Vector2(bladeFrame.Width / 2, bladeFrame.Height); //Draw from center bottom of texture - if (chainPositions1.Length > 1) - { - float flailRotation = (chainPositions1[chainPositions1.Length - 1] - chainPositions1[chainPositions1.Length - 2]).ToRotation() + MathHelper.PiOver2; - spriteBatch.Draw(flailBlade, chainPositions1[chainPositions1.Length - 1] - Main.screenPosition, bladeFrame, Color.White, flailRotation, flailOrigin, 1, SpriteEffects.None, 0); - } + float flailRotation = (chainPositions1[chainPositions1.Length - 2] - chainPositions1[chainPositions1.Length - 3]).ToRotation() + MathHelper.PiOver2; + spriteBatch.Draw(flailBlade, chainPositions1[chainPositions1.Length - 2] - Main.screenPosition, bladeFrame, Color.White, flailRotation, flailOrigin, 1, SpriteEffects.None, 0); + + flailRotation = (chainPositions2[chainPositions2.Length - 2] - chainPositions2[chainPositions1.Length - 3]).ToRotation() + MathHelper.PiOver2; + spriteBatch.Draw(flailBlade, chainPositions2[chainPositions2.Length - 2] - Main.screenPosition, bladeFrame, Color.White, flailRotation, flailOrigin, 1, SpriteEffects.None, 0); + + flailRotation = (chainPositions3[chainPositions3.Length - 2] - chainPositions3[chainPositions3.Length - 3]).ToRotation() + MathHelper.PiOver2; + spriteBatch.Draw(flailBlade, chainPositions3[chainPositions3.Length - 2] - Main.screenPosition, bladeFrame, Color.White, flailRotation, flailOrigin, 1, SpriteEffects.None, 0); drawOrigin = new Vector2(0f, blade.Height); spriteBatch.Draw(blade, drawPos - Main.screenPosition, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); @@ -1824,17 +1820,26 @@ namespace CalamityMod.Projectiles.Melee } //TLDR : https://media.discordapp.net/attachments/659100646397575208/933521303443501136/placeholder.gif - private void GenerateCurve(float seed, Vector2 direction, out Vector2 control0, out Vector2 control1, out Vector2 control2, out Vector2 control3, float angleShift = 0f) + private void GenerateCurve(float seed, Vector2 direction, out Vector2 control0, out Vector2 control1, out Vector2 control2, out Vector2 control3, float angleShift = 0f, float necessaryOrientation = 1f) { float randomNumber = 0.5f + ((float)Math.Sin(seed * 17.07947) + (float)Math.Sin(seed * 0.2f * 25.13274)) * 0.25f ; //Ty dom for the awesome pseudo rng + //Get new random numbers based on the same seed + float seed1 = 0.5f + ((float)Math.Sin(randomNumber * 100f * 17.07947) + (float)Math.Sin(randomNumber * 100f * 0.2f * 25.13274)) * 0.25f; + float seed2 = 0.5f + ((float)Math.Sin(seed1 * 50f * 17.07947) + (float)Math.Sin(seed1 * 50f * 0.2f * 25.13274)) * 0.25f; + float seed3 = 0.5f + ((float)Math.Sin(seed2 * 17.07947) + (float)Math.Sin(seed2 * 0.2f * 25.13274)) * 0.25f; + + if ((necessaryOrientation == -1 && randomNumber >= 0.5) || (necessaryOrientation == 1 && randomNumber < 0.5)) + randomNumber = 1 - randomNumber; + float flip = randomNumber >= 0.5 ? 1f : -1f; control0 = Owner.MountedCenter + direction.RotatedBy(MathHelper.ToRadians(MathHelper.Lerp(MathHelper.PiOver4 * 0.3f * flip, MathHelper.PiOver4 * flip, randomNumber))) * MathHelper.Lerp(50f, 130f, (float)Math.Sin(randomNumber * MathHelper.Pi)); - float Reach = MaxReach * (1f + 0.5f * randomNumber); - control3 = Owner.MountedCenter + direction * Reach; // The last point of the curve gets put straight at the front + float easedShift = angleShift == 1 ? 1 : 1 - (float)Math.Pow(2, -10 * angleShift); + float Reach = MaxReach * (0.75f + 0.75f * seed2 - 0.05f * easedShift); + control3 = Owner.MountedCenter + (direction * Reach).RotatedBy(MathHelper.Lerp(-0.01f * flip, 0.01f * flip, easedShift)); // The last point of the curve gets put straight at the front //Over the double fucking bezier rainbow Vector2 point1 = control3 + direction.RotatedBy(MathHelper.PiOver2) * 50; @@ -1850,66 +1855,92 @@ namespace CalamityMod.Projectiles.Melee Vector2 directionFromSecondToLastPoint = Vector2.Normalize(directionFromHead.RotatedBy(MathHelper.Pi - MathHelper.ToRadians(MathHelper.Lerp(80f * flip, 110f * flip, (float)Math.Sin(randomNumber * MathHelper.Pi))))) * MathHelper.Lerp(120f, 280f, (float)Math.Sin(randomNumber * MathHelper.Pi)); control1 = control2 + directionFromSecondToLastPoint; - //Get new random numbers based on the same seed - float seed1 = 0.5f + ((float)Math.Sin(randomNumber * 100f * 17.07947) + (float)Math.Sin(randomNumber * 100f * 0.2f * 25.13274)) * 0.25f; - float seed2 = 0.5f + ((float)Math.Sin(seed1 * 50f * 17.07947) + (float)Math.Sin(seed1 * 50f * 0.2f * 25.13274)) * 0.25f; - float seed3 = 0.5f + ((float)Math.Sin(seed2 * 17.07947) + (float)Math.Sin(seed2 * 0.2f * 25.13274)) * 0.25f; - control3 += Vector2.UnitX.RotatedBy(MathHelper.TwoPi * seed1) * seed3 * 30f; control2 += Vector2.UnitX.RotatedBy(MathHelper.TwoPi * seed2) * seed1 * 30f; control1 += Vector2.UnitX.RotatedBy(MathHelper.TwoPi * seed3) * seed2 * 30f; } - private void DrawChain(SpriteBatch spriteBatch, out Vector2[] chainPositions1, out Vector2[] chainPositions2) + private void CalculateChains(SpriteBatch spriteBatch, out Vector2[] chainPositions1, out Vector2[] chainPositions2, out Vector2[] chainPositions3) + { + + if (ChainSwapTimer % 6 == 0 || whip1.Y == 0) + { + whip1.X = projectile.velocity.RotatedBy(Main.rand.NextFloat(MathHelper.PiOver4 / 16f, -MathHelper.PiOver4 / 16f)).ToRotation(); //X is the orientation + whip1.Y = Main.rand.NextFloat(0.2f, 100f);//Y is the "seed" + + ChainSwapTimer++; + } + + if ((ChainSwapTimer - 2) % 6 == 0 || whip2.Y == 0) + { + whip2.X = projectile.velocity.RotatedBy(Main.rand.NextFloat(MathHelper.Pi / 16f, -MathHelper.Pi / 16f)).ToRotation(); //X is the orientation + whip2.Y = Main.rand.NextFloat(0.2f, 100f);//Y is the "seed" + + ChainSwapTimer++; + } + + if ((ChainSwapTimer - 4) % 6 == 0 || whip3.Y == 0) + { + whip3.X = projectile.velocity.RotatedBy(Main.rand.NextFloat(MathHelper.Pi / 16f, -MathHelper.Pi / 16f)).ToRotation(); //X is the orientation + whip3.Y = Main.rand.NextFloat(0.2f, 100f);//Y is the "seed" + + ChainSwapTimer++; + } + + + GenerateCurve(whip1.Y, whip1.X.ToRotationVector2(), out Vector2 control0, out Vector2 control1, out Vector2 control2, out Vector2 control3, (ChainSwapTimer % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, 1); + DrawChain(spriteBatch, out chainPositions1, control0, control1, control2, control3); + + GenerateCurve(whip2.Y, whip2.X.ToRotationVector2(), out control0, out control1, out control2, out control3, ((ChainSwapTimer - OmegaBiomeBlade.FlailBladeAttunement_FlailTime / 3f) % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, -1); + DrawChain(spriteBatch, out chainPositions2, control0, control1, control2, control3); + + GenerateCurve(whip3.Y, whip3.X.ToRotationVector2(), out control0, out control1, out control2, out control3, ((ChainSwapTimer - OmegaBiomeBlade.FlailBladeAttunement_FlailTime * 2f / 3f) % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, -1); + DrawChain(spriteBatch, out chainPositions3, control0, control1, control2, control3); + } + + private void DrawChain(SpriteBatch spriteBatch, out Vector2[] chainPositions, Vector2 control0, Vector2 control1, Vector2 control2, Vector2 control3) { Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedFlail"); Rectangle chainFrame = new Rectangle(0, 70, 24, 14); Rectangle guardFrame = new Rectangle(0, 50, 24, 18); - //Set the first whip - if (ChainSwapTimer % 6 == 0 || whip1.Y == 0) - { - whip1.X = projectile.velocity.RotatedBy(Main.rand.NextFloat(MathHelper.Pi / 16f, -MathHelper.Pi / 16f)).ToRotation(); //X is the orientation - whip1.Y = Main.rand.NextFloat(0.2f, 100f);//Y is the "seed" - - ChainSwapTimer++; - } - - - GenerateCurve(whip1.Y, projectile.velocity, out Vector2 control0, out Vector2 control1, out Vector2 control2, out Vector2 control3); - //First chain BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, control0, control1, control2, control3 }); int numPoints = 40; - chainPositions1 = curve.GetPoints(numPoints).ToArray(); + chainPositions = curve.GetPoints(numPoints).ToArray(); //Draw each chain segment bar the very first one for (int i = 1; i < numPoints; i++) { - Vector2 position = chainPositions1[i]; + Vector2 position = chainPositions[i]; - float rotation = (chainPositions1[i] - chainPositions1[i - 1]).ToRotation() + MathHelper.PiOver2; //Calculate rotation based on direction from last point + float rotation = (chainPositions[i] - chainPositions[i - 1]).ToRotation() + MathHelper.PiOver2; //Calculate rotation based on direction from last point Color chainLightColor = Lighting.GetColor((int)position.X / 16, (int)position.Y / 16); //Lighting of the position of the chain segment if (i < numPoints - 1) { - float yScale = Vector2.Distance(chainPositions1[i], chainPositions1[i - 1]) / chainFrame.Height; //Calculate how much to squash/stretch for smooth chain based on distance between points - Vector2 scale = new Vector2(1, yScale); //Remember to make it get thicker and thinner based on whatever + float yScale = Vector2.Distance(chainPositions[i], chainPositions[i - 1]) / chainFrame.Height; //Calculate how much to squash/stretch for smooth chain based on distance between points + + float segmentProgress = i < 30f ? i / 30f : 1 - (i - 30f) / 10f; + float xScale = 1f + 0.75f * (float)Math.Sin(segmentProgress * MathHelper.PiOver2); + + Vector2 scale = new Vector2(xScale, yScale); //Remember to make it get thicker and thinner based on whatever Vector2 origin = new Vector2(chainFrame.Width / 2, chainFrame.Height); //Draw from center bottom of texture - spriteBatch.Draw(tex, chainPositions1[i] - Main.screenPosition, chainFrame, chainLightColor, rotation, origin, scale, SpriteEffects.None, 0); + spriteBatch.Draw(tex, chainPositions[i] - Main.screenPosition, chainFrame, chainLightColor, rotation, origin, scale, SpriteEffects.None, 0); } else { Vector2 origin = new Vector2(guardFrame.Width / 2, guardFrame.Height); //Draw from center bottom of texture - spriteBatch.Draw(tex, chainPositions1[i] - Main.screenPosition, guardFrame, chainLightColor, rotation, origin, 1, SpriteEffects.None, 0); + spriteBatch.Draw(tex, chainPositions[i] - Main.screenPosition, guardFrame, chainLightColor, rotation, origin, 1, SpriteEffects.None, 0); + + if (Main.rand.Next(6) == 0) + { + Particle Spark = new CritSpark(chainPositions[i], Vector2.Zero, Color.White, Color.SteelBlue, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 0.6f); + GeneralParticleHandler.SpawnParticle(Spark); + } } } - - chainPositions2 = new Vector2[1]; - chainPositions2[0] = Owner.Center; - - //Second chain } From 4aacbbf4c8b2a31092aac51648933e9641f98039 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Thu, 20 Jan 2022 15:57:27 +0100 Subject: [PATCH 55/76] More stats --- Items/Weapons/Melee/OmegaBiomeBlade.cs | 6 ++- .../Melee/TrueBiomeBladeProjectiles.cs | 38 ++++--------------- 2 files changed, 12 insertions(+), 32 deletions(-) diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index 5ae05bf7ae..7f6d5dae61 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -31,6 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee #region stats public static int WhirlwindAttunement_BaseDamage = 400; + public static int WhirlwindAttunement_LocalIFrames = 20; //Remember its got one extra update public static int WhirlwindAttunement_SigilTime = 1200; public static float WhirlwindAttunement_BeamDamageReduction = 0.5f; public static float WhirlwindAttunement_BaseDamageReduction = 0.2f; @@ -41,6 +42,8 @@ namespace CalamityMod.Items.Weapons.Melee public static int SuperPogoAttunement_BaseDamage = 500; public static int SuperPogoAttunement_ShredIFrames = 10; + public static int SuperPogoAttunement_LocalIFrames = 30; //Be warned its got one extra update so all the iframes should be divided in 2 + public static int SuperPogoAttunement_LocalIFramesCharged = 16; public static float SuperPogoAttunement_SlashDamageBoost = 5f; //Keep in mind the slice always crits public static int SuperPogoAttunementSlashLifesteal = 6; public static int SuperPogoAttunement_SlashIFrames = 60; @@ -59,8 +62,9 @@ namespace CalamityMod.Items.Weapons.Melee public static int FlailBladeAttunement_BaseDamage = 320; - public static int FlailBladeAttunement_MaxFlails = 3; + public static int FlailBladeAttunement_LocalIFrames = 10; public static int FlailBladeAttunement_FlailTime = 10; + public static int FlailBladeAttunement_Reach = 400; public static float FlailBladeAttunement_ChainDamageReduction = 0.5f; public static float FlailBladeAttunement_GhostChainDamageReduction = 0.5f; diff --git a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs index 097f101ecf..d5b9d7db10 100644 --- a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Melee projectile.penetrate = -1; projectile.extraUpdates = 1; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 16; + projectile.localNPCHitCooldown = OmegaBiomeBlade.WhirlwindAttunement_LocalIFrames; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) @@ -534,7 +534,7 @@ namespace CalamityMod.Projectiles.Melee projectile.penetrate = -1; projectile.extraUpdates = 1; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 16; + projectile.localNPCHitCooldown = OmegaBiomeBlade.SuperPogoAttunement_LocalIFrames; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) @@ -626,7 +626,7 @@ namespace CalamityMod.Projectiles.Melee projectile.Center = Owner.Center + (direction * 60); //Scaling based on shred - projectile.localNPCHitCooldown = 16 - (int)(MathHelper.Lerp(0, 8, ShredRatio)); //Increase the hit frequency + projectile.localNPCHitCooldown = OmegaBiomeBlade.SuperPogoAttunement_LocalIFrames - (int)(MathHelper.Lerp(0, OmegaBiomeBlade.SuperPogoAttunement_LocalIFrames - OmegaBiomeBlade.SuperPogoAttunement_LocalIFramesCharged, ShredRatio)); //Increase the hit frequency projectile.scale = 1f + (ShredRatio * 1f); //SWAGGER @@ -1604,21 +1604,10 @@ namespace CalamityMod.Projectiles.Melee public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained"; private bool initialized = false; public Player Owner => Main.player[projectile.owner]; - public float Timer => MaxTime - projectile.timeLeft; public ref float ChainSwapTimer => ref projectile.ai[0]; public ref float SnapCoyoteTime => ref projectile.ai[1]; - private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; - public float Size; - public float flipped; - - public static readonly float MaxTime = (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime; - const int coyoteTimeFrames = 8; //How many frames does the whip stay extended - const int MaxReach = 400; - const float SnappingPoint = 0.45f; //When does the snap occur. - const float ReelBackStrenght = 14f; - const float MaxTangleReach = 400f; //How long can tangling vines from crits be //Doing your mom. Be warned that the X value of these vectors represents the angle of the whip while the Y value represents its RNG seed @@ -1626,7 +1615,6 @@ namespace CalamityMod.Projectiles.Melee public Vector2 whip2; public Vector2 whip3; - internal bool ReelingBack => Timer / MaxTime > SnappingPoint; public override void SetStaticDefaults() { @@ -1640,7 +1628,7 @@ namespace CalamityMod.Projectiles.Melee projectile.friendly = true; projectile.penetrate = -1; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 30; + projectile.localNPCHitCooldown = OmegaBiomeBlade.FlailBladeAttunement_LocalIFrames; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) @@ -1730,14 +1718,6 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - if (!initialized) //Initialization. create control points & shit) - { - projectile.timeLeft = (int)MaxTime; - initialized = true; - projectile.netUpdate = true; - projectile.netSpam = 0; - } - if (!OwnerCanShoot) { projectile.Kill(); @@ -1838,7 +1818,7 @@ namespace CalamityMod.Projectiles.Melee control0 = Owner.MountedCenter + direction.RotatedBy(MathHelper.ToRadians(MathHelper.Lerp(MathHelper.PiOver4 * 0.3f * flip, MathHelper.PiOver4 * flip, randomNumber))) * MathHelper.Lerp(50f, 130f, (float)Math.Sin(randomNumber * MathHelper.Pi)); float easedShift = angleShift == 1 ? 1 : 1 - (float)Math.Pow(2, -10 * angleShift); - float Reach = MaxReach * (0.75f + 0.75f * seed2 - 0.05f * easedShift); + float Reach = OmegaBiomeBlade.FlailBladeAttunement_Reach * (0.75f + 0.75f * seed2 - 0.05f * easedShift); control3 = Owner.MountedCenter + (direction * Reach).RotatedBy(MathHelper.Lerp(-0.01f * flip, 0.01f * flip, easedShift)); // The last point of the curve gets put straight at the front //Over the double fucking bezier rainbow @@ -1946,16 +1926,12 @@ namespace CalamityMod.Projectiles.Melee public override void SendExtraAI(BinaryWriter writer) { - writer.Write(initialized); - writer.Write(flipped); - writer.Write(Size); + //Nothing lol } public override void ReceiveExtraAI(BinaryReader reader) { - initialized = reader.ReadBoolean(); - flipped = reader.ReadSingle(); - Size = reader.ReadSingle(); + //Nothing lol } } From 909313a63b3bf55b4556043f028dc50fb375135d Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Thu, 20 Jan 2022 20:22:13 +0100 Subject: [PATCH 56/76] Death by a thousand slices --- Items/Weapons/Melee/OmegaBiomeBlade.cs | 6 +- Particles/LineVFX.cs | 7 +- Particles/SemiCircularSmear.png | Bin 0 -> 14045 bytes Particles/SemiCircularSmearVFX.cs | 35 ++++ .../Melee/TrueBiomeBladeProjectiles.cs | 195 +++++++++++++----- 5 files changed, 182 insertions(+), 61 deletions(-) create mode 100644 Particles/SemiCircularSmear.png create mode 100644 Particles/SemiCircularSmearVFX.cs diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index 7f6d5dae61..5907f4db60 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Items.Weapons.Melee public static int FlailBladeAttunement_BaseDamage = 320; - public static int FlailBladeAttunement_LocalIFrames = 10; + public static int FlailBladeAttunement_LocalIFrames = 30; public static int FlailBladeAttunement_FlailTime = 10; public static int FlailBladeAttunement_Reach = 400; public static float FlailBladeAttunement_ChainDamageReduction = 0.5f; @@ -168,7 +168,7 @@ namespace CalamityMod.Items.Weapons.Melee AttunementInfo.function_description = "Hold LMB to swing the sword around you, powering up as it spins. Extra ghostly swords are summoned during the spin"; AttunementInfo.function_extra = "Releasing LMB during a spin will throw the sword out. Ghostly swords will home onto enemies hit by the sword throw"; AttunementInfo.function_passive = "While attacking, extra ghost swords have a chance to be shot out"; - AttunementInfo.color = new Color(249, 166, 224); + AttunementInfo.color = new Color(220, 105, 197); AttunementInfo.color2 = new Color(171, 239, 113); break; case Attunement.SuperPogo: @@ -190,7 +190,7 @@ namespace CalamityMod.Items.Weapons.Melee case Attunement.FlailBlade: AttunementInfo.name = "Lamentations of the Chained"; AttunementInfo.function_description = "Throw out a flurry of chained blades in front of you. Striking enemies with the tip of the blades guarantees a critical hit."; - AttunementInfo.function_extra = "Critical strikes create extra ghostly chains to latch onto extra targets or onto the struck foe"; + AttunementInfo.function_extra = "Critical strikes create extra ghostly chains to latch onto extra targets"; AttunementInfo.function_passive = "Gain a magical chain hook. On enemy hits the hook quickly spins around you, freezing any struck foe"; //No way sentient meat hook AttunementInfo.color = new Color(113, 239, 177); AttunementInfo.color2 = new Color(169, 207, 255); diff --git a/Particles/LineVFX.cs b/Particles/LineVFX.cs index 1589c0a522..1aa990202b 100644 --- a/Particles/LineVFX.cs +++ b/Particles/LineVFX.cs @@ -11,19 +11,22 @@ namespace CalamityMod.Particles public override string Texture => "CalamityMod/Particles/ThinEndedLine"; public override bool UseAdditiveBlend => true; public override bool UseCustomDraw => true; - public override bool SetLifetime => true; + public override bool Important => Telegraph; + public float opacity; public Vector2 LineVector; public bool Concave; + public bool Telegraph; //Denotes if the line is used as an enemy telegraph. In that case, it'll be marked as important - public LineVFX(Vector2 startPoint, Vector2 lineVector, float thickness, Color color, bool concave = false) + public LineVFX(Vector2 startPoint, Vector2 lineVector, float thickness, Color color, bool concave = false, bool telegraph = false) { Position = startPoint; LineVector = lineVector; Scale = thickness; Color = color; Concave = concave; + Telegraph = telegraph; Velocity = Vector2.Zero; Rotation = 0; Lifetime = 2; diff --git a/Particles/SemiCircularSmear.png b/Particles/SemiCircularSmear.png new file mode 100644 index 0000000000000000000000000000000000000000..1798a1e3f37e0bcc28b7d8f05388d4bff6918c09 GIT binary patch literal 14045 zcmX9_1vnkv``0<9nV#+*mzkRGZdaQbSGRF7o6cc|sp;mcyQX7IGhNd)ZU1wB|2@}u zJf3s!J?DMj^Qjx5sjh&BLy3cggoLN0D60*=XCS_?Fu?zjjooVC8@7w0kvkF+E)n7j zd2%`M9{iHZL(b4c$Jx%q+tSSz>9wt+yRSRFj)$ksTW5M*XJ^N*!nFV-BzhzzS!rFL zg{}AdI@AV!k5le+ACd9s39zu47@3$C&Z`ES&< zCD;x_myuo5ERVc*S3Vv1pZ#6SIGTF(D$y%QS1ZMGcW*E7woQE8zZz+7wgnle&tPn82#`3tnG!{nVj>E5T3ml|@$%-)z4NB^ z$?Wh>PBVswc;J)3*!!Kc%Pq;&@!%uOe+SLHH?KCWpP8NWAs61lOP~9UYslg1Ojn^57s;NkEV991pV&md41~lC^(I`*_jmg ze8pmlO08d1T--x^x7qsSYC72HG0lA98LE2VS2gahVFQq|@m#aXzkzporDge!Uccf^ zYDtu*swunooBOC0o2g2Bp-4k6ma_TXT{gESY79(F!l*v*6fQ046T9-GGIhx&xMvd0>ZubO`zkqx3s5ss({-DCD|uI7644Z~K@i^AKgmqj zb&d&&XoEIH^N#xP{a?j816yw3kikmbH1&&4LX>zy>1qk#E>Su2&1<;UT6_M)r>vSu2^X5&c-K^v$~Q)(4p#ZBO_m zO2(fT1+banwp(PgU7l&qmvvmY;Mg+6JJMhl8`v0qR$$?zq@*wD>92*;<(P=1TbAW( z=Vj}RS}TQ${>yj`Ar9Z_4kVpX5q78 z*Y9*w)D(PumeE8?WXM;~uV?nZ-k@h>8IEzwi=b!n(vHQ{o~|e6{w(6OEXh^Dve(hk zfq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GZCu;)LN5lBsB|9wOZ~zfttMg_ad(Xr6QfxTDfu3q8e+&IX)Y!;Jd=D?B%h}R0^NmaaskQRARZbO(f$2flqXR zR28^P2n0VmEt2)6Vbk?6i>&YZse3Zg`VFf0m(u<4gyn^TxAIJU#!6_3Eti`x*`dj#PeMqh|UZ2UU}!kVdP9oT)(g z(N3@?^4Qg%ybd&^vueLUvaoLy`Y};5ingSrK?s_c9E^&s+Y3g!^B; zJm1X3$Y5_{IKIr4eGS!Qs8rmUOm}2&wSqM0NwVm5!pH=$6jeJ(y^@vVkzWS6!l&{# z0~Yb#yZrw2996ac<0h@mrF455EEL<*!ri^U4JBqQ?!Qewfvs#==kX|M)%injbdNJX z=BAuaZyc7UiTG?|CPoFCxT%HbrRm7#d|uiJQF@L@9Bo}o&v1m{G(xr4L=GKd3f}&E xX3;F8E$M1V!NV18$Qg|{1DkiI=)Vs-eRCAeJ~R9ld^8P7Nlsn1LdGKG{{Y7)J{ "CalamityMod/Particles/SemiCircularSmear"; + public override bool UseAdditiveBlend => true; + public override bool UseCustomDraw => true; + public override bool SetLifetime => true; + public Vector2 Squish; + + public SemiCircularSmearVFX(Vector2 position, Color color, float rotation, float scale, Vector2 squish) + { + Position = position; + Velocity = Vector2.Zero; + Color = color; + Scale = scale; + Squish = squish; + Rotation = rotation; + Lifetime = 2; + } + + //Use custom draw for the squish + public override void CustomDraw(SpriteBatch spriteBatch) + { + Texture2D tex = GeneralParticleHandler.GetTexture(Type); + spriteBatch.Draw(tex, Position - Main.screenPosition, null, Color, Rotation, tex.Size() / 2f, Squish * Scale, SpriteEffects.None, 0); + } + } +} diff --git a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs index d5b9d7db10..44ae3b602a 100644 --- a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs @@ -1602,7 +1602,6 @@ namespace CalamityMod.Projectiles.Melee private NPC[] excludedTargets = new NPC[4]; public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained"; - private bool initialized = false; public Player Owner => Main.player[projectile.owner]; public ref float ChainSwapTimer => ref projectile.ai[0]; public ref float SnapCoyoteTime => ref projectile.ai[1]; @@ -1615,6 +1614,8 @@ namespace CalamityMod.Projectiles.Melee public Vector2 whip2; public Vector2 whip3; + public Particle smear; + public Particle smear2; public override void SetStaticDefaults() { @@ -1633,48 +1634,64 @@ namespace CalamityMod.Projectiles.Melee public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { + //Cuz it intializes the hooks as pointing flat to the right of the player and we dont want that. + if (ChainSwapTimer < OmegaBiomeBlade.FlailBladeAttunement_FlailTime) + return false; - //int numPoints = 32; - //Vector2[] chainPositions = curve.GetPoints(numPoints).ToArray(); - //float collisionPoint = 0; - //for (int i = 1; i < numPoints; i++) - //{ - // Vector2 position = chainPositions[i]; - // Vector2 previousPosition = chainPositions[i - 1]; - // if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), position, previousPosition, 6, ref collisionPoint)) - // return true; - // if (i == numPoints - 1) //Extra lenght collision for the blade itself - // { - // Vector2 projectileHalfLenght = 85 * projectile.rotation.ToRotationVector2(); - // return (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center - projectileHalfLenght, projectile.Center + projectileHalfLenght, 32, ref collisionPoint)); - // } + GenerateCurve(whip1.Y, whip1.X.ToRotationVector2(), out Vector2 control10, out Vector2 control11, out Vector2 control12, out Vector2 control13, (ChainSwapTimer % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, 1); + GenerateCurve(whip2.Y, whip2.X.ToRotationVector2(), out Vector2 control20, out Vector2 control21, out Vector2 control22, out Vector2 control23, ((ChainSwapTimer - OmegaBiomeBlade.FlailBladeAttunement_FlailTime / 3f) % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, -1); + GenerateCurve(whip3.Y, whip3.X.ToRotationVector2(), out Vector2 control30, out Vector2 control31, out Vector2 control32, out Vector2 control33, ((ChainSwapTimer - OmegaBiomeBlade.FlailBladeAttunement_FlailTime * 2f / 3f) % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, -1); - //} + if (Collision.CheckAABBvAABBCollision(targetHitbox.TopLeft(), targetHitbox.Size(), control13 - Vector2.One * 25f, Vector2.One * 50f) || + Collision.CheckAABBvAABBCollision(targetHitbox.TopLeft(), targetHitbox.Size(), control23 - Vector2.One * 25f, Vector2.One * 50f) || + Collision.CheckAABBvAABBCollision(targetHitbox.TopLeft(), targetHitbox.Size(), control33 - Vector2.One * 25f, Vector2.One * 50f) + ) + return true; - return base.Colliding(projHitbox, targetHitbox); + //What you wanted me to calculate all 3 curves? Have straight line collisions instead + float CollisionPoint = 0f; + if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.MountedCenter, control13, 20f, ref CollisionPoint) || + Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.MountedCenter, control13, 20f, ref CollisionPoint) || + Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.MountedCenter, control13, 20f, ref CollisionPoint) + ) + return true; + + return false; } public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - Vector2 projectileHalfLenght = 85f * projectile.rotation.ToRotationVector2(); - float collisionPoint = 0; - //If you hit the enemy during the coyote time with the blade of the whip, guarantee a crit - if (Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), projectile.Center - projectileHalfLenght, projectile.Center + projectileHalfLenght, 32, ref collisionPoint)) + GenerateCurve(whip1.Y, whip1.X.ToRotationVector2(), out Vector2 control10, out Vector2 control11, out Vector2 control12, out Vector2 control13, (ChainSwapTimer % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, 1); + GenerateCurve(whip2.Y, whip2.X.ToRotationVector2(), out Vector2 control20, out Vector2 control21, out Vector2 control22, out Vector2 control23, ((ChainSwapTimer - OmegaBiomeBlade.FlailBladeAttunement_FlailTime / 3f) % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, -1); + GenerateCurve(whip3.Y, whip3.X.ToRotationVector2(), out Vector2 control30, out Vector2 control31, out Vector2 control32, out Vector2 control33, ((ChainSwapTimer - OmegaBiomeBlade.FlailBladeAttunement_FlailTime * 2f / 3f) % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, -1); + //If you hit the enemy with the blade of the whip, guarantee a crit + if (Collision.CheckAABBvAABBCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), control13 - Vector2.One * 25f, Vector2.One * 50f) || + Collision.CheckAABBvAABBCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), control23 - Vector2.One * 25f, Vector2.One * 50f) || + Collision.CheckAABBvAABBCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), control33 - Vector2.One * 25f, Vector2.One * 50f) + ) { - if (SnapCoyoteTime > 0f) + crit = true; + for (int i = 0; i < 2; i++) { - crit = true; - for (int i = 0; i < 4; i++) - { - Vector2 sparkSpeed = Owner.DirectionTo(target.Center).RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver2, MathHelper.PiOver2)) * 9f; - Particle Spark = new CritSpark(target.Center, sparkSpeed, Color.White, Color.LimeGreen, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 0.6f); - GeneralParticleHandler.SpawnParticle(Spark); - } - + Vector2 sparkSpeed = Owner.DirectionTo(target.Center).RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver2, MathHelper.PiOver2)) * 9f; + Particle Spark = new CritSpark(target.Center, sparkSpeed, Color.White, Color.Turquoise, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 1f); + GeneralParticleHandler.SpawnParticle(Spark); } + + Vector2 sliceDirection = Main.rand.NextVector2CircularEdge(50f, 100f); + Particle SliceLine = new LineVFX(target.Center - sliceDirection, sliceDirection * 2f, 0.2f, Color.PaleTurquoise * 0.6f) + { + Lifetime = 6 + }; + GeneralParticleHandler.SpawnParticle(SliceLine); + } + else + { damage = (int)(damage * OmegaBiomeBlade.FlailBladeAttunement_ChainDamageReduction); //If the enemy is hit with the chain of the whip, the damage gets reduced + crit = false; //For once, we also block crits completely from the chain + } } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) @@ -1688,7 +1705,9 @@ namespace CalamityMod.Projectiles.Melee NPC potentialTarget = TargetNext(target.Center, i); if (potentialTarget == null) break; - Projectile.NewProjectile(target.Center, Vector2.Zero, ProjectileType(), (int)(damage * OmegaBiomeBlade.FlailBladeAttunement_GhostChainDamageReduction), 0, Owner.whoAmI, target.whoAmI, potentialTarget.whoAmI); + Projectile proj = Projectile.NewProjectileDirect(target.Center, Vector2.Zero, ProjectileType(), (int)(damage * OmegaBiomeBlade.FlailBladeAttunement_GhostChainDamageReduction), 0, Owner.whoAmI, target.whoAmI, potentialTarget.whoAmI); + if (proj.modProjectile is GhastlyChain chain) + chain.Gravity = Main.rand.NextFloat(30f, 50f); } Array.Clear(excludedTargets, 0, 3); } @@ -1742,10 +1761,61 @@ namespace CalamityMod.Projectiles.Melee Owner.itemAnimation = 2; projectile.timeLeft = 2; - if (ChainSwapTimer % 5 == 0) + if (ChainSwapTimer % OmegaBiomeBlade.FlailBladeAttunement_FlailTime == 1) { Main.PlaySound(SoundID.DD2_OgreSpit, projectile.Center); + + Vector2 smearPos = Owner.Center + whip1.X.ToRotationVector2() * OmegaBiomeBlade.FlailBladeAttunement_Reach * Main.rand.NextFloat(0.7f, 1.1f); + Vector2 squish = new Vector2( Main.rand.NextFloat(3f, 4f), Main.rand.NextFloat(0.5f, 1f)); + + if (smear == null) + { + smear = new SemiCircularSmearVFX(smearPos, Color.PowderBlue * 0.5f, whip1.X + MathHelper.Pi, projectile.scale * 1.5f, squish); + smear.Lifetime = 2; + GeneralParticleHandler.SpawnParticle(smear); + } + //Update the variables of the smear + else + { + smear.Rotation = whip1.X + MathHelper.Pi; //Add some v ariation? + smear.Position = smearPos; + (smear as SemiCircularSmearVFX).Squish = squish; + } + + smearPos = Owner.Center + whip1.X.ToRotationVector2() * OmegaBiomeBlade.FlailBladeAttunement_Reach * Main.rand.NextFloat(0.8f, 1.3f); + squish = new Vector2(Main.rand.NextFloat(2f, 3f), Main.rand.NextFloat(0.9f, 1.4f)); + + if (smear2 == null) + { + smear2 = new SemiCircularSmearVFX(smearPos, Color.PowderBlue * 0.5f, whip2.X + MathHelper.Pi, projectile.scale * 1.5f, squish); + smear2.Lifetime = 2; + GeneralParticleHandler.SpawnParticle(smear2); + } + //Update the variables of the smear + else + { + smear2.Rotation = whip2.X + MathHelper.Pi; //Add some v ariation? + smear2.Position = smearPos; + (smear2 as SemiCircularSmearVFX).Squish = squish; + } } + + if (smear != null) + { + smear.Rotation = smear.Rotation.AngleTowards(projectile.velocity.ToRotation(), 0.01f); + smear.Time = 0; + (smear as SemiCircularSmearVFX).Squish.Y *= 0.985f; + (smear as SemiCircularSmearVFX).Squish.X *= 1.01f; + } + if (smear2 != null) + { + smear2.Rotation = smear2.Rotation.AngleTowards(projectile.velocity.ToRotation(), 0.01f); + smear2.Time = 0; + (smear2 as SemiCircularSmearVFX).Squish.Y *= 0.985f; + (smear2 as SemiCircularSmearVFX).Squish.X *= 1.01f; + } + + //if ((ChainSwapTimer - 12f) % 23 == 0) //{ // Main.PlaySound(SoundID.Item41, projectile.Center); @@ -1808,9 +1878,12 @@ namespace CalamityMod.Projectiles.Melee float seed2 = 0.5f + ((float)Math.Sin(seed1 * 50f * 17.07947) + (float)Math.Sin(seed1 * 50f * 0.2f * 25.13274)) * 0.25f; float seed3 = 0.5f + ((float)Math.Sin(seed2 * 17.07947) + (float)Math.Sin(seed2 * 0.2f * 25.13274)) * 0.25f; + if ((necessaryOrientation == -1 && randomNumber >= 0.5) || (necessaryOrientation == 1 && randomNumber < 0.5)) randomNumber = 1 - randomNumber; + randomNumber += angleShift * 0.1f * necessaryOrientation; + float flip = randomNumber >= 0.5 ? 1f : -1f; @@ -1866,8 +1939,7 @@ namespace CalamityMod.Projectiles.Melee ChainSwapTimer++; } - - + GenerateCurve(whip1.Y, whip1.X.ToRotationVector2(), out Vector2 control0, out Vector2 control1, out Vector2 control2, out Vector2 control3, (ChainSwapTimer % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, 1); DrawChain(spriteBatch, out chainPositions1, control0, control1, control2, control3); @@ -1907,17 +1979,20 @@ namespace CalamityMod.Projectiles.Melee Vector2 scale = new Vector2(xScale, yScale); //Remember to make it get thicker and thinner based on whatever Vector2 origin = new Vector2(chainFrame.Width / 2, chainFrame.Height); //Draw from center bottom of texture - spriteBatch.Draw(tex, chainPositions[i] - Main.screenPosition, chainFrame, chainLightColor, rotation, origin, scale, SpriteEffects.None, 0); + + float chainOpacity = MathHelper.Clamp((i / (float)numPoints) * 3f, 0f, 1f); + + spriteBatch.Draw(tex, chainPositions[i] - Main.screenPosition, chainFrame, chainLightColor * chainOpacity, rotation, origin, scale, SpriteEffects.None, 0); } else { Vector2 origin = new Vector2(guardFrame.Width / 2, guardFrame.Height); //Draw from center bottom of texture spriteBatch.Draw(tex, chainPositions[i] - Main.screenPosition, guardFrame, chainLightColor, rotation, origin, 1, SpriteEffects.None, 0); - if (Main.rand.Next(6) == 0) + if ((ChainSwapTimer % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) == 1 && Main.rand.Next(3) == 0f) { - Particle Spark = new CritSpark(chainPositions[i], Vector2.Zero, Color.White, Color.SteelBlue, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 0.6f); - GeneralParticleHandler.SpawnParticle(Spark); + Particle Flake = new SnowflakeSparkle(chainPositions[i], Vector2.Zero, Color.PaleTurquoise, Color.MediumTurquoise, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 0.2f); + GeneralParticleHandler.SpawnParticle(Flake); } } } @@ -1926,12 +2001,16 @@ namespace CalamityMod.Projectiles.Melee public override void SendExtraAI(BinaryWriter writer) { - //Nothing lol + writer.WriteVector2(whip1); + writer.WriteVector2(whip2); + writer.WriteVector2(whip3); } public override void ReceiveExtraAI(BinaryReader reader) { - //Nothing lol + whip1 = reader.ReadVector2(); + whip2 = reader.ReadVector2(); + whip3 = reader.ReadVector2(); } } @@ -1940,6 +2019,9 @@ namespace CalamityMod.Projectiles.Melee public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedChain"; public Player Owner => Main.player[projectile.owner]; public float Timer => 20 - projectile.timeLeft; + + public float Gravity; + public NPC NPCfrom { get => Main.npc[(int)projectile.ai[0]]; @@ -1951,8 +2033,6 @@ namespace CalamityMod.Projectiles.Melee set => projectile.ai[1] = value.whoAmI; } - const float curvature = 16f; - public override void SetStaticDefaults() { DisplayName.SetDefault("Ghastly Chain"); @@ -1978,33 +2058,36 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D chainTex = GetTexture("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchChain"); + Texture2D chainTex = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedChain"); + + + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); float opacity = projectile.timeLeft > 10 ? 1 : projectile.timeLeft / 10f; Vector2 Shake = projectile.timeLeft < 15 ? Vector2.Zero : Vector2.One.RotatedByRandom(MathHelper.TwoPi) * (15 - projectile.timeLeft / 5f) * 0.5f; - Vector2 lineDirection = Vector2.Normalize(Target.Center - NPCfrom.Center); - int dist = (int)Vector2.Distance(Target.Center, NPCfrom.Center) / 16; - Vector2[] Nodes = new Vector2[dist + 1]; - Nodes[0] = NPCfrom.Center; - Nodes[dist] = Target.Center; - float pointUp = Target.Center.X > NPCfrom.Center.X ? -MathHelper.PiOver2 : MathHelper.PiOver2; + BezierCurve curve = new BezierCurve(new Vector2[] { Target.Center, Target.Center + Vector2.UnitY * Gravity, NPCfrom.Center + Vector2.UnitY * Gravity, NPCfrom.Center }); + int numPoints = 20; + Vector2[] Nodes = curve.GetPoints(numPoints).ToArray(); - for (int i = 1; i < dist + 1; i++) + for (int i = 1; i < numPoints; i++) { - Vector2 positionAlongLine = Vector2.Lerp(NPCfrom.Center, Target.Center, i / (float)dist); //Get the position of the segment along the line, as if it were a flat line - float elevation = (float)Math.Sin(i / (float)dist * MathHelper.Pi) * curvature * dist / 10f; - Nodes[i] = positionAlongLine + lineDirection.RotatedBy(pointUp) * elevation + Shake * (float)Math.Sin(i / (float)dist * MathHelper.Pi); + Vector2 position = Nodes[i] + Shake * (float)Math.Sin(i / (float)numPoints * MathHelper.Pi); float rotation = (Nodes[i] - Nodes[i - 1]).ToRotation() - MathHelper.PiOver2; //Calculate rotation based on direction from last point float yScale = Vector2.Distance(Nodes[i], Nodes[i - 1]) / chainTex.Height; //Calculate how much to squash/stretch for smooth chain based on distance between points Vector2 scale = new Vector2(1, yScale); - Color chainLightColor = Lighting.GetColor((int)Nodes[i].X / 16, (int)Nodes[i].Y / 16); //Lighting of the position of the chain segment - Vector2 origin = new Vector2(chainTex.Width / 2, chainTex.Height); //Draw from center bottom of texture - spriteBatch.Draw(chainTex, Nodes[i] - Main.screenPosition, null, chainLightColor * opacity, rotation, origin, scale, SpriteEffects.None, 0); + spriteBatch.Draw(chainTex, position - Main.screenPosition, null, Color.White * opacity, rotation, origin, scale, SpriteEffects.None, 0); } + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + return false; } From b4bd15c2673a61944a452fa994643e8703e76e7b Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Thu, 20 Jan 2022 21:10:52 +0100 Subject: [PATCH 57/76] Proc chances --- Items/Weapons/Melee/OmegaBiomeBlade.cs | 1 - .../Melee/TrueBiomeBladeProjectiles.cs | 62 ++++++++++++++++++- 2 files changed, 59 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index 5907f4db60..dac5b2194b 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -84,7 +84,6 @@ namespace CalamityMod.Items.Weapons.Melee public static float ShockwaveAttunement_BlastProc = 0.5f; public static float FlailBladeAttunement_BladeProc = 0.2f; - public static float FlailBladeAttunement_CritProc = 0.5f; public static float FlailBladeAttunement_ChainProc = 0.1f; public static float FlailBladeAttunement_GhostChainProc = 0.1f; #endregion diff --git a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs index 44ae3b602a..165ead8885 100644 --- a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs @@ -264,10 +264,16 @@ namespace CalamityMod.Projectiles.Melee damage = (int)(damage * (OmegaBiomeBlade.WhirlwindAttunement_BaseDamageReduction + (OmegaBiomeBlade.WhirlwindAttunement_FullChargeDamageBoost * Empowerment / maxEmpowerment))); if (CurrentState != 1) + { + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.WhirlwindAttunement_WhirlwindProc) + sword.OnHitProc = true; return; + } + + if (Owner.HeldItem.modItem is OmegaBiomeBlade blade && Main.rand.Next() <= OmegaBiomeBlade.WhirlwindAttunement_SwordThrowProc) + blade.OnHitProc = true; lastTarget = target; - foreach (Projectile proj in Main.projectile) { if (proj.active && proj.type == ProjectileType() && proj.owner == Owner.whoAmI) @@ -494,6 +500,11 @@ namespace CalamityMod.Projectiles.Melee int debuffTime = 90; target.AddBuff(BuffType(), debuffTime); } + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.WhirlwindAttunement_SwordBeamProc) + sword.OnHitProc = true; + } public override Color? GetAlpha(Color lightColor) => Color.Lerp(Color.HotPink, Color.GreenYellow, (float)Math.Sin(Main.GlobalTime * 2f)); } @@ -714,6 +725,12 @@ namespace CalamityMod.Projectiles.Melee Owner.Calamity().LungingDown = false; } + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.SuperPogoAttunement_ShredderProc) + sword.OnHitProc = true; + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/OmegaBiomeBlade"); @@ -849,6 +866,12 @@ namespace CalamityMod.Projectiles.Melee } + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.SuperPogoAttunement_WheelProc) + sword.OnHitProc = true; + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { spriteBatch.End(); @@ -935,6 +958,9 @@ namespace CalamityMod.Projectiles.Melee { crit = true; + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.SuperPogoAttunement_DashProc) + sword.OnHitProc = true; + Particle bloom = new StrongBloom(target.Center, target.velocity, Color.Crimson * 0.5f, 1f, 30); GeneralParticleHandler.SpawnParticle(bloom); @@ -948,6 +974,9 @@ namespace CalamityMod.Projectiles.Melee Owner.statLife += OmegaBiomeBlade.SuperPogoAttunementSlashLifesteal; Owner.HealEffect(OmegaBiomeBlade.SuperPogoAttunementSlashLifesteal); } + + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) //OMw to reuse way too much code from the entangling vines { @@ -1217,7 +1246,10 @@ namespace CalamityMod.Projectiles.Melee public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { damage = (int)(damage * (1f + OmegaBiomeBlade.ShockwaveAttunement_FullChargeBoost * Charge / MaxCharge)); - } + + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.ShockwaveAttunement_SwordProc) + sword.OnHitProc = true; + } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { @@ -1445,6 +1477,11 @@ namespace CalamityMod.Projectiles.Melee return validPositionFound; } + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.ShockwaveAttunement_MonolithProc) + sword.OnHitProc = true; + } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { @@ -1577,6 +1614,12 @@ namespace CalamityMod.Projectiles.Melee } } + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.ShockwaveAttunement_BlastProc) + sword.OnHitProc = true; + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_MercurialTidesShockwave"); @@ -1670,6 +1713,11 @@ namespace CalamityMod.Projectiles.Melee Collision.CheckAABBvAABBCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), control33 - Vector2.One * 25f, Vector2.One * 50f) ) { + + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.FlailBladeAttunement_BladeProc) + sword.OnHitProc = true; + + crit = true; for (int i = 0; i < 2; i++) { @@ -1684,11 +1732,13 @@ namespace CalamityMod.Projectiles.Melee Lifetime = 6 }; GeneralParticleHandler.SpawnParticle(SliceLine); - } else { + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.FlailBladeAttunement_ChainProc) + sword.OnHitProc = true; + damage = (int)(damage * OmegaBiomeBlade.FlailBladeAttunement_ChainDamageReduction); //If the enemy is hit with the chain of the whip, the damage gets reduced crit = false; //For once, we also block crits completely from the chain } @@ -2056,6 +2106,12 @@ namespace CalamityMod.Projectiles.Melee projectile.Center = Target.Center; } + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.FlailBladeAttunement_GhostChainProc) + sword.OnHitProc = true; + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { Texture2D chainTex = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedChain"); From f0a84548bc6237a5c1d711a781afa0e2a67c8559 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Thu, 20 Jan 2022 21:15:48 +0100 Subject: [PATCH 58/76] Lifesteal passive --- Items/Weapons/Melee/OmegaBiomeBlade.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index dac5b2194b..70ca04edd6 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -49,6 +49,7 @@ namespace CalamityMod.Items.Weapons.Melee public static int SuperPogoAttunement_SlashIFrames = 60; public static float SuperPogoAttunement_ShotDamageBoost = 2f; + public static float SuperPogoAttunement_PassiveLifeStealChance = 0.2f; public static int SuperPogoAttunement_PassiveLifeSteal = 10; @@ -390,8 +391,11 @@ namespace CalamityMod.Items.Weapons.Melee case Attunement.SuperPogo: if (OnHitProc) { - player.statLife += SuperPogoAttunement_PassiveLifeSteal; - player.HealEffect(SuperPogoAttunement_PassiveLifeSteal); + if (Main.rand.Next() <= SuperPogoAttunement_PassiveLifeStealChance) + { + player.statLife += SuperPogoAttunement_PassiveLifeSteal; + player.HealEffect(SuperPogoAttunement_PassiveLifeSteal); + } OnHitProc = false; } break; From aaa36c515cedda7b0cc87d0a8276ab3013f5f7a1 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Thu, 20 Jan 2022 22:42:57 +0100 Subject: [PATCH 59/76] Passive (freezing) --- Items/Weapons/Melee/OmegaBiomeBlade.cs | 38 +++- .../Melee/TrueBiomeBladeProjectiles.cs | 196 ++++++++++++++++-- 2 files changed, 213 insertions(+), 21 deletions(-) diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index 70ca04edd6..7eb1ee90b1 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -24,6 +24,7 @@ namespace CalamityMod.Items.Weapons.Melee public Attunement? mainAttunement = null; public Attunement? secondaryAttunement = null; public int Combo = 0; + public Projectile MeatHook; //Used for passive effects public int UseTimer = 0; @@ -76,7 +77,7 @@ namespace CalamityMod.Items.Weapons.Melee public static float WhirlwindAttunement_SwordThrowProc = 1f; public static float WhirlwindAttunement_SwordBeamProc = 0.05f; - public static float SuperPogoAttunement_ShredderProc = 0.25f; + public static float SuperPogoAttunement_ShredderProc = 0.1f; public static float SuperPogoAttunement_WheelProc = 0.4f; public static float SuperPogoAttunement_DashProc = 1f; @@ -84,8 +85,8 @@ namespace CalamityMod.Items.Weapons.Melee public static float ShockwaveAttunement_MonolithProc = 1f; public static float ShockwaveAttunement_BlastProc = 0.5f; - public static float FlailBladeAttunement_BladeProc = 0.2f; - public static float FlailBladeAttunement_ChainProc = 0.1f; + public static float FlailBladeAttunement_BladeProc = 0.1f; + public static float FlailBladeAttunement_ChainProc = 0.05f; public static float FlailBladeAttunement_GhostChainProc = 0.1f; #endregion @@ -209,7 +210,6 @@ namespace CalamityMod.Items.Weapons.Melee #endregion - public override void SetDefaults() { item.width = item.height = 92; @@ -376,6 +376,10 @@ namespace CalamityMod.Items.Weapons.Melee if (player.whoAmI != Main.myPlayer) return; + //PAssive effetcsts + + if (secondaryAttunement != Attunement.FlailBlade || MeatHook == null || !MeatHook.active) + MeatHook = null; switch (secondaryAttunement) { @@ -388,17 +392,17 @@ namespace CalamityMod.Items.Weapons.Melee UseTimer++; } break; + case Attunement.SuperPogo: if (OnHitProc) { - if (Main.rand.Next() <= SuperPogoAttunement_PassiveLifeStealChance) - { - player.statLife += SuperPogoAttunement_PassiveLifeSteal; - player.HealEffect(SuperPogoAttunement_PassiveLifeSteal); - } + player.statLife += SuperPogoAttunement_PassiveLifeSteal; + player.HealEffect(SuperPogoAttunement_PassiveLifeSteal); + OnHitProc = false; } break; + case Attunement.Shockwave: if (UseTimer % 120 == 119) { @@ -406,7 +410,23 @@ namespace CalamityMod.Items.Weapons.Melee UseTimer++; } break; + case Attunement.FlailBlade: + + if (MeatHook == null) + { + MeatHook = Projectile.NewProjectileDirect(player.Center, Vector2.Zero, ProjectileType(), (int)(FlailBladeAttunement_PassiveBaseDamage * player.MeleeDamage()), 0f, player.whoAmI); + } + + if (OnHitProc) + { + if (MeatHook.modProjectile is ChainedMeatHook hook && hook.Twirling == 0f) + { + hook.Twirling = 1f; + hook.projectile.timeLeft = (int)ChainedMeatHook.MaxTwirlTime; + } + OnHitProc = false; + } break; default: break; diff --git a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs index 165ead8885..0574b6ef8c 100644 --- a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs @@ -265,12 +265,12 @@ namespace CalamityMod.Projectiles.Melee if (CurrentState != 1) { - if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.WhirlwindAttunement_WhirlwindProc) + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.WhirlwindAttunement_WhirlwindProc) sword.OnHitProc = true; return; } - if (Owner.HeldItem.modItem is OmegaBiomeBlade blade && Main.rand.Next() <= OmegaBiomeBlade.WhirlwindAttunement_SwordThrowProc) + if (Owner.HeldItem.modItem is OmegaBiomeBlade blade && Main.rand.NextFloat() <= OmegaBiomeBlade.WhirlwindAttunement_SwordThrowProc) blade.OnHitProc = true; lastTarget = target; @@ -502,7 +502,7 @@ namespace CalamityMod.Projectiles.Melee } public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.WhirlwindAttunement_SwordBeamProc) + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.WhirlwindAttunement_SwordBeamProc) sword.OnHitProc = true; } @@ -727,7 +727,7 @@ namespace CalamityMod.Projectiles.Melee public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.SuperPogoAttunement_ShredderProc) + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.SuperPogoAttunement_ShredderProc) sword.OnHitProc = true; } @@ -868,7 +868,7 @@ namespace CalamityMod.Projectiles.Melee public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.SuperPogoAttunement_WheelProc) + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.SuperPogoAttunement_WheelProc) sword.OnHitProc = true; } @@ -958,7 +958,7 @@ namespace CalamityMod.Projectiles.Melee { crit = true; - if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.SuperPogoAttunement_DashProc) + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.SuperPogoAttunement_DashProc) sword.OnHitProc = true; Particle bloom = new StrongBloom(target.Center, target.velocity, Color.Crimson * 0.5f, 1f, 30); @@ -1247,7 +1247,7 @@ namespace CalamityMod.Projectiles.Melee { damage = (int)(damage * (1f + OmegaBiomeBlade.ShockwaveAttunement_FullChargeBoost * Charge / MaxCharge)); - if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.ShockwaveAttunement_SwordProc) + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.ShockwaveAttunement_SwordProc) sword.OnHitProc = true; } @@ -1479,7 +1479,7 @@ namespace CalamityMod.Projectiles.Melee public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.ShockwaveAttunement_MonolithProc) + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.ShockwaveAttunement_MonolithProc) sword.OnHitProc = true; } @@ -1616,7 +1616,7 @@ namespace CalamityMod.Projectiles.Melee public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.ShockwaveAttunement_BlastProc) + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.ShockwaveAttunement_BlastProc) sword.OnHitProc = true; } @@ -1714,7 +1714,7 @@ namespace CalamityMod.Projectiles.Melee ) { - if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.FlailBladeAttunement_BladeProc) + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.FlailBladeAttunement_BladeProc) sword.OnHitProc = true; @@ -1736,7 +1736,7 @@ namespace CalamityMod.Projectiles.Melee else { - if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.FlailBladeAttunement_ChainProc) + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.FlailBladeAttunement_ChainProc) sword.OnHitProc = true; damage = (int)(damage * OmegaBiomeBlade.FlailBladeAttunement_ChainDamageReduction); //If the enemy is hit with the chain of the whip, the damage gets reduced @@ -2108,7 +2108,7 @@ namespace CalamityMod.Projectiles.Melee public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.Next() <= OmegaBiomeBlade.FlailBladeAttunement_GhostChainProc) + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.FlailBladeAttunement_GhostChainProc) sword.OnHitProc = true; } @@ -2149,6 +2149,178 @@ namespace CalamityMod.Projectiles.Melee } + public class ChainedMeatHook : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedHook"; + public Player Owner => Main.player[projectile.owner]; + + public float Timer => MaxTwirlTime - projectile.timeLeft; + public static float MaxTwirlTime = 30; + public ref float Twirling => ref projectile.ai[0]; + + public bool MayIExist => Owner.active && (Owner.HeldItem.modItem is OmegaBiomeBlade blade) && blade.secondaryAttunement == OmegaBiomeBlade.Attunement.FlailBlade; + + Particle smear; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Enchanted Meat Hook"); + } + + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 66; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 40; + projectile.timeLeft = 1; + } + + public override bool? CanHitNPC(NPC target) => Twirling == 1f; + + public override void AI() + { + if (!MayIExist) + { + projectile.Kill(); + return; + } + + if (Twirling == 0) + { + projectile.velocity = Vector2.Zero; + projectile.timeLeft = 2; + Vector2 idealPosition = Owner.Center - Owner.direction * Vector2.UnitX * 40f + Vector2.One.RotatedBy(Main.GlobalTime) * 10f; + if ((idealPosition - projectile.Center).Length() > 1500f) + projectile.Center = idealPosition; + projectile.Center = Vector2.Lerp(projectile.Center, idealPosition, 0.05f); + projectile.Center = projectile.Center.MoveTowards(idealPosition, 4f); + + } + + + if (Twirling == 1f) + { + if (projectile.timeLeft == MaxTwirlTime) + { + projectile.velocity = Owner.DirectionTo(Main.MouseWorld); + Main.PlaySound(SoundID.Item71, projectile.Center); + for (int i = 0; i < 4; i++) + { + Particle Sparkle = new CritSpark(projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(17.5f, 25f) * projectile.scale, Color.White, Main.rand.NextBool() ? Color.Cyan : Color.MediumTurquoise, 0.4f + Main.rand.NextFloat(0f, 0.5f), 20 + Main.rand.Next(30), 1, 3f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + + if (smear == null) + { + smear = new CircularSmearVFX(Owner.Center, Color.HotPink, projectile.velocity.ToRotation(), projectile.scale * 1.5f); + GeneralParticleHandler.SpawnParticle(smear); + } + } + + projectile.velocity = projectile.velocity.RotatedBy(MathHelper.TwoPi * 2f * (1 / MaxTwirlTime)); + projectile.velocity.Normalize(); + projectile.rotation = projectile.velocity.ToRotation(); + projectile.Center = Owner.Center + (projectile.velocity * 140 * (1 + 0.3f * (float)Math.Sin(projectile.timeLeft / MaxTwirlTime * MathHelper.Pi))); + + //Update the variables of the smear + if (smear != null) + { + smear.Rotation = projectile.rotation + MathHelper.PiOver2; + smear.Time = 0; + smear.Position = Owner.Center; + smear.Scale = 3.4f; + smear.Color = Color.MediumTurquoise * 0.9f * (float)Math.Sin(projectile.timeLeft / MaxTwirlTime * MathHelper.Pi); + } + + + if (projectile.timeLeft == 1) + { + Main.PlaySound(SoundID.Item101, projectile.Center); + for (int i = 0; i < 4; i++) + { + Particle Sparkle = new CritSpark(projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(17.5f, 25f) * projectile.scale, Color.White, Main.rand.NextBool() ? Color.Cyan : Color.MediumTurquoise, 0.4f + Main.rand.NextFloat(0f, 0.5f), 20 + Main.rand.Next(30), 1, 3f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + Twirling = 0f; + } + } + } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + int debuffTime = 100; + target.AddBuff(BuffType(), debuffTime); + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(SoundID.Item105, projectile.Center); + for (int i = 0; i < 10; i++) + { + Particle Sparkle = new CritSpark(projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(17.5f, 25f) * projectile.scale, Color.White, Main.rand.NextBool() ? Color.Cyan : Color.MediumTurquoise, 0.4f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D handle = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedHookBody"); + Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedHook"); + + float drawAngle = (projectile.Center - Owner.Center).ToRotation(); + float drawRotation = drawAngle + MathHelper.PiOver4; + + Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOffset = projectile.Center - Main.screenPosition; + + spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Update the parameters + drawOrigin = new Vector2(0f, blade.Height); + + spriteBatch.Draw(blade, drawOffset, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + drawChain(spriteBatch); + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + public void drawChain(SpriteBatch spriteBatch) + { + Texture2D chainTex = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedChain"); + + int dist = (int)Vector2.Distance(Owner.Center, projectile.Center) / 16; + Vector2[] Nodes = new Vector2[dist + 1]; + Nodes[0] = Owner.Center; + Nodes[dist] = projectile.Center; + + for (int i = 1; i < dist + 1; i++) + { + Rectangle frame = new Rectangle(0, 0 + 18 * (i % 2), 12, 18); + Vector2 positionAlongLine = Vector2.Lerp(Owner.Center, projectile.Center, i / (float)dist); //Get the position of the segment along the line, as if it were a flat line + Nodes[i] = positionAlongLine; + + float rotation = (Nodes[i] - Nodes[i - 1]).ToRotation() - MathHelper.PiOver2; //Calculate rotation based on direction from last point + float yScale = Vector2.Distance(Nodes[i], Nodes[i - 1]) / frame.Height; //Calculate how much to squash/stretch for smooth chain based on distance between points + Vector2 scale = new Vector2(1, yScale); + + Vector2 origin = new Vector2(frame.Width / 2, frame.Height); //Draw from center bottom of texture + spriteBatch.Draw(chainTex, Nodes[i] - Main.screenPosition, frame, Color.White * 0.5f, rotation, origin, scale, SpriteEffects.None, 0); + } + } + + } + } From 469a5c05a0d8b846e925287362c1e9a1987b0f48 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Thu, 20 Jan 2022 22:54:06 +0100 Subject: [PATCH 60/76] Hook spins in the right direction --- Projectiles/Melee/TrueBiomeBladeProjectiles.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs index 0574b6ef8c..710356aa8f 100644 --- a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs @@ -2221,7 +2221,7 @@ namespace CalamityMod.Projectiles.Melee } } - projectile.velocity = projectile.velocity.RotatedBy(MathHelper.TwoPi * 2f * (1 / MaxTwirlTime)); + projectile.velocity = projectile.velocity.RotatedBy(MathHelper.TwoPi * -2f * (1 / MaxTwirlTime)); projectile.velocity.Normalize(); projectile.rotation = projectile.velocity.ToRotation(); projectile.Center = Owner.Center + (projectile.velocity * 140 * (1 + 0.3f * (float)Math.Sin(projectile.timeLeft / MaxTwirlTime * MathHelper.Pi))); From 544901aee0737257734fa9e6de7776037fa087c0 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Fri, 21 Jan 2022 01:06:34 +0100 Subject: [PATCH 61/76] LowTierGodOfHyperdeath attunement anim --- Items/Weapons/Melee/OmegaBiomeBlade.cs | 21 +++++--- Particles/ThunderBolt.png | Bin 0 -> 26783 bytes Particles/ThunderBoltVFX.cs | 66 +++++++++++++++++++++++++ Sounds/Custom/ThunderStrike.cs | 18 +++++++ Sounds/Custom/ThunderStrike.ogg | Bin 0 -> 48728 bytes 5 files changed, 99 insertions(+), 6 deletions(-) create mode 100644 Particles/ThunderBolt.png create mode 100644 Particles/ThunderBoltVFX.cs create mode 100644 Sounds/Custom/ThunderStrike.cs create mode 100644 Sounds/Custom/ThunderStrike.ogg diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index 7eb1ee90b1..0f93d55f18 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -73,7 +73,7 @@ namespace CalamityMod.Items.Weapons.Melee public static int FlailBladeAttunement_PassiveBaseDamage = 500; //Proc coefficients. aka the likelihood of any given attack to trigger a on-hit passive. - public static float WhirlwindAttunement_WhirlwindProc = 0.1f; + public static float WhirlwindAttunement_WhirlwindProc = 0.24f; public static float WhirlwindAttunement_SwordThrowProc = 1f; public static float WhirlwindAttunement_SwordBeamProc = 0.05f; @@ -582,12 +582,9 @@ namespace CalamityMod.Items.Weapons.Melee ChannelTimer++; projectile.timeLeft = 60; - if (ChannelTimer >= ChannelTime) + if (ChannelTimer == ChannelTime - 15) { Attune((OmegaBiomeBlade)associatedItem.modItem); - projectile.timeLeft = 120; - ChanneledState = 2f; //State where it stays invisible doing nothing. Acts as a cooldown - Color particleColor = (associatedItem.modItem as OmegaBiomeBlade).GetAttunementInfo((associatedItem.modItem as OmegaBiomeBlade).mainAttunement).color; for (int i = 0; i <= 5; i++) @@ -603,6 +600,12 @@ namespace CalamityMod.Items.Weapons.Melee GeneralParticleHandler.SpawnParticle(Sparkle); } } + + if (ChannelTimer >= ChannelTime) + { + projectile.timeLeft = 60; + ChanneledState = 2f; //State where it stays invisible doing nothing. Acts as a cooldown + } } if (ChanneledState == 1f) @@ -642,7 +645,13 @@ namespace CalamityMod.Items.Weapons.Melee return; } //Chunger - Main.PlaySound(SoundID.DD2_ExplosiveTrapExplode, projectile.Center); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/ThunderStrike"), projectile.Center); + Particle thunder = new ThunderBoltVFX(projectile.Center + Vector2.UnitY * 20f, Main.rand.NextBool() ? Main.rand.NextBool() ? Color.Goldenrod : Color.GreenYellow : Main.rand.NextBool() ? Color.Cyan : Color.Magenta, 0f, 1.5f, Vector2.One, 1f, 20f, projectile, 20f); + GeneralParticleHandler.SpawnParticle(thunder); + + if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 5) + Main.LocalPlayer.Calamity().GeneralScreenShakePower = 5; + item.mainAttunement = attunement; } diff --git a/Particles/ThunderBolt.png b/Particles/ThunderBolt.png new file mode 100644 index 0000000000000000000000000000000000000000..cabdcfc2bc0f130914b684b9d3b70c3841e02003 GIT binary patch literal 26783 zcmXtg2RN1Q|NpVKkWI*TtZWI{d+(j>?btIRvdPW};TXpX+3VOV+cC2D3R%gg^}l_8 z*Z;ces$6-_^E~(ae!pMq7N?`7OoUI14}n04R8H~ogklp`An_Ub04ZcX{t7zh@@9E$h@Y35JB5&{J6Xe6B@9Ssh?8#){>FL&6z7-0A zFhNumWDNqpetYHYW^v&6L#TgC@Yz#~m}iPE8}{Z#ozQrUa-v!EBvMQ#5@D@)Z0Eni zMDfj>X5=bVpC?i%|ID4r>j=wy<DlV9)kf)qr|b|mNt=}YeFun4W$B;e%O37OJ;y=Oa%de7{=_&_ z!RT;WZR%rf>RS^KmdKh1FjOR8;nX>^3l$87=Fw%n(&W(*UWF@8Tz1nwC-+h3#wP%+ z#dT}Jeaj!Mg`kxvX$yhI_NNjhafW_IinVGcGh*9n`RNqhV=cUj&3OrHm2Wd6rL2to zy+&Cs(lDuG&9AZ}TnKYjX~?T1d<852tfao4)S)qG%_HNvCl#zCeD2lz2?t?OQ4f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oV;<)2GVP%D~SGKnJG`Jqb9+13ni%CbGY#Oovp&;-VWX8(VTo31@$Q|DJ8;Ld=9; z5vvHk43q=ZUTo-y4m8nbIa*e|sx_#!#gZ*JDh+fSvDBwrNdRz+;p48pjd)TwnJUf^-ydGFB zVd~Hyo^dVFpq(1*&r~GsAR=;r^(Shd^5T`#Tt@?EQRrRr)8b>|W1=DC+E_98E7&jz z0**1wfqste`SIIlvTjx8__NRkK4_V+Su57vzg4RX&dJ8s)_Tl+*VdNj*<=;P)4&@m z-u{dGX2Y=~WcC;ZZ%hvaqUR;yq*~;~Z9g2pSSXGShRf~=>V}4S!e%c-6UvI7KFrZ?2RMErNMa z^j>Bna7S5^NRLfm#CGRrs#|6K;RfTiEr>tMYJN~1F)6E~9-ha3g&Ev~IQQXe9otWy zWOfq^0RBlbpf$4GMV3#tPG9S^HSxNX{3R+Xy1uZVBVw<+W6kCNq*b+jo9+3vioC18zfk{ZU}Nk5QLfM#@b4GfniaKC)p?i1#@@ANf=QXT}CPc zG3ptJ)&o${GcpSL`_~Kk=7^BETV "CalamityMod/Particles/ThunderBolt"; + public override bool UseAdditiveBlend => true; + public override bool UseCustomDraw => true; + public override bool SetLifetime => true; + + public Vector2 Squish; + public float ShakePower; + public float Opacity; + public Projectile AttachedProjectile; + public float DisplacementFromProjectile; + + public ThunderBoltVFX(Vector2 position, Color color, float rotation, float scale, Vector2 squish, float opacity = 1f, float shakePower = 20f, Projectile projectileToFollow = null, float displacementFromProjectile = 0f) + { + Position = position; + Velocity = Vector2.Zero; + Color = color; + Scale = scale; + Squish = squish; + Rotation = rotation; + Opacity = opacity; + ShakePower = shakePower; + if (projectileToFollow != null) + AttachedProjectile = projectileToFollow; + DisplacementFromProjectile = displacementFromProjectile; + Lifetime = 15; + } + + public override void Update() + { + Lighting.AddLight(Position, Color.ToVector3() * 3f); + float fadeFactor = 1f - 0.05f * MathHelper.Clamp((Time - 8) / 7f, 0f, 1f); + Opacity *= fadeFactor; + Squish.X *= fadeFactor; + + if (AttachedProjectile != null && AttachedProjectile.active) + Position = AttachedProjectile.Center + Vector2.UnitY * DisplacementFromProjectile; + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + Texture2D tex = GeneralParticleHandler.GetTexture(Type); + + Vector2 Shake = Vector2.One.RotatedByRandom(MathHelper.TwoPi) * (1 - (Time / (float)Lifetime)) * ShakePower; + + //The draw happens at the base of the texture + Vector2 Origin = new Vector2(tex.Width / 2f, tex.Height); + + Color drawColor = Color.Lerp(Color.White, Color, (Time / (float)Lifetime)); + + SpriteEffects flip = (Main.GlobalTime % 15 < 7) ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + + spriteBatch.Draw(tex, Position + Shake - Main.screenPosition, null, Color * Opacity * 0.6f, Rotation, Origin, Squish * Scale, flip, 0); + spriteBatch.Draw(tex, Position - Main.screenPosition, null, drawColor * Opacity, Rotation, Origin, Squish * Scale, flip, 0); + } + } +} diff --git a/Sounds/Custom/ThunderStrike.cs b/Sounds/Custom/ThunderStrike.cs new file mode 100644 index 0000000000..80aec33690 --- /dev/null +++ b/Sounds/Custom/ThunderStrike.cs @@ -0,0 +1,18 @@ +using Microsoft.Xna.Framework.Audio; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Sounds.Custom +{ + public class ThunderStrike : ModSound + { + public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type) + { + soundInstance = sound.CreateInstance(); + soundInstance.Volume = volume * 1f; + soundInstance.Pan = pan; + Main.PlaySoundInstance(soundInstance); + return soundInstance; + } + } +} diff --git a/Sounds/Custom/ThunderStrike.ogg b/Sounds/Custom/ThunderStrike.ogg new file mode 100644 index 0000000000000000000000000000000000000000..792f62b5539f14f5921f86cff753993f63c5bed2 GIT binary patch literal 48728 zcmeFZWmp`|wm;gqYk&YDxJz)C;4T4XaCZ&v9$bREyA19w5!`}@;1b+|2Ljw7?>=Ym zbHDuW^PKzXKDVZ(d-YnY>{r!QtGZ{6ilwDG01Nypl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}1<9GN`Hz^Ye0uJAicaUPQ8xPK&|pgFPoZSPXQyf(c6Z(9e5C+GSLI6{ zoiF;R?^hZwiZ^#{9Cly4e*4R(v2W)oNTg)?AlRv<{4vPFIFcoI6me&+K1@a=VdY{V zJba_a>Z(}HbRKxfrx#PKKZX(~K!{5q(0!bAI7ZTs@!^c3&?FHONY@>L^;TR^XcRF4 zXqd>6RmCt3>|aUN904AfjEM#QfVAL}zhjLuN&_YoF*>JbMwuyVsNs-+38^|J z(VYB$-+Sub{r!uy!c;{vy7j}5Aobdn*PGkFsyMuPv3=}IK3_~_KnEZ1dY{vCzAL$( zo*%Lv@1NcGVgG!8bLQjcdU#yEUg)7Szly1S?VZ`v3{*VM8bMJIsV@cU;h$BIxU|ulu4`-m@(SPq83_Pv@W+h=fB_(&NNXLd$BK6Q zYwcXc_WD2{JZaxMx;hDZa{)wG?h!Y1_Kh_7fc`Z|{OfKz`*GCH`zrPm zpN!&NyT7tF?Hr(S;HedO4?=JKOOe7E>oJ{+cV3$ z%pJM+*X7tRS&T&Tb9AH@K|1_mWP+6!fy770-qW%-0Oq2>`0!o4Ei0 literal 0 HcmV?d00001 From 97af1e172b1bc088bccbc35d211584b74965f3e4 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Fri, 21 Jan 2022 02:22:40 +0100 Subject: [PATCH 62/76] Chunder --- Items/Weapons/Melee/OmegaBiomeBlade.cs | 12 ++++- Particles/ElectricSpark.cs | 69 +++++++++++++++++++++++++ Particles/ElectricSpark.png | Bin 0 -> 130 bytes Particles/ThunderBoltVFX.cs | 6 +-- 4 files changed, 83 insertions(+), 4 deletions(-) create mode 100644 Particles/ElectricSpark.cs create mode 100644 Particles/ElectricSpark.png diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index 0f93d55f18..3710f75c63 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -601,6 +601,16 @@ namespace CalamityMod.Items.Weapons.Melee } } + if (ChannelTimer >= ChannelTime - 15) + { + Vector2 Shake = Main.rand.NextVector2Circular(6f, 6f); + projectile.Center += Shake; + + Vector2 Bottom = projectile.Center + Vector2.UnitY * 20f; + Particle Sparkle = new ElectricSpark(Bottom, -Vector2.UnitY.RotatedByRandom(MathHelper.PiOver2) * Main.rand.NextFloat(10f, 20f), Color.White, Main.rand.NextBool() ? Main.rand.NextBool() ? Color.Goldenrod : Color.GreenYellow : Main.rand.NextBool() ? Color.Cyan : Color.Magenta, 1f + Main.rand.NextFloat(0f, 1f), 34, rotationSpeed : 0.1f, bloomScale : 4f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + if (ChannelTimer >= ChannelTime) { projectile.timeLeft = 60; @@ -646,7 +656,7 @@ namespace CalamityMod.Items.Weapons.Melee } //Chunger Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/ThunderStrike"), projectile.Center); - Particle thunder = new ThunderBoltVFX(projectile.Center + Vector2.UnitY * 20f, Main.rand.NextBool() ? Main.rand.NextBool() ? Color.Goldenrod : Color.GreenYellow : Main.rand.NextBool() ? Color.Cyan : Color.Magenta, 0f, 1.5f, Vector2.One, 1f, 20f, projectile, 20f); + Particle thunder = new ThunderBoltVFX(projectile.Center + Vector2.UnitY * 20f, Main.rand.NextBool() ? Main.rand.NextBool() ? Color.Goldenrod : Color.GreenYellow : Main.rand.NextBool() ? Color.Cyan : Color.Magenta, 0f, 1.5f, Vector2.One, 1f, 15f, projectile, 20f); GeneralParticleHandler.SpawnParticle(thunder); if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 5) diff --git a/Particles/ElectricSpark.cs b/Particles/ElectricSpark.cs new file mode 100644 index 0000000000..ec8c94e9eb --- /dev/null +++ b/Particles/ElectricSpark.cs @@ -0,0 +1,69 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Particles +{ + public class ElectricSpark : Particle + { + public override string Texture => "CalamityMod/Particles/ElectricSpark"; + public override bool UseAdditiveBlend => true; + public override bool UseCustomDraw => true; + public override bool SetLifetime => true; + public override int FrameVariants => 2; + + private float Spin; + private float opacity; + private Color Bloom; + private Color LightColor => Bloom * opacity; + private float BloomScale; + private float MaxJumpRotation; //Max rotation that the particle can change velocity per "jump" + private float JumpTime; //Time between jumps + private Vector2 OriginalSpeed; + + public ElectricSpark(Vector2 position, Vector2 velocity, Color color, Color bloom, float scale, int lifeTime, float maxJumpRotation = MathHelper.PiOver4, float jumpTime = 10, float rotationSpeed = 1f, float bloomScale = 1f) + { + Position = position; + Velocity = velocity; + OriginalSpeed = velocity; + Color = color; + Bloom = bloom; + Scale = scale; + Lifetime = lifeTime; + MaxJumpRotation = maxJumpRotation; + JumpTime = jumpTime; + Rotation = Main.rand.NextFloat(MathHelper.TwoPi); + Spin = rotationSpeed; + BloomScale = bloomScale; + Variant = Main.rand.Next(2); + } + + public override void Update() + { + opacity -= JumpTime * 0.25f / Lifetime; + if (Time % JumpTime == 0) + { + opacity = 1f; + Velocity = OriginalSpeed.RotatedByRandom(MaxJumpRotation); + } + Velocity *= 0.6f; + Rotation += Spin * ((Velocity.X > 0) ? 1f : -1f) * (LifetimeCompletion > 0.5 ? 1f : 0.5f); + + Lighting.AddLight(Position, LightColor.R / 255f, LightColor.G / 255f, LightColor.B / 255f); + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + Texture2D sparkTexture = GeneralParticleHandler.GetTexture(Type); + Rectangle frame = new Rectangle(0, 6 * Variant, 6, 6); + Texture2D bloomTexture = ModContent.GetTexture("CalamityMod/Particles/BloomCircle"); + //Ajust the bloom's texture to be the same size as the star's + float properBloomSize = (float)frame.Height / (float)bloomTexture.Height; + + spriteBatch.Draw(bloomTexture, Position - Main.screenPosition, null, Bloom * opacity * 0.5f, 0, bloomTexture.Size() / 2f, Scale * BloomScale * properBloomSize, SpriteEffects.None, 0); + spriteBatch.Draw(sparkTexture, Position - Main.screenPosition, frame, Color * opacity, Rotation, frame.Size() / 2f, Scale, SpriteEffects.None, 0); + } + } +} diff --git a/Particles/ElectricSpark.png b/Particles/ElectricSpark.png new file mode 100644 index 0000000000000000000000000000000000000000..39b19d6168847bef312631596f5c0522a9f36d10 GIT binary patch literal 130 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJz0U{m4&*%Xu#^NA%Cx&(BWL^R}Hl8kyAre#P zo;}FhU?9MJ&~i%J`u|L4v^fL>nfC9U<)py5LTf{0&YARb>*=Q#*-5(>-e2nRsjpxC chx|U~*db%7 literal 0 HcmV?d00001 diff --git a/Particles/ThunderBoltVFX.cs b/Particles/ThunderBoltVFX.cs index 2d16d54938..3dd7e10cae 100644 --- a/Particles/ThunderBoltVFX.cs +++ b/Particles/ThunderBoltVFX.cs @@ -32,13 +32,13 @@ namespace CalamityMod.Particles if (projectileToFollow != null) AttachedProjectile = projectileToFollow; DisplacementFromProjectile = displacementFromProjectile; - Lifetime = 15; + Lifetime = 30; } public override void Update() { Lighting.AddLight(Position, Color.ToVector3() * 3f); - float fadeFactor = 1f - 0.05f * MathHelper.Clamp((Time - 8) / 7f, 0f, 1f); + float fadeFactor = 1f - 0.05f * MathHelper.Clamp((Time - 10) / 10f, 0f, 1f); Opacity *= fadeFactor; Squish.X *= fadeFactor; @@ -57,7 +57,7 @@ namespace CalamityMod.Particles Color drawColor = Color.Lerp(Color.White, Color, (Time / (float)Lifetime)); - SpriteEffects flip = (Main.GlobalTime % 15 < 7) ? SpriteEffects.None : SpriteEffects.FlipHorizontally; + SpriteEffects flip = (Main.GlobalTime % 30 < 15) ? SpriteEffects.None : SpriteEffects.FlipHorizontally; spriteBatch.Draw(tex, Position + Shake - Main.screenPosition, null, Color * Opacity * 0.6f, Rotation, Origin, Squish * Scale, flip, 0); spriteBatch.Draw(tex, Position - Main.screenPosition, null, drawColor * Opacity, Rotation, Origin, Squish * Scale, flip, 0); From 905d764548203475697231056afb8c834b100f2f Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Fri, 21 Jan 2022 02:25:11 +0100 Subject: [PATCH 63/76] Obliterated the old swordbeam projectiles --- Projectiles/Melee/BiomeOrb.cs | 211 ----------------------- Projectiles/Melee/BiomeOrb.png | Bin 705 -> 0 bytes Projectiles/Melee/OmegaBiomeOrb.cs | 253 ---------------------------- Projectiles/Melee/OmegaBiomeOrb.png | Bin 705 -> 0 bytes Projectiles/Melee/TrueBiomeOrb.cs | 211 ----------------------- Projectiles/Melee/TrueBiomeOrb.png | Bin 705 -> 0 bytes 6 files changed, 675 deletions(-) delete mode 100644 Projectiles/Melee/BiomeOrb.cs delete mode 100644 Projectiles/Melee/BiomeOrb.png delete mode 100644 Projectiles/Melee/OmegaBiomeOrb.cs delete mode 100644 Projectiles/Melee/OmegaBiomeOrb.png delete mode 100644 Projectiles/Melee/TrueBiomeOrb.cs delete mode 100644 Projectiles/Melee/TrueBiomeOrb.png diff --git a/Projectiles/Melee/BiomeOrb.cs b/Projectiles/Melee/BiomeOrb.cs deleted file mode 100644 index 1575ade4b2..0000000000 --- a/Projectiles/Melee/BiomeOrb.cs +++ /dev/null @@ -1,211 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.CalPlayer; -using CalamityMod.Dusts; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Melee -{ - public class BiomeOrb : ModProjectile - { - private int dustType = 3; - Color color = default; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Biome Orb"); - ProjectileID.Sets.TrailCacheLength[projectile.type] = 2; - ProjectileID.Sets.TrailingMode[projectile.type] = 0; - } - - public override void SetDefaults() - { - projectile.width = 20; - projectile.height = 20; - projectile.aiStyle = 27; - aiType = ProjectileID.LightBeam; - projectile.friendly = true; - projectile.penetrate = 1; - projectile.timeLeft = 300; - projectile.melee = true; - } - - public override void AI() - { - Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.Calamity(); - bool astral = modPlayer.ZoneAstral; - bool jungle = player.ZoneJungle; - bool snow = player.ZoneSnow; - bool beach = player.ZoneBeach; - bool corrupt = player.ZoneCorrupt; - bool crimson = player.ZoneCrimson; - bool dungeon = player.ZoneDungeon; - bool desert = player.ZoneDesert; - bool glow = player.ZoneGlowshroom; - bool hell = player.ZoneUnderworldHeight; - bool sky = player.ZoneSkyHeight; - bool holy = player.ZoneHoly; - if (astral) - { - dustType = ModContent.DustType(); - color = new Color(255, 127, 80, projectile.alpha); - } - else if (jungle) - { - dustType = 39; - color = new Color(128, 255, 128, projectile.alpha); - } - else if (snow) - { - dustType = 51; - color = new Color(128, 255, 255, projectile.alpha); - } - else if (beach) - { - dustType = 33; - color = new Color(0, 0, 128, projectile.alpha); - } - else if (corrupt) - { - dustType = 14; - color = new Color(128, 64, 255, projectile.alpha); - } - else if (crimson) - { - dustType = 5; - color = new Color(128, 0, 0, projectile.alpha); - } - else if (dungeon) - { - dustType = 29; - color = new Color(64, 0, 128, projectile.alpha); - } - else if (desert) - { - dustType = 32; - color = new Color(255, 255, 128, projectile.alpha); - } - else if (glow) - { - dustType = 56; - color = new Color(0, 255, 255, projectile.alpha); - } - else if (hell) - { - dustType = 6; - color = new Color(255, 128, 0, projectile.alpha); - } - else if (sky) - { - dustType = 213; - color = new Color(255, 255, 255, projectile.alpha); - } - else if (holy) - { - dustType = 57; - color = new Color(255, 255, 0, projectile.alpha); - } - else - { - color = new Color(0, 128, 0, projectile.alpha); - } - int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0f, 0f, 100, default, 0.9f); - Main.dust[num458].noGravity = true; - Main.dust[num458].velocity *= 0.5f; - Main.dust[num458].velocity += projectile.velocity * 0.1f; - } - - public override Color? GetAlpha(Color lightColor) - { - return color; - } - - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - if (projectile.timeLeft > 295) - return false; - - CalamityUtils.DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1); - return false; - } - - public override void Kill(int timeLeft) - { - int num3; - for (int num795 = 4; num795 < 31; num795 = num3 + 1) - { - float num796 = projectile.oldVelocity.X * (30f / (float)num795); - float num797 = projectile.oldVelocity.Y * (30f / (float)num795); - int num798 = Dust.NewDust(new Vector2(projectile.oldPosition.X - num796, projectile.oldPosition.Y - num797), 8, 8, dustType, projectile.oldVelocity.X, projectile.oldVelocity.Y, 100, default, 1.8f); - Main.dust[num798].noGravity = true; - Dust dust = Main.dust[num798]; - dust.velocity *= 0.5f; - num798 = Dust.NewDust(new Vector2(projectile.oldPosition.X - num796, projectile.oldPosition.Y - num797), 8, 8, dustType, projectile.oldVelocity.X, projectile.oldVelocity.Y, 100, default, 1.4f); - dust = Main.dust[num798]; - dust.velocity *= 0.05f; - num3 = num795; - } - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.Calamity(); - bool astral = modPlayer.ZoneAstral; - bool jungle = player.ZoneJungle; - bool snow = player.ZoneSnow; - bool beach = player.ZoneBeach; - bool dungeon = player.ZoneDungeon; - bool desert = player.ZoneDesert; - bool glow = player.ZoneGlowshroom; - bool hell = player.ZoneUnderworldHeight; - bool holy = player.ZoneHoly; - int debuffTime = 90; - if (astral) - { - target.AddBuff(ModContent.BuffType(), debuffTime); - } - else if (jungle) - { - target.AddBuff(BuffID.Venom, debuffTime); - } - else if (snow) - { - target.AddBuff(ModContent.BuffType(), debuffTime / 3); - } - else if (beach) - { - target.AddBuff(ModContent.BuffType(), debuffTime); - } - else if (dungeon) - { - target.AddBuff(BuffID.Frostburn, debuffTime); - } - else if (desert) - { - target.AddBuff(ModContent.BuffType(), debuffTime); - } - else if (glow) - { - target.AddBuff(ModContent.BuffType(), debuffTime / 3); - } - else if (hell) - { - target.AddBuff(ModContent.BuffType(), debuffTime); - } - else if (holy) - { - target.AddBuff(ModContent.BuffType(), debuffTime); - } - else - { - target.AddBuff(ModContent.BuffType(), debuffTime); - } - } - } -} diff --git a/Projectiles/Melee/BiomeOrb.png b/Projectiles/Melee/BiomeOrb.png deleted file mode 100644 index 9e55e98a877d62ba0a40b3f0cd506195cc4535d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 705 zcmV;y0zUnTP)Px%dr3q=R9J=Wmp!i9Koo^PM;3B{UC=~Slxea6L>Y-iuniW%Hdq8b@&eMNq#^|c zKNhkO5-E5`W-gxC&dWF5UD9AMh@ko> z^u@aG^?CqYE*Ix_mY}p)EbjZh#JaTIZna)iw_b3BBV9bi@D2QKso(EM07X#%l{YBM z((wj9PoQ-q?W5QgVZEEpncxV=wmPI~8Uf^aegl}#=Rif^a5wUXxD`n-gFPGo)cK0Ly4d_U}LcH0w4F=k^=gnU)S z61TD3R^LYVTnmq|9q`4NFE)MEpz8_NR^bsY%MyV7e(y~9NH+CeKC(%YL;%{at?RQ2 zkFZ>pzTEayO)ksM+m1mo`&zP6c!cEzd}q5QX5E#Q@8puKpYE#g2fj|iZPS@*n5N+L+J>hJR z=JVHG6(r#sRQ1yKW^o)xP{p(*Wn(); - color = new Color(255, 127, 80, projectile.alpha); - } - else if (jungle) - { - dustType = 39; - color = new Color(128, 255, 128, projectile.alpha); - } - else if (snow) - { - dustType = 51; - color = new Color(128, 255, 255, projectile.alpha); - } - else if (beach) - { - dustType = 33; - color = new Color(0, 0, 128, projectile.alpha); - } - else if (corrupt) - { - dustType = 14; - color = new Color(128, 64, 255, projectile.alpha); - } - else if (crimson) - { - dustType = 5; - color = new Color(128, 0, 0, projectile.alpha); - } - else if (dungeon) - { - dustType = 29; - color = new Color(64, 0, 128, projectile.alpha); - } - else if (desert) - { - dustType = 32; - color = new Color(255, 255, 128, projectile.alpha); - } - else if (glow) - { - dustType = 56; - color = new Color(0, 255, 255, projectile.alpha); - } - else if (hell) - { - dustType = 6; - color = new Color(255, 128, 0, projectile.alpha); - } - else if (sky) - { - dustType = 213; - color = new Color(255, 255, 255, projectile.alpha); - } - else if (holy) - { - dustType = 57; - color = new Color(255, 255, 0, projectile.alpha); - } - else if (nebula) - { - dustType = 242; - color = new Color(255, 0, 255, projectile.alpha); - } - else if (stardust) - { - dustType = 206; - color = new Color(0, 255, 255, projectile.alpha); - } - else if (solar) - { - dustType = 244; - color = new Color(255, 128, 0, projectile.alpha); - } - else if (vortex) - { - dustType = 107; - color = new Color(0, 255, 0, projectile.alpha); - } - else - { - color = new Color(0, 128, 0, projectile.alpha); - } - - int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0f, 0f, 100, default, 1.2f); - Main.dust[num458].noGravity = true; - Main.dust[num458].velocity *= 0.5f; - Main.dust[num458].velocity += projectile.velocity * 0.1f; - - CalamityGlobalProjectile.HomeInOnNPC(projectile, !projectile.tileCollide, 200f, 12f, 20f); - } - - public override Color? GetAlpha(Color lightColor) - { - return color; - } - - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - if (projectile.timeLeft > 235) - return false; - - CalamityUtils.DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1); - return false; - } - - public override void Kill(int timeLeft) - { - int num3; - for (int num795 = 4; num795 < 31; num795 = num3 + 1) - { - float num796 = projectile.oldVelocity.X * (30f / (float)num795); - float num797 = projectile.oldVelocity.Y * (30f / (float)num795); - int num798 = Dust.NewDust(new Vector2(projectile.oldPosition.X - num796, projectile.oldPosition.Y - num797), 8, 8, dustType, projectile.oldVelocity.X, projectile.oldVelocity.Y, 100, default, 1.8f); - Main.dust[num798].noGravity = true; - Dust dust = Main.dust[num798]; - dust.velocity *= 0.5f; - num798 = Dust.NewDust(new Vector2(projectile.oldPosition.X - num796, projectile.oldPosition.Y - num797), 8, 8, dustType, projectile.oldVelocity.X, projectile.oldVelocity.Y, 100, default, 1.4f); - dust = Main.dust[num798]; - dust.velocity *= 0.05f; - num3 = num795; - } - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.Calamity(); - bool astral = modPlayer.ZoneAstral; - bool jungle = player.ZoneJungle; - bool snow = player.ZoneSnow; - bool beach = player.ZoneBeach; - bool dungeon = player.ZoneDungeon; - bool desert = player.ZoneDesert; - bool glow = player.ZoneGlowshroom; - bool hell = player.ZoneUnderworldHeight; - bool holy = player.ZoneHoly; - bool bloodMoon = Main.bloodMoon; - bool snowMoon = Main.snowMoon; - bool pumpkinMoon = Main.pumpkinMoon; - int duration = 150; - if (bloodMoon) - { - player.AddBuff(BuffID.Battle, duration); - } - if (snowMoon) - { - player.AddBuff(BuffID.RapidHealing, duration); - } - if (pumpkinMoon) - { - player.AddBuff(BuffID.WellFed, duration); - } - if (astral) - { - target.AddBuff(ModContent.BuffType(), duration); - } - else if (jungle) - { - target.AddBuff(ModContent.BuffType(), duration); - } - else if (snow) - { - target.AddBuff(ModContent.BuffType(), 30); - } - else if (beach) - { - target.AddBuff(ModContent.BuffType(), duration); - } - else if (dungeon) - { - target.AddBuff(BuffID.Frostburn, duration); - } - else if (desert) - { - target.AddBuff(ModContent.BuffType(), duration); - } - else if (glow) - { - target.AddBuff(ModContent.BuffType(), 30); - } - else if (hell) - { - target.AddBuff(ModContent.BuffType(), duration); - } - else if (holy) - { - target.AddBuff(ModContent.BuffType(), duration); - } - else - { - target.AddBuff(ModContent.BuffType(), duration); - } - } - } -} diff --git a/Projectiles/Melee/OmegaBiomeOrb.png b/Projectiles/Melee/OmegaBiomeOrb.png deleted file mode 100644 index 9e55e98a877d62ba0a40b3f0cd506195cc4535d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 705 zcmV;y0zUnTP)Px%dr3q=R9J=Wmp!i9Koo^PM;3B{UC=~Slxea6L>Y-iuniW%Hdq8b@&eMNq#^|c zKNhkO5-E5`W-gxC&dWF5UD9AMh@ko> z^u@aG^?CqYE*Ix_mY}p)EbjZh#JaTIZna)iw_b3BBV9bi@D2QKso(EM07X#%l{YBM z((wj9PoQ-q?W5QgVZEEpncxV=wmPI~8Uf^aegl}#=Rif^a5wUXxD`n-gFPGo)cK0Ly4d_U}LcH0w4F=k^=gnU)S z61TD3R^LYVTnmq|9q`4NFE)MEpz8_NR^bsY%MyV7e(y~9NH+CeKC(%YL;%{at?RQ2 zkFZ>pzTEayO)ksM+m1mo`&zP6c!cEzd}q5QX5E#Q@8puKpYE#g2fj|iZPS@*n5N+L+J>hJR z=JVHG6(r#sRQ1yKW^o)xP{p(*Wn(); - color = new Color(255, 127, 80, projectile.alpha); - } - else if (jungle) - { - dustType = 39; - color = new Color(128, 255, 128, projectile.alpha); - } - else if (snow) - { - dustType = 51; - color = new Color(128, 255, 255, projectile.alpha); - } - else if (beach) - { - dustType = 33; - color = new Color(0, 0, 128, projectile.alpha); - } - else if (corrupt) - { - dustType = 14; - color = new Color(128, 64, 255, projectile.alpha); - } - else if (crimson) - { - dustType = 5; - color = new Color(128, 0, 0, projectile.alpha); - } - else if (dungeon) - { - dustType = 29; - color = new Color(64, 0, 128, projectile.alpha); - } - else if (desert) - { - dustType = 32; - color = new Color(255, 255, 128, projectile.alpha); - } - else if (glow) - { - dustType = 56; - color = new Color(0, 255, 255, projectile.alpha); - } - else if (hell) - { - dustType = 6; - color = new Color(255, 128, 0, projectile.alpha); - } - else if (sky) - { - dustType = 213; - color = new Color(255, 255, 255, projectile.alpha); - } - else if (holy) - { - dustType = 57; - color = new Color(255, 255, 0, projectile.alpha); - } - else - { - color = new Color(0, 128, 0, projectile.alpha); - } - int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0f, 0f, 100, default, 1.2f); - Main.dust[num458].noGravity = true; - Main.dust[num458].velocity *= 0.5f; - Main.dust[num458].velocity += projectile.velocity * 0.1f; - } - - public override Color? GetAlpha(Color lightColor) - { - return color; - } - - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - if (projectile.timeLeft > 295) - return false; - - CalamityUtils.DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1); - return false; - } - - public override void Kill(int timeLeft) - { - int num3; - for (int num795 = 4; num795 < 31; num795 = num3 + 1) - { - float num796 = projectile.oldVelocity.X * (30f / (float)num795); - float num797 = projectile.oldVelocity.Y * (30f / (float)num795); - int num798 = Dust.NewDust(new Vector2(projectile.oldPosition.X - num796, projectile.oldPosition.Y - num797), 8, 8, dustType, projectile.oldVelocity.X, projectile.oldVelocity.Y, 100, default, 1.8f); - Main.dust[num798].noGravity = true; - Dust dust = Main.dust[num798]; - dust.velocity *= 0.5f; - num798 = Dust.NewDust(new Vector2(projectile.oldPosition.X - num796, projectile.oldPosition.Y - num797), 8, 8, dustType, projectile.oldVelocity.X, projectile.oldVelocity.Y, 100, default, 1.4f); - dust = Main.dust[num798]; - dust.velocity *= 0.05f; - num3 = num795; - } - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.Calamity(); - bool astral = modPlayer.ZoneAstral; - bool jungle = player.ZoneJungle; - bool snow = player.ZoneSnow; - bool beach = player.ZoneBeach; - bool dungeon = player.ZoneDungeon; - bool desert = player.ZoneDesert; - bool glow = player.ZoneGlowshroom; - bool hell = player.ZoneUnderworldHeight; - bool holy = player.ZoneHoly; - int duration = 120; - if (astral) - { - target.AddBuff(ModContent.BuffType(), duration); - } - else if (jungle) - { - target.AddBuff(ModContent.BuffType(), duration); - } - else if (snow) - { - target.AddBuff(ModContent.BuffType(), 30); - } - else if (beach) - { - target.AddBuff(ModContent.BuffType(), duration); - } - else if (dungeon) - { - target.AddBuff(BuffID.Frostburn, duration); - } - else if (desert) - { - target.AddBuff(ModContent.BuffType(), duration); - } - else if (glow) - { - target.AddBuff(ModContent.BuffType(), 30); - } - else if (hell) - { - target.AddBuff(ModContent.BuffType(), duration); - } - else if (holy) - { - target.AddBuff(ModContent.BuffType(), duration); - } - else - { - target.AddBuff(ModContent.BuffType(), duration); - } - } - } -} diff --git a/Projectiles/Melee/TrueBiomeOrb.png b/Projectiles/Melee/TrueBiomeOrb.png deleted file mode 100644 index 9e55e98a877d62ba0a40b3f0cd506195cc4535d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 705 zcmV;y0zUnTP)Px%dr3q=R9J=Wmp!i9Koo^PM;3B{UC=~Slxea6L>Y-iuniW%Hdq8b@&eMNq#^|c zKNhkO5-E5`W-gxC&dWF5UD9AMh@ko> z^u@aG^?CqYE*Ix_mY}p)EbjZh#JaTIZna)iw_b3BBV9bi@D2QKso(EM07X#%l{YBM z((wj9PoQ-q?W5QgVZEEpncxV=wmPI~8Uf^aegl}#=Rif^a5wUXxD`n-gFPGo)cK0Ly4d_U}LcH0w4F=k^=gnU)S z61TD3R^LYVTnmq|9q`4NFE)MEpz8_NR^bsY%MyV7e(y~9NH+CeKC(%YL;%{at?RQ2 zkFZ>pzTEayO)ksM+m1mo`&zP6c!cEzd}q5QX5E#Q@8puKpYE#g2fj|iZPS@*n5N+L+J>hJR z=JVHG6(r#sRQ1yKW^o)xP{p(*Wn Date: Fri, 21 Jan 2022 15:43:47 +0100 Subject: [PATCH 64/76] aota / true aota resprites --- Items/Weapons/Melee/ArkoftheAncients.cs | 3 +-- Items/Weapons/Melee/ArkoftheAncients.png | Bin 1082 -> 1290 bytes Items/Weapons/Melee/TrueArkoftheAncients.cs | 3 +-- Items/Weapons/Melee/TrueArkoftheAncients.png | Bin 1171 -> 1920 bytes 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Melee/ArkoftheAncients.cs b/Items/Weapons/Melee/ArkoftheAncients.cs index 4facc0e5ac..a77ed2fb94 100644 --- a/Items/Weapons/Melee/ArkoftheAncients.cs +++ b/Items/Weapons/Melee/ArkoftheAncients.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { - item.width = 50; + item.width = item.height = 60; item.damage = 80; item.melee = true; item.useAnimation = 22; @@ -29,7 +29,6 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 6.25f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 50; item.value = Item.buyPrice(0, 48, 0, 0); item.rare = ItemRarityID.LightPurple; item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Melee/ArkoftheAncients.png b/Items/Weapons/Melee/ArkoftheAncients.png index 6551c21ef954784cc2d92f78977dd64fee789a1d..bca8cbe06d807558fdecaa4bcfdb24f2b75cdfd1 100644 GIT binary patch literal 1290 zcmV+l1@-!gP)Px(#7RU!RA_2l)pX%K!v6aO$}09*+60MPUA005rVZ`#JfSnmcT zN-VQ&^aD^!fmSG|;W*$x!>Q}tfOv`5tUX=BkapZPywOP1Y%E;E8-*$B8UXW*0N^1z zve~|HG%nFitG=7xa0Y;b#ePHTaTpu!J*@hyGCRv{3m}c1!1B#D2Ti~=yne)r#)@cB zIhNUxw@v}B;k75`d$v!{tSyOLj~XjSGple7uN8@!U7$oCBdb1psCbtF&=i#Sx81D5 zHN4uabZi`NG>(RAc(qt|pAA!+F$zG=xsQRw%_>~O$>KmDprv0wdQ@#Ank~9Kua&>O zTU;o!pEQL4@D%=O0DL;w1jKJv;Tnz?yFokt2YmpTe~)TLTdrT1oi+dCxx$l>@Z>iiynQ>V`Y@W^v-ht2K)l5bYwIKy%G z;q1V}0GK`97Qjm<-_yz|!-_8gxd5DPktgA+^H%}*`u!8YqS^A|0t28oDD&Xsw=N}q z7YX1Rj>eu{r2uR#6VsES5euO8;2y19-Hl-_UG_`6mhS446^p9U3Ikw%Oq#ITW)-gC zSX5U@6rG)%wg4(?_5zE2R`EjfMJ=7((H-&H-;9kW+JqJ18jeO)dO85!JelWC=Vn;| zzU_GcJpI=o0G0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ma14{ZRaFvJOT}r4cC(F70O+dSZjE0|{|3PA(J27>?tcV8YojLXHC$=Y{M9jg z=_OMD9Nhe|b$Qv}k1eu=|JIw4$w)1G!jiPTzCud0Iqu9C;xaDt3(1rM$UZLO>)}ey(&CZ3&AuwJ>(#fB^M!1x zSkPK^#?Kh-dcupY-PXNYyWc$1q(;_T9vNyP_gm5QvY7k2M7@T~{RP&v>)z9;+O#35 zvv6+on&q5QlUkz`ZSBsNtS7u^PAZ{avY%`1e%i86lkI(^9hULRgDT&hD%-Nik5}Ac;x24u4+yGxLbv_{C&e_LYbrufi*1mU*7=f)EzXPG4A;itIGxHjRiAGF6Wz zb^P)MTa(%%bA0!$SwA?A=)3N(p72~6maHrecUrqKZybA|0)T-{p8zvY%gFw^*aSV{ z2*L`WW^gESf6TQ#HCbEtp2mhWNjVP{cUnfWb$7GvusRYMRZh}Xy$@SXCx7$2<-E?e z+nSV(;}s|F!GhFOKOx^4a!F)^+JgNp#(43E)kiIpoE?hRa$l3E62f zXm6cvz2eN&`|N46Pj}sDu}0y6zPAgI+<1B@lr?UmQDbA|LpZ0535Tl zWT*DDsc?Plc0l4n$kwjYPv}>DmyTO8B@LHs^?K=T8}?dWx4~#l!X-2M^9kz)ArJ2M l##EG3a~++}(j|`n2LQR;miMct77+jd002ovPDHLkV1h7jOy~dr From 7f6e7164276e6a699f860c8a79ca177a7ae645ad Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Fri, 21 Jan 2022 23:03:31 +0100 Subject: [PATCH 65/76] Galaxia start --- Items/Weapons/Melee/FourSeasonsGalaxia.cs | 685 +++++--- Items/Weapons/Melee/OmegaBiomeBlade.cs | 8 +- Particles/BloomLine.png | Bin 0 -> 144 bytes Particles/BloomLineVFX.cs | 43 + Particles/CosmicSmoke.cs | 54 + Particles/GeneralParticleHandler.cs | 7 + Projectiles/Melee/Galaxia.cs | 279 ---- Projectiles/Melee/GalaxiaProjectiles.cs | 1754 +++++++++++++++++++++ 8 files changed, 2342 insertions(+), 488 deletions(-) create mode 100644 Particles/BloomLine.png create mode 100644 Particles/BloomLineVFX.cs create mode 100644 Particles/CosmicSmoke.cs delete mode 100644 Projectiles/Melee/Galaxia.cs create mode 100644 Projectiles/Melee/GalaxiaProjectiles.cs diff --git a/Items/Weapons/Melee/FourSeasonsGalaxia.cs b/Items/Weapons/Melee/FourSeasonsGalaxia.cs index 30ce17dd99..539adc36dd 100644 --- a/Items/Weapons/Melee/FourSeasonsGalaxia.cs +++ b/Items/Weapons/Melee/FourSeasonsGalaxia.cs @@ -7,22 +7,219 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Items.Placeables; +using CalamityMod.Particles; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Terraria.ModLoader.IO; +using static CalamityMod.CalamityUtils; +using static CalamityMod.Items.Weapons.Melee.FourSeasonsGalaxia; +using static Terraria.ModLoader.ModContent; + namespace CalamityMod.Items.Weapons.Melee { public class FourSeasonsGalaxia : ModItem { + public enum Attunement : byte { SuperPogo, Whirlwind, Shockwave, FlailBlade } + public Attunement? mainAttunement = null; + + //Used for passive effects? Unless we make em different idk lol + public int UseTimer = 0; + public bool OnHitProc = false; + + #region stats + public static int WhirlwindAttunement_BaseDamage = 400; + public static int WhirlwindAttunement_LocalIFrames = 20; //Remember its got one extra update + public static int WhirlwindAttunement_SigilTime = 1200; + public static float WhirlwindAttunement_BeamDamageReduction = 0.5f; + public static float WhirlwindAttunement_BaseDamageReduction = 0.2f; + public static float WhirlwindAttunement_FullChargeDamageBoost = 2f; + + public static int SuperPogoAttunement_BaseDamage = 500; + public static int SuperPogoAttunement_ShredIFrames = 10; + public static int SuperPogoAttunement_LocalIFrames = 30; //Be warned its got one extra update so all the iframes should be divided in 2 + public static int SuperPogoAttunement_LocalIFramesCharged = 16; + public static float SuperPogoAttunement_SlashDamageBoost = 5f; //Keep in mind the slice always crits + public static int SuperPogoAttunementSlashLifesteal = 6; + public static int SuperPogoAttunement_SlashIFrames = 60; + public static float SuperPogoAttunement_ShotDamageBoost = 2f; + + public static int ShockwaveAttunement_BaseDamage = 2500; + public static int ShockwaveAttunement_DashHitIFrames = 60; + public static float ShockwaveAttunement_FullChargeBoost = 1f; //The EXTRA damage boost. So putting 1 here will make it deal double damage. Putting 0.5 here will make it deal 1.5x the damage. + public static float ShockwaveAttunement_MonolithDamageBoost = 2f; + public static float ShockwaveAttunement_BlastDamageReduction = 0.6f; + + public static int FlailBladeAttunement_BaseDamage = 320; + public static int FlailBladeAttunement_LocalIFrames = 30; + public static int FlailBladeAttunement_FlailTime = 10; + public static int FlailBladeAttunement_Reach = 400; + public static float FlailBladeAttunement_ChainDamageReduction = 0.5f; + public static float FlailBladeAttunement_GhostChainDamageReduction = 0.5f; + + //Proc coefficients. aka the likelihood of any given attack to trigger a on-hit passive. + public static float WhirlwindAttunement_WhirlwindProc = 0.24f; + public static float WhirlwindAttunement_SwordThrowProc = 1f; + public static float WhirlwindAttunement_SwordBeamProc = 0.05f; + + public static float SuperPogoAttunement_ShredderProc = 0.1f; + public static float SuperPogoAttunement_WheelProc = 0.4f; + public static float SuperPogoAttunement_DashProc = 1f; + + public static float ShockwaveAttunement_SwordProc = 1f; + public static float ShockwaveAttunement_MonolithProc = 1f; + public static float ShockwaveAttunement_BlastProc = 0.5f; + + public static float FlailBladeAttunement_BladeProc = 0.1f; + public static float FlailBladeAttunement_ChainProc = 0.05f; + public static float FlailBladeAttunement_GhostChainProc = 0.1f; + #endregion + public override void SetStaticDefaults() { DisplayName.SetDefault("Galaxia"); - Tooltip.SetDefault("Fires a spread of homing projectiles that inflict different debuffs depending on what biome you're in\n" + - "Upon hitting an enemy you are granted a buff based on what biome you're in\n" + - "Projectiles also change based on moon events"); + Tooltip.SetDefault("FUNCTION_DESC\n" + + "FUNCTION_EXTRA\n" + + "FUNCTION_PASSIVE\n" + + "Use RMB to cycle the sword's attunement forward\n" + + "Active attunement : None\n" + + "Passive blessing: None\n"); ; } + #region tooltip editing + + public override void ModifyTooltips(List list) + { + Player player = Main.player[Main.myPlayer]; + if (player is null) + return; + + foreach (TooltipLine l in list) + { + if (l.text.StartsWith("FUNCTION_DESC")) + { + AttunementInfo info = GetAttunementInfo(mainAttunement); + l.overrideColor = info.color; + l.text = info.function_description; + } + + if (l.text.StartsWith("FUNCTION_EXTRA")) + { + AttunementInfo info = GetAttunementInfo(mainAttunement); + l.overrideColor = info.color; + l.text = info.function_extra; + } + + if (l.text.StartsWith("FUNCTION_PASSIVE")) + { + AttunementInfo info = GetAttunementInfo(mainAttunement); + l.overrideColor = info.color; + l.text = info.passive_desc; + } + + if (l.text.StartsWith("Active attunement")) + { + AttunementInfo info = GetAttunementInfo(mainAttunement); + l.overrideColor = Color.Lerp(info.color, info.color2, 0.5f + (float)Math.Sin(Main.GlobalTime) * 0.5f); + l.text = "Active Attumenent : [" + info.name + "]"; + } + + if (l.text.StartsWith("Passive blessing")) + { + AttunementInfo info = GetAttunementInfo(mainAttunement); + l.overrideColor = info.passive_color; + l.text = "Passive blessing : [" + info.passive_name + "]"; + } + } + } + + internal struct AttunementInfo + { + public string name; + public string function_description; + public string function_extra; + public string passive_name; + public string passive_desc; + public Color color; + public Color color2; + public Color passive_color; + } + + internal AttunementInfo GetAttunementInfo(Attunement? attunement) + { + AttunementInfo AttunementInfo = new AttunementInfo(); + + switch (attunement) + { + case Attunement.Whirlwind: + AttunementInfo.name = "Phoenix's Pride"; + AttunementInfo.function_description = "Hold LMB to swing the sword around you, powering up as it spins. Homing cosmic bolts get released around you as you spin"; + AttunementInfo.function_extra = "Releasing LMB during a spin will throw the sword out alongside a blast of 5 stronger cosmic bolts"; + AttunementInfo.color = new Color(255, 87, 0); + AttunementInfo.color2 = new Color(255, 143, 0); + break; + case Attunement.SuperPogo: + AttunementInfo.name = "Polaris's Gaze"; //It carries the mark of the Northern Star + AttunementInfo.function_description = "Channels the mark of the Northern Star into a short ranged shredding blade, surrounded by spinning stars. The blade powers up over time and when hitting enemies"; + AttunementInfo.function_extra = "Releasing LMB sends the charged star flying. Using LMB right after the throw makes the player perform a powerful dash towards the star, releasing cosmic bolts at the end of the lunge"; + AttunementInfo.color = new Color(128, 189, 255); + AttunementInfo.color2 = new Color(255, 128, 140); + break; + case Attunement.Shockwave: + AttunementInfo.name = "Andromeda's Stride"; //EHEEHEHEHE GOD ERASING BECAUSE THE ANDROMEDA BOSS WAS SCRAPPED (ALSO KNOWN AS A "GOD" BEING "ERASED") EHEHEHE + AttunementInfo.function_description = "Hold LMB to charge up a god-erasing sword thrust, and release to unleash the devastating blow. Small cosmic bolts are released as you charge the sword"; + AttunementInfo.function_extra = "Striking the ground with the charge will create an impact so powerful large homing cosmic energies will rise from the ground"; + AttunementInfo.color = new Color(132, 128, 255); + AttunementInfo.color2 = new Color(194, 166, 255); + break; + case Attunement.FlailBlade: + AttunementInfo.name = "Aries's Wrath"; + AttunementInfo.function_description = "Throw out a spinning . Striking enemies with the tip of the blades guarantees a critical hit."; + AttunementInfo.function_extra = "Critical strikes create extra ghostly chains to latch onto extra targets"; + AttunementInfo.color = new Color(113, 239, 177); + AttunementInfo.color2 = new Color(169, 207, 255); + break; + default: + AttunementInfo.name = "None"; + AttunementInfo.function_description = "Does nothing... yet"; + AttunementInfo.function_extra = "Upgrading the sword let it break free from its earthly boundaries. You now have access to every single attunement at all times."; + AttunementInfo.color = new Color(163, 163, 163); + AttunementInfo.color2 = new Color(163, 163, 163); + break; + } + + switch (attunement) + { + case Attunement.Whirlwind: + case Attunement.FlailBlade: + AttunementInfo.passive_name = "Capricorn's Blessing"; + AttunementInfo.passive_desc = "IDK"; + AttunementInfo.passive_color = new Color(76, 137, 237); + break; + case Attunement.SuperPogo: + case Attunement.Shockwave: + AttunementInfo.passive_name = "Cancer's Blessing"; + AttunementInfo.passive_desc = "IDK"; + AttunementInfo.passive_color = new Color(203, 25, 119); + break; + default: + AttunementInfo.passive_name = "None"; + AttunementInfo.passive_desc = "Based on your current attunement, you are granted a passive blessing"; + AttunementInfo.passive_color = new Color(163, 163, 163); + break; + } + return AttunementInfo; + } + + #endregion + public override void SetDefaults() { - item.width = 70; + item.width = item.height = 108; item.damage = 99; item.melee = true; item.useAnimation = 18; @@ -32,234 +229,318 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 9f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 70; item.value = Item.buyPrice(1, 80, 0, 0); item.rare = ItemRarityID.Red; - item.shoot = ModContent.ProjectileType(); + item.shoot = ProjectileID.PurificationPowder; item.shootSpeed = 24f; item.Calamity().customRarity = CalamityRarity.DarkBlue; } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) - { - for (int projectiles = 0; projectiles < 3; projectiles++) - { - float SpeedX = speedX + Main.rand.Next(-40, 41) * 0.05f; - float SpeedY = speedY + Main.rand.Next(-40, 41) * 0.05f; - Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI); - } - return false; - } - public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType()); - recipe.AddIngredient(ModContent.ItemType(), 8); - recipe.AddIngredient(ModContent.ItemType(), 8); - recipe.AddTile(ModContent.TileType()); + recipe.AddIngredient(ItemType()); + recipe.AddIngredient(ItemType(), 8); + recipe.AddIngredient(ItemType(), 8); + recipe.AddTile(TileType()); recipe.SetResult(this); recipe.AddRecipe(); } - public override void MeleeEffects(Player player, Rectangle hitbox) + #region saving and syncing attunements + public override bool CloneNewInstances => true; + + public override ModItem Clone(Item item) { - if (Main.rand.NextBool(5)) - { - int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 0); - } + var clone = base.Clone(item); + if (Main.mouseItem.type == ItemType()) + item.modItem.HoldItem(Main.player[Main.myPlayer]); + (clone as FourSeasonsGalaxia).mainAttunement = (item.modItem as FourSeasonsGalaxia).mainAttunement; + + return clone; } - public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) + public override ModItem Clone() //ditto { - CalamityPlayer modPlayer = player.Calamity(); - bool astral = modPlayer.ZoneAstral; - bool jungle = player.ZoneJungle; - bool snow = player.ZoneSnow; - bool beach = player.ZoneBeach; - bool corrupt = player.ZoneCorrupt; - bool crimson = player.ZoneCrimson; - bool dungeon = player.ZoneDungeon; - bool desert = player.ZoneDesert; - bool glow = player.ZoneGlowshroom; - bool hell = player.ZoneUnderworldHeight; - bool holy = player.ZoneHoly; - bool nebula = player.ZoneTowerNebula; - bool stardust = player.ZoneTowerStardust; - bool solar = player.ZoneTowerSolar; - bool vortex = player.ZoneTowerVortex; - bool bloodMoon = Main.bloodMoon; - bool snowMoon = Main.snowMoon; - bool pumpkinMoon = Main.pumpkinMoon; - if (bloodMoon) + var clone = base.Clone(); + (clone as FourSeasonsGalaxia).mainAttunement = mainAttunement; + + return clone; + } + + public override TagCompound Save() + { + int attunement1 = mainAttunement == null ? -1 : (int)mainAttunement; + TagCompound tag = new TagCompound { - player.AddBuff(BuffID.Battle, 600); - } - if (snowMoon) + { "mainAttunement", attunement1 } + }; + return tag; + } + + public override void Load(TagCompound tag) + { + int attunement1 = tag.GetInt("mainAttunement"); + if (attunement1 == -1) + mainAttunement = null; + else + mainAttunement = (Attunement?)attunement1; + } + + public override void NetSend(BinaryWriter writer) + { + writer.Write((byte)mainAttunement); + } + + public override void NetRecieve(BinaryReader reader) + { + mainAttunement = (Attunement?)reader.ReadByte(); + } + +#endregion + + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + if (mainAttunement == null) + return false; + return true; + } + + public override void HoldItem(Player player) + { + player.Calamity().rightClickListener = true; + + if (CanUseItem(player)) { - player.AddBuff(BuffID.RapidHealing, 600); - } - if (pumpkinMoon) - { - player.AddBuff(BuffID.WellFed, 600); - } - if (astral) - { - player.AddBuff(ModContent.BuffType(), 600); - } - else if (jungle) - { - player.AddBuff(BuffID.Thorns, 600); - } - else if (snow) - { - player.AddBuff(BuffID.Warmth, 600); - } - else if (beach) - { - player.AddBuff(BuffID.Wet, 600); - } - else if (corrupt) - { - player.AddBuff(BuffID.Wrath, 600); - } - else if (crimson) - { - player.AddBuff(BuffID.Rage, 600); - } - else if (dungeon) - { - player.AddBuff(BuffID.Dangersense, 600); - } - else if (desert) - { - player.AddBuff(BuffID.Endurance, 600); - } - else if (glow) - { - player.AddBuff(BuffID.Spelunker, 600); - } - else if (hell) - { - player.AddBuff(BuffID.Inferno, 600); - } - else if (holy) - { - player.AddBuff(BuffID.Heartreach, 600); - } - else if (nebula) - { - player.AddBuff(BuffID.MagicPower, 600); - } - else if (stardust) - { - player.AddBuff(BuffID.Summoning, 600); - } - else if (solar) - { - player.AddBuff(BuffID.Titan, 600); - } - else if (vortex) - { - player.AddBuff(BuffID.AmmoReservation, 600); + player.Calamity().LungingDown = false; } else { - player.AddBuff(BuffID.DryadsWard, 600); + UseTimer++; } - } - public override void OnHitPvp(Player player, Player target, int damage, bool crit) - { - bool jungle = player.ZoneJungle; - bool snow = player.ZoneSnow; - bool beach = player.ZoneBeach; - bool corrupt = player.ZoneCorrupt; - bool crimson = player.ZoneCrimson; - bool dungeon = player.ZoneDungeon; - bool desert = player.ZoneDesert; - bool glow = player.ZoneGlowshroom; - bool hell = player.ZoneUnderworldHeight; - bool holy = player.ZoneHoly; - bool nebula = player.ZoneTowerNebula; - bool stardust = player.ZoneTowerStardust; - bool solar = player.ZoneTowerSolar; - bool vortex = player.ZoneTowerVortex; - bool bloodMoon = Main.bloodMoon; - bool snowMoon = Main.snowMoon; - bool pumpkinMoon = Main.pumpkinMoon; - if (bloodMoon) + //Change the swords function based on its attunement + switch (mainAttunement) { - player.AddBuff(BuffID.Battle, 600); + case Attunement.Whirlwind: + item.damage = WhirlwindAttunement_BaseDamage; + item.channel = true; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.HoldingOut; + item.shoot = ProjectileType(); + item.shootSpeed = 12f; + item.UseSound = null; + item.noMelee = true; + break; + case Attunement.SuperPogo: + item.damage = SuperPogoAttunement_BaseDamage; + item.channel = true; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.HoldingOut; + item.shoot = ProjectileType(); + item.shootSpeed = 12f; + item.UseSound = null; + item.noMelee = true; + break; + case Attunement.Shockwave: + item.damage = ShockwaveAttunement_BaseDamage; + item.channel = true; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.HoldingOut; + item.shoot = ProjectileType(); + item.shootSpeed = 12f; + item.UseSound = null; + item.noMelee = true; + break; + case Attunement.FlailBlade: + item.damage = FlailBladeAttunement_BaseDamage; + item.channel = true; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.HoldingOut; + item.shoot = ProjectileType(); + item.shootSpeed = 12f; + item.UseSound = null; + item.noMelee = true; + break; + default: + item.noUseGraphic = false; + item.useStyle = ItemUseStyleID.SwingThrow; + item.shoot = ProjectileID.PurificationPowder; + item.shootSpeed = 12f; + item.UseSound = SoundID.Item1; + break; } - if (snowMoon) + + if (player.whoAmI != Main.myPlayer) + return; + + //PAssive effetcsts : break + switch (mainAttunement) { - player.AddBuff(BuffID.RapidHealing, 600); + case Attunement.SuperPogo: + case Attunement.Shockwave: + break; + case Attunement.FlailBlade: + case Attunement.Whirlwind: + break; + default: + break; } - if (pumpkinMoon) + + + if (player.Calamity().mouseRight && CanUseItem(player) && player.whoAmI == Main.myPlayer && !Main.mapFullscreen) { - player.AddBuff(BuffID.WellFed, 600); - } - if (jungle) - { - player.AddBuff(BuffID.Thorns, 600); - } - else if (snow) - { - player.AddBuff(BuffID.Warmth, 600); - } - else if (beach) - { - player.AddBuff(BuffID.Wet, 600); - } - else if (corrupt) - { - player.AddBuff(BuffID.Wrath, 600); - } - else if (crimson) - { - player.AddBuff(BuffID.Rage, 600); - } - else if (dungeon) - { - player.AddBuff(BuffID.Dangersense, 600); - } - else if (desert) - { - player.AddBuff(BuffID.Endurance, 600); - } - else if (glow) - { - player.AddBuff(BuffID.Spelunker, 600); - } - else if (hell) - { - player.AddBuff(BuffID.Inferno, 600); - } - else if (holy) - { - player.AddBuff(BuffID.Heartreach, 600); - } - else if (nebula) - { - player.AddBuff(BuffID.MagicPower, 600); - } - else if (stardust) - { - player.AddBuff(BuffID.Summoning, 600); - } - else if (solar) - { - player.AddBuff(BuffID.Titan, 600); - } - else if (vortex) - { - player.AddBuff(BuffID.AmmoReservation, 600); - } - else - { - player.AddBuff(BuffID.DryadsWard, 600); + //Don't shoot out a visual blade if you already have one out + if (Main.projectile.Any(n => n.active && n.type == ProjectileType() && n.owner == player.whoAmI)) + return; + + Projectile.NewProjectile(player.Top, Vector2.Zero, ProjectileType(), 0, 0, player.whoAmI); } } } + + public class GalaxiaVisuals : ModProjectile //Visuals. Now much simpler than before! + { + private Player Owner => Main.player[projectile.owner]; + public bool OwnerCanUseItem => Owner.HeldItem == associatedItem ? (Owner.HeldItem.modItem as FourSeasonsGalaxia).CanUseItem(Owner) : false; + public ref float Initialized => ref projectile.ai[0]; + + private Item associatedItem; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Galactic Formation"); + } + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public override void SetDefaults() + { + projectile.width = projectile.height = 2; + projectile.aiStyle = -1; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.timeLeft = 40; + projectile.tileCollide = false; + projectile.damage = 0; + } + + public override void AI() + { + + if (Initialized == 0f) + { + //If dropped, kill it instantly + if (Owner.HeldItem.type != ItemType()) + { + projectile.Kill(); + return; + } + + projectile.Center = Owner.Center; + associatedItem = Owner.HeldItem; + + //Switch up the attunements + Reattune((FourSeasonsGalaxia)associatedItem.modItem); + + //Do particles around the player + + Color particleColor = (associatedItem.modItem as FourSeasonsGalaxia).GetAttunementInfo((associatedItem.modItem as FourSeasonsGalaxia).mainAttunement).color; + for (int i = 0; i <= 5; i++) + { + Vector2 displace = Vector2.UnitX * 20 * Main.rand.NextFloat(-1f, 1f); + Particle Glow = new GenericBloom(Owner.Bottom + displace, -Vector2.UnitY * Main.rand.NextFloat(1f, 5f), particleColor, 0.02f + Main.rand.NextFloat(0f, 0.2f), 20 + Main.rand.Next(30)); + GeneralParticleHandler.SpawnParticle(Glow); + } + for (int i = 0; i <= 10; i++) + { + Vector2 displace = Vector2.UnitX * 16 * Main.rand.NextFloat(-1f, 1f); + Particle Sparkle = new GenericSparkle(Owner.Bottom + displace, -Vector2.UnitY * Main.rand.NextFloat(1f, 5f), particleColor, particleColor, 0.5f + Main.rand.NextFloat(-0.2f, 0.2f), 20 + Main.rand.Next(30), 1, 2f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + + Initialized = 1f; + } + } + + public void Reattune(FourSeasonsGalaxia item) + { + Attunement attunement; + Vector2[] StarPositions; + Vector2[] ExtraLines; //Extra lines vector give us an indication of the index between the 2 stars we need to connect + List IgnoredLines = new List(); + + Particle Star; + Particle Line; + Color StarColor; + + switch (item.mainAttunement) + { + case Attunement.Whirlwind: //Switching to the flailblade attunement. Drawing Aries + attunement = Attunement.FlailBlade; + StarPositions = new Vector2[] { new Vector2(-160, -150), new Vector2(45, -170), new Vector2(137, 40), new Vector2(146, 126), new Vector2(129, 151) }; + ExtraLines = new Vector2[] { }; + StarColor = Color.Orchid; + break; + case Attunement.FlailBlade: //Switching to the superpogo attunement. Drawing Ursa Minor + attunement = Attunement.SuperPogo; + StarPositions = new Vector2[] { new Vector2(69, -188), new Vector2(18, -122), new Vector2(-23, -39), new Vector2(-13, 63), new Vector2(42, 147), new Vector2(-8, 184), new Vector2(-61, 83) }; + ExtraLines = new Vector2[] { new Vector2(3, 6) }; + StarColor = Color.CornflowerBlue; + break; + case Attunement.SuperPogo: //Switching to the shockwave attunement. Drawing Andromeda + attunement = Attunement.Shockwave; + //https://media.discordapp.net/attachments/802291445360623686/934200685254291546/unknown.png + StarPositions = new Vector2[] { + new Vector2(-210, -46), new Vector2(-150, -35), new Vector2(-69, 18), new Vector2(33, 61), new Vector2(127, 72), //The horizontal line + new Vector2(-41, -27), new Vector2(-41, -67), new Vector2(-100, -124), new Vector2(-160, -130), //The first branch from the left + new Vector2(15, 147), new Vector2(35, 126), new Vector2(37, 23), new Vector2(67, -47), new Vector2(126, -109), new Vector2(146, -136), //The second branch from the left + new Vector2(95, -117) + }; + ExtraLines = new Vector2[] { new Vector2(2, 5) , new Vector2(13, 15) }; + IgnoredLines.Add(5); + IgnoredLines.Add(9); + IgnoredLines.Add(15); + StarColor = Color.MediumSlateBlue; + break; + case Attunement.Shockwave: //Switching to the whirlwind attunement. Drawing Phoenix + default: + attunement = Attunement.Whirlwind; + StarPositions = new Vector2[] { new Vector2(-206, -99), new Vector2(-150, -43), new Vector2(-120, -146), new Vector2(-60, -71), new Vector2(-106, 71), new Vector2(-59, 138), new Vector2(116, -22),//The main line + new Vector2(246, -26), new Vector2(192, 36), new Vector2(138, 81), //The side bit + new Vector2(88, -107), new Vector2(84, -75) }; //Complete the loop + ExtraLines = new Vector2[] { new Vector2(3, 10), new Vector2(11, 6) }; + IgnoredLines.Add(10); + StarColor = Color.OrangeRed; + break; + } + + //Only draw the cool effect if you have enough particle slots left. Itd look really ugly to have a half complete constellation + if (GeneralParticleHandler.FreeSpacesAvailable() > StarPositions.Length * 2) + { + for (int i = 0; i < StarPositions.Length; i++) + { + //The polar star gets bigger than the others. Also since andromeda has so many stars, make em smaller + Star = new GenericSparkle(Owner.Center + StarPositions[i], Vector2.Zero, Color.White, StarColor, (attunement == Attunement.SuperPogo && i == 0) ? 3f : Main.rand.NextFloat(1f, 1.5f) * (attunement == Attunement.Shockwave ? 0.8f : 1f), 20, 0f, 3f); + GeneralParticleHandler.SpawnParticle(Star); + + if (i > 0 && !IgnoredLines.Contains(i)) + { + Line = new BloomLineVFX(Owner.Center + StarPositions[i - 1], StarPositions[i] - StarPositions[i - 1], 0.2f, StarColor, 20); + GeneralParticleHandler.SpawnParticle(Line); + } + } + + for (int i = 0; i < ExtraLines.Length; i++) + { + Line = new BloomLineVFX(Owner.Center + StarPositions[(int)ExtraLines[i].Y], StarPositions[(int)ExtraLines[i].X] - StarPositions[(int)ExtraLines[i].Y], 0.2f, StarColor, 20); + GeneralParticleHandler.SpawnParticle(Line); + } + } + + //Chunger + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/ThunderStrike"), projectile.Center); + if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 5) + Main.LocalPlayer.Calamity().GeneralScreenShakePower = 5; + item.mainAttunement = attunement; + } + } } diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index 3710f75c63..350fa2b002 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -23,7 +23,6 @@ namespace CalamityMod.Items.Weapons.Melee public enum Attunement : byte { SuperPogo, Whirlwind, Shockwave, FlailBlade } public Attunement? mainAttunement = null; public Attunement? secondaryAttunement = null; - public int Combo = 0; public Projectile MeatHook; //Used for passive effects @@ -50,7 +49,6 @@ namespace CalamityMod.Items.Weapons.Melee public static int SuperPogoAttunement_SlashIFrames = 60; public static float SuperPogoAttunement_ShotDamageBoost = 2f; - public static float SuperPogoAttunement_PassiveLifeStealChance = 0.2f; public static int SuperPogoAttunement_PassiveLifeSteal = 10; @@ -183,7 +181,7 @@ namespace CalamityMod.Items.Weapons.Melee case Attunement.Shockwave: AttunementInfo.name = "Mercurial Tides"; AttunementInfo.function_description = "Hold LMB to charge up a heaven-shattering sword thrust, and release to unleash the devastating blow. Small shockwaves are released as you charge the sword"; - AttunementInfo.function_extra = "Striking the ground after a jump will create an impact so powerful, a shockwave of ancient monoliths will rise up and propagate through the ground"; + AttunementInfo.function_extra = "Striking the ground after a jump will create an impact so powerful a shockwave of ancient monoliths will rise up and propagate through the ground"; AttunementInfo.function_passive = "While attacking, release small shockwaves around you"; AttunementInfo.color = new Color(132, 109, 233); AttunementInfo.color2 = new Color(122, 213, 233); @@ -310,8 +308,6 @@ namespace CalamityMod.Items.Weapons.Melee player.Calamity().rightClickListener = true; //Reset the strong lunge thing just in case it didnt get caught beofre. - //|| - // n.type == ProjectileType() if (CanUseItem(player)) { @@ -705,6 +701,4 @@ namespace CalamityMod.Items.Weapons.Melee return false; } } - - } diff --git a/Particles/BloomLine.png b/Particles/BloomLine.png new file mode 100644 index 0000000000000000000000000000000000000000..08bf1d28821f74f954ad288af4f04ad7583254c4 GIT binary patch literal 144 zcmeAS@N?(olHy`uVBq!ia0vp^4nWMv!3HGra#x6hIK@HkP7LeL$-D$|ygXeTLnNlw zo-yP*pupoCXnk)-iba$~hKG89t9ILRef_lTwH}AgY^YLxxoi68$xp6Tx9@fqVo)$P rJm%oCVAVFu=gXI$+4Ii+{dxB0_i^$Li?jCuO=a+O^>bP0l+XkKX#_E; literal 0 HcmV?d00001 diff --git a/Particles/BloomLineVFX.cs b/Particles/BloomLineVFX.cs new file mode 100644 index 0000000000..f45fb78177 --- /dev/null +++ b/Particles/BloomLineVFX.cs @@ -0,0 +1,43 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Particles +{ + public class BloomLineVFX : Particle + { + public override string Texture => "CalamityMod/Particles/BloomLine"; + public override bool UseAdditiveBlend => true; + public override bool UseCustomDraw => true; + public override bool SetLifetime => true; + public override bool Important => Telegraph; + + public float opacity; + public Vector2 LineVector; + public bool Telegraph; //Denotes if the line is used as an enemy telegraph. In that case, it'll be marked as important + + public BloomLineVFX(Vector2 startPoint, Vector2 lineVector, float thickness, Color color, int lifetime, bool telegraph = false) + { + Position = startPoint; + LineVector = lineVector; + Scale = thickness; + Color = color; + Lifetime = lifetime; + Telegraph = telegraph; + Velocity = Vector2.Zero; + Rotation = 0; + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + Texture2D tex = GeneralParticleHandler.GetTexture(Type); + float rot = LineVector.ToRotation() + MathHelper.PiOver2; + Vector2 origin = new Vector2(tex.Width/2f, tex.Height); + Vector2 scale = new Vector2(Scale, LineVector.Length() / tex.Height); + + spriteBatch.Draw(tex, Position - Main.screenPosition, null, Color, rot, origin, scale, SpriteEffects.None, 0); + } + } +} diff --git a/Particles/CosmicSmoke.cs b/Particles/CosmicSmoke.cs new file mode 100644 index 0000000000..2151478fd6 --- /dev/null +++ b/Particles/CosmicSmoke.cs @@ -0,0 +1,54 @@ +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + + +namespace CalamityMod.Particles { + public class CosmicSmokeParticle : Particle + { + public override bool UseCustomDraw => true; + public override bool SetLifetime => true; + public override string Texture => "CalamityMod/Particles/SmallSmoke"; + + private float Opacity; + private Color BackColor; + private float ColorHueShift; + private float Spin; + + public CosmicSmokeParticle(Vector2 position, Vector2 velocity, Color color, Color backColor, float scale, float opacity, int lifetime, float rotationSpeed = 0f) + { + Position = position; + Velocity = velocity; + Color = color; + BackColor = backColor; + Scale = scale; + Opacity = opacity; + Lifetime = lifetime; + Rotation = Main.rand.NextFloat(MathHelper.TwoPi); + Spin = rotationSpeed; + } + + public override void Update() + { + + Rotation += Spin * ((Velocity.X > 0) ? 1f : -1f); + Velocity *= 0.85f; + + if (Opacity > 90) + { + Lighting.AddLight(Position, Color.ToVector3() * 0.1f); + Scale += 0.01f; + Opacity -= 3; + } + else + { + Scale *= 0.975f; + Opacity -= 2; + } + if (Opacity < 0) + Kill(); + + } + } +} \ No newline at end of file diff --git a/Particles/GeneralParticleHandler.cs b/Particles/GeneralParticleHandler.cs index bfb5a3153b..5353c787b2 100644 --- a/Particles/GeneralParticleHandler.cs +++ b/Particles/GeneralParticleHandler.cs @@ -144,6 +144,13 @@ namespace CalamityMod.Particles batchedAlphaBlendParticles.Clear(); batchedAdditiveBlendParticles.Clear(); } + + /// + /// Gives you the amount of particle slots that are available. Useful when you need multiple particles at once to make an effect and dont want it to be only halfway drawn due to a lack of particle slots + /// + /// + public static int FreeSpacesAvailable() => CalamityConfig.Instance.ParticleLimit - particles.Count(); + /// /// Gives you the texture of the particle type. Useful for custom drawing /// diff --git a/Projectiles/Melee/Galaxia.cs b/Projectiles/Melee/Galaxia.cs deleted file mode 100644 index 697fd25eaa..0000000000 --- a/Projectiles/Melee/Galaxia.cs +++ /dev/null @@ -1,279 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.Buffs.Potions; -using CalamityMod.CalPlayer; -using CalamityMod.Projectiles.Typeless; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Melee -{ - public class Galaxia : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Orb"); - ProjectileID.Sets.TrailCacheLength[projectile.type] = 6; - ProjectileID.Sets.TrailingMode[projectile.type] = 0; - } - - public override void SetDefaults() - { - projectile.width = 24; - projectile.height = 24; - projectile.friendly = true; - projectile.tileCollide = false; - projectile.ignoreWater = true; - projectile.alpha = 50; - projectile.penetrate = 3; - projectile.timeLeft = 240; - projectile.melee = true; - projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 10; - } - - public override void AI() - { - if (projectile.soundDelay == 0) - { - projectile.soundDelay = 20 + Main.rand.Next(40); - if (Main.rand.NextBool(5)) - { - Main.PlaySound(SoundID.Item9, projectile.position); - } - } - projectile.alpha -= 15; - int num58 = 150; - if (projectile.Center.Y >= projectile.ai[1]) - { - num58 = 0; - } - if (projectile.alpha < num58) - { - projectile.alpha = num58; - } - projectile.localAI[0] += (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * 0.01f * (float)projectile.direction; - projectile.rotation += (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * 0.01f * (float)projectile.direction; - if (Main.rand.NextBool(8)) - { - Vector2 value3 = Vector2.UnitX.RotatedByRandom(1.5707963705062866).RotatedBy((double)projectile.velocity.ToRotation(), default); - int num59 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 66, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 150, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.2f); - Main.dust[num59].noGravity = true; - Main.dust[num59].velocity = value3 * 0.66f; - Main.dust[num59].position = projectile.Center + value3 * 12f; - } - if (Main.rand.NextBool(24)) - { - int num60 = Gore.NewGore(projectile.Center, new Vector2(projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f), 16, 1f); - Main.gore[num60].velocity *= 0.66f; - Main.gore[num60].velocity += projectile.velocity * 0.3f; - } - if (projectile.ai[1] == 1f) - { - projectile.light = 0.9f; - if (Main.rand.NextBool(5)) - { - int num59 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 66, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 150, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.2f); - Main.dust[num59].noGravity = true; - } - if (Main.rand.NextBool(10)) - { - Gore.NewGore(projectile.position, new Vector2(projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f), Main.rand.Next(16, 18), 1f); - } - } - - CalamityGlobalProjectile.HomeInOnNPC(projectile, true, 300f, 12f, 20f); - } - - public override Color? GetAlpha(Color lightColor) - { - return new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, projectile.alpha); - } - - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - CalamityUtils.DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1); - return false; - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.Calamity(); - bool astral = modPlayer.ZoneAstral; - bool jungle = player.ZoneJungle; - bool snow = player.ZoneSnow; - bool beach = player.ZoneBeach; - bool corrupt = player.ZoneCorrupt; - bool crimson = player.ZoneCrimson; - bool dungeon = player.ZoneDungeon; - bool desert = player.ZoneDesert; - bool glow = player.ZoneGlowshroom; - bool hell = player.ZoneUnderworldHeight; - bool holy = player.ZoneHoly; - bool nebula = player.ZoneTowerNebula; - bool stardust = player.ZoneTowerStardust; - bool solar = player.ZoneTowerSolar; - bool vortex = player.ZoneTowerVortex; - bool bloodMoon = Main.bloodMoon; - bool snowMoon = Main.snowMoon; - bool pumpkinMoon = Main.pumpkinMoon; - int duration = 180; - if (bloodMoon) - { - player.AddBuff(BuffID.Battle, duration); - } - if (snowMoon) - { - player.AddBuff(BuffID.RapidHealing, duration); - } - if (pumpkinMoon) - { - player.AddBuff(BuffID.WellFed, duration); - } - if (astral) - { - target.AddBuff(ModContent.BuffType(), duration); - player.AddBuff(ModContent.BuffType(), duration); - int proj = Projectile.NewProjectile(projectile.Center, projectile.velocity, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - if (proj.WithinBounds(Main.maxProjectiles)) - Main.projectile[proj].Calamity().forceMelee = true; - } - else if (jungle) - { - target.AddBuff(ModContent.BuffType(), duration); - player.AddBuff(BuffID.Thorns, duration); - int proj = Projectile.NewProjectile(projectile.Center, projectile.velocity, ProjectileID.Leaf, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - if (proj.WithinBounds(Main.maxProjectiles)) - Main.projectile[proj].Calamity().forceMelee = true; - } - else if (snow) - { - target.AddBuff(ModContent.BuffType(), 30); - player.AddBuff(BuffID.Warmth, duration); - Projectile.NewProjectile(projectile.Center, projectile.velocity, ProjectileID.IceBolt, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - } - else if (beach) - { - target.AddBuff(ModContent.BuffType(), duration); - player.AddBuff(BuffID.Wet, duration); - int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0.25f, projectile.velocity.Y * 0.25f, ProjectileID.FlaironBubble, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - if (proj.WithinBounds(Main.maxProjectiles)) - Main.projectile[proj].Calamity().forceMelee = true; - } - else if (corrupt) - { - player.AddBuff(BuffID.Wrath, duration); - int ball = Projectile.NewProjectile(projectile.Center, projectile.velocity, ProjectileID.CursedFlameFriendly, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - if (ball.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[ball].Calamity().forceMelee = true; - Main.projectile[ball].penetrate = 1; - } - } - else if (crimson) - { - player.AddBuff(BuffID.Rage, duration); - int ball = Projectile.NewProjectile(projectile.Center, projectile.velocity, ProjectileID.GoldenShowerFriendly, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - if (ball.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[ball].Calamity().forceMelee = true; - Main.projectile[ball].penetrate = 1; - } - } - else if (dungeon) - { - target.AddBuff(BuffID.Frostburn, duration); - player.AddBuff(BuffID.Dangersense, duration); - int ball = Projectile.NewProjectile(projectile.Center, projectile.velocity, ProjectileID.WaterBolt, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - if (ball.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[ball].Calamity().forceMelee = true; - Main.projectile[ball].penetrate = 1; - } - } - else if (desert) - { - target.AddBuff(ModContent.BuffType(), duration); - player.AddBuff(BuffID.Endurance, duration); - int proj = Projectile.NewProjectile(projectile.Center, projectile.velocity, ProjectileID.BlackBolt, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - if (proj.WithinBounds(Main.maxProjectiles)) - Main.projectile[proj].Calamity().forceMelee = true; - } - else if (glow) - { - target.AddBuff(ModContent.BuffType(), 30); - player.AddBuff(BuffID.Spelunker, duration); - int proj = Projectile.NewProjectile(projectile.Center, projectile.velocity, ProjectileID.Mushroom, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - if (proj.WithinBounds(Main.maxProjectiles)) - Main.projectile[proj].Calamity().forceMelee = true; - } - else if (hell) - { - target.AddBuff(ModContent.BuffType(), duration); - player.AddBuff(BuffID.Inferno, duration); - int proj = Projectile.NewProjectile(projectile.Center, projectile.velocity, ProjectileID.BallofFire, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - if (proj.WithinBounds(Main.maxProjectiles)) - Main.projectile[proj].Calamity().forceMelee = true; - } - else if (holy) - { - target.AddBuff(ModContent.BuffType(), duration); - player.AddBuff(BuffID.Heartreach, duration); - int proj = Projectile.NewProjectile(projectile.Center, projectile.velocity, ProjectileID.RainbowCrystalExplosion, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - if (proj.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[proj].Calamity().forceMelee = true; - Main.projectile[proj].usesLocalNPCImmunity = true; - Main.projectile[proj].localNPCHitCooldown = -1; - } - } - else if (nebula) - { - player.AddBuff(BuffID.MagicPower, duration); - int proj = Projectile.NewProjectile(projectile.Center, projectile.velocity, ProjectileID.NebulaBlaze1, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - if (proj.WithinBounds(Main.maxProjectiles)) - Main.projectile[proj].Calamity().forceMelee = true; - } - else if (stardust) - { - player.AddBuff(BuffID.Summoning, duration); - int ball = Projectile.NewProjectile(projectile.Center, projectile.velocity, ProjectileID.StardustCellMinionShot, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - if (ball.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[ball].Calamity().forceMelee = true; - Main.projectile[ball].penetrate = 1; - } - } - else if (solar) - { - player.AddBuff(BuffID.Titan, duration); - Projectile.NewProjectile(projectile.Center, projectile.velocity, ProjectileID.SolarWhipSwordExplosion, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); - } - else if (vortex) - { - player.AddBuff(BuffID.AmmoReservation, duration); - int proj = Projectile.NewProjectile(projectile.Center, projectile.velocity, ProjectileID.VortexBeaterRocket, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - if (proj.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[proj].Calamity().forceMelee = true; - Main.projectile[proj].usesLocalNPCImmunity = true; - Main.projectile[proj].localNPCHitCooldown = -1; - } - } - else - { - target.AddBuff(ModContent.BuffType(), duration); - player.AddBuff(BuffID.DryadsWard, duration); - int ball = Projectile.NewProjectile(projectile.Center, projectile.velocity, ProjectileID.TerrarianBeam, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - if (ball.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[ball].penetrate = 1; - } - } - } - } -} diff --git a/Projectiles/Melee/GalaxiaProjectiles.cs b/Projectiles/Melee/GalaxiaProjectiles.cs new file mode 100644 index 0000000000..68b7632f9c --- /dev/null +++ b/Projectiles/Melee/GalaxiaProjectiles.cs @@ -0,0 +1,1754 @@ +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.CalPlayer; +using CalamityMod.DataStructures; +using CalamityMod.Particles; +using CalamityMod.Items.Weapons.Melee; +using Terraria.Graphics.Shaders; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using static Terraria.ModLoader.ModContent; +using static CalamityMod.CalamityUtils; +using Terraria.Audio; + +namespace CalamityMod.Projectiles.Melee +{ + + // General cosmic bolt projectile that gets used for a lot of the other ones + + public class GalaxiaCosmicBolt : ModProjectile + { + public NPC target; + public Player Owner => Main.player[projectile.owner]; + public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideBeam"; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ghostly projection"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 2; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void SetDefaults() + { + projectile.width = projectile.height = 32; + projectile.aiStyle = 27; + aiType = ProjectileID.LightBeam; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.timeLeft = 80; + projectile.extraUpdates = 1; + projectile.melee = true; + projectile.tileCollide = false; + } + + public override void AI() + { + + if (target == null) + { + foreach (Projectile proj in Main.projectile) + { + if (proj.active && proj.type == ProjectileType() && proj.owner == Owner.whoAmI) + { + target = Main.npc[(int)proj.ai[0]]; + break; + } + } + } + + else if ((projectile.Center - target.Center).Length() >= (projectile.Center + projectile.velocity - target.Center).Length() && CalamityUtils.AngleBetween(projectile.velocity, target.Center - projectile.Center) < MathHelper.PiOver4) //Home in + { + projectile.timeLeft = 70; //Remain alive + float angularTurnSpeed = MathHelper.ToRadians(MathHelper.Lerp(15, 2.5f, MathHelper.Clamp(projectile.Distance(target.Center) / 10f, 0f, 1f))); + float idealDirection = projectile.AngleTo(target.Center); + float updatedDirection = projectile.velocity.ToRotation().AngleTowards(idealDirection, angularTurnSpeed); + projectile.velocity = updatedDirection.ToRotationVector2() * projectile.velocity.Length(); + } + + Lighting.AddLight(projectile.Center, 0.75f, 1f, 0.24f); + int dustParticle = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.CursedTorch, 0f, 0f, 100, default, 0.9f); + Main.dust[dustParticle].noGravity = true; + Main.dust[dustParticle].velocity *= 0.5f; + Main.dust[dustParticle].velocity += projectile.velocity * 0.1f; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (projectile.timeLeft > 75) + return false; + + DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1); + + spriteBatch.End(); //Haha sup babe what if i restarted the spritebatch way too many times haha /blushes + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + Texture2D tex = Main.projectileTexture[projectile.type]; + + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, Color.Lerp(Color.HotPink, Color.GreenYellow, (float)Math.Sin(Main.GlobalTime * 2f)), projectile.rotation, tex.Size() * 0.5f, 1f, 0f, 0f); + + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(SoundID.Item43, projectile.Center); + for (int i = 0; i <= 15; i++) + { + Vector2 displace = (projectile.rotation - MathHelper.PiOver4).ToRotationVector2() * (-0.5f + (i / 15f)) * 88f; + int dustParticle = Dust.NewDust(projectile.Center + displace, projectile.width, projectile.height, DustID.CursedTorch, 0f, 0f, 100, default, 2f); + Main.dust[dustParticle].noGravity = true; + Main.dust[dustParticle].velocity = projectile.oldVelocity; + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + int debuffTime = 90; + target.AddBuff(BuffType(), debuffTime); + } + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.WhirlwindAttunement_SwordBeamProc) + sword.OnHitProc = true; + } + + public override Color? GetAlpha(Color lightColor) => Color.Lerp(Color.HotPink, Color.GreenYellow, (float)Math.Sin(Main.GlobalTime * 2f)); + } + + + //Phoenix's pride aka Whirlwind attunement + + public class PhoenixsPride : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride"; + private bool initialized = false; + Vector2 direction = Vector2.Zero; + public ref float CurrentState => ref projectile.ai[0]; + public Player Owner => Main.player[projectile.owner]; + private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; + public const float throwOutTime = 90f; + public const float throwOutDistance = 440f; + + public static float snapPoint = 0.45f; + public float snapTimer => (throwTimer / throwOutTime) < snapPoint ? 0 : ((throwTimer / throwOutTime) - snapPoint) / (1f - snapPoint); + public static float retractionPoint = 0.6f; + public float retractionTimer => (throwTimer / throwOutTime) < retractionPoint ? 0 : ((throwTimer / throwOutTime) - retractionPoint) / (1f - retractionPoint); + public ref float Empowerment => ref projectile.ai[1]; + public float OverEmpowerment = 0f; //Used to keep cooldowns working when the spin is full + public ref float hasMadeSound => ref projectile.localAI[0]; + public ref float hasMadeChargeSound => ref projectile.localAI[1]; + + public const float maxEmpowerment = 600f; + public float throwTimer => throwOutTime - projectile.timeLeft; + + + public float AngleReset = 0f; + public bool CanDirectFire = true; + public Particle smear; + public Particle sightLine; + public NPC lastTarget; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Swordsmith's Pride"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; + ProjectileID.Sets.TrailingMode[projectile.type] = 2; + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 74; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = OmegaBiomeBlade.WhirlwindAttunement_LocalIFrames; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + float bladeLenght = 140 * projectile.scale; + float bladeWidth = 25 * projectile.scale; + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center, projectile.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); + } + + + public CurveSegment launch = new CurveSegment(EasingType.CircOut, 0f, 0f, 1f, 4); + public CurveSegment hold = new CurveSegment(EasingType.Linear, snapPoint, 1f, 0f); + public CurveSegment retract = new CurveSegment(EasingType.PolyInOut, retractionPoint, 1f, -1.05f, 3); + internal float ThrowCurve() => PiecewiseAnimation((throwOutTime - projectile.timeLeft) / throwOutTime, new CurveSegment[] { launch, hold, retract }); + + public override void AI() + { + if (!initialized) //Initialization. Here its litterally just playing a sound tho lmfao + { + Main.PlaySound(SoundID.Item90, projectile.Center); + projectile.velocity = Vector2.Zero; + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + initialized = true; + } + + projectile.rotation = direction.ToRotation(); //Only done for afterimages + + if (!OwnerCanShoot) + { + if (CurrentState == 2f || (CurrentState == 0f && Empowerment / maxEmpowerment < 0.5)) + { + Main.PlaySound(SoundID.Item77, projectile.Center); + projectile.Kill(); + return; + } + + else if (CurrentState == 0f) + { + CurrentState = 1f; + Main.PlaySound(SoundID.Item80, projectile.Center); + direction = Owner.DirectionTo(Main.MouseWorld); + //PARTICLES LOTS OF PARTICLES LOTS OF SPARKLES YES YES MH YES YES + for (int i = 0; i <= 8; i++) + { + float variation = Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4); + float strength = (float)Math.Sin(variation * 2f + MathHelper.PiOver2); + Particle Sparkle = new CritSpark(projectile.Center, Owner.velocity + direction.RotatedBy(variation) * (1 + strength) * 2f * Main.rand.NextFloat(7.5f, 20f), Color.White, Color.HotPink, 2f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 2f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + for (int i = 0; i <= 8; i++) + { + float variation = Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4); + float strength = (float)Math.Sin(variation * 2f + MathHelper.PiOver2); + Particle Sparkle = new CritSpark(projectile.Center, Owner.velocity + direction.RotatedBy(variation) * (1 + strength) * Main.rand.NextFloat(7.5f, 20f), Color.White, Color.GreenYellow, 2f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 2f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + } + } + + if (CurrentState == 0f) + { + if (Owner.whoAmI == Main.myPlayer) + { + if (hasMadeChargeSound == 0f && Empowerment / maxEmpowerment >= 0.5) + { + hasMadeChargeSound = 1f; + Main.PlaySound(SoundID.Item76); + } + + float rotation = direction.ToRotation(); + if (rotation > -MathHelper.PiOver2 - MathHelper.PiOver4 && rotation < -MathHelper.PiOver2 + MathHelper.PiOver4 && hasMadeSound == 1f) + hasMadeSound = 0f; + + else if (rotation > MathHelper.PiOver2 - MathHelper.PiOver4 && rotation < MathHelper.PiOver2 + MathHelper.PiOver4 && hasMadeSound == 0f) + { + CanDirectFire = true; + hasMadeSound = 1f; + Main.PlaySound(SoundID.Item71); + } + } + + if (Empowerment / maxEmpowerment >= 0.5) + { + + if ((Empowerment + OverEmpowerment) % 30 == 29) + { + Vector2 shotDirection = Main.rand.NextVector2CircularEdge(15f, 15f); + if (lastTarget != null && lastTarget.active) //If you've got an actual target, angle your shots towards them + { + shotDirection = (shotDirection.ToRotation().AngleTowards(Owner.AngleTo(lastTarget.Center), MathHelper.PiOver2)).ToRotationVector2() * 15f; + } + Projectile.NewProjectile(Owner.Center, shotDirection, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.WhirlwindAttunement_BeamDamageReduction), 0f, Owner.whoAmI); + } + } + + + if (Empowerment / maxEmpowerment >= 0.75) + { + Color currentColor = Color.Lerp(Color.HotPink, Color.GreenYellow, (float)Math.Sin(Main.GlobalTime * 2f)) * (((Empowerment / maxEmpowerment) - 0.75f) / 0.25f * 0.8f); + if (smear == null) + { + smear = new CircularSmearVFX(Owner.Center, Color.HotPink, direction.ToRotation(), projectile.scale * 1.5f); + GeneralParticleHandler.SpawnParticle(smear); + } + //Update the variables of the smear + else + { + smear.Rotation = direction.ToRotation() + MathHelper.PiOver2; + smear.Time = 0; + smear.Position = Owner.Center; + smear.Scale = projectile.scale * 1.9f; + smear.Color = currentColor; + } + + if (sightLine == null) + { + sightLine = new LineVFX(Owner.Center, Owner.DirectionTo(Main.MouseWorld), 0.2f, Color.HotPink, false); + GeneralParticleHandler.SpawnParticle(sightLine); + } + else + { + sightLine.Position = Owner.Center + Owner.DirectionTo(Main.MouseWorld) * projectile.scale * 1.88f * 40; + (sightLine as LineVFX).LineVector = Owner.DirectionTo(Main.MouseWorld) * projectile.scale * 1.88f * 38f; + sightLine.Scale = 0.2f; + sightLine.Time = 0; + sightLine.Color = currentColor * 0.7f; + } + + float rotationAdjusted = MathHelper.WrapAngle(projectile.rotation) + MathHelper.Pi; + float mouseAngleAdjusted = MathHelper.WrapAngle(Owner.DirectionTo(Main.MouseWorld).ToRotation()) + MathHelper.Pi; + float deltaAngleShoot = Math.Abs(MathHelper.WrapAngle(rotationAdjusted - mouseAngleAdjusted)); + + if (CanDirectFire && deltaAngleShoot < 0.1f) + { + Particle Blink = new GenericSparkle(Owner.Center + Owner.DirectionTo(Main.MouseWorld) * projectile.scale * 1.88f * 78f, Owner.velocity, Color.White, currentColor, 1.5f, 10, 0.1f, 3f); + GeneralParticleHandler.SpawnParticle(Blink); + + Projectile.NewProjectile(Owner.Center, Owner.DirectionTo(Main.MouseWorld) * 15f, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.WhirlwindAttunement_BeamDamageReduction), 0f, Owner.whoAmI); + CanDirectFire = false; + AngleReset = Owner.DirectionTo(Main.MouseWorld).ToRotation(); + } + + + if (Main.rand.NextBool()) + { + float maxDistance = projectile.scale * 1.9f * 78f; + Vector2 distance = Main.rand.NextVector2Circular(maxDistance, maxDistance); + Vector2 angularVelocity = Vector2.Normalize(distance.RotatedBy(MathHelper.PiOver2)) * 2f * (1f + distance.Length() / 15f); + Particle glitter = new CritSpark(Owner.Center + distance, Owner.velocity + angularVelocity, Color.White, currentColor, 1f + 1 * (distance.Length() / maxDistance), 10, 0.05f, 3f); + GeneralParticleHandler.SpawnParticle(glitter); + } + } + + + //Manage position and rotation + projectile.scale = 1 + Empowerment / maxEmpowerment * 1.5f; + + direction = direction.RotatedBy(MathHelper.Clamp(Empowerment / maxEmpowerment, 0.4f, 1f) * MathHelper.PiOver4 * 0.20f); + direction.Normalize(); + projectile.rotation = direction.ToRotation(); + projectile.Center = Owner.Center + (direction * projectile.scale * 10); + projectile.timeLeft = (int)throwOutTime + 1; + Empowerment++; + if (Empowerment > maxEmpowerment) + { + Empowerment = maxEmpowerment; + OverEmpowerment++; + } + } + + if (CurrentState == 1f) + { + projectile.Center = Owner.Center + (direction * projectile.scale * 10) + (direction * throwOutDistance * ThrowCurve()); + projectile.scale = (1 + Empowerment / maxEmpowerment * 1.5f) * MathHelper.Clamp(1 - retractionTimer, 0.3f, 1f); + } + + //Make the owner look like theyre holding the sword bla bla + Owner.heldProj = projectile.whoAmI; + Owner.direction = Math.Sign(direction.X); + Owner.itemRotation = direction.ToRotation(); + if (Owner.direction != 1) + { + Owner.itemRotation -= 3.14f; + } + Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); + Owner.itemTime = 2; + Owner.itemAnimation = 2; + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + damage = (int)(damage * (OmegaBiomeBlade.WhirlwindAttunement_BaseDamageReduction + (OmegaBiomeBlade.WhirlwindAttunement_FullChargeDamageBoost * Empowerment / maxEmpowerment))); + + if (CurrentState != 1) + { + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.WhirlwindAttunement_WhirlwindProc) + sword.OnHitProc = true; + return; + } + + if (Owner.HeldItem.modItem is OmegaBiomeBlade blade && Main.rand.NextFloat() <= OmegaBiomeBlade.WhirlwindAttunement_SwordThrowProc) + blade.OnHitProc = true; + + lastTarget = target; + foreach (Projectile proj in Main.projectile) + { + if (proj.active && proj.type == ProjectileType() && proj.owner == Owner.whoAmI) + { + //Reset the timeleft on the sigil & give it its new target (or the same, it doesnt matter really. + proj.ai[0] = target.whoAmI; + proj.timeLeft = OmegaBiomeBlade.WhirlwindAttunement_SigilTime; + return; + } + } + Projectile sigil = Projectile.NewProjectileDirect(target.Center, Vector2.Zero, ProjectileType(), 0, 0, Owner.whoAmI, target.whoAmI); + sigil.timeLeft = OmegaBiomeBlade.WhirlwindAttunement_SigilTime; + } + + public override void Kill(int timeLeft) + { + if (smear != null) + smear.Kill(); + if (sightLine != null) + sightLine.Kill(); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/OmegaBiomeBlade"); + Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride"); + + float drawAngle = direction.ToRotation(); + float drawRotation = drawAngle + MathHelper.PiOver4; + + Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOffset = projectile.Center - Main.screenPosition; + + //Afterimages + if (CalamityConfig.Instance.Afterimages && CurrentState == 0f && Empowerment / maxEmpowerment > 0.4f) + { + for (int i = 0; i < projectile.oldRot.Length; ++i) + { + Color color = projectile.GetAlpha(lightColor) * (1f - (i / (float)projectile.oldRot.Length)); + float afterimageRotation = projectile.oldRot[i] + MathHelper.PiOver4; + Main.spriteBatch.Draw(handle, drawOffset, null, color * MathHelper.Lerp(0f, 0.5f, MathHelper.Clamp(Empowerment / maxEmpowerment - 0.4f / 0.1f, 0f, 1f)), afterimageRotation, drawOrigin, projectile.scale - 0.2f * ((i / (float)projectile.oldRot.Length)), 0f, 0f); + } + + spriteBatch.End(); //Haha sup babe what if i restarted the spritebatch way too many times haha /blushes + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + Vector2 afterimageDrawOrigin = new Vector2(0f, blade.Height); + for (int i = 0; i < projectile.oldRot.Length; ++i) + { + Color color = projectile.GetAlpha(lightColor) * (1f - (i / (float)projectile.oldRot.Length)); + float afterimageRotation = projectile.oldRot[i] + MathHelper.PiOver4; + Main.spriteBatch.Draw(blade, drawOffset, null, color * MathHelper.Lerp(0f, 0.5f, MathHelper.Clamp((Empowerment / maxEmpowerment - 0.4f) / 0.1f, 0f, 1f)), afterimageRotation, afterimageDrawOrigin, projectile.scale - 0.2f * ((i / (float)projectile.oldRot.Length)), 0f, 0f); + } + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + } + + + spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + //Update the parameters + drawOrigin = new Vector2(0f, blade.Height); + + //Don't draw the glowing blade after the retraction + float opacityFade = CurrentState == 0f ? 1f : 1f - retractionTimer; + //Add basic tint (my beloved) during the snap + if (snapTimer > 0 && retractionTimer <= 0) + { + GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(MathHelper.Clamp(0.8f - snapTimer, 0f, 1f)); + GameShaders.Misc["CalamityMod:BasicTint"].UseColor(Color.White); + GameShaders.Misc["CalamityMod:BasicTint"].Apply(); + } + + spriteBatch.Draw(blade, drawOffset, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f * opacityFade, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + if (CurrentState == 1f && snapTimer > 0) + { + drawChain(spriteBatch, snapTimer, retractionTimer); + } + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + public void drawChain(SpriteBatch spriteBatch, float snapProgress, float retractProgress) + { + Texture2D chainTex = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade_HeavensMightChain"); + + float opacity = retractProgress < 0.5 ? 1 : (retractProgress - 0.5f) / 0.5f; + + Vector2 Shake = retractProgress > 0 ? Vector2.Zero : Vector2.One.RotatedByRandom(MathHelper.TwoPi) * (1f - snapProgress) * 10f; + + int dist = (int)Vector2.Distance(Owner.Center, projectile.Center) / 16; + Vector2[] Nodes = new Vector2[dist + 1]; + Nodes[0] = Owner.Center; + Nodes[dist] = projectile.Center; + + for (int i = 1; i < dist + 1; i++) + { + Rectangle frame = new Rectangle(0, 0 + 18 * (i % 2), 12, 18); + Vector2 positionAlongLine = Vector2.Lerp(Owner.Center, projectile.Center, i / (float)dist); //Get the position of the segment along the line, as if it were a flat line + Nodes[i] = positionAlongLine + Shake * (float)Math.Sin(i / (float)dist * MathHelper.Pi); + + float rotation = (Nodes[i] - Nodes[i - 1]).ToRotation() - MathHelper.PiOver2; //Calculate rotation based on direction from last point + float yScale = Vector2.Distance(Nodes[i], Nodes[i - 1]) / frame.Height; //Calculate how much to squash/stretch for smooth chain based on distance between points + Vector2 scale = new Vector2(1, yScale); + + Color chainLightColor = Lighting.GetColor((int)Nodes[i].X / 16, (int)Nodes[i].Y / 16); //Lighting of the position of the chain segment + + Vector2 origin = new Vector2(frame.Width / 2, frame.Height); //Draw from center bottom of texture + spriteBatch.Draw(chainTex, Nodes[i] - Main.screenPosition, frame, chainLightColor * opacity * 0.7f, rotation, origin, scale, SpriteEffects.None, 0); + } + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(initialized); + writer.WriteVector2(direction); + } + public override void ReceiveExtraAI(BinaryReader reader) + { + initialized = reader.ReadBoolean(); + direction = reader.ReadVector2(); + } + } + + + //Polaris's gaze aka Super Pogo attunement + + public class PolarissGaze : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_SanguineFury"; + private bool initialized = false; + Vector2 direction = Vector2.Zero; + public ref float Shred => ref projectile.ai[0]; //How much the attack is, attacking + public float ShredRatio => MathHelper.Clamp(Shred / (maxShred * 0.5f), 0f, 1f); + public ref float PogoCooldown => ref projectile.ai[1]; //Cooldown for the pogo + public ref float BounceTime => ref projectile.localAI[0]; + public Player Owner => Main.player[projectile.owner]; + public bool CanPogo => Owner.velocity.Y != 0 && PogoCooldown <= 0; //Only pogo when in the air and if the cooldown is zero + private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; + + public const float pogoStrenght = 16f; //How much the player gets pogoed up + public const float maxShred = 500; //How much shred you get + + public Projectile Wheel; + public bool Dashing; + public Vector2 DashStart; + + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Sanguine Fury"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 70; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = OmegaBiomeBlade.SuperPogoAttunement_LocalIFrames; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + float bladeLenght = 130 * projectile.scale; + float bladeWidth = 86 * projectile.scale; + + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center, Owner.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); + } + + public void Pogo() + { + if (CanPogo && Main.myPlayer == Owner.whoAmI) + { + Owner.velocity = -direction.SafeNormalize(Vector2.Zero) * pogoStrenght; //Bounce + Owner.fallStart = (int)(Owner.position.Y / 16f); + PogoCooldown = 30; //Cooldown + Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.position); + + Vector2 hitPosition = Owner.Center + (direction * 100 * projectile.scale); + BounceTime = 20f; //Used only for animation + + for (int i = 0; i < 8; i++) + { + Vector2 hitPositionDisplace = direction.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(-10f, 10f); + Vector2 flyDirection = -direction.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4)); + Particle smoke = new SmallSmokeParticle(hitPosition + hitPositionDisplace, flyDirection * 9f, Color.Crimson, new Color(130, 130, 130), Main.rand.NextFloat(1.8f, 2.6f), 155 - Main.rand.Next(30)); + GeneralParticleHandler.SpawnParticle(smoke); + + Particle Glow = new StrongBloom(hitPosition - hitPositionDisplace * 3, -direction * 6 * Main.rand.NextFloat(0.5f, 1f), Color.Crimson * 0.5f, 0.01f + Main.rand.NextFloat(0f, 0.2f), 20 + Main.rand.Next(40)); + GeneralParticleHandler.SpawnParticle(Glow); + } + for (int i = 0; i < 3; i++) + { + Vector2 hitPositionDisplace = direction.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(-10f, 10f); + Vector2 flyDirection = -direction.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4)); + + Particle Rock = new StoneDebrisParticle(hitPosition - hitPositionDisplace * 3, flyDirection * Main.rand.NextFloat(3f, 6f), Color.Beige, 1f + Main.rand.NextFloat(0f, 0.4f), 30 + Main.rand.Next(50), 0.1f); + GeneralParticleHandler.SpawnParticle(Rock); + } + } + } + + public override void AI() + { + if (!initialized) //Initialization. Here its litterally just playing a sound tho lmfao + { + Main.PlaySound(SoundID.Item90, projectile.Center); + initialized = true; + + foreach(Projectile proj in Main.projectile) + { + if (proj.active && proj.type == ProjectileType() && proj.owner == Owner.whoAmI) + { + if (CalamityUtils.AngleBetween(Owner.Center - Main.MouseWorld, Owner.Center - proj.Center) > MathHelper.PiOver4) + { + proj.Kill(); + break; + } + + Wheel = proj; + Dashing = true; + DashStart = Owner.Center; + Wheel.timeLeft = 60; + Owner.GiveIFrames(OmegaBiomeBlade.SuperPogoAttunement_SlashIFrames); + break; + } + } + } + + if (!OwnerCanShoot) + { + projectile.Kill(); + return; + } + + if (Shred >= maxShred) + Shred = maxShred; + if (Shred < 0) + Shred = 0; + + Lighting.AddLight(projectile.Center, new Vector3(1f, 0.56f, 0.56f) * ShredRatio); + + //Manage position and rotation + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + projectile.rotation = direction.ToRotation(); + projectile.Center = Owner.Center + (direction * 60); + + //Scaling based on shred + projectile.localNPCHitCooldown = OmegaBiomeBlade.SuperPogoAttunement_LocalIFrames - (int)(MathHelper.Lerp(0, OmegaBiomeBlade.SuperPogoAttunement_LocalIFrames - OmegaBiomeBlade.SuperPogoAttunement_LocalIFramesCharged, ShredRatio)); //Increase the hit frequency + projectile.scale = 1f + (ShredRatio * 1f); //SWAGGER + + + if ((Wheel == null || !Wheel.active) && Dashing) + { + Dashing = false; + Owner.velocity *= 0.1f; //Abrupt stop + + Main.PlaySound(mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/MeatySlash"), projectile.Center); + Projectile proj = Projectile.NewProjectileDirect(Owner.Center - DashStart / 2f, Vector2.Zero, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.SuperPogoAttunement_SlashDamageBoost), 0, Owner.whoAmI); + if (proj.modProjectile is SanguineFuryDash dash) + { + dash.DashStart = DashStart; + dash.DashEnd = Owner.Center; + } + + } + + Owner.Calamity().LungingDown = false; + + if (Dashing) + { + Owner.Calamity().LungingDown = true; + Owner.fallStart = (int)(Owner.position.Y / 16f); + Owner.velocity = Owner.DirectionTo(Wheel.Center) * 60f; + + if (Owner.Distance(Wheel.Center) < 60f) + Wheel.active = false; + } + + + if (Collision.SolidCollision(Owner.Center + (direction * 100 * projectile.scale) - Vector2.One * 5f, 10, 10) && !Dashing) + { + Pogo(); + projectile.netUpdate = true; + projectile.netSpam = 0; + } + + //Make the owner look like theyre holding the sword bla bla + Owner.heldProj = projectile.whoAmI; + Owner.direction = Math.Sign(direction.X); + Owner.itemRotation = direction.ToRotation(); + if (Owner.direction != 1) + { + Owner.itemRotation -= 3.14f; + } + Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); + Owner.itemTime = 2; + Owner.itemAnimation = 2; + + Shred--; + PogoCooldown--; + BounceTime--; + projectile.timeLeft = 2; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => ShredTarget(); + public override void OnHitPvp(Player target, int damage, bool crit) => ShredTarget(); + + private void ShredTarget() + { + if (Main.myPlayer != Owner.whoAmI) + return; + + Owner.fallStart = (int)(Owner.position.Y / 16f); + // get lifted up + if (PogoCooldown <= 0) + { + Main.PlaySound(SoundID.NPCHit30, projectile.Center); //Sizzle + Shred += 62; //Augment the shredspeed + if (Owner.velocity.Y > 0) + Owner.velocity.Y = -2f; //Get "stuck" into the enemy partly + Owner.GiveIFrames(OmegaBiomeBlade.SuperPogoAttunement_ShredIFrames); // i framez. + PogoCooldown = 20; + } + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(SoundID.NPCHit43, projectile.Center); + if (ShredRatio > 0.25 && Owner.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(projectile.Center, direction * 16f, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.SuperPogoAttunement_ShotDamageBoost) , projectile.knockBack, Owner.whoAmI, Shred); + } + Owner.Calamity().LungingDown = false; + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.SuperPogoAttunement_ShredderProc) + sword.OnHitProc = true; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/OmegaBiomeBlade"); + Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_SanguineFury"); + + int bladeAmount = 4; + + float drawAngle = direction.ToRotation(); + float drawRotation = drawAngle + MathHelper.PiOver4; + + Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOffset = Owner.Center + direction * 10f - Main.screenPosition; + + spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(MathHelper.Clamp(BounceTime, 0f, 20f) / 20f); + GameShaders.Misc["CalamityMod:BasicTint"].UseColor(new Color(207, 248, 255)); + GameShaders.Misc["CalamityMod:BasicTint"].Apply(); + + //Update the parameters + drawOrigin = new Vector2(0f, blade.Height); + + spriteBatch.Draw(blade, drawOffset, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + + for (int i = 0; i < bladeAmount; i++) //Draw extra copies + { + blade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_SanguineFuryExtra"); + + drawAngle = direction.ToRotation(); + + float circleCompletion = (float)Math.Sin(Main.GlobalTime * 5 + i * MathHelper.PiOver2); + drawRotation = drawAngle + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi / 9f) * ShredRatio); + + drawOrigin = new Vector2(0f, blade.Height); + + Vector2 drawOffsetStraight = Owner.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10 - Main.screenPosition; //How far from the player + Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly + Vector2 drawOffsetFromBounce = direction * MathHelper.Clamp(BounceTime, 0f, 20f) / 20f * 20f; + + spriteBatch.Draw(blade, drawOffsetStraight + drawDisplacementAngle + drawOffsetFromBounce, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + } + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(initialized); + writer.WriteVector2(direction); + } + public override void ReceiveExtraAI(BinaryReader reader) + { + initialized = reader.ReadBoolean(); + direction = reader.ReadVector2(); + } + } + + public class PolarissGazeStar : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_SanguineFuryExtra"; + private bool initialized = false; + Vector2 direction = Vector2.Zero; + public ref float Shred => ref projectile.ai[0]; + public float ShredRatio => MathHelper.Clamp(Shred / (maxShred * 0.5f), 0f, 1f); + public Player Owner => Main.player[projectile.owner]; + + public float Timer => MaxTime - projectile.timeLeft; + + public const float maxShred = 500; //How much shred you get + public const float MaxTime = 120; + + + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Sanguine Wheel"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 45; + projectile.tileCollide = true; + projectile.ignoreWater = true; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 3; + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + projectile.velocity *= 0.95f; + return false; + } + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + float bladeLenght = 84 * projectile.scale; + float bladeWidth = 76 * projectile.scale; + + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center - direction * bladeLenght / 2, projectile.Center + direction * bladeLenght / 2, bladeWidth, ref collisionPoint); + } + + public override void AI() + { + if (!initialized) + { + Main.PlaySound(SoundID.Item90, projectile.Center); + initialized = true; + + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + projectile.rotation = direction.ToRotation(); + + projectile.timeLeft = (int)MaxTime; + projectile.velocity = direction * 16f; + + projectile.scale = 1f + ShredRatio ; //SWAGGER + projectile.netUpdate = true; + + } + + projectile.velocity *= 0.96f; + projectile.position += projectile.velocity; + + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.SuperPogoAttunement_WheelProc) + sword.OnHitProc = true; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + for (int i = 0; i < 4; i++) //Draw extra copies + { + var tex = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_SanguineFuryExtra"); + + float transition = MathHelper.Clamp((Timer - 15 - (i * 20)) / (MaxTime * 0.2f), 0f, 1f); + transition = MathHelper.Clamp(Timer / MaxTime, 0f, 1f); + + //float circleCompletion = (float)Math.Sin(Main.GlobalTime * 5 + i * MathHelper.PiOver2); + //float drawAngleShot = MathHelper.WrapAngle(direction.ToRotation() + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi / 9f) * ShredRatio)); + float drawAngleWheel = MathHelper.WrapAngle(i * MathHelper.PiOver2 + (Main.GlobalTime * 6)); + //Lerp between the position in the shot and the position in the wheel + //float drawAngle = MathHelper.WrapAngle(Utils.AngleLerp(drawAngleShot, drawAngleWheel, transition)); + + Vector2 drawOrigin = new Vector2(0f, tex.Height); + + + //Vector2 drawOffsetStraight = projectile.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10 - Main.screenPosition; //How far from the player + //Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly + //Vector2 drawPositionShot = drawOffsetStraight + drawDisplacementAngle; + Vector2 drawPositionWheel = projectile.Center - drawAngleWheel.ToRotationVector2() * 20f - Main.screenPosition; + + //Vector2 drawPosition = Vector2.Lerp(drawPositionShot, drawPositionWheel, transition); + + float opacityFade = projectile.timeLeft > 15 ? 1 : projectile.timeLeft / 15f; + + spriteBatch.Draw(tex, drawPositionWheel, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.8f * opacityFade, drawAngleWheel, drawOrigin, projectile.scale * 0.85f, 0f, 0f); + } + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(SoundID.Item60, projectile.Center); + for (int i = 0; i < 10; i++) + { + Particle Sparkle = new CritSpark(projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(17.5f, 25f) * projectile.scale, Color.White, Main.rand.NextBool() ? Color.Crimson : Color.DarkRed, 0.4f + Main.rand.NextFloat(0f, 3.5f), 20 + Main.rand.Next(30), 1, 3f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + } + + } + + public class PolarissGazeDash : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public Player Owner => Main.player[projectile.owner]; + public float Timer => 20 - projectile.timeLeft; + + public Vector2 DashStart; + public Vector2 DashEnd; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Shredding Lunge"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 8; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 60; + projectile.timeLeft = 20; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), DashStart, DashEnd); + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + crit = true; + + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.SuperPogoAttunement_DashProc) + sword.OnHitProc = true; + + Particle bloom = new StrongBloom(target.Center, target.velocity, Color.Crimson * 0.5f, 1f, 30); + GeneralParticleHandler.SpawnParticle(bloom); + + for (int i = 0; i < 3; i++) + { + Vector2 sparkSpeed = target.DirectionTo(Owner.Center).RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4)) * 9f; + Particle Spark = new CritSpark(target.Center, sparkSpeed, Color.White, Color.Crimson, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 0.6f); + GeneralParticleHandler.SpawnParticle(Spark); + } + + Owner.statLife += OmegaBiomeBlade.SuperPogoAttunementSlashLifesteal; + Owner.HealEffect(OmegaBiomeBlade.SuperPogoAttunementSlashLifesteal); + } + + + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) //OMw to reuse way too much code from the entangling vines + { + + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + Texture2D lineTex = GetTexture("CalamityMod/Particles/ThinEndedLine"); + + Vector2 Shake = projectile.timeLeft < 15 ? Vector2.Zero : Vector2.One.RotatedByRandom(MathHelper.TwoPi) * (15 - projectile.timeLeft / 5f) * 0.5f; + float bump = (float)Math.Sin(((20f - projectile.timeLeft) / 20f) * MathHelper.Pi); + float raise = (float)Math.Sin(((20f - projectile.timeLeft) / 20f) * MathHelper.PiOver2); + + float rot = (DashEnd - DashStart).ToRotation() + MathHelper.PiOver2; + Vector2 origin = new Vector2(lineTex.Width / 2f, lineTex.Height); + Vector2 scale = new Vector2(0.2f, (DashEnd - DashStart).Length() / lineTex.Height); + + spriteBatch.Draw(lineTex, DashStart - Main.screenPosition + Shake, null, Color.Lerp(Color.White, Color.Crimson * 0.7f, raise), rot, origin, scale, SpriteEffects.None, 0); + + Texture2D sparkTexture = GetTexture("CalamityMod/Particles/ThinSparkle"); + Texture2D bloomTexture = GetTexture("CalamityMod/Particles/BloomCircle"); + //Ajust the bloom's texture to be the same size as the star's + float properBloomSize = (float)sparkTexture.Width / (float)bloomTexture.Height; + + + Rectangle frame = new Rectangle(0, 0, 14, 14); + + spriteBatch.Draw(bloomTexture, DashEnd - Main.screenPosition, null, Color.Crimson * bump * 0.5f, 0, bloomTexture.Size() / 2f, bump * 6f * properBloomSize, SpriteEffects.None, 0); + spriteBatch.Draw(sparkTexture, DashEnd - Main.screenPosition, frame, Color.Lerp(Color.White, Color.Crimson, raise) * bump, raise * MathHelper.TwoPi, frame.Size() / 2f, bump * 3f, SpriteEffects.None, 0); + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + return false; + } + } + + //Mercurial tides aka Shockwave attunement + + public class AndromedasStride : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_MercurialTides"; + private bool initialized = false; + Vector2 direction = Vector2.Zero; + public Player Owner => Main.player[projectile.owner]; + public ref float Charge => ref projectile.ai[0]; //Charge + public ref float State => ref projectile.ai[1]; //State 0 is "charging", State 1 is "thrusting" + public ref float CurrentIndicator => ref projectile.localAI[0]; //What "indicator" stage are you on. + public ref float OverCharge => ref projectile.localAI[1]; + + private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; + const float MaxCharge = 500; + + public Vector2 lastDisplacement; + public float dashDuration; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Mercurial Tides"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 70; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 16; + } + + public override bool CanDamage() + { + return (State == 1); + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + float bladeLenght = 145 * projectile.scale; + float bladeWidth = 25 * projectile.scale; + + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center, Owner.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); + } + + public CurveSegment QuickOut = new CurveSegment(EasingType.PolyIn, 0f, 0f, 0.2f, 3); + public CurveSegment Bump = new CurveSegment(EasingType.SineBump, 0.06f, 0.2f, 0.1f); + public CurveSegment QuickDraw = new CurveSegment(EasingType.Linear, 0.25f, 0.2f, -0.45f); + public CurveSegment SlowDrawOut = new CurveSegment(EasingType.PolyIn, 0.50f, -0.25f, -0.2f, 3); + public CurveSegment OverShoot = new CurveSegment(EasingType.SineBump, 0.93f, -0.45f, -0.1f); + + internal float ChargeDisplacement() => PiecewiseAnimation(Charge / MaxCharge, new CurveSegment[] { QuickOut, Bump, QuickDraw, SlowDrawOut, OverShoot }); + + public override void AI() + { + if (!initialized) //Initialization. Here its litterally just playing a sound tho lmfao + { + projectile.velocity = Vector2.Zero; + Main.PlaySound(SoundID.Item101, projectile.Center); + initialized = true; + } + + if (!OwnerCanShoot) + { + if (State == 0f) + { + if (Charge / MaxCharge < 0.25f) + { + Main.PlaySound(SoundID.Item109, projectile.Center); + projectile.Kill(); + return; + } + else + { + + var dashSound = Main.PlaySound(SoundID.Item120, projectile.Center); + if (dashSound != null) + dashSound.Volume *= 0.5f; + State = 1f; + projectile.timeLeft = (7 + (int)((Charge / MaxCharge - 0.25f) * 20)) * 2; //Keep that even, if its an odd number itll fuck off and wont reset the players velocity on death + dashDuration = projectile.timeLeft; + lastDisplacement = projectile.Center - Owner.Center; + projectile.netUpdate = true; + projectile.netSpam = 0; + } + } + } + + if (State == 0f) + { + direction = Owner.DirectionTo(Main.MouseWorld); + direction.Normalize(); + projectile.Center = Owner.Center + (direction * 70f * ChargeDisplacement()); + + Charge++; + OverCharge--; + projectile.timeLeft = 2; + if ((Charge / MaxCharge >= 0.25f && CurrentIndicator == 0f) || (Charge / MaxCharge >= 0.5f && CurrentIndicator == 1f) || (Charge / MaxCharge >= 0.75f && CurrentIndicator == 2f)) + { + + Projectile.NewProjectile(Owner.Center, Vector2.Zero, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_BlastDamageReduction), 10f, Owner.whoAmI, 1f + CurrentIndicator * 0.15f); + Main.PlaySound(SoundID.DD2_WitherBeastAuraPulse, projectile.Center); + CurrentIndicator++; + OverCharge = 20f; + } + + if (Charge >= MaxCharge) + { + Charge = MaxCharge; + if (Owner.whoAmI == Main.myPlayer && CurrentIndicator < 4f) + { + Projectile.NewProjectile(Owner.Center, Vector2.Zero, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_BlastDamageReduction), 10f, Owner.whoAmI, 1f + CurrentIndicator * 0.15f); + OverCharge = 20f; + Main.PlaySound(mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/CorvinaScream"), projectile.Center); + CurrentIndicator++; + } + } + } + + if (State == 1f) + { + projectile.Center = Owner.Center + Vector2.Lerp(lastDisplacement, direction * 40f, MathHelper.Clamp(((dashDuration - projectile.timeLeft) / dashDuration) * 2f, 0f, 1f)); + Owner.fallStart = (int)(Owner.position.Y / 16f); + + Owner.Calamity().LungingDown = true; + + if (Collision.SolidCollision(Owner.Center + (direction * 120 * projectile.scale) - Vector2.One * 5f, 10, 10)) + { + SlamDown(); + projectile.timeLeft = 0; + Owner.Calamity().LungingDown = false; + projectile.active = false; + projectile.netUpdate = true; + projectile.netSpam = 0; + } + + Owner.velocity = direction * 30f; + + float variation = Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4); + float strength = (float)Math.Sin(variation * 2f + MathHelper.PiOver2); + Particle Sparkle = new CritSpark(projectile.Center, Owner.velocity - direction.RotatedBy(variation) * (1 + strength) * 2f * Main.rand.NextFloat(7.5f, 20f), Color.White, Main.rand.NextBool() ? Color.MediumTurquoise : Color.DarkOrange, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + + Lighting.AddLight(projectile.Center, new Vector3(1f, 0.56f, 0.56f) * Charge / MaxCharge); + + //Manage position and rotation + projectile.rotation = direction.ToRotation(); + + //Scaling based on charge + projectile.scale = 1f + (Charge / MaxCharge * 0.3f); + + Owner.direction = Math.Sign(direction.X); + Owner.itemRotation = direction.ToRotation(); + + if (Owner.direction != 1) + { + Owner.itemRotation -= 3.14f; + } + + Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); + Owner.itemTime = 2; + Owner.itemAnimation = 2; + } + + public void SlamDown() + { + var slamSound = Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.Center); + if (slamSound != null) + slamSound.Volume *= 1.5f; + + if (Owner.whoAmI != Main.myPlayer || Owner.velocity.Y == 0f) + return; + + if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 15) + Main.LocalPlayer.Calamity().GeneralScreenShakePower = 15; + + Projectile proj = Projectile.NewProjectileDirect(Owner.Center + (direction * 120 * projectile.scale), -direction, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_MonolithDamageBoost), 10f, Owner.whoAmI, Main.rand.Next(4), 1f); + proj.timeLeft = 81; + + + SideSprouts(1, 150f, 1f * Charge / MaxCharge); + SideSprouts(-1, 150f, 1f * Charge / MaxCharge); + + } + + public bool SideSprouts(float facing, float distance, float projSize) + { + float widestAngle = 0f; + float widestSurfaceAngle = 0f; + bool validPositionFound = false; + for (float i = 0f; i < 1; i += 1 / distance) + { + Vector2 positionToCheck = Owner.Center + (direction * 120 * projectile.scale) + direction.RotatedBy((i * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; + + if (Main.tile[(int)(positionToCheck.X / 16), (int)(positionToCheck.Y / 16)].IsTileSolidGround()) + widestAngle = i; + + else if (widestAngle != 0) + { + validPositionFound = true; + widestSurfaceAngle = widestAngle; + } + } + + if (validPositionFound) + { + Vector2 projPosition = Owner.Center + (direction * 120 * projectile.scale) + direction.RotatedBy((widestSurfaceAngle * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; + Vector2 monolithRotation = direction.RotatedBy(Utils.AngleLerp(widestSurfaceAngle * -facing, 0f, projSize)); + Projectile proj = Projectile.NewProjectileDirect(projPosition, -monolithRotation, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_MonolithDamageBoost), 10f, Owner.whoAmI, Main.rand.Next(4), projSize); + if (proj.modProjectile is MercurialTidesMonolith monolith) + { + monolith.WaitTimer = (1 - projSize) * 34f; + monolith.OriginDirection = direction; + monolith.Facing = facing; + } + } + + return validPositionFound; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + Owner.GiveIFrames(OmegaBiomeBlade.ShockwaveAttunement_DashHitIFrames); + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + damage = (int)(damage * (1f + OmegaBiomeBlade.ShockwaveAttunement_FullChargeBoost * Charge / MaxCharge)); + + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.ShockwaveAttunement_SwordProc) + sword.OnHitProc = true; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/OmegaBiomeBlade"); + Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_MercurialTides"); + + float drawAngle = direction.ToRotation(); + float drawRotation = drawAngle + MathHelper.PiOver4; + + Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOffset = projectile.Center - Main.screenPosition; + + spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + //Just in case + if (OverCharge < 0) + OverCharge = 0f; + //When the blink is + GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(OverCharge / 20f); + GameShaders.Misc["CalamityMod:BasicTint"].UseColor(new Color(154, 244, 240)); + GameShaders.Misc["CalamityMod:BasicTint"].Apply(); + + //Update the parameters + drawOrigin = new Vector2(0f, blade.Height); + + spriteBatch.Draw(blade, drawOffset, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + public override void Kill(int timeLeft) + { + //Cut the velocity short if dashing + if (State == 1f) + Owner.velocity *= 0.33f; + + Owner.Calamity().LungingDown = false; + + projectile.active = false; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(initialized); + writer.WriteVector2(direction); + writer.Write(CurrentIndicator); + writer.WriteVector2(lastDisplacement); + writer.Write(dashDuration); + } + public override void ReceiveExtraAI(BinaryReader reader) + { + initialized = reader.ReadBoolean(); + direction = reader.ReadVector2(); + CurrentIndicator = reader.ReadSingle(); + lastDisplacement = reader.ReadVector2(); + dashDuration = reader.ReadSingle(); + } + } + + + //Aries's Wrath aka FlailBlade attunement + + public class AriessWrath : ModProjectile + { + private NPC[] excludedTargets = new NPC[4]; + + public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained"; + public Player Owner => Main.player[projectile.owner]; + public ref float ChainSwapTimer => ref projectile.ai[0]; + public ref float SnapCoyoteTime => ref projectile.ai[1]; + private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; + + const float MaxTangleReach = 400f; //How long can tangling vines from crits be + + //Doing your mom. Be warned that the X value of these vectors represents the angle of the whip while the Y value represents its RNG seed + public Vector2 whip1; + public Vector2 whip2; + public Vector2 whip3; + + public Particle smear; + public Particle smear2; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Lamentations of the Chained"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 80; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = OmegaBiomeBlade.FlailBladeAttunement_LocalIFrames; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + //Cuz it intializes the hooks as pointing flat to the right of the player and we dont want that. + if (ChainSwapTimer < OmegaBiomeBlade.FlailBladeAttunement_FlailTime) + return false; + + GenerateCurve(whip1.Y, whip1.X.ToRotationVector2(), out Vector2 control10, out Vector2 control11, out Vector2 control12, out Vector2 control13, (ChainSwapTimer % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, 1); + GenerateCurve(whip2.Y, whip2.X.ToRotationVector2(), out Vector2 control20, out Vector2 control21, out Vector2 control22, out Vector2 control23, ((ChainSwapTimer - OmegaBiomeBlade.FlailBladeAttunement_FlailTime / 3f) % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, -1); + GenerateCurve(whip3.Y, whip3.X.ToRotationVector2(), out Vector2 control30, out Vector2 control31, out Vector2 control32, out Vector2 control33, ((ChainSwapTimer - OmegaBiomeBlade.FlailBladeAttunement_FlailTime * 2f / 3f) % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, -1); + + if (Collision.CheckAABBvAABBCollision(targetHitbox.TopLeft(), targetHitbox.Size(), control13 - Vector2.One * 25f, Vector2.One * 50f) || + Collision.CheckAABBvAABBCollision(targetHitbox.TopLeft(), targetHitbox.Size(), control23 - Vector2.One * 25f, Vector2.One * 50f) || + Collision.CheckAABBvAABBCollision(targetHitbox.TopLeft(), targetHitbox.Size(), control33 - Vector2.One * 25f, Vector2.One * 50f) + ) + return true; + + //What you wanted me to calculate all 3 curves? Have straight line collisions instead + float CollisionPoint = 0f; + if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.MountedCenter, control13, 20f, ref CollisionPoint) || + Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.MountedCenter, control13, 20f, ref CollisionPoint) || + Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.MountedCenter, control13, 20f, ref CollisionPoint) + ) + return true; + + return false; + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + GenerateCurve(whip1.Y, whip1.X.ToRotationVector2(), out Vector2 control10, out Vector2 control11, out Vector2 control12, out Vector2 control13, (ChainSwapTimer % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, 1); + GenerateCurve(whip2.Y, whip2.X.ToRotationVector2(), out Vector2 control20, out Vector2 control21, out Vector2 control22, out Vector2 control23, ((ChainSwapTimer - OmegaBiomeBlade.FlailBladeAttunement_FlailTime / 3f) % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, -1); + GenerateCurve(whip3.Y, whip3.X.ToRotationVector2(), out Vector2 control30, out Vector2 control31, out Vector2 control32, out Vector2 control33, ((ChainSwapTimer - OmegaBiomeBlade.FlailBladeAttunement_FlailTime * 2f / 3f) % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, -1); + //If you hit the enemy with the blade of the whip, guarantee a crit + if (Collision.CheckAABBvAABBCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), control13 - Vector2.One * 25f, Vector2.One * 50f) || + Collision.CheckAABBvAABBCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), control23 - Vector2.One * 25f, Vector2.One * 50f) || + Collision.CheckAABBvAABBCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), control33 - Vector2.One * 25f, Vector2.One * 50f) + ) + { + + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.FlailBladeAttunement_BladeProc) + sword.OnHitProc = true; + + + crit = true; + for (int i = 0; i < 2; i++) + { + Vector2 sparkSpeed = Owner.DirectionTo(target.Center).RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver2, MathHelper.PiOver2)) * 9f; + Particle Spark = new CritSpark(target.Center, sparkSpeed, Color.White, Color.Turquoise, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 1f); + GeneralParticleHandler.SpawnParticle(Spark); + } + + Vector2 sliceDirection = Main.rand.NextVector2CircularEdge(50f, 100f); + Particle SliceLine = new LineVFX(target.Center - sliceDirection, sliceDirection * 2f, 0.2f, Color.PaleTurquoise * 0.6f) + { + Lifetime = 6 + }; + GeneralParticleHandler.SpawnParticle(SliceLine); + } + + else + { + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.FlailBladeAttunement_ChainProc) + sword.OnHitProc = true; + + damage = (int)(damage * OmegaBiomeBlade.FlailBladeAttunement_ChainDamageReduction); //If the enemy is hit with the chain of the whip, the damage gets reduced + crit = false; //For once, we also block crits completely from the chain + } + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (crit) + { + Main.PlaySound(mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/SwiftSlice"), projectile.Center); + excludedTargets[0] = target; + for (int i = 0; i < 3; i++) + { + NPC potentialTarget = TargetNext(target.Center, i); + if (potentialTarget == null) + break; + Projectile proj = Projectile.NewProjectileDirect(target.Center, Vector2.Zero, ProjectileType(), (int)(damage * OmegaBiomeBlade.FlailBladeAttunement_GhostChainDamageReduction), 0, Owner.whoAmI, target.whoAmI, potentialTarget.whoAmI); + if (proj.modProjectile is GhastlyChain chain) + chain.Gravity = Main.rand.NextFloat(30f, 50f); + } + Array.Clear(excludedTargets, 0, 3); + } + } + + public NPC TargetNext(Vector2 hitFrom, int index) + { + float longestReach = MaxTangleReach; + NPC target = null; + for (int i = 0; i < 200; ++i) + { + NPC npc = Main.npc[i]; + if (!excludedTargets.Contains(npc) && npc.CanBeChasedBy() && !npc.friendly && !npc.townNPC) + { + float distance = Vector2.Distance(hitFrom, npc.Center); + if (distance < longestReach) + { + longestReach = distance; + target = npc; + } + } + } + if (index < 3) + excludedTargets[index + 1] = target; + return target; + } + + public override void AI() + { + if (!OwnerCanShoot) + { + projectile.Kill(); + return; + } + + projectile.velocity = Owner.DirectionTo(Main.MouseWorld); + projectile.velocity.Normalize(); + projectile.rotation = projectile.velocity.ToRotation(); + projectile.Center = Owner.Center + (projectile.velocity * 60); + + //Make the owner look like theyre holding the sword bla bla + Owner.heldProj = projectile.whoAmI; + Owner.direction = Math.Sign(projectile.velocity.X); + Owner.itemRotation = projectile.rotation; + if (Owner.direction != 1) + { + Owner.itemRotation -= 3.14f; + } + Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); + Owner.itemTime = 2; + Owner.itemAnimation = 2; + projectile.timeLeft = 2; + + if (ChainSwapTimer % OmegaBiomeBlade.FlailBladeAttunement_FlailTime == 1) + { + Main.PlaySound(SoundID.DD2_OgreSpit, projectile.Center); + + Vector2 smearPos = Owner.Center + whip1.X.ToRotationVector2() * OmegaBiomeBlade.FlailBladeAttunement_Reach * Main.rand.NextFloat(0.7f, 1.1f); + Vector2 squish = new Vector2( Main.rand.NextFloat(3f, 4f), Main.rand.NextFloat(0.5f, 1f)); + + if (smear == null) + { + smear = new SemiCircularSmearVFX(smearPos, Color.PowderBlue * 0.5f, whip1.X + MathHelper.Pi, projectile.scale * 1.5f, squish); + smear.Lifetime = 2; + GeneralParticleHandler.SpawnParticle(smear); + } + //Update the variables of the smear + else + { + smear.Rotation = whip1.X + MathHelper.Pi; //Add some v ariation? + smear.Position = smearPos; + (smear as SemiCircularSmearVFX).Squish = squish; + } + + smearPos = Owner.Center + whip1.X.ToRotationVector2() * OmegaBiomeBlade.FlailBladeAttunement_Reach * Main.rand.NextFloat(0.8f, 1.3f); + squish = new Vector2(Main.rand.NextFloat(2f, 3f), Main.rand.NextFloat(0.9f, 1.4f)); + + if (smear2 == null) + { + smear2 = new SemiCircularSmearVFX(smearPos, Color.PowderBlue * 0.5f, whip2.X + MathHelper.Pi, projectile.scale * 1.5f, squish); + smear2.Lifetime = 2; + GeneralParticleHandler.SpawnParticle(smear2); + } + //Update the variables of the smear + else + { + smear2.Rotation = whip2.X + MathHelper.Pi; //Add some v ariation? + smear2.Position = smearPos; + (smear2 as SemiCircularSmearVFX).Squish = squish; + } + } + + if (smear != null) + { + smear.Rotation = smear.Rotation.AngleTowards(projectile.velocity.ToRotation(), 0.01f); + smear.Time = 0; + (smear as SemiCircularSmearVFX).Squish.Y *= 0.985f; + (smear as SemiCircularSmearVFX).Squish.X *= 1.01f; + } + if (smear2 != null) + { + smear2.Rotation = smear2.Rotation.AngleTowards(projectile.velocity.ToRotation(), 0.01f); + smear2.Time = 0; + (smear2 as SemiCircularSmearVFX).Squish.Y *= 0.985f; + (smear2 as SemiCircularSmearVFX).Squish.X *= 1.01f; + } + + + //if ((ChainSwapTimer - 12f) % 23 == 0) + //{ + // Main.PlaySound(SoundID.Item41, projectile.Center); + //} + + ChainSwapTimer++; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/OmegaBiomeBlade"); + Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained"); + + CalculateChains(spriteBatch, out Vector2[] chainPositions1, out Vector2[] chainPositions2, out Vector2[] chainPositions3); + + //float drawRotation = (projBottom - chainPositions[chainPositions.Length - 2]).ToRotation() + MathHelper.PiOver4; //Face away from the last point of the bezier curve + + Vector2 drawPos = projectile.Center - projectile.velocity * 55f; + Vector2 drawOrigin = new Vector2(0f, handle.Height); + float drawRotation = projectile.rotation + MathHelper.PiOver4; + + //lightColor = Lighting.GetColor((int)(projectile.Center.X / 16f), (int)(projectile.Center.Y / 16f)); + + spriteBatch.Draw(handle, drawPos - Main.screenPosition, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + + + //Turn on additive blending + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + //Draw the tip of the flails here + Texture2D flailBlade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedFlail"); + Rectangle bladeFrame = new Rectangle(0, 0, 24, 48); + Vector2 flailOrigin = new Vector2(bladeFrame.Width / 2, bladeFrame.Height); //Draw from center bottom of texture + + float flailRotation = (chainPositions1[chainPositions1.Length - 2] - chainPositions1[chainPositions1.Length - 3]).ToRotation() + MathHelper.PiOver2; + spriteBatch.Draw(flailBlade, chainPositions1[chainPositions1.Length - 2] - Main.screenPosition, bladeFrame, Color.White, flailRotation, flailOrigin, 1, SpriteEffects.None, 0); + + flailRotation = (chainPositions2[chainPositions2.Length - 2] - chainPositions2[chainPositions1.Length - 3]).ToRotation() + MathHelper.PiOver2; + spriteBatch.Draw(flailBlade, chainPositions2[chainPositions2.Length - 2] - Main.screenPosition, bladeFrame, Color.White, flailRotation, flailOrigin, 1, SpriteEffects.None, 0); + + flailRotation = (chainPositions3[chainPositions3.Length - 2] - chainPositions3[chainPositions3.Length - 3]).ToRotation() + MathHelper.PiOver2; + spriteBatch.Draw(flailBlade, chainPositions3[chainPositions3.Length - 2] - Main.screenPosition, bladeFrame, Color.White, flailRotation, flailOrigin, 1, SpriteEffects.None, 0); + + drawOrigin = new Vector2(0f, blade.Height); + spriteBatch.Draw(blade, drawPos - Main.screenPosition, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + //Back to normal + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + return false; + } + + //TLDR : https://media.discordapp.net/attachments/659100646397575208/933521303443501136/placeholder.gif + private void GenerateCurve(float seed, Vector2 direction, out Vector2 control0, out Vector2 control1, out Vector2 control2, out Vector2 control3, float angleShift = 0f, float necessaryOrientation = 1f) + { + float randomNumber = 0.5f + ((float)Math.Sin(seed * 17.07947) + (float)Math.Sin(seed * 0.2f * 25.13274)) * 0.25f ; //Ty dom for the awesome pseudo rng + //Get new random numbers based on the same seed + float seed1 = 0.5f + ((float)Math.Sin(randomNumber * 100f * 17.07947) + (float)Math.Sin(randomNumber * 100f * 0.2f * 25.13274)) * 0.25f; + float seed2 = 0.5f + ((float)Math.Sin(seed1 * 50f * 17.07947) + (float)Math.Sin(seed1 * 50f * 0.2f * 25.13274)) * 0.25f; + float seed3 = 0.5f + ((float)Math.Sin(seed2 * 17.07947) + (float)Math.Sin(seed2 * 0.2f * 25.13274)) * 0.25f; + + + if ((necessaryOrientation == -1 && randomNumber >= 0.5) || (necessaryOrientation == 1 && randomNumber < 0.5)) + randomNumber = 1 - randomNumber; + + randomNumber += angleShift * 0.1f * necessaryOrientation; + + + float flip = randomNumber >= 0.5 ? 1f : -1f; + + + control0 = Owner.MountedCenter + direction.RotatedBy(MathHelper.ToRadians(MathHelper.Lerp(MathHelper.PiOver4 * 0.3f * flip, MathHelper.PiOver4 * flip, randomNumber))) * MathHelper.Lerp(50f, 130f, (float)Math.Sin(randomNumber * MathHelper.Pi)); + + float easedShift = angleShift == 1 ? 1 : 1 - (float)Math.Pow(2, -10 * angleShift); + float Reach = OmegaBiomeBlade.FlailBladeAttunement_Reach * (0.75f + 0.75f * seed2 - 0.05f * easedShift); + control3 = Owner.MountedCenter + (direction * Reach).RotatedBy(MathHelper.Lerp(-0.01f * flip, 0.01f * flip, easedShift)); // The last point of the curve gets put straight at the front + + //Over the double fucking bezier rainbow + Vector2 point1 = control3 + direction.RotatedBy(MathHelper.PiOver2) * 50; + Vector2 point2 = control3 + direction.RotatedBy(MathHelper.PiOver2) * 50 + direction * 250; + Vector2 point3 = control3 + direction.RotatedBy(-MathHelper.PiOver2) * 50 + direction * 250; + Vector2 point4 = control3 + direction.RotatedBy(-MathHelper.PiOver2) * 50; + BezierCurve curve = new BezierCurve(new Vector2[] { point1, point2, point3, point4 }); + control3 = curve.Evaluate(randomNumber); + + Vector2 directionFromHead = direction.RotatedBy(MathHelper.ToRadians(MathHelper.Lerp(0, 160f * flip, (float)Math.Sin(randomNumber * MathHelper.Pi)))) * MathHelper.Lerp(130f, 200f, MathHelper.Clamp((float)Math.Sin(randomNumber * MathHelper.Pi) - 0.5f, 0f, 1f) * 2f); + control2 = control3 + directionFromHead; + + Vector2 directionFromSecondToLastPoint = Vector2.Normalize(directionFromHead.RotatedBy(MathHelper.Pi - MathHelper.ToRadians(MathHelper.Lerp(80f * flip, 110f * flip, (float)Math.Sin(randomNumber * MathHelper.Pi))))) * MathHelper.Lerp(120f, 280f, (float)Math.Sin(randomNumber * MathHelper.Pi)); + control1 = control2 + directionFromSecondToLastPoint; + + control3 += Vector2.UnitX.RotatedBy(MathHelper.TwoPi * seed1) * seed3 * 30f; + control2 += Vector2.UnitX.RotatedBy(MathHelper.TwoPi * seed2) * seed1 * 30f; + control1 += Vector2.UnitX.RotatedBy(MathHelper.TwoPi * seed3) * seed2 * 30f; + } + + private void CalculateChains(SpriteBatch spriteBatch, out Vector2[] chainPositions1, out Vector2[] chainPositions2, out Vector2[] chainPositions3) + { + + if (ChainSwapTimer % 6 == 0 || whip1.Y == 0) + { + whip1.X = projectile.velocity.RotatedBy(Main.rand.NextFloat(MathHelper.PiOver4 / 16f, -MathHelper.PiOver4 / 16f)).ToRotation(); //X is the orientation + whip1.Y = Main.rand.NextFloat(0.2f, 100f);//Y is the "seed" + + ChainSwapTimer++; + } + + if ((ChainSwapTimer - 2) % 6 == 0 || whip2.Y == 0) + { + whip2.X = projectile.velocity.RotatedBy(Main.rand.NextFloat(MathHelper.Pi / 16f, -MathHelper.Pi / 16f)).ToRotation(); //X is the orientation + whip2.Y = Main.rand.NextFloat(0.2f, 100f);//Y is the "seed" + + ChainSwapTimer++; + } + + if ((ChainSwapTimer - 4) % 6 == 0 || whip3.Y == 0) + { + whip3.X = projectile.velocity.RotatedBy(Main.rand.NextFloat(MathHelper.Pi / 16f, -MathHelper.Pi / 16f)).ToRotation(); //X is the orientation + whip3.Y = Main.rand.NextFloat(0.2f, 100f);//Y is the "seed" + + ChainSwapTimer++; + } + + GenerateCurve(whip1.Y, whip1.X.ToRotationVector2(), out Vector2 control0, out Vector2 control1, out Vector2 control2, out Vector2 control3, (ChainSwapTimer % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, 1); + DrawChain(spriteBatch, out chainPositions1, control0, control1, control2, control3); + + GenerateCurve(whip2.Y, whip2.X.ToRotationVector2(), out control0, out control1, out control2, out control3, ((ChainSwapTimer - OmegaBiomeBlade.FlailBladeAttunement_FlailTime / 3f) % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, -1); + DrawChain(spriteBatch, out chainPositions2, control0, control1, control2, control3); + + GenerateCurve(whip3.Y, whip3.X.ToRotationVector2(), out control0, out control1, out control2, out control3, ((ChainSwapTimer - OmegaBiomeBlade.FlailBladeAttunement_FlailTime * 2f / 3f) % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, -1); + DrawChain(spriteBatch, out chainPositions3, control0, control1, control2, control3); + } + + private void DrawChain(SpriteBatch spriteBatch, out Vector2[] chainPositions, Vector2 control0, Vector2 control1, Vector2 control2, Vector2 control3) + { + + Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedFlail"); + Rectangle chainFrame = new Rectangle(0, 70, 24, 14); + Rectangle guardFrame = new Rectangle(0, 50, 24, 18); + + //First chain + BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, control0, control1, control2, control3 }); + int numPoints = 40; + chainPositions = curve.GetPoints(numPoints).ToArray(); + + //Draw each chain segment bar the very first one + for (int i = 1; i < numPoints; i++) + { + Vector2 position = chainPositions[i]; + + float rotation = (chainPositions[i] - chainPositions[i - 1]).ToRotation() + MathHelper.PiOver2; //Calculate rotation based on direction from last point + Color chainLightColor = Lighting.GetColor((int)position.X / 16, (int)position.Y / 16); //Lighting of the position of the chain segment + + if (i < numPoints - 1) + { + float yScale = Vector2.Distance(chainPositions[i], chainPositions[i - 1]) / chainFrame.Height; //Calculate how much to squash/stretch for smooth chain based on distance between points + + float segmentProgress = i < 30f ? i / 30f : 1 - (i - 30f) / 10f; + float xScale = 1f + 0.75f * (float)Math.Sin(segmentProgress * MathHelper.PiOver2); + + Vector2 scale = new Vector2(xScale, yScale); //Remember to make it get thicker and thinner based on whatever + Vector2 origin = new Vector2(chainFrame.Width / 2, chainFrame.Height); //Draw from center bottom of texture + + float chainOpacity = MathHelper.Clamp((i / (float)numPoints) * 3f, 0f, 1f); + + spriteBatch.Draw(tex, chainPositions[i] - Main.screenPosition, chainFrame, chainLightColor * chainOpacity, rotation, origin, scale, SpriteEffects.None, 0); + } + else + { + Vector2 origin = new Vector2(guardFrame.Width / 2, guardFrame.Height); //Draw from center bottom of texture + spriteBatch.Draw(tex, chainPositions[i] - Main.screenPosition, guardFrame, chainLightColor, rotation, origin, 1, SpriteEffects.None, 0); + + if ((ChainSwapTimer % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) == 1 && Main.rand.Next(3) == 0f) + { + Particle Flake = new SnowflakeSparkle(chainPositions[i], Vector2.Zero, Color.PaleTurquoise, Color.MediumTurquoise, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 0.2f); + GeneralParticleHandler.SpawnParticle(Flake); + } + } + } + } + + + public override void SendExtraAI(BinaryWriter writer) + { + writer.WriteVector2(whip1); + writer.WriteVector2(whip2); + writer.WriteVector2(whip3); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + whip1 = reader.ReadVector2(); + whip2 = reader.ReadVector2(); + whip3 = reader.ReadVector2(); + } + } + + +} + + From a8f11ddd3e61bf35be8ac5f25835a20a84e76673 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sat, 22 Jan 2022 00:47:33 +0100 Subject: [PATCH 66/76] Swapping back and forth works + Shockwave hitbox fix --- Items/Weapons/Melee/FourSeasonsGalaxia.cs | 62 +++++++++++++++---- .../Melee/TrueBiomeBladeProjectiles.cs | 2 +- 2 files changed, 50 insertions(+), 14 deletions(-) diff --git a/Items/Weapons/Melee/FourSeasonsGalaxia.cs b/Items/Weapons/Melee/FourSeasonsGalaxia.cs index 539adc36dd..2d0c4c954b 100644 --- a/Items/Weapons/Melee/FourSeasonsGalaxia.cs +++ b/Items/Weapons/Melee/FourSeasonsGalaxia.cs @@ -85,7 +85,7 @@ namespace CalamityMod.Items.Weapons.Melee Tooltip.SetDefault("FUNCTION_DESC\n" + "FUNCTION_EXTRA\n" + "FUNCTION_PASSIVE\n" + - "Use RMB to cycle the sword's attunement forward\n" + + "Use RMB to cycle the sword's attunement forward or backwards depending on the position of your cursor\n" + "Active attunement : None\n" + "Passive blessing: None\n"); ; } @@ -180,8 +180,8 @@ namespace CalamityMod.Items.Weapons.Melee AttunementInfo.name = "Aries's Wrath"; AttunementInfo.function_description = "Throw out a spinning . Striking enemies with the tip of the blades guarantees a critical hit."; AttunementInfo.function_extra = "Critical strikes create extra ghostly chains to latch onto extra targets"; - AttunementInfo.color = new Color(113, 239, 177); - AttunementInfo.color2 = new Color(169, 207, 255); + AttunementInfo.color = new Color(196, 89, 201); + AttunementInfo.color2 = new Color(255, 0, 0); break; default: AttunementInfo.name = "None"; @@ -394,7 +394,7 @@ namespace CalamityMod.Items.Weapons.Melee if (Main.projectile.Any(n => n.active && n.type == ProjectileType() && n.owner == player.whoAmI)) return; - Projectile.NewProjectile(player.Top, Vector2.Zero, ProjectileType(), 0, 0, player.whoAmI); + Projectile.NewProjectile(player.Top, Vector2.Zero, ProjectileType(), 0, 0, player.whoAmI, 0, Math.Sign(player.position.X - Main.MouseWorld.X)); } } } @@ -404,6 +404,7 @@ namespace CalamityMod.Items.Weapons.Melee private Player Owner => Main.player[projectile.owner]; public bool OwnerCanUseItem => Owner.HeldItem == associatedItem ? (Owner.HeldItem.modItem as FourSeasonsGalaxia).CanUseItem(Owner) : false; public ref float Initialized => ref projectile.ai[0]; + public ref float CycleDirection => ref projectile.ai[1]; private Item associatedItem; @@ -472,22 +473,58 @@ namespace CalamityMod.Items.Weapons.Melee Particle Line; Color StarColor; - switch (item.mainAttunement) + if (CycleDirection == -1) //Cycles goes Whirlwind => Flailblade => Superpogo => Shockwave { - case Attunement.Whirlwind: //Switching to the flailblade attunement. Drawing Aries - attunement = Attunement.FlailBlade; + switch (item.mainAttunement) + { + case Attunement.Whirlwind: //Switching to the flailblade attunement. + attunement = Attunement.FlailBlade; + break; + case Attunement.FlailBlade: //Switching to the superpogo attunement. + attunement = Attunement.SuperPogo; + break; + case Attunement.SuperPogo: //Switching to the shockwave attunement. + attunement = Attunement.Shockwave; + break; + case Attunement.Shockwave: //Switching to the whirlwind attunement. + default: + attunement = Attunement.Whirlwind; + break; + } + } + else //Cycles goes Whirlwind <= Flailblade <= Superpogo <= Shockwave + { + switch (item.mainAttunement) + { + case Attunement.Whirlwind: //Switching to the shockwave attunement. + attunement = Attunement.Shockwave; + break; + case Attunement.Shockwave: //Switching to the superpogo attunement. + attunement = Attunement.SuperPogo; + break; + case Attunement.SuperPogo: //Switching to the flailblade attunement. + attunement = Attunement.FlailBlade; + break; + case Attunement.FlailBlade: //Switching to the whirlwind attunement. + default: + attunement = Attunement.Whirlwind; + break; + } + } + + switch (attunement) + { + case Attunement.FlailBlade: // Drawing Aries StarPositions = new Vector2[] { new Vector2(-160, -150), new Vector2(45, -170), new Vector2(137, 40), new Vector2(146, 126), new Vector2(129, 151) }; ExtraLines = new Vector2[] { }; StarColor = Color.Orchid; break; - case Attunement.FlailBlade: //Switching to the superpogo attunement. Drawing Ursa Minor - attunement = Attunement.SuperPogo; + case Attunement.SuperPogo: //Drawing Ursa Minor StarPositions = new Vector2[] { new Vector2(69, -188), new Vector2(18, -122), new Vector2(-23, -39), new Vector2(-13, 63), new Vector2(42, 147), new Vector2(-8, 184), new Vector2(-61, 83) }; ExtraLines = new Vector2[] { new Vector2(3, 6) }; StarColor = Color.CornflowerBlue; break; - case Attunement.SuperPogo: //Switching to the shockwave attunement. Drawing Andromeda - attunement = Attunement.Shockwave; + case Attunement.Shockwave: //Drawing Andromeda //https://media.discordapp.net/attachments/802291445360623686/934200685254291546/unknown.png StarPositions = new Vector2[] { new Vector2(-210, -46), new Vector2(-150, -35), new Vector2(-69, 18), new Vector2(33, 61), new Vector2(127, 72), //The horizontal line @@ -501,9 +538,8 @@ namespace CalamityMod.Items.Weapons.Melee IgnoredLines.Add(15); StarColor = Color.MediumSlateBlue; break; - case Attunement.Shockwave: //Switching to the whirlwind attunement. Drawing Phoenix + case Attunement.Whirlwind: //Drawing Phoenix default: - attunement = Attunement.Whirlwind; StarPositions = new Vector2[] { new Vector2(-206, -99), new Vector2(-150, -43), new Vector2(-120, -146), new Vector2(-60, -71), new Vector2(-106, 71), new Vector2(-59, 138), new Vector2(116, -22),//The main line new Vector2(246, -26), new Vector2(192, 36), new Vector2(138, 81), //The side bit new Vector2(88, -107), new Vector2(84, -75) }; //Complete the loop diff --git a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs index 710356aa8f..23b71e3b06 100644 --- a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs @@ -1568,7 +1568,7 @@ namespace CalamityMod.Projectiles.Melee public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { - return Collision.CheckAABBvAABBCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center + (projHitbox.Size() * projectile.scale * 0.5f), projHitbox.Size() * projectile.scale); + return Collision.CheckAABBvAABBCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center - (projHitbox.Size() * projectile.scale * 0.5f), projHitbox.Size() * projectile.scale); } public override void AI() From cb028a0ef442358ab93ef36e2a39eecde70e96b3 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sun, 23 Jan 2022 23:13:48 +0100 Subject: [PATCH 67/76] Galaxia blue & red sprites --- Items/Weapons/Melee/FourSeasonsGalaxia.cs | 42 ++++++++++++++++++--- Items/Weapons/Melee/FourSeasonsGalaxia.png | Bin 1643 -> 0 bytes Items/Weapons/Melee/GalaxiaBlue.png | Bin 0 -> 3941 bytes Items/Weapons/Melee/GalaxiaExtra.png | Bin 0 -> 3019 bytes Items/Weapons/Melee/GalaxiaRed.png | Bin 0 -> 3778 bytes Items/Weapons/Melee/OmegaBiomeBlade.cs | 2 +- Particles/BloomLineCap.png | Bin 0 -> 1122 bytes Projectiles/Melee/GalaxiaBolt.png | Bin 0 -> 597 bytes 8 files changed, 37 insertions(+), 7 deletions(-) delete mode 100644 Items/Weapons/Melee/FourSeasonsGalaxia.png create mode 100644 Items/Weapons/Melee/GalaxiaBlue.png create mode 100644 Items/Weapons/Melee/GalaxiaExtra.png create mode 100644 Items/Weapons/Melee/GalaxiaRed.png create mode 100644 Particles/BloomLineCap.png create mode 100644 Projectiles/Melee/GalaxiaBolt.png diff --git a/Items/Weapons/Melee/FourSeasonsGalaxia.cs b/Items/Weapons/Melee/FourSeasonsGalaxia.cs index 2d0c4c954b..afbe6aee81 100644 --- a/Items/Weapons/Melee/FourSeasonsGalaxia.cs +++ b/Items/Weapons/Melee/FourSeasonsGalaxia.cs @@ -79,6 +79,8 @@ namespace CalamityMod.Items.Weapons.Melee public static float FlailBladeAttunement_GhostChainProc = 0.1f; #endregion + public override string Texture => "CalamityMod/Items/Weapons/Melee/GalaxiaExtra"; //Just in case the player SOMEHOW gets to swing galaxia itself. Sprite also used as the base for other attacks + public override void SetStaticDefaults() { DisplayName.SetDefault("Galaxia"); @@ -270,7 +272,7 @@ namespace CalamityMod.Items.Weapons.Melee public override TagCompound Save() { - int attunement1 = mainAttunement == null ? -1 : (int)mainAttunement; + int attunement1 = mainAttunement == null ? 1 : (int)mainAttunement; TagCompound tag = new TagCompound { { "mainAttunement", attunement1 } @@ -282,7 +284,7 @@ namespace CalamityMod.Items.Weapons.Melee { int attunement1 = tag.GetInt("mainAttunement"); if (attunement1 == -1) - mainAttunement = null; + mainAttunement = Attunement.Whirlwind; else mainAttunement = (Attunement?)attunement1; } @@ -363,7 +365,8 @@ namespace CalamityMod.Items.Weapons.Melee item.noMelee = true; break; default: - item.noUseGraphic = false; + mainAttunement = Attunement.Whirlwind; + item.noUseGraphic = true; item.useStyle = ItemUseStyleID.SwingThrow; item.shoot = ProjectileID.PurificationPowder; item.shootSpeed = 12f; @@ -397,6 +400,33 @@ namespace CalamityMod.Items.Weapons.Melee Projectile.NewProjectile(player.Top, Vector2.Zero, ProjectileType(), 0, 0, player.whoAmI, 0, Math.Sign(player.position.X - Main.MouseWorld.X)); } } + + public override bool CanUseItem(Player player) + { + return !Main.projectile.Any(n => n.active && n.owner == player.whoAmI && + (n.type == ProjectileType() || + n.type == ProjectileType() || + n.type == ProjectileType() || + n.type == ProjectileType() + )); + } + + public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) + { + if (mainAttunement == null) + mainAttunement = Attunement.Whirlwind; + + Texture2D itemTexture = GetTexture((mainAttunement == Attunement.SuperPogo || mainAttunement == Attunement.Shockwave) ? "CalamityMod/Items/Weapons/Melee/GalaxiaRed" : "CalamityMod/Items/Weapons/Melee/GalaxiaBlue"); + spriteBatch.Draw(itemTexture, position, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0f); + return false; + } + + public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) + { + Texture2D itemTexture = GetTexture((mainAttunement == Attunement.SuperPogo || mainAttunement == Attunement.Shockwave) ? "CalamityMod/Items/Weapons/Melee/GalaxiaRed" : "CalamityMod/Items/Weapons/Melee/GalaxiaBlue"); + spriteBatch.Draw(itemTexture, item.Center - Main.screenPosition, null, lightColor, rotation, item.Size * 0.5f, scale, SpriteEffects.None, 0f); + return false; + } } public class GalaxiaVisuals : ModProjectile //Visuals. Now much simpler than before! @@ -459,7 +489,7 @@ namespace CalamityMod.Items.Weapons.Melee } Initialized = 1f; - } + } } public void Reattune(FourSeasonsGalaxia item) @@ -560,14 +590,14 @@ namespace CalamityMod.Items.Weapons.Melee if (i > 0 && !IgnoredLines.Contains(i)) { - Line = new BloomLineVFX(Owner.Center + StarPositions[i - 1], StarPositions[i] - StarPositions[i - 1], 0.2f, StarColor, 20); + Line = new BloomLineVFX(Owner.Center + StarPositions[i - 1], StarPositions[i] - StarPositions[i - 1], 0.5f, StarColor, 20, true); GeneralParticleHandler.SpawnParticle(Line); } } for (int i = 0; i < ExtraLines.Length; i++) { - Line = new BloomLineVFX(Owner.Center + StarPositions[(int)ExtraLines[i].Y], StarPositions[(int)ExtraLines[i].X] - StarPositions[(int)ExtraLines[i].Y], 0.2f, StarColor, 20); + Line = new BloomLineVFX(Owner.Center + StarPositions[(int)ExtraLines[i].Y], StarPositions[(int)ExtraLines[i].X] - StarPositions[(int)ExtraLines[i].Y], 0.5f, StarColor, 20, true); GeneralParticleHandler.SpawnParticle(Line); } } diff --git a/Items/Weapons/Melee/FourSeasonsGalaxia.png b/Items/Weapons/Melee/FourSeasonsGalaxia.png deleted file mode 100644 index 89aa4426ccdc0f6aa6aa2e9b0dd8850afdcfc25b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1643 zcmV-x29)`UP)Tu2~7DWbJ5y6Cb5q;z3%*+mxq zQi}^AixMb`h*)VwX%^bnpIS&EjWNnJq=_Zdq%j>A_nkMncjn~H#7Q!g`)yw4&Uj^1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v?BvEA%@nQ5 zUi+ol0X}?rhczy-E<03SXRp$DV-ylNJF~MhW__tCZE7Fal!o-i&=fo7#8ufE?z&ZW z$QUcJZ?*8oC`9uZcjZu!Sh2aOApp33+w6>*Z!xi9u*=Mp2N?litoNFAy>{O_Em3R{ zV*^-yQv`2}LS&4#FGcz#lC9>`j}*O;%s=WLYY70-H_UZf57}MutTwzc3Xw5VyU03_ zTkA-+613V%`Z?p1V?g2RgJd^}G5L8*^8f!g6~r5(5bWBzr_|zl3fs|9b2!haS~%+rlY*9QOq002ovPDHLkV1lK_E2sbf diff --git a/Items/Weapons/Melee/GalaxiaBlue.png b/Items/Weapons/Melee/GalaxiaBlue.png new file mode 100644 index 0000000000000000000000000000000000000000..83e7599cde9a49125aa60eb5f3e1f0cfe6081e9c GIT binary patch literal 3941 zcmXX}X*|?j1N{$`hl=8r6tWH>gk)brwyYUp#!~h@q_I;e5m_e2uIy$s_I)s~LPL^$ z8B2_vF)?ILsBJtbn%qqQO{$BcSDR(Y& zWXzt)Qf{9QS|von>;@fmk-79-0%|9A1ePb3j`|LBjwW{wmiLs}X2@9=Ei5eB6cxz3 z^p@#OsI?EZhB-67Ut~^2ELHpmpji`n@sH(YK;g5nYH4%Mo^pEpl!7%WKGIZm(4 zW`xsMh=$qN_=N|rXV#Je5=N{3?SDMfgy{oa@nr=H9%Rd073iv`@&VCI;jmxg4)tClH6quS6ElFRJ9$msMj4sU?0d-B zcGF!+COI4tUUR9_U0^Ss89>Z8V%7jH2UB96oJCOTkBJ7(p>t2I znbiwLZNGrM1S8Bz*Bv}pTBN)o7CP%m7Ue{5crFZkf+<5NCy>xNJv_IIK%cU;^{B*0Bp0b;! z8>TiyidKBLncTYrFvlq~srxKivw-pWMbRDu$~spX1gTIUj>8Z5?tp)Y-x_xH9vfpW z&6Ugc+?gWZPL#oa#20}bV=k7^=}aaU+R@o##ff=DRIzh{CmlFuFxP|NL-!eVNU6l4 zq$~&v`s4K1d*Vx+70QLiE%p?wr``ggj#ET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HY^`& zxC0d|PxVO2K(<69LC>cYOZ!5D2{mw{ynRe{hJ(AJpY*H^>cE}BKbZwOEGoDoHjqb= zd=5P1wmR)!yF04ryflMf>cU+3gHxxjVvrA5(XhO0QKWRqQR)g?c`%@qb1d?Fi$Zw~ zrV(%t9X}Y=`$6ygb7k?wjXwR^IpJ$P>&S=*jc4)PZdQe%Qg^BYvD|1(xh>S@2@sl0xh|kHUM}kH=t$Ob&h?TdM zZh%%e;42X~>O9@h=1<%PuGRJ&#vesHQ6F+&?O$4ns|V)~HI6qVfDI8lxT5Gds)1@P zjg&&hp*|~b>OF=(h1~EFs;vf+MstR{$t7qFufVxYp3Mt7(~0-pTnECXdD*|KaBn%s zQ#F$#28q?G0of@_G*H6#d(rcU1}ChM(DLmF=+K)4z3_7MlT~5kc_IF4vPRJTU-W4^ zsjJ$%p9oH&96aGg(|al&XEHCEkgwE^jj|?_QjK0wa>!~rLO zx+pr`%(#9P=krx{UNU-!(XwCcum61nF-dZ<`t)0g`j;IcTW&?3PD@0s_#(g(p{-@( z5d8bz5K^h|jiw}_rR_6Qc^eX4@Uoyyv(w}LNq*VGiWPL#2xK8`C~@*-b{XdRoBt=Jg|TLKMJVDV*mgE literal 0 HcmV?d00001 diff --git a/Items/Weapons/Melee/GalaxiaExtra.png b/Items/Weapons/Melee/GalaxiaExtra.png new file mode 100644 index 0000000000000000000000000000000000000000..3eab3f58728456186aef40206fa8d72093cfd2c9 GIT binary patch literal 3019 zcmX9=c{r5a8-53oR1~I>C5r4cr1Bw?6tcxw#um+@Ph%*u4aT&{^2s`OhQf##j5T|| zGR&k%mW+yORJJB!tfSwkKh8PV^zEoZI5_vK+`#;y z&CJVIi4*j2Fsfe)nx%fIN4SB<9Y5#uLLyeLrzjrrH>RFVzY_>bmDdvNZu)f+PS@iH z%EUtHFCnPo33@$&-vlI5V&#eLTf0~UNdpxyrxEav0qw+c`8nj$!zs#R$JT$`d{PrB zO2h^JmLgJrim)Q?-qrw`!gvRE?w3Rz?=!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iomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index f4ae128c45..6e3e691233 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -499,7 +499,7 @@ namespace CalamityMod.Items.Weapons.Melee //Draw the charged version if you can Texture2D itemTexture = GetTexture("CalamityMod/Items/Weapons/Melee/OmegaBiomeBladeExtra"); - spriteBatch.Draw(itemTexture, item.Center - Main.screenPosition, null, Color.White, rotation, item.Size * 0.5f, scale, SpriteEffects.None, 0f); + spriteBatch.Draw(itemTexture, item.Center - Main.screenPosition, null, lightColor, rotation, item.Size * 0.5f, scale, SpriteEffects.None, 0f); return false; } } diff --git a/Particles/BloomLineCap.png b/Particles/BloomLineCap.png new file mode 100644 index 0000000000000000000000000000000000000000..6767aeec58db5786b75cb3b2ad3da374d763b9da GIT binary patch literal 1122 zcmV-o1fBbdP)Px(97#k$RA_;%S=({kFc4dk=XTtZ#;zolxF^?Rk;)ftAP7tGob1d^^xz9v>_bk8 zh$9xPlrnu*YrUO+97noVM4aB^I&Px1}0Nj^S(s%#c6x4AX&u8x4iY*b4 zd7r(02bvG$NMkUst~bW`wF;&L%w(?wxQ!uYp0i@?)s@g;0$wHJv2>!COP)dMK`~wr z;nv9BJK(%$t@Waye+~f$BD;5X97ohzPh)ZDSrTMmxF2II?WY8+5VEWQSO$Q>spMzs z(Y5ukN}!T7o4aCD0x|$j((txk>v~SwnWuOxD?z=Bv79q>Zi+EX2sq$~GY1UGkR|_W z$f(UE-FuISb1#5>m?XTPCCJ+lP)Tc6#;?{It+mrUt`aNNfDg)ZU6~tWL~HHxPKmz@ zi3`LNo70`oYvI2Dq$VlMwsbe(W85oisOPYTSUMmLn$|?juyAa?AaUR#~pXGs4 zN<1EqOLOE1VB*IZ(R)AT0#*b&h$YYCm1wuugJ0;i$~YoUiBA)rK0~=ef1ssMD+4Dt zE_Fz901K~cQY)pzzVFdmJCUH(fv-;rxJ!Nv-YJ8D6wJ?jCO0Q}4G55T3Ar?mHd ze-gzXNLpTJA8=Cw_>k^PPvy@b-`?ILB2G%+HD-jvG~077`uX{}d>i0eOCWn*r9UMA zrtyzwEN{*DZXOfKmVF)|z%XPMsta~pH#2aryp**aPZwcFH+p!sCE5pte))P;|2PvF14zAVt}OD@Y6(cU|1w{VZfK{^R2#wrzW^|Nj0SwbuCl o{yrVf{T+aRD`WU;(*2kEU;XS8BGH^UI{*Lx07*qoM6N<$g7-xhRsaA1 literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/GalaxiaBolt.png b/Projectiles/Melee/GalaxiaBolt.png new file mode 100644 index 0000000000000000000000000000000000000000..bb3cd2af2c460810f4d7c140186c3d8b8095c7fe GIT binary patch literal 597 zcmV-b0;>IqP)Px%4@pEpR7i=vmd{HYK@`V7vr!4wmY73HL?oViv6X`DLA-d%rTG_1(L*WX!J|cr zl>Ybwgwl&e`zJJB#6v;QLMv#gpuL3_G#8`MYGc%$9%d$W*4;dq(s(Qiw)`Z36;pjapVEN?}07{t=%l_^6PXH2LJK(Y^^63c)Fgv&gz@tw? z04zOLb^CtyOK4!O{0@M{?6k$WBs$zOZuE-LRn^rJ)GP;+?fkA{7SuKh?ila*bpX1& zwx*6oOY|G$wB2YMggeGb)F-#&*R5W0=gl?%g`}!)qp?Bb4Kz$Ow99kHy`qM1#=&MG z0gAPKH488_+In760Hk!T4ur~8d^e%nsWCHb`j^hhU)CPQ>b$ic|83J`_a^E_WU_9U j9@8QKu5lh3?~L&uERdOC({N{_00000NkvXXu0mjf>`oao literal 0 HcmV?d00001 From 63aa210555668a1b039e7a094458e03a2dfefb8d Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Sun, 23 Jan 2022 23:14:07 +0100 Subject: [PATCH 68/76] Bloom line particle improvement --- Particles/BloomLine.png | Bin 144 -> 165 bytes Particles/BloomLineVFX.cs | 17 +++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Particles/BloomLine.png b/Particles/BloomLine.png index 08bf1d28821f74f954ad288af4f04ad7583254c4..9a464ad26e2893b1d33bad9c009b7b6349dd5d6b 100644 GIT binary patch delta 123 zcmV->0EGXL0i^+uF?3%^L_t&-m3_=h4#Xe~1ku7axh5P9t_e0|MKm8Ni>Fd=IsqF% zL`W$iBIKMgGp_5x%n*@>s=n^ye0}z)wNgq!RRM?ydhfK>*n2?-r!OyNYpqDa z%&>YR>AIKmljPQWhr2@(03b6l#y~`%sD%k?mzF(2ZQfkA3&pPz5oCK07*qo IM6N<$f@Lx*Y5)KL diff --git a/Particles/BloomLineVFX.cs b/Particles/BloomLineVFX.cs index f45fb78177..f563d2d257 100644 --- a/Particles/BloomLineVFX.cs +++ b/Particles/BloomLineVFX.cs @@ -14,17 +14,19 @@ namespace CalamityMod.Particles public override bool SetLifetime => true; public override bool Important => Telegraph; + public bool Capped; public float opacity; public Vector2 LineVector; public bool Telegraph; //Denotes if the line is used as an enemy telegraph. In that case, it'll be marked as important - public BloomLineVFX(Vector2 startPoint, Vector2 lineVector, float thickness, Color color, int lifetime, bool telegraph = false) + public BloomLineVFX(Vector2 startPoint, Vector2 lineVector, float thickness, Color color, int lifetime, bool capped = false, bool telegraph = false) { Position = startPoint; LineVector = lineVector; Scale = thickness; Color = color; Lifetime = lifetime; + Capped = capped; Telegraph = telegraph; Velocity = Vector2.Zero; Rotation = 0; @@ -36,8 +38,19 @@ namespace CalamityMod.Particles float rot = LineVector.ToRotation() + MathHelper.PiOver2; Vector2 origin = new Vector2(tex.Width/2f, tex.Height); Vector2 scale = new Vector2(Scale, LineVector.Length() / tex.Height); - spriteBatch.Draw(tex, Position - Main.screenPosition, null, Color, rot, origin, scale, SpriteEffects.None, 0); + + if (Capped) + { + Texture2D cap = ModContent.GetTexture("CalamityMod/Particles/BloomLineCap"); ; + scale = new Vector2(Scale, Scale); + origin = new Vector2(cap.Width / 2f, cap.Height); + + spriteBatch.Draw(cap, Position - Main.screenPosition, null, Color, rot + MathHelper.Pi, origin, scale, SpriteEffects.None, 0); + spriteBatch.Draw(cap, Position + LineVector - Main.screenPosition, null, Color, rot, origin, scale, SpriteEffects.None, 0); + } + + } } } From 2d723ee26ce6f50a76ef116923b41ba64a050a77 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Mon, 24 Jan 2022 03:42:09 +0100 Subject: [PATCH 69/76] Heavy smoke fx & Particle handler optimizations --- Particles/GeneralParticleHandler.cs | 53 +++++++++++++++----- Particles/HeavySmoke.cs | 74 ++++++++++++++++++++++++++++ Particles/HeavySmoke.png | Bin 0 -> 85381 bytes Particles/Particle.cs | 5 ++ 4 files changed, 121 insertions(+), 11 deletions(-) create mode 100644 Particles/HeavySmoke.cs create mode 100644 Particles/HeavySmoke.png diff --git a/Particles/GeneralParticleHandler.cs b/Particles/GeneralParticleHandler.cs index 5353c787b2..53be50be67 100644 --- a/Particles/GeneralParticleHandler.cs +++ b/Particles/GeneralParticleHandler.cs @@ -22,8 +22,10 @@ namespace CalamityMod.Particles private static List particleInstances; //Lists used when drawing particles batched private static List batchedAlphaBlendParticles; + private static List batchedNonPremultipliedParticles; private static List batchedAdditiveBlendParticles; + internal static void Load() { particles = new List(); @@ -33,6 +35,7 @@ namespace CalamityMod.Particles particleInstances = new List(); batchedAlphaBlendParticles = new List(); + batchedNonPremultipliedParticles = new List(); batchedAdditiveBlendParticles = new List(); Type baseParticleType = typeof(Particle); @@ -64,6 +67,7 @@ namespace CalamityMod.Particles particleTextures = null; particleInstances = null; batchedAlphaBlendParticles = null; + batchedNonPremultipliedParticles = null; batchedAdditiveBlendParticles = null; } @@ -109,6 +113,8 @@ namespace CalamityMod.Particles if (particle.UseAdditiveBlend) batchedAdditiveBlendParticles.Add(particle); + else if (particle.UseHalfTransparency) + batchedNonPremultipliedParticles.Add(particle); else batchedAlphaBlendParticles.Add(particle); } @@ -124,24 +130,49 @@ namespace CalamityMod.Particles } } - sb.End(); - sb.Begin(SpriteSortMode.Deferred, BlendState.Additive, SamplerState.PointClamp, DepthStencilState.Default, null, null, Main.GameViewMatrix.ZoomMatrix); - - foreach (Particle particle in batchedAdditiveBlendParticles) + if (batchedNonPremultipliedParticles.Count > 0) { - if (particle.UseCustomDraw) - particle.CustomDraw(sb); - else + sb.End(); + sb.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied, SamplerState.PointClamp, DepthStencilState.Default, null, null, Main.GameViewMatrix.ZoomMatrix); + + foreach (Particle particle in batchedNonPremultipliedParticles) { - Rectangle frame = particleTextures[particle.Type].Frame(1, particle.FrameVariants, 0, particle.Variant); - sb.Draw(particleTextures[particle.Type], particle.Position - Main.screenPosition, frame, particle.Color, particle.Rotation, frame.Size() * 0.5f, particle.Scale, SpriteEffects.None, 0f); + if (particle.UseCustomDraw) + particle.CustomDraw(sb); + else + { + Rectangle frame = particleTextures[particle.Type].Frame(1, particle.FrameVariants, 0, particle.Variant); + sb.Draw(particleTextures[particle.Type], particle.Position - Main.screenPosition, frame, particle.Color, particle.Rotation, frame.Size() * 0.5f, particle.Scale, SpriteEffects.None, 0f); + } } } - sb.End(); - sb.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend); + if (batchedAdditiveBlendParticles.Count > 0) + { + sb.End(); + sb.Begin(SpriteSortMode.Deferred, BlendState.Additive, SamplerState.PointClamp, DepthStencilState.Default, null, null, Main.GameViewMatrix.ZoomMatrix); + + foreach (Particle particle in batchedAdditiveBlendParticles) + { + if (particle.UseCustomDraw) + particle.CustomDraw(sb); + else + { + Rectangle frame = particleTextures[particle.Type].Frame(1, particle.FrameVariants, 0, particle.Variant); + sb.Draw(particleTextures[particle.Type], particle.Position - Main.screenPosition, frame, particle.Color, particle.Rotation, frame.Size() * 0.5f, particle.Scale, SpriteEffects.None, 0f); + } + } + } + + //Return to normal if we swapped the blend state before + if (batchedAdditiveBlendParticles.Count > 0 || batchedNonPremultipliedParticles.Count > 0) + { + sb.End(); + sb.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend); + } batchedAlphaBlendParticles.Clear(); + batchedNonPremultipliedParticles.Clear(); batchedAdditiveBlendParticles.Clear(); } diff --git a/Particles/HeavySmoke.cs b/Particles/HeavySmoke.cs new file mode 100644 index 0000000000..acdf9856d9 --- /dev/null +++ b/Particles/HeavySmoke.cs @@ -0,0 +1,74 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Particles +{ + public class HeavySmokeParticle : Particle + { + public override bool SetLifetime => true; + public override int FrameVariants => 7; + public override bool UseCustomDraw => true; + public override bool Important => StrongVisual; + public override bool UseAdditiveBlend => Glowing; + public override bool UseHalfTransparency => !Glowing; + + public override string Texture => "CalamityMod/Particles/HeavySmoke"; + + private float Opacity; + private float Spin; + private bool StrongVisual; + private bool Glowing; + private float HueShift; + static int FrameAmount = 6; + + public HeavySmokeParticle(Vector2 position, Vector2 velocity, Color color, int lifetime, float scale, float opacity, float rotationSpeed = 0f, bool glowing = false, float hueshift = 0f, bool required = false) + { + Position = position; + Velocity = velocity; + Color = color; + Scale = scale; + Variant = Main.rand.Next(7); + Lifetime = lifetime; + Opacity = opacity; + Spin = rotationSpeed; + StrongVisual = required; + Glowing = glowing; + HueShift = hueshift; + + } + + public override void Update() + { + if (Time / (float)Lifetime < 0.2f) + Scale += 0.01f; + else + Scale *= 0.975f; + + Color = Main.hslToRgb(Main.rgbToHsl(Color).X + HueShift, Main.rgbToHsl(Color).Y, Main.rgbToHsl(Color).Z); + Opacity *= 0.98f; + Rotation += Spin * ((Velocity.X > 0) ? 1f : -1f); + Velocity *= 0.85f; + + float opacity = Utils.InverseLerp(1f, 0.85f, LifetimeCompletion, true); + Color *= opacity; + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + Texture2D tex = GeneralParticleHandler.GetTexture(Type); + int animationFrame = (int)Math.Floor(Time / ((float)(Lifetime / (float)FrameAmount))); + Rectangle frame = new Rectangle(80 * Variant, 80 * animationFrame, 80, 80); + + + spriteBatch.Draw(tex, Position - Main.screenPosition, frame, Color * Opacity, Rotation, frame.Size() / 2f, Scale, SpriteEffects.None, 0); + } + + } +} diff --git a/Particles/HeavySmoke.png b/Particles/HeavySmoke.png new file mode 100644 index 0000000000000000000000000000000000000000..5aa11bd85f07ed9b9d1385ea7bc686ecf9793c97 GIT binary patch literal 85381 zcmV)sK$yRYP)_=ArfLA%zyn|x9~tHk3a`DC+VJ~b4kx7?MwPl{XOl^UY2w!>1@iM)!Aa$vZU4Ocg97xh;-IjXEU|c z!B6Szl5JVinxtFRu_NgRNiQTFXgZ)`srt;Dk~S2Z)3K!Ynhj{`Y<`VhsnWz-6~OwiF=gnWU$Z-YLLL z2V$*WtZfC$vsWG43efVkq;C}AtD`YKud~IsGsU=peL1g=F0|NLXPwQ&I`A^z zwyI!2wyU38lI|-)Id>GG;`#~LmY0H+<-`B}WSW=9uH|9Z3%qAtc1S2a2!`o5{J#Vz8!QbJkS=3&(~%zFs|cLjh!5 zbF-`fN$(}Sp748iws__&3qTg@0L)~DL*eVlsV-hqmeNnRb2}En2wQI`t^<0zBZa=I z6Nq1~0W2A7+>e>xlMcMJXDbSTv7wk`M=A^Xs1pw0LfB?U1-$V1wnF;?czLQ2@xE3t zFo%jskH_MAmJK@qGOH@#BaT%S5VNh&zwny3Dx%?|5x!ezi*M&D8!EaN7B#6Czz|yM ztiK_Whv{5XTt|0A^5*T=orA}ua-R@Y&pUeo)6Dv|ra0$Am35}+I`~g#oI7jJTwVa< zD#f)vQMo5GvkttpXE!8$q?mk1iph3Z{eGxoh^H>yVXzFmra$y1DLoY>5XEMduN}S7drRSe36st2s(Re9>UtGKJQS{ zw~`*IXl**XKIY*JHqSNH8GsWN5WHyNi&+_r%WX-YO8S{%&YvrQ3*nPh#io3uvRUKo ztg7yez=oYG?g9V9p_#dtJiu5xA1X2`?<&6cnPLrN?PUFQO`nU!j}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les work with semi transparent pixels. Is overriden if UseAdditiveBlend is set to true. + /// + public virtual bool UseHalfTransparency => false; + /// /// Removes the particle from the handler /// From b738fe9a696fa34c2eaf58e684d1a079bf433e99 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Mon, 24 Jan 2022 03:42:27 +0100 Subject: [PATCH 70/76] Galaxia 1/4 done --- Items/Weapons/Melee/FourSeasonsGalaxia.cs | 1 + Items/Weapons/Melee/GalaxiaExtra2.png | Bin 0 -> 3264 bytes Particles/CircularSmearSmokey.png | Bin 0 -> 15730 bytes Particles/CircularSmearSmokeyVFX .cs | 27 +++ Projectiles/Melee/GalaxiaProjectiles.cs | 240 +++++++++------------- 5 files changed, 120 insertions(+), 148 deletions(-) create mode 100644 Items/Weapons/Melee/GalaxiaExtra2.png create mode 100644 Particles/CircularSmearSmokey.png create mode 100644 Particles/CircularSmearSmokeyVFX .cs diff --git a/Items/Weapons/Melee/FourSeasonsGalaxia.cs b/Items/Weapons/Melee/FourSeasonsGalaxia.cs index afbe6aee81..7fef0472f2 100644 --- a/Items/Weapons/Melee/FourSeasonsGalaxia.cs +++ b/Items/Weapons/Melee/FourSeasonsGalaxia.cs @@ -374,6 +374,7 @@ namespace CalamityMod.Items.Weapons.Melee break; } + if (player.whoAmI != Main.myPlayer) return; diff --git a/Items/Weapons/Melee/GalaxiaExtra2.png b/Items/Weapons/Melee/GalaxiaExtra2.png new file mode 100644 index 0000000000000000000000000000000000000000..f625f1a98ed5de6d6a1478d5fb3bd81abeb7c522 GIT binary patch literal 3264 zcmX9>c{~(c7rrx-Elb&Y2MJjxULq8U@*4Y+L6S96n30gNPP7}zI@UqOQ1-Hg7%JJ9 zjI5JM7+dyzLcY=W$G!KD^Sk#v=Q-y*=Xdd!%?-E@3m*mma2pxwp_u2*gT>Cu+%VU9{pYlNK5+{{(WLxbo@tFQPBs4cLekr8+VcL0RUGLPYcB zR^RVu4EHE=InfiN_kR}1d-*`b<2oQ?UDN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WLis`OWD+~$9;ooS} zxyIDDQ%gg~@<&VMQ-bItY(6lT;VpN}oyCZ6%RaRZH)VC+y3#q6jp;!L(^xcW*JgLM zaj=2q;+G~P6}Jv~^hls25`FZbk$HI6n)$<%#M&q8W4kt}hkN?f-H+xn4S$ZDt73cN UBF*N+{E`48q`6*+uFHe}0dRFco&W#< literal 0 HcmV?d00001 diff --git a/Particles/CircularSmearSmokey.png b/Particles/CircularSmearSmokey.png new file mode 100644 index 0000000000000000000000000000000000000000..bbd15baf2165fd81258e4767924816d38856a97f GIT binary patch literal 15730 zcmX9_2RxPE|G)N@y;s7`-s_qnGuOzTW%fn(cCCbvy*D9yXA?qJ*^<5E+A}-<fjrWv$CNZ1cFEM z@P#t57;p=INbCOG!2P9@jl0)tS8Is8wS$|F8`Dd753B#2m~@<+9J-5F5fBIyL`C75 zj`!TYzfY3MxyK*L1i(6Yh&rdSbKYk zGUJX__Of~tf4HO^_qzOHNt8(t8xiQm5fP!nPazU`trb_{kL+kIxA$+*|H-&`k!q~p zd9kDGRjwOtx^<>i-nyeZ?PtEY*>({ygO(SQy99w`XJ>D3Z+ES%Fx>{oTwh-k5r(fG zdymb`U_p+q5H(zQgH|M@q@*R&cHmNGAt}+}0N029^`{h3;MzH4i0%LDv3s7IrM7aV zf^Nb@B?kJ~JI*L0cPb_bVbW9PIEOJ_5AtS}N5(W{zasvT2TY-As}U zk0y{pxS^dCj5DCTQ+_4cBJ|5`R(hH4IeP^u&6a`3yw zgm8U*JuNLQ$l4G*@}b{RhZD-o2`V0=eds3l3m1C+QmuHs3YXUG|?JTVnTWPdLAzV2E7)3a-I00pgIetJ0)}L|$Irpv{w8#Nl^P zgZ+$!v$Lk@k%2ALu7Tz@7}EYZ!nFvsa}+D~b)H`3xAo&LORA#`wz^p^*A_aC>7BiZ z47bcsIh1KtjA>L?j7o|`~Vhg zNrqTop1V$?%ChD-hW=QUV+-q%Z$>GhPn2R-2I8MQCBs#J_G@ItxG|`0`%~1Bxnn22 zy#22(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EFQ#Rq|v6jmXm-9CD{_`u$pI8wlRm{cF)FB7!qk0TZU zlK7w@)6>%fxdkLARawHh=saj=cF)7;Uz_}mvTgUYK)~$(gWmoyWnWHsOL^Iu8}#=p zX4V&$&;MDR?@WVV1Gx^6z2k_;)7>)Rinp=$fF!2$6SA}x(Fb&zHy9i%PFx6f1*}1e z3m68Xsl!k@mjk~;gbiV(A;YD3OGV5ff!Vm58j%<`>? "CalamityMod/Particles/CircularSmearSmokey"; + public override bool UseAdditiveBlend => true; + + public override bool SetLifetime => true; + public float opacity; + + public CircularSmearSmokeyVFX(Vector2 position, Color color, float rotation, float scale) + { + Position = position; + Velocity = Vector2.Zero; + Color = color; + Scale = scale; + Rotation = rotation; + Lifetime = 2; + } + } +} diff --git a/Projectiles/Melee/GalaxiaProjectiles.cs b/Projectiles/Melee/GalaxiaProjectiles.cs index 68b7632f9c..327d9d04c9 100644 --- a/Projectiles/Melee/GalaxiaProjectiles.cs +++ b/Projectiles/Melee/GalaxiaProjectiles.cs @@ -22,107 +22,86 @@ namespace CalamityMod.Projectiles.Melee // General cosmic bolt projectile that gets used for a lot of the other ones - public class GalaxiaCosmicBolt : ModProjectile + public class GalaxiaBolt : ModProjectile { public NPC target; public Player Owner => Main.player[projectile.owner]; - public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideBeam"; + + public ref float Hue => ref projectile.ai[0]; + public ref float HomingStrenght => ref projectile.ai[1]; + + Particle Head; public override void SetStaticDefaults() { - DisplayName.SetDefault("Ghostly projection"); + DisplayName.SetDefault("Galaxia Bolt"); ProjectileID.Sets.TrailCacheLength[projectile.type] = 2; ProjectileID.Sets.TrailingMode[projectile.type] = 0; } public override void SetDefaults() { - projectile.width = projectile.height = 32; - projectile.aiStyle = 27; - aiType = ProjectileID.LightBeam; + projectile.width = projectile.height = 30; projectile.friendly = true; projectile.penetrate = 1; projectile.timeLeft = 80; - projectile.extraUpdates = 1; projectile.melee = true; projectile.tileCollide = false; } public override void AI() { + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; + + if (Head == null) + { + Head = new GenericSparkle(projectile.Center, Vector2.Zero, Color.White, Main.hslToRgb(Hue, 100, 50), 1.2f, 2, 0.06f, 3); + GeneralParticleHandler.SpawnParticle(Head); + } + else + { + Head.Position = projectile.Center + projectile.velocity * 0.5f; + Head.Time = 0; + Head.Scale += (float)Math.Sin(Main.GlobalTime * 6) * 0.02f; + } + if (target == null) + target = projectile.Center.ClosestNPCAt(812f, true); + + else if (CalamityUtils.AngleBetween(projectile.velocity, target.Center - projectile.Center) < MathHelper.PiOver2) //Home in { - foreach (Projectile proj in Main.projectile) - { - if (proj.active && proj.type == ProjectileType() && proj.owner == Owner.whoAmI) - { - target = Main.npc[(int)proj.ai[0]]; - break; - } - } + float idealDirection = projectile.AngleTo(target.Center); + float updatedDirection = projectile.velocity.ToRotation().AngleTowards(idealDirection, HomingStrenght); + projectile.velocity = updatedDirection.ToRotationVector2() * projectile.velocity.Length() * 0.995f; } - else if ((projectile.Center - target.Center).Length() >= (projectile.Center + projectile.velocity - target.Center).Length() && CalamityUtils.AngleBetween(projectile.velocity, target.Center - projectile.Center) < MathHelper.PiOver4) //Home in - { - projectile.timeLeft = 70; //Remain alive - float angularTurnSpeed = MathHelper.ToRadians(MathHelper.Lerp(15, 2.5f, MathHelper.Clamp(projectile.Distance(target.Center) / 10f, 0f, 1f))); - float idealDirection = projectile.AngleTo(target.Center); - float updatedDirection = projectile.velocity.ToRotation().AngleTowards(idealDirection, angularTurnSpeed); - projectile.velocity = updatedDirection.ToRotationVector2() * projectile.velocity.Length(); - } Lighting.AddLight(projectile.Center, 0.75f, 1f, 0.24f); - int dustParticle = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.CursedTorch, 0f, 0f, 100, default, 0.9f); - Main.dust[dustParticle].noGravity = true; - Main.dust[dustParticle].velocity *= 0.5f; - Main.dust[dustParticle].velocity += projectile.velocity * 0.1f; + + if (Main.rand.Next(2) == 0) + { + Particle smoke = new HeavySmokeParticle(projectile.Center, projectile.velocity * 0.5f, Color.Lerp(Color.MidnightBlue, Color.Indigo, (float)Math.Sin(Main.GlobalTime * 6f)), 30, Main.rand.NextFloat(0.6f, 1.2f), 0.8f, 0, false, 0, true); + GeneralParticleHandler.SpawnParticle(smoke); + + if (Main.rand.Next(3) == 0) + { + Particle smokeGlow = new HeavySmokeParticle(projectile.Center, projectile.velocity * 0.5f, Main.hslToRgb(Hue, 100, 50), 20, Main.rand.NextFloat(0.4f, 0.7f), 0.8f, 0, true, 0.005f, true); + GeneralParticleHandler.SpawnParticle(smokeGlow); + } + } } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - if (projectile.timeLeft > 75) - return false; - DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1); - - spriteBatch.End(); //Haha sup babe what if i restarted the spritebatch way too many times haha /blushes - spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - Texture2D tex = Main.projectileTexture[projectile.type]; - - spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, Color.Lerp(Color.HotPink, Color.GreenYellow, (float)Math.Sin(Main.GlobalTime * 2f)), projectile.rotation, tex.Size() * 0.5f, 1f, 0f, 0f); - - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - return false; } public override void Kill(int timeLeft) { - Main.PlaySound(SoundID.Item43, projectile.Center); - for (int i = 0; i <= 15; i++) - { - Vector2 displace = (projectile.rotation - MathHelper.PiOver4).ToRotationVector2() * (-0.5f + (i / 15f)) * 88f; - int dustParticle = Dust.NewDust(projectile.Center + displace, projectile.width, projectile.height, DustID.CursedTorch, 0f, 0f, 100, default, 2f); - Main.dust[dustParticle].noGravity = true; - Main.dust[dustParticle].velocity = projectile.oldVelocity; - } + //Shit out a lot of particles or smth } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - int debuffTime = 90; - target.AddBuff(BuffType(), debuffTime); - } - public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.WhirlwindAttunement_SwordBeamProc) - sword.OnHitProc = true; - } - - public override Color? GetAlpha(Color lightColor) => Color.Lerp(Color.HotPink, Color.GreenYellow, (float)Math.Sin(Main.GlobalTime * 2f)); } @@ -130,7 +109,7 @@ namespace CalamityMod.Projectiles.Melee public class PhoenixsPride : ModProjectile { - public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride"; + public override string Texture => "CalamityMod/Items/Weapons/Melee/GalaxiaExtra2"; private bool initialized = false; Vector2 direction = Vector2.Zero; public ref float CurrentState => ref projectile.ai[0]; @@ -155,12 +134,10 @@ namespace CalamityMod.Projectiles.Melee public float AngleReset = 0f; public bool CanDirectFire = true; public Particle smear; - public Particle sightLine; - public NPC lastTarget; public override void SetStaticDefaults() { - DisplayName.SetDefault("Swordsmith's Pride"); + DisplayName.SetDefault("Pohenix's Pride"); ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; ProjectileID.Sets.TrailingMode[projectile.type] = 2; } @@ -173,13 +150,13 @@ namespace CalamityMod.Projectiles.Melee projectile.penetrate = -1; projectile.extraUpdates = 1; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = OmegaBiomeBlade.WhirlwindAttunement_LocalIFrames; + projectile.localNPCHitCooldown = FourSeasonsGalaxia.WhirlwindAttunement_LocalIFrames; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { float collisionPoint = 0f; - float bladeLenght = 140 * projectile.scale; + float bladeLenght = 145 * projectile.scale; float bladeWidth = 25 * projectile.scale; return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center, projectile.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); } @@ -215,6 +192,9 @@ namespace CalamityMod.Projectiles.Melee else if (CurrentState == 0f) { CurrentState = 1f; + if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 3) + Main.LocalPlayer.Calamity().GeneralScreenShakePower = 3; + Main.PlaySound(SoundID.Item80, projectile.Center); direction = Owner.DirectionTo(Main.MouseWorld); //PARTICLES LOTS OF PARTICLES LOTS OF SPARKLES YES YES MH YES YES @@ -222,15 +202,15 @@ namespace CalamityMod.Projectiles.Melee { float variation = Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4); float strength = (float)Math.Sin(variation * 2f + MathHelper.PiOver2); - Particle Sparkle = new CritSpark(projectile.Center, Owner.velocity + direction.RotatedBy(variation) * (1 + strength) * 2f * Main.rand.NextFloat(7.5f, 20f), Color.White, Color.HotPink, 2f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 2f); + Particle Sparkle = new CritSpark(projectile.Center, Owner.velocity + direction.RotatedBy(variation) * (1 + strength) * 2f * Main.rand.NextFloat(7.5f, 20f), Color.Coral, Color.Chocolate, 2f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 2f); GeneralParticleHandler.SpawnParticle(Sparkle); } - for (int i = 0; i <= 8; i++) + + //Actually do projectiles + for (int i = 0; i <= 5; i++) { - float variation = Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4); - float strength = (float)Math.Sin(variation * 2f + MathHelper.PiOver2); - Particle Sparkle = new CritSpark(projectile.Center, Owner.velocity + direction.RotatedBy(variation) * (1 + strength) * Main.rand.NextFloat(7.5f, 20f), Color.White, Color.GreenYellow, 2f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 2f); - GeneralParticleHandler.SpawnParticle(Sparkle); + float angle = direction.ToRotation() + MathHelper.Lerp(-MathHelper.PiOver4, MathHelper.PiOver4, i / 5f); + Projectile.NewProjectile(Owner.Center, angle.ToRotationVector2() * 30f, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.WhirlwindAttunement_BeamDamageReduction), 0f, Owner.whoAmI, 0.1f, MathHelper.Pi * 0.02f); } } } @@ -257,27 +237,52 @@ namespace CalamityMod.Projectiles.Melee } } + if (Empowerment / maxEmpowerment >= 0.5) //Double the charge speed when under half speed + { + Empowerment++; + } + + if (Empowerment / maxEmpowerment >= 0.5) { + if (Main.rand.Next(2) == 0) + + { + + float Opacity = MathHelper.Clamp((Empowerment / maxEmpowerment - 0.5f) * 3f, 0, 1) * 0.75f; + float scaleFactor = MathHelper.Clamp((Empowerment / maxEmpowerment - 0.5f) * 3f, 0, 1); + + for (float i = 0f; i <= 1; i += 0.5f) + { + Vector2 smokepos = projectile.Center + (direction * (60 + 40 * i) * projectile.scale) + direction.RotatedBy(-MathHelper.PiOver2) * 30f * scaleFactor * Main.rand.NextFloat(); + + + Particle smoke = new HeavySmokeParticle(smokepos, direction.RotatedBy(-MathHelper.PiOver2) * 20f * scaleFactor + Owner.velocity, Color.Lerp(Color.MidnightBlue, Color.Indigo, i), 10 + Main.rand.Next(5), scaleFactor * Main.rand.NextFloat(2.8f, 3.1f), Opacity + Main.rand.NextFloat(0f, 0.2f), 0f, false, 0, true); + GeneralParticleHandler.SpawnParticle(smoke); + + if (Main.rand.Next(3) == 0) + { + Particle smokeGlow = new HeavySmokeParticle(smokepos, direction.RotatedBy(-MathHelper.PiOver2) * 20f * scaleFactor + Owner.velocity, Color.OrangeRed, 7, scaleFactor * Main.rand.NextFloat(2f, 2.4f), Opacity * 2, 0f, true, 0.001f, true); + GeneralParticleHandler.SpawnParticle(smokeGlow); + } + } + } + if ((Empowerment + OverEmpowerment) % 30 == 29) { Vector2 shotDirection = Main.rand.NextVector2CircularEdge(15f, 15f); - if (lastTarget != null && lastTarget.active) //If you've got an actual target, angle your shots towards them - { - shotDirection = (shotDirection.ToRotation().AngleTowards(Owner.AngleTo(lastTarget.Center), MathHelper.PiOver2)).ToRotationVector2() * 15f; - } - Projectile.NewProjectile(Owner.Center, shotDirection, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.WhirlwindAttunement_BeamDamageReduction), 0f, Owner.whoAmI); + Projectile.NewProjectile(Owner.Center, shotDirection, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.WhirlwindAttunement_BeamDamageReduction), 0f, Owner.whoAmI, 0.1f, MathHelper.Pi * 0.02f); } } if (Empowerment / maxEmpowerment >= 0.75) { - Color currentColor = Color.Lerp(Color.HotPink, Color.GreenYellow, (float)Math.Sin(Main.GlobalTime * 2f)) * (((Empowerment / maxEmpowerment) - 0.75f) / 0.25f * 0.8f); + Color currentColor = Color.Chocolate * (((Empowerment / maxEmpowerment) - 0.75f) / 0.25f * 0.8f); if (smear == null) { - smear = new CircularSmearVFX(Owner.Center, Color.HotPink, direction.ToRotation(), projectile.scale * 1.5f); + smear = new CircularSmearSmokeyVFX(Owner.Center, currentColor, direction.ToRotation(), projectile.scale * 1.5f); GeneralParticleHandler.SpawnParticle(smear); } //Update the variables of the smear @@ -290,30 +295,13 @@ namespace CalamityMod.Projectiles.Melee smear.Color = currentColor; } - if (sightLine == null) - { - sightLine = new LineVFX(Owner.Center, Owner.DirectionTo(Main.MouseWorld), 0.2f, Color.HotPink, false); - GeneralParticleHandler.SpawnParticle(sightLine); - } - else - { - sightLine.Position = Owner.Center + Owner.DirectionTo(Main.MouseWorld) * projectile.scale * 1.88f * 40; - (sightLine as LineVFX).LineVector = Owner.DirectionTo(Main.MouseWorld) * projectile.scale * 1.88f * 38f; - sightLine.Scale = 0.2f; - sightLine.Time = 0; - sightLine.Color = currentColor * 0.7f; - } - float rotationAdjusted = MathHelper.WrapAngle(projectile.rotation) + MathHelper.Pi; float mouseAngleAdjusted = MathHelper.WrapAngle(Owner.DirectionTo(Main.MouseWorld).ToRotation()) + MathHelper.Pi; float deltaAngleShoot = Math.Abs(MathHelper.WrapAngle(rotationAdjusted - mouseAngleAdjusted)); if (CanDirectFire && deltaAngleShoot < 0.1f) { - Particle Blink = new GenericSparkle(Owner.Center + Owner.DirectionTo(Main.MouseWorld) * projectile.scale * 1.88f * 78f, Owner.velocity, Color.White, currentColor, 1.5f, 10, 0.1f, 3f); - GeneralParticleHandler.SpawnParticle(Blink); - - Projectile.NewProjectile(Owner.Center, Owner.DirectionTo(Main.MouseWorld) * 15f, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.WhirlwindAttunement_BeamDamageReduction), 0f, Owner.whoAmI); + Projectile.NewProjectile(Owner.Center, Owner.DirectionTo(Main.MouseWorld) * 15f, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.WhirlwindAttunement_BeamDamageReduction), 0f, Owner.whoAmI, 0.1f, MathHelper.Pi * 0.02f); CanDirectFire = false; AngleReset = Owner.DirectionTo(Main.MouseWorld).ToRotation(); } @@ -324,7 +312,7 @@ namespace CalamityMod.Projectiles.Melee float maxDistance = projectile.scale * 1.9f * 78f; Vector2 distance = Main.rand.NextVector2Circular(maxDistance, maxDistance); Vector2 angularVelocity = Vector2.Normalize(distance.RotatedBy(MathHelper.PiOver2)) * 2f * (1f + distance.Length() / 15f); - Particle glitter = new CritSpark(Owner.Center + distance, Owner.velocity + angularVelocity, Color.White, currentColor, 1f + 1 * (distance.Length() / maxDistance), 10, 0.05f, 3f); + Particle glitter = new CritSpark(Owner.Center + distance, Owner.velocity + angularVelocity, Main.rand.Next(3) == 0 ? Color.Turquoise : Color.Coral, currentColor, 1f + 1 * (distance.Length() / maxDistance), 10, 0.05f, 3f); GeneralParticleHandler.SpawnParticle(glitter); } } @@ -368,49 +356,22 @@ namespace CalamityMod.Projectiles.Melee public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { damage = (int)(damage * (OmegaBiomeBlade.WhirlwindAttunement_BaseDamageReduction + (OmegaBiomeBlade.WhirlwindAttunement_FullChargeDamageBoost * Empowerment / maxEmpowerment))); - - if (CurrentState != 1) - { - if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.WhirlwindAttunement_WhirlwindProc) - sword.OnHitProc = true; - return; - } - - if (Owner.HeldItem.modItem is OmegaBiomeBlade blade && Main.rand.NextFloat() <= OmegaBiomeBlade.WhirlwindAttunement_SwordThrowProc) - blade.OnHitProc = true; - - lastTarget = target; - foreach (Projectile proj in Main.projectile) - { - if (proj.active && proj.type == ProjectileType() && proj.owner == Owner.whoAmI) - { - //Reset the timeleft on the sigil & give it its new target (or the same, it doesnt matter really. - proj.ai[0] = target.whoAmI; - proj.timeLeft = OmegaBiomeBlade.WhirlwindAttunement_SigilTime; - return; - } - } - Projectile sigil = Projectile.NewProjectileDirect(target.Center, Vector2.Zero, ProjectileType(), 0, 0, Owner.whoAmI, target.whoAmI); - sigil.timeLeft = OmegaBiomeBlade.WhirlwindAttunement_SigilTime; } public override void Kill(int timeLeft) { if (smear != null) smear.Kill(); - if (sightLine != null) - sightLine.Kill(); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/OmegaBiomeBlade"); - Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride"); + Texture2D sword = GetTexture("CalamityMod/Items/Weapons/Melee/GalaxiaExtra2"); float drawAngle = direction.ToRotation(); float drawRotation = drawAngle + MathHelper.PiOver4; - Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOrigin = new Vector2(0f, sword.Height); Vector2 drawOffset = projectile.Center - Main.screenPosition; //Afterimages @@ -420,31 +381,16 @@ namespace CalamityMod.Projectiles.Melee { Color color = projectile.GetAlpha(lightColor) * (1f - (i / (float)projectile.oldRot.Length)); float afterimageRotation = projectile.oldRot[i] + MathHelper.PiOver4; - Main.spriteBatch.Draw(handle, drawOffset, null, color * MathHelper.Lerp(0f, 0.5f, MathHelper.Clamp(Empowerment / maxEmpowerment - 0.4f / 0.1f, 0f, 1f)), afterimageRotation, drawOrigin, projectile.scale - 0.2f * ((i / (float)projectile.oldRot.Length)), 0f, 0f); + Main.spriteBatch.Draw(sword, drawOffset, null, color * MathHelper.Lerp(0f, 0.5f, MathHelper.Clamp((Empowerment - maxEmpowerment * 0.4f) / (maxEmpowerment * 0.6f), 0f, 1f)), afterimageRotation, drawOrigin, projectile.scale - 0.2f * ((i / (float)projectile.oldRot.Length)), 0f, 0f); } - - spriteBatch.End(); //Haha sup babe what if i restarted the spritebatch way too many times haha /blushes - spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - Vector2 afterimageDrawOrigin = new Vector2(0f, blade.Height); - for (int i = 0; i < projectile.oldRot.Length; ++i) - { - Color color = projectile.GetAlpha(lightColor) * (1f - (i / (float)projectile.oldRot.Length)); - float afterimageRotation = projectile.oldRot[i] + MathHelper.PiOver4; - Main.spriteBatch.Draw(blade, drawOffset, null, color * MathHelper.Lerp(0f, 0.5f, MathHelper.Clamp((Empowerment / maxEmpowerment - 0.4f) / 0.1f, 0f, 1f)), afterimageRotation, afterimageDrawOrigin, projectile.scale - 0.2f * ((i / (float)projectile.oldRot.Length)), 0f, 0f); - } - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); } - - spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); + spriteBatch.Draw(sword, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); //Turn on additive blending spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); //Update the parameters - drawOrigin = new Vector2(0f, blade.Height); //Don't draw the glowing blade after the retraction float opacityFade = CurrentState == 0f ? 1f : 1f - retractionTimer; @@ -456,8 +402,6 @@ namespace CalamityMod.Projectiles.Melee GameShaders.Misc["CalamityMod:BasicTint"].Apply(); } - spriteBatch.Draw(blade, drawOffset, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f * opacityFade, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - if (CurrentState == 1f && snapTimer > 0) { drawChain(spriteBatch, snapTimer, retractionTimer); From aa8acb16aacd45220438950f8da40c85b1fab867 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Mon, 24 Jan 2022 15:16:12 +0100 Subject: [PATCH 71/76] Flipped the inventory sprite of the repaired biome blade --- Items/Weapons/Melee/FourSeasonsGalaxia.cs | 10 +++++----- Items/Weapons/Melee/OmegaBiomeBlade.cs | 10 +++++----- Items/Weapons/Melee/TrueBiomeBlade.cs | 22 +++++++++++++++++----- Projectiles/Melee/GalaxiaProjectiles.cs | 4 ++-- 4 files changed, 29 insertions(+), 17 deletions(-) diff --git a/Items/Weapons/Melee/FourSeasonsGalaxia.cs b/Items/Weapons/Melee/FourSeasonsGalaxia.cs index 7fef0472f2..f9a1da5dac 100644 --- a/Items/Weapons/Melee/FourSeasonsGalaxia.cs +++ b/Items/Weapons/Melee/FourSeasonsGalaxia.cs @@ -159,15 +159,15 @@ namespace CalamityMod.Items.Weapons.Melee { case Attunement.Whirlwind: AttunementInfo.name = "Phoenix's Pride"; - AttunementInfo.function_description = "Hold LMB to swing the sword around you, powering up as it spins. Homing cosmic bolts get released around you as you spin"; - AttunementInfo.function_extra = "Releasing LMB during a spin will throw the sword out alongside a blast of 5 stronger cosmic bolts"; + AttunementInfo.function_description = "Hold LMB to swing Galaxia around you, powering up as it spins. Homing cosmic bolts get released around you as you spin"; + AttunementInfo.function_extra = "Releasing LMB during a spin will throw the sword out alongside a blast of 6 stronger cosmic bolts"; AttunementInfo.color = new Color(255, 87, 0); AttunementInfo.color2 = new Color(255, 143, 0); break; case Attunement.SuperPogo: AttunementInfo.name = "Polaris's Gaze"; //It carries the mark of the Northern Star AttunementInfo.function_description = "Channels the mark of the Northern Star into a short ranged shredding blade, surrounded by spinning stars. The blade powers up over time and when hitting enemies"; - AttunementInfo.function_extra = "Releasing LMB sends the charged star flying. Using LMB right after the throw makes the player perform a powerful dash towards the star, releasing cosmic bolts at the end of the lunge"; + AttunementInfo.function_extra = "Releasing LMB sends the charged star flying. Using LMB right after it makes the player perform a dash towards the star, releasing cosmic bolts at the end of the lunge"; AttunementInfo.color = new Color(128, 189, 255); AttunementInfo.color2 = new Color(255, 128, 140); break; @@ -180,8 +180,8 @@ namespace CalamityMod.Items.Weapons.Melee break; case Attunement.FlailBlade: AttunementInfo.name = "Aries's Wrath"; - AttunementInfo.function_description = "Throw out a spinning . Striking enemies with the tip of the blades guarantees a critical hit."; - AttunementInfo.function_extra = "Critical strikes create extra ghostly chains to latch onto extra targets"; + AttunementInfo.function_description = "Send out Galaxia flying, circling at your cursors' position, connected to you by constellations"; + AttunementInfo.function_extra = "Enemy hits explode into extra homing cosmic bolts"; AttunementInfo.color = new Color(196, 89, 201); AttunementInfo.color2 = new Color(255, 0, 0); break; diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index 6e3e691233..64b29c45fc 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -230,11 +230,11 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType()); - recipe.AddIngredient(ModContent.ItemType()); - recipe.AddIngredient(ModContent.ItemType(), 3); - recipe.AddIngredient(ModContent.ItemType(), 3); - recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ItemType()); + recipe.AddIngredient(ItemType()); + recipe.AddIngredient(ItemType(), 3); + recipe.AddIngredient(ItemType(), 3); + recipe.AddIngredient(ItemType(), 5); recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index dfe5d7845a..424fb84b25 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -531,11 +531,14 @@ namespace CalamityMod.Items.Weapons.Melee public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) { - Texture2D itemTexture = Main.itemTexture[item.type]; - Rectangle itemFrame = (Main.itemAnimations[item.type] == null) ? itemTexture.Frame() : Main.itemAnimations[item.type].GetFrame(itemTexture); + Texture2D itemTexture = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade"); if (mainAttunement == null) + { + spriteBatch.Draw(itemTexture, position, null, drawColor, 0f, origin, scale, SpriteEffects.None, 0f); return true; + } + // Draw all particles. @@ -580,13 +583,22 @@ namespace CalamityMod.Items.Weapons.Melee spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive); - spriteBatch.Draw(itemTexture, position + displacement, itemFrame, BiomeEnergyParticles.CenterColor, 0f, origin, scale, SpriteEffects.None, 0f); - spriteBatch.Draw(itemTexture, position - displacement, itemFrame, BiomeEnergyParticles.CenterColor, 0f, origin, scale, SpriteEffects.None, 0f); + spriteBatch.Draw(itemTexture, position + displacement, null, BiomeEnergyParticles.CenterColor, 0f, origin, scale, SpriteEffects.None, 0f); + spriteBatch.Draw(itemTexture, position - displacement, null, BiomeEnergyParticles.CenterColor, 0f, origin, scale, SpriteEffects.None, 0f); spriteBatch.End(); spriteBatch.Begin(default, default); - return true; + spriteBatch.Draw(itemTexture, position, null, drawColor, 0f, origin, scale, SpriteEffects.None, 0f); + return false; } + + public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) + { + Texture2D itemTexture = GetTexture("CalamityMod/Projectiles/Melee/MendedBiomeBlade"); //Use the "projectile" sprite which is flipped so its consistent in lighting with the rest of the line, since its actual sprite is flipped so the swings may look normal + spriteBatch.Draw(itemTexture, item.Center - Main.screenPosition, null, lightColor, rotation, item.Size * 0.5f, scale, SpriteEffects.None, 0f); + return false; + } + } public class MendedBiomeBladeVisuals : ModProjectile //Visuals diff --git a/Projectiles/Melee/GalaxiaProjectiles.cs b/Projectiles/Melee/GalaxiaProjectiles.cs index 327d9d04c9..6d6296ec7b 100644 --- a/Projectiles/Melee/GalaxiaProjectiles.cs +++ b/Projectiles/Melee/GalaxiaProjectiles.cs @@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Melee public class PhoenixsPride : ModProjectile { - public override string Texture => "CalamityMod/Items/Weapons/Melee/GalaxiaExtra2"; + public override string Texture => "CalamityMod/Items/Weapons/Melee/GalaxiaExtra2"; //The blue one, since this is long range private bool initialized = false; Vector2 direction = Vector2.Zero; public ref float CurrentState => ref projectile.ai[0]; @@ -1272,7 +1272,7 @@ namespace CalamityMod.Projectiles.Melee { private NPC[] excludedTargets = new NPC[4]; - public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained"; + public override string Texture => "CalamityMod/Items/Weapons/Melee/GalaxiaExtra2"; public Player Owner => Main.player[projectile.owner]; public ref float ChainSwapTimer => ref projectile.ai[0]; public ref float SnapCoyoteTime => ref projectile.ai[1]; From b41d9a9a92cc9872dc7e550827897c232d0ab9fe Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Mon, 24 Jan 2022 20:23:10 +0100 Subject: [PATCH 72/76] Space blender --- Items/Weapons/Melee/FourSeasonsGalaxia.cs | 14 +- Particles/CircularTrail.png | Bin 0 -> 7671 bytes Particles/ConstellationRing.cs | 68 ++++ Particles/HollowCircleHardEdge.png | Bin 0 -> 8200 bytes Particles/HollowCircleSoftEdge.png | Bin 0 -> 10914 bytes Projectiles/Melee/GalaxiaProjectiles.cs | 306 ++++++++---------- .../Melee/MendedBiomeBladeProjectiles.cs | 3 +- .../Melee/TrueBiomeBladeProjectiles.cs | 3 +- 8 files changed, 220 insertions(+), 174 deletions(-) create mode 100644 Particles/CircularTrail.png create mode 100644 Particles/ConstellationRing.cs create mode 100644 Particles/HollowCircleHardEdge.png create mode 100644 Particles/HollowCircleSoftEdge.png diff --git a/Items/Weapons/Melee/FourSeasonsGalaxia.cs b/Items/Weapons/Melee/FourSeasonsGalaxia.cs index f9a1da5dac..55c69e9810 100644 --- a/Items/Weapons/Melee/FourSeasonsGalaxia.cs +++ b/Items/Weapons/Melee/FourSeasonsGalaxia.cs @@ -32,18 +32,19 @@ namespace CalamityMod.Items.Weapons.Melee public bool OnHitProc = false; #region stats - public static int WhirlwindAttunement_BaseDamage = 400; + public static int WhirlwindAttunement_BaseDamage = 800; public static int WhirlwindAttunement_LocalIFrames = 20; //Remember its got one extra update - public static int WhirlwindAttunement_SigilTime = 1200; - public static float WhirlwindAttunement_BeamDamageReduction = 0.5f; + public static float WhirlwindAttunement_BoltDamageReduction = 0.5f; + public static float WhirlwindAttunement_BoltThrowDamageMultiplier = 1.5f; public static float WhirlwindAttunement_BaseDamageReduction = 0.2f; public static float WhirlwindAttunement_FullChargeDamageBoost = 2f; - public static int SuperPogoAttunement_BaseDamage = 500; + public static int SuperPogoAttunement_BaseDamage = 1200; public static int SuperPogoAttunement_ShredIFrames = 10; public static int SuperPogoAttunement_LocalIFrames = 30; //Be warned its got one extra update so all the iframes should be divided in 2 public static int SuperPogoAttunement_LocalIFramesCharged = 16; public static float SuperPogoAttunement_SlashDamageBoost = 5f; //Keep in mind the slice always crits + public static int SuperPogoAttunement_SlashBoltsDamage = 1300; public static int SuperPogoAttunementSlashLifesteal = 6; public static int SuperPogoAttunement_SlashIFrames = 60; public static float SuperPogoAttunement_ShotDamageBoost = 2f; @@ -87,6 +88,7 @@ namespace CalamityMod.Items.Weapons.Melee Tooltip.SetDefault("FUNCTION_DESC\n" + "FUNCTION_EXTRA\n" + "FUNCTION_PASSIVE\n" + + "Upgrading the sword let it break free from its earthly boundaries.You now have access to every single attunement at all times.\n" + "Use RMB to cycle the sword's attunement forward or backwards depending on the position of your cursor\n" + "Active attunement : None\n" + "Passive blessing: None\n"); ; @@ -187,8 +189,8 @@ namespace CalamityMod.Items.Weapons.Melee break; default: AttunementInfo.name = "None"; - AttunementInfo.function_description = "Does nothing... yet"; - AttunementInfo.function_extra = "Upgrading the sword let it break free from its earthly boundaries. You now have access to every single attunement at all times."; + AttunementInfo.function_description = ""; + AttunementInfo.function_extra = ""; AttunementInfo.color = new Color(163, 163, 163); AttunementInfo.color2 = new Color(163, 163, 163); break; diff --git a/Particles/CircularTrail.png b/Particles/CircularTrail.png new file mode 100644 index 0000000000000000000000000000000000000000..9105fe87acf37c1e3f1491174bace835a1783867 GIT binary patch literal 7671 zcmXY02{@Ep*dAleng~e|Wf{8|L$YPBnUF182n~%fG1lyokS&ccV@vi#_AN%VAlqj* zWGMTRB_vD#@&EsIz4MOC_0Box+3x4L?>EL6rO(F9&kTV;*bEJHOu;wlbB zk>KkT&fu;$1j2IW+syEp!L(^9?sG5nGLRubL6|S-qSv$meUSh~)i!Bm8*g zD2>A{vmn7kdcbMDJBfSYsDDqu)_&@4eXQbxFdE+EmmT{vDl6A5X&vsjb07!*z`2<> zCDcb0*)j^+I2hiNbX3U%Z z0`IL@XK;Mro@_w()RC-+Oe=^PKtIvT3*X-Mwzad%wJ*;bU2&A-BiDK?HYRNPe{1D} z(CUkYFEfz1!cY|qIvuaa8Kd*(I{u7iWE*4( z%d2tpn=9nc45RJ6dq3vqU7@NGI-@=ivcHxRBfpno0n5hg(f<1WpwjjsIJn4t|h+|+Ll*k(v|*?f2-_q1LfrzDYC=5LVf^f%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;fmS=!` "CalamityMod/Particles/HollowCircleSoftEdge"; + public override bool UseAdditiveBlend => true; + public override bool UseCustomDraw => true; + public override bool SetLifetime => true; + public override bool Important => NeededVisual; + + public Vector2 Squish; + public int StarAmount; + public float StarScale; + public float SpinSpeed; + public bool NeededVisual; + public float Offset; + public float Opacity; + + + public ConstellationRingVFX(Vector2 position, Color color, float rotation, float scale, Vector2 squish, float opacity = 1f, int starAmount = 3, float starScale = 2f, float spinSpeed = 0.05f, bool important = false) + { + Position = position; + Velocity = Vector2.Zero; + Rotation = rotation; + Color = color; + Scale = scale; + Squish = squish; + Opacity = opacity; + StarAmount = starAmount; + StarScale = starScale; + SpinSpeed = spinSpeed; + NeededVisual = important; + Lifetime = 2; + Offset = Main.rand.NextFloat(0f, MathHelper.TwoPi); + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + Texture2D ringTexture = GeneralParticleHandler.GetTexture(Type); + Texture2D starTexture = ModContent.GetTexture("CalamityMod/Particles/Sparkle"); + Texture2D bloomTexture = ModContent.GetTexture("CalamityMod/Particles/BloomCircle"); + + spriteBatch.Draw(ringTexture, Position - Main.screenPosition, null, Color * Opacity, Rotation, ringTexture.Size() / 2f, Squish * Scale, SpriteEffects.None, 0); + + for (int i = 0; i < StarAmount; i++) + { + + float starHeight = (float)Math.Sin(Offset + Main.GlobalTime * SpinSpeed + i * MathHelper.TwoPi / (float)StarAmount); + float starWidth = (float)Math.Cos(Offset + Main.GlobalTime * SpinSpeed + i * MathHelper.TwoPi / (float)StarAmount); + + Vector2 starPos = Position + Rotation.ToRotationVector2() * starWidth * (Squish.X * Scale * ringTexture.Width * 0.45f) + (Rotation + MathHelper.PiOver2).ToRotationVector2() * starHeight * (Squish.Y * Scale * ringTexture.Height * 0.45f); + + //Ajust the bloom's texture to be the same size as the star's + float properBloomSize = (float)starTexture.Height / (float)bloomTexture.Height; + spriteBatch.Draw(bloomTexture, starPos - Main.screenPosition, null, Color * Opacity * 0.5f, 0, bloomTexture.Size() / 2f, Scale * properBloomSize, SpriteEffects.None, 0); + spriteBatch.Draw(starTexture, starPos - Main.screenPosition, null, Color * Opacity * 0.5f, Rotation + MathHelper.PiOver4 + MathHelper.PiOver4 * i, starTexture.Size() / 2f, Scale * 0.75f, SpriteEffects.None, 0); + spriteBatch.Draw(starTexture, starPos - Main.screenPosition, null, Color.White * Opacity, Rotation + MathHelper.PiOver4 * i, starTexture.Size() / 2f, Scale, SpriteEffects.None, 0); + } + + } + } +} diff --git a/Particles/HollowCircleHardEdge.png b/Particles/HollowCircleHardEdge.png new file mode 100644 index 0000000000000000000000000000000000000000..1fe5c93429c6da4877e45e2dc632bc562a486e29 GIT binary patch literal 8200 zcmXY0cRW@9|G&t(qOvnfS=TD_x_9*&N+|Ad7Q_2uh)2vcw_i&cCY{#1Ol<&y`ygmJaMNN3lnfpXy`Bk z9;~Q4578hH8|UdoH#8l347?P?7+7M=ydPtpIr_SQ^jtj9f#^$S7(eHy-j@*G-X86Q zxnK}TH1)2&4kBP;JtqW}M%nFZ%U-+BlF#9-+jpO__Uv#+2C>#k3V-HHp5+Vd3r>mX z7gn*HA6SOzFEW+9Ji`>xV|nKquQ)=gp!>tkN0}Uy?;QLSuX+C{8Whxx-MqXYUU763 zHOsX*(@L8`=Z5&#WUrAmYre(G1|I#lkK4IHn^|Qzf9ucSAq!I!%NcrpDC&~0uP=4~ z=yi5>BI=;V-t6&XiHXU{D>I`*Ly_9YbLT+eU%%e6X~MAf_xC?>cfbG7G$yWsK+nf= zW}w1e`>deq+4^aJ!CNo+BL?xe@pwGL9I9dGVGBqR?9w$G^TGsoUE>F)pj)4zS28JNZ3;NS%x z6H-s52}!*&p6cT4d`U^EX6JDB--%kXkb30)Owc)3GEN7LMhi3`LJ$6izU047&m{@} z@_TuBaAszPH9c5?K{ArBq$56^1-G+i!>3^Pi3cf?nY4EB*dYfUY`H#4|n?` z0g=!H$DfOf{*jdL-@gYwi0Cp==Ro;F3&MwOL)%2X+y1KhZ_XsO9WN+MgFmG)%U`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acdy7u<@Kc&Z3KjPAEkM%$JfF>A`g?bR47q57$}!&;S4c literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/GalaxiaProjectiles.cs b/Projectiles/Melee/GalaxiaProjectiles.cs index 6d6296ec7b..27a0686b08 100644 --- a/Projectiles/Melee/GalaxiaProjectiles.cs +++ b/Projectiles/Melee/GalaxiaProjectiles.cs @@ -210,7 +210,7 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i <= 5; i++) { float angle = direction.ToRotation() + MathHelper.Lerp(-MathHelper.PiOver4, MathHelper.PiOver4, i / 5f); - Projectile.NewProjectile(Owner.Center, angle.ToRotationVector2() * 30f, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.WhirlwindAttunement_BeamDamageReduction), 0f, Owner.whoAmI, 0.1f, MathHelper.Pi * 0.02f); + Projectile.NewProjectile(Owner.Center, angle.ToRotationVector2() * 30f, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.WhirlwindAttunement_BoltThrowDamageMultiplier), 0f, Owner.whoAmI, 0.1f, MathHelper.Pi * 0.02f); } } } @@ -272,7 +272,7 @@ namespace CalamityMod.Projectiles.Melee if ((Empowerment + OverEmpowerment) % 30 == 29) { Vector2 shotDirection = Main.rand.NextVector2CircularEdge(15f, 15f); - Projectile.NewProjectile(Owner.Center, shotDirection, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.WhirlwindAttunement_BeamDamageReduction), 0f, Owner.whoAmI, 0.1f, MathHelper.Pi * 0.02f); + Projectile.NewProjectile(Owner.Center, shotDirection, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.WhirlwindAttunement_BoltDamageReduction), 0f, Owner.whoAmI, 0.1f, MathHelper.Pi * 0.02f); } } @@ -301,7 +301,7 @@ namespace CalamityMod.Projectiles.Melee if (CanDirectFire && deltaAngleShoot < 0.1f) { - Projectile.NewProjectile(Owner.Center, Owner.DirectionTo(Main.MouseWorld) * 15f, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.WhirlwindAttunement_BeamDamageReduction), 0f, Owner.whoAmI, 0.1f, MathHelper.Pi * 0.02f); + Projectile.NewProjectile(Owner.Center, Owner.DirectionTo(Main.MouseWorld) * 15f, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.WhirlwindAttunement_BoltDamageReduction), 0f, Owner.whoAmI, 0.1f, MathHelper.Pi * 0.02f); CanDirectFire = false; AngleReset = Owner.DirectionTo(Main.MouseWorld).ToRotation(); } @@ -461,28 +461,29 @@ namespace CalamityMod.Projectiles.Melee public class PolarissGaze : ModProjectile { - public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_SanguineFury"; + public override string Texture => "CalamityMod/Items/Weapons/Melee/GalaxiaExtra"; //Red cuz close range yget the deal private bool initialized = false; Vector2 direction = Vector2.Zero; - public ref float Shred => ref projectile.ai[0]; //How much the attack is, attacking + public ref float Shred => ref projectile.ai[0]; //Charge, basically + public ref float HitChargeCooldown => ref projectile.ai[1]; + public float Bounce(float x) => x <= 50 ? x / 50f : x <= 65 ? 1 + 0.15f * (float)Math.Sin((x - 50f) / 15f * MathHelper.Pi) : 1f; public float ShredRatio => MathHelper.Clamp(Shred / (maxShred * 0.5f), 0f, 1f); - public ref float PogoCooldown => ref projectile.ai[1]; //Cooldown for the pogo - public ref float BounceTime => ref projectile.localAI[0]; public Player Owner => Main.player[projectile.owner]; - public bool CanPogo => Owner.velocity.Y != 0 && PogoCooldown <= 0; //Only pogo when in the air and if the cooldown is zero private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; - public const float pogoStrenght = 16f; //How much the player gets pogoed up - public const float maxShred = 500; //How much shred you get + public const float maxShred = 750; //How much shred you get public Projectile Wheel; public bool Dashing; public Vector2 DashStart; + public Particle[] Rings = new Particle[3]; + public Particle PolarStar; + public override void SetStaticDefaults() { - DisplayName.SetDefault("Sanguine Fury"); + DisplayName.SetDefault("Polaris's Gaze"); } public override void SetDefaults() { @@ -493,61 +494,28 @@ namespace CalamityMod.Projectiles.Melee projectile.penetrate = -1; projectile.extraUpdates = 1; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = OmegaBiomeBlade.SuperPogoAttunement_LocalIFrames; + projectile.localNPCHitCooldown = FourSeasonsGalaxia.SuperPogoAttunement_LocalIFrames; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { float collisionPoint = 0f; - float bladeLenght = 130 * projectile.scale; + float bladeLenght = 145 * projectile.scale; float bladeWidth = 86 * projectile.scale; return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center, Owner.Center + (direction * bladeLenght), bladeWidth, ref collisionPoint); } - public void Pogo() - { - if (CanPogo && Main.myPlayer == Owner.whoAmI) - { - Owner.velocity = -direction.SafeNormalize(Vector2.Zero) * pogoStrenght; //Bounce - Owner.fallStart = (int)(Owner.position.Y / 16f); - PogoCooldown = 30; //Cooldown - Main.PlaySound(SoundID.DD2_MonkStaffGroundImpact, projectile.position); - - Vector2 hitPosition = Owner.Center + (direction * 100 * projectile.scale); - BounceTime = 20f; //Used only for animation - - for (int i = 0; i < 8; i++) - { - Vector2 hitPositionDisplace = direction.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(-10f, 10f); - Vector2 flyDirection = -direction.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4)); - Particle smoke = new SmallSmokeParticle(hitPosition + hitPositionDisplace, flyDirection * 9f, Color.Crimson, new Color(130, 130, 130), Main.rand.NextFloat(1.8f, 2.6f), 155 - Main.rand.Next(30)); - GeneralParticleHandler.SpawnParticle(smoke); - - Particle Glow = new StrongBloom(hitPosition - hitPositionDisplace * 3, -direction * 6 * Main.rand.NextFloat(0.5f, 1f), Color.Crimson * 0.5f, 0.01f + Main.rand.NextFloat(0f, 0.2f), 20 + Main.rand.Next(40)); - GeneralParticleHandler.SpawnParticle(Glow); - } - for (int i = 0; i < 3; i++) - { - Vector2 hitPositionDisplace = direction.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(-10f, 10f); - Vector2 flyDirection = -direction.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4)); - - Particle Rock = new StoneDebrisParticle(hitPosition - hitPositionDisplace * 3, flyDirection * Main.rand.NextFloat(3f, 6f), Color.Beige, 1f + Main.rand.NextFloat(0f, 0.4f), 30 + Main.rand.Next(50), 0.1f); - GeneralParticleHandler.SpawnParticle(Rock); - } - } - } - public override void AI() { - if (!initialized) //Initialization. Here its litterally just playing a sound tho lmfao + if (!initialized) //Initialization. { Main.PlaySound(SoundID.Item90, projectile.Center); initialized = true; foreach(Projectile proj in Main.projectile) { - if (proj.active && proj.type == ProjectileType() && proj.owner == Owner.whoAmI) + if (proj.active && proj.type == ProjectileType() && proj.owner == Owner.whoAmI) { if (CalamityUtils.AngleBetween(Owner.Center - Main.MouseWorld, Owner.Center - proj.Center) > MathHelper.PiOver4) { @@ -559,7 +527,7 @@ namespace CalamityMod.Projectiles.Melee Dashing = true; DashStart = Owner.Center; Wheel.timeLeft = 60; - Owner.GiveIFrames(OmegaBiomeBlade.SuperPogoAttunement_SlashIFrames); + Owner.GiveIFrames(FourSeasonsGalaxia.SuperPogoAttunement_SlashIFrames); break; } } @@ -571,13 +539,59 @@ namespace CalamityMod.Projectiles.Melee return; } + + #region sparkles and particles + + float bladeLenght = 120 * projectile.scale; + for (int i = 0; i < 3; i ++) + { + if (Rings[i] == null) + { + Rings[i] = new ConstellationRingVFX(Owner.Center + (direction * (25 + bladeLenght * 0.33f * i)), Color.CornflowerBlue, direction.ToRotation(), projectile.scale * 0.25f * i, new Vector2(0.5f, 1f), spinSpeed: 7, starAmount: 3 + i, important : true) ; + GeneralParticleHandler.SpawnParticle(Rings[i]); + } + else + { + Rings[i].Time = 0; + Rings[i].Position = Owner.Center + Vector2.Lerp(Vector2.Zero, ((0.9f + 0.1f * (float)Math.Sin(Main.GlobalTime * 10f - i * 0.5f)) * direction * (25 + bladeLenght * 0.33f * (i + 1))), Bounce(Shred - 30 * i)); + Rings[i].Rotation = direction.ToRotation(); + Rings[i].Scale = projectile.scale * 0.25f * (i + 1); + (Rings[i] as ConstellationRingVFX).Opacity = 0.5f + 0.5f * ShredRatio; + } + } + + if (PolarStar == null) + { + PolarStar = new GenericSparkle(Owner.Center + direction, Vector2.Zero, Color.White, Color.CornflowerBlue, projectile.scale, 2, 0.05f, 5f); + GeneralParticleHandler.SpawnParticle(PolarStar); + } + else + { + PolarStar.Time = 0; + PolarStar.Position = Owner.Center + direction * 46 * projectile.scale; + PolarStar.Rotation += (1 + (float)Math.Sin(Main.GlobalTime * 4f)) * 0.02f; + PolarStar.Scale = projectile.scale * 2f ; + } + + if (Main.rand.NextBool()) + { + Vector2 smokeSpeed = direction.RotatedByRandom(MathHelper.PiOver4 * 0.3f) * Main.rand.NextFloat(10f, 30f) * (ShredRatio * 0.5f + 1f); + Particle smoke = new HeavySmokeParticle(projectile.Center, smokeSpeed + Owner.velocity, Color.Lerp(Color.Purple, Color.Indigo, (float)Math.Sin(Main.GlobalTime * 6f)), 30, Main.rand.NextFloat(0.6f, 1.2f) * (ShredRatio * 0.5f + 1f), 0.8f, 0, false, 0, true); + GeneralParticleHandler.SpawnParticle(smoke); + + if (Main.rand.Next(3) == 0) + { + Particle smokeGlow = new HeavySmokeParticle(projectile.Center, smokeSpeed + Owner.velocity, Main.hslToRgb(0.55f, 1, 0.5f + 0.2f * ShredRatio), 20, Main.rand.NextFloat(0.4f, 0.7f) * (ShredRatio * 0.5f + 1f), 0.8f, 0, true, 0.01f, true); + GeneralParticleHandler.SpawnParticle(smokeGlow); + } + } + #endregion + if (Shred >= maxShred) Shred = maxShred; if (Shred < 0) Shred = 0; - Lighting.AddLight(projectile.Center, new Vector3(1f, 0.56f, 0.56f) * ShredRatio); - //Manage position and rotation direction = Owner.DirectionTo(Main.MouseWorld); direction.Normalize(); @@ -585,7 +599,7 @@ namespace CalamityMod.Projectiles.Melee projectile.Center = Owner.Center + (direction * 60); //Scaling based on shred - projectile.localNPCHitCooldown = OmegaBiomeBlade.SuperPogoAttunement_LocalIFrames - (int)(MathHelper.Lerp(0, OmegaBiomeBlade.SuperPogoAttunement_LocalIFrames - OmegaBiomeBlade.SuperPogoAttunement_LocalIFramesCharged, ShredRatio)); //Increase the hit frequency + projectile.localNPCHitCooldown = FourSeasonsGalaxia.SuperPogoAttunement_LocalIFrames - (int)(MathHelper.Lerp(0, FourSeasonsGalaxia.SuperPogoAttunement_LocalIFrames - FourSeasonsGalaxia.SuperPogoAttunement_LocalIFramesCharged, ShredRatio)); //Increase the hit frequency projectile.scale = 1f + (ShredRatio * 1f); //SWAGGER @@ -594,9 +608,17 @@ namespace CalamityMod.Projectiles.Melee Dashing = false; Owner.velocity *= 0.1f; //Abrupt stop + for (int i = 0; i < 5; i++) + { + Projectile blast = Projectile.NewProjectileDirect(Owner.Center, Main.rand.NextVector2CircularEdge(15, 15), ProjectileType(), (int)(FourSeasonsGalaxia.SuperPogoAttunement_SlashBoltsDamage * Owner.meleeDamage), 0f, Owner.whoAmI, 0.55f, MathHelper.Pi * 0.02f); + { + blast.timeLeft = 100; + } + } + Main.PlaySound(mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/MeatySlash"), projectile.Center); - Projectile proj = Projectile.NewProjectileDirect(Owner.Center - DashStart / 2f, Vector2.Zero, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.SuperPogoAttunement_SlashDamageBoost), 0, Owner.whoAmI); - if (proj.modProjectile is SanguineFuryDash dash) + Projectile proj = Projectile.NewProjectileDirect(Owner.Center - DashStart / 2f, Vector2.Zero, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.SuperPogoAttunement_SlashDamageBoost), 0, Owner.whoAmI); + if (proj.modProjectile is PolarissGazeDash dash) { dash.DashStart = DashStart; dash.DashEnd = Owner.Center; @@ -616,14 +638,6 @@ namespace CalamityMod.Projectiles.Melee Wheel.active = false; } - - if (Collision.SolidCollision(Owner.Center + (direction * 100 * projectile.scale) - Vector2.One * 5f, 10, 10) && !Dashing) - { - Pogo(); - projectile.netUpdate = true; - projectile.netSpam = 0; - } - //Make the owner look like theyre holding the sword bla bla Owner.heldProj = projectile.whoAmI; Owner.direction = Math.Sign(direction.X); @@ -636,9 +650,8 @@ namespace CalamityMod.Projectiles.Melee Owner.itemTime = 2; Owner.itemAnimation = 2; - Shred--; - PogoCooldown--; - BounceTime--; + Shred += 1; + HitChargeCooldown--; projectile.timeLeft = 2; } @@ -652,83 +665,38 @@ namespace CalamityMod.Projectiles.Melee Owner.fallStart = (int)(Owner.position.Y / 16f); // get lifted up - if (PogoCooldown <= 0) + if (HitChargeCooldown <= 0) { Main.PlaySound(SoundID.NPCHit30, projectile.Center); //Sizzle - Shred += 62; //Augment the shredspeed + Shred += 80; //Augment the shredspeed if (Owner.velocity.Y > 0) Owner.velocity.Y = -2f; //Get "stuck" into the enemy partly - Owner.GiveIFrames(OmegaBiomeBlade.SuperPogoAttunement_ShredIFrames); // i framez. - PogoCooldown = 20; + Owner.GiveIFrames(FourSeasonsGalaxia.SuperPogoAttunement_ShredIFrames); // i framez. + HitChargeCooldown = 20; } } public override void Kill(int timeLeft) { Main.PlaySound(SoundID.NPCHit43, projectile.Center); - if (ShredRatio > 0.25 && Owner.whoAmI == Main.myPlayer) + if (ShredRatio > 0.85 && Owner.whoAmI == Main.myPlayer) { - Projectile.NewProjectile(projectile.Center, direction * 16f, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.SuperPogoAttunement_ShotDamageBoost) , projectile.knockBack, Owner.whoAmI, Shred); + Projectile.NewProjectile(projectile.Center, direction * 16f, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.SuperPogoAttunement_ShotDamageBoost) , projectile.knockBack, Owner.whoAmI, Shred); } Owner.Calamity().LungingDown = false; } - public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.SuperPogoAttunement_ShredderProc) - sword.OnHitProc = true; - } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/OmegaBiomeBlade"); - Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_SanguineFury"); - - int bladeAmount = 4; + Texture2D sword = GetTexture("CalamityMod/Items/Weapons/Melee/GalaxiaExtra"); float drawAngle = direction.ToRotation(); float drawRotation = drawAngle + MathHelper.PiOver4; - Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOrigin = new Vector2(0f, sword.Height); Vector2 drawOffset = Owner.Center + direction * 10f - Main.screenPosition; - spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - - //Turn on additive blending - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(MathHelper.Clamp(BounceTime, 0f, 20f) / 20f); - GameShaders.Misc["CalamityMod:BasicTint"].UseColor(new Color(207, 248, 255)); - GameShaders.Misc["CalamityMod:BasicTint"].Apply(); - - //Update the parameters - drawOrigin = new Vector2(0f, blade.Height); - - spriteBatch.Draw(blade, drawOffset, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - - - for (int i = 0; i < bladeAmount; i++) //Draw extra copies - { - blade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_SanguineFuryExtra"); - - drawAngle = direction.ToRotation(); - - float circleCompletion = (float)Math.Sin(Main.GlobalTime * 5 + i * MathHelper.PiOver2); - drawRotation = drawAngle + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi / 9f) * ShredRatio); - - drawOrigin = new Vector2(0f, blade.Height); - - Vector2 drawOffsetStraight = Owner.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10 - Main.screenPosition; //How far from the player - Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly - Vector2 drawOffsetFromBounce = direction * MathHelper.Clamp(BounceTime, 0f, 20f) / 20f * 20f; - - spriteBatch.Draw(blade, drawOffsetStraight + drawDisplacementAngle + drawOffsetFromBounce, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.8f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - } - - //Back to normal - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + spriteBatch.Draw(sword, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); return false; } @@ -747,23 +715,23 @@ namespace CalamityMod.Projectiles.Melee public class PolarissGazeStar : ModProjectile { - public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_SanguineFuryExtra"; + public override string Texture => "CalamityMod/Particles/Sparkle"; private bool initialized = false; Vector2 direction = Vector2.Zero; public ref float Shred => ref projectile.ai[0]; - public float ShredRatio => MathHelper.Clamp(Shred / (maxShred * 0.5f), 0f, 1f); + public float ShredRatio => MathHelper.Clamp(Shred / (PolarissGaze.maxShred * 0.5f), 0f, 1f); public Player Owner => Main.player[projectile.owner]; public float Timer => MaxTime - projectile.timeLeft; - public const float maxShred = 500; //How much shred you get public const float MaxTime = 120; + public Particle PolarStar; //Using a particle ontop of it since the smoke particles would otherwise go over it public override void SetStaticDefaults() { - DisplayName.SetDefault("Sanguine Wheel"); + DisplayName.SetDefault("Northern Star"); } public override void SetDefaults() { @@ -812,12 +780,30 @@ namespace CalamityMod.Projectiles.Melee projectile.velocity *= 0.96f; projectile.position += projectile.velocity; - } - public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.SuperPogoAttunement_WheelProc) - sword.OnHitProc = true; + if (PolarStar == null) + { + PolarStar = new GenericSparkle(projectile.Center, Vector2.Zero, Color.White, Color.CornflowerBlue, projectile.scale * 2f, 2, 0.1f, 5f); + GeneralParticleHandler.SpawnParticle(PolarStar); + } + else + { + PolarStar.Time = 0; + PolarStar.Position = projectile.Center; + PolarStar.Scale = projectile.scale * 2f; + } + + + Vector2 smokeSpeed = Main.rand.NextVector2Circular(10f, 10f); + Particle smoke = new HeavySmokeParticle(projectile.Center, smokeSpeed + projectile.velocity / 2, Color.Lerp(Color.Purple, Color.Indigo, (float)Math.Sin(Main.GlobalTime * 6f)), 30, Main.rand.NextFloat(0.6f, 1.2f), 0.8f, 0, false, 0, true); + GeneralParticleHandler.SpawnParticle(smoke); + + if (Main.rand.Next(3) == 0) + { + Particle smokeGlow = new HeavySmokeParticle(projectile.Center, smokeSpeed + projectile.velocity / 2, Main.hslToRgb(0.55f, 1, 0.5f), 20, Main.rand.NextFloat(0.4f, 0.7f), 0.8f, 0, true, 0.01f, true); + GeneralParticleHandler.SpawnParticle(smokeGlow); + } + } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) @@ -825,34 +811,13 @@ namespace CalamityMod.Projectiles.Melee spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - for (int i = 0; i < 4; i++) //Draw extra copies - { - var tex = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_SanguineFuryExtra"); + var tex = GetTexture("CalamityMod/Particles/Sparkle"); + float opacityFade = projectile.timeLeft > 15 ? 1 : projectile.timeLeft / 15f; - float transition = MathHelper.Clamp((Timer - 15 - (i * 20)) / (MaxTime * 0.2f), 0f, 1f); - transition = MathHelper.Clamp(Timer / MaxTime, 0f, 1f); - - //float circleCompletion = (float)Math.Sin(Main.GlobalTime * 5 + i * MathHelper.PiOver2); - //float drawAngleShot = MathHelper.WrapAngle(direction.ToRotation() + MathHelper.PiOver4 + (circleCompletion * MathHelper.Pi / 10f) - (circleCompletion * (MathHelper.Pi / 9f) * ShredRatio)); - float drawAngleWheel = MathHelper.WrapAngle(i * MathHelper.PiOver2 + (Main.GlobalTime * 6)); - //Lerp between the position in the shot and the position in the wheel - //float drawAngle = MathHelper.WrapAngle(Utils.AngleLerp(drawAngleShot, drawAngleWheel, transition)); - - Vector2 drawOrigin = new Vector2(0f, tex.Height); - - - //Vector2 drawOffsetStraight = projectile.Center + direction * (float)Math.Sin(Main.GlobalTime * 7) * 10 - Main.screenPosition; //How far from the player - //Vector2 drawDisplacementAngle = direction.RotatedBy(MathHelper.PiOver2) * circleCompletion.ToRotationVector2().Y * (20 + 40 * ShredRatio); //How far perpendicularly - //Vector2 drawPositionShot = drawOffsetStraight + drawDisplacementAngle; - Vector2 drawPositionWheel = projectile.Center - drawAngleWheel.ToRotationVector2() * 20f - Main.screenPosition; - - //Vector2 drawPosition = Vector2.Lerp(drawPositionShot, drawPositionWheel, transition); - - float opacityFade = projectile.timeLeft > 15 ? 1 : projectile.timeLeft / 15f; - - spriteBatch.Draw(tex, drawPositionWheel, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.8f * opacityFade, drawAngleWheel, drawOrigin, projectile.scale * 0.85f, 0f, 0f); - } + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.5f * opacityFade, Main.GlobalTime * 10f + MathHelper.PiOver4, tex.Size() / 2f, projectile.scale * 1.5f, 0f, 0f); + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.8f * opacityFade, Main.GlobalTime * 10f, tex.Size() / 2f, projectile.scale * 2f, 0f, 0f); + //Back to normal spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); @@ -865,8 +830,18 @@ namespace CalamityMod.Projectiles.Melee Main.PlaySound(SoundID.Item60, projectile.Center); for (int i = 0; i < 10; i++) { - Particle Sparkle = new CritSpark(projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(17.5f, 25f) * projectile.scale, Color.White, Main.rand.NextBool() ? Color.Crimson : Color.DarkRed, 0.4f + Main.rand.NextFloat(0f, 3.5f), 20 + Main.rand.Next(30), 1, 3f); + Particle Sparkle = new CritSpark(projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(17.5f, 25f) * projectile.scale, Color.White, Main.rand.NextBool() ? Color.CornflowerBlue : Color.MediumSlateBlue, 0.4f + Main.rand.NextFloat(0f, 3.5f), 20 + Main.rand.Next(30), 1, 3f); GeneralParticleHandler.SpawnParticle(Sparkle); + + Vector2 smokeSpeed = Main.rand.NextVector2Circular(20f, 20f); + Particle smoke = new HeavySmokeParticle(projectile.Center, smokeSpeed + projectile.velocity / 2, Color.Lerp(Color.DarkRed, Color.Indigo, (float)Math.Sin(Main.GlobalTime * 6f)), 30, Main.rand.NextFloat(1.5f, 2.2f), 0.8f, 0, false, 0, true); + GeneralParticleHandler.SpawnParticle(smoke); + + if (Main.rand.Next(3) == 0) + { + Particle smokeGlow = new HeavySmokeParticle(projectile.Center, smokeSpeed + projectile.velocity / 2, Main.hslToRgb(0.55f, 1, 0.5f), 20, Main.rand.NextFloat(1.4f, 1.5f), 0.8f, 0, true, 0.01f, true); + GeneralParticleHandler.SpawnParticle(smokeGlow); + } } } @@ -906,21 +881,24 @@ namespace CalamityMod.Projectiles.Melee { crit = true; - if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.SuperPogoAttunement_DashProc) - sword.OnHitProc = true; - Particle bloom = new StrongBloom(target.Center, target.velocity, Color.Crimson * 0.5f, 1f, 30); GeneralParticleHandler.SpawnParticle(bloom); for (int i = 0; i < 3; i++) { Vector2 sparkSpeed = target.DirectionTo(Owner.Center).RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4)) * 9f; - Particle Spark = new CritSpark(target.Center, sparkSpeed, Color.White, Color.Crimson, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 0.6f); + Particle Spark = new CritSpark(target.Center, sparkSpeed, Color.White, Color.CornflowerBlue, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 0.6f); GeneralParticleHandler.SpawnParticle(Spark); } - Owner.statLife += OmegaBiomeBlade.SuperPogoAttunementSlashLifesteal; - Owner.HealEffect(OmegaBiomeBlade.SuperPogoAttunementSlashLifesteal); + //Explode into cosmic bolts + for (int i = 0; i < 3; i++) + { + Projectile blast = Projectile.NewProjectileDirect(Owner.Center, Owner.DirectionTo(target.Center).RotatedByRandom(MathHelper.PiOver4) * 30f, ProjectileType(), (int)(FourSeasonsGalaxia.SuperPogoAttunement_SlashBoltsDamage * Owner.meleeDamage), 0f, Owner.whoAmI, 0.55f, MathHelper.Pi * 0.01f); + { + blast.timeLeft = 100; + } + } } @@ -941,7 +919,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 origin = new Vector2(lineTex.Width / 2f, lineTex.Height); Vector2 scale = new Vector2(0.2f, (DashEnd - DashStart).Length() / lineTex.Height); - spriteBatch.Draw(lineTex, DashStart - Main.screenPosition + Shake, null, Color.Lerp(Color.White, Color.Crimson * 0.7f, raise), rot, origin, scale, SpriteEffects.None, 0); + spriteBatch.Draw(lineTex, DashStart - Main.screenPosition + Shake, null, Color.Lerp(Color.White, Color.CornflowerBlue * 0.7f, raise), rot, origin, scale, SpriteEffects.None, 0); Texture2D sparkTexture = GetTexture("CalamityMod/Particles/ThinSparkle"); Texture2D bloomTexture = GetTexture("CalamityMod/Particles/BloomCircle"); @@ -951,8 +929,8 @@ namespace CalamityMod.Projectiles.Melee Rectangle frame = new Rectangle(0, 0, 14, 14); - spriteBatch.Draw(bloomTexture, DashEnd - Main.screenPosition, null, Color.Crimson * bump * 0.5f, 0, bloomTexture.Size() / 2f, bump * 6f * properBloomSize, SpriteEffects.None, 0); - spriteBatch.Draw(sparkTexture, DashEnd - Main.screenPosition, frame, Color.Lerp(Color.White, Color.Crimson, raise) * bump, raise * MathHelper.TwoPi, frame.Size() / 2f, bump * 3f, SpriteEffects.None, 0); + spriteBatch.Draw(bloomTexture, DashEnd - Main.screenPosition, null, Color.CornflowerBlue * bump * 0.5f, 0, bloomTexture.Size() / 2f, bump * 6f * properBloomSize, SpriteEffects.None, 0); + spriteBatch.Draw(sparkTexture, DashEnd - Main.screenPosition, frame, Color.Lerp(Color.White, Color.CornflowerBlue, raise) * bump, raise * MathHelper.TwoPi, frame.Size() / 2f, bump * 3f, SpriteEffects.None, 0); //Back to normal spriteBatch.End(); diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index afbc4817a8..e397973dfc 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -1014,11 +1014,10 @@ namespace CalamityMod.Projectiles.Melee private bool initialized = false; Vector2 direction = Vector2.Zero; public ref float Shred => ref projectile.ai[0]; - public float ShredRatio => MathHelper.Clamp(Shred / (maxShred * 0.5f), 0f, 1f); + public float ShredRatio => MathHelper.Clamp(Shred / (TrueAridGrandeur.maxShred * 0.5f), 0f, 1f); public Player Owner => Main.player[projectile.owner]; public const float pogoStrenght = 16f; //How much the player gets pogoed up - public const float maxShred = 500; //How much shred you get public override void SetStaticDefaults() { diff --git a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs index 23b71e3b06..7157038590 100644 --- a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs @@ -803,12 +803,11 @@ namespace CalamityMod.Projectiles.Melee private bool initialized = false; Vector2 direction = Vector2.Zero; public ref float Shred => ref projectile.ai[0]; - public float ShredRatio => MathHelper.Clamp(Shred / (maxShred * 0.5f), 0f, 1f); + public float ShredRatio => MathHelper.Clamp(Shred / (SanguineFury.maxShred * 0.5f), 0f, 1f); public Player Owner => Main.player[projectile.owner]; public float Timer => MaxTime - projectile.timeLeft; - public const float maxShred = 500; //How much shred you get public const float MaxTime = 120; From 7da382788f3eb56f501bca3976adbcb2fc18882a Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Tue, 25 Jan 2022 01:44:45 +0100 Subject: [PATCH 73/76] Interstellar Stomper --- Items/Weapons/Melee/FourSeasonsGalaxia.cs | 37 +- Projectiles/Melee/GalaxiaProjectiles.cs | 740 ++++++++++++---------- 2 files changed, 408 insertions(+), 369 deletions(-) diff --git a/Items/Weapons/Melee/FourSeasonsGalaxia.cs b/Items/Weapons/Melee/FourSeasonsGalaxia.cs index 55c69e9810..f7fc9379ee 100644 --- a/Items/Weapons/Melee/FourSeasonsGalaxia.cs +++ b/Items/Weapons/Melee/FourSeasonsGalaxia.cs @@ -45,39 +45,20 @@ namespace CalamityMod.Items.Weapons.Melee public static int SuperPogoAttunement_LocalIFramesCharged = 16; public static float SuperPogoAttunement_SlashDamageBoost = 5f; //Keep in mind the slice always crits public static int SuperPogoAttunement_SlashBoltsDamage = 1300; - public static int SuperPogoAttunementSlashLifesteal = 6; public static int SuperPogoAttunement_SlashIFrames = 60; - public static float SuperPogoAttunement_ShotDamageBoost = 2f; + public static float SuperPogoAttunement_ShotDamageBoost = 2f; //The shots fired if the dash connects - public static int ShockwaveAttunement_BaseDamage = 2500; + public static int ShockwaveAttunement_BaseDamage = 3500; public static int ShockwaveAttunement_DashHitIFrames = 60; public static float ShockwaveAttunement_FullChargeBoost = 1f; //The EXTRA damage boost. So putting 1 here will make it deal double damage. Putting 0.5 here will make it deal 1.5x the damage. public static float ShockwaveAttunement_MonolithDamageBoost = 2f; - public static float ShockwaveAttunement_BlastDamageReduction = 0.6f; + public static float ShockwaveAttunement_BoltsDamageReduction = 0.2f; //The shots fired as it charges - public static int FlailBladeAttunement_BaseDamage = 320; - public static int FlailBladeAttunement_LocalIFrames = 30; - public static int FlailBladeAttunement_FlailTime = 10; - public static int FlailBladeAttunement_Reach = 400; + public static int FlailBladeAttunement_BaseDamage = 1420; + public static int FlailBladeAttunement_LocalIFrames = 10; + public static int FlailBladeAttunement_Reach = 600; public static float FlailBladeAttunement_ChainDamageReduction = 0.5f; - public static float FlailBladeAttunement_GhostChainDamageReduction = 0.5f; - - //Proc coefficients. aka the likelihood of any given attack to trigger a on-hit passive. - public static float WhirlwindAttunement_WhirlwindProc = 0.24f; - public static float WhirlwindAttunement_SwordThrowProc = 1f; - public static float WhirlwindAttunement_SwordBeamProc = 0.05f; - - public static float SuperPogoAttunement_ShredderProc = 0.1f; - public static float SuperPogoAttunement_WheelProc = 0.4f; - public static float SuperPogoAttunement_DashProc = 1f; - - public static float ShockwaveAttunement_SwordProc = 1f; - public static float ShockwaveAttunement_MonolithProc = 1f; - public static float ShockwaveAttunement_BlastProc = 0.5f; - - public static float FlailBladeAttunement_BladeProc = 0.1f; - public static float FlailBladeAttunement_ChainProc = 0.05f; - public static float FlailBladeAttunement_GhostChainProc = 0.1f; + public static float FlailBladeAttunement_OnHitBoltDamageReduction = 0.5f; #endregion public override string Texture => "CalamityMod/Items/Weapons/Melee/GalaxiaExtra"; //Just in case the player SOMEHOW gets to swing galaxia itself. Sprite also used as the base for other attacks @@ -88,7 +69,7 @@ namespace CalamityMod.Items.Weapons.Melee Tooltip.SetDefault("FUNCTION_DESC\n" + "FUNCTION_EXTRA\n" + "FUNCTION_PASSIVE\n" + - "Upgrading the sword let it break free from its earthly boundaries.You now have access to every single attunement at all times.\n" + + "Upgrading the sword let it break free from its earthly boundaries. You now have access to every single attunement at all times!\n" + "Use RMB to cycle the sword's attunement forward or backwards depending on the position of your cursor\n" + "Active attunement : None\n" + "Passive blessing: None\n"); ; @@ -182,7 +163,7 @@ namespace CalamityMod.Items.Weapons.Melee break; case Attunement.FlailBlade: AttunementInfo.name = "Aries's Wrath"; - AttunementInfo.function_description = "Send out Galaxia flying, circling at your cursors' position, connected to you by constellations"; + AttunementInfo.function_description = "Send out Galaxia flying, circling at your cursor's position, connected to you by constellations"; AttunementInfo.function_extra = "Enemy hits explode into extra homing cosmic bolts"; AttunementInfo.color = new Color(196, 89, 201); AttunementInfo.color2 = new Color(255, 0, 0); diff --git a/Projectiles/Melee/GalaxiaProjectiles.cs b/Projectiles/Melee/GalaxiaProjectiles.cs index 27a0686b08..17df9c720d 100644 --- a/Projectiles/Melee/GalaxiaProjectiles.cs +++ b/Projectiles/Melee/GalaxiaProjectiles.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Melee { Head.Position = projectile.Center + projectile.velocity * 0.5f; Head.Time = 0; - Head.Scale += (float)Math.Sin(Main.GlobalTime * 6) * 0.02f; + Head.Scale += (float)Math.Sin(Main.GlobalTime * 6) * 0.02f * projectile.scale; } @@ -81,12 +81,12 @@ namespace CalamityMod.Projectiles.Melee if (Main.rand.Next(2) == 0) { - Particle smoke = new HeavySmokeParticle(projectile.Center, projectile.velocity * 0.5f, Color.Lerp(Color.MidnightBlue, Color.Indigo, (float)Math.Sin(Main.GlobalTime * 6f)), 30, Main.rand.NextFloat(0.6f, 1.2f), 0.8f, 0, false, 0, true); + Particle smoke = new HeavySmokeParticle(projectile.Center, projectile.velocity * 0.5f, Color.Lerp(Color.MidnightBlue, Color.Indigo, (float)Math.Sin(Main.GlobalTime * 6f)), 30, Main.rand.NextFloat(0.6f, 1.2f) * projectile.scale, 0.8f, 0, false, 0, true); GeneralParticleHandler.SpawnParticle(smoke); if (Main.rand.Next(3) == 0) { - Particle smokeGlow = new HeavySmokeParticle(projectile.Center, projectile.velocity * 0.5f, Main.hslToRgb(Hue, 100, 50), 20, Main.rand.NextFloat(0.4f, 0.7f), 0.8f, 0, true, 0.005f, true); + Particle smokeGlow = new HeavySmokeParticle(projectile.Center, projectile.velocity * 0.5f, Main.hslToRgb(Hue, 1, 0.7f), 20, Main.rand.NextFloat(0.4f, 0.7f) * projectile.scale, 0.8f, 0, true, 0.005f, true); GeneralParticleHandler.SpawnParticle(smokeGlow); } } @@ -547,13 +547,13 @@ namespace CalamityMod.Projectiles.Melee { if (Rings[i] == null) { - Rings[i] = new ConstellationRingVFX(Owner.Center + (direction * (25 + bladeLenght * 0.33f * i)), Color.CornflowerBlue, direction.ToRotation(), projectile.scale * 0.25f * i, new Vector2(0.5f, 1f), spinSpeed: 7, starAmount: 3 + i, important : true) ; + Rings[i] = new ConstellationRingVFX(Owner.Center + (direction * (25 + bladeLenght * 0.33f * i)), Color.DarkOrchid, direction.ToRotation(), projectile.scale * 0.25f * i, new Vector2(0.5f, 1f), spinSpeed: 7, starAmount: 3 + i, important : true) ; GeneralParticleHandler.SpawnParticle(Rings[i]); } else { Rings[i].Time = 0; - Rings[i].Position = Owner.Center + Vector2.Lerp(Vector2.Zero, ((0.9f + 0.1f * (float)Math.Sin(Main.GlobalTime * 10f - i * 0.5f)) * direction * (25 + bladeLenght * 0.33f * (i + 1))), Bounce(Shred - 30 * i)); + Rings[i].Position = Owner.Center + Vector2.Lerp(Vector2.Zero, ((0.9f + 0.1f * (float)Math.Sin(Main.GlobalTime * 10f - i * 0.5f)) * direction * (25 + bladeLenght * 0.33f * (i + 1))), Bounce(MathHelper.Clamp(Shred - 30 * i, 0, maxShred))); Rings[i].Rotation = direction.ToRotation(); Rings[i].Scale = projectile.scale * 0.25f * (i + 1); (Rings[i] as ConstellationRingVFX).Opacity = 0.5f + 0.5f * ShredRatio; @@ -943,7 +943,7 @@ namespace CalamityMod.Projectiles.Melee public class AndromedasStride : ModProjectile { - public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_MercurialTides"; + public override string Texture => "CalamityMod/Items/Weapons/Melee/GalaxiaExtra"; private bool initialized = false; Vector2 direction = Vector2.Zero; public Player Owner => Main.player[projectile.owner]; @@ -960,7 +960,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - DisplayName.SetDefault("Mercurial Tides"); + DisplayName.SetDefault("Andromeda's Stride"); } public override void SetDefaults() { @@ -1042,9 +1042,16 @@ namespace CalamityMod.Projectiles.Melee projectile.timeLeft = 2; if ((Charge / MaxCharge >= 0.25f && CurrentIndicator == 0f) || (Charge / MaxCharge >= 0.5f && CurrentIndicator == 1f) || (Charge / MaxCharge >= 0.75f && CurrentIndicator == 2f)) { + //WOahhh do a ring of projectiles!! woahhh + for (int i = 0; i < 5; i++) + { + Projectile blast = Projectile.NewProjectileDirect(Owner.Center, (MathHelper.TwoPi * i / 5f).ToRotationVector2() * 10f, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.ShockwaveAttunement_BoltsDamageReduction), 0f, Owner.whoAmI, 0.75f, MathHelper.Pi * 0.02f); + { + blast.timeLeft = 30; + } + } - Projectile.NewProjectile(Owner.Center, Vector2.Zero, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_BlastDamageReduction), 10f, Owner.whoAmI, 1f + CurrentIndicator * 0.15f); - Main.PlaySound(SoundID.DD2_WitherBeastAuraPulse, projectile.Center); + Main.PlaySound(SoundID.Item79, projectile.Center); CurrentIndicator++; OverCharge = 20f; } @@ -1052,9 +1059,33 @@ namespace CalamityMod.Projectiles.Melee if (Charge >= MaxCharge) { Charge = MaxCharge; + + if (Main.rand.NextBool()) + { + Vector2 smokeSpeed = direction.RotatedByRandom(MathHelper.PiOver4 * 0.3f) * Main.rand.NextFloat(10f, 30f) * 0.9f; + Particle smoke = new HeavySmokeParticle(projectile.Center + direction * 50f, smokeSpeed + Owner.velocity, Color.Lerp(Color.Purple, Color.Indigo, (float)Math.Sin(Main.GlobalTime * 6f)), 30, Main.rand.NextFloat(0.6f, 1.2f), 0.8f, 0, false, 0, true); + GeneralParticleHandler.SpawnParticle(smoke); + + if (Main.rand.Next(3) == 0) + { + Particle smokeGlow = new HeavySmokeParticle(projectile.Center + direction * 50f, smokeSpeed + Owner.velocity, Main.hslToRgb(0.85f, 1, 0.8f), 20, Main.rand.NextFloat(0.4f, 0.7f), 0.8f, 0, true, 0.01f, true); + GeneralParticleHandler.SpawnParticle(smokeGlow); + } + } + + if (Owner.whoAmI == Main.myPlayer && CurrentIndicator < 4f) { - Projectile.NewProjectile(Owner.Center, Vector2.Zero, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_BlastDamageReduction), 10f, Owner.whoAmI, 1f + CurrentIndicator * 0.15f); + //Projectiles!!! wah!!! + for (int i = 0; i < 9; i++) + { + Projectile blast = Projectile.NewProjectileDirect(Owner.Center, (MathHelper.TwoPi * i / 9f).ToRotationVector2() * 10f, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.ShockwaveAttunement_BoltsDamageReduction), 0f, Owner.whoAmI, 0.75f, MathHelper.Pi * 0.02f); + { + blast.timeLeft = 50; + } + } + + OverCharge = 20f; Main.PlaySound(mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/CorvinaScream"), projectile.Center); CurrentIndicator++; @@ -1114,14 +1145,15 @@ namespace CalamityMod.Projectiles.Melee if (slamSound != null) slamSound.Volume *= 1.5f; - if (Owner.whoAmI != Main.myPlayer || Owner.velocity.Y == 0f) + if (Owner.whoAmI != Main.myPlayer) return; if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 15) Main.LocalPlayer.Calamity().GeneralScreenShakePower = 15; - Projectile proj = Projectile.NewProjectileDirect(Owner.Center + (direction * 120 * projectile.scale), -direction, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_MonolithDamageBoost), 10f, Owner.whoAmI, Main.rand.Next(4), 1f); - proj.timeLeft = 81; + Projectile proj = Projectile.NewProjectileDirect(Owner.Center + (direction * 120 * projectile.scale), -direction * 16f, ProjectileType(), projectile.damage, 10f, Owner.whoAmI, 0.75f, MathHelper.Pi / 25f); + proj.scale = 3f; + proj.timeLeft = 50; SideSprouts(1, 150f, 1f * Charge / MaxCharge); @@ -1152,12 +1184,12 @@ namespace CalamityMod.Projectiles.Melee { Vector2 projPosition = Owner.Center + (direction * 120 * projectile.scale) + direction.RotatedBy((widestSurfaceAngle * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; Vector2 monolithRotation = direction.RotatedBy(Utils.AngleLerp(widestSurfaceAngle * -facing, 0f, projSize)); - Projectile proj = Projectile.NewProjectileDirect(projPosition, -monolithRotation, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_MonolithDamageBoost), 10f, Owner.whoAmI, Main.rand.Next(4), projSize); - if (proj.modProjectile is MercurialTidesMonolith monolith) + Projectile proj = Projectile.NewProjectileDirect(projPosition, -monolithRotation, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.ShockwaveAttunement_MonolithDamageBoost), 10f, Owner.whoAmI, Main.rand.Next(4), projSize); + if (proj.modProjectile is AndromedasStrideBoltSpawner spawner) { - monolith.WaitTimer = (1 - projSize) * 34f; - monolith.OriginDirection = direction; - monolith.Facing = facing; + spawner.WaitTimer = (1 - projSize) * 34f; + spawner.OriginDirection = direction; + spawner.Facing = facing; } } @@ -1172,44 +1204,30 @@ namespace CalamityMod.Projectiles.Melee public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { damage = (int)(damage * (1f + OmegaBiomeBlade.ShockwaveAttunement_FullChargeBoost * Charge / MaxCharge)); - - if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.ShockwaveAttunement_SwordProc) - sword.OnHitProc = true; - } + } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/OmegaBiomeBlade"); - Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_MercurialTides"); + Texture2D sword = GetTexture("CalamityMod/Items/Weapons/Melee/GalaxiaExtra"); float drawAngle = direction.ToRotation(); float drawRotation = drawAngle + MathHelper.PiOver4; - Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawOrigin = new Vector2(0f, sword.Height); Vector2 drawOffset = projectile.Center - Main.screenPosition; - spriteBatch.Draw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - - //Turn on additive blending - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - //Just in case + CalamityUtils.EnterShaderRegion(spriteBatch); + if (OverCharge < 0) OverCharge = 0f; //When the blink is GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(OverCharge / 20f); - GameShaders.Misc["CalamityMod:BasicTint"].UseColor(new Color(154, 244, 240)); + GameShaders.Misc["CalamityMod:BasicTint"].UseColor(new Color(255, 129, 153)); GameShaders.Misc["CalamityMod:BasicTint"].Apply(); - //Update the parameters - drawOrigin = new Vector2(0f, blade.Height); + spriteBatch.Draw(sword, drawOffset, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - spriteBatch.Draw(blade, drawOffset, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - - //Back to normal - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + CalamityUtils.ExitShaderRegion(spriteBatch); return false; } @@ -1243,32 +1261,187 @@ namespace CalamityMod.Projectiles.Melee } } + public class AndromedasStrideBoltSpawner : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public Player Owner => Main.player[projectile.owner]; + public ref float Size => ref projectile.ai[1]; //Yes + + public float WaitTimer; //How long until the monoliths appears + public Vector2 OriginDirection; //The direction of the original strike + public float Facing; //The direction of the original strike + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Andromeda Shock"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 70; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.timeLeft = 30; + projectile.hide = true; + } + + public override bool CanDamage() => false; + + public override void AI() + { + if (projectile.velocity != Vector2.Zero) + { + SurfaceUp(); + projectile.rotation = projectile.velocity.ToRotation(); + projectile.velocity = Vector2.Zero; + } + + if (WaitTimer > 0) + { + projectile.timeLeft = 30; + WaitTimer--; + } + + if (projectile.timeLeft == 29) + { + if (Size * 0.8 > 0.4 && Facing != 0) + SideSprouts(Facing, 150f, Size * 0.8f); + } + + if (projectile.timeLeft < 29) + { + if (Main.rand.Next(3) == 0) + { + Vector2 particleDirection = (projectile.rotation - MathHelper.PiOver4).ToRotationVector2(); + Vector2 flyDirection = particleDirection.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4 / 2f, MathHelper.PiOver4 / 2f)) * Main.rand.NextFloat(15f, 35f); + + Particle smoke = new HeavySmokeParticle(projectile.Center, flyDirection, Color.Lerp(Color.MidnightBlue, Color.Indigo, (float)Math.Sin(Main.GlobalTime * 6f)), 30, Main.rand.NextFloat(0.4f, 1.3f) * projectile.scale, 0.8f, 0, false, 0, true); + GeneralParticleHandler.SpawnParticle(smoke); + + if (Main.rand.Next(3) == 0) + { + Particle smokeGlow = new HeavySmokeParticle(projectile.Center, flyDirection, Color.Red, 20, Main.rand.NextFloat(0.1f, 0.7f) * projectile.scale, 0.8f, 0, true, 0.01f, true); + GeneralParticleHandler.SpawnParticle(smokeGlow); + } + + } + } + + if (projectile.timeLeft == 2) + { + //New bolt + Projectile proj = Projectile.NewProjectileDirect(projectile.position, projectile.rotation.ToRotationVector2() * 18f, ProjectileType(), projectile.damage, 10f, Owner.whoAmI, 0.75f, MathHelper.Pi / 25f); + proj.scale = Size * 3f; + proj.timeLeft = 50; + + Vector2 particleDirection = (projectile.rotation - MathHelper.PiOver2).ToRotationVector2(); + Main.PlaySound(SoundID.DD2_EtherianPortalDryadTouch, projectile.Center); + + for (int i = 0; i < 8; i++) + { + Vector2 hitPositionDisplace = particleDirection.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(0f, 10f); + Vector2 flyDirection = particleDirection.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver2, MathHelper.PiOver2)) * Main.rand.NextFloat(5f, 15f); + + Particle smoke = new HeavySmokeParticle(projectile.Center + hitPositionDisplace, flyDirection, Color.Lerp(Color.MidnightBlue, Color.Indigo, (float)Math.Sin(Main.GlobalTime * 6f)), 30, Main.rand.NextFloat(1.6f, 2.2f) * projectile.scale, 0.8f, 0, false, 0, true); + GeneralParticleHandler.SpawnParticle(smoke); + + if (Main.rand.Next(3) == 0) + { + Particle smokeGlow = new HeavySmokeParticle(projectile.Center + hitPositionDisplace, flyDirection, Color.Red, 20, Main.rand.NextFloat(1.4f, 1.7f) * projectile.scale, 0.8f, 0, true, 0.005f, true); + GeneralParticleHandler.SpawnParticle(smokeGlow); + } + } + } + } + + //Go up to the "surface" so you're not stuck in the middle of the ground like a complete moron. + public void SurfaceUp() + { + for (float i = 0; i < 40; i += 0.5f) + { + Vector2 positionToCheck = projectile.Center + projectile.velocity * i; + if (!Main.tile[(int)(positionToCheck.X / 16), (int)(positionToCheck.Y / 16)].IsTileSolidGround()) + { + projectile.Center = projectile.Center + projectile.velocity * i; + return; + } + } + projectile.Center = projectile.Center + projectile.velocity * 40f; + } + + public bool SideSprouts(float facing, float distance, float projSize) + { + float widestAngle = 0f; + float widestSurfaceAngle = 0f; + bool validPositionFound = false; + for (float i = 0f; i < 1; i += 1 / distance) + { + Vector2 positionToCheck = projectile.Center + OriginDirection.RotatedBy((i * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; + + if (Main.tile[(int)(positionToCheck.X / 16), (int)(positionToCheck.Y / 16)].IsTileSolidGround()) + widestAngle = i; + + else if (widestAngle != 0) + { + validPositionFound = true; + widestSurfaceAngle = widestAngle; + } + } + + if (validPositionFound) + { + Vector2 projPosition = projectile.Center + OriginDirection.RotatedBy((widestSurfaceAngle * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; + Vector2 monolithRotation = OriginDirection.RotatedBy(Utils.AngleLerp(widestSurfaceAngle * -facing, 0f, projSize)); + Projectile proj = Projectile.NewProjectileDirect(projPosition, -monolithRotation, ProjectileType(), projectile.damage, 10f, Owner.whoAmI, Main.rand.Next(4), projSize); + if (proj.modProjectile is AndromedasStrideBoltSpawner spawner) + { + spawner.WaitTimer = (float)Math.Sqrt(1.0 - Math.Pow(projSize - 1.0, 2)) * 3f; + spawner.OriginDirection = OriginDirection; + spawner.Facing = facing; + } + } + + return validPositionFound; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(WaitTimer); + writer.Write(Facing); + writer.WriteVector2(OriginDirection); + + } + public override void ReceiveExtraAI(BinaryReader reader) + { + WaitTimer = reader.ReadSingle(); + Facing = reader.ReadSingle(); + OriginDirection = reader.ReadVector2(); + } + } //Aries's Wrath aka FlailBlade attunement public class AriessWrath : ModProjectile { private NPC[] excludedTargets = new NPC[4]; - public override string Texture => "CalamityMod/Items/Weapons/Melee/GalaxiaExtra2"; public Player Owner => Main.player[projectile.owner]; public ref float ChainSwapTimer => ref projectile.ai[0]; - public ref float SnapCoyoteTime => ref projectile.ai[1]; private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; - const float MaxTangleReach = 400f; //How long can tangling vines from crits be - - //Doing your mom. Be warned that the X value of these vectors represents the angle of the whip while the Y value represents its RNG seed - public Vector2 whip1; - public Vector2 whip2; - public Vector2 whip3; + const float MaxProjReach = 500f; //How far away do you check for enemies for the extra projs from crits be public Particle smear; - public Particle smear2; + public Projectile lastConstellation; public override void SetStaticDefaults() { - DisplayName.SetDefault("Lamentations of the Chained"); + DisplayName.SetDefault("Aries's Wrath"); + + ProjectileID.Sets.TrailCacheLength[projectile.type] = 2; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } public override void SetDefaults() { @@ -1278,100 +1451,46 @@ namespace CalamityMod.Projectiles.Melee projectile.friendly = true; projectile.penetrate = -1; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = OmegaBiomeBlade.FlailBladeAttunement_LocalIFrames; + projectile.localNPCHitCooldown = FourSeasonsGalaxia.FlailBladeAttunement_LocalIFrames; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { - //Cuz it intializes the hooks as pointing flat to the right of the player and we dont want that. - if (ChainSwapTimer < OmegaBiomeBlade.FlailBladeAttunement_FlailTime) - return false; - - GenerateCurve(whip1.Y, whip1.X.ToRotationVector2(), out Vector2 control10, out Vector2 control11, out Vector2 control12, out Vector2 control13, (ChainSwapTimer % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, 1); - GenerateCurve(whip2.Y, whip2.X.ToRotationVector2(), out Vector2 control20, out Vector2 control21, out Vector2 control22, out Vector2 control23, ((ChainSwapTimer - OmegaBiomeBlade.FlailBladeAttunement_FlailTime / 3f) % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, -1); - GenerateCurve(whip3.Y, whip3.X.ToRotationVector2(), out Vector2 control30, out Vector2 control31, out Vector2 control32, out Vector2 control33, ((ChainSwapTimer - OmegaBiomeBlade.FlailBladeAttunement_FlailTime * 2f / 3f) % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, -1); - - if (Collision.CheckAABBvAABBCollision(targetHitbox.TopLeft(), targetHitbox.Size(), control13 - Vector2.One * 25f, Vector2.One * 50f) || - Collision.CheckAABBvAABBCollision(targetHitbox.TopLeft(), targetHitbox.Size(), control23 - Vector2.One * 25f, Vector2.One * 50f) || - Collision.CheckAABBvAABBCollision(targetHitbox.TopLeft(), targetHitbox.Size(), control33 - Vector2.One * 25f, Vector2.One * 50f) - ) - return true; - - //What you wanted me to calculate all 3 curves? Have straight line collisions instead - float CollisionPoint = 0f; - if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.MountedCenter, control13, 20f, ref CollisionPoint) || - Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.MountedCenter, control13, 20f, ref CollisionPoint) || - Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.MountedCenter, control13, 20f, ref CollisionPoint) - ) - return true; - - return false; - } - - public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - GenerateCurve(whip1.Y, whip1.X.ToRotationVector2(), out Vector2 control10, out Vector2 control11, out Vector2 control12, out Vector2 control13, (ChainSwapTimer % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, 1); - GenerateCurve(whip2.Y, whip2.X.ToRotationVector2(), out Vector2 control20, out Vector2 control21, out Vector2 control22, out Vector2 control23, ((ChainSwapTimer - OmegaBiomeBlade.FlailBladeAttunement_FlailTime / 3f) % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, -1); - GenerateCurve(whip3.Y, whip3.X.ToRotationVector2(), out Vector2 control30, out Vector2 control31, out Vector2 control32, out Vector2 control33, ((ChainSwapTimer - OmegaBiomeBlade.FlailBladeAttunement_FlailTime * 2f / 3f) % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, -1); - //If you hit the enemy with the blade of the whip, guarantee a crit - if (Collision.CheckAABBvAABBCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), control13 - Vector2.One * 25f, Vector2.One * 50f) || - Collision.CheckAABBvAABBCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), control23 - Vector2.One * 25f, Vector2.One * 50f) || - Collision.CheckAABBvAABBCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), control33 - Vector2.One * 25f, Vector2.One * 50f) - ) - { - - if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.FlailBladeAttunement_BladeProc) - sword.OnHitProc = true; - - - crit = true; - for (int i = 0; i < 2; i++) - { - Vector2 sparkSpeed = Owner.DirectionTo(target.Center).RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver2, MathHelper.PiOver2)) * 9f; - Particle Spark = new CritSpark(target.Center, sparkSpeed, Color.White, Color.Turquoise, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 1f); - GeneralParticleHandler.SpawnParticle(Spark); - } - - Vector2 sliceDirection = Main.rand.NextVector2CircularEdge(50f, 100f); - Particle SliceLine = new LineVFX(target.Center - sliceDirection, sliceDirection * 2f, 0.2f, Color.PaleTurquoise * 0.6f) - { - Lifetime = 6 - }; - GeneralParticleHandler.SpawnParticle(SliceLine); - } - - else - { - if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.FlailBladeAttunement_ChainProc) - sword.OnHitProc = true; - - damage = (int)(damage * OmegaBiomeBlade.FlailBladeAttunement_ChainDamageReduction); //If the enemy is hit with the chain of the whip, the damage gets reduced - crit = false; //For once, we also block crits completely from the chain - } + return Collision.CheckAABBvAABBCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center - Vector2.One * 50 * projectile.scale, Vector2.One * 100 * projectile.scale); } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - if (crit) + for (int i = 0; i < 2; i++) { - Main.PlaySound(mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/SwiftSlice"), projectile.Center); - excludedTargets[0] = target; - for (int i = 0; i < 3; i++) - { - NPC potentialTarget = TargetNext(target.Center, i); - if (potentialTarget == null) - break; - Projectile proj = Projectile.NewProjectileDirect(target.Center, Vector2.Zero, ProjectileType(), (int)(damage * OmegaBiomeBlade.FlailBladeAttunement_GhostChainDamageReduction), 0, Owner.whoAmI, target.whoAmI, potentialTarget.whoAmI); - if (proj.modProjectile is GhastlyChain chain) - chain.Gravity = Main.rand.NextFloat(30f, 50f); - } - Array.Clear(excludedTargets, 0, 3); + Vector2 sparkSpeed = Owner.DirectionTo(target.Center).RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver2, MathHelper.PiOver2)) * 9f; + Particle Spark = new CritSpark(target.Center, sparkSpeed, Color.White, Color.HotPink, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 1f); + GeneralParticleHandler.SpawnParticle(Spark); } + + Vector2 sliceDirection = Main.rand.NextVector2CircularEdge(50f, 100f); + Particle SliceLine = new LineVFX(target.Center - sliceDirection, sliceDirection * 2f, 0.2f, Color.HotPink * 0.6f) + { + Lifetime = 6 + }; + GeneralParticleHandler.SpawnParticle(SliceLine); + + excludedTargets[0] = target; + for (int i = 0; i < 3; i++) + { + NPC potentialTarget = TargetNext(target.Center, i); + if (potentialTarget == null) + break; + Projectile proj = Projectile.NewProjectileDirect(target.Center, target.DirectionTo(potentialTarget.Center) * 25f, ProjectileType(), (int)(damage * FourSeasonsGalaxia.FlailBladeAttunement_OnHitBoltDamageReduction), 0, Owner.whoAmI, 0.9f, MathHelper.PiOver4 * 0.4f); + proj.scale = 2f; + } + Array.Clear(excludedTargets, 0, 3); + } public NPC TargetNext(Vector2 hitFrom, int index) { - float longestReach = MaxTangleReach; + float longestReach = MaxProjReach; NPC target = null; for (int i = 0; i < 200; ++i) { @@ -1391,23 +1510,68 @@ namespace CalamityMod.Projectiles.Melee return target; } + //Animation keys + public CurveSegment slowIn = new CurveSegment(EasingType.PolyIn, 0f, 0.2f, 1f, 3); + public CurveSegment bounce = new CurveSegment(EasingType.SineBump, 0.3f, 1f, 0.2f); + public CurveSegment remain = new CurveSegment(EasingType.SineBump, 0.6f, 1f, -0.1f); + internal float ThrowDisplace() => PiecewiseAnimation(MathHelper.Clamp(ChainSwapTimer / 40f, 0, 1), new CurveSegment[] { slowIn, bounce, remain }); + + //Animation keys + public CurveSegment scaleUp = new CurveSegment(EasingType.PolyIn, 0f, 0.2f, 1f, 3); + public CurveSegment scaleDown = new CurveSegment(EasingType.SineBump, 0.3f, 1f, 0.2f); + internal float ScaleEquation() => PiecewiseAnimation(MathHelper.Clamp(ChainSwapTimer / 30f, 0, 1), new CurveSegment[] { scaleUp, scaleDown}); + + public override void AI() { if (!OwnerCanShoot) { - projectile.Kill(); + if ((Owner.Center - projectile.Center).Length() < 30f) + projectile.Kill(); + + else + { + if (projectile.timeLeft <= 2) + { + projectile.velocity *= 10f; + } + if (projectile.velocity.AngleBetween(Owner.Center - projectile.Center) > MathHelper.PiOver4) + projectile.velocity = (projectile.velocity.ToRotation().AngleTowards(projectile.DirectionTo(Owner.Center).ToRotation(), MathHelper.Pi / 20f)).ToRotationVector2() * projectile.velocity.Length() * 0.98f; + else + projectile.velocity = (projectile.velocity.ToRotation().AngleTowards(projectile.DirectionTo(Owner.Center).ToRotation(), MathHelper.Pi)).ToRotationVector2() * projectile.velocity.Length() * 1.05f; + projectile.rotation = Main.GlobalTime * 25f; + projectile.scale = MathHelper.Clamp((Owner.Center - projectile.Center).Length() / (FourSeasonsGalaxia.FlailBladeAttunement_Reach * 0.5f) , 0.3f, 2f); + projectile.timeLeft = 4; + } return; } - projectile.velocity = Owner.DirectionTo(Main.MouseWorld); - projectile.velocity.Normalize(); - projectile.rotation = projectile.velocity.ToRotation(); - projectile.Center = Owner.Center + (projectile.velocity * 60); + if (ChainSwapTimer == 0f) + { + projectile.Center = Owner.Center; + var scream = Main.PlaySound(SoundID.Item120, projectile.Center); + if (scream != null) + scream.Volume *= 0.5f; - //Make the owner look like theyre holding the sword bla bla + if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 3) + Main.LocalPlayer.Calamity().GeneralScreenShakePower = 3; + } + + projectile.scale = 1f + ScaleEquation(); + projectile.timeLeft = 2; + + projectile.Center = Vector2.Lerp(projectile.Center, Main.MouseWorld, 0.05f * ThrowDisplace()); + projectile.Center = projectile.Center.MoveTowards(Main.MouseWorld, 40f * ThrowDisplace()); + + if ((projectile.Center - Owner.Center).Length() > FourSeasonsGalaxia.FlailBladeAttunement_Reach) + projectile.Center = Owner.Center + Owner.DirectionTo(projectile.Center) * FourSeasonsGalaxia.FlailBladeAttunement_Reach; + + projectile.rotation = Main.GlobalTime * 25f; + //Make the owner look like theyre "holding" the sword bla bla Owner.heldProj = projectile.whoAmI; + projectile.velocity = Owner.DirectionTo(projectile.Center); Owner.direction = Math.Sign(projectile.velocity.X); - Owner.itemRotation = projectile.rotation; + Owner.itemRotation = projectile.velocity.ToRotation(); if (Owner.direction != 1) { Owner.itemRotation -= 3.14f; @@ -1415,262 +1579,156 @@ namespace CalamityMod.Projectiles.Melee Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); Owner.itemTime = 2; Owner.itemAnimation = 2; - projectile.timeLeft = 2; - if (ChainSwapTimer % OmegaBiomeBlade.FlailBladeAttunement_FlailTime == 1) + if (smear == null) { - Main.PlaySound(SoundID.DD2_OgreSpit, projectile.Center); - - Vector2 smearPos = Owner.Center + whip1.X.ToRotationVector2() * OmegaBiomeBlade.FlailBladeAttunement_Reach * Main.rand.NextFloat(0.7f, 1.1f); - Vector2 squish = new Vector2( Main.rand.NextFloat(3f, 4f), Main.rand.NextFloat(0.5f, 1f)); - - if (smear == null) - { - smear = new SemiCircularSmearVFX(smearPos, Color.PowderBlue * 0.5f, whip1.X + MathHelper.Pi, projectile.scale * 1.5f, squish); - smear.Lifetime = 2; - GeneralParticleHandler.SpawnParticle(smear); - } - //Update the variables of the smear - else - { - smear.Rotation = whip1.X + MathHelper.Pi; //Add some v ariation? - smear.Position = smearPos; - (smear as SemiCircularSmearVFX).Squish = squish; - } - - smearPos = Owner.Center + whip1.X.ToRotationVector2() * OmegaBiomeBlade.FlailBladeAttunement_Reach * Main.rand.NextFloat(0.8f, 1.3f); - squish = new Vector2(Main.rand.NextFloat(2f, 3f), Main.rand.NextFloat(0.9f, 1.4f)); - - if (smear2 == null) - { - smear2 = new SemiCircularSmearVFX(smearPos, Color.PowderBlue * 0.5f, whip2.X + MathHelper.Pi, projectile.scale * 1.5f, squish); - smear2.Lifetime = 2; - GeneralParticleHandler.SpawnParticle(smear2); - } - //Update the variables of the smear - else - { - smear2.Rotation = whip2.X + MathHelper.Pi; //Add some v ariation? - smear2.Position = smearPos; - (smear2 as SemiCircularSmearVFX).Squish = squish; - } + smear = new CircularSmearSmokeyVFX(projectile.Center, Color.MediumOrchid, projectile.rotation, projectile.scale); + GeneralParticleHandler.SpawnParticle(smear); } - if (smear != null) { - smear.Rotation = smear.Rotation.AngleTowards(projectile.velocity.ToRotation(), 0.01f); + smear.Position = projectile.Center; + smear.Rotation = projectile.rotation + MathHelper.PiOver2 + MathHelper.PiOver4; smear.Time = 0; - (smear as SemiCircularSmearVFX).Squish.Y *= 0.985f; - (smear as SemiCircularSmearVFX).Squish.X *= 1.01f; + smear.Scale = projectile.scale; + smear.Color.A = (byte)(255 * MathHelper.Clamp(ChainSwapTimer / 50f, 0, 1)); } - if (smear2 != null) + + if (Main.rand.NextBool()) { - smear2.Rotation = smear2.Rotation.AngleTowards(projectile.velocity.ToRotation(), 0.01f); - smear2.Time = 0; - (smear2 as SemiCircularSmearVFX).Squish.Y *= 0.985f; - (smear2 as SemiCircularSmearVFX).Squish.X *= 1.01f; + float maxDistance = projectile.scale * 82f; + Vector2 distance = Main.rand.NextVector2Circular(maxDistance, maxDistance); + Vector2 angularVelocity = Vector2.Normalize(distance.RotatedBy(MathHelper.PiOver2)) * 2f * (1f + distance.Length() / 15f); + Particle glitter = new CritSpark(projectile.Center + distance, angularVelocity, Main.rand.Next(3) == 0 ? Color.HotPink : Color.Plum, Color.DarkOrchid, 1f + 1 * (distance.Length() / maxDistance), 10, 0.05f, 3f); + GeneralParticleHandler.SpawnParticle(glitter); } + float smokeDistance = projectile.scale * 62f; + Vector2 smokePos = Main.rand.NextVector2Circular(smokeDistance, smokeDistance); + Vector2 smokeSpeed = Vector2.Normalize(smokePos.RotatedBy(MathHelper.PiOver2)) * 0.1f * (1f + smokePos.Length() / 15f); + Particle smoke = new HeavySmokeParticle(projectile.Center + smokePos, smokeSpeed, Color.Lerp(Color.Navy, Color.Indigo, (float)Math.Sin(Main.GlobalTime * 6f)), 30, Main.rand.NextFloat(0.4f, 1f) * projectile.scale, 0.8f, 0, false, 0, true); + GeneralParticleHandler.SpawnParticle(smoke); - //if ((ChainSwapTimer - 12f) % 23 == 0) - //{ - // Main.PlaySound(SoundID.Item41, projectile.Center); - //} + if (Main.rand.Next(3) == 0) + { + Particle smokeGlow = new HeavySmokeParticle(projectile.Center + smokePos, smokeSpeed, Main.hslToRgb(0.85f, 1, 0.5f), 20, Main.rand.NextFloat(0.4f, 1f) * projectile.scale, 0.8f, 0, true, 0.01f, true); + GeneralParticleHandler.SpawnParticle(smokeGlow); + } + + if (ChainSwapTimer % (20 - Math.Ceiling(14 * MathHelper.Clamp((projectile.position - projectile.oldPosition).Length() / 30f, 0, 1))) == 1) + { + if (lastConstellation != null && lastConstellation.active) + lastConstellation.Kill(); + + lastConstellation = Projectile.NewProjectileDirect(Owner.Center, Vector2.Zero, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.FlailBladeAttunement_ChainDamageReduction), 0, Owner.whoAmI); + if (lastConstellation.modProjectile is AriessWrathConstellation constellation) + { + constellation.SizeVector = projectile.Center - Owner.Center; + } + } ChainSwapTimer++; } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { - Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/OmegaBiomeBlade"); - Texture2D blade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained"); + Texture2D sword = GetTexture("CalamityMod/Items/Weapons/Melee/GalaxiaExtra2"); - CalculateChains(spriteBatch, out Vector2[] chainPositions1, out Vector2[] chainPositions2, out Vector2[] chainPositions3); - - //float drawRotation = (projBottom - chainPositions[chainPositions.Length - 2]).ToRotation() + MathHelper.PiOver4; //Face away from the last point of the bezier curve - - Vector2 drawPos = projectile.Center - projectile.velocity * 55f; - Vector2 drawOrigin = new Vector2(0f, handle.Height); + Vector2 drawPos = projectile.Center; + Vector2 drawOrigin = sword.Size() / 2f; float drawRotation = projectile.rotation + MathHelper.PiOver4; - //lightColor = Lighting.GetColor((int)(projectile.Center.X / 16f), (int)(projectile.Center.Y / 16f)); - - spriteBatch.Draw(handle, drawPos - Main.screenPosition, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - - - //Turn on additive blending - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - //Draw the tip of the flails here - Texture2D flailBlade = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedFlail"); - Rectangle bladeFrame = new Rectangle(0, 0, 24, 48); - Vector2 flailOrigin = new Vector2(bladeFrame.Width / 2, bladeFrame.Height); //Draw from center bottom of texture - - float flailRotation = (chainPositions1[chainPositions1.Length - 2] - chainPositions1[chainPositions1.Length - 3]).ToRotation() + MathHelper.PiOver2; - spriteBatch.Draw(flailBlade, chainPositions1[chainPositions1.Length - 2] - Main.screenPosition, bladeFrame, Color.White, flailRotation, flailOrigin, 1, SpriteEffects.None, 0); - - flailRotation = (chainPositions2[chainPositions2.Length - 2] - chainPositions2[chainPositions1.Length - 3]).ToRotation() + MathHelper.PiOver2; - spriteBatch.Draw(flailBlade, chainPositions2[chainPositions2.Length - 2] - Main.screenPosition, bladeFrame, Color.White, flailRotation, flailOrigin, 1, SpriteEffects.None, 0); - - flailRotation = (chainPositions3[chainPositions3.Length - 2] - chainPositions3[chainPositions3.Length - 3]).ToRotation() + MathHelper.PiOver2; - spriteBatch.Draw(flailBlade, chainPositions3[chainPositions3.Length - 2] - Main.screenPosition, bladeFrame, Color.White, flailRotation, flailOrigin, 1, SpriteEffects.None, 0); - - drawOrigin = new Vector2(0f, blade.Height); - spriteBatch.Draw(blade, drawPos - Main.screenPosition, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, projectile.scale, 0f, 0f); - //Back to normal - spriteBatch.End(); - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + spriteBatch.Draw(sword, drawPos - Main.screenPosition, null, lightColor, drawRotation, drawOrigin, projectile.scale, 0f, 0f); return false; } + } - //TLDR : https://media.discordapp.net/attachments/659100646397575208/933521303443501136/placeholder.gif - private void GenerateCurve(float seed, Vector2 direction, out Vector2 control0, out Vector2 control1, out Vector2 control2, out Vector2 control3, float angleShift = 0f, float necessaryOrientation = 1f) + public class AriessWrathConstellation : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public Player Owner => Main.player[projectile.owner]; + public float Timer => 20 - projectile.timeLeft; + + public Vector2 SizeVector; + + public override void SetStaticDefaults() { - float randomNumber = 0.5f + ((float)Math.Sin(seed * 17.07947) + (float)Math.Sin(seed * 0.2f * 25.13274)) * 0.25f ; //Ty dom for the awesome pseudo rng - //Get new random numbers based on the same seed - float seed1 = 0.5f + ((float)Math.Sin(randomNumber * 100f * 17.07947) + (float)Math.Sin(randomNumber * 100f * 0.2f * 25.13274)) * 0.25f; - float seed2 = 0.5f + ((float)Math.Sin(seed1 * 50f * 17.07947) + (float)Math.Sin(seed1 * 50f * 0.2f * 25.13274)) * 0.25f; - float seed3 = 0.5f + ((float)Math.Sin(seed2 * 17.07947) + (float)Math.Sin(seed2 * 0.2f * 25.13274)) * 0.25f; - - - if ((necessaryOrientation == -1 && randomNumber >= 0.5) || (necessaryOrientation == 1 && randomNumber < 0.5)) - randomNumber = 1 - randomNumber; - - randomNumber += angleShift * 0.1f * necessaryOrientation; - - - float flip = randomNumber >= 0.5 ? 1f : -1f; - - - control0 = Owner.MountedCenter + direction.RotatedBy(MathHelper.ToRadians(MathHelper.Lerp(MathHelper.PiOver4 * 0.3f * flip, MathHelper.PiOver4 * flip, randomNumber))) * MathHelper.Lerp(50f, 130f, (float)Math.Sin(randomNumber * MathHelper.Pi)); - - float easedShift = angleShift == 1 ? 1 : 1 - (float)Math.Pow(2, -10 * angleShift); - float Reach = OmegaBiomeBlade.FlailBladeAttunement_Reach * (0.75f + 0.75f * seed2 - 0.05f * easedShift); - control3 = Owner.MountedCenter + (direction * Reach).RotatedBy(MathHelper.Lerp(-0.01f * flip, 0.01f * flip, easedShift)); // The last point of the curve gets put straight at the front - - //Over the double fucking bezier rainbow - Vector2 point1 = control3 + direction.RotatedBy(MathHelper.PiOver2) * 50; - Vector2 point2 = control3 + direction.RotatedBy(MathHelper.PiOver2) * 50 + direction * 250; - Vector2 point3 = control3 + direction.RotatedBy(-MathHelper.PiOver2) * 50 + direction * 250; - Vector2 point4 = control3 + direction.RotatedBy(-MathHelper.PiOver2) * 50; - BezierCurve curve = new BezierCurve(new Vector2[] { point1, point2, point3, point4 }); - control3 = curve.Evaluate(randomNumber); - - Vector2 directionFromHead = direction.RotatedBy(MathHelper.ToRadians(MathHelper.Lerp(0, 160f * flip, (float)Math.Sin(randomNumber * MathHelper.Pi)))) * MathHelper.Lerp(130f, 200f, MathHelper.Clamp((float)Math.Sin(randomNumber * MathHelper.Pi) - 0.5f, 0f, 1f) * 2f); - control2 = control3 + directionFromHead; - - Vector2 directionFromSecondToLastPoint = Vector2.Normalize(directionFromHead.RotatedBy(MathHelper.Pi - MathHelper.ToRadians(MathHelper.Lerp(80f * flip, 110f * flip, (float)Math.Sin(randomNumber * MathHelper.Pi))))) * MathHelper.Lerp(120f, 280f, (float)Math.Sin(randomNumber * MathHelper.Pi)); - control1 = control2 + directionFromSecondToLastPoint; - - control3 += Vector2.UnitX.RotatedBy(MathHelper.TwoPi * seed1) * seed3 * 30f; - control2 += Vector2.UnitX.RotatedBy(MathHelper.TwoPi * seed2) * seed1 * 30f; - control1 += Vector2.UnitX.RotatedBy(MathHelper.TwoPi * seed3) * seed2 * 30f; + DisplayName.SetDefault("Constellation"); + } + public override void SetDefaults() + { + projectile.melee = true; + projectile.width = projectile.height = 8; + projectile.tileCollide = false; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 30; + projectile.timeLeft = 20; } - private void CalculateChains(SpriteBatch spriteBatch, out Vector2[] chainPositions1, out Vector2[] chainPositions2, out Vector2[] chainPositions3) + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { - - if (ChainSwapTimer % 6 == 0 || whip1.Y == 0) - { - whip1.X = projectile.velocity.RotatedBy(Main.rand.NextFloat(MathHelper.PiOver4 / 16f, -MathHelper.PiOver4 / 16f)).ToRotation(); //X is the orientation - whip1.Y = Main.rand.NextFloat(0.2f, 100f);//Y is the "seed" - - ChainSwapTimer++; - } - - if ((ChainSwapTimer - 2) % 6 == 0 || whip2.Y == 0) - { - whip2.X = projectile.velocity.RotatedBy(Main.rand.NextFloat(MathHelper.Pi / 16f, -MathHelper.Pi / 16f)).ToRotation(); //X is the orientation - whip2.Y = Main.rand.NextFloat(0.2f, 100f);//Y is the "seed" - - ChainSwapTimer++; - } - - if ((ChainSwapTimer - 4) % 6 == 0 || whip3.Y == 0) - { - whip3.X = projectile.velocity.RotatedBy(Main.rand.NextFloat(MathHelper.Pi / 16f, -MathHelper.Pi / 16f)).ToRotation(); //X is the orientation - whip3.Y = Main.rand.NextFloat(0.2f, 100f);//Y is the "seed" - - ChainSwapTimer++; - } - - GenerateCurve(whip1.Y, whip1.X.ToRotationVector2(), out Vector2 control0, out Vector2 control1, out Vector2 control2, out Vector2 control3, (ChainSwapTimer % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, 1); - DrawChain(spriteBatch, out chainPositions1, control0, control1, control2, control3); - - GenerateCurve(whip2.Y, whip2.X.ToRotationVector2(), out control0, out control1, out control2, out control3, ((ChainSwapTimer - OmegaBiomeBlade.FlailBladeAttunement_FlailTime / 3f) % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, -1); - DrawChain(spriteBatch, out chainPositions2, control0, control1, control2, control3); - - GenerateCurve(whip3.Y, whip3.X.ToRotationVector2(), out control0, out control1, out control2, out control3, ((ChainSwapTimer - OmegaBiomeBlade.FlailBladeAttunement_FlailTime * 2f / 3f) % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) / (float)OmegaBiomeBlade.FlailBladeAttunement_FlailTime, -1); - DrawChain(spriteBatch, out chainPositions3, control0, control1, control2, control3); + float collisionPoint = 0f; + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center, projectile.Center + SizeVector, 30f, ref collisionPoint); } - private void DrawChain(SpriteBatch spriteBatch, out Vector2[] chainPositions, Vector2 control0, Vector2 control1, Vector2 control2, Vector2 control3) + public override void AI() { - - Texture2D tex = GetTexture("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedFlail"); - Rectangle chainFrame = new Rectangle(0, 70, 24, 14); - Rectangle guardFrame = new Rectangle(0, 50, 24, 18); - - //First chain - BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, control0, control1, control2, control3 }); - int numPoints = 40; - chainPositions = curve.GetPoints(numPoints).ToArray(); - - //Draw each chain segment bar the very first one - for (int i = 1; i < numPoints; i++) + if (projectile.ai[0] == 0) { - Vector2 position = chainPositions[i]; + projectile.ai[0] = 1; + Vector2 previousStar = projectile.Center; + Vector2 offset; + Particle Line; + Particle Star = new GenericSparkle(previousStar, Vector2.Zero, Color.White, Color.Plum, Main.rand.NextFloat(1f, 1.5f), 20, 0f, 3f); + GeneralParticleHandler.SpawnParticle(Star); - float rotation = (chainPositions[i] - chainPositions[i - 1]).ToRotation() + MathHelper.PiOver2; //Calculate rotation based on direction from last point - Color chainLightColor = Lighting.GetColor((int)position.X / 16, (int)position.Y / 16); //Lighting of the position of the chain segment - if (i < numPoints - 1) + for (float i = 0 + Main.rand.NextFloat(0.2f, 0.5f); i < 1; i += Main.rand.NextFloat(0.2f, 0.5f)) { - float yScale = Vector2.Distance(chainPositions[i], chainPositions[i - 1]) / chainFrame.Height; //Calculate how much to squash/stretch for smooth chain based on distance between points + offset = Main.rand.NextFloat(-50f, 50f) * Vector2.Normalize(SizeVector.RotatedBy(MathHelper.PiOver2)); + Star = new GenericSparkle(projectile.Center + SizeVector * i + offset, Vector2.Zero, Color.White, Color.Plum, Main.rand.NextFloat(1f, 1.5f), 20, 0f, 3f); + GeneralParticleHandler.SpawnParticle(Star); - float segmentProgress = i < 30f ? i / 30f : 1 - (i - 30f) / 10f; - float xScale = 1f + 0.75f * (float)Math.Sin(segmentProgress * MathHelper.PiOver2); + Line = new BloomLineVFX(previousStar, projectile.Center + SizeVector * i + offset - previousStar, 0.8f, Color.MediumVioletRed * 0.75f, 20, true, true); + GeneralParticleHandler.SpawnParticle(Line); - Vector2 scale = new Vector2(xScale, yScale); //Remember to make it get thicker and thinner based on whatever - Vector2 origin = new Vector2(chainFrame.Width / 2, chainFrame.Height); //Draw from center bottom of texture - - float chainOpacity = MathHelper.Clamp((i / (float)numPoints) * 3f, 0f, 1f); - - spriteBatch.Draw(tex, chainPositions[i] - Main.screenPosition, chainFrame, chainLightColor * chainOpacity, rotation, origin, scale, SpriteEffects.None, 0); - } - else - { - Vector2 origin = new Vector2(guardFrame.Width / 2, guardFrame.Height); //Draw from center bottom of texture - spriteBatch.Draw(tex, chainPositions[i] - Main.screenPosition, guardFrame, chainLightColor, rotation, origin, 1, SpriteEffects.None, 0); - - if ((ChainSwapTimer % OmegaBiomeBlade.FlailBladeAttunement_FlailTime) == 1 && Main.rand.Next(3) == 0f) + if (Main.rand.Next(3) == 0) { - Particle Flake = new SnowflakeSparkle(chainPositions[i], Vector2.Zero, Color.PaleTurquoise, Color.MediumTurquoise, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 0.2f); - GeneralParticleHandler.SpawnParticle(Flake); + offset = Main.rand.NextFloat(-50f, 50f) * Vector2.Normalize(SizeVector.RotatedBy(MathHelper.PiOver2)); + Star = new GenericSparkle(projectile.Center + SizeVector * i + offset, Vector2.Zero, Color.White, Color.Plum, Main.rand.NextFloat(1f, 1.5f), 20, 0f, 3f); + GeneralParticleHandler.SpawnParticle(Star); + + Line = new BloomLineVFX(previousStar, projectile.Center + SizeVector * i + offset - previousStar, 0.8f, Color.MediumVioletRed * 0.75f, 20, true, true); + GeneralParticleHandler.SpawnParticle(Line); } + + previousStar = projectile.Center + SizeVector * i + offset; } + + Star = new GenericSparkle(projectile.Center + SizeVector, Vector2.Zero, Color.White, Color.Plum, Main.rand.NextFloat(1f, 1.5f), 20, 0f, 3f); + GeneralParticleHandler.SpawnParticle(Star); + + Line = new BloomLineVFX(previousStar, projectile.Center + SizeVector - previousStar, 0.8f, Color.MediumVioletRed * 0.75f, 20, true); + GeneralParticleHandler.SpawnParticle(Line); } } public override void SendExtraAI(BinaryWriter writer) { - writer.WriteVector2(whip1); - writer.WriteVector2(whip2); - writer.WriteVector2(whip3); + writer.WriteVector2(SizeVector); } public override void ReceiveExtraAI(BinaryReader reader) { - whip1 = reader.ReadVector2(); - whip2 = reader.ReadVector2(); - whip3 = reader.ReadVector2(); + SizeVector = reader.ReadVector2(); } + } - - } From a6232f3e476173bf284b2d8c7cd8ff0fb689a119 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Tue, 25 Jan 2022 03:43:04 +0100 Subject: [PATCH 74/76] Homestuck reference --- Items/Weapons/Melee/FourSeasonsGalaxia.cs | 25 +++++- Projectiles/Melee/GalaxiaCancer.png | Bin 0 -> 498 bytes Projectiles/Melee/GalaxiaCapricorn.png | Bin 0 -> 563 bytes Projectiles/Melee/GalaxiaProjectiles.cs | 97 ++++++++++++++++++++++ 4 files changed, 119 insertions(+), 3 deletions(-) create mode 100644 Projectiles/Melee/GalaxiaCancer.png create mode 100644 Projectiles/Melee/GalaxiaCapricorn.png diff --git a/Items/Weapons/Melee/FourSeasonsGalaxia.cs b/Items/Weapons/Melee/FourSeasonsGalaxia.cs index f7fc9379ee..866ce21e4a 100644 --- a/Items/Weapons/Melee/FourSeasonsGalaxia.cs +++ b/Items/Weapons/Melee/FourSeasonsGalaxia.cs @@ -59,6 +59,13 @@ namespace CalamityMod.Items.Weapons.Melee public static int FlailBladeAttunement_Reach = 600; public static float FlailBladeAttunement_ChainDamageReduction = 0.5f; public static float FlailBladeAttunement_OnHitBoltDamageReduction = 0.5f; + + public static int CancerPassiveDamage = 400; + public static int CancerPassiveLifeSteal = 1; + public static float CancerPassiveLifeStealProc = 0.4f; + public static int CapricornPassiveDebuffTime = 200; + + #endregion public override string Texture => "CalamityMod/Items/Weapons/Melee/GalaxiaExtra"; //Just in case the player SOMEHOW gets to swing galaxia itself. Sprite also used as the base for other attacks @@ -102,7 +109,7 @@ namespace CalamityMod.Items.Weapons.Melee if (l.text.StartsWith("FUNCTION_PASSIVE")) { AttunementInfo info = GetAttunementInfo(mainAttunement); - l.overrideColor = info.color; + l.overrideColor = info.passive_color; l.text = info.passive_desc; } @@ -182,13 +189,13 @@ namespace CalamityMod.Items.Weapons.Melee case Attunement.Whirlwind: case Attunement.FlailBlade: AttunementInfo.passive_name = "Capricorn's Blessing"; - AttunementInfo.passive_desc = "IDK"; + AttunementInfo.passive_desc = "Periodically releases a ring of weakening stars around your cursor when attacking"; AttunementInfo.passive_color = new Color(76, 137, 237); break; case Attunement.SuperPogo: case Attunement.Shockwave: AttunementInfo.passive_name = "Cancer's Blessing"; - AttunementInfo.passive_desc = "IDK"; + AttunementInfo.passive_desc = "Periodically releases a ring of lifestealing stars around yourself when attacking"; AttunementInfo.passive_color = new Color(203, 25, 119); break; default: @@ -366,9 +373,21 @@ namespace CalamityMod.Items.Weapons.Melee { case Attunement.SuperPogo: case Attunement.Shockwave: + if (UseTimer % 500 == 449) + { + Main.PlaySound(SoundID.Item78); + Projectile.NewProjectile(player.Center, Vector2.Zero, ProjectileType(), CancerPassiveDamage, 0f, player.whoAmI, 0f); + UseTimer++; + } break; case Attunement.FlailBlade: case Attunement.Whirlwind: + if (UseTimer % 500 == 449) + { + Main.PlaySound(SoundID.Item78); + Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, ProjectileType(), 0, 0f, player.whoAmI, 1f); + UseTimer++; + } break; default: break; diff --git a/Projectiles/Melee/GalaxiaCancer.png b/Projectiles/Melee/GalaxiaCancer.png new file mode 100644 index 0000000000000000000000000000000000000000..e25a8538f5edee09eee7fcea92beb1e39b664918 GIT binary patch literal 498 zcmVPx$tVu*cR9J=8n9Fg)FbqUjncU+J;u2JXsR~qrOG*hY!4(iH!6l>wxr1D|F^Hi^ zY2uNQy?{S`_ymFwI~c_nZIjhUvd3f(rhiWMJK1~fX2UQP+uvGm@hWvJ6i6+RVf|$4 z6iH2{zKSFX`XyE&MIvLe8MzQbU%Ro0+)~k!BFUR+&j|htVwThy073|(z34AeBx$e7 zlH?t5Oza&yk)o7u_5dIvHV#gJb7EX=Bd|2t~qpkhPINyPx_J>}Ndl?_<^{GO1P9+8b>)u{K|` zg#AZ;zWEgZM1*}kuqulvk_sW5%2)heM?xezYwMPn&MrQa{()0|iLp>Q oN!<0E%>Vh=Qpc;$V%-w^0nazE+++r34FCWD07*qoM6N<$g0fWIKmY&$ literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/GalaxiaCapricorn.png b/Projectiles/Melee/GalaxiaCapricorn.png new file mode 100644 index 0000000000000000000000000000000000000000..e353db0053939c58eb688ee1d8902a33b871c33e GIT binary patch literal 563 zcmV-30?hr1P)Px$?MXyIR9J=On9X&<#6OT$W* z%^^=PmwlGB{`tIGt+X130YPuUZjkCb*elAK<-gnQCT{2JWs%oEYBdZ4$!vq&%a}v3 z$6%H8UH)@PH%IstW6bRVpzr&Scz~I$#pfv3B>NHk6T$`msX5`QNy0^un3=IjiS6TY z1^-KEV%9hV0JBtWEH_D*Uwi<@m{VdAsg1OEmCx$L*5>y_O%mo8a`vu)k)%VgNYu`_3;oP0r(n->UbsoZ6iJ`NCPe$bcW-27IY0d)oCBI|s?;7~=D(G97iY|$qS$4YDUOfC7=D*)T@kOq_y^i0?8I`dG{Msxi-%b6t>Rb!5l6}LIUD{XMj+Vn(6*LCX(_RSGqQcL8rM{!RU>1WQv^i;Ds!oNr%x;SSOEn5Hp002ovPDHLkV1f*? B495Tf literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/GalaxiaProjectiles.cs b/Projectiles/Melee/GalaxiaProjectiles.cs index 17df9c720d..b19ca0fdc1 100644 --- a/Projectiles/Melee/GalaxiaProjectiles.cs +++ b/Projectiles/Melee/GalaxiaProjectiles.cs @@ -104,6 +104,103 @@ namespace CalamityMod.Projectiles.Melee } } + // Passive ring of star + + public class GalaxiaTropicRing : ModProjectile + { + public Player Owner => Main.player[projectile.owner]; + public ref float Mode => ref projectile.ai[0]; + public ref float Fade => ref projectile.ai[1]; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Star Ring"); + } + + public override void SetDefaults() + { + projectile.width = projectile.height = 30; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.timeLeft = 300; + projectile.melee = true; + projectile.tileCollide = false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (Mode == 0f && Main.rand.NextBool < FourSeasonsGalaxia.CancerPassiveLifeStealProc) + { + Owner.statLife += FourSeasonsGalaxia.CancerPassiveLifeSteal; + Owner.HealEffect(FourSeasonsGalaxia.CancerPassiveLifeSteal); + } + else + { + target.AddBuff(BuffType(), FourSeasonsGalaxia.CapricornPassiveDebuffTime); + } + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + return Collision.CheckAABBvAABBCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center - Vector2.One * 95 * projectile.scale, Vector2.One * 190 * projectile.scale); + } + + public override void AI() + { + Fade = projectile.timeLeft > 250 ? (float)Math.Sin((300 - projectile.timeLeft) / 50f * MathHelper.PiOver2) * 0.6f + 0.4f : projectile.timeLeft > 50 ? 1f : (float)Math.Sin((projectile.timeLeft) / 50f * MathHelper.PiOver2); + Lighting.AddLight(projectile.Center, 0.75f, 1f, 0.24f); + + } + + public Vector2 starPosition(int MaxStars, int StarIndex, float diameter) + { + float starHeight = (float)Math.Sin(Main.GlobalTime * 3 + StarIndex * MathHelper.TwoPi / (float)MaxStars); + float starWidth = (float)Math.Cos(Main.GlobalTime * 3 + StarIndex * MathHelper.TwoPi / (float)MaxStars); + + return projectile.Center + projectile.rotation.ToRotationVector2() * starWidth * (projectile.scale * diameter * 0.4f) + (projectile.rotation + MathHelper.PiOver2).ToRotationVector2() * starHeight * (projectile.scale * diameter * 0.4f); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D sigil = GetTexture(Mode == 0 ? "CalamityMod/Projectiles/Melee/GalaxiaCancer" : "CalamityMod/Projectiles/Melee/GalaxiaCapricorn"); //OMG Karkat and Gamzee from homestuck i am a big fan + Texture2D ring = GetTexture("CalamityMod/Particles/BloomRing"); + Texture2D starTexture = GetTexture("CalamityMod/Particles/Sparkle"); + Texture2D lineTexture = GetTexture("CalamityMod/Particles/BloomLine"); + Texture2D bloomTexture = GetTexture("CalamityMod/Particles/BloomCircle"); + + Color ringColor = Mode == 0 ? new Color(255, 0, 0) * Fade : new Color(66, 0, 176) * Fade; + + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + + spriteBatch.Draw(bloomTexture, projectile.Center - Main.screenPosition, null, ringColor * 0.5f, 0, bloomTexture.Size() / 2f, 2.5f, SpriteEffects.None, 0); + spriteBatch.Draw(ring, projectile.Center - Main.screenPosition, null, ringColor * 0.8f, 0f, ring.Size() / 2f, projectile.scale, 0f, 0f); + + spriteBatch.Draw(sigil, projectile.Center - Main.screenPosition, null, ringColor * MathHelper.Lerp(0.7f, 0f, ((Main.GlobalTime * 5f) % 10) / 10f), 0f, sigil.Size() / 2f, projectile.scale + ((Main.GlobalTime * 5f) % 10) / 10f * 2f, 0f, 0f) ; + spriteBatch.Draw(sigil, projectile.Center - Main.screenPosition, null, Color.White * Fade, 0f, sigil.Size() / 2f, projectile.scale, 0f, 0f); + + for (int i = 0; i < 5; i++) + { + + Vector2 starPos = starPosition(5, i, ring.Width); + + Vector2 LineVector = starPosition(5, i + 1, ring.Width) - starPos; + float rot = LineVector.ToRotation() + MathHelper.PiOver2; + Vector2 origin = new Vector2(lineTexture.Width / 2f, lineTexture.Height); + Vector2 scale = new Vector2(0.3f, LineVector.Length() / lineTexture.Height); + + spriteBatch.Draw(lineTexture, starPos - Main.screenPosition, null, Color.White * Fade * 0.7f, rot, origin, scale, SpriteEffects.None, 0); + + spriteBatch.Draw(bloomTexture, starPos - Main.screenPosition, null, ringColor * 0.5f, 0, bloomTexture.Size() / 2f, 0.1f, SpriteEffects.None, 0); + spriteBatch.Draw(starTexture, starPos - Main.screenPosition, null, ringColor * 0.5f, Main.GlobalTime * 5 + MathHelper.PiOver4 * i, starTexture.Size() / 2f ,1f, SpriteEffects.None, 0); + spriteBatch.Draw(starTexture, starPos - Main.screenPosition, null, Color.White * Fade, Main.GlobalTime * 5, starTexture.Size() / 2f, 1.4f, SpriteEffects.None, 0); + } + + return false; + } + } + //Phoenix's pride aka Whirlwind attunement From afb39be4457b4ea3ba6bf254cf229d61e580ebd5 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Tue, 25 Jan 2022 04:28:46 +0100 Subject: [PATCH 75/76] Stuffed magnets into your magic rings --- Items/Weapons/Melee/FourSeasonsGalaxia.cs | 8 ++++---- Projectiles/Melee/GalaxiaProjectiles.cs | 9 ++++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Items/Weapons/Melee/FourSeasonsGalaxia.cs b/Items/Weapons/Melee/FourSeasonsGalaxia.cs index 866ce21e4a..c32f46e971 100644 --- a/Items/Weapons/Melee/FourSeasonsGalaxia.cs +++ b/Items/Weapons/Melee/FourSeasonsGalaxia.cs @@ -60,8 +60,8 @@ namespace CalamityMod.Items.Weapons.Melee public static float FlailBladeAttunement_ChainDamageReduction = 0.5f; public static float FlailBladeAttunement_OnHitBoltDamageReduction = 0.5f; - public static int CancerPassiveDamage = 400; - public static int CancerPassiveLifeSteal = 1; + public static int CancerPassiveDamage = 3000; + public static int CancerPassiveLifeSteal = 3; public static float CancerPassiveLifeStealProc = 0.4f; public static int CapricornPassiveDebuffTime = 200; @@ -189,13 +189,13 @@ namespace CalamityMod.Items.Weapons.Melee case Attunement.Whirlwind: case Attunement.FlailBlade: AttunementInfo.passive_name = "Capricorn's Blessing"; - AttunementInfo.passive_desc = "Periodically releases a ring of weakening stars around your cursor when attacking"; + AttunementInfo.passive_desc = "Periodically releases a ring of weakening stars around your cursor when attacking\nThe ring is repelled away from you at first, before slowing down over time"; AttunementInfo.passive_color = new Color(76, 137, 237); break; case Attunement.SuperPogo: case Attunement.Shockwave: AttunementInfo.passive_name = "Cancer's Blessing"; - AttunementInfo.passive_desc = "Periodically releases a ring of lifestealing stars around yourself when attacking"; + AttunementInfo.passive_desc = "Periodically releases a ring of lifestealing stars around yourself when attacking\nThe ring is attracted towards you at first, before slowing down over time"; AttunementInfo.passive_color = new Color(203, 25, 119); break; default: diff --git a/Projectiles/Melee/GalaxiaProjectiles.cs b/Projectiles/Melee/GalaxiaProjectiles.cs index b19ca0fdc1..61b930bc2d 100644 --- a/Projectiles/Melee/GalaxiaProjectiles.cs +++ b/Projectiles/Melee/GalaxiaProjectiles.cs @@ -130,7 +130,7 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - if (Mode == 0f && Main.rand.NextBool < FourSeasonsGalaxia.CancerPassiveLifeStealProc) + if (Mode == 0f && Main.rand.NextFloat() < FourSeasonsGalaxia.CancerPassiveLifeStealProc) { Owner.statLife += FourSeasonsGalaxia.CancerPassiveLifeSteal; Owner.HealEffect(FourSeasonsGalaxia.CancerPassiveLifeSteal); @@ -148,6 +148,13 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { + projectile.velocity *= 0.95f; + + if (Mode == 0f) + projectile.Center = Vector2.Lerp(projectile.Center, Owner.Center, 0.4f * MathHelper.Clamp((projectile.timeLeft - 150) / 150f, 0, 1)); + else + projectile.velocity = Utils.SafeNormalize(projectile.Center - Owner.Center, Vector2.Zero) * MathHelper.Clamp((projectile.timeLeft - 150) / 150f, 0, 1) * 3f * (5f - MathHelper.Clamp((projectile.Center - Owner.Center).Length() / 150f, 0, 4f)); + Fade = projectile.timeLeft > 250 ? (float)Math.Sin((300 - projectile.timeLeft) / 50f * MathHelper.PiOver2) * 0.6f + 0.4f : projectile.timeLeft > 50 ? 1f : (float)Math.Sin((projectile.timeLeft) / 50f * MathHelper.PiOver2); Lighting.AddLight(projectile.Center, 0.75f, 1f, 0.24f); From 3a2394634529d916401b2bc4ad3ae860117eee89 Mon Sep 17 00:00:00 2001 From: IbanPlay <56191483+IbanPlay@users.noreply.github.com> Date: Tue, 25 Jan 2022 17:24:21 +0100 Subject: [PATCH 76/76] if Owner.whoAmI == Main.myPlayer --- Items/Weapons/Melee/FourSeasonsGalaxia.cs | 3 +- Items/Weapons/Melee/OmegaBiomeBlade.cs | 2 +- Items/Weapons/Melee/TrueBiomeBlade.cs | 2 +- Projectiles/Melee/GalaxiaProjectiles.cs | 62 +++++++++------- .../Melee/MendedBiomeBladeProjectiles.cs | 23 +++--- .../Melee/TrueBiomeBladeProjectiles.cs | 72 +++++++++---------- 6 files changed, 89 insertions(+), 75 deletions(-) diff --git a/Items/Weapons/Melee/FourSeasonsGalaxia.cs b/Items/Weapons/Melee/FourSeasonsGalaxia.cs index c32f46e971..d20afe6992 100644 --- a/Items/Weapons/Melee/FourSeasonsGalaxia.cs +++ b/Items/Weapons/Melee/FourSeasonsGalaxia.cs @@ -364,11 +364,10 @@ namespace CalamityMod.Items.Weapons.Melee break; } - + //Passive effects only jappen player side haha if (player.whoAmI != Main.myPlayer) return; - //PAssive effetcsts : break switch (mainAttunement) { case Attunement.SuperPogo: diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index 64b29c45fc..aed3d19d30 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -373,8 +373,8 @@ namespace CalamityMod.Items.Weapons.Melee if (player.whoAmI != Main.myPlayer) return; - //PAssive effetcsts + //PAssive effetcsts only happen on the side of the owner if (secondaryAttunement != Attunement.FlailBlade || MeatHook == null || !MeatHook.active) MeatHook = null; diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 424fb84b25..37f544ed1c 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -507,7 +507,7 @@ namespace CalamityMod.Items.Weapons.Melee //This is only used for the purity sigil effect of the default attunement public override void OnHitNPC(Player player, NPC target, int damage, float knockBack, bool crit) { - if (mainAttunement != Attunement.Default) + if (mainAttunement != Attunement.Default || player.whoAmI != Main.myPlayer) return; foreach (Projectile proj in Main.projectile) diff --git a/Projectiles/Melee/GalaxiaProjectiles.cs b/Projectiles/Melee/GalaxiaProjectiles.cs index 61b930bc2d..9bdfc476be 100644 --- a/Projectiles/Melee/GalaxiaProjectiles.cs +++ b/Projectiles/Melee/GalaxiaProjectiles.cs @@ -310,11 +310,14 @@ namespace CalamityMod.Projectiles.Melee GeneralParticleHandler.SpawnParticle(Sparkle); } - //Actually do projectiles - for (int i = 0; i <= 5; i++) + //Actually do projectiles now + if (Owner.whoAmI == Main.myPlayer) { - float angle = direction.ToRotation() + MathHelper.Lerp(-MathHelper.PiOver4, MathHelper.PiOver4, i / 5f); - Projectile.NewProjectile(Owner.Center, angle.ToRotationVector2() * 30f, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.WhirlwindAttunement_BoltThrowDamageMultiplier), 0f, Owner.whoAmI, 0.1f, MathHelper.Pi * 0.02f); + for (int i = 0; i <= 5; i++) + { + float angle = direction.ToRotation() + MathHelper.Lerp(-MathHelper.PiOver4, MathHelper.PiOver4, i / 5f); + Projectile.NewProjectile(Owner.Center, angle.ToRotationVector2() * 30f, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.WhirlwindAttunement_BoltThrowDamageMultiplier), 0f, Owner.whoAmI, 0.1f, MathHelper.Pi * 0.02f); + } } } } @@ -373,7 +376,7 @@ namespace CalamityMod.Projectiles.Melee } } - if ((Empowerment + OverEmpowerment) % 30 == 29) + if ((Empowerment + OverEmpowerment) % 30 == 29 && Owner.whoAmI == Main.myPlayer) { Vector2 shotDirection = Main.rand.NextVector2CircularEdge(15f, 15f); Projectile.NewProjectile(Owner.Center, shotDirection, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.WhirlwindAttunement_BoltDamageReduction), 0f, Owner.whoAmI, 0.1f, MathHelper.Pi * 0.02f); @@ -405,7 +408,10 @@ namespace CalamityMod.Projectiles.Melee if (CanDirectFire && deltaAngleShoot < 0.1f) { - Projectile.NewProjectile(Owner.Center, Owner.DirectionTo(Main.MouseWorld) * 15f, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.WhirlwindAttunement_BoltDamageReduction), 0f, Owner.whoAmI, 0.1f, MathHelper.Pi * 0.02f); + if (Owner.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(Owner.Center, Owner.DirectionTo(Main.MouseWorld) * 15f, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.WhirlwindAttunement_BoltDamageReduction), 0f, Owner.whoAmI, 0.1f, MathHelper.Pi * 0.02f); + } CanDirectFire = false; AngleReset = Owner.DirectionTo(Main.MouseWorld).ToRotation(); } @@ -711,21 +717,25 @@ namespace CalamityMod.Projectiles.Melee { Dashing = false; Owner.velocity *= 0.1f; //Abrupt stop - - for (int i = 0; i < 5; i++) - { - Projectile blast = Projectile.NewProjectileDirect(Owner.Center, Main.rand.NextVector2CircularEdge(15, 15), ProjectileType(), (int)(FourSeasonsGalaxia.SuperPogoAttunement_SlashBoltsDamage * Owner.meleeDamage), 0f, Owner.whoAmI, 0.55f, MathHelper.Pi * 0.02f); - { - blast.timeLeft = 100; - } - } - Main.PlaySound(mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/MeatySlash"), projectile.Center); - Projectile proj = Projectile.NewProjectileDirect(Owner.Center - DashStart / 2f, Vector2.Zero, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.SuperPogoAttunement_SlashDamageBoost), 0, Owner.whoAmI); - if (proj.modProjectile is PolarissGazeDash dash) + + if (Owner.whoAmI == Main.myPlayer) { - dash.DashStart = DashStart; - dash.DashEnd = Owner.Center; + for (int i = 0; i < 5; i++) + { + Projectile blast = Projectile.NewProjectileDirect(Owner.Center, Main.rand.NextVector2CircularEdge(15, 15), ProjectileType(), (int)(FourSeasonsGalaxia.SuperPogoAttunement_SlashBoltsDamage * Owner.meleeDamage), 0f, Owner.whoAmI, 0.55f, MathHelper.Pi * 0.02f); + { + blast.timeLeft = 100; + } + } + + + Projectile proj = Projectile.NewProjectileDirect(Owner.Center - DashStart / 2f, Vector2.Zero, ProjectileType(), (int)(projectile.damage * FourSeasonsGalaxia.SuperPogoAttunement_SlashDamageBoost), 0, Owner.whoAmI); + if (proj.modProjectile is PolarissGazeDash dash) + { + dash.DashStart = DashStart; + dash.DashEnd = Owner.Center; + } } } @@ -1144,7 +1154,7 @@ namespace CalamityMod.Projectiles.Melee Charge++; OverCharge--; projectile.timeLeft = 2; - if ((Charge / MaxCharge >= 0.25f && CurrentIndicator == 0f) || (Charge / MaxCharge >= 0.5f && CurrentIndicator == 1f) || (Charge / MaxCharge >= 0.75f && CurrentIndicator == 2f)) + if ((Charge / MaxCharge >= 0.25f && CurrentIndicator == 0f) || (Charge / MaxCharge >= 0.5f && CurrentIndicator == 1f) || (Charge / MaxCharge >= 0.75f && CurrentIndicator == 2f) && Owner.whoAmI == Main.myPlayer) { //WOahhh do a ring of projectiles!! woahhh for (int i = 0; i < 5; i++) @@ -1189,7 +1199,6 @@ namespace CalamityMod.Projectiles.Melee } } - OverCharge = 20f; Main.PlaySound(mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/CorvinaScream"), projectile.Center); CurrentIndicator++; @@ -1435,9 +1444,12 @@ namespace CalamityMod.Projectiles.Melee if (projectile.timeLeft == 2) { //New bolt - Projectile proj = Projectile.NewProjectileDirect(projectile.position, projectile.rotation.ToRotationVector2() * 18f, ProjectileType(), projectile.damage, 10f, Owner.whoAmI, 0.75f, MathHelper.Pi / 25f); - proj.scale = Size * 3f; - proj.timeLeft = 50; + if (Owner.whoAmI == Main.myPlayer) + { + Projectile proj = Projectile.NewProjectileDirect(projectile.position, projectile.rotation.ToRotationVector2() * 18f, ProjectileType(), projectile.damage, 10f, Owner.whoAmI, 0.75f, MathHelper.Pi / 25f); + proj.scale = Size * 3f; + proj.timeLeft = 50; + } Vector2 particleDirection = (projectile.rotation - MathHelper.PiOver2).ToRotationVector2(); Main.PlaySound(SoundID.DD2_EtherianPortalDryadTouch, projectile.Center); @@ -1719,7 +1731,7 @@ namespace CalamityMod.Projectiles.Melee GeneralParticleHandler.SpawnParticle(smokeGlow); } - if (ChainSwapTimer % (20 - Math.Ceiling(14 * MathHelper.Clamp((projectile.position - projectile.oldPosition).Length() / 30f, 0, 1))) == 1) + if (ChainSwapTimer % (20 - Math.Ceiling(14 * MathHelper.Clamp((projectile.position - projectile.oldPosition).Length() / 30f, 0, 1))) == 1 && Owner.whoAmI == Main.myPlayer) { if (lastConstellation != null && lastConstellation.active) lastConstellation.Kill(); diff --git a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs index e397973dfc..1f16cf2fb6 100644 --- a/Projectiles/Melee/MendedBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/MendedBiomeBladeProjectiles.cs @@ -236,13 +236,15 @@ namespace CalamityMod.Projectiles.Melee Main.PlaySound(mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/SwiftSlice"), Owner.Center); - Projectile proj = Projectile.NewProjectileDirect(Owner.Center - PowerLungeStart / 2f, Vector2.Zero, ProjectileType(), (int)(projectile.damage * TrueBiomeBlade.EvilAttunement_SlashDamageBoost), 0, Owner.whoAmI); - if (proj.modProjectile is DecaysRetortDash dash) + if (Owner.whoAmI == Main.myPlayer) { - dash.DashStart = PowerLungeStart; - dash.DashEnd = Owner.Center; + Projectile proj = Projectile.NewProjectileDirect(Owner.Center - PowerLungeStart / 2f, Vector2.Zero, ProjectileType(), (int)(projectile.damage * TrueBiomeBlade.EvilAttunement_SlashDamageBoost), 0, Owner.whoAmI); + if (proj.modProjectile is DecaysRetortDash dash) + { + dash.DashStart = PowerLungeStart; + dash.DashEnd = Owner.Center; + } } - dashTimer = maxDash + 1; } } @@ -598,7 +600,7 @@ namespace CalamityMod.Projectiles.Melee if (projectile.frameCounter % 5 == 0 && projectile.frame + 1 < Main.projFrames[projectile.type]) projectile.frame++; - if (Main.rand.NextBool()) + if (Main.rand.NextBool() && Owner.whoAmI == Main.myPlayer) { Projectile mist = Projectile.NewProjectileDirect(Owner.Center + direction * 40 + Main.rand.NextVector2Circular(30f, 30f), Vector2.Zero, ProjectileType(), (int)(projectile.damage * TrueBiomeBlade.ColdAttunement_MistDamageReduction), 0f, Owner.whoAmI); mist.velocity = (mist.Center - Owner.Center) * 0.2f + Owner.velocity; @@ -608,7 +610,7 @@ namespace CalamityMod.Projectiles.Melee else { - if (Main.rand.NextFloat(0f, 1f) > 0.75f) + if (Main.rand.NextFloat(0f, 1f) > 0.75f && Owner.whoAmI == Main.myPlayer) { Projectile.NewProjectile(Owner.Center + direction * 40, rotation.ToRotationVector2() * 5, ProjectileType(), (int)(projectile.damage * TrueBiomeBlade.ColdAttunement_MistDamageReduction), 0f, Owner.whoAmI); @@ -2302,9 +2304,10 @@ namespace CalamityMod.Projectiles.Melee var splash = new LegacySoundStyle(SoundID.Splash, 0).WithPitchVariance(Main.rand.NextFloat()); Main.PlaySound(splash, projectile.Center); - - Projectile proj = Projectile.NewProjectileDirect(Owner.Center, direction * 0.1f + Owner.velocity , ProjectileType(), projectile.damage, 0, Owner.whoAmI); - + if (Owner.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(Owner.Center, direction * 0.1f + Owner.velocity, ProjectileType(), projectile.damage, 0, Owner.whoAmI); + } Particle Sparkle = new CritSpark(projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(7.5f, 20f), Color.White, Main.rand.NextBool() ? Color.CornflowerBlue : Color.DodgerBlue, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); GeneralParticleHandler.SpawnParticle(Sparkle); diff --git a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs index 7157038590..0e49ef2967 100644 --- a/Projectiles/Melee/TrueBiomeBladeProjectiles.cs +++ b/Projectiles/Melee/TrueBiomeBladeProjectiles.cs @@ -131,38 +131,34 @@ namespace CalamityMod.Projectiles.Melee if (CurrentState == 0f) { - if (Owner.whoAmI == Main.myPlayer) + + if (hasMadeChargeSound == 0f && Empowerment / maxEmpowerment >= 0.5) { - if (hasMadeChargeSound == 0f && Empowerment / maxEmpowerment >= 0.5) - { - hasMadeChargeSound = 1f; - Main.PlaySound(SoundID.Item76); - } - - float rotation = direction.ToRotation(); - if (rotation > -MathHelper.PiOver2 - MathHelper.PiOver4 && rotation < -MathHelper.PiOver2 + MathHelper.PiOver4 && hasMadeSound == 1f) - hasMadeSound = 0f; - - else if (rotation > MathHelper.PiOver2 - MathHelper.PiOver4 && rotation < MathHelper.PiOver2 + MathHelper.PiOver4 && hasMadeSound == 0f) - { - CanDirectFire = true; - hasMadeSound = 1f; - Main.PlaySound(SoundID.Item71); - } + hasMadeChargeSound = 1f; + Main.PlaySound(SoundID.Item76, projectile.Center); } - if (Empowerment / maxEmpowerment >= 0.5) - { + float rotation = direction.ToRotation(); + if (rotation > -MathHelper.PiOver2 - MathHelper.PiOver4 && rotation < -MathHelper.PiOver2 + MathHelper.PiOver4 && hasMadeSound == 1f) + hasMadeSound = 0f; - if ((Empowerment + OverEmpowerment) % 30 == 29) - { - Vector2 shotDirection = Main.rand.NextVector2CircularEdge(15f, 15f); - if (lastTarget != null && lastTarget.active) //If you've got an actual target, angle your shots towards them - { - shotDirection = (shotDirection.ToRotation().AngleTowards(Owner.AngleTo(lastTarget.Center), MathHelper.PiOver2)).ToRotationVector2() * 15f; - } - Projectile.NewProjectile(Owner.Center, shotDirection, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.WhirlwindAttunement_BeamDamageReduction), 0f, Owner.whoAmI); - } + else if (rotation > MathHelper.PiOver2 - MathHelper.PiOver4 && rotation < MathHelper.PiOver2 + MathHelper.PiOver4 && hasMadeSound == 0f) + { + CanDirectFire = true; + hasMadeSound = 1f; + Main.PlaySound(SoundID.Item71, projectile.Center); + } + + + if (Empowerment / maxEmpowerment >= 0.5 && (Empowerment + OverEmpowerment) % 30 == 29 && Owner.whoAmI == Main.myPlayer) + { + Vector2 shotDirection = Main.rand.NextVector2CircularEdge(15f, 15f); + if (lastTarget != null && lastTarget.active) //If you've got an actual target, angle your shots towards them + { + shotDirection = (shotDirection.ToRotation().AngleTowards(Owner.AngleTo(lastTarget.Center), MathHelper.PiOver2)).ToRotationVector2() * 15f; + } + Projectile.NewProjectile(Owner.Center, shotDirection, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.WhirlwindAttunement_BeamDamageReduction), 0f, Owner.whoAmI); + } @@ -207,7 +203,10 @@ namespace CalamityMod.Projectiles.Melee Particle Blink = new GenericSparkle(Owner.Center + Owner.DirectionTo(Main.MouseWorld) * projectile.scale * 1.88f * 78f, Owner.velocity, Color.White, currentColor, 1.5f, 10, 0.1f, 3f); GeneralParticleHandler.SpawnParticle(Blink); - Projectile.NewProjectile(Owner.Center, Owner.DirectionTo(Main.MouseWorld) * 15f, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.WhirlwindAttunement_BeamDamageReduction), 0f, Owner.whoAmI); + if (Owner.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(Owner.Center, Owner.DirectionTo(Main.MouseWorld) * 15f, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.WhirlwindAttunement_BeamDamageReduction), 0f, Owner.whoAmI); + } CanDirectFire = false; AngleReset = Owner.DirectionTo(Main.MouseWorld).ToRotation(); } @@ -647,13 +646,15 @@ namespace CalamityMod.Projectiles.Melee Owner.velocity *= 0.1f; //Abrupt stop Main.PlaySound(mod.GetLegacySoundSlot(Terraria.ModLoader.SoundType.Custom, "Sounds/Custom/MeatySlash"), projectile.Center); - Projectile proj = Projectile.NewProjectileDirect(Owner.Center - DashStart / 2f, Vector2.Zero, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.SuperPogoAttunement_SlashDamageBoost), 0, Owner.whoAmI); - if (proj.modProjectile is SanguineFuryDash dash) + if (Owner.whoAmI == Main.myPlayer) { - dash.DashStart = DashStart; - dash.DashEnd = Owner.Center; + Projectile proj = Projectile.NewProjectileDirect(Owner.Center - DashStart / 2f, Vector2.Zero, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.SuperPogoAttunement_SlashDamageBoost), 0, Owner.whoAmI); + if (proj.modProjectile is SanguineFuryDash dash) + { + dash.DashStart = DashStart; + dash.DashEnd = Owner.Center; + } } - } Owner.Calamity().LungingDown = false; @@ -1113,9 +1114,8 @@ namespace CalamityMod.Projectiles.Melee Charge++; OverCharge--; projectile.timeLeft = 2; - if ((Charge / MaxCharge >= 0.25f && CurrentIndicator == 0f) || (Charge / MaxCharge >= 0.5f && CurrentIndicator == 1f) || (Charge / MaxCharge >= 0.75f && CurrentIndicator == 2f)) + if ((Charge / MaxCharge >= 0.25f && CurrentIndicator == 0f) || (Charge / MaxCharge >= 0.5f && CurrentIndicator == 1f) || (Charge / MaxCharge >= 0.75f && CurrentIndicator == 2f) && Owner.whoAmI == Main.myPlayer) { - Projectile.NewProjectile(Owner.Center, Vector2.Zero, ProjectileType(), (int)(projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_BlastDamageReduction), 10f, Owner.whoAmI, 1f + CurrentIndicator * 0.15f); Main.PlaySound(SoundID.DD2_WitherBeastAuraPulse, projectile.Center); CurrentIndicator++;