From 1cd1bbde9752386066fbfb40f073268a48422ced Mon Sep 17 00:00:00 2001 From: Xyk Date: Fri, 7 Mar 2025 20:02:04 -0800 Subject: [PATCH] Seashine Sword Sprite --- Items/Weapons/Summon/SeashineSword.cs | 4 ++-- Items/Weapons/Summon/SeashineSword.png | Bin 784 -> 1057 bytes Projectiles/Summon/SeashineSwordProj.cs | 25 ++++++++++++------------ 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Items/Weapons/Summon/SeashineSword.cs b/Items/Weapons/Summon/SeashineSword.cs index f14d68a6f2..3425ef6d93 100644 --- a/Items/Weapons/Summon/SeashineSword.cs +++ b/Items/Weapons/Summon/SeashineSword.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Items.Weapons.Summon } public override void SetDefaults() { - Item.width = 40; - Item.height = 40; + Item.width = 32; + Item.height = 34; Item.useTime = 10; Item.useAnimation = 10; Item.damage = 55; diff --git a/Items/Weapons/Summon/SeashineSword.png b/Items/Weapons/Summon/SeashineSword.png index ec74860678f6648b24e1651d5f2f21b25117f5b0..bc4e025446444dd3e4a1af7b3686c7cde842f45e 100644 GIT binary patch literal 1057 zcmV++1m63JP)U>h*?d$b`aT5T$j!+mv){4Q-A$k)t||l z8vWnYL5&#};E{=yZHo!sB_1(oDdMW&yvxUe(=MMoo|R;r_?B4G3TlS9Ni3&3^n3@G zie;^}gV^4m)mN9r9O_ZbVG|}8icnF31O?%L{L_vm;#3HD6?Va!XbBie+=k*;rwF^@ErnnmGiG7&g~k7pMfj=2Nx-7yeN088vphGE_JDiE`eTlqeE=TMvz4aN)p&1gx6u_$M_yoA|XBd-rn#1 z-tYUF_ug-2*HKDw5M3zDY71WFJ?B6L3^_*zprOxG0AHTZ3J3rn{WZe4vlq~eA6)=3 zPMxX&V0dvxo1gCU*gL-(&Nqbd{|BJaO#^T|*8@Pmn*(5ZYyyDlGbsRu@?I?9??CJW z5JQn{ZSAFY0DdN#wftk-?_=WvC;%c8#9n|*{-$Oi`u<@{8%w*1In=gi<)>P1*k6r{v^mOgDHotEh{xbkEZt1-WfJ$}&@VWR> z%iCGkFJI-%Hzm*c9@0aQ z{(%QL{gxhsvb$x^F`ueD!G_<(Bu8RXgZEHuz2y9xwjzHpbPAfi(_8abG#|m$yAQ!* z^uXxT+o+J<%jTxBwTcNsZNpKV_1t|0bspRTrRPYF#G?k}aB=BiK7xGm6`eb9y4d3a z(a)(Lh^-raP^ZHPZzz6BkRT(9XlB$XYMCs&maj>Pq@&D?yB zxDZ$ab@*07c_7jMmZ0IAWa8aR_|)mv=i}qy_kgokbZ17>33^g_tS2Ap@glb$@%LPk zFlVLa_aM8vG!H>wEcUj7#KJwh5Kjqm+$@Z~sG1PmYebbNSmi+yW0fSAc>M%Rg=7L` z*xk(Y`aC%0yPNBOtLhV!iLqkNwS4#)mPn5K?Cz2?F((Vci>{nLH@VOJ*{b>k<#+DK z5926yMvybAyg2TF O0000= 120 + bladeValue) // Reset values after a swing { + Projectile.netUpdate = true; attackTimer = 80; Projectile.ai[0] = 0; setPos = true; @@ -159,6 +161,7 @@ namespace CalamityMod.Projectiles.Summon float lerp = Utils.GetLerpValue(30 + bladeValue, 100 + bladeValue, attackTimer, true); if (setPos) { + Projectile.netUpdate = true; startPos = Projectile.Center; endPos = Owner.Calamity().mouseWorld + toMouse * 480; Projectile.numHits = 0; @@ -200,6 +203,7 @@ namespace CalamityMod.Projectiles.Summon } if (readySound && bladeCharge >= 1) // Effect when the blade is fully charged { + Projectile.netUpdate = true; for (int i = 0; i < 8; i++) { Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 1.5f)); @@ -216,13 +220,13 @@ namespace CalamityMod.Projectiles.Summon // I do not recommend reusing this effect unless you're using it carefully if ((returnSpeed == baseReturnSpeed && bladeCharge >= 1 || (isAttacking && attackTimer > bladeValue + 5)) || isSpawning) { - Particle orb = new CustomSpark(tipPosition, tipVel.SafeNormalize(Vector2.UnitX), "CalamityMod/Particles/BloomCircle", false, 25, Utils.Remap(tipVel.Length(), 2, 15, 0.15f, 0.3f, true) * Projectile.scale, mainColor * 0.65f, new Vector2(1f, 1), true, true, shrinkSpeed: Utils.Remap(tipVel.Length(), 1, 8, 0f, 0.4f, true), glowOpacity: 0.8f); + Particle orb = new CustomSpark(tipPosition, tipVel.SafeNormalize(Vector2.UnitX), "CalamityMod/Particles/BloomCircle", false, isAttacking ? 30 : 12, Utils.Remap(tipVel.Length(), 2, 15, 0.15f, 0.3f, true) * Projectile.scale, mainColor * 0.65f, new Vector2(1f, isAttacking ? 1.3f : 1), true, true, shrinkSpeed: Utils.Remap(tipVel.Length(), 1, 8, 0f, 0.4f, true), glowOpacity: 0.5f, glowCenterScale: 0.8f); GeneralParticleHandler.SpawnParticle(orb); } // The uncharge of the blades when you're not holding the item or after they slash if (!isAttacking && (attackTimer > 0 || !attackMode)) { - bladeCharge = MathHelper.Lerp(bladeCharge, 0, 0.025f); + bladeCharge = MathHelper.Clamp(MathHelper.Lerp(bladeCharge, 0, 0.025f), 0.4f, 1); if (attackTimer > 0) attackTimer--; readySound = true; @@ -258,10 +262,10 @@ namespace CalamityMod.Projectiles.Summon Vector2 drawPos = Projectile.Center - Main.screenPosition; float extremeLerp = (float)Math.Pow(bladeCharge, 10); for (int i = 0; i < 3; i++) - Main.EntitySpriteDraw(tex2, drawPos - (Vector2.UnitY.RotatedBy(Projectile.rotation + MathHelper.ToRadians(90)) * 43 * bladeCharge * Projectile.scale), null, Color.Lerp(mainColor, Color.White, i * 0.3f) with { A = 0 }, Projectile.rotation + MathHelper.ToRadians(90), tex2.Size() * 0.5f, new Vector2(0.33f - i * 0.05f, (0.75f + i * 0.03f) * bladeCharge) * 0.05f * Projectile.scale, SpriteEffects.None); + Main.EntitySpriteDraw(tex2, drawPos - (Vector2.UnitY.RotatedBy(Projectile.rotation + MathHelper.ToRadians(90)) * 59 * bladeCharge * Projectile.scale), null, Color.Lerp(mainColor, Color.White, i * 0.3f) with { A = 0 }, Projectile.rotation + MathHelper.ToRadians(90), tex2.Size() * 0.5f, new Vector2(0.33f - i * 0.05f, (0.75f + i * 0.03f) * bladeCharge) * 0.05f * Projectile.scale, SpriteEffects.None); for (int i = 0; i < 2; i++) - Main.EntitySpriteDraw(tex, drawPos, null, Color.Lerp(lightColor, (i == 0 ? Color.White : mainColor) with { A = 0 }, extremeLerp), Projectile.rotation + MathHelper.ToRadians(45), tex.Size() * 0.5f, i == 0 ? 0.8f : 1, SpriteEffects.None); + Main.EntitySpriteDraw(tex, drawPos, null, Color.Lerp(lightColor, (i == 0 ? Color.White : mainColor) with { A = 0 }, extremeLerp), Projectile.rotation + MathHelper.ToRadians(45), tex.Size() * 0.5f, (i == 0 ? 0.8f : 1) * Projectile.scale, SpriteEffects.None); if (!isAttacking && bladeCharge < 1) { @@ -279,11 +283,8 @@ namespace CalamityMod.Projectiles.Summon { if (i % 2 == 0) { - //Particle spark = new SeaPrismParticle(Projectile.Center, (Projectile.velocity.SafeNormalize(Vector2.UnitX)).RotatedByRandom(0.6f) * Main.rand.NextFloat(10f, 30f), true, 45, Main.rand.NextFloat(0.85f, 1.1f), Color.White, Vector2.One, false, Main.rand.NextFloat(-0.3f, 0.3f), affectedByLight: false); - //GeneralParticleHandler.SpawnParticle(spark); - - BloodParticle water = new BloodParticle(Projectile.Center, (Projectile.velocity.SafeNormalize(Vector2.UnitX)).RotatedByRandom(0.6f) * Main.rand.NextFloat(7f, 20f) - Vector2.UnitY, 23, Main.rand.NextFloat(0.9f, 1.3f), Main.rand.NextBool() ? Color.Cyan : Color.DodgerBlue); - GeneralParticleHandler.SpawnParticle(water); + Particle spark = new SeaPrismParticle(Projectile.Center, (Projectile.velocity.SafeNormalize(Vector2.UnitX)).RotatedByRandom(0.6f) * Main.rand.NextFloat(10f, 30f), true, 40, Main.rand.NextFloat(0.85f, 1.3f), Color.White, Vector2.One, false, Main.rand.NextFloat(-0.3f, 0.3f), affectedByLight: false); + GeneralParticleHandler.SpawnParticle(spark); } Particle e = new CustomSpark(Projectile.Center, (Projectile.velocity.SafeNormalize(Vector2.UnitX)).RotatedByRandom(0.6f) * Main.rand.NextFloat(7f, 20f), "CalamityMod/Particles/WaterFoam", false, 14, Main.rand.NextFloat(0.1f, 0.2f) * 2.5f, Main.rand.NextBool() ? Color.Cyan : Color.DodgerBlue, new Vector2(1f, 1f), true, false, shrinkSpeed: 0.4f);