From 473c0de4ff2a71b3b7c1fbfbb8cce7ef1b601ff4 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Wed, 21 Aug 2024 08:35:28 -0500 Subject: [PATCH] Just some minor things, made the Jewel hitboxes bigger, removed the previous greyscale Jewel sprite. --- NPCs/NormalNPCs/KingSlimeJewel.png | Bin 4327 -> 0 bytes NPCs/NormalNPCs/KingSlimeJewelEmerald.cs | 16 ++++++---------- NPCs/NormalNPCs/KingSlimeJewelRuby.cs | 18 ++++++------------ NPCs/NormalNPCs/KingSlimeJewelSapphire.cs | 11 +++++------ 4 files changed, 17 insertions(+), 28 deletions(-) delete mode 100644 NPCs/NormalNPCs/KingSlimeJewel.png diff --git a/NPCs/NormalNPCs/KingSlimeJewel.png b/NPCs/NormalNPCs/KingSlimeJewel.png deleted file mode 100644 index 906567e7a781fb129a5600fc9dd81fc1b39f87df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4327 zcmeHKeQ*SZ-3A8{GR81XLqfqV(uhuj#i`5OmdYuD&c)HJdw29;kEtc2jNxI(NJ9@ zS28gq91(dT01&x83=j|(c#S6B6ZDk)yaP#VzqYO@+V+SdP&RD%vZB}FR%Y9 zwGDma@XH(Jshx9NTjrNzO_`OuF7OX^eVoO=)M(3l^mA)VB5DH)dI0p#Wd89kKJuUVvBwPD?$Mw5~&*zF#d z-9DTSOk(?v7j5Moo?onPS@{YYt(@kV+4#crZ_b^)dv#XRw$i=yE;BZ{dCE(h2a2z@ ze6jIMB<;o>z6rkmsne$&A86{h7PeemapjOFhGt*vwm;vDN{4oScK+(IMJspyDGS^7 z^@LgTo@%68j(t1$aQCJ1-iG;qzFxoO$djR0Gv<3wy!A}as)H0>`C)-6wBm~6d!+7& zCH?(*1D_IESnuQb3;cznf9>0CtkB)De^1W`yUI5fW##gZtj+V6XGbf(+>1xM(hlB# zv@G|7OWnq*aPG15=OT0d;cRm|`xgB6^ul9hGpg#(JokXNzNhf(n=ALM*uM35`?{Su zT*;XyUcc0w-d=p9=Vzx{n18mRwdeocTfo!jj~DmUuX)8<6(xa1v26VJ|Sd7ue^I0MFh@BNW+*ITVtoFH+M#2^Bb>O(RU$3jxB zLXqHb0EvwVVObDEh{DNu#i(pUQ8c(A^0CDD-gdDj1^NZrUNTQN^jtVMCR8X-;GX zj#eK{M$$sEfWvq%XTb~{VZ<-6e>ur6CjU;Fq!lO zL11Q%*Fy@%j9DnJ2_xa5C-kg=1$+|4yodn1k_jY7rBHE@iengHBq$?hq-83bAT4@>)oh|Hw?GR(M1n1+u<8jNWm0E2mM(>y3~U`C$oK#r4*Apxr7$#12TIE* zoeG&%JIsc*M*t&>k!n#4*ia=lM4=p+cEbh5F*4&|WB|Ppq=6xI$O(M?|3fRw2PsSxy-bjx|9aJwSW{Kt$;2oz3<&CCLJ)OX&j~<08AZd$% z?w-HWKC%@K=>=o`DUYE#{FE*bWZcP^^c|OLT&^)GFedPLca6(6CI!X>9`CLn zO)l-NpD7T6UqCVVtK|2t@x$M&RB!oQhvw#*jmHneQF^#+k)+XNWGiQiX502D&^S?c zxt$ZgxNSz}?fI9P?qX=_b2&XY~wC#(ew}0h4u<5QH=?8B!=bv0kf6@g`o_GW6 z>+SqQLp-lwpyFTe#%e!Wx?}U@M_*rQCZpef-r9e$#?ySR@y#<`e_xZktLnznxv8JF zbQDG2o(1yS1`P{S8uqQFoxQuK9+lT*c)Gq@@|!*P{jGgd>NC5ye%AN tex = ModContent.Request(Texture); Asset tex2 = ModContent.Request("CalamityMod/NPCs/NormalNPCs/KingSlimeJewelFlash"); - Main.EntitySpriteDraw(tex.Value, NPC.Center - Main.screenPosition, tex.Frame(), Color.White, NPC.rotation, tex.Frame().Center(), 1f, SpriteEffects.None); - Main.EntitySpriteDraw(tex2.Value, NPC.Center - Main.screenPosition, tex2.Frame(), Color.Lerp(col, flashCol, alph).MultiplyRGBA(new Color(alph, alph, alph, 0f)), NPC.rotation, tex2.Frame().Center(), alph * 1.2f, SpriteEffects.None); + Main.EntitySpriteDraw(tex.Value, NPC.Center - screenPos, tex.Frame(), Color.White, NPC.rotation, tex.Frame().Center(), 1f, SpriteEffects.None); + Main.EntitySpriteDraw(tex2.Value, NPC.Center - screenPos, tex2.Frame(), Color.Lerp(col, flashCol, alph).MultiplyRGBA(new Color(alph, alph, alph, 0f)), NPC.rotation, tex2.Frame().Center(), alph * 1.2f, SpriteEffects.None); return false; } @@ -261,16 +261,12 @@ namespace CalamityMod.NPCs.NormalNPCs float start = Main.rand.NextFloat(MathHelper.TwoPi); for (int i = 0; i < 3; i++) - { GeneralParticleHandler.SpawnParticle(new CustomSprite(NPC.Center, new Vector2(0, -2).RotatedByRandom(start + MathHelper.ToRadians(20f)).RotatedBy(MathHelper.ToRadians(i * 125)), 120, "CalamityMod/Particles/KingSlimeEmeraldShards", 1f, new Color(255, 255, 255), Main.rand.NextFloat(0.2f, 0.6f), frameCount: 3, frame: i)); - } + SoundEngine.PlaySound(KingSlimeJewelRuby.ShatterSound, NPC.Center); } - public override Color? GetAlpha(Color drawColor) - { - return Color.White; - } + public override Color? GetAlpha(Color drawColor) => Color.White; public override void ApplyDifficultyAndPlayerScaling(int numPlayers, float balance, float bossAdjustment) { diff --git a/NPCs/NormalNPCs/KingSlimeJewelRuby.cs b/NPCs/NormalNPCs/KingSlimeJewelRuby.cs index 47a8b164c6..e652a93458 100644 --- a/NPCs/NormalNPCs/KingSlimeJewelRuby.cs +++ b/NPCs/NormalNPCs/KingSlimeJewelRuby.cs @@ -40,8 +40,8 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.aiStyle = -1; AIType = -1; NPC.damage = 0; // 0 contact damage, projectile damage is pulled from NPCStats - NPC.width = 22; - NPC.height = 22; + NPC.width = 32; + NPC.height = 32; NPC.defense = 10; NPC.DR_NERD(0.1f); NPC.lifeMax = 120; @@ -180,9 +180,8 @@ namespace CalamityMod.NPCs.NormalNPCs float start = Main.rand.NextFloat(MathHelper.TwoPi); for (int i = 0; i < 3; i++) - { GeneralParticleHandler.SpawnParticle(new CustomSprite(NPC.Center, new Vector2(0, -2).RotatedByRandom(start + MathHelper.ToRadians(20f)).RotatedBy(MathHelper.ToRadians(i * 125)), 120, "CalamityMod/Particles/KingSlimeRubyShards", 1f, new Color(255, 255, 255), Main.rand.NextFloat(0.2f, 0.6f), frameCount: 3, frame: i)); - } + SoundEngine.PlaySound(ShatterSound, NPC.Center); } @@ -201,16 +200,13 @@ namespace CalamityMod.NPCs.NormalNPCs Asset tex = ModContent.Request(Texture); Asset tex2 = ModContent.Request("CalamityMod/NPCs/NormalNPCs/KingSlimeJewelFlash"); - Main.EntitySpriteDraw(tex.Value, NPC.Center - Main.screenPosition, tex.Frame(), Color.White, NPC.rotation, tex.Frame().Center(), 1f, SpriteEffects.None); - Main.EntitySpriteDraw(tex2.Value, NPC.Center - Main.screenPosition, tex2.Frame(), Color.Lerp(col, flashCol, alph).MultiplyRGBA(new Color(alph, alph, alph, 0f)), NPC.rotation, tex2.Frame().Center(), alph * 1.2f, SpriteEffects.None); + Main.EntitySpriteDraw(tex.Value, NPC.Center - screenPos, tex.Frame(), Color.White, NPC.rotation, tex.Frame().Center(), 1f, SpriteEffects.None); + Main.EntitySpriteDraw(tex2.Value, NPC.Center - screenPos, tex2.Frame(), Color.Lerp(col, flashCol, alph).MultiplyRGBA(new Color(alph, alph, alph, 0f)), NPC.rotation, tex2.Frame().Center(), alph * 1.2f, SpriteEffects.None); return false; } - public override Color? GetAlpha(Color drawColor) - { - return Color.White; - } + public override Color? GetAlpha(Color drawColor) => Color.White; public override void ApplyDifficultyAndPlayerScaling(int numPlayers, float balance, float bossAdjustment) { @@ -222,9 +218,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void HitEffect(NPC.HitInfo hit) { for (int i = 0; i < 6; i++) - { GeneralParticleHandler.SpawnParticle(new PointParticle(NPC.Center, new Vector2(Main.rand.NextFloat(10), 0).RotatedByRandom(MathHelper.TwoPi), false, 10, Main.rand.NextFloat(0.5f, 1.5f), Color.Red)); - } } } } diff --git a/NPCs/NormalNPCs/KingSlimeJewelSapphire.cs b/NPCs/NormalNPCs/KingSlimeJewelSapphire.cs index 48f3531a86..3b34725efb 100644 --- a/NPCs/NormalNPCs/KingSlimeJewelSapphire.cs +++ b/NPCs/NormalNPCs/KingSlimeJewelSapphire.cs @@ -34,8 +34,8 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.aiStyle = -1; AIType = -1; NPC.damage = 0; - NPC.width = 22; - NPC.height = 22; + NPC.width = 32; + NPC.height = 32; NPC.defense = 5; NPC.DR_NERD(0.05f); NPC.lifeMax = 120; @@ -200,8 +200,8 @@ namespace CalamityMod.NPCs.NormalNPCs Asset tex = ModContent.Request(Texture); Asset tex2 = ModContent.Request("CalamityMod/NPCs/NormalNPCs/KingSlimeJewelFlash"); - Main.EntitySpriteDraw(tex.Value, NPC.Center - Main.screenPosition, tex.Frame(), Color.White, NPC.rotation, tex.Frame().Center(), 1f, SpriteEffects.None); - Main.EntitySpriteDraw(tex2.Value, NPC.Center - Main.screenPosition, tex2.Frame(), Color.Lerp(col, flashCol, alph).MultiplyRGBA(new Color(alph, alph, alph, 0f)), NPC.rotation, tex2.Frame().Center(), alph * 1.2f, SpriteEffects.None); + Main.EntitySpriteDraw(tex.Value, NPC.Center - screenPos, tex.Frame(), Color.White, NPC.rotation, tex.Frame().Center(), 1f, SpriteEffects.None); + Main.EntitySpriteDraw(tex2.Value, NPC.Center - screenPos, tex2.Frame(), Color.Lerp(col, flashCol, alph).MultiplyRGBA(new Color(alph, alph, alph, 0f)), NPC.rotation, tex2.Frame().Center(), alph * 1.2f, SpriteEffects.None); return false; } @@ -234,9 +234,8 @@ namespace CalamityMod.NPCs.NormalNPCs float start = Main.rand.NextFloat(MathHelper.TwoPi); for (int i = 0; i < 3; i++) - { GeneralParticleHandler.SpawnParticle(new CustomSprite(NPC.Center, new Vector2(0, -2).RotatedByRandom(start + MathHelper.ToRadians(20f)).RotatedBy(MathHelper.ToRadians(i * 125)), 120, "CalamityMod/Particles/KingSlimeSapphireShards", 1f, new Color(255, 255, 255), Main.rand.NextFloat(0.2f, 0.6f), frameCount: 3, frame: i)); - } + SoundEngine.PlaySound(KingSlimeJewelRuby.ShatterSound, NPC.Center); }