From 8953197a2fba2a19f18ab50d11282aadc7d86835 Mon Sep 17 00:00:00 2001 From: Dominic Date: Sat, 25 Sep 2021 22:49:39 -0500 Subject: [PATCH 1/3] Added the Draedon chair mount --- Buffs/Mounts/DraedonGamerChairBuff.cs | 24 ++++++ Buffs/Mounts/DraedonGamerChairBuff.png | Bin 0 -> 757 bytes CalPlayer/CalamityPlayer.cs | 44 ++++++++++ CalamityMod.cs | 4 +- Items/Mounts/DraedonGamerChairMount.cs | 77 ++++++++++++++++++ Items/Mounts/DraedonGamerChairMount_Back.png | Bin 0 -> 1311 bytes Items/Mounts/DraedonGamerChairMount_Front.png | Bin 0 -> 1100 bytes .../DraedonGamerChairMount_Glowmask.png | Bin 0 -> 491 bytes Items/Mounts/ExoBox360.cs | 40 +++++++++ Items/Mounts/ExoBox360.png | Bin 0 -> 729 bytes Items/TreasureBags/DraedonTreasureBag.cs | 2 + NPCs/ExoMechs/Ares/AresBody.cs | 4 + 12 files changed, 194 insertions(+), 1 deletion(-) create mode 100644 Buffs/Mounts/DraedonGamerChairBuff.cs create mode 100644 Buffs/Mounts/DraedonGamerChairBuff.png create mode 100644 Items/Mounts/DraedonGamerChairMount.cs create mode 100644 Items/Mounts/DraedonGamerChairMount_Back.png create mode 100644 Items/Mounts/DraedonGamerChairMount_Front.png create mode 100644 Items/Mounts/DraedonGamerChairMount_Glowmask.png create mode 100644 Items/Mounts/ExoBox360.cs create mode 100644 Items/Mounts/ExoBox360.png diff --git a/Buffs/Mounts/DraedonGamerChairBuff.cs b/Buffs/Mounts/DraedonGamerChairBuff.cs new file mode 100644 index 0000000000..db7f56cb59 --- /dev/null +++ b/Buffs/Mounts/DraedonGamerChairBuff.cs @@ -0,0 +1,24 @@ +using CalamityMod.Items.Mounts; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Mounts +{ + public class DraedonGamerChairBuff : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Exo Chair"); + Description.SetDefault("Riding a physics defying gamer chair"); + Main.buffNoTimeDisplay[Type] = true; + Main.buffNoSave[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.mount.SetMount(ModContent.MountType(), player); + player.buffTime[buffIndex] = 10; + player.Calamity().ExoChair = true; + } + } +} diff --git a/Buffs/Mounts/DraedonGamerChairBuff.png b/Buffs/Mounts/DraedonGamerChairBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..9c3a83ed680d58d2805f77fdd244564d75a6da14 GIT binary patch literal 757 zcmVPx%uSrBfR9J=OmrqF4Q4q&JYbmjoZKfba(xQiQHwi&uDJ3E+v>*f{`*-LfT2K%L zm2?oH2#hYec&=E&2qM=gJ47T43L)a6fy>Hf5#*sP#gw$eIJ>-`>vnU0&|Kbc=FQBH z`M&w{p2O+P24Hq}W{EWsA`bx^!Q5+g>cg_0Odsy z0N%do0pR$&iO`EIIqL(5jsY+jDN5<@T|lZW?Fhtkpy%8z05)ts0>I@TmjIXuNp<8R zXaDVMObl|j7>-mPiHtAXbpqf)a-kB*`jOke#ULO{+7XE7!2Hscqzc9E=K$mv6atBC z{}6g@=vk{n5xF~bG^yXyEIlm2P7g_(#R?n{}}RtjCCpXbMBV_aPy$- z+Yf>1-rWG4e^>=TO|4WzZ%`1?vvq%orgRwHCR0^&#p-9geiDF@x*%XD1nziF0rk8 zga0@tv!nY_ry+MOSHq-TI^l}@fZo-#FZg^i{j}3P4RisCvyR)vq~1?7Gy;jKsrLfE zs~7+;C5D}S5a{TWd9M8+%kcn6+?KVjH9{+u`Al9rphjLfdI5lF>x`ji9|V*-uI&L} zx>xv|no$7q3#1b&604DROwFa$B3DW~0xModP1)s!g7ya`%@zO5pdnxMRRG|s|7FO( ncW*TKjL-mJr ForceVariousEffects(); #endregion diff --git a/CalamityMod.cs b/CalamityMod.cs index becfa0ed7c..26afaa188c 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -84,6 +84,7 @@ namespace CalamityMod public static ModHotKey PlaguePackHotKey; public static ModHotKey AngelicAllianceHotKey; public static ModHotKey GodSlayerDashHotKey; + public static ModHotKey ExoChairSpeedupHotkey; // Boss Spawners public static int ghostKillCount = 0; @@ -182,8 +183,9 @@ namespace CalamityMod PlaguePackHotKey = RegisterHotKey("Booster Dash", "Q"); AngelicAllianceHotKey = RegisterHotKey("Angelic Alliance Blessing", "G"); GodSlayerDashHotKey = RegisterHotKey("God Slayer Dash", "H"); + ExoChairSpeedupHotkey = RegisterHotKey("Exo Chair Speed Up", "LeftShift"); - if (!Main.dedServ) + if (!Main.dedServ) LoadClient(); ILChanges.Load(); diff --git a/Items/Mounts/DraedonGamerChairMount.cs b/Items/Mounts/DraedonGamerChairMount.cs new file mode 100644 index 0000000000..bae00c4bad --- /dev/null +++ b/Items/Mounts/DraedonGamerChairMount.cs @@ -0,0 +1,77 @@ +using CalamityMod.Buffs.Mounts; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.Collections.Generic; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Mounts +{ + public class DraedonGamerChairMount : ModMountData + { + public const float MovementSpeed = 12f; + public override void SetDefaults() + { + mountData.spawnDust = 182; + mountData.spawnDustNoGravity = true; + mountData.buff = ModContent.BuffType(); + mountData.heightBoost = 0; + mountData.flightTimeMax = int.MaxValue; + mountData.fatigueMax = int.MaxValue; + mountData.fallDamage = 0f; + mountData.usesHover = true; + mountData.runSpeed = MovementSpeed; + mountData.dashSpeed = MovementSpeed; + mountData.acceleration = MovementSpeed; + mountData.swimSpeed = MovementSpeed; + mountData.jumpHeight = 8; + mountData.jumpSpeed = 8f; + mountData.blockExtraJumps = true; + mountData.totalFrames = 5; + + int[] verticalOffsets = new int[mountData.totalFrames]; + for (int l = 0; l < verticalOffsets.Length; l++) + verticalOffsets[l] = 0; + + mountData.playerYOffsets = verticalOffsets; + mountData.xOffset = 2; + mountData.bodyFrame = 3; + mountData.yOffset = 28; + mountData.playerHeadOffset = 3; + mountData.standingFrameCount = 5; + mountData.standingFrameDelay = 5; + mountData.standingFrameStart = 0; + mountData.runningFrameCount = 5; + mountData.runningFrameDelay = 5; + mountData.runningFrameStart = 0; + mountData.flyingFrameCount = 5; + mountData.flyingFrameDelay = 5; + mountData.flyingFrameStart = 0; + mountData.inAirFrameCount = 5; + mountData.inAirFrameDelay = 5; + mountData.inAirFrameStart = 0; + mountData.idleFrameCount = 5; + mountData.idleFrameDelay = 5; + mountData.idleFrameStart = 0; + mountData.idleFrameLoop = true; + mountData.swimFrameCount = 5; + mountData.swimFrameDelay = 5; + mountData.swimFrameStart = 0; + if (Main.netMode != NetmodeID.Server) + { + mountData.textureWidth = mountData.frontTexture.Width; + mountData.textureHeight = mountData.frontTexture.Height; + } + } + + public override bool Draw(List playerDrawData, int drawType, Player drawPlayer, ref Texture2D texture, ref Texture2D glowTexture, ref Vector2 drawPosition, ref Rectangle frame, ref Color drawColor, ref Color glowColor, ref float rotation, ref SpriteEffects spriteEffects, ref Vector2 drawOrigin, ref float drawScale, float shadow) + { + rotation = drawPlayer.velocity.X * 0.004f; + drawPlayer.fullRotation = rotation; + frame = texture.Frame(1, 5, 0, (int)(Main.GlobalTime * 13f) % 5); + return true; + } + } +} diff --git a/Items/Mounts/DraedonGamerChairMount_Back.png b/Items/Mounts/DraedonGamerChairMount_Back.png new file mode 100644 index 0000000000000000000000000000000000000000..c8ebb28168832c8dd59c6c9c573ae3c1c4041134 GIT binary patch literal 1311 zcmeAS@N?(olHy`uVBq!ia0vp^S_}+~H5|-9R^Q&6=0J+EILO_JVcj{Imp~3nx}&cn z1H;CC?mvmFK)zFePl&6Wf+CPvT+B=*nC{BXxE za-FSTc)NDkrvlGk{|oGcRvJjF%2P0jl6E z@Q5sCVBk9h!i=ICUJXDuxp=xbhE&A8o&7rKwt;}#+XY*uG&%3s^M7^N@%z7|oVQGx zap~A|cHu4TOJX(U-m=X4KJi$Fve^~|_uN^B7iPXw%9TDe?M=8~|MA_sWx0-Yf!($hpXbInXgGua?w6fjRByA6Y*osiEViP{WZr2+kM?-Ap z--@1i_+fgAp844i*}vWvu9V_>Sg>Qi`@6N0J69zbwO!*${k$UQ;QAAXnS)zD{4T#; zbfD7Mi|66Tjr!AqYrAZ0Y-|lZntTt>7L+Wsu&^tgbo-m(A?C~kp}(tALZ&T9X4Xj) zC=N+6lo8-E7yle`(yKMaBVF&=suL=Q9aDZi-q^P4f|IWae2Gz^2?t;OI}$?OPmbfeWI9uea;1q;C9w4!R$YSbb=>t_X=H? z=NrFD>2^2k_9c0nSKs%1+Q=8(Z+0SZvb1pfs~n$ia>o{~3rsn*Ix2^e`(>}-{H%?l zDjj-zw3c2JRat0QxMHv9&1#8dTn}sZ<@jtl85hcX<4(MP=0~4aZb%X9zg@pf=U&{uc+=KzNscRbnf}dPdAmk^ zD!W0B?JWg&-#j0gRhtcgZff7z*ksfVJ zXDs&$(^7G^DmDyvRg>gXx_tdrqKDUH=F>k_blbfq&T?D2YO&JhhHbt-3XU#h>e|pa zQRr*-ucnuWMWrP)gSR&9TJ>b@>bRA&{up*RyKWQb&hxzcY}%FRySmlujvs&jbTMzy zl_$rJEVPoIytln@MYhPy539tY4>(mNA6Xui!^*jcd%aiYjs}Ksb)-bNw>@!{KwP}O zwD7--Gi9e2u4-IhSXr%naEaWrE~}F|58vwUY~Q)a%P+@AMr)GgH&rc8RMU{t&JeBu_CgG_clrxymvY*nq9o3Hg`<$)<8-Rr$Kf>V=9{MDy3vn_8d z2wXO=Dr@!E>sBWcn3Yvu9e?v`-Mg%LS?9n0JDBIpO^oxKusHwSdlcte&i6D}33Rld z(f=n!cIw{@!b4AH`F#7|zViNIhG6cv`bpEgQd R4PYU|;OXk;vd$@?2>^h8TD$-N literal 0 HcmV?d00001 diff --git a/Items/Mounts/DraedonGamerChairMount_Front.png b/Items/Mounts/DraedonGamerChairMount_Front.png new file mode 100644 index 0000000000000000000000000000000000000000..093609da69bea10f39cc07f8e4347759b1a1a6b2 GIT binary patch literal 1100 zcmeAS@N?(olHy`uVBq!ia0vp^S_}+~H5|-9R^Q&6=0J+EILO_JVcj{Imp~3nx}&cn z1H;CC?mvmFK)y|YPlzj!Hny-2h)gf8>7KP@ot%Q=|Ns9zG7A#>=Y`10+4_asMXqZw zGHTZj`&8ih>wkgW)R(r`lVl>pff_GJC&&OPk&+<4V4yB^z~JxyTo5SFS>O>_%)r2R z2!t6$HM|-a7?>+PT^vIy;@;kVU3AMppe<24%ggz#K+*s2QTuOw?L2Yu)d3UEUv(_e zbw-z@$}jNwe$Mk-I<=1VR?ecw^Nw6tmU+ARnMIoX@xW5$Kc+zX;QM1CMt|p$K!c+n6pa2p3}`y_ z<d;@F=pxmIAA@@9AF&nxD&daSPxs-1WFyK>7VFYVsNzh17sSm>YhqAL6N zwM>xTrX6!x+Ini)OY3h2*H`as=M2bHkh^|ZhVPl2ng^?QvQqv=l?#ViG$S_IOcGfk z9vieG!K?AZshx2}o{JN@9y+G{nq+&%#P+71;#9v}&YpNpN6tO(6?Kxg>j*g>3@%CV z<4c|Wy<_jTEdo`WPK7Vo68Oye!~K`ZR*T;|S7v`rm>lzJ_P?Dg?5BoBWy)OjkMHfP z7IMC+vVl`EXYRK`nb7o1pOC1GkYpi8)hXXIlQ*e&Tzq}(Ns-}q14b=gmR`;oy7Lyc zb6#LQeLL}8B2&nQjfR~I5;_x{8mlgyG zYI$&8(DjpRwVV&?EXd@EU*{6QH1WlOIWoUy>`VArEt_e za^Y`q#IF7FJm~M2t1ot_8&2_MiWWG86uFxcld?bmt(tN9B*+;i0w!wLwOMCX&0vT% zsDDzlSE_o3f~Zcf=illXpKN&&vpA1u&vBj^F>A8X6o>YOnKzvByH73r6n{?TpzNMq zhVz5W9@oS=+L;MjhA3!yo?c&i=$YCn56&0!Cfe+p?xp>A;+MaF)N%$J{5TW`d?r-^`*`_Z`Uzi)Pue28N$44GJdn$Q*mMAV4EzVf&f+{qELUTVzDILNhoF`J8(c ze;m2<+T@P3+|3i}w!MDh7yA4vxJ|Px%2$`nvfk^(`#T}j-$Y)7tJSG`;quA+W||f6Cp^D_3$)9}{@*`)QQ=;OgfUoOsY zI_(); + + item.value = CalamityGlobalItem.RarityVioletBuyPrice; + item.Calamity().customRarity = CalamityRarity.Violet; + } + + public override void ModifyTooltips(List list) + { + string hotkey = CalamityMod.ExoChairSpeedupHotkey.TooltipHotkeyString(); + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip1") + line2.text = $"Press {hotkey} when on the chair to move much faster"; + } + } + } +} diff --git a/Items/Mounts/ExoBox360.png b/Items/Mounts/ExoBox360.png new file mode 100644 index 0000000000000000000000000000000000000000..48f751425f27271f2522f873e41b6e7488814ad3 GIT binary patch literal 729 zcmV;~0w(>5P)Px%lSxEDR9J=8)=OwrM;yoT&(T!dG%*hnk+ccMNbvz8(oJ>}itWOU&~#Nd1s5tV z#9in*3saD88pO2-(nS!LwzP|iAd%8is^-a!kNAp-lB-7Q?cz9zXUx6EAmsSl9L}6M z|C!%+{xkncEK_Y8+d=#4wP5VOXQil10)_Fhig8vgcLMK9$(uR^r?Ki^&VAa85*(;r z4^9>Dg5vCK0yQ7DRE)pk1ggq?2+luk>i{=OZJ-prd1RracfDy!3mfJvhJp@E0&X@n`0HehBRRyc0~_pRDLSR!kx& z5P5KO1`Ez>*EJ^a_))rhR-V9TTX%r#|Nd2iW8e2-!STe{RnXeLCG+EO_YKg~)dqTh zEr2ht>|S)BI7eDqHznkO04h4aH<>!y)wu_J)1S`y>$|=50zn}=%iV;w_wNJ$oIVShemVk9)~2}<6AKEt z6n0fmeh7qgwx3&ALW#v#>lOpp93V{-xzr|vBp_x&Lds~nM_aOb-; literal 0 HcmV?d00001 diff --git a/Items/TreasureBags/DraedonTreasureBag.cs b/Items/TreasureBags/DraedonTreasureBag.cs index 9943ed0321..4d382118fa 100644 --- a/Items/TreasureBags/DraedonTreasureBag.cs +++ b/Items/TreasureBags/DraedonTreasureBag.cs @@ -1,6 +1,7 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.Materials; +using CalamityMod.Items.Mounts; using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; @@ -61,6 +62,7 @@ namespace CalamityMod.Items.TreasureBags // Equipment DropHelper.DropItem(player, ModContent.ItemType()); + DropHelper.DropItemChance(player, ModContent.ItemType(), 5); // Vanity // DropHelper.DropItemChance(player, ModContent.ItemType(), 7); diff --git a/NPCs/ExoMechs/Ares/AresBody.cs b/NPCs/ExoMechs/Ares/AresBody.cs index a526f8363f..cdbeca2490 100644 --- a/NPCs/ExoMechs/Ares/AresBody.cs +++ b/NPCs/ExoMechs/Ares/AresBody.cs @@ -1,6 +1,7 @@ using CalamityMod.Events; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; +using CalamityMod.Items.Mounts; using CalamityMod.Items.Potions; using CalamityMod.Items.TreasureBags; using CalamityMod.Items.Weapons.Melee; @@ -750,6 +751,9 @@ namespace CalamityMod.NPCs.ExoMechs.Ares DropHelper.WeightStack(w) ); + // Equipment + DropHelper.DropItemChance(npc, ModContent.ItemType(), 5); + // Vanity // DropHelper.DropItemChance(npc, ModContent.ItemType(), 7); // DropHelper.DropItemChance(npc, ModContent.ItemType(), 7); From 460a7023acdcbea8bca14378a6187e252afb686b Mon Sep 17 00:00:00 2001 From: Dominic Date: Sun, 26 Sep 2021 00:51:34 -0500 Subject: [PATCH 2/3] Newline removal --- Items/Mounts/ExoBox360.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Mounts/ExoBox360.cs b/Items/Mounts/ExoBox360.cs index 96d0f6e4a8..645e776af9 100644 --- a/Items/Mounts/ExoBox360.cs +++ b/Items/Mounts/ExoBox360.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Mounts { DisplayName.SetDefault("ExoBox 360"); Tooltip.SetDefault("Creates a rideable flying chair\n" + - "Replaced\n"); + "Replaced"); } public override void SetDefaults() From 64de584add2acbde9f9daa14444a1d114ee0dfb6 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Thu, 30 Sep 2021 14:04:49 -0500 Subject: [PATCH 3/3] 1 - Artemis rotates slowly and gradually picks up speed during deathray phase. --- NPCs/ExoMechs/Artemis/Artemis.cs | 37 +++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/NPCs/ExoMechs/Artemis/Artemis.cs b/NPCs/ExoMechs/Artemis/Artemis.cs index a7699f57ce..25395695db 100644 --- a/NPCs/ExoMechs/Artemis/Artemis.cs +++ b/NPCs/ExoMechs/Artemis/Artemis.cs @@ -110,6 +110,9 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis // The point to spin around private Vector2 spinningPoint = default; + // Velocity for the spin + private Vector2 spinVelocity = default; + public override void SetStaticDefaults() { DisplayName.SetDefault("XS-01 Artemis"); @@ -152,6 +155,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis public override void SendExtraAI(BinaryWriter writer) { + writer.WriteVector2(spinVelocity); writer.WriteVector2(chargeVelocityNormalized); writer.Write(frameX); writer.Write(frameY); @@ -169,6 +173,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis public override void ReceiveExtraAI(BinaryReader reader) { + spinVelocity = reader.ReadVector2(); chargeVelocityNormalized = reader.ReadVector2(); frameX = reader.ReadInt32(); frameY = reader.ReadInt32(); @@ -439,6 +444,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis rotationDirection = 0; chargeVelocityNormalized = default; spinningPoint = default; + spinVelocity = default; npc.dontTakeDamage = true; npc.velocity.Y -= 1f; @@ -531,6 +537,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis rotationDirection = 0; chargeVelocityNormalized = default; spinningPoint = default; + spinVelocity = default; } } else @@ -552,6 +559,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis rotationDirection = 0; chargeVelocityNormalized = default; spinningPoint = default; + spinVelocity = default; } // Go passive and immune if one of the other mechs is berserk @@ -570,6 +578,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis rotationDirection = 0; chargeVelocityNormalized = default; spinningPoint = default; + spinVelocity = default; } } @@ -596,6 +605,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis rotationDirection = 0; chargeVelocityNormalized = default; spinningPoint = default; + spinVelocity = default; } // If Artemis and Apollo are the first mechs to go berserk @@ -612,6 +622,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis rotationDirection = 0; chargeVelocityNormalized = default; spinningPoint = default; + spinVelocity = default; // Never be passive if berserk SecondaryAIState = (float)SecondaryPhase.Nothing; @@ -641,6 +652,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis rotationDirection = 0; chargeVelocityNormalized = default; spinningPoint = default; + spinVelocity = default; } if (berserk) @@ -656,6 +668,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis rotationDirection = 0; chargeVelocityNormalized = default; spinningPoint = default; + spinVelocity = default; // Never be passive if berserk SecondaryAIState = (float)SecondaryPhase.Nothing; @@ -909,8 +922,8 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis rotationDirection = player.direction; // Set spin velocity - npc.velocity.X = MathHelper.Pi * spinRadius / spinTime; - npc.velocity *= -rotationDirection; + spinVelocity.X = MathHelper.Pi * spinRadius / spinTime; + spinVelocity *= -rotationDirection; npc.netUpdate = true; // Fire deathray @@ -924,7 +937,24 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis } } else - npc.velocity = npc.velocity.RotatedBy(MathHelper.Pi / spinTime * -rotationDirection); + { + // This is used to adjust both the radians and the velocity of the spin moved per frame + float rotationMult = (calamityGlobalNPC.newAI[2] - deathrayTelegraphDuration) / deathrayDuration * 4f; + if (rotationMult > 1f) + { + // The radians moved per frame during the spin + double radiansOfRotation = MathHelper.Pi / spinTime * -rotationDirection; + npc.velocity = npc.velocity.RotatedBy(radiansOfRotation); + } + else + { + // The radians moved per frame during the spin + // The radians moved are reduced early on to avoid spinning too fucking fast + float decelerationMult = rotationMult * rotationMult; + double radiansOfRotation = MathHelper.Pi / spinTime * -rotationDirection * decelerationMult; + npc.velocity = (spinVelocity * decelerationMult).RotatedBy(radiansOfRotation); + } + } } } else @@ -950,6 +980,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis // Reset phase and variables if (calamityGlobalNPC.newAI[2] >= deathrayTelegraphDuration + deathrayDuration) { + spinVelocity = default; rotationDirection = 0; spinningPoint = default; pickNewLocation = true;