diff --git a/Localization/en-US/Mods.CalamityMod.Items.Pets.hjson b/Localization/en-US/Mods.CalamityMod.Items.Pets.hjson index 2020bbdbea..c774e5f087 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Pets.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Pets.hjson @@ -108,12 +108,12 @@ HermitsBoxofOneHundredMedicines: { IronBall: { DisplayName: Iron Ball - Tooltip: - ''' - Summons a living iron ball - the pet to pet it - the pet to have it sit on your shoulder - ''' + Tooltip: + ''' + Summons a living iron ball + the pet to pet it + the pet to have it sit on your shoulder + ''' } JoyfulHeart: { diff --git a/Projectiles/Pets/Beldum.cs b/Projectiles/Pets/Beldum.cs index c1b73e06ff..14de75451f 100644 --- a/Projectiles/Pets/Beldum.cs +++ b/Projectiles/Pets/Beldum.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Pets public override void SetStaticDefaults() { Main.projPet[Type] = true; - + Main.projFrames[Type] = 4; ProjectileID.Sets.CharacterPreviewAnimations[Type] = ProjectileID.Sets.SimpleLoop(0, 0, 1) .WithOffset(-8f, -20f).WithSpriteDirection(-1).WhenNotSelected(0, 0); } @@ -121,6 +121,27 @@ namespace CalamityMod.Projectiles.Pets Projectile.rotation = 0; Projectile.spriteDirection = -player.direction; } + + if (Main.rand.NextBool(600) && Projectile.ai[2] == 0) + { + Projectile.ai[2] = 1; + } + + if (Projectile.ai[2] == 1) + { + Projectile.frameCounter++; + if (Projectile.frameCounter > 3) + { + Projectile.frameCounter = 0; + Projectile.frame++; + } + + if (Projectile.frame > 3) + { + Projectile.frame = 0; + Projectile.ai[2] = 0; + } + } } public void PlayerPetting() @@ -145,7 +166,7 @@ namespace CalamityMod.Projectiles.Pets SpriteEffects fx = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; if (Main.player[Projectile.owner].gravDir == -1) fx |= SpriteEffects.FlipVertically; - Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition + Vector2.UnitY * MathF.Cos(Projectile.ai[0] * 0.05f) * (Projectile.ai[1] == 0 ? 10 : 2), null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2, Projectile.scale, fx); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition + Vector2.UnitY * MathF.Cos(Projectile.ai[0] * 0.05f) * (Projectile.ai[1] == 0 ? 10 : 2), tex.Frame(1, 4, 0, Projectile.frame), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(tex.Width / 2, tex.Height / Main.projFrames[Type] / 2), Projectile.scale, fx); return false; } } diff --git a/Projectiles/Pets/Beldum.png b/Projectiles/Pets/Beldum.png index 1894a7ef52..ff86674959 100644 Binary files a/Projectiles/Pets/Beldum.png and b/Projectiles/Pets/Beldum.png differ diff --git a/World/DraedonStructures.cs b/World/DraedonStructures.cs index f796e476cf..096ab75395 100644 --- a/World/DraedonStructures.cs +++ b/World/DraedonStructures.cs @@ -636,7 +636,7 @@ namespace CalamityMod.World #endregion #region Cavern Lab - public static void FillCavernLaboratoryChest(Chest chest, int useless) + public static void FillCavernLaboratoryChest(Chest chest) { int potionType = Utils.SelectRandom(WorldGen.genRand, ItemID.EndurancePotion, ItemID.GravitationPotion, ItemID.HeartreachPotion, ItemID.LifeforcePotion); List contents = new List() @@ -701,8 +701,8 @@ namespace CalamityMod.World tries++; else { - bool placedBeldum = false; - PlaceSchematic(mapKey, new Point(placementPoint.X, placementPoint.Y), SchematicAnchor.TopLeft, ref placedBeldum, new Action(FillCavernLaboratoryChest)); + bool _ = false; + PlaceSchematic(mapKey, new Point(placementPoint.X, placementPoint.Y), SchematicAnchor.TopLeft, ref _, new Action(FillCavernLaboratoryChest)); CalamityUtils.AddProtectedStructure(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y), 20); CalamityWorld.CavernLabCenter = placementPoint.ToWorldCoordinates() + new Vector2(TileMaps[mapKey].GetLength(0), TileMaps[mapKey].GetLength(1)) * 8f; break;