From 39863cda2a892c32e1c30f96ef09be4b0475a736 Mon Sep 17 00:00:00 2001 From: mountaindrew10 Date: Sat, 8 Jul 2023 03:46:43 -0500 Subject: [PATCH] 1 - Smaller Lunic Corps shield to show that it's both stronger and more efficient (more compact). 2 - Glowmask for Plague Tainted SMG Drones. --- Items/Armor/LunicCorps/LunicCorpsHelmet.cs | 2 +- Items/Weapons/Magic/VeeringWind.png | Bin 0 -> 843 bytes Projectiles/Boss/PlagueStingerGoliath.cs | 8 +++--- Projectiles/Ranged/PlagueTaintedDrone.cs | 24 ++++++++++++++++++ Projectiles/Ranged/PlagueTaintedDroneGlow.png | Bin 0 -> 519 bytes Projectiles/Ranged/PlagueTaintedProjectile.cs | 1 + 6 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 Items/Weapons/Magic/VeeringWind.png create mode 100644 Projectiles/Ranged/PlagueTaintedDroneGlow.png diff --git a/Items/Armor/LunicCorps/LunicCorpsHelmet.cs b/Items/Armor/LunicCorps/LunicCorpsHelmet.cs index 48f84ac459..26e053445f 100644 --- a/Items/Armor/LunicCorps/LunicCorpsHelmet.cs +++ b/Items/Armor/LunicCorps/LunicCorpsHelmet.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Items.Armor.LunicCorps if (modPlayer.masterChefShieldDurability <= 0) continue; - float scale = 0.15f + 0.03f * (0.5f + 0.5f * (float)Math.Sin(Main.GlobalTimeWrappedHourly * 0.5f + i * 0.2f)); + float scale = 0.1f + 0.02f * (0.5f + 0.5f * (float)Math.Sin(Main.GlobalTimeWrappedHourly * 0.5f + i * 0.2f)); if (playerFound == false) { diff --git a/Items/Weapons/Magic/VeeringWind.png b/Items/Weapons/Magic/VeeringWind.png new file mode 100644 index 0000000000000000000000000000000000000000..ef78a6a6281c7465b7aaf87b97f0ae54c38dcd11 GIT binary patch literal 843 zcmV-R1GM~!P)Px#AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;(K){{a7>y{D4^00NmwL_t(Y$IX^cNK`=_$3IWEUDowa zw)(auM3)xK5be(?h(H(gV22J}xUQ|O-_|_dcHHOpGH>QLGt6hc^L{fHWppCZqMt>txE+sM085LDM*G{@ z1^%ZhDy%@cKqMrg{8j;g+xLb6c%PX9;K{=W26?Qp&I0I-BmwxD-|{5(pHRK4tqB8Q zH&_Ol>P&ZsQD0d6S_H_g3R#=oXaU&uGSBwTu0Mp9yP>zUR3={a1j$9=g3%Ri3b^q0S(?)OXlfsdPBfBV}f26o8TO4FFP2%K!{MlVgy+ zCEm8gO-~<g?&806c%S3c%fSa+`GZt9L@EnFWV%t4hZEe_M2Pb_4M3 zwGcLT4FGU|IOCMsv&Mw?OLwDbwSUY07!0^6!)? zSu|<`(4H_!9y^)iRJ;~|lW7l5f8vUt2p5wjhWrn!%l~00000IbVXQnMOaBjI!|(GWo~p~bZKvH V05ODE?C$^o002ovPDHLkV1nsifGq$3 literal 0 HcmV?d00001 diff --git a/Projectiles/Boss/PlagueStingerGoliath.cs b/Projectiles/Boss/PlagueStingerGoliath.cs index d11571eedc..11684e89bf 100644 --- a/Projectiles/Boss/PlagueStingerGoliath.cs +++ b/Projectiles/Boss/PlagueStingerGoliath.cs @@ -55,11 +55,11 @@ namespace CalamityMod.Projectiles.Boss public override void PostDraw(Color lightColor) { Vector2 center = new Vector2(Projectile.Center.X, Projectile.Center.Y); - Vector2 vector11 = new Vector2(ModContent.Request(Texture).Value.Width / 2, ModContent.Request(Texture).Value.Height / Main.projFrames[Projectile.type] / 2); + Vector2 vector11 = new Vector2(ModContent.Request(Texture).Value.Width / 2, ModContent.Request(Texture).Value.Height / 2); Vector2 vector = center - Main.screenPosition; - vector -= new Vector2(ModContent.Request("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Value.Width, ModContent.Request("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Value.Height / Main.projFrames[Projectile.type]) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 0f + 4f + Projectile.gfxOffY); - Color color = new Color(127 - Projectile.alpha, 127 - Projectile.alpha, 127 - Projectile.alpha, 0).MultiplyRGBA(Color.Red); + vector -= new Vector2(ModContent.Request("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Value.Width, ModContent.Request("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Value.Height) * 1f / 2f; + vector += vector11 * 1f + new Vector2(0f, 4f + Projectile.gfxOffY); + Color color = Color.White; Main.spriteBatch.Draw(ModContent.Request("CalamityMod/Projectiles/Boss/PlagueStingerGoliathGlow").Value, vector, null, color, Projectile.rotation, vector11, Projectile.scale, SpriteEffects.None, 0); } diff --git a/Projectiles/Ranged/PlagueTaintedDrone.cs b/Projectiles/Ranged/PlagueTaintedDrone.cs index bea425dcb8..53ef63d162 100644 --- a/Projectiles/Ranged/PlagueTaintedDrone.cs +++ b/Projectiles/Ranged/PlagueTaintedDrone.cs @@ -6,6 +6,7 @@ using Terraria.ModLoader; using Terraria.Audio; using CalamityMod.Dusts; using CalamityMod.Buffs.DamageOverTime; +using Microsoft.Xna.Framework.Graphics; namespace CalamityMod.Projectiles.Ranged { @@ -87,6 +88,29 @@ namespace CalamityMod.Projectiles.Ranged Projectile.velocity = Projectile.SuperhomeTowardsTarget(target, 12f, 15f); } + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = ModContent.Request(Texture).Value; + int height = texture.Height / Main.projFrames[Projectile.type]; + int drawStart = height * Projectile.frame; + Vector2 origin = Projectile.Size / 2; + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + return false; + } + + public override void PostDraw(Color lightColor) + { + Texture2D texture = ModContent.Request(Texture).Value; + int height = texture.Height / Main.projFrames[Projectile.type]; + int drawStart = height * Projectile.frame; + Vector2 origin = Projectile.Size / 2; + SpriteEffects spriteEffects = SpriteEffects.None; + if (Projectile.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Projectiles/Ranged/PlagueTaintedDroneGlow").Value, Projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, drawStart, texture.Width, height)), Color.White, Projectile.rotation, origin, Projectile.scale, spriteEffects, 0); + } + public override bool OnTileCollide(Vector2 oldVelocity) { Collision.HitTiles(Projectile.position, Projectile.velocity, Projectile.width, Projectile.height); diff --git a/Projectiles/Ranged/PlagueTaintedDroneGlow.png b/Projectiles/Ranged/PlagueTaintedDroneGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..42e15fbd89b3bc841ef39e7db0ec59fe7737c001 GIT binary patch literal 519 zcmeAS@N?(olHy`uVBq!ia0vp^DnOjT!3HEtPhNNgq!^2X+?^QKos)S9WFPc&aSX|D zeml$1>xhF$o3OO*nxY0Kb{bSOgM#hG2b@p->9*Gj0$Fn{ojEMlt+tg|n!w_;ETf}s0%J%z)C*uv`00Re6$ALeGjU zKPU6)tC_wr`;=Rg)_s*Wo@Zo!K-+BItE@=F1y^)d;Wg(5o9&+M|BH(3KJ~o%yeVhF zzT?3Ut&i%zL5b$Hk*AJ8A*Yn>uy*ICJ>d(H5HUV?yGT8jcy?=F6lEbAnD