From b2a835ee4330c9de6df4f691c5919b3032d7b062 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Wed, 3 Jun 2026 22:41:04 -0700 Subject: [PATCH] you blinked --- .../en-US/Mods.CalamityMod.Items.Pets.hjson | 12 ++++----- Projectiles/Pets/Beldum.cs | 25 ++++++++++++++++-- Projectiles/Pets/Beldum.png | Bin 731 -> 746 bytes World/DraedonStructures.cs | 6 ++--- 4 files changed, 32 insertions(+), 11 deletions(-) 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 1894a7ef526cbf2644e4968d19194f855c8e18df..ff866749596ac34d0cadd9d7f9a979bd215f23f0 100644 GIT binary patch delta 708 zcmcc3`igaeI9CS;GXn!dV>(C5L`C^}2CV>}5Z8#LqN_LWw@+D|Q`WY8?N&QG4*>ze z^BeO1Kb!X2Aol;;+xePC+vg+#^@SZf#|fnPN`m}?|04qi*8_J>0A)A}JR*yM3J!xX zQb{dC>SztpsD8mrjy zX}JNKOZOa4o29b!Vo=`p+iS0VW;$HP6lbCTTSa8AZQSj$=K2D= z8R4usF|Rkh*gS>L*d%Jwm0uej)~>BwZaUR4XU@W=yR#-mM~BNtW*=i&*|O++wPyeE z>(dk3$^tGmu6g}&Q&xTNwXfbQ5}UX}jJ+mY+4O)xw)oD9{@mLVQtc00GIsVSdq`R> zE4}N^wBYqFo%7GXZ%>flANaQ_R8y-ULt^py=jZzw`{%7YzA|=cg+P71Jbzc->;(Qg zcGaUcEp<=+#J>3dgE^$&zQBva;dfYd-u_nle!6kRWGBY9m;={~?>v98v;Nqo`3~-} z-LI7HB^&!rx|DHh)^`WCuN}W7H~+eD*5x8!X~1E*9o|Q(c)8X{F1R>p$+dn~KOpPC zEXG;e(i)Vq*)nd;Vw5^xd}-F!i7u0`@dTutWpIU1w$~%R3BOp89TgX*MrY-e#tGVId0b4*n7YC(nOR$MoR$9@N8y$?AdbwW~Qby;|pba(Wv7&SSpnOICJVqdYHz`*O}OiMU*VK*z>us`?o!Ce6M9X^^F zS2h3iHd!anY|q)vdo?`DM? zj?bu&SLxuWlr!3C$8%M=C$p3FsnpZ?XueP_2pRRNE8@#h8CBH_Rl{99-AQaatvHmc)sazJ z;T=#OI%#?jp{hIn=r#cJ^K(DlBt&JjvvXNuwA=&0!!KO`lqN0#(0efHcw|=ieI`S0 zRQGDTG@DHTy0>l3jE6cS5nqmfhK!0UUta+*-L(Q*m{L{tp4IPD;YNxga|ibCffl{) z@tt!3tSl`B;N0*Vh|;J&xLM)9Qq<|>nRGO-=JR(? b8lyh|Hs@9Y5QG;100000NkvXXu0mjfRM1zm 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;