From 1da1a257adf9965309ab115969f901c0f7ad6d1b Mon Sep 17 00:00:00 2001 From: HwakYuk <133916598+HwakYuk@users.noreply.github.com> Date: Sun, 28 Apr 2024 06:04:56 +0900 Subject: [PATCH] Fix Baby Cannonball Jellyfish bestiary bug (#36) --- NPCs/Abyss/BabyCannonballJellyfish.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/NPCs/Abyss/BabyCannonballJellyfish.cs b/NPCs/Abyss/BabyCannonballJellyfish.cs index 005e45e222..1799c81f6d 100644 --- a/NPCs/Abyss/BabyCannonballJellyfish.cs +++ b/NPCs/Abyss/BabyCannonballJellyfish.cs @@ -19,11 +19,12 @@ namespace CalamityMod.NPCs.Abyss public class BabyCannonballJellyfish : ModNPC { public bool hasBeenHit = false; + public int explosionDamage; public override void SetStaticDefaults() { Main.npcFrameCount[NPC.type] = 7; - //Main.npcCatchable[NPC.type] = true; + Main.npcCatchable[NPC.type] = true; NPCID.Sets.CountsAsCritter[NPC.type] = true; } @@ -34,7 +35,8 @@ public override void SetDefaults() NPC.chaseable = false; NPC.aiStyle = -1; AIType = -1; - NPC.damage = 30; + NPC.damage = 0; + explosionDamage = 30; NPC.width = 28; NPC.height = 36; NPC.defense = 0; @@ -157,7 +159,7 @@ private void Explode() NPC.position -= NPC.Size * 0.5f; //hitbox expansion + adjustments SoundEngine.PlaySound(SoundID.Item14, NPC.Center); //bomb sound foreach (Player player in Main.player.Where(player => player.active && !player.dead && NPC.Hitbox.Intersects(player.Hitbox))) - player.Hurt(PlayerDeathReason.ByNPC(NPC.whoAmI), NPC.damage, NPC.direction); + player.Hurt(PlayerDeathReason.ByNPC(NPC.whoAmI), explosionDamage, NPC.direction); for (int k = 0; k < 8; k++) { int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.MoonBoulder, 0f, -1f, 0, default, 1f); @@ -169,8 +171,6 @@ private void Explode() NPC.netUpdate = true; } - public override bool CanHitPlayer(Player target, ref int cooldownSlot) => NPC.life <= 0; - public override void HitEffect(NPC.HitInfo hit) { for (int k = 0; k < 2; k++)