Just some minor things, made the Jewel hitboxes bigger, removed the previous greyscale Jewel sprite.

This commit is contained in:
mountaindrew10 committed 2024-08-21 08:35:28 -05:00
1 parent bee6e852ea
commit 473c0de4ff
4 files changed
+17 -28

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

+6 -10
View File
@@ -37,8 +37,8 @@ namespace CalamityMod.NPCs.NormalNPCs
NPC.aiStyle = -1;
AIType = -1;
NPC.GetNPCDamage();
NPC.width = 22;
NPC.height = 22;
NPC.width = 32;
NPC.height = 32;
NPC.defense = 15;
NPC.DR_NERD(0.15f);
NPC.lifeMax = 240;
@@ -245,8 +245,8 @@ namespace CalamityMod.NPCs.NormalNPCs
Asset<Texture2D> tex = ModContent.Request<Texture2D>(Texture);
Asset<Texture2D> tex2 = ModContent.Request<Texture2D>("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)
{
+6 -12
View File
@@ -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<Texture2D> tex = ModContent.Request<Texture2D>(Texture);
Asset<Texture2D> tex2 = ModContent.Request<Texture2D>("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));
}
}
}
}
+5 -6
View File
@@ -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<Texture2D> tex = ModContent.Request<Texture2D>(Texture);
Asset<Texture2D> tex2 = ModContent.Request<Texture2D>("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);
}