From e32ba32dc07c1da784b268f4df7978820ec90459 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Fri, 13 Oct 2023 01:59:06 +0700 Subject: [PATCH 01/95] Fire prototypes --- Items/Weapons/Ranged/CleansingBlaze.cs | 26 +-- Items/Weapons/Ranged/PristineFury.cs | 40 ++--- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 2 +- Projectiles/FireProj.png | Bin 0 -> 1668 bytes Projectiles/Ranged/EssenceFire.cs | 150 +++++++++++------- Projectiles/Ranged/PristineSecondary.cs | 110 +++++-------- 6 files changed, 150 insertions(+), 178 deletions(-) create mode 100644 Projectiles/FireProj.png diff --git a/Items/Weapons/Ranged/CleansingBlaze.cs b/Items/Weapons/Ranged/CleansingBlaze.cs index 19e4d8004b..cc3983083a 100644 --- a/Items/Weapons/Ranged/CleansingBlaze.cs +++ b/Items/Weapons/Ranged/CleansingBlaze.cs @@ -31,37 +31,25 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 14f; Item.useAmmo = AmmoID.Gel; + Item.consumeAmmoOnFirstShotOnly = true; Item.rare = ModContent.RarityType(); } - public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) - { - Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/Ranged/CleansingBlazeGlow").Value); - } + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) => Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request(Texture + "Glow").Value); public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - int num6 = Main.rand.Next(2, 4); - for (int index = 0; index < num6; ++index) + for (int i = 0; i < 3; i++) { - float SpeedX = velocity.X + (float)Main.rand.Next(-15, 16) * 0.05f; - float SpeedY = velocity.Y + (float)Main.rand.Next(-15, 16) * 0.05f; - Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI, 0f, 0f); + Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(5f)); + Projectile.NewProjectile(source, position, newVel, type, damage, knockback, player.whoAmI); } return false; } - public override Vector2? HoldoutOffset() - { - return new Vector2(-5, 0); - } + public override Vector2? HoldoutOffset() => new Vector2(-5, 0); - public override bool CanConsumeAmmo(Item ammo, Player player) - { - if (Main.rand.Next(0, 100) < 90) - return false; - return true; - } + public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.NextBool(2); public override void AddRecipes() { diff --git a/Items/Weapons/Ranged/PristineFury.cs b/Items/Weapons/Ranged/PristineFury.cs index c22a3032c0..f8aa4b3a7a 100644 --- a/Items/Weapons/Ranged/PristineFury.cs +++ b/Items/Weapons/Ranged/PristineFury.cs @@ -14,11 +14,11 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public int frameCounter = 0; public int frame = 0; - public static int BaseDamage = 77; + public static int BaseDamage = 70; public override void SetStaticDefaults() { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; } public override void SetDefaults() @@ -37,6 +37,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 11f; Item.useAmmo = AmmoID.Gel; + Item.consumeAmmoOnFirstShotOnly = true; Item.value = CalamityGlobalItem.Rarity12BuyPrice; Item.rare = ModContent.RarityType(); @@ -46,59 +47,40 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool AltFunctionUse(Player player) => true; - public override bool CanUseItem(Player player) - { - if (player.altFunctionUse == 2) - { - Item.useTime = 5; - Item.useAnimation = 20; - } - else - { - Item.useTime = 3; - Item.useAnimation = 15; - } - return base.CanUseItem(player); - } + public override float UseSpeedMultiplier(Player player) => player.altFunctionUse == 2 ? 2f : 1f; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.altFunctionUse == 2) { - int flameAmt = 3; - damage = (int)(damage * 1.2); - for (int index = 0; index < flameAmt; ++index) + for (int i = 0; i < 2; i++) { - float SpeedX = velocity.X + Main.rand.NextFloat(-1.25f, 1.25f); - float SpeedY = velocity.Y + Main.rand.NextFloat(-1.25f, 1.25f); - Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType(), (int)(damage * 0.8f), knockback, player.whoAmI); + Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(5f)); + Projectile.NewProjectile(source, position, newVel, ModContent.ProjectileType(), damage, knockback, player.whoAmI); } } else - { - damage = (int)(damage * 0.94); - Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), damage, knockback, player.whoAmI); - } + Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); return false; } public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale) { - Texture2D texture = ModContent.Request("CalamityMod/Items/Weapons/Ranged/PristineFury_Animated").Value; + Texture2D texture = ModContent.Request(Texture + "_Animated").Value; spriteBatch.Draw(texture, position, Item.GetCurrentFrame(ref frame, ref frameCounter, 5, 4), Color.White, 0f, origin, scale, SpriteEffects.None, 0); return false; } public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI) { - Texture2D texture = ModContent.Request("CalamityMod/Items/Weapons/Ranged/PristineFury_Animated").Value; + Texture2D texture = ModContent.Request(Texture + "_Animated").Value; spriteBatch.Draw(texture, Item.position - Main.screenPosition, Item.GetCurrentFrame(ref frame, ref frameCounter, 5, 4), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); return false; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) { - Texture2D texture = ModContent.Request("CalamityMod/Items/Weapons/Ranged/PristineFuryGlow").Value; + Texture2D texture = ModContent.Request(Texture + "Glow").Value; spriteBatch.Draw(texture, Item.position - Main.screenPosition, Item.GetCurrentFrame(ref frame, ref frameCounter, 5, 4, false), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0); } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 00716e70ea..8429a9019b 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -222,7 +222,7 @@ ClaretCannon: { CleansingBlaze: { DisplayName: Cleansing Blaze - Tooltip: 90% chance to save ammo + Tooltip: 50% chance to save ammo } ClockGatlignum: { diff --git a/Projectiles/FireProj.png b/Projectiles/FireProj.png new file mode 100644 index 0000000000000000000000000000000000000000..49851837be999f697b2ee41c94cf0a2c5bb038cb GIT binary patch literal 1668 zcmV-~27CF5P)WwU#^2`fLSreRthUu-8K|`tnn4#jZN7wU?@e|zE-8QnjEFv&%bzd z@ZNrS{bILf981Xsc;iKH8ek|H3c=4xNo*sb#IL{l=AijhGl3PH_J?u)_Q#)_dKCru zzXrI~d3Ap4ufM!mHOY!YedpJza%uh6`$GBY3T_?9wFRtJa{zRTVef*=GuYG?!gi*% z7UMWQ{e9;>uq|f=r?xrunxujY@a2o&G{A_^c&UEK@t8Zny~>!$Ut_FE~WwcTE?qqQHUSb#%Ny~R#ApimK7Z`R7KvTER0Wu~;|r}=&gu#x68 zzz8Uua(ZnVjQ(d259fPvpYPti-Tn9HpI)tQ-HnUgBUEg`+0c?kUb@y&7$LMhqpMsoyWyz zP6>vK0VjtZeEQ|8=FOY8q8`uQF6lzv(O}z(2gv=PoSFgYZZyvj9=zK%-%P<6NCA%Y z)Lw{{1top>!R=jRO3ARje4TAFMuhgzzWTkg;pv?zB_B<}JkSEX5ZN;k>{!F5rfErM zvshtDL8*dKpS=h6r(6ADH7?|r(-~2KQyXz!t{dq(IRa%X*%mjhK{r_0P_oKNu#y>YuX3$|3-Iz1&vd}7nAHDO zwiq_l*UTy3iWwAcVYg=aW_V?eewUKWE)i1uG?U`)Lj# zRj7L)_H-q8q^3>*KK$zNw1m3@>~ayXm9CuglR5XXwSt|}3$PCMR$U=rY!2Mooih|c-B$W>s6 z!$oo`|BHG!A;h-c+2+(cifynfm@aY!cumTN%ITu#7CTmiI^o00O}&Nm97U^_p|uDi`g@ zvuQ4*OaZ!b*A6hgTjuho4jf;1-UYvEpmu|~UG*Icm5+A9N#A@;?|)Ch1$h0r-Zaos z!1oTGq>4zNVCwF)_RBK@Gr+x9myUZ@xdJ?kq-ZAw+`F2x(%1$%g}eKAi)8PKB-d|x zy#S}AI?GLeg`jmDqY6fUE}Pf8=h%8bT)qI05;XPgYg}A^)NN7zae971-H)3IvlN_W z(e@%a{6Zc2!}S8Ze4;#E^oKV+m7-F`s0goj=DLV61>^cpm0W-wNpbzX0X}xR)14sV zJnt+8r{Bb!uHXW^mi#opqxs}kTijYcRa|N@()J2)N|ee?0}Q3Ow{rMz8MWq>}HU9nY>lOt{=Yc`bGKKU+ylz^oLFUw}7D__r*Sx zbGFPyjOs5S@;F-iQQlG7jbmbu6ktctTz7z3LEK!b1UF3ewXD$@;`(*hH&<{0 zc8?&u-m2tT$_ "Projectiles.Ranged"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public override string Texture => "CalamityMod/Projectiles/FireProj"; + + public static int Lifetime => 105; + public static int Fadetime => 90; + public ref float Time => ref Projectile.ai[0]; public override void SetDefaults() { - Projectile.width = 6; - Projectile.height = 6; + Projectile.width = Projectile.height = 10; Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = -1; - Projectile.extraUpdates = 3; - Projectile.timeLeft = 65; + Projectile.MaxUpdates = 4; + Projectile.timeLeft = Lifetime; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 3; } public override void AI() { - if (Projectile.scale <= 1.5f) - { - Projectile.scale *= 1.01f; - } - Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.35f / 255f, (255 - Projectile.alpha) * 0f / 255f, (255 - Projectile.alpha) * 0.45f / 255f); - if (Projectile.timeLeft > 65) - Projectile.timeLeft = 65; + Time++; + if (Time > Fadetime) + Projectile.velocity *= 0.95f; - if (Projectile.ai[0] > 5f) + if (Time < Fadetime && Main.rand.NextBool(4)) { - float num296 = 1f; - if (Projectile.ai[0] == 6f) + Dust dust = Dust.NewDustDirect(Projectile.Center + Main.rand.NextVector2Circular(60f, 60f) * Utils.Remap(Time, 0f, Lifetime, 0.5f, 1f), 4, 4, (int)CalamityDusts.PurpleCosmilite, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100); + if (Main.rand.NextBool(3)) { - num296 = 0.25f; - } - else if (Projectile.ai[0] == 7f) - { - num296 = 0.5f; - } - else if (Projectile.ai[0] == 8f) - { - num296 = 0.75f; - } - Projectile.ai[0] += 1f; - int dustType = (int)CalamityDusts.PurpleCosmilite; - if (Main.rand.NextBool()) - { - for (int num298 = 0; num298 < 1; num298++) - { - int num299 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); - Dust dust = Main.dust[num299]; - if (Main.rand.NextBool(3)) - { - dust.noGravity = true; - dust.scale *= 1.75f; - dust.velocity.X *= 2f; - dust.velocity.Y *= 2f; - } - else - { - dust.scale *= 0.5f; - } - dust.velocity.X *= 1.2f; - dust.velocity.Y *= 1.2f; - dust.scale *= num296; - dust.velocity += Projectile.velocity; - if (!dust.noGravity) - { - dust.velocity *= 0.5f; - } - } + dust.noGravity = true; + dust.scale *= 2f; + dust.velocity *= 2f; } + dust.velocity *= 1.5f; + dust.velocity += Projectile.velocity * Utils.Remap(Time, 0f, Fadetime * 0.75f, 1f, 0.1f) * Utils.Remap(Time, 0f, Fadetime * 0.1f, 0.1f, 1f); } - else - { - Projectile.ai[0] += 1f; - } - Projectile.rotation += 0.3f * Projectile.direction; } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + // Keeping the flames in place when hitting a block + public override bool OnTileCollide(Vector2 oldVelocity) { - target.AddBuff(ModContent.BuffType(), 240); - target.immune[Projectile.owner] = 1; + Projectile.velocity = oldVelocity * 0.95f; + Projectile.position -= Projectile.velocity; + return false; + } + + // Expanding hitbox + public override void ModifyDamageHitbox(ref Rectangle hitbox) + { + int size = (int)Utils.Remap(Time, 0f, Fadetime, 10f, 40f); + + // Shrinks again after fading + if (Time > Fadetime) + size = (int)Utils.Remap(Time, Fadetime, Lifetime, 40f, 0f); + hitbox.Inflate(size, size); + } + + // Anti-wall hacking checks + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => projHitbox.Intersects(targetHitbox) && Collision.CanHit(Projectile.Center, 0, 0, targetHitbox.Center.ToVector2(), 0, 0) ? null : false; + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 240); + + public override bool PreDraw(ref Color lightColor) + { + Texture2D fire = ModContent.Request(Texture).Value; + + // The conga line of colors to sift through + Color color1 = new Color(160, 100, 255, 200); + Color color2 = new Color(160, 50, 255, 70); + Color color3 = new Color(200, 100, 255, 100); + Color color4 = new Color(150, 30, 200, 100); + float length = ((Time > Fadetime - 10f) ? 0.1f : 0.15f); + float vOffset = Math.Min(Time, 20f); + float timeRatio = Utils.GetLerpValue(0f, Lifetime, Time); + float fireSize = Utils.Remap(timeRatio, 0.2f, 0.5f, 0.25f, 1f); + + if (timeRatio >= 1f) + return false; + + for (float j = 1f; j >= 0f; j -= length) + { + // Color + Color fireColor = ((timeRatio < 0.1f) ? Color.Lerp(Color.Transparent, color1, Utils.GetLerpValue(0f, 0.1f, timeRatio)) : + ((timeRatio < 0.2f) ? Color.Lerp(color1, color2, Utils.GetLerpValue(0.1f, 0.2f, timeRatio)) : + ((timeRatio < 0.35f) ? color2 : + ((timeRatio < 0.7f) ? Color.Lerp(color2, color3, Utils.GetLerpValue(0.35f, 0.7f, timeRatio)) : + ((timeRatio < 0.85f) ? Color.Lerp(color3, color4, Utils.GetLerpValue(0.7f, 0.85f, timeRatio)) : + Color.Lerp(color4, Color.Transparent, Utils.GetLerpValue(0.85f, 1f, timeRatio))))))); + fireColor *= (1f - j) * Utils.GetLerpValue(0f, 0.2f, timeRatio, true); + + // Positions and rotations + Vector2 firePos = Projectile.Center - Main.screenPosition - Projectile.velocity * vOffset * j; + float mainRot = -j * MathHelper.PiOver2 - Main.GlobalTimeWrappedHourly * (j + 1f) * 2f / length; + float trailRot = MathHelper.PiOver4 - mainRot; + + // Draw one backtrail + Vector2 trailOffset = Projectile.velocity * vOffset * length * 0.5f; + Main.EntitySpriteDraw(fire, firePos - trailOffset, null, fireColor * 0.25f, trailRot, fire.Size() * 0.5f, fireSize, SpriteEffects.None); + + // Draw the main fire + Main.EntitySpriteDraw(fire, firePos, null, fireColor, mainRot, fire.Size() * 0.5f, fireSize, SpriteEffects.None); + } + return false; } } } diff --git a/Projectiles/Ranged/PristineSecondary.cs b/Projectiles/Ranged/PristineSecondary.cs index 8aa6e000ea..47f609e474 100644 --- a/Projectiles/Ranged/PristineSecondary.cs +++ b/Projectiles/Ranged/PristineSecondary.cs @@ -1,6 +1,7 @@ using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Dusts; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; using Terraria; using Terraria.ModLoader; @@ -9,92 +10,65 @@ namespace CalamityMod.Projectiles.Ranged public class PristineSecondary : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public override string Texture => "CalamityMod/Projectiles/Magic/RancorFog"; - private int dust1 = (int)CalamityDusts.ProfanedFire; - private int dust2 = ModContent.DustType(); + public ref float ScaleFactor => ref Projectile.ai[0]; + public ref float LightPower => ref Projectile.ai[1]; + + public Color FogColor = new Color(255, 220, 100); public override void SetDefaults() { - Projectile.width = 50; - Projectile.height = 50; + Projectile.width = Projectile.height = 150; Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = -1; + Projectile.timeLeft = 150; Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 3; - Projectile.timeLeft = 150; } public override void AI() { + // Add some degree of variation to the fog with scale/rotation/color + if (Projectile.ai[2] == 0f) + { + Projectile.scale = Main.rand.NextFloat(0.15f, 0.75f); + Projectile.ai[2] = Main.rand.NextFloat(MathHelper.TwoPi); + FogColor.G = (byte)Main.rand.Next(160, 230 + 1); + } + ScaleFactor += 0.01f; + ScaleFactor = MathHelper.Clamp(ScaleFactor, 0f, Projectile.scale); + Lighting.AddLight(Projectile.Center, new Vector3(1f, 1f, 0.25f) * ScaleFactor); + Projectile.rotation = Projectile.velocity.ToRotation() + Projectile.ai[2]; + Projectile.velocity *= 0.98f; - int dustType = Utils.SelectRandom(Main.rand, new int[] - { - dust1, - dust2 - }); - Lighting.AddLight(Projectile.Center, 1f, 1f, 0.25f); - if (Projectile.ai[0] > 7f) - { - float num296 = 1f; - if (Projectile.ai[0] == 8f) - { - num296 = 0.25f; - } - else if (Projectile.ai[0] == 9f) - { - num296 = 0.5f; - } - else if (Projectile.ai[0] == 10f) - { - num296 = 0.75f; - } - Projectile.ai[0] += 1f; - if (Main.rand.NextBool()) - { - for (int num298 = 0; num298 < 1; num298++) - { - int num299 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); - Dust dust = Main.dust[num299]; - if (Main.rand.NextBool(3)) - { - dust.noGravity = true; - dust.scale *= 1.25f; - dust.velocity.X *= 2f; - dust.velocity.Y *= 2f; - } - if (Main.rand.NextBool(6)) - { - dust.noGravity = true; - dust.scale *= 1.5f; - dust.velocity.X *= 2f; - dust.velocity.Y *= 2f; - } - else - { - dust.scale *= 1f; - } - dust.velocity.X *= 1.2f; - dust.velocity.Y *= 1.2f; - dust.scale *= num296; - dust.noLight = true; - dust.color = CalamityUtils.ColorSwap(new Color(255, 168, 53), new Color(255, 249, 0), 2f); - } - } - } - else - { - Projectile.ai[0] += 1f; - } - Projectile.rotation += 0.3f * (float)Projectile.direction; + Projectile.Opacity = Utils.GetLerpValue(150f, 135f, Projectile.timeLeft, true) * Utils.GetLerpValue(0f, 90f, Projectile.timeLeft, true); + + // Calculate light power. This checks below the position of the fog to check if this fog is underground. + // Without this, it may render over the fullblack that the game renders for obscured tiles. + float lightPowerBelow = Lighting.GetColor((int)Projectile.Center.X / 16, (int)Projectile.Center.Y / 16 + 6).ToVector3().Length() / (float)Math.Sqrt(3D); + LightPower = MathHelper.Lerp(LightPower, lightPowerBelow, 0.15f); } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width * ScaleFactor * 0.5f, targetHitbox); + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 240); + + public override bool PreDraw(ref Color lightColor) { - target.AddBuff(ModContent.BuffType(), 240); + Main.spriteBatch.SetBlendState(BlendState.Additive); + + Texture2D texture = ModContent.Request(Texture).Value; + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + float opacity = Utils.GetLerpValue(0f, 0.08f, LightPower, true) * Projectile.Opacity * 0.5f; + Color drawColor = FogColor * opacity; + Main.EntitySpriteDraw(texture, drawPosition, null, drawColor, Projectile.rotation, texture.Size() * 0.5f, ScaleFactor, SpriteEffects.None); + + Main.spriteBatch.SetBlendState(BlendState.AlphaBlend); + return false; } } } From 89bebe3047413d60c230ebd8d2d3ad84acec86e7 Mon Sep 17 00:00:00 2001 From: Xyk Date: Thu, 12 Oct 2023 20:27:55 -0700 Subject: [PATCH 02/95] Cleansing Blaze and Halley's Inferno Added additional visuals to Cleansing Blaze, buffed damage since its iframes went from 1 to 3 --- Items/Weapons/Ranged/CleansingBlaze.cs | 2 +- Items/Weapons/Ranged/HalleysInferno.cs | 12 ++- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 2 +- Projectiles/Ranged/EssenceFire.cs | 45 ++++++++-- Projectiles/Ranged/HalleysComet.cs | 83 ++++++++---------- Sounds/Item/HalleysInfernoHit.ogg | Bin 0 -> 14480 bytes Sounds/Item/HalleysInfernoShoot.ogg | Bin 0 -> 15296 bytes 7 files changed, 86 insertions(+), 58 deletions(-) create mode 100644 Sounds/Item/HalleysInfernoHit.ogg create mode 100644 Sounds/Item/HalleysInfernoShoot.ogg diff --git a/Items/Weapons/Ranged/CleansingBlaze.cs b/Items/Weapons/Ranged/CleansingBlaze.cs index cc3983083a..2d485f0d6d 100644 --- a/Items/Weapons/Ranged/CleansingBlaze.cs +++ b/Items/Weapons/Ranged/CleansingBlaze.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public override void SetDefaults() { - Item.damage = 130; + Item.damage = 240; Item.DamageType = DamageClass.Ranged; Item.width = 64; Item.height = 32; diff --git a/Items/Weapons/Ranged/HalleysInferno.cs b/Items/Weapons/Ranged/HalleysInferno.cs index 974dbfc314..209be8de3b 100644 --- a/Items/Weapons/Ranged/HalleysInferno.cs +++ b/Items/Weapons/Ranged/HalleysInferno.cs @@ -4,6 +4,7 @@ using CalamityMod.Projectiles.Ranged; using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; @@ -12,12 +13,15 @@ namespace CalamityMod.Items.Weapons.Ranged public class HalleysInferno : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Ranged"; + + public static readonly SoundStyle Shoot = new("CalamityMod/Sounds/Item/HalleysInfernoShoot") { Volume = 0.6f }; + public static readonly SoundStyle Hit = new("CalamityMod/Sounds/Item/HalleysInfernoHit") { Volume = 0.5f }; public override void SetDefaults() { - Item.damage = 1125; - Item.knockBack = 5f; + Item.damage = 1205; + Item.knockBack = 5.5f; Item.DamageType = DamageClass.Ranged; - Item.useTime = Item.useAnimation = 30; + Item.useTime = Item.useAnimation = 39; Item.autoReuse = true; Item.useAmmo = AmmoID.Gel; Item.shootSpeed = 14.6f; @@ -27,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 34; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; - Item.UseSound = SoundID.Item34; + Item.UseSound = Shoot; Item.value = CalamityGlobalItem.Rarity13BuyPrice; Item.rare = ModContent.RarityType(); } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 8429a9019b..641019c6e7 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -549,7 +549,7 @@ HalleysInferno: { DisplayName: Halley's Inferno Tooltip: ''' - Fires a flaming blue comet + Fires a highly concentrated shot of lunar fire Press to zoom out 50% chance to save ammo 'Halley came sooner than expected' diff --git a/Projectiles/Ranged/EssenceFire.cs b/Projectiles/Ranged/EssenceFire.cs index 35730d2202..0d1c7de1ea 100644 --- a/Projectiles/Ranged/EssenceFire.cs +++ b/Projectiles/Ranged/EssenceFire.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -18,6 +19,9 @@ namespace CalamityMod.Projectiles.Ranged public static int Fadetime => 90; public ref float Time => ref Projectile.ai[0]; + public bool spawnParticles = true; + public bool spawnDusts = true; + public override void SetDefaults() { Projectile.width = Projectile.height = 10; @@ -37,25 +41,52 @@ namespace CalamityMod.Projectiles.Ranged if (Time > Fadetime) Projectile.velocity *= 0.95f; - if (Time < Fadetime && Main.rand.NextBool(4)) + if ( Time > 6 && Time < Fadetime && Main.rand.NextBool(16)) { - Dust dust = Dust.NewDustDirect(Projectile.Center + Main.rand.NextVector2Circular(60f, 60f) * Utils.Remap(Time, 0f, Lifetime, 0.5f, 1f), 4, 4, (int)CalamityDusts.PurpleCosmilite, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100); - if (Main.rand.NextBool(3)) + Dust dust = Dust.NewDustDirect(Projectile.Center + Main.rand.NextVector2Circular(60f, 60f) * Utils.Remap(Time, 0f, Lifetime, 0.5f, 1f), 4, 4, 295, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100); + if (Main.rand.NextBool(5)) { dust.noGravity = true; dust.scale *= 2f; - dust.velocity *= 2f; + dust.velocity *= 0.8f; } - dust.velocity *= 1.5f; + dust.velocity *= 1.1f; dust.velocity += Projectile.velocity * Utils.Remap(Time, 0f, Fadetime * 0.75f, 1f, 0.1f) * Utils.Remap(Time, 0f, Fadetime * 0.1f, 0.1f, 1f); } + if (spawnParticles && Time > 6 && Main.rand.NextBool(7)) + { + SparkParticle spark = new SparkParticle(Projectile.Center, Projectile.velocity * Main.rand.NextFloat(0.4f, 0.7f), false, Main.rand.Next(7, 11), Main.rand.NextFloat(0.7f, 1.8f), Main.rand.NextBool(4) ? Color.Magenta : Color.DodgerBlue); + GeneralParticleHandler.SpawnParticle(spark); + } + if (Time == 5) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 295 : 181, Projectile.velocity); + dust.scale = Main.rand.NextFloat(0.9f, 1.7f); + dust.velocity = Projectile.velocity.RotatedByRandom(1) * Main.rand.NextFloat(0.3f, 0.7f); + dust.noGravity = true; + } } // Keeping the flames in place when hitting a block public override bool OnTileCollide(Vector2 oldVelocity) { + if (spawnDusts) + { + for (int i = 0; i <= 8; i++) + { + Vector2 position = Projectile.Center + new Vector2(Main.rand.NextFloat(-13, 13), Main.rand.NextFloat(-13, 13)); + Vector2 velocity = -oldVelocity.RotatedByRandom(1) * Main.rand.NextFloat(0.2f, 2.2f); + float scale = Main.rand.NextFloat(2f, 3.2f); + + Dust dust = Dust.NewDustPerfect(position + velocity, Main.rand.NextBool(3) ? 307 : 295, velocity, 0, default, scale); + dust.noGravity = true; + dust.scale -= 0.4f; + } + spawnDusts = false; + } Projectile.velocity = oldVelocity * 0.95f; Projectile.position -= Projectile.velocity; + spawnParticles = false; return false; } @@ -67,13 +98,13 @@ namespace CalamityMod.Projectiles.Ranged // Shrinks again after fading if (Time > Fadetime) size = (int)Utils.Remap(Time, Fadetime, Lifetime, 40f, 0f); - hitbox.Inflate(size, size); + hitbox.Inflate(size, size); } // Anti-wall hacking checks public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => projHitbox.Intersects(targetHitbox) && Collision.CanHit(Projectile.Center, 0, 0, targetHitbox.Center.ToVector2(), 0, 0) ? null : false; - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 240); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 360); public override bool PreDraw(ref Color lightColor) { diff --git a/Projectiles/Ranged/HalleysComet.cs b/Projectiles/Ranged/HalleysComet.cs index bdb9e589ee..2180f1b43c 100644 --- a/Projectiles/Ranged/HalleysComet.cs +++ b/Projectiles/Ranged/HalleysComet.cs @@ -1,6 +1,11 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using Terraria; using Terraria.ModLoader; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Terraria.Audio; +using CalamityMod.Items.Weapons.Ranged; + namespace CalamityMod.Projectiles.Ranged { public class HalleysComet : ModProjectile, ILocalizedModType @@ -8,80 +13,68 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public int Time = 0; public override void SetDefaults() { Projectile.width = Projectile.height = 12; Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; - Projectile.penetrate = 4; + Projectile.penetrate = 5; Projectile.extraUpdates = 10; Projectile.timeLeft = 600; } public override void AI() { + Time++; if (Projectile.scale <= 1.5f) { Projectile.scale *= 1.01f; } - - Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.35f / 255f, (255 - Projectile.alpha) * 0f / 255f, (255 - Projectile.alpha) * 0.45f / 255f); - - if (Projectile.ai[0]++ > 5f) + if (Time > 6 && Time < 180) { - float dustScaleSize = 1f; - if (Projectile.ai[0] == 6f) + SparkParticle spark = new SparkParticle(Projectile.Center, Projectile.velocity, false, 11, 1.9f, Color.MediumBlue); + GeneralParticleHandler.SpawnParticle(spark); + SparkParticle spark2 = new SparkParticle(Projectile.Center, Projectile.velocity, false, 11, 1f, Color.Aqua); + GeneralParticleHandler.SpawnParticle(spark2); + } + if (Time == 5) + { + Particle pulse = new DirectionalPulseRing(Projectile.Center, Projectile.velocity * 0.75f, Color.Aqua, new Vector2(1f, 2.5f), Projectile.velocity.ToRotation(), 0.4f, 0.05f, 20); + GeneralParticleHandler.SpawnParticle(pulse); + Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Projectile.velocity * 0.4f, Color.DodgerBlue, new Vector2(1f, 2.5f), Projectile.velocity.ToRotation(), 0.2f, 0.05f, 35); + GeneralParticleHandler.SpawnParticle(pulse2); + for (int i = 0; i <= 25; i++) { - dustScaleSize = 0.25f; - } - else if (Projectile.ai[0] == 7f) - { - dustScaleSize = 0.5f; - } - else if (Projectile.ai[0] == 8f) - { - dustScaleSize = 0.75f; - } - Projectile.ai[0] += 1f; - int dustType = 176; - for (int i = 0; i < 3; i++) - { - int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 1, default, 1f); - Dust dust = Main.dust[fire]; - if (Main.rand.NextBool(3)) - { - dust.noGravity = true; - dust.scale *= 1.75f; - dust.velocity.X *= 2f; - dust.velocity.Y *= 2f; - } - else - { - dust.scale *= 0.5f; - } - dust.velocity.X *= 1.2f; - dust.velocity.Y *= 1.2f; - dust.scale *= dustScaleSize; - dust.velocity += Projectile.velocity; - if (!dust.noGravity) - { - dust.velocity *= 0.5f; - } + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 172 : 206, Projectile.velocity); + dust.scale = Main.rand.NextFloat(1.5f, 2.3f); + dust.velocity = Projectile.velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.3f, 2.1f); + dust.noGravity = true; } } + Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.35f / 255f, (255 - Projectile.alpha) * 0f / 255f, (255 - Projectile.alpha) * 0.45f / 255f); + Projectile.rotation += 0.3f * (float)Projectile.direction; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 240); + target.AddBuff(ModContent.BuffType(), 450); + SoundEngine.PlaySound(HalleysInferno.Hit, Projectile.Center); + for (int i = 0; i <= 13; i++) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 172 : 206, Projectile.velocity); + dust.scale = Main.rand.NextFloat(1.1f, 1.9f); + dust.velocity = Projectile.velocity.RotatedByRandom(0.5f) * Main.rand.NextFloat(0.2f, 2.1f); + dust.noGravity = true; + } } public override void OnHitPlayer(Player target, Player.HurtInfo info) { - target.AddBuff(ModContent.BuffType(), 240); + target.AddBuff(ModContent.BuffType(), 450); } } } diff --git a/Sounds/Item/HalleysInfernoHit.ogg b/Sounds/Item/HalleysInfernoHit.ogg new file mode 100644 index 0000000000000000000000000000000000000000..6cb43e1cd955187abf52d9f1e2c28c1cea5aa67e GIT binary patch literal 14480 zcmaib1ymi)vhEO^U;#oPf#9-ncMIKyV4}79e;M2oQq2A^Fd_ z=iT?#y|a4v>gk%UuCD&7x~6-!f`x?&@C5khl3@BhsBU<&( zBOWk+3au~-k1hXwJ+^$L!01$;Qw|A5f)L00UjyLvcv-cQ*mklfC&JG%QDZYo78k7==r!zaPMdRlOg{Z2Qes% zFao|QrZCbY`*27}nls4i@34r00C1RqL_CgEJfN4|C7wM zQq2DMBxE^60|MYfGX0D*yM_z@f{WY&sES98{Lfe5AH0AAA;~sRu?|3D zjWhbAmH?0~UOtit>ffHg2g38e5NAwfoR4#(XYA&c<7CeCMyO^|wUwu3{+U7B3H%*! zE+Hf719|CF87>o2s2Rn7OI}!+h}Gqv!8-i?Ec8KqBk(z^&l!m2OPXL?t*MN?vNjyB z6p@rk)zqf?m)}3IDA&)L=;hu5TSP2p+O#3-fu&!jS*PR3k9GeYK0@HU87<-sX1^o$ zjYTlVAt@nAeC_%kJu#1Y2vYPqCRSX!JV;R)pQ_mP-Jg*Y13)n59~A#9`vc{_C@xBf zq#2=Z9Ag=!d(5i(CwPwP`Y}aNnL!lOv4bd%Y1+$iso|EiDQ=qArY%lVmWCAnwJ2~> ziB03)AmINolF&5g5lAU$75_PL-^eGQ5l;U{n*2_nghc_SX%>1FR(>^AH4S$=tyH&_ zmJq!~w~YngjfEJ47oqKE)FZ$CJx6 zkjs6h8~?$kaLzW3EvCdKr}A8H`nlT-u9*sl-VD3hjGEb;yV+8+nNEwZR`Wjw^Ve)P z7To^Bavn{Dlsk4uG6C+tEGLgTcAG1fOe%p~D}mB0#Udi3JU!>2ya46DS&n67XFJ%~AXRn*MD$63*mc0xd_(nfyO2r-zw91hl3GI=S<|W8|L( z73wPX;y)(<0D9t3W&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)(JQvAsjoISbH0O4MMEa%jaU zEV#rz+}rp@VRRB88W1e{HZ&5ho>C}ex*QDS2-aPH3T%XBc5X$oVJy!(}WAcDg9;UT3#*}6}A)KcK2fM@X_z(RgLdke)UJ!i+= z*f>GAH=finP33ue1&rt9lcjD2?Vyw$7>=BQ2RMq_s^H4SGfZIJ>{H4`5<@*ewzh8xhd=#;ZmtVhFn>A)+hX;K~8T1Fc0hh@^PdE7x7La51 zB^zmv2y-1(y!QO1AB`Ol=oJ9<*-!ut=;RiXyR#bMyC&7ycR%B}(lT*+g+(Ao+r^E* zvg)lA+*RM(e=LU3jvUl1r#A}o6Z1Dj*Ai%k}nKhnX&$eSiZA;lR%yF^*8d>R-k z9w)Z*`FDkOoDXBfr_y&6UN7X~WSQ}lUw5GvP9#j%*Q2rY>^UkONzK0duw%KrSOgX^0A*1SIN z>5EJ5H5UUnagirab3Y2HOl>N681H2#gqI!q>P?Nd%!dX$oe1UV?Q8{pg$6bBgmFN`6R=$>u-opzK4V21kpDx*B)vk!n4I6ty^nNBGXqK2G8en*rCFo~6mu zLB+&tYu+DsFZ=TDe7mNUyle}G^t@PtZt_CnwHfg~F=$Y~gQ1WW5#y{Q<}CPHxicKX zMjwSQ3rb;j+qv*T9{xvSDIeh{nsjV%jlo-3-EJFbIX#}QzMPrf-%_b>h}fk}nKaxj zCi{?Lh6Zq9qMnD3p_HCXPFSlqDVPTk0sjZ! C0BE}a literal 0 HcmV?d00001 diff --git a/Sounds/Item/HalleysInfernoShoot.ogg b/Sounds/Item/HalleysInfernoShoot.ogg new file mode 100644 index 0000000000000000000000000000000000000000..00ef951e9a7c6be4d0c4764a2db01c329e168a0e GIT binary patch literal 15296 zcmeHtd00~0-|t2RaSRlQ)C|!K5lTueZ9)ap)Di_k%u-BK)G||>3vmch%+x%l=}{a~ zgpL^6Tn=bulXGa3&4bxor_-Q!tDWC_?(e?O``+hypZnk4&)WN0drjZHzUw=D)_3i- zn>PmnTEMT1vS2#%;A*rGVhKs!n!t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dD5*e|AED19kC5&#m{~jR&5~?2rN% zBYylzn6nyK-0*h>H$pXWxH=6wz!hj1H<8!kxe^5fY2bh8L%v~u;&(qt=zO5(y7Q&t MlN-z5m1zV23!j#l9smFU literal 0 HcmV?d00001 From c57fb509b443e6fade1b938502ed2ec5ddbc3e6f Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Fri, 13 Oct 2023 13:09:05 +0700 Subject: [PATCH 03/95] Spark Spreader + Shadethrower --- Items/Weapons/Ranged/PristineFury.cs | 3 +- Items/Weapons/Ranged/Shadethrower.cs | 17 +-- Items/Weapons/Ranged/SparkSpreader.cs | 11 +- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 4 +- Projectiles/Ranged/ShadeFire.cs | 94 ++++++-------- Projectiles/Ranged/SparkSpreaderFire.cs | 115 ++++++++++-------- 6 files changed, 109 insertions(+), 135 deletions(-) diff --git a/Items/Weapons/Ranged/PristineFury.cs b/Items/Weapons/Ranged/PristineFury.cs index f8aa4b3a7a..92b3e04119 100644 --- a/Items/Weapons/Ranged/PristineFury.cs +++ b/Items/Weapons/Ranged/PristineFury.cs @@ -47,7 +47,8 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool AltFunctionUse(Player player) => true; - public override float UseSpeedMultiplier(Player player) => player.altFunctionUse == 2 ? 2f : 1f; + // Right click consumes ammo at the same rate but faster at spewing + public override float UseTimeMultiplier(Player player) => player.altFunctionUse == 2 ? 0.5f : 1f; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { diff --git a/Items/Weapons/Ranged/Shadethrower.cs b/Items/Weapons/Ranged/Shadethrower.cs index d2a11f603b..b815764219 100644 --- a/Items/Weapons/Ranged/Shadethrower.cs +++ b/Items/Weapons/Ranged/Shadethrower.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Items.Weapons.Ranged Item.DamageType = DamageClass.Ranged; Item.width = 76; Item.height = 30; - Item.useTime = 10; - Item.useAnimation = 10; + Item.useTime = 6; + Item.useAnimation = 30; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 1.5f; @@ -28,19 +28,10 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 8f; Item.useAmmo = AmmoID.Gel; + Item.consumeAmmoOnFirstShotOnly = true; } - public override Vector2? HoldoutOffset() - { - return new Vector2(-5, 0); - } - - public override bool CanConsumeAmmo(Item ammo, Player player) - { - if (Main.rand.Next(0, 100) < 66) - return false; - return true; - } + public override Vector2? HoldoutOffset() => new Vector2(-5, 0); public override void AddRecipes() { diff --git a/Items/Weapons/Ranged/SparkSpreader.cs b/Items/Weapons/Ranged/SparkSpreader.cs index 712c328ddf..847b5e039c 100644 --- a/Items/Weapons/Ranged/SparkSpreader.cs +++ b/Items/Weapons/Ranged/SparkSpreader.cs @@ -11,14 +11,15 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public override void SetDefaults() { - Item.damage = 7; + Item.damage = 10; Item.knockBack = 1f; Item.DamageType = DamageClass.Ranged; Item.autoReuse = true; - Item.useTime = 10; - Item.useAnimation = 30; + Item.useTime = 12; + Item.useAnimation = 36; Item.useAmmo = AmmoID.Gel; - Item.shootSpeed = 5f; + Item.consumeAmmoOnFirstShotOnly = true; + Item.shootSpeed = 6f; Item.shoot = ModContent.ProjectileType(); Item.width = 52; @@ -32,8 +33,6 @@ namespace CalamityMod.Items.Weapons.Ranged public override Vector2? HoldoutOffset() => new Vector2(-4, 0); - public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= 70; - public override void AddRecipes() { CreateRecipe(). diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 641019c6e7..ac101f7c9a 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -1011,7 +1011,7 @@ SepticSkewer: { Shadethrower: { DisplayName: Shadethrower - Tooltip: 66% chance to save ammo + Tooltip: "" } Shellshooter: { @@ -1058,7 +1058,7 @@ SomaPrime: { SparkSpreader: { DisplayName: Spark Spreader - Tooltip: 70% chance to save ammo + Tooltip: "" } SpectralstormCannon: { diff --git a/Projectiles/Ranged/ShadeFire.cs b/Projectiles/Ranged/ShadeFire.cs index 92d0297eb4..b7a0223b71 100644 --- a/Projectiles/Ranged/ShadeFire.cs +++ b/Projectiles/Ranged/ShadeFire.cs @@ -1,8 +1,11 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Particles; using Microsoft.Xna.Framework; +using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; + namespace CalamityMod.Projectiles.Ranged { public class ShadeFire : ModProjectile, ILocalizedModType @@ -10,79 +13,50 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public static int Lifetime => 80; + public ref float Time => ref Projectile.ai[0]; + public override void SetDefaults() { - Projectile.width = 6; - Projectile.height = 6; + Projectile.width = Projectile.height = 6; Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = -1; - Projectile.extraUpdates = 3; - Projectile.timeLeft = 80; + Projectile.MaxUpdates = 4; + Projectile.timeLeft = Lifetime; // 20 effectively + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; } public override void AI() { - Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.25f / 255f, (255 - Projectile.alpha) * 0f / 255f, (255 - Projectile.alpha) * 0.35f / 255f); - if (Projectile.timeLeft > 80) - { - Projectile.timeLeft = 80; - } - if (Projectile.ai[0] > 7f) - { - float num296 = 1f; - if (Projectile.ai[0] == 8f) - { - num296 = 0.25f; - } - else if (Projectile.ai[0] == 9f) - { - num296 = 0.5f; - } - else if (Projectile.ai[0] == 10f) - { - num296 = 0.75f; - } - Projectile.ai[0] += 1f; - int num297 = 14; - if (Main.rand.NextBool()) - { - for (int num298 = 0; num298 < 3; num298++) - { - int num299 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, num297, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); - Dust dust = Main.dust[num299]; - if (Main.rand.NextBool(3)) - { - dust.noGravity = true; - dust.scale *= 1.75f; - dust.velocity.X *= 2f; - dust.velocity.Y *= 2f; - } - else - { - dust.scale *= 0.5f; - } - dust.velocity.X *= 1.2f; - dust.velocity.Y *= 1.2f; - dust.scale *= num296; - dust.velocity += Projectile.velocity; - if (!dust.noGravity) - { - dust.velocity *= 0.5f; - } - } - } - } + Time++; + + // Determines particle size as well as hitbox + if (Time >= 6f) + Projectile.scale = 1.5f * Utils.GetLerpValue(6f, 36f, Time, true); else + return; // Helps position it at the tip + + // Draw shadow smokes over the whole thing + float smokeRot = MathHelper.ToRadians(3f); // *Rate of rotation per frame, not a constant rotation + Color smokeColor = Color.Lerp(Color.BlueViolet, Color.Black, 0.7f + 0.2f * MathF.Sin(Main.GlobalTimeWrappedHourly * 5f)); + Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, smokeColor, 20, Projectile.scale * Main.rand.NextFloat(0.6f, 1.2f), 0.8f, smokeRot, required: true); + GeneralParticleHandler.SpawnParticle(smoke); + + // Overlay the glow on top, which is on the brighter side + if (Main.rand.NextBool(3)) { - Projectile.ai[0] += 1f; + Color glowColor = Color.Lerp(smokeColor, Color.MidnightBlue, 0.25f); + Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, glowColor, 15, Projectile.scale * Main.rand.NextFloat(0.4f, 0.7f), 0.8f, smokeRot, true, 0.005f, true); + GeneralParticleHandler.SpawnParticle(smokeGlow); } - Projectile.rotation += 0.3f * (float)Projectile.direction; - } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(ModContent.BuffType(), 300); } + + // Circular hitbox adjusted for the size of the smoke particles (which is 48 here) + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 48 * Projectile.scale * 0.5f, targetHitbox); + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 300); } } diff --git a/Projectiles/Ranged/SparkSpreaderFire.cs b/Projectiles/Ranged/SparkSpreaderFire.cs index 473a849407..96ba7941f3 100644 --- a/Projectiles/Ranged/SparkSpreaderFire.cs +++ b/Projectiles/Ranged/SparkSpreaderFire.cs @@ -1,4 +1,6 @@ -using Terraria; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -9,78 +11,85 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public static int Lifetime => 48; + public ref float Time => ref Projectile.ai[0]; + public override void SetDefaults() { Projectile.width = Projectile.height = 12; Projectile.friendly = true; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = 3; - Projectile.extraUpdates = 1; - Projectile.timeLeft = 60; + Projectile.MaxUpdates = 2; + Projectile.timeLeft = Lifetime * Projectile.MaxUpdates; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 30; + Projectile.localNPCHitCooldown = -1; } public override void AI() { - Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.05f / 255f, (255 - Projectile.alpha) * 0.45f / 255f, (255 - Projectile.alpha) * 0.05f / 255f); - + // Krill the fire when the water if (Projectile.wet && !Projectile.lavaWet) { Projectile.Kill(); return; } - if (Main.rand.NextBool(3)) + Time++; + Projectile.rotation = Projectile.velocity.ToRotation(); + if (Time >= 8f) { - Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 35, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 80, default, 0.75f); - Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 55, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 50, default, 0.75f); + float cinderSize = Utils.GetLerpValue(6f, 12f, Time, true); + Dust cinder = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, 6, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 10, default, 0.75f); + if (Main.rand.NextBool(3)) + { + cinder.scale *= 3f; + cinder.velocity *= 1.5f; + } + cinder.noGravity = true; + cinder.velocity *= 1.2f; + cinder.scale *= cinderSize * 0.5f; + cinder.velocity += Projectile.velocity; } - - if (Projectile.ai[0]++ > 7f) - { - float dustScaleSize = 1f; - if (Projectile.ai[0] == 8f) - { - dustScaleSize = 0.25f; - } - else if (Projectile.ai[0] == 9f) - { - dustScaleSize = 0.5f; - } - else if (Projectile.ai[0] == 10f) - { - dustScaleSize = 0.75f; - } - Projectile.ai[0] += 1f; - int dustType = 6; - for (int i = 0; i < 2; i++) - { - int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 10, default, 0.75f); - Dust dust = Main.dust[fire]; - if (Main.rand.NextBool(3)) - { - dust.noGravity = true; - dust.scale *= 1.75f; - dust.velocity.X *= 2f; - dust.velocity.Y *= 2f; - } - else - { - dust.noGravity = true; - dust.scale *= 0.5f; - } - dust.velocity.X *= 1.2f; - dust.velocity.Y *= 1.2f; - dust.scale *= dustScaleSize; - dust.velocity += Projectile.velocity; - } - } - - Projectile.rotation += 0.3f * Projectile.direction; + else if (Time == 7f) // Create sparks around the tip + SpawnSparks(2); } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.OnFire, 60 * Main.rand.Next(1, 4)); - public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(BuffID.OnFire, 60 * Main.rand.Next(1, 4)); + // On-impact sparks + public override bool OnTileCollide(Vector2 oldVelocity) + { + SpawnSparks(8); + return true; + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + target.AddBuff(BuffID.OnFire, 60 * Main.rand.Next(1, 4)); + SpawnSparks(5); + } + + public override void OnHitPlayer(Player target, Player.HurtInfo info) + { + target.AddBuff(BuffID.OnFire, 60 * Main.rand.Next(1, 4)); + SpawnSparks(5); + } + + public void SpawnSparks(int count) + { + for (int i = 0; i < count; i++) + { + int sparkLifetime = Main.rand.Next(9, 16); + float sparkScale = Main.rand.NextFloat(0.2f, 0.4f); + Color sparkColor = Color.Lerp(Color.Gold, Color.OrangeRed, Main.rand.NextFloat(0.1f, 1f)); + + if (Main.rand.NextBool(6)) + sparkScale *= 1.5f; + + Vector2 sparkVelocity = Projectile.velocity.RotatedByRandom(MathHelper.ToRadians(30f)) * Main.rand.NextFloat(1.5f, 3f); + sparkVelocity.Y -= Main.rand.NextFloat(6f, 8f); + SparkParticle spark = new SparkParticle(Projectile.Center, sparkVelocity, true, sparkLifetime, sparkScale, sparkColor); + GeneralParticleHandler.SpawnParticle(spark); + } + } } } From 5bc82ea8aac541488dd7338de3b1bc526559ebdc Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Fri, 13 Oct 2023 14:00:43 +0700 Subject: [PATCH 04/95] Reduce block lifespan of Cleansing Blaze fire --- Projectiles/Ranged/EssenceFire.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Projectiles/Ranged/EssenceFire.cs b/Projectiles/Ranged/EssenceFire.cs index 0d1c7de1ea..d8374a8ff4 100644 --- a/Projectiles/Ranged/EssenceFire.cs +++ b/Projectiles/Ranged/EssenceFire.cs @@ -86,6 +86,7 @@ namespace CalamityMod.Projectiles.Ranged } Projectile.velocity = oldVelocity * 0.95f; Projectile.position -= Projectile.velocity; + Projectile.timeLeft -= 2; spawnParticles = false; return false; } From cf976ba1c2b7ae4becefc37575f626ab71dd5832 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Fri, 13 Oct 2023 02:07:36 -0700 Subject: [PATCH 05/95] extra flames for cleansing blaze --- Projectiles/Ranged/EssenceFire.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Projectiles/Ranged/EssenceFire.cs b/Projectiles/Ranged/EssenceFire.cs index d8374a8ff4..0976d2555f 100644 --- a/Projectiles/Ranged/EssenceFire.cs +++ b/Projectiles/Ranged/EssenceFire.cs @@ -1,11 +1,9 @@ using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Dusts; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Ranged @@ -53,6 +51,12 @@ namespace CalamityMod.Projectiles.Ranged dust.velocity *= 1.1f; dust.velocity += Projectile.velocity * Utils.Remap(Time, 0f, Fadetime * 0.75f, 1f, 0.1f) * Utils.Remap(Time, 0f, Fadetime * 0.1f, 0.1f, 1f); } + if (Main.rand.NextBool(30) && Projectile.timeLeft > 20) + { + FlameParticle fire = new FlameParticle(Projectile.Center, 30, MathHelper.Clamp((Lifetime - Projectile.timeLeft) / 20, 0.5f, 2f), 0.05f, Color.BlueViolet * 0.5f, Color.DarkBlue * 0.5f); + fire.Velocity = Projectile.velocity.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4 / 3, MathHelper.PiOver4 / 3)); + GeneralParticleHandler.SpawnParticle(fire); + } if (spawnParticles && Time > 6 && Main.rand.NextBool(7)) { SparkParticle spark = new SparkParticle(Projectile.Center, Projectile.velocity * Main.rand.NextFloat(0.4f, 0.7f), false, Main.rand.Next(7, 11), Main.rand.NextFloat(0.7f, 1.8f), Main.rand.NextBool(4) ? Color.Magenta : Color.DodgerBlue); @@ -137,7 +141,7 @@ namespace CalamityMod.Projectiles.Ranged // Positions and rotations Vector2 firePos = Projectile.Center - Main.screenPosition - Projectile.velocity * vOffset * j; - float mainRot = -j * MathHelper.PiOver2 - Main.GlobalTimeWrappedHourly * (j + 1f) * 2f / length; + float mainRot = (-j * MathHelper.PiOver2 - Main.GlobalTimeWrappedHourly * (j + 1f) * 2f / length) * Math.Sign(Projectile.velocity.X); float trailRot = MathHelper.PiOver4 - mainRot; // Draw one backtrail From d64978c70fff2f79b0749de993e47272801cbc92 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Fri, 13 Oct 2023 16:16:32 +0700 Subject: [PATCH 06/95] Havoc's Breath + tweaks --- Items/Weapons/Ranged/HavocsBreath.cs | 10 +- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 33 +++- Projectiles/Ranged/BrimstoneFireFriendly.cs | 166 +++++++++++------- Projectiles/Ranged/EssenceFire.cs | 1 + Projectiles/Ranged/SparkSpreaderFire.cs | 16 +- 5 files changed, 145 insertions(+), 81 deletions(-) diff --git a/Items/Weapons/Ranged/HavocsBreath.cs b/Items/Weapons/Ranged/HavocsBreath.cs index 7c5e9546fe..24ef2416fa 100644 --- a/Items/Weapons/Ranged/HavocsBreath.cs +++ b/Items/Weapons/Ranged/HavocsBreath.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.DamageType = DamageClass.Ranged; Item.width = 50; Item.height = 18; - Item.useTime = 9; + Item.useTime = 5; Item.useAnimation = 30; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; @@ -28,13 +28,9 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 8.5f; Item.useAmmo = AmmoID.Gel; + Item.consumeAmmoOnFirstShotOnly = true; } - public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.NextBool(); - - public override Vector2? HoldoutOffset() - { - return new Vector2(-10, 0); - } + public override Vector2? HoldoutOffset() => new Vector2(-10, 0); } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index ac101f7c9a..43fe750091 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -116,6 +116,7 @@ AuroraBlazer: { Tooltip: ''' Spews astral flames that travel in a star-shaped patterns + Uses gel for ammo 60% chance to save ammo ''' } @@ -142,7 +143,7 @@ BladedgeGreatbow: { BlightSpewer: { DisplayName: Blight Spewer - Tooltip: "" + Tooltip: Uses gel for ammo } BlissfulBombardier: { @@ -222,7 +223,11 @@ ClaretCannon: { CleansingBlaze: { DisplayName: Cleansing Blaze - Tooltip: 50% chance to save ammo + Tooltip: + ''' + Uses gel for ammo + 50% chance to save ammo + ''' } ClockGatlignum: { @@ -349,7 +354,11 @@ DarkechoGreatbow: { DeadSunsWind: { DisplayName: Dead Sun's Wind - Tooltip: 70% chance to save ammo + Tooltip: + ''' + Uses gel for ammo + 70% chance to save ammo + ''' } Deathwind: { @@ -428,6 +437,7 @@ ElementalEruption: { Tooltip: ''' Fires a spread of rainbow flames + Uses gel for ammo 90% chance to save ammo ''' } @@ -551,6 +561,7 @@ HalleysInferno: { ''' Fires a highly concentrated shot of lunar fire Press to zoom out + Uses gel for ammo 50% chance to save ammo 'Halley came sooner than expected' ''' @@ -563,7 +574,7 @@ HandheldTank: { HavocsBreath: { DisplayName: Havoc's Breath - Tooltip: 50% chance to save ammo + Tooltip: Uses gel for ammo } HeavenlyGale: { @@ -699,6 +710,7 @@ Meowthrower: { Tooltip: ''' Fires blue and pink flames that emit meows on enemy hits + Uses gel for ammo 85% chance to save ammo ''' } @@ -808,6 +820,7 @@ OverloadedBlaster: { Tooltip: ''' Fires a large spread of bouncing slime + Uses gel for ammo 33% chance to save ammo ''' } @@ -852,6 +865,7 @@ Photoviscerator: { ''' Fires a stream of exo flames and light that explodes into homing sparks Press to fire homing flares which stick to enemies and incinerate them + Uses gel for ammo 90% chance to save ammo ''' } @@ -906,6 +920,7 @@ PristineFury: { ''' Fires an intense helix of flames that explode into a column of fire Press to fire a short ranged cloud of lingering flames + Uses gel for ammo ''' } @@ -1011,7 +1026,7 @@ SepticSkewer: { Shadethrower: { DisplayName: Shadethrower - Tooltip: "" + Tooltip: Uses gel for ammo } Shellshooter: { @@ -1058,7 +1073,7 @@ SomaPrime: { SparkSpreader: { DisplayName: Spark Spreader - Tooltip: "" + Tooltip: Uses gel for ammo } SpectralstormCannon: { @@ -1169,7 +1184,11 @@ TelluricGlare: { TerraFlameburster: { DisplayName: Terra Flameburster - Tooltip: 80% chance to save ammo + Tooltip: + ''' + Uses gel for ammo + 80% chance to save ammo + ''' } TheBallista: { diff --git a/Projectiles/Ranged/BrimstoneFireFriendly.cs b/Projectiles/Ranged/BrimstoneFireFriendly.cs index 5944635129..8631d6af51 100644 --- a/Projectiles/Ranged/BrimstoneFireFriendly.cs +++ b/Projectiles/Ranged/BrimstoneFireFriendly.cs @@ -1,5 +1,8 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Dusts; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; using Terraria; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Ranged @@ -7,81 +10,126 @@ namespace CalamityMod.Projectiles.Ranged public class BrimstoneFireFriendly : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public override string Texture => "CalamityMod/Projectiles/FireProj"; + + public static int Lifetime => 90; + public static int Fadetime => 80; + public ref float Time => ref Projectile.ai[0]; + public int MistType = -1; public override void SetDefaults() { - Projectile.width = 6; - Projectile.height = 6; + Projectile.width = Projectile.height = 10; Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = -1; - Projectile.extraUpdates = 3; - Projectile.timeLeft = 90; + Projectile.MaxUpdates = 3; + Projectile.timeLeft = Lifetime; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 8; } public override void AI() { - Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.25f / 255f, (255 - Projectile.alpha) * 0.05f / 255f, (255 - Projectile.alpha) * 0.05f / 255f); - if (Projectile.timeLeft > 90) + Time++; + if (Time < Fadetime && Main.rand.NextBool(6)) { - Projectile.timeLeft = 90; + Vector2 cinderPos = Projectile.Center + Main.rand.NextVector2Circular(60f, 60f) * Utils.Remap(Time, 0f, Lifetime, 0.5f, 1f); + float cinderSize = Utils.GetLerpValue(6f, 12f, Time, true); + Dust cinder = Dust.NewDustDirect(cinderPos, 4, 4, ModContent.DustType(), Projectile.velocity.X * 0.25f, Projectile.velocity.Y * 0.25f); + if (Main.rand.NextBool(3)) + { + cinder.scale *= 2f; + cinder.velocity *= 2f; + } + cinder.noGravity = true; + cinder.scale *= cinderSize * 1.2f; + cinder.velocity += Projectile.velocity * Utils.Remap(Time, 0f, Fadetime * 0.75f, 1f, 0.1f) * Utils.Remap(Time, 0f, Fadetime * 0.1f, 0.1f, 1f); } - if (Projectile.ai[0] > 7f) - { - float num296 = 1f; - if (Projectile.ai[0] == 8f) - { - num296 = 0.25f; - } - else if (Projectile.ai[0] == 9f) - { - num296 = 0.5f; - } - else if (Projectile.ai[0] == 10f) - { - num296 = 0.75f; - } - Projectile.ai[0] += 1f; - int num297 = 235; - if (Main.rand.NextBool()) - { - for (int num298 = 0; num298 < 1; num298++) - { - int num299 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, num297, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); - if (Main.rand.NextBool(3)) - { - Main.dust[num299].noGravity = true; - Main.dust[num299].scale *= 3f; - Dust expr_DBEF_cp_0 = Main.dust[num299]; - expr_DBEF_cp_0.velocity.X *= 2f; - Dust expr_DC0F_cp_0 = Main.dust[num299]; - expr_DC0F_cp_0.velocity.Y *= 2f; - } - else - { - Main.dust[num299].scale *= 1.5f; - } - Dust expr_DC74_cp_0 = Main.dust[num299]; - expr_DC74_cp_0.velocity.X *= 1.2f; - Dust expr_DC94_cp_0 = Main.dust[num299]; - expr_DC94_cp_0.velocity.Y *= 1.2f; - Main.dust[num299].scale *= num296; - } - } - } - else - { - Projectile.ai[0] += 1f; - } - Projectile.rotation += 0.3f * (float)Projectile.direction; + + if (MistType == -1) + MistType = Main.rand.Next(3); + + Lighting.AddLight(Projectile.Center, 1f, 0.2f, 0.2f); } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + // Keeping the flames in place when hitting a block + public override bool OnTileCollide(Vector2 oldVelocity) { - target.immune[Projectile.owner] = 7; - target.AddBuff(ModContent.BuffType(), 240); + Projectile.velocity = oldVelocity * 0.95f; + Projectile.position -= Projectile.velocity; + Time++; + Projectile.timeLeft--; + return false; + } + + // Expanding hitbox + public override void ModifyDamageHitbox(ref Rectangle hitbox) + { + int size = (int)Utils.Remap(Time, 0f, Fadetime, 10f, 40f); + + // Shrinks again after fading + if (Time > Fadetime) + size = (int)Utils.Remap(Time, Fadetime, Lifetime, 40f, 0f); + hitbox.Inflate(size, size); + } + + // Anti-wall hacking checks + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => projHitbox.Intersects(targetHitbox) && Collision.CanHit(Projectile.Center, 0, 0, targetHitbox.Center.ToVector2(), 0, 0) ? null : false; + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 240); + + public override bool PreDraw(ref Color lightColor) + { + Texture2D fire = ModContent.Request(Texture).Value; + Texture2D mist = ModContent.Request("CalamityMod/Particles/MediumMist").Value; + + // The conga line of colors to sift through + Color color1 = new Color(255, 110, 100, 200); + Color color2 = new Color(255, 50, 50, 70); + Color color3 = new Color(255, 100, 100, 100); + Color color4 = new Color(200, 35, 30, 100); + float length = ((Time > Fadetime - 10f) ? 0.1f : 0.15f); + float vOffset = Math.Min(Time, 20f); + float timeRatio = Utils.GetLerpValue(0f, Lifetime, Time); + float fireSize = Utils.Remap(timeRatio, 0.2f, 0.5f, 0.25f, 1f); + + if (timeRatio >= 1f) + return false; + + for (float j = 1f; j >= 0f; j -= length) + { + // Color + Color fireColor = ((timeRatio < 0.1f) ? Color.Lerp(Color.Transparent, color1, Utils.GetLerpValue(0f, 0.1f, timeRatio)) : + ((timeRatio < 0.2f) ? Color.Lerp(color1, color2, Utils.GetLerpValue(0.1f, 0.2f, timeRatio)) : + ((timeRatio < 0.35f) ? color2 : + ((timeRatio < 0.7f) ? Color.Lerp(color2, color3, Utils.GetLerpValue(0.35f, 0.7f, timeRatio)) : + ((timeRatio < 0.85f) ? Color.Lerp(color3, color4, Utils.GetLerpValue(0.7f, 0.85f, timeRatio)) : + Color.Lerp(color4, Color.Transparent, Utils.GetLerpValue(0.85f, 1f, timeRatio))))))); + fireColor *= (1f - j) * Utils.GetLerpValue(0f, 0.2f, timeRatio, true); + Color innerColor = Color.Lerp(fireColor, Color.Black, 0.3f); + + // Positions and rotations + Vector2 firePos = Projectile.Center - Main.screenPosition - Projectile.velocity * vOffset * j; + float mainRot = -j * MathHelper.PiOver2 - Main.GlobalTimeWrappedHourly * (j + 1f) * 2f / length; + float trailRot = MathHelper.PiOver4 - mainRot; + + // Draw one backtrail + Vector2 trailOffset = Projectile.velocity * vOffset * length * 0.5f; + Main.EntitySpriteDraw(fire, firePos - trailOffset, null, innerColor * 0.25f, trailRot, fire.Size() * 0.5f, fireSize, SpriteEffects.None); + + // Draw the main fire + Main.EntitySpriteDraw(fire, firePos, null, innerColor, mainRot, fire.Size() * 0.5f, fireSize, SpriteEffects.None); + + // Draw the masking smoke + Main.spriteBatch.SetBlendState(BlendState.Additive); + Rectangle frame = mist.Frame(1, 3, 0, MistType); + Main.EntitySpriteDraw(mist, firePos, frame, Color.Lerp(fireColor, Color.White, 0.3f), mainRot, frame.Size() * 0.5f, fireSize, SpriteEffects.None); + Main.EntitySpriteDraw(mist, firePos, frame, fireColor, mainRot, frame.Size() * 0.5f, fireSize * 3f, SpriteEffects.None); + Main.spriteBatch.SetBlendState(BlendState.AlphaBlend); + } + return false; } } } diff --git a/Projectiles/Ranged/EssenceFire.cs b/Projectiles/Ranged/EssenceFire.cs index d8374a8ff4..2be009ff56 100644 --- a/Projectiles/Ranged/EssenceFire.cs +++ b/Projectiles/Ranged/EssenceFire.cs @@ -86,6 +86,7 @@ namespace CalamityMod.Projectiles.Ranged } Projectile.velocity = oldVelocity * 0.95f; Projectile.position -= Projectile.velocity; + Time += 2; Projectile.timeLeft -= 2; spawnParticles = false; return false; diff --git a/Projectiles/Ranged/SparkSpreaderFire.cs b/Projectiles/Ranged/SparkSpreaderFire.cs index 96ba7941f3..1607b2b872 100644 --- a/Projectiles/Ranged/SparkSpreaderFire.cs +++ b/Projectiles/Ranged/SparkSpreaderFire.cs @@ -1,4 +1,5 @@ -using CalamityMod.Particles; +using CalamityMod.Dusts; +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -40,19 +41,18 @@ namespace CalamityMod.Projectiles.Ranged if (Time >= 8f) { float cinderSize = Utils.GetLerpValue(6f, 12f, Time, true); - Dust cinder = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, 6, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 10, default, 0.75f); + Dust cinder = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType(), Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 10, default, 0.75f); if (Main.rand.NextBool(3)) { cinder.scale *= 3f; cinder.velocity *= 1.5f; } cinder.noGravity = true; - cinder.velocity *= 1.2f; - cinder.scale *= cinderSize * 0.5f; + cinder.scale *= cinderSize * 0.8f; cinder.velocity += Projectile.velocity; } - else if (Time == 7f) // Create sparks around the tip - SpawnSparks(2); + else if (Time == 7f && !Main.rand.NextBool(4)) // Create short sparks around the tip at a pretty high chance + SpawnSparks(3, true); } // On-impact sparks @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Ranged SpawnSparks(5); } - public void SpawnSparks(int count) + public void SpawnSparks(int count, bool shorts = false) { for (int i = 0; i < count; i++) { @@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Ranged Vector2 sparkVelocity = Projectile.velocity.RotatedByRandom(MathHelper.ToRadians(30f)) * Main.rand.NextFloat(1.5f, 3f); sparkVelocity.Y -= Main.rand.NextFloat(6f, 8f); - SparkParticle spark = new SparkParticle(Projectile.Center, sparkVelocity, true, sparkLifetime, sparkScale, sparkColor); + SparkParticle spark = new SparkParticle(Projectile.Center, (sparkVelocity * (shorts ? 0.75f : 1f)), true, sparkLifetime, sparkScale, sparkColor); GeneralParticleHandler.SpawnParticle(spark); } } From 89e8eb70b28dd19e66ed23037d1bdf33a7864ede Mon Sep 17 00:00:00 2001 From: Xyk Date: Fri, 13 Oct 2023 03:19:20 -0700 Subject: [PATCH 07/95] Dead Sun's Wind Rework Fires a concentrated blast of cosmic plasma that bounces and explodes on hit Upon hitting a surface a shot becomes empowered, dealing 1.2x damage and homing in on enemies Consecutive hits cause larger explosions --- CalPlayer/CalamityPlayer.cs | 1 + Items/Weapons/Ranged/DeadSunsWind.cs | 12 +- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 8 +- .../Mods.CalamityMod.Projectiles.Ranged.hjson | 1 + Particles/DetailedExplosion.cs | 55 ++++++++ Particles/DetailedExplosion.png | Bin 0 -> 9242 bytes Projectiles/Ranged/CosmicFire.cs | 133 +++++++++++------- Projectiles/Ranged/DeadSunExplosion.cs | 60 ++++++++ Sounds/Item/DeadSunExplosion.ogg | Bin 0 -> 16979 bytes Sounds/Item/DeadSunRicochet.ogg | Bin 0 -> 9750 bytes Sounds/Item/DeadSunShot.ogg | Bin 0 -> 12219 bytes 11 files changed, 215 insertions(+), 55 deletions(-) create mode 100644 Particles/DetailedExplosion.cs create mode 100644 Particles/DetailedExplosion.png create mode 100644 Projectiles/Ranged/DeadSunExplosion.cs create mode 100644 Sounds/Item/DeadSunExplosion.ogg create mode 100644 Sounds/Item/DeadSunRicochet.ogg create mode 100644 Sounds/Item/DeadSunShot.ogg diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 1a5d0ecf48..1c578ec42b 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -178,6 +178,7 @@ namespace CalamityMod.CalPlayer #region Timer and Counter public int gaelSwipes = 0; + public int deadSunCounter = 6; public bool sBlasterDashActivated = false; public int Holyhammer = 0; public int PHAThammer = 0; diff --git a/Items/Weapons/Ranged/DeadSunsWind.cs b/Items/Weapons/Ranged/DeadSunsWind.cs index b107626c62..9d8143d7e9 100644 --- a/Items/Weapons/Ranged/DeadSunsWind.cs +++ b/Items/Weapons/Ranged/DeadSunsWind.cs @@ -2,6 +2,7 @@ using CalamityMod.Projectiles.Ranged; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; @@ -11,18 +12,21 @@ namespace CalamityMod.Items.Weapons.Ranged public class DeadSunsWind : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Ranged"; + + public static readonly SoundStyle Shoot = new("CalamityMod/Sounds/Item/DeadSunShot") { PitchVariance = 0.35f, Volume = 0.4f }; + public static readonly SoundStyle Ricochet = new("CalamityMod/Sounds/Item/DeadSunRicochet") { Volume = 0.35f }; + public static readonly SoundStyle Explosion = new("CalamityMod/Sounds/Item/DeadSunExplosion") { Volume = 0.5f }; public override void SetDefaults() { - Item.damage = 80; + Item.damage = 155; Item.DamageType = DamageClass.Ranged; Item.width = 70; Item.height = 24; - Item.useTime = 6; - Item.useAnimation = 18; + Item.useTime = Item.useAnimation = 22; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.5f; - Item.UseSound = SoundID.Item34; + Item.UseSound = Shoot; Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Cyan; Item.autoReuse = true; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index ac101f7c9a..385a8383bc 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -349,7 +349,13 @@ DarkechoGreatbow: { DeadSunsWind: { DisplayName: Dead Sun's Wind - Tooltip: 70% chance to save ammo + Tooltip: + ''' + Fires a concentrated blast of cosmic plasma that bounces and explodes on hit + Upon hitting a surface a shot becomes empowered, dealing 1.2x damage and homing in on enemies + Consecutive hits cause larger explosions + 70% chance to save ammo + ''' } Deathwind: { diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson index 5504304759..c423bb4391 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson @@ -237,3 +237,4 @@ Voidragon.DisplayName: Voidragon Blast VoidragonTentacle.DisplayName: Voidragon Tentacle WaterSpout.DisplayName: Spout WulfrumScrapBullet.DisplayName: High Speed Scrap +DeadSunExplosion.DisplayName: Dead Sun Explosion diff --git a/Particles/DetailedExplosion.cs b/Particles/DetailedExplosion.cs new file mode 100644 index 0000000000..57d9e1efd7 --- /dev/null +++ b/Particles/DetailedExplosion.cs @@ -0,0 +1,55 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; +using static CalamityMod.CalamityUtils; + +namespace CalamityMod.Particles +{ + public class DetailedExplosion : Particle + { + public override string Texture => "CalamityMod/Particles/DetailedExplosion"; + public override bool UseAdditiveBlend => true; + public override bool SetLifetime => true; + public override bool UseCustomDraw => true; + + private float OriginalScale; + private float FinalScale; + private float opacity; + private Vector2 Squish; + private Color BaseColor; + + public DetailedExplosion(Vector2 position, Vector2 velocity, Color color, Vector2 squish, float rotation, float originalScale, float finalScale, int lifeTime) + { + Position = position; + Velocity = velocity; + BaseColor = color; + OriginalScale = originalScale; + FinalScale = finalScale; + Scale = originalScale; + Lifetime = lifeTime; + Squish = squish; + Rotation = rotation; + } + + public override void Update() + { + float pulseProgress = PiecewiseAnimation(LifetimeCompletion, new CurveSegment[] { new CurveSegment(EasingType.PolyOut, 0f, 0f, 1f, 4) }); + Scale = MathHelper.Lerp(OriginalScale, FinalScale, pulseProgress); + + opacity = (float)Math.Sin(MathHelper.PiOver2 + LifetimeCompletion * MathHelper.PiOver2); + + Color = BaseColor * opacity; + Lighting.AddLight(Position, Color.R / 255f, Color.G / 255f, Color.B / 255f); + Velocity *= 0.95f; + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + Texture2D tex = ModContent.Request(Texture).Value; + spriteBatch.Draw(tex, Position - Main.screenPosition, null, Color * opacity, Rotation, tex.Size() / 2f, Scale * Squish, SpriteEffects.None, 0); + } + + } +} diff --git a/Particles/DetailedExplosion.png b/Particles/DetailedExplosion.png new file mode 100644 index 0000000000000000000000000000000000000000..23a70b43f253e546989ed2f8787f8599a0dfab2a GIT binary patch literal 9242 zcmX|Gc|26z|DR?CBVkY``xa@jK6VY)E~2DtS@U4R7-el3TzlE-X`uy!M<`MmyCJEx zSS}5+E0u}HlCd3p0 zg+SO|D!dtU%6U{gqo1x%Kk*Ot@^vVLa1v=NNVmPJeo%`aYxndDLQ&81RJf(n)q5Ci z)tRI+i>r?nFQ@Hrdc1&^uw6YdtRP>$9lMqhs8GaAcwL>j_@*`T7Bc>QcIYj!O&q;NNdCvx z!FQ(ForvGX*PGoHwGbx?vgf{Uj(SSqUK`+D?5Ia|7?z-XnXcmUkThCX0utlUBy2o@@P8nlJx1ZM7*OO zLiL{s^)C_5e}}61|D&p%tTuZQF=PAM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F^|t|%4B_e-_*3Ha^z`xH zZCl8}lVq{mUgneJuDI>MN7@R>NT7iTdJ-#jKYKYV`1um$APfz2tXBUK0#9l zI?dbetvQ(ws88%Ao~pc+VTgfUHxBaxEb~2vZ9$aZyyloc)IC<~Xbe?vHUBrAZh7c2 zQI0vKxm@8b_w0zxLP8*AToJ|$yTPIqpxcsq!{poJ7=^4!aUHN|AuO>jm!j~$)-0g= z36W}(0h$WF#WI^?rOq8jbHMF4!fL2ng8=O`c5l)g%t*olu-nY?9$ZAqbm@WXqR1MY zpC#LD<$|Zn5XWq{;lRil9W+@RN%``*sroX|-QY!~^Z0J~#^KeSh92(ck5Y#QhTjGM z5sp`zEa62ziKmwF_%{057@JHHYH<9z-JLijYZquOh@>|Jpy+RALioGUD^h+`m@SMw$JC30QmB}^lD0E%(bG)i$Bt=Dv2Tl>25PB zU11ye "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - + public ref int HitCount => ref Main.player[Projectile.owner].Calamity().deadSunCounter; + public int Time = 0; + public int bounceKill = 0; + public bool extraDamage = false; public override void SetDefaults() { Projectile.width = 10; @@ -15,70 +24,94 @@ namespace CalamityMod.Projectiles.Ranged Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; - Projectile.penetrate = -1; - Projectile.extraUpdates = 3; - Projectile.timeLeft = 100; + Projectile.penetrate = 1; + Projectile.extraUpdates = 9; + Projectile.timeLeft = 500; } public override void AI() { - if (Projectile.scale <= 1.5f) + Time++; + Lighting.AddLight(Projectile.Center, 0.117f, 0.155f, 0.159f); + if (Projectile.timeLeft % 3 == 0 && Time > 12) { - Projectile.scale *= 1.01f; + SparkParticle spark = new SparkParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 20, 2.3f, Main.rand.NextBool() ? Color.Turquoise : Color.MediumSpringGreen); + GeneralParticleHandler.SpawnParticle(spark); } - Lighting.AddLight(Projectile.Center, 0.25f, 0f, 0.1f); - if (Projectile.ai[0] > 7f) + if (Projectile.timeLeft % 2 == 0 && Time > 12) { - float scalar = 1f; - if (Projectile.ai[0] == 8f) + SparkParticle spark2 = new SparkParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 20, 0.9f, Color.White); + GeneralParticleHandler.SpawnParticle(spark2); + } + if (Time == 7) + { + for (int i = 0; i <= 18; i++) { - scalar = 0.25f; - } - else if (Projectile.ai[0] == 9f) - { - scalar = 0.5f; - } - else if (Projectile.ai[0] == 10f) - { - scalar = 0.75f; - } - Projectile.ai[0] += 1f; - int dustType = Main.rand.NextBool(4) ? 61 : 62; - if (Main.rand.NextBool()) - { - int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); - Dust dust = Main.dust[fire]; - if (Main.rand.NextBool(3)) - { - dust.noGravity = true; - dust.scale *= 3f; - dust.velocity.X *= 2f; - dust.velocity.Y *= 2f; - } - else - { - dust.scale *= 1.5f; - } - dust.velocity.X *= 1.2f; - dust.velocity.Y *= 1.2f; - dust.scale *= scalar; - dust.velocity += Projectile.velocity; - if (!dust.noGravity) - { - dust.velocity *= 0.5f; - } + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 191 : 156, Projectile.velocity); + dust.scale = Main.rand.NextFloat(1.5f, 2.3f); + dust.velocity = Projectile.velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.3f, 2.1f); + dust.noGravity = true; } } - else + if (extraDamage) { - Projectile.ai[0] += 1f; + for (int i = 0; i <= 2; i++) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(4) ? 229 : 156, -Projectile.velocity); + dust.scale = Main.rand.NextFloat(0.7f, 1.3f); + dust.velocity = -Projectile.velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.3f, 1.7f); + dust.noGravity = true; + } + CalamityUtils.HomeInOnNPC(Projectile, false, 600f, 12f, 20f); } - Projectile.rotation += 0.3f * (float)Projectile.direction; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.immune[Projectile.owner] = 3; + SoundEngine.PlaySound(DeadSunsWind.Explosion with { Pitch = HitCount * 0.05f }, Projectile.Center); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage - (Projectile.damage / 3), 4f, Projectile.owner, HitCount * 10, extraDamage ? 5 : 0); + if (HitCount >= 15) + HitCount = 6; + else + HitCount++; + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + float numberOfDusts = 20; + float rotFactor = 360f / numberOfDusts; + for (int i = 0; i < numberOfDusts; i++) + { + float rot = MathHelper.ToRadians(i * rotFactor); + Vector2 offset = new Vector2(Main.rand.NextFloat(1, 3.1f), 0).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f)); + Vector2 velOffset = new Vector2(Main.rand.NextFloat(1, 3.1f), 0).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f)); + Dust dust = Dust.NewDustPerfect(Projectile.Center + offset, Main.rand.NextBool(4) ? 229 : 156, new Vector2(velOffset.X, velOffset.Y)); + dust.noGravity = true; + dust.velocity = velOffset; + dust.scale = Main.rand.NextFloat(2.6f, 3.2f); + } + Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.Turquoise, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0.1f, 0.9f - (bounceKill * 0.25f), 25); + GeneralParticleHandler.SpawnParticle(pulse); + Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.MediumSpringGreen, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0.05f, 0.8f - (bounceKill * 0.25f), 25); + GeneralParticleHandler.SpawnParticle(pulse2); + extraDamage = true; + if (bounceKill == 0) + { + Projectile.damage = Projectile.damage + (Projectile.damage / 5); // 20% damage bonus after a bounce + SoundEngine.PlaySound(DeadSunsWind.Ricochet, Projectile.Center); + } + bounceKill++; + if (Projectile.velocity.X != oldVelocity.X) + { + Projectile.velocity.X = -oldVelocity.X; + } + if (Projectile.velocity.Y != oldVelocity.Y) + { + Projectile.velocity.Y = -oldVelocity.Y; + } + if (bounceKill == 4) + Projectile.Kill(); + return false; } } } diff --git a/Projectiles/Ranged/DeadSunExplosion.cs b/Projectiles/Ranged/DeadSunExplosion.cs new file mode 100644 index 0000000000..22ac4de6b2 --- /dev/null +++ b/Projectiles/Ranged/DeadSunExplosion.cs @@ -0,0 +1,60 @@ +using System; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Ranged +{ + public class DeadSunExplosion : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Ranged"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public Player Owner => Main.player[Projectile.owner]; + public ref float ExplosionRadius => ref Projectile.ai[0]; + + public override void SetDefaults() + { + //These shouldn't matter because its circular + Projectile.width = 100; + Projectile.height = 100; + Projectile.friendly = true; + Projectile.DamageType = DamageClass.Ranged; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.penetrate = -1; + Projectile.timeLeft = 2; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; + } + public override void AI() + { + Particle explosion = new DetailedExplosion(Projectile.Center, Vector2.Zero, Color.Turquoise, new Vector2(1f, 1f), Main.rand.NextFloat(-5, 5), 0f, ExplosionRadius * 0.0065f + 0.1f, Main.rand.Next(15, 22)); + GeneralParticleHandler.SpawnParticle(explosion); + Particle explosion2 = new DetailedExplosion(Projectile.Center, Vector2.Zero, Color.MediumSpringGreen, new Vector2(1f, 1f), Main.rand.NextFloat(-5, 5), 0f, ExplosionRadius * 0.0045f + 0.1f, Main.rand.Next(15, 22)); + GeneralParticleHandler.SpawnParticle(explosion2); + Particle orb = new GenericBloom(Projectile.Center, Projectile.velocity, Color.Turquoise, ExplosionRadius * 0.0085f + 0.05f, 10, true); + GeneralParticleHandler.SpawnParticle(orb); + Particle orb2 = new GenericBloom(Projectile.Center, Projectile.velocity, Color.MediumSpringGreen, ExplosionRadius * 0.006f + 0.05f, 10, true); + GeneralParticleHandler.SpawnParticle(orb2); + float numberOfDusts = ExplosionRadius * 0.1f + 10; + float rotFactor = 360f / numberOfDusts; + for (int i = 0; i < numberOfDusts; i++) + { + float rot = MathHelper.ToRadians(i * rotFactor); + Vector2 offset = new Vector2(Main.rand.NextFloat(ExplosionRadius * 0.2f, 3.1f), 0).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f)); + Vector2 velOffset = new Vector2(Main.rand.NextFloat(ExplosionRadius * 0.2f, 3.1f), 0).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f)); + Dust dust = Dust.NewDustPerfect(Projectile.Center + offset, Main.rand.NextBool(4) ? 229 : Projectile.ai[1] == 5 ? 226 : 156, new Vector2(velOffset.X, velOffset.Y)); + dust.noGravity = dust.type == 226 ? false : true; + dust.color = dust.type == 226 ? Color.Turquoise : default; + dust.velocity = velOffset; + dust.scale = dust.type == 226 ? Main.rand.NextFloat(0.7f, 1.3f) : Main.rand.NextFloat(1.6f, 2.2f); + } + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, ExplosionRadius + 20, targetHitbox); + } +} diff --git a/Sounds/Item/DeadSunExplosion.ogg b/Sounds/Item/DeadSunExplosion.ogg new file mode 100644 index 0000000000000000000000000000000000000000..5ffd7660cef4184c79429f9a636db1f8253277d5 GIT binary patch literal 16979 zcmajG1ymft(=R$W1OfyL9vl`4?rtG07Tn$4A!rB|AXsn@?h6EW3GVJ5+!Ne+OY;Bj z_r3exxpz))pPsJis_v>^)ztLNDwvxq1F*nv$gdObIj(*}!ys`hOk$aQ_%_KV2?U9WtHA)z6joWXZojc;RRF*Q00SxzdaRi=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@nSJnH2$Yfs-gRgeSF~G}b2Q3!=(=rW0bbs&nj`?n9NzRDZ za#om$nz6BQGlCRYaX#CxyAgxFd0C_Ic(Dx&{{In({dxwa+pVXGJ$?DjmtHyjs%uW= z4 Date: Fri, 13 Oct 2023 18:47:52 +0700 Subject: [PATCH 08/95] Aurora Blazer :fire: --- Items/Weapons/Ranged/AuroraBlazer.cs | 20 +-- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 3 +- Projectiles/Ranged/AuroraFire.cs | 138 +++++++++++------- 3 files changed, 91 insertions(+), 70 deletions(-) diff --git a/Items/Weapons/Ranged/AuroraBlazer.cs b/Items/Weapons/Ranged/AuroraBlazer.cs index 00c45e3909..e5555c26b4 100644 --- a/Items/Weapons/Ranged/AuroraBlazer.cs +++ b/Items/Weapons/Ranged/AuroraBlazer.cs @@ -15,13 +15,14 @@ namespace CalamityMod.Items.Weapons.Ranged { Item.damage = 49; Item.DamageType = DamageClass.Ranged; - Item.useTime = 18; - Item.useAnimation = 18; + Item.useTime = 5; + Item.useAnimation = 30; Item.knockBack = 2f; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 7.5f; Item.useAmmo = AmmoID.Gel; + Item.consumeAmmoOnFirstShotOnly = true; Item.width = 68; Item.height = 36; @@ -32,21 +33,8 @@ namespace CalamityMod.Items.Weapons.Ranged Item.rare = ItemRarityID.Lime; } - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) - { - float SpeedX = velocity.X + Main.rand.NextFloat(-15f, 15f) * 0.05f; - float SpeedY = velocity.Y + Main.rand.NextFloat(-15f, 15f) * 0.05f; - Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI, Main.rand.Next(4, 11), 0f); - return false; - } - - public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) - { - Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/Ranged/AuroraBlazerGlow").Value); - } + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) => Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request(Texture + "Glow").Value); public override Vector2? HoldoutOffset() => new Vector2(-10, 0); - - public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= 60; } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 43fe750091..16acaffecc 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -115,9 +115,8 @@ AuroraBlazer: { DisplayName: Aurora Blazer Tooltip: ''' - Spews astral flames that travel in a star-shaped patterns + Spews stellar dusts that travel in star-shaped patterns Uses gel for ammo - 60% chance to save ammo ''' } diff --git a/Projectiles/Ranged/AuroraFire.cs b/Projectiles/Ranged/AuroraFire.cs index 5c5018021a..052c76cb66 100644 --- a/Projectiles/Ranged/AuroraFire.cs +++ b/Projectiles/Ranged/AuroraFire.cs @@ -1,6 +1,7 @@ using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Dusts; +using CalamityMod.Particles; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System; using Terraria; using Terraria.ModLoader; @@ -12,75 +13,108 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - private const int framesBeforeTurning = 70; - private bool initialized = false; - private int radianAmt = 0; + public static int Lifetime => 450; + public static int Fadetime => 420; + public ref float Time => ref Projectile.ai[0]; + public ref float LightPower => ref Projectile.ai[1]; + + // The Fog is Coming + public Color OrangeFogColor = new Color(255, 160, 100); + public float OrangeFogRot = 0f; + public float OrangeFogScale = 1f; + public Color BlueFogColor = new Color(150, 120, 255); + public float BlueFogRot = 0f; + public float BlueFogScale = 1f; public override void SetDefaults() { - Projectile.width = 12; - Projectile.height = 12; + Projectile.width = Projectile.height = 64; Projectile.friendly = true; Projectile.ignoreWater = true; + Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = -1; - Projectile.extraUpdates = 3; - Projectile.tileCollide = false; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 20; + Projectile.MaxUpdates = 3; + Projectile.timeLeft = Lifetime; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 15; } public override void AI() { - if (Projectile.ai[0] % 2 == 0) - Projectile.ai[0]++; - - if (!initialized) + // Initialize random fog scale/rotation/color + if (Time == 0f) { - int pointCount = (int)Projectile.ai[0]; - radianAmt = 180 + (int)(360 / (pointCount * 2)); - Projectile.timeLeft = framesBeforeTurning * pointCount - 1; - initialized = true; + OrangeFogColor.B = (byte)Main.rand.Next(100, 180 + 1); + OrangeFogScale = Main.rand.NextFloat(0.8f, 1f); + OrangeFogRot = Main.rand.NextFloat(MathHelper.TwoPi); + BlueFogColor.G = (byte)Main.rand.Next(120, 250 + 1); + BlueFogScale = OrangeFogScale * Main.rand.NextFloat(0.9f, 1.1f); + BlueFogRot = OrangeFogRot + MathHelper.ToRadians(Main.rand.NextFloat(30f, 330f)); + } + Time++; + + // Turns around every once in a while + int TurnRate = Lifetime / 5; + if (Time % TurnRate == TurnRate - 1) + Projectile.velocity = Projectile.velocity.RotatedBy(MathHelper.ToRadians(-216f)); + Projectile.rotation = Projectile.velocity.ToRotation(); + + // Determines particle size as well as hitbox + if (Time >= Fadetime) + { + Projectile.scale = Utils.GetLerpValue(MathHelper.Lerp(Fadetime, Lifetime, 0.5f), Fadetime, Time, true); + if (Projectile.scale <= 0.01f) + Projectile.Kill(); + } + else if (Time >= 6f) + Projectile.scale = Utils.GetLerpValue(6f, 36f, Time, true); + else + return; // Helps position it at the tip + + // Draw smokes over the whole thing + float smokeRot = MathHelper.ToRadians(3f); // *Rate of rotation per frame, not a constant rotation + Color smokeColor = Color.Lerp(OrangeFogColor, BlueFogColor, 0.6f + 0.4f * MathF.Sin(Main.GlobalTimeWrappedHourly * 5f)); + Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, smokeColor, 20, Projectile.scale * Main.rand.NextFloat(0.6f, 1.2f), 0.8f, smokeRot, required: true); + GeneralParticleHandler.SpawnParticle(smoke); + + // Overlay the glow on top, which is on the brighter side + if (Main.rand.NextBool(3)) + { + Color glowColor = Color.Lerp(smokeColor, Color.White, 0.25f); + Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, glowColor, 15, Projectile.scale * Main.rand.NextFloat(0.4f, 0.7f), 0.8f, smokeRot, true, 0.005f, true); + GeneralParticleHandler.SpawnParticle(smokeGlow); } - //Velocity movement - Projectile.localAI[1]++; - if (Projectile.localAI[1] % framesBeforeTurning == 0) - { - Projectile.velocity = Projectile.velocity.RotatedBy(MathHelper.ToRadians(radianAmt)); - } - - //Dust behavior - Projectile.localAI[0] += 1f; - if (Projectile.localAI[0] > 4f) - { - int dustType = Utils.SelectRandom(Main.rand, new int[] - { - ModContent.DustType(), - ModContent.DustType() - }); - for (int i = 0; i < 5; i++) - { - int astral = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 0.8f); - Dust dust = Main.dust[astral]; - dust.noGravity = true; - dust.velocity *= 0f; - dust.scale *= Main.rand.NextFloat(); - } - } - - //rotation code for when sproot - Projectile.rotation = (float)Math.Atan2((double)Projectile.velocity.Y, (double)Projectile.velocity.X) + 1.57f; + // Lighting and fog + Lighting.AddLight(Projectile.Center, smokeColor.ToVector3() * Projectile.scale); + OrangeFogRot += MathHelper.ToRadians(1f); + BlueFogRot -= MathHelper.ToRadians(1f); + Projectile.Opacity = Utils.GetLerpValue(0f, 15f, Time, true) * Utils.GetLerpValue(450f, 360f, Time, true); + + // Calculate light power. This checks below the position of the fog to check if this fog is underground. + // Without this, it may render over the fullblack that the game renders for obscured tiles. + float lightPowerBelow = Lighting.GetColor((int)Projectile.Center.X / 16, (int)Projectile.Center.Y / 16 + 6).ToVector3().Length() / (float)Math.Sqrt(3D); + LightPower = MathHelper.Lerp(LightPower, lightPowerBelow, 0.15f); } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(ModContent.BuffType(), 240); - } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 240); - public override void OnHitPlayer(Player target, Player.HurtInfo info) + public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 240); + + // Circular hitbox adjusted for the size of the smoke particles (rough estimate minimally accounting for fog) + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width * Projectile.scale * 0.5f, targetHitbox); + + public override bool PreDraw(ref Color lightColor) { - target.AddBuff(ModContent.BuffType(), 240); + Main.spriteBatch.SetBlendState(BlendState.Additive); + Texture2D fog = ModContent.Request("CalamityMod/Projectiles/Magic/RancorFog").Value; + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + float opacity = Utils.GetLerpValue(0f, 0.08f, LightPower, true) * Projectile.Opacity * 0.3f; + Main.EntitySpriteDraw(fog, drawPosition, null, OrangeFogColor * opacity, Projectile.rotation + OrangeFogRot, fog.Size() * 0.5f, Projectile.scale * OrangeFogScale, SpriteEffects.None); + Main.EntitySpriteDraw(fog, drawPosition, null, BlueFogColor * opacity, Projectile.rotation + BlueFogRot, fog.Size() * 0.5f, Projectile.scale * BlueFogScale, SpriteEffects.None); + Main.spriteBatch.SetBlendState(BlendState.AlphaBlend); + return false; } } } From 8246d5b78cf0b655a0092fe5bfa689e208487edf Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Fri, 13 Oct 2023 21:12:44 +0700 Subject: [PATCH 09/95] Cataclysm spewing heat --- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 12 +- NPCs/CalamityAI.cs | 4 +- Projectiles/Boss/BrimstoneFire.cs | 157 +++++++++++++----- Projectiles/Ranged/AuroraFire.cs | 2 +- Projectiles/Ranged/BrimstoneFireFriendly.cs | 19 ++- 5 files changed, 143 insertions(+), 51 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 78b6f81e47..0710ebed5f 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -354,12 +354,12 @@ DarkechoGreatbow: { DeadSunsWind: { DisplayName: Dead Sun's Wind Tooltip: - ''' - Fires a concentrated blast of cosmic plasma that bounces and explodes on hit - Upon hitting a surface a shot becomes empowered, dealing 1.2x damage and homing in on enemies - Consecutive hits cause larger explosions - 70% chance to save ammo - ''' + ''' + Fires a concentrated blast of cosmic plasma that bounces and explodes on hit + Upon hitting a surface a shot becomes empowered, dealing 1.2x damage and homing in on enemies + Consecutive hits cause larger explosions + 70% chance to save ammo + ''' } Deathwind: { diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index abbf1c3288..1f44bc3d7d 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -2177,9 +2177,9 @@ namespace CalamityMod.NPCs if (Main.netMode != NetmodeID.MultiplayerClient) { - npc.localAI[1] += 1f; + npc.localAI[1] += 3f; if (revenge) - npc.localAI[1] += 0.5f; + npc.localAI[1] += 1f; if (npc.localAI[1] > 12f) { diff --git a/Projectiles/Boss/BrimstoneFire.cs b/Projectiles/Boss/BrimstoneFire.cs index 8cc17235dd..e4f7699ef2 100644 --- a/Projectiles/Boss/BrimstoneFire.cs +++ b/Projectiles/Boss/BrimstoneFire.cs @@ -1,76 +1,153 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; + namespace CalamityMod.Projectiles.Boss { public class BrimstoneFire : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Boss"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public override string Texture => "CalamityMod/Projectiles/FireProj"; + + public static int Lifetime => 90; + public static int Fadetime => 80; + public ref float Time => ref Projectile.ai[0]; + public int MistType = -1; public override void SetDefaults() { - Projectile.width = 6; - Projectile.height = 6; + Projectile.width = Projectile.height = 10; Projectile.hostile = true; Projectile.ignoreWater = true; Projectile.penetrate = -1; - Projectile.extraUpdates = 3; - Projectile.timeLeft = 90; + Projectile.MaxUpdates = 3; + Projectile.timeLeft = Lifetime; CooldownSlot = ImmunityCooldownID.Bosses; } public override void AI() { - Lighting.AddLight(Projectile.Center, 0.3f, 0f, 0f); - if (Projectile.ai[0] > 7f) + Time++; + if (Time < Fadetime && Main.rand.NextBool(6)) { - float scalar = 1f; - if (Projectile.ai[0] == 8f) + Vector2 cinderPos = Projectile.Center + Main.rand.NextVector2Circular(60f, 60f) * Utils.Remap(Time, 0f, Lifetime, 0.5f, 1f); + float cinderSize = Utils.GetLerpValue(6f, 12f, Time, true); + Dust cinder = Dust.NewDustDirect(cinderPos, 4, 4, ModContent.DustType(), Projectile.velocity.X * 0.25f, Projectile.velocity.Y * 0.25f); + if (Main.rand.NextBool(3)) { - scalar = 0.25f; - } - else if (Projectile.ai[0] == 9f) - { - scalar = 0.5f; - } - else if (Projectile.ai[0] == 10f) - { - scalar = 0.75f; - } - Projectile.ai[0] += 1f; - int dustType = (int)CalamityDusts.Brimstone; - if (Main.rand.NextBool()) - { - int fire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.1f, Projectile.velocity.Y * 0.1f, 100, default, 1f); - Dust dust = Main.dust[fire]; - if (Main.rand.NextBool(3)) - { - dust.noGravity = true; - dust.scale *= 3f; - } - else - { - dust.scale *= 1.5f; - } - dust.scale *= scalar; + cinder.scale *= 2f; + cinder.velocity *= 2f; } + cinder.noGravity = true; + cinder.scale *= cinderSize * 1.2f; + cinder.velocity += Projectile.velocity * Utils.Remap(Time, 0f, Fadetime * 0.75f, 1f, 0.1f) * Utils.Remap(Time, 0f, Fadetime * 0.1f, 0.1f, 1f); } - else - { - Projectile.ai[0] += 1f; - } - Projectile.rotation += 0.3f * (float)Projectile.direction; + + if (MistType == -1) + MistType = Main.rand.Next(3); + + Lighting.AddLight(Projectile.Center, 0.75f, 0.15f, 0.15f); } + // Keeping the flames in place when hitting a block + public override bool OnTileCollide(Vector2 oldVelocity) + { + Projectile.velocity = oldVelocity * 0.95f; + Projectile.position -= Projectile.velocity; + Time++; + Projectile.timeLeft--; + return false; + } + + // Expanding hitbox + // A bit more generous than Havoc's Breath fire because enemy projectiles + public override void ModifyDamageHitbox(ref Rectangle hitbox) + { + int size = (int)Utils.Remap(Time, 0f, Fadetime, 8f, 32f); + + // Shrinks again after fading + if (Time > Fadetime) + size = (int)Utils.Remap(Time, Fadetime, Lifetime, 32f, 0f); + hitbox.Inflate(size, size); + } + + // Anti-wall hacking checks + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => projHitbox.Intersects(targetHitbox) && Collision.CanHit(Projectile.Center, 0, 0, targetHitbox.Center.ToVector2(), 0, 0) ? null : false; + public override void OnHitPlayer(Player target, Player.HurtInfo info) { if (info.Damage <= 0) return; target.AddBuff(ModContent.BuffType(), 150); + + // Cook you up (still scales with player size in case it's manipulated) + int smokeCount = 4 + (int)MathHelper.Clamp(target.width * 0.1f, 0f, 20f); + for (int i = 0; i < smokeCount; i++) + { + Vector2 smokePos = target.Center + Main.rand.NextVector2Circular(target.width * 0.5f, target.height * 0.5f); + Vector2 smokeVel = Vector2.UnitY * Main.rand.NextFloat(-2.4f, -0.8f) * MathHelper.Clamp(target.height * 0.1f, 1f, 10f); + Particle smoke = new MediumMistParticle(smokePos, smokeVel, new Color(255, 50, 50), Color.DimGray, Main.rand.NextFloat(1f, 2f), 245 - Main.rand.Next(50), 0.1f); + GeneralParticleHandler.SpawnParticle(smoke); + } + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D fire = ModContent.Request(Texture).Value; + Texture2D mist = ModContent.Request("CalamityMod/Particles/MediumMist").Value; + + // The conga line of colors to sift through + Color color1 = new Color(255, 110, 100, 200); + Color color2 = new Color(255, 50, 50, 70); + Color color3 = new Color(255, 100, 100, 100); + Color color4 = new Color(200, 35, 30, 100); + float length = ((Time > Fadetime - 10f) ? 0.1f : 0.15f); + float vOffset = Math.Min(Time, 20f); + float timeRatio = Utils.GetLerpValue(0f, Lifetime, Time); + float fireSize = Utils.Remap(timeRatio, 0.2f, 0.5f, 0.25f, 1f); + + if (timeRatio >= 1f) + return false; + + for (float j = 1f; j >= 0f; j -= length) + { + // Color + Color fireColor = ((timeRatio < 0.1f) ? Color.Lerp(Color.Transparent, color1, Utils.GetLerpValue(0f, 0.1f, timeRatio)) : + ((timeRatio < 0.2f) ? Color.Lerp(color1, color2, Utils.GetLerpValue(0.1f, 0.2f, timeRatio)) : + ((timeRatio < 0.35f) ? color2 : + ((timeRatio < 0.7f) ? Color.Lerp(color2, color3, Utils.GetLerpValue(0.35f, 0.7f, timeRatio)) : + ((timeRatio < 0.85f) ? Color.Lerp(color3, color4, Utils.GetLerpValue(0.7f, 0.85f, timeRatio)) : + Color.Lerp(color4, Color.Transparent, Utils.GetLerpValue(0.85f, 1f, timeRatio))))))); + fireColor *= (1f - j) * Utils.GetLerpValue(0f, 0.2f, timeRatio, true); + Color innerColor = Color.Lerp(fireColor, Color.Black, 0.3f); + + // Positions and rotations + Vector2 firePos = Projectile.Center - Main.screenPosition - Projectile.velocity * vOffset * j; + float mainRot = -j * MathHelper.PiOver2 - Main.GlobalTimeWrappedHourly * (j + 1f) * 2f / length; + float trailRot = MathHelper.PiOver4 - mainRot; + + // Draw one backtrail + Vector2 trailOffset = Projectile.velocity * vOffset * length * 0.5f; + Main.EntitySpriteDraw(fire, firePos - trailOffset, null, innerColor * 0.25f, trailRot, fire.Size() * 0.5f, fireSize, SpriteEffects.None); + + // Draw the main fire + Main.EntitySpriteDraw(fire, firePos, null, innerColor, mainRot, fire.Size() * 0.5f, fireSize, SpriteEffects.None); + + // Draw the masking smoke + Main.spriteBatch.SetBlendState(BlendState.Additive); + Rectangle frame = mist.Frame(1, 3, 0, MistType); + Main.EntitySpriteDraw(mist, firePos, frame, Color.Lerp(fireColor, Color.White, 0.3f), mainRot, frame.Size() * 0.5f, fireSize, SpriteEffects.None); + Main.EntitySpriteDraw(mist, firePos, frame, fireColor, mainRot, frame.Size() * 0.5f, fireSize * 3f, SpriteEffects.None); + Main.spriteBatch.SetBlendState(BlendState.AlphaBlend); + } + return false; } } } diff --git a/Projectiles/Ranged/AuroraFire.cs b/Projectiles/Ranged/AuroraFire.cs index 052c76cb66..4fae52cd56 100644 --- a/Projectiles/Ranged/AuroraFire.cs +++ b/Projectiles/Ranged/AuroraFire.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.MaxUpdates = 3; Projectile.timeLeft = Lifetime; Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 15; + Projectile.idStaticNPCHitCooldown = 8; } public override void AI() diff --git a/Projectiles/Ranged/BrimstoneFireFriendly.cs b/Projectiles/Ranged/BrimstoneFireFriendly.cs index 8631d6af51..b422262db5 100644 --- a/Projectiles/Ranged/BrimstoneFireFriendly.cs +++ b/Projectiles/Ranged/BrimstoneFireFriendly.cs @@ -1,10 +1,12 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; using Terraria.ModLoader; + namespace CalamityMod.Projectiles.Ranged { public class BrimstoneFireFriendly : ModProjectile, ILocalizedModType @@ -51,7 +53,7 @@ namespace CalamityMod.Projectiles.Ranged if (MistType == -1) MistType = Main.rand.Next(3); - Lighting.AddLight(Projectile.Center, 1f, 0.2f, 0.2f); + Lighting.AddLight(Projectile.Center, 0.75f, 0.15f, 0.15f); } // Keeping the flames in place when hitting a block @@ -78,7 +80,20 @@ namespace CalamityMod.Projectiles.Ranged // Anti-wall hacking checks public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => projHitbox.Intersects(targetHitbox) && Collision.CanHit(Projectile.Center, 0, 0, targetHitbox.Center.ToVector2(), 0, 0) ? null : false; - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 240); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + target.AddBuff(ModContent.BuffType(), 240); + + // Gas up the enemy + int smokeCount = 4 + (int)MathHelper.Clamp(target.width * 0.1f, 0f, 20f); + for (int i = 0; i < smokeCount; i++) + { + Vector2 smokePos = target.Center + Main.rand.NextVector2Circular(target.width * 0.5f, target.height * 0.5f); + Vector2 smokeVel = Vector2.UnitY * Main.rand.NextFloat(-2.4f, -0.8f) * MathHelper.Clamp(target.height * 0.1f, 1f, 10f); + Particle smoke = new MediumMistParticle(smokePos, smokeVel, new Color(255, 50, 50), Color.DimGray, Main.rand.NextFloat(1f, 2f), 245 - Main.rand.Next(50), 0.1f); + GeneralParticleHandler.SpawnParticle(smoke); + } + } public override bool PreDraw(ref Color lightColor) { From d0eb97ce649252b40c87be3f05374ebf6329536a Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 14 Oct 2023 04:55:11 +0700 Subject: [PATCH 10/95] pristine fury lclick i guess --- Projectiles/Ranged/PristineFire.cs | 157 ++++++++++------------------- 1 file changed, 55 insertions(+), 102 deletions(-) diff --git a/Projectiles/Ranged/PristineFire.cs b/Projectiles/Ranged/PristineFire.cs index a12e433ba6..6af51601ef 100644 --- a/Projectiles/Ranged/PristineFire.cs +++ b/Projectiles/Ranged/PristineFire.cs @@ -1,7 +1,12 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; +using CalamityMod.Particles; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Ranged @@ -9,137 +14,85 @@ namespace CalamityMod.Projectiles.Ranged public class PristineFire : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public override string Texture => "CalamityMod/Particles/MediumMist"; - private int dust1 = (int)CalamityDusts.ProfanedFire; - private int dust2 = ModContent.DustType(); + // Helix trail thing + public PrimitiveTrail HelixTrail = null; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 20; + ProjectileID.Sets.TrailingMode[Type] = 2; + } public override void SetDefaults() { - Projectile.width = 6; - Projectile.height = 6; + Projectile.width = Projectile.height = 6; Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = 1; - Projectile.extraUpdates = 3; + Projectile.MaxUpdates = 4; Projectile.timeLeft = 120; } public override void AI() { - if (Projectile.scale <= 1.5f) - { - Projectile.scale *= 1.01f; - } + Projectile.rotation = Projectile.velocity.ToRotation(); Lighting.AddLight(Projectile.Center, 1f, 1f, 0.25f); - if (Projectile.timeLeft > 90) - { - Projectile.timeLeft = 120; - } - int dustTypeOnTimer = dust1; - - Projectile.localAI[0] += 1f; - if (Projectile.localAI[0] > 5f) - { - for (int num447 = 0; num447 < 2; num447++) - { - Vector2 vector33 = Projectile.position; - vector33 -= Projectile.velocity * ((float)num447 * 0.25f); - Projectile.alpha = 255; - int num448 = Dust.NewDust(vector33, 1, 1, dustTypeOnTimer, 0f, 0f, 0, default, 1f); - Main.dust[num448].noGravity = true; - Main.dust[num448].position = vector33; - Main.dust[num448].scale = (float)Main.rand.Next(70, 110) * 0.013f; - Main.dust[num448].velocity *= 0.2f; - Main.dust[num448].noLight = true; - Main.dust[num448].color = CalamityUtils.ColorSwap(new Color(255, 168, 53), new Color(255, 249, 0), 2f); - } - Projectile.ai[0] += 1f; - if (Projectile.ai[0] == 48f) - { - Projectile.ai[0] = 0f; - - if (dustTypeOnTimer == dust1) - dustTypeOnTimer = dust2; - else - dustTypeOnTimer = dust1; - } - else - { - Vector2 value7 = new Vector2(5f, 10f); - - for (int num41 = 0; num41 < 2; num41++) - { - int dustType = num41 == 0 ? dust1 : dust2; - Vector2 value8 = Vector2.UnitX * -12f; - value8 = -Vector2.UnitY.RotatedBy((double)(Projectile.ai[0] * 0.1308997f + (float)num41 * 3.14159274f), default) * value7 * 1.5f; - int num42 = Dust.NewDust(Projectile.Center, 0, 0, dustType, 0f, 0f, 160, default, 1f); - Main.dust[num42].scale = 0.75f; - Main.dust[num42].noGravity = true; - Main.dust[num42].position = Projectile.Center + value8; - Main.dust[num42].velocity = Projectile.velocity; - Main.dust[num42].noLight = true; - Main.dust[num42].color = CalamityUtils.ColorSwap(new Color(255, 168, 53), new Color(255, 249, 0), 2f); - } - } - } + // Light smoke + Color smokeColor = new Color(255, Main.rand.Next(160, 230 + 1), 100, 100); + Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, smokeColor, 16, Main.rand.NextFloat(0.6f, 1.2f), 0.2f, glowing: true); + GeneralParticleHandler.SpawnParticle(smoke); } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(ModContent.BuffType(), 240); - } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 240); public override void OnKill(int timeLeft) { - int dustType = Utils.SelectRandom(Main.rand, new int[] - { - dust1, - dust2 - }); - int height = 50; - float num50 = 1.7f; - float num51 = 0.8f; - float num52 = 2f; - Vector2 value3 = (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2(); - Vector2 value4 = value3 * Projectile.velocity.Length() * (float)Projectile.MaxUpdates; - Projectile.position = Projectile.Center; - Projectile.width = Projectile.height = height; - Projectile.Center = Projectile.position; + Projectile.ExpandHitboxBy(50); Projectile.maxPenetrate = -1; Projectile.penetrate = -1; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 10; Projectile.Damage(); - for (int num53 = 0; num53 < 40; num53++) + + // Big poofy column + for (int i = 0; i < 10; i++) { - int num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 200, default, num50); - Dust dust = Main.dust[num54]; - dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; - dust.noGravity = true; - dust.velocity *= 3f; - dust.velocity += value4 * Main.rand.NextFloat(); - dust.color = CalamityUtils.ColorSwap(new Color(255, 168, 53), new Color(255, 249, 0), 2f); - num54 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, num51); - dust.position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * (float)Projectile.width / 2f; - dust.velocity *= 2f; - dust.noGravity = true; - dust.fadeIn = 1f; - dust.velocity += value4 * Main.rand.NextFloat(); - dust.color = CalamityUtils.ColorSwap(new Color(255, 168, 53), new Color(255, 249, 0), 2f); + Vector2 smokePos = Projectile.Center + Main.rand.NextVector2Circular(32f, 32f); + Vector2 smokeVel = Vector2.UnitY * Main.rand.NextFloat(-24f, -4f); + Particle smoke = new MediumMistParticle(smokePos, smokeVel, new Color(255, 220, 100), Color.Black, Main.rand.NextFloat(0.6f, 1.6f), 225 - Main.rand.Next(60), 0.1f); + GeneralParticleHandler.SpawnParticle(smoke); } - for (int num55 = 0; num55 < 20; num55++) + } + + public float HelixTrailWidthFunction(float completionRatio) => Utils.GetLerpValue(1f, 0.4f, completionRatio, true) * 2.5f; + public Color HelixTrailColorFunction(float completionRatio) => new Color(255, 220, 100) * (1f - completionRatio); + + public override bool PreDraw(ref Color lightColor) + { + if (HelixTrail is null) + HelixTrail = new PrimitiveTrail(HelixTrailWidthFunction, HelixTrailColorFunction); + + // Draw a double helix trail + for (int direction = -1; direction <= 1; direction += 2) { - int num56 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, num52); - Dust dust = Main.dust[num56]; - dust.position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy((double)Projectile.velocity.ToRotation(), default) * (float)Projectile.width / 3f; - dust.noGravity = true; - dust.velocity *= 0.5f; - dust.velocity += value4 * (0.6f + 0.6f * Main.rand.NextFloat()); - dust.color = CalamityUtils.ColorSwap(new Color(255, 168, 53), new Color(255, 249, 0), 2f); + List trailPositions = new List(); + int trailPoints = ProjectileID.Sets.TrailCacheLength[Type]; + // Add points adjusted for sine + for (int i = 0; i < Projectile.oldPos.Length; i++) + { + if (Projectile.oldPos[i] == Vector2.Zero) + break; + + Vector2 sinOffset = (Vector2.UnitY * direction * MathF.Sin(i * MathHelper.Pi * 0.125f) * 24f).RotatedBy(Projectile.oldRot[i]); + trailPositions.Add(Projectile.oldPos[i] + sinOffset); + } + HelixTrail.Draw(trailPositions, Projectile.Size * 0.5f- Main.screenPosition, 60); } + return false; } } } From abb5a877f4f50db4f7298ae70c4d22da6cc84f2a Mon Sep 17 00:00:00 2001 From: Xyk Date: Fri, 13 Oct 2023 15:48:02 -0700 Subject: [PATCH 11/95] Dead Sun's Wind touch ups new visuals and damage, changed some particles as well --- Items/Weapons/Ranged/DeadSunsWind.cs | 4 +- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 6 +-- Particles/AltSparkParticle.cs | 51 ++++++++++++++++++ Particles/DetailedExplosion.cs | 6 ++- Particles/DetailedExplosion.png | Bin 9242 -> 9236 bytes Projectiles/Ranged/CosmicFire.cs | 32 ++++++----- Projectiles/Ranged/DeadSunExplosion.cs | 17 +++--- 7 files changed, 88 insertions(+), 28 deletions(-) create mode 100644 Particles/AltSparkParticle.cs diff --git a/Items/Weapons/Ranged/DeadSunsWind.cs b/Items/Weapons/Ranged/DeadSunsWind.cs index 9d8143d7e9..44a56b4678 100644 --- a/Items/Weapons/Ranged/DeadSunsWind.cs +++ b/Items/Weapons/Ranged/DeadSunsWind.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged public static readonly SoundStyle Explosion = new("CalamityMod/Sounds/Item/DeadSunExplosion") { Volume = 0.5f }; public override void SetDefaults() { - Item.damage = 155; + Item.damage = 182; Item.DamageType = DamageClass.Ranged; Item.width = 70; Item.height = 24; @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool CanConsumeAmmo(Item ammo, Player player) { - if (Main.rand.Next(0, 100) < 70) + if (Main.rand.Next(0, 100) < 20) return false; return true; } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 0710ebed5f..059ba98a0a 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -355,10 +355,10 @@ DeadSunsWind: { DisplayName: Dead Sun's Wind Tooltip: ''' - Fires a concentrated blast of cosmic plasma that bounces and explodes on hit - Upon hitting a surface a shot becomes empowered, dealing 1.2x damage and homing in on enemies + Fires a concentrated blast of superheated cosmic plasma that explodes and can ricochet off blocks + Shots aggressively home in on enemies after being ricocheted Consecutive hits cause larger explosions - 70% chance to save ammo + 20% chance to save ammo ''' } diff --git a/Particles/AltSparkParticle.cs b/Particles/AltSparkParticle.cs new file mode 100644 index 0000000000..24fd3ec6c8 --- /dev/null +++ b/Particles/AltSparkParticle.cs @@ -0,0 +1,51 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Particles +{ + public class AltSparkParticle : Particle + { + public Color InitialColor; + public bool AffectedByGravity; + public override bool SetLifetime => true; + public override bool UseCustomDraw => true; + public override bool UseAdditiveBlend => false; + + public override string Texture => "CalamityMod/Projectiles/StarProj"; + + public AltSparkParticle(Vector2 relativePosition, Vector2 velocity, bool affectedByGravity, int lifetime, float scale, Color color) + { + Position = relativePosition; + Velocity = velocity; + AffectedByGravity = affectedByGravity; + Scale = scale; + Lifetime = lifetime; + Color = InitialColor = color; + } + + public override void Update() + { + Scale *= 0.95f; + Color = Color.Lerp(InitialColor, Color.Transparent, (float)Math.Pow(LifetimeCompletion, 3D)); + Velocity *= 0.95f; + if (Velocity.Length() < 12f && AffectedByGravity) + { + Velocity.X *= 0.94f; + Velocity.Y += 0.25f; + } + Rotation = Velocity.ToRotation() + MathHelper.PiOver2; + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + Vector2 scale = new Vector2(0.5f, 1.6f) * Scale; + Texture2D texture = ModContent.Request(Texture).Value; + + spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color, Rotation, texture.Size() * 0.5f, scale, 0, 0f); + spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color, Rotation, texture.Size() * 0.5f, scale * new Vector2(0.45f, 1f), 0, 0f); + } + } +} diff --git a/Particles/DetailedExplosion.cs b/Particles/DetailedExplosion.cs index 57d9e1efd7..cee0d32038 100644 --- a/Particles/DetailedExplosion.cs +++ b/Particles/DetailedExplosion.cs @@ -10,7 +10,8 @@ namespace CalamityMod.Particles public class DetailedExplosion : Particle { public override string Texture => "CalamityMod/Particles/DetailedExplosion"; - public override bool UseAdditiveBlend => true; + public bool UseAltVisual = true; + public override bool UseAdditiveBlend => UseAltVisual; public override bool SetLifetime => true; public override bool UseCustomDraw => true; @@ -20,7 +21,7 @@ namespace CalamityMod.Particles private Vector2 Squish; private Color BaseColor; - public DetailedExplosion(Vector2 position, Vector2 velocity, Color color, Vector2 squish, float rotation, float originalScale, float finalScale, int lifeTime) + public DetailedExplosion(Vector2 position, Vector2 velocity, Color color, Vector2 squish, float rotation, float originalScale, float finalScale, int lifeTime, bool UseAdditiveBlend = true) { Position = position; Velocity = velocity; @@ -31,6 +32,7 @@ namespace CalamityMod.Particles Lifetime = lifeTime; Squish = squish; Rotation = rotation; + UseAltVisual = UseAdditiveBlend; } public override void Update() diff --git a/Particles/DetailedExplosion.png b/Particles/DetailedExplosion.png index 23a70b43f253e546989ed2f8787f8599a0dfab2a..f2b4c369ba85c2daa85b2fa68978522ebfada248 100644 GIT binary patch delta 6492 zcmXX~c|26>|F7dSmdaLk z>85YCL({m8j7n+HP`5#5lHW7k-~9D?&3xuL&-px`=lyxV-#4AFIX@U)f@<%ux7`429^2CX;&3LD32}U$XSHpJNKv0l2^0qo^96tR;)HewruID zeYWZ<-$~`fi@A}3N`Kk74jzvetI=`R(#B>XVE)j9JR6dkyCWWuf=H>7%+@Q>-$7WC zK4i5@3Z0o9MjQO%OiWBV(6eV6562_B9r51Z>4pc*3EuX>b<(2g>6$U|FVRG0QM$<~ z3jcp3#(J1~gH(N$p6_Sg8p)JmCC3%YU>0_Gpf>Tq9#4ys7gj88E?mLi2CH}2;@uSf z%HPiotlBOxf5y9TZ6<3!?%F6Ye&RL^1b5mRk-hiZ!+ z;YOkRlguo&iJp%E1l3Dsnrp1O%)wulm!4$?36^3rZG-Qs6g0m_+`g+sKhb|7tKL*s zgf8+)+4!UXeflH60`qB2UE#_DFx~@0~f2 z7h`_%*qyS7I1fC_qoj%K&hSw!@$%OH=e|a^56s*M2?m37w26mG{2e~B`ieqh`F^gk z&PwuZnfuf^OBa%GHB3wLy@23>s5aqpSLX1nG;Od#Jb3Uyq?N)}s5}AbsGj&`ASr^5 zhspDg^0|q$fl2YfV2wJiK)}$4eMp#J`=t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~%b!2*z_h@SkdW-LfJo&)$oZcPqJZEFAnqMO zz8)@oxO^}p;CS(|y|>k&AgTFI7K^p7%~xus^u|z6iB(+HH#YcJ%ef%W(2oJT^%*+0 z!qOOHeG4H5|9EOSd>x4uUX)jly}gw?t@bK0MdW;WY0N@B%PW`2JHLAJrTy@}&^>a! zC>3nR#6fe^GVxbMaOJBZE*?%#Zw84q#YWVK%TgE`#F)kdf=vVsJx-8+KkUJ!L3$iSDOHF!5U%9w{MxWB57op+!XtCX5@O*s1kh^c07 z0d0A-C~f4BB&y@4snE_lBd|-0S8qN3|r_^Ai&FTuG0VPm;L$HlD3X2aSl?%))S-re?4s- zmFJ@p&YDPYVJ29^ya8qor;W-Yeh_g&zdw0xs7CNQ&{in0ntVU|Gh&5bR);OIY-oxm zy|6?};=?@^cmHBcpP8FmY_kfon)Ys-^_Fm#ShgYFX-lx=L|$w_05gg;RD+TQ^Mk`xile6rT@)VYFOB)V;)3J4VJh1)Tz8#)BZD+qj=+2|jRd`D4M)z1Q;9I_ANO>luy& z%y~l?Um#0f5ab?A+Q%!tx&57@8eeC$O40bwemZIBJ*Kf_*m|}+#JGKjkMv9gcgPgO z5No{Q!c?%+6S?LxbuYmrQ>%X&6lWmFi4*VVUO;et4@Wc*zKN%@i3#$+FadsJIR8ur|uv z2@upB#|fT}Mr#~N)Li`>6^2u@+tsJ4FAwY5lh&g_fJHpmsT&1D=i@BvA zB_;TVHN|xp3rJCkUJM#)ZGxMjqqo!Q*1}kKcna8wfnqWvFKiS}!s}zK ref Main.player[Projectile.owner].Calamity().deadSunCounter; public int Time = 0; public int bounceKill = 0; - public bool extraDamage = false; + public bool Homing = false; + public Color color1 = Color.Turquoise; + public Color color2 = Color.Indigo; public override void SetDefaults() { Projectile.width = 10; @@ -33,27 +35,30 @@ namespace CalamityMod.Projectiles.Ranged { Time++; Lighting.AddLight(Projectile.Center, 0.117f, 0.155f, 0.159f); + if (Projectile.timeLeft % 3 == 0 && Time > 12) { - SparkParticle spark = new SparkParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 20, 2.3f, Main.rand.NextBool() ? Color.Turquoise : Color.MediumSpringGreen); + //SparkParticle spark = new SparkParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 20, 2.3f, Main.rand.NextBool() ? color2 : color1); + //GeneralParticleHandler.SpawnParticle(spark); + AltSparkParticle spark = new AltSparkParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 20, 2.3f, Color.Black); GeneralParticleHandler.SpawnParticle(spark); } if (Projectile.timeLeft % 2 == 0 && Time > 12) { - SparkParticle spark2 = new SparkParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 20, 0.9f, Color.White); + SparkParticle spark2 = new SparkParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 20, 0.9f, color1); GeneralParticleHandler.SpawnParticle(spark2); } if (Time == 7) { for (int i = 0; i <= 18; i++) { - Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 191 : 156, Projectile.velocity); + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 191 : Main.rand.NextBool(4) ? 229 : 156, Projectile.velocity); dust.scale = Main.rand.NextFloat(1.5f, 2.3f); dust.velocity = Projectile.velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.3f, 2.1f); dust.noGravity = true; } } - if (extraDamage) + if (Homing) { for (int i = 0; i <= 2; i++) { @@ -69,7 +74,7 @@ namespace CalamityMod.Projectiles.Ranged public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { SoundEngine.PlaySound(DeadSunsWind.Explosion with { Pitch = HitCount * 0.05f }, Projectile.Center); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage - (Projectile.damage / 3), 4f, Projectile.owner, HitCount * 10, extraDamage ? 5 : 0); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage / 2, 4f, Projectile.owner, HitCount * 10, Homing ? 5 : 0); if (HitCount >= 15) HitCount = 6; else @@ -78,28 +83,27 @@ namespace CalamityMod.Projectiles.Ranged public override bool OnTileCollide(Vector2 oldVelocity) { - float numberOfDusts = 20; + Projectile.timeLeft = 500; + float numberOfDusts = 25; float rotFactor = 360f / numberOfDusts; for (int i = 0; i < numberOfDusts; i++) { float rot = MathHelper.ToRadians(i * rotFactor); Vector2 offset = new Vector2(Main.rand.NextFloat(1, 3.1f), 0).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f)); Vector2 velOffset = new Vector2(Main.rand.NextFloat(1, 3.1f), 0).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f)); - Dust dust = Dust.NewDustPerfect(Projectile.Center + offset, Main.rand.NextBool(4) ? 229 : 156, new Vector2(velOffset.X, velOffset.Y)); + Dust dust = Dust.NewDustPerfect(Projectile.Center + offset, Main.rand.NextBool(6) ? 229 : 156, new Vector2(velOffset.X, velOffset.Y)); dust.noGravity = true; dust.velocity = velOffset; dust.scale = Main.rand.NextFloat(2.6f, 3.2f); } - Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.Turquoise, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0.1f, 0.9f - (bounceKill * 0.25f), 25); + Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, color1, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0.1f, 0.9f - (bounceKill * 0.25f), 25); GeneralParticleHandler.SpawnParticle(pulse); - Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.MediumSpringGreen, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0.05f, 0.8f - (bounceKill * 0.25f), 25); + Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, color2, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0.05f, 0.8f - (bounceKill * 0.25f), 25); GeneralParticleHandler.SpawnParticle(pulse2); - extraDamage = true; + Homing = true; if (bounceKill == 0) - { - Projectile.damage = Projectile.damage + (Projectile.damage / 5); // 20% damage bonus after a bounce SoundEngine.PlaySound(DeadSunsWind.Ricochet, Projectile.Center); - } + bounceKill++; if (Projectile.velocity.X != oldVelocity.X) { diff --git a/Projectiles/Ranged/DeadSunExplosion.cs b/Projectiles/Ranged/DeadSunExplosion.cs index 22ac4de6b2..36489d1ddf 100644 --- a/Projectiles/Ranged/DeadSunExplosion.cs +++ b/Projectiles/Ranged/DeadSunExplosion.cs @@ -15,7 +15,8 @@ namespace CalamityMod.Projectiles.Ranged public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public Player Owner => Main.player[Projectile.owner]; public ref float ExplosionRadius => ref Projectile.ai[0]; - + public Color color1 = Color.Turquoise; + public Color color2 = Color.Indigo; public override void SetDefaults() { //These shouldn't matter because its circular @@ -32,13 +33,15 @@ namespace CalamityMod.Projectiles.Ranged } public override void AI() { - Particle explosion = new DetailedExplosion(Projectile.Center, Vector2.Zero, Color.Turquoise, new Vector2(1f, 1f), Main.rand.NextFloat(-5, 5), 0f, ExplosionRadius * 0.0065f + 0.1f, Main.rand.Next(15, 22)); + Particle explosion = new DetailedExplosion(Projectile.Center, Vector2.Zero, color1, new Vector2(1f, 1f), Main.rand.NextFloat(-5, 5), 0f, ExplosionRadius * 0.0065f + 0.1f, Main.rand.Next(15, 22)); GeneralParticleHandler.SpawnParticle(explosion); - Particle explosion2 = new DetailedExplosion(Projectile.Center, Vector2.Zero, Color.MediumSpringGreen, new Vector2(1f, 1f), Main.rand.NextFloat(-5, 5), 0f, ExplosionRadius * 0.0045f + 0.1f, Main.rand.Next(15, 22)); + Particle explosion2 = new DetailedExplosion(Projectile.Center, Vector2.Zero, Color.Black, new Vector2(1f, 1f), Main.rand.NextFloat(-5, 5), 0f, ExplosionRadius * 0.0045f + 0.1f, Main.rand.Next(15, 22), false); GeneralParticleHandler.SpawnParticle(explosion2); - Particle orb = new GenericBloom(Projectile.Center, Projectile.velocity, Color.Turquoise, ExplosionRadius * 0.0085f + 0.05f, 10, true); + Particle explosion3 = new DetailedExplosion(Projectile.Center, Vector2.Zero, Color.Black, new Vector2(1f, 1f), Main.rand.NextFloat(-5, 5), 0f, ExplosionRadius * 0.0030f + 0.1f, Main.rand.Next(15, 22), false); + GeneralParticleHandler.SpawnParticle(explosion3); + Particle orb = new GenericBloom(Projectile.Center, Projectile.velocity, color1, ExplosionRadius * 0.0085f + 0.05f, 10, true); GeneralParticleHandler.SpawnParticle(orb); - Particle orb2 = new GenericBloom(Projectile.Center, Projectile.velocity, Color.MediumSpringGreen, ExplosionRadius * 0.006f + 0.05f, 10, true); + Particle orb2 = new GenericBloom(Projectile.Center, Projectile.velocity, color2, ExplosionRadius * 0.006f + 0.05f, 10, true); GeneralParticleHandler.SpawnParticle(orb2); float numberOfDusts = ExplosionRadius * 0.1f + 10; float rotFactor = 360f / numberOfDusts; @@ -48,8 +51,8 @@ namespace CalamityMod.Projectiles.Ranged Vector2 offset = new Vector2(Main.rand.NextFloat(ExplosionRadius * 0.2f, 3.1f), 0).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f)); Vector2 velOffset = new Vector2(Main.rand.NextFloat(ExplosionRadius * 0.2f, 3.1f), 0).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f)); Dust dust = Dust.NewDustPerfect(Projectile.Center + offset, Main.rand.NextBool(4) ? 229 : Projectile.ai[1] == 5 ? 226 : 156, new Vector2(velOffset.X, velOffset.Y)); - dust.noGravity = dust.type == 226 ? false : true; - dust.color = dust.type == 226 ? Color.Turquoise : default; + dust.noGravity = dust.type == 226? false : true; + dust.color = dust.type == 226 ? color1 : default; dust.velocity = velOffset; dust.scale = dust.type == 226 ? Main.rand.NextFloat(0.7f, 1.3f) : Main.rand.NextFloat(1.6f, 2.2f); } From b3c4c9fc0399e721b5140a88b5869eb758475bf8 Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 14 Oct 2023 01:04:11 -0700 Subject: [PATCH 12/95] DSW bounce visual fix (and some particle help) made it not spawn particles if it's far from the player Adjusted bounce visual --- Projectiles/Ranged/CosmicFire.cs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Projectiles/Ranged/CosmicFire.cs b/Projectiles/Ranged/CosmicFire.cs index e95191a085..6e24712e04 100644 --- a/Projectiles/Ranged/CosmicFire.cs +++ b/Projectiles/Ranged/CosmicFire.cs @@ -28,22 +28,21 @@ namespace CalamityMod.Projectiles.Ranged Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = 1; Projectile.extraUpdates = 9; - Projectile.timeLeft = 500; + Projectile.timeLeft = 440; } public override void AI() { Time++; Lighting.AddLight(Projectile.Center, 0.117f, 0.155f, 0.159f); - - if (Projectile.timeLeft % 3 == 0 && Time > 12) + Player Owner = Main.player[Projectile.owner]; + float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); //used for some drawing prevention for when it's offscreen since it makes a fuck load of particles + if (Projectile.timeLeft % 3 == 0 && Time > 12 && targetDist < 1400f) { - //SparkParticle spark = new SparkParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 20, 2.3f, Main.rand.NextBool() ? color2 : color1); - //GeneralParticleHandler.SpawnParticle(spark); AltSparkParticle spark = new AltSparkParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 20, 2.3f, Color.Black); GeneralParticleHandler.SpawnParticle(spark); } - if (Projectile.timeLeft % 2 == 0 && Time > 12) + if (Projectile.timeLeft % 2 == 0 && Time > 12 && targetDist < 1400f) { SparkParticle spark2 = new SparkParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 20, 0.9f, color1); GeneralParticleHandler.SpawnParticle(spark2); @@ -83,7 +82,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool OnTileCollide(Vector2 oldVelocity) { - Projectile.timeLeft = 500; + Projectile.timeLeft = 440; float numberOfDusts = 25; float rotFactor = 360f / numberOfDusts; for (int i = 0; i < numberOfDusts; i++) @@ -91,14 +90,15 @@ namespace CalamityMod.Projectiles.Ranged float rot = MathHelper.ToRadians(i * rotFactor); Vector2 offset = new Vector2(Main.rand.NextFloat(1, 3.1f), 0).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f)); Vector2 velOffset = new Vector2(Main.rand.NextFloat(1, 3.1f), 0).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f)); - Dust dust = Dust.NewDustPerfect(Projectile.Center + offset, Main.rand.NextBool(6) ? 229 : 156, new Vector2(velOffset.X, velOffset.Y)); + Dust dust = Dust.NewDustPerfect(Projectile.Center + offset, Main.rand.NextBool(3) ? 156 : 191, new Vector2(velOffset.X, velOffset.Y)); dust.noGravity = true; - dust.velocity = velOffset; - dust.scale = Main.rand.NextFloat(2.6f, 3.2f); + dust.noLight = dust.type == 191 ? true : false; + dust.velocity = dust.type == 191 ? velOffset * 2.5f : velOffset; + dust.scale = dust.type == 191 ? Main.rand.NextFloat(0.9f, 1.9f) : Main.rand.NextFloat(2.6f, 3.2f); } Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, color1, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0.1f, 0.9f - (bounceKill * 0.25f), 25); GeneralParticleHandler.SpawnParticle(pulse); - Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, color2, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0.05f, 0.8f - (bounceKill * 0.25f), 25); + Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.MediumSpringGreen, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0.05f, 0.75f - (bounceKill * 0.25f), 25); GeneralParticleHandler.SpawnParticle(pulse2); Homing = true; if (bounceKill == 0) From e7cc3f71db4c4255313c023ea4df587e50d05682 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 14 Oct 2023 18:35:44 +0700 Subject: [PATCH 13/95] Elemental Eruption line part 1 --- Items/Weapons/Ranged/ElementalEruption.cs | 17 ++- Items/Weapons/Ranged/Meowthrower.cs | 26 ++-- Items/Weapons/Ranged/Shadethrower.cs | 2 +- Items/Weapons/Ranged/TerraFlameburster.cs | 21 +--- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 6 +- .../Mods.CalamityMod.Projectiles.Ranged.hjson | 3 +- Projectiles/Ranged/ElementalFire.cs | 90 +++++++------- Projectiles/Ranged/MeowFire.cs | 116 +++++++----------- Projectiles/Ranged/MeowFire2.cs | 107 ---------------- Projectiles/Ranged/ShadeFire.cs | 6 +- Projectiles/Ranged/TerraFire.cs | 73 +++++++++++ Projectiles/Ranged/TerraFireGreen.cs | 90 -------------- 12 files changed, 186 insertions(+), 371 deletions(-) delete mode 100644 Projectiles/Ranged/MeowFire2.cs create mode 100644 Projectiles/Ranged/TerraFire.cs delete mode 100644 Projectiles/Ranged/TerraFireGreen.cs diff --git a/Items/Weapons/Ranged/ElementalEruption.cs b/Items/Weapons/Ranged/ElementalEruption.cs index 07b4755e46..b5f1e6daa8 100644 --- a/Items/Weapons/Ranged/ElementalEruption.cs +++ b/Items/Weapons/Ranged/ElementalEruption.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Items.Weapons.Ranged Item.DamageType = DamageClass.Ranged; Item.width = 64; Item.height = 34; - Item.useTime = 14; - Item.useAnimation = 14; + Item.useTime = 12; + Item.useAnimation = 36; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.5f; @@ -29,24 +29,21 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; Item.useAmmo = AmmoID.Gel; + Item.consumeAmmoOnFirstShotOnly = true; } public override Vector2? HoldoutOffset() => new Vector2(-10, 0); public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - int numFirestreams = Main.rand.Next(3, 5); - for (int index = 0; index < numFirestreams; ++index) + for (int i = 0; i < 2; i++) { - float SpeedX = velocity.X + Main.rand.Next(-20, 21) * 0.05f; - float SpeedY = velocity.Y + Main.rand.Next(-20, 21) * 0.05f; - Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI, 0f, 0f); + Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(8f)); + Projectile.NewProjectile(source, position, newVel, type, damage, knockback, player.whoAmI); } - return false; + return true; // Fires one directly with no randomness, totaling 3 projectiles } - public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.NextFloat() > 0.9f; - public override void AddRecipes() { CreateRecipe(). diff --git a/Items/Weapons/Ranged/Meowthrower.cs b/Items/Weapons/Ranged/Meowthrower.cs index a8b2a0b9ab..f331c94634 100644 --- a/Items/Weapons/Ranged/Meowthrower.cs +++ b/Items/Weapons/Ranged/Meowthrower.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Ranged public class Meowthrower : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Ranged"; - private bool Fire2 = false; + public override void SetDefaults() { Item.damage = 37; @@ -27,29 +27,21 @@ namespace CalamityMod.Items.Weapons.Ranged Item.rare = ItemRarityID.LightRed; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 5.5f; + Item.shootSpeed = 8f; Item.useAmmo = AmmoID.Gel; } - public override Vector2? HoldoutOffset() - { - return new Vector2(-10, 0); - } + public override Vector2? HoldoutOffset() => new Vector2(-10, 0); - public override bool CanConsumeAmmo(Item ammo, Player player) - { - if (Main.rand.Next(0, 100) < 85) - return false; - return true; - } + public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= 85; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float SpeedX = velocity.X + (float)Main.rand.Next(-15, 16) * 0.05f; - float SpeedY = velocity.Y + (float)Main.rand.Next(-15, 16) * 0.05f; - int projType = Fire2 ? ModContent.ProjectileType() : type; - Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, projType, damage, knockback, player.whoAmI, 0.0f, 0.0f); - Fire2 = !Fire2; + for (int i = 0; i < 2; i++) + { + Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(8f)); + Projectile.NewProjectile(source, position, newVel, type, damage, knockback, player.whoAmI, i); + } return false; } } diff --git a/Items/Weapons/Ranged/Shadethrower.cs b/Items/Weapons/Ranged/Shadethrower.cs index b815764219..af4bccaec2 100644 --- a/Items/Weapons/Ranged/Shadethrower.cs +++ b/Items/Weapons/Ranged/Shadethrower.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.DamageType = DamageClass.Ranged; Item.width = 76; Item.height = 30; - Item.useTime = 6; + Item.useTime = 10; Item.useAnimation = 30; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; diff --git a/Items/Weapons/Ranged/TerraFlameburster.cs b/Items/Weapons/Ranged/TerraFlameburster.cs index 301887cddb..94d0bb9f58 100644 --- a/Items/Weapons/Ranged/TerraFlameburster.cs +++ b/Items/Weapons/Ranged/TerraFlameburster.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Items.Weapons.Ranged Item.DamageType = DamageClass.Ranged; Item.width = 68; Item.height = 22; - Item.useTime = 3; - Item.useAnimation = 15; + Item.useTime = 6; + Item.useAnimation = 30; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.25f; @@ -25,22 +25,13 @@ namespace CalamityMod.Items.Weapons.Ranged Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.autoReuse = true; - Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 7.5f; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 8f; Item.useAmmo = AmmoID.Gel; + Item.consumeAmmoOnFirstShotOnly = true; } - public override Vector2? HoldoutOffset() - { - return new Vector2(-10, 0); - } - - public override bool CanConsumeAmmo(Item ammo, Player player) - { - if (Main.rand.Next(0, 100) < 80) - return false; - return true; - } + public override Vector2? HoldoutOffset() => new Vector2(-10, 0); public override void AddRecipes() { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 059ba98a0a..50005d8ce0 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -1185,11 +1185,7 @@ TelluricGlare: { TerraFlameburster: { DisplayName: Terra Flameburster - Tooltip: - ''' - Uses gel for ammo - 80% chance to save ammo - ''' + Tooltip: Uses gel for ammo } TheBallista: { diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson index c423bb4391..7cbcc62602 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson @@ -119,7 +119,6 @@ MagnomalyRocket.DisplayName: Nuke MarksmanShot.DisplayName: Marksman Shot MechanicalBarracuda.DisplayName: Barracuda MeowFire.DisplayName: Purr Fire -MeowFire2.DisplayName: Purr Fire MiniatureFolly.DisplayName: Miniature Folly MiniRocket.DisplayName: Rocket MiniSharkron.DisplayName: Mini Sharkron @@ -213,7 +212,7 @@ TerraArrowMain.DisplayName: Terra Arrow TerraArrowSplit.DisplayName: Terra Arrow TerraBulletMain.DisplayName: Terra Bullet TerraBulletSplit.DisplayName: Terra Bullet -TerraFireGreen.DisplayName: Terra Fire +TerraFire.DisplayName: Terra Fire TheMaelstromExplosion.DisplayName: Reaper Explosion TheMaelstromShark.DisplayName: Reaper Shark ThePackMinissile.DisplayName: Pack Minissile diff --git a/Projectiles/Ranged/ElementalFire.cs b/Projectiles/Ranged/ElementalFire.cs index 22f851a0e5..9ea30fe50b 100644 --- a/Projectiles/Ranged/ElementalFire.cs +++ b/Projectiles/Ranged/ElementalFire.cs @@ -1,8 +1,11 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Particles; using Microsoft.Xna.Framework; +using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; + namespace CalamityMod.Projectiles.Ranged { public class ElementalFire : ModProjectile, ILocalizedModType @@ -10,6 +13,9 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public static int Lifetime => 120; + public ref float Time => ref Projectile.ai[0]; + public override void SetDefaults() { Projectile.width = 12; @@ -18,66 +24,54 @@ namespace CalamityMod.Projectiles.Ranged Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = 2; - Projectile.extraUpdates = 3; - Projectile.timeLeft = 90; + Projectile.MaxUpdates = 4; + Projectile.timeLeft = Lifetime; // 30 effectively Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 9; + Projectile.localNPCHitCooldown = 12; } public override void AI() { - Lighting.AddLight(Projectile.Center, 0.15f, 0.45f, 0f); - if (Projectile.ai[0] > 7f) - { - float num296 = 1f; - if (Projectile.ai[0] == 8f) - { - num296 = 0.25f; - } - else if (Projectile.ai[0] == 9f) - { - num296 = 0.5f; - } - else if (Projectile.ai[0] == 10f) - { - num296 = 0.75f; - } - Projectile.ai[0] += 1f; - int num297 = 66; - if (Main.rand.NextBool()) - { - for (int num298 = 0; num298 < 2; num298++) - { - int num299 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, num297, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 0.75f); - Dust dust = Main.dust[num299]; - if (Main.rand.NextBool(3)) - { - dust.noGravity = true; - dust.scale *= 1.75f; - dust.velocity.X *= 2f; - dust.velocity.Y *= 2f; - } - else - { - dust.noGravity = true; - dust.scale *= 0.5f; - } - dust.velocity.X *= 1.2f; - dust.velocity.Y *= 1.2f; - dust.scale *= num296; - dust.velocity += Projectile.velocity; - } - } - } + Time++; + + // Determines particle size as well as hitbox + if (Time >= 5f) + Projectile.scale = 1.8f * Utils.GetLerpValue(5f, 30f, Time, true); else + return; // Helps position it at the tip + + // Rainbow smokes of increasing opacity + float smokeRot = MathHelper.ToRadians(3f); // *Rate of rotation per frame, not a constant rotation + Color smokeColor = Color.Lerp(Color.Transparent, Main.DiscoColor, 0.6f + 0.4f * Utils.GetLerpValue(30f, Lifetime, Time, true)); + Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, smokeColor, 12, Projectile.scale * Main.rand.NextFloat(0.6f, 1.2f), 0.8f, smokeRot, required: true); + GeneralParticleHandler.SpawnParticle(smoke); + + // Overlay the glow on top, which is on the brighter side + if (Main.rand.NextBool(5)) { - Projectile.ai[0] += 1f; + Color glowColor = Color.Lerp(smokeColor, Color.White, 0.3f); + glowColor.A = smokeColor.A; + Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, glowColor, 9, Projectile.scale * Main.rand.NextFloat(0.4f, 0.7f), 0.8f, smokeRot, true, 0.005f, true); + GeneralParticleHandler.SpawnParticle(smokeGlow); } - Projectile.rotation += 0.3f * (float)Projectile.direction; + + Lighting.AddLight(Projectile.Center, smokeColor.ToVector3() * Projectile.scale * Utils.Remap(Time, 30f, Lifetime, 0.5f, 0.6f)); } + + // Circular hitbox adjusted for the size of the smoke particles (which is 52 here) + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 52 * Projectile.scale * 0.5f, targetHitbox); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { target.AddBuff(ModContent.BuffType(), 540); + + // Circular spread of clouds on hit + for (int i = 0; i < 12; i++) + { + Vector2 smokeVel = Main.rand.NextVector2Circular(16f, 16f); + Particle smoke = new MediumMistParticle(Projectile.Center, smokeVel, Main.DiscoColor, Color.Black, Main.rand.NextFloat(0.6f, 1.6f), 200 - Main.rand.Next(60), 0.1f); + GeneralParticleHandler.SpawnParticle(smoke); + } } } } diff --git a/Projectiles/Ranged/MeowFire.cs b/Projectiles/Ranged/MeowFire.cs index 7871c8fe72..50b8c900a0 100644 --- a/Projectiles/Ranged/MeowFire.cs +++ b/Projectiles/Ranged/MeowFire.cs @@ -1,8 +1,10 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using System; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; namespace CalamityMod.Projectiles.Ranged { @@ -11,96 +13,64 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public static int Lifetime => 96; + public bool PinkFire => Projectile.ai[0] == 1f; + public ref float Time => ref Projectile.ai[1]; + public override void SetDefaults() { - Projectile.width = 6; - Projectile.height = 6; + Projectile.width = Projectile.height = 6; Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = 5; - Projectile.extraUpdates = 3; - Projectile.timeLeft = 95; + Projectile.MaxUpdates = 3; + Projectile.timeLeft = Lifetime; Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 10; + Projectile.idStaticNPCHitCooldown = 8; } public override void AI() { - if (Projectile.ai[0] > 7f) - { - float dustScale = 1f; - if (Projectile.ai[0] == 8f) - { - dustScale = 0.25f; - } - else if (Projectile.ai[0] == 9f) - { - dustScale = 0.5f; - } - else if (Projectile.ai[0] == 10f) - { - dustScale = 0.75f; - } - Projectile.ai[0] += 1f; - for (int i = 0; i < 2; i++) - { - int num299 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 56, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); - Dust dust = Main.dust[num299]; - if (Main.rand.NextBool(3)) - { - dust.noGravity = true; - dust.scale *= 1.75f; - dust.velocity.X *= 2f; - dust.velocity.Y *= 2f; - } - else - { - dust.scale *= 0.5f; - } - dust.velocity.X *= 1.2f; - dust.velocity.Y *= 1.2f; - dust.scale *= dustScale; - dust.velocity += Projectile.velocity; - if (!dust.noGravity) - { - dust.velocity *= 0.5f; - } - } - } + Time++; + + // Determines particle size as well as hitbox + if (Time >= 6f) + Projectile.scale = 1.5f * Utils.GetLerpValue(6f, 30f, Time, true); else + return; // Helps position it at the tip + + // Main smokes composing of blue or pink + float smokeRot = MathHelper.ToRadians(3f); // *Rate of rotation per frame, not a constant rotation + Color smokeColor = Color.Lerp(PinkFire ? Color.DeepPink : Color.DodgerBlue, PinkFire ? Color.Pink : Color.PowderBlue, 0.4f + 0.3f * MathF.Sin(Main.GlobalTimeWrappedHourly * 5f)); + Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, smokeColor, 12, Projectile.scale * Main.rand.NextFloat(0.6f, 1.2f), 0.8f, smokeRot, required: true); + GeneralParticleHandler.SpawnParticle(smoke); + + // Overlay the glow on top, a bit brighter + if (Main.rand.NextBool(5)) { - Projectile.ai[0] += 1f; + Color glowColor = Color.Lerp(smokeColor, Color.White, 0.4f); + Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, glowColor, 9, Projectile.scale * Main.rand.NextFloat(0.4f, 0.7f), 0.8f, smokeRot, true, 0.005f, true); + GeneralParticleHandler.SpawnParticle(smokeGlow); } - Projectile.rotation += 0.3f * (float)Projectile.direction; + + Lighting.AddLight(Projectile.Center, smokeColor.ToVector3() * Projectile.scale * 0.5f); } + // Circular hitbox adjusted for the size of the smoke particles (which is 52 here) + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 52 * Projectile.scale * 0.5f, targetHitbox); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - SoundEngine.PlaySound(SoundID.Item57, Projectile.position); - Projectile.position.X = Projectile.position.X + (float)(Projectile.width / 2); - Projectile.position.Y = Projectile.position.Y + (float)(Projectile.height / 2); - Projectile.width = 10; - Projectile.height = 10; - Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2); - Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); - for (int j = 0; j < 10; j++) + SoundEngine.PlaySound(PinkFire ? SoundID.Item58 : SoundID.Item57, Projectile.Center); + + // Circular spread of clouds on hit + for (int i = 0; i < 12; i++) { - int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 56, 0f, 0f, 100, default, 1f); - Main.dust[num622].velocity *= 3f; - if (Main.rand.NextBool()) - { - Main.dust[num622].scale = 0.5f; - Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; - } - } - for (int k = 0; k < 20; k++) - { - int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 56, 0f, 0f, 100, default, 1.5f); - Main.dust[num624].noGravity = true; - Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 56, 0f, 0f, 100, default, 1f); - Main.dust[num624].velocity *= 2f; + Vector2 smokeVel = Main.rand.NextVector2Circular(16f, 16f); + Color smokeColor = PinkFire ? Color.Pink : Color.PowderBlue; + Particle smoke = new MediumMistParticle(Projectile.Center, smokeVel, smokeColor, Color.Black, Main.rand.NextFloat(0.6f, 1.6f), 200 - Main.rand.Next(60), 0.1f); + GeneralParticleHandler.SpawnParticle(smoke); } } } diff --git a/Projectiles/Ranged/MeowFire2.cs b/Projectiles/Ranged/MeowFire2.cs deleted file mode 100644 index eca174f82f..0000000000 --- a/Projectiles/Ranged/MeowFire2.cs +++ /dev/null @@ -1,107 +0,0 @@ -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using Terraria.Audio; - -namespace CalamityMod.Projectiles.Ranged -{ - public class MeowFire2 : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Ranged"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - public override void SetDefaults() - { - Projectile.width = 6; - Projectile.height = 6; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.DamageType = DamageClass.Ranged; - Projectile.penetrate = 5; - Projectile.extraUpdates = 3; - Projectile.timeLeft = 95; - Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 10; - } - - public override void AI() - { - if (Projectile.ai[0] > 7f) - { - float dustScale = 1f; - if (Projectile.ai[0] == 8f) - { - dustScale = 0.25f; - } - else if (Projectile.ai[0] == 9f) - { - dustScale = 0.5f; - } - else if (Projectile.ai[0] == 10f) - { - dustScale = 0.75f; - } - Projectile.ai[0] += 1f; - for (int i = 0; i < 2; i++) - { - int num299 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 73, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); - Dust dust = Main.dust[num299]; - if (Main.rand.NextBool(3)) - { - dust.noGravity = true; - dust.scale *= 1.75f; - dust.velocity.X *= 2f; - dust.velocity.Y *= 2f; - } - else - { - dust.scale *= 0.5f; - } - dust.velocity.X *= 1.2f; - dust.velocity.Y *= 1.2f; - dust.scale *= dustScale; - dust.velocity += Projectile.velocity; - if (!dust.noGravity) - { - dust.velocity *= 0.5f; - } - } - } - else - { - Projectile.ai[0] += 1f; - } - Projectile.rotation += 0.3f * (float)Projectile.direction; - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - SoundEngine.PlaySound(SoundID.Item58, Projectile.position); - Projectile.position.X = Projectile.position.X + (float)(Projectile.width / 2); - Projectile.position.Y = Projectile.position.Y + (float)(Projectile.height / 2); - Projectile.width = 10; - Projectile.height = 10; - Projectile.position.X = Projectile.position.X - (float)(Projectile.width / 2); - Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); - for (int j = 0; j < 10; j++) - { - int num622 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 73, 0f, 0f, 100, default, 1f); - Main.dust[num622].velocity *= 3f; - if (Main.rand.NextBool()) - { - Main.dust[num622].scale = 0.5f; - Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; - } - } - for (int k = 0; k < 20; k++) - { - int num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 73, 0f, 0f, 100, default, 1.5f); - Main.dust[num624].noGravity = true; - Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, 73, 0f, 0f, 100, default, 1f); - Main.dust[num624].velocity *= 2f; - } - } - } -} diff --git a/Projectiles/Ranged/ShadeFire.cs b/Projectiles/Ranged/ShadeFire.cs index b7a0223b71..a60037aa71 100644 --- a/Projectiles/Ranged/ShadeFire.cs +++ b/Projectiles/Ranged/ShadeFire.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Ranged GeneralParticleHandler.SpawnParticle(smoke); // Overlay the glow on top, which is on the brighter side - if (Main.rand.NextBool(3)) + if (Main.rand.NextBool(5)) { Color glowColor = Color.Lerp(smokeColor, Color.MidnightBlue, 0.25f); Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, glowColor, 15, Projectile.scale * Main.rand.NextFloat(0.4f, 0.7f), 0.8f, smokeRot, true, 0.005f, true); @@ -54,8 +54,8 @@ namespace CalamityMod.Projectiles.Ranged } } - // Circular hitbox adjusted for the size of the smoke particles (which is 48 here) - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 48 * Projectile.scale * 0.5f, targetHitbox); + // Circular hitbox adjusted for the size of the smoke particles (which is 52 here) + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 52 * Projectile.scale * 0.5f, targetHitbox); public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 300); } diff --git a/Projectiles/Ranged/TerraFire.cs b/Projectiles/Ranged/TerraFire.cs new file mode 100644 index 0000000000..4621b2f9f3 --- /dev/null +++ b/Projectiles/Ranged/TerraFire.cs @@ -0,0 +1,73 @@ +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Ranged +{ + public class TerraFire : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Ranged"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + + public static int Lifetime => 120; + public ref float Time => ref Projectile.ai[0]; + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 12; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.DamageType = DamageClass.Ranged; + Projectile.penetrate = -1; + Projectile.MaxUpdates = 4; + Projectile.timeLeft = Lifetime; // 30 effectively + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 6; + } + + public override void AI() + { + Time++; + + // Determines particle size as well as hitbox + if (Time >= 6f) + Projectile.scale = 1.8f * Utils.GetLerpValue(6f, 30f, Time, true); + else + return; // Helps position it at the tip + + // Main smokes shifting between green to green-blue and back + float smokeRot = MathHelper.ToRadians(3f); // *Rate of rotation per frame, not a constant rotation + Color smokeColor = Color.Lerp(Color.SpringGreen, Color.Aquamarine, CalamityUtils.Convert01To010(Utils.GetLerpValue(30f, Lifetime, Time, true))); + Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, smokeColor, 12, Projectile.scale * Main.rand.NextFloat(0.6f, 1.2f), 0.8f, smokeRot, required: true); + GeneralParticleHandler.SpawnParticle(smoke); + + // Overlay the glow on top, shifted toward yellow + if (Main.rand.NextBool(5)) + { + Color glowColor = Color.Lerp(smokeColor, Color.GreenYellow, 0.75f); + Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, glowColor, 9, Projectile.scale * Main.rand.NextFloat(0.4f, 0.7f), 0.8f, smokeRot, true, 0.005f, true); + GeneralParticleHandler.SpawnParticle(smokeGlow); + } + + Lighting.AddLight(Projectile.Center, smokeColor.ToVector3() * Projectile.scale * 0.5f); + } + + // Circular hitbox adjusted for the size of the smoke particles (which is 52 here) + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 52 * Projectile.scale * 0.5f, targetHitbox); + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + // Circular spread of clouds on hit + for (int i = 0; i < 12; i++) + { + Vector2 smokeVel = Main.rand.NextVector2Circular(16f, 16f); + Color smokeColor = Color.Lerp(Color.SpringGreen, Color.Aquamarine, CalamityUtils.Convert01To010(Utils.GetLerpValue(30f, Lifetime, Time, true))) * 0.8f; + Particle smoke = new MediumMistParticle(Projectile.Center, smokeVel, smokeColor, Color.Black, Main.rand.NextFloat(0.6f, 1.6f), 200 - Main.rand.Next(60), 0.1f); + GeneralParticleHandler.SpawnParticle(smoke); + } + } + } +} diff --git a/Projectiles/Ranged/TerraFireGreen.cs b/Projectiles/Ranged/TerraFireGreen.cs deleted file mode 100644 index cd8c65b926..0000000000 --- a/Projectiles/Ranged/TerraFireGreen.cs +++ /dev/null @@ -1,90 +0,0 @@ -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Ranged -{ - public class TerraFireGreen : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Ranged"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - public override void SetDefaults() - { - Projectile.width = 12; - Projectile.height = 12; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.DamageType = DamageClass.Ranged; - Projectile.penetrate = -1; - Projectile.extraUpdates = 3; - Projectile.timeLeft = 120; - } - - public override void AI() - { - Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.15f / 255f, (255 - Projectile.alpha) * 0.45f / 255f, (255 - Projectile.alpha) * 0.05f / 255f); - if (Projectile.timeLeft > 120) - { - Projectile.timeLeft = 120; - } - if (Projectile.ai[0] > 7f) - { - float num296 = 1f; - if (Projectile.ai[0] == 8f) - { - num296 = 0.25f; - } - else if (Projectile.ai[0] == 9f) - { - num296 = 0.5f; - } - else if (Projectile.ai[0] == 10f) - { - num296 = 0.75f; - } - Projectile.ai[0] += 1f; - int num297 = 107; - if (Main.rand.NextBool()) - { - for (int num298 = 0; num298 < 3; num298++) - { - int num299 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, num297, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 0.75f); - Dust dust = Main.dust[num299]; - if (Main.rand.NextBool(3)) - { - dust.noGravity = true; - dust.scale *= 2f; - dust.velocity.X *= 2f; - dust.velocity.Y *= 2f; - } - else - { - dust.scale *= 0.75f; - } - dust.velocity.X *= 1.2f; - dust.velocity.Y *= 1.2f; - dust.scale *= num296; - dust.velocity += Projectile.velocity; - if (!dust.noGravity) - { - dust.velocity *= 0.5f; - } - } - } - } - else - { - Projectile.ai[0] += 1f; - } - Projectile.rotation += 0.3f * (float)Projectile.direction; - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.immune[Projectile.owner] = 5; - target.AddBuff(BuffID.CursedInferno, 90); - } - } -} From d9fdbc7802422278d7ee7c48f19cc0dfe30413ec Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 14 Oct 2023 23:43:10 +0700 Subject: [PATCH 14/95] Photoviscerator resprite (did nothing else) --- Items/Weapons/Ranged/Photoviscerator.cs | 99 +++++------ Items/Weapons/Ranged/Photoviscerator.png | Bin 579 -> 4167 bytes ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 2 +- Projectiles/Ranged/AuroraFire.cs | 6 +- Projectiles/Ranged/PhotovisceratorHoldout.cs | 156 ++++++++++++++++++ Projectiles/Ranged/PhotovisceratorHoldout.png | Bin 0 -> 3540 bytes 6 files changed, 197 insertions(+), 66 deletions(-) create mode 100644 Projectiles/Ranged/PhotovisceratorHoldout.cs create mode 100644 Projectiles/Ranged/PhotovisceratorHoldout.png diff --git a/Items/Weapons/Ranged/Photoviscerator.cs b/Items/Weapons/Ranged/Photoviscerator.cs index 8067539b54..7c51838ba6 100644 --- a/Items/Weapons/Ranged/Photoviscerator.cs +++ b/Items/Weapons/Ranged/Photoviscerator.cs @@ -3,6 +3,7 @@ using CalamityMod.Projectiles.Ranged; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; +using System.Linq; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -13,29 +14,30 @@ namespace CalamityMod.Items.Weapons.Ranged public class Photoviscerator : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Ranged"; - public const float AmmoNotConsumeChance = 0.9f; - private const float AltFireShootSpeed = 17f; - public override void SetStaticDefaults() - { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; - } + // Left-click stats + public static float AmmoNotConsumeChance = 0.95f; + public static int LightBombCooldown = 10; + + // Right-click stats + public static int RightClickCooldown = 30; public override void SetDefaults() { + Item.width = 208; + Item.height = 66; + Item.damage = 130; Item.DamageType = DamageClass.Ranged; - Item.width = 84; - Item.height = 30; - Item.useTime = 2; - Item.useAnimation = 10; - Item.useStyle = ItemUseStyleID.Shoot; - Item.noMelee = true; - Item.knockBack = 2f; - Item.UseSound = SoundID.Item34; - Item.autoReuse = true; + Item.useTime = Item.useAnimation = LightBombCooldown; Item.shootSpeed = 18f; + Item.knockBack = 2f; + Item.shoot = ModContent.ProjectileType(); Item.useAmmo = AmmoID.Gel; + Item.useStyle = ItemUseStyleID.Shoot; + Item.channel = true; + Item.noMelee = true; + Item.noUseGraphic = true; Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.RarityVioletBuyPrice; @@ -43,63 +45,36 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool AltFunctionUse(Player player) => true; - public override bool CanUseItem(Player player) - { - if (player.altFunctionUse == 2) - { - Item.shoot = ModContent.ProjectileType(); - Item.useTime = Item.useAnimation = 27; - } - else - { - Item.useTime = 2; - Item.useAnimation = 10; - Item.shoot = ModContent.ProjectileType(); - } - return base.CanUseItem(player); - } + // Spawning the holdout cannot consume ammo + public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0; - public override Vector2? HoldoutOffset() + public override void HoldItem(Player player) { - return new Vector2(-15, 0); + if (player.whoAmI != Main.myPlayer) + return; + + // Right-click channeling + player.Calamity().rightClickListener = true; + + if (player.Calamity().mouseRight && CanUseItem(player) && !Main.mapFullscreen && !Main.blockMouse) + { + // Only one out at a time + if (Main.projectile.Any(n => n.active && n.type == Item.shoot && n.owner == player.whoAmI)) + return; + Projectile.NewProjectile(Item.GetSource_FromThis(), player.Center, Vector2.Zero, Item.shoot, 0, 0f, player.whoAmI); + } } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - // Alt fire: Shoot an Exo Flare Cluster. - if (player.altFunctionUse == 2) - { - int projID = ModContent.ProjectileType(); - - position += velocity.ToRotation().ToRotationVector2() * 80f; - Projectile.NewProjectile(source, position, velocity.SafeNormalize(Vector2.Zero) * AltFireShootSpeed, projID, damage, knockback, player.whoAmI); + // The holdout will initially double up when right clicking otherwise + if (player.altFunctionUse == 2f) return false; - } - - // Left click: Exo Fire, with a chance of Exo Light Bombs. - for (int i = 0; i < 2; i++) - { - Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 0f); - } - if (player.itemAnimation == 2) - { - for (int i = 0; i < 2; i++) - { - - position += velocity.ToRotation().ToRotationVector2() * 64f; - int yDirection = (i == 0).ToDirectionInt(); - velocity = velocity.RotatedBy(0.2f * yDirection); - Projectile lightBomb = Projectile.NewProjectileDirect(source, position, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI); - - lightBomb.localAI[1] = yDirection; - lightBomb.netUpdate = true; - } - } + + Projectile.NewProjectile(source, position, Vector2.Zero, Item.shoot, 0, 0f, player.whoAmI); return false; } - public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.NextFloat() > AmmoNotConsumeChance; - public override void AddRecipes() { CreateRecipe(). diff --git a/Items/Weapons/Ranged/Photoviscerator.png b/Items/Weapons/Ranged/Photoviscerator.png index e48518e0e3b2b61a8d1bd9f96ec4525b3733ad76..904aa3573182613bfae09bea00f89a2bd4a3fe9b 100644 GIT binary patch literal 4167 zcmV-N5V-G&P){=+%nQId|C=Cv8BFa*kZ<8Ve$W6^t5Pb&ARK_jWiL$eOi*)mY{ zgTz-4f|@juG&B}Kk@Pkmp0

K;izYh5FjeyvT3ylcsb6Gi@)fPuIgH4p83m>LnZK zIy0uRn>iLb8XGXrk9%|WBagkJFi`cR9HpKcIZ2k8DiFRLO_E^xYXM{d6wLgI^k+j3 zAUOaYhDiFp!VIC(rro|fMUi=KW_?WcE}4-?=jxq)MCSp|KCU$N&8&lTU3B`t3L|xC zH(e>OdeVMMPhZfE&Qo9K=WwK^CDYI6TV0{^xRmc%28wi4_|ZNKAPXQrri;xgM|c>z9+BRIckZ=b_yB z%%gPvW#6!{^`7 z&l~%8D@9H0bB(U6r6Eofp^YqU5jAjJ0;{65A{H!AS8WUG-0$%1BXkW0%F6zVuA#+4X31E%pIv;GexB{bOy>01KKr$ZeTPo_5Y71_cJM8L zoJ}hWAZOzgs$3BZAlYFPpyHqGNso-H*@DhGtyO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B%bSx3$j_)Ma{_fHh~>>75? zB3|90S$Rr+Ip4aby-M$Q*}LqU=r5Bj+%cP;_m{a$?+57?K<<&S0Al5h1&~wda6Z5O zPx@DMXmiVbOJE*oi#AnGpaz&^pDWpHC&Ef9wT`YJl@uP$GtGEdYokOdGs$;u!v7C^y5G`Qz03#TrFS{(H!yJOq9oy)wSh9G&Ib|R@hJD!I;hWmfA1;K@rZQBk^Qm&5+AU#08*!j z1(5HhAnE`lyW>?huygx|j=Py+2E*rHi!j3Y6)}>NyLbGr18p1{OeN zHMPT2PDD+fK)P)5a*nnY)6}0pWt>39);?n%0Sh4W7=<;51yERrJLt;(4_G**Xv#Ch Ra{vGU07*qoM6N<$f&k#|5UBtF literal 579 zcmeAS@N?(olHy`uVBq!ia0vp^AwVq0!3-o@%TE3T2?Y3rxB}_dukYWyG-tW?r*_ zfa~QMQ4d@Xs{Q}J_Gy9S&A`P$p}|l>`}<>Fvahdi+LyE~_ipH^ z>YRI1%VPhXbG#t;x#rrh8(+J={`(xlaaxG!MrOFbW~#}S;}61C-@Cpwac}v%I**J7 zoBY|4SE9VyWm%S za-rb+rC$!aU%XZ-Vv-&cd`hzTxq+JN^Gk{g?g?}FPX3<7>HNbYl~>pGtsHCYGzm{r zw?xKhXN`^t)Ap@((7dfVZ;daPAzv2j0+wq+b9pbRG8|sk@O}4MhqYGDX8&}ona%j5 z9&h@xoX6npVjYIolm~w_o0@9nve;b@?>Eoo_)?ZoddkOEsHIiO=BN_G+2lR5g1QRl zoxdy3B)ZL!w^KRq*{tH<+Ja$ to fire homing flares which stick to enemies and incinerate them Uses gel for ammo - 90% chance to save ammo + 95% chance to save ammo ''' } diff --git a/Projectiles/Ranged/AuroraFire.cs b/Projectiles/Ranged/AuroraFire.cs index 4fae52cd56..ea5dad3283 100644 --- a/Projectiles/Ranged/AuroraFire.cs +++ b/Projectiles/Ranged/AuroraFire.cs @@ -75,14 +75,14 @@ namespace CalamityMod.Projectiles.Ranged // Draw smokes over the whole thing float smokeRot = MathHelper.ToRadians(3f); // *Rate of rotation per frame, not a constant rotation Color smokeColor = Color.Lerp(OrangeFogColor, BlueFogColor, 0.6f + 0.4f * MathF.Sin(Main.GlobalTimeWrappedHourly * 5f)); - Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, smokeColor, 20, Projectile.scale * Main.rand.NextFloat(0.6f, 1.2f), 0.8f, smokeRot, required: true); + Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, smokeColor, 12, Projectile.scale * Main.rand.NextFloat(0.6f, 1.2f), 0.8f, smokeRot, required: true); GeneralParticleHandler.SpawnParticle(smoke); // Overlay the glow on top, which is on the brighter side - if (Main.rand.NextBool(3)) + if (Main.rand.NextBool(5)) { Color glowColor = Color.Lerp(smokeColor, Color.White, 0.25f); - Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, glowColor, 15, Projectile.scale * Main.rand.NextFloat(0.4f, 0.7f), 0.8f, smokeRot, true, 0.005f, true); + Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, glowColor, 9, Projectile.scale * Main.rand.NextFloat(0.4f, 0.7f), 0.8f, smokeRot, true, 0.005f, true); GeneralParticleHandler.SpawnParticle(smokeGlow); } diff --git a/Projectiles/Ranged/PhotovisceratorHoldout.cs b/Projectiles/Ranged/PhotovisceratorHoldout.cs new file mode 100644 index 0000000000..ea94ac4090 --- /dev/null +++ b/Projectiles/Ranged/PhotovisceratorHoldout.cs @@ -0,0 +1,156 @@ +using CalamityMod.Items.Weapons.Ranged; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using static CalamityMod.Items.Weapons.Ranged.Photoviscerator; +using static Terraria.ModLoader.ModContent; + +namespace CalamityMod.Projectiles.Ranged +{ + public class PhotovisceratorHoldout : ModProjectile + { + public override LocalizedText DisplayName => CalamityUtils.GetItemName(); + public Player Owner => Main.player[Projectile.owner]; + public bool OwnerCanShoot => (Owner.channel || Owner.Calamity().mouseRight) && !Owner.noItems && !Owner.CCed; + public ref float ShootTimer => ref Projectile.ai[0]; + public ref float ForcedLifespan => ref Projectile.ai[1]; + + public override void SetDefaults() + { + Projectile.width = 170; + Projectile.height = 66; + Projectile.friendly = true; + Projectile.tileCollide = false; + Projectile.ignoreWater = true; + Projectile.DamageType = DamageClass.Ranged; + } + + public override void AI() + { + UpdateProjectileHeldVariables(); + ManipulatePlayerVariables(); + + // Despawn the projectile if the player can't shoot + // Any forced lifespan (triggered by attacking right click to prevent click spamming) will have priority + if (!OwnerCanShoot) + { + ForcedLifespan--; + if (ForcedLifespan <= 0f) + Projectile.Kill(); + return; + } + + // Don't try to perform attacks if it's not the holder + if (Projectile.owner != Main.myPlayer) + return; + + // Immediately killed if ammo is out + if (!Owner.HasAmmo(Owner.ActiveItem())) + { + Projectile.Kill(); + return; + } + + // Right-click attacks + if (Owner.Calamity().mouseRight && !Owner.channel) + { + // Can't shoot on frame 1 as it can't use ammo yet + if (ShootTimer < 0f) + RightClickAttack(); + + ShootTimer--; + } + else if (!Owner.Calamity().mouseRight && Owner.channel) + { + ShootTimer++; + LeftClickAttack(); + } + } + + public void LeftClickAttack() + { + // Consume ammo and retrieve projectile stats; has a chance to not consume ammo + Owner.PickAmmo(Owner.ActiveItem(), out _, out float shootSpeed, out int damage, out float knockback, out _, Main.rand.NextFloat() <= AmmoNotConsumeChance); + + var source = Projectile.GetSource_FromThis(); + Vector2 position = Projectile.Center + Projectile.velocity * 40f; + Vector2 velocity = Projectile.velocity * shootSpeed; + + // Main fire stream + SoundEngine.PlaySound(SoundID.Item34, Owner.MountedCenter); + Projectile.NewProjectile(source, position, velocity, ProjectileType(), damage, knockback, Projectile.owner); + + // Shoots light bombs every once in a while, rate of which equals to the item's use time + if (ShootTimer >= Owner.ActiveItem().useTime) + { + ShootTimer = 0f; + + for (int i = 0; i < 2; i++) + { + position += Projectile.velocity * 64f; + int yDirection = (i == 0).ToDirectionInt(); + Vector2 bombVel = velocity.RotatedBy(0.2f * yDirection); + + Projectile lightBomb = Projectile.NewProjectileDirect(source, position, bombVel, ProjectileType(), damage, knockback, Projectile.owner); + lightBomb.localAI[1] = yDirection; + lightBomb.netUpdate = true; + } + } + } + + public void RightClickAttack() + { + // Multiplied by the ratio of attack speed gained from modifiers + ShootTimer = (RightClickCooldown * Owner.ActiveItem().useTime / (float)LightBombCooldown) - 1f; + ForcedLifespan = ShootTimer; + + // Consume ammo and retrieve projectile stats + Owner.PickAmmo(Owner.ActiveItem(), out _, out float shootSpeed, out int damage, out float knockback, out _); + + var source = Projectile.GetSource_FromThis(); + Vector2 position = Projectile.Center + Projectile.velocity * 120f; + Vector2 velocity = Projectile.velocity * shootSpeed; + + SoundEngine.PlaySound(SoundID.Item34, Owner.MountedCenter); + Projectile.NewProjectile(source, position, velocity, ProjectileType(), damage, knockback, Projectile.owner); + } + + public void UpdateProjectileHeldVariables() + { + if (Main.myPlayer == Projectile.owner) + { + float interpolant = Utils.GetLerpValue(5f, 25f, Projectile.Distance(Main.MouseWorld), true); + Vector2 oldVelocity = Projectile.velocity; + Projectile.velocity = Vector2.Lerp(Projectile.velocity, Projectile.SafeDirectionTo(Main.MouseWorld), interpolant); + if (Projectile.velocity != oldVelocity) + { + Projectile.netSpam = 0; + Projectile.netUpdate = true; + } + } + + Projectile.position = Owner.RotatedRelativePoint(Owner.MountedCenter, true) - Projectile.Size * 0.5f; + Projectile.rotation = Projectile.velocity.ToRotation(); + if (Projectile.spriteDirection == -1) + Projectile.rotation += MathHelper.Pi; + Projectile.spriteDirection = Projectile.direction; + Projectile.timeLeft = 2; + } + + public void ManipulatePlayerVariables() + { + Owner.ChangeDir(Projectile.direction); + Owner.heldProj = Projectile.whoAmI; + Owner.itemTime = 2; + Owner.itemAnimation = 2; + Owner.itemRotation = (Projectile.velocity * Projectile.direction).ToRotation(); + } + + public override bool ShouldUpdatePosition() => false; + + public override bool? CanDamage() => false; + } +} diff --git a/Projectiles/Ranged/PhotovisceratorHoldout.png b/Projectiles/Ranged/PhotovisceratorHoldout.png new file mode 100644 index 0000000000000000000000000000000000000000..403e2347584d8de6f95eb8ccb4e9b425b04bbeb2 GIT binary patch literal 3540 zcmV;_4J-1AP);h) zO6NY#_uFW)gzc8 zajagl&d7s_ak5iy9?C6u-Aw5ZhrVZ&cT5@?xE)Yy7FQB@4ycgafmXv->d1wt#STZoqmsXyjpC|5S zX7+o$`STye{X6v2*SPPb1F8e6AE3uf8349x$82howm2G)=FPNw51gj^vUiK#CwhV!N5tU*h?z2Q)fzV?w@Fs zJHM}*^3X!O){8ISmsLsW?95M%^83&H&$FF_k-(nO6 z1A|d#u6xb6{_Dg=Mn3P|0?Nlb!#bc^5aWRAcS<#GIV(`tExFrh!MHg)C?73Li4;L@ zpFF}~G$|AAOf+rukR^BT+2uKsAD{lj^E~vV*-0#ON*VO;TmMbx!JO}PV8(>Zi{~Bu z^dOyYo!ZxAy41fK`Ku|J2IER5Md5jw^E}%N8MWd-FE}ZOIvHajWygc*gF}whm=UHWXz_Bk zTs_>I^{VYg@)zX7X8y8BCWZ6L-09|Xq<#~P$P-K|8<%r$I-Qb?3fVS2>6gCVJs9@U z!~6xpp)u_HWuH-zVVgI{Byb&29Z(6N%?7AaAGmnq%hbWfTK!7~1tZ{j8pG!1j0(v( z(3eUko%Uny&%(6ZDD7Inu}(#WDU?cC6pJjap4K_$YCWxkX>szq`iK71W})&$vmS-6 z2+P;bQQYrXV^-gc>VV4XCM=p9P{W-X;oYYKRq8RL1ypR{Fl$mzgUQgnSIR!1pHk}} zO{nmC0>f%dDrL!6N3t(~wyH-vq<<=8R50_g&ZZ^la>f3TZ|LgIwqd=&7DFx?_et$S zpTX@t>rG9|qw~-b?ET9-l;8gHi}59+I-q*1pBzxbnokkm)L=%11?GjK1LithV{Q-0+NUiITsuK^V2 z!Pqdl2F0kbtoiLH%E1x`#vL%>9-|5{D40B2dhv$#1LYl19Z)?9CtN@^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3 zyVMf{sIuMRwi6aX>BR=`HJk^-`t`-|+h1F`xM5TWRCczJ!IloFHi$?0x(%pWb0pJZ z)vMX=!)2tPhC_OT$$zKTqJr_C3gLbMG#?9iv!UM4*FY^6dcWJC#sl><8%A|NHG?1< zI^i5p1DaaeD%G#dsx_mbFEpU;sMSbEc3Du1$qL#(*!Hh9jXe&s{z=JY;mV-4=f?W=xM5UnAZ;(!0X5bk=&ybM2T2L2?#-Ni=Kufz O07*qoM6N<$f&c(ZfD)zv literal 0 HcmV?d00001 From 631db4c32e66b79daaceba666885ec34ae356c6b Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sun, 15 Oct 2023 01:53:13 +0700 Subject: [PATCH 15/95] Photoviscerator's main flame --- Items/Weapons/Ranged/CleansingBlaze.cs | 2 +- Items/Weapons/Ranged/ElementalEruption.cs | 2 +- Items/Weapons/Ranged/Photoviscerator.cs | 5 +- Projectiles/Ranged/ExoFire.cs | 108 +++++++++++-------- Projectiles/Ranged/PhotovisceratorHoldout.cs | 4 +- 5 files changed, 71 insertions(+), 50 deletions(-) diff --git a/Items/Weapons/Ranged/CleansingBlaze.cs b/Items/Weapons/Ranged/CleansingBlaze.cs index 2d485f0d6d..3d71765813 100644 --- a/Items/Weapons/Ranged/CleansingBlaze.cs +++ b/Items/Weapons/Ranged/CleansingBlaze.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 14f; + Item.shootSpeed = 12f; Item.useAmmo = AmmoID.Gel; Item.consumeAmmoOnFirstShotOnly = true; Item.rare = ModContent.RarityType(); diff --git a/Items/Weapons/Ranged/ElementalEruption.cs b/Items/Weapons/Ranged/ElementalEruption.cs index b5f1e6daa8..64eb7c1192 100644 --- a/Items/Weapons/Ranged/ElementalEruption.cs +++ b/Items/Weapons/Ranged/ElementalEruption.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.rare = ItemRarityID.Purple; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 10f; + Item.shootSpeed = 9f; Item.useAmmo = AmmoID.Gel; Item.consumeAmmoOnFirstShotOnly = true; } diff --git a/Items/Weapons/Ranged/Photoviscerator.cs b/Items/Weapons/Ranged/Photoviscerator.cs index 7c51838ba6..09ef719bf8 100644 --- a/Items/Weapons/Ranged/Photoviscerator.cs +++ b/Items/Weapons/Ranged/Photoviscerator.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged public static int LightBombCooldown = 10; // Right-click stats + public static float RightClickVelocityMult = 2.5f; public static int RightClickCooldown = 30; public override void SetDefaults() @@ -30,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.damage = 130; Item.DamageType = DamageClass.Ranged; Item.useTime = Item.useAnimation = LightBombCooldown; - Item.shootSpeed = 18f; + Item.shootSpeed = 6f; Item.knockBack = 2f; Item.shoot = ModContent.ProjectileType(); Item.useAmmo = AmmoID.Gel; @@ -71,7 +72,7 @@ namespace CalamityMod.Items.Weapons.Ranged if (player.altFunctionUse == 2f) return false; - Projectile.NewProjectile(source, position, Vector2.Zero, Item.shoot, 0, 0f, player.whoAmI); + Projectile.NewProjectile(source, position, Vector2.Zero, type, 0, 0f, player.whoAmI); return false; } diff --git a/Projectiles/Ranged/ExoFire.cs b/Projectiles/Ranged/ExoFire.cs index 10224416b8..e37b160c18 100644 --- a/Projectiles/Ranged/ExoFire.cs +++ b/Projectiles/Ranged/ExoFire.cs @@ -1,4 +1,7 @@ using CalamityMod.Buffs.DamageOverTime; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; using Terraria; using Terraria.ModLoader; @@ -8,73 +11,90 @@ namespace CalamityMod.Projectiles.Ranged public class ExoFire : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public override string Texture => "CalamityMod/Projectiles/Magic/RancorFog"; - public bool ProducedAcceleration = false; + public ref float ColorType => ref Projectile.ai[0]; + public ref float ScaleFactor => ref Projectile.ai[1]; + public ref float LightPower => ref Projectile.ai[2]; + + public float FogRot = 0f; public override void SetDefaults() { - Projectile.width = 24; - Projectile.height = 24; + Projectile.width = Projectile.height = 150; Projectile.friendly = true; Projectile.ignoreWater = true; + Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = -1; Projectile.MaxUpdates = 3; + Projectile.timeLeft = 180; Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 5; - Projectile.timeLeft = 180; } public override void AI() { - Projectile.ai[0] += 1f; - if (Projectile.ai[0] <= 3f) - return; - - float dustScale = 1f; - if (Projectile.ai[0] == 8f) + // Add some degree of variation to the fog with scale/rotation/color + if (FogRot == 0f) { - dustScale = 0.25f; - } - else if (Projectile.ai[0] == 9f) - { - dustScale = 0.5f; - } - else if (Projectile.ai[0] == 10f) - { - dustScale = 0.75f; + Projectile.scale = Main.rand.NextFloat(0.4f, 0.8f); + FogRot = Main.rand.NextFloat(MathHelper.TwoPi); } + ColorType += Main.rand.NextFloat(0.02f, 0.06f); + ScaleFactor += 0.02f; + ScaleFactor = MathHelper.Clamp(ScaleFactor, 0f, Projectile.scale); + Lighting.AddLight(Projectile.Center, CloudColor(ColorType % 3f).ToVector3() * ScaleFactor); + Projectile.rotation = Projectile.velocity.ToRotation() + FogRot; - int dustID = Main.rand.NextBool() ? 107 : 234; - if (Main.rand.NextBool(4)) - dustID = 269; + Projectile.Opacity = Utils.GetLerpValue(0f, 12f, Projectile.timeLeft, true); + if (Projectile.timeLeft < 60) + Projectile.velocity *= 0.99f; - if (Main.rand.NextBool()) - { - for (int i = 0; i < 2; i++) - { - Dust d = Dust.NewDustDirect(Projectile.position, Projectile.width, Projectile.height, dustID, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 0.6f); - if (Main.rand.NextBool(3)) - { - d.scale *= 1.5f; - d.velocity.X *= 1.2f; - d.velocity.Y *= 1.2f; - } - else - d.scale *= 0.75f; - - d.noGravity = true; - d.velocity.X *= 0.8f; - d.velocity.Y *= 0.8f; - d.scale *= dustScale; - d.velocity += Projectile.velocity; - } - } + // Calculate light power. This checks below the position of the fog to check if this fog is underground. + // Without this, it may render over the fullblack that the game renders for obscured tiles. + float lightPowerBelow = Lighting.GetColor((int)Projectile.Center.X / 16, (int)Projectile.Center.Y / 16 + 6).ToVector3().Length() / (float)Math.Sqrt(3D); + LightPower = MathHelper.Lerp(LightPower, lightPowerBelow, 0.15f); } + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width * ScaleFactor * 0.5f, targetHitbox); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 300); public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 300); + + public override bool PreDraw(ref Color lightColor) + { + Main.spriteBatch.SetBlendState(BlendState.Additive); + + Texture2D texture = ModContent.Request(Texture).Value; + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + float opacity = Utils.GetLerpValue(0f, 0.08f, LightPower, true) * Projectile.Opacity; + Color drawColor = CloudColor(ColorType % 3f) * opacity; + Main.EntitySpriteDraw(texture, drawPosition, null, drawColor, Projectile.rotation, texture.Size() * 0.5f, ScaleFactor, SpriteEffects.None); + + Main.spriteBatch.SetBlendState(BlendState.AlphaBlend); + return false; + } + + public static Color CloudColor(float type) + { + type = MathHelper.Clamp(type, 0f, 3f); + Color cloud = Color.White; + + // Cycles with these 3 colors + Color Purple = new Color(220, 120, 255); + Color Green = new Color(120, 255, 120); + Color Yellow = new Color(255, 255, 120); + + if (type >= 2f) + cloud = Color.Lerp(Green, Yellow, type - 2f); + else if (type >= 1f) + cloud = Color.Lerp(Purple, Green, type - 1f); + else + cloud = Color.Lerp(Yellow, Purple, type); + + return cloud; + } } } diff --git a/Projectiles/Ranged/PhotovisceratorHoldout.cs b/Projectiles/Ranged/PhotovisceratorHoldout.cs index ea94ac4090..0d180dfb21 100644 --- a/Projectiles/Ranged/PhotovisceratorHoldout.cs +++ b/Projectiles/Ranged/PhotovisceratorHoldout.cs @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Ranged // Main fire stream SoundEngine.PlaySound(SoundID.Item34, Owner.MountedCenter); - Projectile.NewProjectile(source, position, velocity, ProjectileType(), damage, knockback, Projectile.owner); + Projectile.NewProjectile(source, position, velocity, ProjectileType(), damage, knockback, Projectile.owner, Main.rand.NextFloat(0f, 3f)); // Shoots light bombs every once in a while, rate of which equals to the item's use time if (ShootTimer >= Owner.ActiveItem().useTime) @@ -112,7 +112,7 @@ namespace CalamityMod.Projectiles.Ranged var source = Projectile.GetSource_FromThis(); Vector2 position = Projectile.Center + Projectile.velocity * 120f; - Vector2 velocity = Projectile.velocity * shootSpeed; + Vector2 velocity = Projectile.velocity * shootSpeed * RightClickVelocityMult; SoundEngine.PlaySound(SoundID.Item34, Owner.MountedCenter); Projectile.NewProjectile(source, position, velocity, ProjectileType(), damage, knockback, Projectile.owner); From 8711dc79ab9c58a0b06ba70672fc0feca6e5a4f5 Mon Sep 17 00:00:00 2001 From: Xyk Date: Sun, 15 Oct 2023 00:12:43 -0700 Subject: [PATCH 16/95] Blight Spewer Rework Spews toxic clouds of nanomachines that stick to tiles and lock onto enemies they hit On tiles the clouds last longer --- Items/Weapons/Ranged/BlightSpewer.cs | 22 ++- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 6 +- .../Mods.CalamityMod.Projectiles.Ranged.hjson | 2 +- Projectiles/Ranged/BlightFlames.cs | 172 ++++++++++++++++++ Projectiles/Ranged/BlightFlames.png | Bin 0 -> 108900 bytes Projectiles/Ranged/CorossiveFlames.cs | 87 --------- Sounds/Item/NanoSwarm.ogg | Bin 0 -> 6914 bytes 7 files changed, 193 insertions(+), 96 deletions(-) create mode 100644 Projectiles/Ranged/BlightFlames.cs create mode 100644 Projectiles/Ranged/BlightFlames.png delete mode 100644 Projectiles/Ranged/CorossiveFlames.cs create mode 100644 Sounds/Item/NanoSwarm.ogg diff --git a/Items/Weapons/Ranged/BlightSpewer.cs b/Items/Weapons/Ranged/BlightSpewer.cs index ec4708815f..f6d3c59cc3 100644 --- a/Items/Weapons/Ranged/BlightSpewer.cs +++ b/Items/Weapons/Ranged/BlightSpewer.cs @@ -1,6 +1,7 @@ using CalamityMod.Projectiles.Ranged; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; @@ -10,26 +11,33 @@ namespace CalamityMod.Items.Weapons.Ranged public class BlightSpewer : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Ranged"; + + public static readonly SoundStyle Nanomachines = new("CalamityMod/Sounds/Item/NanoSwarm") { PitchVariance = 0.45f, Volume = 0.4f }; public override void SetDefaults() { - Item.damage = 110; + Item.damage = 58; Item.DamageType = DamageClass.Ranged; Item.width = 76; Item.height = 36; - Item.useTime = 10; - Item.useAnimation = 30; + Item.useTime = 19; + Item.useAnimation = 19; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; - Item.knockBack = 2f; + Item.knockBack = 1.5f; Item.UseSound = SoundID.Item34; Item.value = CalamityGlobalItem.Rarity8BuyPrice; Item.rare = ItemRarityID.Yellow; Item.autoReuse = true; - Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 7.5f; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 7f; Item.useAmmo = AmmoID.Gel; } - + public override bool CanConsumeAmmo(Item ammo, Player player) + { + if (Main.rand.Next(0, 100) < 50) + return false; + return true; + } public override Vector2? HoldoutOffset() { return new Vector2(-10, 0); diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 9cd16301f9..d63555a69e 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -142,7 +142,11 @@ BladedgeGreatbow: { BlightSpewer: { DisplayName: Blight Spewer - Tooltip: Uses gel for ammo + Tooltip: + ''' + Spews toxic clouds of nanomachines that stick to tiles and lock onto enemies they hit + 40% chance to save ammo + ''' } BlissfulBombardier: { diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson index 7cbcc62602..a6f11f8a96 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson @@ -21,6 +21,7 @@ BallistaGreatArrow.DisplayName: Ballista Great Arrow BeeRPG.DisplayName: Bee RPG BigCoral.DisplayName: Big Coral BigNuke.DisplayName: Big Nuke +BlightFlames.DisplayName: Blight Flames BlissfulBombardierDustProjectile.DisplayName: Holy Flare Dust BloodBoilerFire.DisplayName: Blood Fire BloodClotFriendly.DisplayName: Blood Clot @@ -51,7 +52,6 @@ ContagionArrow.DisplayName: Contagion Arrow ContagionBall.DisplayName: Contagion Ball CorinthPrimeAirburst.DisplayName: Airburst CorinthPrimeAirburstGrenade.DisplayName: Corinth Prime Airburst Shot -CorossiveFlames.DisplayName: Plagued Flames CorrodedShell.DisplayName: Corroded Shell CosmicFire.DisplayName: Dead Sun's Fire DaemonsFlameArrow.DisplayName: Daemon's Arrow diff --git a/Projectiles/Ranged/BlightFlames.cs b/Projectiles/Ranged/BlightFlames.cs new file mode 100644 index 0000000000..d68579a4f0 --- /dev/null +++ b/Projectiles/Ranged/BlightFlames.cs @@ -0,0 +1,172 @@ +using System; +using CalamityMod.Buffs.DamageOverTime; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using CalamityMod.Particles; +using Terraria.ModLoader; +using Terraria.ID; +using CalamityMod.Items.Weapons.Ranged; +using Terraria.Audio; + +namespace CalamityMod.Projectiles.Ranged +{ + public class BlightFlames : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Ranged"; + public override string Texture => "CalamityMod/Projectiles/Ranged/BlightFlames"; + + public ref float ScaleFactor => ref Projectile.ai[0]; + public ref float LightPower => ref Projectile.ai[1]; + + public int Time = 0; + public bool postTileHit = false; + public bool postEnemyHit = false; + + public Color FogColor = new Color(30, 255, 30); + public override void SetDefaults() + { + Projectile.width = 14; + Projectile.height = 14; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.DamageType = DamageClass.Ranged; + Projectile.penetrate = -1; + Projectile.extraUpdates = 5; + Projectile.timeLeft = 400; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 55; + } + public override void AI() + { + Time++; + Projectile.rotation += Main.rand.NextFloat(0.2f, 0.9f); + if (Time > 6 && Time < 540 && Main.rand.NextBool(4 + Time / 6)) + { + DirectionalPulseRing pulse = new DirectionalPulseRing(Projectile.Center + Main.rand.NextVector2Circular(10 + Time * 0.5f, 10 + Time * 0.5f), Vector2.Zero, Main.rand.NextBool(3) ? Color.LimeGreen : Color.Green, new Vector2(1, 1), 0, Main.rand.NextFloat(0.03f, 0.09f) + Time * 0.00055f, 0f, 25); + GeneralParticleHandler.SpawnParticle(pulse); + } + if (Time > 6 && Time < 135 && !postTileHit && !postEnemyHit && Main.rand.NextBool(3 + Time / 5)) + { + SmallSmokeParticle smoke = new SmallSmokeParticle(Projectile.Center + Main.rand.NextVector2Circular(5 + Time * 0.2f, 5 + Time * 0.2f), -Projectile.velocity * 0.05f, Color.Chartreuse, Main.rand.NextBool(3) ? Color.LimeGreen : Color.Lime, Main.rand.NextFloat(0.5f, 1.8f) + Time * 0.00555f, 60); + GeneralParticleHandler.SpawnParticle(smoke); + } + if (Time == 8) + { + for (int i = 0; i <= 8; i++) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center, 91, Projectile.velocity * 0.6f); + dust.scale = Main.rand.NextFloat(1.1f, 1.9f); + dust.velocity = Projectile.velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.3f, 2.1f); + dust.noGravity = true; + dust.color = Main.rand.NextBool() ? Color.Chartreuse : Color.LimeGreen; + dust.noLight = true; + dust.alpha = 90; + } + } + if (Time == 10) + { + for (int i = 0; i <= 3; i++) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center, 220, Projectile.velocity * 0.6f); + dust.scale = Main.rand.NextFloat(0.4f, 1.2f); + dust.velocity = Projectile.velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.3f, 2.1f); + dust.noGravity = false; + } + } + if (Main.rand.NextBool(4) && Time > 135 && !postTileHit && !postEnemyHit) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(145, 145), 220, Vector2.Zero); + dust.scale = Main.rand.NextFloat(0.2f, 0.4f); + dust.noGravity = true; + } + if (Main.rand.NextBool(20) && (postTileHit || postEnemyHit)) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(145, 145), 220, Vector2.Zero); + dust.scale = Main.rand.NextFloat(0.4f, 1.2f); + dust.noGravity = true; + } + // Add some degree of variation to the fog with rotation/color + + if (Main.rand.NextBool(3)) + FogColor.G = (byte)Main.rand.Next(160, 230 + 1); + ScaleFactor += 0.0061f; + ScaleFactor = MathHelper.Clamp(ScaleFactor, 0f, Projectile.scale); + Lighting.AddLight(Projectile.Center, new Vector3(1f, 1f, 0.25f) * ScaleFactor); + + Projectile.velocity *= 0.99f; + Projectile.Opacity = Utils.GetLerpValue(30f, 50f, Projectile.timeLeft, true) * Utils.GetLerpValue(0f, 130f, Projectile.timeLeft, true); + + // Calculate light power. This checks below the position of the fog to check if this fog is underground. + // Without this, it may render over the fullblack that the game renders for obscured tiles. + float lightPowerBelow = Lighting.GetColor((int)Projectile.Center.X / 16, (int)Projectile.Center.Y / 16 + 6).ToVector3().Length() / (float)Math.Sqrt(3D); + LightPower = MathHelper.Lerp(LightPower, lightPowerBelow, 0.15f); + + if (postEnemyHit && !postTileHit) + { + CalamityUtils.HomeInOnNPC(Projectile, true, 300f, 25f, 35f); + } + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + if (!postTileHit) + Projectile.Center = Projectile.Center + Main.rand.NextVector2Circular(20, 20); + target.AddBuff(ModContent.BuffType(), 420); + + for (int i = 0; i <= 3; i++) + { + SmallSmokeParticle smoke = new SmallSmokeParticle(Projectile.Center + Main.rand.NextVector2Circular(5 + Time * 0.2f, 5 + Time * 0.2f), new Vector2(Main.rand.NextFloat(2, 6), Main.rand.NextFloat(2, 6)).RotatedByRandom(60), Color.Chartreuse, Main.rand.NextBool(3) ? Color.LimeGreen : Color.Lime, Main.rand.NextFloat(1.2f, 2.8f), 60); + GeneralParticleHandler.SpawnParticle(smoke); + } + if (!postTileHit && !postEnemyHit) + { + SoundEngine.PlaySound(BlightSpewer.Nanomachines, Projectile.Center); + Projectile.velocity = Vector2.Zero; + Projectile.timeLeft = 300; + postEnemyHit = true; + } + + } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + Projectile.damage = (int)(Projectile.damage * 0.95f); + if (Projectile.damage < 1) + Projectile.damage = 1; + } + public override bool OnTileCollide(Vector2 oldVelocity) + { + if (!postEnemyHit) + { + Projectile.velocity = oldVelocity * 0.95f; + Projectile.position -= Projectile.velocity; + if (!postTileHit) + { + Projectile.timeLeft = 800; + postTileHit = true; + } + } + return false; + } + + // Expanding hitbox + public override void ModifyDamageHitbox(ref Rectangle hitbox) + { + int size = (int)Utils.Remap(Time, 0f, 90, 10f, 95f); + hitbox.Inflate(size, size); + } + public override bool PreDraw(ref Color lightColor) + { + Main.spriteBatch.SetBlendState(BlendState.Additive); + + Texture2D texture = ModContent.Request(Texture).Value; + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + float opacity = Utils.GetLerpValue(0f, 0.08f, LightPower, true) * Projectile.Opacity * 0.65f; + Color drawColor = FogColor * opacity; + Main.EntitySpriteDraw(texture, drawPosition, null, drawColor, Projectile.rotation, texture.Size() * 0.5f, ScaleFactor, SpriteEffects.None); + + Main.spriteBatch.SetBlendState(BlendState.AlphaBlend); + return false; + } + } +} diff --git a/Projectiles/Ranged/BlightFlames.png b/Projectiles/Ranged/BlightFlames.png new file mode 100644 index 0000000000000000000000000000000000000000..5bdf23b09a62df23729864fefed53db71f4cd6b5 GIT binary patch literal 108900 zcmXt91yEc)+ucPLcQ0O?;=btOP~6?!-EDDNw57Pa7k7su#oe{IL!r2Qy#LIfnarKZ z&fMH2Pjb$4a`ua|qBI)v2V?*MfF>&=p$Y&1t^cctp!XKvJ(KzO2b`6tf+zq`8;|mA z0uKNn^V*1uE4!&mi&4l*iu168d3cyPSl9sonJ-z%Ug~Pg_>q&Hyq(J5F~9zpva?o& zkwNQ}`NqP?j)eKSCjs!0M?&3MLgiaAA_x5zv_Sk@?Z>a-K$Y4PI3kHT7iV1JWLfhn zqRkGUi}8$2^1DF0oX*L0tBZhzHbBC2D14v1HWCyyPaAjpU?3_s+R7LKhg3gH~$nX1awF1-705!!HjmwXb4mNlIgA<@~ z`%C1wF)QF}U6%)XfD2ihzoF`{KTKAiD%RHY<$yVM46KJ2k2&Z;;zs_Hs$J_BdnVr3 ziG1JP*~JZc9W8x}C4LQ0{BeFj-Oq`=zlF-ZcYBOa*s8YtPN8{`2iA02B2reqCoO9|1@xDJsZk! zi980u3=1E|#8ZuQrw|_|sSDRmAl`+A7spa2`GH6yE+zwm2RX@AEhQ2`k!AH&#(%h5e4C{}19;Vcv zvW2CMED~IT1;xbT&yQxq!taw3`{qrJghg4AfL#b<16fHRD9#28J3W9Q0sqmb}9K9{_KP&|)yZrI#i9>)p6F*T_G>ep0ZpIYp zVf`W24c{XkC^XM3hCPljNS=fiuO6nJsGfK>4jfK27-Ldgt6j;zKyvaGZNRn0)SkTw z*$>kX+Y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YSnbA*TtDX7I{#+>*5Dw z*TeQ>ci010sAmpcRXxMu*d+F(o2q9wY&_F!jye?`z)KVW26MiTumxBqQ>y{^Zopkp z)u9=fu*d0h|us*V<4_R+Y zJ^SlYRCohWhct(=4(xc}Myfe+ys&kTL--HHKAd+k_5u9}!-1MeSI9U|sN5#d-A!Iq z(>42X5v z;~a#$&FAh%yxj-$o{W7!KjIh}8A(D{%QaBaM8G|#N)6wcLOs|7j|gQ|A**%&z zpxGY?seZ-&>~_@I8Z|xs@mg41+y~4fjD0}w!5A4CQK75lG`OW8U8}N%osrl_g>tq> z19iC6j*$m991m_cSHwnyVb9bs=~5V~VvZVWEe?s`W(ry$KBt&-U>4wQqO8O1&F{-@ zd&bU4Ur+jYw73uFM;`lt-lH)*JS^2D+iJN4EODDVW(wfiK5;Lo)`n_Xw>lD5hC*yV z6~}N%{|`ra942F`s8+LX=xuU zdocC^y@z9XcvyoP)#Oz5-B4+#03Yq69!G<;rpm*mx=(cfa-fD|;Zft0gjw~h+0#ll z<7RpwNX70!-?Bbe*TGDWq@t7i>;}%6{TunonPaB<_u;&UV;|6aI2@qeXb5Tzrrkh1 zrLxlsIA9SE;&Rg7(5^%NVMtyV6vH&cp*_1|BM<9c4RivOS_EuqaPU~tk{w<{bq0>Q z&CxK|1+?pGS%7Ofw_RRd-iOK_jeS7x@o2Z(N!vopWdJ9)$>Zjfw3e$?$q8#h1v~5~ zc8$H}8k=Db25zx%OM^)Dp160d3P`Np{*4h@C z<0f=!oz zY~PCEk7eX6k35{qd=}1p|2iup)zdVG`J8&rTpx*C6P3;8D=RDeFxlg=59r4*9H5EP zVBQU&DGlLttp>a`$8MsuH9I0}bI9xU7rLckGPT`}icw4n>$Ont#@?VT=$iC|TT&0* q6l`;V&8h3?HZ@h!`+(m2@&5r<*aatN_VnQZ0000 "Projectiles.Ranged"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - public override void SetDefaults() - { - Projectile.width = 12; - Projectile.height = 12; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.DamageType = DamageClass.Ranged; - Projectile.penetrate = -1; - Projectile.extraUpdates = 3; - Projectile.timeLeft = 90; - } - - public override void AI() - { - Lighting.AddLight(Projectile.Center, 0f, 0.25f, 0f); - if (Projectile.ai[0] > 7f) - { - float num296 = 1f; - if (Projectile.ai[0] == 8f) - { - num296 = 0.25f; - } - else if (Projectile.ai[0] == 9f) - { - num296 = 0.5f; - } - else if (Projectile.ai[0] == 10f) - { - num296 = 0.75f; - } - Projectile.ai[0] += 1f; - int num297 = 89; - if (Main.rand.NextBool()) - { - for (int num298 = 0; num298 < 1; num298++) - { - int num299 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, num297, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); - Dust dust = Main.dust[num299]; - if (Main.rand.NextBool(3)) - { - dust.noGravity = true; - dust.scale *= 2.5f; - dust.velocity.X *= 2f; - dust.velocity.Y *= 2f; - } - if (Main.rand.NextBool(6)) - { - dust.noGravity = true; - dust.scale *= 3f; - dust.velocity.X *= 2f; - dust.velocity.Y *= 2f; - } - else - { - dust.scale *= 2f; - } - dust.velocity.X *= 1.2f; - dust.velocity.Y *= 1.2f; - dust.scale *= num296; - } - } - } - else - { - Projectile.ai[0] += 1f; - } - Projectile.rotation += 0.3f * (float)Projectile.direction; - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.immune[Projectile.owner] = 4; - target.AddBuff(ModContent.BuffType(), 240); - } - } -} diff --git a/Sounds/Item/NanoSwarm.ogg b/Sounds/Item/NanoSwarm.ogg new file mode 100644 index 0000000000000000000000000000000000000000..ad6f0791948bc6179064925926a575c930042b4b GIT binary patch literal 6914 zcmai22Ut_f@;?Ejg9t%`22BuzASj_pxS|vh2t^141VkW+^xiHCiV_ehkrI&J6FLYI z6f7vxdkvx}Vxfp$rC9OGe-pg--T!;v_ulz7`|a7;o!OcB&79esaC5V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ffYWh9G=?BuKdMb(rN-v{7#L2r*8p?dG;#cTH8AUK@y_UrNx}P@*g1r01w48em~Ry(Uf{d%F>n@by~s)pv<)?Xp*lZs+w%M1cznWFETJfuR*F zXXkgq=Uf&8;rQ%UUm4@5#@&~UDf?OZgK-)~mWt489b*!2`FQ)_t0~7}nR0iE_P92FPrY`NgIU-3kfJ@vwIJo* z-rHlnwe9YoI#xzwSTS`0`D*d+hvgQ&wi(K8JwKTNw1`EYi%QCt<^bQcfY7CmkVDxC%BTz^n7^t z>Ne8KQcz2udDdvf(CN3z73A7&hvO1(^`0v{0@8;}Nbi*PVFXDC$@NcEZ z^e>(sow<0g%m!-Yvq+H~s6y5UJq`YVby`k5BSW_7TmBCa&Cdw{ literal 0 HcmV?d00001 From c45b58949ba103f94db33bf2a226193466185389 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sun, 15 Oct 2023 22:47:35 +0700 Subject: [PATCH 17/95] eh --- Items/Weapons/Ranged/DeadSunsWind.cs | 12 +----------- .../Mods.CalamityMod.Items.Weapons.Ranged.hjson | 2 +- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/Items/Weapons/Ranged/DeadSunsWind.cs b/Items/Weapons/Ranged/DeadSunsWind.cs index 44a56b4678..08579dd809 100644 --- a/Items/Weapons/Ranged/DeadSunsWind.cs +++ b/Items/Weapons/Ranged/DeadSunsWind.cs @@ -35,17 +35,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useAmmo = AmmoID.Gel; } - public override Vector2? HoldoutOffset() - { - return new Vector2(-10, 0); - } - - public override bool CanConsumeAmmo(Item ammo, Player player) - { - if (Main.rand.Next(0, 100) < 20) - return false; - return true; - } + public override Vector2? HoldoutOffset() => new Vector2(-10, 0); public override void AddRecipes() { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 9cd16301f9..e24337f12d 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -358,7 +358,7 @@ DeadSunsWind: { Fires a concentrated blast of superheated cosmic plasma that explodes and can ricochet off blocks Shots aggressively home in on enemies after being ricocheted Consecutive hits cause larger explosions - 20% chance to save ammo + Uses gel for ammo ''' } From 567bcfa9188a6add516ca43a47be33ca5ef32ef8 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 16 Oct 2023 01:57:37 +0700 Subject: [PATCH 18/95] revised meowthrower :3 --- Items/Weapons/Ranged/Meowthrower.cs | 21 ++++- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 4 +- .../Mods.CalamityMod.Projectiles.Ranged.hjson | 3 +- Projectiles/Ranged/ExoSpark.cs | 2 +- Projectiles/Ranged/MeowCreature.cs | 76 ++++++++++++++++++ Projectiles/Ranged/MeowCreature.png | Bin 0 -> 375 bytes Projectiles/Ranged/MeowFire.cs | 24 ++---- 7 files changed, 103 insertions(+), 27 deletions(-) create mode 100644 Projectiles/Ranged/MeowCreature.cs create mode 100644 Projectiles/Ranged/MeowCreature.png diff --git a/Items/Weapons/Ranged/Meowthrower.cs b/Items/Weapons/Ranged/Meowthrower.cs index f331c94634..b26cda021c 100644 --- a/Items/Weapons/Ranged/Meowthrower.cs +++ b/Items/Weapons/Ranged/Meowthrower.cs @@ -11,6 +11,8 @@ namespace CalamityMod.Items.Weapons.Ranged { public new string LocalizationCategory => "Items.Weapons.Ranged"; + public int CatCounter = 0; + public override void SetDefaults() { Item.damage = 37; @@ -18,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.width = 74; Item.height = 24; Item.useTime = 8; - Item.useAnimation = 8; + Item.useAnimation = 32; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 1.25f; @@ -29,17 +31,28 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 8f; Item.useAmmo = AmmoID.Gel; + Item.consumeAmmoOnFirstShotOnly = true; } public override Vector2? HoldoutOffset() => new Vector2(-10, 0); - public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= 85; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { + // Fires a homing cat... thing + CatCounter++; + if (CatCounter >= 4) + { + CatCounter = 0; + // They prefer to avoid the smokes + Vector2 newPos = position + velocity.SafeNormalize(Vector2.UnitX) * 38f; + Vector2 newVel = velocity.RotatedBy(MathHelper.ToRadians(Main.rand.NextFloat(6f, 15f) * Main.rand.NextBool().ToDirectionInt())) * 1.5f; + Projectile.NewProjectile(source, newPos, newVel, ModContent.ProjectileType(), damage, knockback, player.whoAmI); + } + + // Fires two flames, blue and pink, slightly randomly spread for (int i = 0; i < 2; i++) { - Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(8f)); + Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(6f)); Projectile.NewProjectile(source, position, newVel, type, damage, knockback, player.whoAmI, i); } return false; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index e24337f12d..7e0158a89c 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -710,9 +710,9 @@ Meowthrower: { DisplayName: Meowthrower Tooltip: ''' - Fires blue and pink flames that emit meows on enemy hits + Purrifies your foes with pink and blue smokes + Occasionally unleashes homing feline creatures Uses gel for ammo - 85% chance to save ammo ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson index 7cbcc62602..02e57a2b9d 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson @@ -55,6 +55,7 @@ CorossiveFlames.DisplayName: Plagued Flames CorrodedShell.DisplayName: Corroded Shell CosmicFire.DisplayName: Dead Sun's Fire DaemonsFlameArrow.DisplayName: Daemon's Arrow +DeadSunExplosion.DisplayName: Dead Sun's Explosion DragonsBreathRound.DisplayName: Dragon's Breath Round DrataliornusExoArrow.DisplayName: Drataliornus Arrow DrataliornusFlame.DisplayName: Drataliornus Arrow @@ -118,6 +119,7 @@ MagnomalyExplosion.DisplayName: Explosion MagnomalyRocket.DisplayName: Nuke MarksmanShot.DisplayName: Marksman Shot MechanicalBarracuda.DisplayName: Barracuda +MeowCreature.DisplayName: the creature :3 MeowFire.DisplayName: Purr Fire MiniatureFolly.DisplayName: Miniature Folly MiniRocket.DisplayName: Rocket @@ -236,4 +238,3 @@ Voidragon.DisplayName: Voidragon Blast VoidragonTentacle.DisplayName: Voidragon Tentacle WaterSpout.DisplayName: Spout WulfrumScrapBullet.DisplayName: High Speed Scrap -DeadSunExplosion.DisplayName: Dead Sun Explosion diff --git a/Projectiles/Ranged/ExoSpark.cs b/Projectiles/Ranged/ExoSpark.cs index 7abdaa0efe..e4d0dab0c7 100644 --- a/Projectiles/Ranged/ExoSpark.cs +++ b/Projectiles/Ranged/ExoSpark.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = 1; - Projectile.timeLeft = 600; + Projectile.timeLeft = 180; } public override void AI() diff --git a/Projectiles/Ranged/MeowCreature.cs b/Projectiles/Ranged/MeowCreature.cs new file mode 100644 index 0000000000..2823adda84 --- /dev/null +++ b/Projectiles/Ranged/MeowCreature.cs @@ -0,0 +1,76 @@ +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Linq; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Ranged +{ + public class MeowCreature : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Ranged"; + + public static int Lifetime => 180; + internal PrimitiveTrail TrailDrawer; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Projectile.type] = 36; + ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + } + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 24; + Projectile.friendly = true; + Projectile.penetrate = 1; + Projectile.MaxUpdates = 2; + Projectile.timeLeft = Lifetime; + Projectile.DamageType = DamageClass.Ranged; + } + + public override void AI() + { + CalamityUtils.HomeInOnNPC(Projectile, false, 480f, 16f, 20f); + Projectile.rotation = Projectile.velocity.ToRotation(); + } + + public override void OnKill(int timeLeft) + { + SoundEngine.PlaySound(Main.rand.NextBool() ? SoundID.Item58 : SoundID.Item57, Projectile.Center); + + // Circular spread of clouds + for (int i = 0; i < 12; i++) + { + Vector2 smokeVel = Main.rand.NextVector2Circular(16f, 16f); + Color smokeColor = Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.8f); + Particle smoke = new MediumMistParticle(Projectile.Center, smokeVel, smokeColor, Color.Black, Main.rand.NextFloat(0.6f, 1.6f), 220 - Main.rand.Next(60), 0.1f); + GeneralParticleHandler.SpawnParticle(smoke); + } + } + + internal float WidthFunction(float completionRatio) => (1f - completionRatio) * Projectile.scale * 10f; + internal Color ColorFunction(float completionRatio) + { + float hue = completionRatio * Projectile.timeLeft / (float)Lifetime; + Color trailColor = Main.hslToRgb(hue, 1f, 0.8f); + return trailColor * Projectile.Opacity; + } + + // The creature glows + public override void PostDraw(Color lightColor) + { + if (TrailDrawer is null) + TrailDrawer = new PrimitiveTrail(WidthFunction, ColorFunction); + + TrailDrawer.Draw(Projectile.oldPos.Where(oldPos => oldPos != Vector2.Zero), Projectile.Size * 0.5f - Main.screenPosition, 30); + + Texture2D glow = ModContent.Request(Texture).Value; + Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() * 0.5f, Projectile.scale, SpriteEffects.None); + } + } +} diff --git a/Projectiles/Ranged/MeowCreature.png b/Projectiles/Ranged/MeowCreature.png new file mode 100644 index 0000000000000000000000000000000000000000..a6634592f8b83cfd40bfe2fba5fb6ed3a5b1fdcd GIT binary patch literal 375 zcmV--0f_#IP)`- zvINsy!rTy_-F}7QgXj`(tf>vB4`^-y%z1X&zF=m0Vg^cFz~o^*A=w91w*Z#GV9Aq9 z2olz?Fo#(P%h|A;4og+v-a%3qx=-M7Kr;)_iw2aW0pi@=0~Y$de>;Q@Zo=v_m{0n9 zd%^ODu5Jd?j5N0Z=3 CalamityUtils.CircularHitboxCollision(Projectile.Center, 52 * Projectile.scale * 0.5f, targetHitbox); - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - SoundEngine.PlaySound(PinkFire ? SoundID.Item58 : SoundID.Item57, Projectile.Center); - - // Circular spread of clouds on hit - for (int i = 0; i < 12; i++) - { - Vector2 smokeVel = Main.rand.NextVector2Circular(16f, 16f); - Color smokeColor = PinkFire ? Color.Pink : Color.PowderBlue; - Particle smoke = new MediumMistParticle(Projectile.Center, smokeVel, smokeColor, Color.Black, Main.rand.NextFloat(0.6f, 1.6f), 200 - Main.rand.Next(60), 0.1f); - GeneralParticleHandler.SpawnParticle(smoke); - } - } } } From b957a8cd682311e0f30942f7022e7e244821cae5 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 16 Oct 2023 07:35:27 +0700 Subject: [PATCH 19/95] terra flameburster ft. elemental eruption wip --- Items/Weapons/Ranged/ElementalEruption.cs | 7 +- Items/Weapons/Ranged/TerraFlameburster.cs | 32 +++++++- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 7 +- .../Mods.CalamityMod.Projectiles.Ranged.hjson | 1 + Projectiles/Ranged/ElementalFire.cs | 17 +++-- Projectiles/Ranged/MeowCreature.cs | 9 +-- Projectiles/Ranged/MeowFire.cs | 8 +- Projectiles/Ranged/ShadeFire.cs | 2 +- Projectiles/Ranged/TerraFire.cs | 32 +++----- Projectiles/Ranged/TerraFlare.cs | 73 +++++++++++++++++++ 10 files changed, 143 insertions(+), 45 deletions(-) create mode 100644 Projectiles/Ranged/TerraFlare.cs diff --git a/Items/Weapons/Ranged/ElementalEruption.cs b/Items/Weapons/Ranged/ElementalEruption.cs index 64eb7c1192..57e6a8d578 100644 --- a/Items/Weapons/Ranged/ElementalEruption.cs +++ b/Items/Weapons/Ranged/ElementalEruption.cs @@ -36,12 +36,13 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - for (int i = 0; i < 2; i++) + // Fires three flames, random colors and spread + for (int i = 0; i < 3; i++) { Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(8f)); - Projectile.NewProjectile(source, position, newVel, type, damage, knockback, player.whoAmI); + Projectile.NewProjectile(source, position, newVel, type, damage, knockback, player.whoAmI, Main.rand.NextFloat()); } - return true; // Fires one directly with no randomness, totaling 3 projectiles + return false; } public override void AddRecipes() diff --git a/Items/Weapons/Ranged/TerraFlameburster.cs b/Items/Weapons/Ranged/TerraFlameburster.cs index 94d0bb9f58..cf465646fd 100644 --- a/Items/Weapons/Ranged/TerraFlameburster.cs +++ b/Items/Weapons/Ranged/TerraFlameburster.cs @@ -2,6 +2,7 @@ using CalamityMod.Projectiles.Ranged; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -10,14 +11,17 @@ namespace CalamityMod.Items.Weapons.Ranged public class TerraFlameburster : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Ranged"; + + public int FlareCounter = 0; + public override void SetDefaults() { Item.damage = 55; Item.DamageType = DamageClass.Ranged; Item.width = 68; Item.height = 22; - Item.useTime = 6; - Item.useAnimation = 30; + Item.useTime = 8; + Item.useAnimation = 32; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.25f; @@ -33,6 +37,30 @@ namespace CalamityMod.Items.Weapons.Ranged public override Vector2? HoldoutOffset() => new Vector2(-10, 0); + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + // Fires a homing terra flare + FlareCounter++; + if (FlareCounter >= 4) + { + FlareCounter = 0; + Vector2 newPos = position + velocity.SafeNormalize(Vector2.UnitX) * 36f; + float randAngle = Main.rand.NextFloat(8f, 15f); + Vector2 newVel = velocity.RotatedBy(MathHelper.ToRadians(randAngle)) * 1.5f; + Projectile.NewProjectile(source, newPos, newVel, ModContent.ProjectileType(), damage, knockback, player.whoAmI); + newVel = velocity.RotatedBy(MathHelper.ToRadians(-randAngle)) * 1.5f; + Projectile.NewProjectile(source, newPos, newVel, ModContent.ProjectileType(), damage, knockback, player.whoAmI); + } + + // Fires two flames, green and blue, slightly randomly spread + for (int i = 0; i < 2; i++) + { + Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(6f)); + Projectile.NewProjectile(source, position, newVel, type, damage, knockback, player.whoAmI, i); + } + return false; + } + public override void AddRecipes() { CreateRecipe(). diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 7e0158a89c..e10f06464d 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -439,7 +439,6 @@ ElementalEruption: { ''' Fires a spread of rainbow flames Uses gel for ammo - 90% chance to save ammo ''' } @@ -1185,7 +1184,11 @@ TelluricGlare: { TerraFlameburster: { DisplayName: Terra Flameburster - Tooltip: Uses gel for ammo + Tooltip: + ''' + Spews high-energy flames and pairs of homing flares + Uses gel for ammo + ''' } TheBallista: { diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson index 02e57a2b9d..9689422d4a 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson @@ -215,6 +215,7 @@ TerraArrowSplit.DisplayName: Terra Arrow TerraBulletMain.DisplayName: Terra Bullet TerraBulletSplit.DisplayName: Terra Bullet TerraFire.DisplayName: Terra Fire +TerraFlare.DisplayName: Terra Flare TheMaelstromExplosion.DisplayName: Reaper Explosion TheMaelstromShark.DisplayName: Reaper Shark ThePackMinissile.DisplayName: Pack Minissile diff --git a/Projectiles/Ranged/ElementalFire.cs b/Projectiles/Ranged/ElementalFire.cs index 9ea30fe50b..d51d5f090d 100644 --- a/Projectiles/Ranged/ElementalFire.cs +++ b/Projectiles/Ranged/ElementalFire.cs @@ -14,7 +14,8 @@ namespace CalamityMod.Projectiles.Ranged public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public static int Lifetime => 120; - public ref float Time => ref Projectile.ai[0]; + public ref float ColorType => ref Projectile.ai[0]; + public ref float Time => ref Projectile.ai[1]; public override void SetDefaults() { @@ -33,6 +34,7 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { Time++; + ColorType += 0.02f; // Determines particle size as well as hitbox if (Time >= 5f) @@ -42,20 +44,20 @@ namespace CalamityMod.Projectiles.Ranged // Rainbow smokes of increasing opacity float smokeRot = MathHelper.ToRadians(3f); // *Rate of rotation per frame, not a constant rotation - Color smokeColor = Color.Lerp(Color.Transparent, Main.DiscoColor, 0.6f + 0.4f * Utils.GetLerpValue(30f, Lifetime, Time, true)); - Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, smokeColor, 12, Projectile.scale * Main.rand.NextFloat(0.6f, 1.2f), 0.8f, smokeRot, required: true); + float hue = 0.5f * (ColorType % 1f) + 0.5f * Utils.GetLerpValue(30f, Lifetime, Time, true) * MathF.Sin(Main.GlobalTimeWrappedHourly * 5f); + Color smokeColor = Main.hslToRgb(hue, 1f, 0.8f); + Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, smokeColor, 12, Projectile.scale * Main.rand.NextFloat(0.6f, 1.2f), 0.3f, smokeRot, true, required: true); GeneralParticleHandler.SpawnParticle(smoke); // Overlay the glow on top, which is on the brighter side if (Main.rand.NextBool(5)) { Color glowColor = Color.Lerp(smokeColor, Color.White, 0.3f); - glowColor.A = smokeColor.A; - Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, glowColor, 9, Projectile.scale * Main.rand.NextFloat(0.4f, 0.7f), 0.8f, smokeRot, true, 0.005f, true); + Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, glowColor, 9, Projectile.scale * Main.rand.NextFloat(0.4f, 0.7f), 0.2f, smokeRot, true, 0.005f); GeneralParticleHandler.SpawnParticle(smokeGlow); } - Lighting.AddLight(Projectile.Center, smokeColor.ToVector3() * Projectile.scale * Utils.Remap(Time, 30f, Lifetime, 0.5f, 0.6f)); + Lighting.AddLight(Projectile.Center, smokeColor.ToVector3() * Projectile.scale * 0.3f); } // Circular hitbox adjusted for the size of the smoke particles (which is 52 here) @@ -69,7 +71,8 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 12; i++) { Vector2 smokeVel = Main.rand.NextVector2Circular(16f, 16f); - Particle smoke = new MediumMistParticle(Projectile.Center, smokeVel, Main.DiscoColor, Color.Black, Main.rand.NextFloat(0.6f, 1.6f), 200 - Main.rand.Next(60), 0.1f); + Color smokeColor = Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.8f); + Particle smoke = new MediumMistParticle(Projectile.Center, smokeVel, smokeColor, Color.Black, Main.rand.NextFloat(0.6f, 1.6f), 200 - Main.rand.Next(60), 0.1f); GeneralParticleHandler.SpawnParticle(smoke); } } diff --git a/Projectiles/Ranged/MeowCreature.cs b/Projectiles/Ranged/MeowCreature.cs index 2823adda84..94a6ac41c4 100644 --- a/Projectiles/Ranged/MeowCreature.cs +++ b/Projectiles/Ranged/MeowCreature.cs @@ -14,7 +14,6 @@ namespace CalamityMod.Projectiles.Ranged { public new string LocalizationCategory => "Projectiles.Ranged"; - public static int Lifetime => 180; internal PrimitiveTrail TrailDrawer; public override void SetStaticDefaults() @@ -29,13 +28,13 @@ namespace CalamityMod.Projectiles.Ranged Projectile.friendly = true; Projectile.penetrate = 1; Projectile.MaxUpdates = 2; - Projectile.timeLeft = Lifetime; + Projectile.timeLeft = 90 * Projectile.MaxUpdates; Projectile.DamageType = DamageClass.Ranged; } public override void AI() { - CalamityUtils.HomeInOnNPC(Projectile, false, 480f, 16f, 20f); + CalamityUtils.HomeInOnNPC(Projectile, false, 400f, 15f, 20f); Projectile.rotation = Projectile.velocity.ToRotation(); } @@ -53,10 +52,10 @@ namespace CalamityMod.Projectiles.Ranged } } - internal float WidthFunction(float completionRatio) => (1f - completionRatio) * Projectile.scale * 10f; + internal float WidthFunction(float completionRatio) => (1f - completionRatio) * Projectile.scale * 9f; internal Color ColorFunction(float completionRatio) { - float hue = completionRatio * Projectile.timeLeft / (float)Lifetime; + float hue = 0.5f + 0.5f * completionRatio * MathF.Sin(Main.GlobalTimeWrappedHourly * 5f); Color trailColor = Main.hslToRgb(hue, 1f, 0.8f); return trailColor * Projectile.Opacity; } diff --git a/Projectiles/Ranged/MeowFire.cs b/Projectiles/Ranged/MeowFire.cs index 3365902b9b..13f6fa6d6d 100644 --- a/Projectiles/Ranged/MeowFire.cs +++ b/Projectiles/Ranged/MeowFire.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - public static int Lifetime => 96; + public static int Lifetime => 90; public bool PinkFire => Projectile.ai[0] == 1f; public ref float Time => ref Projectile.ai[1]; @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = 5; Projectile.MaxUpdates = 3; - Projectile.timeLeft = Lifetime; + Projectile.timeLeft = Lifetime; // 30 effectively Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 8; } @@ -50,11 +50,11 @@ namespace CalamityMod.Projectiles.Ranged if (Main.rand.NextBool(8)) { Color glowColor = Color.Lerp(smokeColor, Color.White, 0.2f); - Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, glowColor, 8, Projectile.scale * Main.rand.NextFloat(0.4f, 0.7f), 0.15f, smokeRot, true, 0.005f, true); + Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, glowColor, 8, Projectile.scale * Main.rand.NextFloat(0.4f, 0.7f), 0.15f, smokeRot, true, 0.005f); GeneralParticleHandler.SpawnParticle(smokeGlow); } - Lighting.AddLight(Projectile.Center, smokeColor.ToVector3() * Projectile.scale * 0.5f); + Lighting.AddLight(Projectile.Center, smokeColor.ToVector3() * Projectile.scale * 0.2f); } // Circular hitbox adjusted for the size of the smoke particles (which is 52 here) diff --git a/Projectiles/Ranged/ShadeFire.cs b/Projectiles/Ranged/ShadeFire.cs index a60037aa71..8d4c3a570a 100644 --- a/Projectiles/Ranged/ShadeFire.cs +++ b/Projectiles/Ranged/ShadeFire.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Ranged if (Main.rand.NextBool(5)) { Color glowColor = Color.Lerp(smokeColor, Color.MidnightBlue, 0.25f); - Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, glowColor, 15, Projectile.scale * Main.rand.NextFloat(0.4f, 0.7f), 0.8f, smokeRot, true, 0.005f, true); + Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, glowColor, 15, Projectile.scale * Main.rand.NextFloat(0.4f, 0.7f), 0.8f, smokeRot, true, 0.005f); GeneralParticleHandler.SpawnParticle(smokeGlow); } } diff --git a/Projectiles/Ranged/TerraFire.cs b/Projectiles/Ranged/TerraFire.cs index 4621b2f9f3..1b2e083801 100644 --- a/Projectiles/Ranged/TerraFire.cs +++ b/Projectiles/Ranged/TerraFire.cs @@ -12,8 +12,9 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - public static int Lifetime => 120; - public ref float Time => ref Projectile.ai[0]; + public static int Lifetime => 96; + public bool BlueFire => Projectile.ai[0] == 1f; + public ref float Time => ref Projectile.ai[1]; public override void SetDefaults() { @@ -23,9 +24,9 @@ namespace CalamityMod.Projectiles.Ranged Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = -1; Projectile.MaxUpdates = 4; - Projectile.timeLeft = Lifetime; // 30 effectively + Projectile.timeLeft = Lifetime; // 24 effectively Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 6; + Projectile.idStaticNPCHitCooldown = 8; } public override void AI() @@ -40,34 +41,23 @@ namespace CalamityMod.Projectiles.Ranged // Main smokes shifting between green to green-blue and back float smokeRot = MathHelper.ToRadians(3f); // *Rate of rotation per frame, not a constant rotation - Color smokeColor = Color.Lerp(Color.SpringGreen, Color.Aquamarine, CalamityUtils.Convert01To010(Utils.GetLerpValue(30f, Lifetime, Time, true))); - Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, smokeColor, 12, Projectile.scale * Main.rand.NextFloat(0.6f, 1.2f), 0.8f, smokeRot, required: true); + float colorValue = CalamityUtils.Convert01To010(Utils.GetLerpValue(30f, Lifetime, Time, true)); + Color smokeColor = BlueFire ? Color.Lerp(Color.Cyan, Color.Aquamarine, colorValue) : Color.Lerp(Color.Lime, Color.SpringGreen, colorValue); + Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, smokeColor, 12, Projectile.scale * Main.rand.NextFloat(0.6f, 1.2f), 0.3f, smokeRot, true, required: true); GeneralParticleHandler.SpawnParticle(smoke); // Overlay the glow on top, shifted toward yellow if (Main.rand.NextBool(5)) { - Color glowColor = Color.Lerp(smokeColor, Color.GreenYellow, 0.75f); - Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, glowColor, 9, Projectile.scale * Main.rand.NextFloat(0.4f, 0.7f), 0.8f, smokeRot, true, 0.005f, true); + Color glowColor = Color.Lerp(smokeColor, Color.Yellow, 0.5f); + Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, glowColor, 9, Projectile.scale * Main.rand.NextFloat(0.4f, 0.7f), 0.2f, smokeRot, true, 0.005f); GeneralParticleHandler.SpawnParticle(smokeGlow); } - Lighting.AddLight(Projectile.Center, smokeColor.ToVector3() * Projectile.scale * 0.5f); + Lighting.AddLight(Projectile.Center, smokeColor.ToVector3() * Projectile.scale * 0.3f); } // Circular hitbox adjusted for the size of the smoke particles (which is 52 here) public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 52 * Projectile.scale * 0.5f, targetHitbox); - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - // Circular spread of clouds on hit - for (int i = 0; i < 12; i++) - { - Vector2 smokeVel = Main.rand.NextVector2Circular(16f, 16f); - Color smokeColor = Color.Lerp(Color.SpringGreen, Color.Aquamarine, CalamityUtils.Convert01To010(Utils.GetLerpValue(30f, Lifetime, Time, true))) * 0.8f; - Particle smoke = new MediumMistParticle(Projectile.Center, smokeVel, smokeColor, Color.Black, Main.rand.NextFloat(0.6f, 1.6f), 200 - Main.rand.Next(60), 0.1f); - GeneralParticleHandler.SpawnParticle(smoke); - } - } } } diff --git a/Projectiles/Ranged/TerraFlare.cs b/Projectiles/Ranged/TerraFlare.cs new file mode 100644 index 0000000000..358019bbc5 --- /dev/null +++ b/Projectiles/Ranged/TerraFlare.cs @@ -0,0 +1,73 @@ +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.IO; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Ranged +{ + public class TerraFlare : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Ranged"; + public override string Texture => "CalamityMod/ExtraTextures/SmallGreyscaleCircle"; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Projectile.type] = 18; + ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + } + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 40; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.penetrate = 1; + Projectile.MaxUpdates = 2; + Projectile.timeLeft = 90 * Projectile.MaxUpdates; + Projectile.DamageType = DamageClass.Ranged; + } + + public override void AI() => CalamityUtils.HomeInOnNPC(Projectile, false, 640f, 15f, 20f); + + public override void OnKill(int timeLeft) + { + // Circular spread of clouds + for (int i = 0; i < 8; i++) + { + Vector2 smokeVel = Main.rand.NextVector2Circular(16f, 16f); + Color smokeColor = Main.rand.NextBool() ? Color.Lime : Color.Cyan; + Particle smoke = new MediumMistParticle(Projectile.Center, smokeVel, smokeColor, Color.Black, Main.rand.NextFloat(0.6f, 1.6f), 200 - Main.rand.Next(60), 0.1f); + GeneralParticleHandler.SpawnParticle(smoke); + } + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D lightTexture = ModContent.Request(Texture).Value; + for (int i = 0; i < Projectile.oldPos.Length; i++) + { + float colorInterpolation = MathF.Cos(Projectile.timeLeft / 16f + Main.GlobalTimeWrappedHourly / 20f + i / (float)Projectile.oldPos.Length * MathHelper.Pi) * 0.5f + 0.5f; + Color color = Color.Lerp(Color.Lime, Color.Cyan, colorInterpolation); + Vector2 drawPosition = Projectile.oldPos[i] + lightTexture.Size() * 0.5f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY) + new Vector2(-15f, -15f); + Color outerColor = color; + Color innerColor = Color.Lerp(color, Color.Yellow, 0.3f) * 0.5f; + float intensity = 0.9f + 0.15f * MathF.Cos(Main.GlobalTimeWrappedHourly % 60f * MathHelper.TwoPi); + + // Become smaller the futher along the old positions we are. + intensity *= MathHelper.Lerp(0.15f, 1f, 1f - i / (float)Projectile.oldPos.Length); + + Vector2 outerScale = new Vector2(1.25f) * intensity; + Vector2 innerScale = new Vector2(1.25f) * intensity * 0.7f; + outerColor *= intensity * Projectile.scale; + innerColor *= intensity * Projectile.scale; + Main.EntitySpriteDraw(lightTexture, drawPosition, null, outerColor, 0f, lightTexture.Size() * 0.5f, outerScale * 0.6f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(lightTexture, drawPosition, null, innerColor, 0f, lightTexture.Size() * 0.5f, innerScale * 0.6f, SpriteEffects.None, 0); + } + return false; + } + } +} From d4af8fef1dcec88d430b7c6c1006e39999cb331d Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 16 Oct 2023 08:21:18 +0700 Subject: [PATCH 20/95] range rebalancing --- Projectiles/Ranged/ElementalFire.cs | 4 ++-- Projectiles/Ranged/EssenceFire.cs | 8 ++++---- Projectiles/Ranged/MeowFire.cs | 4 ++-- Projectiles/Ranged/ShadeFire.cs | 4 ++-- Projectiles/Ranged/SparkSpreaderFire.cs | 3 +-- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Projectiles/Ranged/ElementalFire.cs b/Projectiles/Ranged/ElementalFire.cs index d51d5f090d..07f9bd0755 100644 --- a/Projectiles/Ranged/ElementalFire.cs +++ b/Projectiles/Ranged/ElementalFire.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - public static int Lifetime => 120; + public static int Lifetime => 96; public ref float ColorType => ref Projectile.ai[0]; public ref float Time => ref Projectile.ai[1]; @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = 2; Projectile.MaxUpdates = 4; - Projectile.timeLeft = Lifetime; // 30 effectively + Projectile.timeLeft = Lifetime; // 24 effectively Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 12; } diff --git a/Projectiles/Ranged/EssenceFire.cs b/Projectiles/Ranged/EssenceFire.cs index d95cf47863..9336f4e99b 100644 --- a/Projectiles/Ranged/EssenceFire.cs +++ b/Projectiles/Ranged/EssenceFire.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/FireProj"; - public static int Lifetime => 105; - public static int Fadetime => 90; + public static int Lifetime => 96; + public static int Fadetime => 80; public ref float Time => ref Projectile.ai[0]; public bool spawnParticles = true; @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = -1; Projectile.MaxUpdates = 4; - Projectile.timeLeft = Lifetime; + Projectile.timeLeft = Lifetime; // 24 effectively Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 3; } @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Ranged if (Main.rand.NextBool(30) && Projectile.timeLeft > 20) { FlameParticle fire = new FlameParticle(Projectile.Center, 30, MathHelper.Clamp((Lifetime - Projectile.timeLeft) / 20, 0.5f, 2f), 0.05f, Color.BlueViolet * 0.5f, Color.DarkBlue * 0.5f); - fire.Velocity = Projectile.velocity.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4 / 3, MathHelper.PiOver4 / 3)); + fire.Velocity = Projectile.velocity.RotatedByRandom(MathHelper.ToRadians(30f)) * 0.6f; GeneralParticleHandler.SpawnParticle(fire); } if (spawnParticles && Time > 6 && Main.rand.NextBool(7)) diff --git a/Projectiles/Ranged/MeowFire.cs b/Projectiles/Ranged/MeowFire.cs index 13f6fa6d6d..263bd0705e 100644 --- a/Projectiles/Ranged/MeowFire.cs +++ b/Projectiles/Ranged/MeowFire.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - public static int Lifetime => 90; + public static int Lifetime => 72; public bool PinkFire => Projectile.ai[0] == 1f; public ref float Time => ref Projectile.ai[1]; @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = 5; Projectile.MaxUpdates = 3; - Projectile.timeLeft = Lifetime; // 30 effectively + Projectile.timeLeft = Lifetime; // 24 effectively Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 8; } diff --git a/Projectiles/Ranged/ShadeFire.cs b/Projectiles/Ranged/ShadeFire.cs index 8d4c3a570a..027b90d925 100644 --- a/Projectiles/Ranged/ShadeFire.cs +++ b/Projectiles/Ranged/ShadeFire.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - public static int Lifetime => 80; + public static int Lifetime => 60; public ref float Time => ref Projectile.ai[0]; public override void SetDefaults() @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = -1; - Projectile.MaxUpdates = 4; + Projectile.MaxUpdates = 3; Projectile.timeLeft = Lifetime; // 20 effectively Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 10; diff --git a/Projectiles/Ranged/SparkSpreaderFire.cs b/Projectiles/Ranged/SparkSpreaderFire.cs index 1607b2b872..fa7385a9ee 100644 --- a/Projectiles/Ranged/SparkSpreaderFire.cs +++ b/Projectiles/Ranged/SparkSpreaderFire.cs @@ -12,7 +12,6 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - public static int Lifetime => 48; public ref float Time => ref Projectile.ai[0]; public override void SetDefaults() @@ -22,7 +21,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = 3; Projectile.MaxUpdates = 2; - Projectile.timeLeft = Lifetime * Projectile.MaxUpdates; + Projectile.timeLeft = 42 * Projectile.MaxUpdates; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; } From 45be810abc88e79f5d9bdde0b2b0d9d98e8a8bc7 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 16 Oct 2023 09:08:41 +0700 Subject: [PATCH 21/95] let's not give these 600 tiles of range either they still have like 120 it's probably enough --- Items/Weapons/Ranged/HalleysInferno.cs | 2 +- Projectiles/Ranged/CosmicFire.cs | 45 +++++++++++++------------- Projectiles/Ranged/HalleysComet.cs | 26 +++++++-------- Projectiles/Ranged/TerraFire.cs | 4 +-- Projectiles/Ranged/TerraFlare.cs | 2 +- 5 files changed, 38 insertions(+), 41 deletions(-) diff --git a/Items/Weapons/Ranged/HalleysInferno.cs b/Items/Weapons/Ranged/HalleysInferno.cs index 209be8de3b..58080aa750 100644 --- a/Items/Weapons/Ranged/HalleysInferno.cs +++ b/Items/Weapons/Ranged/HalleysInferno.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useTime = Item.useAnimation = 39; Item.autoReuse = true; Item.useAmmo = AmmoID.Gel; - Item.shootSpeed = 14.6f; + Item.shootSpeed = 12f; Item.shoot = ModContent.ProjectileType(); Item.width = 84; diff --git a/Projectiles/Ranged/CosmicFire.cs b/Projectiles/Ranged/CosmicFire.cs index 6e24712e04..41a452a74d 100644 --- a/Projectiles/Ranged/CosmicFire.cs +++ b/Projectiles/Ranged/CosmicFire.cs @@ -14,40 +14,39 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public ref int HitCount => ref Main.player[Projectile.owner].Calamity().deadSunCounter; - public int Time = 0; - public int bounceKill = 0; - public bool Homing = false; - public Color color1 = Color.Turquoise; - public Color color2 = Color.Indigo; + public ref float Time => ref Projectile.ai[0]; + public ref float BounceHits => ref Projectile.ai[1]; + + public Color InnerColor = Color.Turquoise; + public override void SetDefaults() { - Projectile.width = 10; - Projectile.height = 10; + Projectile.width = Projectile.height = 16; Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = 1; - Projectile.extraUpdates = 9; - Projectile.timeLeft = 440; + Projectile.MaxUpdates = 10; + Projectile.timeLeft = 15 * Projectile.MaxUpdates; } public override void AI() { Time++; - Lighting.AddLight(Projectile.Center, 0.117f, 0.155f, 0.159f); + Lighting.AddLight(Projectile.Center, InnerColor.ToVector3() * 0.2f); Player Owner = Main.player[Projectile.owner]; float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); //used for some drawing prevention for when it's offscreen since it makes a fuck load of particles - if (Projectile.timeLeft % 3 == 0 && Time > 12 && targetDist < 1400f) + if (Projectile.timeLeft % 3 == 0 && Time > 12f && targetDist < 1400f) { AltSparkParticle spark = new AltSparkParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 20, 2.3f, Color.Black); GeneralParticleHandler.SpawnParticle(spark); } - if (Projectile.timeLeft % 2 == 0 && Time > 12 && targetDist < 1400f) + if (Projectile.timeLeft % 2 == 0 && Time > 12f && targetDist < 1400f) { - SparkParticle spark2 = new SparkParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 20, 0.9f, color1); + SparkParticle spark2 = new SparkParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 20, 0.9f, InnerColor); GeneralParticleHandler.SpawnParticle(spark2); } - if (Time == 7) + if (Time == 7f) { for (int i = 0; i <= 18; i++) { @@ -57,7 +56,7 @@ namespace CalamityMod.Projectiles.Ranged dust.noGravity = true; } } - if (Homing) + if (BounceHits > 0f) { for (int i = 0; i <= 2; i++) { @@ -73,7 +72,7 @@ namespace CalamityMod.Projectiles.Ranged public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { SoundEngine.PlaySound(DeadSunsWind.Explosion with { Pitch = HitCount * 0.05f }, Projectile.Center); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage / 2, 4f, Projectile.owner, HitCount * 10, Homing ? 5 : 0); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage / 2, 4f, Projectile.owner, HitCount * 10, BounceHits > 0f ? 5 : 0); if (HitCount >= 15) HitCount = 6; else @@ -82,7 +81,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool OnTileCollide(Vector2 oldVelocity) { - Projectile.timeLeft = 440; + Projectile.timeLeft = 15 * Projectile.MaxUpdates; float numberOfDusts = 25; float rotFactor = 360f / numberOfDusts; for (int i = 0; i < numberOfDusts; i++) @@ -96,15 +95,15 @@ namespace CalamityMod.Projectiles.Ranged dust.velocity = dust.type == 191 ? velOffset * 2.5f : velOffset; dust.scale = dust.type == 191 ? Main.rand.NextFloat(0.9f, 1.9f) : Main.rand.NextFloat(2.6f, 3.2f); } - Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, color1, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0.1f, 0.9f - (bounceKill * 0.25f), 25); + Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, InnerColor, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0.1f, 0.9f - (BounceHits * 0.25f), 25); GeneralParticleHandler.SpawnParticle(pulse); - Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.MediumSpringGreen, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0.05f, 0.75f - (bounceKill * 0.25f), 25); + Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.MediumSpringGreen, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0.05f, 0.75f - (BounceHits * 0.25f), 25); GeneralParticleHandler.SpawnParticle(pulse2); - Homing = true; - if (bounceKill == 0) + + if (BounceHits == 0f) SoundEngine.PlaySound(DeadSunsWind.Ricochet, Projectile.Center); - bounceKill++; + BounceHits++; if (Projectile.velocity.X != oldVelocity.X) { Projectile.velocity.X = -oldVelocity.X; @@ -113,7 +112,7 @@ namespace CalamityMod.Projectiles.Ranged { Projectile.velocity.Y = -oldVelocity.Y; } - if (bounceKill == 4) + if (BounceHits >= 4f) Projectile.Kill(); return false; } diff --git a/Projectiles/Ranged/HalleysComet.cs b/Projectiles/Ranged/HalleysComet.cs index 2180f1b43c..783d4fad52 100644 --- a/Projectiles/Ranged/HalleysComet.cs +++ b/Projectiles/Ranged/HalleysComet.cs @@ -13,7 +13,8 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - public int Time = 0; + public ref float Time => ref Projectile.ai[0]; + public override void SetDefaults() { Projectile.width = Projectile.height = 12; @@ -21,29 +22,28 @@ namespace CalamityMod.Projectiles.Ranged Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = 5; - Projectile.extraUpdates = 10; - Projectile.timeLeft = 600; + Projectile.MaxUpdates = 10; + Projectile.timeLeft = 15 * Projectile.MaxUpdates; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; } public override void AI() { + Projectile.rotation = Projectile.velocity.ToRotation(); Time++; - if (Projectile.scale <= 1.5f) - { - Projectile.scale *= 1.01f; - } - if (Time > 6 && Time < 180) + if (Time > 6f) { SparkParticle spark = new SparkParticle(Projectile.Center, Projectile.velocity, false, 11, 1.9f, Color.MediumBlue); GeneralParticleHandler.SpawnParticle(spark); SparkParticle spark2 = new SparkParticle(Projectile.Center, Projectile.velocity, false, 11, 1f, Color.Aqua); GeneralParticleHandler.SpawnParticle(spark2); } - if (Time == 5) + else if (Time == 5f) { - Particle pulse = new DirectionalPulseRing(Projectile.Center, Projectile.velocity * 0.75f, Color.Aqua, new Vector2(1f, 2.5f), Projectile.velocity.ToRotation(), 0.4f, 0.05f, 20); + Particle pulse = new DirectionalPulseRing(Projectile.Center, Projectile.velocity * 0.75f, Color.Aqua, new Vector2(1f, 2.5f), Projectile.rotation, 0.4f, 0.05f, 20); GeneralParticleHandler.SpawnParticle(pulse); - Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Projectile.velocity * 0.4f, Color.DodgerBlue, new Vector2(1f, 2.5f), Projectile.velocity.ToRotation(), 0.2f, 0.05f, 35); + Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Projectile.velocity * 0.4f, Color.DodgerBlue, new Vector2(1f, 2.5f), Projectile.rotation, 0.2f, 0.05f, 35); GeneralParticleHandler.SpawnParticle(pulse2); for (int i = 0; i <= 25; i++) { @@ -54,9 +54,7 @@ namespace CalamityMod.Projectiles.Ranged } } - Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.35f / 255f, (255 - Projectile.alpha) * 0f / 255f, (255 - Projectile.alpha) * 0.45f / 255f); - - Projectile.rotation += 0.3f * (float)Projectile.direction; + Lighting.AddLight(Projectile.Center, Color.MediumBlue.ToVector3() * 0.4f); } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) diff --git a/Projectiles/Ranged/TerraFire.cs b/Projectiles/Ranged/TerraFire.cs index 1b2e083801..3e8c266019 100644 --- a/Projectiles/Ranged/TerraFire.cs +++ b/Projectiles/Ranged/TerraFire.cs @@ -46,10 +46,10 @@ namespace CalamityMod.Projectiles.Ranged Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, smokeColor, 12, Projectile.scale * Main.rand.NextFloat(0.6f, 1.2f), 0.3f, smokeRot, true, required: true); GeneralParticleHandler.SpawnParticle(smoke); - // Overlay the glow on top, shifted toward yellow + // Overlay a gold glow on top if (Main.rand.NextBool(5)) { - Color glowColor = Color.Lerp(smokeColor, Color.Yellow, 0.5f); + Color glowColor = Color.Gold; Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, glowColor, 9, Projectile.scale * Main.rand.NextFloat(0.4f, 0.7f), 0.2f, smokeRot, true, 0.005f); GeneralParticleHandler.SpawnParticle(smokeGlow); } diff --git a/Projectiles/Ranged/TerraFlare.cs b/Projectiles/Ranged/TerraFlare.cs index 358019bbc5..ac151cb371 100644 --- a/Projectiles/Ranged/TerraFlare.cs +++ b/Projectiles/Ranged/TerraFlare.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Ranged Color color = Color.Lerp(Color.Lime, Color.Cyan, colorInterpolation); Vector2 drawPosition = Projectile.oldPos[i] + lightTexture.Size() * 0.5f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY) + new Vector2(-15f, -15f); Color outerColor = color; - Color innerColor = Color.Lerp(color, Color.Yellow, 0.3f) * 0.5f; + Color innerColor = Color.Lerp(color, Color.Gold, 0.8f) * 0.5f; float intensity = 0.9f + 0.15f * MathF.Cos(Main.GlobalTimeWrappedHourly % 60f * MathHelper.TwoPi); // Become smaller the futher along the old positions we are. From ad21a845cde0c1b17bd82271630956a5a468fac2 Mon Sep 17 00:00:00 2001 From: Xyk Date: Mon, 16 Oct 2023 00:53:22 -0700 Subject: [PATCH 22/95] Dragoon and Overloaded Blaster Dragoon Drizzlefish: Fires an assortment of hellfire and brimstone fireballs Sometimes fires a larger splitting fireball Doesn't use gel for ammo On gfb you must feed him gel to increase his power, if you don't feed him he has a chance to get mad and burn you instead of firing Overloaded Blaster: Fires a spread of shimmering slime that slows down and becomes overloaded when it stops Overloaded slime doesn't pierce, but deals double damage The slime bounces off of walls at high-velocity Uses gel for ammo --- CalPlayer/CalamityPlayer.cs | 1 + .../DragoonDrizzlefish.cs | 109 +++++++++++++-- Items/Weapons/Ranged/OverloadedBlaster.cs | 15 +- .../Mods.CalamityMod.Items.Fishing.hjson | 13 +- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 4 +- Projectiles/Ranged/DrizzlefishFire.cs | 132 +++++++++++------- Projectiles/Ranged/DrizzlefishFireSplit.cs | 126 ++++++++++------- Projectiles/Ranged/DrizzlefishFireball.cs | 106 +++++++++++--- Projectiles/Ranged/SlimeBolt.cs | 111 +++++++++++---- Projectiles/Ranged/SlimeBolt.png | Bin 253 -> 0 bytes 10 files changed, 452 insertions(+), 165 deletions(-) delete mode 100644 Projectiles/Ranged/SlimeBolt.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 1c578ec42b..00d62fb797 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -178,6 +178,7 @@ namespace CalamityMod.CalPlayer #region Timer and Counter public int gaelSwipes = 0; + public int dragoonDrizzlefishGelBoost = 1; public int deadSunCounter = 6; public bool sBlasterDashActivated = false; public int Holyhammer = 0; diff --git a/Items/Fishing/BrimstoneCragCatches/DragoonDrizzlefish.cs b/Items/Fishing/BrimstoneCragCatches/DragoonDrizzlefish.cs index bdbdcf864b..4f38fc9cfe 100644 --- a/Items/Fishing/BrimstoneCragCatches/DragoonDrizzlefish.cs +++ b/Items/Fishing/BrimstoneCragCatches/DragoonDrizzlefish.cs @@ -1,15 +1,26 @@ -using CalamityMod.Projectiles.Ranged; +using System.Collections.Generic; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.NPCs.NormalNPCs; +using CalamityMod.Projectiles.Ranged; +using CalamityMod.Sounds; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; +using Terraria.ModLoader.IO; +using static Humanizer.In; namespace CalamityMod.Items.Fishing.BrimstoneCragCatches { public class DragoonDrizzlefish : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Fishing"; + + public bool ballShot = true; + public int shotCounter = 0; public override void SetStaticDefaults() { Item.staff[Item.type] = true; //so it doesn't look weird af when holding it @@ -17,7 +28,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches public override void SetDefaults() { - Item.damage = 20; + Item.damage = 15; Item.DamageType = DamageClass.Ranged; Item.width = 42; Item.height = 38; @@ -25,31 +36,109 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches Item.useAnimation = 20; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; - Item.knockBack = 2f; + Item.knockBack = 1.1f; Item.value = CalamityGlobalItem.Rarity3BuyPrice; Item.rare = ItemRarityID.Orange; Item.UseSound = SoundID.Item20; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 11f; + Item.useAmmo = AmmoID.Gel; // for GFB + } + public override void ModifyTooltips(List list) => list.FindAndReplace("[GFB]", this.GetLocalizedValue(Main.zenithWorld ? "TooltipGFB" : "TooltipNormal")); + public override bool CanUseItem(Player player) + { + if (!Main.zenithWorld) + { + return true; + } + if (player.altFunctionUse == 2) + { + if (Main.zenithWorld) + { + CalamityGlobalItem.HasEnoughAmmo(player, Item, 5); + return true; + } + else + return false; + } + else + return true; } //so it looks normal when holding - public override Vector2? HoldoutOrigin() => new Vector2(10, 10); + public override Vector2? HoldoutOrigin() => new Vector2(2, 2); + public override bool AltFunctionUse(Player player) => Main.zenithWorld ? true : false; + public override bool CanConsumeAmmo(Item ammo, Player player) + { + if (Main.zenithWorld && player.altFunctionUse == 2 && player.Calamity().dragoonDrizzlefishGelBoost < 6) + return true; + else + return false; + } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - velocity = velocity.RotatedByRandom(MathHelper.ToRadians(10f)); - int shotType = ModContent.ProjectileType(); - if (Main.rand.NextBool()) + if (Main.zenithWorld && player.altFunctionUse == 2) { - shotType = ModContent.ProjectileType(); + //GFB stuff + if (player.Calamity().dragoonDrizzlefishGelBoost < 6) + { + player.Calamity().dragoonDrizzlefishGelBoost++; + SoundStyle roar = Sunskater.DeathSound; + SoundEngine.PlaySound(roar with { Pitch = 0.3f }, player.Center); + SoundEngine.PlaySound(SoundID.Item2 with { Pitch = 0.3f }, player.Center); + CombatText.NewText(player.Hitbox, Color.OrangeRed, ":)"); + for (int i = 0; i <= 11; i++) + { + Vector2 hVelocity = Main.rand.NextVector2Unit(); + hVelocity.X *= 0.66f; + hVelocity *= Main.rand.NextFloat(1f, 2f); + + int heart = Gore.NewGore(player.GetSource_FromThis(), player.Center + Main.rand.NextVector2Circular(14, 14), hVelocity, 331, Main.rand.NextFloat(0.2f, 1.3f)); + Main.gore[heart].sticky = false; + Main.gore[heart].velocity *= 0.4f; + Main.gore[heart].velocity.Y -= 0.7f; + } + } } else { - shotType = ModContent.ProjectileType(); + if (Main.zenithWorld) + { + if (Main.rand.NextBool(25) && player.Calamity().dragoonDrizzlefishGelBoost > 1) + { + SoundStyle roar = Sunskater.DeathSound; + SoundEngine.PlaySound(roar, player.Center); + player.Calamity().dragoonDrizzlefishGelBoost--; + } + if (player.Calamity().dragoonDrizzlefishGelBoost == 1 && Main.rand.NextBool(3)) + { + bool MADFISH = Main.rand.NextBool(4) ? true : false; + CombatText.NewText(player.Hitbox, Color.OrangeRed, MADFISH ? ">:(" : ":("); + SoundStyle roar = Sunskater.DeathSound; + SoundEngine.PlaySound(roar with { Pitch = -0.3f }, player.Center); + if (MADFISH) + player.AddBuff(ModContent.BuffType(), 240, true); + return false; + } + } + + velocity = velocity.RotatedByRandom(MathHelper.ToRadians(5.5f)); + int shotType = ModContent.ProjectileType(); + if (shotCounter < 3) + { + shotType = ModContent.ProjectileType(); + shotCounter++; + } + else + { + shotType = ModContent.ProjectileType(); + shotCounter = 0; + } + Projectile.NewProjectile(source, position, velocity, shotType, damage, knockback, player.whoAmI, 0f, Main.rand.Next(2)); } - Projectile.NewProjectile(source, position, velocity, shotType, damage, knockback, player.whoAmI, 0f, Main.rand.Next(2)); + return false; } } diff --git a/Items/Weapons/Ranged/OverloadedBlaster.cs b/Items/Weapons/Ranged/OverloadedBlaster.cs index 923c7eed5d..411bed4f31 100644 --- a/Items/Weapons/Ranged/OverloadedBlaster.cs +++ b/Items/Weapons/Ranged/OverloadedBlaster.cs @@ -12,12 +12,12 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public override void SetDefaults() { - Item.damage = 16; + Item.damage = 19; Item.DamageType = DamageClass.Ranged; Item.width = 42; Item.height = 34; - Item.useTime = 16; - Item.useAnimation = 16; + Item.useTime = 18; + Item.useAnimation = 18; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 1.5f; @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.rare = ItemRarityID.LightRed; Item.UseSound = SoundID.Item9; Item.autoReuse = true; - Item.shootSpeed = 6.5f; + Item.shootSpeed = 4.5f; Item.shoot = ModContent.ProjectileType(); Item.useAmmo = AmmoID.Gel; } @@ -44,11 +44,10 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - for (int index = 0; index < 5; ++index) + for (int index = 0; index < 3; ++index) { - float SpeedX = velocity.X + (float)Main.rand.Next(-40, 41) * 0.05f; - float SpeedY = velocity.Y + (float)Main.rand.Next(-40, 41) * 0.05f; - Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI, 0f, 0f); + Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(20f)) * Main.rand.NextFloat(0.6f, 1.1f); + Projectile.NewProjectile(source, position, newVel, type, damage, knockback, player.whoAmI); } return false; } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson index 1ce0cc040c..bf9f986e29 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson @@ -83,12 +83,21 @@ CragBullhead: { DragoonDrizzlefish: { DisplayName: Dragoon Drizzlefish - Tooltip: + Tooltip: "[GFB]" + TooltipNormal: ''' - Fires an inaccurate spread of fireballs + Fires an assortment of hellfire and brimstone fireballs + Sometimes fires a larger splitting firball The brimstone sac appears to contain fuel 'Revenge is a dish best served flaming hot' ''' + TooltipGFB: + ''' + Fires an assortment of hellfire and brimstone fireballs + Sometimes fires a larger splitting firball + Right click to feed the little boy some tasty gel + 'He is a hungry boy' + ''' } Havocfish: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index d63555a69e..e385ed1b52 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -824,7 +824,9 @@ OverloadedBlaster: { DisplayName: Overloaded Blaster Tooltip: ''' - Fires a large spread of bouncing slime + Fires a spread of shimmering slime that slows down and becomes overloaded when it stops + Overloaded slime doesn't pierce, but deals double damage + The slime bounces off of walls at high-velocity Uses gel for ammo 33% chance to save ammo ''' diff --git a/Projectiles/Ranged/DrizzlefishFire.cs b/Projectiles/Ranged/DrizzlefishFire.cs index 74defbd5af..f86cce2045 100644 --- a/Projectiles/Ranged/DrizzlefishFire.cs +++ b/Projectiles/Ranged/DrizzlefishFire.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Items.Fishing.BrimstoneCragCatches; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -9,7 +10,8 @@ namespace CalamityMod.Projectiles.Ranged public class DrizzlefishFire : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; - private int splitTimer = 30; + private int splitTimer = 45; + public int Time = 0; public override void SetDefaults() { @@ -18,15 +20,28 @@ namespace CalamityMod.Projectiles.Ranged Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; - Projectile.penetrate = 5; + Projectile.penetrate = -1; Projectile.extraUpdates = 1; Projectile.timeLeft = 90; Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 10; } - + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; + ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + } public override bool PreDraw(ref Color lightColor) { + if (Time < 7) + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value); + else + { + if (Projectile.ai[1] == 1f) + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/DrizzlefishFire2").Value); + else + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/DrizzlefishFire").Value); + } //Changes the texture of the projectile if (Projectile.ai[1] == 1f) { @@ -39,21 +54,79 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { + Time++; + Player Owner = Main.player[Projectile.owner]; + if (Main.zenithWorld && Time == 1 && Owner.Calamity().dragoonDrizzlefishGelBoost > 1) + Projectile.damage = (int)(Projectile.damage * Owner.Calamity().dragoonDrizzlefishGelBoost); + Projectile.scale = 1.5f; int dustType = 235; + int dustType2 = 235; if (Projectile.ai[1] == 1f) { if (Main.rand.NextBool()) { - dustType = 35; + dustType = 174; } else { - dustType = 55; + dustType = 162; } } else { - dustType = 235; + if (Main.rand.NextBool()) + { + dustType = 183; + } + else + { + dustType = 90; + } + } + if (Time > 7) + { + Projectile.alpha = 0; + for (int i = 0; i < 5; i++) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(9, 9) - Projectile.velocity * 1.5f, dustType, -Projectile.velocity); + dust.noGravity = true; + dust.velocity *= 0f; + dust.scale = Owner.Calamity().dragoonDrizzlefishGelBoost > 1 ? Main.rand.NextFloat(0.7f + Owner.Calamity().dragoonDrizzlefishGelBoost * 0.5f, 1.4f + Owner.Calamity().dragoonDrizzlefishGelBoost * 0.5f) : Main.rand.NextFloat(1.2f, 1.9f); + } + } + else + Projectile.alpha = 255; + if (Time == 4) + { + for (int i = 0; i <= 16; i++) + { + if (Projectile.ai[1] == 1f) + { + if (Main.rand.NextBool()) + { + dustType2 = 174; + } + else + { + dustType2 = 162; + } + } + else + { + if (Main.rand.NextBool()) + { + dustType2 = 183; + } + else + { + dustType2 = 90; + } + } + Dust dust = Dust.NewDustPerfect(Projectile.Center, dustType2, Projectile.velocity); + dust.scale = Main.rand.NextFloat(1.8f, 2.3f); + dust.velocity = Projectile.velocity.RotatedByRandom(1.1f) * Main.rand.NextFloat(0.6f, 1.9f); + dust.noGravity = true; + } } splitTimer--; if (splitTimer <= 0) @@ -86,57 +159,14 @@ namespace CalamityMod.Projectiles.Ranged { Projectile.timeLeft = 90; } - if (Projectile.ai[0] > 7f) - { - float num296 = 1f; - if (Projectile.ai[0] == 8f) - { - num296 = 0.25f; - } - else if (Projectile.ai[0] == 9f) - { - num296 = 0.5f; - } - else if (Projectile.ai[0] == 10f) - { - num296 = 0.75f; - } - Projectile.ai[0] += 1f; - for (int num298 = 0; num298 < 2; num298++) - { - int num299 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); - if (Main.rand.NextBool(3)) - { - Main.dust[num299].noGravity = true; - Main.dust[num299].scale *= 2.5f; - Dust expr_DBEF_cp_0 = Main.dust[num299]; - expr_DBEF_cp_0.velocity.X *= 2f; - Dust expr_DC0F_cp_0 = Main.dust[num299]; - expr_DC0F_cp_0.velocity.Y *= 2f; - } - else - { - Main.dust[num299].scale *= 2f; - } - Dust expr_DC74_cp_0 = Main.dust[num299]; - expr_DC74_cp_0.velocity.X *= 1.2f; - Dust expr_DC94_cp_0 = Main.dust[num299]; - expr_DC94_cp_0.velocity.Y *= 1.2f; - Main.dust[num299].scale *= num296; - } - } - else - { - Projectile.ai[0] += 1f; - } - Projectile.rotation += 0.3f * (float)Projectile.direction; + Projectile.rotation += 0.5f * (float)Projectile.direction; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { if (Projectile.ai[1] == 1f) { - target.AddBuff(BuffID.OnFire, 180); + target.AddBuff(BuffID.OnFire3, 120); } else { diff --git a/Projectiles/Ranged/DrizzlefishFireSplit.cs b/Projectiles/Ranged/DrizzlefishFireSplit.cs index 1cdd80e6ed..8ab731eafa 100644 --- a/Projectiles/Ranged/DrizzlefishFireSplit.cs +++ b/Projectiles/Ranged/DrizzlefishFireSplit.cs @@ -1,15 +1,20 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; +using static Humanizer.In; + namespace CalamityMod.Projectiles.Ranged { public class DrizzlefishFireSplit : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/Ranged/DrizzlefishFire"; + public int Time = 0; public override void SetDefaults() { @@ -18,14 +23,20 @@ namespace CalamityMod.Projectiles.Ranged Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; - Projectile.penetrate = 5; + Projectile.penetrate = 1; Projectile.timeLeft = 90; - Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 15; } - + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; + ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + } public override bool PreDraw(ref Color lightColor) { + if (Projectile.ai[1] == 1f) + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/DrizzlefishFire2").Value); + else + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/DrizzlefishFire").Value); //Changes the texture of the projectile if (Projectile.ai[1] == 1f) { @@ -38,70 +49,47 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { + Time++; + Player Owner = Main.player[Projectile.owner]; + if (Main.zenithWorld && Time == 1 && Owner.Calamity().dragoonDrizzlefishGelBoost > 1) + Projectile.damage = (int)(Projectile.damage * Owner.Calamity().dragoonDrizzlefishGelBoost); + Projectile.velocity.X *= 0.98f; + Projectile.velocity.Y += 0.5f; int dustType = 235; if (Projectile.ai[1] == 1f) { if (Main.rand.NextBool()) { - dustType = 35; + dustType = 174; } else { - dustType = 55; + dustType = 162; } } else { - dustType = 235; + if (Main.rand.NextBool()) + { + dustType = 183; + } + else + { + dustType = 90; + } + } + for (int i = 0; i < 2; i++) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(4, 4) - Projectile.velocity * 1.5f, dustType, -Projectile.velocity); + dust.noGravity = true; + dust.velocity *= 0f; + dust.scale = Owner.Calamity().dragoonDrizzlefishGelBoost > 1 ? Main.rand.NextFloat(0f + Owner.Calamity().dragoonDrizzlefishGelBoost * 0.5f, 0.3f + Owner.Calamity().dragoonDrizzlefishGelBoost * 0.5f) : Main.rand.NextFloat(0.4f, 0.8f); } Lighting.AddLight(Projectile.Center, 0.25f, 0f, 0f); if (Projectile.timeLeft > 90) { Projectile.timeLeft = 90; } - if (Projectile.ai[0] > 7f) - { - float num296 = 1f; - if (Projectile.ai[0] == 8f) - { - num296 = 0.25f; - } - else if (Projectile.ai[0] == 9f) - { - num296 = 0.5f; - } - else if (Projectile.ai[0] == 10f) - { - num296 = 0.75f; - } - Projectile.ai[0] += 1f; - for (int num298 = 0; num298 < 2; num298++) - { - int num299 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); - if (Main.rand.NextBool(3)) - { - Main.dust[num299].noGravity = true; - Main.dust[num299].scale *= 2.5f; - Dust expr_DBEF_cp_0 = Main.dust[num299]; - expr_DBEF_cp_0.velocity.X *= 2f; - Dust expr_DC0F_cp_0 = Main.dust[num299]; - expr_DC0F_cp_0.velocity.Y *= 2f; - } - else - { - Main.dust[num299].scale *= 2f; - } - Dust expr_DC74_cp_0 = Main.dust[num299]; - expr_DC74_cp_0.velocity.X *= 1.2f; - Dust expr_DC94_cp_0 = Main.dust[num299]; - expr_DC94_cp_0.velocity.Y *= 1.2f; - Main.dust[num299].scale *= num296; - } - } - else - { - Projectile.ai[0] += 1f; - } Projectile.rotation += 0.3f * (float)Projectile.direction; } @@ -109,12 +97,48 @@ namespace CalamityMod.Projectiles.Ranged { if (Projectile.ai[1] == 1f) { - target.AddBuff(BuffID.OnFire, 120); + target.AddBuff(BuffID.OnFire3, 60); } else { target.AddBuff(ModContent.BuffType(), 30); } } + public override void OnKill(int timeLeft) + { + Player Owner = Main.player[Projectile.owner]; + int dustType = 235; + for (int i = 0; i <= 9; i++) + { + if (Projectile.ai[1] == 1f) + { + if (Main.rand.NextBool()) + { + dustType = 174; + } + else + { + dustType = 162; + } + } + else + { + if (Main.rand.NextBool()) + { + dustType = 183; + } + else + { + dustType = 90; + } + } + Dust dust = Dust.NewDustPerfect(Projectile.Center, dustType, new Vector2(0, -5).RotatedByRandom(MathHelper.ToRadians(15f)) * Main.rand.NextFloat(0.1f, 1.9f)); + dust.noGravity = false; + dust.scale = Owner.Calamity().dragoonDrizzlefishGelBoost > 1 ? Main.rand.NextFloat(0f + Owner.Calamity().dragoonDrizzlefishGelBoost * 0.5f, 0.6f + Owner.Calamity().dragoonDrizzlefishGelBoost * 0.5f) : Main.rand.NextFloat(0.4f, 1.1f); + Dust dust2 = Dust.NewDustPerfect(Projectile.Center, dustType, new Vector2(0, -3).RotatedByRandom(MathHelper.ToRadians(25f)) * Main.rand.NextFloat(0.1f, 1.9f)); + dust2.noGravity = false; + dust2.scale = Owner.Calamity().dragoonDrizzlefishGelBoost > 1 ? Main.rand.NextFloat(0f + Owner.Calamity().dragoonDrizzlefishGelBoost * 0.5f, 0.6f + Owner.Calamity().dragoonDrizzlefishGelBoost * 0.5f) : Main.rand.NextFloat(0.4f, 1.1f); + } + } } } diff --git a/Projectiles/Ranged/DrizzlefishFireball.cs b/Projectiles/Ranged/DrizzlefishFireball.cs index 60f9d30381..864bcdaa33 100644 --- a/Projectiles/Ranged/DrizzlefishFireball.cs +++ b/Projectiles/Ranged/DrizzlefishFireball.cs @@ -1,5 +1,6 @@ using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -8,8 +9,8 @@ namespace CalamityMod.Projectiles.Ranged public class DrizzlefishFireball : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - + public override string Texture => "CalamityMod/Projectiles/Ranged/DrizzlefishFire"; + public int Time = 0; public override void SetDefaults() { Projectile.width = 10; @@ -22,34 +23,87 @@ namespace CalamityMod.Projectiles.Ranged Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 10; } - + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; + ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + } public override void AI() { + Time++; + Player Owner = Main.player[Projectile.owner]; + if (Main.zenithWorld && Time == 1 && Owner.Calamity().dragoonDrizzlefishGelBoost > 1) + Projectile.damage = (int)(Projectile.damage * Owner.Calamity().dragoonDrizzlefishGelBoost); + Projectile.velocity.X *= 0.995f; + Projectile.velocity.Y -= 0.065f; Lighting.AddLight(Projectile.Center, 0.25f, 0f, 0f); int dustType = 235; + int dustType2 = 235; if (Projectile.ai[1] == 1f) { if (Main.rand.NextBool()) { - dustType = 35; + dustType = 174; } else { - dustType = 55; + dustType = 162; } } else { - dustType = 235; - } - Projectile.localAI[0] += 1f; - if (Projectile.localAI[0] > 4f) - { - for (int num468 = 0; num468 < 5; num468++) + if (Main.rand.NextBool()) { - int num469 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); - Main.dust[num469].noGravity = true; - Main.dust[num469].velocity *= 0f; + dustType = 183; + } + else + { + dustType = 90; + } + } + if (Time > 7) + { + Projectile.alpha = 0; + for (int i = 0; i < 2; i++) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(5, 5) - Projectile.velocity * 1.5f, dustType, -Projectile.velocity); + dust.noGravity = true; + dust.velocity *= 0f; + dust.scale = Owner.Calamity().dragoonDrizzlefishGelBoost > 1 ? Main.rand.NextFloat(0.4f + Owner.Calamity().dragoonDrizzlefishGelBoost * 0.5f, 1f + Owner.Calamity().dragoonDrizzlefishGelBoost * 0.5f) : Main.rand.NextFloat(0.9f, 1.5f); + } + } + else + Projectile.alpha = 255; + if (Time == 4) + { + for (int i = 0; i <= 8; i++) + { + if (Projectile.ai[1] == 1f) + { + if (Main.rand.NextBool()) + { + dustType2 = 174; + } + else + { + dustType2 = 162; + } + } + else + { + if (Main.rand.NextBool()) + { + dustType2 = 183; + } + else + { + dustType2 = 90; + } + } + Dust dust = Dust.NewDustPerfect(Projectile.Center, dustType2, Projectile.velocity); + dust.scale = Main.rand.NextFloat(1.1f, 1.9f); + dust.velocity = Projectile.velocity.RotatedByRandom(0.8f) * Main.rand.NextFloat(0.3f, 1.3f); + dust.noGravity = true; } } } @@ -60,15 +114,35 @@ namespace CalamityMod.Projectiles.Ranged return false; } + public override bool PreDraw(ref Color lightColor) + { + if (Time < 7) + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value); + else + { + if (Projectile.ai[1] == 1f) + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/DrizzlefishFire2").Value); + else + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/DrizzlefishFire").Value); + } + //Changes the texture of the projectile + if (Projectile.ai[1] == 1f) + { + Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Ranged/DrizzlefishFire2").Value; + Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, new Rectangle?(new Rectangle(0, 0, 16, 16)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, 20 / 2f), Projectile.scale, SpriteEffects.None, 0); + return false; + } + return true; + } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { if (Projectile.ai[1] == 1f) { - target.AddBuff(BuffID.OnFire, 180); + target.AddBuff(BuffID.OnFire3, 40); } else { - target.AddBuff(ModContent.BuffType(), 60); + target.AddBuff(ModContent.BuffType(), 20); } } } diff --git a/Projectiles/Ranged/SlimeBolt.cs b/Projectiles/Ranged/SlimeBolt.cs index 01542fa863..7a635d5357 100644 --- a/Projectiles/Ranged/SlimeBolt.cs +++ b/Projectiles/Ranged/SlimeBolt.cs @@ -1,3 +1,5 @@ +using CalamityMod.Particles; +using CalamityMod.Projectiles.Melee; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -8,59 +10,116 @@ namespace CalamityMod.Projectiles.Ranged public class SlimeBolt : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + + public bool Empowered = false; + public int countdown = 90; + public bool postBounce = false; public override void SetDefaults() { - Projectile.width = 6; - Projectile.height = 6; - Projectile.aiStyle = ProjAIStyleID.Beam; + Projectile.width = 18; + Projectile.height = 18; Projectile.friendly = true; Projectile.DamageType = DamageClass.Ranged; - Projectile.penetrate = 2; - Projectile.timeLeft = 400; + Projectile.penetrate = -1; + Projectile.timeLeft = 300; + Projectile.extraUpdates = 2; } public override void AI() { - Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.01f / 255f, (255 - Projectile.alpha) * 0.05f / 255f, (255 - Projectile.alpha) * 0.25f / 255f); - if (Main.rand.NextBool(5)) + if (countdown < 81) { - Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, 20, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f); + Particle orb = new GenericBloom(Projectile.Center, Vector2.Zero, Color.SkyBlue, Empowered ? 0.22f : 0.17f, postBounce ? 2 : 5, true); + GeneralParticleHandler.SpawnParticle(orb); + } + if (countdown > -55 && Main.rand.NextBool(postBounce ? 2 : 7)) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(10, 10), Main.rand.NextBool(3) ? 16 : 20); + dust.scale = Main.rand.NextFloat(0.3f, 0.7f); + dust.velocity = -Projectile.velocity * 0.7f; + } + countdown--; + if (countdown <= 0) + Projectile.velocity *= 0.97f; + Vector3 DustLight = new Vector3(0.100f, 0.150f, 0.200f); + Lighting.AddLight(Projectile.Center, DustLight * 3); + if (countdown == -55) + { + Projectile.damage *= 2; + float numberOfDusts = 10; + float rotFactor = 360f / numberOfDusts; + for (int i = 0; i < numberOfDusts; i++) + { + float rot = MathHelper.ToRadians(i * rotFactor); + Vector2 offset = new Vector2(Main.rand.NextFloat(3, 3.1f), 0).RotatedBy(rot); + Vector2 velOffset = new Vector2(Main.rand.NextFloat(3, 3.1f), 0).RotatedBy(rot); + Dust dust = Dust.NewDustPerfect(Projectile.Center + offset, Main.rand.NextBool(3) ? 59 : 20, new Vector2(velOffset.X, velOffset.Y)); + dust.noGravity = true; + dust.velocity = velOffset; + dust.scale = Main.rand.NextFloat(1.2f, 1.9f); + } + } + if (countdown < -55 && Projectile.timeLeft % 10 == 0) + { + Empowered = true; + SparkParticle spark1 = new SparkParticle(Projectile.Center, new Vector2(0, 2), false, 7, 0.9f, Color.SkyBlue); + GeneralParticleHandler.SpawnParticle(spark1); + SparkParticle spark2 = new SparkParticle(Projectile.Center, new Vector2(0, -2), false, 7, 0.9f, Color.SkyBlue); + GeneralParticleHandler.SpawnParticle(spark2); + SparkParticle spark3 = new SparkParticle(Projectile.Center, new Vector2(2, 0), false, 7, 0.9f, Color.SkyBlue); + GeneralParticleHandler.SpawnParticle(spark3); + SparkParticle spark4 = new SparkParticle(Projectile.Center, new Vector2(-2, 0), false, 7, 0.9f, Color.SkyBlue); + GeneralParticleHandler.SpawnParticle(spark4); + + } + if (Empowered) + { + Projectile.penetrate = 1; } } public override bool OnTileCollide(Vector2 oldVelocity) { - Projectile.penetrate--; - if (Projectile.penetrate <= 0) + if (Projectile.velocity.X != oldVelocity.X) { - Projectile.Kill(); + Projectile.velocity.X = -oldVelocity.X * (postBounce ? 1f : 3f); } - else + if (Projectile.velocity.Y != oldVelocity.Y) { - if (Projectile.velocity.X != oldVelocity.X) - { - Projectile.velocity.X = -oldVelocity.X; - } - if (Projectile.velocity.Y != oldVelocity.Y) - { - Projectile.velocity.Y = -oldVelocity.Y; - } - Projectile.velocity *= 0.75f; + Projectile.velocity.Y = -oldVelocity.Y * (postBounce ? 1f : 3f); } + postBounce = true; return false; } public override void OnKill(int timeLeft) { - for (int k = 0; k < 5; k++) - { - Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, 20, Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f); - } + Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.SkyBlue, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0f, 0.4f, 25); + GeneralParticleHandler.SpawnParticle(pulse); } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(BuffID.Slimed, 180); + target.AddBuff(BuffID.Slimed, Empowered ? 480 : 180); + if (Empowered) + { + Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.SkyBlue, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0f, 0.65f, 35); + GeneralParticleHandler.SpawnParticle(pulse2); + float numberOfDusts = 12; + float rotFactor = 360f / numberOfDusts; + for (int i = 0; i < numberOfDusts; i++) + { + float rot = MathHelper.ToRadians(i * rotFactor); + Vector2 offset = new Vector2(Main.rand.NextFloat(1, 3.1f), 0).RotatedBy(rot); + Vector2 velOffset = new Vector2(Main.rand.NextFloat(1, 3.1f), 0).RotatedBy(rot); + Dust dust = Dust.NewDustPerfect(Projectile.Center + offset, Main.rand.NextBool(3) ? 34 : 59, new Vector2(velOffset.X, velOffset.Y)); + dust.noGravity = false; + dust.alpha = 130; + dust.velocity = velOffset; + dust.scale = dust.type == 20 ? Main.rand.NextFloat(0.9f, 1.9f) : Main.rand.NextFloat(1.6f, 2.2f); + } + } } } } diff --git a/Projectiles/Ranged/SlimeBolt.png b/Projectiles/Ranged/SlimeBolt.png deleted file mode 100644 index f603916ffaaf83d58c4209ca3c2dbbda34e83186..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 253 zcmeAS@N?(olHy`uVBq!ia0vp^Y#_`5A|IT2?*ZZ@dAqwX{0G4WdzViJif|TqL>4nJ z@ErkR#;MwT(m+A>5>H=O_6MvI;_RxkK5h#K3dv@MM3gw^=jNv7l>oU649-QVi6yBi z3gww484B*6z5ywEsq8@UL{AsT5RU7mXE*XT8;CGm{4VJAlJ!lK;f%IvGjFss#$0Gq za#eb|yu)ewwOCL nq~XLFZPwf0u2gsaF#pdG^H_@~VZ|*WkSjc0{an^LB{Ts5AN*QO From 4de112ce40108b5a930cca1dc9630ec401f74ed1 Mon Sep 17 00:00:00 2001 From: Xyk Date: Mon, 16 Oct 2023 01:16:34 -0700 Subject: [PATCH 23/95] firball fixed typo --- Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson index bf9f986e29..13a8b24a11 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson @@ -87,14 +87,14 @@ DragoonDrizzlefish: { TooltipNormal: ''' Fires an assortment of hellfire and brimstone fireballs - Sometimes fires a larger splitting firball + Sometimes fires a larger splitting fireball The brimstone sac appears to contain fuel 'Revenge is a dish best served flaming hot' ''' TooltipGFB: ''' Fires an assortment of hellfire and brimstone fireballs - Sometimes fires a larger splitting firball + Sometimes fires a larger splitting fireball Right click to feed the little boy some tasty gel 'He is a hungry boy' ''' From c159e202a434e9f88345c6a16ac01f95960487e3 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Tue, 17 Oct 2023 03:57:23 +0700 Subject: [PATCH 24/95] elemental eruption + some asset management --- Items/Weapons/Ranged/ElementalEruption.cs | 43 ++++- Items/Weapons/Ranged/Photoviscerator.cs | 2 +- Items/Weapons/Ranged/TerraFlameburster.cs | 2 +- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 3 +- .../Mods.CalamityMod.Projectiles.Ranged.hjson | 1 + Projectiles/DraedonsArsenal/PulseAura.png | Bin 2903 -> 0 bytes .../DraedonsArsenal/PulseDragonProjectile.cs | 2 +- Projectiles/Ranged/AuroraFire.cs | 10 +- Projectiles/Ranged/ElementalFire.cs | 23 +-- Projectiles/Ranged/ElementalFlare.cs | 149 ++++++++++++++++++ Projectiles/Ranged/ExoLight.cs | 4 +- Projectiles/Ranged/PrismaticEnergyBlast.png | Bin 2903 -> 0 bytes Projectiles/Ranged/TheMaelstromExplosion.cs | 2 + Projectiles/Ranged/TheMaelstromExplosion.png | Bin 2903 -> 0 bytes 14 files changed, 209 insertions(+), 32 deletions(-) delete mode 100644 Projectiles/DraedonsArsenal/PulseAura.png create mode 100644 Projectiles/Ranged/ElementalFlare.cs delete mode 100644 Projectiles/Ranged/PrismaticEnergyBlast.png delete mode 100644 Projectiles/Ranged/TheMaelstromExplosion.png diff --git a/Items/Weapons/Ranged/ElementalEruption.cs b/Items/Weapons/Ranged/ElementalEruption.cs index 57e6a8d578..8c05014746 100644 --- a/Items/Weapons/Ranged/ElementalEruption.cs +++ b/Items/Weapons/Ranged/ElementalEruption.cs @@ -11,14 +11,21 @@ namespace CalamityMod.Items.Weapons.Ranged public class ElementalEruption : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Ranged"; + + public int FlareCounter = 0; + + public override void SetStaticDefaults() + { + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; + } + public override void SetDefaults() { Item.damage = 77; Item.DamageType = DamageClass.Ranged; Item.width = 64; Item.height = 34; - Item.useTime = 12; - Item.useAnimation = 36; + Item.useAnimation = Item.useTime = 30; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.5f; @@ -32,10 +39,41 @@ namespace CalamityMod.Items.Weapons.Ranged Item.consumeAmmoOnFirstShotOnly = true; } + public override bool AltFunctionUse(Player player) => true; + public override Vector2? HoldoutOffset() => new Vector2(-10, 0); + // Left click functions as clockwork with bursts of three (adjust for rounding) + public override float UseTimeMultiplier(Player player) => player.altFunctionUse == 2 ? 1f : 0.34f; + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { + // Right-click: fires a small cluster of 3 sticky, non-homing flares + if (player.altFunctionUse == 2f) + { + Vector2 newPos = position + velocity.SafeNormalize(Vector2.UnitX) * 48f; + for (int i = 0; i < 3; i++) + { + newPos += Main.rand.NextVector2Circular(24f, 24f); + Projectile flare = Projectile.NewProjectileDirect(source, newPos, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI, ai2: 1f); + flare.penetrate = -1; + flare.usesLocalNPCImmunity = true; + flare.localNPCHitCooldown = 30; + } + return false; + } + + // Left-click + // Fires a pair of homing rainbow flares + FlareCounter++; + if (FlareCounter >= 3) + { + FlareCounter = 0; + Vector2 newPos = position + velocity.SafeNormalize(Vector2.UnitX) * 36f; + Projectile.NewProjectile(source, newPos, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI, velocity.Length(), -1f); + Projectile.NewProjectile(source, newPos, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI, velocity.Length(), 1f); + } + // Fires three flames, random colors and spread for (int i = 0; i < 3; i++) { @@ -50,7 +88,6 @@ namespace CalamityMod.Items.Weapons.Ranged CreateRecipe(). AddIngredient(). AddIngredient(). - AddIngredient(). AddIngredient(ItemID.LunarBar, 5). AddIngredient(5). AddIngredient(5). diff --git a/Items/Weapons/Ranged/Photoviscerator.cs b/Items/Weapons/Ranged/Photoviscerator.cs index 09ef719bf8..6546f24bcf 100644 --- a/Items/Weapons/Ranged/Photoviscerator.cs +++ b/Items/Weapons/Ranged/Photoviscerator.cs @@ -81,7 +81,7 @@ namespace CalamityMod.Items.Weapons.Ranged CreateRecipe(). AddIngredient(). AddIngredient(). - AddIngredient(). + AddIngredient(). AddIngredient(). AddTile(). Register(); diff --git a/Items/Weapons/Ranged/TerraFlameburster.cs b/Items/Weapons/Ranged/TerraFlameburster.cs index cf465646fd..fa044f3619 100644 --- a/Items/Weapons/Ranged/TerraFlameburster.cs +++ b/Items/Weapons/Ranged/TerraFlameburster.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - // Fires a homing terra flare + // Fires a pair of homing terra flares FlareCounter++; if (FlareCounter >= 4) { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 1510c87e91..63556698e7 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -441,7 +441,8 @@ ElementalEruption: { DisplayName: Elemental Eruption Tooltip: ''' - Fires a spread of rainbow flames + Fires rainbow flames and pairs of high-energy homing flares + to instead fire a cluster of sticky flares Uses gel for ammo ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson index e96658804f..926bb6ec3d 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson @@ -64,6 +64,7 @@ DrizzlefishFireball.DisplayName: Drizzlefish Fireball DrizzlefishFireSplit.DisplayName: Drizzlefish Flames DWArrow.DisplayName: Death's Arrow ElementalFire.DisplayName: Elemental Fire +ElementalFlare.DisplayName: Elemental Flare ElysianArrowProj.DisplayName: Elysian Arrow EmesisGore.DisplayName: Rotten Gore EnhancedNanoRoundProj.DisplayName: Enhanced Nano Round diff --git a/Projectiles/DraedonsArsenal/PulseAura.png b/Projectiles/DraedonsArsenal/PulseAura.png deleted file mode 100644 index 8e2d2a871cdedc2f8035aec442b4c527a2bf3160..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2903 zcmV-d3#jyoP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D3hYTlK~#8N?VRg# z6Ui0Dv1}RH^80Pfn}w}p$tGU|e95NB9~~;2$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OQ zmV)H_w9FLtEu;dpuh}fkHv_x7d)2kI^|cEZmY4L=KG5)|4r&JnY_%vTE!|t!=e#zW z&DwYMvJ=@4ZP;<7l73jdD-VQwjdNRDW$dy{rk!G`Sft%bxx9@ZUw!r0zu?!##`*?+ zD)+p`Z`M8Z12xevj_D`Bu3+{ZiGpHa(d>iOX}M$SVitpw-!MyXB2H3}!>+l4SO>w$ zZ@DJuL9Bv&*72OAbx!h|_6gqNT?%saD5*auxso(1CI8yz=ZLc?$kC%D&q=N%=WOyX z4u4+wAqsMws3d2;?}mNltsG^u6#GRmzxxO$|LXbw1n;9DN6)japm*dbTR-_a%Fl~KZ-_0w=#PVpVU53QJf zBnpbb$5c>1dfJLpPCvSo;`k_v=|`fVcjDZ+{{kvxraID#`U(I5002ovPDHLkV1ke6 Bu4(`P diff --git a/Projectiles/DraedonsArsenal/PulseDragonProjectile.cs b/Projectiles/DraedonsArsenal/PulseDragonProjectile.cs index 82c9c77400..756c4112b3 100644 --- a/Projectiles/DraedonsArsenal/PulseDragonProjectile.cs +++ b/Projectiles/DraedonsArsenal/PulseDragonProjectile.cs @@ -135,7 +135,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal { Player player = Main.player[Projectile.owner]; Texture2D chainTexture = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/PulseDragonChain").Value; - Texture2D pulseTexture = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/PulseAura").Value; + Texture2D pulseTexture = ModContent.Request("CalamityMod/ExtraTextures/SmallGreyscaleCircle").Value; Texture2D dragonHeadTexture = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/PulseDragonProjectile").Value; if (ReelingBack) dragonHeadTexture = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/PulseDragonHeadClosed").Value; diff --git a/Projectiles/Ranged/AuroraFire.cs b/Projectiles/Ranged/AuroraFire.cs index ea5dad3283..28da085bbc 100644 --- a/Projectiles/Ranged/AuroraFire.cs +++ b/Projectiles/Ranged/AuroraFire.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Ranged public class AuroraFire : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public override string Texture => "CalamityMod/Projectiles/Magic/RancorFog"; public static int Lifetime => 450; public static int Fadetime => 420; @@ -75,14 +75,14 @@ namespace CalamityMod.Projectiles.Ranged // Draw smokes over the whole thing float smokeRot = MathHelper.ToRadians(3f); // *Rate of rotation per frame, not a constant rotation Color smokeColor = Color.Lerp(OrangeFogColor, BlueFogColor, 0.6f + 0.4f * MathF.Sin(Main.GlobalTimeWrappedHourly * 5f)); - Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, smokeColor, 12, Projectile.scale * Main.rand.NextFloat(0.6f, 1.2f), 0.8f, smokeRot, required: true); + Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, smokeColor, 8, Projectile.scale * Main.rand.NextFloat(0.6f, 1.2f), 0.8f, smokeRot, required: true); GeneralParticleHandler.SpawnParticle(smoke); // Overlay the glow on top, which is on the brighter side - if (Main.rand.NextBool(5)) + if (Main.rand.NextBool(8)) { Color glowColor = Color.Lerp(smokeColor, Color.White, 0.25f); - Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, glowColor, 9, Projectile.scale * Main.rand.NextFloat(0.4f, 0.7f), 0.8f, smokeRot, true, 0.005f, true); + Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, glowColor, 6, Projectile.scale * Main.rand.NextFloat(0.4f, 0.7f), 0.6f, smokeRot, true, 0.005f, true); GeneralParticleHandler.SpawnParticle(smokeGlow); } @@ -108,7 +108,7 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { Main.spriteBatch.SetBlendState(BlendState.Additive); - Texture2D fog = ModContent.Request("CalamityMod/Projectiles/Magic/RancorFog").Value; + Texture2D fog = ModContent.Request(Texture).Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; float opacity = Utils.GetLerpValue(0f, 0.08f, LightPower, true) * Projectile.Opacity * 0.3f; Main.EntitySpriteDraw(fog, drawPosition, null, OrangeFogColor * opacity, Projectile.rotation + OrangeFogRot, fog.Size() * 0.5f, Projectile.scale * OrangeFogScale, SpriteEffects.None); diff --git a/Projectiles/Ranged/ElementalFire.cs b/Projectiles/Ranged/ElementalFire.cs index 07f9bd0755..c4ea55c70b 100644 --- a/Projectiles/Ranged/ElementalFire.cs +++ b/Projectiles/Ranged/ElementalFire.cs @@ -19,16 +19,15 @@ namespace CalamityMod.Projectiles.Ranged public override void SetDefaults() { - Projectile.width = 12; - Projectile.height = 12; + Projectile.width = Projectile.height = 12; Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; - Projectile.penetrate = 2; + Projectile.penetrate = -1; Projectile.MaxUpdates = 4; Projectile.timeLeft = Lifetime; // 24 effectively - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 12; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 8; } public override void AI() @@ -63,18 +62,6 @@ namespace CalamityMod.Projectiles.Ranged // Circular hitbox adjusted for the size of the smoke particles (which is 52 here) public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 52 * Projectile.scale * 0.5f, targetHitbox); - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(ModContent.BuffType(), 540); - - // Circular spread of clouds on hit - for (int i = 0; i < 12; i++) - { - Vector2 smokeVel = Main.rand.NextVector2Circular(16f, 16f); - Color smokeColor = Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.8f); - Particle smoke = new MediumMistParticle(Projectile.Center, smokeVel, smokeColor, Color.Black, Main.rand.NextFloat(0.6f, 1.6f), 200 - Main.rand.Next(60), 0.1f); - GeneralParticleHandler.SpawnParticle(smoke); - } - } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 540); } } diff --git a/Projectiles/Ranged/ElementalFlare.cs b/Projectiles/Ranged/ElementalFlare.cs new file mode 100644 index 0000000000..fff934a8a0 --- /dev/null +++ b/Projectiles/Ranged/ElementalFlare.cs @@ -0,0 +1,149 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.IO; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Ranged +{ + public class ElementalFlare : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Ranged"; + public override string Texture => "CalamityMod/ExtraTextures/SmallGreyscaleCircle"; + + // Stats for both + public static int Lifetime = 90; // effective, 1.5 seconds + + // Homing Flare stats + public static float MinimumSpeed => 4f; + public static float MaximumSpeed => 24f; + public static float HomingRange => 720f; // 45 tiles + public static float HomingSpeedMult => 1.6f; + + // Sticky Flare stats + public static int StickDuration => 2; // already in seconds + public static int MaxStick => 6; + public static float StickyDamageFalloff => 0.5f; + + public bool StickToEnemies => Projectile.ai[2] == 1f; + public bool StickToTiles => Projectile.ai[2] == 2f; + public ref float StoredVelocity => ref Projectile.ai[0]; + public ref float Direction => ref Projectile.ai[1]; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Projectile.type] = 18; + ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + } + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 40; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.penetrate = 1; + Projectile.MaxUpdates = 2; + Projectile.timeLeft = Lifetime * Projectile.MaxUpdates; + Projectile.DamageType = DamageClass.Ranged; + } + + public override void AI() + { + if (StickToEnemies) + { + Projectile.ai[2] = 1f; + Projectile.StickyProjAI(StickDuration * Projectile.MaxUpdates); + return; + } + + float effectiveVelocity = MathHelper.Clamp(StoredVelocity, MinimumSpeed, MaximumSpeed); + int targetNPC = Projectile.FindTargetWithLineOfSight(HomingRange); + if (targetNPC != -1 && Projectile.timeLeft < (Lifetime - 20) * Projectile.MaxUpdates) + { + Vector2 destination = Main.npc[targetNPC].Center; + Projectile.velocity = Projectile.SafeDirectionTo(destination) * effectiveVelocity * HomingSpeedMult; + + // If close enough, don't do the sine movement + if (Projectile.Distance(destination) <= 160f) + return; + } + + // Sine-like movement + Projectile.position += (Vector2.UnitY * MathF.Sin(Projectile.timeLeft * MathHelper.Pi * 0.05f) * effectiveVelocity * Direction).RotatedBy(Projectile.velocity.ToRotation()); + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + target.AddBuff(ModContent.BuffType(), 540); + + // Lose a bit of damage from repeated hits + if (StickToEnemies && Projectile.damage > 1) + Projectile.damage = (int)(Projectile.damage * StickyDamageFalloff); + } + + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + if (StickToEnemies) + Projectile.ModifyHitNPCSticky(MaxStick); + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + if (StickToTiles || StickToEnemies) + { + Projectile.velocity = oldVelocity * 0.95f; + Projectile.position -= Projectile.velocity; + + // No more enemy sticking + reset duration + if (StickToEnemies) + { + Projectile.ai[2] = 2f; + Projectile.timeLeft = StickDuration * 60 * Projectile.MaxUpdates; + } + return false; + } + return true; + } + + public override void OnKill(int timeLeft) + { + // Circular spread of clouds + for (int i = 0; i < 8; i++) + { + Vector2 smokeVel = Main.rand.NextVector2Circular(16f, 16f); + Color smokeColor = Main.hslToRgb(Main.rand.NextFloat(), 1f, 0.8f); + Particle smoke = new MediumMistParticle(Projectile.Center, smokeVel, smokeColor, Color.Black, Main.rand.NextFloat(0.6f, 1.6f), 200 - Main.rand.Next(60), 0.1f); + GeneralParticleHandler.SpawnParticle(smoke); + } + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D lightTexture = ModContent.Request(Texture).Value; + for (int i = 0; i < Projectile.oldPos.Length; i++) + { + float hue = 0.5f + 0.5f * i / (float)Projectile.oldPos.Length * MathF.Sin(Main.GlobalTimeWrappedHourly * 5f); + Color color = Main.hslToRgb(hue, 1f, 0.6f); + Vector2 drawPosition = Projectile.oldPos[i] + lightTexture.Size() * 0.5f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY) + new Vector2(-15f, -15f); + Color outerColor = color; + Color innerColor = Color.Lerp(color, Color.White, 0.2f) * 0.5f; + float intensity = 0.9f + 0.15f * MathF.Cos(Main.GlobalTimeWrappedHourly % 60f * MathHelper.TwoPi); + + // Become smaller the futher along the old positions we are. + intensity *= MathHelper.Lerp(0.15f, 1f, 1f - i / (float)Projectile.oldPos.Length); + + Vector2 outerScale = new Vector2(1.25f) * intensity; + Vector2 innerScale = new Vector2(1.25f) * intensity * 0.7f; + outerColor *= intensity * Projectile.scale; + innerColor *= intensity * Projectile.scale; + Main.EntitySpriteDraw(lightTexture, drawPosition, null, outerColor, 0f, lightTexture.Size() * 0.5f, outerScale * 0.6f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(lightTexture, drawPosition, null, innerColor, 0f, lightTexture.Size() * 0.5f, innerScale * 0.6f, SpriteEffects.None, 0); + } + return false; + } + } +} diff --git a/Projectiles/Ranged/ExoLight.cs b/Projectiles/Ranged/ExoLight.cs index bf4d7586d4..c4cf073c69 100644 --- a/Projectiles/Ranged/ExoLight.cs +++ b/Projectiles/Ranged/ExoLight.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Ranged public class ExoLight : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public override string Texture => "CalamityMod/ExtraTextures/SmallGreyscaleCircle"; public Vector2 InitialCenter; public Vector2 Destination; @@ -135,7 +135,7 @@ namespace CalamityMod.Projectiles.Ranged } public override bool PreDraw(ref Color lightColor) { - Texture2D lightTexture = ModContent.Request("CalamityMod/ExtraTextures/SmallGreyscaleCircle").Value; + Texture2D lightTexture = ModContent.Request(Texture).Value; for (int i = 0; i < Projectile.oldPos.Length; i++) { float colorInterpolation = (float)Math.Cos(Projectile.timeLeft / 16f + Main.GlobalTimeWrappedHourly / 20f + i / (float)Projectile.oldPos.Length * MathHelper.Pi) * 0.5f + 0.5f; diff --git a/Projectiles/Ranged/PrismaticEnergyBlast.png b/Projectiles/Ranged/PrismaticEnergyBlast.png deleted file mode 100644 index 8e2d2a871cdedc2f8035aec442b4c527a2bf3160..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2903 zcmV-d3#jyoP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D3hYTlK~#8N?VRg# z6Ui0Dv1}RH^80Pfn}w}p$tGU|e95NB9~~;2$_7#uDx0d^u=&6e9)5r=Sue{ESuf}O z?(`LsY%^XKQnlGRra3b`Gq-Q|J-Xe~G7Oyi-=U|i0U;co2}eRWbo8Hp6r=(tI0YY5 zL1x>Pk`iFYpa91y$(7R*tRkQ-z+KAvD2hrH6oU_`pdQ7zLL7dcPN#>%xdmr16_k`3 z=n2+Q`^Xg1YDdbEfb6`{Xw<`bkD~niLn|s#Pz-*If_k2Hh4d?ESO|O`J}-2i52w?{ z5>ijFBpg#rz0o){uGftZh3<24kD^>be%^)mQdFX#7`%^y?3sS0ID3v65#WpfkB*LJ z;j93UkB?8n5|mvZ5@1JDfF+n3T&-3s@SXtg@9!Je1o%LJ`*W1@`{t%ZK{5Ct3OZ3a zT{*^B0vUtH#>U3ssi~>yZk`Cr8K0P#fJZVJQv6m(FlnNq4dJ3H`BP*S;E zE_L(n?rs&9z;@pX(V#}(j;S(sl~f)^JTOfkRw?6ceOty{Nl!eiNNlzTL- z!RLpEZ5Gq)*O!AD(JWT4N3)csEqHft&vMbzr%%6!|NY%}PvEVsoGB`o&uzl4C|95> z$=6Y5%}I%ZVi2pK{+y%bjYZy-Ge0-C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T?-qM#Ubb`&-G9VIb(?5Sulo9wIbJ$5GS<7!zt$ezlT zt5>cZ)(>l}LbLa~^~&wqaX^*``?Q=lLDe141T{O%+Dqz+rOgFO!6L_sm=D2PBX zg5lUA&Q3oH;xkGvBHQbYCc|j64^-IRF0iAh`a@okd9Hp~Z}JU;-ke8JhoVEZ+4blL zj`E1EMAKd$s8c}|+=rdOer`{N7w~hrtz4OQ@tOK!u~@*bCr_UI3qSw!{P{EdR_@uP zA6%zj5?YmKP!rFYaRGlpqM#Ub6eM(V5bU!V$BeX22Z?|Ll~%^r=e*h47M7QnmzV*_ zLHx!9dn-g&Yt-ic-rgaz8ZmZ}U=LO!Ol$Uyt5!O8iN72~l6vm3`$A-$2c;bB^35vk zXqnug-GYE0`Fw5@zaBq+{CE6({rdF=ev^CXN2O9J(=S&JDstaoN1~t@bSubV3SuOQ zmV)H_w9FLtEu;dpuh}fkHv_x7d)2kI^|cEZmY4L=KG5)|4r&JnY_%vTE!|t!=e#zW z&DwYMvJ=@4ZP;<7l73jdD-VQwjdNRDW$dy{rk!G`Sft%bxx9@ZUw!r0zu?!##`*?+ zD)+p`Z`M8Z12xevj_D`Bu3+{ZiGpHa(d>iOX}M$SVitpw-!MyXB2H3}!>+l4SO>w$ zZ@DJuL9Bv&*72OAbx!h|_6gqNT?%saD5*auxso(1CI8yz=ZLc?$kC%D&q=N%=WOyX z4u4+wAqsMws3d2;?}mNltsG^u6#GRmzxxO$|LXbw1n;9DN6)japm*dbTR-_a%Fl~KZ-_0w=#PVpVU53QJf zBnpbb$5c>1dfJLpPCvSo;`k_v=|`fVcjDZ+{{kvxraID#`U(I5002ovPDHLkV1ke6 Bu4(`P diff --git a/Projectiles/Ranged/TheMaelstromExplosion.cs b/Projectiles/Ranged/TheMaelstromExplosion.cs index 1c19bf8c20..a55b68bdd5 100644 --- a/Projectiles/Ranged/TheMaelstromExplosion.cs +++ b/Projectiles/Ranged/TheMaelstromExplosion.cs @@ -11,6 +11,8 @@ namespace CalamityMod.Projectiles.Ranged public class TheMaelstromExplosion : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; + public override string Texture => "CalamityMod/ExtraTextures/SmallGreyscaleCircle"; + public override void SetStaticDefaults() { ProjectileID.Sets.TrailingMode[Projectile.type] = 0; diff --git a/Projectiles/Ranged/TheMaelstromExplosion.png b/Projectiles/Ranged/TheMaelstromExplosion.png deleted file mode 100644 index c6b3592c9f186c85d600075344c5971cf65960c4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2903 zcmV-d3#jyoP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGizyJUazyWI3i3tDz3hYTlK~#8N?VRg# z6Ui0Dv1}RH^80Pfn}w}p$tGU|e95NB9~~;2$_7#uDx0d^u=&6e9)5r=Sue{ESuf}O z?(`LsY%^XKQnlGRra3b`Gq-Q|J-Xe~G7Oyi-=U|i0U;co2}eRWbo8Hp6r=(tI0YY5 zL1x>Pk`iFYpa91y$(7R*tRkQ-z+KAvD2hrH6oU_`pdQ7zLL7dcPN#>%xdmr16_k`3 z=n2+Q`^Xg1YDdbEfb6`{Xw<`bkD~niLn|s#Pz-*If_k2Hh4d?ESO|O`J}-2i52w?{ z5>ijFBpg#rz0o){uGftZh3<24kD^>be%^)mQdFX#7`%^y?3sS0ID3v65#WpfkB*LJ z;j93UkB?8n5|mvZ5@1JDfF+n3T&-3s@SXtg@9!Je1o%LJ`*W1@`{t%ZK{5Ct3OZ3a zT{*^B0vUtH#>U3ssi~>yZk`Cr8K0P#fJZVJQv6m(FlnNq4dJ3H`BP*S;E zE_L(n?rs&9z;@pX(V#}(j;S(sl~f)^JTOfkRw?6ceOty{Nl!eiNNlzTL- z!RLpEZ5Gq)*O!AD(JWT4N3)csEqHft&vMbzr%%6!|NY%}PvEVsoGB`o&uzl4C|95> z$=6Y5%}I%ZVi2pK{+y%bjYZy-Ge0-C0564{a^>>nEAZWW_wK5$y!Z2KRAeHwMwO2hKr@rHvH(}!-w#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5>cZ)(>l}LbLa~^~&wqaX^*``?Q=lLDe141T{O%+Dqz+rOgFO!6L_sm=D2PBX zg5lUA&Q3oH;xkGvBHQbYCc|j64^-IRF0iAh`a@okd9Hp~Z}JU;-ke8JhoVEZ+4blL zj`E1EMAKd$s8c}|+=rdOer`{N7w~hrtz4OQ@tOK!u~@*bCr_UI3qSw!{P{EdR_@uP zA6%zj5?YmKP!rFYaRGlpqM#Ub6eM(V5bU!V$BeX22Z?|Ll~%^r=e*h47M7QnmzV*_ zLHx!9dn-g&Yt-ic-rgaz8ZmZ}U=LO!Ol$Uyt5!O8iN72~l6vm3`$A-$2c;bB^35vk zXqnug-GYE0`Fw5@zaBq+{CE6({rdF=ev^CXN2O9J(=S&JDstaoN1~t@bSubV3SuOQ zmV)H_w9FLtEu;dpuh}fkHv_x7d)2kI^|cEZmY4L=KG5)|4r&JnY_%vTE!|t!=e#zW z&DwYMvJ=@4ZP;<7l73jdD-VQwjdNRDW$dy{rk!G`Sft%bxx9@ZUw!r0zu?!##`*?+ zD)+p`Z`M8Z12xevj_D`Bu3+{ZiGpHa(d>iOX}M$SVitpw-!MyXB2H3}!>+l4SO>w$ zZ@DJuL9Bv&*72OAbx!h|_6gqNT?%saD5*auxso(1CI8yz=ZLc?$kC%D&q=N%=WOyX z4u4+wAqsMws3d2;?}mNltsG^u6#GRmzxxO$|LXbw1n;9DN6)japm*dbTR-_a%Fl~KZ-_0w=#PVpVU53QJf zBnpbb$5c>1dfJLpPCvSo;`k_v=|`fVcjDZ+{{kvxraID#`U(I5002ovPDHLkV1jzR Bt@Ho@ From 4a564a11a9f52e7e6297c6684347b89b60769a33 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Tue, 17 Oct 2023 04:01:56 +0700 Subject: [PATCH 25/95] oops --- Projectiles/Ranged/ElementalFlare.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Projectiles/Ranged/ElementalFlare.cs b/Projectiles/Ranged/ElementalFlare.cs index fff934a8a0..3e32e4f807 100644 --- a/Projectiles/Ranged/ElementalFlare.cs +++ b/Projectiles/Ranged/ElementalFlare.cs @@ -53,6 +53,9 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { + if (StickToTiles) + return; + if (StickToEnemies) { Projectile.ai[2] = 1f; @@ -81,7 +84,7 @@ namespace CalamityMod.Projectiles.Ranged target.AddBuff(ModContent.BuffType(), 540); // Lose a bit of damage from repeated hits - if (StickToEnemies && Projectile.damage > 1) + if ((StickToEnemies || StickToTiles) && Projectile.damage > 1) Projectile.damage = (int)(Projectile.damage * StickyDamageFalloff); } From 9f3202a3623562e3a50a73557e6cc06d552a2af5 Mon Sep 17 00:00:00 2001 From: Xyk Date: Mon, 16 Oct 2023 15:16:42 -0700 Subject: [PATCH 26/95] Bloodboiler start Started blood boiler --- Items/Weapons/Ranged/BloodBoiler.cs | 11 +- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 3 +- Projectiles/Ranged/BloodBoilerFire.cs | 165 ++++++++++-------- Projectiles/Ranged/BloodFlames.png | Bin 0 -> 97084 bytes 4 files changed, 103 insertions(+), 76 deletions(-) create mode 100644 Projectiles/Ranged/BloodFlames.png diff --git a/Items/Weapons/Ranged/BloodBoiler.cs b/Items/Weapons/Ranged/BloodBoiler.cs index 9348f54939..bab168515b 100644 --- a/Items/Weapons/Ranged/BloodBoiler.cs +++ b/Items/Weapons/Ranged/BloodBoiler.cs @@ -12,6 +12,8 @@ namespace CalamityMod.Items.Weapons.Ranged public class BloodBoiler : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Ranged"; + + public bool shotReturn = false; public override void SetDefaults() { Item.damage = 145; @@ -26,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.knockBack = 4f; Item.value = CalamityGlobalItem.Rarity12BuyPrice; Item.rare = ModContent.RarityType(); - Item.shootSpeed = 12f; + Item.shootSpeed = 9.5f; Item.shoot = ModContent.ProjectileType(); } @@ -34,15 +36,18 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { + shotReturn = !shotReturn; if (Main.rand.NextFloat() > 0.75f) - --player.statLife; + player.statLife -= (Main.rand.NextBool(3) ? 2 : 1); if (player.statLife <= 0) { PlayerDeathReason pdr = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.BloodBoiler" + Main.rand.Next(1, 2 + 1)).Format(player.name)); player.KillMe(pdr, 1000.0, 0, false); return false; } - return true; + Vector2 newVel = velocity.RotatedBy(shotReturn ? 0.03f : -0.03f); + Projectile.NewProjectile(source, position, newVel, type, damage, knockback, player.whoAmI, 0, 0, shotReturn ? 5 : 0); + return false; } public override void AddRecipes() diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 1510c87e91..733c0bd1c4 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -162,9 +162,8 @@ BloodBoiler: { DisplayName: Blood Boiler Tooltip: ''' - Fires a stream of lifestealing bloodfire + Fires a stream of lifestealing bloodfire that returns to you Uses your health as ammo - 25% chance to save ammo ''' } diff --git a/Projectiles/Ranged/BloodBoilerFire.cs b/Projectiles/Ranged/BloodBoilerFire.cs index 3616ee50d4..bc8aaab05a 100644 --- a/Projectiles/Ranged/BloodBoilerFire.cs +++ b/Projectiles/Ranged/BloodBoilerFire.cs @@ -5,103 +5,121 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; +using Microsoft.Xna.Framework.Graphics; +using CalamityMod.Particles; namespace CalamityMod.Projectiles.Ranged { public class BloodBoilerFire : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public override string Texture => "CalamityMod/Projectiles/Ranged/BloodFlames"; private bool playedSound = false; - + public int Time = 0; + public Vector2 bloodCloudReturn; public override void SetDefaults() { - Projectile.width = 6; - Projectile.height = 6; - Projectile.scale = 2f; + Projectile.width = 43; + Projectile.height = 43; Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; + Projectile.tileCollide = false; Projectile.penetrate = -1; - Projectile.extraUpdates = 1; + Projectile.extraUpdates = 2; Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 5; Projectile.timeLeft = 300; + Projectile.alpha = 255; + } + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; + ProjectileID.Sets.TrailingMode[Projectile.type] = 3; } - public override void AI() { + if (Projectile.ai[1] == 0f) + Time++; + else + Time -= 3; + Projectile.rotation += 3 * Projectile.direction; + if (Projectile.timeLeft == 295) + { + Projectile.scale = 0.04f; + if (Main.rand.NextBool()) + { + int bloodLifetime = Main.rand.Next(22, 36); + float bloodScale = Main.rand.NextFloat(0.6f, 0.8f); + Color bloodColor = Main.rand.NextBool() ? Color.Firebrick : Color.Red; + + float randomSpeedMultiplier = Main.rand.NextFloat(0.8f, 1.55f); + Vector2 bloodVelocity = Projectile.velocity.RotatedByRandom(0.5) * randomSpeedMultiplier; + BloodParticle blood = new BloodParticle(Projectile.Center, bloodVelocity, bloodLifetime, bloodScale, bloodColor); + GeneralParticleHandler.SpawnParticle(blood); + } + } + if (Projectile.timeLeft == 296) + { + Projectile.alpha = 80; + } + if (Projectile.timeLeft < 296 && Main.rand.NextBool(5)) + { + Color smokeColor = Main.rand.NextBool() ? Color.Red : Color.Firebrick; + Vector2 smokePosition = Projectile.Center + Main.rand.NextVector2Circular(5 + Time * 0.3f, 5 + Time * 0.3f); + float smokeScale = Projectile.ai[1] == 1 ? Main.rand.NextFloat(0.1f, 0.35f) + Time * 0.01f : Main.rand.NextFloat(0.5f, 1.6f); + float smokeOpacity = Projectile.ai[1] == 1 ? 120 + Time * 0.9f : 170 + -Time * 0.7f; + Particle smoke = new MediumMistParticle(smokePosition, Projectile.ai[1] == 1 ? Projectile.velocity * 0.5f : Vector2.Zero, smokeColor, Color.Black, smokeScale, smokeOpacity, Main.rand.NextFloat(0.2f, -0.2f)); + GeneralParticleHandler.SpawnParticle(smoke); + } + if (Projectile.ai[1] == 0f) + { + if (Main.rand.NextBool(7)) + { + DirectionalPulseRing pulse = new DirectionalPulseRing(Projectile.Center + Main.rand.NextVector2Circular(7 + Time * 0.4f, 7 + Time * 0.4f), Vector2.Zero, Main.rand.NextBool(3) ? Color.Red : Color.Firebrick, new Vector2(1, 1), 0, Main.rand.NextFloat(0.02f, 0.07f) + Time * 0.0006f, 0f, 35); + GeneralParticleHandler.SpawnParticle(pulse); + } + Projectile.scale += 0.006f; + } + else if (Projectile.scale > 0.01) + Projectile.scale -= 0.01f; if (!playedSound) { SoundEngine.PlaySound(SoundID.Item34, Projectile.position); playedSound = true; } - if (Projectile.scale <= 3f) - Projectile.scale *= 1.01f; - Lighting.AddLight(Projectile.Center, 1f, 0f, 0f); - - if (Projectile.ai[0] > 7f) + if (Projectile.timeLeft == 235) + bloodCloudReturn = Projectile.velocity; + if (Projectile.timeLeft <= 235 && Projectile.ai[1] == 0f) + Projectile.velocity *= 0.98f; + if (Projectile.timeLeft == 220) { - float num296 = 1f; - if (Projectile.ai[0] == 8f) + Projectile.velocity = -bloodCloudReturn.RotatedBy(Projectile.ai[2] == 5 ? -0.7f : 0.7f) * 1.2f; + for (int i = 0; i <= 5; i++) { - num296 = 0.25f; - } - else if (Projectile.ai[0] == 9f) - { - num296 = 0.5f; - } - else if (Projectile.ai[0] == 10f) - { - num296 = 0.75f; - } - Projectile.ai[0] += 1f; - int num297 = 5; - if (Main.rand.NextBool()) - { - for (int num298 = 0; num298 < 1; num298++) - { - int num299 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, num297, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100, default, 1f); - Dust dust = Main.dust[num299]; - if (Main.rand.NextBool(3)) - { - dust.noGravity = true; - dust.scale *= 3f; - dust.velocity.X *= 2f; - dust.velocity.Y *= 2f; - } - else - { - dust.scale *= 1.5f; - } - dust.velocity.X *= 1.2f; - dust.velocity.Y *= 1.2f; - dust.scale *= num296; - dust.velocity += Projectile.velocity; - if (!dust.noGravity) - { - dust.velocity *= 0.5f; - } - } + Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(40, 40), Main.rand.NextBool(3) ? 60 : 90, Projectile.velocity.RotatedByRandom(MathHelper.ToRadians(2f)) * Main.rand.NextFloat(0.3f, 2.2f)); + dust.noGravity = true; + dust.scale = Main.rand.NextFloat(1.2f, 2f); + Dust dust2 = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(40, 40), Main.rand.NextBool(3) ? 60 : 90, Projectile.velocity.RotatedByRandom(MathHelper.ToRadians(35f)) * Main.rand.NextFloat(0.1f, 1.2f)); + dust2.noGravity = true; + dust2.scale = Main.rand.NextFloat(1.2f, 2f); } } - else + if (Projectile.timeLeft == 209) { - Projectile.ai[0] += 1f; - } - Projectile.rotation += 0.3f * (float)Projectile.direction; - - if (Projectile.timeLeft == 160) Projectile.ai[1] = 1f; + } if (Projectile.ai[1] == 1f) { - Projectile.tileCollide = false; - - Projectile.extraUpdates = 2; + Projectile.extraUpdates = 3; + Projectile.alpha = 160; + Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(20, 20), Main.rand.NextBool(3) ? 60 : 5); + dust.scale = Main.rand.NextFloat(0.4f, 0.7f); + dust.noGravity = true; Player player = Main.player[Projectile.owner]; @@ -120,27 +138,27 @@ namespace CalamityMod.Projectiles.Ranged // Home back in on the player. if (Projectile.velocity.X < xDist) { - Projectile.velocity.X = Projectile.velocity.X + 5f; + Projectile.velocity.X = Projectile.velocity.X + 0.1f; if (Projectile.velocity.X < 0f && xDist > 0f) - Projectile.velocity.X += 5f; + Projectile.velocity.X += 0.1f; } else if (Projectile.velocity.X > xDist) { - Projectile.velocity.X = Projectile.velocity.X - 5f; + Projectile.velocity.X = Projectile.velocity.X - 0.1f; if (Projectile.velocity.X > 0f && xDist < 0f) - Projectile.velocity.X -= 5f; + Projectile.velocity.X -= 0.1f; } if (Projectile.velocity.Y < yDist) { - Projectile.velocity.Y = Projectile.velocity.Y + 5f; + Projectile.velocity.Y = Projectile.velocity.Y + 0.1f; if (Projectile.velocity.Y < 0f && yDist > 0f) - Projectile.velocity.Y += 5f; + Projectile.velocity.Y += 0.1f; } else if (Projectile.velocity.Y > yDist) { - Projectile.velocity.Y = Projectile.velocity.Y - 5f; + Projectile.velocity.Y = Projectile.velocity.Y - 0.1f; if (Projectile.velocity.Y > 0f && yDist < 0f) - Projectile.velocity.Y -= 5f; + Projectile.velocity.Y -= 0.1f; } // Delete the projectile if it touches its owner. Has a chance to heal the player again @@ -148,7 +166,7 @@ namespace CalamityMod.Projectiles.Ranged { if (Projectile.Hitbox.Intersects(player.Hitbox)) { - if (Main.rand.NextBool(3) && !Main.player[Projectile.owner].moonLeech) + if (Main.rand.NextBool(4) && !Main.player[Projectile.owner].moonLeech) { player.statLife += 1; player.HealEffect(1); @@ -167,12 +185,17 @@ namespace CalamityMod.Projectiles.Ranged return; Player player = Main.player[Projectile.owner]; - if (Main.rand.NextBool()) + if (Main.rand.NextBool(3)) { int healAmt = Main.rand.Next(1, 4); player.statLife += healAmt; player.HealEffect(healAmt); } } + public override bool PreDraw(ref Color lightColor) + { + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/BloodFlames").Value); + return false; + } } } diff --git a/Projectiles/Ranged/BloodFlames.png b/Projectiles/Ranged/BloodFlames.png new file mode 100644 index 0000000000000000000000000000000000000000..c9fe641d1567073bad49da9f70db8f07588a1a1a GIT binary patch literal 97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adhTzTM&^}j&~~W8{e|3slY>VsXi#y?I#JL z9v7s#r^~VHS#G!FQ~4L11{o5#v1wCWJ!wn-m{+`hw+XyT%lTWGezIva57-CKL*IaP zTr+3WJ9xgm2-no;`oCAP11P_SRczfsxeYfOZioKGA`az`2roK<7I@xT#v4u-#?3r0 zNfvRX{l3sXN;&p3Hv^#(p1sw%4UDAPRy;{8lKKprd@n^dULMyd1ZTs0=rEa zmL7>)OPB0)U^dUZ|FzhZlg|7})8dcMNzDp?`PkrQ!~e-ulTRx0{F;WbF2N~klMz6^ N9_boAsMU6i{eKHeZAt(D literal 0 HcmV?d00001 From 244007751c3dce530c68114f263ba0254ad1ecad Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Tue, 17 Oct 2023 07:05:02 +0700 Subject: [PATCH 27/95] more minor adjustments cleansing blaze wallclips now --- Items/Weapons/Ranged/CleansingBlaze.cs | 4 +- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 28 +++++-- Projectiles/Ranged/EssenceFire.cs | 82 +++++++------------ Projectiles/Ranged/ExoFire.cs | 10 +-- 4 files changed, 54 insertions(+), 70 deletions(-) diff --git a/Items/Weapons/Ranged/CleansingBlaze.cs b/Items/Weapons/Ranged/CleansingBlaze.cs index 3d71765813..f75f7662fe 100644 --- a/Items/Weapons/Ranged/CleansingBlaze.cs +++ b/Items/Weapons/Ranged/CleansingBlaze.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.width = 64; Item.height = 32; Item.useTime = 3; - Item.useAnimation = 12; + Item.useAnimation = 24; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 4f; @@ -49,8 +49,6 @@ namespace CalamityMod.Items.Weapons.Ranged public override Vector2? HoldoutOffset() => new Vector2(-5, 0); - public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.NextBool(2); - public override void AddRecipes() { CreateRecipe(). diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 63556698e7..9f6726117e 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -228,8 +228,8 @@ CleansingBlaze: { DisplayName: Cleansing Blaze Tooltip: ''' + Unleashes a torrent of flames which can pass through tiles Uses gel for ammo - 50% chance to save ammo ''' } @@ -441,8 +441,8 @@ ElementalEruption: { DisplayName: Elemental Eruption Tooltip: ''' - Fires rainbow flames and pairs of high-energy homing flares - to instead fire a cluster of sticky flares + Spews rainbow flames and pairs of high-energy homing flares + Press to fire a dense cluster of sticky flares Uses gel for ammo ''' } @@ -579,7 +579,11 @@ HandheldTank: { HavocsBreath: { DisplayName: Havoc's Breath - Tooltip: Uses gel for ammo + Tooltip: + ''' + Fires scorching brimstone fire + Uses gel for ammo + ''' } HeavenlyGale: { @@ -925,8 +929,8 @@ PristineFury: { DisplayName: Pristine Fury Tooltip: ''' - Fires an intense helix of flames that explode into a column of fire - Press to fire a short ranged cloud of lingering flames + Fires an intense helix of flames that explode into a column of smoke + Press to disperse short-ranged mists of pure heat Uses gel for ammo ''' } @@ -1033,7 +1037,11 @@ SepticSkewer: { Shadethrower: { DisplayName: Shadethrower - Tooltip: Uses gel for ammo + Tooltip: + ''' + Spews short-ranged clouds of pure darkness + Uses gel for ammo + ''' } Shellshooter: { @@ -1080,7 +1088,11 @@ SomaPrime: { SparkSpreader: { DisplayName: Spark Spreader - Tooltip: Uses gel for ammo + Tooltip: + ''' + Ignites your foe with flaming sparks + Uses gel for ammo + ''' } SpectralstormCannon: { diff --git a/Projectiles/Ranged/EssenceFire.cs b/Projectiles/Ranged/EssenceFire.cs index 9336f4e99b..9013793d7f 100644 --- a/Projectiles/Ranged/EssenceFire.cs +++ b/Projectiles/Ranged/EssenceFire.cs @@ -17,14 +17,12 @@ namespace CalamityMod.Projectiles.Ranged public static int Fadetime => 80; public ref float Time => ref Projectile.ai[0]; - public bool spawnParticles = true; - public bool spawnDusts = true; - public override void SetDefaults() { Projectile.width = Projectile.height = 10; Projectile.friendly = true; Projectile.ignoreWater = true; + Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = -1; Projectile.MaxUpdates = 4; @@ -39,63 +37,42 @@ namespace CalamityMod.Projectiles.Ranged if (Time > Fadetime) Projectile.velocity *= 0.95f; - if ( Time > 6 && Time < Fadetime && Main.rand.NextBool(16)) + if (Time > 6f && Time < Fadetime) { - Dust dust = Dust.NewDustDirect(Projectile.Center + Main.rand.NextVector2Circular(60f, 60f) * Utils.Remap(Time, 0f, Lifetime, 0.5f, 1f), 4, 4, 295, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100); - if (Main.rand.NextBool(5)) + if (Main.rand.NextBool(16)) { - dust.noGravity = true; - dust.scale *= 2f; - dust.velocity *= 0.8f; + Dust dust = Dust.NewDustDirect(Projectile.Center + Main.rand.NextVector2Circular(60f, 60f) * Utils.Remap(Time, 0f, Fadetime, 0.5f, 1f), 4, 4, 295, Projectile.velocity.X * 0.2f, Projectile.velocity.Y * 0.2f, 100); + if (Main.rand.NextBool(5)) + { + dust.noGravity = true; + dust.scale *= 2f; + dust.velocity *= 0.8f; + } + dust.velocity *= 1.1f; + dust.velocity += Projectile.velocity * Utils.Remap(Time, 0f, Fadetime * 0.75f, 1f, 0.1f) * Utils.Remap(Time, 0f, Fadetime * 0.1f, 0.1f, 1f); + } + + if (Main.rand.NextBool(20)) + { + FlameParticle fire = new FlameParticle(Projectile.Center, 20, MathHelper.Clamp(Time * 0.05f, 0.5f, 2f), 0.05f, Color.BlueViolet * 0.5f, Color.DarkBlue * 0.5f); + fire.Velocity = Projectile.velocity.RotatedByRandom(MathHelper.ToRadians(15f)) * 0.6f; + GeneralParticleHandler.SpawnParticle(fire); + } + + if (Main.rand.NextBool(10)) + { + SparkParticle spark = new SparkParticle(Projectile.Center, Projectile.velocity * Main.rand.NextFloat(0.4f, 0.7f), false, Main.rand.Next(7, 11), Main.rand.NextFloat(0.7f, 1.8f), Main.rand.NextBool(4) ? Color.Magenta : Color.DodgerBlue); + GeneralParticleHandler.SpawnParticle(spark); } - dust.velocity *= 1.1f; - dust.velocity += Projectile.velocity * Utils.Remap(Time, 0f, Fadetime * 0.75f, 1f, 0.1f) * Utils.Remap(Time, 0f, Fadetime * 0.1f, 0.1f, 1f); } - if (Main.rand.NextBool(30) && Projectile.timeLeft > 20) + else if (Time == 5f) { - FlameParticle fire = new FlameParticle(Projectile.Center, 30, MathHelper.Clamp((Lifetime - Projectile.timeLeft) / 20, 0.5f, 2f), 0.05f, Color.BlueViolet * 0.5f, Color.DarkBlue * 0.5f); - fire.Velocity = Projectile.velocity.RotatedByRandom(MathHelper.ToRadians(30f)) * 0.6f; - GeneralParticleHandler.SpawnParticle(fire); - } - if (spawnParticles && Time > 6 && Main.rand.NextBool(7)) - { - SparkParticle spark = new SparkParticle(Projectile.Center, Projectile.velocity * Main.rand.NextFloat(0.4f, 0.7f), false, Main.rand.Next(7, 11), Main.rand.NextFloat(0.7f, 1.8f), Main.rand.NextBool(4) ? Color.Magenta : Color.DodgerBlue); - GeneralParticleHandler.SpawnParticle(spark); - } - if (Time == 5) - { - Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 295 : 181, Projectile.velocity); - dust.scale = Main.rand.NextFloat(0.9f, 1.7f); - dust.velocity = Projectile.velocity.RotatedByRandom(1) * Main.rand.NextFloat(0.3f, 0.7f); + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 295 : 181, Projectile.velocity.RotatedByRandom(MathHelper.ToRadians(30f)) * 0.6f); + dust.scale = Main.rand.NextFloat(0.8f, 1.8f); dust.noGravity = true; } } - // Keeping the flames in place when hitting a block - public override bool OnTileCollide(Vector2 oldVelocity) - { - if (spawnDusts) - { - for (int i = 0; i <= 8; i++) - { - Vector2 position = Projectile.Center + new Vector2(Main.rand.NextFloat(-13, 13), Main.rand.NextFloat(-13, 13)); - Vector2 velocity = -oldVelocity.RotatedByRandom(1) * Main.rand.NextFloat(0.2f, 2.2f); - float scale = Main.rand.NextFloat(2f, 3.2f); - - Dust dust = Dust.NewDustPerfect(position + velocity, Main.rand.NextBool(3) ? 307 : 295, velocity, 0, default, scale); - dust.noGravity = true; - dust.scale -= 0.4f; - } - spawnDusts = false; - } - Projectile.velocity = oldVelocity * 0.95f; - Projectile.position -= Projectile.velocity; - Time += 2; - Projectile.timeLeft -= 2; - spawnParticles = false; - return false; - } - // Expanding hitbox public override void ModifyDamageHitbox(ref Rectangle hitbox) { @@ -107,9 +84,6 @@ namespace CalamityMod.Projectiles.Ranged hitbox.Inflate(size, size); } - // Anti-wall hacking checks - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => projHitbox.Intersects(targetHitbox) && Collision.CanHit(Projectile.Center, 0, 0, targetHitbox.Center.ToVector2(), 0, 0) ? null : false; - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 360); public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Ranged/ExoFire.cs b/Projectiles/Ranged/ExoFire.cs index e37b160c18..5933dc2459 100644 --- a/Projectiles/Ranged/ExoFire.cs +++ b/Projectiles/Ranged/ExoFire.cs @@ -35,14 +35,14 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { - // Add some degree of variation to the fog with scale/rotation/color + // Slightly random fog scale/rotation if (FogRot == 0f) { - Projectile.scale = Main.rand.NextFloat(0.4f, 0.8f); - FogRot = Main.rand.NextFloat(MathHelper.TwoPi); + Projectile.scale = Main.rand.NextFloat(0.75f, 0.8f); + FogRot = Main.rand.NextFloat(MathHelper.ToRadians(60f)); } ColorType += Main.rand.NextFloat(0.02f, 0.06f); - ScaleFactor += 0.02f; + ScaleFactor += 0.015f; ScaleFactor = MathHelper.Clamp(ScaleFactor, 0f, Projectile.scale); Lighting.AddLight(Projectile.Center, CloudColor(ColorType % 3f).ToVector3() * ScaleFactor); Projectile.rotation = Projectile.velocity.ToRotation() + FogRot; @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Ranged Texture2D texture = ModContent.Request(Texture).Value; Vector2 drawPosition = Projectile.Center - Main.screenPosition; - float opacity = Utils.GetLerpValue(0f, 0.08f, LightPower, true) * Projectile.Opacity; + float opacity = Utils.GetLerpValue(0f, 0.08f, LightPower, true) * Projectile.Opacity * 0.6f; Color drawColor = CloudColor(ColorType % 3f) * opacity; Main.EntitySpriteDraw(texture, drawPosition, null, drawColor, Projectile.rotation, texture.Size() * 0.5f, ScaleFactor, SpriteEffects.None); From cddca9347f24038bdc024284d9cdfb3c5a9a975d Mon Sep 17 00:00:00 2001 From: Xyk Date: Mon, 16 Oct 2023 22:53:49 -0700 Subject: [PATCH 28/95] Blood Boiler Rework and minor improved visuals for others Blood Boiler: Fires a dual stream of bloodfire that returns to you and has a chance to heal for either one HP or 2/3 HP if you hit an enemy before it returns Uses your health as ammo (one HP 40% of the time when it fires) bloodfire does 12% less damage with each pierce --- Items/Weapons/Ranged/BloodBoiler.cs | 14 +- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 2 +- .../Metaballs/BloodBoilerParticleSets.cs | 58 +++++++ Projectiles/Ranged/BlightFlames.cs | 8 +- Projectiles/Ranged/BloodBoilerFire.cs | 145 +++++++++--------- Projectiles/Ranged/BloodFlames.png | Bin 97084 -> 0 bytes Projectiles/Ranged/HalleysComet.cs | 12 +- Sounds/Item/Heartbeat.ogg | Bin 0 -> 5819 bytes 8 files changed, 149 insertions(+), 90 deletions(-) create mode 100644 Particles/Metaballs/BloodBoilerParticleSets.cs delete mode 100644 Projectiles/Ranged/BloodFlames.png create mode 100644 Sounds/Item/Heartbeat.ogg diff --git a/Items/Weapons/Ranged/BloodBoiler.cs b/Items/Weapons/Ranged/BloodBoiler.cs index bab168515b..3a45180348 100644 --- a/Items/Weapons/Ranged/BloodBoiler.cs +++ b/Items/Weapons/Ranged/BloodBoiler.cs @@ -3,6 +3,7 @@ using CalamityMod.Projectiles.Ranged; using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -12,17 +13,20 @@ namespace CalamityMod.Items.Weapons.Ranged public class BloodBoiler : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Ranged"; - + + public static readonly SoundStyle Heartbeat = new("CalamityMod/Sounds/Item/Heartbeat") { PitchVariance = 0.2f, Volume = 0.55f }; + public bool shotReturn = false; public override void SetDefaults() { - Item.damage = 145; + Item.damage = 185; Item.DamageType = DamageClass.Ranged; Item.width = 60; Item.height = 30; Item.useTime = 5; - Item.useAnimation = 15; + Item.useAnimation = 20; Item.autoReuse = true; + Item.UseSound = Heartbeat; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 4f; @@ -37,8 +41,8 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { shotReturn = !shotReturn; - if (Main.rand.NextFloat() > 0.75f) - player.statLife -= (Main.rand.NextBool(3) ? 2 : 1); + if (Main.rand.NextFloat() > 0.60f) + player.statLife -= 1; if (player.statLife <= 0) { PlayerDeathReason pdr = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.BloodBoiler" + Main.rand.Next(1, 2 + 1)).Format(player.name)); diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 733c0bd1c4..bbbb347cdc 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -162,7 +162,7 @@ BloodBoiler: { DisplayName: Blood Boiler Tooltip: ''' - Fires a stream of lifestealing bloodfire that returns to you + Fires a dual stream of lifestealing bloodfire that returns to you Uses your health as ammo ''' } diff --git a/Particles/Metaballs/BloodBoilerParticleSets.cs b/Particles/Metaballs/BloodBoilerParticleSets.cs new file mode 100644 index 0000000000..6bc8bef4d5 --- /dev/null +++ b/Particles/Metaballs/BloodBoilerParticleSets.cs @@ -0,0 +1,58 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria; +using Terraria.Graphics.Shaders; +using Terraria.ModLoader; + +namespace CalamityMod.Particles.Metaballs +{ + public class Blood : BloodBoilerParticleSets + { + public override Color BorderColor => Color.DarkRed * 0.8f; + } + + public abstract class BloodBoilerParticleSets : BaseFusableParticleSet + { + public override float BorderSize => 12f; + public override bool BorderShouldBeSolid => false; + + private float opacity; + public override List BackgroundShaders => new() + { + GameShaders.Misc["CalamityMod:AdditiveFusableParticleEdge"].Shader, + }; + public override List BackgroundTextures => new() + { + ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value, + }; + public override FusableParticle SpawnParticle(Vector2 center, float sizeStrength) + { + Particles.Add(new FusableParticle(center, sizeStrength)); + return Particles.Last(); + } + + public override void UpdateBehavior(FusableParticle particle) + { + opacity = 0.65f; + particle.Size = MathHelper.Clamp(particle.Size - 0.1f, 0f, 200f) * 0.91f; + if (particle.Size < 20f) + particle.Size = particle.Size * 0.8f - 1f; + } + + public override void DrawParticles() + { + Texture2D fusableParticleBase = ModContent.Request("CalamityMod/Particles/Metaballs/FusableParticleBase").Value; + foreach (FusableParticle particle in Particles) + { + Vector2 drawPosition = particle.Center - Main.screenPosition; + Vector2 origin = fusableParticleBase.Size() * 0.5f; + Vector2 scale = Vector2.One * particle.Size / fusableParticleBase.Size(); + Color drawColor = Color.Lerp(BorderColor, new Color(0f, 0f, 1f), Utils.GetLerpValue(50f, 100f, particle.Size, true) * 0.1f) * 1.2f; + Main.spriteBatch.Draw(fusableParticleBase, drawPosition, null, drawColor * opacity, 0f, origin, scale, SpriteEffects.None, 0f); + } + } + } +} diff --git a/Projectiles/Ranged/BlightFlames.cs b/Projectiles/Ranged/BlightFlames.cs index d68579a4f0..0afebe9849 100644 --- a/Projectiles/Ranged/BlightFlames.cs +++ b/Projectiles/Ranged/BlightFlames.cs @@ -41,14 +41,14 @@ namespace CalamityMod.Projectiles.Ranged { Time++; Projectile.rotation += Main.rand.NextFloat(0.2f, 0.9f); - if (Time > 6 && Time < 540 && Main.rand.NextBool(4 + Time / 6)) + if (Time > 6 && Time < 540 && Main.rand.NextBool(2 + Time / 7)) { DirectionalPulseRing pulse = new DirectionalPulseRing(Projectile.Center + Main.rand.NextVector2Circular(10 + Time * 0.5f, 10 + Time * 0.5f), Vector2.Zero, Main.rand.NextBool(3) ? Color.LimeGreen : Color.Green, new Vector2(1, 1), 0, Main.rand.NextFloat(0.03f, 0.09f) + Time * 0.00055f, 0f, 25); GeneralParticleHandler.SpawnParticle(pulse); } - if (Time > 6 && Time < 135 && !postTileHit && !postEnemyHit && Main.rand.NextBool(3 + Time / 5)) + if (Time > 6 && Time < 150 && !postTileHit && !postEnemyHit && Main.rand.NextBool(3 + Time / 7)) { - SmallSmokeParticle smoke = new SmallSmokeParticle(Projectile.Center + Main.rand.NextVector2Circular(5 + Time * 0.2f, 5 + Time * 0.2f), -Projectile.velocity * 0.05f, Color.Chartreuse, Main.rand.NextBool(3) ? Color.LimeGreen : Color.Lime, Main.rand.NextFloat(0.5f, 1.8f) + Time * 0.00555f, 60); + MediumMistParticle smoke = new MediumMistParticle(Projectile.Center + Main.rand.NextVector2Circular(5 + Time * 0.2f, 5 + Time * 0.2f), -Projectile.velocity * 0.05f, Main.rand.NextBool(3) ? Color.LimeGreen : Color.Lime, Color.Black, Main.rand.NextFloat(0.3f, 0.8f) + Time * 0.013f, 160); GeneralParticleHandler.SpawnParticle(smoke); } if (Time == 8) @@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i <= 3; i++) { - SmallSmokeParticle smoke = new SmallSmokeParticle(Projectile.Center + Main.rand.NextVector2Circular(5 + Time * 0.2f, 5 + Time * 0.2f), new Vector2(Main.rand.NextFloat(2, 6), Main.rand.NextFloat(2, 6)).RotatedByRandom(60), Color.Chartreuse, Main.rand.NextBool(3) ? Color.LimeGreen : Color.Lime, Main.rand.NextFloat(1.2f, 2.8f), 60); + MediumMistParticle smoke = new MediumMistParticle(Projectile.Center + Main.rand.NextVector2Circular(5 + Time * 0.2f, 5 + Time * 0.2f), new Vector2(Main.rand.NextFloat(2, 6), Main.rand.NextFloat(2, 6)).RotatedByRandom(60), Main.rand.NextBool(3) ? Color.LimeGreen : Color.Lime, Color.Black, Main.rand.NextFloat(1.2f, 2.3f), 140); GeneralParticleHandler.SpawnParticle(smoke); } if (!postTileHit && !postEnemyHit) diff --git a/Projectiles/Ranged/BloodBoilerFire.cs b/Projectiles/Ranged/BloodBoilerFire.cs index bc8aaab05a..0a8f4fea0f 100644 --- a/Projectiles/Ranged/BloodBoilerFire.cs +++ b/Projectiles/Ranged/BloodBoilerFire.cs @@ -7,17 +7,20 @@ using Terraria.ModLoader; using Terraria.Audio; using Microsoft.Xna.Framework.Graphics; using CalamityMod.Particles; +using CalamityMod.Particles.Metaballs; namespace CalamityMod.Projectiles.Ranged { public class BloodBoilerFire : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; - public override string Texture => "CalamityMod/Projectiles/Ranged/BloodFlames"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; private bool playedSound = false; public int Time = 0; + public float particleSize = 15; public Vector2 bloodCloudReturn; + public bool improvedHeal = false; public override void SetDefaults() { Projectile.width = 43; @@ -27,63 +30,54 @@ namespace CalamityMod.Projectiles.Ranged Projectile.DamageType = DamageClass.Ranged; Projectile.tileCollide = false; Projectile.penetrate = -1; - Projectile.extraUpdates = 2; + Projectile.extraUpdates = 4; Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 5; Projectile.timeLeft = 300; - Projectile.alpha = 255; - } - public override void SetStaticDefaults() - { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 3; } public override void AI() { - if (Projectile.ai[1] == 0f) - Time++; + if (Projectile.timeLeft > 220) // Main visual size changes + particleSize += 0.5f; else - Time -= 3; - Projectile.rotation += 3 * Projectile.direction; - if (Projectile.timeLeft == 295) - { - Projectile.scale = 0.04f; - if (Main.rand.NextBool()) - { - int bloodLifetime = Main.rand.Next(22, 36); - float bloodScale = Main.rand.NextFloat(0.6f, 0.8f); - Color bloodColor = Main.rand.NextBool() ? Color.Firebrick : Color.Red; + particleSize -= 1f; - float randomSpeedMultiplier = Main.rand.NextFloat(0.8f, 1.55f); - Vector2 bloodVelocity = Projectile.velocity.RotatedByRandom(0.5) * randomSpeedMultiplier; - BloodParticle blood = new BloodParticle(Projectile.Center, bloodVelocity, bloodLifetime, bloodScale, bloodColor); - GeneralParticleHandler.SpawnParticle(blood); + Time++; + + if (Projectile.timeLeft == 295) // Blood produced from the muzzle when firing the weapon + { + int bloodLifetime = Main.rand.Next(22, 36); + float bloodScale = Main.rand.NextFloat(0.6f, 0.8f); + Color bloodColor = Main.rand.NextBool() ? Color.Firebrick : Color.Red; + + float randomSpeedMultiplier = Main.rand.NextFloat(0.8f, 1.55f); + Vector2 bloodVelocity = Projectile.velocity.RotatedByRandom(0.5) * randomSpeedMultiplier + new Vector2 (0, -3); + BloodParticle blood = new BloodParticle(Projectile.Center, bloodVelocity, bloodLifetime, bloodScale, bloodColor); + GeneralParticleHandler.SpawnParticle(blood); + } + if (Projectile.timeLeft < 296) // The main visual of the projectile and the blood mist it produces before turning around + { + FusableParticleManager.GetParticleSetByType()?.SpawnParticle(Projectile.Center, particleSize * 2); + + if (Main.rand.NextBool(6) && Projectile.ai[1] == 0f) + { + Color smokeColor = Main.rand.NextBool() ? Color.Red : Color.Firebrick; + Vector2 smokePosition = Projectile.Center + Main.rand.NextVector2Circular(5 + Time * 0.3f, 5 + Time * 0.3f); + float smokeScale = Main.rand.NextFloat(0.5f, 1.6f); + float smokeOpacity = 170 + -Time * 0.6f; + Particle smoke = new MediumMistParticle(smokePosition, Vector2.Zero, smokeColor, Color.Black, smokeScale, smokeOpacity, Main.rand.NextFloat(0.2f, -0.2f)); + GeneralParticleHandler.SpawnParticle(smoke); } } - if (Projectile.timeLeft == 296) + + if (Projectile.ai[1] == 0f) // Blood pulses on the projectile before it turns around { - Projectile.alpha = 80; - } - if (Projectile.timeLeft < 296 && Main.rand.NextBool(5)) - { - Color smokeColor = Main.rand.NextBool() ? Color.Red : Color.Firebrick; - Vector2 smokePosition = Projectile.Center + Main.rand.NextVector2Circular(5 + Time * 0.3f, 5 + Time * 0.3f); - float smokeScale = Projectile.ai[1] == 1 ? Main.rand.NextFloat(0.1f, 0.35f) + Time * 0.01f : Main.rand.NextFloat(0.5f, 1.6f); - float smokeOpacity = Projectile.ai[1] == 1 ? 120 + Time * 0.9f : 170 + -Time * 0.7f; - Particle smoke = new MediumMistParticle(smokePosition, Projectile.ai[1] == 1 ? Projectile.velocity * 0.5f : Vector2.Zero, smokeColor, Color.Black, smokeScale, smokeOpacity, Main.rand.NextFloat(0.2f, -0.2f)); - GeneralParticleHandler.SpawnParticle(smoke); - } - if (Projectile.ai[1] == 0f) - { - if (Main.rand.NextBool(7)) + if (Main.rand.NextBool(9)) { DirectionalPulseRing pulse = new DirectionalPulseRing(Projectile.Center + Main.rand.NextVector2Circular(7 + Time * 0.4f, 7 + Time * 0.4f), Vector2.Zero, Main.rand.NextBool(3) ? Color.Red : Color.Firebrick, new Vector2(1, 1), 0, Main.rand.NextFloat(0.02f, 0.07f) + Time * 0.0006f, 0f, 35); GeneralParticleHandler.SpawnParticle(pulse); } - Projectile.scale += 0.006f; } - else if (Projectile.scale > 0.01) - Projectile.scale -= 0.01f; if (!playedSound) { SoundEngine.PlaySound(SoundID.Item34, Projectile.position); @@ -91,6 +85,8 @@ namespace CalamityMod.Projectiles.Ranged } Lighting.AddLight(Projectile.Center, 1f, 0f, 0f); + + // A bunch of small things mostly for visuals when the projectile starts turning around before it homes on the player if (Projectile.timeLeft == 235) bloodCloudReturn = Projectile.velocity; if (Projectile.timeLeft <= 235 && Projectile.ai[1] == 0f) @@ -100,25 +96,29 @@ namespace CalamityMod.Projectiles.Ranged Projectile.velocity = -bloodCloudReturn.RotatedBy(Projectile.ai[2] == 5 ? -0.7f : 0.7f) * 1.2f; for (int i = 0; i <= 5; i++) { - Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(40, 40), Main.rand.NextBool(3) ? 60 : 90, Projectile.velocity.RotatedByRandom(MathHelper.ToRadians(2f)) * Main.rand.NextFloat(0.3f, 2.2f)); + Dust dust = Dust.NewDustPerfect(Projectile.Center - Projectile.velocity * 2 + Main.rand.NextVector2Circular(35, 35), Main.rand.NextBool(3) ? 60 : 296, Projectile.velocity.RotatedByRandom(MathHelper.ToRadians(0.5f)) * Main.rand.NextFloat(1.7f, 3.2f)); dust.noGravity = true; dust.scale = Main.rand.NextFloat(1.2f, 2f); - Dust dust2 = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(40, 40), Main.rand.NextBool(3) ? 60 : 90, Projectile.velocity.RotatedByRandom(MathHelper.ToRadians(35f)) * Main.rand.NextFloat(0.1f, 1.2f)); + Dust dust2 = Dust.NewDustPerfect(Projectile.Center - Projectile.velocity * 2 + Main.rand.NextVector2Circular(35, 35), Main.rand.NextBool(3) ? 60 : 296, Projectile.velocity.RotatedByRandom(MathHelper.ToRadians(35f)) * Main.rand.NextFloat(0.1f, 1.7f)); dust2.noGravity = true; dust2.scale = Main.rand.NextFloat(1.2f, 2f); } } - if (Projectile.timeLeft == 209) + if (Projectile.timeLeft == 209) // Begin returning to player { Projectile.ai[1] = 1f; } - if (Projectile.ai[1] == 1f) + if (Projectile.ai[1] == 1f) // Dusts as the projectile homes back in on the player { - Projectile.extraUpdates = 3; - Projectile.alpha = 160; - Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(20, 20), Main.rand.NextBool(3) ? 60 : 5); - dust.scale = Main.rand.NextFloat(0.4f, 0.7f); + Projectile.extraUpdates = 5; + bool dustEffect = Main.rand.NextBool(3) ? false : true; + int dustColor = dustEffect ? 296 : 60; + Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(dustEffect ? 0 : 5, dustEffect ? 0 : 5), dustColor); + dust.scale = dustEffect ? Main.rand.NextFloat(1.1f, 1.45f) : Main.rand.NextFloat(0.9f, 1.2f); + dust.velocity = dustEffect ? Vector2.Zero : Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(0.7f, 1.2f); + dust.alpha = 100; + dust.noLight = true; dust.noGravity = true; Player player = Main.player[Projectile.owner]; @@ -138,29 +138,30 @@ namespace CalamityMod.Projectiles.Ranged // Home back in on the player. if (Projectile.velocity.X < xDist) { - Projectile.velocity.X = Projectile.velocity.X + 0.1f; + Projectile.velocity.X = Projectile.velocity.X + 0.3f; if (Projectile.velocity.X < 0f && xDist > 0f) - Projectile.velocity.X += 0.1f; + Projectile.velocity.X += 0.3f; } else if (Projectile.velocity.X > xDist) { - Projectile.velocity.X = Projectile.velocity.X - 0.1f; + Projectile.velocity.X = Projectile.velocity.X - 0.3f; if (Projectile.velocity.X > 0f && xDist < 0f) - Projectile.velocity.X -= 0.1f; + Projectile.velocity.X -= 0.3f; } if (Projectile.velocity.Y < yDist) { - Projectile.velocity.Y = Projectile.velocity.Y + 0.1f; + Projectile.velocity.Y = Projectile.velocity.Y + 0.3f; if (Projectile.velocity.Y < 0f && yDist > 0f) - Projectile.velocity.Y += 0.1f; + Projectile.velocity.Y += 0.3f; } else if (Projectile.velocity.Y > yDist) { - Projectile.velocity.Y = Projectile.velocity.Y - 0.1f; + Projectile.velocity.Y = Projectile.velocity.Y - 0.3f; if (Projectile.velocity.Y > 0f && yDist < 0f) - Projectile.velocity.Y -= 0.1f; + Projectile.velocity.Y -= 0.3f; } - + if (Projectile.timeLeft == 5) // Absolutely make sure the player gets the chance to heal + Projectile.Center = playerCenter; // Delete the projectile if it touches its owner. Has a chance to heal the player again if (Main.myPlayer == Projectile.owner) { @@ -168,8 +169,9 @@ namespace CalamityMod.Projectiles.Ranged { if (Main.rand.NextBool(4) && !Main.player[Projectile.owner].moonLeech) { - player.statLife += 1; - player.HealEffect(1); + int bonusHeal = Main.rand.NextBool(3) ? 3 : 2; + player.statLife += improvedHeal ? bonusHeal : 1; + player.HealEffect(improvedHeal ? bonusHeal : 1); } Projectile.Kill(); } @@ -179,23 +181,14 @@ namespace CalamityMod.Projectiles.Ranged public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 240); - - if (!target.canGhostHeal || Main.player[Projectile.owner].moonLeech) - return; - - Player player = Main.player[Projectile.owner]; - if (Main.rand.NextBool(3)) - { - int healAmt = Main.rand.Next(1, 4); - player.statLife += healAmt; - player.HealEffect(healAmt); - } + target.AddBuff(ModContent.BuffType(), 600); + improvedHeal = true; } - public override bool PreDraw(ref Color lightColor) + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/BloodFlames").Value); - return false; + Projectile.damage = (int)(Projectile.damage * 0.88f); // 12% damage nerf for every enemy hit + if (Projectile.damage < 1) + Projectile.damage = 1; } } } diff --git a/Projectiles/Ranged/BloodFlames.png b/Projectiles/Ranged/BloodFlames.png deleted file mode 100644 index c9fe641d1567073bad49da9f70db8f07588a1a1a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 97084 zcmXtfbyQT}_x8-d&>=B&>IdnTZjg{1q#07A85pH|XcYuhQd+u)?v{`kx&;Q120^;{ z@m=qF|2XTeb?#dGp0m%6=Q(@dk5Fw@Vgfn>002PzO6}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no;`oCAP11P_SRczfsxeYfOZioKGA`az`2roK<7I@xT#v4u-#?3r0 zNfvRX{l3sXN;&p3Hv^#(p1sw%4UDAPRy;{8lKKprd@n^dULMyd1ZTs0=rEa zmL7>)OPB0)U^dUZ|FzhZlg|7})8dcMNzDp?`PkrQ!~e-ulTRx0{F;WbF2N~klMz6^ N9_boAsMU6i{eKHeZAt(D diff --git a/Projectiles/Ranged/HalleysComet.cs b/Projectiles/Ranged/HalleysComet.cs index 783d4fad52..4d867a5b71 100644 --- a/Projectiles/Ranged/HalleysComet.cs +++ b/Projectiles/Ranged/HalleysComet.cs @@ -41,16 +41,20 @@ namespace CalamityMod.Projectiles.Ranged } else if (Time == 5f) { - Particle pulse = new DirectionalPulseRing(Projectile.Center, Projectile.velocity * 0.75f, Color.Aqua, new Vector2(1f, 2.5f), Projectile.rotation, 0.4f, 0.05f, 20); + Particle pulse = new DirectionalPulseRing(Projectile.Center, Projectile.velocity * 0.75f, Color.Aqua, new Vector2(1f, 2.5f), Projectile.rotation, 0.2f, 0.03f, 20); GeneralParticleHandler.SpawnParticle(pulse); - Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Projectile.velocity * 0.4f, Color.DodgerBlue, new Vector2(1f, 2.5f), Projectile.rotation, 0.2f, 0.05f, 35); + Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Projectile.velocity * 0.4f, Color.DodgerBlue, new Vector2(1f, 2.5f), Projectile.rotation, 0.1f, 0.025f, 35); GeneralParticleHandler.SpawnParticle(pulse2); for (int i = 0; i <= 25; i++) { Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 172 : 206, Projectile.velocity); - dust.scale = Main.rand.NextFloat(1.5f, 2.3f); - dust.velocity = Projectile.velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.3f, 2.1f); + dust.scale = Main.rand.NextFloat(1.6f, 2.5f); + dust.velocity = Projectile.velocity.RotatedByRandom(0.4f) * Main.rand.NextFloat(0.3f, 1.6f); dust.noGravity = true; + Dust dust2 = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 172 : 206, Projectile.velocity); + dust2.scale = Main.rand.NextFloat(1.35f, 2.1f); + dust2.velocity = Projectile.velocity.RotatedByRandom(0.06f) * Main.rand.NextFloat(0.8f, 3.1f); + dust2.noGravity = true; } } diff --git a/Sounds/Item/Heartbeat.ogg b/Sounds/Item/Heartbeat.ogg new file mode 100644 index 0000000000000000000000000000000000000000..b0121df73c67cf38dd4a75eebb04d64aa341987c GIT binary patch literal 5819 zcmai230zZGv%e8!7Xw5L8Zm4_So{o&H3*bl2}C3i5D=9m>_iERMZrc12nxs&5Ft>u zfFPlOfI=&)gnf}6DS{%Pf=k66wC~(tTVLP%^}D~5lXK6UGjnF5w`Hozb<$uOgTMFi$(_j@xQJvfptc@ zfPTd9l<#g^x(_zc&%=?=9&3fw-lM%|&v$!tv1(+hSD2?C%?E2i3-_a+qy1STaXPcZLs#CVP1YGMZlz)?I8yfGY7-u)1DbAV?5msEH;O zE?D{Z6MWFBN%TB|-=TdaSm8@{vjoxBx4S%P#WlqNw0@k5$R_8F5U{54L4_C;8SXsd z6k^e!yNIE8DwMG4V(QoPE{JJ&Vxw)epBAMZ(tmorFiHQJTFs!TxK_;&(FQ;2=vi?` z$SpFYpRmaO+KKY@z=E@w3dwmPO+{e#ak%14I$*V~78YUvHK7A3D61+|PZg%`p0e$0 zO*^eFW4kl(NslTYN1uJw||9ScAf8yx}ctF&7Nur{t|!$ zLHIOKo?lk+|7qUN8PxyYjD0)RA!A_6j$lkju(AbNxr44L%(rkS1bk{t)@-Ni9thFx z2r&TdK&W{a%ck#*&E`Ly0J|N6jPaQEU`!XV23c#EuIChDI37Y82d026^6%GqK3;$# z3OU{x{tOYFWOu$<7=SH0U&KseT@qLjm;V@>HJG*1N07{#&nrb`54XfSWUJPfW@hs} z7}zg22YiX^zSf?1Z7?gO-%28jvp$ND&KBmD4uLtjMYbeQ&K<1t8_E(cojd~eIuB+o zT(3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`+sg9Hu9{r}EoYWNi)mYDtY(6S_VP#F&@}8M?}!rE#T051TY+*!6oHdYvm}Zs~bz zD@naPMf~c6&Cl?YXF?+0jaRajelNjpF)bpHBVQJee-4y{a!c33KKk1BH#bG&AI{tD z(5yo2O4uR@qn$V32J1DIS^Dv$sxG)sDT<#_ zGw&IClp?60WD?1vx8}`FB-YecDQxUhv>Xgf$axyIwD}-+hqw@AAL7R_lzpkSE(#fzk9k8j_m^ z?Z0=({hU8=!gH(EM1@hf^P3p`C8dtHzZh*#Zye06l6-&9{6l{Bt7@aOUt|(r-27?H zym0$!msBDxG8fZWs3azC`E-kZcuY)E@zq3f=G)bznhypGjY?V%JaZFjez+2$J@jaD YMcM!N Date: Wed, 18 Oct 2023 10:16:33 -0700 Subject: [PATCH 29/95] DRACONIC WELDING TOOL Reworked Dragon's Breath into a flamethrower Fires dragon fireballs at an accelerating pace Upon firing for long enough, you will begin using a cartridge of energy While using a cartridge you will shoot a draconic beam of fire that doesn't consume ammo Once a cartridge has been ejected you will return to the original fire rate 80% chance to save ammo --- CalPlayer/CalamityPlayer.cs | 2 + CalPlayer/CalamityPlayerMiscEffects.cs | 4 + Items/Weapons/Ranged/DragonsBreath.cs | 208 ++++++++---------- Items/Weapons/Ranged/DragonsBreath.png | Bin 2577 -> 4387 bytes ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 11 +- .../Mods.CalamityMod.Projectiles.Ranged.hjson | 2 + .../Metaballs/DragonsBreathParticleSets.cs | 62 ++++++ Particles/Metaballs/FusableParticleMessy.png | Bin 0 -> 116021 bytes Projectiles/Ranged/BloodBoilerFire.cs | 4 +- Projectiles/Ranged/DragonsBreathFlames.cs | 194 ++++++++++++++++ Projectiles/Ranged/DragonsBreathMag.cs | 76 +++++++ Projectiles/Ranged/DragonsBreathMag.png | Bin 0 -> 2939 bytes Projectiles/Ranged/DragonsBreathRound.cs | 82 ------- Projectiles/Ranged/DragonsBreathRound.png | Bin 129 -> 0 bytes Sounds/Item/WeldingBurn.ogg | Bin 0 -> 6337 bytes Sounds/Item/WeldingShoot.ogg | Bin 0 -> 9800 bytes 16 files changed, 438 insertions(+), 207 deletions(-) create mode 100644 Particles/Metaballs/DragonsBreathParticleSets.cs create mode 100644 Particles/Metaballs/FusableParticleMessy.png create mode 100644 Projectiles/Ranged/DragonsBreathFlames.cs create mode 100644 Projectiles/Ranged/DragonsBreathMag.cs create mode 100644 Projectiles/Ranged/DragonsBreathMag.png delete mode 100644 Projectiles/Ranged/DragonsBreathRound.cs delete mode 100644 Projectiles/Ranged/DragonsBreathRound.png create mode 100644 Sounds/Item/WeldingBurn.ogg create mode 100644 Sounds/Item/WeldingShoot.ogg diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 00d62fb797..ee84425f2a 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -180,6 +180,8 @@ namespace CalamityMod.CalPlayer public int gaelSwipes = 0; public int dragoonDrizzlefishGelBoost = 1; public int deadSunCounter = 6; + public int DragonsBreathAudioCooldown = 0; + public int DragonsBreathAudioCooldown2 = 0; public bool sBlasterDashActivated = false; public int Holyhammer = 0; public int PHAThammer = 0; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index ae8e298775..3c270be128 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1285,6 +1285,10 @@ namespace CalamityMod.CalPlayer if (expiredCooldowns.Count > 0) SyncCooldownRemoval(Main.netMode == NetmodeID.Server, expiredCooldowns); + if (DragonsBreathAudioCooldown > 0) + DragonsBreathAudioCooldown--; + if (DragonsBreathAudioCooldown2 > 0) + DragonsBreathAudioCooldown2--; if (fullRageSoundCountdownTimer > 0) --fullRageSoundCountdownTimer; if (plagueTaintedSMGDroneCooldown > 0) diff --git a/Items/Weapons/Ranged/DragonsBreath.cs b/Items/Weapons/Ranged/DragonsBreath.cs index 7998f6fe0d..69f6cacd9a 100644 --- a/Items/Weapons/Ranged/DragonsBreath.cs +++ b/Items/Weapons/Ranged/DragonsBreath.cs @@ -1,6 +1,8 @@ -using CalamityMod.Projectiles.Ranged; +using System; +using CalamityMod.Projectiles.Ranged; using CalamityMod.Rarities; using Microsoft.Xna.Framework; +using ReLogic.Utilities; using Terraria; using Terraria.Audio; using Terraria.DataStructures; @@ -12,154 +14,126 @@ namespace CalamityMod.Items.Weapons.Ranged public class DragonsBreath : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Ranged"; - public const int BetweenShotsPause = 15; - public const int PelletsPerShot = 6; - public const float FullAutoFireRateMult = 0.8f; - public const float FullAutoDamageMult = 0.8f; - // note this is extremely low because it's per pellet - public const float Spread = 0.018f; + + public static readonly SoundStyle FireballSound = new("CalamityMod/Sounds/Custom/Yharon/YharonFireball", 3) { PitchVariance = 0.3f, Volume = 0.75f }; + public static readonly SoundStyle WeldingBurn = new("CalamityMod/Sounds/Item/WeldingBurn") { Volume = 0.65f }; + public static readonly SoundStyle WeldingShoot = new("CalamityMod/Sounds/Item/WeldingShoot") { Volume = 0.45f }; - public override void SetStaticDefaults() - { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Item.type] = true; - } + public SlotId WeldSoundSlot; + + public int BetweenShotsPause = 24; + public float Counter = 2; + public float MaxFirerateShots = 20; + public float WeldingShots = 50; + public bool StrongShotMode = false; + public int DragonsBreathSetUseTime = 5; + public int DragonsBreathSetUseAnimation = 9; public override void SetDefaults() { - Item.damage = 162; + Item.damage = 505; Item.DamageType = DamageClass.Ranged; - Item.width = 124; - Item.height = 78; - Item.useTime = 9; - Item.useAnimation = 18; + Item.width = 94; + Item.height = 72; + Item.useTime = DragonsBreathSetUseTime; + Item.useAnimation = DragonsBreathSetUseAnimation; Item.reuseDelay = BetweenShotsPause; - Item.useLimitPerAnimation = 2; Item.autoReuse = true; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; - Item.knockBack = 6.5f; - // item.UseSound = SoundID.Item38; - Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 12f; - Item.useAmmo = AmmoID.Bullet; - Item.Calamity().canFirePointBlankShots = true; + Item.knockBack = 4.5f; + Item.UseSound = null; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 3.5f; + Item.useAmmo = AmmoID.Gel; Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.Rarity15BuyPrice; } - public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.NextFloat() > 0.66f; + public override bool CanConsumeAmmo(Item ammo, Player player) => !StrongShotMode && Main.rand.NextFloat() > 0.80f; - public override Vector2? HoldoutOffset() => new Vector2(-5, 5); - - public override bool AltFunctionUse(Player player) => true; - - public override bool CanUseItem(Player player) - { - Item.reuseDelay = player.altFunctionUse == 2 ? 0 : BetweenShotsPause; - return base.CanUseItem(player); - } - - public override float UseSpeedMultiplier(Player player) => player.altFunctionUse == 2 ? FullAutoFireRateMult : 1f; + public override Vector2? HoldoutOffset() => new Vector2(0, 10.5f); public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - SoundEngine.PlaySound(SoundID.Item38, position); - bool doDust = false; - Vector2 vel = velocity; - int[] bulletIDs = new int[PelletsPerShot]; - float spreadFactor = 1f; - - // Right click full auto: Randomly intermix three regular bullets and three Dragon's Breath Rounds in a wider spread - if (player.altFunctionUse == 2) + if (!StrongShotMode) { - damage = (int)(damage * FullAutoDamageMult); + if (Counter == 2) + SoundEngine.PlaySound(FireballSound, player.Center); + Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(2.5f)); + Projectile.NewProjectile(source, position, newVel * Main.rand.NextFloat(1.2f, 0.8f), type, damage, knockback, player.whoAmI); + Counter--; + if (MaxFirerateShots > 0 && BetweenShotsPause == 4) + MaxFirerateShots--; - for (int i = 0; i < PelletsPerShot; ++i) - bulletIDs[i] = type; - int dragonsBreathAdded = 0; - while (dragonsBreathAdded < PelletsPerShot / 2) + if (Counter <= 0) { - int i = Main.rand.Next(PelletsPerShot); - if (bulletIDs[i] == Item.shoot) - continue; - bulletIDs[i] = Item.shoot; - ++dragonsBreathAdded; + if (BetweenShotsPause > 4) + { + BetweenShotsPause -= 2; + Item.reuseDelay = BetweenShotsPause; + } + Counter = 2; + } + if (BetweenShotsPause <= 4 && MaxFirerateShots == 0) + { + BetweenShotsPause = 0; + Item.reuseDelay = BetweenShotsPause; + StrongShotMode = true; + SoundEngine.PlaySound(ScorchedEarth.ShootSound, player.Center); } - - spreadFactor = 1.52f; } - // Left click first shot: Six regular bullets, low spread - else if (player.itemAnimation == player.itemAnimationMax - 1) + else if (StrongShotMode) { - for (int i = 0; i < PelletsPerShot; ++i) - bulletIDs[i] = type; - } - // Left click second shot: Six Dragon's Breath Rounds, very low spread. Extra sound and dust blast. - else - { - SoundEngine.PlaySound(SoundID.Item74, position); - for (int i = 0; i < PelletsPerShot; ++i) - bulletIDs[i] = Item.shoot; - - spreadFactor = 0.5f; - doDust = true; - } - - // Actually fire the chosen bullets. - float angleOffset = Spread * -0.5f * (PelletsPerShot - 1) * spreadFactor; - for (int i = 0; i < PelletsPerShot; ++i) - { - Vector2 rotatedVel = vel.RotatedBy(angleOffset); - Projectile.NewProjectile(source, position, rotatedVel, bulletIDs[i], damage, knockback, player.whoAmI); - angleOffset += Spread * spreadFactor; - - if (doDust) - SpawnDragonsBreathDust(position, rotatedVel); + if (SoundEngine.TryGetActiveSound(WeldSoundSlot, out var WeldSound) && WeldSound.IsPlaying) + WeldSound.Position = player.Center; + if (player.Calamity().DragonsBreathAudioCooldown2 == 0) + { + player.Calamity().DragonsBreathAudioCooldown2 = 30; + WeldSoundSlot = SoundEngine.PlaySound(WeldingShoot, player.Center); + } + Projectile.NewProjectile(source, position, velocity * 1.5f, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 1); + WeldingShots--; + if (WeldingShots <= 0) + { + Counter = 2; + BetweenShotsPause = 24; + Item.reuseDelay = BetweenShotsPause; + SoundEngine.PlaySound(SpeedBlaster.Empty, player.Center); + Projectile.NewProjectile(source, player.Center, new Vector2(5 * -player.direction, -5), ModContent.ProjectileType(), Main.zenithWorld ? 250000 : 1, knockback, player.whoAmI); + MaxFirerateShots = 20; + WeldingShots = 50; + WeldSound?.Stop(); + StrongShotMode = false; + } } return false; } - - private void SpawnDragonsBreathDust(Vector2 pos, Vector2 velocity) + public override void UseStyle(Player player, Rectangle heldItemFrame) { - pos += velocity.SafeNormalize(Vector2.Zero) * Item.width * Item.scale * 0.71f; - for (int i = 0; i < 30; ++i) - { - // Pick a random type of smoke (there's a little fire mixed in) - int dustID; - switch (Main.rand.Next(6)) - { - case 0: - dustID = 262; - break; - case 1: - case 2: - dustID = 54; - break; - default: - dustID = 53; - break; - } + player.direction = Math.Sign((player.Calamity().mouseWorld - player.Center).X); + float itemRotation = player.compositeFrontArm.rotation + MathHelper.PiOver2 * player.gravDir; - // Choose a random speed and angle to belch out the smoke - float dustSpeed = Main.rand.NextFloat(3.0f, 13.0f); - float angleRandom = 0.06f; - Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(velocity.ToRotation()); - dustVel = dustVel.RotatedBy(-angleRandom); - dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); + Vector2 itemPosition = player.MountedCenter + itemRotation.ToRotationVector2() * 7f; + Vector2 itemSize = new Vector2(94, 72); + Vector2 itemOrigin = new Vector2(-17, 3); - // Sometimes make smoke fly upward instead of outward. - if (Main.rand.NextBool(4)) - dustVel = Vector2.Lerp(dustVel, -Vector2.UnitY * dustVel.Length(), Main.rand.NextFloat(0.6f, 0.85f)) * 0.6f; + CalamityUtils.CleanHoldStyle(player, itemRotation, itemPosition, itemSize, itemOrigin); - // Pick a size for the smoke particle - float scale = Main.rand.NextFloat(0.5f, 1.6f); + base.UseStyle(player, heldItemFrame); + } - // Actually spawn the smoke - int idx = Dust.NewDust(pos, 1, 1, dustID, dustVel.X, dustVel.Y, 0, default, scale); - Main.dust[idx].noGravity = true; - Main.dust[idx].position = pos; - } + public override void UseItemFrame(Player player) + { + player.direction = Math.Sign((player.Calamity().mouseWorld - player.Center).X); + + float animProgress = 0.5f - player.itemTime / (float)player.itemTimeMax; + float rotation = (player.Center - player.Calamity().mouseWorld).ToRotation() * player.gravDir + MathHelper.PiOver2; + if (animProgress < 0.4f) + rotation += StrongShotMode && WeldingShots == 1 ? -0.25f * (float)Math.Pow((0.6f - animProgress) / 0.6f, 2) * player.direction : 0; + + player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, rotation); } } } diff --git a/Items/Weapons/Ranged/DragonsBreath.png b/Items/Weapons/Ranged/DragonsBreath.png index afb0f0ec98891f92b1fdbc1780b4d957bbf6d152..3ff2a5ca01018c828c562b7cb57b300e1634bbf5 100644 GIT binary patch literal 4387 zcmV+;5!~*HP)f6 zXi@@54ZTQ_E-Enz5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUF zWUU$Bym{}eS9UO(Z2>7`&z9wUXbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|> z%+C|c55>;RS}qbKr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3ZN4bfe_i~WlJ|C&UW9+{8AKoW!}eExnGFE2re(F+`iE_46#!l9 z0Z_aBhs|Iw0E)7{bq;-T9=d#9QpDmcXDh4R++0fmpKB>E=%LdZt9g$j;($`3&Zthxi`{{&gM}5&R^+h%b~yM9Zd3AWW9ETgVfL z1(`yIK=_}U_z%PWq}jQaiQ4!P(3V&Nr6C$XejWfQDiI(Fdt@un?|lo#M+5oIi_w{w zo%_#%{(V=tO#a9gB!7-$M?^BX5>d|Vn*3S!?g~$*UQipUPL&zMmg;!4Do9IA%up=Rh? z=qPj=x&RGBx1dpI68aT-2O}^EromdU5o`ssU{5#*j)WJ%$?!5bA1;Eoz?EiTr=n?cd`V|I)p<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fq zlYh1z1JcQ6;U56lwagGLA3<_$|G|A1a=ay5E7q9vwY~5<0JSSt07>GrjVSW|rOz(B zXIDNRchMWV_P5xSM%f zHvcUE+Aj11NkUzT#CH$80VGGJW%G;8@$vl>pTFj8hsts4Po6U87s-;lE#h5eYoAwp zF92O9J_M4!kR-As{l`UwRlm&&$1k_c(`aYYuNZ509G$) z(pMvzr!JYEc|Lvqf_VVMh6c>qx-wHwaJl=6HKGQEcbeJA6DBwAjtExs%kEcUt3*dce3)F4rRv&>0FrTUcaOD0ogebn_)j|f7O`fT4kycsJg&Zt~^+1x_7H$OZ#F0z|OPp z$D*zcB6wPsV1+3xy^ zSsT~$?`Xdd&J!LnrL7N_SFGH*TRD;S!&b)Zig%MzLld~k=-M(7wC&eFwhj>Kvhl=idA@{XTjN$T zy(j=EFP{;EaH1tudMGZJ+&cKWxz_`L;};7u_A}YY_k>4GscXvuNLFFajK804bK};G zZ1AzMNeHlldWSnj!qL0M?VWKi~YHy0)hHKj=t32Tm(`{#` z*~$0Lxi;EVzC5?VUd1{uFvxeshR5m_CRCpAi0QT?TuRzjLwaxTU;uF8Q+su$ zX3MVau;cdRn-XlVUSv-;+bwy*Bc|KVOAk|+_wK&)#P!-`yBC!V1OTUd&6+GvxYwl6 zq#<0=>d6ID?gZeIFRocOT{U?hocbmJ_f`D^NY2I`x^i@!u5@DL36Gd29pRF@-dgV+ n@9ycl;q2ICUy0%gkC^@sHBacoqpnfQ00000NkvXXu0mjf;5;d! diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 3d209f345a..c772ecd86c 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -406,12 +406,11 @@ DragonsBreath: { DisplayName: Dragon's Breath Tooltip: ''' - Press to fire in two-shot bursts - The first shot is a spread of 6 normal bullets - The second shot is a tight spread of 6 Dragon's Breath rounds - Press to fire full auto and mix the bullets randomly, but deal 20% less damage - This weapon has no randomness to its spread pattern - 66% chance to save ammo + Fires dragon fireballs at an accelerating pace + Upon firing for long enough, you will begin using a cartridge of energy + While using a cartridge you will shoot a draconic beam of fire that doesn't consume ammo + Once a cartridge has been ejected you will return to the original fire rate + 80% chance to save ammo ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson index 926bb6ec3d..0b39e2ebf7 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson @@ -240,3 +240,5 @@ Voidragon.DisplayName: Voidragon Blast VoidragonTentacle.DisplayName: Voidragon Tentacle WaterSpout.DisplayName: Spout WulfrumScrapBullet.DisplayName: High Speed Scrap +DragonsBreathFlames.DisplayName: Draconic Flames +DragonsBreathMag.DisplayName: Dragons Breath Cartridge diff --git a/Particles/Metaballs/DragonsBreathParticleSets.cs b/Particles/Metaballs/DragonsBreathParticleSets.cs new file mode 100644 index 0000000000..b453eca15d --- /dev/null +++ b/Particles/Metaballs/DragonsBreathParticleSets.cs @@ -0,0 +1,62 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria; +using Terraria.Graphics.Shaders; +using Terraria.ModLoader; + +namespace CalamityMod.Particles.Metaballs +{ + public class DragonFlames : DragonsBreathParticleSets + { + public override Color BorderColor => (Main.rand.NextBool() ? Color.OrangeRed : Color.DarkOrange) * 0.8f; + } + public class DragonBeam : DragonsBreathParticleSets + { + public override Color BorderColor => (Main.rand.NextBool() ? Color.Orange : Color.OrangeRed) * 0.7f; + } + + public abstract class DragonsBreathParticleSets : BaseFusableParticleSet + { + public override float BorderSize => 12f; + public override bool BorderShouldBeSolid => false; + + private float opacity; + public override List BackgroundShaders => new() + { + GameShaders.Misc["CalamityMod:AdditiveFusableParticleEdge"].Shader, + }; + public override List BackgroundTextures => new() + { + ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value, + }; + public override FusableParticle SpawnParticle(Vector2 center, float sizeStrength) + { + Particles.Add(new FusableParticle(center, sizeStrength)); + return Particles.Last(); + } + + public override void UpdateBehavior(FusableParticle particle) + { + opacity = 0.65f; + particle.Size = MathHelper.Clamp(particle.Size - 0.1f, 0f, 200f) * 0.91f; + if (particle.Size < 20f) + particle.Size = particle.Size * 0.8f - 1f; + } + + public override void DrawParticles() + { + Texture2D fusableParticleBase = ModContent.Request("CalamityMod/Particles/Metaballs/FusableParticleMessy").Value; + foreach (FusableParticle particle in Particles) + { + Vector2 drawPosition = particle.Center - Main.screenPosition; + Vector2 origin = fusableParticleBase.Size() * 0.5f; + Vector2 scale = Vector2.One * particle.Size / fusableParticleBase.Size(); + Color drawColor = Color.Lerp(BorderColor, new Color(0f, 0f, 1f), Utils.GetLerpValue(50f, 100f, particle.Size, true) * 0.1f) * 1.2f; + Main.spriteBatch.Draw(fusableParticleBase, drawPosition, null, drawColor * opacity, 0f, origin, scale, SpriteEffects.None, 0f); + } + } + } +} diff --git a/Particles/Metaballs/FusableParticleMessy.png b/Particles/Metaballs/FusableParticleMessy.png new file mode 100644 index 0000000000000000000000000000000000000000..cee0b3c12f612bca3c06f6c274040e7791889e36 GIT binary patch literal 116021 zcmV)xK$E|TP)f6 zXi@@54ZTQ_E-Enz5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUF zWUU$Bym{}eS9UO(Z2>7`&z9wUXbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|> z%+C|c55>;RS}qbKr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3ZN4bfe_i~WlJ|C&UW9+{8AKoW!}eExnGFE2re(F+`iE_46#!l9 z0Z_aBhs|Iw0E)7{bq;-T9=d#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o>Ld)+JH8DRyQ9hNcC)b|Z#UewO{8U|>DC&y?Uwy= zlyuhX;DwTh)~WWsGde@>9#Y2^gFk!apj#WN*){AH0He5D-x|uYLqtZIe+1ZP;QL`~ z<3IoT&kHJ_G`#@*$9b{L-t`hu5&NAfaHtvuHCh(( zA+D#QwF1)Dl)A1nak@Yd2osfADjNQLl47USe3aIOp`vfwhVY}esoPgJkrxQC zZ5vPqwp9Q+cxurlXsGDjD+b^0ckO#uZ#|ezx^s|LPva?@V}+`mEJNM!m)aH&(!E^v zg7fE2FF^kW(|6x}ccp4Cmz_cOWV=%(U3Y(|n9sIPSWhsM`GCGHO=7H&u2AK!TK4Bk zHY;2~UG0oK|Jmm7!=C?MrKs*8^OE-{jJzQ7Va5W=f4JSyiXZLU$mTZWdJW}URLHfOAbJ`H^swvKqs(FF7o~E;?;j&+`Frt8nWsUzO zbn*$jk8_7@#P$91=0FwAP(wCYY1<~Z+bx>JbEL-Yc4N>Z0?Bi+HyJrc3HMYdQ98Z0`zY%{Zc?bvCkuw zeWlvZpnhCd)bXjUaee%QEm5|kV$OB;efrUzf!miWfyngm{PeI8@{XDi;dP~d4tmsW zGoLyJ(oHy9x~kT|WHA1Duva?ld)K}1?CTlcDU$WMVLjYYIY++Uf#{Xbd "Projectiles.Ranged"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + + public int Time = 0; + public float beamWidth = 1.1f; + public bool beamsize = false; + public float bbbBONUSbeamSizeWOAHH = 60; + public bool postHit = false; + public ref int audioCooldown => ref Main.player[Projectile.owner].Calamity().DragonsBreathAudioCooldown; + + public override void SetDefaults() + { + Projectile.width = 10; + Projectile.height = 10; + Projectile.friendly = true; + Projectile.DamageType = DamageClass.Ranged; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.extraUpdates = 5; + Projectile.penetrate = -1; + Projectile.timeLeft = 500; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + } + public override void AI() + { + Vector3 Light = Projectile.ai[0] == 1 ? new Vector3(0.255f, 0.080f, 0.080f) : new Vector3(0.255f, 0.060f, 0.000f); + Lighting.AddLight(Projectile.Center, Light * (Projectile.ai[0] == 1 ? 5 : 3)); + + Player Owner = Main.player[Projectile.owner]; + float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); //used for some drawing prevention for when it's offscreen + if (beamWidth <= 0.9f) + { + beamsize = true; + } + if (beamWidth >= 1.1f) + { + beamsize = false; + } + beamWidth += (beamsize ? 0.02f : -0.02f); + Time++; + if (Projectile.ai[0] == 0) //Fireball Mode + { + if (Time == 14) + { + for (int i = 0; i <= 7; i++) + { + int DustType1 = 259; + Vector2 dustyVelocity = Projectile.velocity * 4f; + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? DustType1 : 174); + dust.scale = dust.type == DustType1 ? Main.rand.NextFloat(0.9f, 1.9f) : Main.rand.NextFloat(0.8f, 1.7f); + dust.velocity = dustyVelocity.RotatedByRandom(0.5f) * Main.rand.NextFloat(0.3f, 0.8f); + dust.noGravity = true; + Dust dust2 = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? DustType1 : 174); + dust2.scale = dust.type == DustType1 ? Main.rand.NextFloat(0.85f, 1.8f) : Main.rand.NextFloat(0.75f, 1.6f); + dust2.velocity = dustyVelocity.RotatedByRandom(0.15f) * Main.rand.NextFloat(0.8f, 2.1f); + dust2.noGravity = true; + } + for (int i = 0; i <= 5; i++) + { + Vector2 smokeVel = Projectile.velocity * 4.2f; + float rotationAngle = Main.rand.NextFloat(-0.15f, 0.15f); + smokeVel = smokeVel.RotatedBy(rotationAngle) * Main.rand.NextFloat(0.45f, 1.3f); + + float smokeScale = Main.rand.NextFloat(0.4f, 1.2f); + + SmallSmokeParticle smoke = new SmallSmokeParticle(Projectile.Center, smokeVel, Color.DimGray, Main.rand.NextBool() ? Color.SlateGray : Color.Black, smokeScale, 100); + GeneralParticleHandler.SpawnParticle(smoke); + } + } + if (Time % 5 == 0 && Time > 35f && targetDist < 1400f) + { + SparkParticle spark = new SparkParticle(Projectile.Center + Main.rand.NextVector2Circular(1 + (Time * 0.3f), 1 + (Time * 0.3f)), -Projectile.velocity * 0.5f, false, 15, Main.rand.NextFloat(0.3f, 0.5f), Main.rand.NextBool() ? Color.DarkOrange : Color.OrangeRed); + GeneralParticleHandler.SpawnParticle(spark); + } + if (targetDist < 1400f) + FusableParticleManager.GetParticleSetByType()?.SpawnParticle(Projectile.Center, Time * Main.rand.NextFloat(0.85f, 0.95f)); + Projectile.velocity *= 1.01f; + } + if (Projectile.ai[0] == 1) //Welding Mode + { + if (bbbBONUSbeamSizeWOAHH > 0) + bbbBONUSbeamSizeWOAHH -= 0.65f; + Projectile.extraUpdates = 15; + + if (Time > 11) + { + Dust dust2 = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(8, 8), Main.rand.NextBool(3) ? 162 : 259); + dust2.scale = Main.rand.NextFloat(0.3f, 0.5f); + dust2.noGravity = true; + if (Main.rand.NextBool(6)) + { + dust2.velocity = new Vector2(0, Main.rand.NextFloat(-1, -13)); + } + if (targetDist < 1400f) + FusableParticleManager.GetParticleSetByType()?.SpawnParticle(Projectile.Center, beamWidth * 45 + bbbBONUSbeamSizeWOAHH); + } + if (Time == 11) + { + for (int i = 0; i <= 4; i++) + { + Vector2 sparkVelocity = Projectile.velocity * 6; + + float sparkScale1 = Main.rand.NextFloat(0.3f, 0.8f); + Vector2 sparkvelocity1 = sparkVelocity.RotatedByRandom(0.45f) * Main.rand.NextFloat(0.4f, 0.95f); + SparkParticle spark1 = new SparkParticle(Projectile.Center, sparkvelocity1, false, 6, sparkScale1, Main.rand.NextBool() ? Color.DarkOrange : Color.OrangeRed); + GeneralParticleHandler.SpawnParticle(spark1); + + float sparkScale2 = Main.rand.NextFloat(0.4f, 1f); + Vector2 sparkvelocity2 = sparkVelocity.RotatedByRandom(0.2f) * Main.rand.NextFloat(1.1f, 3.1f); + SparkParticle spark2 = new SparkParticle(Projectile.Center, sparkvelocity2, false, 6, sparkScale2, Main.rand.NextBool() ? Color.DarkOrange : Color.OrangeRed); + GeneralParticleHandler.SpawnParticle(spark2); + } + } + } + } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + if (Projectile.ai[0] == 1) + { + if (!postHit) + { + if (audioCooldown == 0) + { + SoundEngine.PlaySound(DragonsBreath.WeldingBurn, Projectile.Center); + audioCooldown = 12; + } + float OrbSize = Main.rand.NextFloat(0.5f, 0.8f); + Particle orb = new GenericBloom(target.Center, Vector2.Zero, Color.OrangeRed, OrbSize + 0.6f, 8, true); + GeneralParticleHandler.SpawnParticle(orb); + Particle orb2 = new GenericBloom(target.Center, Vector2.Zero, Color.White, OrbSize + 0.2f, 8, true); + GeneralParticleHandler.SpawnParticle(orb2); + for (int i = 0; i < 3; i++) + { + Vector2 SpawnPosition = target.Center + Main.rand.NextVector2Circular(target.width, target.height) * 0.04f; + Vector2 splatterDirection = (Projectile.Center - SpawnPosition).SafeNormalize(Vector2.UnitY); + int sparkLifetime = Main.rand.Next(22, 36); + float sparkScale = Main.rand.NextFloat(0.8f, 1.3f); + Color sparkColor = Main.rand.NextBool(4) ? Color.OrangeRed : Color.Orange; + Vector2 sparkVelocity = splatterDirection.RotatedByRandom(0.6f) * Main.rand.NextFloat(12f, 25f); + SparkParticle spark = new SparkParticle(target.Center, sparkVelocity, true, sparkLifetime, sparkScale, sparkColor); + GeneralParticleHandler.SpawnParticle(spark); + } + postHit = true; + } + target.AddBuff(ModContent.BuffType(), 420); + } + else if (!postHit) + { + for (int i = 0; i <= 3; i++) + { + Vector2 dustyVelocity = new Vector2(0, -3.5f); + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 293 : 174); + dust.scale = Main.rand.NextFloat(0.8f, 1.75f); + dust.velocity = dustyVelocity.RotatedByRandom(0.6f) * Main.rand.NextFloat(0.3f, 0.8f); + dust.noGravity = false; + Dust dust2 = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 293 : 174); + dust2.scale = Main.rand.NextFloat(1.1f, 1.9f); + dust2.velocity = dustyVelocity.RotatedByRandom(0.07f) * Main.rand.NextFloat(0.8f, 2.1f); + dust2.noGravity = false; + } + postHit = true; + } + target.AddBuff(ModContent.BuffType(), 240); + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.ai[1] == 1 ? 4 : Projectile.width + Time * 0.1f, targetHitbox); + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + Projectile.damage = (int)(Projectile.damage * 0.89f); // 11% damage nerf for every enemy hit + if (Projectile.damage < 1) + Projectile.damage = 1; + } + } +} diff --git a/Projectiles/Ranged/DragonsBreathMag.cs b/Projectiles/Ranged/DragonsBreathMag.cs new file mode 100644 index 0000000000..250f8cdd37 --- /dev/null +++ b/Projectiles/Ranged/DragonsBreathMag.cs @@ -0,0 +1,76 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; +using static Humanizer.In; + +namespace CalamityMod.Projectiles.Ranged +{ + public class DragonsBreathMag : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Ranged"; + public override string Texture => "CalamityMod/Projectiles/Ranged/DragonsBreathMag"; + public int Time = 0; + public bool TouchedGrass = false; + + public override void SetDefaults() + { + Projectile.width = 16; + Projectile.height = 10; + Projectile.friendly = true; + Projectile.ignoreWater = false; + Projectile.DamageType = DamageClass.Ranged; + Projectile.aiStyle = ProjAIStyleID.GroundProjectile; + Projectile.penetrate = -1; + Projectile.timeLeft = 700; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + } + public override void SetStaticDefaults() + { + // Unsure if it will look good with these + //ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; + //ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + } + public override bool PreDraw(ref Color lightColor) + { + //CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1, ModContent.Request("CalamityMod/Projectiles/Ranged/DragonsBreathMag").Value); + return true; + } + public override void AI() + { + Time++; + Player Owner = Main.player[Projectile.owner]; + if (!TouchedGrass) + { + Projectile.rotation += 0.5f * (float)Projectile.direction; + } + Projectile.velocity.Y -= 0.055f; + Projectile.velocity.X *= 0.992f; + } + public override bool OnTileCollide(Vector2 oldVelocity) + { + Projectile.damage = 0; + TouchedGrass = true; + Projectile.velocity *= 0.98f; + return false; + } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + if (Main.zenithWorld) + { + for (int i = 0; i <= 40; i++) + { + SparkParticle spark1 = new SparkParticle(Projectile.Center, new Vector2(4, 4).RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 2.8f), false, 45, 1.4f, Main.rand.NextBool(4) ? Color.Orange : Color.OrangeRed); + GeneralParticleHandler.SpawnParticle(spark1); + } + } + target.AddBuff(ModContent.BuffType(), 20); + } + } +} diff --git a/Projectiles/Ranged/DragonsBreathMag.png b/Projectiles/Ranged/DragonsBreathMag.png new file mode 100644 index 0000000000000000000000000000000000000000..e17cb6edf4fc60b3b145937c60d73a4b95e3cf73 GIT binary patch literal 2939 zcmV->3xxEEP)f6 zXi@@54ZTQ_E-Enz5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUF zWUU$Bym{}eS9UO(Z2>7`&z9wUXbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|> z%+C|c55>;RS}qbKr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3ZN4bfe_i~WlJ|C&UW9+{8AKoW!}eExnGFE2re(F+`iE_46#!l9 z0Z_aBhs|Iw0E)7{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 index 7f1b358ae6..0000000000 --- a/Projectiles/Ranged/DragonsBreathRound.cs +++ /dev/null @@ -1,82 +0,0 @@ -using CalamityMod.Projectiles.Typeless; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using CalamityMod.Buffs.DamageOverTime; - -namespace CalamityMod.Projectiles.Ranged -{ - public class DragonsBreathRound : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Ranged"; - public override void SetStaticDefaults() - { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - } - - public override void SetDefaults() - { - Projectile.width = 4; - Projectile.height = 4; - Projectile.friendly = true; - Projectile.extraUpdates = 10; - Projectile.penetrate = 1; - Projectile.timeLeft = 180; - Projectile.DamageType = DamageClass.Ranged; - Projectile.Calamity().pointBlankShotDuration = CalamityGlobalProjectile.DefaultPointBlankDuration; - } - - public override void AI() - { - //Rotation - Projectile.spriteDirection = Projectile.direction = (Projectile.velocity.X > 0).ToDirectionInt(); - Projectile.rotation = Projectile.velocity.ToRotation() + (Projectile.spriteDirection == 1 ? 0f : MathHelper.Pi) +MathHelper.ToRadians(90) * Projectile.direction; - - Projectile.localAI[0] += 1f; - if (Projectile.localAI[0] > 4f) - { - float num93 = Projectile.velocity.X / 3f; - float num94 = Projectile.velocity.Y / 3f; - int num95 = 4; - int idx = Dust.NewDust(new Vector2(Projectile.position.X + (float)num95, Projectile.position.Y + (float)num95), Projectile.width - num95 * 2, Projectile.height - num95 * 2, 127, 0f, 0f, 100, default, 2f); - Dust dust = Main.dust[idx]; - dust.noGravity = true; - dust.velocity *= 0.1f; - dust.velocity += Projectile.velocity * 0.1f; - dust.position.X -= num93; - dust.position.Y -= num94; - - if (Main.rand.NextBool(20)) - { - int num97 = 4; - int num98 = Dust.NewDust(new Vector2(Projectile.position.X + (float)num97, Projectile.position.Y + (float)num97), Projectile.width - num97 * 2, Projectile.height - num97 * 2, 127, 0f, 0f, 100, default, 0.6f); - Main.dust[num98].velocity *= 0.25f; - Main.dust[num98].velocity += Projectile.velocity * 0.5f; - } - } - } - - public override void OnKill(int timeLeft) - { - if (Projectile.owner == Main.myPlayer) - { - int proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); - if (proj.WithinBounds(Main.maxProjectiles)) - Main.projectile[proj].DamageType = DamageClass.Ranged; - } - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(ModContent.BuffType(), 300); - } - - public override bool PreDraw(ref Color lightColor) - { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor); - return false; - } - } -} diff --git a/Projectiles/Ranged/DragonsBreathRound.png b/Projectiles/Ranged/DragonsBreathRound.png deleted file mode 100644 index 2599eb14ac0236f9ad138cd2cd503d75c36faab5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 129 zcmeAS@N?(olHy`uVBq!ia0vp^Oh7Ed!3HF~v+~XZDaPU;cPEB*=VV?2Io6&ojv*W~ zlmA4f{+Qng1f7gr6951I@7HQNnUGj9q0O0V;j`;+j9ab<98QSb9my8jB6#@hjI54C a1_rMV0r}(6(fUAR7(8A5T-G@yGywoRCn`z+ diff --git a/Sounds/Item/WeldingBurn.ogg b/Sounds/Item/WeldingBurn.ogg new file mode 100644 index 0000000000000000000000000000000000000000..07b57418b65164206826630f4e29346f6d827e31 GIT binary patch literal 6337 zcmai22|SeR_kU$y8w^c_hKLb2W2pBdeI```cn^ZUJ@=Y2lU`<&-F=Q-zm&w0=LI{N!NLmQy) zSDDKC;FQ<{3ZD{RbXWv2Fp@jPXI1rm$uE4o!3{n~?#{n2?oKYHM2$KH3t#(R*M0tV zM*4t$DDZf|PmU4($lyStD~~&M{6eEp z{9vCnxUC&59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j4ubvQO?tNw^u9uY&A<$2VH# zMW1(m^7!C>r@36#Ub<3N%lxI0?l<^vPkomQ=M!R12K?-(rUwdFvog6ZpNxI(G+5+8mPckf7@bceYGEFGx8cO!dgS)?z%k zGDt@^-7$vdzKK-V&SJQ!c!vfu8?C6CnR924`0@N>O6pZ5A$DG}_(sD0k9Vv!GL|Hol^%QK*!b}mP>6Mo zH%(3*{}O%XWW(!t{L*wHVdcf3QrqP1H(x(o*tYt0)|OvAjiTgtq7@Tdyh$y{%H!s7 zN5tCOG!@aLeT1?6L1a7nvIN{V&5RD#6td~dK9kB%jx}NldK(CsqQh)1P*KWT^LQ1 z*^fvWl?w`~uZplz_cnQSW)b{kS9M4Y9PTZXKM>kbezC5L`EiO;x3qgBL zSQd$~+2Wl?Yu8r!lZyoW`TN99E!z$&((U$#e7pYP3Li9lsrSpdqWPI$rB)31{s)WW BwK4zz literal 0 HcmV?d00001 diff --git a/Sounds/Item/WeldingShoot.ogg b/Sounds/Item/WeldingShoot.ogg new file mode 100644 index 0000000000000000000000000000000000000000..9befb3eb4e7c01607a75d38bfa9b121e182fb7fe GIT binary patch literal 9800 zcmaiZ2Ut_h(*Hqv?+~RJI-v-mhyjr<5I`gls;D&SMVf-rq)3-8y$2)^R7xlUq8N}W zH6YRy1*E8mfE4wA0`Gh8`@i4!-0wV_edg?(o!OcB&7Rp4V`pbm-~{m3b<5+JFwrUM zAmb+s^!BxP^&<_DY1jPy2-y+QOlC})`LByKlf>Zg5d8@d|YH_4e{~^74m~gY#IypUx#M zV{ILj>P17Ssegc@t2YfesAYV~Ohd~|^_Vs?(z#@&N=A9C5T>bRP6m)Ta6>2|d^iOS z04xA-T^PocenTII$tV#I%FfUuQ3Tnz?2I@9#32#h{dWgdaO4C43LspZHo0s`-)#ut z3=vEAEk?LrI#&s$jyG9A(7xOjb?~ZasBrfhf{D;DT2TU^H`Vn7qB&5c&OTNk1_E~X zd3|3CROb8ANjxgPM<@3h8fhr^xjg-n^5;io$;zwZ4a1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V?d00001 From b364e50f4f3e7e5bca802b77a543156bab26356c Mon Sep 17 00:00:00 2001 From: Xyk Date: Thu, 19 Oct 2023 21:04:21 -0700 Subject: [PATCH 30/95] Small flamethrower adjustments Blood boiler visuals and Dragons Breath initial firerate and damage --- Items/Weapons/Ranged/DragonsBreath.cs | 8 ++++---- Projectiles/Ranged/BloodBoilerFire.cs | 25 ++++++++++++++++--------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/Items/Weapons/Ranged/DragonsBreath.cs b/Items/Weapons/Ranged/DragonsBreath.cs index 69f6cacd9a..e8918c0e10 100644 --- a/Items/Weapons/Ranged/DragonsBreath.cs +++ b/Items/Weapons/Ranged/DragonsBreath.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Ranged public SlotId WeldSoundSlot; - public int BetweenShotsPause = 24; + public int BetweenShotsPause = 14; public float Counter = 2; public float MaxFirerateShots = 20; public float WeldingShots = 50; @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - Item.damage = 505; + Item.damage = 493; Item.DamageType = DamageClass.Ranged; Item.width = 94; Item.height = 72; @@ -71,7 +71,7 @@ namespace CalamityMod.Items.Weapons.Ranged { if (BetweenShotsPause > 4) { - BetweenShotsPause -= 2; + BetweenShotsPause -= 1; Item.reuseDelay = BetweenShotsPause; } Counter = 2; @@ -98,7 +98,7 @@ namespace CalamityMod.Items.Weapons.Ranged if (WeldingShots <= 0) { Counter = 2; - BetweenShotsPause = 24; + BetweenShotsPause = 14; Item.reuseDelay = BetweenShotsPause; SoundEngine.PlaySound(SpeedBlaster.Empty, player.Center); Projectile.NewProjectile(source, player.Center, new Vector2(5 * -player.direction, -5), ModContent.ProjectileType(), Main.zenithWorld ? 250000 : 1, knockback, player.whoAmI); diff --git a/Projectiles/Ranged/BloodBoilerFire.cs b/Projectiles/Ranged/BloodBoilerFire.cs index 2fc84addb3..d34aba2910 100644 --- a/Projectiles/Ranged/BloodBoilerFire.cs +++ b/Projectiles/Ranged/BloodBoilerFire.cs @@ -21,6 +21,8 @@ namespace CalamityMod.Projectiles.Ranged public float particleSize = 15; public Vector2 bloodCloudReturn; public bool improvedHeal = false; + public bool setHomingVelocity = false; + public float HomingVelocity = 0.18f; public override void SetDefaults() { Projectile.width = 43; @@ -111,12 +113,17 @@ namespace CalamityMod.Projectiles.Ranged if (Projectile.ai[1] == 1f) // Dusts as the projectile homes back in on the player { + if (!setHomingVelocity) + { + HomingVelocity = Main.rand.NextFloat(0.29f, 0.32f); + setHomingVelocity = true; + } Projectile.extraUpdates = 5; bool dustEffect = Main.rand.NextBool(3) ? false : true; int dustColor = dustEffect ? 296 : 60; Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(dustEffect ? 0 : 5, dustEffect ? 0 : 5), dustColor); dust.scale = dustEffect ? Main.rand.NextFloat(1.1f, 1.45f) : Main.rand.NextFloat(0.9f, 1.2f); - dust.velocity = dustEffect ? Vector2.Zero : Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(0.7f, 1.2f); + dust.velocity = dustEffect ? Projectile.velocity * Main.rand.NextFloat(0.2f, 0.4f) : Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(0.7f, 1.2f); dust.alpha = 100; dust.noLight = true; dust.noGravity = true; @@ -138,27 +145,27 @@ namespace CalamityMod.Projectiles.Ranged // Home back in on the player. if (Projectile.velocity.X < xDist) { - Projectile.velocity.X = Projectile.velocity.X + 0.3f; + Projectile.velocity.X = Projectile.velocity.X + HomingVelocity; if (Projectile.velocity.X < 0f && xDist > 0f) - Projectile.velocity.X += 0.3f; + Projectile.velocity.X += HomingVelocity; } else if (Projectile.velocity.X > xDist) { - Projectile.velocity.X = Projectile.velocity.X - 0.3f; + Projectile.velocity.X = Projectile.velocity.X - HomingVelocity; if (Projectile.velocity.X > 0f && xDist < 0f) - Projectile.velocity.X -= 0.3f; + Projectile.velocity.X -= HomingVelocity; } if (Projectile.velocity.Y < yDist) { - Projectile.velocity.Y = Projectile.velocity.Y + 0.3f; + Projectile.velocity.Y = Projectile.velocity.Y + HomingVelocity; if (Projectile.velocity.Y < 0f && yDist > 0f) - Projectile.velocity.Y += 0.3f; + Projectile.velocity.Y += HomingVelocity; } else if (Projectile.velocity.Y > yDist) { - Projectile.velocity.Y = Projectile.velocity.Y - 0.3f; + Projectile.velocity.Y = Projectile.velocity.Y - HomingVelocity; if (Projectile.velocity.Y > 0f && yDist < 0f) - Projectile.velocity.Y -= 0.3f; + Projectile.velocity.Y -= HomingVelocity; } if (Projectile.timeLeft == 5) // Absolutely make sure the player gets the chance to heal Projectile.Center = playerCenter; From daa334f79c6873ee6319358bc999bea3d61583f5 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 21 Oct 2023 03:21:40 +0700 Subject: [PATCH 31/95] shart cannon --- Items/Weapons/Ranged/Photoviscerator.cs | 2 +- Projectiles/Ranged/DeadSunExplosion.cs | 12 +-- Projectiles/Ranged/ExoFlare.cs | 8 +- Projectiles/Ranged/ExoLight.cs | 89 +++++++++----------- Projectiles/Ranged/PhotovisceratorHoldout.cs | 47 ++++++++--- 5 files changed, 84 insertions(+), 74 deletions(-) diff --git a/Items/Weapons/Ranged/Photoviscerator.cs b/Items/Weapons/Ranged/Photoviscerator.cs index 6546f24bcf..055439d817 100644 --- a/Items/Weapons/Ranged/Photoviscerator.cs +++ b/Items/Weapons/Ranged/Photoviscerator.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged // Left-click stats public static float AmmoNotConsumeChance = 0.95f; - public static int LightBombCooldown = 10; + public static int LightBombCooldown = 15; // Right-click stats public static float RightClickVelocityMult = 2.5f; diff --git a/Projectiles/Ranged/DeadSunExplosion.cs b/Projectiles/Ranged/DeadSunExplosion.cs index 36489d1ddf..d25f4923bd 100644 --- a/Projectiles/Ranged/DeadSunExplosion.cs +++ b/Projectiles/Ranged/DeadSunExplosion.cs @@ -33,11 +33,11 @@ namespace CalamityMod.Projectiles.Ranged } public override void AI() { - Particle explosion = new DetailedExplosion(Projectile.Center, Vector2.Zero, color1, new Vector2(1f, 1f), Main.rand.NextFloat(-5, 5), 0f, ExplosionRadius * 0.0065f + 0.1f, Main.rand.Next(15, 22)); + Particle explosion = new DetailedExplosion(Projectile.Center, Vector2.Zero, color1, Vector2.One, Main.rand.NextFloat(-5, 5), 0f, ExplosionRadius * 0.0065f + 0.1f, Main.rand.Next(15, 22)); GeneralParticleHandler.SpawnParticle(explosion); - Particle explosion2 = new DetailedExplosion(Projectile.Center, Vector2.Zero, Color.Black, new Vector2(1f, 1f), Main.rand.NextFloat(-5, 5), 0f, ExplosionRadius * 0.0045f + 0.1f, Main.rand.Next(15, 22), false); + Particle explosion2 = new DetailedExplosion(Projectile.Center, Vector2.Zero, Color.Black, Vector2.One, Main.rand.NextFloat(-5, 5), 0f, ExplosionRadius * 0.0045f + 0.1f, Main.rand.Next(15, 22), false); GeneralParticleHandler.SpawnParticle(explosion2); - Particle explosion3 = new DetailedExplosion(Projectile.Center, Vector2.Zero, Color.Black, new Vector2(1f, 1f), Main.rand.NextFloat(-5, 5), 0f, ExplosionRadius * 0.0030f + 0.1f, Main.rand.Next(15, 22), false); + Particle explosion3 = new DetailedExplosion(Projectile.Center, Vector2.Zero, Color.Black, Vector2.One, Main.rand.NextFloat(-5, 5), 0f, ExplosionRadius * 0.0030f + 0.1f, Main.rand.Next(15, 22), false); GeneralParticleHandler.SpawnParticle(explosion3); Particle orb = new GenericBloom(Projectile.Center, Projectile.velocity, color1, ExplosionRadius * 0.0085f + 0.05f, 10, true); GeneralParticleHandler.SpawnParticle(orb); @@ -48,9 +48,9 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < numberOfDusts; i++) { float rot = MathHelper.ToRadians(i * rotFactor); - Vector2 offset = new Vector2(Main.rand.NextFloat(ExplosionRadius * 0.2f, 3.1f), 0).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f)); - Vector2 velOffset = new Vector2(Main.rand.NextFloat(ExplosionRadius * 0.2f, 3.1f), 0).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f)); - Dust dust = Dust.NewDustPerfect(Projectile.Center + offset, Main.rand.NextBool(4) ? 229 : Projectile.ai[1] == 5 ? 226 : 156, new Vector2(velOffset.X, velOffset.Y)); + Vector2 offset = (Vector2.UnitX * Main.rand.NextFloat(ExplosionRadius * 0.2f, 3.1f)).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f)); + Vector2 velOffset = (Vector2.UnitX * Main.rand.NextFloat(ExplosionRadius * 0.2f, 3.1f)).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f)); + Dust dust = Dust.NewDustPerfect(Projectile.Center + offset, Main.rand.NextBool(4) ? 229 : Projectile.ai[1] == 5 ? 226 : 156, velOffset); dust.noGravity = dust.type == 226? false : true; dust.color = dust.type == 226 ? color1 : default; dust.velocity = velOffset; diff --git a/Projectiles/Ranged/ExoFlare.cs b/Projectiles/Ranged/ExoFlare.cs index cc2ada2684..1f4fcb94ae 100644 --- a/Projectiles/Ranged/ExoFlare.cs +++ b/Projectiles/Ranged/ExoFlare.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Ranged public override void SetStaticDefaults() { ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; + ProjectileID.Sets.TrailCacheLength[Projectile.type] = 24; } public override void SetDefaults() @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.Kill(); // Movement around the owner. - Projectile.Center = owner.Center + OffsetRotation.ToRotationVector2() * (float)Math.Cos(OffsetRotation * 0.3f) * owner.Size * 0.5f; + Projectile.Center = owner.Center + OffsetRotation.ToRotationVector2() * MathF.Cos(OffsetRotation * 0.3f) * owner.Size * 0.5f; Projectile.rotation = (Projectile.position - Projectile.oldPos[1]).ToRotation(); OffsetRotation += OffsetSpeed; } @@ -75,13 +75,13 @@ namespace CalamityMod.Projectiles.Ranged Texture2D lightTexture = ModContent.Request("CalamityMod/ExtraTextures/SmallGreyscaleCircle").Value; for (int i = 0; i < Projectile.oldPos.Length; i++) { - float colorInterpolation = (float)Math.Cos(Projectile.timeLeft / 16f + Main.GlobalTimeWrappedHourly / 20f + i / (float)Projectile.oldPos.Length * MathHelper.Pi) * 0.5f + 0.5f; + float colorInterpolation = MathF.Cos(Projectile.timeLeft / 16f + Main.GlobalTimeWrappedHourly / 20f + i / (float)Projectile.oldPos.Length * MathHelper.Pi) * 0.5f + 0.5f; Color color = Color.Lerp(Color.LightGreen, Color.LightPink, colorInterpolation) * 0.4f; color.A = 0; Vector2 drawPosition = Projectile.oldPos[i] + lightTexture.Size() * 0.5f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY) + new Vector2(-25f, -25f); Color outerColor = color; Color innerColor = color * 0.5f; - float intensity = 0.9f + 0.15f * (float)Math.Cos(Main.GlobalTimeWrappedHourly % 60f * MathHelper.TwoPi); + float intensity = 0.9f + 0.15f * MathF.Cos(Main.GlobalTimeWrappedHourly % 60f * MathHelper.TwoPi); // Become smaller the futher along the old positions we are. intensity *= MathHelper.Lerp(0.15f, 1f, 1f - i / (float)Projectile.oldPos.Length); diff --git a/Projectiles/Ranged/ExoLight.cs b/Projectiles/Ranged/ExoLight.cs index c4cf073c69..ae8e01d17a 100644 --- a/Projectiles/Ranged/ExoLight.cs +++ b/Projectiles/Ranged/ExoLight.cs @@ -1,4 +1,6 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using System.IO; @@ -6,7 +8,6 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; -using CalamityMod.Buffs.DamageOverTime; namespace CalamityMod.Projectiles.Ranged { @@ -19,25 +20,13 @@ namespace CalamityMod.Projectiles.Ranged public Vector2 InitialCenter; public Vector2 Destination; public const float MaxRadius = 90f; - public float Time - { - get => Projectile.ai[0]; - set => Projectile.ai[0] = value; - } - public int DustType - { - get => (int)Projectile.ai[1]; - set => Projectile.ai[1] = value; - } - public float YDirection - { - get => Projectile.localAI[1]; - set => Projectile.localAI[1] = value; - } + public ref float YDirection => ref Projectile.ai[0]; + public ref float Time => ref Projectile.ai[1]; + public override void SetStaticDefaults() { ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 15; + ProjectileID.Sets.TrailCacheLength[Projectile.type] = 36; } public override void SetDefaults() @@ -53,12 +42,11 @@ namespace CalamityMod.Projectiles.Ranged public override void SendExtraAI(BinaryWriter writer) { - writer.Write(YDirection); writer.WriteVector2(Destination); } + public override void ReceiveExtraAI(BinaryReader reader) { - YDirection = reader.ReadSingle(); Destination = reader.ReadVector2(); } @@ -70,60 +58,41 @@ namespace CalamityMod.Projectiles.Ranged if (Projectile.localAI[0] == 0f) { InitialCenter = Projectile.Center; + Projectile.localAI[0] = 1f; if (Main.myPlayer == Projectile.owner) { Destination = Main.MouseWorld; Projectile.netUpdate = true; } - DustType = Main.rand.NextBool() ? 107 : 234; - if (Main.rand.NextBool(4)) - { - DustType = 269; - } - Projectile.localAI[0] = 1f; } if (Destination == Vector2.Zero) return; - if (Time <= 90f) + if (Time <= 60f) { - Projectile.position = Vector2.Lerp(InitialCenter, Destination, Time / 90f); - Projectile.position.Y += (float)Math.Sin(Time / 90f * MathHelper.TwoPi) * 75f; + Projectile.Center = Vector2.Lerp(InitialCenter, Destination, Time / 60f); + Projectile.Center += (Vector2.UnitY * MathF.Sin(Time / 60f * MathHelper.TwoPi) * 75f * YDirection).RotatedBy(Projectile.velocity.ToRotation()); } - else if (Time < 180f) + else if (Time < 120f) { // For those who haven't seen this yet (namely in the 1.4 source), this allows you to achieve a // fade-in and fade-out effect with relative ease. At 90, multiply by 0, and somewhere in-between until 115, where you multiply by 1. // And then do the same for the fade-out effect of 180f-165. These inverse linear interpolations cannot overlap by definition because // their ranges do not overlap. Overall a really cool trick. - float radius = MaxRadius * Utils.GetLerpValue(90f, 115f, Time, true) * Utils.GetLerpValue(180f, 165f, Time, true); - radius *= 1f + (float)Math.Cos(Main.GlobalTimeWrappedHourly / 24f) * 0.25f; + float radius = MaxRadius * Utils.GetLerpValue(60f, 75f, Time, true) * Utils.GetLerpValue(120f, 105f, Time, true); + radius *= 1f + MathF.Cos(Main.GlobalTimeWrappedHourly / 24f) * 0.25f; if (radius < 5f) radius = 5f; - Projectile.Center = Destination + ((Time - 90) / 90f * MathHelper.ToRadians(720f) + (YDirection == -1).ToInt() * MathHelper.Pi).ToRotationVector2() * radius; + Projectile.Center = Destination + ((Time - 60) / 60f * MathHelper.ToRadians(720f) + (YDirection == -1).ToInt() * MathHelper.Pi).ToRotationVector2() * radius; } - else if (Time == 180f) + else if (Time == 120f) Projectile.Kill(); Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; Time++; } - public void GenerateRotationalDust() - { - for (int i = 0; i < 9; i++) - { - float angle = Time / 45f + i / 9f * MathHelper.TwoPi; - Vector2 offsetSpan = angle.ToRotationVector2() * Projectile.Size * 0.65f * Projectile.scale; - Vector2 edgePosition = Projectile.Center + offsetSpan.RotatedBy(Projectile.rotation); - Dust dust = Dust.NewDustPerfect(edgePosition + Main.rand.NextVector2Circular(4f, 4f), DustType); - dust.velocity = Vector2.Zero; - dust.noGravity = true; - dust.scale = 0.65f; - } - } - public override Color? GetAlpha(Color lightColor) { return CalamityUtils.MulticolorLerp(Time / 60f % 1f, new Color[] @@ -138,7 +107,7 @@ namespace CalamityMod.Projectiles.Ranged Texture2D lightTexture = ModContent.Request(Texture).Value; for (int i = 0; i < Projectile.oldPos.Length; i++) { - float colorInterpolation = (float)Math.Cos(Projectile.timeLeft / 16f + Main.GlobalTimeWrappedHourly / 20f + i / (float)Projectile.oldPos.Length * MathHelper.Pi) * 0.5f + 0.5f; + float colorInterpolation = MathF.Cos(Projectile.timeLeft / 16f + Main.GlobalTimeWrappedHourly / 20f + i / (float)Projectile.oldPos.Length * MathHelper.Pi) * 0.5f + 0.5f; Color color = CalamityUtils.MulticolorLerp(MathHelper.Clamp(colorInterpolation, 0f, 0.99f), new Color[] { Color.PaleGreen, @@ -149,7 +118,7 @@ namespace CalamityMod.Projectiles.Ranged Vector2 drawPosition = Projectile.oldPos[i] + lightTexture.Size() * 0.5f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY) + new Vector2(-15f, -15f); Color outerColor = color; Color innerColor = color * 0.5f; - float intensity = 0.9f + 0.15f * (float)Math.Cos(Main.GlobalTimeWrappedHourly % 60f * MathHelper.TwoPi); + float intensity = 0.9f + 0.15f * MathF.Cos(Main.GlobalTimeWrappedHourly % 60f * MathHelper.TwoPi); // Become smaller the futher along the old positions we are. intensity *= MathHelper.Lerp(0.15f, 1f, 1f - i / (float)Projectile.oldPos.Length); @@ -175,9 +144,29 @@ namespace CalamityMod.Projectiles.Ranged Vector2 vel = Vector2.UnitY.RotatedByRandom(MathHelper.TwoPi) * 16f; Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, vel, projID, Projectile.damage, Projectile.knockBack * 0.3f, Projectile.owner); } + + // If the explosion happens naturally, there's instead only 1 giant explosion instead of 2 separate ones + if (Time >= 120f && YDirection == 1) + return; + + float scaleBonus = Time >= 120f ? Main.rand.NextFloat(2.4f, 3.2f) : Main.rand.NextFloat(0.8f, 1.6f); + Projectile.scale = 4.5f * scaleBonus; + Particle pinkBoom = new DetailedExplosion(Projectile.Center, Vector2.Zero, Color.Violet, Vector2.One, Main.rand.NextFloat(0f, MathHelper.TwoPi), 0f, 0.5f * scaleBonus, 12); + GeneralParticleHandler.SpawnParticle(pinkBoom); + Particle greenBoom = new DetailedExplosion(Projectile.Center, Vector2.Zero, Color.PaleGreen, Vector2.One, Main.rand.NextFloat(0f, MathHelper.TwoPi), 0f, 0.4f * scaleBonus, 12); + GeneralParticleHandler.SpawnParticle(greenBoom); + + // we should probably have a generic util to do this whole thing + Projectile.maxPenetrate = -1; + Projectile.penetrate = -1; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; + Projectile.Damage(); } } + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width * Projectile.scale * 0.5f, targetHitbox); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 360); public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 360); diff --git a/Projectiles/Ranged/PhotovisceratorHoldout.cs b/Projectiles/Ranged/PhotovisceratorHoldout.cs index 0d180dfb21..4b255cc215 100644 --- a/Projectiles/Ranged/PhotovisceratorHoldout.cs +++ b/Projectiles/Ranged/PhotovisceratorHoldout.cs @@ -1,5 +1,7 @@ using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Particles; using Microsoft.Xna.Framework; +using System; using Terraria; using Terraria.Audio; using Terraria.ID; @@ -30,9 +32,30 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { - UpdateProjectileHeldVariables(); + Vector2 armPosition = Owner.RotatedRelativePoint(Owner.MountedCenter, true); + UpdateProjectileHeldVariables(armPosition); ManipulatePlayerVariables(); + // Orange exo energy as the back "flames" + Color energyColor = Color.Orange; + Vector2 flamePosition = armPosition + Projectile.velocity * Projectile.width * 0.12f; + Vector2 verticalOffset = Vector2.UnitY.RotatedBy(Projectile.rotation); + if (Math.Cos(Projectile.rotation) < 0f) + verticalOffset *= -1f; + + if (Main.rand.NextBool(4)) + { + Vector2 flameAngle = -Vector2.UnitY.RotatedBy(Projectile.rotation + MathHelper.ToRadians(Main.rand.NextFloat(270f, 300f) * Projectile.spriteDirection)); + SquishyLightParticle exoEnergy = new(flamePosition - verticalOffset * 26f, flameAngle * Main.rand.NextFloat(0.4f, 1.6f), 0.25f, energyColor, 20); + GeneralParticleHandler.SpawnParticle(exoEnergy); + SquishyLightParticle exoEnergy2 = new(armPosition - verticalOffset * 22f, flameAngle * Main.rand.NextFloat(0.3f, 1.2f), 0.2f, energyColor, 12); + GeneralParticleHandler.SpawnParticle(exoEnergy2); + } + + // Create light around the crystal + Lighting.AddLight(armPosition + Projectile.velocity * 42f - verticalOffset * 10f, 0.8f, 0.8f, 0.8f); + Lighting.AddLight(armPosition + Projectile.velocity * 96f + verticalOffset * 6f, 0.4f, 0.4f, 0.4f); + // Despawn the projectile if the player can't shoot // Any forced lifespan (triggered by attacking right click to prevent click spamming) will have priority if (!OwnerCanShoot) @@ -59,24 +82,24 @@ namespace CalamityMod.Projectiles.Ranged { // Can't shoot on frame 1 as it can't use ammo yet if (ShootTimer < 0f) - RightClickAttack(); + RightClickAttack(armPosition, verticalOffset); ShootTimer--; } else if (!Owner.Calamity().mouseRight && Owner.channel) { ShootTimer++; - LeftClickAttack(); + LeftClickAttack(armPosition, verticalOffset); } } - public void LeftClickAttack() + public void LeftClickAttack(Vector2 armPosition, Vector2 verticalOffset) { // Consume ammo and retrieve projectile stats; has a chance to not consume ammo Owner.PickAmmo(Owner.ActiveItem(), out _, out float shootSpeed, out int damage, out float knockback, out _, Main.rand.NextFloat() <= AmmoNotConsumeChance); var source = Projectile.GetSource_FromThis(); - Vector2 position = Projectile.Center + Projectile.velocity * 40f; + Vector2 position = armPosition + Projectile.velocity * 48f - verticalOffset * 10f; Vector2 velocity = Projectile.velocity * shootSpeed; // Main fire stream @@ -90,18 +113,16 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 2; i++) { - position += Projectile.velocity * 64f; + Vector2 bombPos = armPosition + Projectile.velocity * 108f + verticalOffset * 6f; int yDirection = (i == 0).ToDirectionInt(); Vector2 bombVel = velocity.RotatedBy(0.2f * yDirection); - Projectile lightBomb = Projectile.NewProjectileDirect(source, position, bombVel, ProjectileType(), damage, knockback, Projectile.owner); - lightBomb.localAI[1] = yDirection; - lightBomb.netUpdate = true; + Projectile.NewProjectile(source, bombPos, bombVel, ProjectileType(), damage, knockback, Projectile.owner, yDirection); } } } - public void RightClickAttack() + public void RightClickAttack(Vector2 armPosition, Vector2 verticalOffset) { // Multiplied by the ratio of attack speed gained from modifiers ShootTimer = (RightClickCooldown * Owner.ActiveItem().useTime / (float)LightBombCooldown) - 1f; @@ -111,14 +132,14 @@ namespace CalamityMod.Projectiles.Ranged Owner.PickAmmo(Owner.ActiveItem(), out _, out float shootSpeed, out int damage, out float knockback, out _); var source = Projectile.GetSource_FromThis(); - Vector2 position = Projectile.Center + Projectile.velocity * 120f; + Vector2 position = armPosition + Projectile.velocity * 140f + verticalOffset * 6f; Vector2 velocity = Projectile.velocity * shootSpeed * RightClickVelocityMult; SoundEngine.PlaySound(SoundID.Item34, Owner.MountedCenter); Projectile.NewProjectile(source, position, velocity, ProjectileType(), damage, knockback, Projectile.owner); } - public void UpdateProjectileHeldVariables() + public void UpdateProjectileHeldVariables(Vector2 armPosition) { if (Main.myPlayer == Projectile.owner) { @@ -132,7 +153,7 @@ namespace CalamityMod.Projectiles.Ranged } } - Projectile.position = Owner.RotatedRelativePoint(Owner.MountedCenter, true) - Projectile.Size * 0.5f; + Projectile.position = armPosition - Projectile.Size * 0.5f + Projectile.velocity.SafeNormalize(Vector2.UnitY) * 28f; Projectile.rotation = Projectile.velocity.ToRotation(); if (Projectile.spriteDirection == -1) Projectile.rotation += MathHelper.Pi; From d21e76997964009e6ff2aaf0cc0e2723e6bfd275 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 21 Oct 2023 16:27:18 +0700 Subject: [PATCH 32/95] Overloaded Blaster revised --- .../TinyGreyscaleCircle.png | Bin Items/Weapons/Ranged/OverloadedBlaster.cs | 24 ++-- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 2 +- Projectiles/Melee/Orbacle.cs | 1 + Projectiles/Ranged/SlimeBolt.cs | 128 ++++++++++++------ 5 files changed, 94 insertions(+), 61 deletions(-) rename Projectiles/Melee/Orbacle.png => ExtraTextures/TinyGreyscaleCircle.png (100%) diff --git a/Projectiles/Melee/Orbacle.png b/ExtraTextures/TinyGreyscaleCircle.png similarity index 100% rename from Projectiles/Melee/Orbacle.png rename to ExtraTextures/TinyGreyscaleCircle.png diff --git a/Items/Weapons/Ranged/OverloadedBlaster.cs b/Items/Weapons/Ranged/OverloadedBlaster.cs index 411bed4f31..873af079aa 100644 --- a/Items/Weapons/Ranged/OverloadedBlaster.cs +++ b/Items/Weapons/Ranged/OverloadedBlaster.cs @@ -16,8 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.DamageType = DamageClass.Ranged; Item.width = 42; Item.height = 34; - Item.useTime = 18; - Item.useAnimation = 18; + Item.useAnimation = Item.useTime = 22; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 1.5f; @@ -25,29 +24,22 @@ namespace CalamityMod.Items.Weapons.Ranged Item.rare = ItemRarityID.LightRed; Item.UseSound = SoundID.Item9; Item.autoReuse = true; - Item.shootSpeed = 4.5f; + Item.shootSpeed = 5f; Item.shoot = ModContent.ProjectileType(); Item.useAmmo = AmmoID.Gel; } - public override Vector2? HoldoutOffset() - { - return new Vector2(-4, -5); - } + public override Vector2? HoldoutOffset() => new Vector2(-4, -5); - public override bool CanConsumeAmmo(Item ammo, Player player) - { - if (Main.rand.Next(0, 100) < 33) - return false; - return true; - } + public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= 25; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - for (int index = 0; index < 3; ++index) + Vector2 newPos = position + velocity * 6f; + for (int i = 0; i < 3; i++) { - Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(20f)) * Main.rand.NextFloat(0.6f, 1.1f); - Projectile.NewProjectile(source, position, newVel, type, damage, knockback, player.whoAmI); + Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(15f)) * Main.rand.NextFloat(0.8f, 1.2f); + Projectile.NewProjectile(source, newPos, newVel, type, damage, knockback, player.whoAmI); } return false; } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index c772ecd86c..4ddd5d7e4d 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -830,7 +830,7 @@ OverloadedBlaster: { Overloaded slime doesn't pierce, but deals double damage The slime bounces off of walls at high-velocity Uses gel for ammo - 33% chance to save ammo + 25% chance to save ammo ''' } diff --git a/Projectiles/Melee/Orbacle.cs b/Projectiles/Melee/Orbacle.cs index 45e1a73cce..afb422575d 100644 --- a/Projectiles/Melee/Orbacle.cs +++ b/Projectiles/Melee/Orbacle.cs @@ -7,6 +7,7 @@ namespace CalamityMod.Projectiles.Melee public class Orbacle : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; + public override string Texture => "CalamityMod/ExtraTextures/TinyGreyscaleCircle"; private static int Lifetime = 40; public override void SetDefaults() diff --git a/Projectiles/Ranged/SlimeBolt.cs b/Projectiles/Ranged/SlimeBolt.cs index 7a635d5357..bb1125def5 100644 --- a/Projectiles/Ranged/SlimeBolt.cs +++ b/Projectiles/Ranged/SlimeBolt.cs @@ -1,6 +1,7 @@ using CalamityMod.Particles; using CalamityMod.Projectiles.Melee; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -10,43 +11,46 @@ namespace CalamityMod.Projectiles.Ranged public class SlimeBolt : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public override string Texture => "CalamityMod/ExtraTextures/TinyGreyscaleCircle"; + + public static int Lifetime => 270; + public static float Fadetime => 225f; + public static float EmpowerTime => 135f; + public static Color SlimeColor => new Color (133, 133, 224); + + public ref float Time => ref Projectile.ai[0]; + public bool Empowered => Projectile.ai[0] >= EmpowerTime; + public ref float BloomPower => ref Projectile.ai[1]; + public bool Bounced => Projectile.ai[2] >= 1f; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; + ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + } - public bool Empowered = false; - public int countdown = 90; - public bool postBounce = false; public override void SetDefaults() { - Projectile.width = 18; - Projectile.height = 18; + Projectile.width = Projectile.height = 20; Projectile.friendly = true; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = -1; - Projectile.timeLeft = 300; - Projectile.extraUpdates = 2; + Projectile.MaxUpdates = 3; + Projectile.timeLeft = Lifetime; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 15 * Projectile.MaxUpdates; } public override void AI() { - if (countdown < 81) - { - Particle orb = new GenericBloom(Projectile.Center, Vector2.Zero, Color.SkyBlue, Empowered ? 0.22f : 0.17f, postBounce ? 2 : 5, true); - GeneralParticleHandler.SpawnParticle(orb); - } - if (countdown > -55 && Main.rand.NextBool(postBounce ? 2 : 7)) - { - Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(10, 10), Main.rand.NextBool(3) ? 16 : 20); - dust.scale = Main.rand.NextFloat(0.3f, 0.7f); - dust.velocity = -Projectile.velocity * 0.7f; - } - countdown--; - if (countdown <= 0) - Projectile.velocity *= 0.97f; - Vector3 DustLight = new Vector3(0.100f, 0.150f, 0.200f); - Lighting.AddLight(Projectile.Center, DustLight * 3); - if (countdown == -55) + Time++; + if (Time == EmpowerTime) { + Projectile.penetrate = 1; Projectile.damage *= 2; + Projectile.velocity *= 0f; + Projectile.rotation = Main.rand.NextFloat(0f, MathHelper.TwoPi); + float numberOfDusts = 10; float rotFactor = 360f / numberOfDusts; for (int i = 0; i < numberOfDusts; i++) @@ -60,42 +64,44 @@ namespace CalamityMod.Projectiles.Ranged dust.scale = Main.rand.NextFloat(1.2f, 1.9f); } } - if (countdown < -55 && Projectile.timeLeft % 10 == 0) - { - Empowered = true; - SparkParticle spark1 = new SparkParticle(Projectile.Center, new Vector2(0, 2), false, 7, 0.9f, Color.SkyBlue); - GeneralParticleHandler.SpawnParticle(spark1); - SparkParticle spark2 = new SparkParticle(Projectile.Center, new Vector2(0, -2), false, 7, 0.9f, Color.SkyBlue); - GeneralParticleHandler.SpawnParticle(spark2); - SparkParticle spark3 = new SparkParticle(Projectile.Center, new Vector2(2, 0), false, 7, 0.9f, Color.SkyBlue); - GeneralParticleHandler.SpawnParticle(spark3); - SparkParticle spark4 = new SparkParticle(Projectile.Center, new Vector2(-2, 0), false, 7, 0.9f, Color.SkyBlue); - GeneralParticleHandler.SpawnParticle(spark4); + else if (Time >= 90f) + Projectile.velocity *= 0.97f; - } if (Empowered) { - Projectile.penetrate = 1; + Projectile.rotation += MathHelper.ToRadians(2f); + if (Time >= Fadetime) + BloomPower = Utils.Remap(Time, Fadetime, Lifetime, 1.5f, 0f); + else + BloomPower = Utils.Remap(Time, EmpowerTime, Fadetime, 0f, 1.5f); } + else if (Main.rand.NextBool(Bounced ? 2 : 7)) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(10, 10), Main.rand.NextBool(3) ? 16 : 20); + dust.scale = Main.rand.NextFloat(0.3f, 0.7f); + dust.velocity = -Projectile.velocity * 0.7f; + } + + Lighting.AddLight(Projectile.Center, 0.3f, 0.3f, 0.5f); } public override bool OnTileCollide(Vector2 oldVelocity) { if (Projectile.velocity.X != oldVelocity.X) { - Projectile.velocity.X = -oldVelocity.X * (postBounce ? 1f : 3f); + Projectile.velocity.X = -oldVelocity.X * (Bounced ? 1f : Utils.Remap(Time, 0f, EmpowerTime, 1.5f, 4f)); } if (Projectile.velocity.Y != oldVelocity.Y) { - Projectile.velocity.Y = -oldVelocity.Y * (postBounce ? 1f : 3f); + Projectile.velocity.Y = -oldVelocity.Y * (Bounced ? 1f : Utils.Remap(Time, 0f, EmpowerTime, 1.5f, 4f)); } - postBounce = true; + Projectile.ai[2]++; return false; } public override void OnKill(int timeLeft) { - Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.SkyBlue, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0f, 0.4f, 25); + Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, SlimeColor, Vector2.One, 0f, 0f, 0.4f, 25); GeneralParticleHandler.SpawnParticle(pulse); } @@ -104,7 +110,7 @@ namespace CalamityMod.Projectiles.Ranged target.AddBuff(BuffID.Slimed, Empowered ? 480 : 180); if (Empowered) { - Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.SkyBlue, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0f, 0.65f, 35); + Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, SlimeColor, Vector2.One, 0f, 0f, 0.65f, 35); GeneralParticleHandler.SpawnParticle(pulse2); float numberOfDusts = 12; float rotFactor = 360f / numberOfDusts; @@ -113,7 +119,7 @@ namespace CalamityMod.Projectiles.Ranged float rot = MathHelper.ToRadians(i * rotFactor); Vector2 offset = new Vector2(Main.rand.NextFloat(1, 3.1f), 0).RotatedBy(rot); Vector2 velOffset = new Vector2(Main.rand.NextFloat(1, 3.1f), 0).RotatedBy(rot); - Dust dust = Dust.NewDustPerfect(Projectile.Center + offset, Main.rand.NextBool(3) ? 34 : 59, new Vector2(velOffset.X, velOffset.Y)); + Dust dust = Dust.NewDustPerfect(Projectile.Center + offset, Main.rand.NextBool(3) ? 34 : 59, velOffset); dust.noGravity = false; dust.alpha = 130; dust.velocity = velOffset; @@ -121,5 +127,39 @@ namespace CalamityMod.Projectiles.Ranged } } } + + public override bool PreDraw(ref Color lightColor) + { + Main.spriteBatch.SetBlendState(BlendState.Additive); + + Texture2D texture = ModContent.Request(Texture).Value; + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + Main.EntitySpriteDraw(texture, drawPosition, null, SlimeColor, Projectile.rotation, texture.Size() * 0.5f, Projectile.scale, SpriteEffects.None, 0); + + if (Empowered) + { + Texture2D shineTex = ModContent.Request("CalamityMod/Particles/Sparkle").Value; + Texture2D bloomTex = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; + Main.EntitySpriteDraw(bloomTex, drawPosition, null, SlimeColor * 0.5f, Projectile.rotation, bloomTex.Size() * 0.5f, BloomPower * Projectile.scale * 0.3f, SpriteEffects.None); + Main.EntitySpriteDraw(shineTex, drawPosition, null, SlimeColor, Projectile.rotation, shineTex.Size() * 0.5f, BloomPower * Projectile.scale, SpriteEffects.None); + } + else + { + for (int i = 0; i < Projectile.oldPos.Length; i++) + { + float completionRatio = i / (float)Projectile.oldPos.Length; + Vector2 trailPos = Projectile.oldPos[i] + texture.Size() * 0.5f - Main.screenPosition; + + // The further the smaller + Color trailColor = Color.Lerp(SlimeColor, Color.Black, completionRatio); + float trailScale = MathHelper.Lerp(0.15f, 1f, 1f - completionRatio); + + Main.EntitySpriteDraw(texture, trailPos, null, trailColor, 0f, texture.Size() * 0.5f, Projectile.scale * trailScale, SpriteEffects.None, 0); + } + } + + Main.spriteBatch.SetBlendState(BlendState.AlphaBlend); + return false; + } } } From 8f33935477fc15c66e9c15306c79f8ef158f3812 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sun, 22 Oct 2023 04:08:25 +0700 Subject: [PATCH 33/95] cleansing blaze tweaks --- Projectiles/Ranged/BrimstoneFireFriendly.cs | 2 ++ Projectiles/Ranged/EssenceFire.cs | 27 ++++++++++++++------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/Projectiles/Ranged/BrimstoneFireFriendly.cs b/Projectiles/Ranged/BrimstoneFireFriendly.cs index b422262db5..e6cfdccb05 100644 --- a/Projectiles/Ranged/BrimstoneFireFriendly.cs +++ b/Projectiles/Ranged/BrimstoneFireFriendly.cs @@ -138,6 +138,8 @@ namespace CalamityMod.Projectiles.Ranged Main.EntitySpriteDraw(fire, firePos, null, innerColor, mainRot, fire.Size() * 0.5f, fireSize, SpriteEffects.None); // Draw the masking smoke + if (MistType > 2 || MistType < 0) + return false; Main.spriteBatch.SetBlendState(BlendState.Additive); Rectangle frame = mist.Frame(1, 3, 0, MistType); Main.EntitySpriteDraw(mist, firePos, frame, Color.Lerp(fireColor, Color.White, 0.3f), mainRot, frame.Size() * 0.5f, fireSize, SpriteEffects.None); diff --git a/Projectiles/Ranged/EssenceFire.cs b/Projectiles/Ranged/EssenceFire.cs index 9013793d7f..1ee9e6186c 100644 --- a/Projectiles/Ranged/EssenceFire.cs +++ b/Projectiles/Ranged/EssenceFire.cs @@ -16,6 +16,7 @@ namespace CalamityMod.Projectiles.Ranged public static int Lifetime => 96; public static int Fadetime => 80; public ref float Time => ref Projectile.ai[0]; + public int MistType = -1; public override void SetDefaults() { @@ -34,6 +35,10 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { Time++; + + if (MistType == -1) + MistType = Main.rand.Next(3); + if (Time > Fadetime) Projectile.velocity *= 0.95f; @@ -55,15 +60,9 @@ namespace CalamityMod.Projectiles.Ranged if (Main.rand.NextBool(20)) { FlameParticle fire = new FlameParticle(Projectile.Center, 20, MathHelper.Clamp(Time * 0.05f, 0.5f, 2f), 0.05f, Color.BlueViolet * 0.5f, Color.DarkBlue * 0.5f); - fire.Velocity = Projectile.velocity.RotatedByRandom(MathHelper.ToRadians(15f)) * 0.6f; + fire.Velocity = Projectile.velocity.RotatedByRandom(MathHelper.ToRadians(6f)) * 0.3f; GeneralParticleHandler.SpawnParticle(fire); } - - if (Main.rand.NextBool(10)) - { - SparkParticle spark = new SparkParticle(Projectile.Center, Projectile.velocity * Main.rand.NextFloat(0.4f, 0.7f), false, Main.rand.Next(7, 11), Main.rand.NextFloat(0.7f, 1.8f), Main.rand.NextBool(4) ? Color.Magenta : Color.DodgerBlue); - GeneralParticleHandler.SpawnParticle(spark); - } } else if (Time == 5f) { @@ -89,12 +88,13 @@ namespace CalamityMod.Projectiles.Ranged public override bool PreDraw(ref Color lightColor) { Texture2D fire = ModContent.Request(Texture).Value; + Texture2D mist = ModContent.Request("CalamityMod/Particles/MediumMist").Value; // The conga line of colors to sift through Color color1 = new Color(160, 100, 255, 200); Color color2 = new Color(160, 50, 255, 70); - Color color3 = new Color(200, 100, 255, 100); - Color color4 = new Color(150, 30, 200, 100); + Color color3 = new Color(120, 100, 255, 100); + Color color4 = new Color(30, 50, 200, 100); float length = ((Time > Fadetime - 10f) ? 0.1f : 0.15f); float vOffset = Math.Min(Time, 20f); float timeRatio = Utils.GetLerpValue(0f, Lifetime, Time); @@ -125,6 +125,15 @@ namespace CalamityMod.Projectiles.Ranged // Draw the main fire Main.EntitySpriteDraw(fire, firePos, null, fireColor, mainRot, fire.Size() * 0.5f, fireSize, SpriteEffects.None); + + // Draw the masking smoke + if (MistType > 2 || MistType < 0) + return false; + Main.spriteBatch.SetBlendState(BlendState.Additive); + Rectangle frame = mist.Frame(1, 3, 0, MistType); + Main.EntitySpriteDraw(mist, firePos, frame, Color.Lerp(fireColor, Color.White, 0.3f), mainRot, frame.Size() * 0.5f, fireSize, SpriteEffects.None); + Main.EntitySpriteDraw(mist, firePos, frame, fireColor, mainRot, frame.Size() * 0.5f, fireSize * 3f, SpriteEffects.None); + Main.spriteBatch.SetBlendState(BlendState.AlphaBlend); } return false; } From f19715e0817024614610541777597b8bd0df18e2 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 23 Oct 2023 21:24:23 +0700 Subject: [PATCH 34/95] resprited cleansing blaze --- Items/Weapons/Ranged/CleansingBlaze.cs | 11 ++++++----- Items/Weapons/Ranged/CleansingBlaze.png | Bin 1097 -> 1710 bytes Items/Weapons/Ranged/CleansingBlazeGlow.png | Bin 775 -> 789 bytes 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Items/Weapons/Ranged/CleansingBlaze.cs b/Items/Weapons/Ranged/CleansingBlaze.cs index f75f7662fe..49e048daed 100644 --- a/Items/Weapons/Ranged/CleansingBlaze.cs +++ b/Items/Weapons/Ranged/CleansingBlaze.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Items.Weapons.Ranged { Item.damage = 240; Item.DamageType = DamageClass.Ranged; - Item.width = 64; - Item.height = 32; + Item.width = 108; + Item.height = 38; Item.useTime = 3; Item.useAnimation = 24; Item.useStyle = ItemUseStyleID.Shoot; @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 12f; + Item.shootSpeed = 11f; Item.useAmmo = AmmoID.Gel; Item.consumeAmmoOnFirstShotOnly = true; Item.rare = ModContent.RarityType(); @@ -39,15 +39,16 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { + Vector2 newPos = position + velocity.SafeNormalize(Vector2.UnitX) * 36f; for (int i = 0; i < 3; i++) { Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(5f)); - Projectile.NewProjectile(source, position, newVel, type, damage, knockback, player.whoAmI); + Projectile.NewProjectile(source, newPos, newVel, type, damage, knockback, player.whoAmI); } return false; } - public override Vector2? HoldoutOffset() => new Vector2(-5, 0); + public override Vector2? HoldoutOffset() => new Vector2(-20, 0); public override void AddRecipes() { diff --git a/Items/Weapons/Ranged/CleansingBlaze.png b/Items/Weapons/Ranged/CleansingBlaze.png index e185d1db7e347e0bc9558a4bcb60b73d7afe64ef..bdf253d486a5f06a6ef62fbabd81481485bbd775 100644 GIT binary patch literal 1710 zcmV;f22uHmP)W)v-xM8!lyHECk~BMOq*fN6Y?G_fYQ zMq`4H27(X`mB%U#RxCk{mTl}qZD1|5T7gn)09!+i=kRrRPVel!cUiW3_1-^c@408@ z&fIUlIcLtydd4N_%J)7o9QmqKJw0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5%uJxVz`ivk#*YsS0oA)lsqL2<<2LNvB0Yz6iSc-c0!SwH zexU+{`KIXO0A%O>TvnD28q*)18wUItZh2y(0+{<--yZJ2`9OZvDt*f|l)ht#a=lDp zG3Tv#1uWbG!o0+~Ff6rrwQf#gSl}1S@eQ2{U@EH_vl-6Jj03^H?AR!)XVm@d1fc@# ziJ;6^%hn6Ayvk%cIWY<>pW$j)s^1l_096(=8g~f-8Xr>kc P00000NkvXXu0mjfgy#tp diff --git a/Items/Weapons/Ranged/CleansingBlazeGlow.png b/Items/Weapons/Ranged/CleansingBlazeGlow.png index a09f3d22481adff614a2256ac43de2360887179a..3a8bdd621d9c36dcae97bb217e0c294c56055a16 100644 GIT binary patch literal 789 zcmV+w1M2*VP)a<6vh)F3Sto}Sfz-1(Vj$wRuFnn3++J=@t~kbL7}DI1rZT@EVQ-Y)q@}iO2I=5 ztq6sJASxb21yK=E3Mx{msG#BtU+BJMnsJlO&X||WlG*w5&HK%_Z)Y|bke^i%2wJ69 z#0ESE_OSZh^=+K9N=qo*=i57UJzDCcv5Q*9>3*W+>B3TgSw`A3U~tZZ##a=QjW_uY zMb%{xnnq`~GB}a!YY$0V%6kDbs?>orP(^VLgji)bH%CV~6u} z%m4iNO6~TiJGAup6ISm=6=2@Q){~y2fWcW$8>?x+v6(5lzTIj6?~3NmYN*Sjc5o8@ zV-~!;zcSo?{pb;0Q6J?)D`d>TXiY|1Ity_VV4nEEyG|p(xU&v^?%gSOc_&eN{x<>w z%(C?m{8%zU$)W3g8%e*My}VQIvTVNA%N1ajA&dZP-3&V{r&ky=w{AGxY-_!(6>Zg$q3TfU-# z!`4Z<#ycDJD<1KTV|*eOV9rB#3l`vEiq@&nakj?N1Y2szBQ`ea+NtOUSLeU zFThMCqtFFlGug{jqv>xIUHRE4n(KbwOLZ8KiwmDWrlD0j@697ofTengxf~DQ@m9~a zs0V=i6zX>L`0Zrg=(od@*BA7*d-@?nI!|k2?;EXmm;iIR(*14*a9jtRXZpSiIT!j> z-zBYg7$zvd{I-mYA2R~?#$oBgSAc1f<{Na)W>M7=&7}fNGx7pVGf=6nh7$)qE>0j& z9%=~hm-tr!mEOEB;XC*)=XPHx4r37(V5zo9lEzEcBaq9H9F`c>iT1PxI3ouq*-KxAN6g2}S{A9s8lsCe@UXQN)GtHUaQy zBss6qXk60VcFX;R4Ytx$EVhyW;Mj?ibK1OD9|6dzES=u^hx#MeT<5Mk4_rI)7=WSF z#9~dX2*jzQwx{~W1|(#1fr?EX6^lw4q;o@a+oeTq;9T`1ma;wxMR&$Afp7G+u>RP@O#_`Ks4#h1tor;qpvEhe}%39ygm0fGIgF0HzoQ;QnBz>$<!Gb~{lLLy!?7v2P&$DIO_)<~dyXqA%Qwr-bqfSWO zuXAxZR3;%i<~OHok4N9E43Fnx)hobYFc=I5gTb&``2%-}>B-S22WkKS002ovPDHLk FV1ke6Ysdfq From e8fba296ed24681fa7238ecf6a49778f25b7f5f8 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 30 Oct 2023 21:34:49 -0400 Subject: [PATCH 35/95] The Sequel begins (Start of Items) --- Items/Accessories/NebulousCore.cs | 59 ++++++++++----------- Items/Accessories/RampartofDeities.cs | 6 +-- Items/Accessories/ToxicHeart.cs | 13 +++-- Items/Accessories/Wings/AureateBooster.cs | 24 ++++----- Items/Accessories/Wings/DrewsWings.cs | 14 ++--- Items/Accessories/Wings/HadalMantle.cs | 14 ++--- Items/Accessories/Wings/MOAB.cs | 6 +-- Items/Accessories/Wings/SilvaWings.cs | 14 ++--- Items/Accessories/Wings/SoulofCryogen.cs | 6 +-- Items/Accessories/Wings/StarlightWings.cs | 14 ++--- Items/Accessories/Wings/TarragonWings.cs | 14 ++--- Items/Accessories/Wings/TracersCelestial.cs | 14 ++--- Items/Accessories/Wings/TracersElysian.cs | 14 ++--- Items/Accessories/Wings/TracersSeraph.cs | 14 ++--- Items/Materials/AshesofCalamity.cs | 6 +-- Items/Materials/BloodOrb.cs | 6 +-- Items/Materials/DarkPlasma.cs | 6 +-- Items/Materials/DivineGeode.cs | 6 +-- Items/Materials/GalacticaSingularity.cs | 6 +-- Items/Materials/TwistingNether.cs | 6 +-- Items/Materials/UnholyEssence.cs | 6 +-- Items/Materials/YharonSoulFragment.cs | 6 +-- Items/Mounts/RimehoundMount.cs | 18 +++---- 23 files changed, 145 insertions(+), 147 deletions(-) diff --git a/Items/Accessories/NebulousCore.cs b/Items/Accessories/NebulousCore.cs index 04f11cc140..1806d72212 100644 --- a/Items/Accessories/NebulousCore.cs +++ b/Items/Accessories/NebulousCore.cs @@ -22,9 +22,9 @@ namespace CalamityMod.Items.Accessories public override void Update(ref float gravity, ref float maxFallSpeed) { - float num = Main.rand.Next(90, 111) * 0.01f; - num *= Main.essScale; - Lighting.AddLight((int)((Item.position.X + (float)(Item.width / 2)) / 16f), (int)((Item.position.Y + (float)(Item.height / 2)) / 16f), 0.35f * num, 0.05f * num, 0.35f * num); + float projLighting = Main.rand.Next(90, 111) * 0.01f; + projLighting *= Main.essScale; + Lighting.AddLight((int)((Item.position.X + (float)(Item.width / 2)) / 16f), (int)((Item.position.Y + (float)(Item.height / 2)) / 16f), 0.35f * projLighting, 0.05f * projLighting, 0.35f * projLighting); } public override void UpdateAccessory(Player player, bool hideVisual) @@ -36,61 +36,60 @@ namespace CalamityMod.Items.Accessories float knockBack = 3f; if (Main.rand.NextBool(15)) { - int num = 0; + int numProj = 0; for (int i = 0; i < Main.maxProjectiles; i++) { if (Main.projectile[i].active && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].type == ModContent.ProjectileType()) { - num++; + numProj++; } } var source = player.GetSource_Accessory(Item); - if (Main.rand.Next(15) >= num && num < 10) + if (Main.rand.Next(15) >= numProj && numProj < 10) { - int num2 = 50; - int num3 = 24; - int num4 = 90; - for (int j = 0; j < num2; j++) + int spawnRadius = 24; + int backupSpawnRadius = 90; + for (int j = 0; j < 50; j++) { - int num5 = Main.rand.Next(200 - j * 2, 400 + j * 2); + int randomProjOffset = Main.rand.Next(200 - j * 2, 400 + j * 2); Vector2 center = player.Center; - center.X += (float)Main.rand.Next(-num5, num5 + 1); - center.Y += (float)Main.rand.Next(-num5, num5 + 1); - if (!Collision.SolidCollision(center, num3, num3) && !Collision.WetCollision(center, num3, num3)) + center.X += (float)Main.rand.Next(-randomProjOffset, randomProjOffset + 1); + center.Y += (float)Main.rand.Next(-randomProjOffset, randomProjOffset + 1); + if (!Collision.SolidCollision(center, spawnRadius, spawnRadius) && !Collision.WetCollision(center, spawnRadius, spawnRadius)) { - center.X += (float)(num3 / 2); - center.Y += (float)(num3 / 2); + center.X += (float)(spawnRadius / 2); + center.Y += (float)(spawnRadius / 2); if (Collision.CanHit(new Vector2(player.Center.X, player.position.Y), 1, 1, center, 1, 1) || Collision.CanHit(new Vector2(player.Center.X, player.position.Y - 50f), 1, 1, center, 1, 1)) { - int num6 = (int)center.X / 16; - int num7 = (int)center.Y / 16; - bool flag = false; - if (Main.rand.NextBool(3) && Main.tile[num6, num7] != null && Main.tile[num6, num7].WallType > 0) + int projTileX = (int)center.X / 16; + int projTileY = (int)center.Y / 16; + bool canSpawnProj = false; + if (Main.rand.NextBool(3) && Main.tile[projTileX, projTileY] != null && Main.tile[projTileX, projTileY].WallType > 0) { - flag = true; + canSpawnProj = true; } else { - center.X -= (float)(num4 / 2); - center.Y -= (float)(num4 / 2); - if (Collision.SolidCollision(center, num4, num4)) + center.X -= (float)(backupSpawnRadius / 2); + center.Y -= (float)(backupSpawnRadius / 2); + if (Collision.SolidCollision(center, backupSpawnRadius, backupSpawnRadius)) { - center.X += (float)(num4 / 2); - center.Y += (float)(num4 / 2); - flag = true; + center.X += (float)(backupSpawnRadius / 2); + center.Y += (float)(backupSpawnRadius / 2); + canSpawnProj = true; } } - if (flag) + if (canSpawnProj) { for (int k = 0; k < Main.maxProjectiles; k++) { if (Main.projectile[k].active && Main.projectile[k].owner == player.whoAmI && Main.projectile[k].type == ModContent.ProjectileType() && (center - Main.projectile[k].Center).Length() < 48f) { - flag = false; + canSpawnProj = false; break; } } - if (flag && Main.myPlayer == player.whoAmI) + if (canSpawnProj && Main.myPlayer == player.whoAmI) { Projectile.NewProjectile(source, center.X, center.Y, 0f, 0f, ModContent.ProjectileType(), damage, knockBack, player.whoAmI); return; diff --git a/Items/Accessories/RampartofDeities.cs b/Items/Accessories/RampartofDeities.cs index b3dfb4b051..24f98f4393 100644 --- a/Items/Accessories/RampartofDeities.cs +++ b/Items/Accessories/RampartofDeities.cs @@ -43,9 +43,9 @@ namespace CalamityMod.Items.Accessories int myPlayer = Main.myPlayer; if (Main.player[myPlayer].team == player.team && player.team != 0) { - float num = player.position.X - Main.player[myPlayer].position.X; - float num2 = player.position.Y - Main.player[myPlayer].position.Y; - if ((float)Math.Sqrt(num * num + num2 * num2) < 800f) + float teamPlayerXDist = player.position.X - Main.player[myPlayer].position.X; + float teamPlayerYDist = player.position.Y - Main.player[myPlayer].position.Y; + if ((float)Math.Sqrt(teamPlayerXDist * teamPlayerXDist + teamPlayerYDist * teamPlayerYDist) < 800f) Main.player[myPlayer].AddBuff(BuffID.PaladinsShield, 20); } } diff --git a/Items/Accessories/ToxicHeart.cs b/Items/Accessories/ToxicHeart.cs index e926e8c9b0..3c74092b44 100644 --- a/Items/Accessories/ToxicHeart.cs +++ b/Items/Accessories/ToxicHeart.cs @@ -27,9 +27,8 @@ namespace CalamityMod.Items.Accessories player.buffImmune[ModContent.BuffType()] = true; int plagueCounter = 0; Lighting.AddLight((int)(player.Center.X / 16f), (int)(player.Center.Y / 16f), 0.05f, 1f, 0.1f); - int num = ModContent.BuffType(); - float num2 = 300f; - bool flag = plagueCounter % 60 == 0; + int plagueDebuff = ModContent.BuffType(); + bool shouldInflictPlague = plagueCounter % 60 == 0; int auraDamage = (int)player.GetBestClassDamage().ApplyTo(50); int random = Main.rand.Next(10); var source = player.GetSource_Accessory(Item); @@ -40,13 +39,13 @@ namespace CalamityMod.Items.Accessories for (int l = 0; l < Main.maxNPCs; l++) { NPC nPC = Main.npc[l]; - if (nPC.IsAnEnemy() && !nPC.dontTakeDamage && !nPC.buffImmune[num] && Vector2.Distance(player.Center, nPC.Center) <= num2) + if (nPC.IsAnEnemy() && !nPC.dontTakeDamage && !nPC.buffImmune[plagueDebuff] && Vector2.Distance(player.Center, nPC.Center) <= 300f) { - if (nPC.FindBuffIndex(num) == -1) + if (nPC.FindBuffIndex(plagueDebuff) == -1) { - nPC.AddBuff(num, 120, false); + nPC.AddBuff(plagueDebuff, 120, false); } - if (flag) + if (shouldInflictPlague) { if (player.whoAmI == Main.myPlayer) { diff --git a/Items/Accessories/Wings/AureateBooster.cs b/Items/Accessories/Wings/AureateBooster.cs index 9e2c91eebd..5e659207b6 100644 --- a/Items/Accessories/Wings/AureateBooster.cs +++ b/Items/Accessories/Wings/AureateBooster.cs @@ -38,12 +38,12 @@ namespace CalamityMod.Items.Accessories.Wings SoundEngine.PlaySound(SoundID.Item13, player.Center); player.rocketDelay2 = 60; } - int num66 = 2; + int dustAmt = 2; if (player.controlUp) { - num66 = 4; + dustAmt = 4; } - for (int num67 = 0; num67 < num66; num67++) + for (int i = 0; i < dustAmt; i++) { int type = 6; float scale = 1.75f; @@ -53,27 +53,27 @@ namespace CalamityMod.Items.Accessories.Wings { x = player.position.X + (float)(player.width / 2) - 26f; } - float num68 = player.position.Y + (float)player.height - 18f; - if (num67 == 1 || num67 == 3) + float dustYPos = player.position.Y + (float)player.height - 18f; + if (i == 1 || i == 3) { x = player.position.X + (float)(player.width / 2) + 8f; if (player.direction > 0) { x = player.position.X + (float)(player.width / 2) - 20f; } - num68 += 6f; + dustYPos += 6f; } - if (num67 > 1) + if (i > 1) { - num68 += player.velocity.Y; + dustYPos += player.velocity.Y; } - int num69 = Dust.NewDust(new Vector2(x, num68), 8, 8, type, 0f, 0f, alpha, default, scale); - Dust dust = Main.dust[num69]; + int boosterDust = Dust.NewDust(new Vector2(x, dustYPos), 8, 8, type, 0f, 0f, alpha, default, scale); + Dust dust = Main.dust[boosterDust]; dust.velocity.X *= 0.1f; - dust.velocity.Y = Main.dust[num69].velocity.Y * 1f + 2f * player.gravDir - player.velocity.Y * 0.3f; + dust.velocity.Y = Main.dust[boosterDust].velocity.Y * 1f + 2f * player.gravDir - player.velocity.Y * 0.3f; dust.noGravity = true; dust.shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); - if (num66 == 4) + if (dustAmt == 4) { dust.velocity.Y += 6f; } diff --git a/Items/Accessories/Wings/DrewsWings.cs b/Items/Accessories/Wings/DrewsWings.cs index 279ab88e13..cb05b0c66b 100644 --- a/Items/Accessories/Wings/DrewsWings.cs +++ b/Items/Accessories/Wings/DrewsWings.cs @@ -31,19 +31,19 @@ namespace CalamityMod.Items.Accessories.Wings { if (player.controlJump && player.wingTime > 0f && player.jump == 0 && player.velocity.Y != 0f && !hideVisual) { - int num59 = 4; + int dustXOffset = 4; if (player.direction == 1) { - num59 = -40; + dustXOffset = -40; } - int num60 = Dust.NewDust(new Vector2(player.position.X + (float)(player.width / 2) + (float)num59, player.position.Y + (float)(player.height / 2) - 15f), 30, 30, 91, 0f, 0f, 100, default, 2.4f); - Main.dust[num60].noGravity = true; - Main.dust[num60].velocity *= 0.3f; + int flightDust = Dust.NewDust(new Vector2(player.position.X + (float)(player.width / 2) + (float)dustXOffset, player.position.Y + (float)(player.height / 2) - 15f), 30, 30, 91, 0f, 0f, 100, default, 2.4f); + Main.dust[flightDust].noGravity = true; + Main.dust[flightDust].velocity *= 0.3f; if (Main.rand.NextBool(10)) { - Main.dust[num60].fadeIn = 2f; + Main.dust[flightDust].fadeIn = 2f; } - Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); + Main.dust[flightDust].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } player.noFallDmg = true; } diff --git a/Items/Accessories/Wings/HadalMantle.cs b/Items/Accessories/Wings/HadalMantle.cs index aa76760ff8..a751b2333b 100644 --- a/Items/Accessories/Wings/HadalMantle.cs +++ b/Items/Accessories/Wings/HadalMantle.cs @@ -40,19 +40,19 @@ namespace CalamityMod.Items.Accessories.Wings if (player.controlJump && player.wingTime > 0f && player.jump == 0 && player.velocity.Y != 0f && !hideVisual) { - int num59 = 4; + int dustXOffset = 4; if (player.direction == 1) { - num59 = -40; + dustXOffset = -40; } - int num60 = Dust.NewDust(new Vector2(player.position.X + (float)(player.width / 2) + (float)num59, player.position.Y + (float)(player.height / 2) - 15f), 30, 30, 6, 0f, 0f, 100, default, 2.4f); - Main.dust[num60].noGravity = true; - Main.dust[num60].velocity *= 0.3f; + int flightDust = Dust.NewDust(new Vector2(player.position.X + (float)(player.width / 2) + (float)dustXOffset, player.position.Y + (float)(player.height / 2) - 15f), 30, 30, 6, 0f, 0f, 100, default, 2.4f); + Main.dust[flightDust].noGravity = true; + Main.dust[flightDust].velocity *= 0.3f; if (Main.rand.NextBool(10)) { - Main.dust[num60].fadeIn = 2f; + Main.dust[flightDust].fadeIn = 2f; } - Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); + Main.dust[flightDust].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } player.noFallDmg = true; } diff --git a/Items/Accessories/Wings/MOAB.cs b/Items/Accessories/Wings/MOAB.cs index 37d6226b85..4fa0599fa1 100644 --- a/Items/Accessories/Wings/MOAB.cs +++ b/Items/Accessories/Wings/MOAB.cs @@ -69,10 +69,10 @@ namespace CalamityMod.Items.Accessories.Wings { yStart += player.velocity.Y; } - int num69 = Dust.NewDust(new Vector2(xStart, yStart), 8, 8, type, 0f, 0f, alpha, default, scale); - Dust dust = Main.dust[num69]; + int boosterDust = Dust.NewDust(new Vector2(xStart, yStart), 8, 8, type, 0f, 0f, alpha, default, scale); + Dust dust = Main.dust[boosterDust]; dust.velocity.X *= 0.1f; - dust.velocity.Y = Main.dust[num69].velocity.Y * 1f + 2f * player.gravDir - player.velocity.Y * 0.3f; + dust.velocity.Y = Main.dust[boosterDust].velocity.Y * 1f + 2f * player.gravDir - player.velocity.Y * 0.3f; dust.noGravity = true; dust.shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); if (dustAmt == 4) diff --git a/Items/Accessories/Wings/SilvaWings.cs b/Items/Accessories/Wings/SilvaWings.cs index de0edb4db6..0b24869c64 100644 --- a/Items/Accessories/Wings/SilvaWings.cs +++ b/Items/Accessories/Wings/SilvaWings.cs @@ -41,19 +41,19 @@ namespace CalamityMod.Items.Accessories.Wings if (player.controlJump && player.wingTime > 0f && player.jump == 0 && player.velocity.Y != 0f && !hideVisual) { - int num59 = 4; + int dustXOffset = 4; if (player.direction == 1) { - num59 = -40; + dustXOffset = -40; } - int num60 = Dust.NewDust(new Vector2(player.position.X + (float)(player.width / 2) + (float)num59, player.position.Y + (float)(player.height / 2) - 15f), 30, 30, 157, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1f); - Main.dust[num60].noGravity = true; - Main.dust[num60].velocity *= 0.3f; + int flightDust = Dust.NewDust(new Vector2(player.position.X + (float)(player.width / 2) + (float)dustXOffset, player.position.Y + (float)(player.height / 2) - 15f), 30, 30, 157, 0f, 0f, 100, new Color(Main.DiscoR, 203, 103), 1f); + Main.dust[flightDust].noGravity = true; + Main.dust[flightDust].velocity *= 0.3f; if (Main.rand.NextBool(10)) { - Main.dust[num60].fadeIn = 2f; + Main.dust[flightDust].fadeIn = 2f; } - Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); + Main.dust[flightDust].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } player.noFallDmg = true; } diff --git a/Items/Accessories/Wings/SoulofCryogen.cs b/Items/Accessories/Wings/SoulofCryogen.cs index e1986d598f..718a2de574 100644 --- a/Items/Accessories/Wings/SoulofCryogen.cs +++ b/Items/Accessories/Wings/SoulofCryogen.cs @@ -33,9 +33,9 @@ namespace CalamityMod.Items.Accessories.Wings public override void Update(ref float gravity, ref float maxFallSpeed) { - float num = (float)Main.rand.Next(90, 111) * 0.01f; - num *= Main.essScale; - Lighting.AddLight((int)((Item.position.X + (float)(Item.width / 2)) / 16f), (int)((Item.position.Y + (float)(Item.height / 2)) / 16f), 0f * num, 0.3f * num, 0.3f * num); + float lightOffset = (float)Main.rand.Next(90, 111) * 0.01f; + lightOffset *= Main.essScale; + Lighting.AddLight((int)((Item.position.X + (float)(Item.width / 2)) / 16f), (int)((Item.position.Y + (float)(Item.height / 2)) / 16f), 0f * lightOffset, 0.3f * lightOffset, 0.3f * lightOffset); } public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) diff --git a/Items/Accessories/Wings/StarlightWings.cs b/Items/Accessories/Wings/StarlightWings.cs index e132c20b50..1f05487c5a 100644 --- a/Items/Accessories/Wings/StarlightWings.cs +++ b/Items/Accessories/Wings/StarlightWings.cs @@ -40,19 +40,19 @@ namespace CalamityMod.Items.Accessories.Wings if (player.controlJump && player.wingTime > 0f && player.jump == 0 && player.velocity.Y != 0f && !hideVisual) { - int num59 = 4; + int dustXOffset = 4; if (player.direction == 1) { - num59 = -40; + dustXOffset = -40; } - int num60 = Dust.NewDust(new Vector2(player.position.X + (float)(player.width / 2) + (float)num59, player.position.Y + (float)(player.height / 2) - 15f), 30, 30, 173, 0f, 0f, 100, default, 2.4f); - Main.dust[num60].noGravity = true; - Main.dust[num60].velocity *= 0.3f; + int flightDust = Dust.NewDust(new Vector2(player.position.X + (float)(player.width / 2) + (float)dustXOffset, player.position.Y + (float)(player.height / 2) - 15f), 30, 30, 173, 0f, 0f, 100, default, 2.4f); + Main.dust[flightDust].noGravity = true; + Main.dust[flightDust].velocity *= 0.3f; if (Main.rand.NextBool(10)) { - Main.dust[num60].fadeIn = 2f; + Main.dust[flightDust].fadeIn = 2f; } - Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); + Main.dust[flightDust].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } player.noFallDmg = true; } diff --git a/Items/Accessories/Wings/TarragonWings.cs b/Items/Accessories/Wings/TarragonWings.cs index 6e44ccd393..b64b5c2d6e 100644 --- a/Items/Accessories/Wings/TarragonWings.cs +++ b/Items/Accessories/Wings/TarragonWings.cs @@ -43,19 +43,19 @@ namespace CalamityMod.Items.Accessories.Wings if (player.controlJump && player.wingTime > 0f && player.jump == 0 && player.velocity.Y != 0f && !hideVisual) { - int num59 = 4; + int dustXOffset = 4; if (player.direction == 1) { - num59 = -40; + dustXOffset = -40; } - int num60 = Dust.NewDust(new Vector2(player.position.X + (float)(player.width / 2) + (float)num59, player.position.Y + (float)(player.height / 2) - 15f), 30, 30, (int)CalamityDusts.SulfurousSeaAcid, 0f, 0f, 100, default, 2.4f); - Main.dust[num60].noGravity = true; - Main.dust[num60].velocity *= 0.3f; + int flightDust = Dust.NewDust(new Vector2(player.position.X + (float)(player.width / 2) + (float)dustXOffset, player.position.Y + (float)(player.height / 2) - 15f), 30, 30, (int)CalamityDusts.SulfurousSeaAcid, 0f, 0f, 100, default, 2.4f); + Main.dust[flightDust].noGravity = true; + Main.dust[flightDust].velocity *= 0.3f; if (Main.rand.NextBool(10)) { - Main.dust[num60].fadeIn = 2f; + Main.dust[flightDust].fadeIn = 2f; } - Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); + Main.dust[flightDust].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } player.noFallDmg = true; } diff --git a/Items/Accessories/Wings/TracersCelestial.cs b/Items/Accessories/Wings/TracersCelestial.cs index 4ed7748604..c40e9d5f4a 100644 --- a/Items/Accessories/Wings/TracersCelestial.cs +++ b/Items/Accessories/Wings/TracersCelestial.cs @@ -34,19 +34,19 @@ namespace CalamityMod.Items.Accessories.Wings { if (player.controlJump && player.wingTime > 0f && player.jump == 0 && player.velocity.Y != 0f && !hideVisual) { - int num59 = 4; + int dustXOffset = 4; if (player.direction == 1) { - num59 = -40; + dustXOffset = -40; } - int num60 = Dust.NewDust(new Vector2(player.position.X + (float)(player.width / 2) + (float)num59, player.position.Y + (float)(player.height / 2) - 15f), 30, 30, 107, 0f, 0f, 100, default, 2.4f); - Main.dust[num60].noGravity = true; - Main.dust[num60].velocity *= 0.3f; + int flightDust = Dust.NewDust(new Vector2(player.position.X + (float)(player.width / 2) + (float)dustXOffset, player.position.Y + (float)(player.height / 2) - 15f), 30, 30, 107, 0f, 0f, 100, default, 2.4f); + Main.dust[flightDust].noGravity = true; + Main.dust[flightDust].velocity *= 0.3f; if (Main.rand.NextBool(10)) { - Main.dust[num60].fadeIn = 2f; + Main.dust[flightDust].fadeIn = 2f; } - Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); + Main.dust[flightDust].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } CalamityPlayer modPlayer = player.Calamity(); player.accRunSpeed = 8f; diff --git a/Items/Accessories/Wings/TracersElysian.cs b/Items/Accessories/Wings/TracersElysian.cs index c09a119136..bf270f6390 100644 --- a/Items/Accessories/Wings/TracersElysian.cs +++ b/Items/Accessories/Wings/TracersElysian.cs @@ -37,19 +37,19 @@ namespace CalamityMod.Items.Accessories.Wings { if (player.controlJump && player.wingTime > 0f && player.jump == 0 && player.velocity.Y != 0f && !hideVisual) { - int num59 = 4; + int dustXOffset = 4; if (player.direction == 1) { - num59 = -40; + dustXOffset = -40; } - int num60 = Dust.NewDust(new Vector2(player.position.X + (float)(player.width / 2) + (float)num59, player.position.Y + (float)(player.height / 2) - 15f), 30, 30, Main.rand.NextBool() ? 206 : 173, 0f, 0f, 100, default, 2.4f); - Main.dust[num60].noGravity = true; - Main.dust[num60].velocity *= 0.3f; + int flightDust = Dust.NewDust(new Vector2(player.position.X + (float)(player.width / 2) + (float)dustXOffset, player.position.Y + (float)(player.height / 2) - 15f), 30, 30, Main.rand.NextBool() ? 206 : 173, 0f, 0f, 100, default, 2.4f); + Main.dust[flightDust].noGravity = true; + Main.dust[flightDust].velocity *= 0.3f; if (Main.rand.NextBool(10)) { - Main.dust[num60].fadeIn = 2f; + Main.dust[flightDust].fadeIn = 2f; } - Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); + Main.dust[flightDust].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } CalamityPlayer modPlayer = player.Calamity(); player.accRunSpeed = 8.5f; diff --git a/Items/Accessories/Wings/TracersSeraph.cs b/Items/Accessories/Wings/TracersSeraph.cs index 6feb6dcf59..55063ce270 100644 --- a/Items/Accessories/Wings/TracersSeraph.cs +++ b/Items/Accessories/Wings/TracersSeraph.cs @@ -37,19 +37,19 @@ namespace CalamityMod.Items.Accessories.Wings { if (player.controlJump && player.wingTime > 0f && player.jump == 0 && player.velocity.Y != 0f && !hideVisual) { - int num59 = 4; + int dustXOffset = 4; if (player.direction == 1) { - num59 = -40; + dustXOffset = -40; } - int num60 = Dust.NewDust(new Vector2(player.position.X + (float)(player.width / 2) + (float)num59, player.position.Y + (float)(player.height / 2) - 15f), 30, 30, 91, 0f, 0f, 100, default, 2.4f); - Main.dust[num60].noGravity = true; - Main.dust[num60].velocity *= 0.3f; + int flightDust = Dust.NewDust(new Vector2(player.position.X + (float)(player.width / 2) + (float)dustXOffset, player.position.Y + (float)(player.height / 2) - 15f), 30, 30, 91, 0f, 0f, 100, default, 2.4f); + Main.dust[flightDust].noGravity = true; + Main.dust[flightDust].velocity *= 0.3f; if (Main.rand.NextBool(10)) { - Main.dust[num60].fadeIn = 2f; + Main.dust[flightDust].fadeIn = 2f; } - Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); + Main.dust[flightDust].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } CalamityPlayer modPlayer = player.Calamity(); player.accRunSpeed = 9f; diff --git a/Items/Materials/AshesofCalamity.cs b/Items/Materials/AshesofCalamity.cs index ea39c61987..4edb13ab97 100644 --- a/Items/Materials/AshesofCalamity.cs +++ b/Items/Materials/AshesofCalamity.cs @@ -26,9 +26,9 @@ namespace CalamityMod.Items.Materials } public override void Update(ref float gravity, ref float maxFallSpeed) { - float num = (float)Main.rand.Next(90, 111) * 0.01f; - num *= Main.essScale; - Lighting.AddLight((int)((Item.position.X + (float)(Item.width / 2)) / 16f), (int)((Item.position.Y + (float)(Item.height / 2)) / 16f), 0.25f * num, 0.05f * num, 0.25f * num); + float brightness = (float)Main.rand.Next(90, 111) * 0.01f; + brightness *= Main.essScale; + Lighting.AddLight((int)((Item.position.X + (float)(Item.width / 2)) / 16f), (int)((Item.position.Y + (float)(Item.height / 2)) / 16f), 0.25f * brightness, 0.05f * brightness, 0.25f * brightness); } } } diff --git a/Items/Materials/BloodOrb.cs b/Items/Materials/BloodOrb.cs index a0619ff5dc..68bcb666c7 100644 --- a/Items/Materials/BloodOrb.cs +++ b/Items/Materials/BloodOrb.cs @@ -23,9 +23,9 @@ namespace CalamityMod.Items.Materials public override void Update(ref float gravity, ref float maxFallSpeed) { - float num = Main.rand.Next(90, 111) * 0.01f; - num *= Main.essScale; - Lighting.AddLight((int)((Item.position.X + (Item.width / 2)) / 16f), (int)((Item.position.Y + (Item.height / 2)) / 16f), 0.75f * num, 0f, 0f); + float brightness = Main.rand.Next(90, 111) * 0.01f; + brightness *= Main.essScale; + Lighting.AddLight((int)((Item.position.X + (Item.width / 2)) / 16f), (int)((Item.position.Y + (Item.height / 2)) / 16f), 0.75f * brightness, 0f, 0f); } public override void AddRecipes() diff --git a/Items/Materials/DarkPlasma.cs b/Items/Materials/DarkPlasma.cs index c162b90612..ca39e1fd37 100644 --- a/Items/Materials/DarkPlasma.cs +++ b/Items/Materials/DarkPlasma.cs @@ -28,9 +28,9 @@ namespace CalamityMod.Items.Materials } public override void Update(ref float gravity, ref float maxFallSpeed) { - float num = (float)Main.rand.Next(90, 111) * 0.01f; - num *= Main.essScale; - Lighting.AddLight((int)((Item.position.X + (float)(Item.width / 2)) / 16f), (int)((Item.position.Y + (float)(Item.height / 2)) / 16f), 0f * num, 0.45f * num, 0.7f * num); + float brightness = (float)Main.rand.Next(90, 111) * 0.01f; + brightness *= Main.essScale; + Lighting.AddLight((int)((Item.position.X + (float)(Item.width / 2)) / 16f), (int)((Item.position.Y + (float)(Item.height / 2)) / 16f), 0f * brightness, 0.45f * brightness, 0.7f * brightness); } } } diff --git a/Items/Materials/DivineGeode.cs b/Items/Materials/DivineGeode.cs index a94403cae5..2f6acbc13d 100644 --- a/Items/Materials/DivineGeode.cs +++ b/Items/Materials/DivineGeode.cs @@ -24,9 +24,9 @@ namespace CalamityMod.Items.Materials } public override void Update(ref float gravity, ref float maxFallSpeed) { - float num = (float)Main.rand.Next(90, 111) * 0.01f; - num *= Main.essScale; - Lighting.AddLight((int)((Item.position.X + (float)(Item.width / 2)) / 16f), (int)((Item.position.Y + (float)(Item.height / 2)) / 16f), 0.45f * num, 0.3f * num, 0f * num); + float brightness = (float)Main.rand.Next(90, 111) * 0.01f; + brightness *= Main.essScale; + Lighting.AddLight((int)((Item.position.X + (float)(Item.width / 2)) / 16f), (int)((Item.position.Y + (float)(Item.height / 2)) / 16f), 0.45f * brightness, 0.3f * brightness, 0f * brightness); } } } diff --git a/Items/Materials/GalacticaSingularity.cs b/Items/Materials/GalacticaSingularity.cs index 52631ea105..5dc2bc2dd8 100644 --- a/Items/Materials/GalacticaSingularity.cs +++ b/Items/Materials/GalacticaSingularity.cs @@ -38,9 +38,9 @@ namespace CalamityMod.Items.Materials public override void Update(ref float gravity, ref float maxFallSpeed) { - float num = (float)Main.rand.Next(90, 111) * 0.01f; - num *= Main.essScale; - Lighting.AddLight((int)((Item.position.X + (float)(Item.width / 2)) / 16f), (int)((Item.position.Y + (float)(Item.height / 2)) / 16f), 1f * num, 0.3f * num, 0.3f * num); + float brightness = (float)Main.rand.Next(90, 111) * 0.01f; + brightness *= Main.essScale; + Lighting.AddLight((int)((Item.position.X + (float)(Item.width / 2)) / 16f), (int)((Item.position.Y + (float)(Item.height / 2)) / 16f), 1f * brightness, 0.3f * brightness, 0.3f * brightness); } } } diff --git a/Items/Materials/TwistingNether.cs b/Items/Materials/TwistingNether.cs index e293ea5378..e8b3336095 100644 --- a/Items/Materials/TwistingNether.cs +++ b/Items/Materials/TwistingNether.cs @@ -26,9 +26,9 @@ namespace CalamityMod.Items.Materials } public override void Update(ref float gravity, ref float maxFallSpeed) { - float num = (float)Main.rand.Next(90, 111) * 0.01f; - num *= Main.essScale; - Lighting.AddLight((int)((Item.position.X + (float)(Item.width / 2)) / 16f), (int)((Item.position.Y + (float)(Item.height / 2)) / 16f), 0.5f * num, 0.1f * num, 0.7f * num); + float brightness = (float)Main.rand.Next(90, 111) * 0.01f; + brightness *= Main.essScale; + Lighting.AddLight((int)((Item.position.X + (float)(Item.width / 2)) / 16f), (int)((Item.position.Y + (float)(Item.height / 2)) / 16f), 0.5f * brightness, 0.1f * brightness, 0.7f * brightness); } } } diff --git a/Items/Materials/UnholyEssence.cs b/Items/Materials/UnholyEssence.cs index 1e1d21a7f2..217be5e725 100644 --- a/Items/Materials/UnholyEssence.cs +++ b/Items/Materials/UnholyEssence.cs @@ -27,9 +27,9 @@ namespace CalamityMod.Items.Materials } public override void Update(ref float gravity, ref float maxFallSpeed) { - float num = (float)Main.rand.Next(90, 111) * 0.01f; - num *= Main.essScale; - Lighting.AddLight((int)((Item.position.X + (float)(Item.width / 2)) / 16f), (int)((Item.position.Y + (float)(Item.height / 2)) / 16f), 0.45f * num, 0.3f * num, 0f * num); + float brightness = (float)Main.rand.Next(90, 111) * 0.01f; + brightness *= Main.essScale; + Lighting.AddLight((int)((Item.position.X + (float)(Item.width / 2)) / 16f), (int)((Item.position.Y + (float)(Item.height / 2)) / 16f), 0.45f * brightness, 0.3f * brightness, 0f * brightness); } } } diff --git a/Items/Materials/YharonSoulFragment.cs b/Items/Materials/YharonSoulFragment.cs index bf450c0800..f2b986749b 100644 --- a/Items/Materials/YharonSoulFragment.cs +++ b/Items/Materials/YharonSoulFragment.cs @@ -18,9 +18,9 @@ namespace CalamityMod.Items.Materials public override void Update(ref float gravity, ref float maxFallSpeed) { - float num = (float)Main.rand.Next(90, 111) * 0.01f; - num *= Main.essScale; - Lighting.AddLight((int)((Item.position.X + (float)(Item.width / 2)) / 16f), (int)((Item.position.Y + (float)(Item.height / 2)) / 16f), 0.5f * num, 0.3f * num, 0.05f * num); + float brightness = (float)Main.rand.Next(90, 111) * 0.01f; + brightness *= Main.essScale; + Lighting.AddLight((int)((Item.position.X + (float)(Item.width / 2)) / 16f), (int)((Item.position.Y + (float)(Item.height / 2)) / 16f), 0.5f * brightness, 0.3f * brightness, 0.05f * brightness); } public override void SetDefaults() diff --git a/Items/Mounts/RimehoundMount.cs b/Items/Mounts/RimehoundMount.cs index f03f050846..6d7bc3e580 100644 --- a/Items/Mounts/RimehoundMount.cs +++ b/Items/Mounts/RimehoundMount.cs @@ -64,9 +64,9 @@ namespace CalamityMod.Items.Mounts public override bool UpdateFrame(Player mountedPlayer, int state, Vector2 velocity) { bool speed = Math.Abs(velocity.X) > mountedPlayer.mount.RunSpeed / 2f; - float num10 = (float)Math.Sign(mountedPlayer.velocity.X); - float num11 = 12f; - float num12 = 40f; + float direction = (float)Math.Sign(mountedPlayer.velocity.X); + float dustYOffset = 12f; + float dustXOffset = 40f; if (!speed) { mountedPlayer.basiliskCharge = 0f; @@ -92,19 +92,19 @@ namespace CalamityMod.Items.Mounts } if (mountedPlayer.cMount == 0) { - mountedPlayer.position += new Vector2(num10 * 24f, 0f); + mountedPlayer.position += new Vector2(direction * 24f, 0f); mountedPlayer.FloorVisuals(true); - mountedPlayer.position -= new Vector2(num10 * 24f, 0f); + mountedPlayer.position -= new Vector2(direction * 24f, 0f); } } - if (num10 == (float)mountedPlayer.direction) + if (direction == (float)mountedPlayer.direction) { for (int j = 0; j < (int)(3f * mountedPlayer.basiliskCharge); j++) { Dust dust = Main.dust[Dust.NewDust(mountedPlayer.BottomLeft, mountedPlayer.width, 6, 67, 0f, 0f, 0, default, 1f)]; - Vector2 value2 = mountedPlayer.Center + new Vector2(num10 * num12, num11); - dust.position = mountedPlayer.Center + new Vector2(num10 * (num12 - 2f), num11 - 6f + Main.rand.NextFloat() * 12f); - dust.velocity = (dust.position - value2).SafeNormalize(Vector2.Zero) * (3.5f + Main.rand.NextFloat() * 0.5f); + Vector2 dustVel = mountedPlayer.Center + new Vector2(direction * dustXOffset, dustYOffset); + dust.position = mountedPlayer.Center + new Vector2(direction * (dustXOffset - 2f), dustYOffset - 6f + Main.rand.NextFloat() * 12f); + dust.velocity = (dust.position - dustVel).SafeNormalize(Vector2.Zero) * (3.5f + Main.rand.NextFloat() * 0.5f); if (dust.velocity.Y < 0f) { Dust expr_808_cp_0_cp_0 = dust; From 877028e6ef2714a3ef6cd9b346f102cf9bb298fb Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 31 Oct 2023 00:04:35 -0400 Subject: [PATCH 36/95] All Items except Weapons and CalamityGlobalItem files --- Items/SummonItems/EyeofDesolation.cs | 22 ++++++------- Items/SummonItems/OldPowerCell.cs | 6 ++-- Items/Tools/InfernaCutter.cs | 46 ++++++++++++++-------------- 3 files changed, 37 insertions(+), 37 deletions(-) diff --git a/Items/SummonItems/EyeofDesolation.cs b/Items/SummonItems/EyeofDesolation.cs index 96e352eb89..dab9ba5b48 100644 --- a/Items/SummonItems/EyeofDesolation.cs +++ b/Items/SummonItems/EyeofDesolation.cs @@ -67,31 +67,31 @@ namespace CalamityMod.Items.SummonItems safeBox.Height = 2500; spawnYAdd = 125; - int num52 = (int)(safeBox.X + (float)(safeBox.Width / 2)) / 16; - int num53 = (int)(safeBox.Y + (float)(safeBox.Height / 2)) / 16; - int num54 = safeBox.Width / 2 / 16 + 1; - for (int num55 = num52 - num54; num55 <= num52 + num54; num55++) + int safeBoxTilesX = (int)(safeBox.X + (float)(safeBox.Width / 2)) / 16; + int safeBoxTilesY = (int)(safeBox.Y + (float)(safeBox.Height / 2)) / 16; + int safeBoxTilesWidth = safeBox.Width / 2 / 16 + 1; + for (int i = safeBoxTilesX - safeBoxTilesWidth; i <= safeBoxTilesX + safeBoxTilesWidth; i++) { - for (int num56 = num53 - num54; num56 <= num53 + num54; num56++) + for (int j = safeBoxTilesY - safeBoxTilesWidth; j <= safeBoxTilesY + safeBoxTilesWidth; j++) { - if (!WorldGen.InWorld(num55, num56, 2)) + if (!WorldGen.InWorld(i, j, 2)) continue; int xoffset = 0; int yoffset = 0; - if ((num55 == num52 - num54 || num55 == num52 + num54 || num56 == num53 - num54 || num56 == num53 + num54) && !Main.tile[num55 + xoffset, num56 + yoffset].HasTile) + if ((i == safeBoxTilesX - safeBoxTilesWidth || i == safeBoxTilesX + safeBoxTilesWidth || j == safeBoxTilesY - safeBoxTilesWidth || j == safeBoxTilesY + safeBoxTilesWidth) && !Main.tile[i + xoffset, j + yoffset].HasTile) { - Main.tile[num55 + xoffset, num56 + yoffset].TileType = (ushort)ModContent.TileType(); - Main.tile[num55 + xoffset, num56 + yoffset].Get().HasTile = true; + Main.tile[i + xoffset, j + yoffset].TileType = (ushort)ModContent.TileType(); + Main.tile[i + xoffset, j + yoffset].Get().HasTile = true; } if (Main.netMode == NetmodeID.Server) { - NetMessage.SendTileSquare(-1, num55 + xoffset, num56 + yoffset, 1, TileChangeType.None); + NetMessage.SendTileSquare(-1, i + xoffset, j + yoffset, 1, TileChangeType.None); } else { - WorldGen.SquareTileFrame(num55 + xoffset, num56 + yoffset, true); + WorldGen.SquareTileFrame(i + xoffset, j + yoffset, true); } } } diff --git a/Items/SummonItems/OldPowerCell.cs b/Items/SummonItems/OldPowerCell.cs index 119eb4cb92..8195e52b80 100644 --- a/Items/SummonItems/OldPowerCell.cs +++ b/Items/SummonItems/OldPowerCell.cs @@ -39,9 +39,9 @@ namespace CalamityMod.Items.SummonItems bool canSummon = false; if (player.Center.Y > Main.worldSurface * 16.0) { - int num = (int)player.Center.X / 16; - int num2 = (int)player.Center.Y / 16; - Tile tile = Framing.GetTileSafely(num, num2); + int playerTileX = (int)player.Center.X / 16; + int playerTileY = (int)player.Center.Y / 16; + Tile tile = Framing.GetTileSafely(playerTileX, playerTileY); if (tile.WallType == 87) canSummon = true; } diff --git a/Items/Tools/InfernaCutter.cs b/Items/Tools/InfernaCutter.cs index 15984d4cd9..227ccb8a6f 100644 --- a/Items/Tools/InfernaCutter.cs +++ b/Items/Tools/InfernaCutter.cs @@ -59,64 +59,64 @@ namespace CalamityMod.Items.Tools player.itemAnimation == (int)(player.itemAnimationMax * 0.7) || player.itemAnimation == (int)(player.itemAnimationMax * 0.9)) { - float num339 = 0f; - float num340 = 0f; - float num341 = 0f; - float num342 = 0f; + float sparkYVel = 0f; + float sparkXVel = 0f; + float sparkYSpawn = 0f; + float sparkXSpawn = 0f; if (player.itemAnimation == (int)(player.itemAnimationMax * 0.9)) { - num339 = -7f; + sparkYVel = -7f; } if (player.itemAnimation == (int)(player.itemAnimationMax * 0.7)) { - num339 = -6f; - num340 = 2f; + sparkYVel = -6f; + sparkXVel = 2f; } if (player.itemAnimation == (int)(player.itemAnimationMax * 0.5)) { - num339 = -4f; - num340 = 4f; + sparkYVel = -4f; + sparkXVel = 4f; } if (player.itemAnimation == (int)(player.itemAnimationMax * 0.3)) { - num339 = -2f; - num340 = 6f; + sparkYVel = -2f; + sparkXVel = 6f; } if (player.itemAnimation == (int)(player.itemAnimationMax * 0.1)) { - num340 = 7f; + sparkXVel = 7f; } if (player.itemAnimation == (int)(player.itemAnimationMax * 0.7)) { - num342 = 26f; + sparkXSpawn = 26f; } if (player.itemAnimation == (int)(player.itemAnimationMax * 0.3)) { - num342 -= 4f; - num341 -= 20f; + sparkXSpawn -= 4f; + sparkYSpawn -= 20f; } if (player.itemAnimation == (int)(player.itemAnimationMax * 0.1)) { - num341 += 6f; + sparkYSpawn += 6f; } if (player.direction == -1) { if (player.itemAnimation == (int)(player.itemAnimationMax * 0.9)) { - num342 -= 8f; + sparkXSpawn -= 8f; } if (player.itemAnimation == (int)(player.itemAnimationMax * 0.7)) { - num342 -= 6f; + sparkXSpawn -= 6f; } } - num339 *= 1.5f; - num340 *= 1.5f; - num342 *= (float)player.direction; - num341 *= player.gravDir; + sparkYVel *= 1.5f; + sparkXVel *= 1.5f; + sparkXSpawn *= (float)player.direction; + sparkYSpawn *= player.gravDir; var source = player.GetSource_ItemUse(Item); int damage = (int)player.GetTotalDamage().ApplyTo(Item.damage * 0.2f); - int spark = Projectile.NewProjectile(source, (float)(hitbox.X + hitbox.Width / 2) + num342, (float)(hitbox.Y + hitbox.Height / 2) + num341, (float)player.direction * num340, num339 * player.gravDir, ProjectileID.Spark, damage, 0f, player.whoAmI); + int spark = Projectile.NewProjectile(source, (float)(hitbox.X + hitbox.Width / 2) + sparkXSpawn, (float)(hitbox.Y + hitbox.Height / 2) + sparkYSpawn, (float)player.direction * sparkXVel, sparkYVel * player.gravDir, ProjectileID.Spark, damage, 0f, player.whoAmI); if (spark.WithinBounds(Main.maxProjectiles)) Main.projectile[spark].DamageType = DamageClass.Melee; } From 92649dceb6ffe75c525413414cf7d0891cf5c6a1 Mon Sep 17 00:00:00 2001 From: Xyk Date: Tue, 31 Oct 2023 00:20:09 -0700 Subject: [PATCH 37/95] Storm Weaver Telegraph fix --- Projectiles/Boss/StormWeaverFrostWaveTelegraph.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Boss/StormWeaverFrostWaveTelegraph.cs b/Projectiles/Boss/StormWeaverFrostWaveTelegraph.cs index 080e9f6d5b..edf43f9d7e 100644 --- a/Projectiles/Boss/StormWeaverFrostWaveTelegraph.cs +++ b/Projectiles/Boss/StormWeaverFrostWaveTelegraph.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Texture2D pulseTexture = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/PulseAura").Value; + Texture2D pulseTexture = ModContent.Request("CalamityMod/ExtraTextures/SmallGreyscaleCircle").Value; // Aura drawing. for (int i = 0; i < 5; i++) From ffa4554bb5583156153ea6e71e98af1c9678ce97 Mon Sep 17 00:00:00 2001 From: Xyk Date: Tue, 31 Oct 2023 00:57:04 -0700 Subject: [PATCH 38/95] Yet more small Cleansing Blaze visual adjustments Changed the flames particle on cleansing Blaze to rise a bit, more like fire, and use a different visual so it's not strangely cropped like it was before. --- Particles/FlameParticle.cs | 4 ++-- Particles/Flames.png | Bin 0 -> 10416 bytes Projectiles/Ranged/EssenceFire.cs | 10 ++++++---- 3 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 Particles/Flames.png diff --git a/Particles/FlameParticle.cs b/Particles/FlameParticle.cs index 128a7e2286..7acd1586aa 100644 --- a/Particles/FlameParticle.cs +++ b/Particles/FlameParticle.cs @@ -5,10 +5,9 @@ namespace CalamityMod.Particles { public class FlameParticle : Particle { - public override string Texture => "CalamityMod/Particles/Fire"; + public override string Texture => "CalamityMod/Particles/Flames"; public override bool UseAdditiveBlend => true; public override bool SetLifetime => true; - public override int FrameVariants => 3; public float RelativePower; @@ -34,6 +33,7 @@ namespace CalamityMod.Particles { Scale += RelativePower * 0.01f; Position.Y -= RelativePower * 1.25f; + Scale *= 0.97f; Color = Color.Lerp(BrightColor, DarkColor, LifetimeCompletion); Color = Color.Lerp(Color, Color.White, Utils.GetLerpValue(0.1f, 0.25f, LifetimeCompletion, true) * Utils.GetLerpValue(0.4f, 0.25f, LifetimeCompletion, true) * 0.7f); diff --git a/Particles/Flames.png b/Particles/Flames.png new file mode 100644 index 0000000000000000000000000000000000000000..4a07c0f9e1d97a9df953b2d3cd2bdcb42582ca6c GIT binary patch literal 10416 zcmV;hC{NdkP)f6 zXi@@54ZTQ_E-Enz5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUF zWUU$Bym{}eS9UO(Z2>7`&z9wUXbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|> z%+C|c55>;RS}qbKr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3ZN4bfe_i~WlJ|C&UW9+{8AKoW!}eExn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steroidStaff.cs | 56 ++++---- Items/Weapons/Magic/AstralachneaStaff.cs | 38 +++--- Items/Weapons/Magic/AuguroftheElements.cs | 30 ++--- Items/Weapons/Magic/BloodBath.cs | 62 ++++----- Items/Weapons/Magic/ClamorNoctus.cs | 58 ++++----- Items/Weapons/Magic/CosmicRainbow.cs | 80 ++++++------ Items/Weapons/Magic/DeathhailStaff.cs | 63 +++++---- Items/Weapons/Magic/DivineRetribution.cs | 50 ++++---- Items/Weapons/Magic/EidolonStaff.cs | 52 ++++---- Items/Weapons/Magic/EldritchTome.cs | 35 +++-- Items/Weapons/Magic/FatesReveal.cs | 30 ++--- Items/Weapons/Magic/Genisis.cs | 3 +- Items/Weapons/Magic/HellwingStaff.cs | 57 ++++----- Items/Weapons/Magic/IceBarrage.cs | 8 +- Items/Weapons/Magic/IcicleStaff.cs | 57 ++++----- Items/Weapons/Magic/InfernalRift.cs | 30 ++--- Items/Weapons/Magic/Mistlestorm.cs | 20 +-- Items/Weapons/Magic/PhoenixFlameBarrage.cs | 62 ++++----- Items/Weapons/Magic/Serpentine.cs | 26 ++-- Items/Weapons/Magic/ShadecrystalTome.cs | 4 +- Items/Weapons/Magic/SkyGlaze.cs | 56 ++++---- Items/Weapons/Magic/StarShower.cs | 30 ++--- Items/Weapons/Magic/TomeofFates.cs | 37 +++--- Items/Weapons/Magic/UndinesRetribution.cs | 52 ++++---- Items/Weapons/Magic/Vesuvius.cs | 56 ++++---- Items/Weapons/Magic/VividClarity.cs | 2 +- Items/Weapons/Magic/WyvernsCall.cs | 57 ++++----- Items/Weapons/Melee/Aftershock.cs | 108 ++++++++-------- Items/Weapons/Melee/Avalanche.cs | 12 +- Items/Weapons/Melee/BansheeHook.cs | 24 ++-- Items/Weapons/Melee/CelestialClaymore.cs | 65 +++++----- Items/Weapons/Melee/CometQuasher.cs | 112 ++++++++-------- Items/Weapons/Melee/Devastation.cs | 61 +++++---- Items/Weapons/Melee/DevilsDevastation.cs | 22 ++-- Items/Weapons/Melee/Earth.cs | 114 ++++++++--------- Items/Weapons/Melee/EmpyreanKnives.cs | 64 +++++---- Items/Weapons/Melee/EntropicClaymore.cs | 4 +- Items/Weapons/Melee/ExaltedOathblade.cs | 30 ++--- Items/Weapons/Melee/ForbiddenOathblade.cs | 36 +++--- Items/Weapons/Melee/GalactusBlade.cs | 57 ++++----- Items/Weapons/Melee/Greentide.cs | 121 +++++++++--------- Items/Weapons/Melee/Hellkite.cs | 36 +++--- Items/Weapons/Melee/IllustriousKnives.cs | 64 +++++---- Items/Weapons/Melee/IridescentExcalibur.cs | 4 +- Items/Weapons/Melee/RedSun.cs | 59 ++++----- Items/Weapons/Melee/SoulHarvester.cs | 44 +++---- Items/Weapons/Melee/StellarStriker.cs | 57 ++++----- Items/Weapons/Melee/StormRuler.cs | 4 +- Items/Weapons/Melee/StormSaber.cs | 4 +- Items/Weapons/Melee/Swordsplosion.cs | 55 ++++---- Items/Weapons/Melee/TheEnforcer.cs | 98 +++++++------- Items/Weapons/Melee/TheMutilator.cs | 22 ++-- Items/Weapons/Melee/UltimusCleaver.cs | 84 ++++++------ Items/Weapons/Ranged/Alluvion.cs | 6 +- Items/Weapons/Ranged/AquashardShotgun.cs | 4 +- Items/Weapons/Ranged/ArterialAssault.cs | 56 ++++---- Items/Weapons/Ranged/BladedgeGreatbow.cs | 22 ++-- Items/Weapons/Ranged/CleansingBlaze.cs | 4 +- Items/Weapons/Ranged/ConferenceCall.cs | 22 ++-- Items/Weapons/Ranged/ContinentalGreatbow.cs | 4 +- Items/Weapons/Ranged/Deathwind.cs | 4 +- Items/Weapons/Ranged/Disseminator.cs | 42 +++--- Items/Weapons/Ranged/Drataliornus.cs | 10 +- Items/Weapons/Ranged/FirestormCannon.cs | 8 +- Items/Weapons/Ranged/FlarewingBow.cs | 29 ++--- Items/Weapons/Ranged/GunkShot.cs | 4 +- Items/Weapons/Ranged/Hellborn.cs | 30 ++--- Items/Weapons/Ranged/Infinity.cs | 18 +-- Items/Weapons/Ranged/NettlevineGreatbow.cs | 25 ++-- Items/Weapons/Ranged/PearlGod.cs | 16 +-- Items/Weapons/Ranged/PlanetaryAnnihilation.cs | 60 ++++----- Items/Weapons/Ranged/Svantechnical.cs | 38 +++--- Items/Weapons/Ranged/TheStorm.cs | 60 ++++----- Items/Weapons/Ranged/Vortexpopper.cs | 84 ++++++------ Items/Weapons/Rogue/LunarKunai.cs | 50 ++++---- Items/Weapons/Rogue/Penumbra.cs | 18 +-- Items/Weapons/Summon/EnchantedConch.cs | 29 ++--- Items/Weapons/Summon/EntropysVigil.cs | 38 +++--- Items/Weapons/Summon/EtherealSubjugator.cs | 34 ++--- Items/Weapons/Summon/ResurrectionButterfly.cs | 36 +++--- Items/Weapons/Summon/VileFeeder.cs | 34 ++--- 82 files changed, 1627 insertions(+), 1658 deletions(-) diff --git a/Items/Weapons/Magic/AlphaRay.cs b/Items/Weapons/Magic/AlphaRay.cs index 14350ef07e..b4e96df9b2 100644 --- a/Items/Weapons/Magic/AlphaRay.cs +++ b/Items/Weapons/Magic/AlphaRay.cs @@ -59,23 +59,23 @@ namespace CalamityMod.Items.Weapons.Magic } else { - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num117 = 0.314159274f; - int num118 = 3; - Vector2 vector7 = velocity; - vector7.Normalize(); - vector7 *= 80f; - bool flag11 = Collision.CanHit(vector2, 0, 0, vector2 + vector7, 0, 0); - for (int num119 = 0; num119 < num118; num119++) + Vector2 laserSpawnPos = player.RotatedRelativePoint(player.MountedCenter, true); + float tenthPi = 0.314159274f; + int laserAmt = 3; + Vector2 laserVelocity = velocity; + laserVelocity.Normalize(); + laserVelocity *= 80f; + bool laserHitsTiles = Collision.CanHit(laserSpawnPos, 0, 0, laserSpawnPos + laserVelocity, 0, 0); + for (int i = 0; i < laserAmt; i++) { - float num120 = (float)num119 - ((float)num118 - 1f) / 2f; - Vector2 value9 = vector7.RotatedBy((double)(num117 * num120), default); - if (!flag11) + float laserOffset = (float)i - ((float)laserAmt - 1f) / 2f; + Vector2 offsetSpawnPos = laserVelocity.RotatedBy((double)(tenthPi * laserOffset), default); + if (!laserHitsTiles) { - value9 -= vector7; + offsetSpawnPos -= laserVelocity; } - Projectile.NewProjectile(source, vector2.X + value9.X, vector2.Y + value9.Y, velocity.X * 1.5f, velocity.Y * 1.5f, type, (int)(damage * 0.8), knockback, player.whoAmI); - int laser = Projectile.NewProjectile(source, vector2.X + value9.X, vector2.Y + value9.Y, velocity.X * 2f, velocity.Y * 2f, ProjectileID.LaserMachinegunLaser, (int)(damage * 0.4), knockback * 0.4f, player.whoAmI); + Projectile.NewProjectile(source, laserSpawnPos.X + offsetSpawnPos.X, laserSpawnPos.Y + offsetSpawnPos.Y, velocity.X * 1.5f, velocity.Y * 1.5f, type, (int)(damage * 0.8), knockback, player.whoAmI); + int laser = Projectile.NewProjectile(source, laserSpawnPos.X + offsetSpawnPos.X, laserSpawnPos.Y + offsetSpawnPos.Y, velocity.X * 2f, velocity.Y * 2f, ProjectileID.LaserMachinegunLaser, (int)(damage * 0.4), knockback * 0.4f, player.whoAmI); Main.projectile[laser].timeLeft = 120; Main.projectile[laser].tileCollide = false; } diff --git a/Items/Weapons/Magic/AsteroidStaff.cs b/Items/Weapons/Magic/AsteroidStaff.cs index bc438bcdaa..ae19993ce5 100644 --- a/Items/Weapons/Magic/AsteroidStaff.cs +++ b/Items/Weapons/Magic/AsteroidStaff.cs @@ -39,49 +39,49 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float meteorSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float meteorSpawnXPos = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float meteorSpawnYPos = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + meteorSpawnYPos = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float meteorSpawnDist = (float)Math.Sqrt((double)(meteorSpawnXPos * meteorSpawnXPos + meteorSpawnYPos * meteorSpawnYPos)); + if ((float.IsNaN(meteorSpawnXPos) && float.IsNaN(meteorSpawnYPos)) || (meteorSpawnXPos == 0f && meteorSpawnYPos == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + meteorSpawnXPos = (float)player.direction; + meteorSpawnYPos = 0f; + meteorSpawnDist = meteorSpeed; } else { - num80 = num72 / num80; + meteorSpawnDist = meteorSpeed / meteorSpawnDist; } int asteroidAmt = 3; - for (int num113 = 0; num113 < asteroidAmt; num113++) + for (int i = 0; i < asteroidAmt; i++) { - vector2 = new Vector2(player.Center.X + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num113); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X + (float)Main.rand.Next(-40, 41) * 0.03f; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.Center.X + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * i); + meteorSpawnXPos = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X + (float)Main.rand.Next(-40, 41) * 0.03f; + meteorSpawnYPos = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (meteorSpawnYPos < 0f) { - num79 *= -1f; + meteorSpawnYPos *= -1f; } - if (num79 < 20f) + if (meteorSpawnYPos < 20f) { - num79 = 20f; + meteorSpawnYPos = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float num114 = num78; - float num115 = num79 + (float)Main.rand.Next(-40, 41) * 0.02f; - Projectile.NewProjectile(source, vector2.X, vector2.Y, num114 * 0.75f, num115 * 0.75f, type, damage, knockback, player.whoAmI, 0f, 0.5f + (float)Main.rand.NextDouble() * 0.3f); + meteorSpawnDist = (float)Math.Sqrt((double)(meteorSpawnXPos * meteorSpawnXPos + meteorSpawnYPos * meteorSpawnYPos)); + meteorSpawnDist = meteorSpeed / meteorSpawnDist; + meteorSpawnXPos *= meteorSpawnDist; + meteorSpawnYPos *= meteorSpawnDist; + float meteorSpawnXOffset = meteorSpawnXPos; + float meteorSpawnYOffset = meteorSpawnYPos + (float)Main.rand.Next(-40, 41) * 0.02f; + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, meteorSpawnXOffset * 0.75f, meteorSpawnYOffset * 0.75f, type, damage, knockback, player.whoAmI, 0f, 0.5f + (float)Main.rand.NextDouble() * 0.3f); } return false; } diff --git a/Items/Weapons/Magic/AstralachneaStaff.cs b/Items/Weapons/Magic/AstralachneaStaff.cs index 1c1724dfee..a99af4af16 100644 --- a/Items/Weapons/Magic/AstralachneaStaff.cs +++ b/Items/Weapons/Magic/AstralachneaStaff.cs @@ -38,14 +38,12 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); int i = Main.myPlayer; - float num72 = Item.shootSpeed; - int num73 = damage; - float num74 = knockback; - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); + float fangSpeed = Item.shootSpeed; + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); int spikeAmount = 4; if (Main.rand.NextBool(3)) { @@ -59,20 +57,20 @@ namespace CalamityMod.Items.Weapons.Magic { spikeAmount += 2; } - for (int num131 = 0; num131 < spikeAmount; num131++) + for (int i = 0; i < spikeAmount; i++) { - float num132 = num78; - float num133 = num79; - float num134 = 0.05f * (float)num131; - num132 += (float)Main.rand.Next(-400, 400) * num134; - num133 += (float)Main.rand.Next(-400, 400) * num134; - num80 = (float)Math.Sqrt((double)(num132 * num132 + num133 * num133)); - num80 = num72 / num80; - num132 *= num80; - num133 *= num80; - float x2 = vector2.X; - float y2 = vector2.Y; - Projectile.NewProjectile(source, x2, y2, num132, num133, ModContent.ProjectileType(), num73, num74, i, 0f, 0f); + float fangSpawnX = mouseXDist; + float fangSpawnY = mouseYDist; + float offsetDampener = 0.05f * (float)i; + fangSpawnX += (float)Main.rand.Next(-400, 400) * offsetDampener; + fangSpawnY += (float)Main.rand.Next(-400, 400) * offsetDampener; + float fangDistance = (float)Math.Sqrt((double)(fangSpawnX * fangSpawnX + fangSpawnY * fangSpawnY)); + fangDistance = fangSpeed / fangDistance; + fangSpawnX *= fangDistance; + fangSpawnY *= fangDistance; + float x2 = realPlayerPos.X; + float y2 = realPlayerPos.Y; + Projectile.NewProjectile(source, x2, y2, fangSpawnX, fangSpawnY, ModContent.ProjectileType(), damage, knockback, i, 0f, 0f); } return false; } diff --git a/Items/Weapons/Magic/AuguroftheElements.cs b/Items/Weapons/Magic/AuguroftheElements.cs index 50bfc5e410..72f04b7502 100644 --- a/Items/Weapons/Magic/AuguroftheElements.cs +++ b/Items/Weapons/Magic/AuguroftheElements.cs @@ -35,27 +35,27 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - Vector2 value2 = new Vector2(num78, num79); - value2.Normalize(); - Vector2 value3 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); - value3.Normalize(); - value2 = value2 * 6f + value3; - value2.Normalize(); - value2 *= Item.shootSpeed; - float num91 = (float)Main.rand.Next(10, 50) * 0.001f; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + Vector2 tentacleVelocity = new Vector2(mouseXDist, mouseYDist); + tentacleVelocity.Normalize(); + Vector2 tentacleRandVelocity = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); + tentacleRandVelocity.Normalize(); + tentacleVelocity = tentacleVelocity * 6f + tentacleRandVelocity; + tentacleVelocity.Normalize(); + tentacleVelocity *= Item.shootSpeed; + float tentacleYDirection = (float)Main.rand.Next(10, 50) * 0.001f; if (Main.rand.NextBool()) { - num91 *= -1f; + tentacleYDirection *= -1f; } - float num92 = (float)Main.rand.Next(10, 50) * 0.001f; + float tentacleXDirection = (float)Main.rand.Next(10, 50) * 0.001f; if (Main.rand.NextBool()) { - num92 *= -1f; + tentacleXDirection *= -1f; } - Projectile.NewProjectile(source, vector2, value2, type, damage, knockback, player.whoAmI, num92, num91); + Projectile.NewProjectile(source, realPlayerPos, tentacleVelocity, type, damage, knockback, player.whoAmI, tentacleXDirection, tentacleYDirection); return false; } diff --git a/Items/Weapons/Magic/BloodBath.cs b/Items/Weapons/Magic/BloodBath.cs index 43c702f8c4..7f291993cd 100644 --- a/Items/Weapons/Magic/BloodBath.cs +++ b/Items/Weapons/Magic/BloodBath.cs @@ -40,57 +40,57 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float bloodSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXPos = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYPos = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYPos = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXPos * mouseXPos + mouseYPos * mouseYPos)); + if ((float.IsNaN(mouseXPos) && float.IsNaN(mouseYPos)) || (mouseXPos == 0f && mouseYPos == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXPos = (float)player.direction; + mouseYPos = 0f; + mouseDistance = bloodSpeed; } else { - num80 = num72 / num80; + mouseDistance = bloodSpeed / mouseDistance; } - int num107 = 2; + int bloodAmt = 2; if (Main.rand.NextBool(3)) { - num107++; + bloodAmt++; } if (Main.rand.NextBool(3)) { - num107++; + bloodAmt++; } - for (int num108 = 0; num108 < num107; num108++) + for (int i = 0; i < bloodAmt; i++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num108); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * i); + mouseXPos = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYPos = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYPos < 0f) { - num79 *= -1f; + mouseYPos *= -1f; } - if (num79 < 20f) + if (mouseYPos < 20f) { - num79 = 20f; + mouseYPos = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-30, 31) * 0.02f; - float speedY5 = num79 + (float)Main.rand.Next(-30, 31) * 0.02f; - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockback, player.whoAmI, 0f, (float)Main.rand.Next(15)); + mouseDistance = (float)Math.Sqrt((double)(mouseXPos * mouseXPos + mouseYPos * mouseYPos)); + mouseDistance = bloodSpeed / mouseDistance; + mouseXPos *= mouseDistance; + mouseYPos *= mouseDistance; + float speedX4 = mouseXPos + (float)Main.rand.Next(-30, 31) * 0.02f; + float speedY5 = mouseYPos + (float)Main.rand.Next(-30, 31) * 0.02f; + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, type, damage, knockback, player.whoAmI, 0f, (float)Main.rand.Next(15)); } return false; } diff --git a/Items/Weapons/Magic/ClamorNoctus.cs b/Items/Weapons/Magic/ClamorNoctus.cs index ec774f15c5..fc307c109e 100644 --- a/Items/Weapons/Magic/ClamorNoctus.cs +++ b/Items/Weapons/Magic/ClamorNoctus.cs @@ -42,28 +42,28 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float projSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = projSpeed; } else { - num80 = num72 / num80; + mouseDistance = projSpeed / mouseDistance; } - int num107 = 3; - for (int num108 = 0; num108 < num107; num108++) + int projAmt = 3; + for (int i = 0; i < projAmt; i++) { float damageMult = 1f; float kbMult = 1f; @@ -76,26 +76,26 @@ namespace CalamityMod.Items.Weapons.Magic damageMult = 25f; kbMult = 1.5f; } - vector2 = new Vector2(player.Center.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.Center.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num108); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.Center.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.Center.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * i); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-30, 31) * 0.02f; - float speedY5 = num79 + (float)Main.rand.Next(-30, 31) * 0.02f; - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, (int)(damage * damageMult), (int)(knockback * kbMult), player.whoAmI, 0f, (float)Main.rand.Next(15)); + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = projSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX4 = mouseXDist + (float)Main.rand.Next(-30, 31) * 0.02f; + float speedY5 = mouseYDist + (float)Main.rand.Next(-30, 31) * 0.02f; + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, type, (int)(damage * damageMult), (int)(knockback * kbMult), player.whoAmI, 0f, (float)Main.rand.Next(15)); } return false; } diff --git a/Items/Weapons/Magic/CosmicRainbow.cs b/Items/Weapons/Magic/CosmicRainbow.cs index 7a247f4a57..b12a27a960 100644 --- a/Items/Weapons/Magic/CosmicRainbow.cs +++ b/Items/Weapons/Magic/CosmicRainbow.cs @@ -34,66 +34,66 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { Vector2 vector = player.RotatedRelativePoint(player.MountedCenter, true); - float num117 = 0.314159274f; - int num118 = 3; - Vector2 vector7 = velocity; - vector7.Normalize(); - vector7 *= 60f; - bool flag11 = Collision.CanHit(vector, 0, 0, vector + vector7, 0, 0); - for (int num119 = 0; num119 < num118; num119++) + float tenthPi = 0.314159274f; + int directRainbowAmt = 3; + Vector2 directRainbowVel = velocity; + directRainbowVel.Normalize(); + directRainbowVel *= 60f; + bool rainbowHitsTiles = Collision.CanHit(vector, 0, 0, vector + directRainbowVel, 0, 0); + for (int i = 0; i < directRainbowAmt; i++) { - float num120 = (float)num119 - ((float)num118 - 1f) / 2f; - Vector2 value9 = vector7.RotatedBy((double)(num117 * num120), default); - if (!flag11) + float rainbowOffset = (float)i - ((float)directRainbowAmt - 1f) / 2f; + Vector2 offsetSpawnPos = directRainbowVel.RotatedBy((double)(tenthPi * rainbowOffset), default); + if (!rainbowHitsTiles) { - value9 -= vector7; + offsetSpawnPos -= directRainbowVel; } - int rainbow = Projectile.NewProjectile(source, vector.X + value9.X, vector.Y + value9.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI); + int rainbow = Projectile.NewProjectile(source, vector.X + offsetSpawnPos.X, vector.Y + offsetSpawnPos.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI); Main.projectile[rainbow].usesLocalNPCImmunity = true; Main.projectile[rainbow].localNPCHitCooldown = 10; } - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float skyRainbowSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = skyRainbowSpeed; } else { - num80 = num72 / num80; + mouseDistance = skyRainbowSpeed / mouseDistance; } - for (int num108 = 0; num108 < 2; num108++) + for (int j = 0; j < 2; j++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num108); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * j); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-15, 16) * 0.01f; - float speedY5 = num79 + (float)Main.rand.Next(-15, 16) * 0.01f; - int rainbow2 = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockback, player.whoAmI); + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = skyRainbowSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX4 = mouseXDist + (float)Main.rand.Next(-15, 16) * 0.01f; + float speedY5 = mouseYDist + (float)Main.rand.Next(-15, 16) * 0.01f; + int rainbow2 = Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, type, damage, knockback, player.whoAmI); Main.projectile[rainbow2].usesLocalNPCImmunity = true; Main.projectile[rainbow2].localNPCHitCooldown = 10; } diff --git a/Items/Weapons/Magic/DeathhailStaff.cs b/Items/Weapons/Magic/DeathhailStaff.cs index 05d3b24171..c0b186ad69 100644 --- a/Items/Weapons/Magic/DeathhailStaff.cs +++ b/Items/Weapons/Magic/DeathhailStaff.cs @@ -46,55 +46,52 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { int i = Main.myPlayer; - float num72 = Item.shootSpeed; - int num73 = damage; - float num74 = knockback; - num74 = player.GetWeaponKnockback(Item, num74); + float beamSpeed = Item.shootSpeed; + float beamKnockback = knockback; + beamKnockback = player.GetWeaponKnockback(Item, beamKnockback); player.itemTime = Item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - Vector2 value = Vector2.UnitX.RotatedBy((double)player.fullRotation, default); - Vector2 vector3 = Main.MouseWorld - vector2; - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = beamSpeed; } else { - num80 = num72 / num80; + mouseDistance = beamSpeed / mouseDistance; } int numLasers = 2; - for (int num108 = 0; num108 < numLasers; num108++) + for (int i = 0; i < numLasers; i++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(91) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num108); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(91) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * i); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-50, 51) * 0.02f; - float speedY5 = num79 + (float)Main.rand.Next(-50, 51) * 0.02f; - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, num73, num74, i, 0f, 0f); + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = beamSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX4 = mouseXDist + (float)Main.rand.Next(-50, 51) * 0.02f; + float speedY5 = mouseYDist + (float)Main.rand.Next(-50, 51) * 0.02f; + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, type, damage, beamKnockback, i, 0f, 0f); } return false; } diff --git a/Items/Weapons/Magic/DivineRetribution.cs b/Items/Weapons/Magic/DivineRetribution.cs index bbba73c6a0..3393d825bf 100644 --- a/Items/Weapons/Magic/DivineRetribution.cs +++ b/Items/Weapons/Magic/DivineRetribution.cs @@ -44,47 +44,47 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float spearSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; + mouseXDist = (float)player.direction; } else { - num80 = num72 / num80; + mouseDistance = spearSpeed / mouseDistance; } int numProjectiles = 5; for (int i = 0; i < numProjectiles; i++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(51) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - /* - */ player.position.X), player.MountedCenter.Y + 600f); //- - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-50, 51); //200 - vector2.Y += (float)(100 * i); //-= - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; //+ - - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; //+ - - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(51) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - /* - */ player.position.X), player.MountedCenter.Y + 600f); //- + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-50, 51); //200 + realPlayerPos.Y += (float)(100 * i); //-= + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; //+ - + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; //+ - + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX6 = num78 + (float)Main.rand.Next(-60, 61) * 0.02f; - float speedY7 = num79 + (float)Main.rand.Next(-60, 61) * 0.02f; + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = spearSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX6 = mouseXDist + (float)Main.rand.Next(-60, 61) * 0.02f; + float speedY7 = mouseYDist + (float)Main.rand.Next(-60, 61) * 0.02f; float ai1 = Main.rand.NextFloat() + 0.5f; - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX6, -speedY7, type, damage, knockback, player.whoAmI, 0.0f, ai1); + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX6, -speedY7, type, damage, knockback, player.whoAmI, 0.0f, ai1); } return false; } diff --git a/Items/Weapons/Magic/EidolonStaff.cs b/Items/Weapons/Magic/EidolonStaff.cs index c76b80157c..b64847055f 100644 --- a/Items/Weapons/Magic/EidolonStaff.cs +++ b/Items/Weapons/Magic/EidolonStaff.cs @@ -41,35 +41,35 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num72 = Item.shootSpeed; - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float projSpeed = Item.shootSpeed; + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); int stardustAmt = 5; - float num132 = num78; - float num133 = num79; - num80 = (float)Math.Sqrt((double)(num132 * num132 + num133 * num133)); - num80 = num72 / num80; - num132 *= num80; - num133 *= num80; - float x2 = vector2.X; - float y2 = vector2.Y; - Projectile.NewProjectile(source, x2, y2, num132, num133, ModContent.ProjectileType(), damage, knockback, player.whoAmI); + float mouseXCopy = mouseXDist; + float mouseYCopy = mouseYDist; + mouseDistance = (float)Math.Sqrt((double)(mouseXCopy * mouseXCopy + mouseYCopy * mouseYCopy)); + mouseDistance = projSpeed / mouseDistance; + mouseXCopy *= mouseDistance; + mouseYCopy *= mouseDistance; + float x2 = realPlayerPos.X; + float y2 = realPlayerPos.Y; + Projectile.NewProjectile(source, x2, y2, mouseXCopy, mouseYCopy, ModContent.ProjectileType(), damage, knockback, player.whoAmI); for (int i = 0; i < stardustAmt; i++) { - num132 = num78; - num133 = num79; - float num134 = 0.05f * (float)i; - num132 += (float)Main.rand.Next(-90, 91) * num134; - num133 += (float)Main.rand.Next(-90, 91) * num134; - num80 = (float)Math.Sqrt((double)(num132 * num132 + num133 * num133)); - num80 = num72 / num80; - num132 *= num80; - num133 *= num80; - x2 = vector2.X; - y2 = vector2.Y; - Projectile.NewProjectile(source, x2, y2, num132, num133, ModContent.ProjectileType(), damage, knockback, player.whoAmI); + mouseXCopy = mouseXDist; + mouseYCopy = mouseYDist; + float randOffsetDampener = 0.05f * (float)i; + mouseXCopy += (float)Main.rand.Next(-90, 91) * randOffsetDampener; + mouseYCopy += (float)Main.rand.Next(-90, 91) * randOffsetDampener; + mouseDistance = (float)Math.Sqrt((double)(mouseXCopy * mouseXCopy + mouseYCopy * mouseYCopy)); + mouseDistance = projSpeed / mouseDistance; + mouseXCopy *= mouseDistance; + mouseYCopy *= mouseDistance; + x2 = realPlayerPos.X; + y2 = realPlayerPos.Y; + Projectile.NewProjectile(source, x2, y2, mouseXCopy, mouseYCopy, ModContent.ProjectileType(), damage, knockback, player.whoAmI); } return false; } diff --git a/Items/Weapons/Magic/EldritchTome.cs b/Items/Weapons/Magic/EldritchTome.cs index a3d0c6b179..f22178553a 100644 --- a/Items/Weapons/Magic/EldritchTome.cs +++ b/Items/Weapons/Magic/EldritchTome.cs @@ -36,31 +36,30 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { int i = Main.myPlayer; - int num73 = damage; - float num74 = knockback; - num74 = player.GetWeaponKnockback(Item, num74); + float playerKnockback = knockback; + playerKnockback = player.GetWeaponKnockback(Item, playerKnockback); player.itemTime = Item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - Vector2 value2 = new Vector2(num78, num79); - value2.Normalize(); - Vector2 value3 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); - value3.Normalize(); - value2 = value2 * 4f + value3; - value2.Normalize(); - value2 *= Item.shootSpeed; - float num91 = (float)Main.rand.Next(10, 80) * 0.001f; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + Vector2 tentacleVelocity = new Vector2(mouseXDist, mouseYDist); + tentacleVelocity.Normalize(); + Vector2 tentacleRandVelocity = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); + tentacleRandVelocity.Normalize(); + tentacleVelocity = tentacleVelocity * 4f + tentacleRandVelocity; + tentacleVelocity.Normalize(); + tentacleVelocity *= Item.shootSpeed; + float tentacleYDirection = (float)Main.rand.Next(10, 80) * 0.001f; if (Main.rand.NextBool()) { - num91 *= -1f; + tentacleYDirection *= -1f; } - float num92 = (float)Main.rand.Next(10, 80) * 0.001f; + float tentacleXDirection = (float)Main.rand.Next(10, 80) * 0.001f; if (Main.rand.NextBool()) { - num92 *= -1f; + tentacleXDirection *= -1f; } - Projectile.NewProjectile(source, vector2, value2, ModContent.ProjectileType(), num73, num74, i, num92, num91); + Projectile.NewProjectile(source, realPlayerPos, tentacleVelocity, ModContent.ProjectileType(), damage, playerKnockback, i, tentacleXDirection, tentacleYDirection); return false; } } diff --git a/Items/Weapons/Magic/FatesReveal.cs b/Items/Weapons/Magic/FatesReveal.cs index 138e10d3fa..07be0fb55d 100644 --- a/Items/Weapons/Magic/FatesReveal.cs +++ b/Items/Weapons/Magic/FatesReveal.cs @@ -46,33 +46,33 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - Vector2 vector = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector.Y; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = Item.shootSpeed; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = Item.shootSpeed; } else { - num80 = Item.shootSpeed / num80; + mouseDistance = Item.shootSpeed / mouseDistance; } - vector += new Vector2(num78, num79); + realPlayerPos += new Vector2(mouseXDist, mouseYDist); int numProjectiles = 5; for (int i = 0; i < numProjectiles; i++) { - vector.X += (float)Main.rand.Next(-100, 101); - vector.Y += (float)(Main.rand.Next(-25, 26) * i); - float spawnX = vector.X; - float spawnY = vector.Y; + realPlayerPos.X += (float)Main.rand.Next(-100, 101); + realPlayerPos.Y += (float)(Main.rand.Next(-25, 26) * i); + float spawnX = realPlayerPos.X; + float spawnY = realPlayerPos.Y; Projectile.NewProjectile(source, spawnX, spawnY, 0f, 0f, type, damage, knockback, player.whoAmI, 0f, (float)Main.rand.Next(3)); } return false; diff --git a/Items/Weapons/Magic/Genisis.cs b/Items/Weapons/Magic/Genisis.cs index fcc7207011..401e372148 100644 --- a/Items/Weapons/Magic/Genisis.cs +++ b/Items/Weapons/Magic/Genisis.cs @@ -36,10 +36,9 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 0f); - int num6 = 3; float SpeedX = velocity.X + (float)Main.rand.Next(-20, 21) * 0.05f; float SpeedY = velocity.Y + (float)Main.rand.Next(-20, 21) * 0.05f; - for (int index = 0; index < num6; ++index) + for (int index = 0; index < 3; ++index) { int projectile = Projectile.NewProjectile(source, position.X, position.Y, SpeedX * 1.05f, SpeedY * 1.05f, ProjectileID.LaserMachinegunLaser, (int)(damage * 0.65), knockback * 0.6f, player.whoAmI, 0f, 0f); Main.projectile[projectile].timeLeft = 120; diff --git a/Items/Weapons/Magic/HellwingStaff.cs b/Items/Weapons/Magic/HellwingStaff.cs index c15d2fbaf6..016d50affe 100644 --- a/Items/Weapons/Magic/HellwingStaff.cs +++ b/Items/Weapons/Magic/HellwingStaff.cs @@ -39,49 +39,48 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float num72 = velocity.Length(); - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X + vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y + vector2.Y; + float projSpeed = velocity.Length(); + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X + realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y + realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight + (float)Main.mouseY + vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight + (float)Main.mouseY + realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = projSpeed; } else { - num80 = num72 / num80; + mouseDistance = projSpeed / mouseDistance; } - int num130 = 4; - for (int num131 = 0; num131 < num130; num131++) + for (int i = 0; i < 4; i++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num131); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * i); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-40, 41) * 0.02f; - float speedY5 = num79 + (float)Main.rand.Next(-40, 41) * 0.02f; - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockback, player.whoAmI, 0f, 0f); + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = projSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX4 = mouseXDist + (float)Main.rand.Next(-40, 41) * 0.02f; + float speedY5 = mouseYDist + (float)Main.rand.Next(-40, 41) * 0.02f; + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, type, damage, knockback, player.whoAmI, 0f, 0f); } return false; } diff --git a/Items/Weapons/Magic/IceBarrage.cs b/Items/Weapons/Magic/IceBarrage.cs index bb6737bed0..59d80d7201 100644 --- a/Items/Weapons/Magic/IceBarrage.cs +++ b/Items/Weapons/Magic/IceBarrage.cs @@ -46,10 +46,10 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - vector2.X = Main.mouseX + Main.screenPosition.X; - vector2.Y = Main.mouseY + Main.screenPosition.Y; - Projectile.NewProjectile(source, vector2, Vector2.Zero, type, damage, knockback, player.whoAmI, 0f, 0f); + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + realPlayerPos.X = Main.mouseX + Main.screenPosition.X; + realPlayerPos.Y = Main.mouseY + Main.screenPosition.Y; + Projectile.NewProjectile(source, realPlayerPos, Vector2.Zero, type, damage, knockback, player.whoAmI, 0f, 0f); CalamityGlobalItem.ConsumeAdditionalAmmo(player, Item, 2); diff --git a/Items/Weapons/Magic/IcicleStaff.cs b/Items/Weapons/Magic/IcicleStaff.cs index 9a9f8d0d2e..0b2aa81420 100644 --- a/Items/Weapons/Magic/IcicleStaff.cs +++ b/Items/Weapons/Magic/IcicleStaff.cs @@ -40,49 +40,48 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { int i = Main.myPlayer; - float num72 = velocity.Length(); - int num73 = damage; - float num74 = knockback; - num74 = player.GetWeaponKnockback(Item, num74); + float icicleSpeed = velocity.Length(); + float playerKnockback = knockback; + playerKnockback = player.GetWeaponKnockback(Item, playerKnockback); player.itemTime = Item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX - Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY - Main.screenPosition.Y - vector2.Y; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX - Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY - Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = icicleSpeed; } else { - num80 = num72 / num80; + mouseDistance = icicleSpeed / mouseDistance; } - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78; - float speedY5 = num79 + (float)Main.rand.Next(-40, 41) * 0.02f; - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), num73, num74, i, 0f, (float)Main.rand.Next(10)); + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = icicleSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX4 = mouseXDist; + float speedY5 = mouseYDist + (float)Main.rand.Next(-40, 41) * 0.02f; + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, ModContent.ProjectileType(), damage, playerKnockback, i, 0f, (float)Main.rand.Next(10)); return false; } diff --git a/Items/Weapons/Magic/InfernalRift.cs b/Items/Weapons/Magic/InfernalRift.cs index 9131f0cc1c..0b024aef5b 100644 --- a/Items/Weapons/Magic/InfernalRift.cs +++ b/Items/Weapons/Magic/InfernalRift.cs @@ -44,29 +44,29 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num72 = Item.shootSpeed; - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float projSpeed = Item.shootSpeed; + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; float f = Main.rand.NextFloat() * MathHelper.TwoPi; - float value12 = 20f; - float value13 = 60f; - Vector2 vector13 = vector2 + f.ToRotationVector2() * MathHelper.Lerp(value12, value13, Main.rand.NextFloat()); - for (int num202 = 0; num202 < 50; num202++) + float lowerLerpValue = 20f; + float upperLerpValue = 60f; + Vector2 projSpawnOffset = realPlayerPos + f.ToRotationVector2() * MathHelper.Lerp(lowerLerpValue, upperLerpValue, Main.rand.NextFloat()); + for (int i = 0; i < 50; i++) { - vector13 = vector2 + f.ToRotationVector2() * MathHelper.Lerp(value12, value13, Main.rand.NextFloat()); - if (Collision.CanHit(vector2, 0, 0, vector13 + (vector13 - vector2).SafeNormalize(Vector2.UnitX) * 8f, 0, 0)) + projSpawnOffset = realPlayerPos + f.ToRotationVector2() * MathHelper.Lerp(lowerLerpValue, upperLerpValue, Main.rand.NextFloat()); + if (Collision.CanHit(realPlayerPos, 0, 0, projSpawnOffset + (projSpawnOffset - realPlayerPos).SafeNormalize(Vector2.UnitX) * 8f, 0, 0)) { break; } f = Main.rand.NextFloat() * MathHelper.TwoPi; } Vector2 mouseWorld = Main.MouseWorld; - Vector2 vector14 = mouseWorld - vector13; - Vector2 vector15 = new Vector2(num78, num79).SafeNormalize(Vector2.UnitY) * num72; - vector14 = vector14.SafeNormalize(vector15) * num72; - vector14 = Vector2.Lerp(vector14, vector15, 0.25f); - Projectile.NewProjectile(source, vector13, vector14, type, damage, knockback, player.whoAmI, 0f, 0f); + Vector2 projSpawnPos = mouseWorld - projSpawnOffset; + Vector2 projVelocity = new Vector2(mouseXDist, mouseYDist).SafeNormalize(Vector2.UnitY) * projSpeed; + projSpawnPos = projSpawnPos.SafeNormalize(projVelocity) * projSpeed; + projSpawnPos = Vector2.Lerp(projSpawnPos, projVelocity, 0.25f); + Projectile.NewProjectile(source, projSpawnOffset, projSpawnPos, type, damage, knockback, player.whoAmI, 0f, 0f); return false; } diff --git a/Items/Weapons/Magic/Mistlestorm.cs b/Items/Weapons/Magic/Mistlestorm.cs index 306f5055be..e4675f7a01 100644 --- a/Items/Weapons/Magic/Mistlestorm.cs +++ b/Items/Weapons/Magic/Mistlestorm.cs @@ -39,17 +39,17 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - int num106 = 2 + Main.rand.Next(3); - for (int num107 = 0; num107 < num106; num107++) + int projAmt = 2 + Main.rand.Next(3); + for (int i = 0; i < projAmt; i++) { - float num110 = 0.025f * (float)num107; - velocity.X += (float)Main.rand.Next(-35, 36) * num110; - velocity.Y += (float)Main.rand.Next(-35, 36) * num110; - float num84 = velocity.Length(); - num84 = Item.shootSpeed / num84; - velocity.X *= num84; - velocity.Y *= num84; - Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, (float)Main.rand.Next(0, 10 * (num107 + 1)), 0f); + float randVelocityDampener = 0.025f * (float)i; + velocity.X += (float)Main.rand.Next(-35, 36) * randVelocityDampener; + velocity.Y += (float)Main.rand.Next(-35, 36) * randVelocityDampener; + float projDistance = velocity.Length(); + projDistance = Item.shootSpeed / projDistance; + velocity.X *= projDistance; + velocity.Y *= projDistance; + Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, (float)Main.rand.Next(0, 10 * (i + 1)), 0f); Projectile.NewProjectile(source, position, velocity, ProjectileID.Leaf, damage, knockback, player.whoAmI); } return false; diff --git a/Items/Weapons/Magic/PhoenixFlameBarrage.cs b/Items/Weapons/Magic/PhoenixFlameBarrage.cs index 130180ddb8..8f2a6f1573 100644 --- a/Items/Weapons/Magic/PhoenixFlameBarrage.cs +++ b/Items/Weapons/Magic/PhoenixFlameBarrage.cs @@ -40,58 +40,58 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float num72 = Item.shootSpeed; + float flameSpeed = Item.shootSpeed; player.itemTime = Item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = flameSpeed; } else { - num80 = num72 / num80; + mouseDistance = flameSpeed / mouseDistance; } - int num107 = 30; + int flameAmt = 30; if (Main.rand.NextBool(3)) { - num107++; + flameAmt++; } if (Main.rand.NextBool(3)) { - num107++; + flameAmt++; } - for (int num108 = 0; num108 < num107; num108++) + for (int i = 0; i < flameAmt; i++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num108); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * i); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-30, 31) * 0.02f; - float speedY5 = num79 + (float)Main.rand.Next(-30, 31) * 0.02f; - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockback, player.whoAmI, 0f, (float)Main.rand.Next(15)); + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = flameSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX4 = mouseXDist + (float)Main.rand.Next(-30, 31) * 0.02f; + float speedY5 = mouseYDist + (float)Main.rand.Next(-30, 31) * 0.02f; + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, type, damage, knockback, player.whoAmI, 0f, (float)Main.rand.Next(15)); } return false; } diff --git a/Items/Weapons/Magic/Serpentine.cs b/Items/Weapons/Magic/Serpentine.cs index 2b1ff6d602..5647e88358 100644 --- a/Items/Weapons/Magic/Serpentine.cs +++ b/Items/Weapons/Magic/Serpentine.cs @@ -34,31 +34,31 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { int owner = player.whoAmI; - float num72 = Item.shootSpeed; + float projSpeed = Item.shootSpeed; player.itemTime = Item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - Vector2 value = Vector2.UnitX.RotatedBy((double)player.fullRotation, default); - Vector2 vector3 = Main.MouseWorld - vector2; - float velX = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float velY = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + Vector2 projRotation = Vector2.UnitX.RotatedBy((double)player.fullRotation, default); + Vector2 projSpawnPos = Main.MouseWorld - realPlayerPos; + float velX = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float velY = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - velY = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + velY = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } float dist = (float)Math.Sqrt((double)(velX * velX + velY * velY)); if ((float.IsNaN(velX) && float.IsNaN(velY)) || (velX == 0f && velY == 0f)) { velX = (float)player.direction; velY = 0f; - dist = num72; + dist = projSpeed; } else { - dist = num72 / dist; + dist = projSpeed / dist; } - float num77 = Vector2.Dot(value, vector3); - if (num77 > 0f) + float projDirection = Vector2.Dot(projRotation, projSpawnPos); + if (projDirection > 0f) { player.ChangeDir(1); } @@ -68,8 +68,8 @@ namespace CalamityMod.Items.Weapons.Magic } //velX = 0f; //velY = 0f; - //vector2.X = (float)Main.mouseX + Main.screenPosition.X; - //vector2.Y = (float)Main.mouseY + Main.screenPosition.Y; + //realPlayerPos.X = (float)Main.mouseX + Main.screenPosition.X; + //realPlayerPos.Y = (float)Main.mouseY + Main.screenPosition.Y; int curr = Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage, knockback, owner); int prev = curr; diff --git a/Items/Weapons/Magic/ShadecrystalTome.cs b/Items/Weapons/Magic/ShadecrystalTome.cs index a1eeec8c64..974d0ea9f7 100644 --- a/Items/Weapons/Magic/ShadecrystalTome.cs +++ b/Items/Weapons/Magic/ShadecrystalTome.cs @@ -33,8 +33,8 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - int num6 = Main.rand.Next(1, 3); - for (int index = 0; index < num6; ++index) + int projAmt = Main.rand.Next(1, 3); + for (int index = 0; index < projAmt; ++index) { float SpeedX = velocity.X + Main.rand.Next(-40, 41) * 0.05f; float SpeedY = velocity.Y + Main.rand.Next(-40, 41) * 0.05f; diff --git a/Items/Weapons/Magic/SkyGlaze.cs b/Items/Weapons/Magic/SkyGlaze.cs index 28062701e3..73c4148597 100644 --- a/Items/Weapons/Magic/SkyGlaze.cs +++ b/Items/Weapons/Magic/SkyGlaze.cs @@ -38,49 +38,49 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float featherSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = featherSpeed; } else { - num80 = num72 / num80; + mouseDistance = featherSpeed / mouseDistance; } int featherAmt = 3; - for (int num108 = 0; num108 < featherAmt; num108++) + for (int i = 0; i < featherAmt; i++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num108); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * i); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-30, 31) * 0.02f; - float speedY5 = num79 + (float)Main.rand.Next(-30, 31) * 0.02f; - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockback, player.whoAmI, 0f, (float)Main.rand.Next(15)); + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = featherSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX4 = mouseXDist + (float)Main.rand.Next(-30, 31) * 0.02f; + float speedY5 = mouseYDist + (float)Main.rand.Next(-30, 31) * 0.02f; + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, type, damage, knockback, player.whoAmI, 0f, (float)Main.rand.Next(15)); } return false; } diff --git a/Items/Weapons/Magic/StarShower.cs b/Items/Weapons/Magic/StarShower.cs index 942cd99b4c..f18d8c054c 100644 --- a/Items/Weapons/Magic/StarShower.cs +++ b/Items/Weapons/Magic/StarShower.cs @@ -36,29 +36,29 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float starSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; + mouseXDist = (float)player.direction; + mouseYDist = 0f; } - float num208 = num78; - float num209 = num79; - num208 += (float)Main.rand.Next(-1, 2) * 0.5f; - num209 += (float)Main.rand.Next(-1, 2) * 0.5f; - vector2 += new Vector2(num208, num209); - for (int num108 = 0; num108 < 5; num108++) + float randXOffset = mouseXDist; + float randYOffset = mouseYDist; + randXOffset += (float)Main.rand.Next(-1, 2) * 0.5f; + randYOffset += (float)Main.rand.Next(-1, 2) * 0.5f; + realPlayerPos += new Vector2(randXOffset, randYOffset); + for (int i = 0; i < 5; i++) { float speedX4 = 2f + (float)Main.rand.Next(-8, 5); float speedY5 = 15f + (float)Main.rand.Next(1, 6); - int star = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockback, player.whoAmI, 0f, 0f); + int star = Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, type, damage, knockback, player.whoAmI, 0f, 0f); } return false; } diff --git a/Items/Weapons/Magic/TomeofFates.cs b/Items/Weapons/Magic/TomeofFates.cs index ce91cbf567..c98e116ce3 100644 --- a/Items/Weapons/Magic/TomeofFates.cs +++ b/Items/Weapons/Magic/TomeofFates.cs @@ -37,38 +37,37 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { int i = Main.myPlayer; - int num73 = damage; - float num74 = knockback; - num74 = player.GetWeaponKnockback(Item, num74); + float playerKnockback = knockback; + playerKnockback = player.GetWeaponKnockback(Item, playerKnockback); player.itemTime = Item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - Vector2 value2 = new Vector2(num78, num79); - value2.Normalize(); - Vector2 value3 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); - value3.Normalize(); - value2 = value2 * 4f + value3; - value2.Normalize(); - value2 *= Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + Vector2 tentacleVelocity = new Vector2(mouseXDist, mouseYDist); + tentacleVelocity.Normalize(); + Vector2 tentacleRandVelocity = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); + tentacleRandVelocity.Normalize(); + tentacleVelocity = tentacleVelocity * 4f + tentacleRandVelocity; + tentacleVelocity.Normalize(); + tentacleVelocity *= Item.shootSpeed; int projChoice = Main.rand.Next(7); - float num91 = (float)Main.rand.Next(10, 160) * 0.001f; + float tentacleYDirection = (float)Main.rand.Next(10, 160) * 0.001f; if (Main.rand.NextBool()) { - num91 *= -1f; + tentacleYDirection *= -1f; } - float num92 = (float)Main.rand.Next(10, 160) * 0.001f; + float tentacleXDirection = (float)Main.rand.Next(10, 160) * 0.001f; if (Main.rand.NextBool()) { - num92 *= -1f; + tentacleXDirection *= -1f; } if (projChoice == 0) { - Projectile.NewProjectile(source, vector2.X, vector2.Y, value2.X, value2.Y, ModContent.ProjectileType(), (int)((double)num73 * 1.5f), num74, i, num92, num91); + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, tentacleVelocity.X, tentacleVelocity.Y, ModContent.ProjectileType(), (int)((double)num73 * 1.5f), playerKnockback, i, tentacleXDirection, tentacleYDirection); } else { - Projectile.NewProjectile(source, vector2.X, vector2.Y, value2.X, value2.Y, ModContent.ProjectileType(), num73, num74, i, num92, num91); + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, tentacleVelocity.X, tentacleVelocity.Y, ModContent.ProjectileType(), damage, playerKnockback, i, tentacleXDirection, tentacleYDirection); } return false; } diff --git a/Items/Weapons/Magic/UndinesRetribution.cs b/Items/Weapons/Magic/UndinesRetribution.cs index 43834b2533..e075d8a142 100644 --- a/Items/Weapons/Magic/UndinesRetribution.cs +++ b/Items/Weapons/Magic/UndinesRetribution.cs @@ -40,46 +40,46 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float spearSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; + mouseXDist = (float)player.direction; } else { - num80 = num72 / num80; + mouseDistance = spearSpeed / mouseDistance; } - for (int num108 = 0; num108 < 3; num108++) + for (int i = 0; i < 3; i++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(51) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - /* - */ player.position.X), player.MountedCenter.Y + 600f); //- - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-50, 51); //200 - vector2.Y += (float)(100 * num108); //-= - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; //+ - - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; //+ - - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(51) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - /* - */ player.position.X), player.MountedCenter.Y + 600f); //- + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-50, 51); //200 + realPlayerPos.Y += (float)(100 * i); //-= + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; //+ - + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; //+ - + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX6 = num78 + (float)Main.rand.Next(-60, 61) * 0.02f; - float speedY7 = num79 + (float)Main.rand.Next(-60, 61) * 0.02f; + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = spearSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX6 = mouseXDist + (float)Main.rand.Next(-60, 61) * 0.02f; + float speedY7 = mouseYDist + (float)Main.rand.Next(-60, 61) * 0.02f; float ai1 = Main.rand.NextFloat() + 0.5f; - int bullet2 = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX6, -speedY7, type, damage, knockback, player.whoAmI, 0.0f, ai1); + int bullet2 = Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX6, -speedY7, type, damage, knockback, player.whoAmI, 0.0f, ai1); } return false; } diff --git a/Items/Weapons/Magic/Vesuvius.cs b/Items/Weapons/Magic/Vesuvius.cs index 8bb0bb3ebe..ce81f4bfb9 100644 --- a/Items/Weapons/Magic/Vesuvius.cs +++ b/Items/Weapons/Magic/Vesuvius.cs @@ -68,49 +68,49 @@ namespace CalamityMod.Items.Weapons.Magic } else { - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float meteorSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = meteorSpeed; } else { - num80 = num72 / num80; + mouseDistance = meteorSpeed / mouseDistance; } - for (int num113 = 0; num113 < 4; num113++) + for (int i = 0; i < 4; i++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num113); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X + (float)Main.rand.Next(-40, 41) * 0.03f; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * i); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X + (float)Main.rand.Next(-40, 41) * 0.03f; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float num114 = num78; - float num115 = num79 + (float)Main.rand.Next(-40, 41) * 0.02f; + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = meteorSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float meteorSpawnXOffset = mouseXDist; + float meteorSpawnYOffset = mouseYDist + (float)Main.rand.Next(-40, 41) * 0.02f; float ai0 = (float)Main.rand.Next(6); - Projectile.NewProjectile(source, vector2.X, vector2.Y, num114 * 0.75f, num115 * 0.75f, type, damage, knockback, player.whoAmI, ai0, 0.5f + (float)Main.rand.NextDouble() * 0.9f); //0.3 + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, meteorSpawnXOffset * 0.75f, meteorSpawnYOffset * 0.75f, type, damage, knockback, player.whoAmI, ai0, 0.5f + (float)Main.rand.NextDouble() * 0.9f); //0.3 } return false; } diff --git a/Items/Weapons/Magic/VividClarity.cs b/Items/Weapons/Magic/VividClarity.cs index aa4956a485..209bd54617 100644 --- a/Items/Weapons/Magic/VividClarity.cs +++ b/Items/Weapons/Magic/VividClarity.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Items.Weapons.Magic float sourceVariationLow = 20f; float sourceVariationHigh = 60f; Vector2 source = playerPos + f.ToRotationVector2() * MathHelper.Lerp(sourceVariationLow, sourceVariationHigh, Main.rand.NextFloat()); - for (int num202 = 0; num202 < 50; num202++) + for (int i = 0; i < 50; i++) { source = playerPos + f.ToRotationVector2() * MathHelper.Lerp(sourceVariationLow, sourceVariationHigh, Main.rand.NextFloat()); if (Collision.CanHit(playerPos, 0, 0, source + (source - playerPos).SafeNormalize(Vector2.UnitX) * 8f, 0, 0)) diff --git a/Items/Weapons/Magic/WyvernsCall.cs b/Items/Weapons/Magic/WyvernsCall.cs index a761ac63b7..05717f3b85 100644 --- a/Items/Weapons/Magic/WyvernsCall.cs +++ b/Items/Weapons/Magic/WyvernsCall.cs @@ -38,28 +38,27 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float projSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = projSpeed; } else { - num80 = num72 / num80; + mouseDistance = projSpeed / mouseDistance; } - int num107 = 3; - for (int num108 = 0; num108 < num107; num108++) + for (int i = 0; i < 3; i++) { float damageMult = 1f; float kbMult = 1f; @@ -85,26 +84,26 @@ namespace CalamityMod.Items.Weapons.Magic damageMult = 1.2f; kbMult = 2f; } - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num108); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * i); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-30, 31) * 0.02f; - float speedY5 = num79 + (float)Main.rand.Next(-30, 31) * 0.02f; - int feather = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, (int)(damage * damageMult), (int)(knockback * kbMult), player.whoAmI, 0f, (float)Main.rand.Next(15)); + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = projSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX4 = mouseXDist + (float)Main.rand.Next(-30, 31) * 0.02f; + float speedY5 = mouseYDist + (float)Main.rand.Next(-30, 31) * 0.02f; + int feather = Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, type, (int)(damage * damageMult), (int)(knockback * kbMult), player.whoAmI, 0f, (float)Main.rand.Next(15)); } return false; } diff --git a/Items/Weapons/Melee/Aftershock.cs b/Items/Weapons/Melee/Aftershock.cs index ae5f6cde92..52de9634c0 100644 --- a/Items/Weapons/Melee/Aftershock.cs +++ b/Items/Weapons/Melee/Aftershock.cs @@ -34,94 +34,94 @@ namespace CalamityMod.Items.Weapons.Melee { var source = player.GetSource_ItemUse(Item); target.AddBuff(ModContent.BuffType(), 300); - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX - Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY - Main.screenPosition.Y - vector2.Y; + float rockSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX - Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY - Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = rockSpeed; } else { - num80 = num72 / num80; + mouseDistance = rockSpeed / mouseDistance; } - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)100; - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)100; + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78; - float speedY5 = num79 + (float)Main.rand.Next(-10, 11) * 0.02f; + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = rockSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX4 = mouseXDist; + float speedY5 = mouseYDist + (float)Main.rand.Next(-10, 11) * 0.02f; int rockDamage = player.CalcIntDamage(Item.damage); - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), rockDamage, hit.Knockback, player.whoAmI, 0f, (float)Main.rand.Next(10)); + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, ModContent.ProjectileType(), rockDamage, hit.Knockback, player.whoAmI, 0f, (float)Main.rand.Next(10)); } public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo) { var source = player.GetSource_ItemUse(Item); target.AddBuff(ModContent.BuffType(), 300); - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX - Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY - Main.screenPosition.Y - vector2.Y; + float rockSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX - Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY - Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = rockSpeed; } else { - num80 = num72 / num80; + mouseDistance = rockSpeed / mouseDistance; } - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)100; - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)100; + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78; - float speedY5 = num79 + (float)Main.rand.Next(-10, 11) * 0.02f; + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = rockSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX4 = mouseXDist; + float speedY5 = mouseYDist + (float)Main.rand.Next(-10, 11) * 0.02f; int rockDamage = player.CalcIntDamage(Item.damage); - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), rockDamage, Item.knockBack, player.whoAmI, 0f, (float)Main.rand.Next(10)); + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, ModContent.ProjectileType(), rockDamage, Item.knockBack, player.whoAmI, 0f, (float)Main.rand.Next(10)); } public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Weapons/Melee/Avalanche.cs b/Items/Weapons/Melee/Avalanche.cs index 933b67c18d..679c49f80c 100644 --- a/Items/Weapons/Melee/Avalanche.cs +++ b/Items/Weapons/Melee/Avalanche.cs @@ -42,8 +42,8 @@ namespace CalamityMod.Items.Weapons.Melee Vector2 spinningPoint = Main.rand.NextBool() ? new Vector2(0f, -velocity) : new Vector2(-velocityX, -velocity); for (int k = 0; k < totalProjectiles; k++) { - Vector2 vector255 = spinningPoint.RotatedBy(radians * k); - Projectile.NewProjectile(source, target.Center, vector255, type, bombDamage, hit.Knockback, Main.myPlayer); + Vector2 projRotation = spinningPoint.RotatedBy(radians * k); + Projectile.NewProjectile(source, target.Center, projRotation, type, bombDamage, hit.Knockback, Main.myPlayer); } } @@ -61,8 +61,8 @@ namespace CalamityMod.Items.Weapons.Melee Vector2 spinningPoint = Main.rand.NextBool() ? new Vector2(0f, -velocity) : new Vector2(-velocityX, -velocity); for (int k = 0; k < totalProjectiles; k++) { - Vector2 vector255 = spinningPoint.RotatedBy(radians * k); - Projectile.NewProjectile(source, target.Center, vector255, type, bombDamage, 0f, Main.myPlayer); + Vector2 projRotation = spinningPoint.RotatedBy(radians * k); + Projectile.NewProjectile(source, target.Center, projRotation, type, bombDamage, 0f, Main.myPlayer); } } @@ -70,8 +70,8 @@ namespace CalamityMod.Items.Weapons.Melee { if (Main.rand.NextBool(3)) { - int num250 = Dust.NewDust(new Vector2((float)hitbox.X, (float)hitbox.Y), hitbox.Width, hitbox.Height, 67, (float)(player.direction * 2), 0f, 150, default, 1.5f); - Main.dust[num250].velocity *= 0.2f; + int iceDust = Dust.NewDust(new Vector2((float)hitbox.X, (float)hitbox.Y), hitbox.Width, hitbox.Height, 67, (float)(player.direction * 2), 0f, 150, default, 1.5f); + Main.dust[iceDust].velocity *= 0.2f; } } } diff --git a/Items/Weapons/Melee/BansheeHook.cs b/Items/Weapons/Melee/BansheeHook.cs index c28f054d5e..9e3568bbbd 100644 --- a/Items/Weapons/Melee/BansheeHook.cs +++ b/Items/Weapons/Melee/BansheeHook.cs @@ -49,27 +49,27 @@ namespace CalamityMod.Items.Weapons.Melee public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float num82 = (float)Main.mouseX + Main.screenPosition.X - position.X; - float num83 = (float)Main.mouseY + Main.screenPosition.Y - position.Y; + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - position.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - position.Y; if (player.gravDir == -1f) { - num83 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - position.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - position.Y; } - float num84 = (float)Math.Sqrt((double)(num82 * num82 + num83 * num83)); - if ((float.IsNaN(num82) && float.IsNaN(num83)) || (num82 == 0f && num83 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num82 = (float)player.direction; - num83 = 0f; - num84 = Item.shootSpeed; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = Item.shootSpeed; } else { - num84 = Item.shootSpeed / num84; + mouseDistance = Item.shootSpeed / mouseDistance; } - num82 *= num84; - num83 *= num84; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; float ai4 = Main.rand.NextFloat() * Item.shootSpeed * 0.75f * (float)player.direction; - velocity = new Vector2(num82, num83); + velocity = new Vector2(mouseXDist, mouseYDist); Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, ai4, 0.0f); return false; } diff --git a/Items/Weapons/Melee/CelestialClaymore.cs b/Items/Weapons/Melee/CelestialClaymore.cs index e0f0631535..6e959d4e24 100644 --- a/Items/Weapons/Melee/CelestialClaymore.cs +++ b/Items/Weapons/Melee/CelestialClaymore.cs @@ -32,44 +32,43 @@ namespace CalamityMod.Items.Weapons.Melee public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X + vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y + vector2.Y; + float projSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X + realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y + realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight + (float)Main.mouseY + vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight + (float)Main.mouseY + realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = projSpeed; } else { - num80 = num72 / num80; + mouseDistance = projSpeed / mouseDistance; } - int num107 = 3; - for (int num108 = 0; num108 < num107; num108++) + for (int i = 0; i < 3; i++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num108); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * i); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = projSpeed / mouseDistance; switch (Main.rand.Next(3)) { case 0: @@ -84,7 +83,7 @@ namespace CalamityMod.Items.Weapons.Melee default: break; } - Projectile.NewProjectile(source, vector2.X, vector2.Y, 0f, 0f, type, (int)(damage * 0.8), knockback, player.whoAmI, 0f, (float)Main.rand.Next(3)); + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, 0f, 0f, type, (int)(damage * 0.8), knockback, player.whoAmI, 0f, (float)Main.rand.Next(3)); } return false; } @@ -93,21 +92,21 @@ namespace CalamityMod.Items.Weapons.Melee { if (Main.rand.NextBool(4)) { - int num249 = Main.rand.Next(2); - if (num249 == 0) + int dustType = Main.rand.Next(2); + if (dustType == 0) { - num249 = 15; + dustType = 15; } - else if (num249 == 1) + else if (dustType == 1) { - num249 = 73; + dustType = 73; } else { - num249 = 244; + dustType = 244; } - int num250 = Dust.NewDust(new Vector2((float)hitbox.X, (float)hitbox.Y), hitbox.Width, hitbox.Height, num249, (float)(player.direction * 2), 0f, 150, default, 1.3f); - Main.dust[num250].velocity *= 0.2f; + int swingDust = Dust.NewDust(new Vector2((float)hitbox.X, (float)hitbox.Y), hitbox.Width, hitbox.Height, dustType, (float)(player.direction * 2), 0f, 150, default, 1.3f); + Main.dust[swingDust].velocity *= 0.2f; } } } diff --git a/Items/Weapons/Melee/CometQuasher.cs b/Items/Weapons/Melee/CometQuasher.cs index 74d7f09561..142394b369 100644 --- a/Items/Weapons/Melee/CometQuasher.cs +++ b/Items/Weapons/Melee/CometQuasher.cs @@ -36,48 +36,48 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) { var source = player.GetSource_ItemUse(Item); - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float cometSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = cometSpeed; } else { - num80 = num72 / num80; + mouseDistance = cometSpeed / mouseDistance; } - for (int num113 = 0; num113 < 2; num113++) + for (int i = 0; i < 2; i++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num113); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X + (float)Main.rand.Next(-40, 41) * 0.03f; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * i); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X + (float)Main.rand.Next(-40, 41) * 0.03f; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float num114 = num78; - float num115 = num79 + (float)Main.rand.Next(-40, 41) * 0.02f; - int proj = Projectile.NewProjectile(source, vector2.X, vector2.Y, num114 * 0.75f, num115 * 0.75f, ModContent.ProjectileType(), (int)(Item.damage * 0.5f), Item.knockBack, player.whoAmI, 0f, 0.5f + (float)Main.rand.NextDouble() * 0.3f); + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = cometSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float cometSpawnXOffset = mouseXDist; + float cometSpawnYOffset = mouseYDist + (float)Main.rand.Next(-40, 41) * 0.02f; + int proj = Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, cometSpawnXOffset * 0.75f, cometSpawnYOffset * 0.75f, ModContent.ProjectileType(), (int)(Item.damage * 0.5f), Item.knockBack, player.whoAmI, 0f, 0.5f + (float)Main.rand.NextDouble() * 0.3f); Main.projectile[proj].Calamity().lineColor = Main.rand.Next(3); } } @@ -85,48 +85,48 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo) { var source = player.GetSource_ItemUse(Item); - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float cometSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = cometSpeed; } else { - num80 = num72 / num80; + mouseDistance = cometSpeed / mouseDistance; } - for (int num113 = 0; num113 < 2; num113++) + for (int i = 0; i < 2; i++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num113); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X + (float)Main.rand.Next(-40, 41) * 0.03f; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * i); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X + (float)Main.rand.Next(-40, 41) * 0.03f; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float num114 = num78; - float num115 = num79 + (float)Main.rand.Next(-40, 41) * 0.02f; - int proj = Projectile.NewProjectile(source, vector2.X, vector2.Y, num114 * 0.75f, num115 * 0.75f, ModContent.ProjectileType(), (int)(Item.damage * 0.5f), Item.knockBack, player.whoAmI, 0f, 0.5f + (float)Main.rand.NextDouble() * 0.3f); + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = cometSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float cometSpawnXOffset = mouseXDist; + float cometSpawnYOffset = mouseYDist + (float)Main.rand.Next(-40, 41) * 0.02f; + int proj = Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, cometSpawnXOffset * 0.75f, cometSpawnYOffset * 0.75f, ModContent.ProjectileType(), (int)(Item.damage * 0.5f), Item.knockBack, player.whoAmI, 0f, 0.5f + (float)Main.rand.NextDouble() * 0.3f); Main.projectile[proj].Calamity().lineColor = Main.rand.Next(3); } } diff --git a/Items/Weapons/Melee/Devastation.cs b/Items/Weapons/Melee/Devastation.cs index 4b49d7298c..01d6dee779 100644 --- a/Items/Weapons/Melee/Devastation.cs +++ b/Items/Weapons/Melee/Devastation.cs @@ -54,51 +54,50 @@ namespace CalamityMod.Items.Weapons.Melee break; } Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, type, damage, knockback, Main.myPlayer); - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float projSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = projSpeed; } else { - num80 = num72 / num80; + mouseDistance = projSpeed / mouseDistance; } - int num107 = 4; - for (int num108 = 0; num108 < num107; num108++) + for (int i = 0; i < 4; i++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num108); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * i); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-40, 41) * 0.02f; - float speedY5 = num79 + (float)Main.rand.Next(-40, 41) * 0.02f; - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), damage / 2, knockback, player.whoAmI, 0f, (float)Main.rand.Next(5)); - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), damage / 2, knockback, player.whoAmI, 0f, (float)Main.rand.Next(3)); - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), damage / 2, knockback, player.whoAmI, 0f, (float)Main.rand.Next(1)); + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = projSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX4 = mouseXDist + (float)Main.rand.Next(-40, 41) * 0.02f; + float speedY5 = mouseYDist + (float)Main.rand.Next(-40, 41) * 0.02f; + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, ModContent.ProjectileType(), damage / 2, knockback, player.whoAmI, 0f, (float)Main.rand.Next(5)); + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, ModContent.ProjectileType(), damage / 2, knockback, player.whoAmI, 0f, (float)Main.rand.Next(3)); + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, ModContent.ProjectileType(), damage / 2, knockback, player.whoAmI, 0f, (float)Main.rand.Next(1)); } return false; } diff --git a/Items/Weapons/Melee/DevilsDevastation.cs b/Items/Weapons/Melee/DevilsDevastation.cs index 81d91c3562..4243649280 100644 --- a/Items/Weapons/Melee/DevilsDevastation.cs +++ b/Items/Weapons/Melee/DevilsDevastation.cs @@ -119,39 +119,39 @@ namespace CalamityMod.Items.Weapons.Melee target.AddBuff(BuffID.ShadowFlame, 450); target.AddBuff(BuffID.OnFire, 900); player.ApplyDamageToNPC(target, Item.damage * 4, 0f, 0, false); - float scalar1 = 1.7f; - float scalar2 = 0.8f; - float scalar3 = 2f; - Vector2 value3 = (target.rotation - MathHelper.PiOver2).ToRotationVector2(); - Vector2 value4 = value3 * target.velocity.Length(); + float firstDustScale = 1.7f; + float secondDustScale = 0.8f; + float thirdDustScale = 2f; + Vector2 dustRotation = (target.rotation - MathHelper.PiOver2).ToRotationVector2(); + Vector2 dustVelocity = dustRotation * target.velocity.Length(); SoundEngine.PlaySound(SoundID.Item14, target.Center); for (int i = 0; i < 40; i++) { - int dustInt = Dust.NewDust(target.position, target.width, target.height, 173, 0f, 0f, 200, default, scalar1); + int dustInt = Dust.NewDust(target.position, target.width, target.height, 173, 0f, 0f, 200, default, firstDustScale); Dust dust = Main.dust[dustInt]; dust.position = target.Center + Vector2.UnitY.RotatedByRandom(Math.PI) * Main.rand.NextFloat() * target.width / 2f; dust.noGravity = true; dust.velocity.Y -= 4.5f; dust.velocity *= 3f; - dust.velocity += value4 * Main.rand.NextFloat(); - dustInt = Dust.NewDust(target.position, target.width, target.height, 173, 0f, 0f, 100, default, scalar2); + dust.velocity += dustVelocity * Main.rand.NextFloat(); + dustInt = Dust.NewDust(target.position, target.width, target.height, 173, 0f, 0f, 100, default, secondDustScale); dust.position = target.Center + Vector2.UnitY.RotatedByRandom(Math.PI) * Main.rand.NextFloat() * target.width / 2f; dust.velocity.Y -= 3f; dust.velocity *= 2f; dust.noGravity = true; dust.fadeIn = 1f; dust.color = Color.Crimson * 0.5f; - dust.velocity += value4 * Main.rand.NextFloat(); + dust.velocity += dustVelocity * Main.rand.NextFloat(); } for (int j = 0; j < 20; j++) { - int dustInt = Dust.NewDust(target.position, target.width, target.height, 173, 0f, 0f, 0, default, scalar3); + int dustInt = Dust.NewDust(target.position, target.width, target.height, 173, 0f, 0f, 0, default, thirdDustScale); Dust dust = Main.dust[dustInt]; dust.position = target.Center + Vector2.UnitX.RotatedByRandom(Math.PI).RotatedBy((double)target.velocity.ToRotation(), default) * target.width / 3f; dust.noGravity = true; dust.velocity.Y -= 1.5f; dust.velocity *= 0.5f; - dust.velocity += value4 * (0.6f + 0.6f * Main.rand.NextFloat()); + dust.velocity += dustVelocity * (0.6f + 0.6f * Main.rand.NextFloat()); } } } diff --git a/Items/Weapons/Melee/Earth.cs b/Items/Weapons/Melee/Earth.cs index 9d741c2c96..773eabba6f 100644 --- a/Items/Weapons/Melee/Earth.cs +++ b/Items/Weapons/Melee/Earth.cs @@ -36,51 +36,50 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) { var source = player.GetSource_ItemUse(Item); - float num72 = 25f; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX - Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY - Main.screenPosition.Y - vector2.Y; + float projSpeed = 25f; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX - Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY - Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = projSpeed; } else { - num80 = num72 / num80; + mouseDistance = projSpeed / mouseDistance; } - int num107 = 3; - for (int num108 = 0; num108 < num107; num108++) + for (int i = 0; i < 3; i++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num108); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * i); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78; - float speedY5 = num79 + (float)Main.rand.Next(-180, 181) * 0.02f; + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = projSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX4 = mouseXDist; + float speedY5 = mouseYDist + (float)Main.rand.Next(-180, 181) * 0.02f; int projDamage = player.CalcIntDamage(Item.damage); - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), projDamage, hit.Knockback, player.whoAmI, 0f, (float)Main.rand.Next(10)); + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, ModContent.ProjectileType(), projDamage, hit.Knockback, player.whoAmI, 0f, (float)Main.rand.Next(10)); } if (target.Calamity().miscDefenseLoss < target.defense) @@ -97,50 +96,49 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo) { var source = player.GetSource_ItemUse(Item); - float num72 = 25f; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX - Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY - Main.screenPosition.Y - vector2.Y; + float projSpeed = 25f; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX - Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY - Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = projSpeed; } else { - num80 = num72 / num80; + mouseDistance = projSpeed / mouseDistance; } - int num107 = 3; - for (int num108 = 0; num108 < num107; num108++) + for (int i = 0; i < 3; i++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num108); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * i); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78; - float speedY5 = num79 + (float)Main.rand.Next(-180, 181) * 0.02f; + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = projSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX4 = mouseXDist; + float speedY5 = mouseYDist + (float)Main.rand.Next(-180, 181) * 0.02f; int earthDamage = player.CalcIntDamage(Item.damage); - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), earthDamage, Item.knockBack, player.whoAmI, 0f, (float)Main.rand.Next(10)); + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, ModContent.ProjectileType(), earthDamage, Item.knockBack, player.whoAmI, 0f, (float)Main.rand.Next(10)); } if (player.moonLeech) diff --git a/Items/Weapons/Melee/EmpyreanKnives.cs b/Items/Weapons/Melee/EmpyreanKnives.cs index 5a4c74effc..49cea27978 100644 --- a/Items/Weapons/Melee/EmpyreanKnives.cs +++ b/Items/Weapons/Melee/EmpyreanKnives.cs @@ -36,60 +36,58 @@ namespace CalamityMod.Items.Weapons.Melee public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - Vector2 value = Vector2.UnitX.RotatedBy((double)player.fullRotation, default); - Vector2 vector3 = Main.MouseWorld - vector2; - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float knifeSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = knifeSpeed; } else { - num80 = num72 / num80; + mouseDistance = knifeSpeed / mouseDistance; } - num78 *= num80; - num79 *= num80; - int num146 = 4; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + int knifeAmt = 4; if (Main.rand.NextBool()) { - num146++; + knifeAmt++; } if (Main.rand.NextBool(4)) { - num146++; + knifeAmt++; } if (Main.rand.NextBool(8)) { - num146++; + knifeAmt++; } if (Main.rand.NextBool(16)) { - num146++; + knifeAmt++; } - for (int num147 = 0; num147 < num146; num147++) + for (int i = 0; i < knifeAmt; i++) { - float num148 = num78; - float num149 = num79; - float num150 = 0.05f * (float)num147; - num148 += (float)Main.rand.Next(-25, 26) * num150; - num149 += (float)Main.rand.Next(-25, 26) * num150; - num80 = (float)Math.Sqrt((double)(num148 * num148 + num149 * num149)); - num80 = num72 / num80; - num148 *= num80; - num149 *= num80; - float x4 = vector2.X; - float y4 = vector2.Y; - Projectile.NewProjectile(source, x4, y4, num148, num149, type, damage, knockback, player.whoAmI, 0f, 0f); + float knifeSpawnXPos = mouseXDist; + float knifeSpawnYPos = mouseYDist; + float randOffsetDampener = 0.05f * (float)i; + knifeSpawnXPos += (float)Main.rand.Next(-25, 26) * randOffsetDampener; + knifeSpawnYPos += (float)Main.rand.Next(-25, 26) * randOffsetDampener; + mouseDistance = (float)Math.Sqrt((double)(knifeSpawnXPos * knifeSpawnXPos + knifeSpawnYPos * knifeSpawnYPos)); + mouseDistance = knifeSpeed / mouseDistance; + knifeSpawnXPos *= mouseDistance; + knifeSpawnYPos *= mouseDistance; + float x4 = realPlayerPos.X; + float y4 = realPlayerPos.Y; + Projectile.NewProjectile(source, x4, y4, knifeSpawnXPos, knifeSpawnYPos, type, damage, knockback, player.whoAmI, 0f, 0f); } return false; } diff --git a/Items/Weapons/Melee/EntropicClaymore.cs b/Items/Weapons/Melee/EntropicClaymore.cs index 11ff310684..d9a820585d 100644 --- a/Items/Weapons/Melee/EntropicClaymore.cs +++ b/Items/Weapons/Melee/EntropicClaymore.cs @@ -38,8 +38,8 @@ namespace CalamityMod.Items.Weapons.Melee public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - int num6 = Main.rand.Next(4, 6); - for (int index = 0; index < num6; ++index) + int projAmt = Main.rand.Next(4, 6); + for (int index = 0; index < projAmt; ++index) { float SpeedX = velocity.X + (float)Main.rand.Next(-20, 21) * 0.05f; float SpeedY = velocity.Y + (float)Main.rand.Next(-20, 21) * 0.05f; diff --git a/Items/Weapons/Melee/ExaltedOathblade.cs b/Items/Weapons/Melee/ExaltedOathblade.cs index 4750c5f0c4..935f03de6c 100644 --- a/Items/Weapons/Melee/ExaltedOathblade.cs +++ b/Items/Weapons/Melee/ExaltedOathblade.cs @@ -60,39 +60,39 @@ namespace CalamityMod.Items.Weapons.Melee target.AddBuff(BuffID.ShadowFlame, 450); target.AddBuff(BuffID.OnFire, 900); player.ApplyDamageToNPC(target, player.GetWeaponDamage(player.ActiveItem()) * 2, 0f, 0, false); - float num50 = 1.7f; - float num51 = 0.8f; - float num52 = 2f; - Vector2 value3 = (target.rotation - MathHelper.PiOver2).ToRotationVector2(); - Vector2 value4 = value3 * target.velocity.Length(); + float firstDustScale = 1.7f; + float secondDustScale = 0.8f; + float thirdDustScale = 2f; + Vector2 dustRotation = (target.rotation - MathHelper.PiOver2).ToRotationVector2(); + Vector2 dustVelocity = dustRotation * target.velocity.Length(); SoundEngine.PlaySound(SoundID.Item14, target.Center); - for (int num53 = 0; num53 < 40; num53++) + for (int i = 0; i < 40; i++) { - int num54 = Dust.NewDust(target.position, target.width, target.height, 173, 0f, 0f, 200, default, num50); - Dust dust = Main.dust[num54]; + int swingDust = Dust.NewDust(target.position, target.width, target.height, 173, 0f, 0f, 200, default, firstDustScale); + Dust dust = Main.dust[swingDust]; dust.position = target.Center + Vector2.UnitY.RotatedByRandom(Math.PI) * (float)Main.rand.NextDouble() * (float)target.width / 2f; dust.noGravity = true; dust.velocity.Y -= 4.5f; dust.velocity *= 3f; - dust.velocity += value4 * Main.rand.NextFloat(); - num54 = Dust.NewDust(target.position, target.width, target.height, 173, 0f, 0f, 100, default, num51); + dust.velocity += dustVelocity * Main.rand.NextFloat(); + swingDust = Dust.NewDust(target.position, target.width, target.height, 173, 0f, 0f, 100, default, secondDustScale); dust.position = target.Center + Vector2.UnitY.RotatedByRandom(Math.PI) * (float)Main.rand.NextDouble() * (float)target.width / 2f; dust.velocity.Y -= 3f; dust.velocity *= 2f; dust.noGravity = true; dust.fadeIn = 1f; dust.color = Color.Crimson * 0.5f; - dust.velocity += value4 * Main.rand.NextFloat(); + dust.velocity += dustVelocity * Main.rand.NextFloat(); } - for (int num55 = 0; num55 < 20; num55++) + for (int j = 0; j < 20; j++) { - int num56 = Dust.NewDust(target.position, target.width, target.height, 173, 0f, 0f, 0, default, num52); - Dust dust = Main.dust[num56]; + int swingDust2 = Dust.NewDust(target.position, target.width, target.height, 173, 0f, 0f, 0, default, thirdDustScale); + Dust dust = Main.dust[swingDust2]; dust.position = target.Center + Vector2.UnitX.RotatedByRandom(Math.PI).RotatedBy((double)target.velocity.ToRotation(), default) * (float)target.width / 3f; dust.noGravity = true; dust.velocity.Y -= 1.5f; dust.velocity *= 0.5f; - dust.velocity += value4 * (0.6f + 0.6f * Main.rand.NextFloat()); + dust.velocity += dustVelocity * (0.6f + 0.6f * Main.rand.NextFloat()); } } } diff --git a/Items/Weapons/Melee/ForbiddenOathblade.cs b/Items/Weapons/Melee/ForbiddenOathblade.cs index cae1a22330..83822db3c7 100644 --- a/Items/Weapons/Melee/ForbiddenOathblade.cs +++ b/Items/Weapons/Melee/ForbiddenOathblade.cs @@ -46,42 +46,42 @@ namespace CalamityMod.Items.Weapons.Melee target.AddBuff(BuffID.OnFire, 720); int onHitDamage = player.CalcIntDamage(2 * Item.damage); player.ApplyDamageToNPC(target, onHitDamage, 0f, 0, false); - float num50 = 1.7f; - float num51 = 0.8f; - float num52 = 2f; - Vector2 value3 = (target.rotation - 1.57079637f).ToRotationVector2(); - Vector2 value4 = value3 * target.velocity.Length(); + float firstDustScale = 1.7f; + float secondDustScale = 0.8f; + float thirdDustScale = 2f; + Vector2 dustRotation = (target.rotation - 1.57079637f).ToRotationVector2(); + Vector2 dustVelocity = dustRotation * target.velocity.Length(); SoundEngine.PlaySound(SoundID.Item14, target.Center); - int num3; - for (int num53 = 0; num53 < 40; num53 = num3 + 1) + int dustIncr; + for (int i = 0; i < 40; i = dustIncr + 1) { - int num54 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 173, 0f, 0f, 200, default, num50); - Dust dust = Main.dust[num54]; + int swingDust = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 173, 0f, 0f, 200, default, firstDustScale); + Dust dust = Main.dust[swingDust]; dust.position = target.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)target.width / 2f; dust.noGravity = true; dust.velocity.Y -= 4.5f; dust.velocity *= 3f; - dust.velocity += value4 * Main.rand.NextFloat(); - num54 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 173, 0f, 0f, 100, default, num51); + dust.velocity += dustVelocity * Main.rand.NextFloat(); + swingDust = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 173, 0f, 0f, 100, default, secondDustScale); dust.position = target.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)target.width / 2f; dust.velocity.Y -= 3f; dust.velocity *= 2f; dust.noGravity = true; dust.fadeIn = 1f; dust.color = Color.Crimson * 0.5f; - dust.velocity += value4 * Main.rand.NextFloat(); - num3 = num53; + dust.velocity += dustVelocity * Main.rand.NextFloat(); + dustIncr = i; } - for (int num55 = 0; num55 < 20; num55 = num3 + 1) + for (int j = 0; j < 20; j = dustIncr + 1) { - int num56 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 173, 0f, 0f, 0, default, num52); - Dust dust = Main.dust[num56]; + int swingDust2 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 173, 0f, 0f, 0, default, thirdDustScale); + Dust dust = Main.dust[swingDust2]; dust.position = target.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)target.velocity.ToRotation(), default) * (float)target.width / 3f; dust.noGravity = true; dust.velocity.Y -= 1.5f; dust.velocity *= 0.5f; - dust.velocity += value4 * (0.6f + 0.6f * Main.rand.NextFloat()); - num3 = num55; + dust.velocity += dustVelocity * (0.6f + 0.6f * Main.rand.NextFloat()); + dustIncr = j; } } } diff --git a/Items/Weapons/Melee/GalactusBlade.cs b/Items/Weapons/Melee/GalactusBlade.cs index f462729e04..a2e0c6ceab 100644 --- a/Items/Weapons/Melee/GalactusBlade.cs +++ b/Items/Weapons/Melee/GalactusBlade.cs @@ -37,49 +37,48 @@ namespace CalamityMod.Items.Weapons.Melee public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float cometSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = cometSpeed; } else { - num80 = num72 / num80; + mouseDistance = cometSpeed / mouseDistance; } - int num107 = 5; - for (int num108 = 0; num108 < num107; num108++) + for (int i = 0; i < 5; i++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num108); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * i); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-100, 101) * 0.02f; - float speedY5 = num79 + (float)Main.rand.Next(-100, 101) * 0.02f; - int projectile = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, (float)Main.rand.Next(10)); + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = cometSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX4 = mouseXDist + (float)Main.rand.Next(-100, 101) * 0.02f; + float speedY5 = mouseYDist + (float)Main.rand.Next(-100, 101) * 0.02f; + int projectile = Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, (float)Main.rand.Next(10)); } return false; } diff --git a/Items/Weapons/Melee/Greentide.cs b/Items/Weapons/Melee/Greentide.cs index 615f365490..7cc69c1946 100644 --- a/Items/Weapons/Melee/Greentide.cs +++ b/Items/Weapons/Melee/Greentide.cs @@ -33,52 +33,52 @@ namespace CalamityMod.Items.Weapons.Melee { var source = player.GetSource_ItemUse(Item); int i = Main.myPlayer; - float num72 = Item.shootSpeed; - float num74 = hit.Knockback; - num74 = player.GetWeaponKnockback(Item, num74); + float projSpeed = Item.shootSpeed; + float playerKnockback = hit.Knockback; + playerKnockback = player.GetWeaponKnockback(Item, playerKnockback); player.itemTime = Item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX - Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY - Main.screenPosition.Y - vector2.Y; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX - Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY - Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = projSpeed; } else { - num80 = num72 / num80; + mouseDistance = projSpeed / mouseDistance; } - for (int num108 = 0; num108 < 3; num108++) + for (int i = 0; i < 3; i++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num108); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * i); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78; - float speedY5 = num79 + (float)Main.rand.Next(-180, 181) * 0.02f; + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = projSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX4 = mouseXDist; + float speedY5 = mouseYDist + (float)Main.rand.Next(-180, 181) * 0.02f; int greenWaterDamage = player.CalcIntDamage(Item.damage); - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), greenWaterDamage, num74, i, 0f, (float)Main.rand.Next(10)); + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, ModContent.ProjectileType(), greenWaterDamage, playerKnockback, i, 0f, (float)Main.rand.Next(10)); } } @@ -86,53 +86,52 @@ namespace CalamityMod.Items.Weapons.Melee { var source = player.GetSource_ItemUse(Item); int i = Main.myPlayer; - float num72 = Item.shootSpeed; - float num74 = Item.knockBack; - num74 = player.GetWeaponKnockback(Item, num74); + float projSpeed = Item.shootSpeed; + float playerKnockback = Item.knockBack; + playerKnockback = player.GetWeaponKnockback(Item, playerKnockback); player.itemTime = Item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX - Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY - Main.screenPosition.Y - vector2.Y; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX - Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY - Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = projSpeed; } else { - num80 = num72 / num80; + mouseDistance = projSpeed / mouseDistance; } - int num107 = 4; - for (int num108 = 0; num108 < num107; num108++) + for (int i = 0; i < 4; i++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num108); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * i); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78; - float speedY5 = num79 + (float)Main.rand.Next(-180, 181) * 0.02f; + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = projSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX4 = mouseXDist; + float speedY5 = mouseYDist + (float)Main.rand.Next(-180, 181) * 0.02f; int greenWaterDamage = player.CalcIntDamage(Item.damage); - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), greenWaterDamage, num74, i, 0f, (float)Main.rand.Next(10)); + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, ModContent.ProjectileType(), greenWaterDamage, playerKnockback, i, 0f, (float)Main.rand.Next(10)); } } diff --git a/Items/Weapons/Melee/Hellkite.cs b/Items/Weapons/Melee/Hellkite.cs index 14f1befc1b..9b0f324446 100644 --- a/Items/Weapons/Melee/Hellkite.cs +++ b/Items/Weapons/Melee/Hellkite.cs @@ -55,42 +55,42 @@ namespace CalamityMod.Items.Weapons.Melee target.AddBuff(BuffID.OnFire3, 300); int onHitDamage = player.CalcIntDamage(Item.damage); player.ApplyDamageToNPC(target, onHitDamage, 0f, 0, false); - float num50 = 1.7f; - float num51 = 0.8f; - float num52 = 2f; - Vector2 value3 = (target.rotation - 1.57079637f).ToRotationVector2(); - Vector2 value4 = value3 * target.velocity.Length(); + float firstDustScale = 1.7f; + float secondDustScale = 0.8f; + float thirdDustScale = 2f; + Vector2 dustRotation = (target.rotation - 1.57079637f).ToRotationVector2(); + Vector2 dustVelocity = dustRotation * target.velocity.Length(); SoundEngine.PlaySound(SoundID.Item14, target.Center); - int num3; - for (int num53 = 0; num53 < 40; num53 = num3 + 1) + int increment; + for (int i = 0; i < 40; i = increment + 1) { - int num54 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 174, 0f, 0f, 200, default, num50); - Dust dust = Main.dust[num54]; + int swingDust = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 174, 0f, 0f, 200, default, firstDustScale); + Dust dust = Main.dust[swingDust]; dust.position = target.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)target.width / 2f; dust.noGravity = true; dust.velocity.Y -= 6f; dust.velocity *= 3f; - dust.velocity += value4 * Main.rand.NextFloat(); - num54 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 174, 0f, 0f, 100, default, num51); + dust.velocity += dustVelocity * Main.rand.NextFloat(); + swingDust = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 174, 0f, 0f, 100, default, secondDustScale); dust.position = target.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)target.width / 2f; dust.velocity.Y -= 6f; dust.velocity *= 2f; dust.noGravity = true; dust.fadeIn = 1f; dust.color = Color.Crimson * 0.5f; - dust.velocity += value4 * Main.rand.NextFloat(); - num3 = num53; + dust.velocity += dustVelocity * Main.rand.NextFloat(); + increment = i; } - for (int num55 = 0; num55 < 20; num55 = num3 + 1) + for (int j = 0; j < 20; j = increment + 1) { - int num56 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 174, 0f, 0f, 0, default, num52); - Dust dust = Main.dust[num56]; + int swingDust2 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 174, 0f, 0f, 0, default, thirdDustScale); + Dust dust = Main.dust[swingDust2]; dust.position = target.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)target.velocity.ToRotation(), default) * (float)target.width / 3f; dust.noGravity = true; dust.velocity.Y -= 6f; dust.velocity *= 0.5f; - dust.velocity += value4 * (0.6f + 0.6f * Main.rand.NextFloat()); - num3 = num55; + dust.velocity += dustVelocity * (0.6f + 0.6f * Main.rand.NextFloat()); + increment = j; } } } diff --git a/Items/Weapons/Melee/IllustriousKnives.cs b/Items/Weapons/Melee/IllustriousKnives.cs index 5e2ee3cefd..6fe1669c29 100644 --- a/Items/Weapons/Melee/IllustriousKnives.cs +++ b/Items/Weapons/Melee/IllustriousKnives.cs @@ -40,60 +40,58 @@ namespace CalamityMod.Items.Weapons.Melee public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - Vector2 value = Vector2.UnitX.RotatedBy((double)player.fullRotation, default); - Vector2 vector3 = Main.MouseWorld - vector2; - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float knifeSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = knifeSpeed; } else { - num80 = num72 / num80; + mouseDistance = knifeSpeed / mouseDistance; } - num78 *= num80; - num79 *= num80; - int num146 = 4; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + int knifeAmt = 4; if (Main.rand.NextBool()) { - num146++; + knifeAmt++; } if (Main.rand.NextBool(4)) { - num146++; + knifeAmt++; } if (Main.rand.NextBool(6)) { - num146++; + knifeAmt++; } if (Main.rand.NextBool(8)) { - num146++; + knifeAmt++; } - for (int num147 = 0; num147 < num146; num147++) + for (int i = 0; i < knifeAmt; i++) { - float num148 = num78; - float num149 = num79; - float num150 = 0.05f * (float)num147; - num148 += (float)Main.rand.Next(-35, 36) * num150; - num149 += (float)Main.rand.Next(-35, 36) * num150; - num80 = (float)Math.Sqrt((double)(num148 * num148 + num149 * num149)); - num80 = num72 / num80; - num148 *= num80; - num149 *= num80; - float x4 = vector2.X; - float y4 = vector2.Y; - Projectile.NewProjectile(source, x4, y4, num148, num149, type, damage, knockback, player.whoAmI, 0f, 0f); + float knifeSpawnXPos = mouseXDist; + float knifeSpawnYPos = mouseYDist; + float randOffsetDampener = 0.05f * (float)i; + knifeSpawnXPos += (float)Main.rand.Next(-35, 36) * randOffsetDampener; + knifeSpawnYPos += (float)Main.rand.Next(-35, 36) * randOffsetDampener; + mouseDistance = (float)Math.Sqrt((double)(knifeSpawnXPos * knifeSpawnXPos + knifeSpawnYPos * knifeSpawnYPos)); + mouseDistance = knifeSpeed / mouseDistance; + knifeSpawnXPos *= mouseDistance; + knifeSpawnYPos *= mouseDistance; + float x4 = realPlayerPos.X; + float y4 = realPlayerPos.Y; + Projectile.NewProjectile(source, x4, y4, knifeSpawnXPos, knifeSpawnYPos, type, damage, knockback, player.whoAmI, 0f, 0f); } return false; } diff --git a/Items/Weapons/Melee/IridescentExcalibur.cs b/Items/Weapons/Melee/IridescentExcalibur.cs index ed6fd22ea4..21c7469d36 100644 --- a/Items/Weapons/Melee/IridescentExcalibur.cs +++ b/Items/Weapons/Melee/IridescentExcalibur.cs @@ -133,8 +133,8 @@ namespace CalamityMod.Items.Weapons.Melee break; } - Dust dust24 = Main.dust[Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 267, 0f, 0f, alpha, color, 1.2f)]; - dust24.noGravity = true; + Dust swingDust = Main.dust[Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 267, 0f, 0f, alpha, color, 1.2f)]; + swingDust.noGravity = true; } } diff --git a/Items/Weapons/Melee/RedSun.cs b/Items/Weapons/Melee/RedSun.cs index 37d2bb4282..49e558c3ee 100644 --- a/Items/Weapons/Melee/RedSun.cs +++ b/Items/Weapons/Melee/RedSun.cs @@ -40,51 +40,48 @@ namespace CalamityMod.Items.Weapons.Melee public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - Vector2 value = Vector2.UnitX.RotatedBy((double)player.fullRotation, default); - Vector2 vector3 = Main.MouseWorld - vector2; - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float flareSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = flareSpeed; } else { - num80 = num72 / num80; + mouseDistance = flareSpeed / mouseDistance; } - int num107 = 3; - for (int num108 = 0; num108 < num107; num108++) + for (int i = 0; i < 3; i++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num108); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * i); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-1000, 1001) * 0.02f; - float speedY5 = num79 + (float)Main.rand.Next(-1000, 1001) * 0.02f; - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), (int)((double)damage * 0.7), knockback, player.whoAmI, 0f, (float)Main.rand.Next(10)); + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = flareSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX4 = mouseXDist + (float)Main.rand.Next(-1000, 1001) * 0.02f; + float speedY5 = mouseYDist + (float)Main.rand.Next(-1000, 1001) * 0.02f; + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, ModContent.ProjectileType(), (int)((double)damage * 0.7), knockback, player.whoAmI, 0f, (float)Main.rand.Next(10)); } return false; } diff --git a/Items/Weapons/Melee/SoulHarvester.cs b/Items/Weapons/Melee/SoulHarvester.cs index 6039f8ddb1..92b7c7d045 100644 --- a/Items/Weapons/Melee/SoulHarvester.cs +++ b/Items/Weapons/Melee/SoulHarvester.cs @@ -47,23 +47,23 @@ namespace CalamityMod.Items.Weapons.Melee SoundEngine.PlaySound(SoundID.Item14, target.Center); int onHitDamage = player.CalcIntDamage(Item.damage); player.ApplyDamageToNPC(target, onHitDamage, 0f, 0, false); - for (int num621 = 0; num621 < 10; num621++) + for (int i = 0; i < 10; i++) { - int num622 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 89, 0f, 0f, 100, default, 2f); - Main.dust[num622].velocity *= 3f; + int plagueDust = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 89, 0f, 0f, 100, default, 2f); + Main.dust[plagueDust].velocity *= 3f; if (Main.rand.NextBool()) { - Main.dust[num622].scale = 0.5f; - Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f; + Main.dust[plagueDust].scale = 0.5f; + Main.dust[plagueDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f; } } - for (int num623 = 0; num623 < 20; num623++) + for (int j = 0; j < 20; j++) { - int num624 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 89, 0f, 0f, 100, default, 3f); - Main.dust[num624].noGravity = true; - Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 89, 0f, 0f, 100, default, 2f); - Main.dust[num624].velocity *= 2f; + int plagueDust2 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 89, 0f, 0f, 100, default, 3f); + Main.dust[plagueDust2].noGravity = true; + Main.dust[plagueDust2].velocity *= 5f; + plagueDust2 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 89, 0f, 0f, 100, default, 2f); + Main.dust[plagueDust2].velocity *= 2f; } } } @@ -75,23 +75,23 @@ namespace CalamityMod.Items.Weapons.Melee if (target.statLife <= (target.statLifeMax * 0.15f)) { SoundEngine.PlaySound(SoundID.Item14, target.Center); - for (int num621 = 0; num621 < 10; num621++) + for (int i = 0; i < 10; i++) { - int num622 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 89, 0f, 0f, 100, default, 2f); - Main.dust[num622].velocity *= 3f; + int plagueDust = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 89, 0f, 0f, 100, default, 2f); + Main.dust[plagueDust].velocity *= 3f; if (Main.rand.NextBool()) { - Main.dust[num622].scale = 0.5f; - Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f; + Main.dust[plagueDust].scale = 0.5f; + Main.dust[plagueDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f; } } - for (int num623 = 0; num623 < 20; num623++) + for (int j = 0; j < 20; j++) { - int num624 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 89, 0f, 0f, 100, default, 3f); - Main.dust[num624].noGravity = true; - Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 89, 0f, 0f, 100, default, 2f); - Main.dust[num624].velocity *= 2f; + int plagueDust2 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 89, 0f, 0f, 100, default, 3f); + Main.dust[plagueDust2].noGravity = true; + Main.dust[plagueDust2].velocity *= 5f; + plagueDust2 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 89, 0f, 0f, 100, default, 2f); + Main.dust[plagueDust2].velocity *= 2f; } } } diff --git a/Items/Weapons/Melee/StellarStriker.cs b/Items/Weapons/Melee/StellarStriker.cs index cabf413e86..e43f33e130 100644 --- a/Items/Weapons/Melee/StellarStriker.cs +++ b/Items/Weapons/Melee/StellarStriker.cs @@ -46,52 +46,51 @@ namespace CalamityMod.Items.Weapons.Melee var source = player.GetSource_ItemUse(Item); SoundEngine.PlaySound(SoundID.Item88, player.Center); int i = Main.myPlayer; - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float cometSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = cometSpeed; } else { - num80 = num72 / num80; + mouseDistance = cometSpeed / mouseDistance; } if (crit) damage /= 2; - int num112 = 2; - for (int num113 = 0; num113 < num112; num113++) + for (int i = 0; i < 2; i++) { - vector2 = new Vector2(player.Center.X + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num113); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X + (float)Main.rand.Next(-40, 41) * 0.03f; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.Center.X + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * i); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X + (float)Main.rand.Next(-40, 41) * 0.03f; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float num114 = num78; - float num115 = num79 + (float)Main.rand.Next(-80, 81) * 0.02f; - int proj = Projectile.NewProjectile(source, vector2.X, vector2.Y, num114, num115, ProjectileID.LunarFlare, (int)(damage * 0.5), knockback, i, 0f, (float)Main.rand.Next(3)); + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = cometSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX = mouseXDist; + float speedY = mouseYDist + (float)Main.rand.Next(-80, 81) * 0.02f; + int proj = Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX, speedY, ProjectileID.LunarFlare, (int)(damage * 0.5), knockback, i, 0f, (float)Main.rand.Next(3)); if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].DamageType = DamageClass.Melee; } diff --git a/Items/Weapons/Melee/StormRuler.cs b/Items/Weapons/Melee/StormRuler.cs index 81f51e2b91..7014194781 100644 --- a/Items/Weapons/Melee/StormRuler.cs +++ b/Items/Weapons/Melee/StormRuler.cs @@ -33,8 +33,8 @@ namespace CalamityMod.Items.Weapons.Melee { if (Main.rand.NextBool(5)) { - int num250 = Dust.NewDust(new Vector2((float)hitbox.X, (float)hitbox.Y), hitbox.Width, hitbox.Height, 187, (float)(player.direction * 2), 0f, 150, default, 1.3f); - Main.dust[num250].velocity *= 0.2f; + int swingDust = Dust.NewDust(new Vector2((float)hitbox.X, (float)hitbox.Y), hitbox.Width, hitbox.Height, 187, (float)(player.direction * 2), 0f, 150, default, 1.3f); + Main.dust[swingDust].velocity *= 0.2f; } } diff --git a/Items/Weapons/Melee/StormSaber.cs b/Items/Weapons/Melee/StormSaber.cs index 6a80e16a4c..b95302eb72 100644 --- a/Items/Weapons/Melee/StormSaber.cs +++ b/Items/Weapons/Melee/StormSaber.cs @@ -47,8 +47,8 @@ namespace CalamityMod.Items.Weapons.Melee { if (Main.rand.NextBool(5)) { - int num250 = Dust.NewDust(new Vector2((float)hitbox.X, (float)hitbox.Y), hitbox.Width, hitbox.Height, 187, (float)(player.direction * 2), 0f, 150, default, 1.3f); - Main.dust[num250].velocity *= 0.2f; + int swingDust = Dust.NewDust(new Vector2((float)hitbox.X, (float)hitbox.Y), hitbox.Width, hitbox.Height, 187, (float)(player.direction * 2), 0f, 150, default, 1.3f); + Main.dust[swingDust].velocity *= 0.2f; } } } diff --git a/Items/Weapons/Melee/Swordsplosion.cs b/Items/Weapons/Melee/Swordsplosion.cs index dec805925a..b0f1d4aa32 100644 --- a/Items/Weapons/Melee/Swordsplosion.cs +++ b/Items/Weapons/Melee/Swordsplosion.cs @@ -48,41 +48,40 @@ namespace CalamityMod.Items.Weapons.Melee type = ModContent.ProjectileType(); break; } - float num72 = Main.rand.Next(22, 30); - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X + vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y + vector2.Y; + float projSpeed = Main.rand.Next(22, 30); + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X + realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y + realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight + (float)Main.mouseY + vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight + (float)Main.mouseY + realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = projSpeed; } else { - num80 = num72 / num80; + mouseDistance = projSpeed / mouseDistance; } - int num107 = 16; - for (int num108 = 0; num108 < num107; num108++) + for (int i = 0; i < 16; i++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)-(float)player.direction + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y); - vector2.X = (vector2.X + player.Center.X) / 2f; - vector2.Y -= (float)(100 * num108); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-360, 361) * 0.02f; - float speedY5 = num79 + (float)Main.rand.Next(-360, 361) * 0.02f; - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockback, player.whoAmI, 2f, 0f); + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)-(float)player.direction + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f; + realPlayerPos.Y -= (float)(100 * i); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = projSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX4 = mouseXDist + (float)Main.rand.Next(-360, 361) * 0.02f; + float speedY5 = mouseYDist + (float)Main.rand.Next(-360, 361) * 0.02f; + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, type, damage, knockback, player.whoAmI, 2f, 0f); } return false; } @@ -91,9 +90,9 @@ namespace CalamityMod.Items.Weapons.Melee { if (Main.rand.NextBool(5)) { - int num250 = Dust.NewDust(new Vector2((float)hitbox.X, (float)hitbox.Y), hitbox.Width, hitbox.Height, 66, (float)(player.direction * 2), 0f, 150, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.3f); - Main.dust[num250].velocity *= 0.2f; - Main.dust[num250].noGravity = true; + int swingDust = Dust.NewDust(new Vector2((float)hitbox.X, (float)hitbox.Y), hitbox.Width, hitbox.Height, 66, (float)(player.direction * 2), 0f, 150, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.3f); + Main.dust[swingDust].velocity *= 0.2f; + Main.dust[swingDust].noGravity = true; } } } diff --git a/Items/Weapons/Melee/TheEnforcer.cs b/Items/Weapons/Melee/TheEnforcer.cs index c0826412bb..ae6e4ccaa3 100644 --- a/Items/Weapons/Melee/TheEnforcer.cs +++ b/Items/Weapons/Melee/TheEnforcer.cs @@ -43,47 +43,46 @@ namespace CalamityMod.Items.Weapons.Melee var source = player.GetSource_ItemUse(Item); SoundEngine.PlaySound(SoundID.Item73, player.Center); int i = Main.myPlayer; - float num72 = 3f; + float flameSpeed = 3f; player.itemTime = Item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = Main.mouseX + Main.screenPosition.X + vector2.X; - float num79 = Main.mouseY + Main.screenPosition.Y + vector2.Y; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = Main.mouseX + Main.screenPosition.X + realPlayerPos.X; + float mouseYDist = Main.mouseY + Main.screenPosition.Y + realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + Main.screenHeight + Main.mouseY + vector2.Y; + mouseYDist = Main.screenPosition.Y + Main.screenHeight + Main.mouseY + realPlayerPos.Y; } - float num80 = (float)Math.Sqrt(num78 * num78 + num79 * num79); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt(mouseXDist * mouseXDist + mouseYDist * mouseYDist); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = player.direction; + mouseYDist = 0f; + mouseDistance = flameSpeed; } else { - num80 = num72 / num80; + mouseDistance = flameSpeed / mouseDistance; } - int num107 = 5; int essenceDamage = player.CalcIntDamage(0.25f * Item.damage); - for (int num108 = 0; num108 < num107; num108++) + for (int i = 0; i < 5; i++) { - vector2 = new Vector2(player.position.X + player.width * 0.5f + (Main.rand.Next(401) * -(float)player.direction) + (Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y); - vector2.X = (vector2.X + player.Center.X) / 2f + Main.rand.Next(-400, 401); - vector2.Y -= 100 * num108; - num78 = Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + player.width * 0.5f + (Main.rand.Next(401) * -(float)player.direction) + (Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + Main.rand.Next(-400, 401); + realPlayerPos.Y -= 100 * i; + mouseXDist = Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt(num78 * num78 + num79 * num79); - num80 = num72 / num80; - Projectile.NewProjectile(source, vector2, Vector2.Zero, ModContent.ProjectileType(), essenceDamage, 0f, i, 0f, Main.rand.Next(3)); + mouseDistance = (float)Math.Sqrt(mouseXDist * mouseXDist + mouseYDist * mouseYDist); + mouseDistance = flameSpeed / mouseDistance; + Projectile.NewProjectile(source, realPlayerPos, Vector2.Zero, ModContent.ProjectileType(), essenceDamage, 0f, i, 0f, Main.rand.Next(3)); } } @@ -92,47 +91,46 @@ namespace CalamityMod.Items.Weapons.Melee var source = player.GetSource_ItemUse(Item); SoundEngine.PlaySound(SoundID.Item73, player.Center); int i = Main.myPlayer; - float num72 = 3f; + float flameSpeed = 3f; player.itemTime = Item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = Main.mouseX + Main.screenPosition.X + vector2.X; - float num79 = Main.mouseY + Main.screenPosition.Y + vector2.Y; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = Main.mouseX + Main.screenPosition.X + realPlayerPos.X; + float mouseYDist = Main.mouseY + Main.screenPosition.Y + realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + Main.screenHeight + Main.mouseY + vector2.Y; + mouseYDist = Main.screenPosition.Y + Main.screenHeight + Main.mouseY + realPlayerPos.Y; } - float num80 = (float)Math.Sqrt(num78 * num78 + num79 * num79); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt(mouseXDist * mouseXDist + mouseYDist * mouseYDist); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = player.direction; + mouseYDist = 0f; + mouseDistance = flameSpeed; } else { - num80 = num72 / num80; + mouseDistance = flameSpeed / mouseDistance; } - int num107 = 5; int essenceDamage = player.CalcIntDamage(0.25f * Item.damage); - for (int num108 = 0; num108 < num107; num108++) + for (int i = 0; i < 5; i++) { - vector2 = new Vector2(player.position.X + player.width * 0.5f + (Main.rand.Next(401) * -(float)player.direction) + (Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y); - vector2.X = (vector2.X + player.Center.X) / 2f + Main.rand.Next(-400, 401); - vector2.Y -= 100 * num108; - num78 = Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + player.width * 0.5f + (Main.rand.Next(401) * -(float)player.direction) + (Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + Main.rand.Next(-400, 401); + realPlayerPos.Y -= 100 * i; + mouseXDist = Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt(num78 * num78 + num79 * num79); - num80 = num72 / num80; - Projectile.NewProjectile(source, vector2, Vector2.Zero, ModContent.ProjectileType(), essenceDamage, 0f, i, 0f, Main.rand.Next(3)); + mouseDistance = (float)Math.Sqrt(mouseXDist * mouseXDist + mouseYDist * mouseYDist); + mouseDistance = flameSpeed / mouseDistance; + Projectile.NewProjectile(source, realPlayerPos, Vector2.Zero, ModContent.ProjectileType(), essenceDamage, 0f, i, 0f, Main.rand.Next(3)); } } diff --git a/Items/Weapons/Melee/TheMutilator.cs b/Items/Weapons/Melee/TheMutilator.cs index 57afc04611..da73273a8d 100644 --- a/Items/Weapons/Melee/TheMutilator.cs +++ b/Items/Weapons/Melee/TheMutilator.cs @@ -49,23 +49,23 @@ namespace CalamityMod.Items.Weapons.Melee target.position.Y += target.height / 2; target.position.X -= target.width / 2; target.position.Y -= target.height / 2; - for (int num621 = 0; num621 < 30; num621++) + for (int i = 0; i < 30; i++) { - int num622 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 5, 0f, 0f, 100, default, 2f); - Main.dust[num622].velocity *= 3f; + int bloodDust = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 5, 0f, 0f, 100, default, 2f); + Main.dust[bloodDust].velocity *= 3f; if (Main.rand.NextBool()) { - Main.dust[num622].scale = 0.5f; - Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f; + Main.dust[bloodDust].scale = 0.5f; + Main.dust[bloodDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f; } } - for (int num623 = 0; num623 < 50; num623++) + for (int j = 0; j < 50; j++) { - int num624 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 5, 0f, 0f, 100, default, 3f); - Main.dust[num624].noGravity = true; - Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 5, 0f, 0f, 100, default, 2f); - Main.dust[num624].velocity *= 2f; + int bloodDust2 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 5, 0f, 0f, 100, default, 3f); + Main.dust[bloodDust2].noGravity = true; + Main.dust[bloodDust2].velocity *= 5f; + bloodDust2 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 5, 0f, 0f, 100, default, 2f); + Main.dust[bloodDust2].velocity *= 2f; } } } diff --git a/Items/Weapons/Melee/UltimusCleaver.cs b/Items/Weapons/Melee/UltimusCleaver.cs index 4d0845dc34..31df9995be 100644 --- a/Items/Weapons/Melee/UltimusCleaver.cs +++ b/Items/Weapons/Melee/UltimusCleaver.cs @@ -34,42 +34,42 @@ namespace CalamityMod.Items.Weapons.Melee target.AddBuff(BuffID.OnFire3, 360); int onHitDamage = player.CalcIntDamage(Item.damage); player.ApplyDamageToNPC(target, onHitDamage, 0f, 0, false); - float num50 = 1.7f; - float num51 = 0.8f; - float num52 = 2f; - Vector2 value3 = (target.rotation - 1.57079637f).ToRotationVector2(); - Vector2 value4 = value3 * target.velocity.Length(); + float firstDustScale = 1.7f; + float secondDustScale = 0.8f; + float thirdDustScale = 2f; + Vector2 dustRotation = (target.rotation - 1.57079637f).ToRotationVector2(); + Vector2 dustVelocity = dustRotation * target.velocity.Length(); SoundEngine.PlaySound(SoundID.Item14, target.Center); - int num3; - for (int num53 = 0; num53 < 40; num53 = num3 + 1) + int increment; + for (int i = 0; i < 40; i = increment + 1) { - int num54 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 174, 0f, 0f, 200, default, num50); - Dust dust = Main.dust[num54]; + int swingDust = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 174, 0f, 0f, 200, default, firstDustScale); + Dust dust = Main.dust[swingDust]; dust.position = target.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)target.width / 2f; dust.noGravity = true; dust.velocity.Y -= 6f; dust.velocity *= 3f; - dust.velocity += value4 * Main.rand.NextFloat(); - num54 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 174, 0f, 0f, 100, default, num51); + dust.velocity += dustVelocity * Main.rand.NextFloat(); + swingDust = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 174, 0f, 0f, 100, default, secondDustScale); dust.position = target.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)target.width / 2f; dust.velocity.Y -= 6f; dust.velocity *= 2f; dust.noGravity = true; dust.fadeIn = 1f; dust.color = Color.Crimson * 0.5f; - dust.velocity += value4 * Main.rand.NextFloat(); - num3 = num53; + dust.velocity += dustVelocity * Main.rand.NextFloat(); + increment = i; } - for (int num55 = 0; num55 < 20; num55 = num3 + 1) + for (int j = 0; j < 20; j = increment + 1) { - int num56 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 174, 0f, 0f, 0, default, num52); - Dust dust = Main.dust[num56]; + int swingDust2 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 174, 0f, 0f, 0, default, thirdDustScale); + Dust dust = Main.dust[swingDust2]; dust.position = target.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)target.velocity.ToRotation(), default) * (float)target.width / 3f; dust.noGravity = true; dust.velocity.Y -= 6f; dust.velocity *= 0.5f; - dust.velocity += value4 * (0.6f + 0.6f * Main.rand.NextFloat()); - num3 = num55; + dust.velocity += dustVelocity * (0.6f + 0.6f * Main.rand.NextFloat()); + increment = j; } } @@ -83,65 +83,65 @@ namespace CalamityMod.Items.Weapons.Melee player.itemAnimation == (int)(player.itemAnimationMax * 0.7) || player.itemAnimation == (int)(player.itemAnimationMax * 0.9)) { - float num339 = 0f; - float num340 = 0f; - float num341 = 0f; - float num342 = 0f; + float sparkYVel = 0f; + float sparkXVel = 0f; + float sparkYSpawn = 0f; + float sparkXSpawn = 0f; if (player.itemAnimation == (int)(player.itemAnimationMax * 0.9)) { - num339 = -7f; + sparkYVel = -7f; } if (player.itemAnimation == (int)(player.itemAnimationMax * 0.7)) { - num339 = -6f; - num340 = 2f; + sparkYVel = -6f; + sparkXVel = 2f; } if (player.itemAnimation == (int)(player.itemAnimationMax * 0.5)) { - num339 = -4f; - num340 = 4f; + sparkYVel = -4f; + sparkXVel = 4f; } if (player.itemAnimation == (int)(player.itemAnimationMax * 0.3)) { - num339 = -2f; - num340 = 6f; + sparkYVel = -2f; + sparkXVel = 6f; } if (player.itemAnimation == (int)(player.itemAnimationMax * 0.1)) { - num340 = 7f; + sparkXVel = 7f; } if (player.itemAnimation == (int)(player.itemAnimationMax * 0.7)) { - num342 = 26f; + sparkXSpawn = 26f; } if (player.itemAnimation == (int)(player.itemAnimationMax * 0.3)) { - num342 -= 4f; - num341 -= 20f; + sparkXSpawn -= 4f; + sparkYSpawn -= 20f; } if (player.itemAnimation == (int)(player.itemAnimationMax * 0.1)) { - num341 += 6f; + sparkYSpawn += 6f; } if (player.direction == -1) { if (player.itemAnimation == (int)(player.itemAnimationMax * 0.9)) { - num342 -= 8f; + sparkXSpawn -= 8f; } if (player.itemAnimation == (int)(player.itemAnimationMax * 0.7)) { - num342 -= 6f; + sparkXSpawn -= 6f; } } - num339 *= 1.5f; - num340 *= 1.5f; - num342 *= (float)player.direction; - num341 *= player.gravDir; + sparkYVel *= 1.5f; + sparkXVel *= 1.5f; + sparkXSpawn *= (float)player.direction; + sparkYSpawn *= player.gravDir; var source = player.GetSource_ItemUse(Item); int damage = (int)player.GetTotalDamage().ApplyTo(Item.damage * 0.1f); - Projectile.NewProjectile(source, (float)(hitbox.X + hitbox.Width / 2) + num342, (float)(hitbox.Y + hitbox.Height / 2) + num341, - (float)player.direction * num340, num339 * player.gravDir, ModContent.ProjectileType(), damage, 0f, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(source, (float)(hitbox.X + hitbox.Width / 2) + sparkXSpawn, (float)(hitbox.Y + hitbox.Height / 2) + sparkYSpawn, + (float)player.direction * sparkXVel, sparkYVel * player.gravDir, ModContent.ProjectileType(), damage, 0f, player.whoAmI, 0f, 0f); } } } diff --git a/Items/Weapons/Ranged/Alluvion.cs b/Items/Weapons/Ranged/Alluvion.cs index 37a443be04..80bdc77a98 100644 --- a/Items/Weapons/Ranged/Alluvion.cs +++ b/Items/Weapons/Ranged/Alluvion.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo spawnSource, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { Vector2 source = player.RotatedRelativePoint(player.MountedCenter); - float num117 = MathHelper.Pi * 0.1f; + float tenthPi = MathHelper.Pi * 0.1f; int totalProjectiles = 6; velocity.Normalize(); @@ -46,8 +46,8 @@ namespace CalamityMod.Items.Weapons.Ranged bool canHit = Collision.CanHit(source, 0, 0, source + velocity, 0, 0); for (int i = 0; i < totalProjectiles; i++) { - float num120 = i - (totalProjectiles - 1f) / 2f; - Vector2 offset = velocity.RotatedBy(num117 * num120); + float arrowOffset = i - (totalProjectiles - 1f) / 2f; + Vector2 offset = velocity.RotatedBy(tenthPi * arrowOffset); if (!canHit) offset -= velocity; diff --git a/Items/Weapons/Ranged/AquashardShotgun.cs b/Items/Weapons/Ranged/AquashardShotgun.cs index 45bf04d4c1..412e321103 100644 --- a/Items/Weapons/Ranged/AquashardShotgun.cs +++ b/Items/Weapons/Ranged/AquashardShotgun.cs @@ -40,8 +40,8 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - int num6 = Main.rand.Next(2, 4); - for (int index = 0; index < num6; ++index) + int projAmt = Main.rand.Next(2, 4); + for (int index = 0; index < projAmt; ++index) { float SpeedX = velocity.X + Main.rand.Next(-40, 41) * 0.05f; float SpeedY = velocity.Y + Main.rand.Next(-40, 41) * 0.05f; diff --git a/Items/Weapons/Ranged/ArterialAssault.cs b/Items/Weapons/Ranged/ArterialAssault.cs index 0d6dab7648..ee342f4866 100644 --- a/Items/Weapons/Ranged/ArterialAssault.cs +++ b/Items/Weapons/Ranged/ArterialAssault.cs @@ -37,46 +37,46 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float arrowSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = arrowSpeed; } else { - num80 = num72 / num80; + mouseDistance = arrowSpeed / mouseDistance; } - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (-(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f; - vector2.Y -= 100f; - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (-(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f; + realPlayerPos.Y -= 100f; + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78; - float speedY5 = num79; - int shotArrow = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockback, player.whoAmI); + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = arrowSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX4 = mouseXDist; + float speedY5 = mouseYDist; + int shotArrow = Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, type, damage, knockback, player.whoAmI); Main.projectile[shotArrow].noDropItem = true; Main.projectile[shotArrow].tileCollide = false; Main.projectile[shotArrow].timeLeft = (int)(Main.projectile[shotArrow].timeLeft * Main.projectile[shotArrow].MaxUpdates * 0.75f); @@ -93,4 +93,4 @@ namespace CalamityMod.Items.Weapons.Ranged Register(); } } -} \ No newline at end of file +} diff --git a/Items/Weapons/Ranged/BladedgeGreatbow.cs b/Items/Weapons/Ranged/BladedgeGreatbow.cs index 00d8ab463a..3db7c451d2 100644 --- a/Items/Weapons/Ranged/BladedgeGreatbow.cs +++ b/Items/Weapons/Ranged/BladedgeGreatbow.cs @@ -45,21 +45,21 @@ namespace CalamityMod.Items.Weapons.Ranged int index = Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI); Main.projectile[index].noDropItem = true; } - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); float PiOver10 = MathHelper.Pi * 0.1f; - Vector2 vector7 = velocity; - vector7.Normalize(); - vector7 *= 10f; - bool flag11 = Collision.CanHit(vector2, 0, 0, vector2 + vector7, 0, 0); - for (int num119 = 0; num119 < 2; num119++) + Vector2 arrowVel = velocity; + arrowVel.Normalize(); + arrowVel *= 10f; + bool arrowHitsTiles = Collision.CanHit(realPlayerPos, 0, 0, realPlayerPos + arrowVel, 0, 0); + for (int i = 0; i < 2; i++) { - float num120 = (float)num119 - 1f / 2f; - Vector2 value9 = vector7.RotatedBy((double)(PiOver10 * num120), default); - if (!flag11) + float arrowOffset = (float)i - 1f / 2f; + Vector2 offsetSpawn = arrowVel.RotatedBy((double)(PiOver10 * arrowOffset), default); + if (!arrowHitsTiles) { - value9 -= vector7; + offsetSpawn -= arrowVel; } - int projectile = Projectile.NewProjectile(source, vector2.X + value9.X, vector2.Y + value9.Y, velocity.X, velocity.Y, ProjectileID.Leaf, damage, 0f, player.whoAmI); + int projectile = Projectile.NewProjectile(source, realPlayerPos.X + offsetSpawn.X, realPlayerPos.Y + offsetSpawn.Y, velocity.X, velocity.Y, ProjectileID.Leaf, damage, 0f, player.whoAmI); if (projectile.WithinBounds(Main.maxProjectiles)) Main.projectile[projectile].DamageType = DamageClass.Ranged; } diff --git a/Items/Weapons/Ranged/CleansingBlaze.cs b/Items/Weapons/Ranged/CleansingBlaze.cs index 19e4d8004b..85ad26c063 100644 --- a/Items/Weapons/Ranged/CleansingBlaze.cs +++ b/Items/Weapons/Ranged/CleansingBlaze.cs @@ -41,8 +41,8 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - int num6 = Main.rand.Next(2, 4); - for (int index = 0; index < num6; ++index) + int flameAmt = Main.rand.Next(2, 4); + for (int index = 0; index < flameAmt; ++index) { float SpeedX = velocity.X + (float)Main.rand.Next(-15, 16) * 0.05f; float SpeedY = velocity.Y + (float)Main.rand.Next(-15, 16) * 0.05f; diff --git a/Items/Weapons/Ranged/ConferenceCall.cs b/Items/Weapons/Ranged/ConferenceCall.cs index 3359b6c12f..87052ebb5e 100644 --- a/Items/Weapons/Ranged/ConferenceCall.cs +++ b/Items/Weapons/Ranged/ConferenceCall.cs @@ -79,18 +79,18 @@ namespace CalamityMod.Items.Weapons.Ranged if (targetArrayIndex == 0) return false; - Vector2 vector2; + Vector2 targetPosition; int extraBulletDamage = (int)(damage * 0.8); for (int j = 0; j < targetArrayIndex; j++) { - vector2 = new Vector2(player.position.X + player.width * 0.5f + (Main.rand.Next(201) * -(float)player.direction) + (Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + Main.rand.Next(-200, 201); - vector2.Y -= 100 * j; + targetPosition = new Vector2(player.position.X + player.width * 0.5f + (Main.rand.Next(201) * -(float)player.direction) + (Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + targetPosition.X = (targetPosition.X + player.Center.X) / 2f + Main.rand.Next(-200, 201); + targetPosition.Y -= 100 * j; - Vector2 velocity2 = CalamityUtils.CalculatePredictiveAimToTarget(vector2, Main.npc[targets[j]], Item.shootSpeed); + Vector2 extraBulletVel = CalamityUtils.CalculatePredictiveAimToTarget(targetPosition, Main.npc[targets[j]], Item.shootSpeed); - int proj = Projectile.NewProjectile(source, vector2, velocity2, type, extraBulletDamage, knockback, player.whoAmI); + int proj = Projectile.NewProjectile(source, targetPosition, extraBulletVel, type, extraBulletDamage, knockback, player.whoAmI); Main.projectile[proj].extraUpdates += 2; Main.projectile[proj].tileCollide = false; Main.projectile[proj].timeLeft /= 2; @@ -104,13 +104,13 @@ namespace CalamityMod.Items.Weapons.Ranged { int randomTarget = Main.rand.Next(targetArrayIndex); - vector2 = new Vector2(player.position.X + player.width * 0.5f + (Main.rand.Next(201) * -(float)player.direction) + (Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + Main.rand.Next(-200, 201); - vector2.Y -= 100 * randomTarget; + targetPosition = new Vector2(player.position.X + player.width * 0.5f + (Main.rand.Next(201) * -(float)player.direction) + (Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + targetPosition.X = (targetPosition.X + player.Center.X) / 2f + Main.rand.Next(-200, 201); + targetPosition.Y -= 100 * randomTarget; - Vector2 velocity2 = Vector2.Normalize(Main.npc[targets[randomTarget]].Center - vector2) * Item.shootSpeed; + Vector2 extraBulletVel = Vector2.Normalize(Main.npc[targets[randomTarget]].Center - targetPosition) * Item.shootSpeed; - int proj = Projectile.NewProjectile(source, vector2, velocity2, type, extraBulletDamage, knockback, player.whoAmI); + int proj = Projectile.NewProjectile(source, targetPosition, extraBulletVel, type, extraBulletDamage, knockback, player.whoAmI); Main.projectile[proj].extraUpdates += 2; Main.projectile[proj].tileCollide = false; Main.projectile[proj].timeLeft /= 2; diff --git a/Items/Weapons/Ranged/ContinentalGreatbow.cs b/Items/Weapons/Ranged/ContinentalGreatbow.cs index ffeb621ef6..77f85f7128 100644 --- a/Items/Weapons/Ranged/ContinentalGreatbow.cs +++ b/Items/Weapons/Ranged/ContinentalGreatbow.cs @@ -53,8 +53,8 @@ namespace CalamityMod.Items.Weapons.Ranged { type = ProjectileID.FireArrow; } - int num121 = Projectile.NewProjectile(spawnSource, source + offset, velocity, type, damage, knockback, player.whoAmI); - Main.projectile[num121].noDropItem = true; + int baseArrow = Projectile.NewProjectile(spawnSource, source + offset, velocity, type, damage, knockback, player.whoAmI); + Main.projectile[baseArrow].noDropItem = true; } for (int i = 0; i < 2; i++) { diff --git a/Items/Weapons/Ranged/Deathwind.cs b/Items/Weapons/Ranged/Deathwind.cs index f53623d067..9b38ae885c 100644 --- a/Items/Weapons/Ranged/Deathwind.cs +++ b/Items/Weapons/Ranged/Deathwind.cs @@ -50,8 +50,8 @@ namespace CalamityMod.Items.Weapons.Ranged } else { - int num121 = Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, (int)(damage * 0.8), knockback, player.whoAmI); - Main.projectile[num121].noDropItem = true; + int baseArrow = Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, (int)(damage * 0.8), knockback, player.whoAmI); + Main.projectile[baseArrow].noDropItem = true; } } return false; diff --git a/Items/Weapons/Ranged/Disseminator.cs b/Items/Weapons/Ranged/Disseminator.cs index a90fb1e83c..9cf80321e1 100644 --- a/Items/Weapons/Ranged/Disseminator.cs +++ b/Items/Weapons/Ranged/Disseminator.cs @@ -79,29 +79,29 @@ namespace CalamityMod.Items.Weapons.Ranged if (targetArrayIndex == 0) return false; - Vector2 vector2; + Vector2 targetPosition; int extraBulletDamage = (int)(damage * 0.7); for (int j = 0; j < targetArrayIndex; j++) { - vector2 = new Vector2(player.position.X + player.width * 0.5f + (Main.rand.Next(201) * -(float)player.direction) + (Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + Main.rand.Next(-200, 201); - vector2.Y -= 100 * j; + targetPosition = new Vector2(player.position.X + player.width * 0.5f + (Main.rand.Next(201) * -(float)player.direction) + (Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + targetPosition.X = (targetPosition.X + player.Center.X) / 2f + Main.rand.Next(-200, 201); + targetPosition.Y -= 100 * j; - Vector2 velocity2 = Vector2.Normalize(Main.npc[targets[j]].Center - vector2) * Item.shootSpeed; + Vector2 extraBulletVel = Vector2.Normalize(Main.npc[targets[j]].Center - targetPosition) * Item.shootSpeed; - int proj = Projectile.NewProjectile(source, vector2, velocity2, type, extraBulletDamage, knockback, player.whoAmI); + int proj = Projectile.NewProjectile(source, targetPosition, extraBulletVel, type, extraBulletDamage, knockback, player.whoAmI); Main.projectile[proj].extraUpdates += 2; Main.projectile[proj].tileCollide = false; Main.projectile[proj].timeLeft /= 2; - vector2 = new Vector2(player.position.X + player.width * 0.5f + (Main.rand.Next(201) * -(float)player.direction) + (Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y + 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + Main.rand.Next(-200, 201); - vector2.Y += 100 * j; + targetPosition = new Vector2(player.position.X + player.width * 0.5f + (Main.rand.Next(201) * -(float)player.direction) + (Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y + 600f); + targetPosition.X = (targetPosition.X + player.Center.X) / 2f + Main.rand.Next(-200, 201); + targetPosition.Y += 100 * j; - velocity2 = Vector2.Normalize(Main.npc[targets[j]].Center - vector2) * Item.shootSpeed; + extraBulletVel = Vector2.Normalize(Main.npc[targets[j]].Center - targetPosition) * Item.shootSpeed; - proj = Projectile.NewProjectile(source, vector2, velocity2, type, extraBulletDamage, knockback, player.whoAmI); + proj = Projectile.NewProjectile(source, targetPosition, extraBulletVel, type, extraBulletDamage, knockback, player.whoAmI); Main.projectile[proj].extraUpdates += 2; Main.projectile[proj].tileCollide = false; Main.projectile[proj].timeLeft /= 2; @@ -115,24 +115,24 @@ namespace CalamityMod.Items.Weapons.Ranged { int randomTarget = Main.rand.Next(targetArrayIndex); - vector2 = new Vector2(player.position.X + player.width * 0.5f + (Main.rand.Next(201) * -(float)player.direction) + (Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + Main.rand.Next(-200, 201); - vector2.Y -= 100 * randomTarget; + targetPosition = new Vector2(player.position.X + player.width * 0.5f + (Main.rand.Next(201) * -(float)player.direction) + (Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + targetPosition.X = (targetPosition.X + player.Center.X) / 2f + Main.rand.Next(-200, 201); + targetPosition.Y -= 100 * randomTarget; - Vector2 velocity2 = Vector2.Normalize(Main.npc[targets[randomTarget]].Center - vector2) * Item.shootSpeed; + Vector2 extraBulletVel = Vector2.Normalize(Main.npc[targets[randomTarget]].Center - targetPosition) * Item.shootSpeed; - int proj = Projectile.NewProjectile(source, vector2, velocity2, type, extraBulletDamage, knockback, player.whoAmI); + int proj = Projectile.NewProjectile(source, targetPosition, extraBulletVel, type, extraBulletDamage, knockback, player.whoAmI); Main.projectile[proj].extraUpdates += 2; Main.projectile[proj].tileCollide = false; Main.projectile[proj].timeLeft /= 2; - vector2 = new Vector2(player.position.X + player.width * 0.5f + (Main.rand.Next(201) * -(float)player.direction) + (Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y + 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + Main.rand.Next(-200, 201); - vector2.Y += 100 * randomTarget; + targetPosition = new Vector2(player.position.X + player.width * 0.5f + (Main.rand.Next(201) * -(float)player.direction) + (Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y + 600f); + targetPosition.X = (targetPosition.X + player.Center.X) / 2f + Main.rand.Next(-200, 201); + targetPosition.Y += 100 * randomTarget; - velocity2 = Vector2.Normalize(Main.npc[targets[randomTarget]].Center - vector2) * Item.shootSpeed; + extraBulletVel = Vector2.Normalize(Main.npc[targets[randomTarget]].Center - targetPosition) * Item.shootSpeed; - proj = Projectile.NewProjectile(source, vector2, velocity2, type, extraBulletDamage, knockback, player.whoAmI); + proj = Projectile.NewProjectile(source, targetPosition, extraBulletVel, type, extraBulletDamage, knockback, player.whoAmI); Main.projectile[proj].extraUpdates += 2; Main.projectile[proj].tileCollide = false; Main.projectile[proj].timeLeft /= 2; diff --git a/Items/Weapons/Ranged/Drataliornus.cs b/Items/Weapons/Ranged/Drataliornus.cs index f455891ab1..2fb5edea6c 100644 --- a/Items/Weapons/Ranged/Drataliornus.cs +++ b/Items/Weapons/Ranged/Drataliornus.cs @@ -75,15 +75,15 @@ namespace CalamityMod.Items.Weapons.Ranged const int numFlames = 5; int flameDamage = (int)(damage * RightClickDamageRatio); - const float num3 = 0.471238898f; + const float fifteenHundredthPi = 0.471238898f; Vector2 spinningpoint = velocity; spinningpoint.Normalize(); spinningpoint *= 36f; - for (int index1 = 0; index1 < numFlames; ++index1) + for (int i = 0; i < numFlames; ++i) { - float num8 = index1 - (numFlames - 1) / 2; - Vector2 vector2_5 = spinningpoint.RotatedBy(num3 * num8, new Vector2()); - Projectile.NewProjectile(source, position.X + vector2_5.X, position.Y + vector2_5.Y, velocity.X, velocity.Y, flameID, flameDamage, knockback, player.whoAmI, 1f, 0f); + float piArrowOffset = i - (numFlames - 1) / 2; + Vector2 offsetSpawn = spinningpoint.RotatedBy(fifteenHundredthPi * piArrowOffset, new Vector2()); + Projectile.NewProjectile(source, position.X + offsetSpawn.X, position.Y + offsetSpawn.Y, velocity.X, velocity.Y, flameID, flameDamage, knockback, player.whoAmI, 1f, 0f); } } else diff --git a/Items/Weapons/Ranged/FirestormCannon.cs b/Items/Weapons/Ranged/FirestormCannon.cs index 78c4f01c40..0238256994 100644 --- a/Items/Weapons/Ranged/FirestormCannon.cs +++ b/Items/Weapons/Ranged/FirestormCannon.cs @@ -53,8 +53,8 @@ namespace CalamityMod.Items.Weapons.Ranged if (player.altFunctionUse == 2) { velocity *= 2f; - int num6 = Main.rand.Next(4, 6); - for (int index = 0; index < num6; ++index) + int flareAmt = Main.rand.Next(4, 6); + for (int index = 0; index < flareAmt; ++index) { float SpeedX = velocity.X + (float)Main.rand.Next(-50, 51) * 0.05f; float SpeedY = velocity.Y + (float)Main.rand.Next(-50, 51) * 0.05f; @@ -70,8 +70,8 @@ namespace CalamityMod.Items.Weapons.Ranged } else { - int num6 = Main.rand.Next(1, 3); - for (int index = 0; index < num6; ++index) + int flareAmt = Main.rand.Next(1, 3); + for (int index = 0; index < flareAmt; ++index) { float SpeedX = velocity.X + (float)Main.rand.Next(-40, 41) * 0.05f; float SpeedY = velocity.Y + (float)Main.rand.Next(-40, 41) * 0.05f; diff --git a/Items/Weapons/Ranged/FlarewingBow.cs b/Items/Weapons/Ranged/FlarewingBow.cs index 5cde932d3d..dbc0a5d0f3 100644 --- a/Items/Weapons/Ranged/FlarewingBow.cs +++ b/Items/Weapons/Ranged/FlarewingBow.cs @@ -35,29 +35,28 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num117 = 0.314159274f; - int num118 = 3; - Vector2 vector7 = velocity; - vector7.Normalize(); - vector7 *= 50f; - bool flag11 = Collision.CanHit(vector2, 0, 0, vector2 + vector7, 0, 0); - for (int num119 = 0; num119 < num118; num119++) + float tenthPi = 0.314159274f; + Vector2 arrowVel = velocity; + arrowVel.Normalize(); + arrowVel *= 50f; + bool arrowHitsTiles = Collision.CanHit(vector2, 0, 0, vector2 + arrowVel, 0, 0); + for (int i = 0; i < 3; i++) { - float num120 = (float)num119 - ((float)num118 - 1f) / 2f; - Vector2 value9 = vector7.RotatedBy((double)(num117 * num120), default); - if (!flag11) + float piOffsetValue = (float)i - 1f; + Vector2 offsetSpawn = arrowVel.RotatedBy((double)(tenthPi * piOffsetValue), default); + if (!arrowHitsTiles) { - value9 -= vector7; + offsetSpawn -= arrowVel; } if (CalamityUtils.CheckWoodenAmmo(type, player)) { - int num123 = Projectile.NewProjectile(source, vector2.X + value9.X, vector2.Y + value9.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), damage, knockback, player.whoAmI); - Main.projectile[num123].noDropItem = true; + int arrowSpawn = Projectile.NewProjectile(source, vector2.X + offsetSpawn.X, vector2.Y + offsetSpawn.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), damage, knockback, player.whoAmI); + Main.projectile[arrowSpawn].noDropItem = true; } else { - int num123 = Projectile.NewProjectile(source, vector2.X + value9.X, vector2.Y + value9.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI); - Main.projectile[num123].noDropItem = true; + int arrowSpawn = Projectile.NewProjectile(source, vector2.X + offsetSpawn.X, vector2.Y + offsetSpawn.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI); + Main.projectile[arrowSpawn].noDropItem = true; } } return false; diff --git a/Items/Weapons/Ranged/GunkShot.cs b/Items/Weapons/Ranged/GunkShot.cs index 290e75df07..ee19d870a9 100644 --- a/Items/Weapons/Ranged/GunkShot.cs +++ b/Items/Weapons/Ranged/GunkShot.cs @@ -39,8 +39,8 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - int num6 = Main.rand.Next(3, 5); - for (int index = 0; index < num6; ++index) + int bulletAmt = Main.rand.Next(3, 5); + for (int index = 0; index < bulletAmt; ++index) { float SpeedX = velocity.X + (float)Main.rand.Next(-25, 26) * 0.05f; float SpeedY = velocity.Y + (float)Main.rand.Next(-25, 26) * 0.05f; diff --git a/Items/Weapons/Ranged/Hellborn.cs b/Items/Weapons/Ranged/Hellborn.cs index 3100f92ab5..941688b083 100644 --- a/Items/Weapons/Ranged/Hellborn.cs +++ b/Items/Weapons/Ranged/Hellborn.cs @@ -76,39 +76,39 @@ namespace CalamityMod.Items.Weapons.Ranged modifiers.SourceDamage *= ExplosionDamageMultiplier; int touchDamage = player.CalcIntDamage(Item.damage); player.ApplyDamageToNPC(target, touchDamage, 0f, 0, false); - float num50 = 3.4f; - float num51 = 1.6f; - float num52 = 4f; - Vector2 value3 = (target.rotation - MathHelper.PiOver2).ToRotationVector2(); - Vector2 value4 = value3 * target.velocity.Length(); + float firstDustScale = 3.4f; + float secondDustScale = 1.6f; + float thirdDustScale = 4f; + Vector2 dustRotation = (target.rotation - MathHelper.PiOver2).ToRotationVector2(); + Vector2 dustVelocity = dustRotation * target.velocity.Length(); SoundEngine.PlaySound(SoundID.Item14, target.Center); - for (int num53 = 0; num53 < 80; num53++) + for (int i = 0; i < 80; i++) { - int num54 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 174, 0f, 0f, 200, default, num50); - Dust dust = Main.dust[num54]; + int contactDust = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 174, 0f, 0f, 200, default, firstDustScale); + Dust dust = Main.dust[contactDust]; dust.position = target.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * target.width / 2f; dust.noGravity = true; dust.velocity.Y -= 6f; dust.velocity *= 3f; - dust.velocity += value4 * Main.rand.NextFloat(); - num54 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 174, 0f, 0f, 100, default, num51); + dust.velocity += dustVelocity * Main.rand.NextFloat(); + contactDust = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 174, 0f, 0f, 100, default, secondDustScale); dust.position = target.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * target.width / 2f; dust.velocity.Y -= 6f; dust.velocity *= 2f; dust.noGravity = true; dust.fadeIn = 1f; dust.color = Color.Crimson * 0.5f; - dust.velocity += value4 * Main.rand.NextFloat(); + dust.velocity += dustVelocity * Main.rand.NextFloat(); } - for (int num55 = 0; num55 < 40; num55++) + for (int j = 0; j < 40; j++) { - int num56 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 174, 0f, 0f, 0, default, num52); - Dust dust = Main.dust[num56]; + int contactDust2 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 174, 0f, 0f, 0, default, thirdDustScale); + Dust dust = Main.dust[contactDust2]; dust.position = target.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(target.velocity.ToRotation()) * target.width / 3f; dust.noGravity = true; dust.velocity.Y -= 6f; dust.velocity *= 0.5f; - dust.velocity += value4 * (0.6f + 0.6f * Main.rand.NextFloat()); + dust.velocity += dustVelocity * (0.6f + 0.6f * Main.rand.NextFloat()); } } diff --git a/Items/Weapons/Ranged/Infinity.cs b/Items/Weapons/Ranged/Infinity.cs index 1ad1076a95..0d806aa604 100644 --- a/Items/Weapons/Ranged/Infinity.cs +++ b/Items/Weapons/Ranged/Infinity.cs @@ -57,12 +57,12 @@ namespace CalamityMod.Items.Weapons.Ranged { if (player.altFunctionUse == 2) { - //If you right click, shoots an helix of normal bullets - Vector2 num7 = velocity.RotatedBy(MathHelper.ToRadians(rotation)); - Vector2 num8 = velocity.RotatedBy(MathHelper.ToRadians(-rotation)); - int shot1 = Projectile.NewProjectile(source, position.X, position.Y, num7.X, num7.Y, type, damage, knockback, player.whoAmI, 0f, 0f); + //If you right click, shoots a helix of normal bullets + Vector2 helixVel1 = velocity.RotatedBy(MathHelper.ToRadians(rotation)); + Vector2 helixVel2 = velocity.RotatedBy(MathHelper.ToRadians(-rotation)); + int shot1 = Projectile.NewProjectile(source, position.X, position.Y, helixVel1.X, helixVel1.Y, type, damage, knockback, player.whoAmI, 0f, 0f); Main.projectile[shot1].timeLeft = 180; - int shot2 = Projectile.NewProjectile(source, position.X, position.Y, num8.X, num8.Y, type, damage, knockback, player.whoAmI, 0f, 0f); + int shot2 = Projectile.NewProjectile(source, position.X, position.Y, helixVel2.X, helixVel2.Y, type, damage, knockback, player.whoAmI, 0f, 0f); Main.projectile[shot2].timeLeft = 180; //Code to constantly make the shooting go side to side to make the helix if (limit) @@ -86,11 +86,11 @@ namespace CalamityMod.Items.Weapons.Ranged else { //If left click, do the same as above but spawn Charged Blasts instead - Vector2 num7 = velocity.RotatedBy(MathHelper.ToRadians(rotation)); - Vector2 num8 = velocity.RotatedBy(MathHelper.ToRadians(-rotation)); - int shot1 = Projectile.NewProjectile(source, position.X, position.Y, num7.X, num7.Y, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 0f); + Vector2 helixVel1 = velocity.RotatedBy(MathHelper.ToRadians(rotation)); + Vector2 helixVel2 = velocity.RotatedBy(MathHelper.ToRadians(-rotation)); + int shot1 = Projectile.NewProjectile(source, position.X, position.Y, helixVel1.X, helixVel1.Y, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 0f); Main.projectile[shot1].timeLeft = 180; - int shot2 = Projectile.NewProjectile(source, position.X, position.Y, num8.X, num8.Y, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 0f); + int shot2 = Projectile.NewProjectile(source, position.X, position.Y, helixVel2.X, helixVel2.Y, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 0f); Main.projectile[shot2].timeLeft = 180; if (limit) { diff --git a/Items/Weapons/Ranged/NettlevineGreatbow.cs b/Items/Weapons/Ranged/NettlevineGreatbow.cs index fd53d37d1b..186a929722 100644 --- a/Items/Weapons/Ranged/NettlevineGreatbow.cs +++ b/Items/Weapons/Ranged/NettlevineGreatbow.cs @@ -36,22 +36,21 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num117 = 0.314159274f; - int num118 = 4; - Vector2 vector7 = velocity; - vector7.Normalize(); - vector7 *= 40f; - bool flag11 = Collision.CanHit(vector2, 0, 0, vector2 + vector7, 0, 0); - for (int num119 = 0; num119 < num118; num119++) + float tenthPi = 0.314159274f; + Vector2 arrowVel = velocity; + arrowVel.Normalize(); + arrowVel *= 40f; + bool arrowHitsTiles = Collision.CanHit(vector2, 0, 0, vector2 + arrowVel, 0, 0); + for (int i = 0; i < 4; i++) { - float num120 = (float)num119 - ((float)num118 - 1f) / 2f; - Vector2 value9 = vector7.RotatedBy((double)(num117 * num120), default); - if (!flag11) + float piOffsetAmt = (float)i - 3f / 2f; + Vector2 offsetSpawn = arrowVel.RotatedBy((double)(tenthPi * piOffsetAmt), default); + if (!arrowHitsTiles) { - value9 -= vector7; + offsetSpawn -= arrowVel; } - int num121 = Projectile.NewProjectile(source, vector2.X + value9.X, vector2.Y + value9.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI); - Main.projectile[num121].noDropItem = true; + int arrowSpawn = Projectile.NewProjectile(source, vector2.X + offsetSpawn.X, vector2.Y + offsetSpawn.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI); + Main.projectile[arrowSpawn].noDropItem = true; } for (int i = 0; i < 2; i++) { diff --git a/Items/Weapons/Ranged/PearlGod.cs b/Items/Weapons/Ranged/PearlGod.cs index a165d38638..28688d5b84 100644 --- a/Items/Weapons/Ranged/PearlGod.cs +++ b/Items/Weapons/Ranged/PearlGod.cs @@ -70,14 +70,14 @@ namespace CalamityMod.Items.Weapons.Ranged for (int i = 0; i < totalLoops; i++) { - int proj = Projectile.NewProjectile(source, position, velocity.RotatedBy(-rotation * (i + 1)), type, (int)(damage * 0.5), knockback * 0.5f, player.whoAmI); - Main.projectile[proj].extraUpdates += spread; - int proj2 = Projectile.NewProjectile(source, position, velocity.RotatedBy(+rotation * (i + 1)), type, (int)(damage * 0.5), knockback * 0.5f, player.whoAmI); - Main.projectile[proj2].extraUpdates += spread; + int bullet1 = Projectile.NewProjectile(source, position, velocity.RotatedBy(-rotation * (i + 1)), type, (int)(damage * 0.5), knockback * 0.5f, player.whoAmI); + Main.projectile[bullet1].extraUpdates += spread; + int bullet2 = Projectile.NewProjectile(source, position, velocity.RotatedBy(+rotation * (i + 1)), type, (int)(damage * 0.5), knockback * 0.5f, player.whoAmI); + Main.projectile[bullet2].extraUpdates += spread; } - int proj3 = Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, spread); - Main.projectile[proj3].extraUpdates += spread; + int shockblast = Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, spread); + Main.projectile[shockblast].extraUpdates += spread; spread++; } @@ -85,8 +85,8 @@ namespace CalamityMod.Items.Weapons.Ranged { for (int i = 0; i < 3; i++) { - int proj = Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage * 2, knockback * 2f, player.whoAmI, 0f, 10f); - Main.projectile[proj].extraUpdates += 9; + int bigShockblast = Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage * 2, knockback * 2f, player.whoAmI, 0f, 10f); + Main.projectile[bigShockblast].extraUpdates += 9; } finalShot = false; diff --git a/Items/Weapons/Ranged/PlanetaryAnnihilation.cs b/Items/Weapons/Ranged/PlanetaryAnnihilation.cs index 05690d6d98..56c1ce7263 100644 --- a/Items/Weapons/Ranged/PlanetaryAnnihilation.cs +++ b/Items/Weapons/Ranged/PlanetaryAnnihilation.cs @@ -39,59 +39,59 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = Main.mouseY + Main.screenPosition.Y - vector2.Y; + float arrowSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + Main.screenHeight - Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + Main.screenHeight - Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt(num78 * num78 + num79 * num79); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt(mouseXDist * mouseXDist + mouseYDist * mouseYDist); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = player.direction; + mouseYDist = 0f; + mouseDistance = arrowSpeed; } else { - num80 = num72 / num80; + mouseDistance = arrowSpeed / mouseDistance; } - vector2 = new Vector2(player.position.X + player.width * 0.5f + (Main.rand.Next(201) * -(float)player.direction) + (Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + Main.rand.Next(-200, 201); - vector2.Y -= 100f; - num78 = Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + player.width * 0.5f + (Main.rand.Next(201) * -(float)player.direction) + (Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + Main.rand.Next(-200, 201); + realPlayerPos.Y -= 100f; + mouseXDist = Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt(num78 * num78 + num79 * num79); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; + mouseDistance = (float)Math.Sqrt(mouseXDist * mouseXDist + mouseYDist * mouseYDist); + mouseDistance = arrowSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; if (CalamityUtils.CheckWoodenAmmo(type, player)) { for (int i = 0; i < 7; i++) { - float speedX4 = num78 + Main.rand.Next(-120, 121) * 0.02f; - float speedY5 = num79 + Main.rand.Next(-120, 121) * 0.02f; - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, i); + float speedX4 = mouseXDist + Main.rand.Next(-120, 121) * 0.02f; + float speedY5 = mouseYDist + Main.rand.Next(-120, 121) * 0.02f; + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, i); } } else { for (int i = 0; i < 7; i++) { - float speedX4 = num78 + Main.rand.Next(-120, 121) * 0.02f; - float speedY5 = num79 + Main.rand.Next(-120, 121) * 0.02f; - int num121 = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockback, player.whoAmI); + float speedX4 = mouseXDist + Main.rand.Next(-120, 121) * 0.02f; + float speedY5 = mouseYDist + Main.rand.Next(-120, 121) * 0.02f; + int num121 = Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, type, damage, knockback, player.whoAmI); Main.projectile[num121].noDropItem = true; } } diff --git a/Items/Weapons/Ranged/Svantechnical.cs b/Items/Weapons/Ranged/Svantechnical.cs index 72e2affe92..8fa8a9ba9a 100644 --- a/Items/Weapons/Ranged/Svantechnical.cs +++ b/Items/Weapons/Ranged/Svantechnical.cs @@ -55,38 +55,38 @@ namespace CalamityMod.Items.Weapons.Ranged int i = Main.myPlayer; float sSpeed = Item.shootSpeed; player.itemTime = Item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; + mouseXDist = (float)player.direction; + mouseYDist = 0f; } else { - num80 = sSpeed / num80; + mouseDistance = sSpeed / mouseDistance; } - float num208 = num78; - float num209 = num79; - num208 += (float)Main.rand.Next(-1, 2) * 0.5f; - num209 += (float)Main.rand.Next(-1, 2) * 0.5f; - if (Collision.CanHitLine(player.Center, 0, 0, vector2 + new Vector2(num208, num209) * 2f, 0, 0)) + float randXOffset = mouseXDist; + float randYOffset = mouseYDist; + randXOffset += (float)Main.rand.Next(-1, 2) * 0.5f; + randYOffset += (float)Main.rand.Next(-1, 2) * 0.5f; + if (Collision.CanHitLine(player.Center, 0, 0, realPlayerPos + new Vector2(randXOffset, randYOffset) * 2f, 0, 0)) { - vector2 += new Vector2(num208, num209); + realPlayerPos += new Vector2(randXOffset, randYOffset); } - Projectile.NewProjectile(source, position.X, position.Y - player.gravDir * 4f, num208, num209, type, damage, knockback, i, 0f, (float)Main.rand.Next(12) / 6f); - int num6 = Main.rand.Next(2, 4); - for (int index = 0; index < num6; ++index) + Projectile.NewProjectile(source, position.X, position.Y - player.gravDir * 4f, randXOffset, randYOffset, type, damage, knockback, i, 0f, (float)Main.rand.Next(12) / 6f); + int bulletAmt = Main.rand.Next(2, 4); + for (int index = 0; index < bulletAmt; ++index) { float SpeedX = velocity.X + (float)Main.rand.Next(-60, 61) * 0.05f; float SpeedY = velocity.Y + (float)Main.rand.Next(-60, 61) * 0.05f; - Projectile.NewProjectile(source, vector2.X, vector2.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI, 0f, 0f); } return false; } diff --git a/Items/Weapons/Ranged/TheStorm.cs b/Items/Weapons/Ranged/TheStorm.cs index 48073d36a5..d19770657e 100644 --- a/Items/Weapons/Ranged/TheStorm.cs +++ b/Items/Weapons/Ranged/TheStorm.cs @@ -35,58 +35,58 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { int i = Main.myPlayer; - float num72 = Main.rand.Next(25, 30); + float arrowSpeed = Main.rand.Next(25, 30); player.itemTime = Item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = arrowSpeed; } else { - num80 = num72 / num80; + mouseDistance = arrowSpeed / mouseDistance; } for (int j = 0; j < 3; j++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * j); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= (float)(100 * j); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-120, 121) * 0.01f; - float speedY5 = num79 + (float)Main.rand.Next(-120, 121) * 0.01f; + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = arrowSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX4 = mouseXDist + (float)Main.rand.Next(-120, 121) * 0.01f; + float speedY5 = mouseYDist + (float)Main.rand.Next(-120, 121) * 0.01f; if (CalamityUtils.CheckWoodenAmmo(type, player)) { - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5 * 0.9f, ModContent.ProjectileType(), damage, knockback, i); - Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5 * 0.8f, ModContent.ProjectileType(), damage, knockback, i); + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5 * 0.9f, ModContent.ProjectileType(), damage, knockback, i); + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5 * 0.8f, ModContent.ProjectileType(), damage, knockback, i); } else { - int arrow1 = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5 * 0.9f, type, damage, knockback, i); + int arrow1 = Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5 * 0.9f, type, damage, knockback, i); Main.projectile[arrow1].noDropItem = true; - int arrow2 = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5 * 0.8f, type, damage, knockback, i); + int arrow2 = Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5 * 0.8f, type, damage, knockback, i); Main.projectile[arrow2].noDropItem = true; } } diff --git a/Items/Weapons/Ranged/Vortexpopper.cs b/Items/Weapons/Ranged/Vortexpopper.cs index c9599b7efb..a486f60a4a 100644 --- a/Items/Weapons/Ranged/Vortexpopper.cs +++ b/Items/Weapons/Ranged/Vortexpopper.cs @@ -37,65 +37,65 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float bulletSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = bulletSpeed; } else { - num80 = num72 / num80; + mouseDistance = bulletSpeed / mouseDistance; } - num78 *= num80; - num79 *= num80; - Vector2 value6 = Vector2.Normalize(new Vector2(num78, num79)) * 40f * Item.scale; - if (Collision.CanHit(vector2, 0, 0, vector2 + value6, 0, 0)) + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + Vector2 bulletVel = Vector2.Normalize(new Vector2(mouseXDist, mouseYDist)) * 40f * Item.scale; + if (Collision.CanHit(realPlayerPos, 0, 0, realPlayerPos + bulletVel, 0, 0)) { } - float ai = new Vector2(num78, num79).ToRotation(); - float num96 = 2.09439516f; - for (int num98 = 0; num98 < 6; num98++) + float ai = new Vector2(mouseXDist, mouseYDist).ToRotation(); + float twoThirdsPi = 2.09439516f; + for (int i = 0; i < 6; i++) { - float scaleFactor2 = (float)Main.rand.NextDouble() * 0.2f + 0.05f; - Vector2 vector6 = new Vector2(num78, num79).RotatedBy((double)(num96 * (float)Main.rand.NextDouble() - num96 / 2f), default) * scaleFactor2; - int num99 = Projectile.NewProjectile(source, position.X, position.Y, vector6.X, vector6.Y, ProjectileID.Xenopopper, damage, knockback, player.whoAmI, ai, 0f); - Main.projectile[num99].localAI[0] = (float)type; - Main.projectile[num99].localAI[1] = 12f; + float randVelMult = (float)Main.rand.NextDouble() * 0.2f + 0.05f; + Vector2 bulletSpawnVelocity = new Vector2(mouseXDist, mouseYDist).RotatedBy((double)(twoThirdsPi * (float)Main.rand.NextDouble() - twoThirdsPi / 2f), default) * randVelMult; + int initialBullet = Projectile.NewProjectile(source, position.X, position.Y, bulletSpawnVelocity.X, bulletSpawnVelocity.Y, ProjectileID.Xenopopper, damage, knockback, player.whoAmI, ai, 0f); + Main.projectile[initialBullet].localAI[0] = (float)type; + Main.projectile[initialBullet].localAI[1] = 12f; } - for (int num108 = 0; num108 < 6; num108++) + for (int j = 0; j < 6; j++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-800, 801); - vector2.Y -= (float)(100 * num108); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-800, 801); + realPlayerPos.Y -= (float)(100 * j); + mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (mouseYDist < 0f) { - num79 *= -1f; + mouseYDist *= -1f; } - if (num79 < 20f) + if (mouseYDist < 20f) { - num79 = 20f; + mouseYDist = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-1000, 1001) * 0.02f; - float speedY5 = num79 + (float)Main.rand.Next(-1000, 1001) * 0.02f; - int projectile = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, ProjectileID.Xenopopper, damage, knockback, player.whoAmI, ai, 0f); - Main.projectile[projectile].localAI[0] = (float)type; - Main.projectile[projectile].localAI[1] = 12f; + mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + mouseDistance = bulletSpeed / mouseDistance; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + float speedX4 = mouseXDist + (float)Main.rand.Next(-1000, 1001) * 0.02f; + float speedY5 = mouseYDist + (float)Main.rand.Next(-1000, 1001) * 0.02f; + int extraBullet = Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, ProjectileID.Xenopopper, damage, knockback, player.whoAmI, ai, 0f); + Main.projectile[extraBullet].localAI[0] = (float)type; + Main.projectile[extraBullet].localAI[1] = 12f; } return false; } diff --git a/Items/Weapons/Rogue/LunarKunai.cs b/Items/Weapons/Rogue/LunarKunai.cs index 78c82ac42b..f0a52d7d84 100644 --- a/Items/Weapons/Rogue/LunarKunai.cs +++ b/Items/Weapons/Rogue/LunarKunai.cs @@ -39,42 +39,42 @@ namespace CalamityMod.Items.Weapons.Rogue public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float num72 = Item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float kunaiSpeed = Item.shootSpeed; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = kunaiSpeed; } else { - num80 = num72 / num80; + mouseDistance = kunaiSpeed / mouseDistance; } - num78 *= num80; - num79 *= num80; + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; int projAmt = player.Calamity().StealthStrikeAvailable() ? 8 : 3; for (int i = 0; i < projAmt; i++) { - float num148 = num78; - float num149 = num79; - float num150 = 0.05f * (float)i; - num148 += (float)Main.rand.Next(-35, 36) * num150; - num149 += (float)Main.rand.Next(-35, 36) * num150; - num80 = (float)Math.Sqrt((double)(num148 * num148 + num149 * num149)); - num80 = num72 / num80; - num148 *= num80; - num149 *= num80; - float x4 = vector2.X; - float y4 = vector2.Y; - int stealth = Projectile.NewProjectile(source, x4, y4, num148, num149, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 0f); + float randXOffset = mouseXDist; + float randYOffset = mouseYDist; + float randOffsetDampener = 0.05f * (float)i; + randXOffset += (float)Main.rand.Next(-35, 36) * randOffsetDampener; + randYOffset += (float)Main.rand.Next(-35, 36) * randOffsetDampener; + mouseDistance = (float)Math.Sqrt((double)(randXOffset * randXOffset + randYOffset * randYOffset)); + mouseDistance = kunaiSpeed / mouseDistance; + randXOffset *= mouseDistance; + randYOffset *= mouseDistance; + float x4 = realPlayerPos.X; + float y4 = realPlayerPos.Y; + int stealth = Projectile.NewProjectile(source, x4, y4, randXOffset, randYOffset, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 0f); if (stealth.WithinBounds(Main.maxProjectiles) && player.Calamity().StealthStrikeAvailable()) Main.projectile[stealth].Calamity().stealthStrike = true; } diff --git a/Items/Weapons/Rogue/Penumbra.cs b/Items/Weapons/Rogue/Penumbra.cs index cca4ae7b1f..a8e33bf71f 100644 --- a/Items/Weapons/Rogue/Penumbra.cs +++ b/Items/Weapons/Rogue/Penumbra.cs @@ -44,20 +44,20 @@ namespace CalamityMod.Items.Weapons.Rogue { if (player.Calamity().StealthStrikeAvailable()) { - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = Main.mouseY + Main.screenPosition.Y - vector2.Y; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + Main.screenHeight - Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + Main.screenHeight - Main.mouseY - realPlayerPos.Y; } - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = player.direction; - num79 = 0f; + mouseXDist = player.direction; + mouseYDist = 0f; } - vector2 += new Vector2(num78, num79); - int proj = Projectile.NewProjectile(source, vector2, new Vector2(0f,-0.5f), ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 1f); + realPlayerPos += new Vector2(mouseXDist, mouseYDist); + int proj = Projectile.NewProjectile(source, realPlayerPos, new Vector2(0f,-0.5f), ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 1f); if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].Calamity().stealthStrike = true; return false; diff --git a/Items/Weapons/Summon/EnchantedConch.cs b/Items/Weapons/Summon/EnchantedConch.cs index 910403a22a..3e9c7b9671 100644 --- a/Items/Weapons/Summon/EnchantedConch.cs +++ b/Items/Weapons/Summon/EnchantedConch.cs @@ -34,30 +34,29 @@ namespace CalamityMod.Items.Weapons.Summon public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { int i = Main.myPlayer; - float num72 = Item.shootSpeed; - int num73 = damage; + float projSpeed = Item.shootSpeed; player.itemTime = Item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; + mouseXDist = (float)player.direction; } else { - num80 = num72 / num80; + mouseDistance = projSpeed / mouseDistance; } - num78 = 0f; - num79 = 0f; - vector2.X = (float)Main.mouseX + Main.screenPosition.X; - vector2.Y = (float)Main.mouseY + Main.screenPosition.Y; - int p = Projectile.NewProjectile(source, vector2.X, vector2.Y, num78, num79, ModContent.ProjectileType(), num73, knockback, i, 0f, 0f); + mouseXDist = 0f; + mouseYDist = 0f; + realPlayerPos.X = (float)Main.mouseX + Main.screenPosition.X; + realPlayerPos.Y = (float)Main.mouseY + Main.screenPosition.Y; + int p = Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, mouseXDist, mouseYDist, ModContent.ProjectileType(), damage, knockback, i, 0f, 0f); if (Main.projectile.IndexInRange(p)) Main.projectile[p].originalDamage = Item.damage; return false; diff --git a/Items/Weapons/Summon/EntropysVigil.cs b/Items/Weapons/Summon/EntropysVigil.cs index 581fb72238..ec80ab9fe7 100644 --- a/Items/Weapons/Summon/EntropysVigil.cs +++ b/Items/Weapons/Summon/EntropysVigil.cs @@ -34,41 +34,41 @@ namespace CalamityMod.Items.Weapons.Summon public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { int i = Main.myPlayer; - float num72 = Item.shootSpeed; + float projSpeed = Item.shootSpeed; player.itemTime = Item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = projSpeed; } else { - num80 = num72 / num80; + mouseDistance = projSpeed / mouseDistance; } - num78 *= num80; - num79 *= num80; - vector2.X = (float)Main.mouseX + Main.screenPosition.X; - vector2.Y = (float)Main.mouseY + Main.screenPosition.Y; - Vector2 spinningpoint = new Vector2(num78, num79); + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + realPlayerPos.X = (float)Main.mouseX + Main.screenPosition.X; + realPlayerPos.Y = (float)Main.mouseY + Main.screenPosition.Y; + Vector2 spinningpoint = new Vector2(mouseXDist, mouseYDist); spinningpoint = spinningpoint.RotatedBy(1.5707963705062866, default); - int p = Projectile.NewProjectile(source, vector2.X + spinningpoint.X, vector2.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, ModContent.ProjectileType(), damage, knockback, i, 0f, 1f); + int p = Projectile.NewProjectile(source, realPlayerPos.X + spinningpoint.X, realPlayerPos.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, ModContent.ProjectileType(), damage, knockback, i, 0f, 1f); if (Main.projectile.IndexInRange(p)) Main.projectile[p].originalDamage = Item.damage; spinningpoint = spinningpoint.RotatedBy(-3.1415927410125732, default); - p = Projectile.NewProjectile(source, vector2.X + spinningpoint.X, vector2.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, ModContent.ProjectileType(), damage, knockback, i, 0f, 0f); + p = Projectile.NewProjectile(source, realPlayerPos.X + spinningpoint.X, realPlayerPos.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, ModContent.ProjectileType(), damage, knockback, i, 0f, 0f); if (Main.projectile.IndexInRange(p)) Main.projectile[p].originalDamage = Item.damage; spinningpoint = spinningpoint.RotatedBy(-5.1415927410125732, default); - p = Projectile.NewProjectile(source, vector2.X + spinningpoint.X, vector2.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, ModContent.ProjectileType(), damage, knockback, i, 0f, 1f); + p = Projectile.NewProjectile(source, realPlayerPos.X + spinningpoint.X, realPlayerPos.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, ModContent.ProjectileType(), damage, knockback, i, 0f, 1f); if (Main.projectile.IndexInRange(p)) Main.projectile[p].originalDamage = Item.damage; return false; diff --git a/Items/Weapons/Summon/EtherealSubjugator.cs b/Items/Weapons/Summon/EtherealSubjugator.cs index 362c2b5eed..362b210822 100644 --- a/Items/Weapons/Summon/EtherealSubjugator.cs +++ b/Items/Weapons/Summon/EtherealSubjugator.cs @@ -42,33 +42,33 @@ namespace CalamityMod.Items.Weapons.Summon if (player.altFunctionUse != 2) { int i = Main.myPlayer; - float num72 = Item.shootSpeed; + float projSpeed = Item.shootSpeed; player.itemTime = Item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = projSpeed; } else { - num80 = num72 / num80; + mouseDistance = projSpeed / mouseDistance; } - num78 *= num80; - num79 *= num80; - vector2.X = (float)Main.mouseX + Main.screenPosition.X; - vector2.Y = (float)Main.mouseY + Main.screenPosition.Y; - Vector2 spinningpoint = new Vector2(num78, num79); + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + realPlayerPos.X = (float)Main.mouseX + Main.screenPosition.X; + realPlayerPos.Y = (float)Main.mouseY + Main.screenPosition.Y; + Vector2 spinningpoint = new Vector2(mouseXDist, mouseYDist); spinningpoint = spinningpoint.RotatedBy(1.5707963705062866, default); - int p = Projectile.NewProjectile(source, vector2.X + spinningpoint.X, vector2.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, type, damage, knockback, i, 0f, 1f); + int p = Projectile.NewProjectile(source, realPlayerPos.X + spinningpoint.X, realPlayerPos.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, type, damage, knockback, i, 0f, 1f); if (Main.projectile.IndexInRange(p)) Main.projectile[p].originalDamage = Item.damage; } diff --git a/Items/Weapons/Summon/ResurrectionButterfly.cs b/Items/Weapons/Summon/ResurrectionButterfly.cs index b7cc95f0d7..f4ef5c48dd 100644 --- a/Items/Weapons/Summon/ResurrectionButterfly.cs +++ b/Items/Weapons/Summon/ResurrectionButterfly.cs @@ -37,37 +37,37 @@ namespace CalamityMod.Items.Weapons.Summon public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { int i = Main.myPlayer; - float num72 = Item.shootSpeed; + float projSpeed = Item.shootSpeed; player.itemTime = Item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = projSpeed; } else { - num80 = num72 / num80; + mouseDistance = projSpeed / mouseDistance; } - num78 *= num80; - num79 *= num80; - vector2.X = (float)Main.mouseX + Main.screenPosition.X; - vector2.Y = (float)Main.mouseY + Main.screenPosition.Y; - Vector2 spinningpoint = new Vector2(num78, num79); + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + realPlayerPos.X = (float)Main.mouseX + Main.screenPosition.X; + realPlayerPos.Y = (float)Main.mouseY + Main.screenPosition.Y; + Vector2 spinningpoint = new Vector2(mouseXDist, mouseYDist); spinningpoint = spinningpoint.RotatedBy(1.5707963705062866, default); - int p = Projectile.NewProjectile(source, vector2.X + spinningpoint.X, vector2.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, ModContent.ProjectileType(), damage, knockback, i, 0f, 0f); + int p = Projectile.NewProjectile(source, realPlayerPos.X + spinningpoint.X, realPlayerPos.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, ModContent.ProjectileType(), damage, knockback, i, 0f, 0f); if (Main.projectile.IndexInRange(p)) Main.projectile[p].originalDamage = Item.damage; spinningpoint = spinningpoint.RotatedBy(-3.1415927410125732, default); - p = Projectile.NewProjectile(source, vector2.X + spinningpoint.X, vector2.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, ModContent.ProjectileType(), damage, knockback, i, 0f, 0f); + p = Projectile.NewProjectile(source, realPlayerPos.X + spinningpoint.X, realPlayerPos.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, ModContent.ProjectileType(), damage, knockback, i, 0f, 0f); if (Main.projectile.IndexInRange(p)) Main.projectile[p].originalDamage = Item.damage; return false; diff --git a/Items/Weapons/Summon/VileFeeder.cs b/Items/Weapons/Summon/VileFeeder.cs index c42b8e20d1..22cdd84e12 100644 --- a/Items/Weapons/Summon/VileFeeder.cs +++ b/Items/Weapons/Summon/VileFeeder.cs @@ -37,33 +37,33 @@ namespace CalamityMod.Items.Weapons.Summon if (player.altFunctionUse != 2) { int i = Main.myPlayer; - float num72 = Item.shootSpeed; + float projSpeed = Item.shootSpeed; player.itemTime = Item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); + float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); + if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; + mouseXDist = (float)player.direction; + mouseYDist = 0f; + mouseDistance = projSpeed; } else { - num80 = num72 / num80; + mouseDistance = projSpeed / mouseDistance; } - num78 *= num80; - num79 *= num80; - vector2.X = (float)Main.mouseX + Main.screenPosition.X; - vector2.Y = (float)Main.mouseY + Main.screenPosition.Y; - Vector2 spinningpoint = new Vector2(num78, num79); + mouseXDist *= mouseDistance; + mouseYDist *= mouseDistance; + realPlayerPos.X = (float)Main.mouseX + Main.screenPosition.X; + realPlayerPos.Y = (float)Main.mouseY + Main.screenPosition.Y; + Vector2 spinningpoint = new Vector2(mouseXDist, mouseYDist); spinningpoint = spinningpoint.RotatedBy(MathHelper.PiOver2, default); - int p = Projectile.NewProjectile(source, vector2.X + spinningpoint.X, vector2.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, type, damage, knockback, i, 0f, 0f); + int p = Projectile.NewProjectile(source, realPlayerPos.X + spinningpoint.X, realPlayerPos.Y + spinningpoint.Y, spinningpoint.X, spinningpoint.Y, type, damage, knockback, i, 0f, 0f); if (Main.projectile.IndexInRange(p)) Main.projectile[p].originalDamage = Item.damage; } From 51f00f12e2061eeb4efc17f664cc2bfde4d4853a Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 31 Oct 2023 17:45:39 -0400 Subject: [PATCH 40/95] The one singular CalamityGlobalItem change --- Items/CalamityGlobalItem.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index cbce4e751d..201be331ff 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1597,7 +1597,7 @@ namespace CalamityMod.Items public static bool HasEnoughAmmo(Player player, Item item, int ammoConsumed) { - bool flag = false; + bool hasEnoughAmmo = false; bool canShoot = false; for (int i = 54; i < Main.InventorySlotsTotal; i++) @@ -1605,12 +1605,12 @@ namespace CalamityMod.Items if (player.inventory[i].ammo == item.useAmmo && (player.inventory[i].stack >= ammoConsumed || !player.inventory[i].consumable)) { canShoot = true; - flag = true; + hasEnoughAmmo = true; break; } } - if (!flag) + if (!hasEnoughAmmo) { for (int j = 0; j < 54; j++) { @@ -1627,7 +1627,7 @@ namespace CalamityMod.Items public static void ConsumeAdditionalAmmo(Player player, Item item, int ammoConsumed) { Item itemAmmo = new Item(); - bool flag = false; + bool hasEnoughAmmo = false; bool dontConsumeAmmo = false; for (int i = 54; i < Main.InventorySlotsTotal; i++) @@ -1635,12 +1635,12 @@ namespace CalamityMod.Items if (player.inventory[i].ammo == item.useAmmo && (player.inventory[i].stack >= ammoConsumed || !player.inventory[i].consumable)) { itemAmmo = player.inventory[i]; - flag = true; + hasEnoughAmmo = true; break; } } - if (!flag) + if (!hasEnoughAmmo) { for (int j = 0; j < 54; j++) { From 618c842be7553007e559063f32965c3bc2e9aeb8 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 31 Oct 2023 21:52:06 -0400 Subject: [PATCH 41/95] Some World stuff --- World/Abyss.cs | 104 ++++----- World/AstralBiome.cs | 140 ++++++------ World/CustomDungeon.cs | 414 +++++++++++++++++----------------- World/GiantHive.cs | 228 +++++++++---------- World/MiscWorldgenRoutines.cs | 178 +++++++-------- World/SunkenSea.cs | 30 +-- World/WorldEvilIsland.cs | 142 ++++++------ 7 files changed, 618 insertions(+), 618 deletions(-) diff --git a/World/Abyss.cs b/World/Abyss.cs index 7cdca25089..92679c590e 100644 --- a/World/Abyss.cs +++ b/World/Abyss.cs @@ -810,29 +810,29 @@ namespace CalamityMod.World int islandTopY = Math.Clamp((int)(islandOrigin.Y - islandWidth * 0.5), 0, Main.maxTilesY); int islandBottomY = Math.Clamp((int)(islandOrigin.Y + islandWidth * 0.5), 0, Main.maxTilesY); - double num11 = islandWidth * (double)WorldGen.genRand.Next(sizeMin, sizeMax) * 0.01; //80 120 - float num12 = islandOrigin.Y + 1f; + double extraIslandWidth = islandWidth * (double)WorldGen.genRand.Next(sizeMin, sizeMax) * 0.01; //80 120 + float islandYOffset = islandOrigin.Y + 1f; for (int k = islandLeftX; k < islandRightX; k++) { if (WorldGen.genRand.NextBool(2)) { - num12 += (float)WorldGen.genRand.Next(-1, 2); + islandYOffset += (float)WorldGen.genRand.Next(-1, 2); } - if (num12 < islandOrigin.Y) + if (islandYOffset < islandOrigin.Y) { - num12 = islandOrigin.Y; + islandYOffset = islandOrigin.Y; } - if (num12 > islandOrigin.Y + 2f) + if (islandYOffset > islandOrigin.Y + 2f) { - num12 = islandOrigin.Y + 2f; + islandYOffset = islandOrigin.Y + 2f; } for (int l = islandTopY; l < islandBottomY; l++) { - if ((float)l > num12) + if ((float)l > islandYOffset) { - float arg_218_0 = Math.Abs((float)k - islandOrigin.X); - float num13 = Math.Abs((float)l - islandOrigin.Y) * 3f; - if (Math.Sqrt((double)(arg_218_0 * arg_218_0 + num13 * num13)) < num11 * 0.4) + float tileCheckXDist = Math.Abs((float)k - islandOrigin.X); + float tileCheckYDist = Math.Abs((float)l - islandOrigin.Y) * 3f; + if (Math.Sqrt((double)(tileCheckXDist * tileCheckXDist + tileCheckYDist * tileCheckYDist)) < extraIslandWidth * 0.4) { if (k < islandPositionX) { @@ -879,17 +879,17 @@ namespace CalamityMod.World } } int m = islandPositionX; - int num15; - for (m += WorldGen.genRand.Next(5); m < islandPositionXAgain; m += WorldGen.genRand.Next(num15, (int)(num15 * 1.5))) + int randMinMaxValues; + for (m += WorldGen.genRand.Next(5); m < islandPositionXAgain; m += WorldGen.genRand.Next(randMinMaxValues, (int)(randMinMaxValues * 1.5))) { - int num14 = islandPositionY; - while (!Main.tile[m, num14].HasTile) + int islandTileY = islandPositionY; + while (!Main.tile[m, islandTileY].HasTile) { - num14--; + islandTileY--; } - num14 += WorldGen.genRand.Next(-3, 4); - num15 = WorldGen.genRand.Next(4, 8); - int num16 = tileType; + islandTileY += WorldGen.genRand.Next(-3, 4); + randMinMaxValues = WorldGen.genRand.Next(4, 8); + int placedTile = tileType; //chance to place clumps of whatever defined block if (hasClumps && WorldGen.genRand.NextBool(3)) @@ -898,30 +898,30 @@ namespace CalamityMod.World if (tileType != ModContent.TileType()) { //if scoria is enabled, then place it, otherwise place planty mush clumps - num16 = hasScoria ? ModContent.TileType() : ModContent.TileType(); + placedTile = hasScoria ? ModContent.TileType() : ModContent.TileType(); } //if the tile is pyre mantle then always place scoria else { //place molten pyre mantle and scorcia ore - num16 = hasScoria ? ModContent.TileType() : ModContent.TileType(); + placedTile = hasScoria ? ModContent.TileType() : ModContent.TileType(); } } - for (int n = m - num15; n <= m + num15; n++) + for (int n = m - randMinMaxValues; n <= m + randMinMaxValues; n++) { - for (int num17 = num14 - num15; num17 <= num14 + num15; num17++) + for (int p = islandTileY - randMinMaxValues; p <= islandTileY + randMinMaxValues; p++) { - if (num17 > islandPositionYAgain) + if (p > islandPositionYAgain) { - float arg_409_0 = (float)Math.Abs(n - m); - float num18 = (float)(Math.Abs(num17 - num14) * 2); - if (Math.Sqrt((double)(arg_409_0 * arg_409_0 + num18 * num18)) < (double)(num15 + WorldGen.genRand.Next(2))) + float islandTileXDist = (float)Math.Abs(n - m); + float islandTileYDist = (float)(Math.Abs(p - islandTileY) * 2); + if (Math.Sqrt((double)(islandTileXDist * islandTileXDist + islandTileYDist * islandTileYDist)) < (double)(randMinMaxValues + WorldGen.genRand.Next(2))) { - Main.tile[n, num17].Get().HasTile = true; + Main.tile[n, p].Get().HasTile = true; - Main.tile[n, num17].TileType = (ushort)num16; - CalamityUtils.SafeSquareTileFrame(n, num17, true); + Main.tile[n, p].TileType = (ushort)placedTile; + CalamityUtils.SafeSquareTileFrame(n, p, true); } } } @@ -963,43 +963,43 @@ namespace CalamityMod.World vector2.Y = -0.2f; } } - int num23 = islandPositionX; - num23 += WorldGen.genRand.Next(5); - while (num23 < islandPositionXAgain) + int islandXOffsetPos = islandPositionX; + islandXOffsetPos += WorldGen.genRand.Next(5); + while (islandXOffsetPos < islandPositionXAgain) { - int num24 = islandPositionY; - while ((!Main.tile[num23, num24].HasTile || Main.tile[num23, num24].TileType != 0) && num23 < islandPositionXAgain) + int islandYOffsetPos = islandPositionY; + while ((!Main.tile[islandXOffsetPos, islandYOffsetPos].HasTile || Main.tile[islandXOffsetPos, islandYOffsetPos].TileType != 0) && islandXOffsetPos < islandPositionXAgain) { - num24--; - if (num24 < islandPositionYAgain) + islandYOffsetPos--; + if (islandYOffsetPos < islandPositionYAgain) { - num24 = islandPositionY; - num23 += WorldGen.genRand.Next(1, 4); + islandYOffsetPos = islandPositionY; + islandXOffsetPos += WorldGen.genRand.Next(1, 4); } } - if (num23 < islandPositionXAgain) + if (islandXOffsetPos < islandPositionXAgain) { - num24 += WorldGen.genRand.Next(0, 4); - int num25 = WorldGen.genRand.Next(2, 5); - int num26 = tileType; - for (int num27 = num23 - num25; num27 <= num23 + num25; num27++) + islandYOffsetPos += WorldGen.genRand.Next(0, 4); + int islandOffsetRandValues = WorldGen.genRand.Next(2, 5); + int placeTile = tileType; + for (int r = islandXOffsetPos - islandOffsetRandValues; r <= islandXOffsetPos + islandOffsetRandValues; r++) { - for (int num28 = num24 - num25; num28 <= num24 + num25; num28++) + for (int s = islandYOffsetPos - islandOffsetRandValues; s <= islandYOffsetPos + islandOffsetRandValues; s++) { - if (num28 > islandPositionYAgain) + if (s > islandPositionYAgain) { - float arg_890_0 = Math.Abs(num27 - num23); - float num29 = (Math.Abs(num28 - num24) * 2); - if (Math.Sqrt((double)(arg_890_0 * arg_890_0 + num29 * num29)) < num25) + float islandOffsetXDist = Math.Abs(r - islandXOffsetPos); + float islandOffsetYDist = (Math.Abs(s - islandYOffsetPos) * 2); + if (Math.Sqrt((double)(islandOffsetXDist * islandOffsetXDist + islandOffsetYDist * islandOffsetYDist)) < islandOffsetRandValues) { - Main.tile[num27, num28].TileType = (ushort)num26; - CalamityUtils.SafeSquareTileFrame(num27, num28, true); + Main.tile[r, s].TileType = (ushort)placeTile; + CalamityUtils.SafeSquareTileFrame(r, s, true); } } } } - num23 += WorldGen.genRand.Next(num25, (int)(num25 * 1.5)); + islandXOffsetPos += WorldGen.genRand.Next(islandOffsetRandValues, (int)(islandOffsetRandValues * 1.5)); } } } diff --git a/World/AstralBiome.cs b/World/AstralBiome.cs index d43940cfeb..68a534ad96 100644 --- a/World/AstralBiome.cs +++ b/World/AstralBiome.cs @@ -255,8 +255,8 @@ namespace CalamityMod.World { return false; } - int num = 35; - Rectangle rectangle = new Rectangle((i - num) * 16, (j - num) * 16, num * 2 * 16, num * 2 * 16); + int avoidRectangleSize = 35; + Rectangle rectangle = new Rectangle((i - avoidRectangleSize) * 16, (j - avoidRectangleSize) * 16, avoidRectangleSize * 2 * 16, avoidRectangleSize * 2 * 16); for (int k = 0; k < Main.maxPlayers; k++) { if (Main.player[k].active) @@ -279,9 +279,9 @@ namespace CalamityMod.World } } } - for (int m = i - num; m < i + num; m++) + for (int m = i - avoidRectangleSize; m < i + avoidRectangleSize; m++) { - for (int n = j - num; n < j + num; n++) + for (int n = j - avoidRectangleSize; n < j + avoidRectangleSize; n++) { if (Main.tile[m, n].HasTile && Main.tile[m, n].TileType == 21) { @@ -289,130 +289,130 @@ namespace CalamityMod.World } } } - num = rand.Next(17, 23); - for (int num2 = i - num; num2 < i + num; num2++) + avoidRectangleSize = rand.Next(17, 23); + for (int inc = i - avoidRectangleSize; inc < i + avoidRectangleSize; inc++) { - for (int num3 = j - num; num3 < j + num; num3++) + for (int doubleinc = j - avoidRectangleSize; doubleinc < j + avoidRectangleSize; doubleinc++) { - if (num3 > j + rand.Next(-2, 3) - 5) + if (doubleinc > j + rand.Next(-2, 3) - 5) { - float num4 = (float)Math.Abs(i - num2); - float num5 = (float)Math.Abs(j - num3); - float num6 = (float)Math.Sqrt((double)(num4 * num4 + num5 * num5)); - if ((double)num6 < (double)num * 0.9 + (double)rand.Next(-4, 5)) + float tileXDist = (float)Math.Abs(i - inc); + float tileYDist = (float)Math.Abs(j - doubleinc); + float tileDistance = (float)Math.Sqrt((double)(tileXDist * tileXDist + tileYDist * tileYDist)); + if ((double)tileDistance < (double)avoidRectangleSize * 0.9 + (double)rand.Next(-4, 5)) { - if (Main.tile[num2, num3] != null) + if (Main.tile[inc, doubleinc] != null) { - if (!Main.tileSolid[(int)Main.tile[num2, num3].TileType]) + if (!Main.tileSolid[(int)Main.tile[inc, doubleinc].TileType]) { - Main.tile[num2, num3].Get().HasTile = false; + Main.tile[inc, doubleinc].Get().HasTile = false; } - Main.tile[num2, num3].TileType = (ushort)ModContent.TileType(); + Main.tile[inc, doubleinc].TileType = (ushort)ModContent.TileType(); } } } } } - num = WorldGen.genRand.Next(8, 14); - for (int num7 = i - num; num7 < i + num; num7++) + avoidRectangleSize = WorldGen.genRand.Next(8, 14); + for (int inc2 = i - avoidRectangleSize; inc2 < i + avoidRectangleSize; inc2++) { - for (int num8 = j - num; num8 < j + num; num8++) + for (int doubleinc2 = j - avoidRectangleSize; doubleinc2 < j + avoidRectangleSize; doubleinc2++) { - if (num8 > j + rand.Next(-2, 3) - 4) + if (doubleinc2 > j + rand.Next(-2, 3) - 4) { - float num9 = (float)Math.Abs(i - num7); - float num10 = (float)Math.Abs(j - num8); - float num11 = (float)Math.Sqrt((double)(num9 * num9 + num10 * num10)); - if ((double)num11 < (double)num * 0.8 + (double)rand.Next(-3, 4)) + float tileXDist2 = (float)Math.Abs(i - inc2); + float tileYDist2 = (float)Math.Abs(j - doubleinc2); + float tileDistance2 = (float)Math.Sqrt((double)(tileXDist2 * tileXDist2 + tileYDist2 * tileYDist2)); + if ((double)tileDistance2 < (double)avoidRectangleSize * 0.8 + (double)rand.Next(-3, 4)) { - if (Main.tile[num7, num8] != null) - Main.tile[num7, num8].Get().HasTile = false; + if (Main.tile[inc2, doubleinc2] != null) + Main.tile[inc2, doubleinc2].Get().HasTile = false; } } } } - num = WorldGen.genRand.Next(25, 35); - for (int num12 = i - num; num12 < i + num; num12++) + avoidRectangleSize = WorldGen.genRand.Next(25, 35); + for (int inc3 = i - avoidRectangleSize; inc3 < i + avoidRectangleSize; inc3++) { - for (int num13 = j - num; num13 < j + num; num13++) + for (int doubleinc3 = j - avoidRectangleSize; doubleinc3 < j + avoidRectangleSize; doubleinc3++) { - float num14 = (float)Math.Abs(i - num12); - float num15 = (float)Math.Abs(j - num13); - float num16 = (float)Math.Sqrt((double)(num14 * num14 + num15 * num15)); - if (Main.tile[num12, num13] != null) + float tileXDist3 = (float)Math.Abs(i - inc3); + float tileYDist3 = (float)Math.Abs(j - doubleinc3); + float tileDistance3 = (float)Math.Sqrt((double)(tileXDist3 * tileXDist3 + tileYDist3 * tileYDist3)); + if (Main.tile[inc3, doubleinc3] != null) { - if ((double)num16 < (double)num * 0.7) + if ((double)tileDistance3 < (double)avoidRectangleSize * 0.7) { - if (Main.tile[num12, num13].TileType == 5 || Main.tile[num12, num13].TileType == 32 || Main.tile[num12, num13].TileType == 352) + if (Main.tile[inc3, doubleinc3].TileType == 5 || Main.tile[inc3, doubleinc3].TileType == 32 || Main.tile[inc3, doubleinc3].TileType == 352) { try - { WorldGen.KillTile(num12, num13, false, false, true); } + { WorldGen.KillTile(inc3, doubleinc3, false, false, true); } catch (NullReferenceException) { } } - Main.tile[num12, num13].LiquidAmount = 0; + Main.tile[inc3, doubleinc3].LiquidAmount = 0; } - if (Main.tile[num12, num13].TileType == (ushort)ModContent.TileType()) + if (Main.tile[inc3, doubleinc3].TileType == (ushort)ModContent.TileType()) { - if (!WorldGen.SolidTile(num12 - 1, num13) && !WorldGen.SolidTile(num12 + 1, num13) && !WorldGen.SolidTile(num12, num13 - 1) && !WorldGen.SolidTile(num12, num13 + 1)) + if (!WorldGen.SolidTile(inc3 - 1, doubleinc3) && !WorldGen.SolidTile(inc3 + 1, doubleinc3) && !WorldGen.SolidTile(inc3, doubleinc3 - 1) && !WorldGen.SolidTile(inc3, doubleinc3 + 1)) { - Main.tile[num12, num13].Get().HasTile = false; + Main.tile[inc3, doubleinc3].Get().HasTile = false; } - else if ((Main.tile[num12, num13].IsHalfBlock || Main.tile[num12 - 1, num13].TopSlope) && !WorldGen.SolidTile(num12, num13 + 1)) + else if ((Main.tile[inc3, doubleinc3].IsHalfBlock || Main.tile[inc3 - 1, doubleinc3].TopSlope) && !WorldGen.SolidTile(inc3, doubleinc3 + 1)) { - Main.tile[num12, num13].Get().HasTile = false; + Main.tile[inc3, doubleinc3].Get().HasTile = false; } } - WorldGen.SquareTileFrame(num12, num13, true); - WorldGen.SquareWallFrame(num12, num13, true); + WorldGen.SquareTileFrame(inc3, doubleinc3, true); + WorldGen.SquareWallFrame(inc3, doubleinc3, true); } } } - num = WorldGen.genRand.Next(23, 32); - for (int num17 = i - num; num17 < i + num; num17++) + avoidRectangleSize = WorldGen.genRand.Next(23, 32); + for (int inc4 = i - avoidRectangleSize; inc4 < i + avoidRectangleSize; inc4++) { - for (int num18 = j - num; num18 < j + num; num18++) + for (int doubleinc4 = j - avoidRectangleSize; doubleinc4 < j + avoidRectangleSize; doubleinc4++) { - if (num18 > j + WorldGen.genRand.Next(-3, 4) - 3 && Main.tile[num17, num18].HasTile && rand.NextBool(10)) + if (doubleinc4 > j + WorldGen.genRand.Next(-3, 4) - 3 && Main.tile[inc4, doubleinc4].HasTile && rand.NextBool(10)) { - float num19 = (float)Math.Abs(i - num17); - float num20 = (float)Math.Abs(j - num18); - float num21 = (float)Math.Sqrt((double)(num19 * num19 + num20 * num20)); - if ((double)num21 < (double)num * 0.8) + float tileXDist4 = (float)Math.Abs(i - inc4); + float tileYDist4 = (float)Math.Abs(j - doubleinc4); + float tileDistance4 = (float)Math.Sqrt((double)(tileXDist4 * tileXDist4 + tileYDist4 * tileYDist4)); + if ((double)tileDistance4 < (double)avoidRectangleSize * 0.8) { - if (Main.tile[num17, num18] != null) + if (Main.tile[inc4, doubleinc4] != null) { - if (Main.tile[num17, num18].TileType == 5 || Main.tile[num17, num18].TileType == 32 || Main.tile[num17, num18].TileType == 352) + if (Main.tile[inc4, doubleinc4].TileType == 5 || Main.tile[inc4, doubleinc4].TileType == 32 || Main.tile[inc4, doubleinc4].TileType == 352) { - WorldGen.KillTile(num17, num18, false, false, false); + WorldGen.KillTile(inc4, doubleinc4, false, false, false); } - Main.tile[num17, num18].TileType = (ushort)ModContent.TileType(); - WorldGen.SquareTileFrame(num17, num18, true); + Main.tile[inc4, doubleinc4].TileType = (ushort)ModContent.TileType(); + WorldGen.SquareTileFrame(inc4, doubleinc4, true); } } } } } - num = WorldGen.genRand.Next(30, 38); - for (int num22 = i - num; num22 < i + num; num22++) + avoidRectangleSize = WorldGen.genRand.Next(30, 38); + for (int inc5 = i - avoidRectangleSize; inc5 < i + avoidRectangleSize; inc5++) { - for (int num23 = j - num; num23 < j + num; num23++) + for (int doubleinc5 = j - avoidRectangleSize; doubleinc5 < j + avoidRectangleSize; doubleinc5++) { - if (num23 > j + WorldGen.genRand.Next(-2, 3) && Main.tile[num22, num23].HasTile && rand.NextBool(20)) + if (doubleinc5 > j + WorldGen.genRand.Next(-2, 3) && Main.tile[inc5, doubleinc5].HasTile && rand.NextBool(20)) { - float num24 = (float)Math.Abs(i - num22); - float num25 = (float)Math.Abs(j - num23); - float num26 = (float)Math.Sqrt((double)(num24 * num24 + num25 * num25)); - if ((double)num26 < (double)num * 0.85) + float tileXDist5 = (float)Math.Abs(i - inc5); + float tileYDist5 = (float)Math.Abs(j - doubleinc5); + float tileDistance5 = (float)Math.Sqrt((double)(tileXDist5 * tileXDist5 + tileYDist5 * tileYDist5)); + if ((double)tileDistance5 < (double)avoidRectangleSize * 0.85) { - if (Main.tile[num22, num23] != null) + if (Main.tile[inc5, doubleinc5] != null) { - if (Main.tile[num22, num23].TileType == 5 || Main.tile[num22, num23].TileType == 32 || Main.tile[num22, num23].TileType == 352) + if (Main.tile[inc5, doubleinc5].TileType == 5 || Main.tile[inc5, doubleinc5].TileType == 32 || Main.tile[inc5, doubleinc5].TileType == 352) { - WorldGen.KillTile(num22, num23, false, false, false); + WorldGen.KillTile(inc5, doubleinc5, false, false, false); } - Main.tile[num22, num23].TileType = (ushort)ModContent.TileType(); - WorldGen.SquareTileFrame(num22, num23, true); + Main.tile[inc5, doubleinc5].TileType = (ushort)ModContent.TileType(); + WorldGen.SquareTileFrame(inc5, doubleinc5, true); } } } diff --git a/World/CustomDungeon.cs b/World/CustomDungeon.cs index fbfc39bf4f..b1b87e3d92 100644 --- a/World/CustomDungeon.cs +++ b/World/CustomDungeon.cs @@ -54,28 +54,28 @@ namespace CalamityMod.World GenVars.numDRooms = 0; GenVars.numDDoors = 0; GenVars.numDungeonPlatforms = 0; - int num = WorldGen.genRand.Next(3); + int dungeonColor = WorldGen.genRand.Next(3); WorldGen.genRand.Next(3); if (WorldGen.remixWorldGen) - num = (WorldGen.crimson ? 2 : 0); + dungeonColor = (WorldGen.crimson ? 2 : 0); - ushort num2; - int num3; - switch (num) + ushort brickType; + int wallType; + switch (dungeonColor) { case 0: - num2 = 41; - num3 = 7; + brickType = 41; + wallType = 7; GenVars.crackedType = 481; break; case 1: - num2 = 43; - num3 = 8; + brickType = 43; + wallType = 8; GenVars.crackedType = 482; break; default: - num2 = 44; - num3 = 9; + brickType = 44; + wallType = 9; GenVars.crackedType = 483; break; } @@ -107,7 +107,7 @@ namespace CalamityMod.World num4 += (double)WorldGen.genRand.Next(0, (int)(num4 / 3.0)); double num5 = num4; int num6 = 5; - WorldGen.DungeonRoom(GenVars.dungeonX, GenVars.dungeonY, num2, num3); + WorldGen.DungeonRoom(GenVars.dungeonX, GenVars.dungeonY, brickType, wallType); while (num4 > 0.0) { if (GenVars.dungeonX < GenVars.dMinX) @@ -131,26 +131,26 @@ namespace CalamityMod.World { int dungeonX = GenVars.dungeonX; int dungeonY = GenVars.dungeonY; - GenNewDungeonHalls(GenVars.dungeonX, GenVars.dungeonY, num2, num3); + GenNewDungeonHalls(GenVars.dungeonX, GenVars.dungeonY, brickType, wallType); if (WorldGen.genRand.NextBool()) - GenNewDungeonHalls(GenVars.dungeonX, GenVars.dungeonY, num2, num3); + GenNewDungeonHalls(GenVars.dungeonX, GenVars.dungeonY, brickType, wallType); - WorldGen.DungeonRoom(GenVars.dungeonX, GenVars.dungeonY, num2, num3); + WorldGen.DungeonRoom(GenVars.dungeonX, GenVars.dungeonY, brickType, wallType); GenVars.dungeonX = dungeonX; GenVars.dungeonY = dungeonY; } else { - WorldGen.DungeonRoom(GenVars.dungeonX, GenVars.dungeonY, num2, num3); + WorldGen.DungeonRoom(GenVars.dungeonX, GenVars.dungeonY, brickType, wallType); } } else { - WorldGen.DungeonHalls(GenVars.dungeonX, GenVars.dungeonY, num2, num3); + WorldGen.DungeonHalls(GenVars.dungeonX, GenVars.dungeonY, brickType, wallType); } } - WorldGen.DungeonRoom(GenVars.dungeonX, GenVars.dungeonY, num2, num3); + WorldGen.DungeonRoom(GenVars.dungeonX, GenVars.dungeonY, brickType, wallType); int num7 = GenVars.dRoomX[0]; int num8 = GenVars.dRoomY[0]; for (int i = 0; i < GenVars.numDRooms; i++) @@ -180,16 +180,16 @@ namespace CalamityMod.World num6 = 10; int dungeonX2 = GenVars.dungeonX; int dungeonY2 = GenVars.dungeonY; - GenNewDungeonHalls(GenVars.dungeonX, GenVars.dungeonY, num2, num3, forceX: true); - WorldGen.DungeonRoom(GenVars.dungeonX, GenVars.dungeonY, num2, num3); + GenNewDungeonHalls(GenVars.dungeonX, GenVars.dungeonY, brickType, wallType, forceX: true); + WorldGen.DungeonRoom(GenVars.dungeonX, GenVars.dungeonY, brickType, wallType); GenVars.dungeonX = dungeonX2; GenVars.dungeonY = dungeonY2; } - WorldGen.DungeonStairs(GenVars.dungeonX, GenVars.dungeonY, num2, num3); + WorldGen.DungeonStairs(GenVars.dungeonX, GenVars.dungeonY, brickType, wallType); } - WorldGen.DungeonEnt(GenVars.dungeonX, GenVars.dungeonY, num2, num3); + WorldGen.DungeonEnt(GenVars.dungeonX, GenVars.dungeonY, brickType, wallType); Main.statusText = Lang.gen[58].Value + " 65%"; int num9 = Main.maxTilesX * 2; int num10; @@ -201,7 +201,7 @@ namespace CalamityMod.World num11 = (int)Main.worldSurface; int j = WorldGen.genRand.Next(num11, GenVars.dMaxY); - num10 = ((!WorldGen.DungeonPitTrap(i2, j, num2, num3)) ? (num10 + 1) : (num10 + 1500)); + num10 = ((!WorldGen.DungeonPitTrap(i2, j, brickType, wallType)) ? (num10 + 1) : (num10 + 1500)); } for (int k = 0; k < GenVars.numDRooms; k++) @@ -272,7 +272,7 @@ namespace CalamityMod.World num18 = WorldGen.genRand.Next(GenVars.dungeonY + 25, GenVars.dMaxY); int num19 = num17; - if (Main.tile[num17, num18].WallType == num3 && !Main.tile[num17, num18].Get().HasTile) + if (Main.tile[num17, num18].WallType == wallType && !Main.tile[num17, num18].Get().HasTile) { int num20 = 1; if (WorldGen.genRand.NextBool()) @@ -341,7 +341,7 @@ namespace CalamityMod.World int num22 = WorldGen.genRand.Next(GenVars.dMinX, GenVars.dMaxX); int num23 = WorldGen.genRand.Next((int)Main.worldSurface + 25, GenVars.dMaxY); int num24 = num23; - if (Main.tile[num22, num23].WallType == num3 && !Main.tile[num22, num23].Get().HasTile) + if (Main.tile[num22, num23].WallType == wallType && !Main.tile[num22, num23].Get().HasTile) { int num25 = 1; if (WorldGen.genRand.NextBool()) @@ -506,40 +506,40 @@ namespace CalamityMod.World { Main.tile[num44, num47].Clear(TileDataType.Slope); Main.tile[num44, num47].Get().HasTile = true; - Main.tile[num44, num47].TileType = num2; - if (Main.tile[num44 - 1, num47].TileType == num2) + Main.tile[num44, num47].TileType = brickType; + if (Main.tile[num44 - 1, num47].TileType == brickType) { Main.tile[num44 - 1, num47].Get().HasTile = false; Main.tile[num44 - 1, num47].ClearEverything(); - Main.tile[num44 - 1, num47].WallType = (ushort)num3; + Main.tile[num44 - 1, num47].WallType = (ushort)wallType; } - if (Main.tile[num44 - 2, num47].TileType == num2) + if (Main.tile[num44 - 2, num47].TileType == brickType) { Main.tile[num44 - 2, num47].Get().HasTile = false; Main.tile[num44 - 2, num47].ClearEverything(); - Main.tile[num44 - 2, num47].WallType = (ushort)num3; + Main.tile[num44 - 2, num47].WallType = (ushort)wallType; } - if (Main.tile[num44 + 1, num47].TileType == num2) + if (Main.tile[num44 + 1, num47].TileType == brickType) { Main.tile[num44 + 1, num47].Get().HasTile = false; Main.tile[num44 + 1, num47].ClearEverything(); - Main.tile[num44 + 1, num47].WallType = (ushort)num3; + Main.tile[num44 + 1, num47].WallType = (ushort)wallType; } - if (Main.tile[num44 + 2, num47].TileType == num2) + if (Main.tile[num44 + 2, num47].TileType == brickType) { Main.tile[num44 + 2, num47].Get().HasTile = false; Main.tile[num44 + 2, num47].ClearEverything(); - Main.tile[num44 + 2, num47].WallType = (ushort)num3; + Main.tile[num44 + 2, num47].WallType = (ushort)wallType; } } int style = 13; if (WorldGen.genRand.NextBool(3)) { - switch (num3) + switch (wallType) { case 7: style = 16; @@ -567,19 +567,19 @@ namespace CalamityMod.World { Main.tile[num44, num49].Clear(TileDataType.Slope); Main.tile[num44, num49].Get().HasTile = true; - Main.tile[num44, num49].TileType = num2; - if (Main.tile[num44 - 1, num49].TileType == num2) + Main.tile[num44, num49].TileType = brickType; + if (Main.tile[num44 - 1, num49].TileType == brickType) { Main.tile[num44 - 1, num49].Get().HasTile = false; Main.tile[num44 - 1, num49].ClearEverything(); - Main.tile[num44 - 1, num49].WallType = (ushort)num3; + Main.tile[num44 - 1, num49].WallType = (ushort)wallType; } - if (Main.tile[num44 - 2, num49].TileType == num2) + if (Main.tile[num44 - 2, num49].TileType == brickType) { Main.tile[num44 - 2, num49].Get().HasTile = false; Main.tile[num44 - 2, num49].ClearEverything(); - Main.tile[num44 - 2, num49].WallType = (ushort)num3; + Main.tile[num44 - 2, num49].WallType = (ushort)wallType; } } } @@ -597,19 +597,19 @@ namespace CalamityMod.World { Main.tile[num44, num50].Get().HasTile = true; Main.tile[num44, num50].Clear(TileDataType.Slope); - Main.tile[num44, num50].TileType = num2; - if (Main.tile[num44 + 1, num50].TileType == num2) + Main.tile[num44, num50].TileType = brickType; + if (Main.tile[num44 + 1, num50].TileType == brickType) { Main.tile[num44 + 1, num50].Get().HasTile = false; Main.tile[num44 + 1, num50].ClearEverything(); - Main.tile[num44 + 1, num50].WallType = (ushort)num3; + Main.tile[num44 + 1, num50].WallType = (ushort)wallType; } - if (Main.tile[num44 + 2, num50].TileType == num2) + if (Main.tile[num44 + 2, num50].TileType == brickType) { Main.tile[num44 + 2, num50].Get().HasTile = false; Main.tile[num44 + 2, num50].ClearEverything(); - Main.tile[num44 + 2, num50].WallType = (ushort)num3; + Main.tile[num44 + 2, num50].WallType = (ushort)wallType; } } } @@ -618,45 +618,45 @@ namespace CalamityMod.World num44--; for (int num51 = num45 - 8; num51 < num45; num51++) { - if (Main.tile[num44 + 2, num51].TileType == num2) + if (Main.tile[num44 + 2, num51].TileType == brickType) { Main.tile[num44 + 2, num51].Get().HasTile = false; Main.tile[num44 + 2, num51].ClearEverything(); - Main.tile[num44 + 2, num51].WallType = (ushort)num3; + Main.tile[num44 + 2, num51].WallType = (ushort)wallType; } - if (Main.tile[num44 + 3, num51].TileType == num2) + if (Main.tile[num44 + 3, num51].TileType == brickType) { Main.tile[num44 + 3, num51].Get().HasTile = false; Main.tile[num44 + 3, num51].ClearEverything(); - Main.tile[num44 + 3, num51].WallType = (ushort)num3; + Main.tile[num44 + 3, num51].WallType = (ushort)wallType; } - if (Main.tile[num44 - 2, num51].TileType == num2) + if (Main.tile[num44 - 2, num51].TileType == brickType) { Main.tile[num44 - 2, num51].Get().HasTile = false; Main.tile[num44 - 2, num51].ClearEverything(); - Main.tile[num44 - 2, num51].WallType = (ushort)num3; + Main.tile[num44 - 2, num51].WallType = (ushort)wallType; } - if (Main.tile[num44 - 3, num51].TileType == num2) + if (Main.tile[num44 - 3, num51].TileType == brickType) { Main.tile[num44 - 3, num51].Get().HasTile = false; Main.tile[num44 - 3, num51].ClearEverything(); - Main.tile[num44 - 3, num51].WallType = (ushort)num3; + Main.tile[num44 - 3, num51].WallType = (ushort)wallType; } } Main.tile[num44 - 1, num45].Get().HasTile = true; - Main.tile[num44 - 1, num45].TileType = num2; + Main.tile[num44 - 1, num45].TileType = brickType; Main.tile[num44 - 1, num45].Clear(TileDataType.Slope); Main.tile[num44 + 1, num45].Get().HasTile = true; - Main.tile[num44 + 1, num45].TileType = num2; + Main.tile[num44 + 1, num45].TileType = brickType; Main.tile[num44 + 1, num45].Clear(TileDataType.Slope); } int[] array = new int[3]; - switch (num3) + switch (wallType) { case 7: array[0] = 7; @@ -787,7 +787,7 @@ namespace CalamityMod.World Main.tile[num76, num77].Get().HasTile = true; Main.tile[num76, num77].TileType = 19; Main.tile[num76, num77].Clear(TileDataType.Slope); - switch (num3) + switch (wallType) { case 7: Main.tile[num76, num77].TileFrameY = 108; @@ -809,7 +809,7 @@ namespace CalamityMod.World Main.tile[num78, num77].Get().HasTile = true; Main.tile[num78, num77].TileType = 19; Main.tile[num78, num77].Clear(TileDataType.Slope); - switch (num3) + switch (wallType) { case 7: Main.tile[num78, num77].TileFrameY = 108; @@ -1115,12 +1115,12 @@ namespace CalamityMod.World num13 = 0; num14 = 1000; num15 = 0; - MakeDungeon_Lights(num2, ref num13, num14, ref num15, array); + MakeDungeon_Lights(brickType, ref num13, num14, ref num15, array); num13 = 0; num14 = 1000; num15 = 0; MakeDungeon_Traps(ref num13, num14, ref num15); - double count = MakeDungeon_GroundFurniture(num3); + double count = MakeDungeon_GroundFurniture(wallType); count = MakeDungeon_Pictures(array, count); count = MakeDungeon_Banners(array, count); @@ -1164,13 +1164,13 @@ namespace CalamityMod.World { failCount++; int num = WorldGen.genRand.Next(GenVars.dMinX, GenVars.dMaxX); - int num2 = WorldGen.genRand.Next(GenVars.dMinY, GenVars.dMaxY); - while ((double)num2 < Main.worldSurface) + int brickType = WorldGen.genRand.Next(GenVars.dMinY, GenVars.dMaxY); + while ((double)brickType < Main.worldSurface) { - num2 = WorldGen.genRand.Next(GenVars.dMinY, GenVars.dMaxY); + brickType = WorldGen.genRand.Next(GenVars.dMinY, GenVars.dMaxY); } - if (Main.wallDungeon[Main.tile[num, num2].WallType] && WorldGen.placeTrap(num, num2, 0)) + if (Main.wallDungeon[Main.tile[num, brickType].WallType] && WorldGen.placeTrap(num, brickType, 0)) failCount = failMax; if (failCount > failMax) @@ -1205,17 +1205,17 @@ namespace CalamityMod.World { failCount++; int num = WorldGen.genRand.Next(GenVars.dMinX, GenVars.dMaxX); - int num2 = WorldGen.genRand.Next(GenVars.dMinY, GenVars.dMaxY); - if (Main.wallDungeon[Main.tile[num, num2].WallType]) + int brickType = WorldGen.genRand.Next(GenVars.dMinY, GenVars.dMaxY); + if (Main.wallDungeon[Main.tile[num, brickType].WallType]) { - for (int num3 = num2; num3 > GenVars.dMinY; num3--) + for (int wallType = brickType; wallType > GenVars.dMinY; wallType--) { - if (Main.tile[num, num3 - 1].HasTile && Main.tile[num, num3 - 1].TileType == tileType) + if (Main.tile[num, wallType - 1].HasTile && Main.tile[num, wallType - 1].TileType == tileType) { bool flag = false; for (int i = num - 15; i < num + 15; i++) { - for (int j = num3 - 15; j < num3 + 15; j++) + for (int j = wallType - 15; j < wallType + 15; j++) { if (i > 0 && i < Main.maxTilesX && j > 0 && j < Main.maxTilesY && (Main.tile[i, j].TileType == 42 || Main.tile[i, j].TileType == 34)) { @@ -1225,7 +1225,7 @@ namespace CalamityMod.World } } - if (Main.tile[num - 1, num3].HasTile || Main.tile[num + 1, num3].HasTile || Main.tile[num - 1, num3 + 1].HasTile || Main.tile[num + 1, num3 + 1].HasTile || Main.tile[num, num3 + 2].HasTile) + if (Main.tile[num - 1, wallType].HasTile || Main.tile[num + 1, wallType].HasTile || Main.tile[num - 1, wallType + 1].HasTile || Main.tile[num + 1, wallType + 1].HasTile || Main.tile[num, wallType + 2].HasTile) flag = true; if (flag) @@ -1251,7 +1251,7 @@ namespace CalamityMod.World bool flag3 = false; for (int k = 0; k < 15; k++) { - if (WorldGen.SolidTile(num, num3 + k)) + if (WorldGen.SolidTile(num, wallType + k)) { flag3 = true; break; @@ -1259,9 +1259,9 @@ namespace CalamityMod.World } if (!flag3) - WorldGen.PlaceChand(num, num3, 34, style); + WorldGen.PlaceChand(num, wallType, 34, style); - if (Main.tile[num, num3].TileType == 34) + if (Main.tile[num, wallType].TileType == 34) { flag2 = true; failCount = 0; @@ -1269,8 +1269,8 @@ namespace CalamityMod.World for (int l = 0; l < 1000; l++) { int num4 = num + WorldGen.genRand.Next(-12, 13); - int num5 = num3 + WorldGen.genRand.Next(3, 21); - if (Main.tile[num4, num5].HasTile || Main.tile[num4, num5 + 1].HasTile || !Main.tileDungeon[Main.tile[num4 - 1, num5].TileType] || !Main.tileDungeon[Main.tile[num4 + 1, num5].TileType] || !Collision.CanHit(new Point(num4 * 16, num5 * 16), 16, 16, new Point(num * 16, num3 * 16 + 1), 16, 16)) + int num5 = wallType + WorldGen.genRand.Next(3, 21); + if (Main.tile[num4, num5].HasTile || Main.tile[num4, num5 + 1].HasTile || !Main.tileDungeon[Main.tile[num4 - 1, num5].TileType] || !Main.tileDungeon[Main.tile[num4 + 1, num5].TileType] || !Collision.CanHit(new Point(num4 * 16, num5 * 16), 16, 16, new Point(num * 16, wallType * 16 + 1), 16, 16)) continue; if (((WorldGen.SolidTile(num4 - 1, num5) && Main.tile[num4 - 1, num5].TileType != 10) || (WorldGen.SolidTile(num4 + 1, num5) && Main.tile[num4 + 1, num5].TileType != 10) || WorldGen.SolidTile(num4, num5 + 1)) && Main.wallDungeon[Main.tile[num4, num5].WallType] && (Main.tileDungeon[Main.tile[num4 - 1, num5].TileType] || Main.tileDungeon[Main.tile[num4 + 1, num5].TileType])) @@ -1279,7 +1279,7 @@ namespace CalamityMod.World if (!Main.tile[num4, num5].HasTile) continue; - while (num4 != num || num5 != num3) + while (num4 != num || num5 != wallType) { Main.tile[num4, num5].Get().RedWire = true; if (num4 > num) @@ -1289,10 +1289,10 @@ namespace CalamityMod.World num4++; Main.tile[num4, num5].Get().RedWire = true; - if (num5 > num3) + if (num5 > wallType) num5--; - if (num5 < num3) + if (num5 < wallType) num5++; Main.tile[num4, num5].Get().RedWire = true; @@ -1300,8 +1300,8 @@ namespace CalamityMod.World if (WorldGen.genRand.Next(3) > 0) { - Main.tile[num, num3].TileFrameX = 18; - Main.tile[num, num3 + 1].TileFrameX = 18; + Main.tile[num, wallType].TileFrameX = 18; + Main.tile[num, wallType + 1].TileFrameX = 18; } break; @@ -1313,14 +1313,14 @@ namespace CalamityMod.World break; int style2 = array[0]; - if (Main.tile[num, num3].WallType == roomWall[1]) + if (Main.tile[num, wallType].WallType == roomWall[1]) style2 = array[1]; - if (Main.tile[num, num3].WallType == roomWall[2]) + if (Main.tile[num, wallType].WallType == roomWall[2]) style2 = array[2]; - WorldGen.Place1x2Top(num, num3, 42, style2); - if (Main.tile[num, num3].TileType != 42) + WorldGen.Place1x2Top(num, wallType, 42, style2); + if (Main.tile[num, wallType].TileType != 42) break; flag2 = true; @@ -1329,8 +1329,8 @@ namespace CalamityMod.World for (int m = 0; m < 1000; m++) { int num6 = num + WorldGen.genRand.Next(-12, 13); - int num7 = num3 + WorldGen.genRand.Next(3, 21); - if (Main.tile[num6, num7].HasTile || Main.tile[num6, num7 + 1].HasTile || Main.tile[num6 - 1, num7].TileType == 48 || Main.tile[num6 + 1, num7].TileType == 48 || !Collision.CanHit(new Point(num6 * 16, num7 * 16), 16, 16, new Point(num * 16, num3 * 16 + 1), 16, 16)) + int num7 = wallType + WorldGen.genRand.Next(3, 21); + if (Main.tile[num6, num7].HasTile || Main.tile[num6, num7 + 1].HasTile || Main.tile[num6 - 1, num7].TileType == 48 || Main.tile[num6 + 1, num7].TileType == 48 || !Collision.CanHit(new Point(num6 * 16, num7 * 16), 16, 16, new Point(num * 16, wallType * 16 + 1), 16, 16)) continue; if ((WorldGen.SolidTile(num6 - 1, num7) && Main.tile[num6 - 1, num7].TileType != 10) || (WorldGen.SolidTile(num6 + 1, num7) && Main.tile[num6 + 1, num7].TileType != 10) || WorldGen.SolidTile(num6, num7 + 1)) @@ -1339,7 +1339,7 @@ namespace CalamityMod.World if (!Main.tile[num6, num7].HasTile) continue; - while (num6 != num || num7 != num3) + while (num6 != num || num7 != wallType) { Main.tile[num6, num7].Get().RedWire = true; if (num6 > num) @@ -1349,10 +1349,10 @@ namespace CalamityMod.World num6++; Main.tile[num6, num7].Get().RedWire = true; - if (num7 > num3) + if (num7 > wallType) num7--; - if (num7 < num3) + if (num7 < wallType) num7++; Main.tile[num6, num7].Get().RedWire = true; @@ -1360,8 +1360,8 @@ namespace CalamityMod.World if (WorldGen.genRand.Next(3) > 0) { - Main.tile[num, num3].TileFrameX = 18; - Main.tile[num, num3 + 1].TileFrameX = 18; + Main.tile[num, wallType].TileFrameX = 18; + Main.tile[num, wallType + 1].TileFrameX = 18; } break; @@ -1386,26 +1386,26 @@ namespace CalamityMod.World for (int i = 0; (double)i < count; i++) { int num = WorldGen.genRand.Next(GenVars.dMinX, GenVars.dMaxX); - int num2 = WorldGen.genRand.Next(GenVars.dMinY, GenVars.dMaxY); - while (!Main.wallDungeon[Main.tile[num, num2].WallType] || Main.tile[num, num2].HasTile) + int brickType = WorldGen.genRand.Next(GenVars.dMinY, GenVars.dMaxY); + while (!Main.wallDungeon[Main.tile[num, brickType].WallType] || Main.tile[num, brickType].HasTile) { num = WorldGen.genRand.Next(GenVars.dMinX, GenVars.dMaxX); - num2 = WorldGen.genRand.Next(GenVars.dMinY, GenVars.dMaxY); + brickType = WorldGen.genRand.Next(GenVars.dMinY, GenVars.dMaxY); } - while (!WorldGen.SolidTile(num, num2) && num2 > 10) + while (!WorldGen.SolidTile(num, brickType) && brickType > 10) { - num2--; + brickType--; } - num2++; - if (!Main.wallDungeon[Main.tile[num, num2].WallType] || Main.tile[num, num2 - 1].TileType == 48 || Main.tile[num, num2].HasTile || Main.tile[num, num2 + 1].HasTile || Main.tile[num, num2 + 2].HasTile || Main.tile[num, num2 + 3].HasTile) + brickType++; + if (!Main.wallDungeon[Main.tile[num, brickType].WallType] || Main.tile[num, brickType - 1].TileType == 48 || Main.tile[num, brickType].HasTile || Main.tile[num, brickType + 1].HasTile || Main.tile[num, brickType + 2].HasTile || Main.tile[num, brickType + 3].HasTile) continue; bool flag = true; for (int j = num - 1; j <= num + 1; j++) { - for (int k = num2; k <= num2 + 3; k++) + for (int k = brickType; k <= brickType + 3; k++) { if (Main.tile[j, k].HasTile && (Main.tile[j, k].TileType == 10 || Main.tile[j, k].TileType == 11 || Main.tile[j, k].TileType == 91)) flag = false; @@ -1414,15 +1414,15 @@ namespace CalamityMod.World if (flag) { - int num3 = 10; - if (Main.tile[num, num2].WallType == roomWall[1]) - num3 = 12; + int wallType = 10; + if (Main.tile[num, brickType].WallType == roomWall[1]) + wallType = 12; - if (Main.tile[num, num2].WallType == roomWall[2]) - num3 = 14; + if (Main.tile[num, brickType].WallType == roomWall[2]) + wallType = 14; - num3 += WorldGen.genRand.Next(2); - WorldGen.PlaceTile(num, num2, 91, mute: true, forced: false, -1, num3); + wallType += WorldGen.genRand.Next(2); + WorldGen.PlaceTile(num, brickType, 91, mute: true, forced: false, -1, wallType); } } @@ -1435,37 +1435,37 @@ namespace CalamityMod.World for (int i = 0; (double)i < count; i++) { int num = WorldGen.genRand.Next(GenVars.dMinX, GenVars.dMaxX); - int num2 = WorldGen.genRand.Next((int)Main.worldSurface, GenVars.dMaxY); - while (!Main.wallDungeon[Main.tile[num, num2].WallType] || Main.tile[num, num2].HasTile) + int brickType = WorldGen.genRand.Next((int)Main.worldSurface, GenVars.dMaxY); + while (!Main.wallDungeon[Main.tile[num, brickType].WallType] || Main.tile[num, brickType].HasTile) { num = WorldGen.genRand.Next(GenVars.dMinX, GenVars.dMaxX); - num2 = WorldGen.genRand.Next((int)Main.worldSurface, GenVars.dMaxY); + brickType = WorldGen.genRand.Next((int)Main.worldSurface, GenVars.dMaxY); } - int num3 = num; + int wallType = num; int num4 = num; - int num5 = num2; - int num6 = num2; + int num5 = brickType; + int num6 = brickType; int num7 = 0; int num8 = 0; for (int j = 0; j < 2; j++) { - num3 = num; + wallType = num; num4 = num; - while (!Main.tile[num3, num2].HasTile && Main.wallDungeon[Main.tile[num3, num2].WallType]) + while (!Main.tile[wallType, brickType].HasTile && Main.wallDungeon[Main.tile[wallType, brickType].WallType]) { - num3--; + wallType--; } - num3++; - for (; !Main.tile[num4, num2].HasTile && Main.wallDungeon[Main.tile[num4, num2].WallType]; num4++) + wallType++; + for (; !Main.tile[num4, brickType].HasTile && Main.wallDungeon[Main.tile[num4, brickType].WallType]; num4++) { } num4--; - num = (num3 + num4) / 2; - num5 = num2; - num6 = num2; + num = (wallType + num4) / 2; + num5 = brickType; + num6 = brickType; while (!Main.tile[num, num5].HasTile && Main.wallDungeon[Main.tile[num, num5].WallType]) { num5--; @@ -1477,24 +1477,24 @@ namespace CalamityMod.World } num6--; - num2 = (num5 + num6) / 2; + brickType = (num5 + num6) / 2; } - num3 = num; + wallType = num; num4 = num; - while (!Main.tile[num3, num2].HasTile && !Main.tile[num3, num2 - 1].HasTile && !Main.tile[num3, num2 + 1].HasTile) + while (!Main.tile[wallType, brickType].HasTile && !Main.tile[wallType, brickType - 1].HasTile && !Main.tile[wallType, brickType + 1].HasTile) { - num3--; + wallType--; } - num3++; - for (; !Main.tile[num4, num2].HasTile && !Main.tile[num4, num2 - 1].HasTile && !Main.tile[num4, num2 + 1].HasTile; num4++) + wallType++; + for (; !Main.tile[num4, brickType].HasTile && !Main.tile[num4, brickType - 1].HasTile && !Main.tile[num4, brickType + 1].HasTile; num4++) { } num4--; - num5 = num2; - num6 = num2; + num5 = brickType; + num6 = brickType; while (!Main.tile[num, num5].HasTile && !Main.tile[num - 1, num5].HasTile && !Main.tile[num + 1, num5].HasTile) { num5--; @@ -1506,9 +1506,9 @@ namespace CalamityMod.World } num6--; - num = (num3 + num4) / 2; - num2 = (num5 + num6) / 2; - num7 = num4 - num3; + num = (wallType + num4) / 2; + brickType = (num5 + num6) / 2; + num7 = num4 - wallType; num8 = num6 - num5; if (num7 <= 7 || num8 <= 5) continue; @@ -1527,7 +1527,7 @@ namespace CalamityMod.World array[2] = true; int num9 = WorldGen.genRand.Next(3); - if (Main.tile[num, num2].WallType == roomWall[0]) + if (Main.tile[num, brickType].WallType == roomWall[0]) num9 = 0; while (!array[num9]) @@ -1535,7 +1535,7 @@ namespace CalamityMod.World num9 = WorldGen.genRand.Next(3); } - if (WorldGen.nearPicture2(num, num2)) + if (WorldGen.nearPicture2(num, brickType)) num9 = -1; switch (num9) @@ -1543,26 +1543,26 @@ namespace CalamityMod.World case 0: { PaintingEntry paintingEntry2 = WorldGen.RandPictureTile(); - if (Main.tile[num, num2].WallType != roomWall[0]) + if (Main.tile[num, brickType].WallType != roomWall[0]) paintingEntry2 = WorldGen.RandBonePicture(); - if (!WorldGen.nearPicture(num, num2)) - WorldGen.PlaceTile(num, num2, paintingEntry2.tileType, mute: true, forced: false, -1, paintingEntry2.style); + if (!WorldGen.nearPicture(num, brickType)) + WorldGen.PlaceTile(num, brickType, paintingEntry2.tileType, mute: true, forced: false, -1, paintingEntry2.style); break; } case 1: { PaintingEntry paintingEntry3 = WorldGen.RandPictureTile(); - if (Main.tile[num, num2].WallType != roomWall[0]) + if (Main.tile[num, brickType].WallType != roomWall[0]) paintingEntry3 = WorldGen.RandBonePicture(); - if (!Main.tile[num, num2].HasTile) - WorldGen.PlaceTile(num, num2, paintingEntry3.tileType, mute: true, forced: false, -1, paintingEntry3.style); + if (!Main.tile[num, brickType].HasTile) + WorldGen.PlaceTile(num, brickType, paintingEntry3.tileType, mute: true, forced: false, -1, paintingEntry3.style); int num13 = num; - int num14 = num2; - int num15 = num2; + int num14 = brickType; + int num15 = brickType; for (int m = 0; m < 2; m++) { num += 7; @@ -1590,7 +1590,7 @@ namespace CalamityMod.World WorldGen.PlaceTile(num, num15, paintingEntry3.tileType, mute: true, forced: false, -1, paintingEntry3.style); } - num15 = num2; + num15 = brickType; num = num13; for (int n = 0; n < 2; n++) { @@ -1624,69 +1624,69 @@ namespace CalamityMod.World case 2: { PaintingEntry paintingEntry = WorldGen.RandPictureTile(); - if (Main.tile[num, num2].WallType != roomWall[0]) + if (Main.tile[num, brickType].WallType != roomWall[0]) paintingEntry = WorldGen.RandBonePicture(); - if (!Main.tile[num, num2].HasTile) - WorldGen.PlaceTile(num, num2, paintingEntry.tileType, mute: true, forced: false, -1, paintingEntry.style); + if (!Main.tile[num, brickType].HasTile) + WorldGen.PlaceTile(num, brickType, paintingEntry.tileType, mute: true, forced: false, -1, paintingEntry.style); - int num10 = num2; + int num10 = brickType; int num11 = num; int num12 = num; for (int k = 0; k < 3; k++) { - num2 += 7; - num3 = num12; + brickType += 7; + wallType = num12; num4 = num12; - while (!Main.tile[num3, num2].HasTile && !Main.tile[num3, num2 - 1].HasTile && !Main.tile[num3, num2 + 1].HasTile) + while (!Main.tile[wallType, brickType].HasTile && !Main.tile[wallType, brickType - 1].HasTile && !Main.tile[wallType, brickType + 1].HasTile) { - num3--; + wallType--; } - num3++; - for (; !Main.tile[num4, num2].HasTile && !Main.tile[num4, num2 - 1].HasTile && !Main.tile[num4, num2 + 1].HasTile; num4++) + wallType++; + for (; !Main.tile[num4, brickType].HasTile && !Main.tile[num4, brickType - 1].HasTile && !Main.tile[num4, brickType + 1].HasTile; num4++) { } num4--; - num12 = (num3 + num4) / 2; + num12 = (wallType + num4) / 2; paintingEntry = WorldGen.RandPictureTile(); - if (Main.tile[num12, num2].WallType != roomWall[0]) + if (Main.tile[num12, brickType].WallType != roomWall[0]) paintingEntry = WorldGen.RandBonePicture(); - if (Math.Abs(num11 - num12) >= 4 || WorldGen.nearPicture(num12, num2)) + if (Math.Abs(num11 - num12) >= 4 || WorldGen.nearPicture(num12, brickType)) break; - WorldGen.PlaceTile(num12, num2, paintingEntry.tileType, mute: true, forced: false, -1, paintingEntry.style); + WorldGen.PlaceTile(num12, brickType, paintingEntry.tileType, mute: true, forced: false, -1, paintingEntry.style); } num12 = num; - num2 = num10; + brickType = num10; for (int l = 0; l < 3; l++) { - num2 -= 7; - num3 = num12; + brickType -= 7; + wallType = num12; num4 = num12; - while (!Main.tile[num3, num2].HasTile && !Main.tile[num3, num2 - 1].HasTile && !Main.tile[num3, num2 + 1].HasTile) + while (!Main.tile[wallType, brickType].HasTile && !Main.tile[wallType, brickType - 1].HasTile && !Main.tile[wallType, brickType + 1].HasTile) { - num3--; + wallType--; } - num3++; - for (; !Main.tile[num4, num2].HasTile && !Main.tile[num4, num2 - 1].HasTile && !Main.tile[num4, num2 + 1].HasTile; num4++) + wallType++; + for (; !Main.tile[num4, brickType].HasTile && !Main.tile[num4, brickType - 1].HasTile && !Main.tile[num4, brickType + 1].HasTile; num4++) { } num4--; - num12 = (num3 + num4) / 2; + num12 = (wallType + num4) / 2; paintingEntry = WorldGen.RandPictureTile(); - if (Main.tile[num12, num2].WallType != roomWall[0]) + if (Main.tile[num12, brickType].WallType != roomWall[0]) paintingEntry = WorldGen.RandBonePicture(); - if (Math.Abs(num11 - num12) >= 4 || WorldGen.nearPicture(num12, num2)) + if (Math.Abs(num11 - num12) >= 4 || WorldGen.nearPicture(num12, brickType)) break; - WorldGen.PlaceTile(num12, num2, paintingEntry.tileType, mute: true, forced: false, -1, paintingEntry.style); + WorldGen.PlaceTile(num12, brickType, paintingEntry.tileType, mute: true, forced: false, -1, paintingEntry.style); } break; @@ -1700,11 +1700,11 @@ namespace CalamityMod.World public static double MakeDungeon_GroundFurniture(int wallType) { double num = (double)(2000 * Main.maxTilesX) / 4200.0; - int num2 = 1 + (int)((double)Main.maxTilesX / 4200.0); - int num3 = 1 + (int)((double)Main.maxTilesX / 4200.0); + int brickType = 1 + (int)((double)Main.maxTilesX / 4200.0); + int wallType = 1 + (int)((double)Main.maxTilesX / 4200.0); for (int i = 0; (double)i < num; i++) { - if (num2 > 0 || num3 > 0) + if (brickType > 0 || wallType > 0) i--; int num4 = WorldGen.genRand.Next(GenVars.dMinX, GenVars.dMaxX); @@ -1913,19 +1913,19 @@ namespace CalamityMod.World if ((double)num6 < (double)num19 * 1.75) num18 = -1; - if (num2 > 0 || num3 > 0) + if (brickType > 0 || wallType > 0) { - if (num2 > 0) + if (brickType > 0) { WorldGen.PlaceTile(num7, j, 355, mute: true); if (Main.tile[num7, j].TileType == 355) - num2--; + brickType--; } - else if (num3 > 0) + else if (wallType > 0) { WorldGen.PlaceTile(num7, j, 354, mute: true); if (Main.tile[num7, j].TileType == 354) - num3--; + wallType--; } continue; @@ -2075,10 +2075,10 @@ namespace CalamityMod.World { Vector2D zero = Vector2D.Zero; double num = WorldGen.genRand.Next(4, 6); - double num2 = num; + double brickType = num; Vector2D zero2 = Vector2D.Zero; Vector2D zero3 = Vector2D.Zero; - int num3 = 1; + int wallType = 1; Vector2D vector2D = default(Vector2D); vector2D.X = i; @@ -2186,7 +2186,7 @@ namespace CalamityMod.World if (!flag8 && !flag9 && !flag6 && !flag7) { - num3 = (WorldGen.genRand.NextBool() ? 1 : (-1)); + wallType = (WorldGen.genRand.NextBool() ? 1 : (-1)); if (WorldGen.genRand.NextBool()) flag5 = true; } @@ -2201,21 +2201,21 @@ namespace CalamityMod.World switch (num8) { case 0: - num3 = -1; + wallType = -1; break; case 1: - num3 = 1; + wallType = 1; break; default: flag5 = true; - num3 = ((num8 != 2) ? 1 : (-1)); + wallType = ((num8 != 2) ? 1 : (-1)); break; } } } else { - num3 = (WorldGen.genRand.NextBool() ? 1 : (-1)); + wallType = (WorldGen.genRand.NextBool() ? 1 : (-1)); if (WorldGen.genRand.NextBool()) flag5 = true; } @@ -2227,11 +2227,11 @@ namespace CalamityMod.World if (flag5) { zero2.Y = 0.0; - zero2.X = num3; + zero2.X = wallType; zero3.Y = 0.0; - zero3.X = -num3; + zero3.X = -wallType; zero.Y = 0.0; - zero.X = num3; + zero.X = wallType; if (WorldGen.genRand.Next(3) == 0) { if (WorldGen.genRand.NextBool()) @@ -2243,12 +2243,12 @@ namespace CalamityMod.World else { num += 1.0; - zero.Y = num3; + zero.Y = wallType; zero.X = 0.0; zero2.X = 0.0; - zero2.Y = num3; + zero2.Y = wallType; zero3.X = 0.0; - zero3.Y = -num3; + zero3.Y = -wallType; if (WorldGen.genRand.Next(3) != 0) { flag3 = true; @@ -2287,11 +2287,11 @@ namespace CalamityMod.World { if (vector2D.X > (double)(LastMaxTilesX - 200)) { - num3 = -1; + wallType = -1; zero2.Y = 0.0; - zero2.X = num3; + zero2.X = wallType; zero.Y = 0.0; - zero.X = num3; + zero.X = wallType; if (WorldGen.genRand.Next(3) == 0) { if (WorldGen.genRand.NextBool()) @@ -2302,11 +2302,11 @@ namespace CalamityMod.World } else if (vector2D.X < 200.0) { - num3 = 1; + wallType = 1; zero2.Y = 0.0; - zero2.X = num3; + zero2.X = wallType; zero.Y = 0.0; - zero.X = num3; + zero.X = wallType; if (WorldGen.genRand.Next(3) == 0) { if (WorldGen.genRand.NextBool()) @@ -2317,12 +2317,12 @@ namespace CalamityMod.World } else if (vector2D.Y > (double)(LastMaxTilesY - 300)) { - num3 = -1; + wallType = -1; num += 1.0; - zero.Y = num3; + zero.Y = wallType; zero.X = 0.0; zero2.X = 0.0; - zero2.Y = num3; + zero2.Y = wallType; if (WorldGen.genRand.NextBool()) { if (WorldGen.genRand.NextBool()) @@ -2333,12 +2333,12 @@ namespace CalamityMod.World } else if (flag11) { - num3 = 1; + wallType = 1; num += 1.0; - zero.Y = num3; + zero.Y = wallType; zero.X = 0.0; zero2.X = 0.0; - zero2.Y = num3; + zero2.Y = wallType; if (WorldGen.genRand.Next(3) != 0) { flag3 = true; @@ -2357,11 +2357,11 @@ namespace CalamityMod.World } else if (vector2D.X < (double)(Main.maxTilesX / 2) && vector2D.X > (double)Main.maxTilesX * 0.25) { - num3 = -1; + wallType = -1; zero2.Y = 0.0; - zero2.X = num3; + zero2.X = wallType; zero.Y = 0.0; - zero.X = num3; + zero.X = wallType; if (WorldGen.genRand.Next(3) == 0) { if (WorldGen.genRand.NextBool()) @@ -2372,11 +2372,11 @@ namespace CalamityMod.World } else if (vector2D.X > (double)(Main.maxTilesX / 2) && vector2D.X < (double)Main.maxTilesX * 0.75) { - num3 = 1; + wallType = 1; zero2.Y = 0.0; - zero2.X = num3; + zero2.X = wallType; zero.Y = 0.0; - zero.X = num3; + zero.X = wallType; if (WorldGen.genRand.Next(3) == 0) { if (WorldGen.genRand.NextBool()) @@ -2403,7 +2403,7 @@ namespace CalamityMod.World GenVars.lastDungeonHall = zero2; if (Math.Abs(zero.X) > Math.Abs(zero.Y) && WorldGen.genRand.Next(3) != 0) - num = (int)(num2 * ((double)WorldGen.genRand.Next(110, 150) * 0.01)); + num = (int)(brickType * ((double)WorldGen.genRand.Next(110, 150) * 0.01)); while (num4 > 0) { diff --git a/World/GiantHive.cs b/World/GiantHive.cs index 5584bbf17a..0eb32b045d 100644 --- a/World/GiantHive.cs +++ b/World/GiantHive.cs @@ -161,7 +161,7 @@ namespace CalamityMod.World if (ref2.Value / (float)ref1.Value < 0.75f || ref3.Value < 2) return false; - int num = 0; + int arrayInc = 0; int[] array = new int[1000]; int[] array2 = new int[1000]; Vector2 larvaLocation = origin.ToVector2(); @@ -169,32 +169,32 @@ namespace CalamityMod.World for (int i = 0; i < numHiveTunnels; i++) { - Vector2 vector2 = larvaLocation; - int num3 = WorldGen.genRand.Next(2, 5); - for (int j = 0; j < num3; j++) - vector2 = CreateHiveTunnel((int)larvaLocation.X, (int)larvaLocation.Y, WorldGen.genRand); + Vector2 movingLarvaLocation = larvaLocation; + int hiveTunnelTries = WorldGen.genRand.Next(2, 5); + for (int j = 0; j < hiveTunnelTries; j++) + movingLarvaLocation = CreateHiveTunnel((int)larvaLocation.X, (int)larvaLocation.Y, WorldGen.genRand); - larvaLocation = vector2; - array[num] = (int)larvaLocation.X; - array2[num] = (int)larvaLocation.Y; - num++; + larvaLocation = movingLarvaLocation; + array[arrayInc] = (int)larvaLocation.X; + array2[arrayInc] = (int)larvaLocation.Y; + arrayInc++; } FrameOutAllHiveContents(origin, 50); - for (int k = 0; k < num; k++) + for (int k = 0; k < arrayInc; k++) { - int num4 = array[k]; + int x = array[k]; int y = array2[k]; - int num5 = 1; + int treeIndentDirection = 1; if (WorldGen.genRand.NextBool()) - num5 = -1; + treeIndentDirection = -1; bool flag = false; - while (WorldGen.InWorld(num4, y, 10) && BadSpotForHoneyFall(num4, y)) + while (WorldGen.InWorld(x, y, 10) && BadSpotForHoneyFall(x, y)) { - num4 += num5; - if (Math.Abs(num4 - array[k]) > 50) + x += treeIndentDirection; + if (Math.Abs(x - array[k]) > 50) { flag = true; break; @@ -203,11 +203,11 @@ namespace CalamityMod.World if (!flag) { - num4 += num5; - if (!SpotActuallyNotInHive(num4, y)) + x += treeIndentDirection; + if (!SpotActuallyNotInHive(x, y)) { - CreateBlockedHoneyCube(num4, y); - CreateDentForHoneyFall(num4, y, num5); + CreateBlockedHoneyCube(x, y); + CreateDentForHoneyFall(x, y, treeIndentDirection); } } } @@ -221,13 +221,13 @@ namespace CalamityMod.World int maxAttempts = 1000; for (int l = 0; l < maxAttempts; l++) { - Vector2 vector3 = larvaLocation; - vector3.X += WorldGen.genRand.Next(-50, 51); - vector3.Y += WorldGen.genRand.Next(-50, 51); - if (WorldGen.InWorld((int)vector3.X, (int)vector3.Y) && Vector2.Distance(larvaLocation, vector3) > 10f && !Main.tile[(int)vector3.X, (int)vector3.Y].HasTile && Main.tile[(int)vector3.X, (int)vector3.Y].WallType == WallID.HiveUnsafe) + Vector2 newStructureLocation = larvaLocation; + newStructureLocation.X += WorldGen.genRand.Next(-50, 51); + newStructureLocation.Y += WorldGen.genRand.Next(-50, 51); + if (WorldGen.InWorld((int)newStructureLocation.X, (int)newStructureLocation.Y) && Vector2.Distance(larvaLocation, newStructureLocation) > 10f && !Main.tile[(int)newStructureLocation.X, (int)newStructureLocation.Y].HasTile && Main.tile[(int)newStructureLocation.X, (int)newStructureLocation.Y].WallType == WallID.HiveUnsafe) { - secondLarvaLocation = vector3; - CreateStandForLarva(vector3); + secondLarvaLocation = newStructureLocation; + CreateStandForLarva(newStructureLocation); break; } } @@ -236,24 +236,24 @@ namespace CalamityMod.World Vector2 honeyChestLocation = default; for (int l = 0; l < maxAttempts; l++) { - Vector2 vector3 = larvaLocation; - vector3.X += WorldGen.genRand.Next(-100, 101); - vector3.Y += WorldGen.genRand.Next(-100, 101); - if (WorldGen.InWorld((int)vector3.X, (int)vector3.Y) && Vector2.Distance(larvaLocation, vector3) > 10f && Vector2.Distance(secondLarvaLocation, vector3) > 10f && !Main.tile[(int)vector3.X, (int)vector3.Y].HasTile && Main.tile[(int)vector3.X, (int)vector3.Y].WallType == WallID.HiveUnsafe) + Vector2 newStructureLocation = larvaLocation; + newStructureLocation.X += WorldGen.genRand.Next(-100, 101); + newStructureLocation.Y += WorldGen.genRand.Next(-100, 101); + if (WorldGen.InWorld((int)newStructureLocation.X, (int)newStructureLocation.Y) && Vector2.Distance(larvaLocation, newStructureLocation) > 10f && Vector2.Distance(secondLarvaLocation, newStructureLocation) > 10f && !Main.tile[(int)newStructureLocation.X, (int)newStructureLocation.Y].HasTile && Main.tile[(int)newStructureLocation.X, (int)newStructureLocation.Y].WallType == WallID.HiveUnsafe) { - honeyChestLocation = vector3; - CreateStandAndPlaceHoneyChest(vector3); + honeyChestLocation = newStructureLocation; + CreateStandAndPlaceHoneyChest(newStructureLocation); break; } } for (int l = 0; l < maxAttempts; l++) { - Vector2 vector3 = larvaLocation; - vector3.X += WorldGen.genRand.Next(-100, 101); - vector3.Y += WorldGen.genRand.Next(-100, 101); - if (WorldGen.InWorld((int)vector3.X, (int)vector3.Y) && Vector2.Distance(larvaLocation, vector3) > 10f && Vector2.Distance(secondLarvaLocation, vector3) > 10f && Vector2.Distance(honeyChestLocation, vector3) > 10f && !Main.tile[(int)vector3.X, (int)vector3.Y].HasTile && Main.tile[(int)vector3.X, (int)vector3.Y].WallType == WallID.HiveUnsafe) + Vector2 newStructureLocation = larvaLocation; + newStructureLocation.X += WorldGen.genRand.Next(-100, 101); + newStructureLocation.Y += WorldGen.genRand.Next(-100, 101); + if (WorldGen.InWorld((int)newStructureLocation.X, (int)newStructureLocation.Y) && Vector2.Distance(larvaLocation, newStructureLocation) > 10f && Vector2.Distance(secondLarvaLocation, newStructureLocation) > 10f && Vector2.Distance(honeyChestLocation, newStructureLocation) > 10f && !Main.tile[(int)newStructureLocation.X, (int)newStructureLocation.Y].HasTile && Main.tile[(int)newStructureLocation.X, (int)newStructureLocation.Y].WallType == WallID.HiveUnsafe) { - CreateStandAndPlaceHoneyChest(vector3); + CreateStandAndPlaceHoneyChest(newStructureLocation); break; } } @@ -264,13 +264,13 @@ namespace CalamityMod.World private static void FrameOutAllHiveContents(Point origin, int squareHalfWidth) { - int num = Math.Max(10, origin.X - squareHalfWidth); - int num2 = Math.Min(Main.maxTilesX - 10, origin.X + squareHalfWidth); - int num3 = Math.Max(10, origin.Y - squareHalfWidth); - int num4 = Math.Min(Main.maxTilesY - 10, origin.Y + squareHalfWidth); - for (int i = num; i < num2; i++) + int maxXsize = Math.Max(10, origin.X - squareHalfWidth); + int minXsize = Math.Min(Main.maxTilesX - 10, origin.X + squareHalfWidth); + int maxYSize = Math.Max(10, origin.Y - squareHalfWidth); + int minYSize = Math.Min(Main.maxTilesY - 10, origin.Y + squareHalfWidth); + for (int i = maxXsize; i < minXsize; i++) { - for (int j = num3; j < num4; j++) + for (int j = maxYSize; j < minYSize; j++) { Tile tile = Main.tile[i, j]; if (tile.HasTile && tile.TileType == TileID.Hive) @@ -284,73 +284,73 @@ namespace CalamityMod.World private static Vector2 CreateHiveTunnel(int i, int j, UnifiedRandom random) { - double num = random.Next(20, 26); - float num2 = random.Next(30, 41); - float num3 = Main.maxTilesX / 4200; - num3 = (num3 + 1f) / 2f; - num *= (double)num3; - num2 *= num3; + double randOffset = random.Next(20, 26); + float tunnelPlacementAttempts = random.Next(30, 41); + float miniMaxXTiles = Main.maxTilesX / 4200; + miniMaxXTiles = (miniMaxXTiles + 1f) / 2f; + randOffset *= (double)miniMaxXTiles; + tunnelPlacementAttempts *= miniMaxXTiles; - double num4 = num; + double randOffsetCopy = randOffset; Vector2 result = default; result.X = i; result.Y = j; - Vector2 vector = default; - vector.X = random.Next(-10, 11) * 0.2f; - vector.Y = random.Next(-10, 11) * 0.2f; - while (num > 0.0 && num2 > 0f) + Vector2 defaultTunnelPos = default; + defaultTunnelPos.X = random.Next(-10, 11) * 0.2f; + defaultTunnelPos.Y = random.Next(-10, 11) * 0.2f; + while (randOffset > 0.0 && tunnelPlacementAttempts > 0f) { if (result.Y > (Main.maxTilesY - 250)) - num2 = 0f; + tunnelPlacementAttempts = 0f; - num = num4 * (double)(1f + random.Next(-20, 20) * 0.01f); - num2 -= 1f; - int num5 = (int)(result.X - num); - int num6 = (int)(result.X + num); - int num7 = (int)(result.Y - num); - int num8 = (int)(result.Y + num); - if (num5 < 1) - num5 = 1; + randOffset = randOffsetCopy * (double)(1f + random.Next(-20, 20) * 0.01f); + tunnelPlacementAttempts -= 1f; + int mainXOffset = (int)(result.X - randOffset); + int maxXOffset = (int)(result.X + randOffset); + int minYOffset = (int)(result.Y - randOffset); + int maxYOffset = (int)(result.Y + randOffset); + if (mainXOffset < 1) + mainXOffset = 1; - if (num6 > Main.maxTilesX - 1) - num6 = Main.maxTilesX - 1; + if (maxXOffset > Main.maxTilesX - 1) + maxXOffset = Main.maxTilesX - 1; - if (num7 < 1) - num7 = 1; + if (minYOffset < 1) + minYOffset = 1; - if (num8 > Main.maxTilesY - 1) - num8 = Main.maxTilesY - 1; + if (maxYOffset > Main.maxTilesY - 1) + maxYOffset = Main.maxTilesY - 1; - for (int k = num5; k < num6; k++) + for (int k = mainXOffset; k < maxXOffset; k++) { - for (int l = num7; l < num8; l++) + for (int l = minYOffset; l < maxYOffset; l++) { if (!WorldGen.InWorld(k, l, 50)) { - num2 = 0f; + tunnelPlacementAttempts = 0f; } else { if (Main.tile[k - 10, l].WallType == WallID.LihzahrdBrickUnsafe) - num2 = 0f; + tunnelPlacementAttempts = 0f; if (Main.tile[k + 10, l].WallType == WallID.LihzahrdBrickUnsafe) - num2 = 0f; + tunnelPlacementAttempts = 0f; if (Main.tile[k, l - 10].WallType == WallID.LihzahrdBrickUnsafe) - num2 = 0f; + tunnelPlacementAttempts = 0f; if (Main.tile[k, l + 10].WallType == WallID.LihzahrdBrickUnsafe) - num2 = 0f; + tunnelPlacementAttempts = 0f; } if (l < Main.worldSurface && Main.tile[k, l - 5].WallType == WallID.None) - num2 = 0f; + tunnelPlacementAttempts = 0f; - float num9 = Math.Abs(k - result.X); - float num10 = Math.Abs(l - result.Y); - double num11 = Math.Sqrt(num9 * num9 + num10 * num10); - if (num11 < num4 * 0.4 * (1.0 + random.Next(-10, 11) * 0.005)) + float tileXDist = Math.Abs(k - result.X); + float tileYDist = Math.Abs(l - result.Y); + double tileDistance = Math.Sqrt(tileXDist * tileXDist + tileYDist * tileYDist); + if (tileDistance < randOffsetCopy * 0.4 * (1.0 + random.Next(-10, 11) * 0.005)) { Main.tile[k, l].LiquidAmount = byte.MaxValue; Main.tile[k, l].Get().LiquidType = LiquidID.Honey; @@ -359,7 +359,7 @@ namespace CalamityMod.World Main.tile[k, l].Get().IsHalfBlock = false; Main.tile[k, l].Get().Slope = SlopeType.Solid; } - else if (num11 < num4 * 0.75 * (1.0 + random.Next(-10, 11) * 0.005)) + else if (tileDistance < randOffsetCopy * 0.75 * (1.0 + random.Next(-10, 11) * 0.005)) { Main.tile[k, l].LiquidAmount = 0; if (Main.tile[k, l].WallType != WallID.HiveUnsafe) @@ -371,7 +371,7 @@ namespace CalamityMod.World } } - if (num11 < num4 * 0.6 * (1.0 + random.Next(-10, 11) * 0.005)) + if (tileDistance < randOffsetCopy * 0.6 * (1.0 + random.Next(-10, 11) * 0.005)) { Main.tile[k, l].WallType = WallID.HiveUnsafe; if (random.NextBool()) @@ -383,10 +383,10 @@ namespace CalamityMod.World } } - result += vector; - num2 -= 1f; - vector.Y += random.Next(-10, 11) * 0.05f; - vector.X += random.Next(-10, 11) * 0.05f; + result += defaultTunnelPos; + tunnelPlacementAttempts -= 1f; + defaultTunnelPos.Y += random.Next(-10, 11) * 0.05f; + defaultTunnelPos.X += random.Next(-10, 11) * 0.05f; } return result; @@ -396,13 +396,13 @@ namespace CalamityMod.World { int x = origin.X; int y = origin.Y; - int num = 150; - for (int i = x - num; i < x + num; i += 10) + int checkRadius = 150; + for (int i = x - checkRadius; i < x + checkRadius; i += 10) { if (i <= 0 || i > Main.maxTilesX - 1) continue; - for (int j = y - num; j < y + num; j += 10) + for (int j = y - checkRadius; j < y + checkRadius; j += 10) { if (j > 0 && j <= Main.maxTilesY - 1) { @@ -422,10 +422,10 @@ namespace CalamityMod.World { dir *= -1; y++; - int num = 0; - while ((num < 4 || WorldGen.SolidTile(x, y)) && x > 10 && x < Main.maxTilesX - 10) + int honeyDentTries = 0; + while ((honeyDentTries < 4 || WorldGen.SolidTile(x, y)) && x > 10 && x < Main.maxTilesX - 10) { - num++; + honeyDentTries++; x += dir; if (WorldGen.SolidTile(x, y)) { @@ -493,13 +493,13 @@ namespace CalamityMod.World if (GenVars.numLarva >= GenVars.larvaX.Length) GenVars.numLarva = GenVars.larvaX.Length - 1; - int num = (int)position.X; - int num2 = (int)position.Y; - for (int i = num - 1; i <= num + 1 && i > 0 && i < Main.maxTilesX; i++) + int larvaX = (int)position.X; + int larvaY = (int)position.Y; + for (int i = larvaX - 1; i <= larvaX + 1 && i > 0 && i < Main.maxTilesX; i++) { - for (int j = num2 - 2; j <= num2 + 1 && j > 0 && j < Main.maxTilesY; j++) + for (int j = larvaY - 2; j <= larvaY + 1 && j > 0 && j < Main.maxTilesY; j++) { - if (j != num2 + 1) + if (j != larvaY + 1) { Main.tile[i, j].Get().HasTile = false; continue; @@ -518,13 +518,13 @@ namespace CalamityMod.World int chestPlacementX = Utils.Clamp((int)position.X, 5, Main.maxTilesX - 5); int chestPlacementY = Utils.Clamp((int)position.Y, 5, Main.maxTilesY - 5); - int num = (int)position.X; - int num2 = (int)position.Y; - for (int i = num; i <= num + 1 && i > 0 && i < Main.maxTilesX; i++) + int chestX = (int)position.X; + int chestY = (int)position.Y; + for (int i = chestX; i <= chestX + 1 && i > 0 && i < Main.maxTilesX; i++) { - for (int j = num2 - 1; j <= num2 + 1 && j > 0 && j < Main.maxTilesY; j++) + for (int j = chestY - 1; j <= chestY + 1 && j > 0 && j < Main.maxTilesY; j++) { - if (j != num2 + 1) + if (j != chestY + 1) { Main.tile[i, j].Get().HasTile = false; continue; @@ -537,27 +537,27 @@ namespace CalamityMod.World } } - int num144 = chestPlacementX; - int num145 = chestPlacementY; - for (int num146 = num144; num146 <= num144 + 1; num146++) + int finalChestX = chestPlacementX; + int finalChestY = chestPlacementY; + for (int i = finalChestX; i <= finalChestX + 1; i++) { - for (int num147 = num145 - 1; num147 <= num145 + 1; num147++) + for (int j = finalChestY - 1; j <= finalChestY + 1; j++) { - if (num147 != num145 + 1) + if (j != finalChestY + 1) { - Main.tile[num146, num147].Get().HasTile = false; + Main.tile[i, j].Get().HasTile = false; } else { - Main.tile[num146, num147].Get().HasTile = true; - Main.tile[num146, num147].TileType = TileID.Hive; - Main.tile[num146, num147].Get().Slope = SlopeType.Solid; - Main.tile[num146, num147].Get().IsHalfBlock = false; + Main.tile[i, j].Get().HasTile = true; + Main.tile[i, j].TileType = TileID.Hive; + Main.tile[i, j].Get().Slope = SlopeType.Solid; + Main.tile[i, j].Get().IsHalfBlock = false; } } } - int chestID = WorldGen.PlaceChest(num144, num145, 21, false, 29); + int chestID = WorldGen.PlaceChest(finalChestX, finalChestY, 21, false, 29); FillHoneyChest(chestID, WorldGen.genRand); } diff --git a/World/MiscWorldgenRoutines.cs b/World/MiscWorldgenRoutines.cs index 3c80021f2b..eba1b6ab7e 100644 --- a/World/MiscWorldgenRoutines.cs +++ b/World/MiscWorldgenRoutines.cs @@ -181,7 +181,7 @@ namespace CalamityMod.World #region Chasm Generator public static void ChasmGenerator(int i, int j, int steps, bool ocean = false) { - float num = steps; //850 small 1450 medium 2050 large + float maxChasmSize = steps; //850 small 1450 medium 2050 large int limitIncrease = Main.remixWorld ? 110 : 0; if (ocean) { @@ -202,20 +202,20 @@ namespace CalamityMod.World } j = tileYLookup; } - Vector2 vector; - vector.X = i; - vector.Y = j; - Vector2 vector2; - vector2.X = WorldGen.genRand.Next(-1, 2) * 0.1f; - vector2.Y = WorldGen.genRand.Next(3, 8) * 0.2f + 0.5f; - int num2 = 5; - double num3 = WorldGen.genRand.Next(5, 7) + 20; //start width - while (num3 > 0.0) + Vector2 chasmGenPosition; + chasmGenPosition.X = i; + chasmGenPosition.Y = j; + Vector2 randChasmGenOffset; + randChasmGenOffset.X = WorldGen.genRand.Next(-1, 2) * 0.1f; + randChasmGenOffset.Y = WorldGen.genRand.Next(3, 8) * 0.2f + 0.5f; + int five = 5; + double chasmWidth = WorldGen.genRand.Next(5, 7) + 20; //start width + while (chasmWidth > 0.0) { - if (num > 0f) + if (maxChasmSize > 0f) { - num3 += WorldGen.genRand.Next(10); - num3 -= WorldGen.genRand.Next(10); + chasmWidth += WorldGen.genRand.Next(10); + chasmWidth -= WorldGen.genRand.Next(10); float smallHoleLimit = 790f; //small if (Main.maxTilesY > 1500) @@ -228,97 +228,97 @@ namespace CalamityMod.World } } - if (ocean && num > smallHoleLimit) + if (ocean && maxChasmSize > smallHoleLimit) { - if (num3 < 7.0) //min width + if (chasmWidth < 7.0) //min width { - num3 = 7.0; //min width + chasmWidth = 7.0; //min width } - if (num3 > 45.0) //max width + if (chasmWidth > 45.0) //max width { - num3 = 45.0; //max width + chasmWidth = 45.0; //max width } } else //dig large hole { - if (num3 < (ocean ? 30.0 : 8.0)) //min width + if (chasmWidth < (ocean ? 30.0 : 8.0)) //min width { - num3 = ocean ? 30.0 : 8.0; //min width + chasmWidth = ocean ? 30.0 : 8.0; //min width } - if (num3 > (ocean ? 70.0 : 20.0)) //max width + if (chasmWidth > (ocean ? 70.0 : 20.0)) //max width { - num3 = ocean ? 70.0 : 20.0; //max width + chasmWidth = ocean ? 70.0 : 20.0; //max width } - if (num == 1f && num3 < (ocean ? 50.0 : 15.0)) + if (maxChasmSize == 1f && chasmWidth < (ocean ? 50.0 : 15.0)) { - num3 = ocean ? 50.0 : 15.0; + chasmWidth = ocean ? 50.0 : 15.0; } } } else { - if ((double)vector.Y > (Abyss.AbyssChasmBottom + limitIncrease)) + if ((double)chasmGenPosition.Y > (Abyss.AbyssChasmBottom + limitIncrease)) { - num3 -= WorldGen.genRand.Next(5) + 8; + chasmWidth -= WorldGen.genRand.Next(5) + 8; } } if (Main.maxTilesY > 2100) { - if (((double)vector.Y > (Abyss.AbyssChasmBottom + limitIncrease) && num > 0f && ocean) || - (vector.Y >= Main.maxTilesY && num > 0f && !ocean)) + if (((double)chasmGenPosition.Y > (Abyss.AbyssChasmBottom + limitIncrease) && maxChasmSize > 0f && ocean) || + (chasmGenPosition.Y >= Main.maxTilesY && maxChasmSize > 0f && !ocean)) { - num = 0f; + maxChasmSize = 0f; } } else if (Main.maxTilesY > 1500) { - if (((double)vector.Y > (Abyss.AbyssChasmBottom + limitIncrease) && num > 0f && ocean) || - (vector.Y > Main.maxTilesY && num > 0f && !ocean)) + if (((double)chasmGenPosition.Y > (Abyss.AbyssChasmBottom + limitIncrease) && maxChasmSize > 0f && ocean) || + (chasmGenPosition.Y > Main.maxTilesY && maxChasmSize > 0f && !ocean)) { - num = 0f; + maxChasmSize = 0f; } } else { - if (((double)vector.Y > (Abyss.AbyssChasmBottom + limitIncrease) && num > 0f && ocean) || - (vector.Y > Main.maxTilesY && num > 0f && !ocean)) + if (((double)chasmGenPosition.Y > (Abyss.AbyssChasmBottom + limitIncrease) && maxChasmSize > 0f && ocean) || + (chasmGenPosition.Y > Main.maxTilesY && maxChasmSize > 0f && !ocean)) { - num = 0f; + maxChasmSize = 0f; } } - num -= 1f; - int num4; - int num5; - int num6; - int num7; - if (num > num2) + maxChasmSize -= 1f; + int chasmWidthMin; + int chasmWidthMax; + int chasmHeightMin; + int chasmHeightMax; + if (maxChasmSize > five) { - num4 = (int)(vector.X - num3 * 0.5); - num5 = (int)(vector.X + num3 * 0.5); - num6 = (int)(vector.Y - num3 * 0.5); - num7 = (int)(vector.Y + num3 * 0.5); - if (num4 < 0) + chasmWidthMin = (int)(chasmGenPosition.X - chasmWidth * 0.5); + chasmWidthMax = (int)(chasmGenPosition.X + chasmWidth * 0.5); + chasmHeightMin = (int)(chasmGenPosition.Y - chasmWidth * 0.5); + chasmHeightMax = (int)(chasmGenPosition.Y + chasmWidth * 0.5); + if (chasmWidthMin < 0) { - num4 = 0; + chasmWidthMin = 0; } - if (num5 > Main.maxTilesX - 1) + if (chasmWidthMax > Main.maxTilesX - 1) { - num5 = Main.maxTilesX - 1; + chasmWidthMax = Main.maxTilesX - 1; } - if (num6 < 0) + if (chasmHeightMin < 0) { - num6 = 0; + chasmHeightMin = 0; } - if (num7 > Main.maxTilesY) + if (chasmHeightMax > Main.maxTilesY) { - num7 = Main.maxTilesY; + chasmHeightMax = Main.maxTilesY; } - for (int k = num4; k < num5; k++) + for (int k = chasmWidthMin; k < chasmWidthMax; k++) { - for (int l = num6; l < num7; l++) + for (int l = chasmHeightMin; l < chasmHeightMax; l++) { - if ((Math.Abs(k - vector.X) + Math.Abs(l - vector.Y)) < num3 * 0.5 * (1.0 + WorldGen.genRand.Next(-5, 6) * 0.015)) + if ((Math.Abs(k - chasmGenPosition.X) + Math.Abs(l - chasmGenPosition.Y)) < chasmWidth * 0.5 * (1.0 + WorldGen.genRand.Next(-5, 6) * 0.015)) { if (ocean) { @@ -336,51 +336,51 @@ namespace CalamityMod.World } } } - /*if (num <= 2f && vector.Y < (Main.rockLayer + Main.maxTilesY * 0.3)) + /*if (maxChasmSize <= 2f && chasmGenPosition.Y < (Main.rockLayer + Main.maxTilesY * 0.3)) { - num = 2f; + maxChasmSize = 2f; }*/ - vector += vector2; - vector2.X += WorldGen.genRand.Next(-1, 2) * 0.01f; - if (vector2.X > 0.02) + chasmGenPosition += randChasmGenOffset; + randChasmGenOffset.X += WorldGen.genRand.Next(-1, 2) * 0.01f; + if (randChasmGenOffset.X > 0.02) { - vector2.X = 0.02f; + randChasmGenOffset.X = 0.02f; } - if (vector2.X < -0.02) + if (randChasmGenOffset.X < -0.02) { - vector2.X = -0.02f; + randChasmGenOffset.X = -0.02f; } - num4 = (int)(vector.X - num3 * 1.1); - num5 = (int)(vector.X + num3 * 1.1); - num6 = (int)(vector.Y - num3 * 1.1); - num7 = (int)(vector.Y + num3 * 1.1); - if (num4 < 1) + chasmWidthMin = (int)(chasmGenPosition.X - chasmWidth * 1.1); + chasmWidthMax = (int)(chasmGenPosition.X + chasmWidth * 1.1); + chasmHeightMin = (int)(chasmGenPosition.Y - chasmWidth * 1.1); + chasmHeightMax = (int)(chasmGenPosition.Y + chasmWidth * 1.1); + if (chasmWidthMin < 1) { - num4 = 1; + chasmWidthMin = 1; } - if (num5 > Main.maxTilesX - 1) + if (chasmWidthMax > Main.maxTilesX - 1) { - num5 = Main.maxTilesX - 1; + chasmWidthMax = Main.maxTilesX - 1; } - if (num6 < 0) + if (chasmHeightMin < 0) { - num6 = 0; + chasmHeightMin = 0; } - if (num7 > Main.maxTilesY) + if (chasmHeightMax > Main.maxTilesY) { - num7 = Main.maxTilesY; + chasmHeightMax = Main.maxTilesY; } - for (int m = num4; m < num5; m++) + for (int m = chasmWidthMin; m < chasmWidthMax; m++) { - for (int n = num6; n < num7; n++) + for (int n = chasmHeightMin; n < chasmHeightMax; n++) { - if ((Math.Abs(m - vector.X) + Math.Abs(n - vector.Y)) < num3 * 1.1 * (1.0 + WorldGen.genRand.Next(-5, 6) * 0.015)) + if ((Math.Abs(m - chasmGenPosition.X) + Math.Abs(n - chasmGenPosition.Y)) < chasmWidth * 1.1 * (1.0 + WorldGen.genRand.Next(-5, 6) * 0.015)) { if (n > j + WorldGen.genRand.Next(7, 16)) { Main.tile[m, n].Get().HasTile = false; } - if (steps <= num2) + if (steps <= five) { Main.tile[m, n].Get().HasTile = false; } @@ -397,25 +397,25 @@ namespace CalamityMod.World } } } - for (int num11 = num4; num11 < num5; num11++) + for (int r = chasmWidthMin; r < chasmWidthMax; r++) { - for (int num12 = num6; num12 < num7; num12++) + for (int s = chasmHeightMin; s < chasmHeightMax; s++) { - if ((Math.Abs(num11 - vector.X) + Math.Abs(num12 - vector.Y)) < num3 * 1.1 * (1.0 + WorldGen.genRand.Next(-5, 6) * 0.015)) + if ((Math.Abs(r - chasmGenPosition.X) + Math.Abs(s - chasmGenPosition.Y)) < chasmWidth * 1.1 * (1.0 + WorldGen.genRand.Next(-5, 6) * 0.015)) { if (ocean) { - Main.tile[num11, num12].LiquidAmount = 255; - Main.tile[num11, num12].Get().LiquidType = LiquidID.Water; + Main.tile[r, s].LiquidAmount = 255; + Main.tile[r, s].Get().LiquidType = LiquidID.Water; } else { - Main.tile[num11, num12].LiquidAmount = 255; - Main.tile[num11, num12].Get().LiquidType = LiquidID.Lava; + Main.tile[r, s].LiquidAmount = 255; + Main.tile[r, s].Get().LiquidType = LiquidID.Lava; } - if (steps <= num2) + if (steps <= five) { - Main.tile[num11, num12].Get().HasTile = false; + Main.tile[r, s].Get().HasTile = false; } } } diff --git a/World/SunkenSea.cs b/World/SunkenSea.cs index 9c7e747a2e..462f2e3021 100644 --- a/World/SunkenSea.cs +++ b/World/SunkenSea.cs @@ -67,13 +67,13 @@ namespace CalamityMod.World private void AttemptClaim(int x, int y, int[,] clusterIndexMap, List> pointClusters, int index) //Attempts to create a cluster { - int num = clusterIndexMap[x, y]; - if (num != -1 && num != index) + int clusterPos = clusterIndexMap[x, y]; + if (clusterPos != -1 && clusterPos != index) { - int num2 = (WorldGen.genRand.Next(2) == 0) ? -1 : index; - foreach (Point current in pointClusters[num]) + int clusterHeight = (WorldGen.genRand.Next(2) == 0) ? -1 : index; + foreach (Point current in pointClusters[clusterPos]) { - clusterIndexMap[current.X, current.Y] = num2; + clusterIndexMap[current.X, current.Y] = clusterHeight; } } } @@ -84,14 +84,14 @@ namespace CalamityMod.World Height = height; Clear(); bool[,] array = new bool[width, height]; - int num = (width >> 1) - 1; - int num2 = (height >> 1) - 1; - int num3 = (num + 1) * (num + 1); - Point point = new Point(num, num2); - for (int i = point.Y - num2; i <= point.Y + num2; i++) + int clusterPos = (width >> 1) - 1; + int clusterHeight = (height >> 1) - 1; + int clusterSize = (clusterPos + 1) * (clusterPos + 1); + Point point = new Point(clusterPos, clusterHeight); + for (int i = point.Y - clusterHeight; i <= point.Y + clusterHeight; i++) { - float num4 = (float)num / (float)num2 * (float)(i - point.Y); - int num5 = Math.Min(num, (int)Math.Sqrt((float)num3 - num4 * num4)); + float num4 = (float)clusterPos / (float)clusterHeight * (float)(i - point.Y); + int num5 = Math.Min(clusterPos, (int)Math.Sqrt((float)clusterSize - num4 * num4)); for (int j = point.X - num5; j <= point.X + num5; j++) { array[j, i] = WorldGen.genRand.Next(2) == 0; @@ -210,7 +210,7 @@ namespace CalamityMod.World for (int j = -20; j < totalHeight + 20; j++) { float num3 = 0f; - int num4 = -1; + int clusterAmt = -1; float num5 = 0f; int num6 = i + start.X; int num7 = j + start.Y; @@ -233,7 +233,7 @@ namespace CalamityMod.World num5 = num3; } num3 = num9; - num4 = k; + clusterAmt = k; } else if (num9 > num5) { @@ -248,7 +248,7 @@ namespace CalamityMod.World { tile.ClearEverything(); tile.LiquidAmount = 192; - if (num4 % 5 == 2) + if (clusterAmt % 5 == 2) { tile.ResetToType((ushort)ModContent.TileType()); tile.Get().HasTile = true; diff --git a/World/WorldEvilIsland.cs b/World/WorldEvilIsland.cs index ded2e8ddc2..0c7d961f67 100644 --- a/World/WorldEvilIsland.cs +++ b/World/WorldEvilIsland.cs @@ -283,14 +283,14 @@ namespace CalamityMod.World ushort type = (ushort)(genCorruptHouse ? 152 : 347); //tile byte wall = (byte)(genCorruptHouse ? 35 : 174); //wall Vector2 vector = new Vector2((float)i, (float)j); - int num = 1; + int houseDirection = 1; if (WorldGen.genRand.Next(2) == 0) { - num = -1; + houseDirection = -1; } - int num2 = WorldGen.genRand.Next(7, 12); - int num3 = WorldGen.genRand.Next(5, 7); - vector.X = (float)(i + (num2 + 2) * num); + int largerRandValue = WorldGen.genRand.Next(7, 12); + int smallerRandValue = WorldGen.genRand.Next(5, 7); + vector.X = (float)(i + (largerRandValue + 2) * houseDirection); for (int k = j - 15; k < j + 30; k++) { if (Main.tile[(int)vector.X, k].HasTile) @@ -300,31 +300,31 @@ namespace CalamityMod.World } } vector.X = (float)i; - int num4 = (int)(vector.X - (float)num2 - 1f); - int num5 = (int)(vector.X + (float)num2 + 1f); - int num6 = (int)(vector.Y - (float)num3 - 1f); - int num7 = (int)(vector.Y + 2f); - if (num4 < 0) + int minXSize = (int)(vector.X - (float)largerRandValue - 1f); + int maxXSize = (int)(vector.X + (float)largerRandValue + 1f); + int minYSize = (int)(vector.Y - (float)smallerRandValue - 1f); + int maxYSize = (int)(vector.Y + 2f); + if (minXSize < 0) { - num4 = 0; + minXSize = 0; } - if (num5 > Main.maxTilesX) + if (maxXSize > Main.maxTilesX) { - num5 = Main.maxTilesX; + maxXSize = Main.maxTilesX; } - if (num6 < 0) + if (minYSize < 0) { - num6 = 0; + minYSize = 0; } - if (num7 > Main.maxTilesY) + if (maxYSize > Main.maxTilesY) { - num7 = Main.maxTilesY; + maxYSize = Main.maxTilesY; } - for (int l = num4; l <= num5; l++) + for (int l = minXSize; l <= maxXSize; l++) { - for (int m = num6 - 1; m < num7 + 1; m++) + for (int m = minYSize - 1; m < maxYSize + 1; m++) { - if (m != num6 - 1 || (l != num4 && l != num5)) + if (m != minYSize - 1 || (l != minXSize && l != maxXSize)) { Main.tile[l, m].Get().HasTile = true; Main.tile[l, m].LiquidAmount = 0; @@ -335,55 +335,55 @@ namespace CalamityMod.World } } } - num4 = (int)(vector.X - (float)num2); - num5 = (int)(vector.X + (float)num2); - num6 = (int)(vector.Y - (float)num3); - num7 = (int)(vector.Y + 1f); - if (num4 < 0) + minXSize = (int)(vector.X - (float)largerRandValue); + maxXSize = (int)(vector.X + (float)largerRandValue); + minYSize = (int)(vector.Y - (float)smallerRandValue); + maxYSize = (int)(vector.Y + 1f); + if (minXSize < 0) { - num4 = 0; + minXSize = 0; } - if (num5 > Main.maxTilesX) + if (maxXSize > Main.maxTilesX) { - num5 = Main.maxTilesX; + maxXSize = Main.maxTilesX; } - if (num6 < 0) + if (minYSize < 0) { - num6 = 0; + minYSize = 0; } - if (num7 > Main.maxTilesY) + if (maxYSize > Main.maxTilesY) { - num7 = Main.maxTilesY; + maxYSize = Main.maxTilesY; } - for (int n = num4; n <= num5; n++) + for (int n = minXSize; n <= maxXSize; n++) { - for (int num8 = num6; num8 < num7; num8++) + for (int p = minYSize; p < maxYSize; p++) { - if ((num8 != num6 || (n != num4 && n != num5)) && Main.tile[n, num8].WallType == 0) + if ((p != minYSize || (n != minXSize && n != maxXSize)) && Main.tile[n, p].WallType == 0) { - Main.tile[n, num8].Get().HasTile = false; - Main.tile[n, num8].WallType = wall; + Main.tile[n, p].Get().HasTile = false; + Main.tile[n, p].WallType = wall; } } } - int num9 = i + (num2 + 1) * num; - int num10 = (int)vector.Y; - for (int num11 = num9 - 2; num11 <= num9 + 2; num11++) + int xPos = i + (largerRandValue + 1) * houseDirection; + int t = (int)vector.Y; + for (int s = xPos - 2; s <= xPos + 2; s++) { - Main.tile[num11, num10].Get().HasTile = false; - Main.tile[num11, num10 - 1].Get().HasTile = false; - Main.tile[num11, num10 - 2].Get().HasTile = false; + Main.tile[s, t].Get().HasTile = false; + Main.tile[s, t - 1].Get().HasTile = false; + Main.tile[s, t - 2].Get().HasTile = false; } - WorldGen.PlaceTile(num9, num10, 10, true, false, -1, genCorruptHouse ? 1 : 10); //door - num9 = i + (num2 + 1) * -num - num; - for (int num12 = num6; num12 <= num7 + 1; num12++) + WorldGen.PlaceTile(xPos, t, 10, true, false, -1, genCorruptHouse ? 1 : 10); //door + xPos = i + (largerRandValue + 1) * -houseDirection - houseDirection; + for (int yPos = minYSize; yPos <= maxYSize + 1; yPos++) { - Main.tile[num9, num12].Get().HasTile = true; - Main.tile[num9, num12].LiquidAmount = 0; - Main.tile[num9, num12].TileType = type; - Main.tile[num9, num12].WallType = 0; - Main.tile[num9, num12].Get().IsHalfBlock = false; - Main.tile[num9, num12].Get().Slope = SlopeType.Solid; + Main.tile[xPos, yPos].Get().HasTile = true; + Main.tile[xPos, yPos].LiquidAmount = 0; + Main.tile[xPos, yPos].TileType = type; + Main.tile[xPos, yPos].WallType = 0; + Main.tile[xPos, yPos].Get().IsHalfBlock = false; + Main.tile[xPos, yPos].Get().Slope = SlopeType.Solid; } int contain; if (genCorruptHouse) @@ -394,37 +394,37 @@ namespace CalamityMod.World { contain = 1569; //vampire } - WorldGen.AddBuriedChest(i, num10 - 3, contain, false, genCorruptHouse ? 19 : 20); //chest - int num14 = i - num2 / 2 + 1; - int num15 = i + num2 / 2 - 1; - int num16 = 1; - if (num2 > 10) + WorldGen.AddBuriedChest(i, t - 3, contain, false, genCorruptHouse ? 19 : 20); //chest + int wallXMinSize = i - largerRandValue / 2 + 1; + int wallXMaxSize = i + largerRandValue / 2 - 1; + int wallYSize = 1; + if (largerRandValue > 10) { - num16 = 2; + wallYSize = 2; } - int num17 = (num6 + num7) / 2 - 1; - for (int num18 = num14 - num16; num18 <= num14 + num16; num18++) + int wallYRange = (minYSize + maxYSize) / 2 - 1; + for (int wallX = wallXMinSize - wallYSize; wallX <= wallXMinSize + wallYSize; wallX++) { - for (int num19 = num17 - 1; num19 <= num17 + 1; num19++) + for (int wallY = wallYRange - 1; wallY <= wallYRange + 1; wallY++) { - Main.tile[num18, num19].WallType = 21; //glass + Main.tile[wallX, wallY].WallType = 21; //glass } } - for (int num20 = num15 - num16; num20 <= num15 + num16; num20++) + for (int wallX2 = wallXMaxSize - wallYSize; wallX2 <= wallXMaxSize + wallYSize; wallX2++) { - for (int num21 = num17 - 1; num21 <= num17 + 1; num21++) + for (int wallY2 = wallYRange - 1; wallY2 <= wallYRange + 1; wallY2++) { - Main.tile[num20, num21].WallType = 21; //glass + Main.tile[wallX2, wallY2].WallType = 21; //glass } } - int num22 = i + (num2 / 2 + 1) * -num; - WorldGen.PlaceTile(num22, num7 - 1, 14, true, false, -1, genCorruptHouse ? 1 : 8); //table - WorldGen.PlaceTile(num22 - 2, num7 - 1, 15, true, false, 0, genCorruptHouse ? 2 : 11); //chair - Tile tile = Main.tile[num22 - 2, num7 - 1]; + int furnitureXPos = i + (largerRandValue / 2 + 1) * -houseDirection; + WorldGen.PlaceTile(furnitureXPos, maxYSize - 1, 14, true, false, -1, genCorruptHouse ? 1 : 8); //table + WorldGen.PlaceTile(furnitureXPos - 2, maxYSize - 1, 15, true, false, 0, genCorruptHouse ? 2 : 11); //chair + Tile tile = Main.tile[furnitureXPos - 2, maxYSize - 1]; tile.TileFrameX += 18; - Tile tile2 = Main.tile[num22 - 2, num7 - 2]; + Tile tile2 = Main.tile[furnitureXPos - 2, maxYSize - 2]; tile2.TileFrameX += 18; - WorldGen.PlaceTile(num22 + 2, num7 - 1, 15, true, false, 0, genCorruptHouse ? 2 : 11); //chair + WorldGen.PlaceTile(furnitureXPos + 2, maxYSize - 1, 15, true, false, 0, genCorruptHouse ? 2 : 11); //chair } } } From 20cbf8ea0ae37b865775dd0980f7a866dfbdaef0 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 1 Nov 2023 14:52:42 -0400 Subject: [PATCH 42/95] The one singular Gores folder change --- Gores/AstralWaterDroplet.cs | 48 ++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/Gores/AstralWaterDroplet.cs b/Gores/AstralWaterDroplet.cs index 87a5e4f8e9..9eb6588b4d 100644 --- a/Gores/AstralWaterDroplet.cs +++ b/Gores/AstralWaterDroplet.cs @@ -28,52 +28,52 @@ namespace CalamityMod.Gores { gore.alpha = 100; } - int num = 4; + int goreFrameDelay = 4; gore.frameCounter++; if (gore.frame <= 4) { - int num2 = (int)(gore.position.X / 16f); - int num3 = (int)(gore.position.Y / 16f) - 1; - if (WorldGen.InWorld(num2, num3, 0) && !Main.tile[num2, num3].HasTile) + int goreXPos = (int)(gore.position.X / 16f); + int goreYPos = (int)(gore.position.Y / 16f) - 1; + if (WorldGen.InWorld(goreXPos, goreYPos, 0) && !Main.tile[goreXPos, goreYPos].HasTile) { gore.active = false; } if (gore.frame == 0) { - num = 24 + Main.rand.Next(256); + goreFrameDelay = 24 + Main.rand.Next(256); } if (gore.frame == 1) { - num = 24 + Main.rand.Next(256); + goreFrameDelay = 24 + Main.rand.Next(256); } if (gore.frame == 2) { - num = 24 + Main.rand.Next(256); + goreFrameDelay = 24 + Main.rand.Next(256); } if (gore.frame == 3) { - num = 24 + Main.rand.Next(96); + goreFrameDelay = 24 + Main.rand.Next(96); } if (gore.frame == 5) { - num = 16 + Main.rand.Next(64); + goreFrameDelay = 16 + Main.rand.Next(64); } - if ((int)gore.frameCounter >= num) + if ((int)gore.frameCounter >= goreFrameDelay) { gore.frameCounter = 0; gore.frame += 1; if (gore.frame == 5 && Main.netMode != NetmodeID.Server) { - int num4 = Gore.NewGore(new EntitySource_Misc("0"), gore.position, gore.velocity, gore.type, 1f); - Main.gore[num4].frame = 9; - Main.gore[num4].velocity *= 0f; + int astralWater = Gore.NewGore(new EntitySource_Misc("0"), gore.position, gore.velocity, gore.type, 1f); + Main.gore[astralWater].frame = 9; + Main.gore[astralWater].velocity *= 0f; } } } else if (gore.frame <= 6) { - num = 8; - if ((int)gore.frameCounter >= num) + goreFrameDelay = 8; + if ((int)gore.frameCounter >= goreFrameDelay) { gore.frameCounter = 0; gore.frame += 1; @@ -85,7 +85,7 @@ namespace CalamityMod.Gores } else if (gore.frame <= 9) { - num = 6; + goreFrameDelay = 6; gore.velocity.Y += 0.2f; if ((double)gore.velocity.Y < 0.5) { @@ -95,7 +95,7 @@ namespace CalamityMod.Gores { gore.velocity.Y = 12f; } - if ((int)gore.frameCounter >= num) + if ((int)gore.frameCounter >= goreFrameDelay) { gore.frameCounter = 0; gore.frame += 1; @@ -108,7 +108,7 @@ namespace CalamityMod.Gores else { gore.velocity.Y += 0.1f; - if ((int)gore.frameCounter >= num) + if ((int)gore.frameCounter >= goreFrameDelay) { gore.frameCounter = 0; gore.frame += 1; @@ -120,9 +120,9 @@ namespace CalamityMod.Gores } } - Vector2 value3 = gore.velocity; + Vector2 goreVelCheck = gore.velocity; gore.velocity = Collision.TileCollision(gore.position, gore.velocity, 16, 14, false, false, 1); - if (gore.velocity != value3) + if (gore.velocity != goreVelCheck) { if (gore.frame < 10) { @@ -146,12 +146,12 @@ namespace CalamityMod.Gores } ((WaterShaderData)Filters.Scene["WaterDistortion"].GetShader()).QueueRipple(gore.position + new Vector2(8f, 8f), 1f, RippleShape.Square, 0f); } - int num21 = (int)(gore.position.X + 8f) / 16; - int num22 = (int)(gore.position.Y + 14f) / 16; - if (Main.tile[num21, num22] != null && Main.tile[num21, num22].LiquidAmount > 0) + int goreTileX = (int)(gore.position.X + 8f) / 16; + int goreTileY = (int)(gore.position.Y + 14f) / 16; + if (Main.tile[goreTileX, goreTileY] != null && Main.tile[goreTileX, goreTileY].LiquidAmount > 0) { gore.velocity *= 0f; - gore.position.Y = (float)(num22 * 16 - (int)(Main.tile[num21, num22].LiquidAmount / 16)); + gore.position.Y = (float)(goreTileY * 16 - (int)(Main.tile[goreTileX, goreTileY].LiquidAmount / 16)); } } From 1a7523727cf647f2afd83293d514ce85a167c556 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 1 Nov 2023 16:42:13 -0400 Subject: [PATCH 43/95] Utilities --- Utilities/FurnitureSetupUtils.cs | 12 ++++++------ Utilities/GenericAIUtils.cs | 18 +++++++++--------- Utilities/MiscUtils.cs | 30 +++++++++++++++--------------- Utilities/TileUtils.cs | 6 +++--- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Utilities/FurnitureSetupUtils.cs b/Utilities/FurnitureSetupUtils.cs index 73ae83f344..093fbf5073 100644 --- a/Utilities/FurnitureSetupUtils.cs +++ b/Utilities/FurnitureSetupUtils.cs @@ -406,19 +406,19 @@ namespace CalamityMod { player.piggyBankProjTracker.Clear(); player.voidLensChest.Clear(); - int num213 = Chest.FindChest(left, top); - if (num213 != -1) + int dresserChestID = Chest.FindChest(left, top); + if (dresserChestID != -1) { Main.stackSplit = 600; - if (num213 == player.chest) + if (dresserChestID == player.chest) { player.chest = -1; Recipe.FindRecipes(); SoundEngine.PlaySound(SoundID.MenuClose); } - else if (num213 != player.chest && player.chest == -1) + else if (dresserChestID != player.chest && player.chest == -1) { - player.chest = num213; + player.chest = dresserChestID; Main.playerInventory = true; Main.recBigList = false; SoundEngine.PlaySound(SoundID.MenuOpen); @@ -427,7 +427,7 @@ namespace CalamityMod } else { - player.chest = num213; + player.chest = dresserChestID; Main.playerInventory = true; Main.recBigList = false; SoundEngine.PlaySound(SoundID.MenuTick); diff --git a/Utilities/GenericAIUtils.cs b/Utilities/GenericAIUtils.cs index 3743965ad5..fc86528c32 100644 --- a/Utilities/GenericAIUtils.cs +++ b/Utilities/GenericAIUtils.cs @@ -480,11 +480,11 @@ namespace CalamityMod if (npc.type == NPCID.SolarCrawltipedeTail) { Rectangle rect = npc.Hitbox; - int num5 = 8; - rect.X -= num5; - rect.Y -= num5; - rect.Width += num5 * 2; - rect.Height += num5 * 2; + int crawltipedeHitboxMod = 8; + rect.X -= crawltipedeHitboxMod; + rect.Y -= crawltipedeHitboxMod; + rect.Width += crawltipedeHitboxMod * 2; + rect.Height += crawltipedeHitboxMod * 2; stickingToNPC = projectile.Colliding(myRect, rect); } else @@ -526,15 +526,15 @@ namespace CalamityMod } if (projCount >= array2.Length) { - int num30 = 0; + int stuckProjAmt = 0; for (int m = 1; m < array2.Length; m++) { - if (array2[m].Y < array2[num30].Y) + if (array2[m].Y < array2[stuckProjAmt].Y) { - num30 = m; + stuckProjAmt = m; } } - Main.projectile[array2[num30].X].Kill(); + Main.projectile[array2[stuckProjAmt].X].Kill(); } } } diff --git a/Utilities/MiscUtils.cs b/Utilities/MiscUtils.cs index 6a294a5d54..dd81e33cd4 100644 --- a/Utilities/MiscUtils.cs +++ b/Utilities/MiscUtils.cs @@ -197,51 +197,51 @@ namespace CalamityMod public static void StartRain(bool torrentialTear = false, bool maxSeverity = false) { - int num = 86400; - int num2 = num / 24; - Main.rainTime = Main.rand.Next(num2 * 8, num); + int framesInDay = 86400; + int framesInHour = framesInDay / 24; + Main.rainTime = Main.rand.Next(framesInHour * 8, framesInDay); if (Main.rand.NextBool(3)) { - Main.rainTime += Main.rand.Next(0, num2); + Main.rainTime += Main.rand.Next(0, framesInHour); } if (Main.rand.NextBool(4)) { - Main.rainTime += Main.rand.Next(0, num2 * 2); + Main.rainTime += Main.rand.Next(0, framesInHour * 2); } if (Main.rand.NextBool(5)) { - Main.rainTime += Main.rand.Next(0, num2 * 2); + Main.rainTime += Main.rand.Next(0, framesInHour * 2); } if (Main.rand.NextBool(6)) { - Main.rainTime += Main.rand.Next(0, num2 * 3); + Main.rainTime += Main.rand.Next(0, framesInHour * 3); } if (Main.rand.NextBool(7)) { - Main.rainTime += Main.rand.Next(0, num2 * 4); + Main.rainTime += Main.rand.Next(0, framesInHour * 4); } if (Main.rand.NextBool(8)) { - Main.rainTime += Main.rand.Next(0, num2 * 5); + Main.rainTime += Main.rand.Next(0, framesInHour * 5); } - float num3 = 1f; + float randRainExtender = 1f; if (Main.rand.NextBool()) { - num3 += 0.05f; + randRainExtender += 0.05f; } if (Main.rand.NextBool(3)) { - num3 += 0.1f; + randRainExtender += 0.1f; } if (Main.rand.NextBool(4)) { - num3 += 0.15f; + randRainExtender += 0.15f; } if (Main.rand.NextBool(5)) { - num3 += 0.2f; + randRainExtender += 0.2f; } - Main.rainTime = (int)(Main.rainTime * num3); + Main.rainTime = (int)(Main.rainTime * randRainExtender); Main.raining = true; if (torrentialTear) TorrentialTear.AdjustRainSeverity(maxSeverity); diff --git a/Utilities/TileUtils.cs b/Utilities/TileUtils.cs index baf1b2f64b..981e12cdeb 100644 --- a/Utilities/TileUtils.cs +++ b/Utilities/TileUtils.cs @@ -114,13 +114,13 @@ namespace CalamityMod int height = 16; int yOffset = TileObjectData.GetTileData(tile).DrawYOffset; - ulong num190 = Main.TileFrameSeed ^ (ulong)((long)j << 32 | (long)(uint)i); + ulong randShakeEffect = Main.TileFrameSeed ^ (ulong)((long)j << 32 | (long)(uint)i); float drawPositionX = i * 16 - (int)Main.screenPosition.X - (width - 16f) / 2f; float drawPositionY = j * 16 - (int)Main.screenPosition.Y; for (int c = 0; c < 7; c++) { - float shakeX = Utils.RandomInt(ref num190, -10, 11) * 0.15f; - float shakeY = Utils.RandomInt(ref num190, -10, 1) * 0.35f; + float shakeX = Utils.RandomInt(ref randShakeEffect, -10, 11) * 0.15f; + float shakeY = Utils.RandomInt(ref randShakeEffect, -10, 1) * 0.35f; Main.spriteBatch.Draw(flameTexture, new Vector2(drawPositionX + shakeX, drawPositionY + shakeY + yOffset) + zero, new Rectangle(tile.TileFrameX + offsetX, tile.TileFrameY + offsetY, width, height), new Color(100, 100, 100, 0), 0f, default(Vector2), 1f, SpriteEffects.None, 0f); } } From b5a0235e1bc5063d87a5f472407e6ed18f1467ba Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 1 Nov 2023 18:06:08 -0400 Subject: [PATCH 44/95] Abyss, Acid Rain, Astral --- NPCs/Abyss/BabyCannonballJellyfish.cs | 6 +- NPCs/Abyss/Bloatfish.cs | 10 +- NPCs/Abyss/BobbitWormHead.cs | 98 +++++++------- NPCs/Abyss/BoxJellyfish.cs | 40 +++--- NPCs/Abyss/CannonballJellyfish.cs | 34 ++--- NPCs/Abyss/ColossalSquid.cs | 182 +++++++++++++------------- NPCs/Abyss/Cuttlefish.cs | 34 ++--- NPCs/Abyss/DevilFish.cs | 22 ++-- NPCs/Abyss/DevilFishAlt.cs | 22 ++-- NPCs/Abyss/EidolonWyrmBody.cs | 52 ++++---- NPCs/Abyss/EidolonWyrmBodyAlt.cs | 52 ++++---- NPCs/Abyss/EidolonWyrmHead.cs | 164 +++++++++++------------ NPCs/Abyss/EidolonWyrmTail.cs | 52 ++++---- NPCs/Abyss/GiantSquid.cs | 34 ++--- NPCs/Abyss/GulperEelBody.cs | 52 ++++---- NPCs/Abyss/GulperEelBodyAlt.cs | 52 ++++---- NPCs/Abyss/GulperEelHead.cs | 134 +++++++++---------- NPCs/Abyss/GulperEelTail.cs | 52 ++++---- NPCs/Abyss/LuminousCorvina.cs | 16 +-- NPCs/Abyss/MirageJelly.cs | 28 ++-- NPCs/Abyss/OarfishBody.cs | 46 +++---- NPCs/Abyss/OarfishHead.cs | 126 +++++++++--------- NPCs/Abyss/OarfishTail.cs | 46 +++---- NPCs/Abyss/ReaperShark.cs | 173 ++++++++++++------------ NPCs/AcidRain/Mauler.cs | 26 ++-- NPCs/AcidRain/NuclearTerror.cs | 12 +- NPCs/Astral/AstralProbe.cs | 113 ++++++++-------- 27 files changed, 836 insertions(+), 842 deletions(-) diff --git a/NPCs/Abyss/BabyCannonballJellyfish.cs b/NPCs/Abyss/BabyCannonballJellyfish.cs index e63b7ff216..005e45e222 100644 --- a/NPCs/Abyss/BabyCannonballJellyfish.cs +++ b/NPCs/Abyss/BabyCannonballJellyfish.cs @@ -134,13 +134,13 @@ namespace CalamityMod.NPCs.Abyss spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); Vector2 vector = center - screenPos; vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/BabyCannonballJellyfishGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/BabyCannonballJellyfishGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); + vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(new Color(67, 218, 166)); Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/BabyCannonballJellyfishGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); + new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, halfSizeTexture, 1f, spriteEffects, 0f); } public override bool CheckDead() diff --git a/NPCs/Abyss/Bloatfish.cs b/NPCs/Abyss/Bloatfish.cs index 943294f0dd..44511aa4b1 100644 --- a/NPCs/Abyss/Bloatfish.cs +++ b/NPCs/Abyss/Bloatfish.cs @@ -106,15 +106,15 @@ namespace CalamityMod.NPCs.Abyss NPC.ai[0] = -1f; } } - int num258 = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; - int num259 = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; - if (Main.tile[num258, num259 - 1].LiquidAmount > 128) + int npcTileX = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; + int npcTileY = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; + if (Main.tile[npcTileX, npcTileY - 1].LiquidAmount > 128) { - if (Main.tile[num258, num259 + 1].HasTile) + if (Main.tile[npcTileX, npcTileY + 1].HasTile) { NPC.ai[0] = -1f; } - else if (Main.tile[num258, num259 + 2].HasTile) + else if (Main.tile[npcTileX, npcTileY + 2].HasTile) { NPC.ai[0] = -1f; } diff --git a/NPCs/Abyss/BobbitWormHead.cs b/NPCs/Abyss/BobbitWormHead.cs index 4271037e73..ae8cc1e6d5 100644 --- a/NPCs/Abyss/BobbitWormHead.cs +++ b/NPCs/Abyss/BobbitWormHead.cs @@ -75,16 +75,16 @@ namespace CalamityMod.NPCs.Abyss if (NPC.ai[0] == 0f) { NPC.noTileCollide = true; - float num659 = 14f; - Vector2 vector79 = new Vector2(NPC.Center.X, NPC.Center.Y); - float num660 = Main.npc[(int)NPC.ai[2]].Center.X - vector79.X; - float num661 = Main.npc[(int)NPC.ai[2]].Center.Y - vector79.Y; - float num662 = (float)Math.Sqrt((double)(num660 * num660 + num661 * num661)); - if (num662 < 11f + num659) + float launchSpeed = 14f; + Vector2 bobbitCenter = new Vector2(NPC.Center.X, NPC.Center.Y); + float segmentXDist = Main.npc[(int)NPC.ai[2]].Center.X - bobbitCenter.X; + float segmentYDist = Main.npc[(int)NPC.ai[2]].Center.Y - bobbitCenter.Y; + float segmentDistance = (float)Math.Sqrt((double)(segmentXDist * segmentXDist + segmentYDist * segmentYDist)); + if (segmentDistance < 11f + launchSpeed) { NPC.rotation = 0f; - NPC.velocity.X = num660; - NPC.velocity.Y = num661; + NPC.velocity.X = segmentXDist; + NPC.velocity.Y = segmentYDist; NPC.ai[1] += 1f; if (NPC.ai[1] >= 60f) { @@ -102,9 +102,9 @@ namespace CalamityMod.NPCs.Abyss } else { - num662 = num659 / num662; - NPC.velocity.X = num660 * num662; - NPC.velocity.Y = num661 * num662; + segmentDistance = launchSpeed / segmentDistance; + NPC.velocity.X = segmentXDist * segmentDistance; + NPC.velocity.Y = segmentYDist * segmentDistance; NPC.rotation = (float)Math.Atan2((double)NPC.velocity.Y, (double)NPC.velocity.X) - 1.57f; } } @@ -113,14 +113,14 @@ namespace CalamityMod.NPCs.Abyss NPC.noTileCollide = true; NPC.collideX = false; NPC.collideY = false; - float num663 = 16f; - Vector2 vector80 = new Vector2(NPC.Center.X, NPC.Center.Y); - float num664 = Main.player[NPC.target].Center.X - vector80.X; - float num665 = Main.player[NPC.target].Center.Y - vector80.Y; - float num666 = (float)Math.Sqrt((double)(num664 * num664 + num665 * num665)); - num666 = num663 / num666; - NPC.velocity.X = num664 * num666; - NPC.velocity.Y = num665 * num666; + float returnSpeed = 16f; + Vector2 bobbitCenterReturn = new Vector2(NPC.Center.X, NPC.Center.Y); + float segmentReturnXDist = Main.player[NPC.target].Center.X - bobbitCenterReturn.X; + float segmentReturnYDist = Main.player[NPC.target].Center.Y - bobbitCenterReturn.Y; + float segmentReturnDistance = (float)Math.Sqrt((double)(segmentReturnXDist * segmentReturnXDist + segmentReturnYDist * segmentReturnYDist)); + segmentReturnDistance = returnSpeed / segmentReturnDistance; + NPC.velocity.X = segmentReturnXDist * segmentReturnDistance; + NPC.velocity.Y = segmentReturnYDist * segmentReturnDistance; NPC.ai[0] = 2f; NPC.rotation = (float)Math.Atan2((double)-(double)NPC.velocity.Y, (double)-(double)NPC.velocity.X) - 1.57f; } @@ -148,11 +148,11 @@ namespace CalamityMod.NPCs.Abyss NPC.noTileCollide = false; } } - Vector2 vector81 = new Vector2(NPC.Center.X, NPC.Center.Y); - float num667 = Main.npc[(int)NPC.ai[2]].Center.X - vector81.X; - float num668 = Main.npc[(int)NPC.ai[2]].Center.Y - vector81.Y; - float num669 = (float)Math.Sqrt((double)(num667 * num667 + num668 * num668)); - if (num669 > 700f || NPC.collideX || NPC.collideY) + Vector2 bobbitCenterReturning = new Vector2(NPC.Center.X, NPC.Center.Y); + float segmentReturningXDist = Main.npc[(int)NPC.ai[2]].Center.X - bobbitCenterReturning.X; + float segmentReturningYDist = Main.npc[(int)NPC.ai[2]].Center.Y - bobbitCenterReturning.Y; + float segmentReturningDistance = (float)Math.Sqrt((double)(segmentReturningXDist * segmentReturningXDist + segmentReturningYDist * segmentReturningYDist)); + if (segmentReturningDistance > 700f || NPC.collideX || NPC.collideY) { NPC.noTileCollide = true; NPC.ai[0] = 0f; @@ -162,45 +162,45 @@ namespace CalamityMod.NPCs.Abyss else if (NPC.ai[0] == 3f) { NPC.noTileCollide = true; - float num671 = 16f; - float num672 = 0.25f; - Vector2 vector82 = new Vector2(NPC.Center.X, NPC.Center.Y); - float num673 = Main.player[NPC.target].Center.X - vector82.X; - float num674 = Main.player[NPC.target].Center.Y - vector82.Y; - float num675 = (float)Math.Sqrt((double)(num673 * num673 + num674 * num674)); - num675 = num671 / num675; - num673 *= num675; - num674 *= num675; - if (NPC.velocity.X < num673) + float unusedSpeed = 16f; + float unusedAcceleration = 0.25f; + Vector2 unusedBobbitCenter = new Vector2(NPC.Center.X, NPC.Center.Y); + float unusedTargetXDist = Main.player[NPC.target].Center.X - unusedBobbitCenter.X; + float unusedTargetYDist = Main.player[NPC.target].Center.Y - unusedBobbitCenter.Y; + float unusedTargetDistance = (float)Math.Sqrt((double)(unusedTargetXDist * unusedTargetXDist + unusedTargetYDist * unusedTargetYDist)); + unusedTargetDistance = unusedSpeed / unusedTargetDistance; + unusedTargetXDist *= unusedTargetDistance; + unusedTargetYDist *= unusedTargetDistance; + if (NPC.velocity.X < unusedTargetXDist) { - NPC.velocity.X = NPC.velocity.X + num672; - if (NPC.velocity.X < 0f && num673 > 0f) + NPC.velocity.X = NPC.velocity.X + unusedAcceleration; + if (NPC.velocity.X < 0f && unusedTargetXDist > 0f) { - NPC.velocity.X = NPC.velocity.X + num672 * 2f; + NPC.velocity.X = NPC.velocity.X + unusedAcceleration * 2f; } } - else if (NPC.velocity.X > num673) + else if (NPC.velocity.X > unusedTargetXDist) { - NPC.velocity.X = NPC.velocity.X - num672; - if (NPC.velocity.X > 0f && num673 < 0f) + NPC.velocity.X = NPC.velocity.X - unusedAcceleration; + if (NPC.velocity.X > 0f && unusedTargetXDist < 0f) { - NPC.velocity.X = NPC.velocity.X - num672 * 2f; + NPC.velocity.X = NPC.velocity.X - unusedAcceleration * 2f; } } - if (NPC.velocity.Y < num674) + if (NPC.velocity.Y < unusedTargetYDist) { - NPC.velocity.Y = NPC.velocity.Y + num672; - if (NPC.velocity.Y < 0f && num674 > 0f) + NPC.velocity.Y = NPC.velocity.Y + unusedAcceleration; + if (NPC.velocity.Y < 0f && unusedTargetYDist > 0f) { - NPC.velocity.Y = NPC.velocity.Y + num672 * 2f; + NPC.velocity.Y = NPC.velocity.Y + unusedAcceleration * 2f; } } - else if (NPC.velocity.Y > num674) + else if (NPC.velocity.Y > unusedTargetYDist) { - NPC.velocity.Y = NPC.velocity.Y - num672; - if (NPC.velocity.Y > 0f && num674 < 0f) + NPC.velocity.Y = NPC.velocity.Y - unusedAcceleration; + if (NPC.velocity.Y > 0f && unusedTargetYDist < 0f) { - NPC.velocity.Y = NPC.velocity.Y - num672 * 2f; + NPC.velocity.Y = NPC.velocity.Y - unusedAcceleration * 2f; } } NPC.rotation = (float)Math.Atan2((double)-(double)NPC.velocity.Y, (double)-(double)NPC.velocity.X); diff --git a/NPCs/Abyss/BoxJellyfish.cs b/NPCs/Abyss/BoxJellyfish.cs index 157eba50ad..a345647128 100644 --- a/NPCs/Abyss/BoxJellyfish.cs +++ b/NPCs/Abyss/BoxJellyfish.cs @@ -100,31 +100,31 @@ namespace CalamityMod.NPCs.Abyss NPC.ai[0] = 1f; } } - bool flag16 = false; + bool canAttack = false; NPC.TargetClosest(false); if (Main.player[NPC.target].wet && !Main.player[NPC.target].dead && Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height)) { - flag16 = true; + canAttack = true; } - if (flag16) + if (canAttack) { NPC.localAI[2] = 1f; NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X) + 1.57f; NPC.velocity *= 0.975f; - float num263 = 0.8f; - if (NPC.velocity.X > -num263 && NPC.velocity.X < num263 && NPC.velocity.Y > -num263 && NPC.velocity.Y < num263) + float lungeThreshold = 0.8f; + if (NPC.velocity.X > -lungeThreshold && NPC.velocity.X < lungeThreshold && NPC.velocity.Y > -lungeThreshold && NPC.velocity.Y < lungeThreshold) { NPC.TargetClosest(true); - float num264 = CalamityWorld.death ? 12f : CalamityWorld.revenge ? 10f : 8f; - Vector2 vector31 = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); - float num265 = Main.player[NPC.target].position.X + (Main.player[NPC.target].width / 2) - vector31.X; - float num266 = Main.player[NPC.target].position.Y + (Main.player[NPC.target].height / 2) - vector31.Y; - float num267 = (float)Math.Sqrt(num265 * num265 + num266 * num266); - num267 = num264 / num267; - num265 *= num267; - num266 *= num267; - NPC.velocity.X = num265; - NPC.velocity.Y = num266; + float lungeSpeed = CalamityWorld.death ? 12f : CalamityWorld.revenge ? 10f : 8f; + Vector2 npcPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + float targetX = Main.player[NPC.target].position.X + (Main.player[NPC.target].width / 2) - npcPosition.X; + float targetY = Main.player[NPC.target].position.Y + (Main.player[NPC.target].height / 2) - npcPosition.Y; + float targetDistance = (float)Math.Sqrt(targetX * targetX + targetY * targetY); + targetDistance = lungeSpeed / targetDistance; + targetX *= targetDistance; + targetY *= targetDistance; + NPC.velocity.X = targetX; + NPC.velocity.Y = targetY; } } else @@ -152,15 +152,15 @@ namespace CalamityMod.NPCs.Abyss NPC.ai[0] = -1f; } } - int num268 = (int)(NPC.position.X + (NPC.width / 2)) / 16; - int num269 = (int)(NPC.position.Y + (NPC.height / 2)) / 16; - if (Main.tile[num268, num269 - 1].LiquidAmount > 128) + int npcTileX = (int)(NPC.position.X + (NPC.width / 2)) / 16; + int npcTileY = (int)(NPC.position.Y + (NPC.height / 2)) / 16; + if (Main.tile[npcTileX, npcTileY - 1].LiquidAmount > 128) { - if (Main.tile[num268, num269 + 1].HasTile) + if (Main.tile[npcTileX, npcTileY + 1].HasTile) { NPC.ai[0] = -1f; } - else if (Main.tile[num268, num269 + 2].HasTile) + else if (Main.tile[npcTileX, npcTileY + 2].HasTile) { NPC.ai[0] = -1f; } diff --git a/NPCs/Abyss/CannonballJellyfish.cs b/NPCs/Abyss/CannonballJellyfish.cs index 1cefcf6e86..9ac54fa763 100644 --- a/NPCs/Abyss/CannonballJellyfish.cs +++ b/NPCs/Abyss/CannonballJellyfish.cs @@ -120,22 +120,22 @@ namespace CalamityMod.NPCs.Abyss if (boomTimer >= (dyingDuration - 20)) //home for the first 20 frames, not beyond that { - float num543 = player.position.X + (float)(player.width / 2); - float num544 = player.position.Y + (float)(player.height / 2); - float num550 = 30f; - Vector2 vector43 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num551 = num543 - vector43.X; - float num552 = num544 - vector43.Y; - float num553 = (float)Math.Sqrt((double)(num551 * num551 + num552 * num552)); - if (num553 < 100f) + float targetXDirection = player.position.X + (float)(player.width / 2); + float targetYDirection = player.position.Y + (float)(player.height / 2); + float homingSpeed = 30f; + Vector2 npcPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float targetXDist = targetXDirection - npcPosition.X; + float targetYDist = targetYDirection - npcPosition.Y; + float targetDistance = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); + if (targetDistance < 100f) { - num550 = 10f; //5 + homingSpeed = 10f; //5 } - num553 = num550 / num553; - num551 *= num553; - num552 *= num553; - NPC.velocity.X = (NPC.velocity.X * 5f + num551) / 6f; - NPC.velocity.Y = (NPC.velocity.Y * 5f + num552) / 6f; + targetDistance = homingSpeed / targetDistance; + targetXDist *= targetDistance; + targetYDist *= targetDistance; + NPC.velocity.X = (NPC.velocity.X * 5f + targetXDist) / 6f; + NPC.velocity.Y = (NPC.velocity.Y * 5f + targetYDist) / 6f; NPC.velocity *= 0.9f; //slow it down a bit to be fair @@ -250,14 +250,14 @@ namespace CalamityMod.NPCs.Abyss } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); var texture = TextureAssets.Npc[NPC.type]; - Vector2 vector11 = new Vector2((float)(texture.Value.Width / 2), (float)(texture.Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(texture.Value.Width / 2), (float)(texture.Value.Height / Main.npcFrameCount[NPC.type] / 2)); Vector2 vector = center - screenPos; var glowTexture = ModContent.Request("CalamityMod/NPCs/Abyss/CannonballJellyfishGlow"); vector -= new Vector2((float)glowTexture.Value.Width, (float)(glowTexture.Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); + vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(new Color(67, 218, 166)); Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/CannonballJellyfishGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); + new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, halfSizeTexture, 1f, spriteEffects, 0f); } private void Explode() diff --git a/NPCs/Abyss/ColossalSquid.cs b/NPCs/Abyss/ColossalSquid.cs index 2fce5f13aa..c5677cd416 100644 --- a/NPCs/Abyss/ColossalSquid.cs +++ b/NPCs/Abyss/ColossalSquid.cs @@ -119,49 +119,49 @@ namespace CalamityMod.NPCs.Abyss } else { - Vector2 value29 = Main.player[NPC.target].Center - NPC.Center; - value29.Y -= (float)(Main.player[NPC.target].height / 4); - float num1310 = value29.Length(); - if (num1310 > 800f) + Vector2 targetDirection = Main.player[NPC.target].Center - NPC.Center; + targetDirection.Y -= (float)(Main.player[NPC.target].height / 4); + float targetDistance = targetDirection.Length(); + if (targetDistance > 800f) { NPC.ai[0] = 2f; } else { - Vector2 center26 = NPC.Center; - center26.X = Main.player[NPC.target].Center.X; - Vector2 vector230 = center26 - NPC.Center; - if (vector230.Length() > 8f && Collision.CanHit(NPC.Center, 1, 1, center26, 1, 1)) + Vector2 squidCenter = NPC.Center; + squidCenter.X = Main.player[NPC.target].Center.X; + Vector2 squidDirection = squidCenter - NPC.Center; + if (squidDirection.Length() > 8f && Collision.CanHit(NPC.Center, 1, 1, squidCenter, 1, 1)) { NPC.ai[0] = 3f; - NPC.ai[1] = center26.X; - NPC.ai[2] = center26.Y; - Vector2 center27 = NPC.Center; - center27.Y = Main.player[NPC.target].Center.Y; - if (vector230.Length() > 8f && Collision.CanHit(NPC.Center, 1, 1, center27, 1, 1) && Collision.CanHit(center27, 1, 1, Main.player[NPC.target].position, 1, 1)) + NPC.ai[1] = squidCenter.X; + NPC.ai[2] = squidCenter.Y; + Vector2 squidCenterAgain = NPC.Center; + squidCenterAgain.Y = Main.player[NPC.target].Center.Y; + if (squidDirection.Length() > 8f && Collision.CanHit(NPC.Center, 1, 1, squidCenterAgain, 1, 1) && Collision.CanHit(squidCenterAgain, 1, 1, Main.player[NPC.target].position, 1, 1)) { NPC.ai[0] = 3f; - NPC.ai[1] = center27.X; - NPC.ai[2] = center27.Y; + NPC.ai[1] = squidCenterAgain.X; + NPC.ai[2] = squidCenterAgain.Y; } } else { - center26 = NPC.Center; - center26.Y = Main.player[NPC.target].Center.Y; - if ((center26 - NPC.Center).Length() > 8f && Collision.CanHit(NPC.Center, 1, 1, center26, 1, 1)) + squidCenter = NPC.Center; + squidCenter.Y = Main.player[NPC.target].Center.Y; + if ((squidCenter - NPC.Center).Length() > 8f && Collision.CanHit(NPC.Center, 1, 1, squidCenter, 1, 1)) { NPC.ai[0] = 3f; - NPC.ai[1] = center26.X; - NPC.ai[2] = center26.Y; + NPC.ai[1] = squidCenter.X; + NPC.ai[2] = squidCenter.Y; } } if (NPC.ai[0] == 0f) { NPC.localAI[0] = 0f; - value29.Normalize(); - value29 *= 0.5f; - NPC.velocity += value29; + targetDirection.Normalize(); + targetDirection *= 0.5f; + NPC.velocity += targetDirection; NPC.ai[0] = 4f; NPC.ai[1] = 0f; } @@ -171,20 +171,20 @@ namespace CalamityMod.NPCs.Abyss else if (NPC.ai[0] == 1f) { NPC.rotation += (float)NPC.direction * 0.1f; - Vector2 value30 = Main.player[NPC.target].Top - NPC.Center; - float num1311 = value30.Length(); - float num1312 = 5f; - num1312 += num1311 / 100f; - int num1313 = 50; - value30.Normalize(); - value30 *= num1312; - NPC.velocity = (NPC.velocity * (float)(num1313 - 1) + value30) / (float)num1313; + Vector2 latchPosition = Main.player[NPC.target].Top - NPC.Center; + float latchDistance = latchPosition.Length(); + float latchLockSpeed = 5f; + latchLockSpeed += latchDistance / 100f; + int latchVelocity = 50; + latchPosition.Normalize(); + latchPosition *= latchLockSpeed; + NPC.velocity = (NPC.velocity * (float)(latchVelocity - 1) + latchPosition) / (float)latchVelocity; if (!Collision.CanHit(NPC.Center, 1, 1, Main.player[NPC.target].Center, 1, 1)) { NPC.ai[0] = 0f; NPC.ai[1] = 0f; } - if (num1311 < 160f && Main.player[NPC.target].active && !Main.player[NPC.target].dead && !clone) + if (latchDistance < 160f && Main.player[NPC.target].active && !Main.player[NPC.target].dead && !clone) { NPC.Center = Main.player[NPC.target].Top; NPC.velocity = Vector2.Zero; @@ -197,14 +197,14 @@ namespace CalamityMod.NPCs.Abyss { NPC.rotation = NPC.velocity.X * 0.05f; NPC.noTileCollide = true; - Vector2 value31 = Main.player[NPC.target].Center - NPC.Center; - float num1315 = value31.Length(); - float scaleFactor11 = 3f; - int num1316 = 3; - value31.Normalize(); - value31 *= scaleFactor11; - NPC.velocity = (NPC.velocity * (float)(num1316 - 1) + value31) / (float)num1316; - if (num1315 < 600f && !Collision.SolidCollision(NPC.position, NPC.width, NPC.height)) + Vector2 lungeDirection = Main.player[NPC.target].Center - NPC.Center; + float lungeDistance = lungeDirection.Length(); + float lungeSpeed = 3f; + int lungeVelocity = 3; + lungeDirection.Normalize(); + lungeDirection *= lungeSpeed; + NPC.velocity = (NPC.velocity * (float)(lungeVelocity - 1) + lungeDirection) / (float)lungeVelocity; + if (lungeDistance < 600f && !Collision.SolidCollision(NPC.position, NPC.width, NPC.height)) { NPC.ai[0] = 0f; } @@ -212,20 +212,20 @@ namespace CalamityMod.NPCs.Abyss else if (NPC.ai[0] == 3f) { NPC.rotation = NPC.velocity.X * 0.05f; - Vector2 value32 = new Vector2(NPC.ai[1], NPC.ai[2]); - Vector2 value33 = value32 - NPC.Center; - float num1317 = value33.Length(); - float num1318 = 2f; - float num1319 = 3f; - value33.Normalize(); - value33 *= num1318; - NPC.velocity = (NPC.velocity * (num1319 - 1f) + value33) / num1319; + Vector2 otherLungePos = new Vector2(NPC.ai[1], NPC.ai[2]); + Vector2 otherLungeDirection = otherLungePos - NPC.Center; + float otherLungeDistance = otherLungeDirection.Length(); + float otherLungeSpeed = 2f; + float otherLungeVelocity = 3f; + otherLungeDirection.Normalize(); + otherLungeDirection *= otherLungeSpeed; + NPC.velocity = (NPC.velocity * (otherLungeVelocity - 1f) + otherLungeDirection) / otherLungeVelocity; if (NPC.collideX || NPC.collideY) { NPC.ai[0] = 4f; NPC.ai[1] = 0f; } - if (num1317 < num1318 || num1317 > 800f || Collision.CanHit(NPC.Center, 1, 1, Main.player[NPC.target].Center, 1, 1)) + if (otherLungeDistance < otherLungeSpeed || otherLungeDistance > 800f || Collision.CanHit(NPC.Center, 1, 1, Main.player[NPC.target].Center, 1, 1)) { NPC.ai[0] = 0f; } @@ -241,20 +241,19 @@ namespace CalamityMod.NPCs.Abyss { NPC.velocity.Y = NPC.velocity.Y * -0.8f; } - Vector2 value34; + Vector2 slowDownDirection; if (NPC.velocity.X == 0f && NPC.velocity.Y == 0f) { - value34 = Main.player[NPC.target].Center - NPC.Center; - value34.Y -= (float)(Main.player[NPC.target].height / 4); - value34.Normalize(); - NPC.velocity = value34 * 0.1f; + slowDownDirection = Main.player[NPC.target].Center - NPC.Center; + slowDownDirection.Y -= (float)(Main.player[NPC.target].height / 4); + slowDownDirection.Normalize(); + NPC.velocity = slowDownDirection * 0.1f; } - float scaleFactor12 = 2f; - float num1320 = 20f; - value34 = NPC.velocity; - value34.Normalize(); - value34 *= scaleFactor12; - NPC.velocity = (NPC.velocity * (num1320 - 1f) + value34) / num1320; + float slowDownVelocity = 20f; + slowDownDirection = NPC.velocity; + slowDownDirection.Normalize(); + slowDownDirection *= 2f; + NPC.velocity = (NPC.velocity * (slowDownVelocity - 1f) + slowDownDirection) / slowDownVelocity; NPC.ai[1] += 1f; if (NPC.ai[1] > 180f) { @@ -269,31 +268,31 @@ namespace CalamityMod.NPCs.Abyss if (NPC.localAI[0] >= 5f && !Collision.SolidCollision(NPC.position - new Vector2(10f, 10f), NPC.width + 20, NPC.height + 20)) { NPC.localAI[0] = 0f; - Vector2 center28 = NPC.Center; - center28.X = Main.player[NPC.target].Center.X; - if (Collision.CanHit(NPC.Center, 1, 1, center28, 1, 1) && Collision.CanHit(NPC.Center, 1, 1, center28, 1, 1) && Collision.CanHit(Main.player[NPC.target].Center, 1, 1, center28, 1, 1)) + Vector2 slowDownCenter = NPC.Center; + slowDownCenter.X = Main.player[NPC.target].Center.X; + if (Collision.CanHit(NPC.Center, 1, 1, slowDownCenter, 1, 1) && Collision.CanHit(NPC.Center, 1, 1, slowDownCenter, 1, 1) && Collision.CanHit(Main.player[NPC.target].Center, 1, 1, slowDownCenter, 1, 1)) { NPC.ai[0] = 3f; - NPC.ai[1] = center28.X; - NPC.ai[2] = center28.Y; + NPC.ai[1] = slowDownCenter.X; + NPC.ai[2] = slowDownCenter.Y; } else { - center28 = NPC.Center; - center28.Y = Main.player[NPC.target].Center.Y; - if (Collision.CanHit(NPC.Center, 1, 1, center28, 1, 1) && Collision.CanHit(Main.player[NPC.target].Center, 1, 1, center28, 1, 1)) + slowDownCenter = NPC.Center; + slowDownCenter.Y = Main.player[NPC.target].Center.Y; + if (Collision.CanHit(NPC.Center, 1, 1, slowDownCenter, 1, 1) && Collision.CanHit(Main.player[NPC.target].Center, 1, 1, slowDownCenter, 1, 1)) { NPC.ai[0] = 3f; - NPC.ai[1] = center28.X; - NPC.ai[2] = center28.Y; + NPC.ai[1] = slowDownCenter.X; + NPC.ai[2] = slowDownCenter.Y; } } } } else if (NPC.ai[0] == 5f) { - Player player7 = Main.player[NPC.target]; - if (!player7.active || player7.dead || clone) + Player latchedTarget = Main.player[NPC.target]; + if (!latchedTarget.active || latchedTarget.dead || clone) { NPC.ai[0] = 0f; NPC.ai[1] = 0f; @@ -301,10 +300,10 @@ namespace CalamityMod.NPCs.Abyss } else { - NPC.Center = ((player7.gravDir == 1f) ? player7.Top : player7.Bottom) + new Vector2((float)(player7.direction * 4), 0f); - NPC.gfxOffY = player7.gfxOffY; + NPC.Center = ((latchedTarget.gravDir == 1f) ? latchedTarget.Top : latchedTarget.Bottom) + new Vector2((float)(latchedTarget.direction * 4), 0f); + NPC.gfxOffY = latchedTarget.gfxOffY; NPC.velocity = Vector2.Zero; - player7.AddBuff(BuffID.Obstructed, 59, true); + latchedTarget.AddBuff(BuffID.Obstructed, 59, true); } } NPC.rotation = NPC.velocity.X * 0.05f; @@ -436,20 +435,19 @@ namespace CalamityMod.NPCs.Abyss } NPC.rotation = NPC.velocity.X * 0.05f; NPC.velocity *= 0.975f; - float num263 = 2.5f; - if (NPC.velocity.X > -num263 && NPC.velocity.X < num263 && NPC.velocity.Y > -num263 && NPC.velocity.Y < num263) + float hitLungeThreshold = 2.5f; + if (NPC.velocity.X > -hitLungeThreshold && NPC.velocity.X < hitLungeThreshold && NPC.velocity.Y > -hitLungeThreshold && NPC.velocity.Y < hitLungeThreshold) { NPC.TargetClosest(true); - float num264 = 20f; - Vector2 vector31 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num265 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2) - vector31.X; - float num266 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2) - vector31.Y; - float num267 = (float)Math.Sqrt((double)(num265 * num265 + num266 * num266)); - num267 = num264 / num267; - num265 *= num267; - num266 *= num267; - NPC.velocity.X = num265; - NPC.velocity.Y = num266; + Vector2 hitLungePos = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float hitLungeTargetX = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2) - hitLungePos.X; + float hitLungeTargetY = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2) - hitLungePos.Y; + float hitLungeTargetDist = (float)Math.Sqrt((double)(hitLungeTargetX * hitLungeTargetX + hitLungeTargetY * hitLungeTargetY)); + hitLungeTargetDist = 20f / hitLungeTargetDist; + hitLungeTargetX *= hitLungeTargetDist; + hitLungeTargetY *= hitLungeTargetDist; + NPC.velocity.X = hitLungeTargetX; + NPC.velocity.Y = hitLungeTargetY; return; } } @@ -482,15 +480,15 @@ namespace CalamityMod.NPCs.Abyss NPC.ai[0] = -1f; } } - int num268 = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; - int num269 = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; - if (Main.tile[num268, num269 - 1].LiquidAmount > 128) + int npcTileX = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; + int npcTileY = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; + if (Main.tile[npcTileX, npcTileY - 1].LiquidAmount > 128) { - if (Main.tile[num268, num269 + 1].HasTile) + if (Main.tile[npcTileX, npcTileY + 1].HasTile) { NPC.ai[0] = -1f; } - else if (Main.tile[num268, num269 + 2].HasTile) + else if (Main.tile[npcTileX, npcTileY + 2].HasTile) { NPC.ai[0] = -1f; } diff --git a/NPCs/Abyss/Cuttlefish.cs b/NPCs/Abyss/Cuttlefish.cs index 6827b05362..6afe61c019 100644 --- a/NPCs/Abyss/Cuttlefish.cs +++ b/NPCs/Abyss/Cuttlefish.cs @@ -58,10 +58,10 @@ namespace CalamityMod.NPCs.Abyss public override void AI() { NPC.spriteDirection = (NPC.direction > 0) ? 1 : -1; - int num = 150; + int alphaControl = 150; if (NPC.ai[2] == 0f) { - NPC.alpha = num; + NPC.alpha = alphaControl; NPC.TargetClosest(true); if (!Main.player[NPC.target].dead && (Main.player[NPC.target].Center - NPC.Center).Length() < Main.player[NPC.target].Calamity().GetAbyssAggro(160f) && Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height)) @@ -114,15 +114,15 @@ namespace CalamityMod.NPCs.Abyss NPC.ai[0] = -1f; } } - int num268 = (int)(NPC.position.X + (NPC.width / 2)) / 16; - int num269 = (int)(NPC.position.Y + (NPC.height / 2)) / 16; - if (Main.tile[num268, num269 - 1].LiquidAmount > 128) + int npcTileX = (int)(NPC.position.X + (NPC.width / 2)) / 16; + int npcTileY = (int)(NPC.position.Y + (NPC.height / 2)) / 16; + if (Main.tile[npcTileX, npcTileY - 1].LiquidAmount > 128) { - if (Main.tile[num268, num269 + 1].HasTile) + if (Main.tile[npcTileX, npcTileY + 1].HasTile) { NPC.ai[0] = -1f; } - else if (Main.tile[num268, num269 + 2].HasTile) + else if (Main.tile[npcTileX, npcTileY + 2].HasTile) { NPC.ai[0] = -1f; } @@ -141,7 +141,7 @@ namespace CalamityMod.NPCs.Abyss { if (NPC.alpha > 0) { - NPC.alpha -= num / 16; + NPC.alpha -= alphaControl / 16; if (NPC.alpha < 0) { NPC.alpha = 0; @@ -165,13 +165,13 @@ namespace CalamityMod.NPCs.Abyss } if (NPC.wet || NPC.noTileCollide) { - bool flag14 = false; + bool canAttack = false; NPC.TargetClosest(false); if (Main.player[NPC.target].wet && !Main.player[NPC.target].dead) { - flag14 = true; + canAttack = true; } - if (!flag14) + if (!canAttack) { if (!Collision.SolidCollision(NPC.position, NPC.width, NPC.height)) { @@ -200,7 +200,7 @@ namespace CalamityMod.NPCs.Abyss } } } - if (flag14) + if (canAttack) { if (Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height)) { @@ -279,15 +279,15 @@ namespace CalamityMod.NPCs.Abyss } } } - int num258 = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; - int num259 = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; - if (Main.tile[num258, num259 - 1].LiquidAmount > 128) + int npcTileXAgain = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; + int npcTileYAgain = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; + if (Main.tile[npcTileXAgain, npcTileYAgain - 1].LiquidAmount > 128) { - if (Main.tile[num258, num259 + 1].HasTile) + if (Main.tile[npcTileXAgain, npcTileYAgain + 1].HasTile) { NPC.ai[0] = -1f; } - else if (Main.tile[num258, num259 + 2].HasTile) + else if (Main.tile[npcTileXAgain, npcTileYAgain + 2].HasTile) { NPC.ai[0] = -1f; } diff --git a/NPCs/Abyss/DevilFish.cs b/NPCs/Abyss/DevilFish.cs index 648d6e913e..546982c7ab 100644 --- a/NPCs/Abyss/DevilFish.cs +++ b/NPCs/Abyss/DevilFish.cs @@ -112,17 +112,17 @@ namespace CalamityMod.NPCs.Abyss if (NPC.wet) { - bool flag14 = brokenMask; + bool canAttack = brokenMask; NPC.TargetClosest(false); if (player.statLife <= player.statLifeMax2 / 4) { - flag14 = true; + canAttack = true; } - if ((!player.wet || player.dead || !Collision.CanHit(NPC.position, NPC.width, NPC.height, player.position, player.width, player.height)) && flag14) + if ((!player.wet || player.dead || !Collision.CanHit(NPC.position, NPC.width, NPC.height, player.position, player.width, player.height)) && canAttack) { - flag14 = false; + canAttack = false; } - if (!flag14) + if (!canAttack) { if (NPC.collideX) { @@ -147,7 +147,7 @@ namespace CalamityMod.NPCs.Abyss } } } - if (flag14) + if (canAttack) { NPC.TargetClosest(true); NPC.velocity.X = NPC.velocity.X + (float)NPC.direction * (CalamityWorld.death ? 0.5f : CalamityWorld.revenge ? 0.375f : 0.25f) * speedBoost; @@ -194,15 +194,15 @@ namespace CalamityMod.NPCs.Abyss } } } - int num258 = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; - int num259 = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; - if (Main.tile[num258, num259 - 1].LiquidAmount > 128) + int npcTileX = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; + int npcTileY = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; + if (Main.tile[npcTileX, npcTileY - 1].LiquidAmount > 128) { - if (Main.tile[num258, num259 + 1].HasTile) + if (Main.tile[npcTileX, npcTileY + 1].HasTile) { NPC.ai[0] = -1f; } - else if (Main.tile[num258, num259 + 2].HasTile) + else if (Main.tile[npcTileX, npcTileY + 2].HasTile) { NPC.ai[0] = -1f; } diff --git a/NPCs/Abyss/DevilFishAlt.cs b/NPCs/Abyss/DevilFishAlt.cs index 0f47772731..44060ffa94 100644 --- a/NPCs/Abyss/DevilFishAlt.cs +++ b/NPCs/Abyss/DevilFishAlt.cs @@ -94,17 +94,17 @@ namespace CalamityMod.NPCs.Abyss if (NPC.wet) { - bool flag14 = brokenMask; + bool canAttack = brokenMask; NPC.TargetClosest(false); if (player.statLife <= player.statLifeMax2 / 4) { - flag14 = true; + canAttack = true; } - if ((!player.wet || player.dead || !Collision.CanHit(NPC.position, NPC.width, NPC.height, player.position, player.width, player.height)) && flag14) + if ((!player.wet || player.dead || !Collision.CanHit(NPC.position, NPC.width, NPC.height, player.position, player.width, player.height)) && canAttack) { - flag14 = false; + canAttack = false; } - if (!flag14) + if (!canAttack) { if (NPC.collideX) { @@ -129,7 +129,7 @@ namespace CalamityMod.NPCs.Abyss } } } - if (flag14) + if (canAttack) { NPC.TargetClosest(true); NPC.velocity.X = NPC.velocity.X + (float)NPC.direction * (CalamityWorld.death ? 0.5f : CalamityWorld.revenge ? 0.375f : 0.25f) * speedBoost; @@ -176,15 +176,15 @@ namespace CalamityMod.NPCs.Abyss } } } - int num258 = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; - int num259 = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; - if (Main.tile[num258, num259 - 1].LiquidAmount > 128) + int npcTileX = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; + int npcTileY = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; + if (Main.tile[npcTileX, npcTileY - 1].LiquidAmount > 128) { - if (Main.tile[num258, num259 + 1].HasTile) + if (Main.tile[npcTileX, npcTileY + 1].HasTile) { NPC.ai[0] = -1f; } - else if (Main.tile[num258, num259 + 2].HasTile) + else if (Main.tile[npcTileX, npcTileY + 2].HasTile) { NPC.ai[0] = -1f; } diff --git a/NPCs/Abyss/EidolonWyrmBody.cs b/NPCs/Abyss/EidolonWyrmBody.cs index 133c3a2d6b..c1a8c86b08 100644 --- a/NPCs/Abyss/EidolonWyrmBody.cs +++ b/NPCs/Abyss/EidolonWyrmBody.cs @@ -82,39 +82,39 @@ namespace CalamityMod.NPCs.Abyss NPC.alpha = 0; } - Vector2 vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num191 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); - float num192 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); - num191 = (float)((int)(num191 / 16f) * 16); - num192 = (float)((int)(num192 / 16f) * 16); - vector18.X = (float)((int)(vector18.X / 16f) * 16); - vector18.Y = (float)((int)(vector18.Y / 16f) * 16); - num191 -= vector18.X; - num192 -= vector18.Y; - float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); + Vector2 segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float targetXDirection = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); + float targetYDirection = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); + targetXDirection = (float)((int)(targetXDirection / 16f) * 16); + targetYDirection = (float)((int)(targetYDirection / 16f) * 16); + segmentPosition.X = (float)((int)(segmentPosition.X / 16f) * 16); + segmentPosition.Y = (float)((int)(segmentPosition.Y / 16f) * 16); + targetXDirection -= segmentPosition.X; + targetYDirection -= segmentPosition.Y; + float targetDistance = (float)System.Math.Sqrt((double)(targetXDirection * targetXDirection + targetYDirection * targetYDirection)); if (NPC.ai[1] > 0f && NPC.ai[1] < (float)Main.npc.Length) { try { - vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - num191 = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - vector18.X; - num192 = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - vector18.Y; + segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + targetXDirection = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - segmentPosition.X; + targetYDirection = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - segmentPosition.Y; } catch { } - NPC.rotation = (float)System.Math.Atan2((double)num192, (double)num191) + 1.57f; - num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - int num194 = NPC.width; - num193 = (num193 - (float)num194) / num193; - num191 *= num193; - num192 *= num193; + NPC.rotation = (float)System.Math.Atan2((double)targetYDirection, (double)targetXDirection) + 1.57f; + targetDistance = (float)System.Math.Sqrt((double)(targetXDirection * targetXDirection + targetYDirection * targetYDirection)); + int segmentWidth = NPC.width; + targetDistance = (targetDistance - (float)segmentWidth) / targetDistance; + targetXDirection *= targetDistance; + targetYDirection *= targetDistance; NPC.velocity = Vector2.Zero; - NPC.position.X = NPC.position.X + num191; - NPC.position.Y = NPC.position.Y + num192; + NPC.position.X = NPC.position.X + targetXDirection; + NPC.position.Y = NPC.position.Y + targetYDirection; - if (num191 < 0f) + if (targetXDirection < 0f) NPC.spriteDirection = -1; - else if (num191 > 0f) + else if (targetXDirection > 0f) NPC.spriteDirection = 1; } } @@ -127,13 +127,13 @@ namespace CalamityMod.NPCs.Abyss spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); Vector2 vector = center - screenPos; vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/EidolonWyrmBodyGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/EidolonWyrmBodyGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); + vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow); Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/EidolonWyrmBodyGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); + new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, halfSizeTexture, 1f, spriteEffects, 0f); } public override bool CheckActive() diff --git a/NPCs/Abyss/EidolonWyrmBodyAlt.cs b/NPCs/Abyss/EidolonWyrmBodyAlt.cs index f50ca655ac..2cbfd9e8f6 100644 --- a/NPCs/Abyss/EidolonWyrmBodyAlt.cs +++ b/NPCs/Abyss/EidolonWyrmBodyAlt.cs @@ -82,39 +82,39 @@ namespace CalamityMod.NPCs.Abyss NPC.alpha = 0; } - Vector2 vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num191 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); - float num192 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); - num191 = (float)((int)(num191 / 16f) * 16); - num192 = (float)((int)(num192 / 16f) * 16); - vector18.X = (float)((int)(vector18.X / 16f) * 16); - vector18.Y = (float)((int)(vector18.Y / 16f) * 16); - num191 -= vector18.X; - num192 -= vector18.Y; - float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); + Vector2 segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float targetXDirection = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); + float targetYDirection = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); + targetXDirection = (float)((int)(targetXDirection / 16f) * 16); + targetYDirection = (float)((int)(targetYDirection / 16f) * 16); + segmentPosition.X = (float)((int)(segmentPosition.X / 16f) * 16); + segmentPosition.Y = (float)((int)(segmentPosition.Y / 16f) * 16); + targetXDirection -= segmentPosition.X; + targetYDirection -= segmentPosition.Y; + float targetDistance = (float)System.Math.Sqrt((double)(targetXDirection * targetXDirection + targetYDirection * targetYDirection)); if (NPC.ai[1] > 0f && NPC.ai[1] < (float)Main.npc.Length) { try { - vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - num191 = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - vector18.X; - num192 = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - vector18.Y; + segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + targetXDirection = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - segmentPosition.X; + targetYDirection = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - segmentPosition.Y; } catch { } - NPC.rotation = (float)System.Math.Atan2((double)num192, (double)num191) + 1.57f; - num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - int num194 = NPC.width; - num193 = (num193 - (float)num194) / num193; - num191 *= num193; - num192 *= num193; + NPC.rotation = (float)System.Math.Atan2((double)targetYDirection, (double)targetXDirection) + 1.57f; + targetDistance = (float)System.Math.Sqrt((double)(targetXDirection * targetXDirection + targetYDirection * targetYDirection)); + int segmentWidth = NPC.width; + targetDistance = (targetDistance - (float)segmentWidth) / targetDistance; + targetXDirection *= targetDistance; + targetYDirection *= targetDistance; NPC.velocity = Vector2.Zero; - NPC.position.X = NPC.position.X + num191; - NPC.position.Y = NPC.position.Y + num192; + NPC.position.X = NPC.position.X + targetXDirection; + NPC.position.Y = NPC.position.Y + targetYDirection; - if (num191 < 0f) + if (targetXDirection < 0f) NPC.spriteDirection = -1; - else if (num191 > 0f) + else if (targetXDirection > 0f) NPC.spriteDirection = 1; } } @@ -127,13 +127,13 @@ namespace CalamityMod.NPCs.Abyss spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); Vector2 vector = center - screenPos; vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, NPC.gfxOffY); + vector += halfSizeTexture * 1f + new Vector2(0f, NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Color.White); Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/EidolonWyrmBodyAltGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); + new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, halfSizeTexture, 1f, spriteEffects, 0f); } public override bool CheckActive() diff --git a/NPCs/Abyss/EidolonWyrmHead.cs b/NPCs/Abyss/EidolonWyrmHead.cs index 5e335d9a5a..3746bc643e 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -145,12 +145,12 @@ namespace CalamityMod.NPCs.Abyss if (!TailSpawned && NPC.ai[0] == 0f) { int Previous = NPC.whoAmI; - for (int num36 = 0; num36 < maxLength; num36++) + for (int segments = 0; segments < maxLength; segments++) { int lol; - if (num36 >= 0 && num36 < minLength) + if (segments >= 0 && segments < minLength) { - if (num36 % 2 == 0) + if (segments % 2 == 0) { lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); } @@ -208,167 +208,167 @@ namespace CalamityMod.NPCs.Abyss NPC.active = false; } - float num188 = speed; - float num189 = turnSpeed; - Vector2 vector18 = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + float currentSpeed = speed; + float currentTurnSpeed = turnSpeed; + Vector2 segmentPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); if (patrolSpot == Vector2.Zero) patrolSpot = Main.player[NPC.target].Center; - float num191 = detectsPlayer ? Main.player[NPC.target].Center.X : patrolSpot.X; - float num192 = detectsPlayer ? Main.player[NPC.target].Center.Y : patrolSpot.Y; + float targetXDirection = detectsPlayer ? Main.player[NPC.target].Center.X : patrolSpot.X; + float targetYDirection = detectsPlayer ? Main.player[NPC.target].Center.Y : patrolSpot.Y; if (!detectsPlayer) { - num192 += 800; - if (Math.Abs(NPC.Center.X - num191) < 400f) //500 + targetYDirection += 800; + if (Math.Abs(NPC.Center.X - targetXDirection) < 400f) //500 { if (NPC.velocity.X > 0f) { - num191 += 500f; + targetXDirection += 500f; } else { - num191 -= 500f; + targetXDirection -= 500f; } } } else { - num188 = 7.5f; - num189 = 0.125f; + currentSpeed = 7.5f; + currentTurnSpeed = 0.125f; if (!Main.player[NPC.target].wet) { - num188 = 15f; - num189 = 0.25f; + currentSpeed = 15f; + currentTurnSpeed = 0.25f; } if (adultWyrmAlive) { if (!Main.player[NPC.target].Calamity().ZoneAbyssLayer4) { - num188 = 22.5f; - num189 = 0.375f; + currentSpeed = 22.5f; + currentTurnSpeed = 0.375f; } } } - float num48 = num188 * 1.3f; - float num49 = num188 * 0.7f; - float num50 = NPC.velocity.Length(); - if (num50 > 0f) + float maxCurrentSpeed = currentSpeed * 1.3f; + float minCurrentSpeed = currentSpeed * 0.7f; + float speedComparison = NPC.velocity.Length(); + if (speedComparison > 0f) { - if (num50 > num48) + if (speedComparison > maxCurrentSpeed) { NPC.velocity.Normalize(); - NPC.velocity *= num48; + NPC.velocity *= maxCurrentSpeed; } - else if (num50 < num49) + else if (speedComparison < minCurrentSpeed) { NPC.velocity.Normalize(); - NPC.velocity *= num49; + NPC.velocity *= minCurrentSpeed; } } - num191 = (float)((int)(num191 / 16f) * 16); - num192 = (float)((int)(num192 / 16f) * 16); - vector18.X = (float)((int)(vector18.X / 16f) * 16); - vector18.Y = (float)((int)(vector18.Y / 16f) * 16); - num191 -= vector18.X; - num192 -= vector18.Y; - float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - float num196 = System.Math.Abs(num191); - float num197 = System.Math.Abs(num192); - float num198 = num188 / num193; - num191 *= num198; - num192 *= num198; - if ((NPC.velocity.X > 0f && num191 > 0f) || (NPC.velocity.X < 0f && num191 < 0f) || (NPC.velocity.Y > 0f && num192 > 0f) || (NPC.velocity.Y < 0f && num192 < 0f)) + targetXDirection = (float)((int)(targetXDirection / 16f) * 16); + targetYDirection = (float)((int)(targetYDirection / 16f) * 16); + segmentPosition.X = (float)((int)(segmentPosition.X / 16f) * 16); + segmentPosition.Y = (float)((int)(segmentPosition.Y / 16f) * 16); + targetXDirection -= segmentPosition.X; + targetYDirection -= segmentPosition.Y; + float targetDistance = (float)System.Math.Sqrt((double)(targetXDirection * targetXDirection + targetYDirection * targetYDirection)); + float absolutetargetX = System.Math.Abs(targetXDirection); + float absolutetargetY = System.Math.Abs(targetYDirection); + float timeToReachTarget = currentSpeed / targetDistance; + targetXDirection *= timeToReachTarget; + targetYDirection *= timeToReachTarget; + if ((NPC.velocity.X > 0f && targetXDirection > 0f) || (NPC.velocity.X < 0f && targetXDirection < 0f) || (NPC.velocity.Y > 0f && targetYDirection > 0f) || (NPC.velocity.Y < 0f && targetYDirection < 0f)) { - if (NPC.velocity.X < num191) + if (NPC.velocity.X < targetXDirection) { - NPC.velocity.X = NPC.velocity.X + num189; + NPC.velocity.X = NPC.velocity.X + currentTurnSpeed; } else { - if (NPC.velocity.X > num191) + if (NPC.velocity.X > targetXDirection) { - NPC.velocity.X = NPC.velocity.X - num189; + NPC.velocity.X = NPC.velocity.X - currentTurnSpeed; } } - if (NPC.velocity.Y < num192) + if (NPC.velocity.Y < targetYDirection) { - NPC.velocity.Y = NPC.velocity.Y + num189; + NPC.velocity.Y = NPC.velocity.Y + currentTurnSpeed; } else { - if (NPC.velocity.Y > num192) + if (NPC.velocity.Y > targetYDirection) { - NPC.velocity.Y = NPC.velocity.Y - num189; + NPC.velocity.Y = NPC.velocity.Y - currentTurnSpeed; } } - if ((double)System.Math.Abs(num192) < (double)num188 * 0.2 && ((NPC.velocity.X > 0f && num191 < 0f) || (NPC.velocity.X < 0f && num191 > 0f))) + if ((double)System.Math.Abs(targetYDirection) < (double)currentSpeed * 0.2 && ((NPC.velocity.X > 0f && targetXDirection < 0f) || (NPC.velocity.X < 0f && targetXDirection > 0f))) { if (NPC.velocity.Y > 0f) { - NPC.velocity.Y = NPC.velocity.Y + num189 * 2f; + NPC.velocity.Y = NPC.velocity.Y + currentTurnSpeed * 2f; } else { - NPC.velocity.Y = NPC.velocity.Y - num189 * 2f; + NPC.velocity.Y = NPC.velocity.Y - currentTurnSpeed * 2f; } } - if ((double)System.Math.Abs(num191) < (double)num188 * 0.2 && ((NPC.velocity.Y > 0f && num192 < 0f) || (NPC.velocity.Y < 0f && num192 > 0f))) + if ((double)System.Math.Abs(targetXDirection) < (double)currentSpeed * 0.2 && ((NPC.velocity.Y > 0f && targetYDirection < 0f) || (NPC.velocity.Y < 0f && targetYDirection > 0f))) { if (NPC.velocity.X > 0f) { - NPC.velocity.X = NPC.velocity.X + num189 * 2f; //changed from 2 + NPC.velocity.X = NPC.velocity.X + currentTurnSpeed * 2f; //changed from 2 } else { - NPC.velocity.X = NPC.velocity.X - num189 * 2f; //changed from 2 + NPC.velocity.X = NPC.velocity.X - currentTurnSpeed * 2f; //changed from 2 } } } else { - if (num196 > num197) + if (absolutetargetX > absolutetargetY) { - if (NPC.velocity.X < num191) + if (NPC.velocity.X < targetXDirection) { - NPC.velocity.X = NPC.velocity.X + num189 * 1.1f; //changed from 1.1 + NPC.velocity.X = NPC.velocity.X + currentTurnSpeed * 1.1f; //changed from 1.1 } - else if (NPC.velocity.X > num191) + else if (NPC.velocity.X > targetXDirection) { - NPC.velocity.X = NPC.velocity.X - num189 * 1.1f; //changed from 1.1 + NPC.velocity.X = NPC.velocity.X - currentTurnSpeed * 1.1f; //changed from 1.1 } - if ((double)(System.Math.Abs(NPC.velocity.X) + System.Math.Abs(NPC.velocity.Y)) < (double)num188 * 0.5) + if ((double)(System.Math.Abs(NPC.velocity.X) + System.Math.Abs(NPC.velocity.Y)) < (double)currentSpeed * 0.5) { if (NPC.velocity.Y > 0f) { - NPC.velocity.Y = NPC.velocity.Y + num189; + NPC.velocity.Y = NPC.velocity.Y + currentTurnSpeed; } else { - NPC.velocity.Y = NPC.velocity.Y - num189; + NPC.velocity.Y = NPC.velocity.Y - currentTurnSpeed; } } } else { - if (NPC.velocity.Y < num192) + if (NPC.velocity.Y < targetYDirection) { - NPC.velocity.Y = NPC.velocity.Y + num189 * 1.1f; + NPC.velocity.Y = NPC.velocity.Y + currentTurnSpeed * 1.1f; } - else if (NPC.velocity.Y > num192) + else if (NPC.velocity.Y > targetYDirection) { - NPC.velocity.Y = NPC.velocity.Y - num189 * 1.1f; + NPC.velocity.Y = NPC.velocity.Y - currentTurnSpeed * 1.1f; } - if ((double)(System.Math.Abs(NPC.velocity.X) + System.Math.Abs(NPC.velocity.Y)) < (double)num188 * 0.5) + if ((double)(System.Math.Abs(NPC.velocity.X) + System.Math.Abs(NPC.velocity.Y)) < (double)currentSpeed * 0.5) { if (NPC.velocity.X > 0f) { - NPC.velocity.X = NPC.velocity.X + num189; + NPC.velocity.X = NPC.velocity.X + currentTurnSpeed; } else { - NPC.velocity.X = NPC.velocity.X - num189; + NPC.velocity.X = NPC.velocity.X - currentTurnSpeed; } } } @@ -390,18 +390,18 @@ namespace CalamityMod.NPCs.Abyss Rectangle targetHitbox = target.Hitbox; - float dist1 = Vector2.Distance(NPC.Center, targetHitbox.TopLeft()); - float dist2 = Vector2.Distance(NPC.Center, targetHitbox.TopRight()); - float dist3 = Vector2.Distance(NPC.Center, targetHitbox.BottomLeft()); - float dist4 = Vector2.Distance(NPC.Center, targetHitbox.BottomRight()); + float hitboxTopLeft = Vector2.Distance(NPC.Center, targetHitbox.TopLeft()); + float hitboxTopRight = Vector2.Distance(NPC.Center, targetHitbox.TopRight()); + float hitboxBotLeft = Vector2.Distance(NPC.Center, targetHitbox.BottomLeft()); + float hitboxBotRight = Vector2.Distance(NPC.Center, targetHitbox.BottomRight()); - float minDist = dist1; - if (dist2 < minDist) - minDist = dist2; - if (dist3 < minDist) - minDist = dist3; - if (dist4 < minDist) - minDist = dist4; + float minDist = hitboxTopLeft; + if (hitboxTopRight < minDist) + minDist = hitboxTopRight; + if (hitboxBotLeft < minDist) + minDist = hitboxBotLeft; + if (hitboxBotRight < minDist) + minDist = hitboxBotRight; return minDist <= 40f; } @@ -423,13 +423,13 @@ namespace CalamityMod.NPCs.Abyss spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); Vector2 vector = center - screenPos; vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/EidolonWyrmHeadGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/EidolonWyrmHeadGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, NPC.gfxOffY); + vector += halfSizeTexture * 1f + new Vector2(0f, NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Color.White); Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/EidolonWyrmHeadGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); + new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, halfSizeTexture, 1f, spriteEffects, 0f); } public override float SpawnChance(NPCSpawnInfo spawnInfo) diff --git a/NPCs/Abyss/EidolonWyrmTail.cs b/NPCs/Abyss/EidolonWyrmTail.cs index e1f8c42a2a..463c697b83 100644 --- a/NPCs/Abyss/EidolonWyrmTail.cs +++ b/NPCs/Abyss/EidolonWyrmTail.cs @@ -82,39 +82,39 @@ namespace CalamityMod.NPCs.Abyss NPC.alpha = 0; } - Vector2 vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num191 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); - float num192 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); - num191 = (float)((int)(num191 / 16f) * 16); - num192 = (float)((int)(num192 / 16f) * 16); - vector18.X = (float)((int)(vector18.X / 16f) * 16); - vector18.Y = (float)((int)(vector18.Y / 16f) * 16); - num191 -= vector18.X; - num192 -= vector18.Y; - float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); + Vector2 segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float targetXDirection = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); + float targetYDirection = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); + targetXDirection = (float)((int)(targetXDirection / 16f) * 16); + targetYDirection = (float)((int)(targetYDirection / 16f) * 16); + segmentPosition.X = (float)((int)(segmentPosition.X / 16f) * 16); + segmentPosition.Y = (float)((int)(segmentPosition.Y / 16f) * 16); + targetXDirection -= segmentPosition.X; + targetYDirection -= segmentPosition.Y; + float targetDistance = (float)System.Math.Sqrt((double)(targetXDirection * targetXDirection + targetYDirection * targetYDirection)); if (NPC.ai[1] > 0f && NPC.ai[1] < (float)Main.npc.Length) { try { - vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - num191 = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - vector18.X; - num192 = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - vector18.Y; + segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + targetXDirection = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - segmentPosition.X; + targetYDirection = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - segmentPosition.Y; } catch { } - NPC.rotation = (float)System.Math.Atan2((double)num192, (double)num191) + 1.57f; - num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - int num194 = NPC.width; - num193 = (num193 - (float)num194) / num193; - num191 *= num193; - num192 *= num193; + NPC.rotation = (float)System.Math.Atan2((double)targetYDirection, (double)targetXDirection) + 1.57f; + targetDistance = (float)System.Math.Sqrt((double)(targetXDirection * targetXDirection + targetYDirection * targetYDirection)); + int segmentWidth = NPC.width; + targetDistance = (targetDistance - (float)segmentWidth) / targetDistance; + targetXDirection *= targetDistance; + targetYDirection *= targetDistance; NPC.velocity = Vector2.Zero; - NPC.position.X = NPC.position.X + num191; - NPC.position.Y = NPC.position.Y + num192; + NPC.position.X = NPC.position.X + targetXDirection; + NPC.position.Y = NPC.position.Y + targetYDirection; - if (num191 < 0f) + if (targetXDirection < 0f) NPC.spriteDirection = -1; - else if (num191 > 0f) + else if (targetXDirection > 0f) NPC.spriteDirection = 1; } } @@ -127,13 +127,13 @@ namespace CalamityMod.NPCs.Abyss spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); Vector2 vector = center - screenPos; vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/EidolonWyrmTailGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/EidolonWyrmTailGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); + vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow); Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/EidolonWyrmTailGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); + new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, halfSizeTexture, 1f, spriteEffects, 0f); } public override bool CheckActive() diff --git a/NPCs/Abyss/GiantSquid.cs b/NPCs/Abyss/GiantSquid.cs index 5edb35afd8..9806b3eafc 100644 --- a/NPCs/Abyss/GiantSquid.cs +++ b/NPCs/Abyss/GiantSquid.cs @@ -125,20 +125,20 @@ namespace CalamityMod.NPCs.Abyss { NPC.localAI[2] = 1f; NPC.velocity *= 0.975f; - float num263 = 1.6f; - if (NPC.velocity.X > -num263 && NPC.velocity.X < num263 && NPC.velocity.Y > -num263 && NPC.velocity.Y < num263) + float lungeThreshold = 1.6f; + if (NPC.velocity.X > -lungeThreshold && NPC.velocity.X < lungeThreshold && NPC.velocity.Y > -lungeThreshold && NPC.velocity.Y < lungeThreshold) { NPC.TargetClosest(true); - float num264 = CalamityWorld.death ? 24f : CalamityWorld.revenge ? 20f : 16f; - Vector2 vector31 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num265 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2) - vector31.X; - float num266 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2) - vector31.Y; - float num267 = (float)Math.Sqrt((double)(num265 * num265 + num266 * num266)); - num267 = num264 / num267; - num265 *= num267; - num266 *= num267; - NPC.velocity.X = num265; - NPC.velocity.Y = num266; + float lungeSpeed = CalamityWorld.death ? 24f : CalamityWorld.revenge ? 20f : 16f; + Vector2 lungeNPCPos = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float lungeTargetX = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2) - lungeNPCPos.X; + float lungeTargetY = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2) - lungeNPCPos.Y; + float lungeTargetDist = (float)Math.Sqrt((double)(lungeTargetX * lungeTargetX + lungeTargetY * lungeTargetY)); + lungeTargetDist = lungeSpeed / lungeTargetDist; + lungeTargetX *= lungeTargetDist; + lungeTargetY *= lungeTargetDist; + NPC.velocity.X = lungeTargetX; + NPC.velocity.Y = lungeTargetY; return; } } @@ -166,15 +166,15 @@ namespace CalamityMod.NPCs.Abyss NPC.ai[0] = -1f; } } - int num268 = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; - int num269 = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; - if (Main.tile[num268, num269 - 1].LiquidAmount > 128) + int npcTileX = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; + int npcTileY = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; + if (Main.tile[npcTileX, npcTileY - 1].LiquidAmount > 128) { - if (Main.tile[num268, num269 + 1].HasTile) + if (Main.tile[npcTileX, npcTileY + 1].HasTile) { NPC.ai[0] = -1f; } - else if (Main.tile[num268, num269 + 2].HasTile) + else if (Main.tile[npcTileX, npcTileY + 2].HasTile) { NPC.ai[0] = -1f; } diff --git a/NPCs/Abyss/GulperEelBody.cs b/NPCs/Abyss/GulperEelBody.cs index 910f9d5539..8fab0776de 100644 --- a/NPCs/Abyss/GulperEelBody.cs +++ b/NPCs/Abyss/GulperEelBody.cs @@ -87,39 +87,39 @@ namespace CalamityMod.NPCs.Abyss NPC.alpha = 0; } - Vector2 vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num191 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); - float num192 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); - num191 = (float)((int)(num191 / 16f) * 16); - num192 = (float)((int)(num192 / 16f) * 16); - vector18.X = (float)((int)(vector18.X / 16f) * 16); - vector18.Y = (float)((int)(vector18.Y / 16f) * 16); - num191 -= vector18.X; - num192 -= vector18.Y; - float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); + Vector2 segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float targetXDirection = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); + float targetYDirection = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); + targetXDirection = (float)((int)(targetXDirection / 16f) * 16); + targetYDirection = (float)((int)(targetYDirection / 16f) * 16); + segmentPosition.X = (float)((int)(segmentPosition.X / 16f) * 16); + segmentPosition.Y = (float)((int)(segmentPosition.Y / 16f) * 16); + targetXDirection -= segmentPosition.X; + targetYDirection -= segmentPosition.Y; + float targetDistance = (float)System.Math.Sqrt((double)(targetXDirection * targetXDirection + targetYDirection * targetYDirection)); if (NPC.ai[1] > 0f && NPC.ai[1] < (float)Main.npc.Length) { try { - vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - num191 = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - vector18.X; - num192 = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - vector18.Y; + segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + targetXDirection = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - segmentPosition.X; + targetYDirection = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - segmentPosition.Y; } catch { } - NPC.rotation = (float)System.Math.Atan2((double)num192, (double)num191) + 1.57f; - num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - int num194 = NPC.width; - num193 = (num193 - (float)num194) / num193; - num191 *= num193; - num192 *= num193; + NPC.rotation = (float)System.Math.Atan2((double)targetYDirection, (double)targetXDirection) + 1.57f; + targetDistance = (float)System.Math.Sqrt((double)(targetXDirection * targetXDirection + targetYDirection * targetYDirection)); + int segmentWidth = NPC.width; + targetDistance = (targetDistance - (float)segmentWidth) / targetDistance; + targetXDirection *= targetDistance; + targetYDirection *= targetDistance; NPC.velocity = Vector2.Zero; - NPC.position.X = NPC.position.X + num191; - NPC.position.Y = NPC.position.Y + num192; + NPC.position.X = NPC.position.X + targetXDirection; + NPC.position.Y = NPC.position.Y + targetYDirection; - if (num191 < 0f) + if (targetXDirection < 0f) NPC.spriteDirection = 1; - else if (num191 > 0f) + else if (targetXDirection > 0f) NPC.spriteDirection = -1; } } @@ -132,13 +132,13 @@ namespace CalamityMod.NPCs.Abyss spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); Vector2 vector = center - screenPos; vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/GulperEelBodyGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/GulperEelBodyGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, NPC.gfxOffY); + vector += halfSizeTexture * 1f + new Vector2(0f, NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Color.White); Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/GulperEelBodyGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); + new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, halfSizeTexture, 1f, spriteEffects, 0f); } public override bool CheckActive() diff --git a/NPCs/Abyss/GulperEelBodyAlt.cs b/NPCs/Abyss/GulperEelBodyAlt.cs index faf194b425..292bae06f1 100644 --- a/NPCs/Abyss/GulperEelBodyAlt.cs +++ b/NPCs/Abyss/GulperEelBodyAlt.cs @@ -87,39 +87,39 @@ namespace CalamityMod.NPCs.Abyss NPC.alpha = 0; } - Vector2 vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num191 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); - float num192 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); - num191 = (float)((int)(num191 / 16f) * 16); - num192 = (float)((int)(num192 / 16f) * 16); - vector18.X = (float)((int)(vector18.X / 16f) * 16); - vector18.Y = (float)((int)(vector18.Y / 16f) * 16); - num191 -= vector18.X; - num192 -= vector18.Y; - float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); + Vector2 segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float targetXDirection = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); + float targetYDirection = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); + targetXDirection = (float)((int)(targetXDirection / 16f) * 16); + targetYDirection = (float)((int)(targetYDirection / 16f) * 16); + segmentPosition.X = (float)((int)(segmentPosition.X / 16f) * 16); + segmentPosition.Y = (float)((int)(segmentPosition.Y / 16f) * 16); + targetXDirection -= segmentPosition.X; + targetYDirection -= segmentPosition.Y; + float targetDistance = (float)System.Math.Sqrt((double)(targetXDirection * targetXDirection + targetYDirection * targetYDirection)); if (NPC.ai[1] > 0f && NPC.ai[1] < (float)Main.npc.Length) { try { - vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - num191 = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - vector18.X; - num192 = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - vector18.Y; + segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + targetXDirection = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - segmentPosition.X; + targetYDirection = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - segmentPosition.Y; } catch { } - NPC.rotation = (float)System.Math.Atan2((double)num192, (double)num191) + 1.57f; - num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - int num194 = NPC.width; - num193 = (num193 - (float)num194) / num193; - num191 *= num193; - num192 *= num193; + NPC.rotation = (float)System.Math.Atan2((double)targetYDirection, (double)targetXDirection) + 1.57f; + targetDistance = (float)System.Math.Sqrt((double)(targetXDirection * targetXDirection + targetYDirection * targetYDirection)); + int segmentWidth = NPC.width; + targetDistance = (targetDistance - (float)segmentWidth) / targetDistance; + targetXDirection *= targetDistance; + targetYDirection *= targetDistance; NPC.velocity = Vector2.Zero; - NPC.position.X = NPC.position.X + num191; - NPC.position.Y = NPC.position.Y + num192; + NPC.position.X = NPC.position.X + targetXDirection; + NPC.position.Y = NPC.position.Y + targetYDirection; - if (num191 < 0f) + if (targetXDirection < 0f) NPC.spriteDirection = 1; - else if (num191 > 0f) + else if (targetXDirection > 0f) NPC.spriteDirection = -1; } } @@ -132,13 +132,13 @@ namespace CalamityMod.NPCs.Abyss spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); Vector2 vector = center - screenPos; vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/GulperEelBodyAltGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/GulperEelBodyAltGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); + vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow); Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/GulperEelBodyAltGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); + new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, halfSizeTexture, 1f, spriteEffects, 0f); } public override bool CheckActive() diff --git a/NPCs/Abyss/GulperEelHead.cs b/NPCs/Abyss/GulperEelHead.cs index eaac1c3142..98a75fac66 100644 --- a/NPCs/Abyss/GulperEelHead.cs +++ b/NPCs/Abyss/GulperEelHead.cs @@ -123,12 +123,12 @@ namespace CalamityMod.NPCs.Abyss if (!TailSpawned && NPC.ai[0] == 0f) { int Previous = NPC.whoAmI; - for (int num36 = 0; num36 < maxLength; num36++) + for (int segments = 0; segments < maxLength; segments++) { int lol; - if (num36 >= 0 && num36 < minLength) + if (segments >= 0 && segments < minLength) { - if (num36 == 0) + if (segments == 0) { lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); } @@ -173,154 +173,154 @@ namespace CalamityMod.NPCs.Abyss NPC.active = false; } - float num188 = speed; - float num189 = turnSpeed; - Vector2 vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float currentSpeed = speed; + float currentTurnSpeed = turnSpeed; + Vector2 segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); if (patrolSpot == Vector2.Zero) patrolSpot = Main.player[NPC.target].Center; - float num191 = detectsPlayer ? Main.player[NPC.target].Center.X : patrolSpot.X; - float num192 = detectsPlayer ? Main.player[NPC.target].Center.Y : patrolSpot.Y; + float targetXDirection = detectsPlayer ? Main.player[NPC.target].Center.X : patrolSpot.X; + float targetYDirection = detectsPlayer ? Main.player[NPC.target].Center.Y : patrolSpot.Y; if (!detectsPlayer) { - num192 += 500; - if (Math.Abs(NPC.Center.X - num191) < 300f) //500 + targetYDirection += 500; + if (Math.Abs(NPC.Center.X - targetXDirection) < 300f) //500 { if (NPC.velocity.X > 0f) { - num191 += 400f; + targetXDirection += 400f; } else { - num191 -= 400f; + targetXDirection -= 400f; } } } else { - num188 *= 1.5f; - num189 *= 1.5f; + currentSpeed *= 1.5f; + currentTurnSpeed *= 1.5f; } - float num48 = num188 * 1.3f; - float num49 = num188 * 0.7f; - float num50 = NPC.velocity.Length(); - if (num50 > 0f) + float maxCurrentSpeed = currentSpeed * 1.3f; + float minCurrentSpeed = currentSpeed * 0.7f; + float speedCompare = NPC.velocity.Length(); + if (speedCompare > 0f) { - if (num50 > num48) + if (speedCompare > maxCurrentSpeed) { NPC.velocity.Normalize(); - NPC.velocity *= num48; + NPC.velocity *= maxCurrentSpeed; } - else if (num50 < num49) + else if (speedCompare < minCurrentSpeed) { NPC.velocity.Normalize(); - NPC.velocity *= num49; + NPC.velocity *= minCurrentSpeed; } } - num191 = (float)((int)(num191 / 16f) * 16); - num192 = (float)((int)(num192 / 16f) * 16); - vector18.X = (float)((int)(vector18.X / 16f) * 16); - vector18.Y = (float)((int)(vector18.Y / 16f) * 16); - num191 -= vector18.X; - num192 -= vector18.Y; - float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - float num196 = System.Math.Abs(num191); - float num197 = System.Math.Abs(num192); - float num198 = num188 / num193; - num191 *= num198; - num192 *= num198; - if ((NPC.velocity.X > 0f && num191 > 0f) || (NPC.velocity.X < 0f && num191 < 0f) || (NPC.velocity.Y > 0f && num192 > 0f) || (NPC.velocity.Y < 0f && num192 < 0f)) + targetXDirection = (float)((int)(targetXDirection / 16f) * 16); + targetYDirection = (float)((int)(targetYDirection / 16f) * 16); + segmentPosition.X = (float)((int)(segmentPosition.X / 16f) * 16); + segmentPosition.Y = (float)((int)(segmentPosition.Y / 16f) * 16); + targetXDirection -= segmentPosition.X; + targetYDirection -= segmentPosition.Y; + float targetDistance = (float)System.Math.Sqrt((double)(targetXDirection * targetXDirection + targetYDirection * targetYDirection)); + float absoluteTargetX = System.Math.Abs(targetXDirection); + float absoluteTargetY = System.Math.Abs(targetYDirection); + float timeToReachTarget = currentSpeed / targetDistance; + targetXDirection *= timeToReachTarget; + targetYDirection *= timeToReachTarget; + if ((NPC.velocity.X > 0f && targetXDirection > 0f) || (NPC.velocity.X < 0f && targetXDirection < 0f) || (NPC.velocity.Y > 0f && targetYDirection > 0f) || (NPC.velocity.Y < 0f && targetYDirection < 0f)) { - if (NPC.velocity.X < num191) + if (NPC.velocity.X < targetXDirection) { - NPC.velocity.X = NPC.velocity.X + num189; + NPC.velocity.X = NPC.velocity.X + currentTurnSpeed; } else { - if (NPC.velocity.X > num191) + if (NPC.velocity.X > targetXDirection) { - NPC.velocity.X = NPC.velocity.X - num189; + NPC.velocity.X = NPC.velocity.X - currentTurnSpeed; } } - if (NPC.velocity.Y < num192) + if (NPC.velocity.Y < targetYDirection) { - NPC.velocity.Y = NPC.velocity.Y + num189; + NPC.velocity.Y = NPC.velocity.Y + currentTurnSpeed; } else { - if (NPC.velocity.Y > num192) + if (NPC.velocity.Y > targetYDirection) { - NPC.velocity.Y = NPC.velocity.Y - num189; + NPC.velocity.Y = NPC.velocity.Y - currentTurnSpeed; } } - if ((double)System.Math.Abs(num192) < (double)num188 * 0.2 && ((NPC.velocity.X > 0f && num191 < 0f) || (NPC.velocity.X < 0f && num191 > 0f))) + if ((double)System.Math.Abs(targetYDirection) < (double)currentSpeed * 0.2 && ((NPC.velocity.X > 0f && targetXDirection < 0f) || (NPC.velocity.X < 0f && targetXDirection > 0f))) { if (NPC.velocity.Y > 0f) { - NPC.velocity.Y = NPC.velocity.Y + num189 * 2f; + NPC.velocity.Y = NPC.velocity.Y + currentTurnSpeed * 2f; } else { - NPC.velocity.Y = NPC.velocity.Y - num189 * 2f; + NPC.velocity.Y = NPC.velocity.Y - currentTurnSpeed * 2f; } } - if ((double)System.Math.Abs(num191) < (double)num188 * 0.2 && ((NPC.velocity.Y > 0f && num192 < 0f) || (NPC.velocity.Y < 0f && num192 > 0f))) + if ((double)System.Math.Abs(targetXDirection) < (double)currentSpeed * 0.2 && ((NPC.velocity.Y > 0f && targetYDirection < 0f) || (NPC.velocity.Y < 0f && targetYDirection > 0f))) { if (NPC.velocity.X > 0f) { - NPC.velocity.X = NPC.velocity.X + num189 * 2f; //changed from 2 + NPC.velocity.X = NPC.velocity.X + currentTurnSpeed * 2f; //changed from 2 } else { - NPC.velocity.X = NPC.velocity.X - num189 * 2f; //changed from 2 + NPC.velocity.X = NPC.velocity.X - currentTurnSpeed * 2f; //changed from 2 } } } else { - if (num196 > num197) + if (absoluteTargetX > absoluteTargetY) { - if (NPC.velocity.X < num191) + if (NPC.velocity.X < targetXDirection) { - NPC.velocity.X = NPC.velocity.X + num189 * 1.1f; //changed from 1.1 + NPC.velocity.X = NPC.velocity.X + currentTurnSpeed * 1.1f; //changed from 1.1 } - else if (NPC.velocity.X > num191) + else if (NPC.velocity.X > targetXDirection) { - NPC.velocity.X = NPC.velocity.X - num189 * 1.1f; //changed from 1.1 + NPC.velocity.X = NPC.velocity.X - currentTurnSpeed * 1.1f; //changed from 1.1 } - if ((double)(System.Math.Abs(NPC.velocity.X) + System.Math.Abs(NPC.velocity.Y)) < (double)num188 * 0.5) + if ((double)(System.Math.Abs(NPC.velocity.X) + System.Math.Abs(NPC.velocity.Y)) < (double)currentSpeed * 0.5) { if (NPC.velocity.Y > 0f) { - NPC.velocity.Y = NPC.velocity.Y + num189; + NPC.velocity.Y = NPC.velocity.Y + currentTurnSpeed; } else { - NPC.velocity.Y = NPC.velocity.Y - num189; + NPC.velocity.Y = NPC.velocity.Y - currentTurnSpeed; } } } else { - if (NPC.velocity.Y < num192) + if (NPC.velocity.Y < targetYDirection) { - NPC.velocity.Y = NPC.velocity.Y + num189 * 1.1f; + NPC.velocity.Y = NPC.velocity.Y + currentTurnSpeed * 1.1f; } - else if (NPC.velocity.Y > num192) + else if (NPC.velocity.Y > targetYDirection) { - NPC.velocity.Y = NPC.velocity.Y - num189 * 1.1f; + NPC.velocity.Y = NPC.velocity.Y - currentTurnSpeed * 1.1f; } - if ((double)(System.Math.Abs(NPC.velocity.X) + System.Math.Abs(NPC.velocity.Y)) < (double)num188 * 0.5) + if ((double)(System.Math.Abs(NPC.velocity.X) + System.Math.Abs(NPC.velocity.Y)) < (double)currentSpeed * 0.5) { if (NPC.velocity.X > 0f) { - NPC.velocity.X = NPC.velocity.X + num189; + NPC.velocity.X = NPC.velocity.X + currentTurnSpeed; } else { - NPC.velocity.X = NPC.velocity.X - num189; + NPC.velocity.X = NPC.velocity.X - currentTurnSpeed; } } } @@ -345,13 +345,13 @@ namespace CalamityMod.NPCs.Abyss spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); Vector2 vector = center - screenPos; vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/GulperEelHeadGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/GulperEelHeadGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); + vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow); Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/GulperEelHeadGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); + new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, halfSizeTexture, 1f, spriteEffects, 0f); } public override float SpawnChance(NPCSpawnInfo spawnInfo) diff --git a/NPCs/Abyss/GulperEelTail.cs b/NPCs/Abyss/GulperEelTail.cs index bab56e99fc..7381e75b4f 100644 --- a/NPCs/Abyss/GulperEelTail.cs +++ b/NPCs/Abyss/GulperEelTail.cs @@ -87,39 +87,39 @@ namespace CalamityMod.NPCs.Abyss NPC.alpha = 0; } - Vector2 vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num191 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); - float num192 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); - num191 = (float)((int)(num191 / 16f) * 16); - num192 = (float)((int)(num192 / 16f) * 16); - vector18.X = (float)((int)(vector18.X / 16f) * 16); - vector18.Y = (float)((int)(vector18.Y / 16f) * 16); - num191 -= vector18.X; - num192 -= vector18.Y; - float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); + Vector2 segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float targetXDirection = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); + float targetYDirection = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); + targetXDirection = (float)((int)(targetXDirection / 16f) * 16); + targetYDirection = (float)((int)(targetYDirection / 16f) * 16); + segmentPosition.X = (float)((int)(segmentPosition.X / 16f) * 16); + segmentPosition.Y = (float)((int)(segmentPosition.Y / 16f) * 16); + targetXDirection -= segmentPosition.X; + targetYDirection -= segmentPosition.Y; + float targetDistance = (float)System.Math.Sqrt((double)(targetXDirection * targetXDirection + targetYDirection * targetYDirection)); if (NPC.ai[1] > 0f && NPC.ai[1] < (float)Main.npc.Length) { try { - vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - num191 = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - vector18.X; - num192 = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - vector18.Y; + segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + targetXDirection = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - segmentPosition.X; + targetYDirection = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - segmentPosition.Y; } catch { } - NPC.rotation = (float)System.Math.Atan2((double)num192, (double)num191) + 1.57f; - num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - int num194 = NPC.width; - num193 = (num193 - (float)num194) / num193; - num191 *= num193; - num192 *= num193; + NPC.rotation = (float)System.Math.Atan2((double)targetYDirection, (double)targetXDirection) + 1.57f; + targetDistance = (float)System.Math.Sqrt((double)(targetXDirection * targetXDirection + targetYDirection * targetYDirection)); + int segmentWidth = NPC.width; + targetDistance = (targetDistance - (float)segmentWidth) / targetDistance; + targetXDirection *= targetDistance; + targetYDirection *= targetDistance; NPC.velocity = Vector2.Zero; - NPC.position.X = NPC.position.X + num191; - NPC.position.Y = NPC.position.Y + num192; + NPC.position.X = NPC.position.X + targetXDirection; + NPC.position.Y = NPC.position.Y + targetYDirection; - if (num191 < 0f) + if (targetXDirection < 0f) NPC.spriteDirection = 1; - else if (num191 > 0f) + else if (targetXDirection > 0f) NPC.spriteDirection = -1; } } @@ -132,13 +132,13 @@ namespace CalamityMod.NPCs.Abyss spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); Vector2 vector = center - screenPos; vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/Abyss/GulperEelTailGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/Abyss/GulperEelTailGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); + vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow); Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/Abyss/GulperEelTailGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); + new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, halfSizeTexture, 1f, spriteEffects, 0f); } public override bool CheckActive() diff --git a/NPCs/Abyss/LuminousCorvina.cs b/NPCs/Abyss/LuminousCorvina.cs index d9f0601f21..d0b2b2bc6d 100644 --- a/NPCs/Abyss/LuminousCorvina.cs +++ b/NPCs/Abyss/LuminousCorvina.cs @@ -91,13 +91,13 @@ namespace CalamityMod.NPCs.Abyss NPC.chaseable = hasBeenHit; if (NPC.wet) { - bool flag14 = hasBeenHit; + bool canAttack = hasBeenHit; NPC.TargetClosest(false); if ((Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height) && ((NPC.Center.X - 15f < Main.player[NPC.target].Center.X && NPC.direction == 1) || (NPC.Center.X + 15f > Main.player[NPC.target].Center.X && NPC.direction == -1))) || (Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].position, - Main.player[NPC.target].width, Main.player[NPC.target].height) && flag14)) + Main.player[NPC.target].width, Main.player[NPC.target].height) && canAttack)) { ++screamTimer; @@ -122,7 +122,7 @@ namespace CalamityMod.NPCs.Abyss return; } } - if ((!Main.player[NPC.target].wet || Main.player[NPC.target].dead) && flag14) + if ((!Main.player[NPC.target].wet || Main.player[NPC.target].dead) && canAttack) { } if (NPC.collideX) @@ -168,15 +168,15 @@ namespace CalamityMod.NPCs.Abyss NPC.ai[0] = -1f; } } - int num258 = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; - int num259 = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; - if (Main.tile[num258, num259 - 1].LiquidAmount > 128) + int npcTileX = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; + int npcTileY = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; + if (Main.tile[npcTileX, npcTileY - 1].LiquidAmount > 128) { - if (Main.tile[num258, num259 + 1].HasTile) + if (Main.tile[npcTileX, npcTileY + 1].HasTile) { NPC.ai[0] = -1f; } - else if (Main.tile[num258, num259 + 2].HasTile) + else if (Main.tile[npcTileX, npcTileY + 2].HasTile) { NPC.ai[0] = -1f; } diff --git a/NPCs/Abyss/MirageJelly.cs b/NPCs/Abyss/MirageJelly.cs index 37670fd456..8005102f35 100644 --- a/NPCs/Abyss/MirageJelly.cs +++ b/NPCs/Abyss/MirageJelly.cs @@ -107,41 +107,41 @@ namespace CalamityMod.NPCs.Abyss { teleporting = false; NPC.TargetClosest(true); - int num1249 = 0; - int num1250; - int num1251; + int teleportTries = 0; + int teleportTileX; + int teleportTileY; while (true) { - num1249++; - num1250 = (int)player.Center.X / 16; - num1251 = (int)player.Center.Y / 16; + teleportTries++; + teleportTileX = (int)player.Center.X / 16; + teleportTileY = (int)player.Center.Y / 16; int min = 6; int max = 9; if (Main.rand.NextBool()) - num1250 += Main.rand.Next(min, max); + teleportTileX += Main.rand.Next(min, max); else - num1250 -= Main.rand.Next(min, max); + teleportTileX -= Main.rand.Next(min, max); min = 11; max = 26; - num1251 += Main.rand.Next(min, max); + teleportTileY += Main.rand.Next(min, max); - if (!WorldGen.SolidTile(num1250, num1251) && Collision.CanHit(new Vector2((float)(num1250 * 16), (float)(num1251 * 16)), 1, 1, player.position, player.width, player.height) && - Main.tile[num1250, num1251].LiquidAmount > 204) + if (!WorldGen.SolidTile(teleportTileX, teleportTileY) && Collision.CanHit(new Vector2((float)(teleportTileX * 16), (float)(teleportTileY * 16)), 1, 1, player.position, player.width, player.height) && + Main.tile[teleportTileX, teleportTileY].LiquidAmount > 204) { break; } - if (num1249 > 100) + if (teleportTries > 100) { goto Block; } } NPC.ai[0] = 1f; - NPC.ai[1] = (float)num1250; - NPC.ai[2] = (float)num1251; + NPC.ai[1] = (float)teleportTileX; + NPC.ai[2] = (float)teleportTileY; NPC.netUpdate = true; Block: ; diff --git a/NPCs/Abyss/OarfishBody.cs b/NPCs/Abyss/OarfishBody.cs index b1a9017a0a..71dad1d575 100644 --- a/NPCs/Abyss/OarfishBody.cs +++ b/NPCs/Abyss/OarfishBody.cs @@ -84,39 +84,39 @@ namespace CalamityMod.NPCs.Abyss NPC.alpha = 0; } - Vector2 vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num191 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); - float num192 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); - num191 = (float)((int)(num191 / 16f) * 16); - num192 = (float)((int)(num192 / 16f) * 16); - vector18.X = (float)((int)(vector18.X / 16f) * 16); - vector18.Y = (float)((int)(vector18.Y / 16f) * 16); - num191 -= vector18.X; - num192 -= vector18.Y; - float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); + Vector2 segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float targetXDirection = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); + float targetYDirection = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); + targetXDirection = (float)((int)(targetXDirection / 16f) * 16); + targetYDirection = (float)((int)(targetYDirection / 16f) * 16); + segmentPosition.X = (float)((int)(segmentPosition.X / 16f) * 16); + segmentPosition.Y = (float)((int)(segmentPosition.Y / 16f) * 16); + targetXDirection -= segmentPosition.X; + targetYDirection -= segmentPosition.Y; + float targetDistance = (float)System.Math.Sqrt((double)(targetXDirection * targetXDirection + targetYDirection * targetYDirection)); if (NPC.ai[1] > 0f && NPC.ai[1] < (float)Main.npc.Length) { try { - vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - num191 = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - vector18.X; - num192 = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - vector18.Y; + segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + targetXDirection = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - segmentPosition.X; + targetYDirection = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - segmentPosition.Y; } catch { } - NPC.rotation = (float)System.Math.Atan2((double)num192, (double)num191) + 1.57f; - num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - int num194 = NPC.width; - num193 = (num193 - (float)num194) / num193; - num191 *= num193; - num192 *= num193; + NPC.rotation = (float)System.Math.Atan2((double)targetYDirection, (double)targetXDirection) + 1.57f; + targetDistance = (float)System.Math.Sqrt((double)(targetXDirection * targetXDirection + targetYDirection * targetYDirection)); + int segmentWidth = NPC.width; + targetDistance = (targetDistance - (float)segmentWidth) / targetDistance; + targetXDirection *= targetDistance; + targetYDirection *= targetDistance; NPC.velocity = Vector2.Zero; - NPC.position.X = NPC.position.X + num191; - NPC.position.Y = NPC.position.Y + num192; + NPC.position.X = NPC.position.X + targetXDirection; + NPC.position.Y = NPC.position.Y + targetYDirection; - if (num191 < 0f) + if (targetXDirection < 0f) NPC.spriteDirection = -1; - else if (num191 > 0f) + else if (targetXDirection > 0f) NPC.spriteDirection = 1; } } diff --git a/NPCs/Abyss/OarfishHead.cs b/NPCs/Abyss/OarfishHead.cs index 3c563516ad..2f17785853 100644 --- a/NPCs/Abyss/OarfishHead.cs +++ b/NPCs/Abyss/OarfishHead.cs @@ -116,10 +116,10 @@ namespace CalamityMod.NPCs.Abyss if (!TailSpawned && NPC.ai[0] == 0f) { int Previous = NPC.whoAmI; - for (int num36 = 0; num36 < maxLength; num36++) + for (int segments = 0; segments < maxLength; segments++) { int lol; - if (num36 >= 0 && num36 < minLength) + if (segments >= 0 && segments < minLength) { lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); } @@ -153,154 +153,154 @@ namespace CalamityMod.NPCs.Abyss if (Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > 5600f) NPC.active = false; - float num188 = speed; - float num189 = turnSpeed; - Vector2 vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float currentSpeed = speed; + float currentTurnSpeed = turnSpeed; + Vector2 segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); if (patrolSpot == Vector2.Zero) patrolSpot = Main.player[NPC.target].Center; - float num191 = detectsPlayer ? Main.player[NPC.target].Center.X : patrolSpot.X; - float num192 = detectsPlayer ? Main.player[NPC.target].Center.Y : patrolSpot.Y; + float targetXDirection = detectsPlayer ? Main.player[NPC.target].Center.X : patrolSpot.X; + float targetYDirection = detectsPlayer ? Main.player[NPC.target].Center.Y : patrolSpot.Y; if (!detectsPlayer) { - num192 += 300; - if (Math.Abs(NPC.Center.X - num191) < 250f) //500 + targetYDirection += 300; + if (Math.Abs(NPC.Center.X - targetXDirection) < 250f) //500 { if (NPC.velocity.X > 0f) { - num191 += 300f; + targetXDirection += 300f; } else { - num191 -= 300f; + targetXDirection -= 300f; } } } else { - num188 *= 1.5f; - num189 *= 1.5f; + currentSpeed *= 1.5f; + currentTurnSpeed *= 1.5f; } - float num48 = num188 * 1.3f; - float num49 = num188 * 0.7f; - float num50 = NPC.velocity.Length(); - if (num50 > 0f) + float maxCurrentSpeed = currentSpeed * 1.3f; + float minCurrentSpeed = currentSpeed * 0.7f; + float currentSpeedCheck = NPC.velocity.Length(); + if (currentSpeedCheck > 0f) { - if (num50 > num48) + if (currentSpeedCheck > maxCurrentSpeed) { NPC.velocity.Normalize(); - NPC.velocity *= num48; + NPC.velocity *= maxCurrentSpeed; } - else if (num50 < num49) + else if (currentSpeedCheck < minCurrentSpeed) { NPC.velocity.Normalize(); - NPC.velocity *= num49; + NPC.velocity *= minCurrentSpeed; } } - num191 = (float)((int)(num191 / 16f) * 16); - num192 = (float)((int)(num192 / 16f) * 16); - vector18.X = (float)((int)(vector18.X / 16f) * 16); - vector18.Y = (float)((int)(vector18.Y / 16f) * 16); - num191 -= vector18.X; - num192 -= vector18.Y; - float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - float num196 = System.Math.Abs(num191); - float num197 = System.Math.Abs(num192); - float num198 = num188 / num193; - num191 *= num198; - num192 *= num198; - if ((NPC.velocity.X > 0f && num191 > 0f) || (NPC.velocity.X < 0f && num191 < 0f) || (NPC.velocity.Y > 0f && num192 > 0f) || (NPC.velocity.Y < 0f && num192 < 0f)) + targetXDirection = (float)((int)(targetXDirection / 16f) * 16); + targetYDirection = (float)((int)(targetYDirection / 16f) * 16); + segmentPosition.X = (float)((int)(segmentPosition.X / 16f) * 16); + segmentPosition.Y = (float)((int)(segmentPosition.Y / 16f) * 16); + targetXDirection -= segmentPosition.X; + targetYDirection -= segmentPosition.Y; + float targetDistance = (float)System.Math.Sqrt((double)(targetXDirection * targetXDirection + targetYDirection * targetYDirection)); + float absoluteTargetX = System.Math.Abs(targetXDirection); + float absoluteTargetY = System.Math.Abs(targetYDirection); + float timeToReachTarget = currentSpeed / targetDistance; + targetXDirection *= timeToReachTarget; + targetYDirection *= timeToReachTarget; + if ((NPC.velocity.X > 0f && targetXDirection > 0f) || (NPC.velocity.X < 0f && targetXDirection < 0f) || (NPC.velocity.Y > 0f && targetYDirection > 0f) || (NPC.velocity.Y < 0f && targetYDirection < 0f)) { - if (NPC.velocity.X < num191) + if (NPC.velocity.X < targetXDirection) { - NPC.velocity.X = NPC.velocity.X + num189; + NPC.velocity.X = NPC.velocity.X + currentTurnSpeed; } else { - if (NPC.velocity.X > num191) + if (NPC.velocity.X > targetXDirection) { - NPC.velocity.X = NPC.velocity.X - num189; + NPC.velocity.X = NPC.velocity.X - currentTurnSpeed; } } - if (NPC.velocity.Y < num192) + if (NPC.velocity.Y < targetYDirection) { - NPC.velocity.Y = NPC.velocity.Y + num189; + NPC.velocity.Y = NPC.velocity.Y + currentTurnSpeed; } else { - if (NPC.velocity.Y > num192) + if (NPC.velocity.Y > targetYDirection) { - NPC.velocity.Y = NPC.velocity.Y - num189; + NPC.velocity.Y = NPC.velocity.Y - currentTurnSpeed; } } - if ((double)System.Math.Abs(num192) < (double)num188 * 0.2 && ((NPC.velocity.X > 0f && num191 < 0f) || (NPC.velocity.X < 0f && num191 > 0f))) + if ((double)System.Math.Abs(targetYDirection) < (double)currentSpeed * 0.2 && ((NPC.velocity.X > 0f && targetXDirection < 0f) || (NPC.velocity.X < 0f && targetXDirection > 0f))) { if (NPC.velocity.Y > 0f) { - NPC.velocity.Y = NPC.velocity.Y + num189 * 2f; + NPC.velocity.Y = NPC.velocity.Y + currentTurnSpeed * 2f; } else { - NPC.velocity.Y = NPC.velocity.Y - num189 * 2f; + NPC.velocity.Y = NPC.velocity.Y - currentTurnSpeed * 2f; } } - if ((double)System.Math.Abs(num191) < (double)num188 * 0.2 && ((NPC.velocity.Y > 0f && num192 < 0f) || (NPC.velocity.Y < 0f && num192 > 0f))) + if ((double)System.Math.Abs(targetXDirection) < (double)currentSpeed * 0.2 && ((NPC.velocity.Y > 0f && targetYDirection < 0f) || (NPC.velocity.Y < 0f && targetYDirection > 0f))) { if (NPC.velocity.X > 0f) { - NPC.velocity.X = NPC.velocity.X + num189 * 2f; //changed from 2 + NPC.velocity.X = NPC.velocity.X + currentTurnSpeed * 2f; //changed from 2 } else { - NPC.velocity.X = NPC.velocity.X - num189 * 2f; //changed from 2 + NPC.velocity.X = NPC.velocity.X - currentTurnSpeed * 2f; //changed from 2 } } } else { - if (num196 > num197) + if (absoluteTargetX > absoluteTargetY) { - if (NPC.velocity.X < num191) + if (NPC.velocity.X < targetXDirection) { - NPC.velocity.X = NPC.velocity.X + num189 * 1.1f; //changed from 1.1 + NPC.velocity.X = NPC.velocity.X + currentTurnSpeed * 1.1f; //changed from 1.1 } - else if (NPC.velocity.X > num191) + else if (NPC.velocity.X > targetXDirection) { - NPC.velocity.X = NPC.velocity.X - num189 * 1.1f; //changed from 1.1 + NPC.velocity.X = NPC.velocity.X - currentTurnSpeed * 1.1f; //changed from 1.1 } - if ((double)(System.Math.Abs(NPC.velocity.X) + System.Math.Abs(NPC.velocity.Y)) < (double)num188 * 0.5) + if ((double)(System.Math.Abs(NPC.velocity.X) + System.Math.Abs(NPC.velocity.Y)) < (double)currentSpeed * 0.5) { if (NPC.velocity.Y > 0f) { - NPC.velocity.Y = NPC.velocity.Y + num189; + NPC.velocity.Y = NPC.velocity.Y + currentTurnSpeed; } else { - NPC.velocity.Y = NPC.velocity.Y - num189; + NPC.velocity.Y = NPC.velocity.Y - currentTurnSpeed; } } } else { - if (NPC.velocity.Y < num192) + if (NPC.velocity.Y < targetYDirection) { - NPC.velocity.Y = NPC.velocity.Y + num189 * 1.1f; + NPC.velocity.Y = NPC.velocity.Y + currentTurnSpeed * 1.1f; } - else if (NPC.velocity.Y > num192) + else if (NPC.velocity.Y > targetYDirection) { - NPC.velocity.Y = NPC.velocity.Y - num189 * 1.1f; + NPC.velocity.Y = NPC.velocity.Y - currentTurnSpeed * 1.1f; } - if ((double)(System.Math.Abs(NPC.velocity.X) + System.Math.Abs(NPC.velocity.Y)) < (double)num188 * 0.5) + if ((double)(System.Math.Abs(NPC.velocity.X) + System.Math.Abs(NPC.velocity.Y)) < (double)currentSpeed * 0.5) { if (NPC.velocity.X > 0f) { - NPC.velocity.X = NPC.velocity.X + num189; + NPC.velocity.X = NPC.velocity.X + currentTurnSpeed; } else { - NPC.velocity.X = NPC.velocity.X - num189; + NPC.velocity.X = NPC.velocity.X - currentTurnSpeed; } } } diff --git a/NPCs/Abyss/OarfishTail.cs b/NPCs/Abyss/OarfishTail.cs index 01db892718..f9bf228a3c 100644 --- a/NPCs/Abyss/OarfishTail.cs +++ b/NPCs/Abyss/OarfishTail.cs @@ -84,39 +84,39 @@ namespace CalamityMod.NPCs.Abyss NPC.alpha = 0; } - Vector2 vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num191 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); - float num192 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); - num191 = (float)((int)(num191 / 16f) * 16); - num192 = (float)((int)(num192 / 16f) * 16); - vector18.X = (float)((int)(vector18.X / 16f) * 16); - vector18.Y = (float)((int)(vector18.Y / 16f) * 16); - num191 -= vector18.X; - num192 -= vector18.Y; - float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); + Vector2 segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float targetXDirection = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); + float targetYDirection = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); + targetXDirection = (float)((int)(targetXDirection / 16f) * 16); + targetYDirection = (float)((int)(targetYDirection / 16f) * 16); + segmentPosition.X = (float)((int)(segmentPosition.X / 16f) * 16); + segmentPosition.Y = (float)((int)(segmentPosition.Y / 16f) * 16); + targetXDirection -= segmentPosition.X; + targetYDirection -= segmentPosition.Y; + float targetDistance = (float)System.Math.Sqrt((double)(targetXDirection * targetXDirection + targetYDirection * targetYDirection)); if (NPC.ai[1] > 0f && NPC.ai[1] < (float)Main.npc.Length) { try { - vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - num191 = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - vector18.X; - num192 = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - vector18.Y; + segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + targetXDirection = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - segmentPosition.X; + targetYDirection = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - segmentPosition.Y; } catch { } - NPC.rotation = (float)System.Math.Atan2((double)num192, (double)num191) + 1.57f; - num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - int num194 = NPC.width; - num193 = (num193 - (float)num194) / num193; - num191 *= num193; - num192 *= num193; + NPC.rotation = (float)System.Math.Atan2((double)targetYDirection, (double)targetXDirection) + 1.57f; + targetDistance = (float)System.Math.Sqrt((double)(targetXDirection * targetXDirection + targetYDirection * targetYDirection)); + int segmentWidth = NPC.width; + targetDistance = (targetDistance - (float)segmentWidth) / targetDistance; + targetXDirection *= targetDistance; + targetYDirection *= targetDistance; NPC.velocity = Vector2.Zero; - NPC.position.X = NPC.position.X + num191; - NPC.position.Y = NPC.position.Y + num192; + NPC.position.X = NPC.position.X + targetXDirection; + NPC.position.Y = NPC.position.Y + targetYDirection; - if (num191 < 0f) + if (targetXDirection < 0f) NPC.spriteDirection = -1; - else if (num191 > 0f) + else if (targetXDirection > 0f) NPC.spriteDirection = 1; } } diff --git a/NPCs/Abyss/ReaperShark.cs b/NPCs/Abyss/ReaperShark.cs index 13e6a10229..1f7b10c7a0 100644 --- a/NPCs/Abyss/ReaperShark.cs +++ b/NPCs/Abyss/ReaperShark.cs @@ -163,7 +163,7 @@ namespace CalamityMod.NPCs.Abyss } if (NPC.wet || NPC.noTileCollide) { - bool flag14 = hasBeenHit; + bool canAttack = hasBeenHit; NPC.TargetClosest(false); @@ -175,7 +175,7 @@ namespace CalamityMod.NPCs.Abyss hasBeenHit = true; } - if (!flag14) + if (!canAttack) { if (!Collision.SolidCollision(NPC.position, NPC.width, NPC.height)) { @@ -204,7 +204,7 @@ namespace CalamityMod.NPCs.Abyss } } } - if (flag14) + if (canAttack) { if (NPC.ai[3] > 0f && !Collision.SolidCollision(NPC.position, NPC.width, NPC.height)) { @@ -283,15 +283,15 @@ namespace CalamityMod.NPCs.Abyss } } } - int num258 = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; - int num259 = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; - if (Main.tile[num258, num259 - 1].LiquidAmount > 128) + int npcTileX = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; + int npcTileY = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; + if (Main.tile[npcTileX, npcTileY - 1].LiquidAmount > 128) { - if (Main.tile[num258, num259 + 1].HasTile) + if (Main.tile[npcTileX, npcTileY + 1].HasTile) { NPC.ai[0] = -1f; } - else if (Main.tile[num258, num259 + 2].HasTile) + else if (Main.tile[npcTileX, npcTileY + 2].HasTile) { NPC.ai[0] = -1f; } @@ -346,14 +346,11 @@ namespace CalamityMod.NPCs.Abyss NPC.netUpdate = true; } bool expertMode = Main.expertMode; - int num2 = 30; - float num3 = expertMode ? 0.4f : 0.35f; - float scaleFactor = expertMode ? 6f : 5.5f; - int num4 = expertMode ? 28 : 30; - float num5 = expertMode ? 12f : 11f; - int num9 = 90; - int num16 = 75; - Vector2 vector = NPC.Center; + float chargeAcceleration = expertMode ? 0.4f : 0.35f; + float chargeThreshold = expertMode ? 6f : 5.5f; + int phase2Delay = expertMode ? 28 : 30; + float chargeVelocity = expertMode ? 12f : 11f; + Vector2 shorkCenter = NPC.Center; Player player = Main.player[NPC.target]; if (NPC.target < 0 || NPC.target == Main.maxPlayers || player.dead || !player.active) { @@ -361,7 +358,7 @@ namespace CalamityMod.NPCs.Abyss player = Main.player[NPC.target]; NPC.netUpdate = true; } - if (player.dead || Vector2.Distance(player.Center, vector) > 5600f) + if (player.dead || Vector2.Distance(player.Center, shorkCenter) > 5600f) { NPC.velocity.Y = NPC.velocity.Y + 0.4f; if (NPC.timeLeft > 10) @@ -382,53 +379,53 @@ namespace CalamityMod.NPCs.Abyss NPC.netUpdate = true; } } - float num17 = (float)Math.Atan2((double)(player.Center.Y - vector.Y), (double)(player.Center.X - vector.X)); + float getRotatedIdiot = (float)Math.Atan2((double)(player.Center.Y - shorkCenter.Y), (double)(player.Center.X - shorkCenter.X)); if (NPC.spriteDirection == 1) { - num17 += 3.14159274f; + getRotatedIdiot += 3.14159274f; } - if (num17 < 0f) + if (getRotatedIdiot < 0f) { - num17 += 6.28318548f; + getRotatedIdiot += 6.28318548f; } - if (num17 > 6.28318548f) + if (getRotatedIdiot > 6.28318548f) { - num17 -= 6.28318548f; + getRotatedIdiot -= 6.28318548f; } if (NPC.ai[0] == -1f) { - num17 = 0f; + getRotatedIdiot = 0f; } - float num18 = 0.04f; + float rotationSpeed = 0.04f; if (NPC.ai[0] == 1f) { - num18 = 0f; + rotationSpeed = 0f; } - if (NPC.rotation < num17) + if (NPC.rotation < getRotatedIdiot) { - if ((double)(num17 - NPC.rotation) > 3.1415926535897931) + if ((double)(getRotatedIdiot - NPC.rotation) > 3.1415926535897931) { - NPC.rotation -= num18; + NPC.rotation -= rotationSpeed; } else { - NPC.rotation += num18; + NPC.rotation += rotationSpeed; } } - if (NPC.rotation > num17) + if (NPC.rotation > getRotatedIdiot) { - if ((double)(NPC.rotation - num17) > 3.1415926535897931) + if ((double)(NPC.rotation - getRotatedIdiot) > 3.1415926535897931) { - NPC.rotation += num18; + NPC.rotation += rotationSpeed; } else { - NPC.rotation -= num18; + NPC.rotation -= rotationSpeed; } } - if (NPC.rotation > num17 - num18 && NPC.rotation < num17 + num18) + if (NPC.rotation > getRotatedIdiot - rotationSpeed && NPC.rotation < getRotatedIdiot + rotationSpeed) { - NPC.rotation = num17; + NPC.rotation = getRotatedIdiot; } if (NPC.rotation < 0f) { @@ -438,9 +435,9 @@ namespace CalamityMod.NPCs.Abyss { NPC.rotation -= 6.28318548f; } - if (NPC.rotation > num17 - num18 && NPC.rotation < num17 + num18) + if (NPC.rotation > getRotatedIdiot - rotationSpeed && NPC.rotation < getRotatedIdiot + rotationSpeed) { - NPC.rotation = num17; + NPC.rotation = getRotatedIdiot; } if (NPC.ai[0] != -1f) { @@ -466,10 +463,10 @@ namespace CalamityMod.NPCs.Abyss NPC.dontTakeDamage = true; NPC.chaseable = false; NPC.velocity *= 0.98f; - int num19 = Math.Sign(player.Center.X - vector.X); - if (num19 != 0) + int spriteFaceDirection = Math.Sign(player.Center.X - shorkCenter.X); + if (spriteFaceDirection != 0) { - NPC.direction = num19; + NPC.direction = spriteFaceDirection; NPC.spriteDirection = -NPC.direction; } if (NPC.ai[2] > 20f) @@ -489,22 +486,22 @@ namespace CalamityMod.NPCs.Abyss NPC.alpha = 150; } } - if (NPC.ai[2] == (float)(num9 - 30)) + if (NPC.ai[2] == 60f) { - int num20 = 36; - for (int i = 0; i < num20; i++) + int dustAmt = 36; + for (int i = 0; i < dustAmt; i++) { - Vector2 expr_80F = (Vector2.Normalize(NPC.velocity) * new Vector2((float)NPC.width / 2f, (float)NPC.height) * 0.75f * 0.5f).RotatedBy((double)((float)(i - (num20 / 2 - 1)) * 6.28318548f / (float)num20), default) + NPC.Center; - Vector2 vector2 = expr_80F - NPC.Center; - int num21 = Dust.NewDust(expr_80F + vector2, 0, 0, 172, vector2.X * 2f, vector2.Y * 2f, 100, default, 1.4f); - Main.dust[num21].noGravity = true; - Main.dust[num21].noLight = true; - Main.dust[num21].velocity = Vector2.Normalize(vector2) * 3f; + Vector2 expr_80F = (Vector2.Normalize(NPC.velocity) * new Vector2((float)NPC.width / 2f, (float)NPC.height) * 0.75f * 0.5f).RotatedBy((double)((float)(i - (dustAmt / 2 - 1)) * 6.28318548f / (float)dustAmt), default) + NPC.Center; + Vector2 dustDirection = expr_80F - NPC.Center; + int chargeDust = Dust.NewDust(expr_80F + dustDirection, 0, 0, 172, dustDirection.X * 2f, dustDirection.Y * 2f, 100, default, 1.4f); + Main.dust[chargeDust].noGravity = true; + Main.dust[chargeDust].noLight = true; + Main.dust[chargeDust].velocity = Vector2.Normalize(dustDirection) * 3f; } SoundEngine.PlaySound(EnragedRoarSound, NPC.Center); } NPC.ai[2] += 1f; - if (NPC.ai[2] >= (float)num16) + if (NPC.ai[2] >= 75f) { NPC.ai[0] = 0f; NPC.ai[1] = 0f; @@ -519,49 +516,49 @@ namespace CalamityMod.NPCs.Abyss NPC.chaseable = true; if (NPC.ai[1] == 0f) { - NPC.ai[1] = (float)(300 * Math.Sign((vector - player.Center).X)); + NPC.ai[1] = (float)(300 * Math.Sign((shorkCenter - player.Center).X)); } - Vector2 vector3 = Vector2.Normalize(player.Center + new Vector2(NPC.ai[1], -200f) - vector - NPC.velocity) * scaleFactor; - if (NPC.velocity.X < vector3.X) + Vector2 chargeDirection = Vector2.Normalize(player.Center + new Vector2(NPC.ai[1], -200f) - shorkCenter - NPC.velocity) * chargeThreshold; + if (NPC.velocity.X < chargeDirection.X) { - NPC.velocity.X = NPC.velocity.X + num3; - if (NPC.velocity.X < 0f && vector3.X > 0f) + NPC.velocity.X = NPC.velocity.X + chargeAcceleration; + if (NPC.velocity.X < 0f && chargeDirection.X > 0f) { - NPC.velocity.X = NPC.velocity.X + num3; + NPC.velocity.X = NPC.velocity.X + chargeAcceleration; } } - else if (NPC.velocity.X > vector3.X) + else if (NPC.velocity.X > chargeDirection.X) { - NPC.velocity.X = NPC.velocity.X - num3; - if (NPC.velocity.X > 0f && vector3.X < 0f) + NPC.velocity.X = NPC.velocity.X - chargeAcceleration; + if (NPC.velocity.X > 0f && chargeDirection.X < 0f) { - NPC.velocity.X = NPC.velocity.X - num3; + NPC.velocity.X = NPC.velocity.X - chargeAcceleration; } } - if (NPC.velocity.Y < vector3.Y) + if (NPC.velocity.Y < chargeDirection.Y) { - NPC.velocity.Y = NPC.velocity.Y + num3; - if (NPC.velocity.Y < 0f && vector3.Y > 0f) + NPC.velocity.Y = NPC.velocity.Y + chargeAcceleration; + if (NPC.velocity.Y < 0f && chargeDirection.Y > 0f) { - NPC.velocity.Y = NPC.velocity.Y + num3; + NPC.velocity.Y = NPC.velocity.Y + chargeAcceleration; } } - else if (NPC.velocity.Y > vector3.Y) + else if (NPC.velocity.Y > chargeDirection.Y) { - NPC.velocity.Y = NPC.velocity.Y - num3; - if (NPC.velocity.Y > 0f && vector3.Y < 0f) + NPC.velocity.Y = NPC.velocity.Y - chargeAcceleration; + if (NPC.velocity.Y > 0f && chargeDirection.Y < 0f) { - NPC.velocity.Y = NPC.velocity.Y - num3; + NPC.velocity.Y = NPC.velocity.Y - chargeAcceleration; } } - int num22 = Math.Sign(player.Center.X - vector.X); - if (num22 != 0) + int shorkFacingSign = Math.Sign(player.Center.X - shorkCenter.X); + if (shorkFacingSign != 0) { - if (NPC.ai[2] == 0f && num22 != NPC.direction) + if (NPC.ai[2] == 0f && shorkFacingSign != NPC.direction) { NPC.rotation += 3.14159274f; } - NPC.direction = num22; + NPC.direction = shorkFacingSign; if (NPC.spriteDirection != -NPC.direction) { NPC.rotation += 3.14159274f; @@ -569,16 +566,16 @@ namespace CalamityMod.NPCs.Abyss NPC.spriteDirection = -NPC.direction; } NPC.ai[2] += 1f; - if (NPC.ai[2] >= (float)num2) + if (NPC.ai[2] >= 30f) { NPC.ai[0] = 1f; NPC.ai[1] = 0f; NPC.ai[2] = 0f; - NPC.velocity = Vector2.Normalize(player.Center - vector) * num5; + NPC.velocity = Vector2.Normalize(player.Center - shorkCenter) * chargeVelocity; NPC.rotation = (float)Math.Atan2((double)NPC.velocity.Y, (double)NPC.velocity.X); - if (num22 != 0) + if (shorkFacingSign != 0) { - NPC.direction = num22; + NPC.direction = shorkFacingSign; if (NPC.spriteDirection == 1) { NPC.rotation += 3.14159274f; @@ -591,19 +588,19 @@ namespace CalamityMod.NPCs.Abyss } else if (NPC.ai[0] == 1f) { - int num24 = 7; - for (int j = 0; j < num24; j++) + int phase2DustAmt = 7; + for (int j = 0; j < phase2DustAmt; j++) { - Vector2 arg_E1C_0 = (Vector2.Normalize(NPC.velocity) * new Vector2((float)(NPC.width + 50) / 2f, (float)NPC.height) * 0.75f).RotatedBy((double)(j - (num24 / 2 - 1)) * 3.1415926535897931 / (double)(float)num24, default) + vector; - Vector2 vector4 = ((float)(Main.rand.NextDouble() * 3.1415927410125732) - 1.57079637f).ToRotationVector2() * (float)Main.rand.Next(3, 8); - int num25 = Dust.NewDust(arg_E1C_0 + vector4, 0, 0, 172, vector4.X * 2f, vector4.Y * 2f, 100, default, 1.4f); - Main.dust[num25].noGravity = true; - Main.dust[num25].noLight = true; - Main.dust[num25].velocity /= 4f; - Main.dust[num25].velocity -= NPC.velocity; + Vector2 arg_E1C_0 = (Vector2.Normalize(NPC.velocity) * new Vector2((float)(NPC.width + 50) / 2f, (float)NPC.height) * 0.75f).RotatedBy((double)(j - (phase2DustAmt / 2 - 1)) * 3.1415926535897931 / (double)(float)phase2DustAmt, default) + shorkCenter; + Vector2 phase2DustRotation = ((float)(Main.rand.NextDouble() * 3.1415927410125732) - 1.57079637f).ToRotationVector2() * (float)Main.rand.Next(3, 8); + int phase2Dust = Dust.NewDust(arg_E1C_0 + phase2DustRotation, 0, 0, 172, phase2DustRotation.X * 2f, phase2DustRotation.Y * 2f, 100, default, 1.4f); + Main.dust[phase2Dust].noGravity = true; + Main.dust[phase2Dust].noLight = true; + Main.dust[phase2Dust].velocity /= 4f; + Main.dust[phase2Dust].velocity -= NPC.velocity; } NPC.ai[2] += 1f; - if (NPC.ai[2] >= (float)num4) + if (NPC.ai[2] >= (float)phase2Delay) { NPC.ai[0] = 0f; NPC.ai[1] = 0f; @@ -613,7 +610,7 @@ namespace CalamityMod.NPCs.Abyss } if (Main.zenithWorld && Main.netMode != NetmodeID.MultiplayerClient && NPC.ai[2] % 5 == 0) { - Vector2 direction = vector - player.Center; + Vector2 direction = shorkCenter - player.Center; direction.Normalize(); Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, direction * 10f, ProjectileID.DemonSickle, NPC.damage / 2, 0f, Main.myPlayer); } diff --git a/NPCs/AcidRain/Mauler.cs b/NPCs/AcidRain/Mauler.cs index 90ae7aa4e8..a835f8ee24 100644 --- a/NPCs/AcidRain/Mauler.cs +++ b/NPCs/AcidRain/Mauler.cs @@ -500,25 +500,25 @@ namespace CalamityMod.NPCs.AcidRain int boom2 = Projectile.NewProjectile(NPC.GetSource_Death(), valueBoom.X, valueBoom.Y, (float)(-Math.Sin(offsetAngleBoom) * 6f), (float)(-Math.Cos(offsetAngleBoom) * 6f), projectileType, damageBoom, 0f, Main.myPlayer, 0f, 0f); } } - for (int num621 = 0; num621 < 25; num621++) + for (int i = 0; i < 25; i++) { - int num622 = Dust.NewDust(NPC.position, NPC.width, NPC.height, 31, 0f, 0f, 100, default, 2f); - Main.dust[num622].velocity *= 3f; + int deathDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, 31, 0f, 0f, 100, default, 2f); + Main.dust[deathDust].velocity *= 3f; if (Main.rand.NextBool()) { - Main.dust[num622].scale = 0.5f; - Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + Main.dust[deathDust].scale = 0.5f; + Main.dust[deathDust].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; } - Main.dust[num622].noGravity = true; + Main.dust[deathDust].noGravity = true; } - for (int num623 = 0; num623 < 50; num623++) + for (int j = 0; j < 50; j++) { - int num624 = Dust.NewDust(NPC.position, NPC.width, NPC.height, 5, 0f, 0f, 100, default, 3f); - Main.dust[num624].noGravity = true; - Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(NPC.position, NPC.width, NPC.height, 5, 0f, 0f, 100, default, 2f); - Main.dust[num624].velocity *= 2f; - Main.dust[num624].noGravity = true; + int deathDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, 5, 0f, 0f, 100, default, 3f); + Main.dust[deathDust2].noGravity = true; + Main.dust[deathDust2].velocity *= 5f; + deathDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, 5, 0f, 0f, 100, default, 2f); + Main.dust[deathDust2].velocity *= 2f; + Main.dust[deathDust2].noGravity = true; } NPC.netUpdate = true; } diff --git a/NPCs/AcidRain/NuclearTerror.cs b/NPCs/AcidRain/NuclearTerror.cs index 5e7a730b56..0b8165919e 100644 --- a/NPCs/AcidRain/NuclearTerror.cs +++ b/NPCs/AcidRain/NuclearTerror.cs @@ -523,17 +523,17 @@ namespace CalamityMod.NPCs.AcidRain NPC.alpha = 0; if (DeathrayTime < 240f) { - int num5 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.SulfurousSeaAcid, 0f, 0f, 200, default, 1.5f); - Main.dust[num5].noGravity = true; - Main.dust[num5].velocity *= 0.75f; - Main.dust[num5].fadeIn = 1.3f; + int bigFuckOffDeathrayDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.SulfurousSeaAcid, 0f, 0f, 200, default, 1.5f); + Main.dust[bigFuckOffDeathrayDust].noGravity = true; + Main.dust[bigFuckOffDeathrayDust].velocity *= 0.75f; + Main.dust[bigFuckOffDeathrayDust].fadeIn = 1.3f; Vector2 vector = new Vector2((float)Main.rand.Next(-200, 201), (float)Main.rand.Next(-200, 201)); vector.Normalize(); vector *= (float)Main.rand.Next(100, 200) * 0.04f; - Main.dust[num5].velocity = vector; + Main.dust[bigFuckOffDeathrayDust].velocity = vector; vector.Normalize(); vector *= 34f; - Main.dust[num5].position = NPC.Center - vector; + Main.dust[bigFuckOffDeathrayDust].position = NPC.Center - vector; } else if (DeathrayTime == 240f) { diff --git a/NPCs/Astral/AstralProbe.cs b/NPCs/Astral/AstralProbe.cs index baa847bb42..46a657a72e 100644 --- a/NPCs/Astral/AstralProbe.cs +++ b/NPCs/Astral/AstralProbe.cs @@ -65,36 +65,36 @@ namespace CalamityMod.NPCs.Astral { NPC.TargetClosest(true); } - float num = CalamityWorld.death ? 8f : CalamityWorld.revenge ? 6.5f : 5f; - float num2 = CalamityWorld.death ? 0.08f : CalamityWorld.revenge ? 0.065f : 0.05f; - Vector2 vector = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num4 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); - float num5 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); - num4 = (float)((int)(num4 / 8f) * 8); - num5 = (float)((int)(num5 / 8f) * 8); - vector.X = (float)((int)(vector.X / 8f) * 8); - vector.Y = (float)((int)(vector.Y / 8f) * 8); - num4 -= vector.X; - num5 -= vector.Y; - float num6 = (float)Math.Sqrt((double)(num4 * num4 + num5 * num5)); - float num7 = num6; - bool flag = false; - if (num6 > 600f) + float probeSpeed = CalamityWorld.death ? 8f : CalamityWorld.revenge ? 6.5f : 5f; + float probeAcceleration = CalamityWorld.death ? 0.08f : CalamityWorld.revenge ? 0.065f : 0.05f; + Vector2 probePosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float targetXDirection = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); + float targetYDirection = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); + targetXDirection = (float)((int)(targetXDirection / 8f) * 8); + targetYDirection = (float)((int)(targetYDirection / 8f) * 8); + probePosition.X = (float)((int)(probePosition.X / 8f) * 8); + probePosition.Y = (float)((int)(probePosition.Y / 8f) * 8); + targetXDirection -= probePosition.X; + targetYDirection -= probePosition.Y; + float targetDistance = (float)Math.Sqrt((double)(targetXDirection * targetXDirection + targetYDirection * targetYDirection)); + float accelerateDistance = targetDistance; + bool tooFar = false; + if (targetDistance > 600f) { - flag = true; + tooFar = true; } - if (num6 == 0f) + if (targetDistance == 0f) { - num4 = NPC.velocity.X; - num5 = NPC.velocity.Y; + targetXDirection = NPC.velocity.X; + targetYDirection = NPC.velocity.Y; } else { - num6 = num / num6; - num4 *= num6; - num5 *= num6; + targetDistance = probeSpeed / targetDistance; + targetXDirection *= targetDistance; + targetYDirection *= targetDistance; } - if (num7 > 100f) + if (accelerateDistance > 100f) { NPC.ai[0] += 1f; if (NPC.ai[0] > 0f) @@ -120,24 +120,24 @@ namespace CalamityMod.NPCs.Astral } if (Main.player[NPC.target].dead) { - num4 = (float)NPC.direction * num / 2f; - num5 = -num / 2f; + targetXDirection = (float)NPC.direction * probeSpeed / 2f; + targetYDirection = -probeSpeed / 2f; } - if (NPC.velocity.X < num4) + if (NPC.velocity.X < targetXDirection) { - NPC.velocity.X = NPC.velocity.X + num2; + NPC.velocity.X = NPC.velocity.X + probeAcceleration; } - else if (NPC.velocity.X > num4) + else if (NPC.velocity.X > targetXDirection) { - NPC.velocity.X = NPC.velocity.X - num2; + NPC.velocity.X = NPC.velocity.X - probeAcceleration; } - if (NPC.velocity.Y < num5) + if (NPC.velocity.Y < targetYDirection) { - NPC.velocity.Y = NPC.velocity.Y + num2; + NPC.velocity.Y = NPC.velocity.Y + probeAcceleration; } - else if (NPC.velocity.Y > num5) + else if (NPC.velocity.Y > targetYDirection) { - NPC.velocity.Y = NPC.velocity.Y - num2; + NPC.velocity.Y = NPC.velocity.Y - probeAcceleration; } NPC.localAI[0] += 1f; if (NPC.justHit) @@ -149,37 +149,36 @@ namespace CalamityMod.NPCs.Astral NPC.localAI[0] = 0f; if (Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height)) { - int num8 = Main.expertMode ? 14 : 18; + int projDamage = Main.expertMode ? 14 : 18; if (DownedBossSystem.downedAstrumAureus) - num8 += 6; + projDamage += 6; - int num9 = ProjectileID.PinkLaser; - Projectile.NewProjectile(NPC.GetSource_FromAI(), vector.X, vector.Y, num4, num5, num9, num8, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(NPC.GetSource_FromAI(), probePosition.X, probePosition.Y, targetXDirection, targetYDirection, ProjectileID.PinkLaser, projDamage, 0f, Main.myPlayer, 0f, 0f); } } - int num10 = (int)NPC.position.X + NPC.width / 2; - int num11 = (int)NPC.position.Y + NPC.height / 2; - num10 /= 16; - num11 /= 16; - if (!WorldGen.SolidTile(num10, num11)) + int npcTileX = (int)NPC.position.X + NPC.width / 2; + int npcTileY = (int)NPC.position.Y + NPC.height / 2; + npcTileX /= 16; + npcTileY /= 16; + if (!WorldGen.SolidTile(npcTileX, npcTileY)) { Lighting.AddLight((int)((NPC.position.X + (float)(NPC.width / 2)) / 16f), (int)((NPC.position.Y + (float)(NPC.height / 2)) / 16f), 0.3f, 0f, 0.25f); } - if (num4 > 0f) + if (targetXDirection > 0f) { NPC.spriteDirection = 1; - NPC.rotation = (float)Math.Atan2((double)num5, (double)num4); + NPC.rotation = (float)Math.Atan2((double)targetYDirection, (double)targetXDirection); } - if (num4 < 0f) + if (targetXDirection < 0f) { NPC.spriteDirection = -1; - NPC.rotation = (float)Math.Atan2((double)num5, (double)num4) + 3.14f; + NPC.rotation = (float)Math.Atan2((double)targetYDirection, (double)targetXDirection) + 3.14f; } - float num12 = 0.7f; + float recoilVelocity = 0.7f; if (NPC.collideX) { NPC.netUpdate = true; - NPC.velocity.X = NPC.oldVelocity.X * -num12; + NPC.velocity.X = NPC.oldVelocity.X * -recoilVelocity; if (NPC.direction == -1 && NPC.velocity.X > 0f && NPC.velocity.X < 2f) { NPC.velocity.X = 2f; @@ -192,7 +191,7 @@ namespace CalamityMod.NPCs.Astral if (NPC.collideY) { NPC.netUpdate = true; - NPC.velocity.Y = NPC.oldVelocity.Y * -num12; + NPC.velocity.Y = NPC.oldVelocity.Y * -recoilVelocity; if (NPC.velocity.Y > 0f && (double)NPC.velocity.Y < 1.5) { NPC.velocity.Y = 2f; @@ -202,9 +201,9 @@ namespace CalamityMod.NPCs.Astral NPC.velocity.Y = -2f; } } - if (flag) + if (tooFar) { - if ((NPC.velocity.X > 0f && num4 > 0f) || (NPC.velocity.X < 0f && num4 < 0f)) + if ((NPC.velocity.X > 0f && targetXDirection > 0f) || (NPC.velocity.X < 0f && targetXDirection < 0f)) { if (Math.Abs(NPC.velocity.X) < 12f) { @@ -229,16 +228,16 @@ namespace CalamityMod.NPCs.Astral spriteEffects = SpriteEffects.FlipHorizontally; Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / 2)); - Vector2 vector43 = NPC.Center - screenPos; - vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; - vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / 2)); + Vector2 drawPosition = NPC.Center - screenPos; + drawPosition -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; + drawPosition += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, drawPosition, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/Astral/AstralProbeGlow").Value; - spriteBatch.Draw(texture2D15, vector43, NPC.frame, Color.White * 0.6f, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, drawPosition, NPC.frame, Color.White * 0.6f, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); return false; } From 4fe9c644caf3ac0a5f31c55d39b4ae2ec27306fb Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 1 Nov 2023 22:22:29 -0400 Subject: [PATCH 45/95] Crags and Great Sand Shark --- NPCs/Crags/Scryllar.cs | 92 ++++---- NPCs/Crags/ScryllarRage.cs | 92 ++++---- NPCs/Crags/SoulSlurper.cs | 170 ++++++++------- NPCs/GreatSandShark/GreatSandShark.cs | 289 +++++++++++++------------- 4 files changed, 319 insertions(+), 324 deletions(-) diff --git a/NPCs/Crags/Scryllar.cs b/NPCs/Crags/Scryllar.cs index 2c6c0a48f5..01b59b4993 100644 --- a/NPCs/Crags/Scryllar.cs +++ b/NPCs/Crags/Scryllar.cs @@ -67,35 +67,35 @@ namespace CalamityMod.NPCs.Crags { NPC.rotation = NPC.velocity.X * 0.04f; NPC.spriteDirection = (NPC.direction > 0) ? 1 : -1; - bool flag19 = false; + bool hoverDownDistCheck = false; if (NPC.justHit) { NPC.ai[2] = 0f; } if (NPC.ai[2] >= 0f) { - int num282 = 16; - bool flag21 = false; - bool flag22 = false; - if (NPC.position.X > NPC.ai[0] - (float)num282 && NPC.position.X < NPC.ai[0] + (float)num282) + int hoverDistance = 16; + bool changeDirectionX = false; + bool changeDirectionY = false; + if (NPC.position.X > NPC.ai[0] - (float)hoverDistance && NPC.position.X < NPC.ai[0] + (float)hoverDistance) { - flag21 = true; + changeDirectionX = true; } else if ((NPC.velocity.X < 0f && NPC.direction > 0) || (NPC.velocity.X > 0f && NPC.direction < 0)) { - flag21 = true; + changeDirectionX = true; } - num282 += 24; - if (NPC.position.Y > NPC.ai[1] - (float)num282 && NPC.position.Y < NPC.ai[1] + (float)num282) + hoverDistance += 24; + if (NPC.position.Y > NPC.ai[1] - (float)hoverDistance && NPC.position.Y < NPC.ai[1] + (float)hoverDistance) { - flag22 = true; + changeDirectionY = true; } - if (flag21 && flag22) + if (changeDirectionX && changeDirectionY) { NPC.ai[2] += 1f; - if (NPC.ai[2] >= 30f && num282 == 16) + if (NPC.ai[2] >= 30f && hoverDistance == 16) { - flag19 = true; + hoverDownDistCheck = true; } if (NPC.ai[2] >= 60f) { @@ -118,36 +118,36 @@ namespace CalamityMod.NPCs.Crags NPC.TargetClosest(true); NPC.ai[2] += 2f; } - int num283 = (int)((NPC.position.X + (float)(NPC.width / 2)) / 16f) + NPC.direction * 2; - int num284 = (int)((NPC.position.Y + (float)NPC.height) / 16f); - bool flag23 = true; - int num285 = 3; - for (int num308 = num284; num308 < num284 + num285; num308++) + int npcTileX = (int)((NPC.position.X + (float)(NPC.width / 2)) / 16f) + NPC.direction * 2; + int npcTileY = (int)((NPC.position.Y + (float)NPC.height) / 16f); + bool hoverDownwards = true; + int tileCheckLoopAmt = 3; + for (int loopInc1 = npcTileY; loopInc1 < npcTileY + tileCheckLoopAmt; loopInc1++) { - if ((Main.tile[num283, num308].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num283, num308].TileType]) || Main.tile[num283, num308].LiquidAmount > 0) + if ((Main.tile[npcTileX, loopInc1].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[npcTileX, loopInc1].TileType]) || Main.tile[npcTileX, loopInc1].LiquidAmount > 0) { - flag23 = false; + hoverDownwards = false; break; } } if (Main.player[NPC.target].npcTypeNoAggro[NPC.type]) { - bool flag25 = false; - for (int num309 = num284; num309 < num284 + num285 - 2; num309++) + bool inTileNoAggro = false; + for (int loopInc2 = npcTileY; loopInc2 < npcTileY + tileCheckLoopAmt - 2; loopInc2++) { - if ((Main.tile[num283, num309].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num283, num309].TileType]) || Main.tile[num283, num309].LiquidAmount > 0) + if ((Main.tile[npcTileX, loopInc2].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[npcTileX, loopInc2].TileType]) || Main.tile[npcTileX, loopInc2].LiquidAmount > 0) { - flag25 = true; + inTileNoAggro = true; break; } } - NPC.directionY = (!flag25).ToDirectionInt(); + NPC.directionY = (!inTileNoAggro).ToDirectionInt(); } - if (flag19) + if (hoverDownDistCheck) { - flag23 = true; + hoverDownwards = true; } - if (flag23) + if (hoverDownwards) { NPC.velocity.Y = NPC.velocity.Y + 0.1f; if (NPC.velocity.Y > 3f) @@ -190,11 +190,11 @@ namespace CalamityMod.NPCs.Crags NPC.velocity.Y = -1f; } } - float num311 = 4f; - if (NPC.direction == -1 && NPC.velocity.X > -num311) + float maxXVelocity = 4f; + if (NPC.direction == -1 && NPC.velocity.X > -maxXVelocity) { NPC.velocity.X = NPC.velocity.X - 0.1f; - if (NPC.velocity.X > num311) + if (NPC.velocity.X > maxXVelocity) { NPC.velocity.X = NPC.velocity.X - 0.1f; } @@ -202,15 +202,15 @@ namespace CalamityMod.NPCs.Crags { NPC.velocity.X = NPC.velocity.X + 0.05f; } - if (NPC.velocity.X < -num311) + if (NPC.velocity.X < -maxXVelocity) { - NPC.velocity.X = -num311; + NPC.velocity.X = -maxXVelocity; } } - else if (NPC.direction == 1 && NPC.velocity.X < num311) + else if (NPC.direction == 1 && NPC.velocity.X < maxXVelocity) { NPC.velocity.X = NPC.velocity.X + 0.1f; - if (NPC.velocity.X < -num311) + if (NPC.velocity.X < -maxXVelocity) { NPC.velocity.X = NPC.velocity.X + 0.1f; } @@ -218,16 +218,16 @@ namespace CalamityMod.NPCs.Crags { NPC.velocity.X = NPC.velocity.X - 0.05f; } - if (NPC.velocity.X > num311) + if (NPC.velocity.X > maxXVelocity) { - NPC.velocity.X = num311; + NPC.velocity.X = maxXVelocity; } } - num311 = 1.5f; - if (NPC.directionY == -1 && NPC.velocity.Y > -num311) + maxXVelocity = 1.5f; + if (NPC.directionY == -1 && NPC.velocity.Y > -maxXVelocity) { NPC.velocity.Y = NPC.velocity.Y - 0.04f; - if (NPC.velocity.Y > num311) + if (NPC.velocity.Y > maxXVelocity) { NPC.velocity.Y = NPC.velocity.Y - 0.05f; } @@ -235,15 +235,15 @@ namespace CalamityMod.NPCs.Crags { NPC.velocity.Y = NPC.velocity.Y + 0.03f; } - if (NPC.velocity.Y < -num311) + if (NPC.velocity.Y < -maxXVelocity) { - NPC.velocity.Y = -num311; + NPC.velocity.Y = -maxXVelocity; } } - else if (NPC.directionY == 1 && NPC.velocity.Y < num311) + else if (NPC.directionY == 1 && NPC.velocity.Y < maxXVelocity) { NPC.velocity.Y = NPC.velocity.Y + 0.04f; - if (NPC.velocity.Y < -num311) + if (NPC.velocity.Y < -maxXVelocity) { NPC.velocity.Y = NPC.velocity.Y + 0.05f; } @@ -251,9 +251,9 @@ namespace CalamityMod.NPCs.Crags { NPC.velocity.Y = NPC.velocity.Y - 0.03f; } - if (NPC.velocity.Y > num311) + if (NPC.velocity.Y > maxXVelocity) { - NPC.velocity.Y = num311; + NPC.velocity.Y = maxXVelocity; } } } diff --git a/NPCs/Crags/ScryllarRage.cs b/NPCs/Crags/ScryllarRage.cs index 5657aa505d..25025b69e0 100644 --- a/NPCs/Crags/ScryllarRage.cs +++ b/NPCs/Crags/ScryllarRage.cs @@ -49,35 +49,35 @@ namespace CalamityMod.NPCs.Crags { NPC.rotation = NPC.velocity.X * 0.04f; NPC.spriteDirection = (NPC.direction > 0) ? 1 : -1; - bool flag19 = false; + bool hoverDownDistCheck = false; if (NPC.justHit) { NPC.ai[2] = 0f; } if (NPC.ai[2] >= 0f) { - int num282 = 16; - bool flag21 = false; - bool flag22 = false; - if (NPC.position.X > NPC.ai[0] - (float)num282 && NPC.position.X < NPC.ai[0] + (float)num282) + int hoverDistance = 16; + bool changeDirectionX = false; + bool changeDirectionY = false; + if (NPC.position.X > NPC.ai[0] - (float)hoverDistance && NPC.position.X < NPC.ai[0] + (float)hoverDistance) { - flag21 = true; + changeDirectionX = true; } else if ((NPC.velocity.X < 0f && NPC.direction > 0) || (NPC.velocity.X > 0f && NPC.direction < 0)) { - flag21 = true; + changeDirectionX = true; } - num282 += 24; - if (NPC.position.Y > NPC.ai[1] - (float)num282 && NPC.position.Y < NPC.ai[1] + (float)num282) + hoverDistance += 24; + if (NPC.position.Y > NPC.ai[1] - (float)hoverDistance && NPC.position.Y < NPC.ai[1] + (float)hoverDistance) { - flag22 = true; + changeDirectionY = true; } - if (flag21 && flag22) + if (changeDirectionX && changeDirectionY) { NPC.ai[2] += 1f; - if (NPC.ai[2] >= 30f && num282 == 16) + if (NPC.ai[2] >= 30f && hoverDistance == 16) { - flag19 = true; + hoverDownDistCheck = true; } if (NPC.ai[2] >= 60f) { @@ -100,36 +100,36 @@ namespace CalamityMod.NPCs.Crags NPC.TargetClosest(true); NPC.ai[2] += 2f; } - int num283 = (int)((NPC.position.X + (float)(NPC.width / 2)) / 16f) + NPC.direction * 2; - int num284 = (int)((NPC.position.Y + (float)NPC.height) / 16f); - bool flag23 = true; - int num285 = 3; - for (int num308 = num284; num308 < num284 + num285; num308++) + int npcTileX = (int)((NPC.position.X + (float)(NPC.width / 2)) / 16f) + NPC.direction * 2; + int npcTileY = (int)((NPC.position.Y + (float)NPC.height) / 16f); + bool hoverDownwards = true; + int tileCheckLoopAmt = 3; + for (int loopInc1 = npcTileY; loopInc1 < npcTileY + tileCheckLoopAmt; loopInc1++) { - if ((Main.tile[num283, num308].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num283, num308].TileType]) || Main.tile[num283, num308].LiquidAmount > 0) + if ((Main.tile[npcTileX, loopInc1].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[npcTileX, loopInc1].TileType]) || Main.tile[npcTileX, loopInc1].LiquidAmount > 0) { - flag23 = false; + hoverDownwards = false; break; } } if (Main.player[NPC.target].npcTypeNoAggro[NPC.type]) { - bool flag25 = false; - for (int num309 = num284; num309 < num284 + num285 - 2; num309++) + bool inTileNoAggro = false; + for (int loopInc2 = npcTileY; loopInc2 < npcTileY + tileCheckLoopAmt - 2; loopInc2++) { - if ((Main.tile[num283, num309].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num283, num309].TileType]) || Main.tile[num283, num309].LiquidAmount > 0) + if ((Main.tile[npcTileX, loopInc2].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[npcTileX, loopInc2].TileType]) || Main.tile[npcTileX, loopInc2].LiquidAmount > 0) { - flag25 = true; + inTileNoAggro = true; break; } } - NPC.directionY = (!flag25).ToDirectionInt(); + NPC.directionY = (!inTileNoAggro).ToDirectionInt(); } - if (flag19) + if (hoverDownDistCheck) { - flag23 = true; + hoverDownwards = true; } - if (flag23) + if (hoverDownwards) { NPC.velocity.Y = NPC.velocity.Y + 0.1f; if (NPC.velocity.Y > 3f) @@ -172,11 +172,11 @@ namespace CalamityMod.NPCs.Crags NPC.velocity.Y = -1f; } } - float num311 = 7f; - if (NPC.direction == -1 && NPC.velocity.X > -num311) + float maxXVelocity = 7f; + if (NPC.direction == -1 && NPC.velocity.X > -maxXVelocity) { NPC.velocity.X = NPC.velocity.X - 0.1f; - if (NPC.velocity.X > num311) + if (NPC.velocity.X > maxXVelocity) { NPC.velocity.X = NPC.velocity.X - 0.1f; } @@ -184,15 +184,15 @@ namespace CalamityMod.NPCs.Crags { NPC.velocity.X = NPC.velocity.X + 0.05f; } - if (NPC.velocity.X < -num311) + if (NPC.velocity.X < -maxXVelocity) { - NPC.velocity.X = -num311; + NPC.velocity.X = -maxXVelocity; } } - else if (NPC.direction == 1 && NPC.velocity.X < num311) + else if (NPC.direction == 1 && NPC.velocity.X < maxXVelocity) { NPC.velocity.X = NPC.velocity.X + 0.1f; - if (NPC.velocity.X < -num311) + if (NPC.velocity.X < -maxXVelocity) { NPC.velocity.X = NPC.velocity.X + 0.1f; } @@ -200,16 +200,16 @@ namespace CalamityMod.NPCs.Crags { NPC.velocity.X = NPC.velocity.X - 0.05f; } - if (NPC.velocity.X > num311) + if (NPC.velocity.X > maxXVelocity) { - NPC.velocity.X = num311; + NPC.velocity.X = maxXVelocity; } } - num311 = 1.5f; - if (NPC.directionY == -1 && NPC.velocity.Y > -num311) + maxXVelocity = 1.5f; + if (NPC.directionY == -1 && NPC.velocity.Y > -maxXVelocity) { NPC.velocity.Y = NPC.velocity.Y - 0.04f; - if (NPC.velocity.Y > num311) + if (NPC.velocity.Y > maxXVelocity) { NPC.velocity.Y = NPC.velocity.Y - 0.05f; } @@ -217,15 +217,15 @@ namespace CalamityMod.NPCs.Crags { NPC.velocity.Y = NPC.velocity.Y + 0.03f; } - if (NPC.velocity.Y < -num311) + if (NPC.velocity.Y < -maxXVelocity) { - NPC.velocity.Y = -num311; + NPC.velocity.Y = -maxXVelocity; } } - else if (NPC.directionY == 1 && NPC.velocity.Y < num311) + else if (NPC.directionY == 1 && NPC.velocity.Y < maxXVelocity) { NPC.velocity.Y = NPC.velocity.Y + 0.04f; - if (NPC.velocity.Y < -num311) + if (NPC.velocity.Y < -maxXVelocity) { NPC.velocity.Y = NPC.velocity.Y + 0.05f; } @@ -233,9 +233,9 @@ namespace CalamityMod.NPCs.Crags { NPC.velocity.Y = NPC.velocity.Y - 0.03f; } - if (NPC.velocity.Y > num311) + if (NPC.velocity.Y > maxXVelocity) { - NPC.velocity.Y = num311; + NPC.velocity.Y = maxXVelocity; } } } diff --git a/NPCs/Crags/SoulSlurper.cs b/NPCs/Crags/SoulSlurper.cs index 72d8388085..f2701316d0 100644 --- a/NPCs/Crags/SoulSlurper.cs +++ b/NPCs/Crags/SoulSlurper.cs @@ -75,36 +75,36 @@ namespace CalamityMod.NPCs.Crags { NPC.TargetClosest(true); } - float num = 5f; - float num2 = 0.07f; - Vector2 source = NPC.Center; - float num4 = target.Center.X; - float num5 = target.Center.Y; - num4 = (float)((int)(num4 / 8f) * 8); - num5 = (float)((int)(num5 / 8f) * 8); - source.X = (float)((int)(source.X / 8f) * 8); - source.Y = (float)((int)(source.Y / 8f) * 8); - num4 -= source.X; - num5 -= source.Y; - float num6 = (float)Math.Sqrt((double)(num4 * num4 + num5 * num5)); - float num7 = num6; - bool flag = false; - if (num6 > 600f) + float npcSpeed = 5f; + float npcAcceleration = 0.07f; + Vector2 npcCenter = NPC.Center; + float targetX = target.Center.X; + float targetY = target.Center.Y; + targetX = (float)((int)(targetX / 8f) * 8); + targetY = (float)((int)(targetY / 8f) * 8); + npcCenter.X = (float)((int)(npcCenter.X / 8f) * 8); + npcCenter.Y = (float)((int)(npcCenter.Y / 8f) * 8); + targetX -= npcCenter.X; + targetY -= npcCenter.Y; + float targetDistance = (float)Math.Sqrt((double)(targetX * targetX + targetY * targetY)); + float accelerateDistance = targetDistance; + bool tooFar = false; + if (targetDistance > 600f) { - flag = true; + tooFar = true; } - if (num6 == 0f) + if (targetDistance == 0f) { - num4 = NPC.velocity.X; - num5 = NPC.velocity.Y; + targetX = NPC.velocity.X; + targetY = NPC.velocity.Y; } else { - num6 = num / num6; - num4 *= num6; - num5 *= num6; + targetDistance = npcSpeed / targetDistance; + targetX *= targetDistance; + targetY *= targetDistance; } - if (num7 > 100f) + if (accelerateDistance > 100f) { NPC.ai[0] += 1f; if (NPC.ai[0] > 0f) @@ -130,24 +130,24 @@ namespace CalamityMod.NPCs.Crags } if (target.dead) { - num4 = (float)NPC.direction * num / 2f; - num5 = -num / 2f; + targetX = (float)NPC.direction * npcSpeed / 2f; + targetY = -npcSpeed / 2f; } - if (NPC.velocity.X < num4) + if (NPC.velocity.X < targetX) { - NPC.velocity.X += num2; + NPC.velocity.X += npcAcceleration; } - else if (NPC.velocity.X > num4) + else if (NPC.velocity.X > targetX) { - NPC.velocity.X -= num2; + NPC.velocity.X -= npcAcceleration; } - if (NPC.velocity.Y < num5) + if (NPC.velocity.Y < targetY) { - NPC.velocity.Y += num2; + NPC.velocity.Y += npcAcceleration; } - else if (NPC.velocity.Y > num5) + else if (NPC.velocity.Y > targetY) { - NPC.velocity.Y -= num2; + NPC.velocity.Y -= npcAcceleration; } NPC.localAI[0] += 1f; if (NPC.justHit) @@ -165,32 +165,32 @@ namespace CalamityMod.NPCs.Crags dmg = 22; } int projType = ModContent.ProjectileType(); - Projectile.NewProjectile(NPC.GetSource_FromAI(), source.X, source.Y, num4, num5, projType, dmg + (provy ? 30 : 0), 0f, Main.myPlayer, 1f, 0f); + Projectile.NewProjectile(NPC.GetSource_FromAI(), npcCenter.X, npcCenter.Y, targetX, targetY, projType, dmg + (provy ? 30 : 0), 0f, Main.myPlayer, 1f, 0f); } } - int num10 = (int)NPC.Center.X; - int num11 = (int)NPC.Center.Y; - num10 /= 16; - num11 /= 16; - if (!WorldGen.SolidTile(num10, num11)) + int npcTileX = (int)NPC.Center.X; + int npcTileY = (int)NPC.Center.Y; + npcTileX /= 16; + npcTileY /= 16; + if (!WorldGen.SolidTile(npcTileX, npcTileY)) { Lighting.AddLight((int)NPC.Center.X / 16, (int)NPC.Center.Y / 16, 0.75f, 0f, 0f); } - if (num4 > 0f) + if (targetX > 0f) { NPC.spriteDirection = 1; - NPC.rotation = (float)Math.Atan2((double)num5, (double)num4); + NPC.rotation = (float)Math.Atan2((double)targetY, (double)targetX); } - if (num4 < 0f) + if (targetX < 0f) { NPC.spriteDirection = -1; - NPC.rotation = (float)Math.Atan2((double)num5, (double)num4) + MathHelper.Pi; + NPC.rotation = (float)Math.Atan2((double)targetY, (double)targetX) + MathHelper.Pi; } - float num12 = 0.7f; + float recoilSpeed = 0.7f; if (NPC.collideX) { NPC.netUpdate = true; - NPC.velocity.X = NPC.oldVelocity.X * -num12; + NPC.velocity.X = NPC.oldVelocity.X * -recoilSpeed; if (NPC.direction == -1 && NPC.velocity.X > 0f && NPC.velocity.X < 2f) { NPC.velocity.X = 2f; @@ -203,7 +203,7 @@ namespace CalamityMod.NPCs.Crags if (NPC.collideY) { NPC.netUpdate = true; - NPC.velocity.Y = NPC.oldVelocity.Y * -num12; + NPC.velocity.Y = NPC.oldVelocity.Y * -recoilSpeed; if (NPC.velocity.Y > 0f && NPC.velocity.Y < 1.5f) { NPC.velocity.Y = 2f; @@ -213,9 +213,9 @@ namespace CalamityMod.NPCs.Crags NPC.velocity.Y = -2f; } } - if (flag) + if (tooFar) { - if ((NPC.velocity.X > 0f && num4 > 0f) || (NPC.velocity.X < 0f && num4 < 0f)) + if ((NPC.velocity.X > 0f && targetX > 0f) || (NPC.velocity.X < 0f && targetX < 0f)) { if (Math.Abs(NPC.velocity.X) < 12f) { @@ -240,49 +240,47 @@ namespace CalamityMod.NPCs.Crags spriteEffects = SpriteEffects.FlipHorizontally; Texture2D texture = TextureAssets.Npc[NPC.type].Value; - Vector2 vector11 = new Vector2((float)(texture.Width / 2), (float)(texture.Height / 2)); - Color color36 = Color.White; - float amount9 = 0.5f; - int num153 = 5; + Vector2 halfSizeTexture = new Vector2((float)(texture.Width / 2), (float)(texture.Height / 2)); + int afterimageAmt = 5; if (CalamityConfig.Instance.Afterimages) { - for (int num155 = 1; num155 < num153; num155 += 2) + for (int i = 1; i < afterimageAmt; i += 2) { - Color color38 = drawColor; - color38 = Color.Lerp(color38, color36, amount9); - color38 = NPC.GetAlpha(color38); - color38 *= (float)(num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - vector41 -= new Vector2((float)texture.Width, (float)(texture.Height)) * NPC.scale / 2f; - vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + Color afterimageColor = drawColor; + afterimageColor = Color.Lerp(afterimageColor, Color.White, 0.5f); + afterimageColor = NPC.GetAlpha(afterimageColor); + afterimageColor *= (float)(afterimageAmt - i) / 15f; + Vector2 afterimagePos = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; + afterimagePos -= new Vector2((float)texture.Width, (float)(texture.Height)) * NPC.scale / 2f; + afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - screenPos; - vector43 -= new Vector2((float)texture.Width, (float)(texture.Height)) * NPC.scale / 2f; - vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + Vector2 drawLocation = NPC.Center - screenPos; + drawLocation -= new Vector2((float)texture.Width, (float)(texture.Height)) * NPC.scale / 2f; + drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); texture = ModContent.Request("CalamityMod/NPCs/Crags/SoulSlurperGlow").Value; - Color color37 = Color.Lerp(Color.White, Color.Red, 0.5f); + Color redGlow = Color.Lerp(Color.White, Color.Red, 0.5f); if (CalamityConfig.Instance.Afterimages) { - for (int num163 = 1; num163 < num153; num163++) + for (int j = 1; j < afterimageAmt; j++) { - Color color41 = color37; - color41 = Color.Lerp(color41, color36, amount9); - color41 *= (float)(num153 - num163) / 15f; - Vector2 vector44 = NPC.oldPos[num163] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - vector44 -= new Vector2((float)texture.Width, (float)(texture.Height)) * NPC.scale / 2f; - vector44 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture, vector44, NPC.frame, color41, NPC.rotation, vector11, NPC.scale, NPC.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0f); + Color glowmaskAfterimageColor = redGlow; + glowmaskAfterimageColor = Color.Lerp(glowmaskAfterimageColor, color36, amount9); + glowmaskAfterimageColor *= (float)(afterimageAmt - j) / 15f; + Vector2 glowmaskAfterimagePos = NPC.oldPos[j] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; + glowmaskAfterimagePos -= new Vector2((float)texture.Width, (float)(texture.Height)) * NPC.scale / 2f; + glowmaskAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture, glowmaskAfterimagePos, NPC.frame, glowmaskAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, NPC.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0f); } } - spriteBatch.Draw(texture, vector43, NPC.frame, color37, NPC.rotation, vector11, NPC.scale, NPC.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0f); + spriteBatch.Draw(texture, drawLocation, NPC.frame, redGlow, NPC.rotation, halfSizeTexture, NPC.scale, NPC.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0f); return false; } @@ -325,23 +323,23 @@ namespace CalamityMod.NPCs.Crags NPC.height = 50; NPC.position.X = NPC.position.X - (float)(NPC.width / 2); NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); - for (int num621 = 0; num621 < 10; num621++) + for (int i = 0; i < 10; i++) { - int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); - Main.dust[num622].velocity *= 3f; + int brimDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + Main.dust[brimDust].velocity *= 3f; if (Main.rand.NextBool()) { - Main.dust[num622].scale = 0.5f; - Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + Main.dust[brimDust].scale = 0.5f; + Main.dust[brimDust].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; } } - for (int num623 = 0; num623 < 20; num623++) + for (int j = 0; j < 20; j++) { - int num624 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f); - Main.dust[num624].noGravity = true; - Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); - Main.dust[num624].velocity *= 2f; + int brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f); + Main.dust[brimDust2].noGravity = true; + Main.dust[brimDust2].velocity *= 5f; + brimDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + Main.dust[brimDust2].velocity *= 2f; } } } diff --git a/NPCs/GreatSandShark/GreatSandShark.cs b/NPCs/GreatSandShark/GreatSandShark.cs index 304c83fd4e..62981b1043 100644 --- a/NPCs/GreatSandShark/GreatSandShark.cs +++ b/NPCs/GreatSandShark/GreatSandShark.cs @@ -139,33 +139,33 @@ namespace CalamityMod.NPCs.GreatSandShark NPC.netUpdate = true; } - int num2 = expertMode ? 35 : 50; - float num3 = expertMode ? 0.5f : 0.42f; - float scaleFactor = expertMode ? 7.5f : 6.7f; - int num4 = expertMode ? 28 : 30; - float num5 = expertMode ? 15.5f : 14f; + int chargeTime = expertMode ? 35 : 50; + float chargeAcceleration = expertMode ? 0.5f : 0.42f; + float chargeThreshold = expertMode ? 7.5f : 6.7f; + int chargeDelay = expertMode ? 28 : 30; + float chargeVelocity = expertMode ? 15.5f : 14f; if (revenge || lowerLife) { - num3 *= 1.1f; - scaleFactor *= 1.1f; - num5 *= 1.1f; + chargeAcceleration *= 1.1f; + chargeThreshold *= 1.1f; + chargeVelocity *= 1.1f; } if (death) { - num3 *= 1.1f; - scaleFactor *= 1.1f; - num5 *= 1.1f; - num4 = 25; + chargeAcceleration *= 1.1f; + chargeThreshold *= 1.1f; + chargeVelocity *= 1.1f; + chargeDelay = 25; } if (youMustDie) { - num3 *= 1.5f; - scaleFactor *= 1.5f; - num5 *= 1.5f; - num4 = 20; + chargeAcceleration *= 1.5f; + chargeThreshold *= 1.5f; + chargeVelocity *= 1.5f; + chargeDelay = 20; } - Vector2 vector = NPC.Center; + Vector2 shorkCenter = NPC.Center; Player player = Main.player[NPC.target]; if (NPC.target < 0 || NPC.target == Main.maxPlayers || player.dead || !player.active) @@ -175,7 +175,7 @@ namespace CalamityMod.NPCs.GreatSandShark NPC.netUpdate = true; } - if (player.dead || Vector2.Distance(player.Center, vector) > 5600f) + if (player.dead || Vector2.Distance(player.Center, shorkCenter) > 5600f) { NPC.velocity.Y += 0.4f; if (NPC.timeLeft > 10) @@ -185,82 +185,82 @@ namespace CalamityMod.NPCs.GreatSandShark NPC.ai[2] = 0f; } - float num17 = (float)Math.Atan2(player.Center.Y - vector.Y, player.Center.X - vector.X); + float getRotatedIdiot = (float)Math.Atan2(player.Center.Y - shorkCenter.Y, player.Center.X - shorkCenter.X); if (NPC.spriteDirection == 1) - num17 += MathHelper.Pi; - if (num17 < 0f) - num17 += MathHelper.TwoPi; - if (num17 > MathHelper.TwoPi) - num17 -= MathHelper.TwoPi; + getRotatedIdiot += MathHelper.Pi; + if (getRotatedIdiot < 0f) + getRotatedIdiot += MathHelper.TwoPi; + if (getRotatedIdiot > MathHelper.TwoPi) + getRotatedIdiot -= MathHelper.TwoPi; - float num18 = 0.04f; + float rotationSpeed = 0.04f; if (NPC.ai[0] == 1f) - num18 = 0f; + rotationSpeed = 0f; - if (NPC.rotation < num17) + if (NPC.rotation < getRotatedIdiot) { - if ((double)(num17 - NPC.rotation) > MathHelper.Pi) - NPC.rotation -= num18; + if ((double)(getRotatedIdiot - NPC.rotation) > MathHelper.Pi) + NPC.rotation -= rotationSpeed; else - NPC.rotation += num18; + NPC.rotation += rotationSpeed; } - if (NPC.rotation > num17) + if (NPC.rotation > getRotatedIdiot) { - if ((double)(NPC.rotation - num17) > MathHelper.Pi) - NPC.rotation += num18; + if ((double)(NPC.rotation - getRotatedIdiot) > MathHelper.Pi) + NPC.rotation += rotationSpeed; else - NPC.rotation -= num18; + NPC.rotation -= rotationSpeed; } - if (NPC.rotation > num17 - num18 && NPC.rotation < num17 + num18) - NPC.rotation = num17; + if (NPC.rotation > getRotatedIdiot - rotationSpeed && NPC.rotation < getRotatedIdiot + rotationSpeed) + NPC.rotation = getRotatedIdiot; if (NPC.rotation < 0f) NPC.rotation += MathHelper.TwoPi; if (NPC.rotation > MathHelper.TwoPi) NPC.rotation -= MathHelper.TwoPi; - if (NPC.rotation > num17 - num18 && NPC.rotation < num17 + num18) - NPC.rotation = num17; + if (NPC.rotation > getRotatedIdiot - rotationSpeed && NPC.rotation < getRotatedIdiot + rotationSpeed) + NPC.rotation = getRotatedIdiot; if (NPC.ai[0] == 0f && !player.dead) { if (NPC.ai[1] == 0f) - NPC.ai[1] = 300 * Math.Sign((vector - player.Center).X); + NPC.ai[1] = 300 * Math.Sign((shorkCenter - player.Center).X); - Vector2 vector3 = Vector2.Normalize(player.Center + new Vector2(NPC.ai[1], -200f) - vector - NPC.velocity) * scaleFactor; - if (NPC.velocity.X < vector3.X) + Vector2 chargeDirection = Vector2.Normalize(player.Center + new Vector2(NPC.ai[1], -200f) - shorkCenter - NPC.velocity) * chargeThreshold; + if (NPC.velocity.X < chargeDirection.X) { - NPC.velocity.X += num3; - if (NPC.velocity.X < 0f && vector3.X > 0f) - NPC.velocity.X += num3; + NPC.velocity.X += chargeAcceleration; + if (NPC.velocity.X < 0f && chargeDirection.X > 0f) + NPC.velocity.X += chargeAcceleration; } - else if (NPC.velocity.X > vector3.X) + else if (NPC.velocity.X > chargeDirection.X) { - NPC.velocity.X -= num3; - if (NPC.velocity.X > 0f && vector3.X < 0f) - NPC.velocity.X -= num3; + NPC.velocity.X -= chargeAcceleration; + if (NPC.velocity.X > 0f && chargeDirection.X < 0f) + NPC.velocity.X -= chargeAcceleration; } - if (NPC.velocity.Y < vector3.Y) + if (NPC.velocity.Y < chargeDirection.Y) { - NPC.velocity.Y += num3; - if (NPC.velocity.Y < 0f && vector3.Y > 0f) - NPC.velocity.Y += num3; + NPC.velocity.Y += chargeAcceleration; + if (NPC.velocity.Y < 0f && chargeDirection.Y > 0f) + NPC.velocity.Y += chargeAcceleration; } - else if (NPC.velocity.Y > vector3.Y) + else if (NPC.velocity.Y > chargeDirection.Y) { - NPC.velocity.Y -= num3; - if (NPC.velocity.Y > 0f && vector3.Y < 0f) - NPC.velocity.Y -= num3; + NPC.velocity.Y -= chargeAcceleration; + if (NPC.velocity.Y > 0f && chargeDirection.Y < 0f) + NPC.velocity.Y -= chargeAcceleration; } - int num22 = Math.Sign(player.Center.X - vector.X); - if (num22 != 0) + int shorkFaceDirection = Math.Sign(player.Center.X - shorkCenter.X); + if (shorkFaceDirection != 0) { - if (NPC.ai[2] == 0f && num22 != NPC.direction) + if (NPC.ai[2] == 0f && shorkFaceDirection != NPC.direction) NPC.rotation += MathHelper.Pi; - NPC.direction = num22; + NPC.direction = shorkFaceDirection; if (NPC.spriteDirection != -NPC.direction) NPC.rotation += MathHelper.Pi; @@ -268,17 +268,17 @@ namespace CalamityMod.NPCs.GreatSandShark } NPC.ai[2] += 1f; - if (NPC.ai[2] >= num2) + if (NPC.ai[2] >= chargeTime) { NPC.ai[0] = 1f; NPC.ai[1] = 0f; NPC.ai[2] = 0f; - NPC.velocity = Vector2.Normalize(player.Center - vector) * num5; + NPC.velocity = Vector2.Normalize(player.Center - shorkCenter) * chargeVelocity; NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X); - if (num22 != 0) + if (shorkFaceDirection != 0) { - NPC.direction = num22; + NPC.direction = shorkFaceDirection; if (NPC.spriteDirection == 1) NPC.rotation += MathHelper.Pi; @@ -292,7 +292,7 @@ namespace CalamityMod.NPCs.GreatSandShark else if (NPC.ai[0] == 1f) { NPC.ai[2] += 1f; - if (NPC.ai[2] >= num4) + if (NPC.ai[2] >= chargeDelay) { NPC.localAI[3] += 1f; if (NPC.localAI[3] >= 2f) @@ -312,15 +312,15 @@ namespace CalamityMod.NPCs.GreatSandShark if (NPC.direction == 0) NPC.TargetClosest(); - Point point15 = NPC.Center.ToTileCoordinates(); - Tile tileSafely = Framing.GetTileSafely(point15); - bool flag121 = tileSafely.HasUnactuatedTile || tileSafely.LiquidAmount > 0; - bool flag122 = false; + Point shorkTileCenter = NPC.Center.ToTileCoordinates(); + Tile tileSafely = Framing.GetTileSafely(shorkTileCenter); + bool isInSolidTile = tileSafely.HasUnactuatedTile || tileSafely.LiquidAmount > 0; + bool shouldDoLunge = false; NPC.TargetClosest(false); - Vector2 vector260 = NPC.targetRect.Center.ToVector2(); - if (Main.player[NPC.target].velocity.Y > -0.1f && !Main.player[NPC.target].dead && NPC.Distance(vector260) > 150f) - flag122 = true; + Vector2 targetLungeDirection = NPC.targetRect.Center.ToVector2(); + if (Main.player[NPC.target].velocity.Y > -0.1f && !Main.player[NPC.target].dead && NPC.Distance(targetLungeDirection) > 150f) + shouldDoLunge = true; NPC.localAI[1] += 1f; @@ -364,25 +364,24 @@ namespace CalamityMod.NPCs.GreatSandShark NPC.netUpdate = true; } - if (NPC.localAI[0] == -1f && !flag121) + if (NPC.localAI[0] == -1f && !isInSolidTile) NPC.localAI[0] = 20f; if (NPC.localAI[0] > 0f) NPC.localAI[0] -= 1f; - if (flag121) + if (isInSolidTile) { - float num1534 = NPC.ai[1]; - bool flag123 = false; - point15 = (NPC.Center + new Vector2(0f, 24f)).ToTileCoordinates(); - tileSafely = Framing.GetTileSafely(point15.X, point15.Y - 2); + bool lungeShouldDecelerate = false; + shorkTileCenter = (NPC.Center + new Vector2(0f, 24f)).ToTileCoordinates(); + tileSafely = Framing.GetTileSafely(shorkTileCenter.X, shorkTileCenter.Y - 2); if (tileSafely.HasUnactuatedTile) - flag123 = true; + lungeShouldDecelerate = true; - NPC.ai[1] = flag123.ToInt(); + NPC.ai[1] = lungeShouldDecelerate.ToInt(); if (NPC.ai[2] < 30f) NPC.ai[2] += 1f; - if (flag122) + if (shouldDoLunge) { NPC.TargetClosest(); NPC.velocity.X += NPC.direction * 0.15f; @@ -416,34 +415,34 @@ namespace CalamityMod.NPCs.GreatSandShark } NPC.velocity.X = MathHelper.Clamp(NPC.velocity.X, -velocityX, velocityX); NPC.velocity.Y = MathHelper.Clamp(NPC.velocity.Y, -velocityY, velocityY); - Vector2 vec4 = NPC.Center + NPC.velocity.SafeNormalize(Vector2.Zero) * NPC.Size.Length() / 2f + NPC.velocity; - point15 = vec4.ToTileCoordinates(); - tileSafely = Framing.GetTileSafely(point15); - bool flag124 = tileSafely.HasUnactuatedTile; - if (!flag124 && Math.Sign(NPC.velocity.X) == NPC.direction && (NPC.Distance(vector260) < 600f || youMustDie) && (NPC.ai[2] >= 30f || NPC.ai[2] < 0f)) + Vector2 shorkDirection = NPC.Center + NPC.velocity.SafeNormalize(Vector2.Zero) * NPC.Size.Length() / 2f + NPC.velocity; + shorkTileCenter = shorkDirection.ToTileCoordinates(); + tileSafely = Framing.GetTileSafely(shorkTileCenter); + bool isInTile = tileSafely.HasUnactuatedTile; + if (!isInTile && Math.Sign(NPC.velocity.X) == NPC.direction && (NPC.Distance(targetLungeDirection) < 600f || youMustDie) && (NPC.ai[2] >= 30f || NPC.ai[2] < 0f)) { if (NPC.localAI[0] == 0f) { SoundEngine.PlaySound(SoundID.NPCDeath15, NPC.position); NPC.localAI[0] = -1f; - for (int num621 = 0; num621 < 25; num621++) + for (int i = 0; i < 25; i++) { - int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 32, 0f, 0f, 100, default, 2f); - Main.dust[num622].velocity.Y *= 6f; - Main.dust[num622].velocity.X *= 3f; + int burrowDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 32, 0f, 0f, 100, default, 2f); + Main.dust[burrowDust].velocity.Y *= 6f; + Main.dust[burrowDust].velocity.X *= 3f; if (Main.rand.NextBool()) { - Main.dust[num622].scale = 0.5f; - Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f; + Main.dust[burrowDust].scale = 0.5f; + Main.dust[burrowDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f; } } - for (int num623 = 0; num623 < 50; num623++) + for (int j = 0; j < 50; j++) { - int num624 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 85, 0f, 0f, 100, default, 3f); - Main.dust[num624].noGravity = true; - Main.dust[num624].velocity.Y *= 10f; - num624 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 268, 0f, 0f, 100, default, 2f); - Main.dust[num624].velocity.X *= 2f; + int burrowDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 85, 0f, 0f, 100, default, 3f); + Main.dust[burrowDust2].noGravity = true; + Main.dust[burrowDust2].velocity.Y *= 10f; + burrowDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 268, 0f, 0f, 100, default, 2f); + Main.dust[burrowDust2].velocity.X *= 2f; } int spawnX = (int)(NPC.width / 2); int projType = Main.zenithWorld ? ModContent.ProjectileType() : ModContent.ProjectileType(); @@ -453,34 +452,34 @@ namespace CalamityMod.NPCs.GreatSandShark } NPC.ai[2] = -30f; - Vector2 upwardChargeDirection = NPC.SafeDirectionTo(vector260 + new Vector2(0f, -80f), -Vector2.UnitY); + Vector2 upwardChargeDirection = NPC.SafeDirectionTo(targetLungeDirection + new Vector2(0f, -80f), -Vector2.UnitY); NPC.velocity = upwardChargeDirection * 18f; } } else { - float num1535 = 6f; + float decelerationXThreshold = 6f; NPC.velocity.X += NPC.direction * 0.1f; - if (NPC.velocity.X < -num1535 || NPC.velocity.X > num1535) + if (NPC.velocity.X < -decelerationXThreshold || NPC.velocity.X > decelerationXThreshold) NPC.velocity.X *= 0.95f; - if (flag123) + if (lungeShouldDecelerate) NPC.ai[0] = -1f; else NPC.ai[0] = 1f; - float num1536 = 0.06f; - float num1537 = 0.01f; + float decelerationYThreshold = 0.06f; + float decelerationAmt = 0.01f; if (NPC.ai[0] == -1f) { - NPC.velocity.Y -= num1537; - if (NPC.velocity.Y < -num1536) + NPC.velocity.Y -= decelerationAmt; + if (NPC.velocity.Y < -decelerationYThreshold) NPC.ai[0] = 1f; } else { - NPC.velocity.Y += num1537; - if (NPC.velocity.Y > num1536) + NPC.velocity.Y += decelerationAmt; + if (NPC.velocity.Y > decelerationYThreshold) NPC.ai[0] = -1f; } @@ -492,12 +491,12 @@ namespace CalamityMod.NPCs.GreatSandShark { if (NPC.velocity.Y == 0f) { - if (flag122) + if (shouldDoLunge) NPC.TargetClosest(); - float num1538 = 1f; + float smallDecelerationXThreshold = 1f; NPC.velocity.X += NPC.direction * 0.1f; - if (NPC.velocity.X < -num1538 || NPC.velocity.X > num1538) + if (NPC.velocity.X < -smallDecelerationXThreshold || NPC.velocity.X > smallDecelerationXThreshold) NPC.velocity.X *= 0.95f; } @@ -586,46 +585,44 @@ namespace CalamityMod.NPCs.GreatSandShark { spriteEffects = SpriteEffects.FlipHorizontally; } - Color color24 = NPC.GetAlpha(drawColor); - Color color25 = Lighting.GetColor((int)((double)NPC.position.X + (double)NPC.width * 0.5) / 16, (int)(((double)NPC.position.Y + (double)NPC.height * 0.5) / 16.0)); + Color mainAfterimageColor = NPC.GetAlpha(drawColor); + Color extraAfterimageColor = Lighting.GetColor((int)((double)NPC.position.X + (double)NPC.width * 0.5) / 16, (int)(((double)NPC.position.Y + (double)NPC.height * 0.5) / 16.0)); if (Main.zenithWorld) { - color24 = Color.Silver; - color25 = Color.Orange; + mainAfterimageColor = Color.Silver; + extraAfterimageColor = Color.Orange; } Texture2D texture2D3 = TextureAssets.Npc[NPC.type].Value; - int num156 = TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type]; - int y3 = num156 * (int)NPC.frameCounter; - Rectangle rectangle = new Rectangle(0, y3, texture2D3.Width, num156); - Vector2 origin2 = rectangle.Size() / 2f; - int num157 = 8; - int num158 = 2; - int num159 = 1; - float num160 = 0f; - int num161 = num159; - while (((num158 > 0 && num161 < num157) || (num158 < 0 && num161 > num157)) && CalamityConfig.Instance.Afterimages) + int currentFrame = TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type]; + int y3 = currentFrame * (int)NPC.frameCounter; + Rectangle rectangle = new Rectangle(0, y3, texture2D3.Width, currentFrame); + Vector2 halfRectSize = rectangle.Size() / 2f; + int eightConst = 8; + int afterimageInc = 2; + int afterimageCounter = 1; + while (((afterimageInc > 0 && afterimageCounter < eightConst) || (afterimageInc < 0 && afterimageCounter > eightConst)) && CalamityConfig.Instance.Afterimages) { - Color color26 = NPC.GetAlpha(color25); + Color alphaAfterimageColor = NPC.GetAlpha(extraAfterimageColor); { goto IL_6899; } IL_6881: - num161 += num158; + afterimageCounter += afterimageInc; continue; IL_6899: - float num164 = (float)(num157 - num161); - if (num158 < 0) + float afterimagesRemaining = (float)(eightConst - afterimageCounter); + if (afterimageInc < 0) { - num164 = (float)(num159 - num161); + afterimagesRemaining = (float)(1 - afterimageCounter); } - color26 *= num164 / ((float)NPCID.Sets.TrailCacheLength[NPC.type] * 1.5f); - Vector2 value4 = NPC.oldPos[num161]; - float num165 = NPC.rotation; - Main.spriteBatch.Draw(texture2D3, value4 + NPC.Size / 2f - screenPos + new Vector2(0, NPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle), color26, num165 + NPC.rotation * num160 * (float)(num161 - 1) * -(float)spriteEffects.HasFlag(SpriteEffects.FlipHorizontally).ToDirectionInt(), origin2, NPC.scale, spriteEffects, 0f); + alphaAfterimageColor *= afterimagesRemaining / ((float)NPCID.Sets.TrailCacheLength[NPC.type] * 1.5f); + Vector2 afterimagePos = NPC.oldPos[afterimageCounter]; + float afterimageRotation = NPC.rotation; + Main.spriteBatch.Draw(texture2D3, afterimagePos + NPC.Size / 2f - screenPos + new Vector2(0, NPC.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(rectangle), alphaAfterimageColor, afterimageRotation + NPC.rotation * 0f * (float)(afterimageCounter - 1) * -(float)spriteEffects.HasFlag(SpriteEffects.FlipHorizontally).ToDirectionInt(), halfRectSize, NPC.scale, spriteEffects, 0f); goto IL_6881; } var something = NPC.direction == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; - spriteBatch.Draw(texture2D3, NPC.Center - screenPos + new Vector2(0, NPC.gfxOffY), NPC.frame, color24, NPC.rotation, NPC.frame.Size() / 2, NPC.scale, something, 0); + spriteBatch.Draw(texture2D3, NPC.Center - screenPos + new Vector2(0, NPC.gfxOffY), NPC.frame, mainAfterimageColor, NPC.rotation, NPC.frame.Size() / 2, NPC.scale, something, 0); return false; } @@ -638,23 +635,23 @@ namespace CalamityMod.NPCs.GreatSandShark } if (NPC.life <= 0) { - for (int num621 = 0; num621 < 50; num621++) + for (int i = 0; i < 50; i++) { - int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 5, 0f, 0f, 100, default, 2f); - Main.dust[num622].velocity *= 3f; + int burrowDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 5, 0f, 0f, 100, default, 2f); + Main.dust[burrowDust].velocity *= 3f; if (Main.rand.NextBool()) { - Main.dust[num622].scale = 0.5f; - Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + Main.dust[burrowDust].scale = 0.5f; + Main.dust[burrowDust].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; } } - for (int num623 = 0; num623 < 100; num623++) + for (int j = 0; j < 100; j++) { - int num624 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 5, 0f, 0f, 100, default, 3f); - Main.dust[num624].noGravity = true; - Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 5, 0f, 0f, 100, default, 2f); - Main.dust[num624].velocity *= 2f; + int burrowDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 5, 0f, 0f, 100, default, 3f); + Main.dust[burrowDust2].noGravity = true; + Main.dust[burrowDust2].velocity *= 5f; + burrowDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 5, 0f, 0f, 100, default, 2f); + Main.dust[burrowDust2].velocity *= 2f; } } } From 7579a642b7b080cb1a6f21236774ff23f636da26 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 2 Nov 2023 10:15:21 -0400 Subject: [PATCH 46/95] NormalNPCs and Other --- NPCs/NormalNPCs/ArmoredDiggerBody.cs | 75 ++++--- NPCs/NormalNPCs/ArmoredDiggerHead.cs | 244 ++++++++++----------- NPCs/NormalNPCs/ArmoredDiggerTail.cs | 50 ++--- NPCs/NormalNPCs/AuroraSpirit.cs | 8 +- NPCs/NormalNPCs/Cnidrion.cs | 130 +++++------ NPCs/NormalNPCs/Eidolist.cs | 96 ++++---- NPCs/NormalNPCs/FearlessGoldfishWarrior.cs | 172 +++++++-------- NPCs/NormalNPCs/Frogfish.cs | 6 +- NPCs/NormalNPCs/Horse.cs | 69 +++--- NPCs/NormalNPCs/ImpiousImmolator.cs | 36 +-- NPCs/NormalNPCs/KingSlimeJewel.cs | 22 +- NPCs/NormalNPCs/MantisShrimp.cs | 30 +-- NPCs/NormalNPCs/OverloadedSoldier.cs | 174 +++++++-------- NPCs/NormalNPCs/PhantomSpirit.cs | 10 +- NPCs/NormalNPCs/PhantomSpiritL.cs | 28 +-- NPCs/NormalNPCs/PhantomSpiritM.cs | 10 +- NPCs/NormalNPCs/PhantomSpiritS.cs | 10 +- NPCs/NormalNPCs/ProfanedEnergyLantern.cs | 99 +++++---- NPCs/NormalNPCs/ScornEater.cs | 10 +- NPCs/NormalNPCs/ShockstormShuttle.cs | 203 +++++++++-------- NPCs/NormalNPCs/Sunskater.cs | 20 +- NPCs/NormalNPCs/WildBumblefuck.cs | 32 ++- NPCs/Other/THELORDE.cs | 35 ++- 23 files changed, 780 insertions(+), 789 deletions(-) diff --git a/NPCs/NormalNPCs/ArmoredDiggerBody.cs b/NPCs/NormalNPCs/ArmoredDiggerBody.cs index 7b5e104bf5..0a3b9e0fb0 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerBody.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerBody.cs @@ -57,16 +57,16 @@ namespace CalamityMod.NPCs.NormalNPCs { NPC.TargetClosest(true); } - bool flag = false; + bool shouldDie = false; if (NPC.ai[1] <= 0f) { - flag = true; + shouldDie = true; } else if (Main.npc[(int)NPC.ai[1]].life <= 0) { - flag = true; + shouldDie = true; } - if (flag) + if (shouldDie) { if (!Main.zenithWorld) { @@ -87,7 +87,7 @@ namespace CalamityMod.NPCs.NormalNPCs break; } } - // if it goes through the loop withuot finding an npc to attatch to (aka, ai[1] never changes and the head is still dead) kill as normal + // if it goes through the loop without finding an npc to attatch to (aka, ai[1] never changes and the head is still dead) kill as normal if (Main.npc[(int)NPC.ai[1]].life <= 0) { NPC.life = 0; @@ -107,51 +107,50 @@ namespace CalamityMod.NPCs.NormalNPCs Main.player[NPC.target].width, Main.player[NPC.target].height)) { float speed = 7f; - Vector2 vector = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)(NPC.height / 2)); - float num6 = Main.player[NPC.target].position.X + (float)Main.player[NPC.target].width * 0.5f - vector.X + (float)Main.rand.Next(-20, 21); - float num7 = Main.player[NPC.target].position.Y + (float)Main.player[NPC.target].height * 0.5f - vector.Y + (float)Main.rand.Next(-20, 21); - float num8 = (float)Math.Sqrt((double)(num6 * num6 + num7 * num7)); - num8 = speed / num8; - num6 *= num8; - num7 *= num8; - int num9 = 30; - int num10 = Main.zenithWorld ? ModContent.ProjectileType() : ProjectileID.SaucerScrap; - vector.X += num6 * 5f; - vector.Y += num7 * 5f; - Projectile.NewProjectile(NPC.GetSource_FromAI(), vector.X, vector.Y, num6, num7, num10, num9, 0f, Main.myPlayer, 0f, 0f); + Vector2 projFirePosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)(NPC.height / 2)); + float projTargetX = Main.player[NPC.target].position.X + (float)Main.player[NPC.target].width * 0.5f - projFirePosition.X + (float)Main.rand.Next(-20, 21); + float projTargetY = Main.player[NPC.target].position.Y + (float)Main.player[NPC.target].height * 0.5f - projFirePosition.Y + (float)Main.rand.Next(-20, 21); + float projTargetDist = (float)Math.Sqrt((double)(projTargetX * projTargetX + projTargetY * projTargetY)); + projTargetDist = speed / projTargetDist; + projTargetX *= projTargetDist; + projTargetY *= projTargetDist; + int projType = Main.zenithWorld ? ModContent.ProjectileType() : ProjectileID.SaucerScrap; + projFirePosition.X += projTargetX * 5f; + projFirePosition.Y += projTargetY * 5f; + Projectile.NewProjectile(NPC.GetSource_FromAI(), projFirePosition.X, projFirePosition.Y, projTargetX, projTargetY, projType, 30, 0f, Main.myPlayer, 0f, 0f); NPC.netUpdate = true; } } } - Vector2 vector3 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num20 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); - float num21 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); - num20 = (float)((int)(num20 / 16f) * 16); - num21 = (float)((int)(num21 / 16f) * 16); - vector3.X = (float)((int)(vector3.X / 16f) * 16); - vector3.Y = (float)((int)(vector3.Y / 16f) * 16); - num20 -= vector3.X; - num21 -= vector3.Y; - float num22 = (float)Math.Sqrt((double)(num20 * num20 + num21 * num21)); + Vector2 segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float targetXDist = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); + float targetYDist = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); + targetXDist = (float)((int)(targetXDist / 16f) * 16); + targetYDist = (float)((int)(targetYDist / 16f) * 16); + segmentPosition.X = (float)((int)(segmentPosition.X / 16f) * 16); + segmentPosition.Y = (float)((int)(segmentPosition.Y / 16f) * 16); + targetXDist -= segmentPosition.X; + targetYDist -= segmentPosition.Y; + float targetDistance = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); if (NPC.ai[1] > 0f && NPC.ai[1] < (float)Main.npc.Length) { try { - vector3 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - num20 = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - vector3.X; - num21 = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - vector3.Y; + segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + targetXDist = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - segmentPosition.X; + targetYDist = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - segmentPosition.Y; } catch { } - NPC.rotation = (float)Math.Atan2((double)num21, (double)num20) + 1.57f; - num22 = (float)Math.Sqrt((double)(num20 * num20 + num21 * num21)); - int num23 = (int)(44f * NPC.scale); - num22 = (num22 - (float)num23) / num22; - num20 *= num22; - num21 *= num22; + NPC.rotation = (float)Math.Atan2((double)targetYDist, (double)targetXDist) + 1.57f; + targetDistance = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); + int segmentWidth = (int)(44f * NPC.scale); + targetDistance = (targetDistance - (float)segmentWidth) / targetDistance; + targetXDist *= targetDistance; + targetYDist *= targetDistance; NPC.velocity = Vector2.Zero; - NPC.position.X = NPC.position.X + num20; - NPC.position.Y = NPC.position.Y + num21; + NPC.position.X = NPC.position.X + targetXDist; + NPC.position.Y = NPC.position.Y + targetYDist; } } diff --git a/NPCs/NormalNPCs/ArmoredDiggerHead.cs b/NPCs/NormalNPCs/ArmoredDiggerHead.cs index c9edca6759..a97631312d 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerHead.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerHead.cs @@ -96,90 +96,90 @@ namespace CalamityMod.NPCs.NormalNPCs { NPC.ai[3] = (float)NPC.whoAmI; NPC.realLife = NPC.whoAmI; - int num2 = NPC.whoAmI; - int num3 = 30; - for (int j = 0; j <= num3; j++) + int thisSegment = NPC.whoAmI; + int segmentAmt = 30; + for (int j = 0; j <= segmentAmt; j++) { - int num4 = ModContent.NPCType(); - if (j == num3) + int segmentType = ModContent.NPCType(); + if (j == segmentAmt) { - num4 = ModContent.NPCType(); + segmentType = ModContent.NPCType(); } - int num5 = NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.position.X + (float)(NPC.width / 2)), (int)(NPC.position.Y + (float)NPC.height), num4, NPC.whoAmI, 0f, 0f, 0f, 0f, 255); - Main.npc[num5].ai[3] = (float)NPC.whoAmI; - Main.npc[num5].realLife = NPC.whoAmI; - Main.npc[num5].ai[1] = (float)num2; - Main.npc[num2].ai[0] = (float)num5; - NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, num5, 0f, 0f, 0f, 0, 0, 0); - num2 = num5; + int newSegment = NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.position.X + (float)(NPC.width / 2)), (int)(NPC.position.Y + (float)NPC.height), segmentType, NPC.whoAmI, 0f, 0f, 0f, 0f, 255); + Main.npc[newSegment].ai[3] = (float)NPC.whoAmI; + Main.npc[newSegment].realLife = NPC.whoAmI; + Main.npc[newSegment].ai[1] = (float)thisSegment; + Main.npc[thisSegment].ai[0] = (float)newSegment; + NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, newSegment, 0f, 0f, 0f, 0, 0, 0); + thisSegment = newSegment; } TailSpawned = true; } } - int num12 = (int)(NPC.position.X / 16f) - 1; - int num13 = (int)((NPC.position.X + (float)NPC.width) / 16f) + 2; - int num14 = (int)(NPC.position.Y / 16f) - 1; - int num15 = (int)((NPC.position.Y + (float)NPC.height) / 16f) + 2; - if (num12 < 0) + int tileXPosition = (int)(NPC.position.X / 16f) - 1; + int tileWidthXPos = (int)((NPC.position.X + (float)NPC.width) / 16f) + 2; + int tileYPosition = (int)(NPC.position.Y / 16f) - 1; + int tileWidthYPos = (int)((NPC.position.Y + (float)NPC.height) / 16f) + 2; + if (tileXPosition < 0) { - num12 = 0; + tileXPosition = 0; } - if (num13 > Main.maxTilesX) + if (tileWidthXPos > Main.maxTilesX) { - num13 = Main.maxTilesX; + tileWidthXPos = Main.maxTilesX; } - if (num14 < 0) + if (tileYPosition < 0) { - num14 = 0; + tileYPosition = 0; } - if (num15 > Main.maxTilesY) + if (tileWidthYPos > Main.maxTilesY) { - num15 = Main.maxTilesY; + tileWidthYPos = Main.maxTilesY; } - bool flag2 = false; - if (!flag2) + bool flying = false; + if (!flying) { - for (int k = num12; k < num13; k++) + for (int k = tileXPosition; k < tileWidthXPos; k++) { - for (int l = num14; l < num15; l++) + for (int l = tileYPosition; l < tileWidthYPos; l++) { if (Main.tile[k, l] != null && ((Main.tile[k, l].HasUnactuatedTile && (Main.tileSolid[(int)Main.tile[k, l].TileType] || (Main.tileSolidTop[(int)Main.tile[k, l].TileType] && Main.tile[k, l].TileFrameY == 0))) || Main.tile[k, l].LiquidAmount > 64)) { - Vector2 vector2; - vector2.X = (float)(k * 16); - vector2.Y = (float)(l * 16); - if (NPC.position.X + (float)NPC.width > vector2.X && NPC.position.X < vector2.X + 16f && NPC.position.Y + (float)NPC.height > vector2.Y && NPC.position.Y < vector2.Y + 16f) + Vector2 segmentPos; + segmentPos.X = (float)(k * 16); + segmentPos.Y = (float)(l * 16); + if (NPC.position.X + (float)NPC.width > segmentPos.X && NPC.position.X < segmentPos.X + 16f && NPC.position.Y + (float)NPC.height > segmentPos.Y && NPC.position.Y < segmentPos.Y + 16f) { - flag2 = true; + flying = true; break; } } } } } - if (!flag2) + if (!flying) { NPC.localAI[1] = 1f; Rectangle rectangle = new Rectangle((int)NPC.position.X, (int)NPC.position.Y, NPC.width, NPC.height); - int num16 = 1000; - bool flag3 = true; + int noFlyZone = 1000; + bool outsideNoFlyZone = true; if (NPC.position.Y > Main.player[NPC.target].position.Y) { for (int m = 0; m < 255; m++) { if (Main.player[m].active) { - Rectangle rectangle2 = new Rectangle((int)Main.player[m].position.X - num16, (int)Main.player[m].position.Y - num16, num16 * 2, num16 * 2); - if (rectangle.Intersects(rectangle2)) + Rectangle noFlyArea = new Rectangle((int)Main.player[m].position.X - noFlyZone, (int)Main.player[m].position.Y - noFlyZone, noFlyZone * 2, noFlyZone * 2); + if (rectangle.Intersects(noFlyArea)) { - flag3 = false; + outsideNoFlyZone = false; break; } } } - if (flag3) + if (outsideNoFlyZone) { - flag2 = true; + flying = true; } } } @@ -187,15 +187,15 @@ namespace CalamityMod.NPCs.NormalNPCs { NPC.localAI[1] = 0f; } - float num17 = death ? 13.5f : 10f; + float fallSpeed = death ? 13.5f : 10f; if (Main.player[NPC.target].dead || (!Main.zenithWorld && (double)Main.player[NPC.target].position.Y < Main.rockLayer * 16.0)) { - flag2 = false; + flying = false; NPC.velocity.Y = NPC.velocity.Y + 1f; if ((double)NPC.position.Y > Main.rockLayer * 16.0) { NPC.velocity.Y = NPC.velocity.Y + 1f; - num17 = death ? 27f : 20f; + fallSpeed = death ? 27f : 20f; } if ((double)NPC.position.Y > (double)((Main.maxTilesY - 200) * 16)) { @@ -209,57 +209,57 @@ namespace CalamityMod.NPCs.NormalNPCs } } } - float num18 = death ? 0.0675f : 0.05f; - float num19 = death ? 0.10125f : 0.075f; - Vector2 vector3 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num20 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); - float num21 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); - num20 = (float)((int)(num20 / 16f) * 16); - num21 = (float)((int)(num21 / 16f) * 16); - vector3.X = (float)((int)(vector3.X / 16f) * 16); - vector3.Y = (float)((int)(vector3.Y / 16f) * 16); - num20 -= vector3.X; - num21 -= vector3.Y; - float num22 = (float)Math.Sqrt((double)(num20 * num20 + num21 * num21)); - if (!flag2) + float acceleration = death ? 0.0675f : 0.05f; + float deceleration = death ? 0.10125f : 0.075f; + Vector2 segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float targetXDist = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); + float targetYDist = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); + targetXDist = (float)((int)(targetXDist / 16f) * 16); + targetYDist = (float)((int)(targetYDist / 16f) * 16); + segmentPosition.X = (float)((int)(segmentPosition.X / 16f) * 16); + segmentPosition.Y = (float)((int)(segmentPosition.Y / 16f) * 16); + targetXDist -= segmentPosition.X; + targetYDist -= segmentPosition.Y; + float targetDistance = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); + if (!flying) { NPC.TargetClosest(true); NPC.velocity.Y = NPC.velocity.Y + 0.15f; - if (NPC.velocity.Y > num17) + if (NPC.velocity.Y > fallSpeed) { - NPC.velocity.Y = num17; + NPC.velocity.Y = fallSpeed; } - if ((double)(Math.Abs(NPC.velocity.X) + Math.Abs(NPC.velocity.Y)) < (double)num17 * 0.4) + if ((double)(Math.Abs(NPC.velocity.X) + Math.Abs(NPC.velocity.Y)) < (double)fallSpeed * 0.4) { if (NPC.velocity.X < 0f) { - NPC.velocity.X = NPC.velocity.X - num18 * 1.1f; + NPC.velocity.X = NPC.velocity.X - acceleration * 1.1f; } else { - NPC.velocity.X = NPC.velocity.X + num18 * 1.1f; + NPC.velocity.X = NPC.velocity.X + acceleration * 1.1f; } } - else if (NPC.velocity.Y == num17) + else if (NPC.velocity.Y == fallSpeed) { - if (NPC.velocity.X < num20) + if (NPC.velocity.X < targetXDist) { - NPC.velocity.X = NPC.velocity.X + num18; + NPC.velocity.X = NPC.velocity.X + acceleration; } - else if (NPC.velocity.X > num20) + else if (NPC.velocity.X > targetXDist) { - NPC.velocity.X = NPC.velocity.X - num18; + NPC.velocity.X = NPC.velocity.X - acceleration; } } else if (NPC.velocity.Y > 4f) { if (NPC.velocity.X < 0f) { - NPC.velocity.X = NPC.velocity.X + num18 * 0.9f; + NPC.velocity.X = NPC.velocity.X + acceleration * 0.9f; } else { - NPC.velocity.X = NPC.velocity.X - num18 * 0.9f; + NPC.velocity.X = NPC.velocity.X - acceleration * 0.9f; } } } @@ -267,131 +267,131 @@ namespace CalamityMod.NPCs.NormalNPCs { if (NPC.soundDelay == 0) { - float num24 = num22 / 40f; - if (num24 < 10f) + float soundDelay = targetDistance / 40f; + if (soundDelay < 10f) { - num24 = 10f; + soundDelay = 10f; } - if (num24 > 20f) + if (soundDelay > 20f) { - num24 = 20f; + soundDelay = 20f; } - NPC.soundDelay = (int)num24; + NPC.soundDelay = (int)soundDelay; SoundEngine.PlaySound(SoundID.WormDig, NPC.Center); } - num22 = (float)Math.Sqrt((double)(num20 * num20 + num21 * num21)); - float num25 = Math.Abs(num20); - float num26 = Math.Abs(num21); - float num27 = num17 / num22; - num20 *= num27; - num21 *= num27; - if (((NPC.velocity.X > 0f && num20 > 0f) || (NPC.velocity.X < 0f && num20 < 0f)) && ((NPC.velocity.Y > 0f && num21 > 0f) || (NPC.velocity.Y < 0f && num21 < 0f))) + targetDistance = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); + float absoluteTargetX = Math.Abs(targetXDist); + float absoluteTargetY = Math.Abs(targetYDist); + float timeToReachTarget = fallSpeed / targetDistance; + targetXDist *= timeToReachTarget; + targetYDist *= timeToReachTarget; + if (((NPC.velocity.X > 0f && targetXDist > 0f) || (NPC.velocity.X < 0f && targetXDist < 0f)) && ((NPC.velocity.Y > 0f && targetYDist > 0f) || (NPC.velocity.Y < 0f && targetYDist < 0f))) { - if (NPC.velocity.X < num20) + if (NPC.velocity.X < targetXDist) { - NPC.velocity.X = NPC.velocity.X + num19; + NPC.velocity.X = NPC.velocity.X + deceleration; } - else if (NPC.velocity.X > num20) + else if (NPC.velocity.X > targetXDist) { - NPC.velocity.X = NPC.velocity.X - num19; + NPC.velocity.X = NPC.velocity.X - deceleration; } - if (NPC.velocity.Y < num21) + if (NPC.velocity.Y < targetYDist) { - NPC.velocity.Y = NPC.velocity.Y + num19; + NPC.velocity.Y = NPC.velocity.Y + deceleration; } - else if (NPC.velocity.Y > num21) + else if (NPC.velocity.Y > targetYDist) { - NPC.velocity.Y = NPC.velocity.Y - num19; + NPC.velocity.Y = NPC.velocity.Y - deceleration; } } - if ((NPC.velocity.X > 0f && num20 > 0f) || (NPC.velocity.X < 0f && num20 < 0f) || (NPC.velocity.Y > 0f && num21 > 0f) || (NPC.velocity.Y < 0f && num21 < 0f)) + if ((NPC.velocity.X > 0f && targetXDist > 0f) || (NPC.velocity.X < 0f && targetXDist < 0f) || (NPC.velocity.Y > 0f && targetYDist > 0f) || (NPC.velocity.Y < 0f && targetYDist < 0f)) { - if (NPC.velocity.X < num20) + if (NPC.velocity.X < targetXDist) { - NPC.velocity.X = NPC.velocity.X + num18; + NPC.velocity.X = NPC.velocity.X + acceleration; } - else if (NPC.velocity.X > num20) + else if (NPC.velocity.X > targetXDist) { - NPC.velocity.X = NPC.velocity.X - num18; + NPC.velocity.X = NPC.velocity.X - acceleration; } - if (NPC.velocity.Y < num21) + if (NPC.velocity.Y < targetYDist) { - NPC.velocity.Y = NPC.velocity.Y + num18; + NPC.velocity.Y = NPC.velocity.Y + acceleration; } - else if (NPC.velocity.Y > num21) + else if (NPC.velocity.Y > targetYDist) { - NPC.velocity.Y = NPC.velocity.Y - num18; + NPC.velocity.Y = NPC.velocity.Y - acceleration; } - if ((double)Math.Abs(num21) < (double)num17 * 0.2 && ((NPC.velocity.X > 0f && num20 < 0f) || (NPC.velocity.X < 0f && num20 > 0f))) + if ((double)Math.Abs(targetYDist) < (double)fallSpeed * 0.2 && ((NPC.velocity.X > 0f && targetXDist < 0f) || (NPC.velocity.X < 0f && targetXDist > 0f))) { if (NPC.velocity.Y > 0f) { - NPC.velocity.Y = NPC.velocity.Y + num18 * 2f; + NPC.velocity.Y = NPC.velocity.Y + acceleration * 2f; } else { - NPC.velocity.Y = NPC.velocity.Y - num18 * 2f; + NPC.velocity.Y = NPC.velocity.Y - acceleration * 2f; } } - if ((double)Math.Abs(num20) < (double)num17 * 0.2 && ((NPC.velocity.Y > 0f && num21 < 0f) || (NPC.velocity.Y < 0f && num21 > 0f))) + if ((double)Math.Abs(targetXDist) < (double)fallSpeed * 0.2 && ((NPC.velocity.Y > 0f && targetYDist < 0f) || (NPC.velocity.Y < 0f && targetYDist > 0f))) { if (NPC.velocity.X > 0f) { - NPC.velocity.X = NPC.velocity.X + num18 * 2f; + NPC.velocity.X = NPC.velocity.X + acceleration * 2f; } else { - NPC.velocity.X = NPC.velocity.X - num18 * 2f; + NPC.velocity.X = NPC.velocity.X - acceleration * 2f; } } } - else if (num25 > num26) + else if (absoluteTargetX > absoluteTargetY) { - if (NPC.velocity.X < num20) + if (NPC.velocity.X < targetXDist) { - NPC.velocity.X = NPC.velocity.X + num18 * 1.1f; + NPC.velocity.X = NPC.velocity.X + acceleration * 1.1f; } - else if (NPC.velocity.X > num20) + else if (NPC.velocity.X > targetXDist) { - NPC.velocity.X = NPC.velocity.X - num18 * 1.1f; + NPC.velocity.X = NPC.velocity.X - acceleration * 1.1f; } - if ((double)(Math.Abs(NPC.velocity.X) + Math.Abs(NPC.velocity.Y)) < (double)num17 * 0.5) + if ((double)(Math.Abs(NPC.velocity.X) + Math.Abs(NPC.velocity.Y)) < (double)fallSpeed * 0.5) { if (NPC.velocity.Y > 0f) { - NPC.velocity.Y = NPC.velocity.Y + num18; + NPC.velocity.Y = NPC.velocity.Y + acceleration; } else { - NPC.velocity.Y = NPC.velocity.Y - num18; + NPC.velocity.Y = NPC.velocity.Y - acceleration; } } } else { - if (NPC.velocity.Y < num21) + if (NPC.velocity.Y < targetYDist) { - NPC.velocity.Y = NPC.velocity.Y + num18 * 1.1f; + NPC.velocity.Y = NPC.velocity.Y + acceleration * 1.1f; } - else if (NPC.velocity.Y > num21) + else if (NPC.velocity.Y > targetYDist) { - NPC.velocity.Y = NPC.velocity.Y - num18 * 1.1f; + NPC.velocity.Y = NPC.velocity.Y - acceleration * 1.1f; } - if ((double)(Math.Abs(NPC.velocity.X) + Math.Abs(NPC.velocity.Y)) < (double)num17 * 0.5) + if ((double)(Math.Abs(NPC.velocity.X) + Math.Abs(NPC.velocity.Y)) < (double)fallSpeed * 0.5) { if (NPC.velocity.X > 0f) { - NPC.velocity.X = NPC.velocity.X + num18; + NPC.velocity.X = NPC.velocity.X + acceleration; } else { - NPC.velocity.X = NPC.velocity.X - num18; + NPC.velocity.X = NPC.velocity.X - acceleration; } } } } NPC.rotation = (float)Math.Atan2((double)NPC.velocity.Y, (double)NPC.velocity.X) + 1.57f; - if (flag2) + if (flying) { if (NPC.localAI[0] != 1f) { diff --git a/NPCs/NormalNPCs/ArmoredDiggerTail.cs b/NPCs/NormalNPCs/ArmoredDiggerTail.cs index cad5a06399..bb5027f029 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerTail.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerTail.cs @@ -56,50 +56,50 @@ namespace CalamityMod.NPCs.NormalNPCs { NPC.TargetClosest(true); } - bool flag = false; + bool shouldDie = false; if (NPC.ai[1] <= 0f) { - flag = true; + shouldDie = true; } else if (Main.npc[(int)NPC.ai[1]].life <= 0) { - flag = true; + shouldDie = true; } - if (flag && !Main.zenithWorld) + if (shouldDie && !Main.zenithWorld) { NPC.life = 0; NPC.HitEffect(0, 10.0); NPC.checkDead(); } - Vector2 vector3 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num20 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); - float num21 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); - num20 = (float)((int)(num20 / 16f) * 16); - num21 = (float)((int)(num21 / 16f) * 16); - vector3.X = (float)((int)(vector3.X / 16f) * 16); - vector3.Y = (float)((int)(vector3.Y / 16f) * 16); - num20 -= vector3.X; - num21 -= vector3.Y; - float num22 = (float)Math.Sqrt((double)(num20 * num20 + num21 * num21)); + Vector2 segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float targetXDist = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); + float targetYDist = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); + targetXDist = (float)((int)(targetXDist / 16f) * 16); + targetYDist = (float)((int)(targetYDist / 16f) * 16); + segmentPosition.X = (float)((int)(segmentPosition.X / 16f) * 16); + segmentPosition.Y = (float)((int)(segmentPosition.Y / 16f) * 16); + targetXDist -= segmentPosition.X; + targetYDist -= segmentPosition.Y; + float targetDistance = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); if (NPC.ai[1] > 0f && NPC.ai[1] < (float)Main.npc.Length) { try { - vector3 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - num20 = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - vector3.X; - num21 = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - vector3.Y; + segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + targetXDist = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - segmentPosition.X; + targetYDist = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - segmentPosition.Y; } catch { } - NPC.rotation = (float)Math.Atan2((double)num21, (double)num20) + 1.57f; - num22 = (float)Math.Sqrt((double)(num20 * num20 + num21 * num21)); - int num23 = (int)(44f * NPC.scale); - num22 = (num22 - (float)num23) / num22; - num20 *= num22; - num21 *= num22; + NPC.rotation = (float)Math.Atan2((double)targetYDist, (double)targetXDist) + 1.57f; + targetDistance = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); + int segmentWidth = (int)(44f * NPC.scale); + targetDistance = (targetDistance - (float)segmentWidth) / targetDistance; + targetXDist *= targetDistance; + targetYDist *= targetDistance; NPC.velocity = Vector2.Zero; - NPC.position.X = NPC.position.X + num20; - NPC.position.Y = NPC.position.Y + num21; + NPC.position.X = NPC.position.X + targetXDist; + NPC.position.Y = NPC.position.Y + targetYDist; } } diff --git a/NPCs/NormalNPCs/AuroraSpirit.cs b/NPCs/NormalNPCs/AuroraSpirit.cs index a09381ee88..da912b3ae0 100644 --- a/NPCs/NormalNPCs/AuroraSpirit.cs +++ b/NPCs/NormalNPCs/AuroraSpirit.cs @@ -53,12 +53,12 @@ namespace CalamityMod.NPCs.NormalNPCs public override void FindFrame(int frameHeight) { - int num1 = 1; + int currentFrame = 1; if (!Main.dedServ) { if (TextureAssets.Npc[NPC.type].Value == null) return; - num1 = TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type]; + currentFrame = TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type]; } if (!NPC.IsABestiaryIconDummy) @@ -77,10 +77,10 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.frameCounter++; if (NPC.frameCounter > 4) { - NPC.frame.Y += num1; + NPC.frame.Y += currentFrame; NPC.frameCounter = 0; } - if (NPC.frame.Y / num1 >= Main.npcFrameCount[NPC.type]) + if (NPC.frame.Y / currentFrame >= Main.npcFrameCount[NPC.type]) NPC.frame.Y = 0; } diff --git a/NPCs/NormalNPCs/Cnidrion.cs b/NPCs/NormalNPCs/Cnidrion.cs index ec2b9f159a..650c200b5d 100644 --- a/NPCs/NormalNPCs/Cnidrion.cs +++ b/NPCs/NormalNPCs/Cnidrion.cs @@ -95,22 +95,22 @@ namespace CalamityMod.NPCs.NormalNPCs Player player = Main.player[NPC.target]; bool expertMode = Main.expertMode; NPC.spriteDirection = (NPC.direction > 0) ? 1 : -1; - float num823 = 1f; + float movementSpeed = 1f; NPC.TargetClosest(true); - bool flag51 = false; + bool stopMoving = false; int offsetX = 80; int projectileDamage = expertMode ? 9 : 12; if (NPC.life < NPC.lifeMax * 0.33 && CalamityWorld.death) { - num823 = 2f; + movementSpeed = 2f; } if (NPC.life < NPC.lifeMax * 0.1 && CalamityWorld.death) { - num823 = 4f; + movementSpeed = 4f; } if (Main.zenithWorld) { - num823 = 8f; + movementSpeed = 8f; } if (NPC.ai[0] == 0f) { @@ -143,22 +143,22 @@ namespace CalamityMod.NPCs.NormalNPCs } else if (NPC.ai[0] == 1f) { - flag51 = true; + stopMoving = true; NPC.ai[1] += 1f; if (NPC.ai[1] % 30f == 0f) { - Vector2 vector18 = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + 20f); - vector18.X += offsetX * NPC.direction; - float num829 = Main.player[NPC.target].position.X + Main.player[NPC.target].width * 0.5f - vector18.X; - float num830 = Main.player[NPC.target].position.Y - vector18.Y; - float num831 = (float)Math.Sqrt(num829 * num829 + num830 * num830); - float num832 = 6f; - num831 = num832 / num831; - num829 *= num831; - num830 *= num831; - num829 *= 1f + Main.rand.Next(-10, 11) * 0.01f; - num830 *= 1f + Main.rand.Next(-10, 11) * 0.01f; - Projectile.NewProjectile(NPC.GetSource_FromAI(), vector18.X, vector18.Y, num829, num830, ModContent.ProjectileType(), projectileDamage, 0f, Main.myPlayer); + Vector2 npcPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + 20f); + npcPosition.X += offsetX * NPC.direction; + float targetXDist = Main.player[NPC.target].position.X + Main.player[NPC.target].width * 0.5f - npcPosition.X; + float targetYDist = Main.player[NPC.target].position.Y - npcPosition.Y; + float targetDistance = (float)Math.Sqrt(targetXDist * targetXDist + targetYDist * targetYDist); + float waterSpeed = 6f; + targetDistance = waterSpeed / targetDistance; + targetXDist *= targetDistance; + targetYDist *= targetDistance; + targetXDist *= 1f + Main.rand.Next(-10, 11) * 0.01f; + targetYDist *= 1f + Main.rand.Next(-10, 11) * 0.01f; + Projectile.NewProjectile(NPC.GetSource_FromAI(), npcPosition.X, npcPosition.Y, targetXDist, targetYDist, ModContent.ProjectileType(), projectileDamage, 0f, Main.myPlayer); } if (NPC.ai[1] >= 120f) { @@ -168,22 +168,22 @@ namespace CalamityMod.NPCs.NormalNPCs } else if (NPC.ai[0] == 2f) { - flag51 = true; + stopMoving = true; NPC.ai[1] += 1f; if (NPC.ai[1] > 60f && NPC.ai[1] < 240f && NPC.ai[1] % 16f == 0f) { - Vector2 vector18 = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + 20f); - vector18.X += offsetX * NPC.direction; - float num829 = Main.player[NPC.target].position.X + Main.player[NPC.target].width * 0.5f - vector18.X; - float num830 = Main.player[NPC.target].position.Y - vector18.Y; - float num831 = (float)Math.Sqrt(num829 * num829 + num830 * num830); - float num832 = 8f; - num831 = num832 / num831; - num829 *= num831; - num830 *= num831; - num829 *= 1f + Main.rand.Next(-15, 16) * 0.01f; - num830 *= 1f + Main.rand.Next(-15, 16) * 0.01f; - Projectile.NewProjectile(NPC.GetSource_FromAI(), vector18.X, vector18.Y, num829, num830, ModContent.ProjectileType(), projectileDamage, 0f, Main.myPlayer); + Vector2 npcPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + 20f); + npcPosition.X += offsetX * NPC.direction; + float targetXDist = Main.player[NPC.target].position.X + Main.player[NPC.target].width * 0.5f - npcPosition.X; + float targetYDist = Main.player[NPC.target].position.Y - npcPosition.Y; + float targetDistance = (float)Math.Sqrt(targetXDist * targetXDist + targetYDist * targetYDist); + float waterSpeed = 8f; + targetDistance = waterSpeed / targetDistance; + targetXDist *= targetDistance; + targetYDist *= targetDistance; + targetXDist *= 1f + Main.rand.Next(-15, 16) * 0.01f; + targetYDist *= 1f + Main.rand.Next(-15, 16) * 0.01f; + Projectile.NewProjectile(NPC.GetSource_FromAI(), npcPosition.X, npcPosition.Y, targetXDist, targetYDist, ModContent.ProjectileType(), projectileDamage, 0f, Main.myPlayer); } if (NPC.ai[1] >= 300f) { @@ -193,22 +193,22 @@ namespace CalamityMod.NPCs.NormalNPCs } else if (NPC.ai[0] == 3f) { - num823 = 4f; + movementSpeed = 4f; NPC.ai[1] += 1f; if (NPC.ai[1] % 30f == 0f) { - Vector2 vector18 = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + 20f); - vector18.X += offsetX * NPC.direction; - float num844 = Main.player[NPC.target].position.X + Main.player[NPC.target].width * 0.5f - vector18.X; - float num845 = Main.player[NPC.target].position.Y - vector18.Y; - float num846 = (float)Math.Sqrt(num844 * num844 + num845 * num845); - float num847 = 10f; - num846 = num847 / num846; - num844 *= num846; - num845 *= num846; - num844 *= 1f + Main.rand.Next(-10, 11) * 0.001f; - num845 *= 1f + Main.rand.Next(-10, 11) * 0.001f; - Projectile.NewProjectile(NPC.GetSource_FromAI(), vector18.X, vector18.Y, num844, num845, ModContent.ProjectileType(), projectileDamage, 0f, Main.myPlayer); + Vector2 npcPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + 20f); + npcPosition.X += offsetX * NPC.direction; + float fastTargetXDist = Main.player[NPC.target].position.X + Main.player[NPC.target].width * 0.5f - npcPosition.X; + float fastTargetYDist = Main.player[NPC.target].position.Y - npcPosition.Y; + float fastTargetDistance = (float)Math.Sqrt(fastTargetXDist * fastTargetXDist + fastTargetYDist * fastTargetYDist); + float fastWaterSpeed = 10f; + fastTargetDistance = fastWaterSpeed / fastTargetDistance; + fastTargetXDist *= fastTargetDistance; + fastTargetYDist *= fastTargetDistance; + fastTargetXDist *= 1f + Main.rand.Next(-10, 11) * 0.001f; + fastTargetYDist *= 1f + Main.rand.Next(-10, 11) * 0.001f; + Projectile.NewProjectile(NPC.GetSource_FromAI(), npcPosition.X, npcPosition.Y, fastTargetXDist, fastTargetYDist, ModContent.ProjectileType(), projectileDamage, 0f, Main.myPlayer); } if (NPC.ai[1] >= 120f) { @@ -218,22 +218,22 @@ namespace CalamityMod.NPCs.NormalNPCs } else if (NPC.ai[0] == 4f) { - num823 = 4f; + movementSpeed = 4f; NPC.ai[1] += 1f; if (NPC.ai[1] % 20f == 0f) { - Vector2 vector18 = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + 20f); - vector18.X += offsetX * NPC.direction; - float num829 = Main.player[NPC.target].position.X + Main.player[NPC.target].width * 0.5f - vector18.X; - float num830 = Main.player[NPC.target].position.Y - vector18.Y; - float num831 = (float)Math.Sqrt(num829 * num829 + num830 * num830); - float num832 = 11f; - num831 = num832 / num831; - num829 *= num831; - num830 *= num831; - num829 *= 1f + Main.rand.Next(-5, 6) * 0.01f; - num830 *= 1f + Main.rand.Next(-5, 6) * 0.01f; - Projectile.NewProjectile(NPC.GetSource_FromAI(), vector18.X, vector18.Y, num829, num830, ModContent.ProjectileType(), projectileDamage, 0f, Main.myPlayer); + Vector2 npcPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + 20f); + npcPosition.X += offsetX * NPC.direction; + float targetXDist = Main.player[NPC.target].position.X + Main.player[NPC.target].width * 0.5f - npcPosition.X; + float targetYDist = Main.player[NPC.target].position.Y - npcPosition.Y; + float targetDistance = (float)Math.Sqrt(targetXDist * targetXDist + targetYDist * targetYDist); + float waterSpeed = 11f; + targetDistance = waterSpeed / targetDistance; + targetXDist *= targetDistance; + targetYDist *= targetDistance; + targetXDist *= 1f + Main.rand.Next(-5, 6) * 0.01f; + targetYDist *= 1f + Main.rand.Next(-5, 6) * 0.01f; + Projectile.NewProjectile(NPC.GetSource_FromAI(), npcPosition.X, npcPosition.Y, targetXDist, targetYDist, ModContent.ProjectileType(), projectileDamage, 0f, Main.myPlayer); } if (NPC.ai[1] >= 240f) { @@ -243,9 +243,9 @@ namespace CalamityMod.NPCs.NormalNPCs } if (Math.Abs(NPC.Center.X - player.Center.X) < 50f) - flag51 = true; + stopMoving = true; - if (flag51) + if (stopMoving) { NPC.velocity.X *= 0.9f; if (NPC.velocity.X > -0.1 && NPC.velocity.X < 0.1) @@ -257,9 +257,9 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.direction = playerLocation < 0 ? 1 : -1; if (NPC.direction > 0) - NPC.velocity.X = (NPC.velocity.X * 20f + num823) / 21f; + NPC.velocity.X = (NPC.velocity.X * 20f + movementSpeed) / 21f; if (NPC.direction < 0) - NPC.velocity.X = (NPC.velocity.X * 20f - num823) / 21f; + NPC.velocity.X = (NPC.velocity.X * 20f - movementSpeed) / 21f; } if (Collision.CanHit(NPC.position, NPC.width, NPC.height, player.Center, 1, 1) && !Collision.SolidCollision(NPC.position, NPC.width, NPC.height) && player.position.Y <= NPC.position.Y + NPC.height && !NPC.collideX) @@ -272,10 +272,10 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.noGravity = true; NPC.noTileCollide = true; - int num854 = 80; - int num855 = 20; - Vector2 position2 = new Vector2(NPC.Center.X - (num854 / 2), NPC.position.Y + NPC.height - num855); - if (Collision.SolidCollision(position2, num854, num855)) + int collisionWidth = 80; + int collisionHeight = 20; + Vector2 collisionSize = new Vector2(NPC.Center.X - (collisionWidth / 2), NPC.position.Y + NPC.height - collisionHeight); + if (Collision.SolidCollision(collisionSize, collisionWidth, collisionHeight)) { if (NPC.velocity.Y > 0f) NPC.velocity.Y = 0f; diff --git a/NPCs/NormalNPCs/Eidolist.cs b/NPCs/NormalNPCs/Eidolist.cs index 5fe8e3fa18..46fdd03225 100644 --- a/NPCs/NormalNPCs/Eidolist.cs +++ b/NPCs/NormalNPCs/Eidolist.cs @@ -152,22 +152,22 @@ namespace CalamityMod.NPCs.NormalNPCs return; } NPC.noTileCollide = true; - float num1446 = adultWyrmAlive ? 14f : 7f; - float num1447 = 480f; + float moveVelocity = adultWyrmAlive ? 14f : 7f; + float teleportTimer = 480f; if (NPC.localAI[1] == 1f) { NPC.localAI[1] = 0f; if (Main.rand.NextBool(4)) { - NPC.ai[0] = num1447; + NPC.ai[0] = teleportTimer; } } NPC.TargetClosest(true); NPC.rotation = Math.Abs(NPC.velocity.X) * (float)NPC.direction * 0.1f; NPC.spriteDirection = (NPC.direction > 0) ? 1 : -1; - Vector2 value53 = NPC.Center + new Vector2((float)(NPC.direction * 20), 6f); - Vector2 vector251 = Main.player[NPC.target].Center - value53; - bool flag104 = Collision.CanHit(NPC.Center, 1, 1, Main.player[NPC.target].Center, 1, 1); + Vector2 moveDirection = NPC.Center + new Vector2((float)(NPC.direction * 20), 6f); + Vector2 attackDirection = Main.player[NPC.target].Center - moveDirection; + bool canAttackTarget = Collision.CanHit(NPC.Center, 1, 1, Main.player[NPC.target].Center, 1, 1); if (NPC.justHit) NPC.localAI[0] = -90f; @@ -195,29 +195,29 @@ namespace CalamityMod.NPCs.NormalNPCs } else { - Vector2 vec = Vector2.Normalize(Main.player[NPC.target].Center - NPC.Center + Main.player[NPC.target].velocity * 20f); - if (vec.HasNaNs()) + Vector2 iceMistDirection = Vector2.Normalize(Main.player[NPC.target].Center - NPC.Center + Main.player[NPC.target].velocity * 20f); + if (iceMistDirection.HasNaNs()) { - vec = new Vector2((float)NPC.direction, 0f); + iceMistDirection = new Vector2((float)NPC.direction, 0f); } for (int n = 0; n < 1; n++) { - Vector2 vector4 = vec * 4f; - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, vector4, ProjectileID.CultistBossIceMist, damage, 0f, Main.myPlayer, 0f, 1f); + Vector2 iceMistVelocity = iceMistDirection * 4f; + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, iceMistVelocity, ProjectileID.CultistBossIceMist, damage, 0f, Main.myPlayer, 0f, 1f); } } } } - if (vector251.Length() > 400f || !flag104) + if (attackDirection.Length() > 400f || !canAttackTarget) { - Vector2 value54 = vector251; - if (value54.Length() > num1446) + Vector2 tooFarMoveVelocity = attackDirection; + if (tooFarMoveVelocity.Length() > moveVelocity) { - value54.Normalize(); - value54 *= num1446; + tooFarMoveVelocity.Normalize(); + tooFarMoveVelocity *= moveVelocity; } - int num1448 = 30; - NPC.velocity = (NPC.velocity * (float)(num1448 - 1) + value54) / (float)num1448; + int tooFarVelMult = 30; + NPC.velocity = (NPC.velocity * (float)(tooFarVelMult - 1) + tooFarMoveVelocity) / (float)tooFarVelMult; } else { @@ -226,10 +226,10 @@ namespace CalamityMod.NPCs.NormalNPCs if (NPC.ai[2] != 0f && NPC.ai[3] != 0f) { SoundEngine.PlaySound(SoundID.Item8, NPC.Center); - for (int num1449 = 0; num1449 < 20; num1449++) + for (int i = 0; i < 20; i++) { - int num1450 = Dust.NewDust(NPC.position, NPC.width, NPC.height, 20, 0f, 0f, 100, Color.Transparent, 1f); - Dust dust = Main.dust[num1450]; + int eidolistDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, 20, 0f, 0f, 100, Color.Transparent, 1f); + Dust dust = Main.dust[eidolistDust]; dust.velocity *= 3f; dust.noGravity = true; dust.scale = 2.5f; @@ -239,51 +239,51 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.ai[2] = 0f; NPC.ai[3] = 0f; SoundEngine.PlaySound(SoundID.Item8, NPC.Center); - for (int num1451 = 0; num1451 < 20; num1451++) + for (int j = 0; j < 20; j++) { - int num1452 = Dust.NewDust(NPC.position, NPC.width, NPC.height, 20, 0f, 0f, 100, Color.Transparent, 1f); - Dust dust = Main.dust[num1452]; + int eidolistDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, 20, 0f, 0f, 100, Color.Transparent, 1f); + Dust dust = Main.dust[eidolistDust2]; dust.velocity *= 3f; dust.noGravity = true; dust.scale = 2.5f; } } NPC.ai[0] += 1f; - if (NPC.ai[0] >= num1447 && Main.netMode != NetmodeID.MultiplayerClient) + if (NPC.ai[0] >= teleportTimer && Main.netMode != NetmodeID.MultiplayerClient) { NPC.ai[0] = 0f; - Point point12 = NPC.Center.ToTileCoordinates(); - Point point13 = Main.player[NPC.target].Center.ToTileCoordinates(); - int num1453 = 20; - int num1454 = 3; - int num1455 = 10; - int num1456 = 1; - int num1457 = 0; - bool flag106 = false; - if (vector251.Length() > 2000f) + Point npcTileCenter = NPC.Center.ToTileCoordinates(); + Point targetTileCenter = Main.player[NPC.target].Center.ToTileCoordinates(); + int randTeleportOffset = 20; + int npcTeleportRadius = 3; + int targetTeleportRadius = 10; + int teleportTileCheckRadius = 1; + int teleportTries = 0; + bool canTeleport = false; + if (attackDirection.Length() > 2000f) { - flag106 = true; + canTeleport = true; } - while (!flag106 && num1457 < 100) + while (!canTeleport && teleportTries < 100) { - num1457++; - int num1458 = Main.rand.Next(point13.X - num1453, point13.X + num1453 + 1); - int num1459 = Main.rand.Next(point13.Y - num1453, point13.Y + num1453 + 1); - if ((num1459 < point13.Y - num1455 || num1459 > point13.Y + num1455 || num1458 < point13.X - num1455 || num1458 > point13.X + num1455) && (num1459 < point12.Y - num1454 || num1459 > point12.Y + num1454 || num1458 < point12.X - num1454 || num1458 > point12.X + num1454) && !Main.tile[num1458, num1459].HasUnactuatedTile) + teleportTries++; + int teleportTileX = Main.rand.Next(targetTileCenter.X - randTeleportOffset, targetTileCenter.X + randTeleportOffset + 1); + int teleportTileY = Main.rand.Next(targetTileCenter.Y - randTeleportOffset, targetTileCenter.Y + randTeleportOffset + 1); + if ((teleportTileY < targetTileCenter.Y - targetTeleportRadius || teleportTileY > targetTileCenter.Y + targetTeleportRadius || teleportTileX < targetTileCenter.X - targetTeleportRadius || teleportTileX > targetTileCenter.X + targetTeleportRadius) && (teleportTileY < npcTileCenter.Y - npcTeleportRadius || teleportTileY > npcTileCenter.Y + npcTeleportRadius || teleportTileX < npcTileCenter.X - npcTeleportRadius || teleportTileX > npcTileCenter.X + npcTeleportRadius) && !Main.tile[teleportTileX, teleportTileY].HasUnactuatedTile) { - bool flag107 = true; - if (flag107 && Main.tile[num1458, num1459].LiquidType == LiquidID.Lava) + bool teleportSuccessful = true; + if (teleportSuccessful && Main.tile[teleportTileX, teleportTileY].LiquidType == LiquidID.Lava) { - flag107 = false; + teleportSuccessful = false; } - if (flag107 && Collision.SolidTiles(num1458 - num1456, num1458 + num1456, num1459 - num1456, num1459 + num1456)) + if (teleportSuccessful && Collision.SolidTiles(teleportTileX - teleportTileCheckRadius, teleportTileX + teleportTileCheckRadius, teleportTileY - teleportTileCheckRadius, teleportTileY + teleportTileCheckRadius)) { - flag107 = false; + teleportSuccessful = false; } - if (flag107) + if (teleportSuccessful) { - NPC.ai[2] = (float)num1458; - NPC.ai[3] = (float)num1459; + NPC.ai[2] = (float)teleportTileX; + NPC.ai[3] = (float)teleportTileY; break; } } diff --git a/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs b/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs index b4fa74c3b0..323ad15220 100644 --- a/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs +++ b/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs @@ -52,23 +52,23 @@ namespace CalamityMod.NPCs.NormalNPCs public override void AI() { - bool flag3 = false; + bool noXMovement = false; if (NPC.velocity.X == 0f) { - flag3 = true; + noXMovement = true; } if (NPC.justHit) { - flag3 = false; + noXMovement = false; } - bool flag4 = false; - bool flag5 = false; - int num35 = 60; + bool isWalking = false; + bool unusedFlag = false; + int backUpTimer = 60; if (NPC.velocity.Y == 0f && ((NPC.velocity.X > 0f && NPC.direction < 0) || (NPC.velocity.X < 0f && NPC.direction > 0))) { - flag4 = true; + isWalking = true; } - if ((NPC.position.X == NPC.oldPosition.X || NPC.ai[3] >= (float)num35) | flag4) + if ((NPC.position.X == NPC.oldPosition.X || NPC.ai[3] >= (float)backUpTimer) | isWalking) { NPC.ai[3] += 1f; } @@ -76,7 +76,7 @@ namespace CalamityMod.NPCs.NormalNPCs { NPC.ai[3] -= 1f; } - if (NPC.ai[3] > (float)(num35 * 10)) + if (NPC.ai[3] > (float)(backUpTimer * 10)) { NPC.ai[3] = 0f; } @@ -84,11 +84,11 @@ namespace CalamityMod.NPCs.NormalNPCs { NPC.ai[3] = 0f; } - if (NPC.ai[3] == (float)num35) + if (NPC.ai[3] == (float)backUpTimer) { NPC.netUpdate = true; } - if (NPC.ai[3] < (float)num35) + if (NPC.ai[3] < (float)backUpTimer) { NPC.TargetClosest(true); } @@ -124,81 +124,81 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.velocity.X = 0f; return; } - float num65 = CalamityWorld.death ? 3f : CalamityWorld.revenge ? 2f : 1f; - float num66 = CalamityWorld.death ? 0.28f : CalamityWorld.revenge ? 0.18f : 0.08f; - num65 += (1f - (float)NPC.life / (float)NPC.lifeMax) * 2f; - num66 += (1f - (float)NPC.life / (float)NPC.lifeMax) * 0.2f; - if (NPC.velocity.X < -num65 || NPC.velocity.X > num65) + float maxVelocity = CalamityWorld.death ? 3f : CalamityWorld.revenge ? 2f : 1f; + float acceleration = CalamityWorld.death ? 0.28f : CalamityWorld.revenge ? 0.18f : 0.08f; + maxVelocity += (1f - (float)NPC.life / (float)NPC.lifeMax) * 2f; + acceleration += (1f - (float)NPC.life / (float)NPC.lifeMax) * 0.2f; + if (NPC.velocity.X < -maxVelocity || NPC.velocity.X > maxVelocity) { if (NPC.velocity.Y == 0f) NPC.velocity *= 0.7f; } - else if (NPC.velocity.X < num65 && NPC.direction == 1) + else if (NPC.velocity.X < maxVelocity && NPC.direction == 1) { - NPC.velocity.X = NPC.velocity.X + num66; - if (NPC.velocity.X > num65) - NPC.velocity.X = num65; + NPC.velocity.X = NPC.velocity.X + acceleration; + if (NPC.velocity.X > maxVelocity) + NPC.velocity.X = maxVelocity; } - else if (NPC.velocity.X > -num65 && NPC.direction == -1) + else if (NPC.velocity.X > -maxVelocity && NPC.direction == -1) { - NPC.velocity.X = NPC.velocity.X - num66; - if (NPC.velocity.X < -num65) - NPC.velocity.X = -num65; + NPC.velocity.X = NPC.velocity.X - acceleration; + if (NPC.velocity.X < -maxVelocity) + NPC.velocity.X = -maxVelocity; } - bool flag22 = false; + bool isOnSolidTile = false; if (NPC.velocity.Y == 0f) { - int num161 = (int)(NPC.position.Y + (float)NPC.height + 7f) / 16; - int arg_A8FB_0 = (int)NPC.position.X / 16; - int num162 = (int)(NPC.position.X + (float)NPC.width) / 16; - for (int num163 = arg_A8FB_0; num163 <= num162; num163++) + int yTile = (int)(NPC.position.Y + (float)NPC.height + 7f) / 16; + int initialXTile = (int)NPC.position.X / 16; + int maxXTile = (int)(NPC.position.X + (float)NPC.width) / 16; + for (int xTile = initialXTile; xTile <= maxXTile; xTile++) { - if (Main.tile[num163, num161] == null) + if (Main.tile[xTile, yTile] == null) { return; } - if (Main.tile[num163, num161].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num163, num161].TileType]) + if (Main.tile[xTile, yTile].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[xTile, yTile].TileType]) { - flag22 = true; + isOnSolidTile = true; break; } } } if (NPC.velocity.Y >= 0f) { - int num164 = 0; + int fallFaceDirection = 0; if (NPC.velocity.X < 0f) { - num164 = -1; + fallFaceDirection = -1; } if (NPC.velocity.X > 0f) { - num164 = 1; + fallFaceDirection = 1; } - Vector2 position2 = NPC.position; - position2.X += NPC.velocity.X; - int num165 = (int)((position2.X + (float)(NPC.width / 2) + (float)((NPC.width / 2 + 1) * num164)) / 16f); - int num166 = (int)((position2.Y + (float)NPC.height - 1f) / 16f); - if ((float)(num165 * 16) < position2.X + (float)NPC.width && (float)(num165 * 16 + 16) > position2.X && ((Main.tile[num165, num166].HasUnactuatedTile && !Main.tile[num165, num166].TopSlope && !Main.tile[num165, num166 - 1].TopSlope && Main.tileSolid[(int)Main.tile[num165, num166].TileType] && !Main.tileSolidTop[(int)Main.tile[num165, num166].TileType]) || (Main.tile[num165, num166 - 1].IsHalfBlock && Main.tile[num165, num166 - 1].HasUnactuatedTile)) && (!Main.tile[num165, num166 - 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num165, num166 - 1].TileType] || Main.tileSolidTop[(int)Main.tile[num165, num166 - 1].TileType] || (Main.tile[num165, num166 - 1].IsHalfBlock && (!Main.tile[num165, num166 - 4].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num165, num166 - 4].TileType] || Main.tileSolidTop[(int)Main.tile[num165, num166 - 4].TileType]))) && (!Main.tile[num165, num166 - 2].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num165, num166 - 2].TileType] || Main.tileSolidTop[(int)Main.tile[num165, num166 - 2].TileType]) && (!Main.tile[num165, num166 - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num165, num166 - 3].TileType] || Main.tileSolidTop[(int)Main.tile[num165, num166 - 3].TileType]) && (!Main.tile[num165 - num164, num166 - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num165 - num164, num166 - 3].TileType])) + Vector2 fishePosition = NPC.position; + fishePosition.X += NPC.velocity.X; + int xTileBelow = (int)((fishePosition.X + (float)(NPC.width / 2) + (float)((NPC.width / 2 + 1) * fallFaceDirection)) / 16f); + int yTileBelow = (int)((fishePosition.Y + (float)NPC.height - 1f) / 16f); + if ((float)(xTileBelow * 16) < fishePosition.X + (float)NPC.width && (float)(xTileBelow * 16 + 16) > fishePosition.X && ((Main.tile[xTileBelow, yTileBelow].HasUnactuatedTile && !Main.tile[xTileBelow, yTileBelow].TopSlope && !Main.tile[xTileBelow, yTileBelow - 1].TopSlope && Main.tileSolid[(int)Main.tile[xTileBelow, yTileBelow].TileType] && !Main.tileSolidTop[(int)Main.tile[xTileBelow, yTileBelow].TileType]) || (Main.tile[xTileBelow, yTileBelow - 1].IsHalfBlock && Main.tile[xTileBelow, yTileBelow - 1].HasUnactuatedTile)) && (!Main.tile[xTileBelow, yTileBelow - 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[xTileBelow, yTileBelow - 1].TileType] || Main.tileSolidTop[(int)Main.tile[xTileBelow, yTileBelow - 1].TileType] || (Main.tile[xTileBelow, yTileBelow - 1].IsHalfBlock && (!Main.tile[xTileBelow, yTileBelow - 4].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[xTileBelow, yTileBelow - 4].TileType] || Main.tileSolidTop[(int)Main.tile[xTileBelow, yTileBelow - 4].TileType]))) && (!Main.tile[xTileBelow, yTileBelow - 2].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[xTileBelow, yTileBelow - 2].TileType] || Main.tileSolidTop[(int)Main.tile[xTileBelow, yTileBelow - 2].TileType]) && (!Main.tile[xTileBelow, yTileBelow - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[xTileBelow, yTileBelow - 3].TileType] || Main.tileSolidTop[(int)Main.tile[xTileBelow, yTileBelow - 3].TileType]) && (!Main.tile[xTileBelow - fallFaceDirection, yTileBelow - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[xTileBelow - fallFaceDirection, yTileBelow - 3].TileType])) { - float num167 = (float)(num166 * 16); - if (Main.tile[num165, num166].IsHalfBlock) + float yPixelDistance = (float)(yTileBelow * 16); + if (Main.tile[xTileBelow, yTileBelow].IsHalfBlock) { - num167 += 8f; + yPixelDistance += 8f; } - if (Main.tile[num165, num166 - 1].IsHalfBlock) + if (Main.tile[xTileBelow, yTileBelow - 1].IsHalfBlock) { - num167 -= 8f; + yPixelDistance -= 8f; } - if (num167 < position2.Y + (float)NPC.height) + if (yPixelDistance < fishePosition.Y + (float)NPC.height) { - float num168 = position2.Y + (float)NPC.height - num167; - float num169 = 16.1f; - if (num168 <= num169) + float percentageTileRisen = fishePosition.Y + (float)NPC.height - yPixelDistance; + float fullTileAmt = 16.1f; + if (percentageTileRisen <= fullTileAmt) { - NPC.gfxOffY += NPC.position.Y + (float)NPC.height - num167; - NPC.position.Y = num167 - (float)NPC.height; - if (num168 < 9f) + NPC.gfxOffY += NPC.position.Y + (float)NPC.height - yPixelDistance; + NPC.position.Y = yPixelDistance - (float)NPC.height; + if (percentageTileRisen < 9f) { NPC.stepSpeed = 1f; } @@ -210,57 +210,57 @@ namespace CalamityMod.NPCs.NormalNPCs } } } - if (flag22) + if (isOnSolidTile) { - int num170 = (int)((NPC.position.X + (float)(NPC.width / 2) + (float)(15 * NPC.direction)) / 16f); - int num171 = (int)((NPC.position.Y + (float)NPC.height - 15f) / 16f); - if ((Main.tile[num170, num171 - 1].HasUnactuatedTile && (Main.tile[num170, num171 - 1].TileType == 10 || Main.tile[num170, num171 - 1].TileType == 388)) & flag5) + int doorCheckX = (int)((NPC.position.X + (float)(NPC.width / 2) + (float)(15 * NPC.direction)) / 16f); + int doorCheckY = (int)((NPC.position.Y + (float)NPC.height - 15f) / 16f); + if ((Main.tile[doorCheckX, doorCheckY - 1].HasUnactuatedTile && (Main.tile[doorCheckX, doorCheckY - 1].TileType == 10 || Main.tile[doorCheckX, doorCheckY - 1].TileType == 388)) & unusedFlag) { NPC.ai[2] += 1f; NPC.ai[3] = 0f; if (NPC.ai[2] >= 60f) { NPC.velocity.X = 0.5f * (float)-(float)NPC.direction; - int num172 = 5; - if (Main.tile[num170, num171 - 1].TileType == 388) + int doorOpenInc = 5; + if (Main.tile[doorCheckX, doorCheckY - 1].TileType == 388) { - num172 = 2; + doorOpenInc = 2; } - NPC.ai[1] += (float)num172; + NPC.ai[1] += (float)doorOpenInc; NPC.ai[2] = 0f; - bool flag23 = false; + bool letMeIn = false; if (NPC.ai[1] >= 10f) { - flag23 = true; + letMeIn = true; NPC.ai[1] = 10f; } - WorldGen.KillTile(num170, num171 - 1, true, false, false); - if ((Main.netMode != NetmodeID.MultiplayerClient || !flag23) && flag23 && Main.netMode != NetmodeID.MultiplayerClient) + WorldGen.KillTile(doorCheckX, doorCheckY - 1, true, false, false); + if ((Main.netMode != NetmodeID.MultiplayerClient || !letMeIn) && letMeIn && Main.netMode != NetmodeID.MultiplayerClient) { - if (Main.tile[num170, num171 - 1].TileType == 10) + if (Main.tile[doorCheckX, doorCheckY - 1].TileType == 10) { - bool flag24 = WorldGen.OpenDoor(num170, num171 - 1, NPC.direction); - if (!flag24) + bool canOpenDoor = WorldGen.OpenDoor(doorCheckX, doorCheckY - 1, NPC.direction); + if (!canOpenDoor) { - NPC.ai[3] = (float)num35; + NPC.ai[3] = (float)backUpTimer; NPC.netUpdate = true; } - if (Main.netMode == NetmodeID.Server & flag24) + if (Main.netMode == NetmodeID.Server & canOpenDoor) { - NetMessage.SendData(MessageID.ToggleDoorState, -1, -1, null, 0, (float)num170, (float)(num171 - 1), (float)NPC.direction, 0, 0, 0); + NetMessage.SendData(MessageID.ToggleDoorState, -1, -1, null, 0, (float)doorCheckX, (float)(doorCheckY - 1), (float)NPC.direction, 0, 0, 0); } } - if (Main.tile[num170, num171 - 1].TileType == 388) + if (Main.tile[doorCheckX, doorCheckY - 1].TileType == 388) { - bool flag25 = WorldGen.ShiftTallGate(num170, num171 - 1, false); - if (!flag25) + bool canOpenTallGate = WorldGen.ShiftTallGate(doorCheckX, doorCheckY - 1, false); + if (!canOpenTallGate) { - NPC.ai[3] = (float)num35; + NPC.ai[3] = (float)backUpTimer; NPC.netUpdate = true; } - if (Main.netMode == NetmodeID.Server & flag25) + if (Main.netMode == NetmodeID.Server & canOpenTallGate) { - NetMessage.SendData(MessageID.ToggleDoorState, -1, -1, null, 4, (float)num170, (float)(num171 - 1), 0f, 0, 0, 0); + NetMessage.SendData(MessageID.ToggleDoorState, -1, -1, null, 4, (float)doorCheckX, (float)(doorCheckY - 1), 0f, 0, 0, 0); } } } @@ -268,12 +268,12 @@ namespace CalamityMod.NPCs.NormalNPCs } else { - int num173 = NPC.spriteDirection; - if ((NPC.velocity.X < 0f && num173 == -1) || (NPC.velocity.X > 0f && num173 == 1)) + int faceDirection = NPC.spriteDirection; + if ((NPC.velocity.X < 0f && faceDirection == -1) || (NPC.velocity.X > 0f && faceDirection == 1)) { - if (NPC.height >= 32 && Main.tile[num170, num171 - 2].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num170, num171 - 2].TileType]) + if (NPC.height >= 32 && Main.tile[doorCheckX, doorCheckY - 2].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[doorCheckX, doorCheckY - 2].TileType]) { - if (Main.tile[num170, num171 - 3].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num170, num171 - 3].TileType]) + if (Main.tile[doorCheckX, doorCheckY - 3].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[doorCheckX, doorCheckY - 3].TileType]) { NPC.velocity.Y = -8f; NPC.netUpdate = true; @@ -284,35 +284,35 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.netUpdate = true; } } - else if (Main.tile[num170, num171 - 1].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num170, num171 - 1].TileType]) + else if (Main.tile[doorCheckX, doorCheckY - 1].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[doorCheckX, doorCheckY - 1].TileType]) { NPC.velocity.Y = -6f; NPC.netUpdate = true; } - else if (NPC.position.Y + (float)NPC.height - (float)(num171 * 16) > 20f && Main.tile[num170, num171].HasUnactuatedTile && !Main.tile[num170, num171].TopSlope && Main.tileSolid[(int)Main.tile[num170, num171].TileType]) + else if (NPC.position.Y + (float)NPC.height - (float)(doorCheckY * 16) > 20f && Main.tile[doorCheckX, doorCheckY].HasUnactuatedTile && !Main.tile[doorCheckX, doorCheckY].TopSlope && Main.tileSolid[(int)Main.tile[doorCheckX, doorCheckY].TileType]) { NPC.velocity.Y = -5f; NPC.netUpdate = true; } - else if (NPC.directionY < 0 && (!Main.tile[num170, num171 + 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num170, num171 + 1].TileType]) && (!Main.tile[num170 + NPC.direction, num171 + 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num170 + NPC.direction, num171 + 1].TileType])) + else if (NPC.directionY < 0 && (!Main.tile[doorCheckX, doorCheckY + 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[doorCheckX, doorCheckY + 1].TileType]) && (!Main.tile[doorCheckX + NPC.direction, doorCheckY + 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[doorCheckX + NPC.direction, doorCheckY + 1].TileType])) { NPC.velocity.Y = -8f; NPC.velocity.X = NPC.velocity.X * 1.5f; NPC.netUpdate = true; } - else if (flag5) + else if (unusedFlag) { NPC.ai[1] = 0f; NPC.ai[2] = 0f; } - if ((NPC.velocity.Y == 0f & flag3) && NPC.ai[3] == 1f) + if ((NPC.velocity.Y == 0f & noXMovement) && NPC.ai[3] == 1f) { NPC.velocity.Y = -5f; } } } } - else if (flag5) + else if (unusedFlag) { NPC.ai[1] = 0f; NPC.ai[2] = 0f; diff --git a/NPCs/NormalNPCs/Frogfish.cs b/NPCs/NormalNPCs/Frogfish.cs index 5d02a309d8..9519f06eeb 100644 --- a/NPCs/NormalNPCs/Frogfish.cs +++ b/NPCs/NormalNPCs/Frogfish.cs @@ -50,10 +50,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void AI() { NPC.spriteDirection = (NPC.direction > 0) ? 1 : -1; - int num = 200; + int alphaControl = 200; if (NPC.ai[2] == 0f) { - NPC.alpha = num; + NPC.alpha = alphaControl; NPC.TargetClosest(true); if (!Main.player[NPC.target].dead && (Main.player[NPC.target].Center - NPC.Center).Length() < 170f && Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height)) @@ -70,7 +70,7 @@ namespace CalamityMod.NPCs.NormalNPCs { if (NPC.alpha > 0) { - NPC.alpha -= num / 16; + NPC.alpha -= alphaControl / 16; if (NPC.alpha < 0) { NPC.alpha = 0; diff --git a/NPCs/NormalNPCs/Horse.cs b/NPCs/NormalNPCs/Horse.cs index 8aa442bb97..927c78fb78 100644 --- a/NPCs/NormalNPCs/Horse.cs +++ b/NPCs/NormalNPCs/Horse.cs @@ -127,23 +127,23 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.height = 160; NPC.position.X = NPC.position.X - (NPC.width / 2); NPC.position.Y = NPC.position.Y - (NPC.height / 2); - for (int num621 = 0; num621 < 40; num621++) + for (int i = 0; i < 40; i++) { - int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 31, 0f, 0f, 100, default, 2f); - Main.dust[num622].velocity *= 3f; + int earthDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 31, 0f, 0f, 100, default, 2f); + Main.dust[earthDust].velocity *= 3f; if (Main.rand.NextBool()) { - Main.dust[num622].scale = 0.5f; - Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f; + Main.dust[earthDust].scale = 0.5f; + Main.dust[earthDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f; } } - for (int num623 = 0; num623 < 70; num623++) + for (int j = 0; j < 70; j++) { - int num624 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default, 3f); - Main.dust[num624].noGravity = true; - Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default, 2f); - Main.dust[num624].velocity *= 2f; + int earthDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default, 3f); + Main.dust[earthDust2].noGravity = true; + Main.dust[earthDust2].velocity *= 5f; + earthDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default, 2f); + Main.dust[earthDust2].velocity *= 2f; } if (Main.netMode != NetmodeID.Server) @@ -238,31 +238,30 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.TargetClosest(); if (Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height)) { - float num179 = 4f; - Vector2 value9 = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); - float num180 = Main.player[NPC.target].position.X + Main.player[NPC.target].width * 0.5f - value9.X; - float num181 = Math.Abs(num180) * 0.1f; - float num182 = Main.player[NPC.target].position.Y + Main.player[NPC.target].height * 0.5f - value9.Y - num181; - float num183 = (float)Math.Sqrt(num180 * num180 + num182 * num182); - num183 = num179 / num183; - num180 *= num183; - num182 *= num183; - int num184 = 30; - int num185 = ModContent.ProjectileType(); - value9.X += num180; - value9.Y += num182; - for (int num186 = 0; num186 < 4; num186++) + float rockSpeed = 4f; + Vector2 projPosition = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + float targetXDist = Main.player[NPC.target].position.X + Main.player[NPC.target].width * 0.5f - projPosition.X; + float absoluteTargetX = Math.Abs(targetXDist) * 0.1f; + float targetYDist = Main.player[NPC.target].position.Y + Main.player[NPC.target].height * 0.5f - projPosition.Y - absoluteTargetX; + float targetDistance = (float)Math.Sqrt(targetXDist * targetXDist + targetYDist * targetYDist); + targetDistance = rockSpeed / targetDistance; + targetXDist *= targetDistance; + targetYDist *= targetDistance; + int rockType = ModContent.ProjectileType(); + projPosition.X += targetXDist; + projPosition.Y += targetYDist; + for (int k = 0; k < 4; k++) { - num185 = Main.rand.NextBool(4) ? ModContent.ProjectileType() : ModContent.ProjectileType(); - num180 = Main.player[NPC.target].position.X + Main.player[NPC.target].width * 0.5f - value9.X; - num182 = Main.player[NPC.target].position.Y + Main.player[NPC.target].height * 0.5f - value9.Y; - num183 = (float)Math.Sqrt(num180 * num180 + num182 * num182); - num183 = num179 / num183; - num180 += Main.rand.Next(-40, 41); - num182 += Main.rand.Next(-40, 41); - num180 *= num183; - num182 *= num183; - Projectile.NewProjectile(NPC.GetSource_FromAI(), value9.X, value9.Y, num180, num182, num185, num184, 0f, Main.myPlayer, 0f, 0f); + rockType = Main.rand.NextBool(4) ? ModContent.ProjectileType() : ModContent.ProjectileType(); + targetXDist = Main.player[NPC.target].position.X + Main.player[NPC.target].width * 0.5f - projPosition.X; + targetYDist = Main.player[NPC.target].position.Y + Main.player[NPC.target].height * 0.5f - projPosition.Y; + targetDistance = (float)Math.Sqrt(targetXDist * targetXDist + targetYDist * targetYDist); + targetDistance = rockSpeed / targetDistance; + targetXDist += Main.rand.Next(-40, 41); + targetYDist += Main.rand.Next(-40, 41); + targetXDist *= targetDistance; + targetYDist *= targetDistance; + Projectile.NewProjectile(NPC.GetSource_FromAI(), projPosition.X, projPosition.Y, targetXDist, targetYDist, rockType, 30, 0f, Main.myPlayer, 0f, 0f); } } } diff --git a/NPCs/NormalNPCs/ImpiousImmolator.cs b/NPCs/NormalNPCs/ImpiousImmolator.cs index ce2b86ec15..7278c038d5 100644 --- a/NPCs/NormalNPCs/ImpiousImmolator.cs +++ b/NPCs/NormalNPCs/ImpiousImmolator.cs @@ -87,13 +87,13 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.chaseable = hasBeenHit; if (!NPC.wet) { - bool flag14 = hasBeenHit; + bool canAttack = hasBeenHit; NPC.TargetClosest(false); - if ((Main.player[NPC.target].wet || Main.player[NPC.target].dead) && flag14) + if ((Main.player[NPC.target].wet || Main.player[NPC.target].dead) && canAttack) { - flag14 = false; + canAttack = false; } - if (!flag14) + if (!canAttack) { if (NPC.collideX) { @@ -118,7 +118,7 @@ namespace CalamityMod.NPCs.NormalNPCs } } } - if (flag14) + if (canAttack) { NPC.TargetClosest(true); NPC.velocity.X = NPC.velocity.X + (float)NPC.direction * 0.2f; @@ -151,19 +151,19 @@ namespace CalamityMod.NPCs.NormalNPCs if (Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height)) { float speed = 12f; - Vector2 vector = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)(NPC.height / 2)); - float num6 = Main.player[NPC.target].position.X + (float)Main.player[NPC.target].width * 0.5f - vector.X + (float)Main.rand.Next(-20, 21); - float num7 = Main.player[NPC.target].position.Y + (float)Main.player[NPC.target].height * 0.5f - vector.Y + (float)Main.rand.Next(-20, 21); - float num8 = (float)Math.Sqrt((double)(num6 * num6 + num7 * num7)); - num8 = speed / num8; - num6 *= num8; - num7 *= num8; + Vector2 beamPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)(NPC.height / 2)); + float targetXDist = Main.player[NPC.target].position.X + (float)Main.player[NPC.target].width * 0.5f - beamPosition.X + (float)Main.rand.Next(-20, 21); + float targetYDist = Main.player[NPC.target].position.Y + (float)Main.player[NPC.target].height * 0.5f - beamPosition.Y + (float)Main.rand.Next(-20, 21); + float targetDistance = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); + targetDistance = speed / targetDistance; + targetXDist *= targetDistance; + targetYDist *= targetDistance; int damage = 55; if (Main.expertMode) { damage = 42; } - int beam = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center.X, NPC.Center.Y, num6, num7, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); + int beam = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center.X, NPC.Center.Y, targetXDist, targetYDist, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 0f, 0f); Main.projectile[beam].tileCollide = true; } } @@ -192,15 +192,15 @@ namespace CalamityMod.NPCs.NormalNPCs } } } - int num258 = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; - int num259 = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; - if (Main.tile[num258, num259 - 1].LiquidAmount < 128) //problem? + int tileCheckX = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; + int tileCheckY = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; + if (Main.tile[tileCheckX, tileCheckY - 1].LiquidAmount < 128) //problem? { - if (Main.tile[num258, num259 + 1].HasTile) + if (Main.tile[tileCheckX, tileCheckY + 1].HasTile) { NPC.ai[0] = -1f; } - else if (Main.tile[num258, num259 + 2].HasTile) + else if (Main.tile[tileCheckX, tileCheckY + 2].HasTile) { NPC.ai[0] = -1f; } diff --git a/NPCs/NormalNPCs/KingSlimeJewel.cs b/NPCs/NormalNPCs/KingSlimeJewel.cs index cc5fa62cf0..bc10f7bc3a 100644 --- a/NPCs/NormalNPCs/KingSlimeJewel.cs +++ b/NPCs/NormalNPCs/KingSlimeJewel.cs @@ -189,23 +189,23 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.height = 45; NPC.position.X = NPC.position.X - (NPC.width / 2); NPC.position.Y = NPC.position.Y - (NPC.height / 2); - for (int num621 = 0; num621 < 2; num621++) + for (int i = 0; i < 2; i++) { - int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 90, 0f, 0f, 100, default, 2f); - Main.dust[num622].velocity *= 3f; + int rubyDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 90, 0f, 0f, 100, default, 2f); + Main.dust[rubyDust].velocity *= 3f; if (Main.rand.NextBool()) { - Main.dust[num622].scale = 0.5f; - Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f; + Main.dust[rubyDust].scale = 0.5f; + Main.dust[rubyDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f; } } - for (int num623 = 0; num623 < 10; num623++) + for (int j = 0; j < 10; j++) { - int num624 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 90, 0f, 0f, 100, default, 3f); - Main.dust[num624].noGravity = true; - Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 90, 0f, 0f, 100, default, 2f); - Main.dust[num624].velocity *= 2f; + int rubyDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 90, 0f, 0f, 100, default, 3f); + Main.dust[rubyDust2].noGravity = true; + Main.dust[rubyDust2].velocity *= 5f; + rubyDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, 90, 0f, 0f, 100, default, 2f); + Main.dust[rubyDust2].velocity *= 2f; } } } diff --git a/NPCs/NormalNPCs/MantisShrimp.cs b/NPCs/NormalNPCs/MantisShrimp.cs index 792a20229f..2ccd64a058 100644 --- a/NPCs/NormalNPCs/MantisShrimp.cs +++ b/NPCs/NormalNPCs/MantisShrimp.cs @@ -55,43 +55,43 @@ namespace CalamityMod.NPCs.NormalNPCs public override void AI() { NPC.spriteDirection = (NPC.direction > 0) ? -1 : 1; - float num79 = (Main.player[NPC.target].Center - NPC.Center).Length(); - num79 *= 0.0025f; - if ((double)num79 > 1.5) + float targetDist = (Main.player[NPC.target].Center - NPC.Center).Length(); + targetDist *= 0.0025f; + if ((double)targetDist > 1.5) { - num79 = 1.5f; + targetDist = 1.5f; } - float num78; + float maxSpeed; if (Main.expertMode) { - num78 = 3f - num79; + maxSpeed = 3f - targetDist; } else { - num78 = 2.5f - num79; + maxSpeed = 2.5f - targetDist; } - num78 *= (CalamityWorld.death ? 1.2f : CalamityWorld.revenge ? 1f : 0.8f); - if (NPC.velocity.X < -num78 || NPC.velocity.X > num78) + maxSpeed *= (CalamityWorld.death ? 1.2f : CalamityWorld.revenge ? 1f : 0.8f); + if (NPC.velocity.X < -maxSpeed || NPC.velocity.X > maxSpeed) { if (NPC.velocity.Y == 0f) { NPC.velocity *= 0.8f; } } - else if (NPC.velocity.X < num78 && NPC.direction == 1) + else if (NPC.velocity.X < maxSpeed && NPC.direction == 1) { NPC.velocity.X = NPC.velocity.X + 1f; - if (NPC.velocity.X > num78) + if (NPC.velocity.X > maxSpeed) { - NPC.velocity.X = num78; + NPC.velocity.X = maxSpeed; } } - else if (NPC.velocity.X > -num78 && NPC.direction == -1) + else if (NPC.velocity.X > -maxSpeed && NPC.direction == -1) { NPC.velocity.X = NPC.velocity.X - 1f; - if (NPC.velocity.X < -num78) + if (NPC.velocity.X < -maxSpeed) { - NPC.velocity.X = -num78; + NPC.velocity.X = -maxSpeed; } } } diff --git a/NPCs/NormalNPCs/OverloadedSoldier.cs b/NPCs/NormalNPCs/OverloadedSoldier.cs index c809377f28..b9911088c5 100644 --- a/NPCs/NormalNPCs/OverloadedSoldier.cs +++ b/NPCs/NormalNPCs/OverloadedSoldier.cs @@ -104,23 +104,23 @@ namespace CalamityMod.NPCs.NormalNPCs public override void AI() { Lighting.AddLight((int)((NPC.position.X + (float)(NPC.width / 2)) / 16f), (int)((NPC.position.Y + (float)(NPC.height / 2)) / 16f), 0.35f, 0f, 0.15f); - bool flag3 = false; + bool noXMovement = false; if (NPC.velocity.X == 0f) { - flag3 = true; + noXMovement = true; } if (NPC.justHit) { - flag3 = false; + noXMovement = false; } - bool flag4 = false; - bool flag5 = false; - int num35 = 60; + bool isWalking = false; + bool unusedFlag = false; + int backUpTimer = 60; if (NPC.velocity.Y == 0f && ((NPC.velocity.X > 0f && NPC.direction < 0) || (NPC.velocity.X < 0f && NPC.direction > 0))) { - flag4 = true; + isWalking = true; } - if ((NPC.position.X == NPC.oldPosition.X || NPC.ai[3] >= (float)num35) | flag4) + if ((NPC.position.X == NPC.oldPosition.X || NPC.ai[3] >= (float)backUpTimer) | isWalking) { NPC.ai[3] += 1f; } @@ -128,7 +128,7 @@ namespace CalamityMod.NPCs.NormalNPCs { NPC.ai[3] -= 1f; } - if (NPC.ai[3] > (float)(num35 * 10)) + if (NPC.ai[3] > (float)(backUpTimer * 10)) { NPC.ai[3] = 0f; } @@ -136,11 +136,11 @@ namespace CalamityMod.NPCs.NormalNPCs { NPC.ai[3] = 0f; } - if (NPC.ai[3] == (float)num35) + if (NPC.ai[3] == (float)backUpTimer) { NPC.netUpdate = true; } - if (NPC.ai[3] < (float)num35) + if (NPC.ai[3] < (float)backUpTimer) { NPC.TargetClosest(true); } @@ -168,88 +168,88 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.direction = 1; } } - float num65 = 1.5f; - float num66 = 0.1f; + float maxVelocity = 1.5f; + float acceleration = 0.1f; if (CalamityWorld.death) { - num65 *= 1.5f; - num66 *= 1.5f; + maxVelocity *= 1.5f; + acceleration *= 1.5f; } if (Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) < 400f) { - num65 += (CalamityWorld.death ? 8f : CalamityWorld.revenge ? 6f : 4f) - ((Main.player[NPC.target].Center - NPC.Center).Length() * 0.01f); + maxVelocity += (CalamityWorld.death ? 8f : CalamityWorld.revenge ? 6f : 4f) - ((Main.player[NPC.target].Center - NPC.Center).Length() * 0.01f); } - if (NPC.velocity.X < -num65 || NPC.velocity.X > num65) + if (NPC.velocity.X < -maxVelocity || NPC.velocity.X > maxVelocity) { if (NPC.velocity.Y == 0f) NPC.velocity *= 0.7f; } - else if (NPC.velocity.X < num65 && NPC.direction == 1) + else if (NPC.velocity.X < maxVelocity && NPC.direction == 1) { - NPC.velocity.X = NPC.velocity.X + num66; - if (NPC.velocity.X > num65) - NPC.velocity.X = num65; + NPC.velocity.X = NPC.velocity.X + acceleration; + if (NPC.velocity.X > maxVelocity) + NPC.velocity.X = maxVelocity; } - else if (NPC.velocity.X > -num65 && NPC.direction == -1) + else if (NPC.velocity.X > -maxVelocity && NPC.direction == -1) { - NPC.velocity.X = NPC.velocity.X - num66; - if (NPC.velocity.X < -num65) - NPC.velocity.X = -num65; + NPC.velocity.X = NPC.velocity.X - acceleration; + if (NPC.velocity.X < -maxVelocity) + NPC.velocity.X = -maxVelocity; } - bool flag22 = false; + bool isOnSolidTile = false; if (NPC.velocity.Y == 0f) { - int num161 = (int)(NPC.position.Y + (float)NPC.height + 7f) / 16; - int arg_A8FB_0 = (int)NPC.position.X / 16; - int num162 = (int)(NPC.position.X + (float)NPC.width) / 16; - for (int num163 = arg_A8FB_0; num163 <= num162; num163++) + int yTile = (int)(NPC.position.Y + (float)NPC.height + 7f) / 16; + int initialXTile = (int)NPC.position.X / 16; + int maxXTile = (int)(NPC.position.X + (float)NPC.width) / 16; + for (int xTile = initialXTile; xTile <= maxXTile; xTile++) { - if (Main.tile[num163, num161] == null) + if (Main.tile[xTile, yTile] == null) { return; } - if (Main.tile[num163, num161].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num163, num161].TileType]) + if (Main.tile[xTile, yTile].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[xTile, yTile].TileType]) { - flag22 = true; + isOnSolidTile = true; break; } } } if (NPC.velocity.Y >= 0f) { - int num164 = 0; + int fallFaceDirection = 0; if (NPC.velocity.X < 0f) { - num164 = -1; + fallFaceDirection = -1; } if (NPC.velocity.X > 0f) { - num164 = 1; + fallFaceDirection = 1; } - Vector2 position2 = NPC.position; - position2.X += NPC.velocity.X; - int num165 = (int)((position2.X + (float)(NPC.width / 2) + (float)((NPC.width / 2 + 1) * num164)) / 16f); - int num166 = (int)((position2.Y + (float)NPC.height - 1f) / 16f); - if ((float)(num165 * 16) < position2.X + (float)NPC.width && (float)(num165 * 16 + 16) > position2.X && ((Main.tile[num165, num166].HasUnactuatedTile && !Main.tile[num165, num166].TopSlope && !Main.tile[num165, num166 - 1].TopSlope && Main.tileSolid[(int)Main.tile[num165, num166].TileType] && !Main.tileSolidTop[(int)Main.tile[num165, num166].TileType]) || (Main.tile[num165, num166 - 1].IsHalfBlock && Main.tile[num165, num166 - 1].HasUnactuatedTile)) && (!Main.tile[num165, num166 - 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num165, num166 - 1].TileType] || Main.tileSolidTop[(int)Main.tile[num165, num166 - 1].TileType] || (Main.tile[num165, num166 - 1].IsHalfBlock && (!Main.tile[num165, num166 - 4].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num165, num166 - 4].TileType] || Main.tileSolidTop[(int)Main.tile[num165, num166 - 4].TileType]))) && (!Main.tile[num165, num166 - 2].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num165, num166 - 2].TileType] || Main.tileSolidTop[(int)Main.tile[num165, num166 - 2].TileType]) && (!Main.tile[num165, num166 - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num165, num166 - 3].TileType] || Main.tileSolidTop[(int)Main.tile[num165, num166 - 3].TileType]) && (!Main.tile[num165 - num164, num166 - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num165 - num164, num166 - 3].TileType])) + Vector2 ghostPosition = NPC.position; + ghostPosition.X += NPC.velocity.X; + int xTileBelow = (int)((ghostPosition.X + (float)(NPC.width / 2) + (float)((NPC.width / 2 + 1) * fallFaceDirection)) / 16f); + int yTileBelow = (int)((ghostPosition.Y + (float)NPC.height - 1f) / 16f); + if ((float)(xTileBelow * 16) < ghostPosition.X + (float)NPC.width && (float)(xTileBelow * 16 + 16) > ghostPosition.X && ((Main.tile[xTileBelow, yTileBelow].HasUnactuatedTile && !Main.tile[xTileBelow, yTileBelow].TopSlope && !Main.tile[xTileBelow, yTileBelow - 1].TopSlope && Main.tileSolid[(int)Main.tile[xTileBelow, yTileBelow].TileType] && !Main.tileSolidTop[(int)Main.tile[xTileBelow, yTileBelow].TileType]) || (Main.tile[xTileBelow, yTileBelow - 1].IsHalfBlock && Main.tile[xTileBelow, yTileBelow - 1].HasUnactuatedTile)) && (!Main.tile[xTileBelow, yTileBelow - 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[xTileBelow, yTileBelow - 1].TileType] || Main.tileSolidTop[(int)Main.tile[xTileBelow, yTileBelow - 1].TileType] || (Main.tile[xTileBelow, yTileBelow - 1].IsHalfBlock && (!Main.tile[xTileBelow, yTileBelow - 4].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[xTileBelow, yTileBelow - 4].TileType] || Main.tileSolidTop[(int)Main.tile[xTileBelow, yTileBelow - 4].TileType]))) && (!Main.tile[xTileBelow, yTileBelow - 2].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[xTileBelow, yTileBelow - 2].TileType] || Main.tileSolidTop[(int)Main.tile[xTileBelow, yTileBelow - 2].TileType]) && (!Main.tile[xTileBelow, yTileBelow - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[xTileBelow, yTileBelow - 3].TileType] || Main.tileSolidTop[(int)Main.tile[xTileBelow, yTileBelow - 3].TileType]) && (!Main.tile[xTileBelow - fallFaceDirection, yTileBelow - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[xTileBelow - fallFaceDirection, yTileBelow - 3].TileType])) { - float num167 = (float)(num166 * 16); - if (Main.tile[num165, num166].IsHalfBlock) + float yPixelDistance = (float)(yTileBelow * 16); + if (Main.tile[xTileBelow, yTileBelow].IsHalfBlock) { - num167 += 8f; + yPixelDistance += 8f; } - if (Main.tile[num165, num166 - 1].IsHalfBlock) + if (Main.tile[xTileBelow, yTileBelow - 1].IsHalfBlock) { - num167 -= 8f; + yPixelDistance -= 8f; } - if (num167 < position2.Y + (float)NPC.height) + if (yPixelDistance < ghostPosition.Y + (float)NPC.height) { - float num168 = position2.Y + (float)NPC.height - num167; - float num169 = 16.1f; - if (num168 <= num169) + float percentageTileRisen = ghostPosition.Y + (float)NPC.height - yPixelDistance; + float fullTileAmt = 16.1f; + if (percentageTileRisen <= fullTileAmt) { - NPC.gfxOffY += NPC.position.Y + (float)NPC.height - num167; - NPC.position.Y = num167 - (float)NPC.height; - if (num168 < 9f) + NPC.gfxOffY += NPC.position.Y + (float)NPC.height - yPixelDistance; + NPC.position.Y = yPixelDistance - (float)NPC.height; + if (percentageTileRisen < 9f) { NPC.stepSpeed = 1f; } @@ -261,57 +261,57 @@ namespace CalamityMod.NPCs.NormalNPCs } } } - if (flag22) + if (isOnSolidTile) { - int num170 = (int)((NPC.position.X + (float)(NPC.width / 2) + (float)(15 * NPC.direction)) / 16f); - int num171 = (int)((NPC.position.Y + (float)NPC.height - 15f) / 16f); - if ((Main.tile[num170, num171 - 1].HasUnactuatedTile && (Main.tile[num170, num171 - 1].TileType == 10 || Main.tile[num170, num171 - 1].TileType == 388)) & flag5) + int doorCheckX = (int)((NPC.position.X + (float)(NPC.width / 2) + (float)(15 * NPC.direction)) / 16f); + int doorCheckY = (int)((NPC.position.Y + (float)NPC.height - 15f) / 16f); + if ((Main.tile[doorCheckX, doorCheckY - 1].HasUnactuatedTile && (Main.tile[doorCheckX, doorCheckY - 1].TileType == 10 || Main.tile[doorCheckX, doorCheckY - 1].TileType == 388)) & unusedFlag) { NPC.ai[2] += 1f; NPC.ai[3] = 0f; if (NPC.ai[2] >= 60f) { NPC.velocity.X = 0.5f * (float)-(float)NPC.direction; - int num172 = 5; - if (Main.tile[num170, num171 - 1].TileType == 388) + int doorOpenInc = 5; + if (Main.tile[doorCheckX, doorCheckY - 1].TileType == 388) { - num172 = 2; + doorOpenInc = 2; } - NPC.ai[1] += (float)num172; + NPC.ai[1] += (float)doorOpenInc; NPC.ai[2] = 0f; - bool flag23 = false; + bool letMeIn = false; if (NPC.ai[1] >= 10f) { - flag23 = true; + letMeIn = true; NPC.ai[1] = 10f; } - WorldGen.KillTile(num170, num171 - 1, true, false, false); - if ((Main.netMode != NetmodeID.MultiplayerClient || !flag23) && flag23 && Main.netMode != NetmodeID.MultiplayerClient) + WorldGen.KillTile(doorCheckX, doorCheckY - 1, true, false, false); + if ((Main.netMode != NetmodeID.MultiplayerClient || !letMeIn) && letMeIn && Main.netMode != NetmodeID.MultiplayerClient) { - if (Main.tile[num170, num171 - 1].TileType == 10) + if (Main.tile[doorCheckX, doorCheckY - 1].TileType == 10) { - bool flag24 = WorldGen.OpenDoor(num170, num171 - 1, NPC.direction); - if (!flag24) + bool canOpenDoor = WorldGen.OpenDoor(doorCheckX, doorCheckY - 1, NPC.direction); + if (!canOpenDoor) { - NPC.ai[3] = (float)num35; + NPC.ai[3] = (float)backUpTimer; NPC.netUpdate = true; } - if (Main.netMode == NetmodeID.Server & flag24) + if (Main.netMode == NetmodeID.Server & canOpenDoor) { - NetMessage.SendData(MessageID.ToggleDoorState, -1, -1, null, 0, (float)num170, (float)(num171 - 1), (float)NPC.direction, 0, 0, 0); + NetMessage.SendData(MessageID.ToggleDoorState, -1, -1, null, 0, (float)doorCheckX, (float)(doorCheckY - 1), (float)NPC.direction, 0, 0, 0); } } - if (Main.tile[num170, num171 - 1].TileType == 388) + if (Main.tile[doorCheckX, doorCheckY - 1].TileType == 388) { - bool flag25 = WorldGen.ShiftTallGate(num170, num171 - 1, false); - if (!flag25) + bool canOpenTallGate = WorldGen.ShiftTallGate(doorCheckX, doorCheckY - 1, false); + if (!canOpenTallGate) { - NPC.ai[3] = (float)num35; + NPC.ai[3] = (float)backUpTimer; NPC.netUpdate = true; } - if (Main.netMode == NetmodeID.Server & flag25) + if (Main.netMode == NetmodeID.Server & canOpenTallGate) { - NetMessage.SendData(MessageID.ToggleDoorState, -1, -1, null, 4, (float)num170, (float)(num171 - 1), 0f, 0, 0, 0); + NetMessage.SendData(MessageID.ToggleDoorState, -1, -1, null, 4, (float)doorCheckX, (float)(doorCheckY - 1), 0f, 0, 0, 0); } } } @@ -319,12 +319,12 @@ namespace CalamityMod.NPCs.NormalNPCs } else { - int num173 = NPC.spriteDirection; - if ((NPC.velocity.X < 0f && num173 == -1) || (NPC.velocity.X > 0f && num173 == 1)) + int faceDirection = NPC.spriteDirection; + if ((NPC.velocity.X < 0f && faceDirection == -1) || (NPC.velocity.X > 0f && faceDirection == 1)) { - if (NPC.height >= 32 && Main.tile[num170, num171 - 2].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num170, num171 - 2].TileType]) + if (NPC.height >= 32 && Main.tile[doorCheckX, doorCheckY - 2].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[doorCheckX, doorCheckY - 2].TileType]) { - if (Main.tile[num170, num171 - 3].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num170, num171 - 3].TileType]) + if (Main.tile[doorCheckX, doorCheckY - 3].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[doorCheckX, doorCheckY - 3].TileType]) { NPC.velocity.Y = -8f; NPC.netUpdate = true; @@ -335,35 +335,35 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.netUpdate = true; } } - else if (Main.tile[num170, num171 - 1].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num170, num171 - 1].TileType]) + else if (Main.tile[doorCheckX, doorCheckY - 1].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[doorCheckX, doorCheckY - 1].TileType]) { NPC.velocity.Y = -6f; NPC.netUpdate = true; } - else if (NPC.position.Y + (float)NPC.height - (float)(num171 * 16) > 20f && Main.tile[num170, num171].HasUnactuatedTile && !Main.tile[num170, num171].TopSlope && Main.tileSolid[(int)Main.tile[num170, num171].TileType]) + else if (NPC.position.Y + (float)NPC.height - (float)(doorCheckY * 16) > 20f && Main.tile[doorCheckX, doorCheckY].HasUnactuatedTile && !Main.tile[doorCheckX, doorCheckY].TopSlope && Main.tileSolid[(int)Main.tile[doorCheckX, doorCheckY].TileType]) { NPC.velocity.Y = -5f; NPC.netUpdate = true; } - else if (NPC.directionY < 0 && (!Main.tile[num170, num171 + 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num170, num171 + 1].TileType]) && (!Main.tile[num170 + NPC.direction, num171 + 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num170 + NPC.direction, num171 + 1].TileType])) + else if (NPC.directionY < 0 && (!Main.tile[doorCheckX, doorCheckY + 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[doorCheckX, doorCheckY + 1].TileType]) && (!Main.tile[doorCheckX + NPC.direction, doorCheckY + 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[doorCheckX + NPC.direction, doorCheckY + 1].TileType])) { NPC.velocity.Y = -8f; NPC.velocity.X = NPC.velocity.X * 1.5f; NPC.netUpdate = true; } - else if (flag5) + else if (unusedFlag) { NPC.ai[1] = 0f; NPC.ai[2] = 0f; } - if ((NPC.velocity.Y == 0f & flag3) && NPC.ai[3] == 1f) + if ((NPC.velocity.Y == 0f & noXMovement) && NPC.ai[3] == 1f) { NPC.velocity.Y = -5f; } } } } - else if (flag5) + else if (unusedFlag) { NPC.ai[1] = 0f; NPC.ai[2] = 0f; diff --git a/NPCs/NormalNPCs/PhantomSpirit.cs b/NPCs/NormalNPCs/PhantomSpirit.cs index 10dd45904b..a7e0bf2637 100644 --- a/NPCs/NormalNPCs/PhantomSpirit.cs +++ b/NPCs/NormalNPCs/PhantomSpirit.cs @@ -50,8 +50,8 @@ namespace CalamityMod.NPCs.NormalNPCs { float speed = CalamityWorld.death ? 22f : CalamityWorld.revenge ? 19.5f : 17f; CalamityAI.DungeonSpiritAI(NPC, Mod, speed, -MathHelper.PiOver2); - int num822 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, 0f, 0f, 0, default, 1f); - Dust dust = Main.dust[num822]; + int polterDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, 0f, 0f, 0, default, 1f); + Dust dust = Main.dust[polterDust]; dust.velocity *= 0.1f; dust.scale = 1.3f; dust.noGravity = true; @@ -65,10 +65,10 @@ namespace CalamityMod.NPCs.NormalNPCs } if (NPC.life <= 0) { - for (int num288 = 0; num288 < 50; num288++) + for (int i = 0; i < 50; i++) { - int num289 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, NPC.velocity.X, NPC.velocity.Y, 0, default, 1f); - Dust dust = Main.dust[num289]; + int hitPolterDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, NPC.velocity.X, NPC.velocity.Y, 0, default, 1f); + Dust dust = Main.dust[hitPolterDust]; dust.velocity *= 2f; dust.noGravity = true; dust.scale = 1.4f; diff --git a/NPCs/NormalNPCs/PhantomSpiritL.cs b/NPCs/NormalNPCs/PhantomSpiritL.cs index 686af1f815..233e0ef259 100644 --- a/NPCs/NormalNPCs/PhantomSpiritL.cs +++ b/NPCs/NormalNPCs/PhantomSpiritL.cs @@ -64,15 +64,15 @@ namespace CalamityMod.NPCs.NormalNPCs { float speed = (CalamityWorld.death || BossRushEvent.BossRushActive) ? 16f : CalamityWorld.revenge ? 14f : 12f; CalamityAI.DungeonSpiritAI(NPC, Mod, speed, -MathHelper.PiOver2); - int num822 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, 0f, 0f, 0, default, 1f); - Dust dust = Main.dust[num822]; + int polterDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, 0f, 0f, 0, default, 1f); + Dust dust = Main.dust[polterDust]; dust.velocity *= 0.1f; dust.scale = 1.3f; dust.noGravity = true; - Vector2 vector17 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num147 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2) - vector17.X; - float num148 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2) - vector17.Y; - float num149 = (float)Math.Sqrt((double)(num147 * num147 + num148 * num148)); + Vector2 spiritPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float targetXDist = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2) - spiritPosition.X; + float targetYDist = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2) - spiritPosition.Y; + float targetDistance = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); if (NPC.justHit) NPC.ai[2] = 0f; @@ -81,13 +81,13 @@ namespace CalamityMod.NPCs.NormalNPCs if (Main.netMode != NetmodeID.MultiplayerClient && NPC.ai[2] >= 150f) { NPC.ai[2] = 0f; - float num151 = 10f; + float projSpeed = 10f; int type = ModContent.ProjectileType(); int damage = NPC.GetProjectileDamage(type); - num149 = num151 / num149; - num147 *= num149; - num148 *= num149; - Projectile.NewProjectile(NPC.GetSource_FromAI(), vector17.X, vector17.Y, num147, num148, type, damage, 0f, Main.myPlayer, 0f, 0f); + targetDistance = projSpeed / targetDistance; + targetXDist *= targetDistance; + targetYDist *= targetDistance; + Projectile.NewProjectile(NPC.GetSource_FromAI(), spiritPosition.X, spiritPosition.Y, targetXDist, targetYDist, type, damage, 0f, Main.myPlayer, 0f, 0f); } } @@ -99,10 +99,10 @@ namespace CalamityMod.NPCs.NormalNPCs } if (NPC.life <= 0) { - for (int num288 = 0; num288 < 50; num288++) + for (int i = 0; i < 50; i++) { - int num289 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, NPC.velocity.X, NPC.velocity.Y, 0, default, 1f); - Dust dust = Main.dust[num289]; + int hitPolterDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, NPC.velocity.X, NPC.velocity.Y, 0, default, 1f); + Dust dust = Main.dust[hitPolterDust]; dust.velocity *= 2f; dust.noGravity = true; dust.scale = 1.4f; diff --git a/NPCs/NormalNPCs/PhantomSpiritM.cs b/NPCs/NormalNPCs/PhantomSpiritM.cs index d77ab006b9..3c6729f09c 100644 --- a/NPCs/NormalNPCs/PhantomSpiritM.cs +++ b/NPCs/NormalNPCs/PhantomSpiritM.cs @@ -60,8 +60,8 @@ namespace CalamityMod.NPCs.NormalNPCs { float speed = CalamityWorld.death ? 18f : CalamityWorld.revenge ? 15.75f : 13.5f; CalamityAI.DungeonSpiritAI(NPC, Mod, speed, -MathHelper.PiOver2); - int num822 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, 0f, 0f, 0, default, 1f); - Dust dust = Main.dust[num822]; + int polterDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, 0f, 0f, 0, default, 1f); + Dust dust = Main.dust[polterDust]; dust.velocity *= 0.1f; dust.scale = 1.3f; dust.noGravity = true; @@ -76,10 +76,10 @@ namespace CalamityMod.NPCs.NormalNPCs } if (NPC.life <= 0) { - for (int num288 = 0; num288 < 50; num288++) + for (int i = 0; i < 50; i++) { - int num289 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, NPC.velocity.X, NPC.velocity.Y, 0, default, 1f); - Dust dust = Main.dust[num289]; + int hitPolterDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, NPC.velocity.X, NPC.velocity.Y, 0, default, 1f); + Dust dust = Main.dust[hitPolterDust]; dust.velocity *= 2f; dust.noGravity = true; dust.scale = 1.4f; diff --git a/NPCs/NormalNPCs/PhantomSpiritS.cs b/NPCs/NormalNPCs/PhantomSpiritS.cs index 4397bae9ae..de9a48fb3f 100644 --- a/NPCs/NormalNPCs/PhantomSpiritS.cs +++ b/NPCs/NormalNPCs/PhantomSpiritS.cs @@ -59,8 +59,8 @@ namespace CalamityMod.NPCs.NormalNPCs { float speed = CalamityWorld.death ? 20f : CalamityWorld.revenge ? 17.5f : 15f; CalamityAI.DungeonSpiritAI(NPC, Mod, speed, -MathHelper.PiOver2); - int num822 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, 0f, 0f, 0, default, 1f); - Dust dust = Main.dust[num822]; + int polterDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, 0f, 0f, 0, default, 1f); + Dust dust = Main.dust[polterDust]; dust.velocity *= 0.1f; dust.scale = 1.3f; dust.noGravity = true; @@ -74,10 +74,10 @@ namespace CalamityMod.NPCs.NormalNPCs } if (NPC.life <= 0) { - for (int num288 = 0; num288 < 50; num288++) + for (int i = 0; i < 50; i++) { - int num289 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, NPC.velocity.X, NPC.velocity.Y, 0, default, 1f); - Dust dust = Main.dust[num289]; + int hitPolterDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.Polterplasm, NPC.velocity.X, NPC.velocity.Y, 0, default, 1f); + Dust dust = Main.dust[hitPolterDust]; dust.velocity *= 2f; dust.noGravity = true; dust.scale = 1.4f; diff --git a/NPCs/NormalNPCs/ProfanedEnergyLantern.cs b/NPCs/NormalNPCs/ProfanedEnergyLantern.cs index 880e72f1db..da3f3e7445 100644 --- a/NPCs/NormalNPCs/ProfanedEnergyLantern.cs +++ b/NPCs/NormalNPCs/ProfanedEnergyLantern.cs @@ -45,10 +45,10 @@ namespace CalamityMod.NPCs.NormalNPCs return; } - int num750 = CalamityGlobalNPC.energyFlame; + int energyBase = CalamityGlobalNPC.energyFlame; if (NPC.ai[3] > 0f) { - num750 = (int)NPC.ai[3] - 1; + energyBase = (int)NPC.ai[3] - 1; } if (Main.netMode != NetmodeID.MultiplayerClient) { @@ -62,23 +62,23 @@ namespace CalamityMod.NPCs.NormalNPCs } } NPC.TargetClosest(true); - float num751 = 0.1f; - float num752 = 500f; + float lanternAcceleration = 0.1f; + float lanternSpeed = 500f; if ((double)Main.npc[CalamityGlobalNPC.energyFlame].life < (double)Main.npc[CalamityGlobalNPC.energyFlame].lifeMax * 0.25) { - num752 += 50f; + lanternSpeed += 50f; } if ((double)Main.npc[CalamityGlobalNPC.energyFlame].life < (double)Main.npc[CalamityGlobalNPC.energyFlame].lifeMax * 0.1) { - num752 += 50f; + lanternSpeed += 50f; } if (Main.expertMode) { - float num753 = 1f - (float)NPC.life / (float)NPC.lifeMax; - num752 += num753 * 200f; - num751 += 0.15f; + float expertSpeedMult = 1f - (float)NPC.life / (float)NPC.lifeMax; + lanternSpeed += expertSpeedMult * 200f; + lanternAcceleration += 0.15f; } - if (!Main.npc[num750].active || CalamityGlobalNPC.energyFlame < 0) + if (!Main.npc[energyBase].active || CalamityGlobalNPC.energyFlame < 0) { NPC.life = 0; NPC.HitEffect(); @@ -86,49 +86,49 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.netUpdate = true; return; } - Vector2 vector22 = new Vector2(NPC.ai[0] * 16f + 8f, NPC.ai[1] * 16f + 8f); - float num189 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2) - (float)(NPC.width / 2) - vector22.X; - float num190 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2) - (float)(NPC.height / 2) - vector22.Y; - float num191 = (float)Math.Sqrt((double)(num189 * num189 + num190 * num190)); - float num754 = Main.npc[num750].position.X + (float)(Main.npc[num750].width / 2); - float num755 = Main.npc[num750].position.Y + (float)(Main.npc[num750].height / 2); - Vector2 vector93 = new Vector2(num754, num755); - float num756 = num754 + NPC.ai[0]; - float num757 = num755 + NPC.ai[1]; - float num758 = num756 - vector93.X; - float num759 = num757 - vector93.Y; - float num760 = (float)Math.Sqrt((double)(num758 * num758 + num759 * num759)); - num760 = num752 / num760; - num758 *= num760; - num759 *= num760; - if (NPC.position.X < num754 + num758) + Vector2 lanternRelocation = new Vector2(NPC.ai[0] * 16f + 8f, NPC.ai[1] * 16f + 8f); + float targetXDist = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2) - (float)(NPC.width / 2) - lanternRelocation.X; + float targetYDist = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2) - (float)(NPC.height / 2) - lanternRelocation.Y; + float targetDistance = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); + float baseXPos = Main.npc[energyBase].position.X + (float)(Main.npc[energyBase].width / 2); + float baseYPos = Main.npc[energyBase].position.Y + (float)(Main.npc[energyBase].height / 2); + Vector2 basePosition = new Vector2(baseXPos, baseYPos); + float basePosition = baseXPos + NPC.ai[0]; + float newLanternPos = baseYPos + NPC.ai[1]; + float baseXDist = basePosition - basePosition.X; + float baseYDist = newLanternPos - basePosition.Y; + float baseDistance = (float)Math.Sqrt((double)(baseXDist * baseXDist + baseYDist * baseYDist)); + baseDistance = lanternSpeed / baseDistance; + baseXDist *= baseDistance; + baseYDist *= baseDistance; + if (NPC.position.X < baseXPos + baseXDist) { - NPC.velocity.X = NPC.velocity.X + num751; - if (NPC.velocity.X < 0f && num758 > 0f) + NPC.velocity.X = NPC.velocity.X + lanternAcceleration; + if (NPC.velocity.X < 0f && baseXDist > 0f) { NPC.velocity.X = NPC.velocity.X * 0.9f; } } - else if (NPC.position.X > num754 + num758) + else if (NPC.position.X > baseXPos + baseXDist) { - NPC.velocity.X = NPC.velocity.X - num751; - if (NPC.velocity.X > 0f && num758 < 0f) + NPC.velocity.X = NPC.velocity.X - lanternAcceleration; + if (NPC.velocity.X > 0f && baseXDist < 0f) { NPC.velocity.X = NPC.velocity.X * 0.9f; } } - if (NPC.position.Y < num755 + num759) + if (NPC.position.Y < baseYPos + baseYDist) { - NPC.velocity.Y = NPC.velocity.Y + num751; - if (NPC.velocity.Y < 0f && num759 > 0f) + NPC.velocity.Y = NPC.velocity.Y + lanternAcceleration; + if (NPC.velocity.Y < 0f && baseYDist > 0f) { NPC.velocity.Y = NPC.velocity.Y * 0.9f; } } - else if (NPC.position.Y > num755 + num759) + else if (NPC.position.Y > baseYPos + baseYDist) { - NPC.velocity.Y = NPC.velocity.Y - num751; - if (NPC.velocity.Y > 0f && num759 < 0f) + NPC.velocity.Y = NPC.velocity.Y - lanternAcceleration; + if (NPC.velocity.Y > 0f && baseYDist < 0f) { NPC.velocity.Y = NPC.velocity.Y * 0.9f; } @@ -158,21 +158,20 @@ namespace CalamityMod.NPCs.NormalNPCs { if (!Collision.SolidCollision(NPC.position, NPC.width, NPC.height)) { - float num196 = 11f; - vector22 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - num189 = Main.player[NPC.target].position.X + (float)Main.player[NPC.target].width * 0.5f - vector22.X + (float)Main.rand.Next(-10, 11); - float num197 = Math.Abs(num189 * 0.1f); - if (num190 > 0f) + float projSpeed = 11f; + lanternRelocation = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + targetXDist = Main.player[NPC.target].position.X + (float)Main.player[NPC.target].width * 0.5f - lanternRelocation.X + (float)Main.rand.Next(-10, 11); + float absoluteTargetX = Math.Abs(targetXDist * 0.1f); + if (targetYDist > 0f) { - num197 = 0f; + absoluteTargetX = 0f; } - num190 = Main.player[NPC.target].position.Y + (float)Main.player[NPC.target].height * 0.5f - vector22.Y + (float)Main.rand.Next(-10, 11) - num197; - num191 = (float)Math.Sqrt((double)(num189 * num189 + num190 * num190)); - num191 = num196 / num191; - num189 *= num191; - num190 *= num191; - int num9 = ModContent.ProjectileType(); - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center.X, NPC.Center.Y, num189, num190, num9, 40, 0f, Main.myPlayer, 0f, 0f); + targetYDist = Main.player[NPC.target].position.Y + (float)Main.player[NPC.target].height * 0.5f - lanternRelocation.Y + (float)Main.rand.Next(-10, 11) - absoluteTargetX; + targetDistance = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); + targetDistance = projSpeed / targetDistance; + targetXDist *= targetDistance; + targetYDist *= targetDistance; + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center.X, NPC.Center.Y, targetXDist, targetYDist, ModContent.ProjectileType(), 40, 0f, Main.myPlayer, 0f, 0f); NPC.localAI[1] = 0f; return; } diff --git a/NPCs/NormalNPCs/ScornEater.cs b/NPCs/NormalNPCs/ScornEater.cs index 8bb616a6ba..830218703a 100644 --- a/NPCs/NormalNPCs/ScornEater.cs +++ b/NPCs/NormalNPCs/ScornEater.cs @@ -76,20 +76,20 @@ namespace CalamityMod.NPCs.NormalNPCs if (NPC.velocity.Y == 0f) { NPC.ai[2] += 1f; - int num321 = 20; + int decelerationDelay = 20; if (NPC.ai[1] == 0f) { - num321 = 12; + decelerationDelay = 12; } if (CalamityWorld.revenge) { - num321 /= 2; + decelerationDelay /= 2; } if (CalamityWorld.death) { - num321 /= 2; + decelerationDelay /= 2; } - if (NPC.ai[2] < (float)num321) + if (NPC.ai[2] < (float)decelerationDelay) { NPC.velocity.X = NPC.velocity.X * 0.9f; return; diff --git a/NPCs/NormalNPCs/ShockstormShuttle.cs b/NPCs/NormalNPCs/ShockstormShuttle.cs index 4c7016a189..12e5f9cdc6 100644 --- a/NPCs/NormalNPCs/ShockstormShuttle.cs +++ b/NPCs/NormalNPCs/ShockstormShuttle.cs @@ -88,7 +88,7 @@ namespace CalamityMod.NPCs.NormalNPCs npcPos.X += velocity.X; npcPos.Y += velocity.Y; int spread = Main.getGoodWorld ? 100 : 20; - for (int num186 = 0; num186 < (Main.getGoodWorld ? 10 : 2); num186++) + for (int i = 0; i < (Main.getGoodWorld ? 10 : 2); i++) { velocity = Main.player[NPC.target].Center - npcPos; targetDist = velocity.Length(); @@ -106,15 +106,15 @@ namespace CalamityMod.NPCs.NormalNPCs { NPC.localAI[3] = 1f; } - Vector2 center16 = NPC.Center; - Player player8 = Main.player[NPC.target]; - if (NPC.target < 0 || NPC.target == Main.maxPlayers || player8.dead || !player8.active) + Vector2 shuttleCenter = NPC.Center; + Player targetedPlayer = Main.player[NPC.target]; + if (NPC.target < 0 || NPC.target == Main.maxPlayers || targetedPlayer.dead || !targetedPlayer.active) { NPC.TargetClosest(); - player8 = Main.player[NPC.target]; + targetedPlayer = Main.player[NPC.target]; NPC.netUpdate = true; } - if ((player8.dead || Vector2.Distance(player8.Center, center16) > 3200f) && NPC.ai[0] != 1f) + if ((targetedPlayer.dead || Vector2.Distance(targetedPlayer.Center, shuttleCenter) > 3200f) && NPC.ai[0] != 1f) { NPC.ai[0] = -1f; NPC.netUpdate = true; @@ -126,7 +126,7 @@ namespace CalamityMod.NPCs.NormalNPCs { NPC.timeLeft = 10; } - if (!player8.dead) + if (!targetedPlayer.dead) { NPC.timeLeft = 300; NPC.ai[1] = 0f; @@ -138,128 +138,127 @@ namespace CalamityMod.NPCs.NormalNPCs } else if (NPC.ai[0] == 0f) { - int num1580 = 0; + int movementPattern = 0; if (NPC.ai[3] >= 580f) { - num1580 = 0; + movementPattern = 0; } else if (NPC.ai[3] >= 440f) { - num1580 = 5; + movementPattern = 5; } else if (NPC.ai[3] >= 420f) { - num1580 = 4; + movementPattern = 4; } else if (NPC.ai[3] >= 280f) { - num1580 = 3; + movementPattern = 3; } else if (NPC.ai[3] >= 260f) { - num1580 = 2; + movementPattern = 2; } else if (NPC.ai[3] >= 20f) { - num1580 = 1; + movementPattern = 1; } NPC.ai[3] += 1f; if (NPC.ai[3] >= 600f) { NPC.ai[3] = 0f; } - int num1581 = num1580; + int patternCompare = movementPattern; if (NPC.ai[3] >= 580f) { - num1580 = 0; + movementPattern = 0; } else if (NPC.ai[3] >= 440f) { - num1580 = 5; + movementPattern = 5; } else if (NPC.ai[3] >= 420f) { - num1580 = 4; + movementPattern = 4; } else if (NPC.ai[3] >= 280f) { - num1580 = 3; + movementPattern = 3; } else if (NPC.ai[3] >= 260f) { - num1580 = 2; + movementPattern = 2; } else if (NPC.ai[3] >= 20f) { - num1580 = 1; + movementPattern = 1; } - if (num1580 != num1581) + if (movementPattern != patternCompare) { - if (num1580 == 0) + if (movementPattern == 0) { NPC.ai[2] = 0f; } - if (num1580 == 1) + if (movementPattern == 1) { - NPC.ai[2] = (float)((Math.Sign((player8.Center - center16).X) == 1) ? 1 : -1); + NPC.ai[2] = (float)((Math.Sign((targetedPlayer.Center - shuttleCenter).X) == 1) ? 1 : -1); } - if (num1580 == 2) + if (movementPattern == 2) { NPC.ai[2] = 0f; } NPC.netUpdate = true; } - if (num1580 == 0) + if (movementPattern == 0) { if (NPC.ai[2] == 0f) { - NPC.ai[2] = (float)(-600 * Math.Sign((center16 - player8.Center).X)); + NPC.ai[2] = (float)(-600 * Math.Sign((shuttleCenter - targetedPlayer.Center).X)); } - Vector2 vector196 = player8.Center + new Vector2(NPC.ai[2], -250f) - center16; - if (vector196.Length() < 50f) + Vector2 targetingDirection = targetedPlayer.Center + new Vector2(NPC.ai[2], -250f) - shuttleCenter; + if (targetingDirection.Length() < 50f) { NPC.ai[3] = 19f; } else { - vector196.Normalize(); - NPC.velocity = Vector2.Lerp(NPC.velocity, vector196 * 16f, 0.1f); + targetingDirection.Normalize(); + NPC.velocity = Vector2.Lerp(NPC.velocity, targetingDirection * 16f, 0.1f); } } - if (num1580 == 1) + if (movementPattern == 1) { - int num1582 = (int)NPC.Center.X / 16; - int num1583 = (int)(NPC.position.Y + (float)NPC.height) / 16; - int num1584 = 0; - bool flag149 = Main.tile[num1582, num1583].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num1582, num1583].TileType] && !Main.tileSolidTop[(int)Main.tile[num1582, num1583].TileType]; - if (flag149) + int npcTileX = (int)NPC.Center.X / 16; + int npcTileY = (int)(NPC.position.Y + (float)NPC.height) / 16; + int upwardMoveAmt = 0; + bool solidTilePresent = Main.tile[npcTileX, npcTileY].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[npcTileX, npcTileY].TileType] && !Main.tileSolidTop[(int)Main.tile[npcTileX, npcTileY].TileType]; + if (solidTilePresent) { - num1584 = 1; + upwardMoveAmt = 1; } else { - while (num1584 < 150 && num1583 + num1584 < Main.maxTilesY) + while (upwardMoveAmt < 150 && npcTileY + upwardMoveAmt < Main.maxTilesY) { - int num1585 = num1583 + num1584; - bool flag150 = Main.tile[num1582, num1585].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num1582, num1585].TileType] && !Main.tileSolidTop[(int)Main.tile[num1582, num1585].TileType]; - if (flag150) + int npcTileYUp = npcTileY + upwardMoveAmt; + bool solidTilePresentAgain = Main.tile[npcTileX, npcTileYUp].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[npcTileX, npcTileYUp].TileType] && !Main.tileSolidTop[(int)Main.tile[npcTileX, npcTileYUp].TileType]; + if (solidTilePresentAgain) { - num1584--; + upwardMoveAmt--; break; } - num1584++; + upwardMoveAmt++; } } - float num1586 = (float)(num1584 * 16); - float num1587 = 250f; - if (num1586 < num1587) + float pixelsUpAmt = (float)(upwardMoveAmt * 16); + if (pixelsUpAmt < 250f) { - float num1588 = -4f; - if (-num1588 > num1586) + float velocityUpwards = -4f; + if (-velocityUpwards > pixelsUpAmt) { - num1588 = -num1586; + velocityUpwards = -pixelsUpAmt; } - NPC.velocity.Y = MathHelper.Lerp(NPC.velocity.Y, num1588, 0.05f); + NPC.velocity.Y = MathHelper.Lerp(NPC.velocity.Y, velocityUpwards, 0.05f); } else { @@ -267,106 +266,104 @@ namespace CalamityMod.NPCs.NormalNPCs } NPC.velocity.X = 3.5f * NPC.ai[2]; } - if (num1580 == 2) + if (movementPattern == 2) { if (NPC.ai[2] == 0f) { - NPC.ai[2] = (float)(300 * Math.Sign((center16 - player8.Center).X)); + NPC.ai[2] = (float)(300 * Math.Sign((shuttleCenter - targetedPlayer.Center).X)); } - Vector2 vector197 = player8.Center + new Vector2(NPC.ai[2], -170f) - center16; - int num1589 = (int)NPC.Center.X / 16; - int num1590 = (int)(NPC.position.Y + (float)NPC.height) / 16; - int num1591 = 0; - bool flag151 = Main.tile[num1589, num1590].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num1589, num1590].TileType] && !Main.tileSolidTop[(int)Main.tile[num1589, num1590].TileType]; - if (flag151) + Vector2 targetingCenter2 = targetedPlayer.Center + new Vector2(NPC.ai[2], -170f) - shuttleCenter; + int npcTileX2 = (int)NPC.Center.X / 16; + int npcTileY2 = (int)(NPC.position.Y + (float)NPC.height) / 16; + int upwardsMovement = 0; + bool solidTile = Main.tile[npcTileX2, npcTileY2].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[npcTileX2, npcTileY2].TileType] && !Main.tileSolidTop[(int)Main.tile[npcTileX2, npcTileY2].TileType]; + if (solidTile) { - num1591 = 1; + upwardsMovement = 1; } else { - while (num1591 < 150 && num1590 + num1591 < Main.maxTilesY) + while (upwardsMovement < 150 && npcTileY2 + upwardsMovement < Main.maxTilesY) { - int num1592 = num1590 + num1591; - bool flag152 = Main.tile[num1589, num1592].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num1589, num1592].TileType] && !Main.tileSolidTop[(int)Main.tile[num1589, num1592].TileType]; - if (flag152) + int npcTileYUp2 = npcTileY2 + upwardsMovement; + bool solidTileAgain = Main.tile[npcTileX2, npcTileYUp2].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[npcTileX2, npcTileYUp2].TileType] && !Main.tileSolidTop[(int)Main.tile[npcTileX2, npcTileYUp2].TileType]; + if (solidTileAgain) { - num1591--; + upwardsMovement--; break; } - num1591++; + upwardsMovement++; } } - float num1593 = (float)(num1591 * 16); - float num1594 = 170f; - if (num1593 < num1594) + float pixelsUpAmt2 = (float)(upwardsMovement * 16); + if (pixelsUpAmt2 < 170f) { - vector197.Y -= num1594 - num1593; + targetingCenter2.Y -= num1594 - pixelsUpAmt2; } - if (vector197.Length() < 70f) + if (targetingCenter2.Length() < 70f) { NPC.ai[3] = 279f; } else { - vector197.Normalize(); - NPC.velocity = Vector2.Lerp(NPC.velocity, vector197 * 20f, 0.1f); + targetingCenter2.Normalize(); + NPC.velocity = Vector2.Lerp(NPC.velocity, targetingCenter2 * 20f, 0.1f); } } - else if (num1580 == 3) + else if (movementPattern == 3) { - float num1595 = 0.85f; - int num1596 = (int)NPC.Center.X / 16; - int num1597 = (int)(NPC.position.Y + (float)NPC.height) / 16; - int num1598 = 0; - bool flag153 = Main.tile[num1596, num1597].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num1596, num1597].TileType] && !Main.tileSolidTop[(int)Main.tile[num1596, num1597].TileType]; - if (flag153) + float decelerationMult = 0.85f; + int npcTileX3 = (int)NPC.Center.X / 16; + int npcTileY3 = (int)(NPC.position.Y + (float)NPC.height) / 16; + int upwardsMovement3 = 0; + bool thereIsSolidTile = Main.tile[npcTileX3, npcTileY3].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[npcTileX3, npcTileY3].TileType] && !Main.tileSolidTop[(int)Main.tile[npcTileX3, npcTileY3].TileType]; + if (thereIsSolidTile) { - num1598 = 1; + upwardsMovement3 = 1; } else { - while (num1598 < 150 && num1597 + num1598 < Main.maxTilesY) + while (upwardsMovement3 < 150 && npcTileY3 + upwardsMovement3 < Main.maxTilesY) { - int num1599 = num1597 + num1598; - bool flag154 = Main.tile[num1596, num1599].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num1596, num1599].TileType] && !Main.tileSolidTop[(int)Main.tile[num1596, num1599].TileType]; - if (flag154) + int npcTileYUp3 = npcTileY3 + upwardsMovement3; + bool thereIsSolidTileAgain = Main.tile[npcTileX3, npcTileYUp3].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[npcTileX3, npcTileYUp3].TileType] && !Main.tileSolidTop[(int)Main.tile[npcTileX3, npcTileYUp3].TileType]; + if (thereIsSolidTileAgain) { - num1598--; + upwardsMovement3--; break; } - num1598++; + upwardsMovement3++; } } - float num1600 = (float)(num1598 * 16); - float num1601 = 170f; - if (num1600 < num1601) + float pixelUpAmt3 = (float)(upwardsMovement3 * 16); + if (pixelUpAmt3 < 170f) { - float num1602 = -4f; - if (-num1602 > num1600) + float velocityUpwards3 = -4f; + if (-velocityUpwards3 > pixelUpAmt3) { - num1602 = -num1600; + velocityUpwards3 = -pixelUpAmt3; } - NPC.velocity.Y = MathHelper.Lerp(NPC.velocity.Y, num1602, 0.05f); + NPC.velocity.Y = MathHelper.Lerp(NPC.velocity.Y, velocityUpwards3, 0.05f); } else { - NPC.velocity.Y = NPC.velocity.Y * num1595; + NPC.velocity.Y = NPC.velocity.Y * decelerationMult; } - NPC.velocity.X = NPC.velocity.X * num1595; + NPC.velocity.X = NPC.velocity.X * decelerationMult; } - if (num1580 == 4) + if (movementPattern == 4) { - Vector2 vector198 = player8.Center + new Vector2(0f, -250f) - center16; - if (vector198.Length() < 50f) + Vector2 targetingCenter4 = targetedPlayer.Center + new Vector2(0f, -250f) - shuttleCenter; + if (targetingCenter4.Length() < 50f) { NPC.ai[3] = 439f; return; } - vector198.Normalize(); - NPC.velocity = Vector2.Lerp(NPC.velocity, vector198 * 16f, 0.1f); + targetingCenter4.Normalize(); + NPC.velocity = Vector2.Lerp(NPC.velocity, targetingCenter4 * 16f, 0.1f); return; } - else if (num1580 == 5) + else if (movementPattern == 5) { NPC.velocity *= 0.85f; return; diff --git a/NPCs/NormalNPCs/Sunskater.cs b/NPCs/NormalNPCs/Sunskater.cs index 903f9e96ec..ffba1f6bff 100644 --- a/NPCs/NormalNPCs/Sunskater.cs +++ b/NPCs/NormalNPCs/Sunskater.cs @@ -85,13 +85,13 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.chaseable = hasBeenHit; if (!NPC.wet) { - bool flag14 = hasBeenHit; + bool canAttack = hasBeenHit; NPC.TargetClosest(false); - if ((Main.player[NPC.target].wet || Main.player[NPC.target].dead) && flag14) + if ((Main.player[NPC.target].wet || Main.player[NPC.target].dead) && canAttack) { - flag14 = false; + canAttack = false; } - if (!flag14) + if (!canAttack) { if (NPC.collideX) { @@ -116,7 +116,7 @@ namespace CalamityMod.NPCs.NormalNPCs } } } - if (flag14) + if (canAttack) { NPC.TargetClosest(true); NPC.velocity.X = NPC.velocity.X + (float)NPC.direction * 0.15f; @@ -148,15 +148,15 @@ namespace CalamityMod.NPCs.NormalNPCs } } } - int num258 = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; - int num259 = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; - if (Main.tile[num258, num259 - 1].LiquidAmount < 128) //problem? + int npcTileX = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; + int npcTileY = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; + if (Main.tile[npcTileX, npcTileY - 1].LiquidAmount < 128) //problem? { - if (Main.tile[num258, num259 + 1].HasTile) + if (Main.tile[npcTileX, npcTileY + 1].HasTile) { NPC.ai[0] = -1f; } - else if (Main.tile[num258, num259 + 2].HasTile) + else if (Main.tile[npcTileX, npcTileY + 2].HasTile) { NPC.ai[0] = -1f; } diff --git a/NPCs/NormalNPCs/WildBumblefuck.cs b/NPCs/NormalNPCs/WildBumblefuck.cs index 050c2b3c1c..0aff5466d9 100644 --- a/NPCs/NormalNPCs/WildBumblefuck.cs +++ b/NPCs/NormalNPCs/WildBumblefuck.cs @@ -122,30 +122,28 @@ namespace CalamityMod.NPCs.NormalNPCs spriteEffects = SpriteEffects.FlipHorizontally; Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 vector11 = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); - Color color36 = Color.Gold; - float amount9 = 0.5f; - int num153 = NPC.ai[0] == 2.1f ? 7 : 0; + Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[NPC.type].Value.Width / 2, TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2); + int afterimageAmt = NPC.ai[0] == 2.1f ? 7 : 0; if (CalamityConfig.Instance.Afterimages) { - for (int num155 = 1; num155 < num153; num155 += 2) + for (int i = 1; i < afterimageAmt; i += 2) { - Color color38 = drawColor; - color38 = Color.Lerp(color38, color36, amount9); - color38 = NPC.GetAlpha(color38); - color38 *= (num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - vector41 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; - vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + Color afterimageColor = drawColor; + afterimageColor = Color.Lerp(afterimageColor, Color.Gold, 0.5f); + afterimageColor = NPC.GetAlpha(afterimageColor); + afterimageColor *= (afterimageAmt - i) / 15f; + Vector2 afterimagePos = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; + afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - screenPos; - vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; - vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + Vector2 drawLocation = NPC.Center - screenPos; + drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[NPC.type]) * NPC.scale / 2f; + drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); return false; } diff --git a/NPCs/Other/THELORDE.cs b/NPCs/Other/THELORDE.cs index 8a0631d769..73744b4cd2 100644 --- a/NPCs/Other/THELORDE.cs +++ b/NPCs/Other/THELORDE.cs @@ -201,18 +201,17 @@ namespace CalamityMod.NPCs.Other { NPC.rotation += 5f; NPC.TargetClosest(true); - float num1372 = 69f; - Vector2 vector167 = new Vector2(NPC.Center.X + (float)(NPC.direction * 20), NPC.Center.Y + 6f); - float num1373 = playerLOL.position.X + (float)playerLOL.width * 0.5f - vector167.X; - float num1374 = playerLOL.Center.Y - vector167.Y; - float num1375 = (float)Math.Sqrt((double)(num1373 * num1373 + num1374 * num1374)); - float num1376 = num1372 / num1375; - num1373 *= num1376; - num1374 *= num1376; + Vector2 lordePosition = new Vector2(NPC.Center.X + (float)(NPC.direction * 20), NPC.Center.Y + 6f); + float targetXDist = playerLOL.position.X + (float)playerLOL.width * 0.5f - lordePosition.X; + float targetYDist = playerLOL.Center.Y - lordePosition.Y; + float targetDistance = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); + float velocityMult = 69f / targetDistance; + targetXDist *= velocityMult; + targetYDist *= velocityMult; NPC.ai[0] -= 1f; - if (num1375 < 50f || NPC.ai[0] > 0f) + if (targetDistance < 50f || NPC.ai[0] > 0f) { - if (num1375 < 50f) + if (targetDistance < 50f) { NPC.ai[0] = 20f; } @@ -226,17 +225,17 @@ namespace CalamityMod.NPCs.Other } return; } - NPC.velocity.X = (NPC.velocity.X * 50f + num1373) / 51f; - NPC.velocity.Y = (NPC.velocity.Y * 50f + num1374) / 51f; - if (num1375 < 150f) + NPC.velocity.X = (NPC.velocity.X * 50f + targetXDist) / 51f; + NPC.velocity.Y = (NPC.velocity.Y * 50f + targetYDist) / 51f; + if (targetDistance < 150f) { - NPC.velocity.X = (NPC.velocity.X * 10f + num1373) / 11f; - NPC.velocity.Y = (NPC.velocity.Y * 10f + num1374) / 11f; + NPC.velocity.X = (NPC.velocity.X * 10f + targetXDist) / 11f; + NPC.velocity.Y = (NPC.velocity.Y * 10f + targetYDist) / 11f; } - if (num1375 < 100f) + if (targetDistance < 100f) { - NPC.velocity.X = (NPC.velocity.X * 7f + num1373) / 8f; - NPC.velocity.Y = (NPC.velocity.Y * 7f + num1374) / 8f; + NPC.velocity.X = (NPC.velocity.X * 7f + targetXDist) / 8f; + NPC.velocity.Y = (NPC.velocity.Y * 7f + targetYDist) / 8f; } return; } From 722a460fb1bedaa684348f085d7adb67d2d179f9 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 2 Nov 2023 11:55:03 -0400 Subject: [PATCH 47/95] Plague, Primordial Wyrm, Sulphurous Sea --- NPCs/PlagueEnemies/PestilentSlime.cs | 36 +- NPCs/PlagueEnemies/PlagueCharger.cs | 52 ++- NPCs/PlagueEnemies/PlagueChargerLarge.cs | 52 ++- NPCs/PlagueEnemies/PlaguebringerMiniboss.cs | 405 ++++++++++---------- NPCs/PlagueEnemies/Viruling.cs | 76 ++-- NPCs/PrimordialWyrm/PrimordialWyrmHead.cs | 38 +- NPCs/SulphurousSea/Gnasher.cs | 30 +- NPCs/SulphurousSea/Sulflounder.cs | 6 +- NPCs/SulphurousSea/Trasher.cs | 52 +-- 9 files changed, 370 insertions(+), 377 deletions(-) diff --git a/NPCs/PlagueEnemies/PestilentSlime.cs b/NPCs/PlagueEnemies/PestilentSlime.cs index e89ce9e9f1..14511f8d49 100644 --- a/NPCs/PlagueEnemies/PestilentSlime.cs +++ b/NPCs/PlagueEnemies/PestilentSlime.cs @@ -65,11 +65,11 @@ namespace CalamityMod.NPCs.PlagueEnemies } if (!NPC.wet && !Main.player[NPC.target].npcTypeNoAggro[NPC.type]) { - Vector2 vector3 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num14 = Main.player[NPC.target].position.X + (float)Main.player[NPC.target].width * 0.5f - vector3.X; - float num15 = Main.player[NPC.target].position.Y - vector3.Y; - float num16 = (float)Math.Sqrt((double)(num14 * num14 + num15 * num15)); - if (Main.expertMode && num16 < 120f && Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height) && NPC.velocity.Y == 0f) + Vector2 slimePosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float targetXDist = Main.player[NPC.target].position.X + (float)Main.player[NPC.target].width * 0.5f - slimePosition.X; + float targetYDist = Main.player[NPC.target].position.Y - slimePosition.Y; + float targetDistance = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); + if (Main.expertMode && targetDistance < 120f && Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height) && NPC.velocity.Y == 0f) { NPC.ai[0] = -40f; if (NPC.velocity.Y == 0f) @@ -81,17 +81,17 @@ namespace CalamityMod.NPCs.PlagueEnemies SoundEngine.PlaySound(SoundID.Item42, NPC.Center); for (int n = 0; n < 5; n++) { - Vector2 vector4 = new Vector2((float)(n - 2), -4f); - vector4.X *= 1f + (float)Main.rand.Next(-50, 51) * 0.005f; - vector4.Y *= 1f + (float)Main.rand.Next(-50, 51) * 0.005f; - vector4.Normalize(); - vector4 *= 4f + (float)Main.rand.Next(-50, 51) * 0.01f; - Projectile.NewProjectile(NPC.GetSource_FromAI(), vector3.X, vector3.Y, vector4.X, vector4.Y, ModContent.ProjectileType(), 25, 0f, Main.myPlayer, 0f, 0f); + Vector2 spikeVelocity = new Vector2((float)(n - 2), -4f); + spikeVelocity.X *= 1f + (float)Main.rand.Next(-50, 51) * 0.005f; + spikeVelocity.Y *= 1f + (float)Main.rand.Next(-50, 51) * 0.005f; + spikeVelocity.Normalize(); + spikeVelocity *= 4f + (float)Main.rand.Next(-50, 51) * 0.01f; + Projectile.NewProjectile(NPC.GetSource_FromAI(), slimePosition.X, slimePosition.Y, spikeVelocity.X, spikeVelocity.Y, ModContent.ProjectileType(), 25, 0f, Main.myPlayer, 0f, 0f); spikeTimer = 30f; } } } - else if (num16 < 360f && Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height) && NPC.velocity.Y == 0f) + else if (targetDistance < 360f && Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height) && NPC.velocity.Y == 0f) { NPC.ai[0] = -40f; if (NPC.velocity.Y == 0f) @@ -101,13 +101,13 @@ namespace CalamityMod.NPCs.PlagueEnemies if (Main.netMode != NetmodeID.MultiplayerClient && spikeTimer == 0f) { SoundEngine.PlaySound(SoundID.Item42, NPC.Center); - num15 = Main.player[NPC.target].position.Y - vector3.Y - (float)Main.rand.Next(0, 200); - num16 = (float)Math.Sqrt((double)(num14 * num14 + num15 * num15)); - num16 = 6.5f / num16; - num14 *= num16; - num15 *= num16; + targetYDist = Main.player[NPC.target].position.Y - slimePosition.Y - (float)Main.rand.Next(0, 200); + targetDistance = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); + targetDistance = 6.5f / targetDistance; + targetXDist *= targetDistance; + targetYDist *= targetDistance; spikeTimer = 50f; - Projectile.NewProjectile(NPC.GetSource_FromAI(), vector3.X, vector3.Y, num14, num15, ModContent.ProjectileType(), 22, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(NPC.GetSource_FromAI(), slimePosition.X, slimePosition.Y, targetXDist, targetYDist, ModContent.ProjectileType(), 22, 0f, Main.myPlayer, 0f, 0f); } } } diff --git a/NPCs/PlagueEnemies/PlagueCharger.cs b/NPCs/PlagueEnemies/PlagueCharger.cs index 26bf2995b8..53b533f68b 100644 --- a/NPCs/PlagueEnemies/PlagueCharger.cs +++ b/NPCs/PlagueEnemies/PlagueCharger.cs @@ -63,49 +63,47 @@ namespace CalamityMod.NPCs.PlagueEnemies spriteEffects = SpriteEffects.FlipHorizontally; Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); - Color color36 = Color.White; - float amount9 = 0.5f; - int num153 = 5; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + int afterimageAmt = 5; if (CalamityConfig.Instance.Afterimages) { - for (int num155 = 1; num155 < num153; num155 += 2) + for (int i = 1; i < afterimageAmt; i += 2) { - Color color38 = drawColor; - color38 = Color.Lerp(color38, color36, amount9); - color38 = NPC.GetAlpha(color38); - color38 *= (float)(num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; - vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + Color afterimageColor = drawColor; + afterimageColor = Color.Lerp(afterimageColor, Color.White, 0.5f); + afterimageColor = NPC.GetAlpha(afterimageColor); + afterimageColor *= (float)(afterimageAmt - i) / 15f; + Vector2 afterimagePos = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; + afterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - screenPos; - vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; - vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + Vector2 drawLocation = NPC.Center - screenPos; + drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/PlagueEnemies/PlagueChargerGlow").Value; - Color color37 = Color.Lerp(Color.White, Color.Red, 0.5f); + Color redEyeColor = Color.Lerp(Color.White, Color.Red, 0.5f); if (CalamityConfig.Instance.Afterimages) { - for (int num163 = 1; num163 < num153; num163++) + for (int j = 1; j < afterimageAmt; j++) { - Color color41 = color37; - color41 = Color.Lerp(color41, color36, amount9); - color41 *= (float)(num153 - num163) / 15f; - Vector2 vector44 = NPC.oldPos[num163] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; - vector44 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector44, NPC.frame, color41, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + Color redEyeAfterimageColor = redEyeColor; + redEyeAfterimageColor = Color.Lerp(redEyeAfterimageColor, Color.White, 0.5f); + redEyeAfterimageColor *= (float)(afterimageAmt - j) / 15f; + Vector2 redEyeAfterimagePos = NPC.oldPos[j] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; + redEyeAfterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + redEyeAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture2D15, redEyeAfterimagePos, NPC.frame, redEyeAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } - spriteBatch.Draw(texture2D15, vector43, NPC.frame, color37, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, redEyeColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); return false; } diff --git a/NPCs/PlagueEnemies/PlagueChargerLarge.cs b/NPCs/PlagueEnemies/PlagueChargerLarge.cs index 30d10b4956..e8342aa68f 100644 --- a/NPCs/PlagueEnemies/PlagueChargerLarge.cs +++ b/NPCs/PlagueEnemies/PlagueChargerLarge.cs @@ -65,49 +65,47 @@ namespace CalamityMod.NPCs.PlagueEnemies spriteEffects = SpriteEffects.FlipHorizontally; Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); - Color color36 = Color.White; - float amount9 = 0.5f; - int num153 = 5; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + int afterimageAmt = 5; if (CalamityConfig.Instance.Afterimages) { - for (int num155 = 1; num155 < num153; num155 += 2) + for (int i = 1; i < afterimageAmt; i += 2) { - Color color38 = drawColor; - color38 = Color.Lerp(color38, color36, amount9); - color38 = NPC.GetAlpha(color38); - color38 *= (float)(num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; - vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + Color afterimageColor = drawColor; + afterimageColor = Color.Lerp(afterimageColor, Color.White, 0.5f); + afterimageColor = NPC.GetAlpha(afterimageColor); + afterimageColor *= (float)(afterimageAmt - i) / 15f; + Vector2 afterimagePos = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; + afterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - screenPos; - vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; - vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + Vector2 drawLocation = NPC.Center - screenPos; + drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); texture2D15 = ModContent.Request("CalamityMod/NPCs/PlagueEnemies/PlagueChargerGlow").Value; - Color color37 = Color.Lerp(Color.White, Color.Red, 0.5f); + Color redEyeColor = Color.Lerp(Color.White, Color.Red, 0.5f); if (CalamityConfig.Instance.Afterimages) { - for (int num163 = 1; num163 < num153; num163++) + for (int j = 1; j < afterimageAmt; j++) { - Color color41 = color37; - color41 = Color.Lerp(color41, color36, amount9); - color41 *= (float)(num153 - num163) / 15f; - Vector2 vector44 = NPC.oldPos[num163] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - vector44 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; - vector44 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector44, NPC.frame, color41, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + Color redEyeAfterimageColor = redEyeColor; + redEyeAfterimageColor = Color.Lerp(redEyeAfterimageColor, Color.White, 0.5f); + redEyeAfterimageColor *= (float)(afterimageAmt - j) / 15f; + Vector2 redEyeAfterimagePos = NPC.oldPos[j] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; + redEyeAfterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + redEyeAfterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture2D15, redEyeAfterimagePos, NPC.frame, redEyeAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } - spriteBatch.Draw(texture2D15, vector43, NPC.frame, color37, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, redEyeColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); return false; } diff --git a/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs b/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs index e67a0c15b1..78e7b7d9d7 100644 --- a/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs +++ b/NPCs/PlagueEnemies/PlaguebringerMiniboss.cs @@ -76,10 +76,10 @@ namespace CalamityMod.NPCs.PlagueEnemies public override void AI() { Lighting.AddLight((int)((NPC.position.X + (float)(NPC.width / 2)) / 16f), (int)((NPC.position.Y + (float)(NPC.height / 2)) / 16f), 0.1f, 0.3f, 0f); - bool flag113 = false; + bool outsideJungle = false; if (!Main.player[NPC.target].ZoneJungle) { - flag113 = true; + outsideJungle = true; if (NPC.timeLeft > 150) { NPC.timeLeft = 150; @@ -92,12 +92,12 @@ namespace CalamityMod.NPCs.PlagueEnemies NPC.timeLeft = 750; } } - int num1038 = 0; - for (int num1039 = 0; num1039 < 255; num1039++) + int playerAmt = 0; + for (int i = 0; i < 255; i++) { - if (Main.player[num1039].active && !Main.player[num1039].dead && (NPC.Center - Main.player[num1039].Center).Length() < 1000f) + if (Main.player[i].active && !Main.player[i].dead && (NPC.Center - Main.player[i].Center).Length() < 1000f) { - num1038++; + playerAmt++; } } if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) @@ -129,22 +129,22 @@ namespace CalamityMod.NPCs.PlagueEnemies { if (Main.netMode != NetmodeID.MultiplayerClient) { - float num1041 = NPC.ai[1]; - int num1042; + float currentAttack = NPC.ai[1]; + int nextAttack; do { - num1042 = Main.rand.Next(3); - if (num1042 == 1) + nextAttack = Main.rand.Next(3); + if (nextAttack == 1) { - num1042 = 2; + nextAttack = 2; } - else if (num1042 == 2) + else if (nextAttack == 2) { - num1042 = 3; + nextAttack = 3; } } - while ((float)num1042 == num1041); - NPC.ai[0] = (float)num1042; + while ((float)nextAttack == currentAttack); + NPC.ai[0] = (float)nextAttack; NPC.ai[1] = 0f; NPC.ai[2] = 0f; return; @@ -152,12 +152,12 @@ namespace CalamityMod.NPCs.PlagueEnemies } else if (NPC.ai[0] == 0f) { - int num1043 = 2; //2 - if (flag113) + int chargeDelay = 2; //2 + if (outsideJungle) { - num1043 += 1; + chargeDelay += 1; } - if (NPC.ai[1] > (float)(2 * num1043) && NPC.ai[1] % 2f == 0f) + if (NPC.ai[1] > (float)(2 * chargeDelay) && NPC.ai[1] % 2f == 0f) { NPC.ai[0] = -1f; NPC.ai[1] = 0f; @@ -173,45 +173,45 @@ namespace CalamityMod.NPCs.PlagueEnemies NPC.localAI[0] = 1f; NPC.ai[1] += 1f; NPC.ai[2] = 0f; - float num1044 = 15f; - if (flag113) + float chargeSpeed = 15f; + if (outsideJungle) { - num1044 += 2f; + chargeSpeed += 2f; } - Vector2 vector117 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num1045 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2) - vector117.X; - float num1046 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2) - vector117.Y; - float num1047 = (float)Math.Sqrt((double)(num1045 * num1045 + num1046 * num1046)); - num1047 = num1044 / num1047; - NPC.velocity.X = num1045 * num1047; - NPC.velocity.Y = num1046 * num1047; + Vector2 chargeBeePos = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float chargeTargetX = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2) - chargeBeePos.X; + float chargeTargetY = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2) - chargeBeePos.Y; + float chargeTargetDist = (float)Math.Sqrt((double)(chargeTargetX * chargeTargetX + chargeTargetY * chargeTargetY)); + chargeTargetDist = chargeSpeed / chargeTargetDist; + NPC.velocity.X = chargeTargetX * chargeTargetDist; + NPC.velocity.Y = chargeTargetY * chargeTargetDist; NPC.spriteDirection = NPC.direction; SoundEngine.PlaySound(SoundID.Roar, NPC.Center); return; } NPC.localAI[0] = 0f; - float num1048 = 12.25f; - float num1049 = 0.155f; - if (flag113) + float lineUpSpeed = 12.25f; + float lineUpAcceleration = 0.155f; + if (outsideJungle) { - num1048 += 1f; - num1049 += 0.075f; + lineUpSpeed += 1f; + lineUpAcceleration += 0.075f; } if (NPC.position.Y + (float)(NPC.height / 2) < Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2)) { - NPC.velocity.Y = NPC.velocity.Y + num1049; + NPC.velocity.Y = NPC.velocity.Y + lineUpAcceleration; } else { - NPC.velocity.Y = NPC.velocity.Y - num1049; + NPC.velocity.Y = NPC.velocity.Y - lineUpAcceleration; } if (NPC.velocity.Y < -12f) { - NPC.velocity.Y = -num1048; + NPC.velocity.Y = -lineUpSpeed; } if (NPC.velocity.Y > 12f) { - NPC.velocity.Y = num1048; + NPC.velocity.Y = lineUpSpeed; } if (Math.Abs(NPC.position.X + (float)(NPC.width / 2) - (Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2))) > 600f) { @@ -246,13 +246,12 @@ namespace CalamityMod.NPCs.PlagueEnemies NPC.direction = 1; } NPC.spriteDirection = NPC.direction; - int num1050 = 500; - int num1051 = 1; + int chargeDirection = 1; if (NPC.position.X + (float)(NPC.width / 2) < Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2)) { - num1051 = -1; + chargeDirection = -1; } - if (NPC.direction == num1051 && Math.Abs(NPC.position.X + (float)(NPC.width / 2) - (Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2))) > (float)num1050) + if (NPC.direction == chargeDirection && Math.Abs(NPC.position.X + (float)(NPC.width / 2) - (Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2))) > 500f) { NPC.ai[2] = 1f; } @@ -265,13 +264,13 @@ namespace CalamityMod.NPCs.PlagueEnemies NPC.spriteDirection = NPC.direction; NPC.localAI[0] = 0f; NPC.velocity *= 0.9f; - float num1052 = 0.105f; - if (flag113) + float chargeDeceleration = 0.105f; + if (outsideJungle) { NPC.velocity *= 0.9f; - num1052 += 0.075f; + chargeDeceleration += 0.075f; } - if (Math.Abs(NPC.velocity.X) + Math.Abs(NPC.velocity.Y) < num1052) + if (Math.Abs(NPC.velocity.X) + Math.Abs(NPC.velocity.Y) < chargeDeceleration) { NPC.ai[2] = 0f; NPC.ai[1] += 1f; @@ -282,54 +281,54 @@ namespace CalamityMod.NPCs.PlagueEnemies { NPC.TargetClosest(true); NPC.spriteDirection = NPC.direction; - float num1053 = 12f; - float num1054 = 0.1f; - if (flag113) + float hoverForBeesSpeed = 12f; + float hoverForBeesAccel = 0.1f; + if (outsideJungle) { - num1054 = 0.12f; + hoverForBeesAccel = 0.12f; } - Vector2 vector118 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num1055 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2) - vector118.X; - float num1056 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2) - 200f - vector118.Y; - float num1057 = (float)Math.Sqrt((double)(num1055 * num1055 + num1056 * num1056)); - if (num1057 < 400f) + Vector2 hoverForBeesPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float hoverForBeesTargetX = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2) - hoverForBeesPosition.X; + float hoverForBeesTargetY = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2) - 200f - hoverForBeesPosition.Y; + float hoverForBeesTargetDist = (float)Math.Sqrt((double)(hoverForBeesTargetX * hoverForBeesTargetX + hoverForBeesTargetY * hoverForBeesTargetY)); + if (hoverForBeesTargetDist < 400f) { NPC.ai[0] = 1f; NPC.ai[1] = 0f; NPC.netUpdate = true; return; } - num1057 = num1053 / num1057; - if (NPC.velocity.X < num1055) + hoverForBeesTargetDist = hoverForBeesSpeed / hoverForBeesTargetDist; + if (NPC.velocity.X < hoverForBeesTargetX) { - NPC.velocity.X = NPC.velocity.X + num1054; - if (NPC.velocity.X < 0f && num1055 > 0f) + NPC.velocity.X = NPC.velocity.X + hoverForBeesAccel; + if (NPC.velocity.X < 0f && hoverForBeesTargetX > 0f) { - NPC.velocity.X = NPC.velocity.X + num1054; + NPC.velocity.X = NPC.velocity.X + hoverForBeesAccel; } } - else if (NPC.velocity.X > num1055) + else if (NPC.velocity.X > hoverForBeesTargetX) { - NPC.velocity.X = NPC.velocity.X - num1054; - if (NPC.velocity.X > 0f && num1055 < 0f) + NPC.velocity.X = NPC.velocity.X - hoverForBeesAccel; + if (NPC.velocity.X > 0f && hoverForBeesTargetX < 0f) { - NPC.velocity.X = NPC.velocity.X - num1054; + NPC.velocity.X = NPC.velocity.X - hoverForBeesAccel; } } - if (NPC.velocity.Y < num1056) + if (NPC.velocity.Y < hoverForBeesTargetY) { - NPC.velocity.Y = NPC.velocity.Y + num1054; - if (NPC.velocity.Y < 0f && num1056 > 0f) + NPC.velocity.Y = NPC.velocity.Y + hoverForBeesAccel; + if (NPC.velocity.Y < 0f && hoverForBeesTargetY > 0f) { - NPC.velocity.Y = NPC.velocity.Y + num1054; + NPC.velocity.Y = NPC.velocity.Y + hoverForBeesAccel; } } - else if (NPC.velocity.Y > num1056) + else if (NPC.velocity.Y > hoverForBeesTargetY) { - NPC.velocity.Y = NPC.velocity.Y - num1054; - if (NPC.velocity.Y > 0f && num1056 < 0f) + NPC.velocity.Y = NPC.velocity.Y - hoverForBeesAccel; + if (NPC.velocity.Y > 0f && hoverForBeesTargetY < 0f) { - NPC.velocity.Y = NPC.velocity.Y - num1054; + NPC.velocity.Y = NPC.velocity.Y - hoverForBeesAccel; } } } @@ -337,83 +336,83 @@ namespace CalamityMod.NPCs.PlagueEnemies { NPC.localAI[0] = 0f; NPC.TargetClosest(true); - Vector2 vector119 = new Vector2(NPC.position.X + (float)(NPC.width / 2) + (float)(40 * NPC.direction), NPC.position.Y + (float)NPC.height * 0.8f); - Vector2 vector120 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num1058 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2) - vector120.X; - float num1059 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2) - vector120.Y; - float num1060 = (float)Math.Sqrt((double)(num1058 * num1058 + num1059 * num1059)); + Vector2 beeSpawnPosition = new Vector2(NPC.position.X + (float)(NPC.width / 2) + (float)(40 * NPC.direction), NPC.position.Y + (float)NPC.height * 0.8f); + Vector2 plaguebringerBeeSpawnPos = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float beeSpawnTargetX = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2) - plaguebringerBeeSpawnPos.X; + float beeSpawnTargetY = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2) - plaguebringerBeeSpawnPos.Y; + float beeSpawnTargetDist = (float)Math.Sqrt((double)(beeSpawnTargetX * beeSpawnTargetX + beeSpawnTargetY * beeSpawnTargetY)); NPC.ai[1] += 1f; - NPC.ai[1] += (float)(num1038 / 2); - bool flag103 = false; + NPC.ai[1] += (float)(playerAmt / 2); + bool canSpawnBee = false; if (NPC.ai[1] > 10f) { NPC.ai[1] = 0f; NPC.ai[2] += 1f; - flag103 = true; + canSpawnBee = true; } - if (Collision.CanHit(vector119, 1, 1, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height) && flag103) + if (Collision.CanHit(beeSpawnPosition, 1, 1, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height) && canSpawnBee) { SoundEngine.PlaySound(SoundID.NPCHit8, NPC.Center); if (Main.netMode != NetmodeID.MultiplayerClient) { - int num1061; + int beeType; if (Main.rand.NextBool(4)) { - num1061 = ModContent.NPCType(); + beeType = ModContent.NPCType(); } else { - num1061 = ModContent.NPCType(); + beeType = ModContent.NPCType(); } if (NPC.CountNPCS(ModContent.NPCType()) < 3) { - int num1062 = NPC.NewNPC(NPC.GetSource_FromAI(), (int)vector119.X, (int)vector119.Y, num1061, 0, 0f, 0f, 0f, 0f, 255); - Main.npc[num1062].velocity.X = (float)Main.rand.Next(-200, 201) * 0.005f; - Main.npc[num1062].velocity.Y = (float)Main.rand.Next(-200, 201) * 0.005f; - Main.npc[num1062].localAI[0] = 60f; - Main.npc[num1062].netUpdate = true; + int notTheBees = NPC.NewNPC(NPC.GetSource_FromAI(), (int)beeSpawnPosition.X, (int)beeSpawnPosition.Y, beeType, 0, 0f, 0f, 0f, 0f, 255); + Main.npc[notTheBees].velocity.X = (float)Main.rand.Next(-200, 201) * 0.005f; + Main.npc[notTheBees].velocity.Y = (float)Main.rand.Next(-200, 201) * 0.005f; + Main.npc[notTheBees].localAI[0] = 60f; + Main.npc[notTheBees].netUpdate = true; } } } - if (num1060 > 400f || !Collision.CanHit(new Vector2(vector119.X, vector119.Y - 30f), 1, 1, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height)) + if (beeSpawnTargetDist > 400f || !Collision.CanHit(new Vector2(beeSpawnPosition.X, beeSpawnPosition.Y - 30f), 1, 1, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height)) { - float num1063 = 14.5f; - float num1064 = 0.105f; - vector120 = vector119; - num1058 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2) - vector120.X; - num1059 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2) - vector120.Y; - num1060 = (float)Math.Sqrt((double)(num1058 * num1058 + num1059 * num1059)); - num1060 = num1063 / num1060; - if (NPC.velocity.X < num1058) + float beeSpawnSpeed = 14.5f; + float beeSpawnAcceleration = 0.105f; + plaguebringerBeeSpawnPos = beeSpawnPosition; + beeSpawnTargetX = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2) - plaguebringerBeeSpawnPos.X; + beeSpawnTargetY = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2) - plaguebringerBeeSpawnPos.Y; + beeSpawnTargetDist = (float)Math.Sqrt((double)(beeSpawnTargetX * beeSpawnTargetX + beeSpawnTargetY * beeSpawnTargetY)); + beeSpawnTargetDist = beeSpawnSpeed / beeSpawnTargetDist; + if (NPC.velocity.X < beeSpawnTargetX) { - NPC.velocity.X = NPC.velocity.X + num1064; - if (NPC.velocity.X < 0f && num1058 > 0f) + NPC.velocity.X = NPC.velocity.X + beeSpawnAcceleration; + if (NPC.velocity.X < 0f && beeSpawnTargetX > 0f) { - NPC.velocity.X = NPC.velocity.X + num1064; + NPC.velocity.X = NPC.velocity.X + beeSpawnAcceleration; } } - else if (NPC.velocity.X > num1058) + else if (NPC.velocity.X > beeSpawnTargetX) { - NPC.velocity.X = NPC.velocity.X - num1064; - if (NPC.velocity.X > 0f && num1058 < 0f) + NPC.velocity.X = NPC.velocity.X - beeSpawnAcceleration; + if (NPC.velocity.X > 0f && beeSpawnTargetX < 0f) { - NPC.velocity.X = NPC.velocity.X - num1064; + NPC.velocity.X = NPC.velocity.X - beeSpawnAcceleration; } } - if (NPC.velocity.Y < num1059) + if (NPC.velocity.Y < beeSpawnTargetY) { - NPC.velocity.Y = NPC.velocity.Y + num1064; - if (NPC.velocity.Y < 0f && num1059 > 0f) + NPC.velocity.Y = NPC.velocity.Y + beeSpawnAcceleration; + if (NPC.velocity.Y < 0f && beeSpawnTargetY > 0f) { - NPC.velocity.Y = NPC.velocity.Y + num1064; + NPC.velocity.Y = NPC.velocity.Y + beeSpawnAcceleration; } } - else if (NPC.velocity.Y > num1059) + else if (NPC.velocity.Y > beeSpawnTargetY) { - NPC.velocity.Y = NPC.velocity.Y - num1064; - if (NPC.velocity.Y > 0f && num1059 < 0f) + NPC.velocity.Y = NPC.velocity.Y - beeSpawnAcceleration; + if (NPC.velocity.Y > 0f && beeSpawnTargetY < 0f) { - NPC.velocity.Y = NPC.velocity.Y - num1064; + NPC.velocity.Y = NPC.velocity.Y - beeSpawnAcceleration; } } } @@ -431,123 +430,123 @@ namespace CalamityMod.NPCs.PlagueEnemies } else if (NPC.ai[0] == 3f) { - float num1065 = 7f; - float num1066 = 0.075f; - if (flag113) + float stingerAttackSpeed = 7f; + float stingerAttackAccel = 0.075f; + if (outsideJungle) { - num1066 = 0.09f; - num1065 = 8f; + stingerAttackAccel = 0.09f; + stingerAttackSpeed = 8f; } - Vector2 vector121 = new Vector2(NPC.position.X + (float)(NPC.width / 2) + (float)(40 * NPC.direction), NPC.position.Y + (float)NPC.height * 0.8f); - Vector2 vector122 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num1067 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2) - vector122.X; - float num1068 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2) - 300f - vector122.Y; - float num1069 = (float)Math.Sqrt((double)(num1067 * num1067 + num1068 * num1068)); + Vector2 stingerSpawnPos = new Vector2(NPC.position.X + (float)(NPC.width / 2) + (float)(40 * NPC.direction), NPC.position.Y + (float)NPC.height * 0.8f); + Vector2 stingerAttackPos = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float stingerAttackTargetX = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2) - stingerAttackPos.X; + float stingerAttackTargetY = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2) - 300f - stingerAttackPos.Y; + float stingerAttackTargetDist = (float)Math.Sqrt((double)(stingerAttackTargetX * stingerAttackTargetX + stingerAttackTargetY * stingerAttackTargetY)); NPC.ai[1] += 1f; - bool flag104 = false; + bool canFireStinger = false; if (NPC.ai[1] % 35f == 34f) { - flag104 = true; + canFireStinger = true; } - if (flag104 && NPC.position.Y + (float)NPC.height < Main.player[NPC.target].position.Y && Collision.CanHit(vector121, 1, 1, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height)) + if (canFireStinger && NPC.position.Y + (float)NPC.height < Main.player[NPC.target].position.Y && Collision.CanHit(stingerSpawnPos, 1, 1, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height)) { SoundEngine.PlaySound(SoundID.Item42, NPC.Center); if (Main.netMode != NetmodeID.MultiplayerClient) { - float num1070 = 6f; - if (flag113) + float stingerSpeed = 6f; + if (outsideJungle) { - num1070 += 2f; + stingerSpeed += 2f; } - float num1071 = Main.player[NPC.target].position.X + (float)Main.player[NPC.target].width * 0.5f - vector121.X; - float num1072 = Main.player[NPC.target].position.Y + (float)Main.player[NPC.target].height * 0.5f - vector121.Y; - float num1073 = (float)Math.Sqrt((double)(num1071 * num1071 + num1072 * num1072)); - num1073 = num1070 / num1073; - num1071 *= num1073; - num1072 *= num1073; + float stingerTargetX = Main.player[NPC.target].position.X + (float)Main.player[NPC.target].width * 0.5f - stingerSpawnPos.X; + float stingerTargetY = Main.player[NPC.target].position.Y + (float)Main.player[NPC.target].height * 0.5f - stingerSpawnPos.Y; + float stingerTargetDist = (float)Math.Sqrt((double)(stingerTargetX * stingerTargetX + stingerTargetY * stingerTargetY)); + stingerTargetDist = stingerSpeed / stingerTargetDist; + stingerTargetX *= stingerTargetDist; + stingerTargetY *= stingerTargetDist; bool fireRocket = Main.rand.NextBool(15); int type = fireRocket ? ModContent.ProjectileType() : ModContent.ProjectileType(); int damage = fireRocket ? 72 : 52; if (Main.expertMode) damage = fireRocket ? 50 : 35; - Projectile.NewProjectile(NPC.GetSource_FromAI(), vector121.X, vector121.Y, num1071, num1072, type, damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(NPC.GetSource_FromAI(), stingerSpawnPos.X, stingerSpawnPos.Y, stingerTargetX, stingerTargetY, type, damage, 0f, Main.myPlayer, 0f, 0f); } } - if (!Collision.CanHit(new Vector2(vector121.X, vector121.Y - 30f), 1, 1, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height)) + if (!Collision.CanHit(new Vector2(stingerSpawnPos.X, stingerSpawnPos.Y - 30f), 1, 1, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height)) { - num1066 = 0.105f; - vector122 = vector121; - num1067 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2) - vector122.X; - num1068 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2) - vector122.Y; - if (NPC.velocity.X < num1067) + stingerAttackAccel = 0.105f; + stingerAttackPos = stingerSpawnPos; + stingerAttackTargetX = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2) - stingerAttackPos.X; + stingerAttackTargetY = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2) - stingerAttackPos.Y; + if (NPC.velocity.X < stingerAttackTargetX) { - NPC.velocity.X = NPC.velocity.X + num1066; - if (NPC.velocity.X < 0f && num1067 > 0f) + NPC.velocity.X = NPC.velocity.X + stingerAttackAccel; + if (NPC.velocity.X < 0f && stingerAttackTargetX > 0f) { - NPC.velocity.X = NPC.velocity.X + num1066; + NPC.velocity.X = NPC.velocity.X + stingerAttackAccel; } } - else if (NPC.velocity.X > num1067) + else if (NPC.velocity.X > stingerAttackTargetX) { - NPC.velocity.X = NPC.velocity.X - num1066; - if (NPC.velocity.X > 0f && num1067 < 0f) + NPC.velocity.X = NPC.velocity.X - stingerAttackAccel; + if (NPC.velocity.X > 0f && stingerAttackTargetX < 0f) { - NPC.velocity.X = NPC.velocity.X - num1066; + NPC.velocity.X = NPC.velocity.X - stingerAttackAccel; } } - if (NPC.velocity.Y < num1068) + if (NPC.velocity.Y < stingerAttackTargetY) { - NPC.velocity.Y = NPC.velocity.Y + num1066; - if (NPC.velocity.Y < 0f && num1068 > 0f) + NPC.velocity.Y = NPC.velocity.Y + stingerAttackAccel; + if (NPC.velocity.Y < 0f && stingerAttackTargetY > 0f) { - NPC.velocity.Y = NPC.velocity.Y + num1066; + NPC.velocity.Y = NPC.velocity.Y + stingerAttackAccel; } } - else if (NPC.velocity.Y > num1068) + else if (NPC.velocity.Y > stingerAttackTargetY) { - NPC.velocity.Y = NPC.velocity.Y - num1066; - if (NPC.velocity.Y > 0f && num1068 < 0f) + NPC.velocity.Y = NPC.velocity.Y - stingerAttackAccel; + if (NPC.velocity.Y > 0f && stingerAttackTargetY < 0f) { - NPC.velocity.Y = NPC.velocity.Y - num1066; + NPC.velocity.Y = NPC.velocity.Y - stingerAttackAccel; } } } - else if (num1069 > 100f) + else if (stingerAttackTargetDist > 100f) { NPC.TargetClosest(true); NPC.spriteDirection = NPC.direction; - num1069 = num1065 / num1069; - if (NPC.velocity.X < num1067) + stingerAttackTargetDist = stingerAttackSpeed / stingerAttackTargetDist; + if (NPC.velocity.X < stingerAttackTargetX) { - NPC.velocity.X = NPC.velocity.X + num1066; - if (NPC.velocity.X < 0f && num1067 > 0f) + NPC.velocity.X = NPC.velocity.X + stingerAttackAccel; + if (NPC.velocity.X < 0f && stingerAttackTargetX > 0f) { - NPC.velocity.X = NPC.velocity.X + num1066 * 2f; + NPC.velocity.X = NPC.velocity.X + stingerAttackAccel * 2f; } } - else if (NPC.velocity.X > num1067) + else if (NPC.velocity.X > stingerAttackTargetX) { - NPC.velocity.X = NPC.velocity.X - num1066; - if (NPC.velocity.X > 0f && num1067 < 0f) + NPC.velocity.X = NPC.velocity.X - stingerAttackAccel; + if (NPC.velocity.X > 0f && stingerAttackTargetX < 0f) { - NPC.velocity.X = NPC.velocity.X - num1066 * 2f; + NPC.velocity.X = NPC.velocity.X - stingerAttackAccel * 2f; } } - if (NPC.velocity.Y < num1068) + if (NPC.velocity.Y < stingerAttackTargetY) { - NPC.velocity.Y = NPC.velocity.Y + num1066; - if (NPC.velocity.Y < 0f && num1068 > 0f) + NPC.velocity.Y = NPC.velocity.Y + stingerAttackAccel; + if (NPC.velocity.Y < 0f && stingerAttackTargetY > 0f) { - NPC.velocity.Y = NPC.velocity.Y + num1066 * 2f; + NPC.velocity.Y = NPC.velocity.Y + stingerAttackAccel * 2f; } } - else if (NPC.velocity.Y > num1068) + else if (NPC.velocity.Y > stingerAttackTargetY) { - NPC.velocity.Y = NPC.velocity.Y - num1066; - if (NPC.velocity.Y > 0f && num1068 < 0f) + NPC.velocity.Y = NPC.velocity.Y - stingerAttackAccel; + if (NPC.velocity.Y > 0f && stingerAttackTargetY < 0f) { - NPC.velocity.Y = NPC.velocity.Y - num1066 * 2f; + NPC.velocity.Y = NPC.velocity.Y - stingerAttackAccel * 2f; } } } @@ -572,32 +571,30 @@ namespace CalamityMod.NPCs.PlagueEnemies spriteEffects = SpriteEffects.FlipHorizontally; Texture2D texture2D15 = TextureAssets.Npc[NPC.type].Value; - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); - Color color36 = Color.White; - float amount9 = 0.5f; - int num153 = 7; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + int afterimageAmt = 7; if (NPC.ai[0] != 0f) - num153 = 5; + afterimageAmt = 5; if (CalamityConfig.Instance.Afterimages) { - for (int num155 = 1; num155 < num153; num155 += 2) + for (int i = 1; i < afterimageAmt; i += 2) { - Color color38 = drawColor; - color38 = Color.Lerp(color38, color36, amount9); - color38 = NPC.GetAlpha(color38); - color38 *= (float)(num153 - num155) / 15f; - Vector2 vector41 = NPC.oldPos[num155] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; - vector41 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector41, NPC.frame, color38, NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + Color afterimageColor = drawColor; + afterimageColor = Color.Lerp(afterimageColor, Color.White, 0.5f); + afterimageColor = NPC.GetAlpha(afterimageColor); + afterimageColor *= (float)(afterimageAmt - i) / 15f; + Vector2 afterimagePos = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; + afterimagePos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); } } - Vector2 vector43 = NPC.Center - screenPos; - vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; - vector43 += vector11 * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, vector11, NPC.scale, spriteEffects, 0f); + Vector2 drawLocation = NPC.Center - screenPos; + drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[NPC.type])) * NPC.scale / 2f; + drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); return false; } @@ -628,23 +625,23 @@ namespace CalamityMod.NPCs.PlagueEnemies NPC.height = 100; NPC.position.X = NPC.position.X - (float)(NPC.width / 2); NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); - for (int num621 = 0; num621 < 40; num621++) + for (int i = 0; i < 40; i++) { - int num622 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 2f); - Main.dust[num622].velocity *= 3f; + int plagueDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 2f); + Main.dust[plagueDust].velocity *= 3f; if (Main.rand.NextBool()) { - Main.dust[num622].scale = 0.5f; - Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + Main.dust[plagueDust].scale = 0.5f; + Main.dust[plagueDust].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; } } - for (int num623 = 0; num623 < 70; num623++) + for (int j = 0; j < 70; j++) { - int num624 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 3f); - Main.dust[num624].noGravity = true; - Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 2f); - Main.dust[num624].velocity *= 2f; + int plagueDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 3f); + Main.dust[plagueDust2].noGravity = true; + Main.dust[plagueDust2].velocity *= 5f; + plagueDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y), NPC.width, NPC.height, (int)CalamityDusts.Plague, 0f, 0f, 100, default, 2f); + Main.dust[plagueDust2].velocity *= 2f; } } } diff --git a/NPCs/PlagueEnemies/Viruling.cs b/NPCs/PlagueEnemies/Viruling.cs index d5377f9986..a78dd17c7f 100644 --- a/NPCs/PlagueEnemies/Viruling.cs +++ b/NPCs/PlagueEnemies/Viruling.cs @@ -66,75 +66,75 @@ namespace CalamityMod.NPCs.PlagueEnemies { NPC.TargetClosest(true); } - float num = 6f; - float num2 = 0.05f; + float maxSpeed = 6f; + float acceleration = 0.05f; if (CalamityWorld.revenge) { - num *= 1.25f; - num2 *= 1.25f; + maxSpeed *= 1.25f; + acceleration *= 1.25f; } if (CalamityWorld.death) { - num *= 1.25f; - num2 *= 1.25f; + maxSpeed *= 1.25f; + acceleration *= 1.25f; } Vector2 vector = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num4 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); - float num5 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); - num4 = (float)((int)(num4 / 8f) * 8); - num5 = (float)((int)(num5 / 8f) * 8); + float targetXDist = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); + float targetYDist = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); + targetXDist = (float)((int)(targetXDist / 8f) * 8); + targetYDist = (float)((int)(targetYDist / 8f) * 8); vector.X = (float)((int)(vector.X / 8f) * 8); vector.Y = (float)((int)(vector.Y / 8f) * 8); - num4 -= vector.X; - num5 -= vector.Y; - float num6 = (float)Math.Sqrt((double)(num4 * num4 + num5 * num5)); - if (num6 == 0f) + targetXDist -= vector.X; + targetYDist -= vector.Y; + float targetDistance = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); + if (targetDistance == 0f) { - num4 = NPC.velocity.X; - num5 = NPC.velocity.Y; + targetXDist = NPC.velocity.X; + targetYDist = NPC.velocity.Y; } else { - num6 = num / num6; - num4 *= num6; - num5 *= num6; + targetDistance = maxSpeed / targetDistance; + targetXDist *= targetDistance; + targetYDist *= targetDistance; } if (Main.player[NPC.target].dead) { - num4 = (float)NPC.direction * num / 2f; - num5 = -num / 2f; + targetXDist = (float)NPC.direction * maxSpeed / 2f; + targetYDist = -maxSpeed / 2f; } - if (NPC.velocity.X < num4) + if (NPC.velocity.X < targetXDist) { - NPC.velocity.X = NPC.velocity.X + num2; + NPC.velocity.X = NPC.velocity.X + acceleration; } - else if (NPC.velocity.X > num4) + else if (NPC.velocity.X > targetXDist) { - NPC.velocity.X = NPC.velocity.X - num2; + NPC.velocity.X = NPC.velocity.X - acceleration; } - if (NPC.velocity.Y < num5) + if (NPC.velocity.Y < targetYDist) { - NPC.velocity.Y = NPC.velocity.Y + num2; + NPC.velocity.Y = NPC.velocity.Y + acceleration; } - else if (NPC.velocity.Y > num5) + else if (NPC.velocity.Y > targetYDist) { - NPC.velocity.Y = NPC.velocity.Y - num2; + NPC.velocity.Y = NPC.velocity.Y - acceleration; } - if (num4 > 0f) + if (targetXDist > 0f) { NPC.spriteDirection = 1; - NPC.rotation = (float)Math.Atan2((double)num5, (double)num4); + NPC.rotation = (float)Math.Atan2((double)targetYDist, (double)targetXDist); } - else if (num4 < 0f) + else if (targetXDist < 0f) { NPC.spriteDirection = -1; - NPC.rotation = (float)Math.Atan2((double)num5, (double)num4) + 3.14f; + NPC.rotation = (float)Math.Atan2((double)targetYDist, (double)targetXDist) + 3.14f; } - float num12 = 0.7f; + float recoilSpeed = 0.7f; if (NPC.collideX) { NPC.netUpdate = true; - NPC.velocity.X = NPC.oldVelocity.X * -num12; + NPC.velocity.X = NPC.oldVelocity.X * -recoilSpeed; if (NPC.direction == -1 && NPC.velocity.X > 0f && NPC.velocity.X < 2f) { NPC.velocity.X = 2f; @@ -147,7 +147,7 @@ namespace CalamityMod.NPCs.PlagueEnemies if (NPC.collideY) { NPC.netUpdate = true; - NPC.velocity.Y = NPC.oldVelocity.Y * -num12; + NPC.velocity.Y = NPC.oldVelocity.Y * -recoilSpeed; if (NPC.velocity.Y > 0f && (double)NPC.velocity.Y < 1.5) { NPC.velocity.Y = 2f; @@ -161,8 +161,8 @@ namespace CalamityMod.NPCs.PlagueEnemies { NPC.netUpdate = true; } - int num13 = Dust.NewDust(new Vector2(NPC.position.X - NPC.velocity.X, NPC.position.Y - NPC.velocity.Y), NPC.width, NPC.height, 46, NPC.velocity.X * 0.2f, NPC.velocity.Y * 0.2f, 100, default, 2f); - Dust dust = Main.dust[num13]; + int idleDust = Dust.NewDust(new Vector2(NPC.position.X - NPC.velocity.X, NPC.position.Y - NPC.velocity.Y), NPC.width, NPC.height, 46, NPC.velocity.X * 0.2f, NPC.velocity.Y * 0.2f, 100, default, 2f); + Dust dust = Main.dust[idleDust]; dust.noGravity = true; dust.velocity.X *= 0.3f; dust.velocity.Y *= 0.3f; diff --git a/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs b/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs index c7b8761c08..896e52d12c 100644 --- a/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs +++ b/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs @@ -1366,14 +1366,14 @@ namespace CalamityMod.NPCs.PrimordialWyrm { for (int num1474 = 0; num1474 < dustAmt; num1474++) { - Vector2 vector171 = Vector2.Normalize(NPC.velocity) * new Vector2((NPC.width + 50) / 2f, NPC.height) * 0.75f; - vector171 = vector171.RotatedBy((num1474 - (dustAmt / 2 - 1)) * (double)pie / (float)dustAmt) + NPC.Center; - Vector2 value18 = ((float)(Main.rand.NextDouble() * pie) - MathHelper.PiOver2).ToRotationVector2() * Main.rand.Next(3, 8); - int num1475 = Dust.NewDust(vector171 + value18, 0, 0, 172, value18.X * 2f, value18.Y * 2f, 100, default, 1.4f); - Main.dust[num1475].noGravity = true; - Main.dust[num1475].noLight = true; - Main.dust[num1475].velocity /= 4f; - Main.dust[num1475].velocity -= NPC.velocity; + Vector2 dustRotation = Vector2.Normalize(NPC.velocity) * new Vector2((NPC.width + 50) / 2f, NPC.height) * 0.75f; + dustRotation = dustRotation.RotatedBy((num1474 - (dustAmt / 2 - 1)) * (double)pie / (float)dustAmt) + NPC.Center; + Vector2 dustVelocity = ((float)(Main.rand.NextDouble() * pie) - MathHelper.PiOver2).ToRotationVector2() * Main.rand.Next(3, 8); + int chargeDust = Dust.NewDust(dustRotation + dustVelocity, 0, 0, 172, dustVelocity.X * 2f, dustVelocity.Y * 2f, 100, default, 1.4f); + Main.dust[chargeDust].noGravity = true; + Main.dust[chargeDust].noLight = true; + Main.dust[chargeDust].velocity /= 4f; + Main.dust[chargeDust].velocity -= NPC.velocity; } } @@ -1394,18 +1394,18 @@ namespace CalamityMod.NPCs.PrimordialWyrm Rectangle targetHitbox = target.Hitbox; - float dist1 = Vector2.Distance(NPC.Center, targetHitbox.TopLeft()); - float dist2 = Vector2.Distance(NPC.Center, targetHitbox.TopRight()); - float dist3 = Vector2.Distance(NPC.Center, targetHitbox.BottomLeft()); - float dist4 = Vector2.Distance(NPC.Center, targetHitbox.BottomRight()); + float hitboxTopLeft = Vector2.Distance(NPC.Center, targetHitbox.TopLeft()); + float hitboxTopRight = Vector2.Distance(NPC.Center, targetHitbox.TopRight()); + float hitboxBotLeft = Vector2.Distance(NPC.Center, targetHitbox.BottomLeft()); + float hitboxBotRight = Vector2.Distance(NPC.Center, targetHitbox.BottomRight()); - float minDist = dist1; - if (dist2 < minDist) - minDist = dist2; - if (dist3 < minDist) - minDist = dist3; - if (dist4 < minDist) - minDist = dist4; + float minDist = hitboxTopLeft; + if (hitboxTopRight < minDist) + minDist = hitboxTopRight; + if (hitboxBotLeft < minDist) + minDist = hitboxBotLeft; + if (hitboxBotRight < minDist) + minDist = hitboxBotRight; return minDist <= 70f && NPC.Opacity == 1f; } diff --git a/NPCs/SulphurousSea/Gnasher.cs b/NPCs/SulphurousSea/Gnasher.cs index 7b7fad8f42..c84311fc14 100644 --- a/NPCs/SulphurousSea/Gnasher.cs +++ b/NPCs/SulphurousSea/Gnasher.cs @@ -56,43 +56,43 @@ namespace CalamityMod.NPCs.SulphurousSea public override void AI() { NPC.spriteDirection = (NPC.direction > 0) ? -1 : 1; - float num79 = (Main.player[NPC.target].Center - NPC.Center).Length(); - num79 *= 0.0025f; - if ((double)num79 > 1.5) + float targetDist = (Main.player[NPC.target].Center - NPC.Center).Length(); + targetDist *= 0.0025f; + if ((double)targetDist > 1.5) { - num79 = 1.5f; + targetDist = 1.5f; } - float num78; + float maxVelocity; if (Main.expertMode) { - num78 = 2.5f - num79; + maxVelocity = 2.5f - targetDist; } else { - num78 = 2.25f - num79; + maxVelocity = 2.25f - targetDist; } - num78 *= (CalamityWorld.death ? 1.2f : CalamityWorld.revenge ? 1f : 0.8f); - if (NPC.velocity.X < -num78 || NPC.velocity.X > num78) + maxVelocity *= (CalamityWorld.death ? 1.2f : CalamityWorld.revenge ? 1f : 0.8f); + if (NPC.velocity.X < -maxVelocity || NPC.velocity.X > maxVelocity) { if (NPC.velocity.Y == 0f) { NPC.velocity *= 0.8f; } } - else if (NPC.velocity.X < num78 && NPC.direction == 1) + else if (NPC.velocity.X < maxVelocity && NPC.direction == 1) { NPC.velocity.X = NPC.velocity.X + 1f; - if (NPC.velocity.X > num78) + if (NPC.velocity.X > maxVelocity) { - NPC.velocity.X = num78; + NPC.velocity.X = maxVelocity; } } - else if (NPC.velocity.X > -num78 && NPC.direction == -1) + else if (NPC.velocity.X > -maxVelocity && NPC.direction == -1) { NPC.velocity.X = NPC.velocity.X - 1f; - if (NPC.velocity.X < -num78) + if (NPC.velocity.X < -maxVelocity) { - NPC.velocity.X = -num78; + NPC.velocity.X = -maxVelocity; } } } diff --git a/NPCs/SulphurousSea/Sulflounder.cs b/NPCs/SulphurousSea/Sulflounder.cs index 91b8c82b15..d91dcee45e 100644 --- a/NPCs/SulphurousSea/Sulflounder.cs +++ b/NPCs/SulphurousSea/Sulflounder.cs @@ -56,10 +56,10 @@ namespace CalamityMod.NPCs.SulphurousSea public override void AI() { NPC.spriteDirection = (NPC.direction > 0) ? 1 : -1; - int num = 200; + int alphaControl = 200; if (NPC.ai[2] == 0f) { - NPC.alpha = num; + NPC.alpha = alphaControl; NPC.TargetClosest(true); if (!Main.player[NPC.target].dead && (Main.player[NPC.target].Center - NPC.Center).Length() < 170f && Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height)) @@ -76,7 +76,7 @@ namespace CalamityMod.NPCs.SulphurousSea { if (NPC.alpha > 0) { - NPC.alpha -= num / 16; + NPC.alpha -= alphaControl / 16; if (NPC.alpha < 0) { NPC.alpha = 0; diff --git a/NPCs/SulphurousSea/Trasher.cs b/NPCs/SulphurousSea/Trasher.cs index a13569ff75..6dbff3f85d 100644 --- a/NPCs/SulphurousSea/Trasher.cs +++ b/NPCs/SulphurousSea/Trasher.cs @@ -89,19 +89,19 @@ namespace CalamityMod.NPCs.SulphurousSea NPC.TargetClosest(true); } NPC.noTileCollide = false; - bool flag14 = hasBeenHit; + bool canAttack = hasBeenHit; NPC.TargetClosest(false); if (Main.player[NPC.target].wet && !Main.player[NPC.target].dead && Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height) && (Main.player[NPC.target].Center - NPC.Center).Length() < 200f) { - flag14 = true; + canAttack = true; } - if (Main.player[NPC.target].dead && flag14) + if (Main.player[NPC.target].dead && canAttack) { - flag14 = false; + canAttack = false; } - if (!flag14) + if (!canAttack) { if (NPC.collideX) { @@ -126,7 +126,7 @@ namespace CalamityMod.NPCs.SulphurousSea } } } - if (flag14) + if (canAttack) { NPC.TargetClosest(true); NPC.velocity.X = NPC.velocity.X + (float)NPC.direction * (CalamityWorld.death ? 0.6f : CalamityWorld.revenge ? 0.45f : 0.3f); @@ -174,15 +174,15 @@ namespace CalamityMod.NPCs.SulphurousSea } } } - int num258 = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; - int num259 = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; - if (Main.tile[num258, num259 - 1].LiquidAmount > 128) + int npcTileX = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; + int npcTileY = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; + if (Main.tile[npcTileX, npcTileY - 1].LiquidAmount > 128) { - if (Main.tile[num258, num259 + 1].HasTile) + if (Main.tile[npcTileX, npcTileY + 1].HasTile) { NPC.ai[0] = -1f; } - else if (Main.tile[num258, num259 + 2].HasTile) + else if (Main.tile[npcTileX, npcTileY + 2].HasTile) { NPC.ai[0] = -1f; } @@ -201,22 +201,22 @@ namespace CalamityMod.NPCs.SulphurousSea return; } NPC.noTileCollide = true; - float num823 = 1f; + float velocityBoost = 1f; NPC.TargetClosest(true); - bool flag51 = false; + bool closeToTargetX = false; if ((double)NPC.life < (double)NPC.lifeMax * 0.5 || CalamityWorld.death) { - num823 = 1.5f; + velocityBoost = 1.5f; } if ((double)NPC.life < (double)NPC.lifeMax * 0.25 || CalamityWorld.death) { - num823 = 2.5f; + velocityBoost = 2.5f; } if (Math.Abs(NPC.Center.X - Main.player[NPC.target].Center.X) < 20f) { - flag51 = true; + closeToTargetX = true; } - if (flag51) + if (closeToTargetX) { NPC.velocity.X = NPC.velocity.X * 0.9f; if ((double)NPC.velocity.X > -0.1 && (double)NPC.velocity.X < 0.1) @@ -228,26 +228,26 @@ namespace CalamityMod.NPCs.SulphurousSea { if (NPC.direction > 0) { - NPC.velocity.X = (NPC.velocity.X * 20f + num823) / 21f; + NPC.velocity.X = (NPC.velocity.X * 20f + velocityBoost) / 21f; } if (NPC.direction < 0) { - NPC.velocity.X = (NPC.velocity.X * 20f - num823) / 21f; + NPC.velocity.X = (NPC.velocity.X * 20f - velocityBoost) / 21f; } } - int num854 = 80; - int num855 = 20; - Vector2 position2 = new Vector2(NPC.Center.X - (float)(num854 / 2), NPC.position.Y + (float)NPC.height - (float)num855); - bool flag52 = false; + int collisionWidth = 80; + int collisionHeight = 20; + Vector2 collisionSize = new Vector2(NPC.Center.X - (float)(collisionWidth / 2), NPC.position.Y + (float)NPC.height - (float)collisionHeight); + bool shouldFallThroughTiles = false; if (NPC.position.X < Main.player[NPC.target].position.X && NPC.position.X + (float)NPC.width > Main.player[NPC.target].position.X + (float)Main.player[NPC.target].width && NPC.position.Y + (float)NPC.height < Main.player[NPC.target].position.Y + (float)Main.player[NPC.target].height - 16f) { - flag52 = true; + shouldFallThroughTiles = true; } - if (flag52) + if (shouldFallThroughTiles) { NPC.velocity.Y = NPC.velocity.Y + 0.5f; } - else if (Collision.SolidCollision(position2, num854, num855)) + else if (Collision.SolidCollision(collisionSize, collisionWidth, collisionHeight)) { if (NPC.velocity.Y > 0f) { From f8a5a7112ff576912863c756ac9c72769350398a Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 2 Nov 2023 12:32:41 -0400 Subject: [PATCH 48/95] Sunken Sea and the rest of CalamityAI --- NPCs/CalamityAI.cs | 174 ++++++++++++++++---------------- NPCs/SunkenSea/BabyGhostBell.cs | 6 +- NPCs/SunkenSea/BlindedAngler.cs | 6 +- NPCs/SunkenSea/Clam.cs | 6 +- NPCs/SunkenSea/EutrophicRay.cs | 6 +- NPCs/SunkenSea/GhostBell.cs | 6 +- NPCs/SunkenSea/GiantClam.cs | 38 +++---- NPCs/SunkenSea/PrismBack.cs | 6 +- NPCs/SunkenSea/SeaMinnow.cs | 22 ++-- NPCs/SunkenSea/SeaSerpent1.cs | 120 +++++++++++----------- NPCs/SunkenSea/SeaSerpent2.cs | 46 ++++----- NPCs/SunkenSea/SeaSerpent3.cs | 46 ++++----- NPCs/SunkenSea/SeaSerpent4.cs | 46 ++++----- NPCs/SunkenSea/SeaSerpent5.cs | 46 ++++----- 14 files changed, 286 insertions(+), 288 deletions(-) diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index 78d3b48537..a26cfd39df 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -7579,26 +7579,25 @@ namespace CalamityMod.NPCs #region Gem Crawler AI public static void GemCrawlerAI(NPC npc, Mod mod, float speedDetect, float speedAdditive) { - int num19 = 30; - int num20 = 10; - bool flag19 = false; - bool flag20 = false; - bool flag30 = false; + int turnAroundDelay = 30; + bool unusedFlag = false; + bool isRunning = false; + bool shouldTurnAround = false; if (npc.velocity.Y == 0f && ((npc.velocity.X > 0f && npc.direction > 0) || (npc.velocity.X < 0f && npc.direction < 0))) { - flag20 = true; + isRunning = true; npc.ai[3] += 1f; } - if ((npc.position.X == npc.oldPosition.X || npc.ai[3] >= (float)num19) | flag20) + if ((npc.position.X == npc.oldPosition.X || npc.ai[3] >= (float)turnAroundDelay) | isRunning) { npc.ai[3] += 1f; - flag30 = true; + shouldTurnAround = true; } else if (npc.ai[3] > 0f) { npc.ai[3] -= 1f; } - if (npc.ai[3] > (float)(num19 * num20)) + if (npc.ai[3] > (float)(turnAroundDelay * 10)) { npc.ai[3] = 0f; } @@ -7606,7 +7605,7 @@ namespace CalamityMod.NPCs { npc.ai[3] = 0f; } - if (npc.ai[3] == (float)num19) + if (npc.ai[3] == (float)turnAroundDelay) { npc.netUpdate = true; } @@ -7614,11 +7613,11 @@ namespace CalamityMod.NPCs float xDist = Main.player[npc.target].Center.X - npcPos.X; float yDist = Main.player[npc.target].Center.Y - npcPos.Y; float targetDist = (float)Math.Sqrt((double)(xDist * xDist + yDist * yDist)); - if (targetDist < 200f && !flag30) + if (targetDist < 200f && !shouldTurnAround) { npc.ai[3] = 0f; } - if (npc.ai[3] < (float)num19) + if (npc.ai[3] < (float)turnAroundDelay) { npc.TargetClosest(true); } @@ -7647,50 +7646,50 @@ namespace CalamityMod.NPCs npc.direction = 1; } } - float num6 = speedDetect; //5 - float num70 = speedAdditive; //0.05 - if (!flag19 && (npc.velocity.Y == 0f || npc.wet || (npc.velocity.X <= 0f && npc.direction > 0) || (npc.velocity.X >= 0f && npc.direction < 0))) + float maxVelocity = speedDetect; //5 + float acceleration = speedAdditive; //0.05 + if (!unusedFlag && (npc.velocity.Y == 0f || npc.wet || (npc.velocity.X <= 0f && npc.direction > 0) || (npc.velocity.X >= 0f && npc.direction < 0))) { - if (npc.velocity.X < -num6 || npc.velocity.X > num6) + if (npc.velocity.X < -maxVelocity || npc.velocity.X > maxVelocity) { if (npc.velocity.Y == 0f) { npc.velocity *= 0.8f; } } - else if (npc.velocity.X < num6 && npc.direction == -1) + else if (npc.velocity.X < maxVelocity && npc.direction == -1) { - npc.velocity.X = npc.velocity.X + num70; - if (npc.velocity.X > num6) + npc.velocity.X = npc.velocity.X + acceleration; + if (npc.velocity.X > maxVelocity) { - npc.velocity.X = num6; + npc.velocity.X = maxVelocity; } } - else if (npc.velocity.X > -num6 && npc.direction == 1) + else if (npc.velocity.X > -maxVelocity && npc.direction == 1) { - npc.velocity.X = npc.velocity.X - num70; - if (npc.velocity.X < -num6) + npc.velocity.X = npc.velocity.X - acceleration; + if (npc.velocity.X < -maxVelocity) { - npc.velocity.X = -num6; + npc.velocity.X = -maxVelocity; } } } if (npc.velocity.Y >= 0f) { - int num9 = 0; + int faceDirection = 0; if (npc.velocity.X < 0f) { - num9 = -1; + faceDirection = -1; } if (npc.velocity.X > 0f) { - num9 = 1; + faceDirection = 1; } Vector2 position = npc.position; position.X += npc.velocity.X; - int x = (int)((position.X + (float)(npc.width / 2) + (float)((npc.width / 2 + 1) * num9)) / 16f); + int x = (int)((position.X + (float)(npc.width / 2) + (float)((npc.width / 2 + 1) * faceDirection)) / 16f); int y = (int)((position.Y + (float)npc.height - 1f) / 16f); - if ((float)(x * 16) < position.X + (float)npc.width && (float)(x * 16 + 16) > position.X && ((Main.tile[x, y].HasUnactuatedTile && !Main.tile[x, y].TopSlope && !Main.tile[x, y - 1].TopSlope && Main.tileSolid[(int)Main.tile[x, y].TileType] && !Main.tileSolidTop[(int)Main.tile[x, y].TileType]) || (Main.tile[x, y - 1].IsHalfBlock && Main.tile[x, y - 1].HasUnactuatedTile)) && (!Main.tile[x, y - 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[x, y - 1].TileType] || Main.tileSolidTop[(int)Main.tile[x, y - 1].TileType] || (Main.tile[x, y - 1].IsHalfBlock && (!Main.tile[x, y - 4].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[x, y - 4].TileType] || Main.tileSolidTop[(int)Main.tile[x, y - 4].TileType]))) && (!Main.tile[x, y - 2].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[x, y - 2].TileType] || Main.tileSolidTop[(int)Main.tile[x, y - 2].TileType]) && (!Main.tile[x, y - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[x, y - 3].TileType] || Main.tileSolidTop[(int)Main.tile[x, y - 3].TileType]) && (!Main.tile[x - num9, y - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[x - num9, y - 3].TileType])) + if ((float)(x * 16) < position.X + (float)npc.width && (float)(x * 16 + 16) > position.X && ((Main.tile[x, y].HasUnactuatedTile && !Main.tile[x, y].TopSlope && !Main.tile[x, y - 1].TopSlope && Main.tileSolid[(int)Main.tile[x, y].TileType] && !Main.tileSolidTop[(int)Main.tile[x, y].TileType]) || (Main.tile[x, y - 1].IsHalfBlock && Main.tile[x, y - 1].HasUnactuatedTile)) && (!Main.tile[x, y - 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[x, y - 1].TileType] || Main.tileSolidTop[(int)Main.tile[x, y - 1].TileType] || (Main.tile[x, y - 1].IsHalfBlock && (!Main.tile[x, y - 4].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[x, y - 4].TileType] || Main.tileSolidTop[(int)Main.tile[x, y - 4].TileType]))) && (!Main.tile[x, y - 2].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[x, y - 2].TileType] || Main.tileSolidTop[(int)Main.tile[x, y - 2].TileType]) && (!Main.tile[x, y - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[x, y - 3].TileType] || Main.tileSolidTop[(int)Main.tile[x, y - 3].TileType]) && (!Main.tile[x - faceDirection, y - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[x - faceDirection, y - 3].TileType])) { float npcBottom = (float)(y * 16); if (Main.tile[x, y].IsHalfBlock) @@ -7703,12 +7702,12 @@ namespace CalamityMod.NPCs } if (npcBottom < position.Y + (float)npc.height) { - float num13 = position.Y + (float)npc.height - npcBottom; - if (num13 <= 16.1f) + float percentageTileRisen = position.Y + (float)npc.height - npcBottom; + if (percentageTileRisen <= 16.1f) { npc.gfxOffY += npc.position.Y + (float)npc.height - npcBottom; npc.position.Y = npcBottom - (float)npc.height; - if (num13 < 9f) + if (percentageTileRisen < 9f) { npc.stepSpeed = 1f; } @@ -7771,18 +7770,18 @@ namespace CalamityMod.NPCs { bool DogPhase1 = npc.type == ModContent.NPCType() && npc.life > npc.lifeMax * (CalamityWorld.death ? 0.9 : CalamityWorld.revenge ? 0.7 : 0.5); bool DogPhase2 = npc.type == ModContent.NPCType() && npc.life <= npc.lifeMax * (CalamityWorld.death ? 0.9 : CalamityWorld.revenge ? 0.7 : 0.5); - int num = 30; - bool flag2 = false; - bool flag3 = false; + int turnAroundDelay = 30; + bool isRunning = false; + bool shouldTurnAround = false; if (npc.velocity.Y == 0f && ((npc.velocity.X > 0f && npc.direction < 0) || (npc.velocity.X < 0f && npc.direction > 0))) { - flag2 = true; + isRunning = true; npc.ai[3] += 1f; } - int num2 = DogPhase1 ? 10 : 4; + int turnAroundDelayMult = DogPhase1 ? 10 : 4; if (!DogPhase1) { - bool flag4 = npc.velocity.Y == 0f; + bool noYVelocity = npc.velocity.Y == 0f; for (int i = 0; i < Main.maxNPCs; i++) { if (i != npc.whoAmI && Main.npc[i].active && Main.npc[i].type == npc.type && Math.Abs(npc.position.X - Main.npc[i].position.X) + Math.Abs(npc.position.Y - Main.npc[i].position.Y) < (float)npc.width) @@ -7805,21 +7804,21 @@ namespace CalamityMod.NPCs } } } - if (flag4) + if (noYVelocity) { npc.velocity.Y = 0f; } } - if (npc.position.X == npc.oldPosition.X || npc.ai[3] >= (float)num || flag2) + if (npc.position.X == npc.oldPosition.X || npc.ai[3] >= (float)turnAroundDelay || isRunning) { npc.ai[3] += 1f; - flag3 = true; + shouldTurnAround = true; } else if (npc.ai[3] > 0f) { npc.ai[3] -= 1f; } - if (npc.ai[3] > (float)(num * num2)) + if (npc.ai[3] > (float)(turnAroundDelay * turnAroundDelayMult)) { npc.ai[3] = 0f; } @@ -7827,7 +7826,7 @@ namespace CalamityMod.NPCs { npc.ai[3] = 0f; } - if (npc.ai[3] == (float)num) + if (npc.ai[3] == (float)turnAroundDelay) { npc.netUpdate = true; } @@ -7835,7 +7834,7 @@ namespace CalamityMod.NPCs float xDist = Main.player[npc.target].Center.X - npcPos.X; float yDist = Main.player[npc.target].Center.Y - npcPos.Y; float targetDist = (float)Math.Sqrt((double)(xDist * xDist + yDist * yDist)); - if (targetDist < 200f && !flag3) + if (targetDist < 200f && !shouldTurnAround) { npc.ai[3] = 0f; } @@ -7878,7 +7877,7 @@ namespace CalamityMod.NPCs } } } - if (npc.ai[3] < (float)num) + if (npc.ai[3] < (float)turnAroundDelay) { npc.TargetClosest(true); } @@ -7914,51 +7913,51 @@ namespace CalamityMod.NPCs { npc.velocity.X *= 0.92f; } - float num9 = MathHelper.Lerp(0.6f, 1f, Math.Abs(Main.windSpeedCurrent)) * (float)Math.Sign(Main.windSpeedCurrent); + float sandstormPush = MathHelper.Lerp(0.6f, 1f, Math.Abs(Main.windSpeedCurrent)) * (float)Math.Sign(Main.windSpeedCurrent); if (!Main.player[npc.target].ZoneSandstorm) { - num9 = 0f; + sandstormPush = 0f; } - float num7 = speedDetect; - float num8 = speedAdditive; - if (npc.velocity.X < -num7 || npc.velocity.X > num7) + float maxVelocity = speedDetect; + float acceleration = speedAdditive; + if (npc.velocity.X < -maxVelocity || npc.velocity.X > maxVelocity) { if (npc.velocity.Y == 0f) { npc.velocity *= 0.8f; } } - else if (npc.velocity.X < num7 && npc.direction == 1) + else if (npc.velocity.X < maxVelocity && npc.direction == 1) { - npc.velocity.X += num8; - if (npc.velocity.X > num7) + npc.velocity.X += acceleration; + if (npc.velocity.X > maxVelocity) { - npc.velocity.X = num7; + npc.velocity.X = maxVelocity; } } - else if (npc.velocity.X > -num7 && npc.direction == -1) + else if (npc.velocity.X > -maxVelocity && npc.direction == -1) { - npc.velocity.X -= num8; - if (npc.velocity.X < -num7) + npc.velocity.X -= acceleration; + if (npc.velocity.X < -maxVelocity) { - npc.velocity.X = -num7; + npc.velocity.X = -maxVelocity; } } } if (npc.velocity.Y >= 0f) { - int num10 = 0; + int faceDirection = 0; if (npc.velocity.X < 0f) { - num10 = -1; + faceDirection = -1; } if (npc.velocity.X > 0f) { - num10 = 1; + faceDirection = 1; } Vector2 position = npc.position; position.X += npc.velocity.X; - int x = (int)((position.X + (float)(npc.width / 2) + (float)((npc.width / 2 + 1) * num10)) / 16f); + int x = (int)((position.X + (float)(npc.width / 2) + (float)((npc.width / 2 + 1) * faceDirection)) / 16f); int y = (int)((position.Y + (float)npc.height - 1f) / 16f); // 21JAN2023: Ozzatron -- this is probably the single most unmaintainable if statement I've ever seen @@ -7967,7 +7966,7 @@ namespace CalamityMod.NPCs Tile t_xy1 = CalamityUtils.ParanoidTileRetrieval(x, y - 1); Tile t_xy2 = CalamityUtils.ParanoidTileRetrieval(x, y - 2); Tile t_xy3 = CalamityUtils.ParanoidTileRetrieval(x, y - 3); - Tile t_xOffY3 = CalamityUtils.ParanoidTileRetrieval(x - num10, y - 3); // 3 down, offset 1 in the direction of the NPC's movement + Tile t_xOffY3 = CalamityUtils.ParanoidTileRetrieval(x - faceDirection, y - 3); // 3 down, offset 1 in the direction of the NPC's movement Tile t_xy4 = CalamityUtils.ParanoidTileRetrieval(x, y - 4); bool positionCheck = (float)(x * 16) < position.X + (float)npc.width && (float)(x * 16 + 16) > position.X; bool tileSolidityCheck1 = t_xy.HasUnactuatedTile && !t_xy.TopSlope && !t_xy1.TopSlope && Main.tileSolid[t_xy.TileType] && !Main.tileSolidTop[t_xy.TileType]; @@ -7979,23 +7978,23 @@ namespace CalamityMod.NPCs bool threeDownOffsetIsNonSolid = !t_xOffY3.HasUnactuatedTile || !Main.tileSolid[t_xOffY3.TileType]; if (positionCheck && (tileSolidityCheck1 || oneBelowIsSolidHalf) && canFallThrough && twoDownIsNonSolid && threeDownIsNonSolid && threeDownOffsetIsNonSolid) { - float num13 = (float)(y * 16); + float tilePixelPosition = (float)(y * 16); if (Main.tile[x, y].IsHalfBlock) { - num13 += 8f; + tilePixelPosition += 8f; } if (Main.tile[x, y - 1].IsHalfBlock) { - num13 -= 8f; + tilePixelPosition -= 8f; } - if (num13 < position.Y + (float)npc.height) + if (tilePixelPosition < position.Y + (float)npc.height) { - float num14 = position.Y + (float)npc.height - num13; - if ((double)num14 <= 16.1) + float percentageTileRisen = position.Y + (float)npc.height - tilePixelPosition; + if ((double)percentageTileRisen <= 16.1) { - npc.gfxOffY += npc.position.Y + (float)npc.height - num13; - npc.position.Y = num13 - (float)npc.height; - if (num14 < 9f) + npc.gfxOffY += npc.position.Y + (float)npc.height - tilePixelPosition; + npc.position.Y = tilePixelPosition - (float)npc.height; + if (percentageTileRisen < 9f) { npc.stepSpeed = 1f; } @@ -8009,16 +8008,15 @@ namespace CalamityMod.NPCs } if (npc.velocity.Y == 0f) { - int num15 = (int)((npc.position.X + (float)(npc.width / 2) + (float)((npc.width / 2 + 2) * npc.direction) + npc.velocity.X * 5f) / 16f); - int num16 = (int)((npc.position.Y + (float)npc.height - 15f) / 16f); - int num17 = npc.spriteDirection; - num17 *= -1; - if ((npc.velocity.X < 0f && num17 == -1) || (npc.velocity.X > 0f && num17 == 1)) + int npcTileX = (int)((npc.position.X + (float)(npc.width / 2) + (float)((npc.width / 2 + 2) * npc.direction) + npc.velocity.X * 5f) / 16f); + int npcTileY = (int)((npc.position.Y + (float)npc.height - 15f) / 16f); + int spriteDirection = npc.spriteDirection; + spriteDirection *= -1; + if ((npc.velocity.X < 0f && spriteDirection == -1) || (npc.velocity.X > 0f && spriteDirection == 1)) { - float num18 = 3f; - if (Main.tile[num15, num16 - 2].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num15, num16 - 2].TileType]) + if (Main.tile[npcTileX, npcTileY - 2].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[npcTileX, npcTileY - 2].TileType]) { - if (Main.tile[num15, num16 - 3].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num15, num16 - 3].TileType]) + if (Main.tile[npcTileX, npcTileY - 3].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[npcTileX, npcTileY - 3].TileType]) { npc.velocity.Y = bouncy1; npc.netUpdate = true; @@ -8029,17 +8027,17 @@ namespace CalamityMod.NPCs npc.netUpdate = true; } } - else if (Main.tile[num15, num16 - 1].HasUnactuatedTile && !Main.tile[num15, num16 - 1].TopSlope && Main.tileSolid[(int)Main.tile[num15, num16 - 1].TileType]) + else if (Main.tile[npcTileX, npcTileY - 1].HasUnactuatedTile && !Main.tile[npcTileX, npcTileY - 1].TopSlope && Main.tileSolid[(int)Main.tile[npcTileX, npcTileY - 1].TileType]) { npc.velocity.Y = bouncy3; npc.netUpdate = true; } - else if (npc.position.Y + (float)npc.height - (float)(num16 * 16) > 20f && Main.tile[num15, num16].HasUnactuatedTile && !Main.tile[num15, num16].TopSlope && Main.tileSolid[(int)Main.tile[num15, num16].TileType]) + else if (npc.position.Y + (float)npc.height - (float)(npcTileY * 16) > 20f && Main.tile[npcTileX, npcTileY].HasUnactuatedTile && !Main.tile[npcTileX, npcTileY].TopSlope && Main.tileSolid[(int)Main.tile[npcTileX, npcTileY].TileType]) { npc.velocity.Y = bouncy4; npc.netUpdate = true; } - else if ((npc.directionY < 0 || Math.Abs(npc.velocity.X) > num18) && (!Main.tile[num15, num16 + 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num15, num16 + 1].TileType]) && (!Main.tile[num15, num16 + 2].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num15, num16 + 2].TileType]) && (!Main.tile[num15 + npc.direction, num16 + 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num15 + npc.direction, num16 + 3].TileType])) + else if ((npc.directionY < 0 || Math.Abs(npc.velocity.X) > 3f) && (!Main.tile[npcTileX, npcTileY + 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[npcTileX, npcTileY + 1].TileType]) && (!Main.tile[npcTileX, npcTileY + 2].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[npcTileX, npcTileY + 2].TileType]) && (!Main.tile[npcTileX + npc.direction, npcTileY + 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[npcTileX + npc.direction, npcTileY + 3].TileType])) { npc.velocity.Y = bouncy5; npc.netUpdate = true; @@ -8257,15 +8255,15 @@ namespace CalamityMod.NPCs } } } - int num258 = (int)(npc.position.X + (float)(npc.width / 2)) / 16; - int num259 = (int)(npc.position.Y + (float)(npc.height / 2)) / 16; - if (Main.tile[num258, num259 - 1].LiquidAmount > 128) + int npcTileX = (int)(npc.position.X + (float)(npc.width / 2)) / 16; + int npcTileY = (int)(npc.position.Y + (float)(npc.height / 2)) / 16; + if (Main.tile[npcTileX, npcTileY - 1].LiquidAmount > 128) { - if (Main.tile[num258, num259 + 1].HasTile) + if (Main.tile[npcTileX, npcTileY + 1].HasTile) { npc.ai[0] = -1f; } - else if (Main.tile[num258, num259 + 2].HasTile) + else if (Main.tile[npcTileX, npcTileY + 2].HasTile) { npc.ai[0] = -1f; } diff --git a/NPCs/SunkenSea/BabyGhostBell.cs b/NPCs/SunkenSea/BabyGhostBell.cs index 73816facfa..187eec59a4 100644 --- a/NPCs/SunkenSea/BabyGhostBell.cs +++ b/NPCs/SunkenSea/BabyGhostBell.cs @@ -142,13 +142,13 @@ namespace CalamityMod.NPCs.SunkenSea spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); Vector2 vector = center - screenPos; vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/SunkenSea/BabyGhostBellGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/SunkenSea/BabyGhostBellGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); + vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightBlue); Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/SunkenSea/BabyGhostBellGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); + new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, halfSizeTexture, 1f, spriteEffects, 0f); } public override void HitEffect(NPC.HitInfo hit) diff --git a/NPCs/SunkenSea/BlindedAngler.cs b/NPCs/SunkenSea/BlindedAngler.cs index 804650ce5b..ccba52a02b 100644 --- a/NPCs/SunkenSea/BlindedAngler.cs +++ b/NPCs/SunkenSea/BlindedAngler.cs @@ -85,13 +85,13 @@ namespace CalamityMod.NPCs.SunkenSea spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); Vector2 vector = center - screenPos; vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/SunkenSea/BlindedAnglerGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/SunkenSea/BlindedAnglerGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); + vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightBlue); Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/SunkenSea/BlindedAnglerGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); + new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, halfSizeTexture, 1f, spriteEffects, 0f); } public override bool? CanBeHitByProjectile(Projectile projectile) diff --git a/NPCs/SunkenSea/Clam.cs b/NPCs/SunkenSea/Clam.cs index 12e1ce4a1c..101764fe4a 100644 --- a/NPCs/SunkenSea/Clam.cs +++ b/NPCs/SunkenSea/Clam.cs @@ -121,12 +121,12 @@ namespace CalamityMod.NPCs.SunkenSea else if (NPC.velocity.Y == 0f) { NPC.ai[2] += 1f; - int num321 = 20; + int decelerationTimer = 20; if (NPC.ai[1] == 0f) { - num321 = 12; + decelerationTimer = 12; } - if (NPC.ai[2] < (float)num321) + if (NPC.ai[2] < (float)decelerationTimer) { NPC.velocity.X *= 0.9f; return; diff --git a/NPCs/SunkenSea/EutrophicRay.cs b/NPCs/SunkenSea/EutrophicRay.cs index 00ecd57f2c..2cee708a99 100644 --- a/NPCs/SunkenSea/EutrophicRay.cs +++ b/NPCs/SunkenSea/EutrophicRay.cs @@ -184,13 +184,13 @@ namespace CalamityMod.NPCs.SunkenSea spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); Vector2 vector = center - screenPos; vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/SunkenSea/EutrophicRayGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/SunkenSea/EutrophicRayGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); + vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightBlue); Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/SunkenSea/EutrophicRayGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); + new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, halfSizeTexture, 1f, spriteEffects, 0f); } public override bool? CanBeHitByProjectile(Projectile projectile) diff --git a/NPCs/SunkenSea/GhostBell.cs b/NPCs/SunkenSea/GhostBell.cs index 857c2720b1..d01e9196ec 100644 --- a/NPCs/SunkenSea/GhostBell.cs +++ b/NPCs/SunkenSea/GhostBell.cs @@ -139,13 +139,13 @@ namespace CalamityMod.NPCs.SunkenSea spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); Vector2 vector = center - screenPos; vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/SunkenSea/GhostBellGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/SunkenSea/GhostBellGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); + vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightBlue); Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/SunkenSea/GhostBellGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); + new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, halfSizeTexture, 1f, spriteEffects, 0f); } public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo) diff --git a/NPCs/SunkenSea/GiantClam.cs b/NPCs/SunkenSea/GiantClam.cs index 1d23f095fa..782165556a 100644 --- a/NPCs/SunkenSea/GiantClam.cs +++ b/NPCs/SunkenSea/GiantClam.cs @@ -212,17 +212,17 @@ namespace CalamityMod.NPCs.SunkenSea { if (Main.rand.NextBool()) { - int num5 = Dust.NewDust(NPC.position, NPC.width, NPC.height, 226, 0f, 0f, 200, default, 1.5f); - Main.dust[num5].noGravity = true; - Main.dust[num5].velocity *= 0.75f; - Main.dust[num5].fadeIn = 1.3f; + int attackDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, 226, 0f, 0f, 200, default, 1.5f); + Main.dust[attackDust].noGravity = true; + Main.dust[attackDust].velocity *= 0.75f; + Main.dust[attackDust].fadeIn = 1.3f; Vector2 vector = new Vector2((float)Main.rand.Next(-200, 201), (float)Main.rand.Next(-200, 201)); vector.Normalize(); vector *= (float)Main.rand.Next(100, 200) * 0.04f; - Main.dust[num5].velocity = vector; + Main.dust[attackDust].velocity = vector; vector.Normalize(); vector *= 34f; - Main.dust[num5].position = NPC.Center - vector; + Main.dust[attackDust].position = NPC.Center - vector; } NPC.alpha -= Main.hardMode ? 7 : 4; if (NPC.alpha <= 0) @@ -356,7 +356,7 @@ namespace CalamityMod.NPCs.SunkenSea else if (attack == 2) { SoundEngine.PlaySound(SoundID.Item67, NPC.position); - Vector2 value9 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + Vector2 clamPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); float spread = 45f * 0.0174f; double startAngle = Math.Atan2(NPC.velocity.X, NPC.velocity.Y) - spread / 2; double deltaAngle = spread / 8f; @@ -365,18 +365,18 @@ namespace CalamityMod.NPCs.SunkenSea int damage = Main.expertMode ? 28 : 35; float speed = 5f; Vector2 vector = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)(NPC.height / 2)); - float num6 = Main.player[NPC.target].position.X + (float)Main.player[NPC.target].width * 0.5f - vector.X + (float)Main.rand.Next(-20, 21); - float num7 = Main.player[NPC.target].position.Y + (float)Main.player[NPC.target].height * 0.5f - vector.Y + (float)Main.rand.Next(-20, 21); - float num8 = (float)Math.Sqrt((double)(num6 * num6 + num7 * num7)); - num8 = speed / num8; - num6 *= num8; - num7 *= num8; - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center.X, NPC.Center.Y, num6, num7, projectileShot, damage, 0f, Main.myPlayer, 0f, 0f); + float targetXDist = Main.player[NPC.target].position.X + (float)Main.player[NPC.target].width * 0.5f - vector.X + (float)Main.rand.Next(-20, 21); + float targetYDist = Main.player[NPC.target].position.Y + (float)Main.player[NPC.target].height * 0.5f - vector.Y + (float)Main.rand.Next(-20, 21); + float targetDistance = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); + targetDistance = speed / targetDistance; + targetXDist *= targetDistance; + targetYDist *= targetDistance; + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center.X, NPC.Center.Y, targetXDist, targetYDist, projectileShot, damage, 0f, Main.myPlayer, 0f, 0f); for (int i = 0; i < 4; i++) { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - Projectile.NewProjectile(NPC.GetSource_FromAI(), value9.X, value9.Y, (float)(Math.Sin(offsetAngle) * 3f), (float)(Math.Cos(offsetAngle) * 3f), projectileShot, damage, 0f, Main.myPlayer, 0f, 0f); - Projectile.NewProjectile(NPC.GetSource_FromAI(), value9.X, value9.Y, (float)(-Math.Sin(offsetAngle) * 3f), (float)(-Math.Cos(offsetAngle) * 3f), projectileShot, damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(NPC.GetSource_FromAI(), clamPosition.X, clamPosition.Y, (float)(Math.Sin(offsetAngle) * 3f), (float)(Math.Cos(offsetAngle) * 3f), projectileShot, damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(NPC.GetSource_FromAI(), clamPosition.X, clamPosition.Y, (float)(-Math.Sin(offsetAngle) * 3f), (float)(-Math.Cos(offsetAngle) * 3f), projectileShot, damage, 0f, Main.myPlayer, 0f, 0f); } attack = -1; NPC.ai[3] = 0f; @@ -507,12 +507,12 @@ namespace CalamityMod.NPCs.SunkenSea Texture2D glowmask = ModContent.Request("CalamityMod/NPCs/SunkenSea/GiantClamGlow").Value; SpriteEffects spriteEffects = SpriteEffects.None; Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(texture.Width / 2), (float)(texture.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(texture.Width / 2), (float)(texture.Height / Main.npcFrameCount[NPC.type] / 2)); Vector2 vector = center - screenPos; vector -= new Vector2((float)glowmask.Width, (float)(glowmask.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); + vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightBlue); - Main.EntitySpriteDraw(glowmask, vector, NPC.frame, color, NPC.rotation, vector11, NPC.scale, spriteEffects, 0); + Main.EntitySpriteDraw(glowmask, vector, NPC.frame, color, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0); } public override void OnKill() diff --git a/NPCs/SunkenSea/PrismBack.cs b/NPCs/SunkenSea/PrismBack.cs index 3c80c68b70..32cd648cf8 100644 --- a/NPCs/SunkenSea/PrismBack.cs +++ b/NPCs/SunkenSea/PrismBack.cs @@ -130,13 +130,13 @@ namespace CalamityMod.NPCs.SunkenSea spriteEffects = SpriteEffects.FlipHorizontally; } Vector2 center = new Vector2(NPC.Center.X, NPC.Center.Y); - Vector2 vector11 = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[NPC.type].Value.Width / 2), (float)(TextureAssets.Npc[NPC.type].Value.Height / Main.npcFrameCount[NPC.type] / 2)); Vector2 vector = center - screenPos; vector -= new Vector2((float)ModContent.Request("CalamityMod/NPCs/SunkenSea/PrismBackGlow").Value.Width, (float)(ModContent.Request("CalamityMod/NPCs/SunkenSea/PrismBackGlow").Value.Height / Main.npcFrameCount[NPC.type])) * 1f / 2f; - vector += vector11 * 1f + new Vector2(0f, 4f + NPC.gfxOffY); + vector += halfSizeTexture * 1f + new Vector2(0f, 4f + NPC.gfxOffY); Color color = new Color(127 - NPC.alpha, 127 - NPC.alpha, 127 - NPC.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Blue); Main.spriteBatch.Draw(ModContent.Request("CalamityMod/NPCs/SunkenSea/PrismBackGlow").Value, vector, - new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, vector11, 1f, spriteEffects, 0f); + new Microsoft.Xna.Framework.Rectangle?(NPC.frame), color, NPC.rotation, halfSizeTexture, 1f, spriteEffects, 0f); } public override bool? CanBeHitByProjectile(Projectile projectile) diff --git a/NPCs/SunkenSea/SeaMinnow.cs b/NPCs/SunkenSea/SeaMinnow.cs index af2f8ea345..0b4a2fa887 100644 --- a/NPCs/SunkenSea/SeaMinnow.cs +++ b/NPCs/SunkenSea/SeaMinnow.cs @@ -51,7 +51,7 @@ namespace CalamityMod.NPCs.SunkenSea CalamityAI.PassiveSwimmingAI(NPC, Mod, 3, 150f, 0.25f, 0.15f, 6f, 6f, 0.05f); NPC.spriteDirection = (NPC.direction > 0) ? 1 : -1; NPC.noGravity = true; - bool flag14 = false; + bool shouldSwimAway = false; if (NPC.direction == 0) { NPC.TargetClosest(true); @@ -62,13 +62,13 @@ namespace CalamityMod.NPCs.SunkenSea if (Main.player[NPC.target].wet && !Main.player[NPC.target].dead && (Main.player[NPC.target].Center - NPC.Center).Length() < 150f) { - flag14 = true; + shouldSwimAway = true; } - if ((!Main.player[NPC.target].wet || Main.player[NPC.target].dead) && flag14) + if ((!Main.player[NPC.target].wet || Main.player[NPC.target].dead) && shouldSwimAway) { - flag14 = false; + shouldSwimAway = false; } - if (!flag14) + if (!shouldSwimAway) { if (NPC.collideX || NPC.velocity.X == 0f) { @@ -93,7 +93,7 @@ namespace CalamityMod.NPCs.SunkenSea } } } - if (flag14) + if (shouldSwimAway) { NPC.TargetClosest(true); NPC.velocity.X = NPC.velocity.X - (float)NPC.direction * 0.25f; @@ -140,15 +140,15 @@ namespace CalamityMod.NPCs.SunkenSea } } } - int num258 = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; - int num259 = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; - if (Main.tile[num258, num259 - 1].LiquidAmount > 128) + int npcTileX = (int)(NPC.position.X + (float)(NPC.width / 2)) / 16; + int npcTileY = (int)(NPC.position.Y + (float)(NPC.height / 2)) / 16; + if (Main.tile[npcTileX, npcTileY - 1].LiquidAmount > 128) { - if (Main.tile[num258, num259 + 1].HasTile) + if (Main.tile[npcTileX, npcTileY + 1].HasTile) { NPC.ai[0] = -1f; } - else if (Main.tile[num258, num259 + 2].HasTile) + else if (Main.tile[npcTileX, npcTileY + 2].HasTile) { NPC.ai[0] = -1f; } diff --git a/NPCs/SunkenSea/SeaSerpent1.cs b/NPCs/SunkenSea/SeaSerpent1.cs index fa6aa7939c..8a332e4ec3 100644 --- a/NPCs/SunkenSea/SeaSerpent1.cs +++ b/NPCs/SunkenSea/SeaSerpent1.cs @@ -144,149 +144,149 @@ namespace CalamityMod.NPCs.SunkenSea { NPC.active = false; } - float num188 = speed; - float num189 = turnSpeed; - Vector2 vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num191 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); - float num192 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); + float currentSpeed = speed; + float currentTurnSpeed = turnSpeed; + Vector2 segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float targetXDist = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); + float targetYDist = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); if (NPC.life > NPC.lifeMax * 0.99) { - num192 += 300; + targetYDist += 300; if (Math.Abs(NPC.Center.X - Main.player[NPC.target].Center.X) < 250f) { if (NPC.velocity.X > 0f) { - num191 = Main.player[NPC.target].Center.X + 300f; + targetXDist = Main.player[NPC.target].Center.X + 300f; } else { - num191 = Main.player[NPC.target].Center.X - 300f; + targetXDist = Main.player[NPC.target].Center.X - 300f; } } } else { - num188 *= 1.5f; - num189 *= 1.5f; + currentSpeed *= 1.5f; + currentTurnSpeed *= 1.5f; } - float num48 = num188 * 1.3f; - float num49 = num188 * 0.7f; - float num50 = NPC.velocity.Length(); - if (num50 > 0f) + float maxCurrentSpeed = currentSpeed * 1.3f; + float minCurrentSpeed = currentSpeed * 0.7f; + float speedCompare = NPC.velocity.Length(); + if (speedCompare > 0f) { - if (num50 > num48) + if (speedCompare > maxCurrentSpeed) { NPC.velocity.Normalize(); - NPC.velocity *= num48; + NPC.velocity *= maxCurrentSpeed; } - else if (num50 < num49) + else if (speedCompare < minCurrentSpeed) { NPC.velocity.Normalize(); - NPC.velocity *= num49; + NPC.velocity *= minCurrentSpeed; } } - num191 = (float)((int)(num191 / 16f) * 16); - num192 = (float)((int)(num192 / 16f) * 16); - vector18.X = (float)((int)(vector18.X / 16f) * 16); - vector18.Y = (float)((int)(vector18.Y / 16f) * 16); - num191 -= vector18.X; - num192 -= vector18.Y; - float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - float num196 = System.Math.Abs(num191); - float num197 = System.Math.Abs(num192); - float num198 = num188 / num193; - num191 *= num198; - num192 *= num198; - if ((NPC.velocity.X > 0f && num191 > 0f) || (NPC.velocity.X < 0f && num191 < 0f) || (NPC.velocity.Y > 0f && num192 > 0f) || (NPC.velocity.Y < 0f && num192 < 0f)) + targetXDist = (float)((int)(targetXDist / 16f) * 16); + targetYDist = (float)((int)(targetYDist / 16f) * 16); + segmentPosition.X = (float)((int)(segmentPosition.X / 16f) * 16); + segmentPosition.Y = (float)((int)(segmentPosition.Y / 16f) * 16); + targetXDist -= segmentPosition.X; + targetYDist -= segmentPosition.Y; + float targetDistance = (float)System.Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); + float absoluteTargetX = System.Math.Abs(targetXDist); + float absoluteTargetY = System.Math.Abs(targetYDist); + float timeToReachTarget = currentSpeed / targetDistance; + targetXDist *= timeToReachTarget; + targetYDist *= timeToReachTarget; + if ((NPC.velocity.X > 0f && targetXDist > 0f) || (NPC.velocity.X < 0f && targetXDist < 0f) || (NPC.velocity.Y > 0f && targetYDist > 0f) || (NPC.velocity.Y < 0f && targetYDist < 0f)) { - if (NPC.velocity.X < num191) + if (NPC.velocity.X < targetXDist) { - NPC.velocity.X = NPC.velocity.X + num189; + NPC.velocity.X = NPC.velocity.X + currentTurnSpeed; } else { - if (NPC.velocity.X > num191) + if (NPC.velocity.X > targetXDist) { - NPC.velocity.X = NPC.velocity.X - num189; + NPC.velocity.X = NPC.velocity.X - currentTurnSpeed; } } - if (NPC.velocity.Y < num192) + if (NPC.velocity.Y < targetYDist) { - NPC.velocity.Y = NPC.velocity.Y + num189; + NPC.velocity.Y = NPC.velocity.Y + currentTurnSpeed; } else { - if (NPC.velocity.Y > num192) + if (NPC.velocity.Y > targetYDist) { - NPC.velocity.Y = NPC.velocity.Y - num189; + NPC.velocity.Y = NPC.velocity.Y - currentTurnSpeed; } } - if ((double)System.Math.Abs(num192) < (double)num188 * 0.2 && ((NPC.velocity.X > 0f && num191 < 0f) || (NPC.velocity.X < 0f && num191 > 0f))) + if ((double)System.Math.Abs(targetYDist) < (double)currentSpeed * 0.2 && ((NPC.velocity.X > 0f && targetXDist < 0f) || (NPC.velocity.X < 0f && targetXDist > 0f))) { if (NPC.velocity.Y > 0f) { - NPC.velocity.Y = NPC.velocity.Y + num189 * 2f; + NPC.velocity.Y = NPC.velocity.Y + currentTurnSpeed * 2f; } else { - NPC.velocity.Y = NPC.velocity.Y - num189 * 2f; + NPC.velocity.Y = NPC.velocity.Y - currentTurnSpeed * 2f; } } - if ((double)System.Math.Abs(num191) < (double)num188 * 0.2 && ((NPC.velocity.Y > 0f && num192 < 0f) || (NPC.velocity.Y < 0f && num192 > 0f))) + if ((double)System.Math.Abs(targetXDist) < (double)currentSpeed * 0.2 && ((NPC.velocity.Y > 0f && targetYDist < 0f) || (NPC.velocity.Y < 0f && targetYDist > 0f))) { if (NPC.velocity.X > 0f) { - NPC.velocity.X = NPC.velocity.X + num189 * 2f; //changed from 2 + NPC.velocity.X = NPC.velocity.X + currentTurnSpeed * 2f; //changed from 2 } else { - NPC.velocity.X = NPC.velocity.X - num189 * 2f; //changed from 2 + NPC.velocity.X = NPC.velocity.X - currentTurnSpeed * 2f; //changed from 2 } } } else { - if (num196 > num197) + if (absoluteTargetX > absoluteTargetY) { - if (NPC.velocity.X < num191) + if (NPC.velocity.X < targetXDist) { - NPC.velocity.X = NPC.velocity.X + num189 * 1.1f; //changed from 1.1 + NPC.velocity.X = NPC.velocity.X + currentTurnSpeed * 1.1f; //changed from 1.1 } - else if (NPC.velocity.X > num191) + else if (NPC.velocity.X > targetXDist) { - NPC.velocity.X = NPC.velocity.X - num189 * 1.1f; //changed from 1.1 + NPC.velocity.X = NPC.velocity.X - currentTurnSpeed * 1.1f; //changed from 1.1 } - if ((double)(System.Math.Abs(NPC.velocity.X) + System.Math.Abs(NPC.velocity.Y)) < (double)num188 * 0.5) + if ((double)(System.Math.Abs(NPC.velocity.X) + System.Math.Abs(NPC.velocity.Y)) < (double)currentSpeed * 0.5) { if (NPC.velocity.Y > 0f) { - NPC.velocity.Y = NPC.velocity.Y + num189; + NPC.velocity.Y = NPC.velocity.Y + currentTurnSpeed; } else { - NPC.velocity.Y = NPC.velocity.Y - num189; + NPC.velocity.Y = NPC.velocity.Y - currentTurnSpeed; } } } else { - if (NPC.velocity.Y < num192) + if (NPC.velocity.Y < targetYDist) { - NPC.velocity.Y = NPC.velocity.Y + num189 * 1.1f; + NPC.velocity.Y = NPC.velocity.Y + currentTurnSpeed * 1.1f; } - else if (NPC.velocity.Y > num192) + else if (NPC.velocity.Y > targetYDist) { - NPC.velocity.Y = NPC.velocity.Y - num189 * 1.1f; + NPC.velocity.Y = NPC.velocity.Y - currentTurnSpeed * 1.1f; } - if ((double)(System.Math.Abs(NPC.velocity.X) + System.Math.Abs(NPC.velocity.Y)) < (double)num188 * 0.5) + if ((double)(System.Math.Abs(NPC.velocity.X) + System.Math.Abs(NPC.velocity.Y)) < (double)currentSpeed * 0.5) { if (NPC.velocity.X > 0f) { - NPC.velocity.X = NPC.velocity.X + num189; + NPC.velocity.X = NPC.velocity.X + currentTurnSpeed; } else { - NPC.velocity.X = NPC.velocity.X - num189; + NPC.velocity.X = NPC.velocity.X - currentTurnSpeed; } } } diff --git a/NPCs/SunkenSea/SeaSerpent2.cs b/NPCs/SunkenSea/SeaSerpent2.cs index e631ce019d..fc7e14a9cb 100644 --- a/NPCs/SunkenSea/SeaSerpent2.cs +++ b/NPCs/SunkenSea/SeaSerpent2.cs @@ -87,39 +87,39 @@ namespace CalamityMod.NPCs.SunkenSea NPC.alpha = 0; } - Vector2 vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num191 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); - float num192 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); - num191 = (float)((int)(num191 / 16f) * 16); - num192 = (float)((int)(num192 / 16f) * 16); - vector18.X = (float)((int)(vector18.X / 16f) * 16); - vector18.Y = (float)((int)(vector18.Y / 16f) * 16); - num191 -= vector18.X; - num192 -= vector18.Y; - float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); + Vector2 segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float targetXDist = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); + float targetYDist = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); + targetXDist = (float)((int)(targetXDist / 16f) * 16); + targetYDist = (float)((int)(targetYDist / 16f) * 16); + segmentPosition.X = (float)((int)(segmentPosition.X / 16f) * 16); + segmentPosition.Y = (float)((int)(segmentPosition.Y / 16f) * 16); + targetXDist -= segmentPosition.X; + targetYDist -= segmentPosition.Y; + float targetDistance = (float)System.Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); if (NPC.ai[1] > 0f && NPC.ai[1] < (float)Main.npc.Length) { try { - vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - num191 = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - vector18.X; - num192 = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - vector18.Y; + segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + targetXDist = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - segmentPosition.X; + targetYDist = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - segmentPosition.Y; } catch { } - NPC.rotation = (float)System.Math.Atan2((double)num192, (double)num191) + 1.57f; - num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - int num194 = NPC.width; - num193 = (num193 - (float)num194) / num193; - num191 *= num193; - num192 *= num193; + NPC.rotation = (float)System.Math.Atan2((double)targetYDist, (double)targetXDist) + 1.57f; + targetDistance = (float)System.Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); + int segmentWidth = NPC.width; + targetDistance = (targetDistance - (float)segmentWidth) / targetDistance; + targetXDist *= targetDistance; + targetYDist *= targetDistance; NPC.velocity = Vector2.Zero; - NPC.position.X = NPC.position.X + num191; - NPC.position.Y = NPC.position.Y + num192; + NPC.position.X = NPC.position.X + targetXDist; + NPC.position.Y = NPC.position.Y + targetYDist; - if (num191 < 0f) + if (targetXDist < 0f) NPC.spriteDirection = -1; - else if (num191 > 0f) + else if (targetXDist > 0f) NPC.spriteDirection = 1; } } diff --git a/NPCs/SunkenSea/SeaSerpent3.cs b/NPCs/SunkenSea/SeaSerpent3.cs index b1c257e61c..7c8873f0fa 100644 --- a/NPCs/SunkenSea/SeaSerpent3.cs +++ b/NPCs/SunkenSea/SeaSerpent3.cs @@ -85,39 +85,39 @@ namespace CalamityMod.NPCs.SunkenSea NPC.alpha = 0; } - Vector2 vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num191 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); - float num192 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); - num191 = (float)((int)(num191 / 16f) * 16); - num192 = (float)((int)(num192 / 16f) * 16); - vector18.X = (float)((int)(vector18.X / 16f) * 16); - vector18.Y = (float)((int)(vector18.Y / 16f) * 16); - num191 -= vector18.X; - num192 -= vector18.Y; - float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); + Vector2 segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float targetXDist = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); + float targetYDist = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); + targetXDist = (float)((int)(targetXDist / 16f) * 16); + targetYDist = (float)((int)(targetYDist / 16f) * 16); + segmentPosition.X = (float)((int)(segmentPosition.X / 16f) * 16); + segmentPosition.Y = (float)((int)(segmentPosition.Y / 16f) * 16); + targetXDist -= segmentPosition.X; + targetYDist -= segmentPosition.Y; + float targetDistance = (float)System.Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); if (NPC.ai[1] > 0f && NPC.ai[1] < (float)Main.npc.Length) { try { - vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - num191 = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - vector18.X; - num192 = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - vector18.Y; + segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + targetXDist = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - segmentPosition.X; + targetYDist = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - segmentPosition.Y; } catch { } - NPC.rotation = (float)System.Math.Atan2((double)num192, (double)num191) + 1.57f; - num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - int num194 = NPC.width; - num193 = (num193 - (float)num194) / num193; - num191 *= num193; - num192 *= num193; + NPC.rotation = (float)System.Math.Atan2((double)targetYDist, (double)targetXDist) + 1.57f; + targetDistance = (float)System.Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); + int segmentWidth = NPC.width; + targetDistance = (targetDistance - (float)segmentWidth) / targetDistance; + targetXDist *= targetDistance; + targetYDist *= targetDistance; NPC.velocity = Vector2.Zero; - NPC.position.X = NPC.position.X + num191; - NPC.position.Y = NPC.position.Y + num192; + NPC.position.X = NPC.position.X + targetXDist; + NPC.position.Y = NPC.position.Y + targetYDist; - if (num191 < 0f) + if (targetXDist < 0f) NPC.spriteDirection = -1; - else if (num191 > 0f) + else if (targetXDist > 0f) NPC.spriteDirection = 1; } } diff --git a/NPCs/SunkenSea/SeaSerpent4.cs b/NPCs/SunkenSea/SeaSerpent4.cs index 884f30e531..9442d632d8 100644 --- a/NPCs/SunkenSea/SeaSerpent4.cs +++ b/NPCs/SunkenSea/SeaSerpent4.cs @@ -85,39 +85,39 @@ namespace CalamityMod.NPCs.SunkenSea NPC.alpha = 0; } - Vector2 vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num191 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); - float num192 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); - num191 = (float)((int)(num191 / 16f) * 16); - num192 = (float)((int)(num192 / 16f) * 16); - vector18.X = (float)((int)(vector18.X / 16f) * 16); - vector18.Y = (float)((int)(vector18.Y / 16f) * 16); - num191 -= vector18.X; - num192 -= vector18.Y; - float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); + Vector2 segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float targetXDist = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); + float targetYDist = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); + targetXDist = (float)((int)(targetXDist / 16f) * 16); + targetYDist = (float)((int)(targetYDist / 16f) * 16); + segmentPosition.X = (float)((int)(segmentPosition.X / 16f) * 16); + segmentPosition.Y = (float)((int)(segmentPosition.Y / 16f) * 16); + targetXDist -= segmentPosition.X; + targetYDist -= segmentPosition.Y; + float targetDistance = (float)System.Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); if (NPC.ai[1] > 0f && NPC.ai[1] < (float)Main.npc.Length) { try { - vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - num191 = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - vector18.X; - num192 = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - vector18.Y; + segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + targetXDist = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - segmentPosition.X; + targetYDist = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - segmentPosition.Y; } catch { } - NPC.rotation = (float)System.Math.Atan2((double)num192, (double)num191) + 1.57f; - num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - int num194 = NPC.width; - num193 = (num193 - (float)num194) / num193; - num191 *= num193; - num192 *= num193; + NPC.rotation = (float)System.Math.Atan2((double)targetYDist, (double)targetXDist) + 1.57f; + targetDistance = (float)System.Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); + int segmentWidth = NPC.width; + targetDistance = (targetDistance - (float)segmentWidth) / targetDistance; + targetXDist *= targetDistance; + targetYDist *= targetDistance; NPC.velocity = Vector2.Zero; - NPC.position.X = NPC.position.X + num191; - NPC.position.Y = NPC.position.Y + num192; + NPC.position.X = NPC.position.X + targetXDist; + NPC.position.Y = NPC.position.Y + targetYDist; - if (num191 < 0f) + if (targetXDist < 0f) NPC.spriteDirection = -1; - else if (num191 > 0f) + else if (targetXDist > 0f) NPC.spriteDirection = 1; } } diff --git a/NPCs/SunkenSea/SeaSerpent5.cs b/NPCs/SunkenSea/SeaSerpent5.cs index f5b91b77e3..6728bd8461 100644 --- a/NPCs/SunkenSea/SeaSerpent5.cs +++ b/NPCs/SunkenSea/SeaSerpent5.cs @@ -85,39 +85,39 @@ namespace CalamityMod.NPCs.SunkenSea NPC.alpha = 0; } - Vector2 vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - float num191 = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); - float num192 = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); - num191 = (float)((int)(num191 / 16f) * 16); - num192 = (float)((int)(num192 / 16f) * 16); - vector18.X = (float)((int)(vector18.X / 16f) * 16); - vector18.Y = (float)((int)(vector18.Y / 16f) * 16); - num191 -= vector18.X; - num192 -= vector18.Y; - float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); + Vector2 segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + float targetXDist = Main.player[NPC.target].position.X + (float)(Main.player[NPC.target].width / 2); + float targetYDist = Main.player[NPC.target].position.Y + (float)(Main.player[NPC.target].height / 2); + targetXDist = (float)((int)(targetXDist / 16f) * 16); + targetYDist = (float)((int)(targetYDist / 16f) * 16); + segmentPosition.X = (float)((int)(segmentPosition.X / 16f) * 16); + segmentPosition.Y = (float)((int)(segmentPosition.Y / 16f) * 16); + targetXDist -= segmentPosition.X; + targetYDist -= segmentPosition.Y; + float targetDistance = (float)System.Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); if (NPC.ai[1] > 0f && NPC.ai[1] < (float)Main.npc.Length) { try { - vector18 = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); - num191 = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - vector18.X; - num192 = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - vector18.Y; + segmentPosition = new Vector2(NPC.position.X + (float)NPC.width * 0.5f, NPC.position.Y + (float)NPC.height * 0.5f); + targetXDist = Main.npc[(int)NPC.ai[1]].position.X + (float)(Main.npc[(int)NPC.ai[1]].width / 2) - segmentPosition.X; + targetYDist = Main.npc[(int)NPC.ai[1]].position.Y + (float)(Main.npc[(int)NPC.ai[1]].height / 2) - segmentPosition.Y; } catch { } - NPC.rotation = (float)System.Math.Atan2((double)num192, (double)num191) + 1.57f; - num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - int num194 = NPC.width; - num193 = (num193 - (float)num194) / num193; - num191 *= num193; - num192 *= num193; + NPC.rotation = (float)System.Math.Atan2((double)targetYDist, (double)targetXDist) + 1.57f; + targetDistance = (float)System.Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); + int segmentWidth = NPC.width; + targetDistance = (targetDistance - (float)segmentWidth) / targetDistance; + targetXDist *= targetDistance; + targetYDist *= targetDistance; NPC.velocity = Vector2.Zero; - NPC.position.X = NPC.position.X + num191; - NPC.position.Y = NPC.position.Y + num192; + NPC.position.X = NPC.position.X + targetXDist; + NPC.position.Y = NPC.position.Y + targetYDist; - if (num191 < 0f) + if (targetXDist < 0f) NPC.spriteDirection = -1; - else if (num191 > 0f) + else if (targetXDist > 0f) NPC.spriteDirection = 1; } } From ad8baf05f5c525e452956091073b09f18c753265 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Thu, 2 Nov 2023 15:00:11 -0700 Subject: [PATCH 49/95] fixed debuff display breaking multiplayer --- ModSupport/ModCalls.cs | 12 +-- NPCs/CalamityGlobalNPC.cs | 175 ++++++++++++++++++++++---------------- 2 files changed, 109 insertions(+), 78 deletions(-) diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs index f15bb64992..cb8ed88f68 100644 --- a/ModSupport/ModCalls.cs +++ b/ModSupport/ModCalls.cs @@ -958,11 +958,11 @@ namespace CalamityMod #endregion #region Debuff Display support - public static void RegisterDebuff(Texture2D texture, Predicate debuffCheck) + public static void RegisterDebuff(string texturePath, Predicate debuffCheck) { - if (!CalamityGlobalNPC.debuffTextureList.Contains((texture, debuffCheck))) + if (!CalamityGlobalNPC.moddedDebuffTextureList.Contains((texturePath, debuffCheck))) { - CalamityGlobalNPC.debuffTextureList.Add((texture, debuffCheck)); + CalamityGlobalNPC.moddedDebuffTextureList.Add((texturePath, debuffCheck)); } } #endregion @@ -2003,11 +2003,11 @@ namespace CalamityMod case "DisplayDebuff": case "DebuffIcon": { - if (args.Length < 2 || args[1] is not Texture2D texture) - return new ArgumentException("ERROR: The first argument to \"RegisterDebuff\" must be the texture of a debuff as a Texture2D"); + if (args.Length < 2 || args[1] is not string texturePath) + return new ArgumentException("ERROR: The first argument to \"RegisterDebuff\" must be the texture path to the debuff sprite as a string"); if (args.Length != 3 || args[2] is not Predicate debuffCheck) return new ArgumentException("ERROR: The second argument to \"RegisterDebuff\" Must be a Predicate that checks if an NPC meets the conditions for the debuff."); - RegisterDebuff(texture, debuffCheck); + RegisterDebuff(texturePath, debuffCheck); return null; } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 739342f210..11804074aa 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -5443,79 +5443,48 @@ namespace CalamityMod.NPCs return null; } - public static List<(Texture2D, Predicate)> debuffTextureList = new List<(Texture2D, Predicate)> + public static List<(string, Predicate)> moddedDebuffTextureList = new List<(string, Predicate)> { // All Calamity DoTs in alphabetical order - (Request("CalamityMod/Buffs/DamageOverTime/AstralInfectionDebuff").Value, NPC => NPC.Calamity().astralInfection > 0), - (Request("CalamityMod/Buffs/DamageOverTime/BanishingFire").Value, NPC => NPC.Calamity().banishingFire > 0), - (Request("CalamityMod/Buffs/DamageOverTime/BrainRot").Value, NPC => NPC.Calamity().brainRot > 0), - (Request("CalamityMod/Buffs/DamageOverTime/BrimstoneFlames").Value, NPC => NPC.Calamity().bFlames > 0), - (Request("CalamityMod/Buffs/DamageOverTime/BurningBlood").Value, NPC => NPC.Calamity().bBlood > 0), - (Request("CalamityMod/Buffs/DamageOverTime/CrushDepth").Value, NPC => NPC.Calamity().cDepth > 0), - (Request("CalamityMod/Buffs/DamageOverTime/Dragonfire").Value, NPC => NPC.Calamity().dragonFire > 0), - (Request("CalamityMod/Buffs/DamageOverTime/ElementalMix").Value, NPC => NPC.Calamity().elementalMix > 0), - (Request("CalamityMod/Buffs/DamageOverTime/GodSlayerInferno").Value, NPC => NPC.Calamity().gsInferno > 0), - (Request("CalamityMod/Buffs/DamageOverTime/HolyFlames").Value, NPC => NPC.Calamity().hFlames > 0), - (Request("CalamityMod/Buffs/DamageOverTime/MiracleBlight").Value, NPC => NPC.Calamity().miracleBlight > 0), - (Request("CalamityMod/Buffs/DamageOverTime/Nightwither").Value, NPC => NPC.Calamity().nightwither > 0), - (Request("CalamityMod/Buffs/DamageOverTime/Plague").Value, NPC => NPC.Calamity().pFlames > 0), - (Request("CalamityMod/Buffs/DamageOverTime/RancorBurn").Value, NPC => NPC.Calamity().RancorBurnTime > 0), - (Request("CalamityMod/Buffs/DamageOverTime/RiptideDebuff").Value, NPC => NPC.Calamity().rTide > 0), - (Request("CalamityMod/Buffs/DamageOverTime/SagePoison").Value, NPC => NPC.Calamity().sagePoisonTime > 0), - (Request("CalamityMod/Buffs/DamageOverTime/ShellfishClaps").Value, NPC => NPC.Calamity().shellfishVore > 0), - (Request("CalamityMod/Buffs/DamageOverTime/Shred").Value, NPC => NPC.Calamity().somaShredStacks > 0), - (Request("CalamityMod/Buffs/DamageOverTime/SnapClamDebuff").Value, NPC => NPC.Calamity().clamDebuff > 0), - (Request("CalamityMod/Buffs/DamageOverTime/SulphuricPoisoning").Value, NPC => NPC.Calamity().sulphurPoison > 0), - (Request("CalamityMod/Buffs/DamageOverTime/Vaporfied").Value, NPC => NPC.Calamity().vaporfied > 0), - (Request("CalamityMod/Buffs/DamageOverTime/VulnerabilityHex").Value, NPC => NPC.Calamity().vulnerabilityHex > 0), + ("CalamityMod/Buffs/DamageOverTime/AstralInfectionDebuff", NPC => NPC.Calamity().astralInfection > 0), + ("CalamityMod/Buffs/DamageOverTime/BanishingFire", NPC => NPC.Calamity().banishingFire > 0), + ("CalamityMod/Buffs/DamageOverTime/BrainRot", NPC => NPC.Calamity().brainRot > 0), + ("CalamityMod/Buffs/DamageOverTime/BrimstoneFlames", NPC => NPC.Calamity().bFlames > 0), + ("CalamityMod/Buffs/DamageOverTime/BurningBlood", NPC => NPC.Calamity().bBlood > 0), + ("CalamityMod/Buffs/DamageOverTime/CrushDepth", NPC => NPC.Calamity().cDepth > 0), + ("CalamityMod/Buffs/DamageOverTime/Dragonfire", NPC => NPC.Calamity().dragonFire > 0), + ("CalamityMod/Buffs/DamageOverTime/ElementalMix", NPC => NPC.Calamity().elementalMix > 0), + ("CalamityMod/Buffs/DamageOverTime/GodSlayerInferno", NPC => NPC.Calamity().gsInferno > 0), + ("CalamityMod/Buffs/DamageOverTime/HolyFlames", NPC => NPC.Calamity().hFlames > 0), + ("CalamityMod/Buffs/DamageOverTime/MiracleBlight", NPC => NPC.Calamity().miracleBlight > 0), + ("CalamityMod/Buffs/DamageOverTime/Nightwither", NPC => NPC.Calamity().nightwither > 0), + ("CalamityMod/Buffs/DamageOverTime/Plague", NPC => NPC.Calamity().pFlames > 0), + ("CalamityMod/Buffs/DamageOverTime/RancorBurn", NPC => NPC.Calamity().RancorBurnTime > 0), + ("CalamityMod/Buffs/DamageOverTime/RiptideDebuff", NPC => NPC.Calamity().rTide > 0), + ("CalamityMod/Buffs/DamageOverTime/SagePoison", NPC => NPC.Calamity().sagePoisonTime > 0), + ("CalamityMod/Buffs/DamageOverTime/ShellfishClaps", NPC => NPC.Calamity().shellfishVore > 0), + ("CalamityMod/Buffs/DamageOverTime/Shred", NPC => NPC.Calamity().somaShredStacks > 0), + ("CalamityMod/Buffs/DamageOverTime/SnapClamDebuff", NPC => NPC.Calamity().clamDebuff > 0), + ("CalamityMod/Buffs/DamageOverTime/SulphuricPoisoning", NPC => NPC.Calamity().sulphurPoison > 0), + ("CalamityMod/Buffs/DamageOverTime/Vaporfied", NPC => NPC.Calamity().vaporfied > 0), + ("CalamityMod/Buffs/DamageOverTime/VulnerabilityHex", NPC => NPC.Calamity().vulnerabilityHex > 0), // All other important Calamity debuffs, in alphabetical order - (Request("CalamityMod/Buffs/StatDebuffs/AbsorberAffliction").Value, NPC => NPC.Calamity().absorberAffliction > 0), - (Request("CalamityMod/Buffs/StatDebuffs/ArmorCrunch").Value, NPC => NPC.Calamity().aCrunch > 0), - (Request("CalamityMod/Buffs/StatDebuffs/Crumbling").Value, NPC => NPC.Calamity().crumble > 0), - (Request("CalamityMod/Buffs/StatDebuffs/Eutrophication").Value, NPC => NPC.Calamity().eutrophication > 0), - (Request("CalamityMod/Buffs/StatDebuffs/GalvanicCorrosion").Value, NPC => NPC.Calamity().tesla > 0), - (Request("CalamityMod/Buffs/StatDebuffs/GlacialState").Value, NPC => NPC.Calamity().gState > 0), - (Request("CalamityMod/Buffs/StatDebuffs/Irradiated").Value, NPC => NPC.Calamity().irradiated > 0), - (Request("CalamityMod/Buffs/StatDebuffs/KamiFlu").Value, NPC => NPC.Calamity().kamiFlu > 0), - (Request("CalamityMod/Buffs/StatDebuffs/MarkedforDeath").Value, NPC => NPC.Calamity().marked > 0), - (Request("CalamityMod/Buffs/StatDebuffs/PearlAura").Value, NPC => NPC.Calamity().pearlAura > 0), - (Request("CalamityMod/Buffs/StatDebuffs/ProfanedWeakness").Value, NPC => NPC.Calamity().relicOfResilienceWeakness > 0), - (Request("CalamityMod/Buffs/StatDebuffs/TemporalSadness").Value, NPC => NPC.Calamity().tSad > 0), - (Request("CalamityMod/Buffs/StatDebuffs/TimeDistortion").Value, NPC => NPC.Calamity().timeSlow > 0), - (Request("CalamityMod/Buffs/StatDebuffs/WhisperingDeath").Value, NPC => NPC.Calamity().wDeath > 0), - (Request("CalamityMod/Buffs/StatDebuffs/WitherDebuff").Value, NPC => NPC.Calamity().wither > 0), - - // Vanilla debuffs, in alphabetical order - (TextureAssets.Buff[BuffID.BetsysCurse].Value, NPC => NPC.betsysCurse), - (TextureAssets.Buff[BuffID.BoneJavelin].Value, NPC => NPC.javelined), - (TextureAssets.Buff[BuffID.Confused].Value, NPC => NPC.confused), - (TextureAssets.Buff[BuffID.CursedInferno].Value, NPC => NPC.onFire2), - (TextureAssets.Buff[BuffID.Daybreak].Value, NPC => NPC.daybreak), - (TextureAssets.Buff[BuffID.DryadsWard].Value, NPC => NPC.dryadWard), - (TextureAssets.Buff[BuffID.DryadsWardDebuff].Value, NPC => NPC.dryadBane), - (TextureAssets.Buff[BuffID.Electrified].Value, NPC => NPC.Calamity().electrified > 0), - (TextureAssets.Buff[BuffID.Frostburn].Value, NPC => NPC.onFrostBurn), - (TextureAssets.Buff[BuffID.Frostburn2].Value, NPC => NPC.onFrostBurn2), - (TextureAssets.Buff[BuffID.GelBalloonBuff].Value, NPC => NPC.drippingSparkleSlime), - (TextureAssets.Buff[BuffID.Ichor].Value, NPC => NPC.ichor), - (TextureAssets.Buff[BuffID.Lovestruck].Value, NPC => NPC.loveStruck), - (TextureAssets.Buff[BuffID.Midas].Value, NPC => NPC.midas), - (TextureAssets.Buff[BuffID.Oiled].Value, NPC => NPC.oiled), - (TextureAssets.Buff[BuffID.OnFire].Value, NPC => NPC.onFire), - (TextureAssets.Buff[BuffID.OnFire3].Value, NPC => NPC.onFire3), - (TextureAssets.Buff[BuffID.Poisoned].Value, NPC => NPC.poisoned), - (TextureAssets.Buff[BuffID.ScytheWhipEnemyDebuff].Value, NPC => NPC.markedByScytheWhip), - (TextureAssets.Buff[BuffID.ShadowFlame].Value, NPC => NPC.shadowFlame), - (TextureAssets.Buff[BuffID.Slimed].Value, NPC => NPC.drippingSlime), - (TextureAssets.Buff[BuffID.Slow].Value, NPC => NPC.Calamity().slowed > 0), - (TextureAssets.Buff[BuffID.SoulDrain].Value, NPC => NPC.soulDrain && NPC.realLife == -1), - (TextureAssets.Buff[BuffID.StardustMinionBleed].Value, NPC => NPC.celled), - (TextureAssets.Buff[BuffID.Stinky].Value, NPC => NPC.stinky), - (TextureAssets.Buff[BuffID.TentacleSpike].Value, NPC => NPC.tentacleSpiked), - (TextureAssets.Buff[BuffID.Venom].Value, NPC => NPC.venom), - (TextureAssets.Buff[BuffID.Webbed].Value, NPC => NPC.Calamity().webbed > 0), - (TextureAssets.Buff[BuffID.Wet].Value, NPC => NPC.dripping), + ("CalamityMod/Buffs/StatDebuffs/AbsorberAffliction", NPC => NPC.Calamity().absorberAffliction > 0), + ("CalamityMod/Buffs/StatDebuffs/ArmorCrunch", NPC => NPC.Calamity().aCrunch > 0), + ("CalamityMod/Buffs/StatDebuffs/Crumbling", NPC => NPC.Calamity().crumble > 0), + ("CalamityMod/Buffs/StatDebuffs/Eutrophication", NPC => NPC.Calamity().eutrophication > 0), + ("CalamityMod/Buffs/StatDebuffs/GalvanicCorrosion", NPC => NPC.Calamity().tesla > 0), + ("CalamityMod/Buffs/StatDebuffs/GlacialState", NPC => NPC.Calamity().gState > 0), + ("CalamityMod/Buffs/StatDebuffs/Irradiated", NPC => NPC.Calamity().irradiated > 0), + ("CalamityMod/Buffs/StatDebuffs/KamiFlu", NPC => NPC.Calamity().kamiFlu > 0), + ("CalamityMod/Buffs/StatDebuffs/MarkedforDeath", NPC => NPC.Calamity().marked > 0), + ("CalamityMod/Buffs/StatDebuffs/PearlAura", NPC => NPC.Calamity().pearlAura > 0), + ("CalamityMod/Buffs/StatDebuffs/ProfanedWeakness", NPC => NPC.Calamity().relicOfResilienceWeakness > 0), + ("CalamityMod/Buffs/StatDebuffs/TemporalSadness", NPC => NPC.Calamity().tSad > 0), + ("CalamityMod/Buffs/StatDebuffs/TimeDistortion", NPC => NPC.Calamity().timeSlow > 0), + ("CalamityMod/Buffs/StatDebuffs/WhisperingDeath", NPC => NPC.Calamity().wDeath > 0), + ("CalamityMod/Buffs/StatDebuffs/WitherDebuff", NPC => NPC.Calamity().wither > 0), }; public override bool PreDraw(NPC npc, SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) @@ -5526,14 +5495,76 @@ namespace CalamityMod.NPCs { List currentDebuffs = new List() { }; - for (int b = 0; b < debuffTextureList.Count(); b++) + for (int b = 0; b < moddedDebuffTextureList.Count(); b++) { - if (debuffTextureList[b].Item2.Invoke(npc)) + if (moddedDebuffTextureList[b].Item2.Invoke(npc)) { - currentDebuffs.Add(debuffTextureList[b].Item1); + currentDebuffs.Add(Request(moddedDebuffTextureList[b].Item1).Value); } } + // Vanilla damage over time debuffs + if (electrified > 0) + currentDebuffs.Add(TextureAssets.Buff[BuffID.Electrified].Value); + if (npc.onFire) + currentDebuffs.Add(TextureAssets.Buff[BuffID.OnFire].Value); + if (npc.poisoned) + currentDebuffs.Add(TextureAssets.Buff[BuffID.Poisoned].Value); + if (npc.onFire2) + currentDebuffs.Add(TextureAssets.Buff[BuffID.CursedInferno].Value); + if (npc.onFrostBurn) + currentDebuffs.Add(TextureAssets.Buff[BuffID.Frostburn].Value); + if (npc.venom) + currentDebuffs.Add(TextureAssets.Buff[BuffID.Venom].Value); + if (npc.shadowFlame) + currentDebuffs.Add(TextureAssets.Buff[BuffID.ShadowFlame].Value); + if (npc.oiled) + currentDebuffs.Add(TextureAssets.Buff[BuffID.Oiled].Value); + if (npc.javelined) + currentDebuffs.Add(TextureAssets.Buff[BuffID.BoneJavelin].Value); + if (npc.daybreak) + currentDebuffs.Add(TextureAssets.Buff[BuffID.Daybreak].Value); + if (npc.celled) + currentDebuffs.Add(TextureAssets.Buff[BuffID.StardustMinionBleed].Value); + if (npc.dryadBane) + currentDebuffs.Add(TextureAssets.Buff[BuffID.DryadsWardDebuff].Value); + if (npc.dryadWard) + currentDebuffs.Add(TextureAssets.Buff[BuffID.DryadsWard].Value); + if (npc.soulDrain && npc.realLife == -1) + currentDebuffs.Add(TextureAssets.Buff[BuffID.SoulDrain].Value); + if (npc.onFire3) // Hellfire + currentDebuffs.Add(TextureAssets.Buff[BuffID.OnFire3].Value); + if (npc.onFrostBurn2) // Frostbite + currentDebuffs.Add(TextureAssets.Buff[BuffID.Frostburn2].Value); + if (npc.tentacleSpiked) + currentDebuffs.Add(TextureAssets.Buff[BuffID.TentacleSpike].Value); + + // Vanilla stat debuffs + if (npc.confused) + currentDebuffs.Add(TextureAssets.Buff[BuffID.Confused].Value); + if (npc.ichor) + currentDebuffs.Add(TextureAssets.Buff[BuffID.Ichor].Value); + if (slowed > 0) + currentDebuffs.Add(TextureAssets.Buff[BuffID.Slow].Value); + if (webbed > 0) + currentDebuffs.Add(TextureAssets.Buff[BuffID.Webbed].Value); + if (npc.midas) + currentDebuffs.Add(TextureAssets.Buff[BuffID.Midas].Value); + if (npc.loveStruck) + currentDebuffs.Add(TextureAssets.Buff[BuffID.Lovestruck].Value); + if (npc.stinky) + currentDebuffs.Add(TextureAssets.Buff[BuffID.Stinky].Value); + if (npc.betsysCurse) + currentDebuffs.Add(TextureAssets.Buff[BuffID.BetsysCurse].Value); + if (npc.dripping) + currentDebuffs.Add(TextureAssets.Buff[BuffID.Wet].Value); + if (npc.drippingSlime) + currentDebuffs.Add(TextureAssets.Buff[BuffID.Slimed].Value); + if (npc.drippingSparkleSlime) + currentDebuffs.Add(TextureAssets.Buff[BuffID.GelBalloonBuff].Value); + if (npc.markedByScytheWhip) // Dark Harvest whip, the only Whip debuff that has an NPC bool + currentDebuffs.Add(TextureAssets.Buff[BuffID.ScytheWhipEnemyDebuff].Value); + // Total amount of elements in the buff list int buffTextureListLength = currentDebuffs.Count(); From 11ac1cfee07286605980525ce13c99e0e0e514e1 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 2 Nov 2023 21:21:01 -0400 Subject: [PATCH 50/95] CalamityGlobalAI (11k line file goes hard) --- NPCs/CalamityGlobalAI.cs | 2870 +++++++++++++++++++------------------- 1 file changed, 1427 insertions(+), 1443 deletions(-) diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 48a955524b..f72d2edf97 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -103,7 +103,7 @@ namespace CalamityMod.NPCs Vector2 headPosition = npc.Top + new Vector2((float)(npc.spriteDirection * 6), 6f); float rotationVectorMult = MathHelper.Lerp(20f, 30f, (time * 3f + 50f) / 182f); Main.rand.NextFloat(); - for (float num17 = 0f; num17 < 2f; num17 += 1f) + for (float i = 0f; i < 2f; i += 1f) { Vector2 rotationVector = Vector2.UnitY.RotatedByRandom(Math.PI * 2.0) * (Main.rand.NextFloat() * 0.5f + 0.5f); Dust dust = Dust.NewDustDirect(headPosition, 0, 0, 228, 0f, 0f, 0, default, 1f); @@ -584,12 +584,12 @@ namespace CalamityMod.NPCs npc.TargetClosest(true); float velocityMultiplier = 10f; float turnValue = 40f; - Vector2 value3 = Main.player[npc.target].Center - npc.Center; - float playerDistance = value3.Length(); + Vector2 targetDirection = Main.player[npc.target].Center - npc.Center; + float playerDistance = targetDirection.Length(); velocityMultiplier += playerDistance / 200f; - value3.Normalize(); - value3 *= velocityMultiplier; - npc.velocity = (npc.velocity * (turnValue - 1f) + value3) / turnValue; + targetDirection.Normalize(); + targetDirection *= velocityMultiplier; + npc.velocity = (npc.velocity * (turnValue - 1f) + targetDirection) / turnValue; if (playerDistance < 500f && !Collision.SolidCollision(npc.position, npc.width, npc.height)) { // Go back to normal AI @@ -1038,10 +1038,10 @@ namespace CalamityMod.NPCs SoundEngine.PlaySound(SoundID.Item8, npc.position); float distX = npc.oldPos[2].X + (float)npc.width * 0.5f - npc.Center.X; float distY = npc.oldPos[2].Y + (float)npc.height * 0.5f - npc.Center.Y; - float num38 = (float)Math.Sqrt((distX * distX + distY * distY)); - num38 = 2f / num38; - distX *= num38; - distY *= num38; + float distance = (float)Math.Sqrt((distX * distX + distY * distY)); + distance = 2f / distance; + distX *= distance; + distY *= distance; for (int m = 0; m < 20; m++) { int dustIdx = Dust.NewDust(npc.position, npc.width, npc.height, 71, distX, distY, 200, default, 2f); @@ -1083,12 +1083,7 @@ namespace CalamityMod.NPCs ableToAlterAI3 = true; } - // This variable means so many fucking things for different NPCs - // Such as npc spawn timer, projectile timer, ect - // From what I can gather, the ai2 value's max for spawning things also varies - // As a result, I'll just leave this as flag7. If anyone has - // Ideas for a better variable name, please change it - bool flag7 = npc.ai[2] <= 0f; + bool npcTimer = npc.ai[2] <= 0f; if (npcType <= NPCID.RayGunner) { if (npcType <= NPCID.PirateCaptain) @@ -1126,7 +1121,7 @@ namespace CalamityMod.NPCs //& and && (same with | and ||) with booleans, // I'd greatly appreciate it PrepareToShoot: - if (!ableToAlterAI3 & flag7) + if (!ableToAlterAI3 & npcTimer) { if (npc.velocity.Y == 0f && ((npc.velocity.X > 0f && npc.direction < 0) || (npc.velocity.X < 0f && npc.direction > 0))) { @@ -2509,17 +2504,17 @@ namespace CalamityMod.NPCs { bool npcAllowedToShoot = npcType == NPCID.BrainScrambler || npcType == NPCID.RayGunner || npcType == NPCID.MartianWalker; bool isAlienQueen = npcType == NPCID.VortexHornetQueen; - bool flag18 = true; - int num136 = -1; - int num137 = -1; + bool canShootAtTarget = true; + int stardustGateValue = -1; + int stardustGateValueAdd = -1; if (npcType == NPCID.StardustSoldier) { npcAllowedToShoot = true; - num136 = 90; - num137 = 90; + stardustGateValue = 90; + stardustGateValueAdd = 90; if (npc.ai[1] <= 150f) { - flag18 = false; + canShootAtTarget = false; } } if (npc.confused) @@ -2623,85 +2618,85 @@ namespace CalamityMod.NPCs } } attackTimeMax = (int)(attackTimeMax * 0.75); - int num139 = attackTimeMax / 2; + int modifiedAttackTime = attackTimeMax / 2; if (npcType == NPCID.NebulaSoldier) { - num139 = attackTimeMax - 1; + modifiedAttackTime = attackTimeMax - 1; } if (npcType == NPCID.VortexHornetQueen) { - num139 = attackTimeMax - 1; + modifiedAttackTime = attackTimeMax - 1; } if (npc.ai[2] > 0f) { - if (flag18) + if (canShootAtTarget) { npc.TargetClosest(true); } - if (npc.ai[1] == (float)num139) + if (npc.ai[1] == (float)modifiedAttackTime) { if (npcType == NPCID.PirateCaptain) { npc.localAI[2] += 1f; } - float num140 = CalamityWorld.death ? 6f : 11f; + float projSpeed = CalamityWorld.death ? 6f : 11f; if (npcType == NPCID.GoblinArcher) { - num140 = CalamityWorld.death ? 5f : 9f; + projSpeed = CalamityWorld.death ? 5f : 9f; } if (npcType == NPCID.IcyMerman) { - num140 = CalamityWorld.death ? 4f : 7f; + projSpeed = CalamityWorld.death ? 4f : 7f; } if (npcType == NPCID.Paladin) { - num140 = CalamityWorld.death ? 5f : 9f; + projSpeed = CalamityWorld.death ? 5f : 9f; } if (npcType == NPCID.SkeletonCommando) { - num140 = CalamityWorld.death ? 2.5f : 4f; + projSpeed = CalamityWorld.death ? 2.5f : 4f; } if (npcType == NPCID.PirateDeadeye) { - num140 = CalamityWorld.death ? 8f : 14f; + projSpeed = CalamityWorld.death ? 8f : 14f; } if (npcType == NPCID.PirateCrossbower) { - num140 = CalamityWorld.death ? 9f : 16f; + projSpeed = CalamityWorld.death ? 9f : 16f; } if (npcType == NPCID.RayGunner) { - num140 = CalamityWorld.death ? 4f : 7f; + projSpeed = CalamityWorld.death ? 4f : 7f; } if (npcType == NPCID.MartianWalker) { - num140 = CalamityWorld.death ? 5f : 8f; + projSpeed = CalamityWorld.death ? 5f : 8f; } if (npcType == NPCID.StardustSpiderBig) { - num140 = 4f; + projSpeed = 4f; } if (npcType >= 449 && npcType <= 452) { - num140 = CalamityWorld.death ? 4f : 7f; + projSpeed = CalamityWorld.death ? 4f : 7f; } if (npcType == NPCID.GreekSkeleton) { - num140 = CalamityWorld.death ? 5f : 8f; + projSpeed = CalamityWorld.death ? 5f : 8f; } if (npcType == NPCID.DrManFly) { - num140 = CalamityWorld.death ? 4.5f : 7.5f; + projSpeed = CalamityWorld.death ? 4.5f : 7.5f; } if (npcType == NPCID.StardustSoldier) { - num140 = 1f; + projSpeed = 1f; } if (npcType >= 498 && npcType <= 506) { - num140 = CalamityWorld.death ? 4f : 7f; + projSpeed = CalamityWorld.death ? 4f : 7f; } - num140 *= 1.25f; + projSpeed *= 1.25f; Vector2 spawnPosition = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); if (npcType == NPCID.GreekSkeleton) { @@ -2732,43 +2727,43 @@ namespace CalamityMod.NPCs spawnPosition += new Vector2((float)(npc.spriteDirection * 2), -12f); } float distX = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - spawnPosition.X; - float num142 = Math.Abs(distX) * 0.1f; + float projOffset = Math.Abs(distX) * 0.1f; if (npcType == NPCID.SkeletonSniper || npcType == NPCID.TacticalSkeleton) { - num142 = 0f; + projOffset = 0f; } if (npcType == NPCID.PirateCrossbower) { - num142 = Math.Abs(distX) * 0.08f; + projOffset = Math.Abs(distX) * 0.08f; } if (npcType == NPCID.PirateDeadeye || (npcType == NPCID.PirateCaptain && !priateCaptainBoost)) { - num142 = 0f; + projOffset = 0f; } if (npcType == NPCID.BrainScrambler || npcType == NPCID.RayGunner || npcType == NPCID.MartianWalker) { - num142 = 0f; + projOffset = 0f; } if (npcType >= 449 && npcType <= 452) { - num142 = Math.Abs(distX) * (float)Main.rand.Next(10, 50) * 0.01f; + projOffset = Math.Abs(distX) * (float)Main.rand.Next(10, 50) * 0.01f; } if (npcType == NPCID.DrManFly) { - num142 = Math.Abs(distX) * (float)Main.rand.Next(10, 50) * 0.01f; + projOffset = Math.Abs(distX) * (float)Main.rand.Next(10, 50) * 0.01f; } if (npcType == NPCID.GreekSkeleton) { - num142 = Math.Abs(distX) * (float)Main.rand.Next(-10, 11) * 0.0035f; + projOffset = Math.Abs(distX) * (float)Main.rand.Next(-10, 11) * 0.0035f; } if (npcType >= 498 && npcType <= 506) { - num142 = Math.Abs(distX) * (float)Main.rand.Next(1, 11) * 0.0025f; + projOffset = Math.Abs(distX) * (float)Main.rand.Next(1, 11) * 0.0025f; } - float distY = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - spawnPosition.Y - num142; + float distY = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - spawnPosition.Y - projOffset; float magnitude = (float)Math.Sqrt((distX * distX + distY * distY)); npc.netUpdate = true; - magnitude = num140 / magnitude; + magnitude = projSpeed / magnitude; distX *= magnitude; distY *= magnitude; int damage = 35; @@ -2980,7 +2975,7 @@ namespace CalamityMod.NPCs npc.ai[2] = 0f; npc.ai[1] = 0f; } - else if (!npcAllowedToShoot || (num136 != -1 && npc.ai[1] >= (float)num136 && npc.ai[1] < (float)(num136 + num137) && (!isAlienQueen || npc.velocity.Y == 0f))) + else if (!npcAllowedToShoot || (stardustGateValue != -1 && npc.ai[1] >= (float)stardustGateValue && npc.ai[1] < (float)(stardustGateValue + stardustGateValueAdd) && (!isAlienQueen || npc.velocity.Y == 0f))) { npc.velocity.X *= 0.9f; npc.spriteDirection = npc.direction; @@ -3004,10 +2999,10 @@ namespace CalamityMod.NPCs } if (canAttack) { - Vector2 vector23 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float distX = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector23.X; + Vector2 projSpawnPosition = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + float distX = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - projSpawnPosition.X; float distXAbsolute = Math.Abs(distX) * 0.1f; - float distY = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - vector23.Y - distXAbsolute; + float distY = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - projSpawnPosition.Y - distXAbsolute; distX += (float)Main.rand.Next(-40, 41); distY += (float)Main.rand.Next(-40, 41); float playerDistance = (float)Math.Sqrt(distX * distX + distY * distY); @@ -3076,7 +3071,7 @@ namespace CalamityMod.NPCs } } - if (npc.ai[2] <= 0f || (npcAllowedToShoot && (num136 == -1 || npc.ai[1] < (float)num136 || npc.ai[1] >= (float)(num136 + num137)))) + if (npc.ai[2] <= 0f || (npcAllowedToShoot && (stardustGateValue == -1 || npc.ai[1] < (float)stardustGateValue || npc.ai[1] >= (float)(stardustGateValue + stardustGateValueAdd)))) { float maxVelocity = 1f; float acceleration = 0.07f; @@ -3175,12 +3170,12 @@ namespace CalamityMod.NPCs Vector2 spawnPosition = new Vector2(npc.position.X + (float)npc.width * 0.5f - (float)(npc.direction * 24), npc.position.Y + 4f); int velocityX = 3 * npc.direction; int velocityY = -5; - int num160 = Projectile.NewProjectile(npc.GetSource_FromAI(), spawnPosition.X, spawnPosition.Y, velocityX, velocityY, ProjectileID.HappyBomb, 0, 0f, Main.myPlayer, 0f, 0f); - Main.projectile[num160].timeLeft = 300; + int clownBomb = Projectile.NewProjectile(npc.GetSource_FromAI(), spawnPosition.X, spawnPosition.Y, velocityX, velocityY, ProjectileID.HappyBomb, 0, 0f, Main.myPlayer, 0f, 0f); + Main.projectile[clownBomb].timeLeft = 300; if (CalamityWorld.death) { - Main.projectile[num160].extraUpdates += 1; - Main.projectile[num160].timeLeft = 600; + Main.projectile[clownBomb].extraUpdates += 1; + Main.projectile[clownBomb].timeLeft = 600; } npc.ai[2] = 0f; } @@ -3336,26 +3331,26 @@ namespace CalamityMod.NPCs { if (Main.tile[x, y - 1].TileType == TileID.ClosedDoor) { - bool flag24 = WorldGen.OpenDoor(x, y - 1, npc.direction); - if (!flag24) + bool canOpenDoor = WorldGen.OpenDoor(x, y - 1, npc.direction); + if (!canOpenDoor) { npc.ai[3] = (float)aiGateValue; npc.netUpdate = true; } - if (Main.netMode == NetmodeID.Server & flag24) + if (Main.netMode == NetmodeID.Server & canOpenDoor) { NetMessage.SendData(MessageID.ToggleDoorState, -1, -1, null, 0, (float)x, (float)(y - 1), (float)npc.direction, 0, 0, 0); } } if (Main.tile[x, y - 1].TileType == TileID.TallGateClosed) { - bool flag25 = WorldGen.ShiftTallGate(x, y - 1, false); - if (!flag25) + bool canOpenTallGate = WorldGen.ShiftTallGate(x, y - 1, false); + if (!canOpenTallGate) { npc.ai[3] = (float)aiGateValue; npc.netUpdate = true; } - if (Main.netMode == NetmodeID.Server & flag25) + if (Main.netMode == NetmodeID.Server & canOpenTallGate) { NetMessage.SendData(MessageID.ToggleDoorState, -1, -1, null, 4, (float)x, (float)(y - 1), 0f, 0, 0, 0); } @@ -3473,25 +3468,25 @@ namespace CalamityMod.NPCs { tryCount++; int randX = Main.rand.Next(tileCoordsX - maxDistanceX, tileCoordsX + maxDistanceX); - for (int num181 = Main.rand.Next(tileCoordsY - maxDistanceX, tileCoordsY + maxDistanceX); num181 < tileCoordsY + maxDistanceX; num181++) + for (int t = Main.rand.Next(tileCoordsY - maxDistanceX, tileCoordsY + maxDistanceX); t < tileCoordsY + maxDistanceX; t++) { - if ((num181 < tileCoordsY - 4 || num181 > tileCoordsY + 4 || randX < tileCoordsX - 4 || randX > tileCoordsX + 4) && (num181 < tileCoordsY2 - 1 || num181 > tileCoordsY2 + 1 || randX < tileCoordsX2 - 1 || randX > tileCoordsX2 + 1) && Main.tile[randX, num181].HasUnactuatedTile) + if ((t < tileCoordsY - 4 || t > tileCoordsY + 4 || randX < tileCoordsX - 4 || randX > tileCoordsX + 4) && (t < tileCoordsY2 - 1 || t > tileCoordsY2 + 1 || randX < tileCoordsX2 - 1 || randX > tileCoordsX2 + 1) && Main.tile[randX, t].HasUnactuatedTile) { bool foundGoodTeleport = true; // I don't understand why the hell this exists if it's only for Chaos Elementals, but I suppose I'll // Leave it here - if (npcType == NPCID.DarkCaster && Main.tile[randX, num181 - 1].WallType == WallID.None) + if (npcType == NPCID.DarkCaster && Main.tile[randX, t - 1].WallType == WallID.None) { foundGoodTeleport = false; } - else if (Main.tile[randX, num181 - 1].LiquidType == LiquidID.Lava) + else if (Main.tile[randX, t - 1].LiquidType == LiquidID.Lava) { foundGoodTeleport = false; } - if (foundGoodTeleport && Main.tileSolid[(int)Main.tile[randX, num181].TileType] && !Collision.SolidTiles(randX - 1, randX + 1, num181 - 4, num181 - 1)) + if (foundGoodTeleport && Main.tileSolid[(int)Main.tile[randX, t].TileType] && !Collision.SolidTiles(randX - 1, randX + 1, t - 4, t - 1)) { npc.position.X = (float)(randX * 16 - npc.width / 2); - npc.position.Y = (float)(num181 * 16 - npc.height); + npc.position.Y = (float)(t * 16 - npc.height); npc.netUpdate = true; npc.ai[3] = -30f; } @@ -3540,11 +3535,11 @@ namespace CalamityMod.NPCs { for (int j = 0; j < 2; j++) { - Dust dust2 = Dust.NewDustDirect(npc.position, npc.width, npc.height, 5); - dust2.velocity *= 1f; - dust2.scale = 1f + Main.rand.NextFloat() * 0.5f; - dust2.fadeIn = 1.5f + Main.rand.NextFloat() * 0.5f; - dust2.velocity += npc.velocity * 0.3f; + Dust eyeFishDust = Dust.NewDustDirect(npc.position, npc.width, npc.height, 5); + eyeFishDust.velocity *= 1f; + eyeFishDust.scale = 1f + Main.rand.NextFloat() * 0.5f; + eyeFishDust.fadeIn = 1.5f + Main.rand.NextFloat() * 0.5f; + eyeFishDust.velocity += npc.velocity * 0.3f; } } @@ -3556,35 +3551,35 @@ namespace CalamityMod.NPCs if (targetData.Type == NPCTargetType.Player) targetDead = Main.player[npc.target].dead; - float num = 6f; - float num2 = 0.05f; + float maxVelocity = 6f; + float acceleration = 0.05f; if (npc.type == NPCID.EaterofSouls || npc.type == NPCID.Crimera) { - num = 4f; - num2 = 0.035f; + maxVelocity = 4f; + acceleration = 0.035f; } else if (npc.type == NPCID.Corruptor) { - num = 4.2f; - num2 = 0.022f; + maxVelocity = 4.2f; + acceleration = 0.022f; } else if (npc.type == NPCID.BloodSquid) { - num = 6f; - num2 = 0.1f; + maxVelocity = 6f; + acceleration = 0.1f; } else if (npc.type == NPCID.Hornet || (npc.type >= NPCID.HornetFatty && npc.type <= NPCID.HornetStingy)) { - num = 3.5f; - num2 = 0.021f; + maxVelocity = 3.5f; + acceleration = 0.021f; if (npc.type == NPCID.HornetFatty) { - num = 3f; - num2 = 0.017f; + maxVelocity = 3f; + acceleration = 0.017f; } - num *= 1f - npc.scale; - num2 *= 1f - npc.scale; + maxVelocity *= 1f - npc.scale; + acceleration *= 1f - npc.scale; if ((double)(npc.position.Y / 16f) < Main.worldSurface) { if (Main.player[npc.target].position.Y - npc.position.Y > 300f && npc.velocity.Y < 0f) @@ -3596,36 +3591,36 @@ namespace CalamityMod.NPCs } else if (npc.type == NPCID.MossHornet) { - num = 4f; - num2 = 0.017f; + maxVelocity = 4f; + acceleration = 0.017f; } else if (npc.type == NPCID.Parrot) { if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) { - num = 6f; - num2 = 0.1f; + maxVelocity = 6f; + acceleration = 0.1f; } else { - num2 = 0.01f; - num = 2f; + acceleration = 0.01f; + maxVelocity = 2f; } } else if (npc.type == NPCID.Moth) { - num = 7f; - num2 = 0.06f; + maxVelocity = 7f; + acceleration = 0.06f; } else if (npc.type == NPCID.MeteorHead) { - num = 2f; - num2 = 0.05f; + maxVelocity = 2f; + acceleration = 0.05f; } else if (npc.type == NPCID.ServantofCthulhu) { - num = 5f; - num2 = 0.03f; + maxVelocity = 5f; + acceleration = 0.03f; } else if (npc.type == NPCID.Bee || npc.type == NPCID.BeeSmall) { @@ -3635,10 +3630,10 @@ namespace CalamityMod.NPCs float originalFlyAwayVelocity = 6f; float flyAwayDistance = originalFlyAwayTime * originalFlyAwayVelocity; float flyAwayVelocity = flyAwayDistance / flyAwayTime; - float num3 = (npc.ai[1] - flyAwayTime) / flyAwayTime; - if (num3 > 1f) + float flyAwayAccel = (npc.ai[1] - flyAwayTime) / flyAwayTime; + if (flyAwayAccel > 1f) { - num3 = 1f; + flyAwayAccel = 1f; } else { @@ -3655,47 +3650,47 @@ namespace CalamityMod.NPCs npc.velocity.Y = -flyAwayVelocity; } - num = 5f; - num2 = 0.1f; - num2 *= num3; + maxVelocity = 5f; + acceleration = 0.1f; + acceleration *= flyAwayAccel; } - num *= 1.25f; - num2 *= 1.25f; + maxVelocity *= 1.25f; + acceleration *= 1.25f; if (CalamityWorld.death) { - num *= 1.25f; - num2 *= 1.25f; + maxVelocity *= 1.25f; + acceleration *= 1.25f; } Vector2 vector = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float num4 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2); - float num5 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2); - num4 = (float)((int)(num4 / 8f) * 8); - num5 = (float)((int)(num5 / 8f) * 8); + float targetXDist = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2); + float targetYDist = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2); + targetXDist = (float)((int)(targetXDist / 8f) * 8); + targetYDist = (float)((int)(targetYDist / 8f) * 8); vector.X = (float)((int)(vector.X / 8f) * 8); vector.Y = (float)((int)(vector.Y / 8f) * 8); - num4 -= vector.X; - num5 -= vector.Y; - float num6 = (float)Math.Sqrt((double)(num4 * num4 + num5 * num5)); - float num7 = num6; + targetXDist -= vector.X; + targetYDist -= vector.Y; + float targetDistance = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); + float targetDistCheck = targetDistance; bool flag = false; - if (num6 > 600f) + if (targetDistance > 600f) { flag = true; } - if (num6 == 0f) + if (targetDistance == 0f) { - num4 = npc.velocity.X; - num5 = npc.velocity.Y; + targetXDist = npc.velocity.X; + targetYDist = npc.velocity.Y; } else { - num6 = num / num6; - num4 *= num6; - num5 *= num6; + targetDistance = maxVelocity / targetDistance; + targetXDist *= targetDistance; + targetYDist *= targetDistance; } if (npc.type == NPCID.Hornet || npc.type == NPCID.MossHornet || (npc.type >= NPCID.HornetFatty && npc.type <= NPCID.HornetStingy) || npc.type == NPCID.EaterofSouls || npc.type == NPCID.Corruptor || npc.type == NPCID.Probe || npc.type == NPCID.Crimera || npc.type == NPCID.Moth || npc.type == NPCID.Bee || npc.type == NPCID.BeeSmall || npc.type == NPCID.BloodSquid) { - if (num7 > 100f || npc.type == NPCID.Corruptor || npc.type == NPCID.Bee || npc.type == NPCID.BeeSmall || npc.type == NPCID.BloodSquid || npc.type == NPCID.Hornet || npc.type == NPCID.MossHornet || (npc.type >= NPCID.HornetFatty && npc.type <= NPCID.HornetStingy)) + if (targetDistCheck > 100f || npc.type == NPCID.Corruptor || npc.type == NPCID.Bee || npc.type == NPCID.BeeSmall || npc.type == NPCID.BloodSquid || npc.type == NPCID.Hornet || npc.type == NPCID.MossHornet || (npc.type >= NPCID.HornetFatty && npc.type <= NPCID.HornetStingy)) { npc.ai[0] += 1f; if (npc.ai[0] > 0f) @@ -3719,60 +3714,60 @@ namespace CalamityMod.NPCs npc.ai[0] = -200f; } } - if (num7 < 150f && (npc.type == NPCID.EaterofSouls || npc.type == NPCID.Corruptor || npc.type == NPCID.Crimera || npc.type == NPCID.BloodSquid)) + if (targetDistCheck < 150f && (npc.type == NPCID.EaterofSouls || npc.type == NPCID.Corruptor || npc.type == NPCID.Crimera || npc.type == NPCID.BloodSquid)) { - npc.velocity.X = npc.velocity.X + num4 * 0.009f; - npc.velocity.Y = npc.velocity.Y + num5 * 0.009f; + npc.velocity.X = npc.velocity.X + targetXDist * 0.009f; + npc.velocity.Y = npc.velocity.Y + targetYDist * 0.009f; } } if (targetDead) { - num4 = (float)npc.direction * num / 2f; - num5 = -num / 2f; + targetXDist = (float)npc.direction * maxVelocity / 2f; + targetYDist = -maxVelocity / 2f; } - if (npc.velocity.X < num4) + if (npc.velocity.X < targetXDist) { - npc.velocity.X = npc.velocity.X + num2; - if (npc.type != NPCID.Crimera && npc.type != NPCID.EaterofSouls && npc.type != NPCID.Corruptor && npc.type != NPCID.Probe && npc.type != NPCID.BloodSquid && npc.velocity.X < 0f && num4 > 0f) + npc.velocity.X = npc.velocity.X + acceleration; + if (npc.type != NPCID.Crimera && npc.type != NPCID.EaterofSouls && npc.type != NPCID.Corruptor && npc.type != NPCID.Probe && npc.type != NPCID.BloodSquid && npc.velocity.X < 0f && targetXDist > 0f) { - npc.velocity.X = npc.velocity.X + num2; + npc.velocity.X = npc.velocity.X + acceleration; } } - else if (npc.velocity.X > num4) + else if (npc.velocity.X > targetXDist) { - npc.velocity.X = npc.velocity.X - num2; - if (npc.type != NPCID.Crimera && npc.type != NPCID.EaterofSouls && npc.type != NPCID.Corruptor && npc.type != NPCID.Probe && npc.type != NPCID.BloodSquid && npc.velocity.X > 0f && num4 < 0f) + npc.velocity.X = npc.velocity.X - acceleration; + if (npc.type != NPCID.Crimera && npc.type != NPCID.EaterofSouls && npc.type != NPCID.Corruptor && npc.type != NPCID.Probe && npc.type != NPCID.BloodSquid && npc.velocity.X > 0f && targetXDist < 0f) { - npc.velocity.X = npc.velocity.X - num2; + npc.velocity.X = npc.velocity.X - acceleration; } } - if (npc.velocity.Y < num5) + if (npc.velocity.Y < targetYDist) { - npc.velocity.Y = npc.velocity.Y + num2; - if (npc.type != NPCID.Crimera && npc.type != NPCID.EaterofSouls && npc.type != NPCID.Corruptor && npc.type != NPCID.Probe && npc.type != NPCID.BloodSquid && npc.velocity.Y < 0f && num5 > 0f) + npc.velocity.Y = npc.velocity.Y + acceleration; + if (npc.type != NPCID.Crimera && npc.type != NPCID.EaterofSouls && npc.type != NPCID.Corruptor && npc.type != NPCID.Probe && npc.type != NPCID.BloodSquid && npc.velocity.Y < 0f && targetYDist > 0f) { - npc.velocity.Y = npc.velocity.Y + num2; + npc.velocity.Y = npc.velocity.Y + acceleration; } } - else if (npc.velocity.Y > num5) + else if (npc.velocity.Y > targetYDist) { - npc.velocity.Y = npc.velocity.Y - num2; - if (npc.type != NPCID.Crimera && npc.type != NPCID.EaterofSouls && npc.type != NPCID.Corruptor && npc.type != NPCID.Probe && npc.type != NPCID.BloodSquid && npc.velocity.Y > 0f && num5 < 0f) + npc.velocity.Y = npc.velocity.Y - acceleration; + if (npc.type != NPCID.Crimera && npc.type != NPCID.EaterofSouls && npc.type != NPCID.Corruptor && npc.type != NPCID.Probe && npc.type != NPCID.BloodSquid && npc.velocity.Y > 0f && targetYDist < 0f) { - npc.velocity.Y = npc.velocity.Y - num2; + npc.velocity.Y = npc.velocity.Y - acceleration; } } if (npc.type == NPCID.MeteorHead) { - if (num4 > 0f) + if (targetXDist > 0f) { npc.spriteDirection = 1; - npc.rotation = (float)Math.Atan2((double)num5, (double)num4); + npc.rotation = (float)Math.Atan2((double)targetYDist, (double)targetXDist); } - else if (num4 < 0f) + else if (targetXDist < 0f) { npc.spriteDirection = -1; - npc.rotation = (float)Math.Atan2((double)num5, (double)num4) + MathHelper.Pi; + npc.rotation = (float)Math.Atan2((double)targetYDist, (double)targetXDist) + MathHelper.Pi; } } else if (npc.type == NPCID.Probe) @@ -3786,33 +3781,33 @@ namespace CalamityMod.NPCs npc.localAI[0] = 0f; if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) { - int num8 = 22; - int num9 = 84; - Projectile.NewProjectile(npc.GetSource_FromAI(), vector.X, vector.Y, num4, num5, num9, num8, 0f, Main.myPlayer, 0f, 0f); + int projDamage = 22; + int projType = 84; + Projectile.NewProjectile(npc.GetSource_FromAI(), vector.X, vector.Y, targetXDist, targetYDist, projType, projDamage, 0f, Main.myPlayer, 0f, 0f); } } - int arg_A81_0 = (int)npc.position.X + npc.width / 2; - int num10 = (int)npc.position.Y + npc.height / 2; - int arg_A8B_0 = arg_A81_0 / 16; - num10 /= 16; - if (!WorldGen.SolidTile(arg_A8B_0, num10)) + int npcXPos = (int)npc.position.X + npc.width / 2; + int npcTileY = (int)npc.position.Y + npc.height / 2; + int npcTileX = npcXPos / 16; + npcTileY /= 16; + if (!WorldGen.SolidTile(npcTileX, npcTileY)) { Lighting.AddLight((int)((npc.position.X + (float)(npc.width / 2)) / 16f), (int)((npc.position.Y + (float)(npc.height / 2)) / 16f), 0.3f, 0.1f, 0.05f); } - if (num4 > 0f) + if (targetXDist > 0f) { npc.spriteDirection = 1; - npc.rotation = (float)Math.Atan2((double)num5, (double)num4); + npc.rotation = (float)Math.Atan2((double)targetYDist, (double)targetXDist); } - if (num4 < 0f) + if (targetXDist < 0f) { npc.spriteDirection = -1; - npc.rotation = (float)Math.Atan2((double)num5, (double)num4) + MathHelper.Pi; + npc.rotation = (float)Math.Atan2((double)targetYDist, (double)targetXDist) + MathHelper.Pi; } } else if (npc.type == NPCID.EaterofSouls || npc.type == NPCID.Corruptor || npc.type == NPCID.Crimera || npc.type == NPCID.BloodSquid) { - npc.rotation = (float)Math.Atan2((double)num5, (double)num4) - MathHelper.PiOver2; + npc.rotation = (float)Math.Atan2((double)targetYDist, (double)targetXDist) - MathHelper.PiOver2; } else if (npc.type == NPCID.Moth || npc.type == NPCID.Hornet || npc.type == NPCID.MossHornet || (npc.type >= NPCID.HornetFatty && npc.type <= NPCID.HornetStingy)) { @@ -3832,15 +3827,15 @@ namespace CalamityMod.NPCs } if (npc.type == NPCID.Hornet || npc.type == NPCID.MossHornet || (npc.type >= NPCID.HornetFatty && npc.type <= NPCID.HornetStingy) || npc.type == NPCID.EaterofSouls || npc.type == NPCID.MeteorHead || npc.type == NPCID.Corruptor || npc.type == NPCID.Probe || npc.type == NPCID.Crimera || npc.type == NPCID.Moth || npc.type == NPCID.Bee || npc.type == NPCID.BeeSmall || npc.type == NPCID.BloodSquid) { - float num11 = 0.7f; + float reboundSpeed = 0.7f; if (npc.type == NPCID.EaterofSouls || npc.type == NPCID.Crimera) { - num11 = 0.4f; + reboundSpeed = 0.4f; } if (npc.collideX) { npc.netUpdate = true; - npc.velocity.X = npc.oldVelocity.X * -num11; + npc.velocity.X = npc.oldVelocity.X * -reboundSpeed; if (npc.direction == -1 && npc.velocity.X > 0f && npc.velocity.X < 2f) { npc.velocity.X = 2f; @@ -3853,7 +3848,7 @@ namespace CalamityMod.NPCs if (npc.collideY) { npc.netUpdate = true; - npc.velocity.Y = npc.oldVelocity.Y * -num11; + npc.velocity.Y = npc.oldVelocity.Y * -reboundSpeed; if (npc.velocity.Y > 0f && (double)npc.velocity.Y < 1.5) { npc.velocity.Y = 2f; @@ -3865,34 +3860,34 @@ namespace CalamityMod.NPCs } if (npc.type == NPCID.BloodSquid) { - int num13 = Dust.NewDust(npc.position, npc.width, npc.height, 5, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100); - Main.dust[num13].velocity *= 0.5f; + int bloodDust = Dust.NewDust(npc.position, npc.width, npc.height, 5, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100); + Main.dust[bloodDust].velocity *= 0.5f; } else if (npc.type == NPCID.MeteorHead) { - int num12 = Dust.NewDust(new Vector2(npc.position.X - npc.velocity.X, npc.position.Y - npc.velocity.Y), npc.width, npc.height, 6, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 2f); - Dust dust = Main.dust[num12]; + int meteorDust = Dust.NewDust(new Vector2(npc.position.X - npc.velocity.X, npc.position.Y - npc.velocity.Y), npc.width, npc.height, 6, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 2f); + Dust dust = Main.dust[meteorDust]; dust.noGravity = true; dust.velocity.X *= 0.3f; dust.velocity.Y *= 0.3f; } else if (npc.type != NPCID.Probe && npc.type != NPCID.Moth && npc.type != NPCID.Parrot && npc.type != NPCID.Bee && npc.type != NPCID.BeeSmall && Main.rand.NextBool(20)) { - int num13 = 18; + int dustType = 18; if (npc.type == NPCID.Crimera) { - num13 = 5; + dustType = 5; } - int num14 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + (float)npc.height * 0.25f), npc.width, (int)((float)npc.height * 0.5f), num13, npc.velocity.X, 2f, 75, npc.color, npc.scale); - Dust dust = Main.dust[num14]; + int idleDust = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + (float)npc.height * 0.25f), npc.width, (int)((float)npc.height * 0.5f), dustType, npc.velocity.X, 2f, 75, npc.color, npc.scale); + Dust dust = Main.dust[idleDust]; dust.velocity.X *= 0.5f; dust.velocity.Y *= 0.1f; } } else if (npc.type != NPCID.Parrot && Main.rand.NextBool(40)) { - int num15 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + (float)npc.height * 0.25f), npc.width, (int)((float)npc.height * 0.5f), 5, npc.velocity.X, 2f, 0, default(Color), 1f); - Dust dust = Main.dust[num15]; + int otherIdleDust = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + (float)npc.height * 0.25f), npc.width, (int)((float)npc.height * 0.5f), 5, npc.velocity.X, 2f, 0, default(Color), 1f); + Dust dust = Main.dust[otherIdleDust]; dust.velocity.X *= 0.5f; dust.velocity.Y *= 0.1f; } @@ -3949,24 +3944,24 @@ namespace CalamityMod.NPCs { if (targetData.Type != 0 && Collision.CanHit(npc, targetData)) { - float num17 = (CalamityWorld.death || Main.hardMode) ? 5f : 8f; - Vector2 vector2 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height / 2); - float num18 = targetData.Center.X - vector2.X; - float num19 = targetData.Center.Y - vector2.Y; - if ((num18 < 0f && npc.velocity.X < 0f) || (num18 > 0f && npc.velocity.X > 0f)) + float projSpeed = (CalamityWorld.death || Main.hardMode) ? 5f : 8f; + Vector2 projSpawnPosition = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height / 2); + float projTargetXDist = targetData.Center.X - projSpawnPosition.X; + float projTargetYDist = targetData.Center.Y - projSpawnPosition.Y; + if ((projTargetXDist < 0f && npc.velocity.X < 0f) || (projTargetXDist > 0f && npc.velocity.X > 0f)) { - float num20 = (float)Math.Sqrt(num18 * num18 + num19 * num19); - num20 = num17 / num20; - num18 *= num20; - num19 *= num20; - int num21 = (int)(10f * npc.scale); + float projTargetDistance = (float)Math.Sqrt(projTargetXDist * projTargetXDist + projTargetYDist * projTargetYDist); + projTargetDistance = projSpeed / projTargetDistance; + projTargetXDist *= projTargetDistance; + projTargetYDist *= projTargetDistance; + int projDamage = (int)(10f * npc.scale); if (npc.type == NPCID.MossHornet) - num21 = (int)(30f * npc.scale); + projDamage = (int)(30f * npc.scale); - int num22 = ProjectileID.Stinger; - int num23 = Projectile.NewProjectile(npc.GetSource_FromAI(), vector2.X, vector2.Y, num18, num19, num22, num21, 0f, Main.myPlayer); - Main.projectile[num23].timeLeft = (CalamityWorld.death || Main.hardMode) ? 600 : 300; - Main.projectile[num23].extraUpdates += (CalamityWorld.death || Main.hardMode) ? 1 : 0; + int stingerType = ProjectileID.Stinger; + int stingerSpawn = Projectile.NewProjectile(npc.GetSource_FromAI(), projSpawnPosition.X, projSpawnPosition.Y, projTargetXDist, projTargetYDist, stingerType, projDamage, 0f, Main.myPlayer); + Main.projectile[stingerSpawn].timeLeft = (CalamityWorld.death || Main.hardMode) ? 600 : 300; + Main.projectile[stingerSpawn].extraUpdates += (CalamityWorld.death || Main.hardMode) ? 1 : 0; npc.ai[1] = 301f; npc.netUpdate = true; } @@ -3981,7 +3976,7 @@ namespace CalamityMod.NPCs if (npc.type == NPCID.Probe & flag) { - if ((npc.velocity.X > 0f && num4 > 0f) || (npc.velocity.X < 0f && num4 < 0f)) + if ((npc.velocity.X > 0f && targetXDist > 0f) || (npc.velocity.X < 0f && targetXDist < 0f)) { if (Math.Abs(npc.velocity.X) < 12f) npc.velocity.X = npc.velocity.X * 1.05f; @@ -4037,12 +4032,12 @@ namespace CalamityMod.NPCs { if ((npc.Center - targetData.Center).Length() < 400f) { - Vector2 vector3 = npc.DirectionTo(new Vector2(targetData.Center.X, targetData.Position.Y)); - npc.velocity = -vector3 * 5f; + Vector2 bloodShotPosition = npc.DirectionTo(new Vector2(targetData.Center.X, targetData.Position.Y)); + npc.velocity = -bloodShotPosition * 5f; npc.netUpdate = true; npc.localAI[0] = 0f; - vector3 = npc.DirectionTo(new Vector2(targetData.Center.X, targetData.Position.Y)); - int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, vector3 * (CalamityWorld.death ? 6f : 10f), ProjectileID.BloodShot, 50, 1f, Main.myPlayer); + bloodShotPosition = npc.DirectionTo(new Vector2(targetData.Center.X, targetData.Position.Y)); + int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, bloodShotPosition * (CalamityWorld.death ? 6f : 10f), ProjectileID.BloodShot, 50, 1f, Main.myPlayer); if (CalamityWorld.death) { Main.projectile[proj].extraUpdates += 1; @@ -4060,7 +4055,7 @@ namespace CalamityMod.NPCs if ((Main.dayTime && npc.type != NPCID.Crimera && npc.type != NPCID.EaterofSouls && npc.type != NPCID.MeteorHead && npc.type != NPCID.Bee && npc.type != NPCID.BeeSmall && npc.type != NPCID.Corruptor && npc.type != NPCID.Moth && npc.type != NPCID.Parrot && npc.type != NPCID.BloodSquid) || Main.player[npc.target].dead) { - npc.velocity.Y = npc.velocity.Y - num2 * 2f; + npc.velocity.Y = npc.velocity.Y - acceleration * 2f; if (npc.timeLeft > 10) npc.timeLeft = 10; } @@ -4079,14 +4074,14 @@ namespace CalamityMod.NPCs { npc.localAI[1] = 1f; SoundEngine.PlaySound(SoundID.NPCDeath13, npc.position); - int num = 1; + int dustVelocity = 1; if (npc.velocity.X < 0f) { - num = -1; + dustVelocity = -1; } for (int i = 0; i < 20; i++) { - Dust.NewDust(new Vector2(npc.position.X - 20f, npc.position.Y - 20f), npc.width + 40, npc.height + 40, 5, (float)(num * 8), -1f, 0, default(Color), 1f); + Dust.NewDust(new Vector2(npc.position.X - 20f, npc.position.Y - 20f), npc.width + 40, npc.height + 40, 5, (float)(dustVelocity * 8), -1f, 0, default(Color), 1f); } } @@ -4120,8 +4115,8 @@ namespace CalamityMod.NPCs npc.netUpdate = true; } - bool flag = npc.type == NPCID.GiantWormHead || npc.type == NPCID.BoneSerpentHead || npc.type == NPCID.DiggerHead || npc.type == NPCID.LeechHead || npc.type == NPCID.DuneSplicerHead || (!Main.player[npc.target].ZoneUndergroundDesert && npc.type == NPCID.TombCrawlerHead); - float num4 = npc.type == NPCID.TombCrawlerHead ? 0.1f : 0.2f; + bool wormHead = npc.type == NPCID.GiantWormHead || npc.type == NPCID.BoneSerpentHead || npc.type == NPCID.DiggerHead || npc.type == NPCID.LeechHead || npc.type == NPCID.DuneSplicerHead || (!Main.player[npc.target].ZoneUndergroundDesert && npc.type == NPCID.TombCrawlerHead); + float acceleration = npc.type == NPCID.TombCrawlerHead ? 0.1f : 0.2f; bool isSplittingNPC = (npc.type >= NPCID.DiggerHead && npc.type <= NPCID.DiggerTail) || (npc.type >= NPCID.SeekerHead && npc.type <= NPCID.SeekerTail) || (npc.type >= NPCID.DuneSplicerHead && npc.type <= NPCID.DuneSplicerTail); @@ -4143,20 +4138,20 @@ namespace CalamityMod.NPCs npc.realLife = (int)npc.ai[3]; } - if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || (flag && (double)Main.player[npc.target].position.Y < Main.worldSurface * 16.0)) + if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || (wormHead && (double)Main.player[npc.target].position.Y < Main.worldSurface * 16.0)) { npc.TargetClosest(true); } - if (Main.player[npc.target].dead || (flag && (double)Main.player[npc.target].position.Y < Main.worldSurface * 16.0)) + if (Main.player[npc.target].dead || (wormHead && (double)Main.player[npc.target].position.Y < Main.worldSurface * 16.0)) { if (npc.timeLeft > 300) { npc.timeLeft = 300; } - if (flag) + if (wormHead) { - npc.velocity.Y = npc.velocity.Y + num4; + npc.velocity.Y = npc.velocity.Y + acceleration; } } @@ -4173,33 +4168,33 @@ namespace CalamityMod.NPCs int maxParts = CalamityWorld.death ? 30 : 21; npc.ai[3] = (float)npc.whoAmI; npc.realLife = npc.whoAmI; - int num6 = npc.whoAmI; + int currentNPC = npc.whoAmI; for (int k = 0; k < maxParts; k++) { - int num7 = NPCID.WyvernBody; + int wyvernSegmentType = NPCID.WyvernBody; if (k == 1 || k == 12) { - num7 = NPCID.WyvernLegs; + wyvernSegmentType = NPCID.WyvernLegs; } else if (k == maxParts - 3) { - num7 = NPCID.WyvernBody2; + wyvernSegmentType = NPCID.WyvernBody2; } else if (k == maxParts - 2) { - num7 = NPCID.WyvernBody3; + wyvernSegmentType = NPCID.WyvernBody3; } else if (k == maxParts - 1) { - num7 = NPCID.WyvernTail; + wyvernSegmentType = NPCID.WyvernTail; } - int num8 = NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.position.X + (float)(npc.width / 2)), (int)(npc.position.Y + (float)npc.height), num7, npc.whoAmI, 0f, 0f, 0f, 0f, 255); - Main.npc[num8].ai[3] = (float)npc.whoAmI; - Main.npc[num8].realLife = npc.whoAmI; - Main.npc[num8].ai[1] = (float)num6; - Main.npc[num6].ai[0] = (float)num8; - NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, num8, 0f, 0f, 0f, 0, 0, 0); - num6 = num8; + int wyvernSegment = NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.position.X + (float)(npc.width / 2)), (int)(npc.position.Y + (float)npc.height), wyvernSegmentType, npc.whoAmI, 0f, 0f, 0f, 0f, 255); + Main.npc[wyvernSegment].ai[3] = (float)npc.whoAmI; + Main.npc[wyvernSegment].realLife = npc.whoAmI; + Main.npc[wyvernSegment].ai[1] = (float)currentNPC; + Main.npc[currentNPC].ai[0] = (float)wyvernSegment; + NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, wyvernSegment, 0f, 0f, 0f, 0, 0, 0); + currentNPC = wyvernSegment; } } @@ -4207,22 +4202,22 @@ namespace CalamityMod.NPCs { npc.ai[3] = (float)npc.whoAmI; npc.realLife = npc.whoAmI; - int num12 = npc.whoAmI; - int num13 = Main.rand.Next(11, CalamityWorld.death ? 25 : 15); - for (int m = 0; m < num13; m++) + int currentTombCrawler = npc.whoAmI; + int tombCrawlerSegments = Main.rand.Next(11, CalamityWorld.death ? 25 : 15); + for (int m = 0; m < tombCrawlerSegments; m++) { - int num14 = NPCID.TombCrawlerBody; - if (m == num13 - 1) + int tombCrawlerSegmentType = NPCID.TombCrawlerBody; + if (m == tombCrawlerSegments - 1) { - num14 = NPCID.TombCrawlerTail; + tombCrawlerSegmentType = NPCID.TombCrawlerTail; } - int num15 = NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.position.X + (float)(npc.width / 2)), (int)(npc.position.Y + (float)npc.height), num14, npc.whoAmI, 0f, 0f, 0f, 0f, 255); - Main.npc[num15].ai[3] = (float)npc.whoAmI; - Main.npc[num15].realLife = npc.whoAmI; - Main.npc[num15].ai[1] = (float)num12; - Main.npc[num12].ai[0] = (float)num15; - NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, num15, 0f, 0f, 0f, 0, 0, 0); - num12 = num15; + int tombCrawlerSegment = NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.position.X + (float)(npc.width / 2)), (int)(npc.position.Y + (float)npc.height), tombCrawlerSegmentType, npc.whoAmI, 0f, 0f, 0f, 0f, 255); + Main.npc[tombCrawlerSegment].ai[3] = (float)npc.whoAmI; + Main.npc[tombCrawlerSegment].realLife = npc.whoAmI; + Main.npc[tombCrawlerSegment].ai[1] = (float)currentTombCrawler; + Main.npc[currentTombCrawler].ai[0] = (float)tombCrawlerSegment; + NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, tombCrawlerSegment, 0f, 0f, 0f, 0, 0, 0); + currentTombCrawler = tombCrawlerSegment; } } @@ -4230,22 +4225,22 @@ namespace CalamityMod.NPCs { npc.ai[3] = (float)npc.whoAmI; npc.realLife = npc.whoAmI; - int num20 = npc.whoAmI; - int num21 = CalamityWorld.death ? 70 : 50; - for (int num22 = 0; num22 < num21; num22++) + int projTargetDistance = npc.whoAmI; + int crawltipedeSegments = CalamityWorld.death ? 70 : 50; + for (int n = 0; n < crawltipedeSegments; n++) { - int num23 = NPCID.SolarCrawltipedeBody; - if (num22 == num21 - 1) + int crawltipedeSegmentType = NPCID.SolarCrawltipedeBody; + if (n == crawltipedeSegments - 1) { - num23 = NPCID.SolarCrawltipedeTail; + crawltipedeSegmentType = NPCID.SolarCrawltipedeTail; } - int num24 = NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.position.X + (float)(npc.width / 2)), (int)(npc.position.Y + (float)npc.height), num23, npc.whoAmI, 0f, 0f, 0f, 0f, 255); - Main.npc[num24].ai[3] = (float)npc.whoAmI; - Main.npc[num24].realLife = npc.whoAmI; - Main.npc[num24].ai[1] = (float)num20; - Main.npc[num20].ai[0] = (float)num24; - NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, num24, 0f, 0f, 0f, 0, 0, 0); - num20 = num24; + int crawltipedeSegment = NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.position.X + (float)(npc.width / 2)), (int)(npc.position.Y + (float)npc.height), crawltipedeSegmentType, npc.whoAmI, 0f, 0f, 0f, 0f, 255); + Main.npc[crawltipedeSegment].ai[3] = (float)npc.whoAmI; + Main.npc[crawltipedeSegment].realLife = npc.whoAmI; + Main.npc[crawltipedeSegment].ai[1] = (float)projTargetDistance; + Main.npc[projTargetDistance].ai[0] = (float)crawltipedeSegment; + NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, crawltipedeSegment, 0f, 0f, 0f, 0, 0, 0); + projTargetDistance = crawltipedeSegment; } } @@ -4253,23 +4248,23 @@ namespace CalamityMod.NPCs { npc.ai[3] = npc.whoAmI; npc.realLife = npc.whoAmI; - int num22 = 0; - int num23 = npc.whoAmI; - int num24 = CalamityWorld.death ? 44 : 34; - for (int num25 = 0; num25 < num24; num25++) + int bloodEelSegment = 0; + int currentBloodEel = npc.whoAmI; + int bloodEelSegments = CalamityWorld.death ? 44 : 34; + for (int p = 0; p < bloodEelSegments; p++) { - int num26 = NPCID.BloodEelBody; - if (num25 == num24 - 1) - num26 = NPCID.BloodEelTail; + int bloodEelSegmentType = NPCID.BloodEelBody; + if (p == bloodEelSegments - 1) + bloodEelSegmentType = NPCID.BloodEelTail; - num22 = NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.position.X + (float)(npc.width / 2)), (int)(npc.position.Y + (float)npc.height), num26, npc.whoAmI); - Main.npc[num22].ai[3] = npc.whoAmI; - Main.npc[num22].realLife = npc.whoAmI; - Main.npc[num22].ai[1] = num23; - Main.npc[num22].CopyInteractions(npc); - Main.npc[num23].ai[0] = num22; - NetMessage.SendData(23, -1, -1, null, num22); - num23 = num22; + bloodEelSegment = NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.position.X + (float)(npc.width / 2)), (int)(npc.position.Y + (float)npc.height), bloodEelSegmentType, npc.whoAmI); + Main.npc[bloodEelSegment].ai[3] = npc.whoAmI; + Main.npc[bloodEelSegment].realLife = npc.whoAmI; + Main.npc[bloodEelSegment].ai[1] = currentBloodEel; + Main.npc[bloodEelSegment].CopyInteractions(npc); + Main.npc[currentBloodEel].ai[0] = bloodEelSegment; + NetMessage.SendData(23, -1, -1, null, bloodEelSegment); + currentBloodEel = bloodEelSegment; } } else if ((isSplittingNPCHead || isSplittingNPCBody || npc.type == NPCID.GiantWormHead || npc.type == NPCID.GiantWormBody || npc.type == NPCID.DevourerHead || npc.type == NPCID.DevourerBody || npc.type == NPCID.BoneSerpentHead || npc.type == NPCID.BoneSerpentBody || npc.type == NPCID.LeechHead || npc.type == NPCID.LeechBody) && npc.ai[0] == 0f) @@ -4381,11 +4376,11 @@ namespace CalamityMod.NPCs { npc.type = npc.type - 1; int whoAmI = npc.whoAmI; - float num25 = (float)npc.life / (float)npc.lifeMax; - float num26 = npc.ai[0]; + float currentHealthAmt = (float)npc.life / (float)npc.lifeMax; + float newSegment = npc.ai[0]; npc.SetDefaultsKeepPlayerInteraction(npc.type); - npc.life = (int)((float)npc.lifeMax * num25); - npc.ai[0] = num26; + npc.life = (int)((float)npc.lifeMax * currentHealthAmt); + npc.ai[0] = newSegment; npc.TargetClosest(true); npc.netUpdate = true; npc.whoAmI = whoAmI; @@ -4393,11 +4388,11 @@ namespace CalamityMod.NPCs if (isSplittingNPCBody && (!Main.npc[(int)npc.ai[0]].active || Main.npc[(int)npc.ai[0]].aiStyle != npc.aiStyle)) { int whoAmI2 = npc.whoAmI; - float num27 = (float)npc.life / (float)npc.lifeMax; - float num28 = npc.ai[1]; + float currentHealthAmt2 = (float)npc.life / (float)npc.lifeMax; + float newSegment = npc.ai[1]; npc.SetDefaultsKeepPlayerInteraction(npc.type); - npc.life = (int)((float)npc.lifeMax * num27); - npc.ai[1] = num28; + npc.life = (int)((float)npc.lifeMax * currentHealthAmt2); + npc.ai[1] = newSegment; npc.TargetClosest(true); npc.netUpdate = true; npc.whoAmI = whoAmI2; @@ -4410,61 +4405,61 @@ namespace CalamityMod.NPCs } } - int num29 = (int)(npc.position.X / 16f) - 1; - int num30 = (int)((npc.position.X + (float)npc.width) / 16f) + 2; - int num31 = (int)(npc.position.Y / 16f) - 1; - int num32 = (int)((npc.position.Y + (float)npc.height) / 16f) + 2; - if (num29 < 0) + int tilePositionX = (int)(npc.position.X / 16f) - 1; + int tileWidthPosX = (int)((npc.position.X + (float)npc.width) / 16f) + 2; + int tilePositionY = (int)(npc.position.Y / 16f) - 1; + int tileWidthPosY = (int)((npc.position.Y + (float)npc.height) / 16f) + 2; + if (tilePositionX < 0) { - num29 = 0; + tilePositionX = 0; } - if (num30 > Main.maxTilesX) + if (tileWidthPosX > Main.maxTilesX) { - num30 = Main.maxTilesX; + tileWidthPosX = Main.maxTilesX; } - if (num31 < 0) + if (tilePositionY < 0) { - num31 = 0; + tilePositionY = 0; } - if (num32 > Main.maxTilesY) + if (tileWidthPosY > Main.maxTilesY) { - num32 = Main.maxTilesY; + tileWidthPosY = Main.maxTilesY; } - bool flag2 = false; + bool flying = false; if (npc.type >= NPCID.WyvernHead && npc.type <= NPCID.WyvernTail) { - flag2 = true; + flying = true; } if (npc.type == NPCID.StardustWormHead && npc.ai[1] == -1f) { - flag2 = true; + flying = true; } if (npc.type >= NPCID.SolarCrawltipedeHead && npc.type <= NPCID.SolarCrawltipedeTail) { - flag2 = true; + flying = true; } if (npc.type >= NPCID.BloodEelHead && npc.type <= NPCID.BloodEelTail) { - flag2 = true; + flying = true; } - if (!flag2) + if (!flying) { - for (int num33 = num29; num33 < num30; num33++) + for (int x = tilePositionX; x < tileWidthPosX; x++) { - for (int num34 = num31; num34 < num32; num34++) + for (int y = tilePositionY; y < tileWidthPosY; y++) { - if (Main.tile[num33, num34] != null && ((Main.tile[num33, num34].HasUnactuatedTile && (Main.tileSolid[(int)Main.tile[num33, num34].TileType] || (Main.tileSolidTop[(int)Main.tile[num33, num34].TileType] && Main.tile[num33, num34].TileFrameY == 0))) || Main.tile[num33, num34].LiquidAmount > 64)) + if (Main.tile[x, y] != null && ((Main.tile[x, y].HasUnactuatedTile && (Main.tileSolid[(int)Main.tile[x, y].TileType] || (Main.tileSolidTop[(int)Main.tile[x, y].TileType] && Main.tile[x, y].TileFrameY == 0))) || Main.tile[x, y].LiquidAmount > 64)) { - Vector2 vector; - vector.X = (float)(num33 * 16); - vector.Y = (float)(num34 * 16); - if (npc.position.X + (float)npc.width > vector.X && npc.position.X < vector.X + 16f && npc.position.Y + (float)npc.height > vector.Y && npc.position.Y < vector.Y + 16f) + Vector2 flyingPos; + flyingPos.X = (float)(x * 16); + flyingPos.Y = (float)(y * 16); + if (npc.position.X + (float)npc.width > flyingPos.X && npc.position.X < flyingPos.X + 16f && npc.position.Y + (float)npc.height > flyingPos.Y && npc.position.Y < flyingPos.Y + 16f) { - flag2 = true; - if (Main.rand.NextBool(100) && npc.type != NPCID.LeechHead && Main.tile[num33, num34].HasUnactuatedTile) + flying = true; + if (Main.rand.NextBool(100) && npc.type != NPCID.LeechHead && Main.tile[x, y].HasUnactuatedTile) { - WorldGen.KillTile(num33, num34, true, true, false); + WorldGen.KillTile(x, y, true, true, false); } } } @@ -4472,26 +4467,26 @@ namespace CalamityMod.NPCs } } - if (!flag2 && (isSplittingNPCHead || npc.type == NPCID.GiantWormHead || npc.type == NPCID.DevourerHead || npc.type == NPCID.BoneSerpentHead || npc.type == NPCID.LeechHead || npc.type == NPCID.TombCrawlerHead)) + if (!flying && (isSplittingNPCHead || npc.type == NPCID.GiantWormHead || npc.type == NPCID.DevourerHead || npc.type == NPCID.BoneSerpentHead || npc.type == NPCID.LeechHead || npc.type == NPCID.TombCrawlerHead)) { Rectangle rectangle = new Rectangle((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height); - int num35 = 1000; - bool flag3 = true; - for (int num36 = 0; num36 < Main.maxPlayers; num36++) + int noFlyZone = 1000; + bool outsideNoFlyZone = true; + for (int f = 0; f < Main.maxPlayers; f++) { - if (Main.player[num36].active) + if (Main.player[f].active) { - Rectangle rectangle2 = new Rectangle((int)Main.player[num36].position.X - num35, (int)Main.player[num36].position.Y - num35, num35 * 2, num35 * 2); + Rectangle rectangle2 = new Rectangle((int)Main.player[f].position.X - noFlyZone, (int)Main.player[f].position.Y - noFlyZone, noFlyZone * 2, noFlyZone * 2); if (rectangle.Intersects(rectangle2)) { - flag3 = false; + outsideNoFlyZone = false; break; } } } - if (flag3) + if (outsideNoFlyZone) { - flag2 = true; + flying = true; } } @@ -4534,242 +4529,242 @@ namespace CalamityMod.NPCs if (npc.type == NPCID.SolarCrawltipedeHead) { - Vector2 value = npc.Center + (npc.rotation - MathHelper.PiOver2).ToRotationVector2() * 8f; - Vector2 value2 = npc.rotation.ToRotationVector2() * 16f; - Dust expr_1AAB = Main.dust[Dust.NewDust(value + value2, 0, 0, 6, npc.velocity.X, npc.velocity.Y, 100, Color.Transparent, 1f + Main.rand.NextFloat() * 3f)]; - expr_1AAB.noGravity = true; - expr_1AAB.noLight = true; - expr_1AAB.position -= new Vector2(4f); - expr_1AAB.fadeIn = 1f; - expr_1AAB.velocity = Vector2.Zero; - Dust expr_1B33 = Main.dust[Dust.NewDust(value - value2, 0, 0, 6, npc.velocity.X, npc.velocity.Y, 100, Color.Transparent, 1f + Main.rand.NextFloat() * 3f)]; - expr_1B33.noGravity = true; - expr_1B33.noLight = true; - expr_1B33.position -= new Vector2(4f); - expr_1B33.fadeIn = 1f; - expr_1B33.velocity = Vector2.Zero; + Vector2 crawltipedeDustPos = npc.Center + (npc.rotation - MathHelper.PiOver2).ToRotationVector2() * 8f; + Vector2 crawltipedeDustRotation = npc.rotation.ToRotationVector2() * 16f; + Dust crawltipedeDust = Main.dust[Dust.NewDust(crawltipedeDustPos + crawltipedeDustRotation, 0, 0, 6, npc.velocity.X, npc.velocity.Y, 100, Color.Transparent, 1f + Main.rand.NextFloat() * 3f)]; + crawltipedeDust.noGravity = true; + crawltipedeDust.noLight = true; + crawltipedeDust.position -= new Vector2(4f); + crawltipedeDust.fadeIn = 1f; + crawltipedeDust.velocity = Vector2.Zero; + Dust crawltipedeDust2 = Main.dust[Dust.NewDust(crawltipedeDustPos - crawltipedeDustRotation, 0, 0, 6, npc.velocity.X, npc.velocity.Y, 100, Color.Transparent, 1f + Main.rand.NextFloat() * 3f)]; + crawltipedeDust2.noGravity = true; + crawltipedeDust2.noLight = true; + crawltipedeDust2.position -= new Vector2(4f); + crawltipedeDust2.fadeIn = 1f; + crawltipedeDust2.velocity = Vector2.Zero; } - float num37 = 10f; - float num38 = 0.09f; + float wormSpeed = 10f; + float acceleration = 0.09f; if (npc.type == NPCID.DiggerHead) { - num37 = 6.5f; - num38 = 0.05f; + wormSpeed = 6.5f; + acceleration = 0.05f; } if (npc.type == NPCID.GiantWormHead) { - num37 = 7.5f; - num38 = 0.06f; + wormSpeed = 7.5f; + acceleration = 0.06f; } if (npc.type == NPCID.TombCrawlerHead) { - num37 = 8f; - num38 = 0.13f; + wormSpeed = 8f; + acceleration = 0.13f; } if (npc.type == NPCID.DuneSplicerHead) { if (!Main.player[npc.target].dead && Main.player[npc.target].ZoneSandstorm) { - num37 = 16f; - num38 = 0.35f; + wormSpeed = 16f; + acceleration = 0.35f; } else { - num38 = 0.25f; + acceleration = 0.25f; } } if (npc.type == NPCID.WyvernHead) { - num37 = 11f; - num38 = 0.3f; + wormSpeed = 11f; + acceleration = 0.3f; } if (npc.type == NPCID.StardustWormHead) { - num37 = 9f; - num38 = 0.25f; + wormSpeed = 9f; + acceleration = 0.25f; } if (npc.type == NPCID.LeechHead && Main.wofNPCIndex >= 0) { float lifeRatio = (float)Main.npc[Main.wofNPCIndex].life / (float)Main.npc[Main.wofNPCIndex].lifeMax; if (lifeRatio < 0.75f) { - num37 += 1f; - num38 += 0.1f; + wormSpeed += 1f; + acceleration += 0.1f; } if (lifeRatio < 0.5f) { - num37 += 1f; - num38 += 0.1f; + wormSpeed += 1f; + acceleration += 0.1f; } if (lifeRatio < 0.25f) { - num37 += 2f; - num38 += 0.1f; + wormSpeed += 2f; + acceleration += 0.1f; } } if (npc.type == NPCID.BloodEelHead) { - num37 = 18f; - num38 = 0.6f; + wormSpeed = 18f; + acceleration = 0.6f; } if (CalamityWorld.death) { - num37 *= 1.25f; - num38 *= 1.25f; + wormSpeed *= 1.25f; + acceleration *= 1.25f; } - Vector2 vector2 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float num39 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2); - float num40 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2); + Vector2 segmentPosition = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + float wormTargetX = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2); + float wormTargetY = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2); if (npc.type == NPCID.SolarCrawltipedeHead) { - num37 = 12f; - num38 = 0.32f; - int num41 = -1; - int num42 = (int)(Main.player[npc.target].Center.X / 16f); - int num43 = (int)(Main.player[npc.target].Center.Y / 16f); - for (int num44 = num42 - 2; num44 <= num42 + 2; num44++) + wormSpeed = 12f; + acceleration = 0.32f; + int crawltipedeTargetY = -1; + int targetTileX = (int)(Main.player[npc.target].Center.X / 16f); + int targetTileY = (int)(Main.player[npc.target].Center.Y / 16f); + for (int i = targetTileX - 2; i <= targetTileX + 2; i++) { - for (int num45 = num43; num45 <= num43 + 15; num45++) + for (int j = targetTileY; j <= targetTileY + 15; j++) { - if (WorldGen.SolidTile2(num44, num45)) + if (WorldGen.SolidTile2(i, j)) { - num41 = num45; + crawltipedeTargetY = j; break; } } - if (num41 > 0) + if (crawltipedeTargetY > 0) { break; } } - if (num41 > 0) + if (crawltipedeTargetY > 0) { - num41 *= 16; - float num46 = (float)(num41 - 800); - if (Main.player[npc.target].position.Y > num46) + crawltipedeTargetY *= 16; + float crawltipedeYTarget = (float)(crawltipedeTargetY - 800); + if (Main.player[npc.target].position.Y > crawltipedeYTarget) { - num40 = num46; + wormTargetY = crawltipedeYTarget; if (Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) < 500f) { if (npc.velocity.X > 0f) { - num39 = Main.player[npc.target].Center.X + 600f; + wormTargetX = Main.player[npc.target].Center.X + 600f; } else { - num39 = Main.player[npc.target].Center.X - 600f; + wormTargetX = Main.player[npc.target].Center.X - 600f; } } } } else { - num37 = 28f; - num38 = 0.8f; + wormSpeed = 28f; + acceleration = 0.8f; } - float num47 = num37 * 1.3f; - float num48 = num37 * 0.7f; - float num49 = npc.velocity.Length(); - if (num49 > 0f) + float maxWormSpeed = wormSpeed * 1.3f; + float minWormSpeed = wormSpeed * 0.7f; + float velocityCheck = npc.velocity.Length(); + if (velocityCheck > 0f) { - if (num49 > num47) + if (velocityCheck > maxWormSpeed) { npc.velocity.Normalize(); - npc.velocity *= num47; + npc.velocity *= maxWormSpeed; } - else if (num49 < num48) + else if (velocityCheck < minWormSpeed) { npc.velocity.Normalize(); - npc.velocity *= num48; + npc.velocity *= minWormSpeed; } } - if (num41 > 0) + if (crawltipedeTargetY > 0) { - for (int num50 = 0; num50 < Main.maxNPCs; num50++) + for (int k = 0; k < Main.maxNPCs; k++) { - if (Main.npc[num50].active && Main.npc[num50].type == npc.type && num50 != npc.whoAmI) + if (Main.npc[k].active && Main.npc[k].type == npc.type && k != npc.whoAmI) { - Vector2 vector3 = Main.npc[num50].Center - npc.Center; - if (vector3.Length() < 400f) + Vector2 targetDirection = Main.npc[k].Center - npc.Center; + if (targetDirection.Length() < 400f) { - vector3.Normalize(); - vector3 *= 1000f; - num39 -= vector3.X; - num40 -= vector3.Y; + targetDirection.Normalize(); + targetDirection *= 1000f; + wormTargetX -= targetDirection.X; + wormTargetY -= targetDirection.Y; } } } } else { - for (int num51 = 0; num51 < Main.maxNPCs; num51++) + for (int l = 0; l < Main.maxNPCs; l++) { - if (Main.npc[num51].active && Main.npc[num51].type == npc.type && num51 != npc.whoAmI) + if (Main.npc[l].active && Main.npc[l].type == npc.type && l != npc.whoAmI) { - Vector2 vector4 = Main.npc[num51].Center - npc.Center; - if (vector4.Length() < 60f) + Vector2 idleDirection = Main.npc[l].Center - npc.Center; + if (idleDirection.Length() < 60f) { - vector4.Normalize(); - vector4 *= 200f; - num39 -= vector4.X; - num40 -= vector4.Y; + idleDirection.Normalize(); + idleDirection *= 200f; + wormTargetX -= idleDirection.X; + wormTargetY -= idleDirection.Y; } } } } } - num39 = (float)((int)(num39 / 16f) * 16); - num40 = (float)((int)(num40 / 16f) * 16); - vector2.X = (float)((int)(vector2.X / 16f) * 16); - vector2.Y = (float)((int)(vector2.Y / 16f) * 16); - num39 -= vector2.X; - num40 -= vector2.Y; - float num52 = (float)Math.Sqrt((double)(num39 * num39 + num40 * num40)); + wormTargetX = (float)((int)(wormTargetX / 16f) * 16); + wormTargetY = (float)((int)(wormTargetY / 16f) * 16); + segmentPosition.X = (float)((int)(segmentPosition.X / 16f) * 16); + segmentPosition.Y = (float)((int)(segmentPosition.Y / 16f) * 16); + wormTargetX -= segmentPosition.X; + wormTargetY -= segmentPosition.Y; + float wormTargetDist = (float)Math.Sqrt((double)(wormTargetX * wormTargetX + wormTargetY * wormTargetY)); if (npc.ai[1] > 0f && npc.ai[1] < (float)Main.npc.Length) { try { - vector2 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - num39 = Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - vector2.X; - num40 = Main.npc[(int)npc.ai[1]].position.Y + (float)(Main.npc[(int)npc.ai[1]].height / 2) - vector2.Y; + segmentPosition = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + wormTargetX = Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - segmentPosition.X; + wormTargetY = Main.npc[(int)npc.ai[1]].position.Y + (float)(Main.npc[(int)npc.ai[1]].height / 2) - segmentPosition.Y; } catch { } - npc.rotation = (float)Math.Atan2((double)num40, (double)num39) + MathHelper.PiOver2; - num52 = (float)Math.Sqrt((double)(num39 * num39 + num40 * num40)); - int num53 = npc.width; + npc.rotation = (float)Math.Atan2((double)wormTargetY, (double)wormTargetX) + MathHelper.PiOver2; + wormTargetDist = (float)Math.Sqrt((double)(wormTargetX * wormTargetX + wormTargetY * wormTargetY)); + int segmentWidth = npc.width; if (npc.type >= NPCID.WyvernHead && npc.type <= NPCID.WyvernTail) { - num53 = 42; + segmentWidth = 42; } if (npc.type >= NPCID.SolarCrawltipedeHead && npc.type <= NPCID.SolarCrawltipedeTail) { - num53 += 6; + segmentWidth += 6; } if (npc.type >= NPCID.BloodEelHead && npc.type <= NPCID.BloodEelTail) { - num53 = 24; + segmentWidth = 24; } - num52 = (num52 - (float)num53) / num52; - num39 *= num52; - num40 *= num52; + wormTargetDist = (wormTargetDist - (float)segmentWidth) / wormTargetDist; + wormTargetX *= wormTargetDist; + wormTargetY *= wormTargetDist; npc.velocity = Vector2.Zero; - npc.position.X = npc.position.X + num39; - npc.position.Y = npc.position.Y + num40; + npc.position.X = npc.position.X + wormTargetX; + npc.position.Y = npc.position.Y + wormTargetY; if ((npc.type >= NPCID.WyvernHead && npc.type <= NPCID.WyvernTail) || (npc.type >= NPCID.BloodEelHead && npc.type <= NPCID.BloodEelTail)) { - if (num39 < 0f) + if (wormTargetX < 0f) { npc.spriteDirection = 1; } - else if (num39 > 0f) + else if (wormTargetX > 0f) { npc.spriteDirection = -1; } @@ -4777,45 +4772,45 @@ namespace CalamityMod.NPCs } else { - if (!flag2) + if (!flying) { npc.TargetClosest(true); npc.velocity.Y = npc.velocity.Y + 0.11f; - if (npc.velocity.Y > num37) + if (npc.velocity.Y > wormSpeed) { - npc.velocity.Y = num37; + npc.velocity.Y = wormSpeed; } - if ((double)(Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < (double)num37 * 0.4) + if ((double)(Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < (double)wormSpeed * 0.4) { if (npc.velocity.X < 0f) { - npc.velocity.X = npc.velocity.X - num38 * 1.1f; + npc.velocity.X = npc.velocity.X - acceleration * 1.1f; } else { - npc.velocity.X = npc.velocity.X + num38 * 1.1f; + npc.velocity.X = npc.velocity.X + acceleration * 1.1f; } } - else if (npc.velocity.Y == num37) + else if (npc.velocity.Y == wormSpeed) { - if (npc.velocity.X < num39) + if (npc.velocity.X < wormTargetX) { - npc.velocity.X = npc.velocity.X + num38; + npc.velocity.X = npc.velocity.X + acceleration; } - else if (npc.velocity.X > num39) + else if (npc.velocity.X > wormTargetX) { - npc.velocity.X = npc.velocity.X - num38; + npc.velocity.X = npc.velocity.X - acceleration; } } else if (npc.velocity.Y > 4f) { if (npc.velocity.X < 0f) { - npc.velocity.X = npc.velocity.X + num38 * 0.9f; + npc.velocity.X = npc.velocity.X + acceleration * 0.9f; } else { - npc.velocity.X = npc.velocity.X - num38 * 0.9f; + npc.velocity.X = npc.velocity.X - acceleration * 0.9f; } } } @@ -4823,184 +4818,183 @@ namespace CalamityMod.NPCs { if (npc.type != NPCID.WyvernHead && npc.type != NPCID.LeechHead && npc.type != NPCID.SolarCrawltipedeHead && npc.type != NPCID.BloodEelHead && npc.soundDelay == 0) { - float num54 = num52 / 40f; - if (num54 < 10f) + float soundDelay = wormTargetDist / 40f; + if (soundDelay < 10f) { - num54 = 10f; + soundDelay = 10f; } - if (num54 > 20f) + if (soundDelay > 20f) { - num54 = 20f; + soundDelay = 20f; } - npc.soundDelay = (int)num54; + npc.soundDelay = (int)soundDelay; SoundEngine.PlaySound(SoundID.WormDig, npc.position); } - num52 = (float)Math.Sqrt((double)(num39 * num39 + num40 * num40)); - float num55 = Math.Abs(num39); - float num56 = Math.Abs(num40); - float num57 = num37 / num52; - num39 *= num57; - num40 *= num57; + wormTargetDist = (float)Math.Sqrt((double)(wormTargetX * wormTargetX + wormTargetY * wormTargetY)); + float absoluteTargetX = Math.Abs(wormTargetX); + float absoluteTargetY = Math.Abs(wormTargetY); + float timeToReachTarget = wormSpeed / wormTargetDist; + wormTargetX *= timeToReachTarget; + wormTargetY *= timeToReachTarget; - bool flag4 = false; + bool wormShouldFlee = false; if (npc.type == NPCID.DevourerHead && ((!Main.player[npc.target].ZoneCorrupt && !Main.player[npc.target].ZoneCrimson) || Main.player[npc.target].dead)) { - flag4 = true; + wormShouldFlee = true; } if ((npc.type == NPCID.TombCrawlerHead && (double)Main.player[npc.target].position.Y < Main.worldSurface * 16.0 && !Main.player[npc.target].ZoneSandstorm && !Main.player[npc.target].ZoneUndergroundDesert) || Main.player[npc.target].dead) { - flag4 = true; + wormShouldFlee = true; } if ((npc.type == NPCID.DuneSplicerHead && (double)Main.player[npc.target].position.Y < Main.worldSurface * 16.0 && !Main.player[npc.target].ZoneSandstorm && !Main.player[npc.target].ZoneUndergroundDesert) || Main.player[npc.target].dead) { - flag4 = true; + wormShouldFlee = true; } - if (flag4) + if (wormShouldFlee) { - bool flag5 = true; - for (int num58 = 0; num58 < Main.maxPlayers; num58++) + bool definitelyFlee = true; + for (int p = 0; p < Main.maxPlayers; p++) { - if (Main.player[num58].active && !Main.player[num58].dead && Main.player[num58].ZoneCorrupt) + if (Main.player[p].active && !Main.player[p].dead && Main.player[p].ZoneCorrupt) { - flag5 = false; + definitelyFlee = false; } } - if (flag5) + if (definitelyFlee) { if (Main.netMode != NetmodeID.MultiplayerClient && (double)(npc.position.Y / 16f) > (Main.rockLayer + (double)Main.maxTilesY) / 2.0) { npc.active = false; - int num59 = (int)npc.ai[0]; - while (num59 > 0 && num59 < Main.maxNPCs && Main.npc[num59].active && Main.npc[num59].aiStyle == npc.aiStyle) + int q = (int)npc.ai[0]; + while (q > 0 && q < Main.maxNPCs && Main.npc[q].active && Main.npc[q].aiStyle == npc.aiStyle) { - int arg_2853_0 = (int)Main.npc[num59].ai[0]; - Main.npc[num59].active = false; + int differentSegment = (int)Main.npc[q].ai[0]; + Main.npc[q].active = false; npc.life = 0; if (Main.netMode == NetmodeID.Server) { - NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, num59, 0f, 0f, 0f, 0, 0, 0); + NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, q, 0f, 0f, 0f, 0, 0, 0); } - num59 = arg_2853_0; + q = differentSegment; } if (Main.netMode == NetmodeID.Server) { NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, npc.whoAmI, 0f, 0f, 0f, 0, 0, 0); } } - num39 = 0f; - num40 = num37; + wormTargetX = 0f; + wormTargetY = wormSpeed; } } - bool flag6 = false; + bool shouldSwoopDown = false; if (npc.type == NPCID.WyvernHead) { - if (((npc.velocity.X > 0f && num39 < 0f) || (npc.velocity.X < 0f && num39 > 0f) || (npc.velocity.Y > 0f && num40 < 0f) || (npc.velocity.Y < 0f && num40 > 0f)) && Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y) > num38 / 2f && num52 < 300f) + if (((npc.velocity.X > 0f && wormTargetX < 0f) || (npc.velocity.X < 0f && wormTargetX > 0f) || (npc.velocity.Y > 0f && wormTargetY < 0f) || (npc.velocity.Y < 0f && wormTargetY > 0f)) && Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y) > acceleration / 2f && wormTargetDist < 300f) { - flag6 = true; + shouldSwoopDown = true; - if (Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y) < num37) + if (Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y) < wormSpeed) npc.velocity *= 1.1f; } if (npc.position.Y > Main.player[npc.target].position.Y || (double)(Main.player[npc.target].position.Y / 16f) > Main.worldSurface || Main.player[npc.target].dead) { - flag6 = true; + shouldSwoopDown = true; - if (Math.Abs(npc.velocity.X) < num37 / 2f) + if (Math.Abs(npc.velocity.X) < wormSpeed / 2f) { if (npc.velocity.X == 0f) npc.velocity.X = npc.velocity.X - npc.direction; npc.velocity.X = npc.velocity.X * 1.1f; } - else if (npc.velocity.Y > -num37) - npc.velocity.Y = npc.velocity.Y - num38; + else if (npc.velocity.Y > -wormSpeed) + npc.velocity.Y = npc.velocity.Y - acceleration; } } if (npc.type == NPCID.BloodEelHead) { - float num69 = 120f; - if (((npc.velocity.X > 0f && num39 < 0f) || (npc.velocity.X < 0f && num39 > 0f) || (npc.velocity.Y > 0f && num40 < 0f) || (npc.velocity.Y < 0f && num40 > 0f)) && Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y) > num38 / 2f && num52 < num69) + if (((npc.velocity.X > 0f && wormTargetX < 0f) || (npc.velocity.X < 0f && wormTargetX > 0f) || (npc.velocity.Y > 0f && wormTargetY < 0f) || (npc.velocity.Y < 0f && wormTargetY > 0f)) && Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y) > acceleration / 2f && wormTargetDist < 120f) { - flag6 = true; - if (Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y) < num37) + shouldSwoopDown = true; + if (Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y) < wormSpeed) npc.velocity *= 1.1f; } if (npc.position.Y > Main.player[npc.target].position.Y || Main.player[npc.target].dead) { - flag6 = true; - if (Math.Abs(npc.velocity.X) < num37 / 2f) + shouldSwoopDown = true; + if (Math.Abs(npc.velocity.X) < wormSpeed / 2f) { if (npc.velocity.X == 0f) npc.velocity.X -= npc.direction; npc.velocity.X *= 1.1f; } - else if (npc.velocity.Y > 0f - num37) - npc.velocity.Y -= num38; + else if (npc.velocity.Y > 0f - wormSpeed) + npc.velocity.Y -= acceleration; } } - if (!flag6) + if (!shouldSwoopDown) { - if ((npc.velocity.X > 0f && num39 > 0f) || (npc.velocity.X < 0f && num39 < 0f) || (npc.velocity.Y > 0f && num40 > 0f) || (npc.velocity.Y < 0f && num40 < 0f)) + if ((npc.velocity.X > 0f && wormTargetX > 0f) || (npc.velocity.X < 0f && wormTargetX < 0f) || (npc.velocity.Y > 0f && wormTargetY > 0f) || (npc.velocity.Y < 0f && wormTargetY < 0f)) { - if (npc.velocity.X < num39) - npc.velocity.X = npc.velocity.X + num38; - else if (npc.velocity.X > num39) - npc.velocity.X = npc.velocity.X - num38; + if (npc.velocity.X < wormTargetX) + npc.velocity.X = npc.velocity.X + acceleration; + else if (npc.velocity.X > wormTargetX) + npc.velocity.X = npc.velocity.X - acceleration; - if (npc.velocity.Y < num40) - npc.velocity.Y = npc.velocity.Y + num38; - else if (npc.velocity.Y > num40) - npc.velocity.Y = npc.velocity.Y - num38; + if (npc.velocity.Y < wormTargetY) + npc.velocity.Y = npc.velocity.Y + acceleration; + else if (npc.velocity.Y > wormTargetY) + npc.velocity.Y = npc.velocity.Y - acceleration; - if ((double)Math.Abs(num40) < (double)num37 * 0.2 && ((npc.velocity.X > 0f && num39 < 0f) || (npc.velocity.X < 0f && num39 > 0f))) + if ((double)Math.Abs(wormTargetY) < (double)wormSpeed * 0.2 && ((npc.velocity.X > 0f && wormTargetX < 0f) || (npc.velocity.X < 0f && wormTargetX > 0f))) { if (npc.velocity.Y > 0f) - npc.velocity.Y = npc.velocity.Y + num38 * 2f; + npc.velocity.Y = npc.velocity.Y + acceleration * 2f; else - npc.velocity.Y = npc.velocity.Y - num38 * 2f; + npc.velocity.Y = npc.velocity.Y - acceleration * 2f; } - if ((double)Math.Abs(num39) < (double)num37 * 0.2 && ((npc.velocity.Y > 0f && num40 < 0f) || (npc.velocity.Y < 0f && num40 > 0f))) + if ((double)Math.Abs(wormTargetX) < (double)wormSpeed * 0.2 && ((npc.velocity.Y > 0f && wormTargetY < 0f) || (npc.velocity.Y < 0f && wormTargetY > 0f))) { if (npc.velocity.X > 0f) - npc.velocity.X = npc.velocity.X + num38 * 2f; + npc.velocity.X = npc.velocity.X + acceleration * 2f; else - npc.velocity.X = npc.velocity.X - num38 * 2f; + npc.velocity.X = npc.velocity.X - acceleration * 2f; } } - else if (num55 > num56) + else if (absoluteTargetX > absoluteTargetY) { - if (npc.velocity.X < num39) - npc.velocity.X = npc.velocity.X + num38 * 1.1f; - else if (npc.velocity.X > num39) - npc.velocity.X = npc.velocity.X - num38 * 1.1f; + if (npc.velocity.X < wormTargetX) + npc.velocity.X = npc.velocity.X + acceleration * 1.1f; + else if (npc.velocity.X > wormTargetX) + npc.velocity.X = npc.velocity.X - acceleration * 1.1f; - if ((double)(Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < (double)num37 * 0.5) + if ((double)(Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < (double)wormSpeed * 0.5) { if (npc.velocity.Y > 0f) - npc.velocity.Y = npc.velocity.Y + num38; + npc.velocity.Y = npc.velocity.Y + acceleration; else - npc.velocity.Y = npc.velocity.Y - num38; + npc.velocity.Y = npc.velocity.Y - acceleration; } } else { - if (npc.velocity.Y < num40) - npc.velocity.Y = npc.velocity.Y + num38 * 1.1f; - else if (npc.velocity.Y > num40) - npc.velocity.Y = npc.velocity.Y - num38 * 1.1f; + if (npc.velocity.Y < wormTargetY) + npc.velocity.Y = npc.velocity.Y + acceleration * 1.1f; + else if (npc.velocity.Y > wormTargetY) + npc.velocity.Y = npc.velocity.Y - acceleration * 1.1f; - if ((double)(Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < (double)num37 * 0.5) + if ((double)(Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < (double)wormSpeed * 0.5) { if (npc.velocity.X > 0f) - npc.velocity.X = npc.velocity.X + num38; + npc.velocity.X = npc.velocity.X + acceleration; else - npc.velocity.X = npc.velocity.X - num38; + npc.velocity.X = npc.velocity.X - acceleration; } } } @@ -5009,7 +5003,7 @@ namespace CalamityMod.NPCs npc.rotation = (float)Math.Atan2((double)npc.velocity.Y, (double)npc.velocity.X) + MathHelper.PiOver2; if (npc.type == NPCID.DevourerHead || npc.type == NPCID.GiantWormHead || npc.type == NPCID.BoneSerpentHead || npc.type == NPCID.DiggerHead || npc.type == NPCID.SeekerHead || npc.type == NPCID.LeechHead || npc.type == NPCID.DuneSplicerHead || npc.type == NPCID.TombCrawlerHead) { - if (flag2) + if (flying) { if (npc.localAI[0] != 1f) npc.netUpdate = true; @@ -5065,69 +5059,69 @@ namespace CalamityMod.NPCs npc.alpha = 255; } SoundEngine.PlaySound(SoundID.Item8, npc.position); - int num; - for (int num68 = 0; num68 < 50; num68 = num + 1) + int dustIncrement; + for (int i = 0; i < 50; i = dustIncrement + 1) { if (npc.type == NPCID.GoblinSorcerer || npc.type == NPCID.Tim) { - int num69 = Dust.NewDust(npc.position, npc.width, npc.height, 27, 0f, 0f, 100, default(Color), (float)Main.rand.Next(1, 3)); - Dust dust = Main.dust[num69]; + int goblinDust = Dust.NewDust(npc.position, npc.width, npc.height, 27, 0f, 0f, 100, default(Color), (float)Main.rand.Next(1, 3)); + Dust dust = Main.dust[goblinDust]; dust.velocity *= 3f; - if (Main.dust[num69].scale > 1f) + if (Main.dust[goblinDust].scale > 1f) { - Main.dust[num69].noGravity = true; + Main.dust[goblinDust].noGravity = true; } } else if (npc.type == NPCID.DarkCaster) { - int num70 = Dust.NewDust(npc.position, npc.width, npc.height, 172, 0f, 0f, 100, default(Color), 1.5f); - Dust dust = Main.dust[num70]; + int darkCasterDust = Dust.NewDust(npc.position, npc.width, npc.height, 172, 0f, 0f, 100, default(Color), 1.5f); + Dust dust = Main.dust[darkCasterDust]; dust.velocity *= 3f; - Main.dust[num70].noGravity = true; + Main.dust[darkCasterDust].noGravity = true; } else if (npc.type == NPCID.Necromancer || npc.type == NPCID.NecromancerArmored) { - int num71 = Dust.NewDust(npc.position, npc.width, npc.height, 173, 0f, 0f, 0, default(Color), 1f); - Dust dust = Main.dust[num71]; + int necromancerDust = Dust.NewDust(npc.position, npc.width, npc.height, 173, 0f, 0f, 0, default(Color), 1f); + Dust dust = Main.dust[necromancerDust]; dust.velocity *= 2f; - Main.dust[num71].scale = 1.4f; + Main.dust[necromancerDust].scale = 1.4f; } else if (npc.type == NPCID.DiabolistRed || npc.type == NPCID.DiabolistWhite) { - int num72 = Dust.NewDust(npc.position, npc.width, npc.height, 174, 0f, 0f, 100, default(Color), 1.5f); - Dust dust = Main.dust[num72]; + int diabolistDust = Dust.NewDust(npc.position, npc.width, npc.height, 174, 0f, 0f, 100, default(Color), 1.5f); + Dust dust = Main.dust[diabolistDust]; dust.velocity *= 3f; - Main.dust[num72].noGravity = true; + Main.dust[diabolistDust].noGravity = true; } else if (npc.type == NPCID.RaggedCaster || npc.type == NPCID.RaggedCasterOpenCoat) { - int num73 = Dust.NewDust(npc.position, npc.width, npc.height, 175, 0f, 0f, 100, default(Color), 1.5f); - Dust dust = Main.dust[num73]; + int raggedCasterDust = Dust.NewDust(npc.position, npc.width, npc.height, 175, 0f, 0f, 100, default(Color), 1.5f); + Dust dust = Main.dust[raggedCasterDust]; dust.velocity *= 3f; - Main.dust[num73].noGravity = true; + Main.dust[raggedCasterDust].noGravity = true; } else if (npc.type == NPCID.RuneWizard) { - int num74 = Dust.NewDust(npc.position, npc.width, npc.height, 106, 0f, 0f, 100, default(Color), 2.5f); - Dust dust = Main.dust[num74]; + int runeWizardDust = Dust.NewDust(npc.position, npc.width, npc.height, 106, 0f, 0f, 100, default(Color), 2.5f); + Dust dust = Main.dust[runeWizardDust]; dust.velocity *= 3f; - Main.dust[num74].noGravity = true; + Main.dust[runeWizardDust].noGravity = true; } else if (npc.type == NPCID.DesertDjinn) { - int num75 = Dust.NewDust(npc.position, npc.width, npc.height, 27, 0f, 0f, 100, default(Color), 2.5f); - Dust dust = Main.dust[num75]; + int desertSpiritDust = Dust.NewDust(npc.position, npc.width, npc.height, 27, 0f, 0f, 100, default(Color), 2.5f); + Dust dust = Main.dust[desertSpiritDust]; dust.velocity *= 3f; - Main.dust[num75].noGravity = true; + Main.dust[desertSpiritDust].noGravity = true; } else { - int num76 = Dust.NewDust(npc.position, npc.width, npc.height, 6, 0f, 0f, 100, default(Color), 2.5f); - Dust dust = Main.dust[num76]; + int fireImpDust = Dust.NewDust(npc.position, npc.width, npc.height, 6, 0f, 0f, 100, default(Color), 2.5f); + Dust dust = Main.dust[fireImpDust]; dust.velocity *= 3f; - Main.dust[num76].noGravity = true; + Main.dust[fireImpDust].noGravity = true; } - num = num68; + dustIncrement = i; } npc.position.X = npc.ai[2] * 16f - (float)(npc.width / 2) + 8f; npc.position.Y = npc.ai[3] * 16f - (float)npc.height; @@ -5136,68 +5130,68 @@ namespace CalamityMod.NPCs npc.ai[2] = 0f; npc.ai[3] = 0f; SoundEngine.PlaySound(SoundID.Item8, npc.position); - for (int num77 = 0; num77 < 50; num77 = num + 1) + for (int j = 0; j < 50; j = dustIncrement + 1) { if (npc.type == NPCID.GoblinSorcerer || npc.type == NPCID.Tim) { - int num78 = Dust.NewDust(npc.position, npc.width, npc.height, 27, 0f, 0f, 100, default(Color), (float)Main.rand.Next(1, 3)); - Dust dust = Main.dust[num78]; + int goblinCastDust = Dust.NewDust(npc.position, npc.width, npc.height, 27, 0f, 0f, 100, default(Color), (float)Main.rand.Next(1, 3)); + Dust dust = Main.dust[goblinCastDust]; dust.velocity *= 3f; - if (Main.dust[num78].scale > 1f) + if (Main.dust[goblinCastDust].scale > 1f) { - Main.dust[num78].noGravity = true; + Main.dust[goblinCastDust].noGravity = true; } } else if (npc.type == NPCID.DarkCaster) { - int num79 = Dust.NewDust(npc.position, npc.width, npc.height, 172, 0f, 0f, 100, default(Color), 1.5f); - Dust dust = Main.dust[num79]; + int darkCasterCastDust = Dust.NewDust(npc.position, npc.width, npc.height, 172, 0f, 0f, 100, default(Color), 1.5f); + Dust dust = Main.dust[darkCasterCastDust]; dust.velocity *= 3f; - Main.dust[num79].noGravity = true; + Main.dust[darkCasterCastDust].noGravity = true; } else if (npc.type == NPCID.RuneWizard) { - int num80 = Dust.NewDust(npc.position, npc.width, npc.height, 106, 0f, 0f, 100, default(Color), 2.5f); - Dust dust = Main.dust[num80]; + int runeWizardCastDust = Dust.NewDust(npc.position, npc.width, npc.height, 106, 0f, 0f, 100, default(Color), 2.5f); + Dust dust = Main.dust[runeWizardCastDust]; dust.velocity *= 3f; - Main.dust[num80].noGravity = true; + Main.dust[runeWizardCastDust].noGravity = true; } else if (npc.type == NPCID.Necromancer || npc.type == NPCID.NecromancerArmored) { - int num81 = Dust.NewDust(npc.position, npc.width, npc.height, 173, 0f, 0f, 0, default(Color), 1f); - Dust dust = Main.dust[num81]; + int necromancerCastDust = Dust.NewDust(npc.position, npc.width, npc.height, 173, 0f, 0f, 0, default(Color), 1f); + Dust dust = Main.dust[necromancerCastDust]; dust.velocity *= 2f; - Main.dust[num81].scale = 1.4f; + Main.dust[necromancerCastDust].scale = 1.4f; } else if (npc.type == NPCID.DiabolistRed || npc.type == NPCID.DiabolistWhite) { - int num82 = Dust.NewDust(npc.position, npc.width, npc.height, 174, 0f, 0f, 100, default(Color), 1.5f); - Dust dust = Main.dust[num82]; + int diabolistCastDust = Dust.NewDust(npc.position, npc.width, npc.height, 174, 0f, 0f, 100, default(Color), 1.5f); + Dust dust = Main.dust[diabolistCastDust]; dust.velocity *= 3f; - Main.dust[num82].noGravity = true; + Main.dust[diabolistCastDust].noGravity = true; } else if (npc.type == NPCID.RaggedCaster || npc.type == NPCID.RaggedCasterOpenCoat) { - int num83 = Dust.NewDust(npc.position, npc.width, npc.height, 175, 0f, 0f, 100, default(Color), 1.5f); - Dust dust = Main.dust[num83]; + int raggedCasterCastDust = Dust.NewDust(npc.position, npc.width, npc.height, 175, 0f, 0f, 100, default(Color), 1.5f); + Dust dust = Main.dust[raggedCasterCastDust]; dust.velocity *= 3f; - Main.dust[num83].noGravity = true; + Main.dust[raggedCasterCastDust].noGravity = true; } else if (npc.type == NPCID.DesertDjinn) { - int num84 = Dust.NewDust(npc.position, npc.width, npc.height, 27, 0f, 0f, 100, default(Color), 2.5f); - Dust dust = Main.dust[num84]; + int desertSpiritCastDust = Dust.NewDust(npc.position, npc.width, npc.height, 27, 0f, 0f, 100, default(Color), 2.5f); + Dust dust = Main.dust[desertSpiritCastDust]; dust.velocity *= 3f; - Main.dust[num84].noGravity = true; + Main.dust[desertSpiritCastDust].noGravity = true; } else { - int num85 = Dust.NewDust(npc.position, npc.width, npc.height, 6, 0f, 0f, 100, default(Color), 2.5f); - Dust dust = Main.dust[num85]; + int fireImpCastDust = Dust.NewDust(npc.position, npc.width, npc.height, 6, 0f, 0f, 100, default(Color), 2.5f); + Dust dust = Main.dust[fireImpCastDust]; dust.velocity *= 3f; - Main.dust[num85].noGravity = true; + Main.dust[fireImpCastDust].noGravity = true; } - num = num77; + dustIncrement = j; } } @@ -5262,47 +5256,47 @@ namespace CalamityMod.NPCs if (npc.ai[0] >= 650f && Main.netMode != NetmodeID.MultiplayerClient) { npc.ai[0] = 2f; - int num86 = (int)Main.player[npc.target].position.X / 16; - int num87 = (int)Main.player[npc.target].position.Y / 16; - int num88 = (int)npc.position.X / 16; - int num89 = (int)npc.position.Y / 16; - int num90 = 20; - int num91 = 0; - bool flag4 = false; + int targetTileX = (int)Main.player[npc.target].position.X / 16; + int targetTileY = (int)Main.player[npc.target].position.Y / 16; + int npcTileX = (int)npc.position.X / 16; + int npcTileY = (int)npc.position.Y / 16; + int randTeleportOffset = 20; + int teleportTries = 0; + bool canTeleport = false; if (Math.Abs(npc.position.X - Main.player[npc.target].position.X) + Math.Abs(npc.position.Y - Main.player[npc.target].position.Y) > 2000f) { - num91 = 100; - flag4 = true; + teleportTries = 100; + canTeleport = true; } - while (!flag4 && num91 < 100) + while (!canTeleport && teleportTries < 100) { - num91++; - int num92 = Main.rand.Next(num86 - num90, num86 + num90); - int num93 = Main.rand.Next(num87 - num90, num87 + num90); - int num; - for (int num94 = num93; num94 < num87 + num90; num94 = num + 1) + teleportTries++; + int teleportTileX = Main.rand.Next(targetTileX - randTeleportOffset, targetTileX + randTeleportOffset); + int teleportTileY = Main.rand.Next(targetTileY - randTeleportOffset, targetTileY + randTeleportOffset); + int dustIncrement; + for (int k = teleportTileY; k < targetTileY + randTeleportOffset; k = dustIncrement + 1) { - if ((num94 < num87 - 4 || num94 > num87 + 4 || num92 < num86 - 4 || num92 > num86 + 4) && (num94 < num89 - 1 || num94 > num89 + 1 || num92 < num88 - 1 || num92 > num88 + 1) && Main.tile[num92, num94].HasUnactuatedTile) + if ((k < targetTileY - 4 || k > targetTileY + 4 || teleportTileX < targetTileX - 4 || teleportTileX > targetTileX + 4) && (k < npcTileY - 1 || k > npcTileY + 1 || teleportTileX < npcTileX - 1 || teleportTileX > npcTileX + 1) && Main.tile[teleportTileX, k].HasUnactuatedTile) { - bool flag5 = true; - if ((npc.type == NPCID.DarkCaster || (npc.type >= NPCID.RaggedCaster && npc.type <= NPCID.DiabolistWhite)) && !Main.wallDungeon[(int)Main.tile[num92, num94 - 1].WallType]) + bool validTeleportSpot = true; + if ((npc.type == NPCID.DarkCaster || (npc.type >= NPCID.RaggedCaster && npc.type <= NPCID.DiabolistWhite)) && !Main.wallDungeon[(int)Main.tile[teleportTileX, k - 1].WallType]) { - flag5 = false; + validTeleportSpot = false; } - else if (Main.tile[num92, num94 - 1].LiquidType == LiquidID.Lava) + else if (Main.tile[teleportTileX, k - 1].LiquidType == LiquidID.Lava) { - flag5 = false; + validTeleportSpot = false; } - if (flag5 && Main.tileSolid[(int)Main.tile[num92, num94].TileType] && !Collision.SolidTiles(num92 - 1, num92 + 1, num94 - 4, num94 - 1)) + if (validTeleportSpot && Main.tileSolid[(int)Main.tile[teleportTileX, k].TileType] && !Collision.SolidTiles(teleportTileX - 1, teleportTileX + 1, k - 4, k - 1)) { npc.ai[1] = 20f; - npc.ai[2] = (float)num92; - npc.ai[3] = (float)num94; - flag4 = true; + npc.ai[2] = (float)teleportTileX; + npc.ai[3] = (float)k; + canTeleport = true; break; } } - num = num94; + dustIncrement = k; } } npc.netUpdate = true; @@ -5317,42 +5311,42 @@ namespace CalamityMod.NPCs SoundEngine.PlaySound(SoundID.Item8, npc.position); if (Main.netMode != NetmodeID.MultiplayerClient) { - Point point = npc.Center.ToTileCoordinates(); - Point point2 = Main.player[npc.target].Center.ToTileCoordinates(); - Vector2 vector12 = Main.player[npc.target].Center - npc.Center; - int num95 = 6; - int num96 = 6; - int num97 = 0; - int num98 = 2; - int num99 = 0; - bool flag6 = false; - if (vector12.Length() > 2000f) + Point spiritCenter = npc.Center.ToTileCoordinates(); + Point targetCenter = Main.player[npc.target].Center.ToTileCoordinates(); + Vector2 targetDirection = Main.player[npc.target].Center - npc.Center; + int randProjRadius = 6; + int spiritSpawnRadius = 6; + int targetSpawnRadius = 0; + int solidTileCheckRadius = 2; + int projSpawnTries = 0; + bool targetTooFar = false; + if (targetDirection.Length() > 2000f) { - flag6 = true; + targetTooFar = true; } - while (!flag6) + while (!targetTooFar) { - if (num99 >= 50) + if (projSpawnTries >= 50) { break; } - num99++; - int num100 = Main.rand.Next(point2.X - num95, point2.X + num95 + 1); - int num101 = Main.rand.Next(point2.Y - num95, point2.Y + num95 + 1); - if ((num101 < point2.Y - num97 || num101 > point2.Y + num97 || num100 < point2.X - num97 || num100 > point2.X + num97) && (num101 < point.Y - num96 || num101 > point.Y + num96 || num100 < point.X - num96 || num100 > point.X + num96) && !Main.tile[num100, num101].HasUnactuatedTile) + projSpawnTries++; + int spiritProjSpawnX = Main.rand.Next(targetCenter.X - randProjRadius, targetCenter.X + randProjRadius + 1); + int spiritProjSpawnY = Main.rand.Next(targetCenter.Y - randProjRadius, targetCenter.Y + randProjRadius + 1); + if ((spiritProjSpawnY < targetCenter.Y - targetSpawnRadius || spiritProjSpawnY > targetCenter.Y + targetSpawnRadius || spiritProjSpawnX < targetCenter.X - targetSpawnRadius || spiritProjSpawnX > targetCenter.X + targetSpawnRadius) && (spiritProjSpawnY < spiritCenter.Y - spiritSpawnRadius || spiritProjSpawnY > spiritCenter.Y + spiritSpawnRadius || spiritProjSpawnX < spiritCenter.X - spiritSpawnRadius || spiritProjSpawnX > spiritCenter.X + spiritSpawnRadius) && !Main.tile[spiritProjSpawnX, spiritProjSpawnY].HasUnactuatedTile) { - bool flag7 = true; - if (flag7 && Main.tile[num100, num101].LiquidType == LiquidID.Lava) + bool canSpawnProj = true; + if (canSpawnProj && Main.tile[spiritProjSpawnX, spiritProjSpawnY].LiquidType == LiquidID.Lava) { - flag7 = false; + canSpawnProj = false; } - if (flag7 && Collision.SolidTiles(num100 - num98, num100 + num98, num101 - num98, num101 + num98)) + if (canSpawnProj && Collision.SolidTiles(spiritProjSpawnX - solidTileCheckRadius, spiritProjSpawnX + solidTileCheckRadius, spiritProjSpawnY - solidTileCheckRadius, spiritProjSpawnY + solidTileCheckRadius)) { - flag7 = false; + canSpawnProj = false; } - if (flag7) + if (canSpawnProj) { - int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), (float)(num100 * 16 + 8), (float)(num101 * 16 + 8), 0f, 0f, ProjectileID.DesertDjinnCurse, 0, 1f, Main.myPlayer, (float)npc.target, 0f); + int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), (float)(spiritProjSpawnX * 16 + 8), (float)(spiritProjSpawnY * 16 + 8), 0f, 0f, ProjectileID.DesertDjinnCurse, 0, 1f, Main.myPlayer, (float)npc.target, 0f); if (CalamityWorld.death) Main.projectile[proj].extraUpdates += 1; break; @@ -5368,22 +5362,22 @@ namespace CalamityMod.NPCs { if (Main.netMode != NetmodeID.MultiplayerClient) { - float num102 = CalamityWorld.death ? 8f : 6f; + float dungeonCasterProjSpeed = CalamityWorld.death ? 8f : 6f; if (npc.type == NPCID.DiabolistRed || npc.type == NPCID.DiabolistWhite) { - num102 = CalamityWorld.death ? 10f : 8f; + dungeonCasterProjSpeed = CalamityWorld.death ? 10f : 8f; } if (npc.type == NPCID.RaggedCaster || npc.type == NPCID.RaggedCasterOpenCoat) { - num102 = CalamityWorld.death ? 5f : 4f; + dungeonCasterProjSpeed = CalamityWorld.death ? 5f : 4f; } - Vector2 vector13 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y); - float num103 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector13.X; - float num104 = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - vector13.Y; - float num105 = (float)Math.Sqrt((double)(num103 * num103 + num104 * num104)); - num105 = num102 / num105; - num103 *= num105; - num104 *= num105; + Vector2 dungeonCasterPos = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y); + float dungeonCasterTargetX = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - dungeonCasterPos.X; + float dungeonCasterTargetY = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - dungeonCasterPos.Y; + float dungeonCasterTargetDist = (float)Math.Sqrt((double)(dungeonCasterTargetX * dungeonCasterTargetX + dungeonCasterTargetY * dungeonCasterTargetY)); + dungeonCasterTargetDist = dungeonCasterProjSpeed / dungeonCasterTargetDist; + dungeonCasterTargetX *= dungeonCasterTargetDist; + dungeonCasterTargetY *= dungeonCasterTargetDist; int damage = 16; int projType = ProjectileID.ShadowBeamHostile; if (npc.type == NPCID.DiabolistRed || npc.type == NPCID.DiabolistWhite) @@ -5396,13 +5390,13 @@ namespace CalamityMod.NPCs projType = ProjectileID.LostSoulHostile; damage = 32; } - int num108 = Projectile.NewProjectile(npc.GetSource_FromAI(), vector13.X, vector13.Y, num103, num104, projType, damage, 0f, Main.myPlayer, 0f, 0f); - Main.projectile[num108].timeLeft = 300; + int dungeonCasterProj = Projectile.NewProjectile(npc.GetSource_FromAI(), dungeonCasterPos.X, dungeonCasterPos.Y, dungeonCasterTargetX, dungeonCasterTargetY, projType, damage, 0f, Main.myPlayer, 0f, 0f); + Main.projectile[dungeonCasterProj].timeLeft = 300; if (projType == ProjectileID.InfernoHostileBolt) { - Main.projectile[num108].ai[0] = Main.player[npc.target].Center.X; - Main.projectile[num108].ai[1] = Main.player[npc.target].Center.Y; - Main.projectile[num108].netUpdate = true; + Main.projectile[dungeonCasterProj].ai[0] = Main.player[npc.target].Center.X; + Main.projectile[dungeonCasterProj].ai[1] = Main.player[npc.target].Center.Y; + Main.projectile[dungeonCasterProj].netUpdate = true; } npc.localAI[0] = 0f; } @@ -5425,18 +5419,16 @@ namespace CalamityMod.NPCs } else if (npc.type == NPCID.RuneWizard) { - float num109 = CalamityWorld.death ? 12f : 10f; + float runeWizardProjSpeed = CalamityWorld.death ? 12f : 10f; Vector2 vector14 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float num110 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector14.X; - float num111 = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - vector14.Y; - float num112 = (float)Math.Sqrt((double)(num110 * num110 + num111 * num111)); - num112 = num109 / num112; - num110 *= num112; - num111 *= num112; - int num113 = 40; - int num114 = ProjectileID.RuneBlast; - int num115 = Projectile.NewProjectile(npc.GetSource_FromAI(), vector14.X, vector14.Y, num110, num111, num114, num113, 0f, Main.myPlayer, 0f, 0f); - Main.projectile[num115].timeLeft = 300; + float runeWizardTargetX = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector14.X; + float runeWizardTargetY = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - vector14.Y; + float runeWizardTargetDist = (float)Math.Sqrt((double)(runeWizardTargetX * runeWizardTargetX + runeWizardTargetY * runeWizardTargetY)); + runeWizardTargetDist = runeWizardProjSpeed / runeWizardTargetDist; + runeWizardTargetX *= runeWizardTargetDist; + runeWizardTargetY *= runeWizardTargetDist; + int runeWizardProj = Projectile.NewProjectile(npc.GetSource_FromAI(), vector14.X, vector14.Y, runeWizardTargetX, runeWizardTargetY, ProjectileID.RuneBlast, 40, 0f, Main.myPlayer, 0f, 0f); + Main.projectile[runeWizardProj].timeLeft = 300; npc.localAI[0] = 0f; } else @@ -5451,8 +5443,8 @@ namespace CalamityMod.NPCs { if (Main.rand.NextBool(5)) { - int num116 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 27, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 1.5f); - Dust dust = Main.dust[num116]; + int shadowflameSpawnDust = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 27, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 1.5f); + Dust dust = Main.dust[shadowflameSpawnDust]; dust.noGravity = true; dust.velocity.X *= 0.5f; dust.velocity.Y = -2f; @@ -5462,8 +5454,8 @@ namespace CalamityMod.NPCs { if (Main.rand.Next(3) != 0) { - int num117 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 172, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 0.9f); - Dust dust = Main.dust[num117]; + int waterSpawnDust = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 172, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 0.9f); + Dust dust = Main.dust[waterSpawnDust]; dust.noGravity = true; dust.velocity.X *= 0.3f; dust.velocity.Y *= 0.2f; @@ -5474,24 +5466,24 @@ namespace CalamityMod.NPCs { if (npc.type == NPCID.RuneWizard) { - int num118 = 1; + int runeWizardDustAmt = 1; if (npc.alpha == 255) { - num118 = 2; + runeWizardDustAmt = 2; } - int num; - for (int num119 = 0; num119 < num118; num119 = num + 1) + int dustIncrement; + for (int r = 0; r < runeWizardDustAmt; r = dustIncrement + 1) { if (Main.rand.Next(255) > 255 - npc.alpha) { - int num120 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 106, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 1.2f); - Dust dust = Main.dust[num120]; + int runeSpawnDust = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 106, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 1.2f); + Dust dust = Main.dust[runeSpawnDust]; dust.noGravity = true; dust.velocity.X *= (0.1f + (float)Main.rand.Next(30) * 0.01f); dust.velocity.Y *= (0.1f + (float)Main.rand.Next(30) * 0.01f); dust.scale *= 1f + (float)Main.rand.Next(6) * 0.1f; } - num = num119; + dustIncrement = r; } return false; } @@ -5499,8 +5491,8 @@ namespace CalamityMod.NPCs { if (Main.rand.NextBool()) { - int num121 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 173, 0f, 0f, 0, default(Color), 1f); - Dust dust = Main.dust[num121]; + int necroSpawnDust = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 173, 0f, 0f, 0, default(Color), 1f); + Dust dust = Main.dust[necroSpawnDust]; dust.velocity.X *= 0.5f; dust.velocity.Y *= 0.5f; } @@ -5509,8 +5501,8 @@ namespace CalamityMod.NPCs { if (Main.rand.NextBool()) { - int num122 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 174, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 1f); - Dust dust = Main.dust[num122]; + int flameSpawnDust = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 174, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 1f); + Dust dust = Main.dust[flameSpawnDust]; dust.noGravity = true; dust.velocity *= 0.4f; dust.velocity.Y -= 0.7f; @@ -5521,8 +5513,8 @@ namespace CalamityMod.NPCs { if (Main.rand.NextBool()) { - int num123 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 175, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 0.1f); - Dust dust = Main.dust[num123]; + int ghostSpawnDust = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 175, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 0.1f); + Dust dust = Main.dust[ghostSpawnDust]; dust.noGravity = true; dust.velocity *= 0.5f; dust.fadeIn = 1.2f; @@ -5537,8 +5529,8 @@ namespace CalamityMod.NPCs } if (Main.rand.NextBool()) { - int num124 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 6, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 2f); - Dust dust = Main.dust[num124]; + int desertSpawnDust = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 6, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 2f); + Dust dust = Main.dust[desertSpawnDust]; dust.noGravity = true; dust.velocity.X *= 1f; dust.velocity.Y *= 1f; @@ -5758,16 +5750,16 @@ namespace CalamityMod.NPCs { if (npc.type == NPCID.Hellbat || npc.type == NPCID.Lavabat) { - int num203 = Dust.NewDust(npc.position, npc.width, npc.height, 6, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 2f); - Main.dust[num203].noGravity = true; + int lavaDust = Dust.NewDust(npc.position, npc.width, npc.height, 6, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 2f); + Main.dust[lavaDust].noGravity = true; } if (npc.type == NPCID.IceBat && Main.rand.NextBool(10)) { - int num204 = Dust.NewDust(npc.position, npc.width, npc.height, 67, npc.velocity.X * 0.5f, npc.velocity.Y * 0.5f, 90, default(Color), 1.5f); - Main.dust[num204].noGravity = true; - Dust dust = Main.dust[num204]; + int iceDust = Dust.NewDust(npc.position, npc.width, npc.height, 67, npc.velocity.X * 0.5f, npc.velocity.Y * 0.5f, 90, default(Color), 1.5f); + Main.dust[iceDust].noGravity = true; + Dust dust = Main.dust[iceDust]; dust.velocity *= 0.2f; - Main.dust[num204].noLight = true; + Main.dust[iceDust].noLight = true; } npc.noGravity = true; // Collision on the X axis. @@ -6680,51 +6672,51 @@ namespace CalamityMod.NPCs } else { - float num282 = (CalamityWorld.death ? 12f : 9f) * npc.ai[3]; - float num283 = (CalamityWorld.death ? 0.4f : 0.3f) * npc.ai[3]; - float num284 = num282 / num283 / 2f; - if (npc.ai[0] >= 1f && npc.ai[0] < (float)((int)num284)) + float maxSpinSpeed = (CalamityWorld.death ? 12f : 9f) * npc.ai[3]; + float spinAcceleration = (CalamityWorld.death ? 0.4f : 0.3f) * npc.ai[3]; + float timeToReachMaxSpeed = maxSpinSpeed / spinAcceleration / 2f; + if (npc.ai[0] >= 1f && npc.ai[0] < (float)((int)timeToReachMaxSpeed)) { - npc.velocity.Y = (float)npc.directionY * num282; + npc.velocity.Y = (float)npc.directionY * maxSpinSpeed; npc.ai[0] += 1f; return false; } - if (npc.ai[0] >= (float)((int)num284)) + if (npc.ai[0] >= (float)((int)timeToReachMaxSpeed)) { npc.velocity.Y = 0f; npc.directionY *= -1; - npc.velocity.X = num282 * (float)npc.direction; + npc.velocity.X = maxSpinSpeed * (float)npc.direction; npc.ai[0] = -1f; return false; } if (npc.directionY > 0) { - if (npc.velocity.Y >= num282) + if (npc.velocity.Y >= maxSpinSpeed) { npc.directionY *= -1; - npc.velocity.Y = num282; + npc.velocity.Y = maxSpinSpeed; } } - else if (npc.directionY < 0 && npc.velocity.Y <= -num282) + else if (npc.directionY < 0 && npc.velocity.Y <= -maxSpinSpeed) { npc.directionY *= -1; - npc.velocity.Y = -num282; + npc.velocity.Y = -maxSpinSpeed; } if (npc.direction > 0) { - if (npc.velocity.X >= num282) + if (npc.velocity.X >= maxSpinSpeed) { npc.direction *= -1; - npc.velocity.X = num282; + npc.velocity.X = maxSpinSpeed; } } - else if (npc.direction < 0 && npc.velocity.X <= -num282) + else if (npc.direction < 0 && npc.velocity.X <= -maxSpinSpeed) { npc.direction *= -1; - npc.velocity.X = -num282; + npc.velocity.X = -maxSpinSpeed; } - npc.velocity.X = npc.velocity.X + num283 * (float)npc.direction; - npc.velocity.Y = npc.velocity.Y + num283 * (float)npc.directionY; + npc.velocity.X = npc.velocity.X + spinAcceleration * (float)npc.direction; + npc.velocity.Y = npc.velocity.Y + spinAcceleration * (float)npc.directionY; } return false; } @@ -6739,7 +6731,7 @@ namespace CalamityMod.NPCs npc.directionY = 1; npc.ai[0] = 1f; } - int num285 = CalamityWorld.death ? 9 : 6; + int wheelVelocity = CalamityWorld.death ? 9 : 6; if (npc.ai[1] == 0f) { npc.rotation += (float)(npc.direction * npc.directionY) * 0.13f; @@ -6778,19 +6770,19 @@ namespace CalamityMod.NPCs npc.ai[1] = 0f; } } - npc.velocity.X = (float)(num285 * npc.direction); - npc.velocity.Y = (float)(num285 * npc.directionY); - float num286 = (float)(270 - (int)Main.mouseTextColor) / 400f; - Lighting.AddLight((int)(npc.position.X + (float)(npc.width / 2)) / 16, (int)(npc.position.Y + (float)(npc.height / 2)) / 16, 0.9f, 0.3f + num286, 0.2f); + npc.velocity.X = (float)(wheelVelocity * npc.direction); + npc.velocity.Y = (float)(wheelVelocity * npc.directionY); + float lighting = (float)(270 - (int)Main.mouseTextColor) / 400f; + Lighting.AddLight((int)(npc.position.X + (float)(npc.width / 2)) / 16, (int)(npc.position.Y + (float)(npc.height / 2)) / 16, 0.9f, 0.3f + lighting, 0.2f); if (Main.netMode != NetmodeID.MultiplayerClient) { npc.localAI[0] += 1f; if (npc.localAI[0] >= (CalamityWorld.death ? 90f : 120f)) { npc.localAI[0] = 0f; - for (int num1501 = 0; num1501 < 4; num1501++) + for (int i = 0; i < 4; i++) { - Vector2 vector255 = new Vector2(0f, -5f).RotatedBy((double)(MathHelper.PiOver2 * (float)num1501)); + Vector2 vector255 = new Vector2(0f, -5f).RotatedBy((double)(MathHelper.PiOver2 * (float)i)); int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center.X, npc.Center.Y, vector255.X, vector255.Y, ProjectileID.FlamesTrap, 20, 0f, Main.myPlayer, 0f, 0f); Main.projectile[proj].tileCollide = false; Main.projectile[proj].friendly = false; @@ -6805,39 +6797,39 @@ namespace CalamityMod.NPCs #region Hovering AI public static bool BuffedHoveringAI(NPC npc, Mod mod) { - bool flag19 = false; - bool flag20 = npc.type == NPCID.Poltergeist && !Main.pumpkinMoon; + bool hoverDownDistCheck = false; + bool runAway = npc.type == NPCID.Poltergeist && !Main.pumpkinMoon; if (npc.type == NPCID.Reaper && !Main.eclipse) { - flag20 = true; + runAway = true; } if (npc.type == NPCID.Drippler && Main.dayTime) { - flag20 = true; + runAway = true; } - if (!flag20) + if (!runAway) { if (npc.ai[2] >= 0f) { - int num287 = 16; - bool flag21 = false; - bool flag22 = false; - if (npc.position.X > npc.ai[0] - (float)num287 && npc.position.X < npc.ai[0] + (float)num287) + int hoverDistance = 16; + bool changeDirectionX = false; + bool changeDirectionY = false; + if (npc.position.X > npc.ai[0] - (float)hoverDistance && npc.position.X < npc.ai[0] + (float)hoverDistance) { - flag21 = true; + changeDirectionX = true; } else if ((npc.velocity.X < 0f && npc.direction > 0) || (npc.velocity.X > 0f && npc.direction < 0)) { - flag21 = true; + changeDirectionX = true; } - num287 += 24; - if (npc.position.Y > npc.ai[1] - (float)num287 && npc.position.Y < npc.ai[1] + (float)num287) + hoverDistance += 24; + if (npc.position.Y > npc.ai[1] - (float)hoverDistance && npc.position.Y < npc.ai[1] + (float)hoverDistance) { - flag22 = true; + changeDirectionY = true; } - if (flag21 & flag22) + if (changeDirectionX & changeDirectionY) { npc.ai[2] += 1f; if (npc.ai[2] >= 40f) @@ -6882,23 +6874,23 @@ namespace CalamityMod.NPCs } } - int num288 = (int)((npc.position.X + (float)(npc.width / 2)) / 16f) + npc.direction * 2; - int num289 = (int)((npc.position.Y + (float)npc.height) / 16f); - bool flag23 = true; - bool flag24 = false; - int num290 = 6; + int npcTileX = (int)((npc.position.X + (float)(npc.width / 2)) / 16f) + npc.direction * 2; + int npcTileY = (int)((npc.position.Y + (float)npc.height) / 16f); + bool hoverDownwards = true; + bool canOpenDoor = false; + int tileCheckLoopAmt = 6; if (npc.type == NPCID.Gastropod) { - float num291 = 6f; - Vector2 vector33 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float num292 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector33.X; - float num293 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - vector33.Y; - float num294 = (float)Math.Sqrt((double)(num292 * num292 + num293 * num293)); + float gastropodProjSpeed = 6f; + Vector2 gastropodPosition = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + float gastropodTargetX = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - gastropodPosition.X; + float gastropodTargetY = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - gastropodPosition.Y; + float gastropodTargetDist = (float)Math.Sqrt((double)(gastropodTargetX * gastropodTargetX + gastropodTargetY * gastropodTargetY)); - num294 = num291 / num294; - num292 *= num294; - num293 *= num294; + gastropodTargetDist = gastropodProjSpeed / gastropodTargetDist; + gastropodTargetX *= gastropodTargetDist; + gastropodTargetY *= gastropodTargetDist; if (npc.justHit) { @@ -6910,10 +6902,10 @@ namespace CalamityMod.NPCs { int damage = 25; int projType = ProjectileID.PinkLaser; - Projectile.NewProjectile(npc.GetSource_FromAI(), vector33.X, vector33.Y, num292, num293, projType, damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(npc.GetSource_FromAI(), gastropodPosition.X, gastropodPosition.Y, gastropodTargetX, gastropodTargetY, projType, damage, 0f, Main.myPlayer, 0f, 0f); } - num290 = 12; + tileCheckLoopAmt = 12; if (npc.ai[3] > 0f) { @@ -6937,12 +6929,12 @@ namespace CalamityMod.NPCs } else if (npc.type == NPCID.Pixie) { - num290 = 8; + tileCheckLoopAmt = 8; if (Main.rand.NextBool(6)) { - int num298 = Dust.NewDust(npc.position, npc.width, npc.height, 55, 0f, 0f, 200, npc.color, 1f); - Dust dust = Main.dust[num298]; + int pixieDust = Dust.NewDust(npc.position, npc.width, npc.height, 55, 0f, 0f, 200, npc.color, 1f); + Dust dust = Main.dust[pixieDust]; dust.velocity *= 0.3f; } @@ -6959,23 +6951,23 @@ namespace CalamityMod.NPCs if (Main.rand.NextBool(3)) { - int num299 = Dust.NewDust(npc.position, npc.width, npc.height, 92, 0f, 0f, 200, default(Color), 1f); - Dust dust = Main.dust[num299]; + int iceEleDust = Dust.NewDust(npc.position, npc.width, npc.height, 92, 0f, 0f, 200, default(Color), 1f); + Dust dust = Main.dust[iceEleDust]; dust.velocity *= 0.3f; - Main.dust[num299].noGravity = true; + Main.dust[iceEleDust].noGravity = true; } - float num300 = 6f; - Vector2 vector34 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float num301 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector34.X; - float num302 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - vector34.Y; - float num303 = (float)Math.Sqrt((double)(num301 * num301 + num302 * num302)); + float iceElementalProjSpeed = 6f; + Vector2 iceElementalPosition = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + float iceElementalTargetX = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - iceElementalPosition.X; + float iceElementalTargetY = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - iceElementalPosition.Y; + float iceElementalTargetDist = (float)Math.Sqrt((double)(iceElementalTargetX * iceElementalTargetX + iceElementalTargetY * iceElementalTargetY)); - num303 = num300 / num303; - num301 *= num303; - num302 *= num303; + iceElementalTargetDist = iceElementalProjSpeed / iceElementalTargetDist; + iceElementalTargetX *= iceElementalTargetDist; + iceElementalTargetY *= iceElementalTargetDist; - if (num301 > 0f) + if (iceElementalTargetX > 0f) { npc.direction = 1; } @@ -6988,11 +6980,11 @@ namespace CalamityMod.NPCs if (npc.direction < 0) { - npc.rotation = (float)Math.Atan2((double)(-(double)num302), (double)(-(double)num301)); + npc.rotation = (float)Math.Atan2((double)(-(double)iceElementalTargetY), (double)(-(double)iceElementalTargetX)); } else { - npc.rotation = (float)Math.Atan2((double)num302, (double)num301); + npc.rotation = (float)Math.Atan2((double)iceElementalTargetY, (double)iceElementalTargetX); } if (npc.justHit) @@ -7005,10 +6997,10 @@ namespace CalamityMod.NPCs { int dmg = 45; int projType = ProjectileID.FrostBlastHostile; - Projectile.NewProjectile(npc.GetSource_FromAI(), vector34.X, vector34.Y, num301, num302, projType, dmg, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(npc.GetSource_FromAI(), iceElementalPosition.X, iceElementalPosition.Y, iceElementalTargetX, iceElementalTargetY, projType, dmg, 0f, Main.myPlayer, 0f, 0f); } - num290 = 15; + tileCheckLoopAmt = 15; if (npc.ai[3] > 0f) { @@ -7036,11 +7028,11 @@ namespace CalamityMod.NPCs if (Main.player[npc.target].Center.Y < npc.Center.Y) { - num290 = 18; + tileCheckLoopAmt = 18; } else { - num290 = 9; + tileCheckLoopAmt = 9; } if (npc.justHit) @@ -7054,18 +7046,18 @@ namespace CalamityMod.NPCs npc.ai[3] = 0f; if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].head)) { - float num307 = 10f; - Vector2 vector35 = new Vector2(npc.position.X + (float)npc.width * 0.5f - 4f, npc.position.Y + (float)npc.height * 0.7f); - float num308 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector35.X; - float num309 = Math.Abs(num308) * 0.1f; - float num310 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - vector35.Y - num309; - float num311 = (float)Math.Sqrt((double)(num308 * num308 + num310 * num310)); - num311 = num307 / num311; - num308 *= num311; - num310 *= num311; + float ichorStickerProjSpeed = 10f; + Vector2 ichorStickerPosition = new Vector2(npc.position.X + (float)npc.width * 0.5f - 4f, npc.position.Y + (float)npc.height * 0.7f); + float ichorStickerTargetX = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - ichorStickerPosition.X; + float ichorStickerAbsTargetX = Math.Abs(ichorStickerTargetX) * 0.1f; + float ichorStickerTargetY = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - ichorStickerPosition.Y - ichorStickerAbsTargetX; + float ichorStickerTargetDist = (float)Math.Sqrt((double)(ichorStickerTargetX * ichorStickerTargetX + ichorStickerTargetY * ichorStickerTargetY)); + ichorStickerTargetDist = ichorStickerProjSpeed / ichorStickerTargetDist; + ichorStickerTargetX *= ichorStickerTargetDist; + ichorStickerTargetY *= ichorStickerTargetDist; int dmg = 40; int projType = ProjectileID.GoldenShowerHostile; - Projectile.NewProjectile(npc.GetSource_FromAI(), vector35.X, vector35.Y, num308, num310, projType, dmg, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(npc.GetSource_FromAI(), ichorStickerPosition.X, ichorStickerPosition.Y, ichorStickerTargetX, ichorStickerTargetY, projType, dmg, 0f, Main.myPlayer, 0f, 0f); } } } @@ -7073,70 +7065,70 @@ namespace CalamityMod.NPCs if (npc.type == NPCID.Drippler) { - num290 = 8; + tileCheckLoopAmt = 8; if (npc.target >= 0) { - float num315 = (Main.player[npc.target].Center - npc.Center).Length(); - num315 /= 70f; - if (num315 > 8f) + float dripperTargetDist = (Main.player[npc.target].Center - npc.Center).Length(); + dripperTargetDist /= 70f; + if (dripperTargetDist > 8f) { - num315 = 8f; + dripperTargetDist = 8f; } - num290 += (int)num315; + tileCheckLoopAmt += (int)dripperTargetDist; } } - for (int num316 = num289; num316 < num289 + num290; num316++) + for (int y = npcTileY; y < npcTileY + tileCheckLoopAmt; y++) { - if ((Main.tile[num288, num316].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num288, num316].TileType]) || Main.tile[num288, num316].LiquidAmount > 0) + if ((Main.tile[npcTileX, y].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[npcTileX, y].TileType]) || Main.tile[npcTileX, y].LiquidAmount > 0) { - if (num316 <= num289 + 1) + if (y <= npcTileY + 1) { - flag24 = true; + canOpenDoor = true; } - flag23 = false; + hoverDownwards = false; break; } } if (Main.player[npc.target].npcTypeNoAggro[npc.type]) { - bool flag25 = false; - for (int num317 = num289; num317 < num289 + num290 - 2; num317++) + bool canOpenTallGate = false; + for (int yInc = npcTileY; yInc < npcTileY + tileCheckLoopAmt - 2; yInc++) { - if ((Main.tile[num288, num317].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num288, num317].TileType]) || Main.tile[num288, num317].LiquidAmount > 0) + if ((Main.tile[npcTileX, yInc].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[npcTileX, yInc].TileType]) || Main.tile[npcTileX, yInc].LiquidAmount > 0) { - flag25 = true; + canOpenTallGate = true; break; } } - npc.directionY = (!flag25).ToDirectionInt(); + npc.directionY = (!canOpenTallGate).ToDirectionInt(); } if (npc.type == NPCID.IceElemental || npc.type == NPCID.IchorSticker) { - for (int num318 = num289 - 3; num318 < num289; num318++) + for (int iceIchorY = npcTileY - 3; iceIchorY < npcTileY; iceIchorY++) { - if ((Main.tile[num288, num318].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num288, num318].TileType]) || Main.tile[num288, num318].LiquidAmount > 0) + if ((Main.tile[npcTileX, iceIchorY].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[npcTileX, iceIchorY].TileType]) || Main.tile[npcTileX, iceIchorY].LiquidAmount > 0) { - flag24 = false; - flag19 = true; + canOpenDoor = false; + hoverDownDistCheck = true; break; } } } - if (flag19) + if (hoverDownDistCheck) { - flag23 = true; + hoverDownwards = true; if (npc.type == NPCID.IchorSticker) { npc.velocity.Y = npc.velocity.Y + 3f; } } - if (flag23) + if (hoverDownwards) { if (npc.type == NPCID.Pixie || npc.type == NPCID.IceElemental) { @@ -7167,14 +7159,14 @@ namespace CalamityMod.NPCs { if (npc.type == NPCID.Pixie || npc.type == NPCID.IceElemental) { - if ((npc.directionY < 0 && npc.velocity.Y > 0f) | flag24) + if ((npc.directionY < 0 && npc.velocity.Y > 0f) | canOpenDoor) { npc.velocity.Y = npc.velocity.Y - 0.3f; } } else if (npc.type == NPCID.Drippler) { - if ((npc.directionY < 0 && npc.velocity.Y > 0f) | flag24) + if ((npc.directionY < 0 && npc.velocity.Y > 0f) | canOpenDoor) { npc.velocity.Y = npc.velocity.Y - 0.1f; } @@ -7228,29 +7220,29 @@ namespace CalamityMod.NPCs } } - float num319 = 4f; + float maxHoverVel = 4f; if (npc.type == NPCID.Pixie) { - num319 = 5f; + maxHoverVel = 5f; } if (npc.type == NPCID.Reaper) { - num319 = 6f; + maxHoverVel = 6f; } if (npc.type == NPCID.Drippler) { - num319 = 2.5f; + maxHoverVel = 2.5f; } if (CalamityWorld.death) { - num319 *= 1.25f; + maxHoverVel *= 1.25f; } if (npc.type == NPCID.Poltergeist) { npc.alpha = 0; - num319 = 6f; - if (!flag20) + maxHoverVel = 6f; + if (!runAway) { npc.TargetClosest(true); } @@ -7268,10 +7260,10 @@ namespace CalamityMod.NPCs } } - if (npc.direction == -1 && npc.velocity.X > -num319) + if (npc.direction == -1 && npc.velocity.X > -maxHoverVel) { npc.velocity.X = npc.velocity.X - 0.15f; - if (npc.velocity.X > num319) + if (npc.velocity.X > maxHoverVel) { npc.velocity.X = npc.velocity.X - 0.15f; } @@ -7279,15 +7271,15 @@ namespace CalamityMod.NPCs { npc.velocity.X = npc.velocity.X + 0.1f; } - if (npc.velocity.X < -num319) + if (npc.velocity.X < -maxHoverVel) { - npc.velocity.X = -num319; + npc.velocity.X = -maxHoverVel; } } - else if (npc.direction == 1 && npc.velocity.X < num319) + else if (npc.direction == 1 && npc.velocity.X < maxHoverVel) { npc.velocity.X = npc.velocity.X + 0.15f; - if (npc.velocity.X < -num319) + if (npc.velocity.X < -maxHoverVel) { npc.velocity.X = npc.velocity.X + 0.15f; } @@ -7295,29 +7287,29 @@ namespace CalamityMod.NPCs { npc.velocity.X = npc.velocity.X - 0.1f; } - if (npc.velocity.X > num319) + if (npc.velocity.X > maxHoverVel) { - npc.velocity.X = num319; + npc.velocity.X = maxHoverVel; } } if (npc.type == NPCID.Drippler) { - num319 = 1.5f; + maxHoverVel = 1.5f; } else { - num319 = 2.5f; + maxHoverVel = 2.5f; } if (CalamityWorld.death) { - num319 *= 1.25f; + maxHoverVel *= 1.25f; } - if (npc.directionY == -1 && npc.velocity.Y > -num319) + if (npc.directionY == -1 && npc.velocity.Y > -maxHoverVel) { npc.velocity.Y = npc.velocity.Y - 0.06f; - if (npc.velocity.Y > num319) + if (npc.velocity.Y > maxHoverVel) { npc.velocity.Y = npc.velocity.Y - 0.1f; } @@ -7325,15 +7317,15 @@ namespace CalamityMod.NPCs { npc.velocity.Y = npc.velocity.Y + 0.05f; } - if (npc.velocity.Y < -num319) + if (npc.velocity.Y < -maxHoverVel) { - npc.velocity.Y = -num319; + npc.velocity.Y = -maxHoverVel; } } - else if (npc.directionY == 1 && npc.velocity.Y < num319) + else if (npc.directionY == 1 && npc.velocity.Y < maxHoverVel) { npc.velocity.Y = npc.velocity.Y + 0.06f; - if (npc.velocity.Y < -num319) + if (npc.velocity.Y < -maxHoverVel) { npc.velocity.Y = npc.velocity.Y + 0.1f; } @@ -7341,9 +7333,9 @@ namespace CalamityMod.NPCs { npc.velocity.Y = npc.velocity.Y - 0.05f; } - if (npc.velocity.Y > num319) + if (npc.velocity.Y > maxHoverVel) { - npc.velocity.Y = num319; + npc.velocity.Y = maxHoverVel; } } @@ -7549,23 +7541,23 @@ namespace CalamityMod.NPCs #region Unicorn AI public static bool BuffedUnicornAI(NPC npc, Mod mod) { - int num = 30; - int num2 = 8; + int turnAroundDelay = 30; + int turnAroundDelayMult = 8; bool flag = false; - bool flag2 = false; - bool flag3 = false; + bool isRunning = false; + bool shouldTurnAround = false; if (npc.velocity.Y == 0f && ((npc.velocity.X > 0f && npc.direction < 0) || (npc.velocity.X < 0f && npc.direction > 0))) { - flag2 = true; + isRunning = true; npc.ai[3] += 1f; } if (npc.type == NPCID.Tumbleweed) { - num2 = 3; - bool flag4 = npc.velocity.Y == 0f; + turnAroundDelayMult = 3; + bool noYVelocity = npc.velocity.Y == 0f; for (int i = 0; i < Main.maxNPCs; i++) { if (i != npc.whoAmI && Main.npc[i].active && Main.npc[i].type == npc.type && Math.Abs(npc.position.X - Main.npc[i].position.X) + Math.Abs(npc.position.Y - Main.npc[i].position.Y) < (float)npc.width) @@ -7588,23 +7580,23 @@ namespace CalamityMod.NPCs } } } - if (flag4) + if (noYVelocity) { npc.velocity.Y = 0f; } } - if ((npc.position.X == npc.oldPosition.X || npc.ai[3] >= (float)num) | flag2) + if ((npc.position.X == npc.oldPosition.X || npc.ai[3] >= (float)turnAroundDelay) | isRunning) { npc.ai[3] += 1f; - flag3 = true; + shouldTurnAround = true; } else if (npc.ai[3] > 0f) { npc.ai[3] -= 1f; } - if (npc.ai[3] > (float)(num * num2)) + if (npc.ai[3] > (float)(turnAroundDelay * turnAroundDelayMult)) { npc.ai[3] = 0f; } @@ -7614,17 +7606,17 @@ namespace CalamityMod.NPCs npc.ai[3] = 0f; } - if (npc.ai[3] == (float)num) + if (npc.ai[3] == (float)turnAroundDelay) { npc.netUpdate = true; } - Vector2 vector = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float arg_31B_0 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector.X; - float num3 = Main.player[npc.target].position.Y - vector.Y; - float num4 = (float)Math.Sqrt((double)(arg_31B_0 * arg_31B_0 + num3 * num3)); + Vector2 npcPosition = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + float targetXDist = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - npcPosition.X; + float targetYDist = Main.player[npc.target].position.Y - npcPosition.Y; + float targetDistance = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); - if (num4 < 200f && !flag3) + if (targetDistance < 200f && !shouldTurnAround) { npc.ai[3] = 0f; } @@ -7632,20 +7624,20 @@ namespace CalamityMod.NPCs if (npc.type == NPCID.StardustSpiderSmall) { npc.ai[1] += 1f; - bool flag5 = npc.ai[1] >= (CalamityWorld.death ? 60f : 120f); - if (!flag5 && npc.velocity.Y == 0f) + bool spawnTwinkle = npc.ai[1] >= (CalamityWorld.death ? 60f : 120f); + if (!spawnTwinkle && npc.velocity.Y == 0f) { for (int j = 0; j < Main.maxPlayers; j++) { if (Main.player[j].active && !Main.player[j].dead && Main.player[j].Distance(npc.Center) < 800f && Main.player[j].Center.Y < npc.Center.Y && Math.Abs(Main.player[j].Center.X - npc.Center.X) < 20f) { - flag5 = true; + spawnTwinkle = true; break; } } } - if (flag5 && Main.netMode != NetmodeID.MultiplayerClient) + if (spawnTwinkle && Main.netMode != NetmodeID.MultiplayerClient) { for (int k = 0; k < 3; k++) { @@ -7664,27 +7656,27 @@ namespace CalamityMod.NPCs npc.velocity.X = npc.velocity.X * 0.7f; if (npc.ai[1] < 30f) { - Vector2 vector2 = npc.Center + Vector2.UnitX * (float)npc.spriteDirection * -20f; - Dust arg_5A4_0 = Main.dust[Dust.NewDust(vector2, 0, 0, 242, 0f, 0f, 0, default(Color), 1f)]; - Vector2 vector3 = Vector2.UnitY.RotatedByRandom(MathHelper.TwoPi); - arg_5A4_0.position = vector2 + vector3 * 20f; - arg_5A4_0.velocity = -vector3 * 2f; - arg_5A4_0.scale = 0.5f + vector3.X * (float)(-(float)npc.spriteDirection); - arg_5A4_0.fadeIn = 1f; - arg_5A4_0.noGravity = true; + Vector2 nebulaBeastDustRotation = npc.Center + Vector2.UnitX * (float)npc.spriteDirection * -20f; + Dust nebulaBeastDust = Main.dust[Dust.NewDust(nebulaBeastDustRotation, 0, 0, 242, 0f, 0f, 0, default(Color), 1f)]; + Vector2 nebulaBeastDustVelocity = Vector2.UnitY.RotatedByRandom(MathHelper.TwoPi); + nebulaBeastDust.position = nebulaBeastDustRotation + nebulaBeastDustVelocity * 20f; + nebulaBeastDust.velocity = -nebulaBeastDustVelocity * 2f; + nebulaBeastDust.scale = 0.5f + nebulaBeastDustVelocity.X * (float)(-(float)npc.spriteDirection); + nebulaBeastDust.fadeIn = 1f; + nebulaBeastDust.noGravity = true; } else if (npc.ai[1] == 30f) { for (int l = 0; l < 20; l++) { - Vector2 vector4 = npc.Center + Vector2.UnitX * (float)npc.spriteDirection * -20f; - Dust arg_68B_0 = Main.dust[Dust.NewDust(vector4, 0, 0, 242, 0f, 0f, 0, default(Color), 1f)]; - Vector2 vector5 = Vector2.UnitY.RotatedByRandom(MathHelper.TwoPi); - arg_68B_0.position = vector4 + vector5 * 4f; - arg_68B_0.velocity = vector5 * 4f + Vector2.UnitX * Main.rand.NextFloat() * (float)npc.spriteDirection * -5f; - arg_68B_0.scale = 0.5f + vector5.X * (float)(-(float)npc.spriteDirection); - arg_68B_0.fadeIn = 1f; - arg_68B_0.noGravity = true; + Vector2 nebulaBeastDustRotation2 = npc.Center + Vector2.UnitX * (float)npc.spriteDirection * -20f; + Dust nebulaBeastDust2 = Main.dust[Dust.NewDust(nebulaBeastDustRotation2, 0, 0, 242, 0f, 0f, 0, default(Color), 1f)]; + Vector2 nebulaBeastDustVelocity2 = Vector2.UnitY.RotatedByRandom(MathHelper.TwoPi); + nebulaBeastDust2.position = nebulaBeastDustRotation2 + nebulaBeastDustVelocity2 * 4f; + nebulaBeastDust2.velocity = nebulaBeastDustVelocity2 * 4f + Vector2.UnitX * Main.rand.NextFloat() * (float)npc.spriteDirection * -5f; + nebulaBeastDust2.scale = 0.5f + nebulaBeastDustVelocity2.X * (float)(-(float)npc.spriteDirection); + nebulaBeastDust2.fadeIn = 1f; + nebulaBeastDust2.noGravity = true; } } @@ -7695,8 +7687,8 @@ namespace CalamityMod.NPCs if (npc.ai[1] == 30f && Main.netMode != NetmodeID.MultiplayerClient) { - int num5 = Main.expertMode ? 35 : 50; - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center.X + (float)(npc.spriteDirection * -20), npc.Center.Y, (float)(npc.spriteDirection * -7), 0f, ProjectileID.NebulaSphere, num5, 0f, Main.myPlayer, (float)npc.target, 0f); + int nebulaBeastProjDamage = Main.expertMode ? 35 : 50; + Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center.X + (float)(npc.spriteDirection * -20), npc.Center.Y, (float)(npc.spriteDirection * -7), 0f, ProjectileID.NebulaSphere, nebulaBeastProjDamage, 0f, Main.myPlayer, (float)npc.target, 0f); } if (npc.ai[1] >= 60f) @@ -7708,14 +7700,14 @@ namespace CalamityMod.NPCs else { npc.ai[1] += 1f; - if (npc.ai[1] >= 180f && num4 < 500f && npc.velocity.Y == 0f) + if (npc.ai[1] >= 180f && targetDistance < 500f && npc.velocity.Y == 0f) { flag = true; npc.ai[1] = 0f; npc.ai[2] = 1f; npc.netUpdate = true; } - else if (npc.velocity.Y == 0f && num4 < 100f && Math.Abs(npc.velocity.X) > 3f && ((npc.Center.X < Main.player[npc.target].Center.X && npc.velocity.X > 0f) || (npc.Center.X > Main.player[npc.target].Center.X && npc.velocity.X < 0f))) + else if (npc.velocity.Y == 0f && targetDistance < 100f && Math.Abs(npc.velocity.X) > 3f && ((npc.Center.X < Main.player[npc.target].Center.X && npc.velocity.X > 0f) || (npc.Center.X > Main.player[npc.target].Center.X && npc.velocity.X < 0f))) { npc.velocity.Y = npc.velocity.Y - 6f; } @@ -7723,7 +7715,7 @@ namespace CalamityMod.NPCs } else if (npc.type == NPCID.Wolf || npc.type == NPCID.Hellhound || npc.type == ModContent.NPCType()) { - if (npc.velocity.Y == 0f && num4 < 100f && Math.Abs(npc.velocity.X) > 3f && ((npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) && npc.velocity.X > 0f) || (npc.position.X + (float)(npc.width / 2) > Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) && npc.velocity.X < 0f))) + if (npc.velocity.Y == 0f && targetDistance < 100f && Math.Abs(npc.velocity.X) > 3f && ((npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) && npc.velocity.X > 0f) || (npc.position.X + (float)(npc.width / 2) > Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) && npc.velocity.X < 0f))) { npc.velocity.Y -= 6f; } @@ -7734,7 +7726,7 @@ namespace CalamityMod.NPCs SoundEngine.PlaySound(SoundID.NPCHit11, npc.Center); } - if (npc.ai[3] < (float)num) + if (npc.ai[3] < (float)turnAroundDelay) { if ((npc.type == NPCID.Hellhound || npc.type == NPCID.HeadlessHorseman) && !Main.pumpkinMoon) { @@ -7774,12 +7766,12 @@ namespace CalamityMod.NPCs } } - float num6 = 9f; - float num7 = 0.1f; + float maxVelocity = 9f; + float acceleration = 0.1f; if (CalamityWorld.death) { - num6 *= 1.25f; - num7 *= 1.25f; + maxVelocity *= 1.25f; + acceleration *= 1.25f; } if (!flag && (npc.velocity.Y == 0f || npc.wet || (npc.velocity.X <= 0f && npc.direction < 0) || (npc.velocity.X >= 0f && npc.direction > 0))) @@ -7824,27 +7816,27 @@ namespace CalamityMod.NPCs { npc.velocity.X *= 0.9f; } - if (npc.velocity.X < -num6 || npc.velocity.X > num6) + if (npc.velocity.X < -maxVelocity || npc.velocity.X > maxVelocity) { if (npc.velocity.Y == 0f) { npc.velocity *= 0.8f; } } - else if (npc.velocity.X < num6 && npc.direction == 1) + else if (npc.velocity.X < maxVelocity && npc.direction == 1) { npc.velocity.X += 0.1f; - if (npc.velocity.X > num6) + if (npc.velocity.X > maxVelocity) { - npc.velocity.X = num6; + npc.velocity.X = maxVelocity; } } - else if (npc.velocity.X > -num6 && npc.direction == -1) + else if (npc.velocity.X > -maxVelocity && npc.direction == -1) { npc.velocity.X -= 0.1f; - if (npc.velocity.X < -num6) + if (npc.velocity.X < -maxVelocity) { - npc.velocity.X = -num6; + npc.velocity.X = -maxVelocity; } } } @@ -7854,7 +7846,7 @@ namespace CalamityMod.NPCs { npc.velocity.X *= 0.8f; } - num7 = 0.2f; + acceleration = 0.2f; } else if (npc.type == NPCID.NebulaBeast) { @@ -7862,8 +7854,8 @@ namespace CalamityMod.NPCs { npc.velocity.X *= 0.8f; } - num6 = 12f; - num7 = 0.2f; + maxVelocity = 12f; + acceleration = 0.2f; } else if (npc.type == NPCID.Tumbleweed) { @@ -7871,80 +7863,80 @@ namespace CalamityMod.NPCs { npc.velocity.X *= 0.9f; } - float num8 = MathHelper.Lerp(0.6f, 1f, Math.Abs(Main.windSpeedCurrent)) * (float)Math.Sign(Main.windSpeedCurrent); + float sandstormPush = MathHelper.Lerp(0.6f, 1f, Math.Abs(Main.windSpeedCurrent)) * (float)Math.Sign(Main.windSpeedCurrent); if (!Main.player[npc.target].ZoneSandstorm) { - num8 = 0f; + sandstormPush = 0f; } - num6 = 6f + num8 * (float)npc.direction * 4f; - num7 = 0.2f; + maxVelocity = 6f + sandstormPush * (float)npc.direction * 4f; + acceleration = 0.2f; } if (CalamityWorld.death) { - num6 *= 1.25f; - num7 *= 1.25f; + maxVelocity *= 1.25f; + acceleration *= 1.25f; } - if (npc.velocity.X < -num6 || npc.velocity.X > num6) + if (npc.velocity.X < -maxVelocity || npc.velocity.X > maxVelocity) { if (npc.velocity.Y == 0f) { npc.velocity *= 0.8f; } } - else if (npc.velocity.X < num6 && npc.direction == 1) + else if (npc.velocity.X < maxVelocity && npc.direction == 1) { - npc.velocity.X = npc.velocity.X + num7; - if (npc.velocity.X > num6) + npc.velocity.X = npc.velocity.X + acceleration; + if (npc.velocity.X > maxVelocity) { - npc.velocity.X = num6; + npc.velocity.X = maxVelocity; } } - else if (npc.velocity.X > -num6 && npc.direction == -1) + else if (npc.velocity.X > -maxVelocity && npc.direction == -1) { - npc.velocity.X = npc.velocity.X - num7; - if (npc.velocity.X < -num6) + npc.velocity.X = npc.velocity.X - acceleration; + if (npc.velocity.X < -maxVelocity) { - npc.velocity.X = -num6; + npc.velocity.X = -maxVelocity; } } } if (npc.velocity.Y >= 0f) { - int num9 = 0; + int faceDirection = 0; if (npc.velocity.X < 0f) { - num9 = -1; + faceDirection = -1; } if (npc.velocity.X > 0f) { - num9 = 1; + faceDirection = 1; } Vector2 position = npc.position; position.X += npc.velocity.X; - int num10 = (int)((position.X + (float)(npc.width / 2) + (float)((npc.width / 2 + 1) * num9)) / 16f); - int num11 = (int)((position.Y + (float)npc.height - 1f) / 16f); + int x = (int)((position.X + (float)(npc.width / 2) + (float)((npc.width / 2 + 1) * faceDirection)) / 16f); + int y = (int)((position.Y + (float)npc.height - 1f) / 16f); - if ((float)(num10 * 16) < position.X + (float)npc.width && (float)(num10 * 16 + 16) > position.X && ((Main.tile[num10, num11].HasUnactuatedTile && !Main.tile[num10, num11].TopSlope && !Main.tile[num10, num11 - 1].TopSlope && Main.tileSolid[(int)Main.tile[num10, num11].TileType] && !Main.tileSolidTop[(int)Main.tile[num10, num11].TileType]) || (Main.tile[num10, num11 - 1].IsHalfBlock && Main.tile[num10, num11 - 1].HasUnactuatedTile)) && (!Main.tile[num10, num11 - 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num10, num11 - 1].TileType] || Main.tileSolidTop[(int)Main.tile[num10, num11 - 1].TileType] || (Main.tile[num10, num11 - 1].IsHalfBlock && (!Main.tile[num10, num11 - 4].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num10, num11 - 4].TileType] || Main.tileSolidTop[(int)Main.tile[num10, num11 - 4].TileType]))) && (!Main.tile[num10, num11 - 2].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num10, num11 - 2].TileType] || Main.tileSolidTop[(int)Main.tile[num10, num11 - 2].TileType]) && (!Main.tile[num10, num11 - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num10, num11 - 3].TileType] || Main.tileSolidTop[(int)Main.tile[num10, num11 - 3].TileType]) && (!Main.tile[num10 - num9, num11 - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num10 - num9, num11 - 3].TileType])) + if ((float)(x * 16) < position.X + (float)npc.width && (float)(x * 16 + 16) > position.X && ((Main.tile[x, y].HasUnactuatedTile && !Main.tile[x, y].TopSlope && !Main.tile[x, y - 1].TopSlope && Main.tileSolid[(int)Main.tile[x, y].TileType] && !Main.tileSolidTop[(int)Main.tile[x, y].TileType]) || (Main.tile[x, y - 1].IsHalfBlock && Main.tile[x, y - 1].HasUnactuatedTile)) && (!Main.tile[x, y - 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[x, y - 1].TileType] || Main.tileSolidTop[(int)Main.tile[x, y - 1].TileType] || (Main.tile[x, y - 1].IsHalfBlock && (!Main.tile[x, y - 4].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[x, y - 4].TileType] || Main.tileSolidTop[(int)Main.tile[x, y - 4].TileType]))) && (!Main.tile[x, y - 2].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[x, y - 2].TileType] || Main.tileSolidTop[(int)Main.tile[x, y - 2].TileType]) && (!Main.tile[x, y - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[x, y - 3].TileType] || Main.tileSolidTop[(int)Main.tile[x, y - 3].TileType]) && (!Main.tile[x - faceDirection, y - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[x - faceDirection, y - 3].TileType])) { - float num12 = (float)(num11 * 16); - if (Main.tile[num10, num11].IsHalfBlock) + float tilePixelPosition = (float)(y * 16); + if (Main.tile[x, y].IsHalfBlock) { - num12 += 8f; + tilePixelPosition += 8f; } - if (Main.tile[num10, num11 - 1].IsHalfBlock) + if (Main.tile[x, y - 1].IsHalfBlock) { - num12 -= 8f; + tilePixelPosition -= 8f; } - if (num12 < position.Y + (float)npc.height) + if (tilePixelPosition < position.Y + (float)npc.height) { - float num13 = position.Y + (float)npc.height - num12; - if ((double)num13 <= 16.1) + float percentageTileRisen = position.Y + (float)npc.height - tilePixelPosition; + if ((double)percentageTileRisen <= 16.1) { - npc.gfxOffY += npc.position.Y + (float)npc.height - num12; - npc.position.Y = num12 - (float)npc.height; - if (num13 < 9f) + npc.gfxOffY += npc.position.Y + (float)npc.height - tilePixelPosition; + npc.position.Y = tilePixelPosition - (float)npc.height; + if (percentageTileRisen < 9f) { npc.stepSpeed = 1f; } @@ -7959,23 +7951,22 @@ namespace CalamityMod.NPCs if (npc.velocity.Y == 0f) { - int num14 = (int)((npc.position.X + (float)(npc.width / 2) + (float)((npc.width / 2 + 2) * npc.direction) + npc.velocity.X * 5f) / 16f); - int num15 = (int)((npc.position.Y + (float)npc.height - 15f) / 16f); + int npcTileX = (int)((npc.position.X + (float)(npc.width / 2) + (float)((npc.width / 2 + 2) * npc.direction) + npc.velocity.X * 5f) / 16f); + int npcTileY = (int)((npc.position.Y + (float)npc.height - 15f) / 16f); - int num16 = npc.spriteDirection; + int spriteDirection = npc.spriteDirection; if (npc.type == NPCID.NebulaBeast || npc.type == NPCID.StardustSpiderSmall || npc.type == NPCID.Tumbleweed) { - num16 *= -1; + spriteDirection *= -1; } - if ((npc.velocity.X < 0f && num16 == -1) || (npc.velocity.X > 0f && num16 == 1)) + if ((npc.velocity.X < 0f && spriteDirection == -1) || (npc.velocity.X > 0f && spriteDirection == 1)) { - bool flag6 = npc.type == NPCID.StardustSpiderSmall || npc.type == NPCID.NebulaBeast; - float num17 = 3f; + bool pillarEnemy = npc.type == NPCID.StardustSpiderSmall || npc.type == NPCID.NebulaBeast; - if (Main.tile[num14, num15 - 2].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num14, num15 - 2].TileType]) + if (Main.tile[npcTileX, npcTileY - 2].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[npcTileX, npcTileY - 2].TileType]) { - if (Main.tile[num14, num15 - 3].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num14, num15 - 3].TileType]) + if (Main.tile[npcTileX, npcTileY - 3].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[npcTileX, npcTileY - 3].TileType]) { npc.velocity.Y = -10.5f; npc.netUpdate = true; @@ -7986,17 +7977,17 @@ namespace CalamityMod.NPCs npc.netUpdate = true; } } - else if (Main.tile[num14, num15 - 1].HasUnactuatedTile && !Main.tile[num14, num15 - 1].TopSlope && Main.tileSolid[(int)Main.tile[num14, num15 - 1].TileType]) + else if (Main.tile[npcTileX, npcTileY - 1].HasUnactuatedTile && !Main.tile[npcTileX, npcTileY - 1].TopSlope && Main.tileSolid[(int)Main.tile[npcTileX, npcTileY - 1].TileType]) { npc.velocity.Y = -9f; npc.netUpdate = true; } - else if (npc.position.Y + (float)npc.height - (float)(num15 * 16) > 20f && Main.tile[num14, num15].HasUnactuatedTile && !Main.tile[num14, num15].TopSlope && Main.tileSolid[(int)Main.tile[num14, num15].TileType]) + else if (npc.position.Y + (float)npc.height - (float)(npcTileY * 16) > 20f && Main.tile[npcTileX, npcTileY].HasUnactuatedTile && !Main.tile[npcTileX, npcTileY].TopSlope && Main.tileSolid[(int)Main.tile[npcTileX, npcTileY].TileType]) { npc.velocity.Y = -7f; npc.netUpdate = true; } - else if ((npc.directionY < 0 || Math.Abs(npc.velocity.X) > num17) && (!flag6 || !Main.tile[num14, num15 + 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num14, num15 + 1].TileType]) && (!Main.tile[num14, num15 + 2].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num14, num15 + 2].TileType]) && (!Main.tile[num14 + npc.direction, num15 + 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num14 + npc.direction, num15 + 3].TileType])) + else if ((npc.directionY < 0 || Math.Abs(npc.velocity.X) > 3f) && (!pillarEnemy || !Main.tile[npcTileX, npcTileY + 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[npcTileX, npcTileY + 1].TileType]) && (!Main.tile[npcTileX, npcTileY + 2].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[npcTileX, npcTileY + 2].TileType]) && (!Main.tile[npcTileX + npc.direction, npcTileY + 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[npcTileX + npc.direction, npcTileY + 3].TileType])) { npc.velocity.Y = -10f; npc.netUpdate = true; @@ -8004,18 +7995,18 @@ namespace CalamityMod.NPCs } } - if (npc.type == NPCID.NebulaBeast && Math.Abs(npc.velocity.X) >= num6 * 0.95f) + if (npc.type == NPCID.NebulaBeast && Math.Abs(npc.velocity.X) >= maxVelocity * 0.95f) { Rectangle hitbox = npc.Hitbox; for (int m = 0; m < 2; m++) { if (Main.rand.NextBool(3)) { - Dust expr_1B5F = Main.dust[Dust.NewDust(hitbox.TopLeft(), hitbox.Width, hitbox.Height, 242, 0f, 0f, 0, default(Color), 1f)]; - expr_1B5F.velocity = Vector2.Zero; - expr_1B5F.noGravity = true; - expr_1B5F.fadeIn = 1f; - expr_1B5F.scale = 0.5f + Main.rand.NextFloat(); + Dust nebulaBeastIdleDust = Main.dust[Dust.NewDust(hitbox.TopLeft(), hitbox.Width, hitbox.Height, 242, 0f, 0f, 0, default(Color), 1f)]; + nebulaBeastIdleDust.velocity = Vector2.Zero; + nebulaBeastIdleDust.noGravity = true; + nebulaBeastIdleDust.fadeIn = 1f; + nebulaBeastIdleDust.scale = 0.5f + Main.rand.NextFloat(); } } } @@ -8038,43 +8029,41 @@ namespace CalamityMod.NPCs npc.TargetClosest(true); } - bool flag31 = true; - - int num532 = 0; + int turtleFaceDirection = 0; if (npc.velocity.X < 0f) { - num532 = -1; + turtleFaceDirection = -1; } if (npc.velocity.X > 0f) { - num532 = 1; + turtleFaceDirection = 1; } Vector2 position = npc.position; position.X += npc.velocity.X; - int num533 = (int)((position.X + (float)(npc.width / 2) + (float)((npc.width / 2 + 1) * num532)) / 16f); - int num534 = (int)((position.Y + (float)npc.height - 1f) / 16f); + int turtleTileX = (int)((position.X + (float)(npc.width / 2) + (float)((npc.width / 2 + 1) * turtleFaceDirection)) / 16f); + int turtleTileY = (int)((position.Y + (float)npc.height - 1f) / 16f); - if ((float)(num533 * 16) < position.X + (float)npc.width && (float)(num533 * 16 + 16) > position.X && ((Main.tile[num533, num534].HasUnactuatedTile && !Main.tile[num533, num534].TopSlope && !Main.tile[num533, num534 - 1].TopSlope && ((Main.tileSolid[(int)Main.tile[num533, num534].TileType] && !Main.tileSolidTop[(int)Main.tile[num533, num534].TileType]) || (flag31 && Main.tileSolidTop[(int)Main.tile[num533, num534].TileType] && (!Main.tileSolid[(int)Main.tile[num533, num534 - 1].TileType] || !Main.tile[num533, num534 - 1].HasUnactuatedTile) && Main.tile[num533, num534].TileType != 16 && Main.tile[num533, num534].TileType != 18 && Main.tile[num533, num534].TileType != 134))) || (Main.tile[num533, num534 - 1].IsHalfBlock && Main.tile[num533, num534 - 1].HasUnactuatedTile)) && (!Main.tile[num533, num534 - 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num533, num534 - 1].TileType] || Main.tileSolidTop[(int)Main.tile[num533, num534 - 1].TileType] || (Main.tile[num533, num534 - 1].IsHalfBlock && (!Main.tile[num533, num534 - 4].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num533, num534 - 4].TileType] || Main.tileSolidTop[(int)Main.tile[num533, num534 - 4].TileType]))) && (!Main.tile[num533, num534 - 2].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num533, num534 - 2].TileType] || Main.tileSolidTop[(int)Main.tile[num533, num534 - 2].TileType]) && (!Main.tile[num533, num534 - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num533, num534 - 3].TileType] || Main.tileSolidTop[(int)Main.tile[num533, num534 - 3].TileType]) && (!Main.tile[num533 - num532, num534 - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[num533 - num532, num534 - 3].TileType] || Main.tileSolidTop[(int)Main.tile[num533 - num532, num534 - 3].TileType])) + if ((float)(turtleTileX * 16) < position.X + (float)npc.width && (float)(turtleTileX * 16 + 16) > position.X && ((Main.tile[turtleTileX, turtleTileY].HasUnactuatedTile && !Main.tile[turtleTileX, turtleTileY].TopSlope && !Main.tile[turtleTileX, turtleTileY - 1].TopSlope && ((Main.tileSolid[(int)Main.tile[turtleTileX, turtleTileY].TileType] && !Main.tileSolidTop[(int)Main.tile[turtleTileX, turtleTileY].TileType]) || (Main.tileSolidTop[(int)Main.tile[turtleTileX, turtleTileY].TileType] && (!Main.tileSolid[(int)Main.tile[turtleTileX, turtleTileY - 1].TileType] || !Main.tile[turtleTileX, turtleTileY - 1].HasUnactuatedTile) && Main.tile[turtleTileX, turtleTileY].TileType != 16 && Main.tile[turtleTileX, turtleTileY].TileType != 18 && Main.tile[turtleTileX, turtleTileY].TileType != 134))) || (Main.tile[turtleTileX, turtleTileY - 1].IsHalfBlock && Main.tile[turtleTileX, turtleTileY - 1].HasUnactuatedTile)) && (!Main.tile[turtleTileX, turtleTileY - 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[turtleTileX, turtleTileY - 1].TileType] || Main.tileSolidTop[(int)Main.tile[turtleTileX, turtleTileY - 1].TileType] || (Main.tile[turtleTileX, turtleTileY - 1].IsHalfBlock && (!Main.tile[turtleTileX, turtleTileY - 4].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[turtleTileX, turtleTileY - 4].TileType] || Main.tileSolidTop[(int)Main.tile[turtleTileX, turtleTileY - 4].TileType]))) && (!Main.tile[turtleTileX, turtleTileY - 2].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[turtleTileX, turtleTileY - 2].TileType] || Main.tileSolidTop[(int)Main.tile[turtleTileX, turtleTileY - 2].TileType]) && (!Main.tile[turtleTileX, turtleTileY - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[turtleTileX, turtleTileY - 3].TileType] || Main.tileSolidTop[(int)Main.tile[turtleTileX, turtleTileY - 3].TileType]) && (!Main.tile[turtleTileX - turtleFaceDirection, turtleTileY - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[turtleTileX - turtleFaceDirection, turtleTileY - 3].TileType] || Main.tileSolidTop[(int)Main.tile[turtleTileX - turtleFaceDirection, turtleTileY - 3].TileType])) { - float num535 = (float)(num534 * 16); - if (Main.tile[num533, num534].IsHalfBlock) + float tilePixelPosition = (float)(turtleTileY * 16); + if (Main.tile[turtleTileX, turtleTileY].IsHalfBlock) { - num535 += 8f; + tilePixelPosition += 8f; } - if (Main.tile[num533, num534 - 1].IsHalfBlock) + if (Main.tile[turtleTileX, turtleTileY - 1].IsHalfBlock) { - num535 -= 8f; + tilePixelPosition -= 8f; } - if (num535 < position.Y + (float)npc.height) + if (tilePixelPosition < position.Y + (float)npc.height) { - float num536 = position.Y + (float)npc.height - num535; - if ((double)num536 <= 16.1) + float percentageTileRisen = position.Y + (float)npc.height - tilePixelPosition; + if ((double)percentageTileRisen <= 16.1) { - npc.gfxOffY += npc.position.Y + (float)npc.height - num535; - npc.position.Y = num535 - (float)npc.height; - if (num536 < 9f) + npc.gfxOffY += npc.position.Y + (float)npc.height - tilePixelPosition; + npc.position.Y = tilePixelPosition - (float)npc.height; + if (percentageTileRisen < 9f) { npc.stepSpeed = 0.75f; } @@ -8088,9 +8077,9 @@ namespace CalamityMod.NPCs if (npc.type == NPCID.IceTortoise && Main.rand.NextBool(10)) { - int num537 = Dust.NewDust(npc.position, npc.width, npc.height, 67, npc.velocity.X * 0.5f, npc.velocity.Y * 0.5f, 90, default(Color), 1.5f); - Main.dust[num537].noGravity = true; - Dust dust = Main.dust[num537]; + int iceTortoiseDust = Dust.NewDust(npc.position, npc.width, npc.height, 67, npc.velocity.X * 0.5f, npc.velocity.Y * 0.5f, 90, default(Color), 1.5f); + Main.dust[iceTortoiseDust].noGravity = true; + Dust dust = Main.dust[iceTortoiseDust]; dust.velocity *= 0.2f; } @@ -8107,30 +8096,30 @@ namespace CalamityMod.NPCs npc.spriteDirection = npc.direction; - Vector2 vector66 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float num538 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector66.X; - float num539 = Main.player[npc.target].position.Y - vector66.Y; - float num540 = (float)Math.Sqrt((double)(num538 * num538 + num539 * num539)); + Vector2 tortoisePosition = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + float tortoiseTargetX = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - tortoisePosition.X; + float tortoiseTargetY = Main.player[npc.target].position.Y - tortoisePosition.Y; + float tortoiseTargetDist = (float)Math.Sqrt((double)(tortoiseTargetX * tortoiseTargetX + tortoiseTargetY * tortoiseTargetY)); - bool flag32 = Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height); + bool canHitPlayer = Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height); if (npc.type == NPCID.GiantShelly || npc.type == NPCID.GiantShelly2) { - if (num540 > 200f & flag32) + if (tortoiseTargetDist > 200f & canHitPlayer) { npc.ai[1] += 3f; } - if (num540 > 600f && (flag32 || npc.position.Y + (float)npc.height > Main.player[npc.target].position.Y - 200f)) + if (tortoiseTargetDist > 600f && (canHitPlayer || npc.position.Y + (float)npc.height > Main.player[npc.target].position.Y - 200f)) { npc.ai[1] += 6f; } } else { - if (num540 > 200f & flag32) + if (tortoiseTargetDist > 200f & canHitPlayer) { npc.ai[1] += 6f; } - if (num540 > 600f && (flag32 || npc.position.Y + (float)npc.height > Main.player[npc.target].position.Y - 200f)) + if (tortoiseTargetDist > 600f && (canHitPlayer || npc.position.Y + (float)npc.height > Main.player[npc.target].position.Y - 200f)) { npc.ai[1] += 15f; } @@ -8167,34 +8156,34 @@ namespace CalamityMod.NPCs if (npc.velocity.Y == 0f && Main.player[npc.target].position.Y < npc.position.Y + (float)npc.height) { - int num541; - int num542; + int tortoiseLeftTileX; + int tortoiseRightTileX; if (npc.direction > 0) { - num541 = (int)(((double)npc.position.X + (double)npc.width * 0.5) / 16.0); - num542 = num541 + 3; + tortoiseLeftTileX = (int)(((double)npc.position.X + (double)npc.width * 0.5) / 16.0); + tortoiseRightTileX = tortoiseLeftTileX + 3; } else { - num542 = (int)(((double)npc.position.X + (double)npc.width * 0.5) / 16.0); - num541 = num542 - 3; + tortoiseRightTileX = (int)(((double)npc.position.X + (double)npc.width * 0.5) / 16.0); + tortoiseLeftTileX = tortoiseRightTileX - 3; } - int num543 = (int)((npc.position.Y + (float)npc.height + 2f) / 16f) - 1; - int num544 = num543 + 4; - bool flag33 = false; - for (int num545 = num541; num545 <= num542; num545++) + int tortoiseBotTileY = (int)((npc.position.Y + (float)npc.height + 2f) / 16f) - 1; + int tortoiseTopTileY = tortoiseBotTileY + 4; + bool onSolidTile = false; + for (int x = tortoiseLeftTileX; x <= tortoiseRightTileX; x++) { - for (int num546 = num543; num546 <= num544; num546++) + for (int y = tortoiseBotTileY; y <= tortoiseTopTileY; y++) { - if (Main.tile[num545, num546] != null && Main.tile[num545, num546].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[num545, num546].TileType]) + if (Main.tile[x, y] != null && Main.tile[x, y].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[x, y].TileType]) { - flag33 = true; + onSolidTile = true; } } } - if (!flag33) + if (!onSolidTile) { npc.direction *= -1; npc.velocity.X = 0.1f * (float)npc.direction; @@ -8203,57 +8192,57 @@ namespace CalamityMod.NPCs if (npc.type == NPCID.GiantShelly || npc.type == NPCID.GiantShelly2) { - float num547 = 1f; - if (npc.velocity.X < -num547 || npc.velocity.X > num547) + float giantShellyMaxVel = 1f; + if (npc.velocity.X < -giantShellyMaxVel || npc.velocity.X > giantShellyMaxVel) { if (npc.velocity.Y == 0f) { npc.velocity *= 0.8f; } } - else if (npc.velocity.X < num547 && npc.direction == 1) + else if (npc.velocity.X < giantShellyMaxVel && npc.direction == 1) { npc.velocity.X = npc.velocity.X + 0.1f; - if (npc.velocity.X > num547) + if (npc.velocity.X > giantShellyMaxVel) { - npc.velocity.X = num547; + npc.velocity.X = giantShellyMaxVel; } } - else if (npc.velocity.X > -num547 && npc.direction == -1) + else if (npc.velocity.X > -giantShellyMaxVel && npc.direction == -1) { npc.velocity.X = npc.velocity.X - 0.1f; - if (npc.velocity.X < -num547) + if (npc.velocity.X < -giantShellyMaxVel) { - npc.velocity.X = -num547; + npc.velocity.X = -giantShellyMaxVel; } } } else { - float num548 = 2f; - if (num540 < 400f) + float tortoiseMaxVel = 2f; + if (tortoiseTargetDist < 400f) { - if (npc.velocity.X < -num548 || npc.velocity.X > num548) + if (npc.velocity.X < -tortoiseMaxVel || npc.velocity.X > tortoiseMaxVel) { if (npc.velocity.Y == 0f) { npc.velocity *= 0.8f; } } - else if (npc.velocity.X < num548 && npc.direction == 1) + else if (npc.velocity.X < tortoiseMaxVel && npc.direction == 1) { npc.velocity.X = npc.velocity.X + 0.1f; - if (npc.velocity.X > num548) + if (npc.velocity.X > tortoiseMaxVel) { - npc.velocity.X = num548; + npc.velocity.X = tortoiseMaxVel; } } - else if (npc.velocity.X > -num548 && npc.direction == -1) + else if (npc.velocity.X > -tortoiseMaxVel && npc.direction == -1) { npc.velocity.X = npc.velocity.X - 0.1f; - if (npc.velocity.X < -num548) + if (npc.velocity.X < -tortoiseMaxVel) { - npc.velocity.X = -num548; + npc.velocity.X = -tortoiseMaxVel; } } } @@ -8316,9 +8305,9 @@ namespace CalamityMod.NPCs { if (npc.type == NPCID.IceTortoise && Main.rand.Next(3) < 2) { - int num549 = Dust.NewDust(npc.position, npc.width, npc.height, 67, npc.velocity.X * 0.5f, npc.velocity.Y * 0.5f, 90, default(Color), 1.5f); - Main.dust[num549].noGravity = true; - Dust dust = Main.dust[num549]; + int iceTortoiseSpinDust = Dust.NewDust(npc.position, npc.width, npc.height, 67, npc.velocity.X * 0.5f, npc.velocity.Y * 0.5f, 90, default(Color), 1.5f); + Main.dust[iceTortoiseSpinDust].noGravity = true; + Dust dust = Main.dust[iceTortoiseSpinDust]; dust.velocity *= 0.2f; } @@ -8343,39 +8332,39 @@ namespace CalamityMod.NPCs npc.rotation += npc.ai[2] * (float)npc.direction; npc.ai[1] += 1f; - bool flag34 = Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height); - float num550 = 15f; - if (!flag34) + bool spinAttackCanHit = Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height); + float spinAttackSpeed = 15f; + if (!spinAttackCanHit) { - num550 = 6f; + spinAttackSpeed = 6f; } if (npc.type == NPCID.GiantShelly || npc.type == NPCID.GiantShelly2) { - num550 *= 0.75f; + spinAttackSpeed *= 0.75f; } - Vector2 vector67 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float num551 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector67.X; - float num552 = Math.Abs(num551) * 0.2f; + Vector2 spinAttackPosition = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + float spinAttackTargetX = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - spinAttackPosition.X; + float absoluteSpinTargetX = Math.Abs(spinAttackTargetX) * 0.2f; if (npc.directionY > 0) { - num552 = 0f; + absoluteSpinTargetX = 0f; } - float num553 = Main.player[npc.target].position.Y - vector67.Y - num552; - float num554 = (float)Math.Sqrt((double)(num551 * num551 + num553 * num553)); + float spinAttackTargetY = Main.player[npc.target].position.Y - spinAttackPosition.Y - absoluteSpinTargetX; + float spinAttackTargetDist = (float)Math.Sqrt((double)(spinAttackTargetX * spinAttackTargetX + spinAttackTargetY * spinAttackTargetY)); npc.netUpdate = true; - num554 = num550 / num554; - num551 *= num554; - num553 *= num554; + spinAttackTargetDist = spinAttackSpeed / spinAttackTargetDist; + spinAttackTargetX *= spinAttackTargetDist; + spinAttackTargetY *= spinAttackTargetDist; - if (!flag34) + if (!spinAttackCanHit) { - num553 = -10f; + spinAttackTargetY = -10f; } - npc.velocity.X = num551; - npc.velocity.Y = num553; + npc.velocity.X = spinAttackTargetX; + npc.velocity.Y = spinAttackTargetY; npc.ai[3] = npc.velocity.X; } else @@ -8452,8 +8441,8 @@ namespace CalamityMod.NPCs if (Main.rand.Next(3) < 2) { - int num555 = Dust.NewDust(npc.Center - new Vector2(30f), 60, 60, 6, npc.velocity.X * 0.5f, npc.velocity.Y * 0.5f, 90, default(Color), 1.5f); - Dust dust = Main.dust[num555]; + int spinAttackDust = Dust.NewDust(npc.Center - new Vector2(30f), 60, 60, 6, npc.velocity.X * 0.5f, npc.velocity.Y * 0.5f, 90, default(Color), 1.5f); + Dust dust = Main.dust[spinAttackDust]; dust.noGravity = true; dust.velocity *= 0.2f; dust.fadeIn = 1f; @@ -8465,23 +8454,23 @@ namespace CalamityMod.NPCs if (npc.ai[3] == 1f) { Vector2 vector68 = npc.Center - new Vector2(50f); - for (int num556 = 0; num556 < 32; num556++) + for (int i = 0; i < 32; i++) { - int num557 = Dust.NewDust(vector68, 100, 100, 6, 0f, 0f, 100, default(Color), 2.5f); - Dust dust = Main.dust[num557]; + int spinEndDust = Dust.NewDust(vector68, 100, 100, 6, 0f, 0f, 100, default(Color), 2.5f); + Dust dust = Main.dust[spinEndDust]; dust.noGravity = true; dust.velocity *= 3f; - num557 = Dust.NewDust(vector68, 100, 100, 6, 0f, 0f, 100, default(Color), 1.5f); + spinEndDust = Dust.NewDust(vector68, 100, 100, 6, 0f, 0f, 100, default(Color), 1.5f); dust.velocity *= 2f; dust.noGravity = true; } if (Main.netMode != NetmodeID.Server) { - for (int num558 = 0; num558 < 4; num558++) + for (int j = 0; j < 4; j++) { - int num559 = Gore.NewGore(npc.GetSource_FromAI(), vector68 + new Vector2((float)(50 * Main.rand.Next(100)) / 100f, (float)(50 * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, default(Vector2), Main.rand.Next(61, 64), 1f); - Gore gore = Main.gore[num559]; + int spinEndGore = Gore.NewGore(npc.GetSource_FromAI(), vector68 + new Vector2((float)(50 * Main.rand.Next(100)) / 100f, (float)(50 * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, default(Vector2), Main.rand.Next(61, 64), 1f); + Gore gore = Main.gore[spinEndGore]; gore.velocity *= 0.3f; gore.velocity.X += (float)Main.rand.Next(-10, 11) * 0.05f; gore.velocity.Y += (float)Main.rand.Next(-10, 11) * 0.05f; @@ -8489,10 +8478,10 @@ namespace CalamityMod.NPCs } } - for (int num560 = 0; num560 < 5; num560++) + for (int k = 0; k < 5; k++) { - int num561 = Dust.NewDust(npc.position, npc.width, npc.height, 31, 0f, 0f, 100, default(Color), 1.5f); - Main.dust[num561].velocity *= Main.rand.NextFloat(); + int moreSpinEndDust = Dust.NewDust(npc.position, npc.width, npc.height, 31, 0f, 0f, 100, default(Color), 1.5f); + Main.dust[moreSpinEndDust].velocity *= Main.rand.NextFloat(); } npc.ai[3] += 1f; @@ -8507,35 +8496,35 @@ namespace CalamityMod.NPCs npc.netUpdate = true; npc.TargetClosest(true); - bool flag35 = Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height); - float num562 = 24f; - if (!flag35) + bool spinAboveCanHit = Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height); + float spinAboveSpeed = 24f; + if (!spinAboveCanHit) { - num562 = 10f; + spinAboveSpeed = 10f; } Vector2 vector69 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float num563 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector69.X; - float num564 = Math.Abs(num563) * 0.2f; + float spinAboveTargetX = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector69.X; + float absoluteSpinAboveTargetX = Math.Abs(spinAboveTargetX) * 0.2f; if (npc.directionY > 0) { - num564 = 0f; + absoluteSpinAboveTargetX = 0f; } - float num565 = Main.player[npc.target].position.Y - vector69.Y - num564; - float num566 = (float)Math.Sqrt((double)(num563 * num563 + num565 * num565)); + float spinAboveTargetY = Main.player[npc.target].position.Y - vector69.Y - absoluteSpinAboveTargetX; + float spinAboveTargetDist = (float)Math.Sqrt((double)(spinAboveTargetX * spinAboveTargetX + spinAboveTargetY * spinAboveTargetY)); npc.netUpdate = true; - num566 = num562 / num566; - num563 *= num566; - num565 *= num566; + spinAboveTargetDist = spinAboveSpeed / spinAboveTargetDist; + spinAboveTargetX *= spinAboveTargetDist; + spinAboveTargetY *= spinAboveTargetDist; - if (!flag35) + if (!spinAboveCanHit) { - num565 = -12f; + spinAboveTargetY = -12f; } - npc.velocity.X = num563; - npc.velocity.Y = num565; + npc.velocity.X = spinAboveTargetX; + npc.velocity.Y = spinAboveTargetY; } else { @@ -8924,27 +8913,27 @@ namespace CalamityMod.NPCs npc.ai[0] += 10f; } - Vector2 vector72 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float num585 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector72.X; - float num586 = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - vector72.Y; - float num587 = (float)Math.Sqrt((double)(num585 * num585 + num586 * num586)); - float num588 = 400f / num587; + Vector2 herplingPosition = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + float herplingTargetX = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - herplingPosition.X; + float herplingTargetY = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - herplingPosition.Y; + float herplingTargetDist = (float)Math.Sqrt((double)(herplingTargetX * herplingTargetX + herplingTargetY * herplingTargetY)); + float herplingJumpHeight = 400f / herplingTargetDist; if (npc.type == NPCID.Derpling) { - num588 *= 5f; + herplingJumpHeight *= 5f; } else { - num588 *= 10f; + herplingJumpHeight *= 10f; } - if (num588 > 30f) + if (herplingJumpHeight > 30f) { - num588 = 30f; + herplingJumpHeight = 30f; } - npc.ai[0] += (float)((int)num588); + npc.ai[0] += (float)((int)herplingJumpHeight); if (npc.ai[0] >= 0f) { @@ -8961,7 +8950,7 @@ namespace CalamityMod.NPCs { npc.velocity.Y = -14f; npc.velocity.X = npc.velocity.X + 3f * (float)npc.direction; - if (num587 < 350f && num587 > 200f) + if (herplingTargetDist < 350f && herplingTargetDist > 200f) { npc.velocity.X = npc.velocity.X + (float)npc.direction; } @@ -8973,7 +8962,7 @@ namespace CalamityMod.NPCs { npc.velocity.Y = -10f; npc.velocity.X = npc.velocity.X + (float)(5 * npc.direction); - if (num587 < 350f && num587 > 200f) + if (herplingTargetDist < 350f && herplingTargetDist > 200f) { npc.velocity.X = npc.velocity.X + (float)npc.direction; } @@ -8985,7 +8974,7 @@ namespace CalamityMod.NPCs { npc.velocity.Y = -9f; npc.velocity.X = npc.velocity.X + (float)(2 * npc.direction); - if (num587 < 350f && num587 > 200f) + if (herplingTargetDist < 350f && herplingTargetDist > 200f) { npc.velocity.X = npc.velocity.X + (float)npc.direction; } @@ -8997,7 +8986,7 @@ namespace CalamityMod.NPCs { npc.velocity.Y = -5f; npc.velocity.X = npc.velocity.X + (float)(4 * npc.direction); - if (num587 < 350f && num587 > 200f) + if (herplingTargetDist < 350f && herplingTargetDist > 200f) { npc.velocity.X = npc.velocity.X + (float)npc.direction; } @@ -9019,10 +9008,10 @@ namespace CalamityMod.NPCs { if (npc.type == NPCID.Derpling) { - bool flag37 = false; + bool derplingDropOnTarget = false; if (npc.position.Y + (float)npc.height < Main.player[npc.target].position.Y && npc.position.X + (float)npc.width > Main.player[npc.target].position.X && npc.position.X < Main.player[npc.target].position.X + (float)Main.player[npc.target].width) { - flag37 = true; + derplingDropOnTarget = true; npc.velocity.X = npc.velocity.X * 0.9f; if (npc.velocity.Y < 0f) { @@ -9031,7 +9020,7 @@ namespace CalamityMod.NPCs } } - if (!flag37 && ((npc.direction == 1 && npc.velocity.X < 4f) || (npc.direction == -1 && npc.velocity.X > -4f))) + if (!derplingDropOnTarget && ((npc.direction == 1 && npc.velocity.X < 4f) || (npc.direction == -1 && npc.velocity.X > -4f))) { if ((npc.direction == -1 && (double)npc.velocity.X < 0.1) || (npc.direction == 1 && (double)npc.velocity.X > -0.1)) { @@ -9091,14 +9080,14 @@ namespace CalamityMod.NPCs { npc.velocity.Y = -6f; npc.netUpdate = true; - for (int num662 = 0; num662 < 15; num662++) + for (int i = 0; i < 15; i++) { - Dust dust2 = Dust.NewDustDirect(npc.position, npc.width, npc.height, 5); - Dust dust = dust2; + Dust eyeFishDust = Dust.NewDustDirect(npc.position, npc.width, npc.height, 5); + Dust dust = eyeFishDust; dust.velocity *= 0.5f; - dust2.scale = 1f + Main.rand.NextFloat() * 0.5f; - dust2.fadeIn = 1.5f + Main.rand.NextFloat() * 0.5f; - dust = dust2; + eyeFishDust.scale = 1f + Main.rand.NextFloat() * 0.5f; + eyeFishDust.fadeIn = 1.5f + Main.rand.NextFloat() * 0.5f; + dust = eyeFishDust; dust.velocity += npc.velocity * 0.5f; } } @@ -9109,33 +9098,33 @@ namespace CalamityMod.NPCs if (npc.alpha != 0) { - for (int num663 = 0; num663 < 2; num663++) + for (int j = 0; j < 2; j++) { - Dust dust3 = Dust.NewDustDirect(npc.position, npc.width, npc.height, 5); - Dust dust = dust3; + Dust eyeFishDust2 = Dust.NewDustDirect(npc.position, npc.width, npc.height, 5); + Dust dust = eyeFishDust2; dust.velocity *= 1f; - dust3.scale = 1f + Main.rand.NextFloat() * 0.5f; - dust3.fadeIn = 1.5f + Main.rand.NextFloat() * 0.5f; - dust = dust3; + eyeFishDust2.scale = 1f + Main.rand.NextFloat() * 0.5f; + eyeFishDust2.fadeIn = 1.5f + Main.rand.NextFloat() * 0.5f; + dust = eyeFishDust2; dust.velocity += npc.velocity * 0.3f; } } if (Main.rand.NextBool(3)) { - Dust dust4 = Dust.NewDustDirect(npc.position, npc.width, npc.height, 5); - Dust dust = dust4; + Dust eyeFishIdleDust = Dust.NewDustDirect(npc.position, npc.width, npc.height, 5); + Dust dust = eyeFishIdleDust; dust.velocity *= 0f; - dust4.alpha = 120; - dust4.scale = 0.7f + Main.rand.NextFloat() * 0.5f; - dust = dust4; + eyeFishIdleDust.alpha = 120; + eyeFishIdleDust.scale = 0.7f + Main.rand.NextFloat() * 0.5f; + dust = eyeFishIdleDust; dust.velocity += npc.velocity * 0.3f; } npc.position -= npc.netOffset; } - int num631 = npc.target; - int direction2 = npc.direction; + int fishTarget = npc.target; + int fishDirection = npc.direction; if (npc.target == Main.maxPlayers || (Main.player[npc.target].wet && npc.type != NPCID.EyeballFlyingFish) || Main.player[npc.target].dead || Collision.CanHit(npc.Center, 1, 1, Main.player[npc.target].Center, 1, 1)) { npc.ai[0] = 90f; @@ -9146,34 +9135,34 @@ namespace CalamityMod.NPCs npc.ai[0] -= 1f; npc.TargetClosest(true); } - if (npc.netUpdate && num631 == npc.target && direction2 == npc.direction) + if (npc.netUpdate && fishTarget == npc.target && fishDirection == npc.direction) { npc.netUpdate = false; } - float num632 = 0.05f; - float num633 = 0.01f; - float num634 = 6f; - float num635 = 3f; - float num636 = 30f; - float num637 = 100f; - float num638 = Math.Abs(npc.position.X + (float)(npc.width / 2) - (Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2))); - float num639 = Main.player[npc.target].position.Y - (float)(npc.height / 2); + float acceleration = 0.05f; + float verticalAcceleration = 0.01f; + float maxVelocity = 6f; + float maxYSpeed = 3f; + float turnAroundXDist = 30f; + float turnAroundYDist = 100f; + float targetXDist = Math.Abs(npc.position.X + (float)(npc.width / 2) - (Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2))); + float targetYDist = Main.player[npc.target].position.Y - (float)(npc.height / 2); if (npc.type == NPCID.FlyingAntlion || npc.type == NPCID.GiantFlyingAntlion) { - num632 = 0.09f; - num633 = 0.03f; - num634 = 9f; - num635 = 6f; - num636 = 40f; - num637 = 150f; - num639 = Main.player[npc.target].Center.Y - (float)(npc.height / 2); + acceleration = 0.09f; + verticalAcceleration = 0.03f; + maxVelocity = 9f; + maxYSpeed = 6f; + turnAroundXDist = 40f; + turnAroundYDist = 150f; + targetYDist = Main.player[npc.target].Center.Y - (float)(npc.height / 2); npc.rotation = npc.velocity.X * 0.1f; - int num; - for (int num640 = 0; num640 < Main.maxNPCs; num640 = num + 1) + int playerInc; + for (int p = 0; p < Main.maxNPCs; p = playerInc + 1) { - if (num640 != npc.whoAmI && Main.npc[num640].active && Main.npc[num640].type == npc.type && Math.Abs(npc.position.X - Main.npc[num640].position.X) + Math.Abs(npc.position.Y - Main.npc[num640].position.Y) < (float)npc.width) + if (p != npc.whoAmI && Main.npc[p].active && Main.npc[p].type == npc.type && Math.Abs(npc.position.X - Main.npc[p].position.X) + Math.Abs(npc.position.Y - Main.npc[p].position.Y) < (float)npc.width) { - if (npc.position.X < Main.npc[num640].position.X) + if (npc.position.X < Main.npc[p].position.X) { npc.velocity.X = npc.velocity.X - 0.05f; } @@ -9181,7 +9170,7 @@ namespace CalamityMod.NPCs { npc.velocity.X = npc.velocity.X + 0.05f; } - if (npc.position.Y < Main.npc[num640].position.Y) + if (npc.position.Y < Main.npc[p].position.Y) { npc.velocity.Y = npc.velocity.Y - 0.05f; } @@ -9190,34 +9179,34 @@ namespace CalamityMod.NPCs npc.velocity.Y = npc.velocity.Y + 0.05f; } } - num = num640; + playerInc = p; } } else if (npc.type == NPCID.EyeballFlyingFish) { - num632 = 0.16f; - num633 = 0.12f; - num634 = 9f; - num635 = 5f; - num636 = 0f; - num637 = 250f; - num639 = Main.player[npc.target].position.Y; + acceleration = 0.16f; + verticalAcceleration = 0.12f; + maxVelocity = 9f; + maxYSpeed = 5f; + turnAroundXDist = 0f; + turnAroundYDist = 250f; + targetYDist = Main.player[npc.target].position.Y; if (Main.dayTime) { - num639 = 0f; + targetYDist = 0f; npc.direction *= -1; } } if (CalamityWorld.death) { - num634 *= 1.25f; - num632 *= 1.25f; + maxVelocity *= 1.25f; + acceleration *= 1.25f; } if (npc.ai[0] <= 0f) { - num634 *= 0.8f; - num632 *= 0.7f; - num639 = npc.Center.Y + (float)(npc.directionY * 1000); + maxVelocity *= 0.8f; + acceleration *= 0.7f; + targetYDist = npc.Center.Y + (float)(npc.directionY * 1000); if (npc.velocity.X < 0f) { npc.direction = -1; @@ -9227,68 +9216,68 @@ namespace CalamityMod.NPCs npc.direction = 1; } } - if (num638 > num636) + if (targetXDist > turnAroundXDist) { - if (npc.direction == -1 && npc.velocity.X > -num634) + if (npc.direction == -1 && npc.velocity.X > -maxVelocity) { - npc.velocity.X = npc.velocity.X - num632; - if (npc.velocity.X > num634) + npc.velocity.X = npc.velocity.X - acceleration; + if (npc.velocity.X > maxVelocity) { - npc.velocity.X = npc.velocity.X - num632; + npc.velocity.X = npc.velocity.X - acceleration; } else if (npc.velocity.X > 0f) { - npc.velocity.X = npc.velocity.X - num632 / 2f; + npc.velocity.X = npc.velocity.X - acceleration / 2f; } - if (npc.velocity.X < -num634) + if (npc.velocity.X < -maxVelocity) { - npc.velocity.X = -num634; + npc.velocity.X = -maxVelocity; } } - else if (npc.direction == 1 && npc.velocity.X < num634) + else if (npc.direction == 1 && npc.velocity.X < maxVelocity) { - npc.velocity.X = npc.velocity.X + num632; - if (npc.velocity.X < -num634) + npc.velocity.X = npc.velocity.X + acceleration; + if (npc.velocity.X < -maxVelocity) { - npc.velocity.X = npc.velocity.X + num632; + npc.velocity.X = npc.velocity.X + acceleration; } else if (npc.velocity.X < 0f) { - npc.velocity.X = npc.velocity.X + num632 / 2f; + npc.velocity.X = npc.velocity.X + acceleration / 2f; } - if (npc.velocity.X > num634) + if (npc.velocity.X > maxVelocity) { - npc.velocity.X = num634; + npc.velocity.X = maxVelocity; } } } - if (num638 > num637) + if (targetXDist > turnAroundYDist) { - num639 -= num637 / 2f; + targetYDist -= turnAroundYDist / 2f; } - if (npc.position.Y < num639) + if (npc.position.Y < targetYDist) { - npc.velocity.Y = npc.velocity.Y + num633; + npc.velocity.Y = npc.velocity.Y + verticalAcceleration; if (npc.velocity.Y < 0f) { - npc.velocity.Y = npc.velocity.Y + num633; + npc.velocity.Y = npc.velocity.Y + verticalAcceleration; } } else { - npc.velocity.Y = npc.velocity.Y - num633; + npc.velocity.Y = npc.velocity.Y - verticalAcceleration; if (npc.velocity.Y > 0f) { - npc.velocity.Y = npc.velocity.Y - num633; + npc.velocity.Y = npc.velocity.Y - verticalAcceleration; } } - if (npc.velocity.Y < -num635) + if (npc.velocity.Y < -maxYSpeed) { - npc.velocity.Y = -num635; + npc.velocity.Y = -maxYSpeed; } - if (npc.velocity.Y > num635) + if (npc.velocity.Y > maxYSpeed) { - npc.velocity.Y = num635; + npc.velocity.Y = maxYSpeed; } if (npc.wet && npc.type != NPCID.EyeballFlyingFish) { @@ -9654,7 +9643,7 @@ namespace CalamityMod.NPCs { int dustSpawnChance = (npc.ai[0] == 2f) ? 2 : 1; int dustSpawnAreaSize = (npc.ai[0] == 2f) ? 30 : 20; - for (int num1055 = 0; num1055 < 2; num1055++) + for (int i = 0; i < 2; i++) { if (Main.rand.Next(3) < dustSpawnChance) { @@ -10079,62 +10068,62 @@ namespace CalamityMod.NPCs npc.ai[0] = 1f; return false; } - Vector2 value46 = Main.player[npc.target].Center - npc.Center; - value46.Y -= (float)(Main.player[npc.target].height / 4); - float attackTimeMax1 = value46.Length(); + Vector2 targetDirection = Main.player[npc.target].Center - npc.Center; + targetDirection.Y -= (float)(Main.player[npc.target].height / 4); + float attackTimeMax1 = targetDirection.Length(); if (attackTimeMax1 > (CalamityWorld.death ? 400f : 800f)) { npc.ai[0] = 2f; return false; } - Vector2 center30 = npc.Center; - center30.X = Main.player[npc.target].Center.X; - Vector2 vector243 = center30 - npc.Center; - if (vector243.Length() > 8f && Collision.CanHit(npc.Center, 1, 1, center30, 1, 1)) + Vector2 elementalCenter = npc.Center; + elementalCenter.X = Main.player[npc.target].Center.X; + Vector2 targetDistance = elementalCenter - npc.Center; + if (targetDistance.Length() > 8f && Collision.CanHit(npc.Center, 1, 1, elementalCenter, 1, 1)) { npc.ai[0] = 3f; - npc.ai[1] = center30.X; - npc.ai[2] = center30.Y; - Vector2 center31 = npc.Center; - center31.Y = Main.player[npc.target].Center.Y; - if (vector243.Length() > 8f && Collision.CanHit(npc.Center, 1, 1, center31, 1, 1) && Collision.CanHit(center31, 1, 1, Main.player[npc.target].position, 1, 1)) + npc.ai[1] = elementalCenter.X; + npc.ai[2] = elementalCenter.Y; + Vector2 elementalCenter2 = npc.Center; + elementalCenter2.Y = Main.player[npc.target].Center.Y; + if (targetDistance.Length() > 8f && Collision.CanHit(npc.Center, 1, 1, elementalCenter2, 1, 1) && Collision.CanHit(elementalCenter2, 1, 1, Main.player[npc.target].position, 1, 1)) { npc.ai[0] = 3f; - npc.ai[1] = center31.X; - npc.ai[2] = center31.Y; + npc.ai[1] = elementalCenter2.X; + npc.ai[2] = elementalCenter2.Y; } } else { - center30 = npc.Center; - center30.Y = Main.player[npc.target].Center.Y; - if ((center30 - npc.Center).Length() > 8f && Collision.CanHit(npc.Center, 1, 1, center30, 1, 1)) + elementalCenter = npc.Center; + elementalCenter.Y = Main.player[npc.target].Center.Y; + if ((elementalCenter - npc.Center).Length() > 8f && Collision.CanHit(npc.Center, 1, 1, elementalCenter, 1, 1)) { npc.ai[0] = 3f; - npc.ai[1] = center30.X; - npc.ai[2] = center30.Y; + npc.ai[1] = elementalCenter.X; + npc.ai[2] = elementalCenter.Y; } } if (npc.ai[0] == 0f) { npc.localAI[0] = 0f; - value46.Normalize(); - value46 *= 0.5f; - npc.velocity += value46; + targetDirection.Normalize(); + targetDirection *= 0.5f; + npc.velocity += targetDirection; npc.ai[0] = 4f; npc.ai[1] = 0f; } } else if (npc.ai[0] == 1f) { - Vector2 value47 = Main.player[npc.target].Center - npc.Center; - float attackTimeMax2 = value47.Length(); + Vector2 targetDirectionAgain = Main.player[npc.target].Center - npc.Center; + float attackTimeMax2 = targetDirectionAgain.Length(); float attackTimeMax3 = 2f; attackTimeMax3 += attackTimeMax2 / (CalamityWorld.death ? 160f : 180f); int attackTimeMax4 = 50; - value47.Normalize(); - value47 *= attackTimeMax3; - npc.velocity = (npc.velocity * (float)(attackTimeMax4 - 1) + value47) / (float)attackTimeMax4; + targetDirectionAgain.Normalize(); + targetDirectionAgain *= attackTimeMax3; + npc.velocity = (npc.velocity * (float)(attackTimeMax4 - 1) + targetDirectionAgain) / (float)attackTimeMax4; if (!Collision.CanHit(npc.Center, 1, 1, Main.player[npc.target].Center, 1, 1)) { npc.ai[0] = 0f; @@ -10144,13 +10133,13 @@ namespace CalamityMod.NPCs else if (npc.ai[0] == 2f) { npc.noTileCollide = true; - Vector2 value48 = Main.player[npc.target].Center - npc.Center; - float attackTimeMax5 = value48.Length(); + Vector2 targetDirection3 = Main.player[npc.target].Center - npc.Center; + float attackTimeMax5 = targetDirection3.Length(); float scaleFactor23 = CalamityWorld.death ? 3f : 2.5f; int attackTimeMax6 = 4; - value48.Normalize(); - value48 *= scaleFactor23; - npc.velocity = (npc.velocity * (float)(attackTimeMax6 - 1) + value48) / (float)attackTimeMax6; + targetDirection3.Normalize(); + targetDirection3 *= scaleFactor23; + npc.velocity = (npc.velocity * (float)(attackTimeMax6 - 1) + targetDirection3) / (float)attackTimeMax6; if (attackTimeMax5 < 600f && !Collision.SolidCollision(npc.position, npc.width, npc.height)) { npc.ai[0] = 0f; @@ -10158,14 +10147,14 @@ namespace CalamityMod.NPCs } else if (npc.ai[0] == 3f) { - Vector2 value49 = new Vector2(npc.ai[1], npc.ai[2]); - Vector2 value50 = value49 - npc.Center; - float attackTimeMax7 = value50.Length(); + Vector2 elementalCenter3 = new Vector2(npc.ai[1], npc.ai[2]); + Vector2 elementalDirection = elementalCenter3 - npc.Center; + float attackTimeMax7 = elementalDirection.Length(); float attackTimeMax8 = 2f; float attackTimeMax9 = 3f; - value50.Normalize(); - value50 *= attackTimeMax8; - npc.velocity = (npc.velocity * (attackTimeMax9 - 1f) + value50) / attackTimeMax9; + elementalDirection.Normalize(); + elementalDirection *= attackTimeMax8; + npc.velocity = (npc.velocity * (attackTimeMax9 - 1f) + elementalDirection) / attackTimeMax9; if (npc.collideX || npc.collideY) { npc.ai[0] = 4f; @@ -10186,20 +10175,19 @@ namespace CalamityMod.NPCs { npc.velocity.Y = npc.velocity.Y * -0.8f; } - Vector2 value51; + Vector2 stationaryTargetDist; if (npc.velocity.X == 0f && npc.velocity.Y == 0f) { - value51 = Main.player[npc.target].Center - npc.Center; - value51.Y -= (float)(Main.player[npc.target].height / 4); - value51.Normalize(); - npc.velocity = value51 * 0.1f; + stationaryTargetDist = Main.player[npc.target].Center - npc.Center; + stationaryTargetDist.Y -= (float)(Main.player[npc.target].height / 4); + stationaryTargetDist.Normalize(); + npc.velocity = stationaryTargetDist * 0.1f; } float scaleFactor24 = CalamityWorld.death ? 2.5f : 2f; - float num1390 = 20f; - value51 = npc.velocity; - value51.Normalize(); - value51 *= scaleFactor24; - npc.velocity = (npc.velocity * (num1390 - 1f) + value51) / num1390; + stationaryTargetDist = npc.velocity; + stationaryTargetDist.Normalize(); + stationaryTargetDist *= scaleFactor24; + npc.velocity = (npc.velocity * 19f + stationaryTargetDist) / 20f; npc.ai[1] += 1f; if (npc.ai[1] > 180f) { @@ -10214,22 +10202,22 @@ namespace CalamityMod.NPCs if (npc.localAI[0] >= 5f && !Collision.SolidCollision(npc.position - new Vector2(10f, 10f), npc.width + 20, npc.height + 20)) { npc.localAI[0] = 0f; - Vector2 center32 = npc.Center; - center32.X = Main.player[npc.target].Center.X; - if (Collision.CanHit(npc.Center, 1, 1, center32, 1, 1) && Collision.CanHit(npc.Center, 1, 1, center32, 1, 1) && Collision.CanHit(Main.player[npc.target].Center, 1, 1, center32, 1, 1)) + Vector2 elementalCenter4 = npc.Center; + elementalCenter4.X = Main.player[npc.target].Center.X; + if (Collision.CanHit(npc.Center, 1, 1, elementalCenter4, 1, 1) && Collision.CanHit(npc.Center, 1, 1, elementalCenter4, 1, 1) && Collision.CanHit(Main.player[npc.target].Center, 1, 1, elementalCenter4, 1, 1)) { npc.ai[0] = 3f; - npc.ai[1] = center32.X; - npc.ai[2] = center32.Y; + npc.ai[1] = elementalCenter4.X; + npc.ai[2] = elementalCenter4.Y; return false; } - center32 = npc.Center; - center32.Y = Main.player[npc.target].Center.Y; - if (Collision.CanHit(npc.Center, 1, 1, center32, 1, 1) && Collision.CanHit(Main.player[npc.target].Center, 1, 1, center32, 1, 1)) + elementalCenter4 = npc.Center; + elementalCenter4.Y = Main.player[npc.target].Center.Y; + if (Collision.CanHit(npc.Center, 1, 1, elementalCenter4, 1, 1) && Collision.CanHit(Main.player[npc.target].Center, 1, 1, elementalCenter4, 1, 1)) { npc.ai[0] = 3f; - npc.ai[1] = center32.X; - npc.ai[2] = center32.Y; + npc.ai[1] = elementalCenter4.X; + npc.ai[2] = elementalCenter4.Y; } } } @@ -10250,50 +10238,50 @@ namespace CalamityMod.NPCs } else { - Vector2 vector204 = Main.player[npc.target].Center - npc.Center; - vector204.Y -= Main.player[npc.target].height / 4; - float num1324 = vector204.Length(); - if (num1324 > 800f) + Vector2 cellTargetDirection = Main.player[npc.target].Center - npc.Center; + cellTargetDirection.Y -= Main.player[npc.target].height / 4; + float cellTargetDist = cellTargetDirection.Length(); + if (cellTargetDist > 800f) { npc.ai[0] = 2f; } else { - Vector2 center31 = npc.Center; - center31.X = Main.player[npc.target].Center.X; - Vector2 vector205 = center31 - npc.Center; - if (vector205.Length() > 8f && Collision.CanHit(npc.Center, 1, 1, center31, 1, 1)) + Vector2 cellCenter = npc.Center; + cellCenter.X = Main.player[npc.target].Center.X; + Vector2 cellFaceDirection = cellCenter - npc.Center; + if (cellFaceDirection.Length() > 8f && Collision.CanHit(npc.Center, 1, 1, cellCenter, 1, 1)) { npc.ai[0] = 3f; - npc.ai[1] = center31.X; - npc.ai[2] = center31.Y; - Vector2 center32 = npc.Center; - center32.Y = Main.player[npc.target].Center.Y; - if (vector205.Length() > 8f && Collision.CanHit(npc.Center, 1, 1, center32, 1, 1) && Collision.CanHit(center32, 1, 1, Main.player[npc.target].position, 1, 1)) + npc.ai[1] = cellCenter.X; + npc.ai[2] = cellCenter.Y; + Vector2 cellCenter2 = npc.Center; + cellCenter2.Y = Main.player[npc.target].Center.Y; + if (cellFaceDirection.Length() > 8f && Collision.CanHit(npc.Center, 1, 1, cellCenter2, 1, 1) && Collision.CanHit(cellCenter2, 1, 1, Main.player[npc.target].position, 1, 1)) { npc.ai[0] = 3f; - npc.ai[1] = center32.X; - npc.ai[2] = center32.Y; + npc.ai[1] = cellCenter2.X; + npc.ai[2] = cellCenter2.Y; } } else { - center31 = npc.Center; - center31.Y = Main.player[npc.target].Center.Y; - if ((center31 - npc.Center).Length() > 8f && Collision.CanHit(npc.Center, 1, 1, center31, 1, 1)) + cellCenter = npc.Center; + cellCenter.Y = Main.player[npc.target].Center.Y; + if ((cellCenter - npc.Center).Length() > 8f && Collision.CanHit(npc.Center, 1, 1, cellCenter, 1, 1)) { npc.ai[0] = 3f; - npc.ai[1] = center31.X; - npc.ai[2] = center31.Y; + npc.ai[1] = cellCenter.X; + npc.ai[2] = cellCenter.Y; } } if (npc.ai[0] == 0f) { npc.localAI[0] = 0f; - vector204.Normalize(); - vector204 *= 0.5f; - npc.velocity += vector204; + cellTargetDirection.Normalize(); + cellTargetDirection *= 0.5f; + npc.velocity += cellTargetDirection; npc.ai[0] = 4f; npc.ai[1] = 0f; } @@ -10303,37 +10291,37 @@ namespace CalamityMod.NPCs else if (npc.ai[0] == 1f) { npc.rotation += npc.direction * 0.3f; - Vector2 value35 = Main.player[npc.target].Center - npc.Center; + Vector2 attacktargetDirection = Main.player[npc.target].Center - npc.Center; if (npc.type == NPCID.NebulaHeadcrab) - value35 = Main.player[npc.target].Top - npc.Center; + attacktargetDirection = Main.player[npc.target].Top - npc.Center; - float num1325 = value35.Length(); - float num1326 = CalamityWorld.death ? 9f : 7.5f; - num1326 += num1325 / 100f; - int num1327 = CalamityWorld.death ? 40 : 45; - value35.Normalize(); - value35 *= num1326; - npc.velocity = (npc.velocity * (num1327 - 1) + value35) / num1327; + float attackTargetDist = attacktargetDirection.Length(); + float attackVelocity = CalamityWorld.death ? 9f : 7.5f; + attackVelocity += attackTargetDist / 100f; + int attackVelocityMult = CalamityWorld.death ? 40 : 45; + attacktargetDirection.Normalize(); + attacktargetDirection *= attackVelocity; + npc.velocity = (npc.velocity * (attackVelocityMult - 1) + attacktargetDirection) / attackVelocityMult; if (!Collision.CanHit(npc.Center, 1, 1, Main.player[npc.target].Center, 1, 1)) { npc.ai[0] = 0f; npc.ai[1] = 0f; } - if (npc.type == NPCID.NebulaHeadcrab && num1325 < 40f && Main.player[npc.target].active && !Main.player[npc.target].dead) + if (npc.type == NPCID.NebulaHeadcrab && attackTargetDist < 40f && Main.player[npc.target].active && !Main.player[npc.target].dead) { - bool flag84 = true; - for (int num1328 = 0; num1328 < Main.maxNPCs; num1328++) + bool headcrabAttach = true; + for (int p = 0; p < Main.maxNPCs; p++) { - NPC nPC7 = Main.npc[num1328]; + NPC nPC7 = Main.npc[p]; if (nPC7.active && nPC7.type == npc.type && nPC7.ai[0] == 5f && nPC7.target == npc.target) { - flag84 = false; + headcrabAttach = false; break; } } - if (flag84) + if (headcrabAttach) { npc.Center = Main.player[npc.target].Top; npc.velocity = Vector2.Zero; @@ -10347,34 +10335,34 @@ namespace CalamityMod.NPCs { npc.rotation = npc.velocity.X * 0.1f; npc.noTileCollide = true; - Vector2 value36 = Main.player[npc.target].Center - npc.Center; - float num1329 = value36.Length(); - float num1330 = CalamityWorld.death ? 6f : 4.5f; - int num1331 = 2; - value36.Normalize(); - value36 *= num1330; - npc.velocity = (npc.velocity * (num1331 - 1) + value36) / num1331; - if (num1329 < 600f && !Collision.SolidCollision(npc.position, npc.width, npc.height)) + Vector2 idleTargetDirection = Main.player[npc.target].Center - npc.Center; + float idleTargetDist = idleTargetDirection.Length(); + float idleVelocity = CalamityWorld.death ? 6f : 4.5f; + int idleVelocityMult = 2; + idleTargetDirection.Normalize(); + idleTargetDirection *= idleVelocity; + npc.velocity = (npc.velocity * (idleVelocityMult - 1) + idleTargetDirection) / idleVelocityMult; + if (idleTargetDist < 600f && !Collision.SolidCollision(npc.position, npc.width, npc.height)) npc.ai[0] = 0f; } else if (npc.ai[0] == 3f) { npc.rotation = npc.velocity.X * 0.1f; - Vector2 value37 = new Vector2(npc.ai[1], npc.ai[2]); - Vector2 value38 = value37 - npc.Center; - float num1332 = value38.Length(); - float num1333 = CalamityWorld.death ? 4f : 3f; - float num1334 = 2f; - value38.Normalize(); - value38 *= num1333; - npc.velocity = (npc.velocity * (num1334 - 1f) + value38) / num1334; + Vector2 blockedCellCenter = new Vector2(npc.ai[1], npc.ai[2]); + Vector2 blockedCellDirection = blockedCellCenter - npc.Center; + float blockedTargetDist = blockedCellDirection.Length(); + float blockedVelocity = CalamityWorld.death ? 4f : 3f; + float blockedVelocityMult = 2f; + blockedCellDirection.Normalize(); + blockedCellDirection *= blockedVelocity; + npc.velocity = (npc.velocity * (blockedVelocityMult - 1f) + blockedCellDirection) / blockedVelocityMult; if (npc.collideX || npc.collideY) { npc.ai[0] = 4f; npc.ai[1] = 0f; } - if (num1332 < num1333 || num1332 > 800f || Collision.CanHit(npc.Center, 1, 1, Main.player[npc.target].Center, 1, 1)) + if (blockedTargetDist < blockedVelocity || blockedTargetDist > 800f || Collision.CanHit(npc.Center, 1, 1, Main.player[npc.target].Center, 1, 1)) npc.ai[0] = 0f; } else if (npc.ai[0] == 4f) @@ -10386,21 +10374,21 @@ namespace CalamityMod.NPCs if (npc.collideY) npc.velocity.Y *= -0.8f; - Vector2 value39; + Vector2 smolCellDirection; if (npc.velocity.X == 0f && npc.velocity.Y == 0f) { - value39 = Main.player[npc.target].Center - npc.Center; - value39.Y -= Main.player[npc.target].height / 4; - value39.Normalize(); - npc.velocity = value39 * 0.1f; + smolCellDirection = Main.player[npc.target].Center - npc.Center; + smolCellDirection.Y -= Main.player[npc.target].height / 4; + smolCellDirection.Normalize(); + npc.velocity = smolCellDirection * 0.1f; } - float num1335 = CalamityWorld.death ? 4f : 3f; - float num1336 = CalamityWorld.death ? 16f : 18f; - value39 = npc.velocity; - value39.Normalize(); - value39 *= num1335; - npc.velocity = (npc.velocity * (num1336 - 1f) + value39) / num1336; + float smolCellVelocity = CalamityWorld.death ? 4f : 3f; + float smolCellVelocityMult = CalamityWorld.death ? 16f : 18f; + smolCellDirection = npc.velocity; + smolCellDirection.Normalize(); + smolCellDirection *= smolCellVelocity; + npc.velocity = (npc.velocity * (smolCellVelocityMult - 1f) + smolCellDirection) / smolCellVelocityMult; npc.ai[1] += 1f; if (npc.ai[1] > 180f) { @@ -10415,23 +10403,23 @@ namespace CalamityMod.NPCs if (npc.localAI[0] >= 5f && !Collision.SolidCollision(npc.position - new Vector2(10f, 10f), npc.width + 20, npc.height + 20)) { npc.localAI[0] = 0f; - Vector2 center33 = npc.Center; - center33.X = Main.player[npc.target].Center.X; - if (Collision.CanHit(npc.Center, 1, 1, center33, 1, 1) && Collision.CanHit(npc.Center, 1, 1, center33, 1, 1) && Collision.CanHit(Main.player[npc.target].Center, 1, 1, center33, 1, 1)) + Vector2 cellCentered = npc.Center; + cellCentered.X = Main.player[npc.target].Center.X; + if (Collision.CanHit(npc.Center, 1, 1, cellCentered, 1, 1) && Collision.CanHit(npc.Center, 1, 1, cellCentered, 1, 1) && Collision.CanHit(Main.player[npc.target].Center, 1, 1, cellCentered, 1, 1)) { npc.ai[0] = 3f; - npc.ai[1] = center33.X; - npc.ai[2] = center33.Y; + npc.ai[1] = cellCentered.X; + npc.ai[2] = cellCentered.Y; } else { - center33 = npc.Center; - center33.Y = Main.player[npc.target].Center.Y; - if (Collision.CanHit(npc.Center, 1, 1, center33, 1, 1) && Collision.CanHit(Main.player[npc.target].Center, 1, 1, center33, 1, 1)) + cellCentered = npc.Center; + cellCentered.Y = Main.player[npc.target].Center.Y; + if (Collision.CanHit(npc.Center, 1, 1, cellCentered, 1, 1) && Collision.CanHit(Main.player[npc.target].Center, 1, 1, cellCentered, 1, 1)) { npc.ai[0] = 3f; - npc.ai[1] = center33.X; - npc.ai[2] = center33.Y; + npc.ai[1] = cellCentered.X; + npc.ai[2] = cellCentered.Y; } } } @@ -10458,16 +10446,16 @@ namespace CalamityMod.NPCs if (npc.type == NPCID.StardustCellBig) { npc.rotation = 0f; - for (int num1337 = 0; num1337 < Main.maxNPCs; num1337++) + for (int r = 0; r < Main.maxNPCs; r++) { - if (num1337 != npc.whoAmI && Main.npc[num1337].active && Main.npc[num1337].type == npc.type && Math.Abs(npc.position.X - Main.npc[num1337].position.X) + Math.Abs(npc.position.Y - Main.npc[num1337].position.Y) < npc.width) + if (r != npc.whoAmI && Main.npc[r].active && Main.npc[r].type == npc.type && Math.Abs(npc.position.X - Main.npc[r].position.X) + Math.Abs(npc.position.Y - Main.npc[r].position.Y) < npc.width) { - if (npc.position.X < Main.npc[num1337].position.X) + if (npc.position.X < Main.npc[r].position.X) npc.velocity.X -= 0.05f; else npc.velocity.X += 0.05f; - if (npc.position.Y < Main.npc[num1337].position.Y) + if (npc.position.Y < Main.npc[r].position.Y) npc.velocity.Y -= 0.05f; else npc.velocity.Y += 0.05f; @@ -10481,16 +10469,16 @@ namespace CalamityMod.NPCs npc.hide = npc.ai[0] == 5f; npc.rotation = npc.velocity.X * 0.1f; - for (int num1338 = 0; num1338 < Main.maxNPCs; num1338++) + for (int s = 0; s < Main.maxNPCs; s++) { - if (num1338 != npc.whoAmI && Main.npc[num1338].active && Main.npc[num1338].type == npc.type && Math.Abs(npc.position.X - Main.npc[num1338].position.X) + Math.Abs(npc.position.Y - Main.npc[num1338].position.Y) < npc.width) + if (s != npc.whoAmI && Main.npc[s].active && Main.npc[s].type == npc.type && Math.Abs(npc.position.X - Main.npc[s].position.X) + Math.Abs(npc.position.Y - Main.npc[s].position.Y) < npc.width) { - if (npc.position.X < Main.npc[num1338].position.X) + if (npc.position.X < Main.npc[s].position.X) npc.velocity.X -= 0.05f; else npc.velocity.X += 0.05f; - if (npc.position.Y < Main.npc[num1338].position.Y) + if (npc.position.Y < Main.npc[s].position.Y) npc.velocity.Y -= 0.05f; else npc.velocity.Y += 0.05f; @@ -10516,34 +10504,33 @@ namespace CalamityMod.NPCs npc.noTileCollide = true; npc.knockBackResist = 0f; - for (int num1339 = 0; num1339 < Main.maxNPCs; num1339++) + for (int i = 0; i < Main.maxNPCs; i++) { - if (num1339 == npc.whoAmI || !Main.npc[num1339].active || Main.npc[num1339].type != npc.type) + if (i == npc.whoAmI || !Main.npc[i].active || Main.npc[i].type != npc.type) continue; - Vector2 vector206 = Main.npc[num1339].Center - npc.Center; - if (!(vector206.Length() < 50f)) + Vector2 targetDirection = Main.npc[i].Center - npc.Center; + if (!(targetDirection.Length() < 50f)) continue; - vector206.Normalize(); - if (vector206.X == 0f && vector206.Y == 0f) + targetDirection.Normalize(); + if (targetDirection.X == 0f && targetDirection.Y == 0f) { - if (num1339 > npc.whoAmI) - vector206.X = 1f; + if (i > npc.whoAmI) + targetDirection.X = 1f; else - vector206.X = -1f; + targetDirection.X = -1f; } - vector206 *= 0.4f; - npc.velocity -= vector206; - NPC nPC = Main.npc[num1339]; - nPC.velocity += vector206; + targetDirection *= 0.4f; + npc.velocity -= targetDirection; + NPC nPC = Main.npc[i]; + nPC.velocity += targetDirection; } if (npc.type == NPCID.ShadowFlameApparition) { - float num1340 = 120f; - if (npc.localAI[0] < num1340) + if (npc.localAI[0] < 120f) { if (npc.localAI[0] == 0f) { @@ -10555,23 +10542,23 @@ namespace CalamityMod.NPCs npc.velocity.X -= 2f; npc.position += npc.netOffset; - for (int num1341 = 0; num1341 < 20; num1341++) + for (int j = 0; j < 20; j++) { - Vector2 center34 = npc.Center; - center34.Y -= 18f; - Vector2 vector207 = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101)); - vector207.Normalize(); - vector207 *= Main.rand.Next(0, 100) * 0.1f; - center34 += vector207; - vector207.Normalize(); - vector207 *= Main.rand.Next(50, 90) * 0.2f; - int num1342 = Dust.NewDust(center34, 1, 1, 27); - Main.dust[num1342].velocity = -vector207 * 0.3f; - Main.dust[num1342].alpha = 100; + Vector2 apparitionCenter = npc.Center; + apparitionCenter.Y -= 18f; + Vector2 apparitionRandVelocity = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101)); + apparitionRandVelocity.Normalize(); + apparitionRandVelocity *= Main.rand.Next(0, 100) * 0.1f; + apparitionCenter += apparitionRandVelocity; + apparitionRandVelocity.Normalize(); + apparitionRandVelocity *= Main.rand.Next(50, 90) * 0.2f; + int shadowflameDust = Dust.NewDust(apparitionCenter, 1, 1, 27); + Main.dust[shadowflameDust].velocity = -apparitionRandVelocity * 0.3f; + Main.dust[shadowflameDust].alpha = 100; if (Main.rand.NextBool()) { - Main.dust[num1342].noGravity = true; - Dust dust = Main.dust[num1342]; + Main.dust[shadowflameDust].noGravity = true; + Dust dust = Main.dust[shadowflameDust]; dust.scale += 0.3f; } } @@ -10580,20 +10567,20 @@ namespace CalamityMod.NPCs } npc.localAI[0] += 1f; - float num1343 = 1f - npc.localAI[0] / num1340; - float num1344 = num1343 * 20f; - for (int num1345 = 0; num1345 < num1344; num1345++) + float localAIDustControl = 1f - npc.localAI[0] / 120f; + float dustAmt = localAIDustControl * 20f; + for (int k = 0; k < dustAmt; k++) { if (Main.rand.NextBool(5)) { npc.position += npc.netOffset; - int num1346 = Dust.NewDust(npc.position, npc.width, npc.height, 27); - Main.dust[num1346].alpha = 100; - Dust dust = Main.dust[num1346]; + int idleShadowflameDust = Dust.NewDust(npc.position, npc.width, npc.height, 27); + Main.dust[idleShadowflameDust].alpha = 100; + Dust dust = Main.dust[idleShadowflameDust]; dust.velocity *= 0.3f; - dust = Main.dust[num1346]; + dust = Main.dust[idleShadowflameDust]; dust.velocity += npc.velocity * 0.75f; - Main.dust[num1346].noGravity = true; + Main.dust[idleShadowflameDust].noGravity = true; npc.position -= npc.netOffset; } } @@ -10602,8 +10589,7 @@ namespace CalamityMod.NPCs if (npc.type == NPCID.AncientCultistSquidhead) { - float num1347 = 120f; - if (npc.localAI[0] < num1347) + if (npc.localAI[0] < 120f) { if (npc.localAI[0] == 0f) { @@ -10616,13 +10602,13 @@ namespace CalamityMod.NPCs } npc.localAI[0] += 1f; - int num1348 = 10; - for (int num1349 = 0; num1349 < 2; num1349++) + int dustPosition = 10; + for (int l = 0; l < 2; l++) { npc.position += npc.netOffset; - int num1350 = Dust.NewDust(npc.position - new Vector2(num1348), npc.width + num1348 * 2, npc.height + num1348 * 2, 228, 0f, 0f, 100, default(Color), 2f); - Main.dust[num1350].noGravity = true; - Main.dust[num1350].noLight = true; + int visionDust = Dust.NewDust(npc.position - new Vector2(dustPosition), npc.width + dustPosition * 2, npc.height + dustPosition * 2, 228, 0f, 0f, 100, default(Color), 2f); + Main.dust[visionDust].noGravity = true; + Main.dust[visionDust].noLight = true; npc.position -= npc.netOffset; } } @@ -10637,44 +10623,44 @@ namespace CalamityMod.NPCs else if (npc.ai[0] == 1f) { npc.TargetClosest(); - float num1351 = 0.5f; - float num1352 = 10f; - float num1353 = 4f; - float num1354 = 550f; - float num1355 = 3f; + float xVelocityMult1 = 0.5f; + float maxXVelocity1 = 10f; + float maxYVelocity1 = 4f; + float turnAroundDist1 = 550f; + float yVelocityMult1 = 3f; if (npc.type == NPCID.AncientCultistSquidhead) { - num1351 = 0.8f; - num1352 = 16f; - num1354 = 440f; - num1353 = 6f; + xVelocityMult1 = 0.8f; + maxXVelocity1 = 16f; + turnAroundDist1 = 440f; + maxYVelocity1 = 6f; } if (CalamityWorld.death) { - num1351 *= 1.25f; - num1352 *= 1.25f; - num1354 *= 0.9f; - num1355 -= 1f; + xVelocityMult1 *= 1.25f; + maxXVelocity1 *= 1.25f; + turnAroundDist1 *= 0.9f; + yVelocityMult1 -= 1f; } - npc.velocity.X += npc.ai[1] * num1351; - if (npc.velocity.X > num1352) - npc.velocity.X = num1352; + npc.velocity.X += npc.ai[1] * xVelocityMult1; + if (npc.velocity.X > maxXVelocity1) + npc.velocity.X = maxXVelocity1; - if (npc.velocity.X < 0f - num1352) - npc.velocity.X = 0f - num1352; + if (npc.velocity.X < 0f - maxXVelocity1) + npc.velocity.X = 0f - maxXVelocity1; - float num1356 = Main.player[npc.target].Center.Y - npc.Center.Y; - if (Math.Abs(num1356) > num1353) - num1355 = CalamityWorld.death ? 10f : 12f; + float targetYDist1 = Main.player[npc.target].Center.Y - npc.Center.Y; + if (Math.Abs(targetYDist1) > maxYVelocity1) + yVelocityMult1 = CalamityWorld.death ? 10f : 12f; - if (num1356 > num1353) - num1356 = num1353; - else if (num1356 < 0f - num1353) - num1356 = 0f - num1353; + if (targetYDist1 > maxYVelocity1) + targetYDist1 = maxYVelocity1; + else if (targetYDist1 < 0f - maxYVelocity1) + targetYDist1 = 0f - maxYVelocity1; - npc.velocity.Y = (npc.velocity.Y * (num1355 - 1f) + num1356) / num1355; - if ((npc.ai[1] > 0f && Main.player[npc.target].Center.X - npc.Center.X < 0f - num1354) || (npc.ai[1] < 0f && Main.player[npc.target].Center.X - npc.Center.X > num1354)) + npc.velocity.Y = (npc.velocity.Y * (yVelocityMult1 - 1f) + targetYDist1) / yVelocityMult1; + if ((npc.ai[1] > 0f && Main.player[npc.target].Center.X - npc.Center.X < 0f - turnAroundDist1) || (npc.ai[1] < 0f && Main.player[npc.target].Center.X - npc.Center.X > turnAroundDist1)) { npc.ai[0] = 2f; npc.ai[1] = 0f; @@ -10686,25 +10672,25 @@ namespace CalamityMod.NPCs } else if (npc.ai[0] == 2f) { - float num1357 = 0.6f; - float num1358 = 0.93f; - float num1359 = 7f; + float decelYVelocityMult = 0.6f; + float deceleration = 0.93f; + float decelerationDist = 7f; if (npc.type == NPCID.AncientCultistSquidhead) { - num1357 = 0.45f; - num1359 = 10f; - num1358 = 0.87f; + decelYVelocityMult = 0.45f; + decelerationDist = 10f; + deceleration = 0.87f; } if (CalamityWorld.death) { - num1357 *= 1.25f; - num1358 *= 0.9f; - num1359 *= 1.25f; + decelYVelocityMult *= 1.25f; + deceleration *= 0.9f; + decelerationDist *= 1.25f; } - npc.velocity.Y += npc.ai[1] * num1357; - if (npc.velocity.Length() > num1359) - npc.velocity *= num1358; + npc.velocity.Y += npc.ai[1] * decelYVelocityMult; + if (npc.velocity.Length() > decelerationDist) + npc.velocity *= deceleration; if (npc.velocity.X > -1f && npc.velocity.X < 1f) { @@ -10715,33 +10701,33 @@ namespace CalamityMod.NPCs } else if (npc.ai[0] == 3f) { - float num1360 = 0.6f; - float num1361 = 0.3f; - float num1362 = 7f; - float num1363 = 0.93f; + float xVelocityMult3 = 0.6f; + float yAlignSpeed = 0.3f; + float decelerationDist3 = 7f; + float deceleration3 = 0.93f; if (npc.type == NPCID.AncientCultistSquidhead) { - num1360 = 0.8f; - num1361 = 0.45f; - num1362 = 9f; - num1363 = 0.87f; + xVelocityMult3 = 0.8f; + yAlignSpeed = 0.45f; + decelerationDist3 = 9f; + deceleration3 = 0.87f; } if (CalamityWorld.death) { - num1360 *= 1.25f; - num1361 *= 1.25f; - num1362 *= 1.25f; - num1363 *= 0.9f; + xVelocityMult3 *= 1.25f; + yAlignSpeed *= 1.25f; + decelerationDist3 *= 1.25f; + deceleration3 *= 0.9f; } - npc.velocity.X += npc.ai[1] * num1360; + npc.velocity.X += npc.ai[1] * xVelocityMult3; if (npc.Center.Y > Main.player[npc.target].Center.Y) - npc.velocity.Y -= num1361; + npc.velocity.Y -= yAlignSpeed; else - npc.velocity.Y += num1361; + npc.velocity.Y += yAlignSpeed; - if (npc.velocity.Length() > num1362) - npc.velocity *= num1363; + if (npc.velocity.Length() > decelerationDist3) + npc.velocity *= deceleration3; if (npc.velocity.Y > -1f && npc.velocity.Y < 1f) { @@ -10753,12 +10739,12 @@ namespace CalamityMod.NPCs if (npc.type == NPCID.AncientCultistSquidhead) { - int num1364 = 10; + int squidDustVelocity = 10; npc.position += npc.netOffset; - int num1366 = Dust.NewDust(npc.position - new Vector2(num1364), npc.width + num1364 * 2, npc.height + num1364 * 2, 228, 0f, 0f, 100, default(Color), 2f); - Main.dust[num1366].noGravity = true; - Main.dust[num1366].noLight = true; + int squidDust = Dust.NewDust(npc.position - new Vector2(squidDustVelocity), npc.width + squidDustVelocity * 2, npc.height + squidDustVelocity * 2, 228, 0f, 0f, 100, default(Color), 2f); + Main.dust[squidDust].noGravity = true; + Main.dust[squidDust].noLight = true; npc.position -= npc.netOffset; } @@ -10791,8 +10777,8 @@ namespace CalamityMod.NPCs if (npc.ai[0] == 0f) { npc.TargetClosest(); - Vector2 vector208 = Main.player[npc.target].Center - npc.Center; - if (Main.netMode != NetmodeID.MultiplayerClient && (npc.velocity.X != 0f || npc.velocity.Y > 100f || npc.justHit || vector208.Length() < 80f)) + Vector2 mimicTargetDirection = Main.player[npc.target].Center - npc.Center; + if (Main.netMode != NetmodeID.MultiplayerClient && (npc.velocity.X != 0f || npc.velocity.Y > 100f || npc.justHit || mimicTargetDirection.Length() < 80f)) { npc.ai[0] = 1f; npc.ai[1] = 0f; @@ -10811,8 +10797,8 @@ namespace CalamityMod.NPCs } else if (npc.ai[0] == 2f) { - Vector2 vector209 = Main.player[npc.target].Center - npc.Center; - if (Main.netMode != NetmodeID.MultiplayerClient && vector209.Length() > 600f) + Vector2 mimicTargetDirection2 = Main.player[npc.target].Center - npc.Center; + if (Main.netMode != NetmodeID.MultiplayerClient && mimicTargetDirection2.Length() > 600f) { npc.ai[0] = 5f; npc.ai[1] = 0f; @@ -10826,25 +10812,25 @@ namespace CalamityMod.NPCs npc.TargetClosest(); npc.velocity.X *= 0.85f; npc.ai[1] += 1f; - float num1367 = 10f + (CalamityWorld.death ? 10f : 20f) * (npc.life / (float)npc.lifeMax); - float num1368 = 5f + (CalamityWorld.death ? 7f : 5f) * (1f - npc.life / (float)npc.lifeMax); - float num1369 = CalamityWorld.death ? 7f : 5f; + float jumpDelay = 10f + (CalamityWorld.death ? 10f : 20f) * (npc.life / (float)npc.lifeMax); + float jumpXVelocity = 5f + (CalamityWorld.death ? 7f : 5f) * (1f - npc.life / (float)npc.lifeMax); + float jumpYVelocity = CalamityWorld.death ? 7f : 5f; if (!Collision.CanHit(npc.Center, 1, 1, Main.player[npc.target].Center, 1, 1)) - num1369 += 2f; + jumpYVelocity += 2f; - if (Main.netMode != NetmodeID.MultiplayerClient && npc.ai[1] > num1367) + if (Main.netMode != NetmodeID.MultiplayerClient && npc.ai[1] > jumpDelay) { npc.ai[3] += 1f; if (npc.ai[3] >= 3f) { npc.ai[3] = 0f; - num1369 *= 2f; - num1368 /= 2f; + jumpYVelocity *= 2f; + jumpXVelocity /= 2f; } npc.ai[1] = 0f; - npc.velocity.Y -= num1369; - npc.velocity.X = num1368 * npc.direction; + npc.velocity.Y -= jumpYVelocity; + npc.velocity.X = jumpXVelocity * npc.direction; npc.netUpdate = true; } } @@ -10919,22 +10905,22 @@ namespace CalamityMod.NPCs npc.spriteDirection = npc.direction; npc.TargetClosest(); - Vector2 center35 = Main.player[npc.target].Center; - center35.Y -= 350f; - Vector2 value40 = center35 - npc.Center; + Vector2 mimicTargetCenter = Main.player[npc.target].Center; + mimicTargetCenter.Y -= 350f; + Vector2 mimicTargetDirection = mimicTargetCenter - npc.Center; if (npc.ai[2] == 1f) { npc.ai[1] += 1f; - value40 = Main.player[npc.target].Center - npc.Center; - value40.Normalize(); - value40 *= CalamityWorld.death ? 12f : 10f; - npc.velocity = (npc.velocity * 4f + value40) / 5f; + mimicTargetDirection = Main.player[npc.target].Center - npc.Center; + mimicTargetDirection.Normalize(); + mimicTargetDirection *= CalamityWorld.death ? 12f : 10f; + npc.velocity = (npc.velocity * 4f + mimicTargetDirection) / 5f; if (Main.netMode != NetmodeID.MultiplayerClient && npc.ai[1] > 6f) { npc.ai[1] = 0f; npc.ai[0] = 4.1f; npc.ai[2] = 0f; - npc.velocity = value40; + npc.velocity = mimicTargetDirection; npc.netUpdate = true; } } @@ -10949,9 +10935,9 @@ namespace CalamityMod.NPCs } else { - value40.Normalize(); - value40 *= CalamityWorld.death ? 16f : 14f; - npc.velocity = (npc.velocity * 5f + value40) / 6f; + mimicTargetDirection.Normalize(); + mimicTargetDirection *= CalamityWorld.death ? 16f : 14f; + npc.velocity = (npc.velocity * 5f + mimicTargetDirection) / 6f; } } else if (npc.ai[0] == 4.1f) @@ -10996,9 +10982,9 @@ namespace CalamityMod.NPCs npc.noTileCollide = true; npc.noGravity = true; npc.knockBackResist = 0f; - Vector2 value41 = Main.player[npc.target].Center - npc.Center; - value41.Y -= 4f; - if (Main.netMode != NetmodeID.MultiplayerClient && value41.Length() < 200f && !Collision.SolidCollision(npc.position, npc.width, npc.height)) + Vector2 chaseTargetDirection = Main.player[npc.target].Center - npc.Center; + chaseTargetDirection.Y -= 4f; + if (Main.netMode != NetmodeID.MultiplayerClient && chaseTargetDirection.Length() < 200f && !Collision.SolidCollision(npc.position, npc.width, npc.height)) { npc.ai[0] = 2f; npc.ai[1] = 0f; @@ -11007,13 +10993,13 @@ namespace CalamityMod.NPCs npc.netUpdate = true; } - if (value41.Length() > 10f) + if (chaseTargetDirection.Length() > 10f) { - value41.Normalize(); - value41 *= CalamityWorld.death ? 15f : 12.5f; + chaseTargetDirection.Normalize(); + chaseTargetDirection *= CalamityWorld.death ? 15f : 12.5f; } - npc.velocity = (npc.velocity * 4f + value41) / 5f; + npc.velocity = (npc.velocity * 4f + chaseTargetDirection) / 5f; } else if (npc.ai[0] == 6f) { @@ -11106,21 +11092,21 @@ namespace CalamityMod.NPCs { int itemID = ItemID.Sets.ItemsForStuffCannon[Main.rand.Next(ItemID.Sets.ItemsForStuffCannon.Length)]; int item = Item.NewItem(npc.GetSource_Loot(), (int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, itemID, 1, noBroadcast: false, -1, noGrabDelay: true); - float num2 = Main.rand.Next(10, 26); + float randomSpeed = Main.rand.Next(10, 26); Vector2 vector = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); Vector2 vector2 = Main.player[npc.target].Center - new Vector2(0f, 120f); - float num3 = vector2.X - vector.X; - float num4 = vector2.Y - vector.Y; - num3 += Main.rand.Next(-50, 51) * 0.1f; - num4 += Main.rand.Next(-50, 51) * 0.1f; - float num5 = (float)Math.Sqrt(num3 * num3 + num4 * num4); - num5 = num2 / num5; - num3 *= num5; - num4 *= num5; - num3 += Main.rand.Next(-50, 51) * 0.1f; - num4 += Main.rand.Next(-50, 51) * 0.1f; - Main.item[item].velocity.X = num3; - Main.item[item].velocity.Y = num4; + float targetXDist = vector2.X - vector.X; + float targetYDist = vector2.Y - vector.Y; + targetXDist += Main.rand.Next(-50, 51) * 0.1f; + targetYDist += Main.rand.Next(-50, 51) * 0.1f; + float targetDistance = (float)Math.Sqrt(targetXDist * targetXDist + targetYDist * targetYDist); + targetDistance = randomSpeed / targetDistance; + targetXDist *= targetDistance; + targetYDist *= targetDistance; + targetXDist += Main.rand.Next(-50, 51) * 0.1f; + targetYDist += Main.rand.Next(-50, 51) * 0.1f; + Main.item[item].velocity.X = targetXDist; + Main.item[item].velocity.Y = targetYDist; Main.item[item].noGrabDelay = 100; if (Main.netMode != NetmodeID.SinglePlayer) NetMessage.SendData(MessageID.SyncItem, -1, -1, null, item); @@ -11135,15 +11121,15 @@ namespace CalamityMod.NPCs #region Small Star Cell AI public static bool BuffedSmallStarCellAI(NPC npc, Mod mod) { - float num1470 = CalamityWorld.death ? 100f : 200f; + float turnBigDelay = CalamityWorld.death ? 100f : 200f; if (npc.velocity.Length() > 4f) npc.velocity *= 0.95f; npc.velocity *= 0.99f; npc.ai[0]++; - float num1471 = MathHelper.Clamp(npc.ai[0] / num1470, 0f, 1f); - npc.scale = 1f + 0.3f * num1471; - if (npc.ai[0] >= num1470) + float cellScale = MathHelper.Clamp(npc.ai[0] / turnBigDelay, 0f, 1f); + npc.scale = 1f + 0.3f * cellScale; + if (npc.ai[0] >= turnBigDelay) { if (Main.netMode != NetmodeID.MultiplayerClient) { @@ -11158,28 +11144,26 @@ namespace CalamityMod.NPCs if (!(npc.ai[0] > 20f)) return false; - Vector2 center39 = npc.Center; - int num1472 = (int)(npc.ai[0] / (num1470 / 2f)); - for (int num1473 = 0; num1473 < num1472 + 1; num1473++) + Vector2 cellCenter = npc.Center; + int dustAmt = (int)(npc.ai[0] / (turnBigDelay / 2f)); + for (int i = 0; i < dustAmt + 1; i++) { if (Main.rand.NextBool()) { - int num1474 = 226; - float num1475 = 0.4f; - if (num1473 % 2 == 1) + float dustScale = 0.4f; + if (i % 2 == 1) { - num1474 = 226; - num1475 = 0.65f; + dustScale = 0.65f; } - Vector2 vector222 = center39 + ((float)Main.rand.NextDouble() * ((float)Math.PI * 2f)).ToRotationVector2() * (12f - num1472 * 2); - int num1476 = Dust.NewDust(vector222 - Vector2.One * 12f, 24, 24, num1474, npc.velocity.X / 2f, npc.velocity.Y / 2f); - Dust dust = Main.dust[num1476]; + Vector2 dustRotation = cellCenter + ((float)Main.rand.NextDouble() * ((float)Math.PI * 2f)).ToRotationVector2() * (12f - dustAmt * 2); + int cellDust = Dust.NewDust(dustRotation - Vector2.One * 12f, 24, 24, 226, npc.velocity.X / 2f, npc.velocity.Y / 2f); + Dust dust = Main.dust[cellDust]; dust.position -= new Vector2(2f); - Main.dust[num1476].velocity = Vector2.Normalize(center39 - vector222) * 1.5f * (10f - num1472 * 2f) / 10f; - Main.dust[num1476].noGravity = true; - Main.dust[num1476].scale = num1475; - Main.dust[num1476].customData = npc; + Main.dust[cellDust].velocity = Vector2.Normalize(cellCenter - dustRotation) * 1.5f * (10f - dustAmt * 2f) / 10f; + Main.dust[cellDust].noGravity = true; + Main.dust[cellDust].scale = dustScale; + Main.dust[cellDust].customData = npc; } } @@ -11190,29 +11174,29 @@ namespace CalamityMod.NPCs #region Flow Invader AI public static bool BuffedFlowInvaderAI(NPC npc, Mod mod) { - float num1477 = CalamityWorld.death ? 8f : 6.5f; + float velocityMult = CalamityWorld.death ? 8f : 6.5f; float moveSpeed = CalamityWorld.death ? 0.25f : 0.2f; npc.TargetClosest(); Vector2 desiredVelocity3 = Main.player[npc.target].Center - npc.Center + new Vector2(0f, -300f); - float num1478 = desiredVelocity3.Length(); - if (num1478 < 20f) + float velocityCheck = desiredVelocity3.Length(); + if (velocityCheck < 20f) { desiredVelocity3 = npc.velocity; } - else if (num1478 < 40f) + else if (velocityCheck < 40f) { desiredVelocity3.Normalize(); - desiredVelocity3 *= num1477 * 0.35f; + desiredVelocity3 *= velocityMult * 0.35f; } - else if (num1478 < 80f) + else if (velocityCheck < 80f) { desiredVelocity3.Normalize(); - desiredVelocity3 *= num1477 * 0.65f; + desiredVelocity3 *= velocityMult * 0.65f; } else { desiredVelocity3.Normalize(); - desiredVelocity3 *= num1477; + desiredVelocity3 *= velocityMult; } npc.SimpleFlyMovement(desiredVelocity3, moveSpeed); @@ -11223,11 +11207,11 @@ namespace CalamityMod.NPCs npc.ai[0] = 0f; if (Main.netMode != NetmodeID.MultiplayerClient) { - Vector2 vector223 = Vector2.Zero; - while (Math.Abs(vector223.X) < 1.5f) - vector223 = Vector2.UnitY.RotatedByRandom(MathHelper.PiOver2) * new Vector2(5f, 3f); + Vector2 projDirection = Vector2.Zero; + while (Math.Abs(projDirection.X) < 1.5f) + projDirection = Vector2.UnitY.RotatedByRandom(MathHelper.PiOver2) * new Vector2(5f, 3f); - int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, vector223, ProjectileID.StardustJellyfishSmall, 60, 0f, Main.myPlayer, 0f, npc.whoAmI); + int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, projDirection, ProjectileID.StardustJellyfishSmall, 60, 0f, Main.myPlayer, 0f, npc.whoAmI); Main.projectile[proj].extraUpdates += 1; } From 9f43dc09cad077b399e316bfb5dcca01bdcada79 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 2 Nov 2023 22:19:30 -0400 Subject: [PATCH 51/95] GlobalNPC and VanillaMinibossesAI; 2 folders left --- NPCs/CalamityGlobalNPC.cs | 63 +++-- NPCs/CalamityVanillaMinibossesAI.cs | 413 ++++++++++++++-------------- 2 files changed, 237 insertions(+), 239 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index a881fa0d96..9b571f1e47 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3770,15 +3770,15 @@ namespace CalamityMod.NPCs else if (Vector2.Distance(npc.Center, targetData.Center) > 80f) { Rectangle r = Utils.CenteredRectangle(targetData.Center, new Vector2(targetData.Width + 60, targetData.Height / 2)); - Vector2 vector3 = r.ClosestPointInRect(npc.Center); - Vector2 value = npc.DirectionTo(vector3) * ((targetData.Velocity.Length() * 0.5f) + 2f); - float num8 = npc.Distance(vector3); - if (num8 > 225f) - value *= 2f; - else if (num8 > 120f) - value *= 1.5f; + Vector2 closestTargetPoint = r.ClosestPointInRect(npc.Center); + Vector2 targetPointDir = npc.DirectionTo(closestTargetPoint) * ((targetData.Velocity.Length() * 0.5f) + 2f); + float targetPointDist = npc.Distance(closestTargetPoint); + if (targetPointDist > 225f) + targetPointDir *= 2f; + else if (targetPointDist > 120f) + targetPointDir *= 1.5f; - npc.velocity = Vector2.Lerp(npc.velocity, value, 0.07f); + npc.velocity = Vector2.Lerp(npc.velocity, targetPointDir, 0.07f); } for (int k = 0; k < Main.maxNPCs; k++) @@ -3795,25 +3795,25 @@ namespace CalamityMod.NPCs npc.direction = (npc.velocity.X >= 0f) ? 1 : (-1); npc.spriteDirection = -npc.direction; - Color value3 = Color.HotPink; - Color value4 = Color.LightPink; - int num17 = 4; + Color dustLerpColor1 = Color.HotPink; + Color dustLerpColor2 = Color.LightPink; + int dustPosition = 4; if (npc.type == NPCID.FairyCritterGreen) { - value3 = Color.LimeGreen; - value4 = Color.LightSeaGreen; + dustLerpColor1 = Color.LimeGreen; + dustLerpColor2 = Color.LightSeaGreen; } if (npc.type == NPCID.FairyCritterBlue) { - value3 = Color.RoyalBlue; - value4 = Color.LightBlue; + dustLerpColor1 = Color.RoyalBlue; + dustLerpColor2 = Color.LightBlue; } if ((int)Main.timeForVisualEffects % 2 == 0) { npc.position += npc.netOffset; - Dust dust = Dust.NewDustDirect(npc.Center - new Vector2(num17) * 0.5f, num17 + 4, num17 + 4, 278, 0f, 0f, 200, Color.Lerp(value3, value4, Main.rand.NextFloat()), 0.65f); + Dust dust = Dust.NewDustDirect(npc.Center - new Vector2(dustPosition) * 0.5f, dustPosition + 4, dustPosition + 4, 278, 0f, 0f, 200, Color.Lerp(dustLerpColor1, dustLerpColor2, Main.rand.NextFloat()), 0.65f); dust.velocity *= 0f; dust.velocity += npc.velocity * 0.3f; dust.noGravity = true; @@ -3821,7 +3821,7 @@ namespace CalamityMod.NPCs npc.position -= npc.netOffset; } - Lighting.AddLight(npc.Center, value3.ToVector3() * 0.7f); + Lighting.AddLight(npc.Center, dustLerpColor1.ToVector3() * 0.7f); if (Main.netMode != NetmodeID.Server) { Player localPlayer = Main.LocalPlayer; @@ -5607,38 +5607,37 @@ namespace CalamityMod.NPCs spriteEffects = SpriteEffects.FlipHorizontally; } - float num66 = 0f; - Vector2 vector11 = new Vector2(TextureAssets.Npc[npc.type].Value.Width / 2, TextureAssets.Npc[npc.type].Value.Height / Main.npcFrameCount[npc.type] / 2); - Color color9 = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, 0); - Color alpha15 = npc.GetAlpha(color9); - float num212 = 0.99f; - alpha15.R = (byte)(alpha15.R * num212); - alpha15.G = (byte)(alpha15.G * num212); - alpha15.B = (byte)(alpha15.B * num212); - alpha15.A = (byte)(alpha15.A * num212); - float xOffset = screenPos.X + npc.width / 2 - TextureAssets.Npc[npc.type].Value.Width * npc.scale / 2f + vector11.X * npc.scale; - float yOffset = screenPos.Y + npc.height - TextureAssets.Npc[npc.type].Value.Height * npc.scale / Main.npcFrameCount[npc.type] + 4f + vector11.Y * npc.scale + num66 + npc.gfxOffY; - for (int num213 = 0; num213 < 4; num213++) + Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[npc.type].Value.Width / 2, TextureAssets.Npc[npc.type].Value.Height / Main.npcFrameCount[npc.type] / 2); + Color rainbow = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, 0); + Color alphaColor = npc.GetAlpha(rainbow); + float RGBMult = 0.99f; + alphaColor.R = (byte)(alphaColor.R * RGBMult); + alphaColor.G = (byte)(alphaColor.G * RGBMult); + alphaColor.B = (byte)(alphaColor.B * RGBMult); + alphaColor.A = (byte)(alphaColor.A * RGBMult); + float xOffset = screenPos.X + npc.width / 2 - TextureAssets.Npc[npc.type].Value.Width * npc.scale / 2f + halfSizeTexture.X * npc.scale; + float yOffset = screenPos.Y + npc.height - TextureAssets.Npc[npc.type].Value.Height * npc.scale / Main.npcFrameCount[npc.type] + 4f + halfSizeTexture.Y * npc.scale + npc.gfxOffY; + for (int i = 0; i < 4; i++) { Vector2 position9 = npc.position; float num214 = Math.Abs(npc.Center.X - Main.LocalPlayer.Center.X); float num215 = Math.Abs(npc.Center.Y - Main.LocalPlayer.Center.Y); - if (num213 == 0 || num213 == 2) + if (i == 0 || i == 2) position9.X = Main.LocalPlayer.Center.X + num214; else position9.X = Main.LocalPlayer.Center.X - num214; position9.X -= npc.width / 2; - if (num213 == 0 || num213 == 1) + if (i == 0 || i == 1) position9.Y = Main.LocalPlayer.Center.Y + num215; else position9.Y = Main.LocalPlayer.Center.Y - num215; position9.Y -= npc.height / 2; - Main.spriteBatch.Draw(TextureAssets.Npc[npc.type].Value, new Vector2(position9.X - xOffset, position9.Y - yOffset), new Microsoft.Xna.Framework.Rectangle?(npc.frame), alpha15, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + Main.spriteBatch.Draw(TextureAssets.Npc[npc.type].Value, new Vector2(position9.X - xOffset, position9.Y - yOffset), new Microsoft.Xna.Framework.Rectangle?(npc.frame), alphaColor, npc.rotation, halfSizeTexture, npc.scale, spriteEffects, 0f); } } else diff --git a/NPCs/CalamityVanillaMinibossesAI.cs b/NPCs/CalamityVanillaMinibossesAI.cs index 6decfe9f1c..9c8bb57cb4 100644 --- a/NPCs/CalamityVanillaMinibossesAI.cs +++ b/NPCs/CalamityVanillaMinibossesAI.cs @@ -468,22 +468,22 @@ namespace CalamityMod.NPCs } else if (npc.ai[3] == 0f && npc.localAI[2] % 30f == 0f && npc.localAI[2] > 30f) { - float num856 = 10f; - Vector2 vector109 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f + 30f); - if (!WorldGen.SolidTile((int)vector109.X / 16, (int)vector109.Y / 16)) + float greekFireSpeed = 10f; + Vector2 greekFireSpawnPos = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f + 30f); + if (!WorldGen.SolidTile((int)greekFireSpawnPos.X / 16, (int)greekFireSpawnPos.Y / 16)) { - float num857 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector109.X; - float num858 = Main.player[npc.target].position.Y - vector109.Y; - num857 += (float)Main.rand.Next(-50, 51); - num858 += (float)Main.rand.Next(50, 201); - num858 *= 0.2f; - float num859 = (float)Math.Sqrt((double)(num857 * num857 + num858 * num858)); - num859 = num856 / num859; - num857 *= num859; - num858 *= num859; - num857 *= 1f + (float)Main.rand.Next(-30, 31) * 0.01f; - num858 *= 1f + (float)Main.rand.Next(-30, 31) * 0.01f; - Projectile.NewProjectile(npc.GetSource_FromAI(), vector109.X, vector109.Y, num857, num858, ProjectileID.GreekFire1 + Main.rand.Next(3), 60, 0f, Main.myPlayer, 0f, 0f); + float greekFireTargetX = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - greekFireSpawnPos.X; + float greekFireTargetY = Main.player[npc.target].position.Y - greekFireSpawnPos.Y; + greekFireTargetX += (float)Main.rand.Next(-50, 51); + greekFireTargetY += (float)Main.rand.Next(50, 201); + greekFireTargetY *= 0.2f; + float greekFireTargetDist = (float)Math.Sqrt((double)(greekFireTargetX * greekFireTargetX + greekFireTargetY * greekFireTargetY)); + greekFireTargetDist = greekFireSpeed / greekFireTargetDist; + greekFireTargetX *= greekFireTargetDist; + greekFireTargetY *= greekFireTargetDist; + greekFireTargetX *= 1f + (float)Main.rand.Next(-30, 31) * 0.01f; + greekFireTargetY *= 1f + (float)Main.rand.Next(-30, 31) * 0.01f; + Projectile.NewProjectile(npc.GetSource_FromAI(), greekFireSpawnPos.X, greekFireSpawnPos.Y, greekFireTargetX, greekFireTargetY, ProjectileID.GreekFire1 + Main.rand.Next(3), 60, 0f, Main.myPlayer, 0f, 0f); } } } @@ -493,18 +493,18 @@ namespace CalamityMod.NPCs npc.TargetClosest(true); npc.ai[0] = 1f; - int num861 = NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.position.X + (float)(npc.width / 2)), (int)npc.position.Y + npc.height / 2, NPCID.PumpkingBlade, npc.whoAmI, 0f, 0f, 0f, 0f, 255); - Main.npc[num861].ai[0] = -1f; - Main.npc[num861].ai[1] = (float)npc.whoAmI; - Main.npc[num861].target = npc.target; - Main.npc[num861].netUpdate = true; + int pumpkingBlades = NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.position.X + (float)(npc.width / 2)), (int)npc.position.Y + npc.height / 2, NPCID.PumpkingBlade, npc.whoAmI, 0f, 0f, 0f, 0f, 255); + Main.npc[pumpkingBlades].ai[0] = -1f; + Main.npc[pumpkingBlades].ai[1] = (float)npc.whoAmI; + Main.npc[pumpkingBlades].target = npc.target; + Main.npc[pumpkingBlades].netUpdate = true; - num861 = NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.position.X + (float)(npc.width / 2)), (int)npc.position.Y + npc.height / 2, NPCID.PumpkingBlade, npc.whoAmI, 0f, 0f, 0f, 0f, 255); - Main.npc[num861].ai[0] = 1f; - Main.npc[num861].ai[1] = (float)npc.whoAmI; - Main.npc[num861].ai[3] = 150f; - Main.npc[num861].target = npc.target; - Main.npc[num861].netUpdate = true; + pumpkingBlades = NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.position.X + (float)(npc.width / 2)), (int)npc.position.Y + npc.height / 2, NPCID.PumpkingBlade, npc.whoAmI, 0f, 0f, 0f, 0f, 255); + Main.npc[pumpkingBlades].ai[0] = 1f; + Main.npc[pumpkingBlades].ai[1] = (float)npc.whoAmI; + Main.npc[pumpkingBlades].ai[3] = 150f; + Main.npc[pumpkingBlades].target = npc.target; + Main.npc[pumpkingBlades].netUpdate = true; } if (Main.player[npc.target].dead || Math.Abs(npc.position.X - Main.player[npc.target].position.X) > 2000f || Math.Abs(npc.position.Y - Main.player[npc.target].position.Y) > 2000f) @@ -539,27 +539,27 @@ namespace CalamityMod.NPCs } } - Vector2 vector110 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float num862 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector110.X; - float num863 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - 200f - vector110.Y; - float num864 = (float)Math.Sqrt((double)(num862 * num862 + num863 * num863)); - float num865 = 8f; + Vector2 aggressivePosition = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + float aggressiveTargetX = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - aggressivePosition.X; + float aggressiveTargetY = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - 200f - aggressivePosition.Y; + float aggressiveTargetDist = (float)Math.Sqrt((double)(aggressiveTargetX * aggressiveTargetX + aggressiveTargetY * aggressiveTargetY)); + float aggressiveSpeed = 8f; if (npc.ai[3] == 1f) { - if (num864 > 900f) - num865 = 14f; - else if (num864 > 600f) - num865 = 12f; - else if (num864 > 300f) - num865 = 10f; + if (aggressiveTargetDist > 900f) + aggressiveSpeed = 14f; + else if (aggressiveTargetDist > 600f) + aggressiveSpeed = 12f; + else if (aggressiveTargetDist > 300f) + aggressiveSpeed = 10f; } - if (num864 > 50f) + if (aggressiveTargetDist > 50f) { - num864 = num865 / num864; - npc.velocity.X = (npc.velocity.X * 14f + num862 * num864) / 15f; - npc.velocity.Y = (npc.velocity.Y * 14f + num863 * num864) / 15f; + aggressiveTargetDist = aggressiveSpeed / aggressiveTargetDist; + npc.velocity.X = (npc.velocity.X * 14f + aggressiveTargetX * aggressiveTargetDist) / 15f; + npc.velocity.Y = (npc.velocity.Y * 14f + aggressiveTargetY * aggressiveTargetDist) / 15f; } } else if (npc.ai[1] == 1f) @@ -571,14 +571,14 @@ namespace CalamityMod.NPCs npc.ai[1] = 0f; } - Vector2 vector111 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float num866 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector111.X; - float num867 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - vector111.Y; - float num868 = (float)Math.Sqrt((double)(num866 * num866 + num867 * num867)); - num868 = 20f / num868; + Vector2 scytheAttackPosition = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + float scytheAttackTargetX = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - scytheAttackPosition.X; + float scytheAttackTargetY = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - scytheAttackPosition.Y; + float scytheAttackTargetDist = (float)Math.Sqrt((double)(scytheAttackTargetX * scytheAttackTargetX + scytheAttackTargetY * scytheAttackTargetY)); + scytheAttackTargetDist = 20f / scytheAttackTargetDist; - npc.velocity.X = (npc.velocity.X * 49f + num866 * num868) / 50f; - npc.velocity.Y = (npc.velocity.Y * 49f + num867 * num868) / 50f; + npc.velocity.X = (npc.velocity.X * 49f + scytheAttackTargetX * scytheAttackTargetDist) / 50f; + npc.velocity.Y = (npc.velocity.Y * 49f + scytheAttackTargetY * scytheAttackTargetDist) / 50f; } else if (npc.ai[1] == 2f) { @@ -620,17 +620,17 @@ namespace CalamityMod.NPCs { npc.localAI[1] = 0f; - float num869 = 0.01f; - Vector2 vector112 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f + 30f); - float num870 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector112.X; - float num871 = Main.player[npc.target].position.Y - vector112.Y; - float num872 = (float)Math.Sqrt((double)(num870 * num870 + num871 * num871)); + float scytheProjSpeed = 0.01f; + Vector2 scytheProjSpawn = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f + 30f); + float scytheProjTargetX = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - scytheProjSpawn.X; + float scytheProjTargetY = Main.player[npc.target].position.Y - scytheProjSpawn.Y; + float scytheProjTargetDist = (float)Math.Sqrt((double)(scytheProjTargetX * scytheProjTargetX + scytheProjTargetY * scytheProjTargetY)); - num872 = num869 / num872; - num870 *= num872; - num871 *= num872; + scytheProjTargetDist = scytheProjSpeed / scytheProjTargetDist; + scytheProjTargetX *= scytheProjTargetDist; + scytheProjTargetY *= scytheProjTargetDist; - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center.X, npc.Center.Y, num870, num871, ProjectileID.FlamingScythe, 70, 0f, Main.myPlayer, npc.rotation, (float)npc.spriteDirection); + Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center.X, npc.Center.Y, scytheProjTargetX, scytheProjTargetY, ProjectileID.FlamingScythe, 70, 0f, Main.myPlayer, npc.rotation, (float)npc.spriteDirection); } } @@ -654,53 +654,53 @@ namespace CalamityMod.NPCs npc.netUpdate = true; } - Vector2 vector113 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float num874 = (Main.player[npc.target].Center.X + Main.npc[(int)npc.ai[1]].Center.X) / 2f; - float num875 = (Main.player[npc.target].Center.Y + Main.npc[(int)npc.ai[1]].Center.Y) / 2f; - num874 += -170f * npc.ai[0] - vector113.X; - num875 += 90f - vector113.Y; + Vector2 scytheSwipePosition = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + float scytheSwipeTargetX = (Main.player[npc.target].Center.X + Main.npc[(int)npc.ai[1]].Center.X) / 2f; + float scytheSwipeTargetY = (Main.player[npc.target].Center.Y + Main.npc[(int)npc.ai[1]].Center.Y) / 2f; + scytheSwipeTargetX += -170f * npc.ai[0] - scytheSwipePosition.X; + scytheSwipeTargetY += 90f - scytheSwipePosition.Y; - float num876 = Math.Abs(Main.player[npc.target].Center.X - Main.npc[(int)npc.ai[1]].Center.X) + Math.Abs(Main.player[npc.target].Center.Y - Main.npc[(int)npc.ai[1]].Center.Y); - if (num876 > 700f) + float scytheSwipeReelbackDist = Math.Abs(Main.player[npc.target].Center.X - Main.npc[(int)npc.ai[1]].Center.X) + Math.Abs(Main.player[npc.target].Center.Y - Main.npc[(int)npc.ai[1]].Center.Y); + if (scytheSwipeReelbackDist > 700f) { - num874 = Main.npc[(int)npc.ai[1]].Center.X - 170f * npc.ai[0] - vector113.X; - num875 = Main.npc[(int)npc.ai[1]].Center.Y + 90f - vector113.Y; + scytheSwipeTargetX = Main.npc[(int)npc.ai[1]].Center.X - 170f * npc.ai[0] - scytheSwipePosition.X; + scytheSwipeTargetY = Main.npc[(int)npc.ai[1]].Center.Y + 90f - scytheSwipePosition.Y; } - float num877 = (float)Math.Sqrt((double)(num874 * num874 + num875 * num875)); - float num878 = 8f; - if (num877 > 1000f) - num878 = 23f; - else if (num877 > 800f) - num878 = 20f; - else if (num877 > 600f) - num878 = 17f; - else if (num877 > 400f) - num878 = 14f; - else if (num877 > 200f) - num878 = 11f; + float scytheSwipeTargetDist = (float)Math.Sqrt((double)(scytheSwipeTargetX * scytheSwipeTargetX + scytheSwipeTargetY * scytheSwipeTargetY)); + float scytheSwipeSpeed = 8f; + if (scytheSwipeTargetDist > 1000f) + scytheSwipeSpeed = 23f; + else if (scytheSwipeTargetDist > 800f) + scytheSwipeSpeed = 20f; + else if (scytheSwipeTargetDist > 600f) + scytheSwipeSpeed = 17f; + else if (scytheSwipeTargetDist > 400f) + scytheSwipeSpeed = 14f; + else if (scytheSwipeTargetDist > 200f) + scytheSwipeSpeed = 11f; if (npc.ai[0] < 0f && npc.Center.X > Main.npc[(int)npc.ai[1]].Center.X) - num874 -= 4f; + scytheSwipeTargetX -= 4f; if (npc.ai[0] > 0f && npc.Center.X < Main.npc[(int)npc.ai[1]].Center.X) - num874 += 4f; + scytheSwipeTargetX += 4f; - num877 = num878 / num877; - npc.velocity.X = (npc.velocity.X * 14f + num874 * num877) / 15f; - npc.velocity.Y = (npc.velocity.Y * 14f + num875 * num877) / 15f; - num877 = (float)Math.Sqrt((double)(num874 * num874 + num875 * num875)); + scytheSwipeTargetDist = scytheSwipeSpeed / scytheSwipeTargetDist; + npc.velocity.X = (npc.velocity.X * 14f + scytheSwipeTargetX * scytheSwipeTargetDist) / 15f; + npc.velocity.Y = (npc.velocity.Y * 14f + scytheSwipeTargetY * scytheSwipeTargetDist) / 15f; + scytheSwipeTargetDist = (float)Math.Sqrt((double)(scytheSwipeTargetX * scytheSwipeTargetX + scytheSwipeTargetY * scytheSwipeTargetY)); - if (num877 > 20f) - npc.rotation = (float)Math.Atan2((double)num875, (double)num874) + MathHelper.PiOver2; + if (scytheSwipeTargetDist > 20f) + npc.rotation = (float)Math.Atan2((double)scytheSwipeTargetY, (double)scytheSwipeTargetX) + MathHelper.PiOver2; } else if (npc.ai[2] == 1f) { - Vector2 vector114 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float num879 = Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - 200f * npc.ai[0] - vector114.X; - float num880 = Main.npc[(int)npc.ai[1]].position.Y + 230f - vector114.Y; - float num881 = (float)Math.Sqrt((double)(num879 * num879 + num880 * num880)); + Vector2 scytheReturnPosition = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + float scytheReturnTargetX = Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - 200f * npc.ai[0] - scytheReturnPosition.X; + float scytheReturnTargetY = Main.npc[(int)npc.ai[1]].position.Y + 230f - scytheReturnPosition.Y; + float scytheReturnTargetDist = (float)Math.Sqrt((double)(scytheReturnTargetX * scytheReturnTargetX + scytheReturnTargetY * scytheReturnTargetY)); - npc.rotation = (float)Math.Atan2((double)num880, (double)num879) + MathHelper.PiOver2; + npc.rotation = (float)Math.Atan2((double)scytheReturnTargetY, (double)scytheReturnTargetX) + MathHelper.PiOver2; npc.velocity.X *= 0.95f; npc.velocity.Y -= 0.3f; @@ -712,32 +712,32 @@ namespace CalamityMod.NPCs npc.TargetClosest(true); npc.ai[2] = 2f; - vector114 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - num879 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector114.X; - num880 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - vector114.Y; - num881 = (float)Math.Sqrt((double)(num879 * num879 + num880 * num880)); - num881 = 24f / num881; + scytheReturnPosition = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + scytheReturnTargetX = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - scytheReturnPosition.X; + scytheReturnTargetY = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - scytheReturnPosition.Y; + scytheReturnTargetDist = (float)Math.Sqrt((double)(scytheReturnTargetX * scytheReturnTargetX + scytheReturnTargetY * scytheReturnTargetY)); + scytheReturnTargetDist = 24f / scytheReturnTargetDist; - npc.velocity.X = num879 * num881; - npc.velocity.Y = num880 * num881; + npc.velocity.X = scytheReturnTargetX * scytheReturnTargetDist; + npc.velocity.Y = scytheReturnTargetY * scytheReturnTargetDist; npc.netUpdate = true; } } else if (npc.ai[2] == 2f) { - float num882 = Math.Abs(npc.Center.X - Main.npc[(int)npc.ai[1]].Center.X) + Math.Abs(npc.Center.Y - Main.npc[(int)npc.ai[1]].Center.Y); + float scytheReturnDestination = Math.Abs(npc.Center.X - Main.npc[(int)npc.ai[1]].Center.X) + Math.Abs(npc.Center.Y - Main.npc[(int)npc.ai[1]].Center.Y); - if (npc.position.Y > Main.player[npc.target].position.Y || npc.velocity.Y < 0f || num882 > 800f) + if (npc.position.Y > Main.player[npc.target].position.Y || npc.velocity.Y < 0f || scytheReturnDestination > 800f) npc.ai[2] = 3f; } else if (npc.ai[2] == 4f) { - Vector2 vector115 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float num883 = Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - 200f * npc.ai[0] - vector115.X; - float num884 = Main.npc[(int)npc.ai[1]].position.Y + 230f - vector115.Y; - float num885 = (float)Math.Sqrt((double)(num883 * num883 + num884 * num884)); + Vector2 scytheLesserSwipePos = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + float scytheLesserSwipeTargetX = Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - 200f * npc.ai[0] - scytheLesserSwipePos.X; + float scytheLesserSwipeTargetY = Main.npc[(int)npc.ai[1]].position.Y + 230f - scytheLesserSwipePos.Y; + float scytheLesserSwipeTargetDist = (float)Math.Sqrt((double)(scytheLesserSwipeTargetX * scytheLesserSwipeTargetX + scytheLesserSwipeTargetY * scytheLesserSwipeTargetY)); - npc.rotation = (float)Math.Atan2((double)num884, (double)num883) + MathHelper.PiOver2; + npc.rotation = (float)Math.Atan2((double)scytheLesserSwipeTargetY, (double)scytheLesserSwipeTargetX) + MathHelper.PiOver2; npc.velocity.Y *= 0.95f; npc.velocity.X += 0.3f * -npc.ai[0]; @@ -751,22 +751,22 @@ namespace CalamityMod.NPCs npc.TargetClosest(true); npc.ai[2] = 5f; - vector115 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - num883 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector115.X; - num884 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - vector115.Y; - num885 = (float)Math.Sqrt((double)(num883 * num883 + num884 * num884)); - num885 = 17f / num885; + scytheLesserSwipePos = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + scytheLesserSwipeTargetX = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - scytheLesserSwipePos.X; + scytheLesserSwipeTargetY = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - scytheLesserSwipePos.Y; + scytheLesserSwipeTargetDist = (float)Math.Sqrt((double)(scytheLesserSwipeTargetX * scytheLesserSwipeTargetX + scytheLesserSwipeTargetY * scytheLesserSwipeTargetY)); + scytheLesserSwipeTargetDist = 17f / scytheLesserSwipeTargetDist; - npc.velocity.X = num883 * num885; - npc.velocity.Y = num884 * num885; + npc.velocity.X = scytheLesserSwipeTargetX * scytheLesserSwipeTargetDist; + npc.velocity.Y = scytheLesserSwipeTargetY * scytheLesserSwipeTargetDist; npc.netUpdate = true; } } else if (npc.ai[2] == 5f) { - float num886 = Math.Abs(npc.Center.X - Main.npc[(int)npc.ai[1]].Center.X) + Math.Abs(npc.Center.Y - Main.npc[(int)npc.ai[1]].Center.Y); + float scytheLesserSwipeReturnDest = Math.Abs(npc.Center.X - Main.npc[(int)npc.ai[1]].Center.X) + Math.Abs(npc.Center.Y - Main.npc[(int)npc.ai[1]].Center.Y); - if ((npc.velocity.X > 0f && npc.position.X + (float)(npc.width / 2) > Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2)) || (npc.velocity.X < 0f && npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2)) || num886 > 800f) + if ((npc.velocity.X > 0f && npc.position.X + (float)(npc.width / 2) > Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2)) || (npc.velocity.X < 0f && npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2)) || scytheLesserSwipeReturnDest > 800f) npc.ai[2] = 0f; } @@ -800,42 +800,41 @@ namespace CalamityMod.NPCs } npc.TargetClosest(true); - int num887 = 800; - float num888 = Math.Abs(npc.Center.X - Main.player[npc.target].Center.X); + float iceQueenTargetDist = Math.Abs(npc.Center.X - Main.player[npc.target].Center.X); - if (npc.Center.X < Main.player[npc.target].Center.X && npc.ai[2] < 0f && num888 > (float)num887) + if (npc.Center.X < Main.player[npc.target].Center.X && npc.ai[2] < 0f && iceQueenTargetDist > 800f) npc.ai[2] = 0f; - if (npc.Center.X > Main.player[npc.target].Center.X && npc.ai[2] > 0f && num888 > (float)num887) + if (npc.Center.X > Main.player[npc.target].Center.X && npc.ai[2] > 0f && iceQueenTargetDist > 800f) npc.ai[2] = 0f; - float num889 = 0.6f; - float num890 = 10f; + float iceQueenAcceleration = 0.6f; + float iceQueenMaxVelocity = 10f; if ((double)npc.life < (double)npc.lifeMax * 0.75) { - num889 = 0.7f; - num890 = 12f; + iceQueenAcceleration = 0.7f; + iceQueenMaxVelocity = 12f; } if ((double)npc.life < (double)npc.lifeMax * 0.5) { - num889 = 0.8f; - num890 = 14f; + iceQueenAcceleration = 0.8f; + iceQueenMaxVelocity = 14f; } if ((double)npc.life < (double)npc.lifeMax * 0.25) { - num889 = 0.95f; - num890 = 16f; + iceQueenAcceleration = 0.95f; + iceQueenMaxVelocity = 16f; } - npc.velocity.X += npc.ai[2] * num889; - if (npc.velocity.X > num890) - npc.velocity.X = num890; - if (npc.velocity.X < -num890) - npc.velocity.X = -num890; + npc.velocity.X += npc.ai[2] * iceQueenAcceleration; + if (npc.velocity.X > iceQueenMaxVelocity) + npc.velocity.X = iceQueenMaxVelocity; + if (npc.velocity.X < -iceQueenMaxVelocity) + npc.velocity.X = -iceQueenMaxVelocity; - float num891 = Main.player[npc.target].position.Y - (npc.position.Y + (float)npc.height); - if (num891 < 150f) + float iceQueenHoverHeight = Main.player[npc.target].position.Y - (npc.position.Y + (float)npc.height); + if (iceQueenHoverHeight < 150f) npc.velocity.Y -= 0.2f; - if (num891 > 200f) + if (iceQueenHoverHeight > 200f) npc.velocity.Y += 0.2f; if (npc.velocity.Y > 9f) npc.velocity.Y = 9f; @@ -844,42 +843,42 @@ namespace CalamityMod.NPCs npc.rotation = npc.velocity.X * 0.05f; - if ((num888 < 500f || npc.ai[3] < 0f) && npc.position.Y < Main.player[npc.target].position.Y) + if ((iceQueenTargetDist < 500f || npc.ai[3] < 0f) && npc.position.Y < Main.player[npc.target].position.Y) { npc.ai[3] += 1f; - int num892 = 8; + int frostWaveFireDelay = 8; if ((double)npc.life < (double)npc.lifeMax * 0.75) - num892 = 7; + frostWaveFireDelay = 7; if ((double)npc.life < (double)npc.lifeMax * 0.5) - num892 = 6; + frostWaveFireDelay = 6; if ((double)npc.life < (double)npc.lifeMax * 0.25) - num892 = 5; + frostWaveFireDelay = 5; - num892++; - if (npc.ai[3] > (float)num892) - npc.ai[3] = (float)-(float)num892; + frostWaveFireDelay++; + if (npc.ai[3] > (float)frostWaveFireDelay) + npc.ai[3] = (float)-(float)frostWaveFireDelay; if (npc.ai[3] == 0f && Main.netMode != NetmodeID.MultiplayerClient) { - Vector2 vector116 = new Vector2(npc.Center.X, npc.Center.Y); - vector116.X += npc.velocity.X * 7f; - float num893 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector116.X; - float num894 = Main.player[npc.target].Center.Y - vector116.Y; - float num895 = (float)Math.Sqrt((double)(num893 * num893 + num894 * num894)); + Vector2 frostWavePosition = new Vector2(npc.Center.X, npc.Center.Y); + frostWavePosition.X += npc.velocity.X * 7f; + float frostWaveTargetX = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - frostWavePosition.X; + float frostWaveTargetY = Main.player[npc.target].Center.Y - frostWavePosition.Y; + float frostWaveTargetDist = (float)Math.Sqrt((double)(frostWaveTargetX * frostWaveTargetX + frostWaveTargetY * frostWaveTargetY)); - float num896 = 8f; + float frostWaveSpeed = 8f; if ((double)npc.life < (double)npc.lifeMax * 0.75) - num896 = 9f; + frostWaveSpeed = 9f; if ((double)npc.life < (double)npc.lifeMax * 0.5) - num896 = 10f; + frostWaveSpeed = 10f; if ((double)npc.life < (double)npc.lifeMax * 0.25) - num896 = 11f; + frostWaveSpeed = 11f; - num895 = num896 / num895; - num893 *= num895; - num894 *= num895; + frostWaveTargetDist = frostWaveSpeed / frostWaveTargetDist; + frostWaveTargetX *= frostWaveTargetDist; + frostWaveTargetY *= frostWaveTargetDist; - Projectile.NewProjectile(npc.GetSource_FromAI(), vector116.X, vector116.Y, num893, num894, ProjectileID.FrostWave, 50, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(npc.GetSource_FromAI(), frostWavePosition.X, frostWavePosition.Y, frostWaveTargetX, frostWaveTargetY, ProjectileID.FrostWave, 50, 0f, Main.myPlayer, 0f, 0f); } } else if (npc.ai[3] < 0f) @@ -889,7 +888,7 @@ namespace CalamityMod.NPCs { npc.ai[1] += (float)Main.rand.Next(1, 4); - if (npc.ai[1] > 600f && num888 < 600f) + if (npc.ai[1] > 600f && iceQueenTargetDist < 600f) npc.ai[0] = -1f; } } @@ -897,45 +896,45 @@ namespace CalamityMod.NPCs { npc.TargetClosest(true); - float num898 = 0.2f; - float num899 = 10f; + float icicleAttackAcceleration = 0.2f; + float icicleAttackMaxVelocity = 10f; if ((double)npc.life < (double)npc.lifeMax * 0.75) { - num898 = 0.24f; - num899 = 12f; + icicleAttackAcceleration = 0.24f; + icicleAttackMaxVelocity = 12f; } if ((double)npc.life < (double)npc.lifeMax * 0.5) { - num898 = 0.28f; - num899 = 14f; + icicleAttackAcceleration = 0.28f; + icicleAttackMaxVelocity = 14f; } if ((double)npc.life < (double)npc.lifeMax * 0.25) { - num898 = 0.32f; - num899 = 16f; + icicleAttackAcceleration = 0.32f; + icicleAttackMaxVelocity = 16f; } - num898 -= 0.05f; - num899 -= 1f; + icicleAttackAcceleration -= 0.05f; + icicleAttackMaxVelocity -= 1f; if (npc.Center.X < Main.player[npc.target].Center.X) { - npc.velocity.X += num898; + npc.velocity.X += icicleAttackAcceleration; if (npc.velocity.X < 0f) npc.velocity.X *= 0.98f; } if (npc.Center.X > Main.player[npc.target].Center.X) { - npc.velocity.X -= num898; + npc.velocity.X -= icicleAttackAcceleration; if (npc.velocity.X > 0f) npc.velocity.X *= 0.98f; } - if (npc.velocity.X > num899 || npc.velocity.X < -num899) + if (npc.velocity.X > icicleAttackMaxVelocity || npc.velocity.X < -icicleAttackMaxVelocity) npc.velocity.X *= 0.95f; - float num900 = Main.player[npc.target].position.Y - (npc.position.Y + (float)npc.height); - if (num900 < 180f) + float icicleAttackHoverHeight = Main.player[npc.target].position.Y - (npc.position.Y + (float)npc.height); + if (icicleAttackHoverHeight < 180f) npc.velocity.Y -= 0.1f; - if (num900 > 200f) + if (icicleAttackHoverHeight > 200f) npc.velocity.Y += 0.1f; if (npc.velocity.Y > 7f) @@ -948,33 +947,33 @@ namespace CalamityMod.NPCs if (Main.netMode != NetmodeID.MultiplayerClient) { npc.ai[3] += 1f; - int num901 = 10; + int icicleFireDelay = 10; if ((double)npc.life < (double)npc.lifeMax * 0.75) - num901 = 8; + icicleFireDelay = 8; if ((double)npc.life < (double)npc.lifeMax * 0.5) - num901 = 6; + icicleFireDelay = 6; if ((double)npc.life < (double)npc.lifeMax * 0.25) - num901 = 4; + icicleFireDelay = 4; if ((double)npc.life < (double)npc.lifeMax * 0.1) - num901 = 2; + icicleFireDelay = 2; - num901 += 3; - if (npc.ai[3] >= (float)num901) + icicleFireDelay += 3; + if (npc.ai[3] >= (float)icicleFireDelay) { npc.ai[3] = 0f; - Vector2 vector117 = new Vector2(npc.Center.X, npc.position.Y + (float)npc.height - 14f); - int i2 = (int)(vector117.X / 16f); - int j2 = (int)(vector117.Y / 16f); + Vector2 icicleSpawnPos = new Vector2(npc.Center.X, npc.position.Y + (float)npc.height - 14f); + int i2 = (int)(icicleSpawnPos.X / 16f); + int j2 = (int)(icicleSpawnPos.Y / 16f); if (!WorldGen.SolidTile(i2, j2)) { - float num902 = npc.velocity.Y; + float icicleFallSpeed = npc.velocity.Y; - if (num902 < 0f) - num902 = 0f; + if (icicleFallSpeed < 0f) + icicleFallSpeed = 0f; - num902 += 3f; + icicleFallSpeed += 3f; float speedX2 = npc.velocity.X * 0.25f; - Projectile.NewProjectile(npc.GetSource_FromAI(), vector117.X, vector117.Y, speedX2, num902, ProjectileID.FrostShard, 44, 0f, Main.myPlayer, (float)Main.rand.Next(5), 0f); + Projectile.NewProjectile(npc.GetSource_FromAI(), icicleSpawnPos.X, icicleSpawnPos.Y, speedX2, icicleFallSpeed, ProjectileID.FrostShard, 44, 0f, Main.myPlayer, (float)Main.rand.Next(5), 0f); } } } @@ -991,35 +990,35 @@ namespace CalamityMod.NPCs { npc.TargetClosest(true); - Vector2 vector118 = new Vector2(npc.Center.X, npc.Center.Y - 20f); - float num904 = (float)Main.rand.Next(-1000, 1001); - float num905 = (float)Main.rand.Next(-1000, 1001); - float num906 = (float)Math.Sqrt((double)(num904 * num904 + num905 * num905)); - float num907 = 20f; + Vector2 iceRainPosition = new Vector2(npc.Center.X, npc.Center.Y - 20f); + float iceRainXVel = (float)Main.rand.Next(-1000, 1001); + float iceRainYVel = (float)Main.rand.Next(-1000, 1001); + float iceRainVelocity = (float)Math.Sqrt((double)(iceRainXVel * iceRainXVel + iceRainYVel * iceRainYVel)); + float iceRainSpeed = 20f; npc.velocity *= 0.95f; - num906 = num907 / num906; - num904 *= num906; - num905 *= num906; + iceRainVelocity = iceRainSpeed / iceRainVelocity; + iceRainXVel *= iceRainVelocity; + iceRainYVel *= iceRainVelocity; npc.rotation += 0.2f; - vector118.X += num904 * 4f; - vector118.Y += num905 * 4f; + iceRainPosition.X += iceRainXVel * 4f; + iceRainPosition.Y += iceRainYVel * 4f; npc.ai[3] += 1f; - int num908 = 7; + int iceRainFireDelay = 7; if ((double)npc.life < (double)npc.lifeMax * 0.75) - num908--; + iceRainFireDelay--; if ((double)npc.life < (double)npc.lifeMax * 0.5) - num908 -= 2; + iceRainFireDelay -= 2; if ((double)npc.life < (double)npc.lifeMax * 0.25) - num908 -= 3; + iceRainFireDelay -= 3; if ((double)npc.life < (double)npc.lifeMax * 0.1) - num908 -= 4; + iceRainFireDelay -= 4; - if (npc.ai[3] > (float)num908) + if (npc.ai[3] > (float)iceRainFireDelay) { npc.ai[3] = 0f; - int num909 = Projectile.NewProjectile(npc.GetSource_FromAI(), vector118.X, vector118.Y, num904, num905, ProjectileID.FrostShard, 40, 0f, Main.myPlayer, 0f, 0f); + int iceRainAttack = Projectile.NewProjectile(npc.GetSource_FromAI(), iceRainPosition.X, iceRainPosition.Y, iceRainXVel, iceRainYVel, ProjectileID.FrostShard, 40, 0f, Main.myPlayer, 0f, 0f); } if (Main.netMode != NetmodeID.MultiplayerClient) @@ -1032,13 +1031,13 @@ namespace CalamityMod.NPCs } if (npc.ai[0] == -1f) { - int num910 = Main.rand.Next(3); + int attackPicker = Main.rand.Next(3); npc.TargetClosest(true); if (Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) > 1000f) - num910 = 0; + attackPicker = 0; - npc.ai[0] = (float)num910; + npc.ai[0] = (float)attackPicker; npc.ai[1] = 0f; npc.ai[2] = 0f; npc.ai[3] = 0f; From 422478970e9e3e5859642fcb5bd87315f04d1d85 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 2 Nov 2023 22:51:20 -0400 Subject: [PATCH 52/95] CalPlayer: General, DrawEffects, HitHurt --- CalPlayer/CalamityPlayer.cs | 118 ++++++++++++------------- CalPlayer/CalamityPlayerDrawEffects.cs | 4 +- CalPlayer/CalamityPlayerHitHurt.cs | 28 +++--- 3 files changed, 74 insertions(+), 76 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index e9c7fdd3b9..265f9c48fd 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -2774,22 +2774,22 @@ namespace CalamityMod.CalPlayer brimflameFrenzy = true; Player.AddBuff(ModContent.BuffType(), 10 * 60, true); SoundEngine.PlaySound(BrimflameScowl.ActivationSound, Player.Center); - for (int num502 = 0; num502 < 36; num502++) + for (int i = 0; i < 36; i++) { - int dust = Dust.NewDust(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f); - Main.dust[dust].velocity *= 3f; - Main.dust[dust].scale *= 1.15f; + int brimDust = Dust.NewDust(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f); + Main.dust[brimDust].velocity *= 3f; + Main.dust[brimDust].scale *= 1.15f; } - int num226 = 36; - for (int num227 = 0; num227 < num226; num227++) + int dustAmt = 36; + for (int j = 0; j < dustAmt; j++) { - Vector2 vector6 = Vector2.Normalize(Player.velocity) * new Vector2((float)Player.width / 2f, (float)Player.height) * 0.75f; - vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * MathHelper.TwoPi / (float)num226), default) + Player.Center; - Vector2 vector7 = vector6 - Player.Center; - int num228 = Dust.NewDust(vector6 + vector7, 0, 0, (int)CalamityDusts.Brimstone, vector7.X * 1.5f, vector7.Y * 1.5f, 100, default, 1.4f); - Main.dust[num228].noGravity = true; - Main.dust[num228].noLight = true; - Main.dust[num228].velocity = vector7; + Vector2 dustRotation = Vector2.Normalize(Player.velocity) * new Vector2((float)Player.width / 2f, (float)Player.height) * 0.75f; + dustRotation = dustRotation.RotatedBy((double)((float)(j - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + Player.Center; + Vector2 dustVelocity = dustRotation - Player.Center; + int brimDust2 = Dust.NewDust(dustRotation + dustVelocity, 0, 0, (int)CalamityDusts.Brimstone, dustVelocity.X * 1.5f, dustVelocity.Y * 1.5f, 100, default, 1.4f); + Main.dust[brimDust2].noGravity = true; + Main.dust[brimDust2].noLight = true; + Main.dust[brimDust2].velocity = dustVelocity; } } } @@ -2868,22 +2868,22 @@ namespace CalamityMod.CalPlayer if (dsSetBonus) { SoundEngine.PlaySound(DemonshadeHelm.ActivationSound, Player.Center); - for (int num502 = 0; num502 < 36; num502++) + for (int i = 0; i < 36; i++) { - int dust = Dust.NewDust(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f); - Main.dust[dust].velocity *= 3f; - Main.dust[dust].scale *= 1.15f; + int brimDust = Dust.NewDust(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f); + Main.dust[brimDust].velocity *= 3f; + Main.dust[brimDust].scale *= 1.15f; } - int num226 = 36; - for (int num227 = 0; num227 < num226; num227++) + int dustAmt = 36; + for (int j = 0; j < dustAmt; j++) { - Vector2 vector6 = Vector2.Normalize(Player.velocity) * new Vector2((float)Player.width / 2f, (float)Player.height) * 0.75f; - vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * MathHelper.TwoPi / (float)num226), default) + Player.Center; - Vector2 vector7 = vector6 - Player.Center; - int num228 = Dust.NewDust(vector6 + vector7, 0, 0, (int)CalamityDusts.Brimstone, vector7.X * 1.5f, vector7.Y * 1.5f, 100, default, 1.4f); - Main.dust[num228].noGravity = true; - Main.dust[num228].noLight = true; - Main.dust[num228].velocity = vector7; + Vector2 dustRotation = Vector2.Normalize(Player.velocity) * new Vector2((float)Player.width / 2f, (float)Player.height) * 0.75f; + dustRotation = dustRotation.RotatedBy((double)((float)(j - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt), default) + Player.Center; + Vector2 dustVelocity = dustRotation - Player.Center; + int brimDust2 = Dust.NewDust(dustRotation + dustVelocity, 0, 0, (int)CalamityDusts.Brimstone, dustVelocity.X * 1.5f, dustVelocity.Y * 1.5f, 100, default, 1.4f); + Main.dust[brimDust2].noGravity = true; + Main.dust[brimDust2].noLight = true; + Main.dust[brimDust2].velocity = dustVelocity; } if (Player.whoAmI == Main.myPlayer) { @@ -3137,9 +3137,9 @@ namespace CalamityMod.CalPlayer public static Vector2? GetUnderworldPosition(Player player) { bool canSpawn = false; - int num = Main.maxTilesX / 2; - int num2 = 100; - int num3 = num2 / 2; + int halfWorldXTiles = Main.maxTilesX / 2; + int largerCheckRadius = 100; + int smallerCheckRadius = 50; int teleportStartY = Main.UnderworldLayer + 20; int teleportRangeY = 80; Player.RandomTeleportationAttemptSettings settings = new Player.RandomTeleportationAttemptSettings @@ -3153,12 +3153,12 @@ namespace CalamityMod.CalPlayer maximumFallDistanceFromOrignalPoint = 30 }; - Vector2 vector = player.CheckForGoodTeleportationSpot(ref canSpawn, num - num3, num2, teleportStartY, teleportRangeY, settings); + Vector2 vector = player.CheckForGoodTeleportationSpot(ref canSpawn, halfWorldXTiles - smallerCheckRadius, largerCheckRadius, teleportStartY, teleportRangeY, settings); if (!canSpawn) - vector = player.CheckForGoodTeleportationSpot(ref canSpawn, num - num2, num3, teleportStartY, teleportRangeY, settings); + vector = player.CheckForGoodTeleportationSpot(ref canSpawn, halfWorldXTiles - largerCheckRadius, smallerCheckRadius, teleportStartY, teleportRangeY, settings); if (!canSpawn) - vector = player.CheckForGoodTeleportationSpot(ref canSpawn, num + num3, num3, teleportStartY, teleportRangeY, settings); + vector = player.CheckForGoodTeleportationSpot(ref canSpawn, halfWorldXTiles + smallerCheckRadius, smallerCheckRadius, teleportStartY, teleportRangeY, settings); if (canSpawn) { @@ -3896,46 +3896,46 @@ namespace CalamityMod.CalPlayer { if (!CalamityLists.VeneratedLocketBanlist.Contains(item.type)) { - float num72 = item.shootSpeed; - Vector2 vector2 = Player.RotatedRelativePoint(Player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + float veneratedCloneSpeed = item.shootSpeed; + Vector2 realPlayerPos = Player.RotatedRelativePoint(Player.MountedCenter, true); + float veneratedCloneXPos = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + float veneratedCloneYPos = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; if (Player.gravDir == -1f) { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + veneratedCloneYPos = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - realPlayerPos.Y; } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + float veneratedCloneDistance = (float)Math.Sqrt((double)(veneratedCloneXPos * veneratedCloneXPos + veneratedCloneYPos * veneratedCloneYPos)); + if ((float.IsNaN(veneratedCloneXPos) && float.IsNaN(veneratedCloneYPos)) || (veneratedCloneXPos == 0f && veneratedCloneYPos == 0f)) { - num78 = (float)Player.direction; - num79 = 0f; - num80 = num72; + veneratedCloneXPos = (float)Player.direction; + veneratedCloneYPos = 0f; + veneratedCloneDistance = veneratedCloneSpeed; } else { - num80 = num72 / num80; + veneratedCloneDistance = veneratedCloneSpeed / veneratedCloneDistance; } - vector2 = new Vector2(Player.position.X + (float)Player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)Player.direction) + ((float)Main.mouseX + Main.screenPosition.X - Player.position.X), Player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + Player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= 100f; - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) + realPlayerPos = new Vector2(Player.position.X + (float)Player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)Player.direction) + ((float)Main.mouseX + Main.screenPosition.X - Player.position.X), Player.MountedCenter.Y - 600f); + realPlayerPos.X = (realPlayerPos.X + Player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + realPlayerPos.Y -= 100f; + veneratedCloneXPos = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; + veneratedCloneYPos = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; + if (veneratedCloneYPos < 0f) { - num79 *= -1f; + veneratedCloneYPos *= -1f; } - if (num79 < 20f) + if (veneratedCloneYPos < 20f) { - num79 = 20f; + veneratedCloneYPos = 20f; } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-30, 31) * 0.02f; - float speedY5 = num79 + (float)Main.rand.Next(-30, 31) * 0.02f; - int p = Projectile.NewProjectile(source, vector2.X, vector2.Y, speedX4, speedY5, type, (int)(damage * 0.07), knockBack * 0.5f, Player.whoAmI); + veneratedCloneDistance = (float)Math.Sqrt((double)(veneratedCloneXPos * veneratedCloneXPos + veneratedCloneYPos * veneratedCloneYPos)); + veneratedCloneDistance = veneratedCloneSpeed / veneratedCloneDistance; + veneratedCloneXPos *= veneratedCloneDistance; + veneratedCloneYPos *= veneratedCloneDistance; + float speedX4 = veneratedCloneXPos + (float)Main.rand.Next(-30, 31) * 0.02f; + float speedY5 = veneratedCloneYPos + (float)Main.rand.Next(-30, 31) * 0.02f; + int p = Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, type, (int)(damage * 0.07), knockBack * 0.5f, Player.whoAmI); if (p.WithinBounds(Main.maxProjectiles)) { diff --git a/CalPlayer/CalamityPlayerDrawEffects.cs b/CalPlayer/CalamityPlayerDrawEffects.cs index cdd320628e..eaf39cd6f5 100644 --- a/CalPlayer/CalamityPlayerDrawEffects.cs +++ b/CalPlayer/CalamityPlayerDrawEffects.cs @@ -475,10 +475,8 @@ namespace CalamityMod.CalPlayer SpriteEffects spriteEffects = Player.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - float num25 = -4f; - float num24 = -8f; DrawData howDoIDrawThings = new DrawData(thingToDraw, - new Vector2((int)(drawPlayer.position.X - Main.screenPosition.X + (drawPlayer.width / 2) - (9 * drawPlayer.direction)) + num25 * drawPlayer.direction, (int)(drawPlayer.position.Y - Main.screenPosition.Y + (drawPlayer.height / 2) + 2f * drawPlayer.gravDir + num24 * drawPlayer.gravDir)), + new Vector2((int)(drawPlayer.position.X - Main.screenPosition.X + (drawPlayer.width / 2) - (9 * drawPlayer.direction)) - 4f * drawPlayer.direction, (int)(drawPlayer.position.Y - Main.screenPosition.Y + (drawPlayer.height / 2) + 2f * drawPlayer.gravDir - 8f * drawPlayer.gravDir)), new Rectangle(0, 0, thingToDraw.Width, thingToDraw.Height), drawInfo.colorArmorBody, drawPlayer.bodyRotation, diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 2d0d95df72..6876d96acd 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -119,8 +119,8 @@ namespace CalamityMod.CalPlayer for (int j = 0; j < 100; j++) { - int num = Dust.NewDust(Player.position, Player.width, Player.height, 235, 0f, 0f, 100, default, 2f); - Dust dust = Main.dust[num]; + int scarfDodgeDust = Dust.NewDust(Player.position, Player.width, Player.height, 235, 0f, 0f, 100, default, 2f); + Dust dust = Main.dust[scarfDodgeDust]; dust.position.X += Main.rand.Next(-20, 21); dust.position.Y += Main.rand.Next(-20, 21); dust.velocity *= 0.4f; @@ -233,8 +233,8 @@ namespace CalamityMod.CalPlayer for (int j = 0; j < 50; j++) { - int num = Dust.NewDust(Player.position, Player.width, Player.height, 173, 0f, 0f, 100, default, 2f); - Dust dust = Main.dust[num]; + int nebulousReviveDust = Dust.NewDust(Player.position, Player.width, Player.height, 173, 0f, 0f, 100, default, 2f); + Dust dust = Main.dust[nebulousReviveDust]; dust.position.X += Main.rand.Next(-20, 21); dust.position.Y += Main.rand.Next(-20, 21); dust.velocity *= 0.9f; @@ -2585,18 +2585,18 @@ namespace CalamityMod.CalPlayer { if (Player.inventory[i].stack > 0 && ((Player.inventory[i].type >= ItemID.LargeAmethyst && Player.inventory[i].type <= ItemID.LargeDiamond) || Player.inventory[i].type == ItemID.LargeAmber)) { - int num = Item.NewItem(source, (int)Player.position.X, (int)Player.position.Y, Player.width, Player.height, Player.inventory[i].type, 1, false, 0, false, false); - Main.item[num].netDefaults(Player.inventory[i].netID); - Main.item[num].Prefix((int)Player.inventory[i].prefix); - Main.item[num].stack = Player.inventory[i].stack; - Main.item[num].velocity.Y = (float)Main.rand.Next(-20, 1) * 0.2f; - Main.item[num].velocity.X = (float)Main.rand.Next(-20, 21) * 0.2f; - Main.item[num].noGrabDelay = 100; - Main.item[num].favorited = false; - Main.item[num].newAndShiny = false; + int droppedLargeGem = Item.NewItem(source, (int)Player.position.X, (int)Player.position.Y, Player.width, Player.height, Player.inventory[i].type, 1, false, 0, false, false); + Main.item[droppedLargeGem].netDefaults(Player.inventory[i].netID); + Main.item[droppedLargeGem].Prefix((int)Player.inventory[i].prefix); + Main.item[droppedLargeGem].stack = Player.inventory[i].stack; + Main.item[droppedLargeGem].velocity.Y = (float)Main.rand.Next(-20, 1) * 0.2f; + Main.item[droppedLargeGem].velocity.X = (float)Main.rand.Next(-20, 21) * 0.2f; + Main.item[droppedLargeGem].noGrabDelay = 100; + Main.item[droppedLargeGem].favorited = false; + Main.item[droppedLargeGem].newAndShiny = false; if (Main.netMode == NetmodeID.MultiplayerClient) { - NetMessage.SendData(MessageID.SyncItem, -1, -1, null, num, 0f, 0f, 0f, 0, 0, 0); + NetMessage.SendData(MessageID.SyncItem, -1, -1, null, droppedLargeGem, 0f, 0f, 0f, 0, 0, 0); } Player.inventory[i].SetDefaults(0, false); } From 29511d2773e4816a214a64fdc34e3feca0390fda Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 2 Nov 2023 23:22:08 -0400 Subject: [PATCH 53/95] CalPlayerMiscEffects; 1 folder left --- CalPlayer/CalamityPlayerMiscEffects.cs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index ae559e4657..1fd60f91af 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1158,7 +1158,7 @@ namespace CalamityMod.CalPlayer Vector2 dustLineEnd = Player.Center; Vector2 currentDustPos = default; Vector2 spinningpoint = new Vector2(0f, -3f).RotatedByRandom(MathHelper.Pi); - Vector2 value5 = new Vector2(2.1f, 2f); + Vector2 healerDustVel = new Vector2(2.1f, 2f); Color dustColor = Main.hslToRgb(Main.rgbToHsl(new Color(255, 200, Main.DiscoB)).X, 1f, 0.5f); dustColor.A = 255; for (int i = 0; i < maxHealDustIterations; i++) @@ -1166,18 +1166,18 @@ namespace CalamityMod.CalPlayer if (i % dustDivisor == 0) { currentDustPos = Vector2.Lerp(dustLineStart, dustLineEnd, i / (float)maxHealDustIterations); - int dust = Dust.NewDust(currentDustPos, 0, 0, 267, 0f, 0f, 0, dustColor, 1f); - Main.dust[dust].position = currentDustPos; - Main.dust[dust].velocity = spinningpoint.RotatedBy(MathHelper.TwoPi * i / maxHealDustIterations) * value5 * (0.8f + Main.rand.NextFloat() * 0.4f) + Player.velocity; - Main.dust[dust].noGravity = true; - Main.dust[dust].scale = 1f; - Main.dust[dust].fadeIn = Main.rand.NextFloat() * 2f; - Dust dust2 = Dust.CloneDust(dust); - Dust dust3 = dust2; - dust3.scale /= 2f; - dust3 = dust2; - dust3.fadeIn /= 2f; - dust2.color = new Color(255, 255, 255, 255); + int holyDust = Dust.NewDust(currentDustPos, 0, 0, 267, 0f, 0f, 0, dustColor, 1f); + Main.dust[holyDust].position = currentDustPos; + Main.dust[holyDust].velocity = spinningpoint.RotatedBy(MathHelper.TwoPi * i / maxHealDustIterations) * healerDustVel * (0.8f + Main.rand.NextFloat() * 0.4f) + Player.velocity; + Main.dust[holyDust].noGravity = true; + Main.dust[holyDust].scale = 1f; + Main.dust[holyDust].fadeIn = Main.rand.NextFloat() * 2f; + Dust dustClone = Dust.CloneDust(holyDust); + Dust extraDust = dustClone; + extraDust.scale /= 2f; + extraDust = dustClone; + extraDust.fadeIn /= 2f; + dustClone.color = new Color(255, 255, 255, 255); } } } From d5b495a5a976dd8e6f91538fee2716498e66a6d5 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 3 Nov 2023 09:27:16 -0400 Subject: [PATCH 54/95] The Storm resprite With holdout offset too --- Items/Weapons/Ranged/TheStorm.cs | 14 ++++++++++++-- Items/Weapons/Ranged/TheStorm.png | Bin 1226 -> 2334 bytes 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Ranged/TheStorm.cs b/Items/Weapons/Ranged/TheStorm.cs index 48073d36a5..6d19f5283b 100644 --- a/Items/Weapons/Ranged/TheStorm.cs +++ b/Items/Weapons/Ranged/TheStorm.cs @@ -12,12 +12,17 @@ namespace CalamityMod.Items.Weapons.Ranged public class TheStorm : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Ranged"; + + public override void SetStaticDefaults() + { + Main.RegisterItemAnimation(Type, new DrawAnimationVertical(5, 9)); + } public override void SetDefaults() { Item.damage = 35; Item.DamageType = DamageClass.Ranged; - Item.width = 34; - Item.height = 50; + Item.width = 54; + Item.height = 90; Item.useTime = 7; Item.useAnimation = 14; Item.useStyle = ItemUseStyleID.Shoot; @@ -32,6 +37,11 @@ namespace CalamityMod.Items.Weapons.Ranged Item.useAmmo = AmmoID.Arrow; } + public override Vector2? HoldoutOffset() + { + return new Vector2(-10, 0); + } + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { int i = Main.myPlayer; diff --git a/Items/Weapons/Ranged/TheStorm.png b/Items/Weapons/Ranged/TheStorm.png index 813babc1ff69eda0a90a135daefe7d23859a02de..9344fef25d56ba0cedd4abe0b0931697f3e081b4 100644 GIT binary patch literal 2334 zcmZ`*c{r478-E#O8B#QjrLk1X3Exb{lE@%3Uy~@y7)#8QGPXq0baX7)GE(WFK{?sY z(2OiuG8v3R$Tq$y)Wt*wm4s9$a~|JyuJ6C^{o{S!_qmtn_x|qReP3_7tIIKEMNLHr zf|T*jM^Ay(9D-oK$iu+X#(Dd@V3CSCb<7^B8PFDk7cW6v#k$D9YA~g zS{3{i*6R~rT>oV?zTu@a@usACKq8T#)bxSp!sI8(^s40ZnuIwp(lEKvE|yHsZ`|*1 zN@_~-uBeUc_<8$3k{7Rk#=o#oSa=5lc153ZISqmM|9gqL5HBG}o`64U=N?<|p&;YZ zxFy`NaD9jELHujWxETpIDzgabde2BYmt8KB4KnWuiX$1}?~HD%=$bx&8sIE#q1zlW z$z=+{*j?mjDLB<@vB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t=_!4q~cZE2^oq)Ci~@>%0xX!XrCZ z{QK(8h9&?;mLKNTF&c#m(o`cMj}>n|Y5-EhzXCpIb>?%sV1wTS>$z%;0Vw*k%`w!h zj@35;FgG#kXdU%ff?_kkK-Mq#*SP46ybH@lIiiNp9fNU;xa3T<0NMloLavJUwWgeUeWO!r= zfTl2q(*0Ht(`e)&C<2N4>Ui@}=ia}@`DTlPaw9>zleBI>f5G`&S}Pv+$9Oc%4wWt5 zP0eiEp)zhGkEPV)t||hW{gvf*ko__KbJeb2X Date: Fri, 3 Nov 2023 12:32:23 -0400 Subject: [PATCH 55/95] Tiles --- Tiles/Abyss/HardenedSulphurousSandstone.cs | 28 +++++----- Tiles/Abyss/PlantyMush.cs | 28 +++++----- Tiles/Abyss/SulphurousSand.cs | 56 +++++++++---------- Tiles/Abyss/SulphurousSandstone.cs | 28 +++++----- Tiles/Abyss/SulphurousShale.cs | 28 +++++----- Tiles/Abyss/ViperVines.cs | 38 ++++++------- Tiles/AstralBrick.cs | 1 - Tiles/CalamityGlobalTile.cs | 20 +++---- Tiles/FurnitureAshen/AshenAccentSlab.cs | 1 - Tiles/FurnitureAshen/AshenSlab.cs | 1 - Tiles/FurniturePlaguedPlate/PlaguedPlate.cs | 1 - Tiles/FurnitureProfaned/ProfanedRock.cs | 1 - Tiles/FurnitureProfaned/RunicProfanedBrick.cs | 1 - Tiles/FurnitureStratus/StratusBricks.cs | 1 - Tiles/FurnitureVoid/SmoothVoidstone.cs | 1 - Tiles/FurnitureVoid/VoidstoneSlab.cs | 1 - 16 files changed, 113 insertions(+), 122 deletions(-) diff --git a/Tiles/Abyss/HardenedSulphurousSandstone.cs b/Tiles/Abyss/HardenedSulphurousSandstone.cs index 7710a7396f..c8becd91c8 100644 --- a/Tiles/Abyss/HardenedSulphurousSandstone.cs +++ b/Tiles/Abyss/HardenedSulphurousSandstone.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Tiles.Abyss public override void RandomUpdate(int i, int j) { - int num8 = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143)); + int vineLength = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143)); int nearbyVineCount = 0; for (int x = i - 15; x <= i + 15; x++) { @@ -84,29 +84,29 @@ namespace CalamityMod.Tiles.Abyss if (Main.tile[i, j + 1].LiquidAmount == 255 && Main.tile[i, j + 1].LiquidType != LiquidID.Lava) { - bool flag13 = false; - for (int num52 = num8; num52 > num8 - 10; num52--) + bool canGrowVine = false; + for (int k = vineLength; k > vineLength - 10; k--) { - if (CalamityUtils.ParanoidTileRetrieval(i, num52).BottomSlope) + if (CalamityUtils.ParanoidTileRetrieval(i, k).BottomSlope) { - flag13 = false; + canGrowVine = false; break; } - if (Main.tile[i, num52].HasTile && !Main.tile[i, num52].BottomSlope) + if (Main.tile[i, k].HasTile && !Main.tile[i, k].BottomSlope) { - flag13 = true; + canGrowVine = true; break; } } - if (flag13) + if (canGrowVine) { - int num53 = i; - int num54 = j + 1; - Main.tile[num53, num54].TileType = (ushort)ModContent.TileType(); - Main.tile[num53, num54].Get().HasTile = true; - WorldGen.SquareTileFrame(num53, num54, true); + int vineX = i; + int vineY = j + 1; + Main.tile[vineX, vineY].TileType = (ushort)ModContent.TileType(); + Main.tile[vineX, vineY].Get().HasTile = true; + WorldGen.SquareTileFrame(vineX, vineY, true); if (Main.netMode == NetmodeID.Server) - NetMessage.SendTileSquare(-1, num53, num54, 3, TileChangeType.None); + NetMessage.SendTileSquare(-1, vineX, vineY, 3, TileChangeType.None); } } Main.tile[i, j].Get().Slope = SlopeType.Solid; diff --git a/Tiles/Abyss/PlantyMush.cs b/Tiles/Abyss/PlantyMush.cs index d883642617..ee518f5266 100644 --- a/Tiles/Abyss/PlantyMush.cs +++ b/Tiles/Abyss/PlantyMush.cs @@ -162,7 +162,7 @@ namespace CalamityMod.Tiles.Abyss NetMessage.SendTileSquare(-1, i, j - 1, 3, TileChangeType.None); } - int num8 = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143)); + int vineLength = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143)); if (Main.tile[i, j + 1] != null) { if (!Main.tile[i, j + 1].HasTile && Main.tile[i, j + 1].TileType != (ushort)ModContent.TileType()) @@ -171,29 +171,29 @@ namespace CalamityMod.Tiles.Abyss Main.tile[i, j + 1].WallType == (ushort)ModContent.WallType() && Main.tile[i, j + 1].LiquidType != LiquidID.Lava) { - bool flag13 = false; - for (int num52 = num8; num52 > num8 - 10; num52--) + bool canGrowVine = false; + for (int k = vineLength; k > vineLength - 10; k--) { - if (Main.tile[i, num52].BottomSlope) + if (Main.tile[i, k].BottomSlope) { - flag13 = false; + canGrowVine = false; break; } - if (Main.tile[i, num52].HasTile && !Main.tile[i, num52].BottomSlope) + if (Main.tile[i, k].HasTile && !Main.tile[i, k].BottomSlope) { - flag13 = true; + canGrowVine = true; break; } } - if (flag13) + if (canGrowVine) { - int num53 = i; - int num54 = j + 1; - Main.tile[num53, num54].TileType = (ushort)ModContent.TileType(); - Main.tile[num53, num54].Get().HasTile = true; - WorldGen.SquareTileFrame(num53, num54, true); + int vineX = i; + int vineY = j + 1; + Main.tile[vineX, vineY].TileType = (ushort)ModContent.TileType(); + Main.tile[vineX, vineY].Get().HasTile = true; + WorldGen.SquareTileFrame(vineX, vineY, true); if (Main.netMode == NetmodeID.Server) - NetMessage.SendTileSquare(-1, num53, num54, 3, TileChangeType.None); + NetMessage.SendTileSquare(-1, vineX, vineY, 3, TileChangeType.None); } } } diff --git a/Tiles/Abyss/SulphurousSand.cs b/Tiles/Abyss/SulphurousSand.cs index 21129d9a32..5d35963b13 100644 --- a/Tiles/Abyss/SulphurousSand.cs +++ b/Tiles/Abyss/SulphurousSand.cs @@ -74,18 +74,18 @@ namespace CalamityMod.Tiles.Abyss { if (Main.tile[i, tileLocationY].LiquidAmount == 255) { - int num13 = 7; - int num14 = 6; - int num15 = 0; - for (int l = i - num13; l <= i + num13; l++) + int ambientObjectDetectRadius = 7; + int ambientObjectMax = 6; + int ambientObjectAmt = 0; + for (int l = i - ambientObjectDetectRadius; l <= i + ambientObjectDetectRadius; l++) { - for (int m = tileLocationY - num13; m <= tileLocationY + num13; m++) + for (int m = tileLocationY - ambientObjectDetectRadius; m <= tileLocationY + ambientObjectDetectRadius; m++) { if (Main.tile[l, m].HasTile && Main.tile[l, m].TileType == 81) - num15++; + ambientObjectAmt++; } } - if (num15 < num14 && Main.tile[i, tileLocationY - 1].LiquidAmount == 255 && + if (ambientObjectAmt < ambientObjectMax && Main.tile[i, tileLocationY - 1].LiquidAmount == 255 && Main.tile[i, tileLocationY - 2].LiquidAmount == 255 && Main.tile[i, tileLocationY - 3].LiquidAmount == 255 && Main.tile[i, tileLocationY - 4].LiquidAmount == 255) { @@ -96,18 +96,18 @@ namespace CalamityMod.Tiles.Abyss } else if (Main.tile[i, tileLocationY].LiquidAmount == 0) { - int num13 = 7; - int num14 = 6; - int num15 = 0; - for (int l = i - num13; l <= i + num13; l++) + int ambientObjectDetectRadius = 7; + int ambientObjectMax = 6; + int ambientObjectAmt = 0; + for (int l = i - ambientObjectDetectRadius; l <= i + ambientObjectDetectRadius; l++) { - for (int m = tileLocationY - num13; m <= tileLocationY + num13; m++) + for (int m = tileLocationY - ambientObjectDetectRadius; m <= tileLocationY + ambientObjectDetectRadius; m++) { if (Main.tile[l, m].HasTile && Main.tile[l, m].TileType == 324) - num15++; + ambientObjectAmt++; } } - if (num15 < num14) + if (ambientObjectAmt < ambientObjectMax) { WorldGen.PlaceTile(i, tileLocationY, 324, true, false, -1, Main.rand.Next(2)); if (Main.netMode == NetmodeID.Server && Main.tile[i, tileLocationY].HasTile) @@ -119,7 +119,7 @@ namespace CalamityMod.Tiles.Abyss } } - int num8 = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143)); + int vineLength = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143)); int nearbyVineCount = 0; for (int x = i - 15; x <= i + 15; x++) { @@ -143,29 +143,29 @@ namespace CalamityMod.Tiles.Abyss if (Main.tile[i, j + 1].LiquidAmount == 255 && Main.tile[i, j + 1].LiquidType != LiquidID.Lava) { - bool flag13 = false; - for (int num52 = num8; num52 > num8 - 10; num52--) + bool canGrowVine = false; + for (int k = vineLength; k > vineLength - 10; k--) { - if (Main.tile[i, num52].BottomSlope) + if (Main.tile[i, k].BottomSlope) { - flag13 = false; + canGrowVine = false; break; } - if (Main.tile[i, num52].HasTile && !Main.tile[i, num52].BottomSlope) + if (Main.tile[i, k].HasTile && !Main.tile[i, k].BottomSlope) { - flag13 = true; + canGrowVine = true; break; } } - if (flag13) + if (canGrowVine) { - int num53 = i; - int num54 = j + 1; - Main.tile[num53, num54].TileType = (ushort)ModContent.TileType(); - Main.tile[num53, num54].Get().HasTile = true; - WorldGen.SquareTileFrame(num53, num54, true); + int vineX = i; + int vineY = j + 1; + Main.tile[vineX, vineY].TileType = (ushort)ModContent.TileType(); + Main.tile[vineX, vineY].Get().HasTile = true; + WorldGen.SquareTileFrame(vineX, vineY, true); if (Main.netMode == NetmodeID.Server) - NetMessage.SendTileSquare(-1, num53, num54, 3, TileChangeType.None); + NetMessage.SendTileSquare(-1, vineX, vineY, 3, TileChangeType.None); } Main.tile[i, j].Get().Slope = SlopeType.Solid; Main.tile[i, j].Get().IsHalfBlock = false; diff --git a/Tiles/Abyss/SulphurousSandstone.cs b/Tiles/Abyss/SulphurousSandstone.cs index c536be437c..a619209223 100644 --- a/Tiles/Abyss/SulphurousSandstone.cs +++ b/Tiles/Abyss/SulphurousSandstone.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Tiles.Abyss public override void RandomUpdate(int i, int j) { - int num8 = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143)); + int vineLength = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143)); int nearbyVineCount = 0; for (int x = i - 15; x <= i + 15; x++) { @@ -85,29 +85,29 @@ namespace CalamityMod.Tiles.Abyss if (Main.tile[i, j + 1].LiquidAmount == 255 && Main.tile[i, j + 1].LiquidType != LiquidID.Lava) { - bool flag13 = false; - for (int num52 = num8; num52 > num8 - 10; num52--) + bool canGrowVine = false; + for (int k = vineLength; k > vineLength - 10; k--) { - if (Main.tile[i, num52].BottomSlope) + if (Main.tile[i, k].BottomSlope) { - flag13 = false; + canGrowVine = false; break; } - if (Main.tile[i, num52].HasTile && !Main.tile[i, num52].BottomSlope) + if (Main.tile[i, k].HasTile && !Main.tile[i, k].BottomSlope) { - flag13 = true; + canGrowVine = true; break; } } - if (flag13) + if (canGrowVine) { - int num53 = i; - int num54 = j + 1; - Main.tile[num53, num54].TileType = (ushort)ModContent.TileType(); - Main.tile[num53, num54].Get().HasTile = true; - WorldGen.SquareTileFrame(num53, num54, true); + int vineX = i; + int vineY = j + 1; + Main.tile[vineX, vineY].TileType = (ushort)ModContent.TileType(); + Main.tile[vineX, vineY].Get().HasTile = true; + WorldGen.SquareTileFrame(vineX, vineY, true); if (Main.netMode == NetmodeID.Server) - NetMessage.SendTileSquare(-1, num53, num54, 3, TileChangeType.None); + NetMessage.SendTileSquare(-1, vineX, vineY, 3, TileChangeType.None); } Main.tile[i, j].Get().Slope = SlopeType.Solid; Main.tile[i, j].Get().IsHalfBlock = false; diff --git a/Tiles/Abyss/SulphurousShale.cs b/Tiles/Abyss/SulphurousShale.cs index a1558e1156..87887f78e1 100644 --- a/Tiles/Abyss/SulphurousShale.cs +++ b/Tiles/Abyss/SulphurousShale.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Tiles.Abyss public override void RandomUpdate(int i, int j) { - int num8 = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143)); + int vineLength = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143)); int nearbyVineCount = 0; for (int x = i - 15; x <= i + 15; x++) { @@ -77,29 +77,29 @@ namespace CalamityMod.Tiles.Abyss if (Main.tile[i, j + 1].LiquidAmount == 255 && Main.tile[i, j + 1].LiquidType != LiquidID.Lava) { - bool flag13 = false; - for (int num52 = num8; num52 > num8 - 10; num52--) + bool canGrowVine = false; + for (int k = vineLength; k > vineLength - 10; k--) { - if (Main.tile[i, num52].BottomSlope) + if (Main.tile[i, k].BottomSlope) { - flag13 = false; + canGrowVine = false; break; } - if (Main.tile[i, num52].HasTile && !Main.tile[i, num52].BottomSlope) + if (Main.tile[i, k].HasTile && !Main.tile[i, k].BottomSlope) { - flag13 = true; + canGrowVine = true; break; } } - if (flag13) + if (canGrowVine) { - int num53 = i; - int num54 = j + 1; - Main.tile[num53, num54].TileType = (ushort)ModContent.TileType(); - Main.tile[num53, num54].Get().HasTile = true; - WorldGen.SquareTileFrame(num53, num54, true); + int vineX = i; + int vineY = j + 1; + Main.tile[vineX, vineY].TileType = (ushort)ModContent.TileType(); + Main.tile[vineX, vineY].Get().HasTile = true; + WorldGen.SquareTileFrame(vineX, vineY, true); if (Main.netMode == NetmodeID.Server) - NetMessage.SendTileSquare(-1, num53, num54, 3, TileChangeType.None); + NetMessage.SendTileSquare(-1, vineX, vineY, 3, TileChangeType.None); } Main.tile[i, j].Get().Slope = SlopeType.Solid; Main.tile[i, j].Get().IsHalfBlock = false; diff --git a/Tiles/Abyss/ViperVines.cs b/Tiles/Abyss/ViperVines.cs index 318b6590f7..3f491fe5fe 100644 --- a/Tiles/Abyss/ViperVines.cs +++ b/Tiles/Abyss/ViperVines.cs @@ -67,36 +67,36 @@ namespace CalamityMod.Tiles.Abyss { if (Main.tile[i, j + 1].LiquidAmount >= 128 && Main.tile[i, j + 1].LiquidType != LiquidID.Lava) { - bool flag13 = false; - for (int num52 = j; num52 > j - 10; j--) + bool canGrowVine = false; + for (int k = j; k > j - 10; j--) { - if (Main.tile[i, num52].BottomSlope) + if (Main.tile[i, k].BottomSlope) { - flag13 = false; + canGrowVine = false; break; } - if (Main.tile[i, num52].HasTile && !Main.tile[i, num52].BottomSlope) + if (Main.tile[i, k].HasTile && !Main.tile[i, k].BottomSlope) { - flag13 = true; + canGrowVine = true; break; } } - if (flag13) + if (canGrowVine) { - int num53 = i; - int num54 = j + 1; - Main.tile[num53, num54].TileType = (ushort)ModContent.TileType(); - Main.tile[num53, num54].TileFrameX = (short)(WorldGen.genRand.Next(8) * 18); - Main.tile[num53, num54].TileFrameY = (short)(4 * 18); - Main.tile[num53, num54 - 1].TileFrameX = (short)(WorldGen.genRand.Next(12) * 18); - Main.tile[num53, num54 - 1].TileFrameY = (short)(WorldGen.genRand.Next(4) * 18); - Main.tile[num53, num54].Get().HasTile = true; - WorldGen.SquareTileFrame(num53, num54, true); - WorldGen.SquareTileFrame(num53, num54 - 1, true); + int vineX = i; + int vineY = j + 1; + Main.tile[vineX, vineY].TileType = (ushort)ModContent.TileType(); + Main.tile[vineX, vineY].TileFrameX = (short)(WorldGen.genRand.Next(8) * 18); + Main.tile[vineX, vineY].TileFrameY = (short)(4 * 18); + Main.tile[vineX, vineY - 1].TileFrameX = (short)(WorldGen.genRand.Next(12) * 18); + Main.tile[vineX, vineY - 1].TileFrameY = (short)(WorldGen.genRand.Next(4) * 18); + Main.tile[vineX, vineY].Get().HasTile = true; + WorldGen.SquareTileFrame(vineX, vineY, true); + WorldGen.SquareTileFrame(vineX, vineY - 1, true); if (Main.netMode == NetmodeID.Server) { - NetMessage.SendTileSquare(-1, num53, num54, 3, TileChangeType.None); - NetMessage.SendTileSquare(-1, num53, num54 - 1, 3, TileChangeType.None); + NetMessage.SendTileSquare(-1, vineX, vineY, 3, TileChangeType.None); + NetMessage.SendTileSquare(-1, vineX, vineY - 1, 3, TileChangeType.None); } } } diff --git a/Tiles/AstralBrick.cs b/Tiles/AstralBrick.cs index af42d9246f..5c2f42bb3f 100644 --- a/Tiles/AstralBrick.cs +++ b/Tiles/AstralBrick.cs @@ -62,7 +62,6 @@ namespace CalamityMod.Tiles Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; Color drawColour = GetDrawColour(i, j, new Color(50, 50, 50, 50)); Tile trackTile = Main.tile[i, j]; - double num6 = Main.time * 0.08; TileFraming.SlopedGlowmask(i, j, 0, glowmask, drawOffset, null, GetDrawColour(i, j, drawColour), default); diff --git a/Tiles/CalamityGlobalTile.cs b/Tiles/CalamityGlobalTile.cs index 0ccb6b579b..66982b5582 100644 --- a/Tiles/CalamityGlobalTile.cs +++ b/Tiles/CalamityGlobalTile.cs @@ -383,8 +383,8 @@ namespace CalamityMod.Tiles foreach (Item item in itemDrops) { item.Prefix(-1); // You're twisted if you have a prefixable item inside ores but fuck it - int num = Item.NewItem(source, pos, item); - Main.item[num].TryCombiningIntoNearbyItems(num); + int moddedOre = Item.NewItem(source, pos, item); + Main.item[moddedOre].TryCombiningIntoNearbyItems(moddedOre); } } else // Fetch normal tile-item relationships (all vanilla ores are normal thankfully) @@ -476,19 +476,19 @@ namespace CalamityMod.Tiles return; } - int num = tileSafely.TileFrameX / 22; - int num2 = tileSafely.TileFrameY / 22; - if (num == 3 && num2 <= 2) + int treeTileX = tileSafely.TileFrameX / 22; + int treeTileY = tileSafely.TileFrameY / 22; + if (treeTileX == 3 && treeTileY <= 2) x++; - else if (num == 4 && num2 >= 3 && num2 <= 5) + else if (treeTileX == 4 && treeTileY >= 3 && treeTileY <= 5) x--; - else if (num == 1 && num2 >= 6 && num2 <= 8) + else if (treeTileX == 1 && treeTileY >= 6 && treeTileY <= 8) x--; - else if (num == 2 && num2 >= 6 && num2 <= 8) + else if (treeTileX == 2 && treeTileY >= 6 && treeTileY <= 8) x++; - else if (num == 2 && num2 >= 9) + else if (treeTileX == 2 && treeTileY >= 9) x++; - else if (num == 3 && num2 >= 9) + else if (treeTileX == 3 && treeTileY >= 9) x--; tileSafely = Framing.GetTileSafely(x, y); diff --git a/Tiles/FurnitureAshen/AshenAccentSlab.cs b/Tiles/FurnitureAshen/AshenAccentSlab.cs index 5b213032b4..3c49bc54f5 100644 --- a/Tiles/FurnitureAshen/AshenAccentSlab.cs +++ b/Tiles/FurnitureAshen/AshenAccentSlab.cs @@ -514,7 +514,6 @@ namespace CalamityMod.Tiles.FurnitureAshen Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAshen/AshenSlabGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(64, 64, 64, 64)); Tile trackTile = Main.tile[i, j]; - double num6 = Main.time * 0.08; if (!trackTile.IsHalfBlock && trackTile.Slope == 0) { Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xDrawPos, yDrawPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/FurnitureAshen/AshenSlab.cs b/Tiles/FurnitureAshen/AshenSlab.cs index 9c3713b9fd..21e695cc16 100644 --- a/Tiles/FurnitureAshen/AshenSlab.cs +++ b/Tiles/FurnitureAshen/AshenSlab.cs @@ -514,7 +514,6 @@ namespace CalamityMod.Tiles.FurnitureAshen Texture2D glowmask = ModContent.Request("CalamityMod/Tiles/FurnitureAshen/AshenSlabGlow").Value; Color drawColour = GetDrawColour(i, j, new Color(64, 64, 64, 64)); Tile trackTile = Main.tile[i, j]; - double num6 = Main.time * 0.08; if (!trackTile.IsHalfBlock && trackTile.Slope == 0) { Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xDrawPos, yDrawPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); diff --git a/Tiles/FurniturePlaguedPlate/PlaguedPlate.cs b/Tiles/FurniturePlaguedPlate/PlaguedPlate.cs index 9e26729104..22bb415dbe 100644 --- a/Tiles/FurniturePlaguedPlate/PlaguedPlate.cs +++ b/Tiles/FurniturePlaguedPlate/PlaguedPlate.cs @@ -43,7 +43,6 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; Color drawColour = GetDrawColour(i, j, new Color(128, 128, 128, 128)); Tile trackTile = Main.tile[i, j]; - double num6 = Main.time * 0.08; TileFraming.SlopedGlowmask(i, j, 0, glowmask, drawOffset, null, GetDrawColour(i, j, drawColour), default); } diff --git a/Tiles/FurnitureProfaned/ProfanedRock.cs b/Tiles/FurnitureProfaned/ProfanedRock.cs index e955be3677..5ee5413580 100644 --- a/Tiles/FurnitureProfaned/ProfanedRock.cs +++ b/Tiles/FurnitureProfaned/ProfanedRock.cs @@ -222,7 +222,6 @@ namespace CalamityMod.Tiles.FurnitureProfaned Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; Color drawColour = GetDrawColour(i, j, new Color(25, 25, 25, 25)); Tile trackTile = Main.tile[i, j]; - double num6 = Main.time * 0.08; TileFraming.SlopedGlowmask(i, j, 0, glowmask, drawOffset, null, GetDrawColour(i, j, drawColour), default); } diff --git a/Tiles/FurnitureProfaned/RunicProfanedBrick.cs b/Tiles/FurnitureProfaned/RunicProfanedBrick.cs index f861257602..c19ece8e26 100644 --- a/Tiles/FurnitureProfaned/RunicProfanedBrick.cs +++ b/Tiles/FurnitureProfaned/RunicProfanedBrick.cs @@ -54,7 +54,6 @@ namespace CalamityMod.Tiles.FurnitureProfaned Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; Color drawColour = GetDrawColour(i, j, new Color(128, 128, 128, 128)); Tile trackTile = Main.tile[i, j]; - double num6 = Main.time * 0.08; TileFraming.SlopedGlowmask(i, j, 0, glowmask, drawOffset, null, GetDrawColour(i, j, drawColour), default); } diff --git a/Tiles/FurnitureStratus/StratusBricks.cs b/Tiles/FurnitureStratus/StratusBricks.cs index 27a94841bb..93062b4dc7 100644 --- a/Tiles/FurnitureStratus/StratusBricks.cs +++ b/Tiles/FurnitureStratus/StratusBricks.cs @@ -43,7 +43,6 @@ namespace CalamityMod.Tiles.FurnitureStratus Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; Tile trackTile = Main.tile[i, j]; - double num6 = Main.time * 0.08; TileFraming.SlopedGlowmask(i, j, 0, glowmask, drawOffset, null, GetDrawColour(i, j, drawColour), default); } diff --git a/Tiles/FurnitureVoid/SmoothVoidstone.cs b/Tiles/FurnitureVoid/SmoothVoidstone.cs index 09c3a0cba8..0f58958ee4 100644 --- a/Tiles/FurnitureVoid/SmoothVoidstone.cs +++ b/Tiles/FurnitureVoid/SmoothVoidstone.cs @@ -228,7 +228,6 @@ namespace CalamityMod.Tiles.FurnitureVoid brightness *= (float)MathF.Sin(i * 18f + declareThisHereToPreventRunningTheSameCalculationMultipleTimes); brightness *= (float)MathF.Sin(j * 18f + declareThisHereToPreventRunningTheSameCalculationMultipleTimes); drawColour *= brightness; - double num6 = Main.time * 0.08; TileFraming.SlopedGlowmask(i, j, 0, glowmask, drawOffset, null, GetDrawColour(i, j, drawColour), default); } diff --git a/Tiles/FurnitureVoid/VoidstoneSlab.cs b/Tiles/FurnitureVoid/VoidstoneSlab.cs index 3e104ec428..a225d5eb71 100644 --- a/Tiles/FurnitureVoid/VoidstoneSlab.cs +++ b/Tiles/FurnitureVoid/VoidstoneSlab.cs @@ -159,7 +159,6 @@ namespace CalamityMod.Tiles.FurnitureVoid Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + zero; Color drawColour = GetDrawColour(i, j, new Color(75, 75, 75, 75)); Tile trackTile = Main.tile[i, j]; - double num6 = Main.time * 0.08; if (!trackTile.IsHalfBlock && trackTile.Slope == 0) { Main.spriteBatch.Draw(glowmask, drawOffset, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), drawColour, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); From 39dd45a98cd3c6c202521bebfd8c69d559e644ce Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 3 Nov 2023 15:44:18 -0400 Subject: [PATCH 56/95] 1 - Added multiple donor names for NPCs 2 - Added support to rename Santa Claus 3 - Replaced a large amount of old Discord tags with new ones --- NPCs/CalamityGlobalTownNPC.cs | 118 ++++++++++++++++++---------------- 1 file changed, 63 insertions(+), 55 deletions(-) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 62780c8741..9c7039f3fc 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -59,7 +59,6 @@ namespace CalamityMod.NPCs public static int TaxesToCollectLimit => (int)(Item.buyPrice(0, 50, 0, 0) * TaxYieldFactor); - // TODO -- Update all Discord tags here to new Discord usernames. #region Town NPC Patreon Name Sets private static readonly string[] AnglerNames = { @@ -70,18 +69,18 @@ namespace CalamityMod.NPCs { "Drifter", "Finchi", - "Heniek", // <@!363404700445442050> (Kazurgundu#3791) + "Heniek", // <@!363404700445442050> (kazurgundu) "Fire", // <@!354362326947856384> (fire#0692) - "Barney Calhoun", // <@!634462901431697410> (Potato Power#6578) + "Barney Calhoun", // <@!634462901431697410> (potatostego) "XiaoEn0426", // <@!440448864772816896> (XiaoEn0426#9157) "Jeffred", // <@!295362230038560768> (Knight Solaire#0873) - "The Cooler Arthur", // <@!568263512523014154> (better artilery#0001) - "Markie", // <@!291141964039061504> (Markie#6969) + "The Cooler Arthur", // <@!568263512523014154> (gokuartillery) + "Markie", // <@!291141964039061504> (markie_) }; private static readonly string[] ClothierNames = { "Joeseph Jostar", - "Storm Havik", //<@!1013452363178197072> (fishnotduck) + "Storm Havik", // <@!1013452363178197072> (fishnotduck) }; private static readonly string[] CyborgNames = { @@ -89,13 +88,13 @@ namespace CalamityMod.NPCs }; private static readonly string[] DemolitionistNames = { - "Tavish DeGroot", // <@!442447226992721930> (Magicoal#2655) + "Tavish DeGroot", // <@!442447226992721930> (magicoal) }; private static readonly string[] DryadNames = { "Rythmi", "Izuna", - "Jasmine", // <@!430532867479699456> (phantasmagoria#6777) + "Jasmine", // <@!430532867479699456> (phantasmagoria.) "Cybil", // <@!486507232666845185> (Captain Doofus#????) "Ruth", // <@!1001307586068492388> (Briny_Coffee#4393) }; @@ -104,12 +103,12 @@ namespace CalamityMod.NPCs { "Verth", "Gormer", // <@!287651204924833795> (Picasso's Bean#2819 -- RIP) - "TingFlarg", // <@!185605031716847616> (Smug#7160) + "TingFlarg", // <@!185605031716847616> (smugggo) "Driser", // <@!121996994406252544> (Driser#8630) - "Eddie Spaghetti", // <@!466397267407011841> (Eddie Spaghetti#0002) - "G'tok", // <@!335192200956608535> (gtoktas#7589) + "Eddie Spaghetti", // <@!466397267407011841> (nathansfriend) + "G'tok", // <@!335192200956608535> (gtoktas) "Katto", // <@!175972165504466944> (Katto#2858) - "Him", // <@!931019614958256139> (@himtheguy1) + "Him", // <@!931019614958256139> (himtheguy1) "Tooshiboots", // <@!333532730593771522> (ulmod) "Neesh", // <@!175803493464932352> (xjetty) }; @@ -122,12 +121,12 @@ namespace CalamityMod.NPCs "Necroplasmic", "Devin", "Woffle", // <@!185980979427540992> (Chipbeam#2268) - "Cameron", // <@!340401981711712258> (CammyWammy#8634) - "Wilbur", // <@!295171926324805634> (ChaosChaos#5979) - "Good Game Design", // <@!564267767042277385> (Dominic Karma#7777) + "Cameron", // <@!340401981711712258> (cammywammy.) + "Wilbur", // <@!295171926324805634> (all_imperfect_chaos) + "Good Game Design", // <@!564267767042277385> (dominickarma) "Danmaku", // <@!756259562268524555> (Danmaku#2659) "Grylken", // <@!299970404435361802> (Grylken#1569) - "Outlaw", // <@!918311619480657922> (TheChosenOutlaw#8746) + "Outlaw", // <@!918311619480657922> (thechosenoutlaw) "Alfred Rend", // <@!606301806481375255> (Deadsqurp300#0907) "Leeman", // <@!281999243168841728> (Tweee#5831) "Mihai", // <@!373941893467209730> (cmihaii.) @@ -136,23 +135,23 @@ namespace CalamityMod.NPCs private static readonly string[] MechanicNames = { "Lilly", - "Daawn", // <@!206162323541458944> (Daawnily#3859) + "Daawn", // <@!206162323541458944> (daawnily) "Robin", // <@!654737510030639112> (Altzeus#8687) - "Curly", // <@!673092101780668416> (Curly~Brace#4830) + "Curly", // <@!673092101780668416> (curly4830) }; private static readonly string[] MerchantNames = { - "Morshu", // <@!194931581826236416> (Uberransy#6969) + "Morshu", // <@!194931581826236416> (uberransy) }; private static readonly string[] NurseNames = { "Farsni", - "Fanny", // <@!799749125720637460> (zombiewolf511#4581) - "Mausi", // <@!194156349347594241> (Sadouken | Daniel#3996) + "Fanny", // <@!799749125720637460> (zombiewolf511) + "Mausi", // <@!194156349347594241> (sadouken) }; private static readonly string[] PainterNames = { - "Picasso", // <@!353316526306361347> (SCONICBOOM#2164 -- for the late Picasso's Bean#2819) + "Picasso", // <@!353316526306361347> (sconicboom -- for the late Picasso's Bean#2819) }; private static readonly string[] PartyGirlNames = { @@ -161,21 +160,27 @@ namespace CalamityMod.NPCs private static readonly string[] PirateNames = { "Tyler Van Hook", - "Cap'n Deek", // "Alex N" on Patreon - "Captain Billy Bones", // <@!699589229507772416> (DjackV#2882) + "Cap'n Deek", // "Alex N" on Patreon (No discord account) + "Captain Billy Bones", // <@!699589229507772416> (djackv) "Captain J. Crackers", // <@!233232602994049024> (Qyuuno#3031) }; private static readonly string[] PrincessNames = { - "Catalyst", // <@!156672312425316352> (xAqult#1122) - "Nyapano", // <@!120976656826368003> (Emi - Nyapano She/Her#4040) - "Jade", // <@!187395834625785869> (VeryMasterNinja#7728) - "Nyavi Aceso", // <@!270260920888852480> (Navigator#8739) + "Catalyst", // <@!156672312425316352> (xaqult) + "Nyapano", // <@!120976656826368003> (nyapano) + "Jade", // <@!187395834625785869> (verymasterninja) + "Nyavi Aceso", // <@!270260920888852480> (navigator.) + "everquartz", // <@!451343554451865611> (everquartz) + "Gwynevere", // <@!142752927348424704> (nuclearchaosazathoth) + }; + private static readonly string[] SantaClausNames = + { + "Jank", // <@!339950757472239616> (jankle_) }; private static readonly string[] SkeletonMerchantNames = { - "Sans Undertale", // <@!145379091648872450> (Shayy#5257) - "Papyrus Undertale", // <@!262663471189983242> (Nycro#0001) + "Sans Undertale", // <@!145379091648872450> (shayy) + "Papyrus Undertale", // <@!262663471189983242> (nycro) }; private static readonly string[] SteampunkerNames = { @@ -184,15 +189,15 @@ namespace CalamityMod.NPCs }; private static readonly string[] StylistNames = { - "Amber", // <@!114677116473180169> (Mishiro Usui#1295) - "Faith", // <@!509050283871961123> (Toasty#1007) - "Xsiana", // <@!625780237489143839> (xiana.#0015) + "Amber", // <@!114677116473180169> (mishirousui) + "Faith", // <@!509050283871961123> (toasty1007) + "Xsiana", // <@!625780237489143839> (lokistic) }; private static readonly string[] TavernkeepNames = { - "Tim Lockwood", // <@!605839945483026434> (Deimelo#0001) - "Sir Samuel Winchester Jenkins Kester II", // <@!107659695749070848> (Ryaegos#1661) - "Brutus", // <@!591889650692521984> (Brutus#4337) + "Tim Lockwood", // <@!605839945483026434> (pomvoid) + "Sir Samuel Winchester Jenkins Kester II", // <@!107659695749070848> (ryaegos) + "Brutus", // <@!591889650692521984> (.brutus._) "Sloth", // <@!486265327387279391> (BossyPunch#4983) }; private static readonly string[] TaxCollectorNames = @@ -202,7 +207,7 @@ namespace CalamityMod.NPCs private static readonly string[] TravelingMerchantNames = { "Stan Pines", - "Slap Battles", // <@!923504188615450654> (Conquestor#9009) + "Slap Battles", // <@!923504188615450654> (gravityglider.) }; private static readonly string[] TruffleNames = { @@ -212,26 +217,26 @@ namespace CalamityMod.NPCs { "Sok'ar", "Toxin", // <@!348174404984766465> (Toxin#9598), - "Mixcoatl", // <@!284775927294984203> (SharZz#7777) - "Khatunz", // <@!303022375191183360> (jackshiz#7839) - "Amnesia Wapers", // <@!326821498323075073> (Retarded Advice from a Retard#6969) + "Mixcoatl", // <@!284775927294984203> (.sharzz) + "Khatunz", // <@!303022375191183360> (jackshiz) + "Amnesia Wapers", // <@!326821498323075073> (retardedadvicefromaretard) }; private static readonly string[] WizardNames = { - "Mage One-Trick", // <@!340996105460514816> (pixlgray) - going of off memory on this one + "Mage One-Trick", // <@!340996105460514816> (pixlgray) "Inorim, son of Ivukey", "Jensen", - "Merasmus", // <@!288066987819663360> (Spider pee pee#3328) + "Merasmus", // <@!288066987819663360> (spiderprovidence) "Habolo", // <@!163028025494077441> (ChristmasGoat#7810) - "Ortho", // <@!264984390910738432> (Worcuus#5225) - "Chris Tallballs", // <@!770211589076418571> (Bewearium#1111) - "Syethas", // <@!325413275066171393> (CosmicStarIight#4430) + "Ortho", // <@!264984390910738432> (worcuus) + "Chris Tallballs", // <@!770211589076418571> (bewearium) + "Syethas", // <@!325413275066171393> (cosmicstariight) "Nextdoor Psycho", // <@!173261518572486656> (⋈-NextdoorPsycho-⋈#0001) }; private static readonly string[] ZoologistNames = { "Kiriku", // <@!395312478160027668> (rulosss#6814) - "Lacuna", // <@!790746689211203604> (Lacuna#8629) + "Lacuna", // <@!790746689211203604> (_lacuna_) "Mae Borowski", //<@!219158690433990656> (justakkolite) }; @@ -247,19 +252,19 @@ namespace CalamityMod.NPCs private const int TownDogHuskyVanillaNames = 16; private static readonly string[] TownDogNames = { - "Ozymandias", // <@!146333264871686145> (Ozzatron#0001) + "Ozymandias", // <@!146333264871686145> (ozzatron) }; private static readonly string[] TownDogLabradorNames = { - "Riley", // <@!260875558592708619> (potion pal#9979) + "Riley", // <@!260875558592708619> (potionpal) }; private static readonly string[] TownDogPitBullNames = { - "Splinter", // <@!320320801213775873> (Kaimonick#1738) + "Splinter", // <@!320320801213775873> (kaimonick) }; private static readonly string[] TownDogBeagleNames = { - "Kendra", // <@!237247188005158912> (LordMetarex#6407) + "Kendra", // <@!237247188005158912> (lordmetarex) }; private static readonly string[] TownDogCorgiNames = null; private static readonly string[] TownDogDalmatianNames = null; @@ -276,21 +281,21 @@ namespace CalamityMod.NPCs private const int TownCatWhiteVanillaNames = 15; private static readonly string[] TownCatNames = { - "Smoogle", // <@!709968379334623274> (smoogle#5672) + "Smoogle", // <@!709968379334623274> (smooglin) "The Meowurer of Gods", // <@!385949114271268864> (GP#7876) - "Katsafaros", // <@!190595401328492544> (NavyGuy#2650) + "Katsafaros", // <@!190595401328492544> (gr_mm) "Lucerne", // <@!271954788676141066> (lord_lucerne) "Milo", // <@!401849201597874179> (maskedmilo) - "Octo", // <@!796112889353994281> (OctolingGrimm#8888) + "Octo", // <@!796112889353994281> (octolinggrimm) }; private static readonly string[] TownCatSiameseNames = null; private static readonly string[] TownCatBlackNames = { - "Bear", // <@!183424826407518208> (Lilac Vrt Olligoci#5585) + "Bear", // <@!183424826407518208> (lilac_vrt_olligoci) }; private static readonly string[] TownCatOrangeTabbyNames = { - "Felix" // <@!183424826407518208> (Lilac Vrt Olligoci#5585) + "Felix" // <@!183424826407518208> (lilac_vrt_olligoci) }; private static readonly string[] TownCatRussianBlueNames = null; private static readonly string[] TownCatSilverNames = null; @@ -506,6 +511,9 @@ namespace CalamityMod.NPCs case NPCID.Princess: AddNewNames(nameList, PrincessNames); break; + case NPCID.SantaClaus: + AddNewNames(nameList, SantaClausNames); + break; case NPCID.SkeletonMerchant: AddNewNames(nameList, SkeletonMerchantNames); break; From 470d7bd7c788031f33f780606fc5e209661d30ac Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 3 Nov 2023 23:54:41 -0400 Subject: [PATCH 57/95] HauntedDishes --- Projectiles/Summon/HauntedDishes.cs | 298 ++++++++++++++-------------- 1 file changed, 147 insertions(+), 151 deletions(-) diff --git a/Projectiles/Summon/HauntedDishes.cs b/Projectiles/Summon/HauntedDishes.cs index 35ddc8de60..8660460405 100644 --- a/Projectiles/Summon/HauntedDishes.cs +++ b/Projectiles/Summon/HauntedDishes.cs @@ -69,10 +69,10 @@ namespace CalamityMod.Projectiles.Summon Projectile.timeLeft = 2; } } - bool flag1 = false; - bool flag2 = false; - bool flag3 = false; - bool flag4 = false; + bool minionMovingLeft = false; + bool minionMovingRight = false; + bool minionBelowPlayer = false; + bool minionShouldJump = false; if (Projectile.lavaWet) { Projectile.ai[0] = 1f; @@ -80,9 +80,9 @@ namespace CalamityMod.Projectiles.Summon } int idlePos = 40 * (Projectile.minionPos + 1) * player.direction; if (player.position.X + (float) (player.width / 2) < Projectile.position.X + (float) (Projectile.width / 2) - 10f + (float) idlePos) - flag1 = true; + minionMovingLeft = true; else if (player.position.X + (float) (player.width / 2) > Projectile.position.X + (float) (Projectile.width / 2) + 10f + (float) idlePos) - flag2 = true; + minionMovingRight = true; if (Projectile.ai[1] == 0f) { @@ -90,9 +90,9 @@ namespace CalamityMod.Projectiles.Summon conflict1 += 40 * Projectile.minionPos; if (Projectile.localAI[0] > 0f) conflict1 += 500; - Vector2 vector2 = new Vector2(Projectile.position.X + (float) Projectile.width * 0.5f, Projectile.position.Y + (float) Projectile.height * 0.5f); - float playerX = player.position.X + (float) (player.width / 2) - vector2.X; - float playerY = player.position.Y + (float) (player.height / 2) - vector2.Y; + Vector2 idleMinionPos = new Vector2(Projectile.position.X + (float) Projectile.width * 0.5f, Projectile.position.Y + (float) Projectile.height * 0.5f); + float playerX = player.position.X + (float) (player.width / 2) - idleMinionPos.X; + float playerY = player.position.Y + (float) (player.height / 2) - idleMinionPos.Y; float playerDist = (float)Math.Sqrt(playerX * playerX + playerY * playerY); if (playerDist > 1500f) { @@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.tileCollide = false; float npcDetectRange = 1200f; bool npcFound = false; - int num6 = -1; + int targetIndex = -1; for (int index = 0; index < Main.maxNPCs; ++index) { NPC npc2 = Main.npc[index]; @@ -121,7 +121,7 @@ namespace CalamityMod.Projectiles.Summon if (npcDist < npcDetectRange) { if (Collision.CanHit(Projectile.position, Projectile.width, Projectile.height, npc2.position, npc2.width, npc2.height)) - num6 = index; + targetIndex = index; npcFound = true; break; } @@ -129,22 +129,22 @@ namespace CalamityMod.Projectiles.Summon } //return to normal if npc found - if (npcFound && num6 >= 0) + if (npcFound && targetIndex >= 0) Projectile.ai[0] = 0f; - Vector2 vector2 = new Vector2(Projectile.position.X + (float) Projectile.width * 0.5f, Projectile.position.Y + (float) Projectile.height * 0.5f); - float xDist = player.position.X + (float) (player.width / 2) - vector2.X; + Vector2 returningMinionPos = new Vector2(Projectile.position.X + (float) Projectile.width * 0.5f, Projectile.position.Y + (float) Projectile.height * 0.5f); + float xDist = player.position.X + (float) (player.width / 2) - returningMinionPos.X; xDist -= (float) (40 * player.direction); if (!npcFound) xDist -= (float) (40 * Projectile.minionPos * player.direction); - float yDist = player.position.Y + (float) (player.height / 2) - vector2.Y; + float yDist = player.position.Y + (float) (player.height / 2) - returningMinionPos.Y; yDist -= 60f; float playerDist2 = (float) Math.Sqrt(xDist * xDist + yDist * yDist); - float num11 = 12f; - float num12 = playerDist2; - float conflict2 = 0.4f; - if (num11 < Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y)) - num11 = Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y); + float currentReturnSpeed = 12f; + float minionReturnSpeed = playerDist2; + float minionReturnAccel = 0.4f; + if (currentReturnSpeed < Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y)) + currentReturnSpeed = Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y); //if close enough to the player and has tile to stand on, return to normal if (playerDist2 < 100f && player.velocity.Y == 0f && (Projectile.position.Y + (float) Projectile.height <= player.position.Y + (float) player.height && !Collision.SolidCollision(Projectile.position, Projectile.width, Projectile.height))) @@ -165,52 +165,52 @@ namespace CalamityMod.Projectiles.Summon { Projectile.velocity *= 0.99f; } - conflict2 = 0.01f; + minionReturnAccel = 0.01f; } else { if (playerDist2 < 100f) { - conflict2 = 0.1f; + minionReturnAccel = 0.1f; } if (playerDist2 > 300f) { - conflict2 = 1f; + minionReturnAccel = 1f; } - playerDist2 = num12 / playerDist2; + playerDist2 = minionReturnSpeed / playerDist2; xDist *= playerDist2; yDist *= playerDist2; } if (Projectile.velocity.X < xDist) { - Projectile.velocity.X = Projectile.velocity.X + conflict2; - if (conflict2 > 0.05f && Projectile.velocity.X < 0f) + Projectile.velocity.X = Projectile.velocity.X + minionReturnAccel; + if (minionReturnAccel > 0.05f && Projectile.velocity.X < 0f) { - Projectile.velocity.X = Projectile.velocity.X + conflict2; + Projectile.velocity.X = Projectile.velocity.X + minionReturnAccel; } } if (Projectile.velocity.X > xDist) { - Projectile.velocity.X = Projectile.velocity.X - conflict2; - if (conflict2 > 0.05f && Projectile.velocity.X > 0f) + Projectile.velocity.X = Projectile.velocity.X - minionReturnAccel; + if (minionReturnAccel > 0.05f && Projectile.velocity.X > 0f) { - Projectile.velocity.X = Projectile.velocity.X - conflict2; + Projectile.velocity.X = Projectile.velocity.X - minionReturnAccel; } } if (Projectile.velocity.Y < yDist) { - Projectile.velocity.Y = Projectile.velocity.Y + conflict2; - if (conflict2> 0.05f && Projectile.velocity.Y < 0f) + Projectile.velocity.Y = Projectile.velocity.Y + minionReturnAccel; + if (minionReturnAccel> 0.05f && Projectile.velocity.Y < 0f) { - Projectile.velocity.Y = Projectile.velocity.Y + conflict2 * 2f; + Projectile.velocity.Y = Projectile.velocity.Y + minionReturnAccel * 2f; } } if (Projectile.velocity.Y > yDist) { - Projectile.velocity.Y = Projectile.velocity.Y - conflict2; - if (conflict2 > 0.05f && Projectile.velocity.Y > 0f) + Projectile.velocity.Y = Projectile.velocity.Y - minionReturnAccel; + if (minionReturnAccel > 0.05f && Projectile.velocity.Y > 0f) { - Projectile.velocity.Y = Projectile.velocity.Y - conflict2 * 2f; + Projectile.velocity.Y = Projectile.velocity.Y - minionReturnAccel * 2f; } } if (Projectile.frame < 15) @@ -238,9 +238,8 @@ namespace CalamityMod.Projectiles.Summon } else { - float conflict3 = (float) (40 * Projectile.minionPos); + float exaggeratedMinionPos = (float) (40 * Projectile.minionPos); float attackCooldown = 30f; - int num4 = 60; --Projectile.localAI[0]; if (Projectile.localAI[0] < 0f) Projectile.localAI[0] = 0f; @@ -250,113 +249,113 @@ namespace CalamityMod.Projectiles.Summon } else { - float num5 = Projectile.position.X; - float num6 = Projectile.position.Y; - float num7 = 100000f; - float num8 = num7; - int num9 = -1; + float minionXTarget = Projectile.position.X; + float minionYTarget = Projectile.position.Y; + float minionAttackMaxDist = 100000f; + float minionAttackDistance = minionAttackMaxDist; + int minionAttackIndex = -1; NPC minionAttackTargetNpc = Projectile.OwnerMinionAttackTargetNPC; if (minionAttackTargetNpc != null && minionAttackTargetNpc.CanBeChasedBy((object) Projectile, false)) { - float num10 = minionAttackTargetNpc.position.X + (float) (minionAttackTargetNpc.width / 2); - float num11 = minionAttackTargetNpc.position.Y + (float) (minionAttackTargetNpc.height / 2); - float num12 = Math.Abs(Projectile.position.X + (float) (Projectile.width / 2) - num10) + Math.Abs(Projectile.position.Y + (float) (Projectile.height / 2) - num11); - if (num12 < num7) + float minionTargetXDist = minionAttackTargetNpc.position.X + (float) (minionAttackTargetNpc.width / 2); + float minionTargetYDist = minionAttackTargetNpc.position.Y + (float) (minionAttackTargetNpc.height / 2); + float minionTargetDist = Math.Abs(Projectile.position.X + (float) (Projectile.width / 2) - minionTargetXDist) + Math.Abs(Projectile.position.Y + (float) (Projectile.height / 2) - minionTargetYDist); + if (minionTargetDist < minionAttackMaxDist) { - if (num9 == -1 && num12 <= num8) + if (minionAttackIndex == -1 && minionTargetDist <= minionAttackDistance) { - num8 = num12; - num5 = num10; - num6 = num11; + minionAttackDistance = minionTargetDist; + minionXTarget = minionTargetXDist; + minionYTarget = minionTargetYDist; } if (Collision.CanHit(Projectile.position, Projectile.width, Projectile.height, minionAttackTargetNpc.position, minionAttackTargetNpc.width, minionAttackTargetNpc.height)) { - num7 = num12; - num5 = num10; - num6 = num11; - num9 = minionAttackTargetNpc.whoAmI; + minionAttackMaxDist = minionTargetDist; + minionXTarget = minionTargetXDist; + minionYTarget = minionTargetYDist; + minionAttackIndex = minionAttackTargetNpc.whoAmI; } } } - if (num9 == -1) + if (minionAttackIndex == -1) { for (int index = 0; index < Main.maxNPCs; ++index) { if (Main.npc[index].CanBeChasedBy((object) Projectile, false)) { - float num10 = Main.npc[index].position.X + (float) (Main.npc[index].width / 2); - float num11 = Main.npc[index].position.Y + (float) (Main.npc[index].height / 2); - float num12 = Math.Abs(Projectile.position.X + (float) (Projectile.width / 2) - num10) + Math.Abs(Projectile.position.Y + (float) (Projectile.height / 2) - num11); - if (num12 < num7) + float minionTargetXDist = Main.npc[index].position.X + (float) (Main.npc[index].width / 2); + float minionTargetYDist = Main.npc[index].position.Y + (float) (Main.npc[index].height / 2); + float minionTargetDist = Math.Abs(Projectile.position.X + (float) (Projectile.width / 2) - minionTargetXDist) + Math.Abs(Projectile.position.Y + (float) (Projectile.height / 2) - minionTargetYDist); + if (minionTargetDist < minionAttackMaxDist) { - if (num9 == -1 && num12 <= num8) + if (minionAttackIndex == -1 && minionTargetDist <= minionAttackDistance) { - num8 = num12; - num5 = num10; - num6 = num11; + minionAttackDistance = minionTargetDist; + minionXTarget = minionTargetXDist; + minionYTarget = minionTargetYDist; } if (Collision.CanHit(Projectile.position, Projectile.width, Projectile.height, Main.npc[index].position, Main.npc[index].width, Main.npc[index].height)) { - num7 = num12; - num5 = num10; - num6 = num11; - num9 = index; + minionAttackMaxDist = minionTargetDist; + minionXTarget = minionTargetXDist; + minionYTarget = minionTargetYDist; + minionAttackIndex = index; } } } } } - if (num9 == -1 && num8 < num7) - num7 = num8; - float num13 = 400f; + if (minionAttackIndex == -1 && minionAttackDistance < minionAttackMaxDist) + minionAttackMaxDist = minionAttackDistance; + float yDependentTargeting = 400f; if ((double) Projectile.position.Y > Main.worldSurface * 16.0) - num13 = 200f; - if (num7 < num13 + conflict3 && num9 == -1) + yDependentTargeting = 200f; + if (minionAttackMaxDist < yDependentTargeting + exaggeratedMinionPos && minionAttackIndex == -1) { - float num10 = num5 - (Projectile.position.X + (float) (Projectile.width / 2)); - if (num10 < -5f) + float minionTargetXDist = minionXTarget - (Projectile.position.X + (float) (Projectile.width / 2)); + if (minionTargetXDist < -5f) { - flag1 = true; - flag2 = false; + minionMovingLeft = true; + minionMovingRight = false; } - else if (num10 > 5f) + else if (minionTargetXDist > 5f) { - flag2 = true; - flag1 = false; + minionMovingRight = true; + minionMovingLeft = false; } } - else if (num9 >= 0 && num7 < 800f + conflict3) + else if (minionAttackIndex >= 0 && minionAttackMaxDist < 800f + exaggeratedMinionPos) { - Projectile.localAI[0] = (float) num4; - float num10 = num5 - (Projectile.position.X + (float) (Projectile.width / 2)); - if (num10 > 300f || num10 < -300f) + Projectile.localAI[0] = 60f; + float minionTargetXDist = minionXTarget - (Projectile.position.X + (float) (Projectile.width / 2)); + if (minionTargetXDist > 300f || minionTargetXDist < -300f) { - if (num10 < -50f) + if (minionTargetXDist < -50f) { - flag1 = true; - flag2 = false; + minionMovingLeft = true; + minionMovingRight = false; } - else if (num10 > 50f) + else if (minionTargetXDist > 50f) { - flag2 = true; - flag1 = false; + minionMovingRight = true; + minionMovingLeft = false; } } else if (Projectile.owner == Main.myPlayer) { Projectile.ai[1] = attackCooldown; - double num11 = 12.0; - Vector2 vector2 = new Vector2(Projectile.Center.X, Projectile.Center.Y - 8f); - float num12 = num5 - vector2.X + Main.rand.NextFloat(-6f, 6f); - float num14 = (float) ((double) (Math.Abs(num12) * 0.1f) * (double) Main.rand.Next(0, 100) * (1.0 / 1000.0)); - float num15 = num6 - vector2.Y + Main.rand.NextFloat(-6f, 6f) - num14; - double num16 = Math.Sqrt((double) num12 * (double) num12 + (double) num15 * (double) num15); - float num17 = (float) (num11 / num16); - float SpeedX = num12 * num17; - float SpeedY = num15 * num17; + double plateSpeed = 12.0; + Vector2 projMinionPos = new Vector2(Projectile.Center.X, Projectile.Center.Y - 8f); + float plateTargetX = minionXTarget - projMinionPos.X + Main.rand.NextFloat(-6f, 6f); + float randomPlateYOffset = (float) ((double) (Math.Abs(plateTargetX) * 0.1f) * (double) Main.rand.Next(0, 100) * (1.0 / 1000.0)); + float plateTargetY = minionYTarget - projMinionPos.Y + Main.rand.NextFloat(-6f, 6f) - randomPlateYOffset; + double plateTargetDist = Math.Sqrt((double) plateTargetX * (double) plateTargetX + (double) plateTargetY * (double) plateTargetY); + float plateVelocity = (float) (plateSpeed / plateTargetDist); + float SpeedX = plateTargetX * plateVelocity; + float SpeedY = plateTargetY * plateVelocity; int damage = Projectile.damage; int Type = ModContent.ProjectileType(); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), vector2.X, vector2.Y, SpeedX * 2f, SpeedY * 2f, Type, damage, Projectile.knockBack, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), projMinionPos.X, projMinionPos.Y, SpeedX * 2f, SpeedY * 2f, Type, damage, Projectile.knockBack, Projectile.owner); if (SpeedX < 0f) Projectile.direction = -1; if (SpeedX > 0f) @@ -365,74 +364,71 @@ namespace CalamityMod.Projectiles.Summon } } } - Vector2 vector2_1 = Vector2.Zero; - bool flag7 = false; if (Projectile.ai[1] != 0f) { - flag1 = false; - flag2 = false; + minionMovingLeft = false; + minionMovingRight = false; } else if (Projectile.localAI[0] == 0f) Projectile.direction = player.direction; - if (!flag7) - Projectile.rotation = 0f; + Projectile.rotation = 0f; Projectile.tileCollide = true; - float num18 = 0.08f; - float num19 = 6.5f; - num19 = 6f; - num18 = 0.2f; - if (num19 < Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y)) + float groundMinionAccel = 0.08f; + float groundMinionMaxVel = 6.5f; + groundMinionMaxVel = 6f; + groundMinionAccel = 0.2f; + if (groundMinionMaxVel < Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y)) { - num19 = Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y); - num18 = 0.3f; + groundMinionMaxVel = Math.Abs(player.velocity.X) + Math.Abs(player.velocity.Y); + groundMinionAccel = 0.3f; } - if (flag1) + if (minionMovingLeft) { if (Projectile.velocity.X > -3.5f) - Projectile.velocity.X -= num18; + Projectile.velocity.X -= groundMinionAccel; else - Projectile.velocity.X -= num18 * 0.25f; + Projectile.velocity.X -= groundMinionAccel * 0.25f; } - else if (flag2) + else if (minionMovingRight) { if (Projectile.velocity.X < 3.5f) - Projectile.velocity.X += num18; + Projectile.velocity.X += groundMinionAccel; else - Projectile.velocity.X += num18 * 0.25f; + Projectile.velocity.X += groundMinionAccel * 0.25f; } else { Projectile.velocity.X *= 0.9f; - if (Projectile.velocity.X >= -num18 && Projectile.velocity.X <= num18) + if (Projectile.velocity.X >= -groundMinionAccel && Projectile.velocity.X <= groundMinionAccel) Projectile.velocity.X = 0f; } - if (flag1 | flag2) + if (minionMovingLeft | minionMovingRight) { - int conflict4 = (int) ((double) Projectile.position.X + (double) (Projectile.width / 2)) / 16; + int minionTileX = (int) ((double) Projectile.position.X + (double) (Projectile.width / 2)) / 16; int j = (int) ((double) Projectile.position.Y + (double) (Projectile.height / 2)) / 16; - if (flag1) - --conflict4; - if (flag2) - ++conflict4; - if (WorldGen.SolidTile(conflict4 + (int) Projectile.velocity.X, j)) - flag4 = true; + if (minionMovingLeft) + --minionTileX; + if (minionMovingRight) + ++minionTileX; + if (WorldGen.SolidTile(minionTileX + (int) Projectile.velocity.X, j)) + minionShouldJump = true; } if (player.position.Y + player.height - 8f > Projectile.position.Y + Projectile.height) - flag3 = true; + minionBelowPlayer = true; Collision.StepUp(ref Projectile.position, ref Projectile.velocity, Projectile.width, Projectile.height, ref Projectile.stepSpeed, ref Projectile.gfxOffY, 1, false, 0); if (Projectile.velocity.Y == 0f) { - if (!flag3 && ((double) Projectile.velocity.X < 0.0 || (double) Projectile.velocity.X > 0.0)) + if (!minionBelowPlayer && ((double) Projectile.velocity.X < 0.0 || (double) Projectile.velocity.X > 0.0)) { int i = (int) ((double) Projectile.position.X + (double) (Projectile.width / 2)) / 16; int j = (int) ((double) Projectile.position.Y + (double) (Projectile.height / 2)) / 16 + 1; - if (flag1) + if (minionMovingLeft) --i; - if (flag2) + if (minionMovingRight) ++i; WorldGen.SolidTile(i, j); } - if (flag4) + if (minionShouldJump) { int i1 = (int) ((double) Projectile.position.X + (double) (Projectile.width / 2)) / 16; int j = (int) ((double) Projectile.position.Y + (double) Projectile.height) / 16 + 1; @@ -446,20 +442,20 @@ namespace CalamityMod.Projectiles.Summon { try { - int conflict5 = (int) ((double) Projectile.position.X + (double) (Projectile.width / 2)) / 16; - int conflict7 = (int) ((double) Projectile.position.Y + (double) (Projectile.height / 2)) / 16; - if (flag1) - --conflict5; - if (flag2) - ++conflict5; - int i2 = conflict5 + (int) Projectile.velocity.X; - if (!WorldGen.SolidTile(i2, conflict7 - 1) && !WorldGen.SolidTile(i2, conflict7 - 2)) + int minionJumpTileX = (int) ((double) Projectile.position.X + (double) (Projectile.width / 2)) / 16; + int minionJumpTileY = (int) ((double) Projectile.position.Y + (double) (Projectile.height / 2)) / 16; + if (minionMovingLeft) + --minionJumpTileX; + if (minionMovingRight) + ++minionJumpTileX; + int i2 = minionJumpTileX + (int) Projectile.velocity.X; + if (!WorldGen.SolidTile(i2, minionJumpTileY - 1) && !WorldGen.SolidTile(i2, minionJumpTileY - 2)) Projectile.velocity.Y = -5.1f; - else if (!WorldGen.SolidTile(i2, conflict7 - 2)) + else if (!WorldGen.SolidTile(i2, minionJumpTileY - 2)) Projectile.velocity.Y = -7.1f; - else if (WorldGen.SolidTile(i2, conflict7 - 5)) + else if (WorldGen.SolidTile(i2, minionJumpTileY - 5)) Projectile.velocity.Y = -11.1f; - else if (WorldGen.SolidTile(i2, conflict7 - 4)) + else if (WorldGen.SolidTile(i2, minionJumpTileY - 4)) Projectile.velocity.Y = -10.1f; else Projectile.velocity.Y = -9.1f; @@ -471,20 +467,20 @@ namespace CalamityMod.Projectiles.Summon } } } - else if (Projectile.type == 266 && flag1 | flag2) + else if (Projectile.type == 266 && minionMovingLeft | minionMovingRight) Projectile.velocity.Y -= 6f; } - if (Projectile.velocity.X > num19) - Projectile.velocity.X = num19; - if (Projectile.velocity.X < -num19) - Projectile.velocity.X = -num19; + if (Projectile.velocity.X > groundMinionMaxVel) + Projectile.velocity.X = groundMinionMaxVel; + if (Projectile.velocity.X < -groundMinionMaxVel) + Projectile.velocity.X = -groundMinionMaxVel; if (Projectile.velocity.X < 0f) Projectile.direction = -1; if (Projectile.velocity.X > 0f) Projectile.direction = 1; - if (Projectile.velocity.X > num18 & flag2) + if (Projectile.velocity.X > groundMinionAccel & minionMovingRight) Projectile.direction = 1; - if (Projectile.velocity.X < -num18 & flag1) + if (Projectile.velocity.X < -groundMinionAccel & minionMovingLeft) Projectile.direction = -1; if (Projectile.direction == -1) Projectile.spriteDirection = -1; From 5dc5ff4575b012a320ac66d9e4d8ae5c4883f7d9 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 4 Nov 2023 00:29:55 -0400 Subject: [PATCH 58/95] Am I stupid? Why were these not caught? Fortunately it wasn't nearly as many and the errors weren't nearly as catastrophic --- Items/Weapons/Magic/AstralachneaStaff.cs | 2 +- Items/Weapons/Magic/DeathhailStaff.cs | 2 +- Items/Weapons/Magic/TomeofFates.cs | 2 +- Items/Weapons/Melee/Greentide.cs | 4 +- Items/Weapons/Melee/StellarStriker.cs | 2 +- Items/Weapons/Melee/TheEnforcer.cs | 4 +- NPCs/CalamityGlobalAI.cs | 82 +++++++++++----------- NPCs/Crags/SoulSlurper.cs | 2 +- NPCs/NormalNPCs/ProfanedEnergyLantern.cs | 6 +- NPCs/NormalNPCs/ShockstormShuttle.cs | 2 +- World/CustomDungeon.cs | 86 ++++++++++++------------ 11 files changed, 97 insertions(+), 97 deletions(-) diff --git a/Items/Weapons/Magic/AstralachneaStaff.cs b/Items/Weapons/Magic/AstralachneaStaff.cs index a99af4af16..0469e4db18 100644 --- a/Items/Weapons/Magic/AstralachneaStaff.cs +++ b/Items/Weapons/Magic/AstralachneaStaff.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); - int i = Main.myPlayer; + int j = Main.myPlayer; float fangSpeed = Item.shootSpeed; float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; diff --git a/Items/Weapons/Magic/DeathhailStaff.cs b/Items/Weapons/Magic/DeathhailStaff.cs index c0b186ad69..16c43c5660 100644 --- a/Items/Weapons/Magic/DeathhailStaff.cs +++ b/Items/Weapons/Magic/DeathhailStaff.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - int i = Main.myPlayer; + int j = Main.myPlayer; float beamSpeed = Item.shootSpeed; float beamKnockback = knockback; beamKnockback = player.GetWeaponKnockback(Item, beamKnockback); diff --git a/Items/Weapons/Magic/TomeofFates.cs b/Items/Weapons/Magic/TomeofFates.cs index c98e116ce3..d8c61b2b77 100644 --- a/Items/Weapons/Magic/TomeofFates.cs +++ b/Items/Weapons/Magic/TomeofFates.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Items.Weapons.Magic } if (projChoice == 0) { - Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, tentacleVelocity.X, tentacleVelocity.Y, ModContent.ProjectileType(), (int)((double)num73 * 1.5f), playerKnockback, i, tentacleXDirection, tentacleYDirection); + Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, tentacleVelocity.X, tentacleVelocity.Y, ModContent.ProjectileType(), (int)((double)damage * 1.5f), playerKnockback, i, tentacleXDirection, tentacleYDirection); } else { diff --git a/Items/Weapons/Melee/Greentide.cs b/Items/Weapons/Melee/Greentide.cs index 7cc69c1946..056f573a04 100644 --- a/Items/Weapons/Melee/Greentide.cs +++ b/Items/Weapons/Melee/Greentide.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) { var source = player.GetSource_ItemUse(Item); - int i = Main.myPlayer; + int j = Main.myPlayer; float projSpeed = Item.shootSpeed; float playerKnockback = hit.Knockback; playerKnockback = player.GetWeaponKnockback(Item, playerKnockback); @@ -85,7 +85,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo) { var source = player.GetSource_ItemUse(Item); - int i = Main.myPlayer; + int j = Main.myPlayer; float projSpeed = Item.shootSpeed; float playerKnockback = Item.knockBack; playerKnockback = player.GetWeaponKnockback(Item, playerKnockback); diff --git a/Items/Weapons/Melee/StellarStriker.cs b/Items/Weapons/Melee/StellarStriker.cs index e43f33e130..cd7fc08fbf 100644 --- a/Items/Weapons/Melee/StellarStriker.cs +++ b/Items/Weapons/Melee/StellarStriker.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Items.Weapons.Melee { var source = player.GetSource_ItemUse(Item); SoundEngine.PlaySound(SoundID.Item88, player.Center); - int i = Main.myPlayer; + int j = Main.myPlayer; float cometSpeed = Item.shootSpeed; Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); float mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; diff --git a/Items/Weapons/Melee/TheEnforcer.cs b/Items/Weapons/Melee/TheEnforcer.cs index ae6e4ccaa3..0805acfa6f 100644 --- a/Items/Weapons/Melee/TheEnforcer.cs +++ b/Items/Weapons/Melee/TheEnforcer.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Melee { var source = player.GetSource_ItemUse(Item); SoundEngine.PlaySound(SoundID.Item73, player.Center); - int i = Main.myPlayer; + int j = Main.myPlayer; float flameSpeed = 3f; player.itemTime = Item.useTime; Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); @@ -90,7 +90,7 @@ namespace CalamityMod.Items.Weapons.Melee { var source = player.GetSource_ItemUse(Item); SoundEngine.PlaySound(SoundID.Item73, player.Center); - int i = Main.myPlayer; + int j = Main.myPlayer; float flameSpeed = 3f; player.itemTime = Item.useTime; Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index f72d2edf97..6ca9db0a96 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -4546,43 +4546,43 @@ namespace CalamityMod.NPCs } float wormSpeed = 10f; - float acceleration = 0.09f; + float wormAccel = 0.09f; if (npc.type == NPCID.DiggerHead) { wormSpeed = 6.5f; - acceleration = 0.05f; + wormAccel = 0.05f; } if (npc.type == NPCID.GiantWormHead) { wormSpeed = 7.5f; - acceleration = 0.06f; + wormAccel = 0.06f; } if (npc.type == NPCID.TombCrawlerHead) { wormSpeed = 8f; - acceleration = 0.13f; + wormAccel = 0.13f; } if (npc.type == NPCID.DuneSplicerHead) { if (!Main.player[npc.target].dead && Main.player[npc.target].ZoneSandstorm) { wormSpeed = 16f; - acceleration = 0.35f; + wormAccel = 0.35f; } else { - acceleration = 0.25f; + wormAccel = 0.25f; } } if (npc.type == NPCID.WyvernHead) { wormSpeed = 11f; - acceleration = 0.3f; + wormAccel = 0.3f; } if (npc.type == NPCID.StardustWormHead) { wormSpeed = 9f; - acceleration = 0.25f; + wormAccel = 0.25f; } if (npc.type == NPCID.LeechHead && Main.wofNPCIndex >= 0) { @@ -4590,29 +4590,29 @@ namespace CalamityMod.NPCs if (lifeRatio < 0.75f) { wormSpeed += 1f; - acceleration += 0.1f; + wormAccel += 0.1f; } if (lifeRatio < 0.5f) { wormSpeed += 1f; - acceleration += 0.1f; + wormAccel += 0.1f; } if (lifeRatio < 0.25f) { wormSpeed += 2f; - acceleration += 0.1f; + wormAccel += 0.1f; } } if (npc.type == NPCID.BloodEelHead) { wormSpeed = 18f; - acceleration = 0.6f; + wormAccel = 0.6f; } if (CalamityWorld.death) { wormSpeed *= 1.25f; - acceleration *= 1.25f; + wormAccel *= 1.25f; } Vector2 segmentPosition = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); @@ -4622,7 +4622,7 @@ namespace CalamityMod.NPCs if (npc.type == NPCID.SolarCrawltipedeHead) { wormSpeed = 12f; - acceleration = 0.32f; + wormAccel = 0.32f; int crawltipedeTargetY = -1; int targetTileX = (int)(Main.player[npc.target].Center.X / 16f); int targetTileY = (int)(Main.player[npc.target].Center.Y / 16f); @@ -4664,7 +4664,7 @@ namespace CalamityMod.NPCs else { wormSpeed = 28f; - acceleration = 0.8f; + wormAccel = 0.8f; } float maxWormSpeed = wormSpeed * 1.3f; float minWormSpeed = wormSpeed * 0.7f; @@ -4784,33 +4784,33 @@ namespace CalamityMod.NPCs { if (npc.velocity.X < 0f) { - npc.velocity.X = npc.velocity.X - acceleration * 1.1f; + npc.velocity.X = npc.velocity.X - wormAccel * 1.1f; } else { - npc.velocity.X = npc.velocity.X + acceleration * 1.1f; + npc.velocity.X = npc.velocity.X + wormAccel * 1.1f; } } else if (npc.velocity.Y == wormSpeed) { if (npc.velocity.X < wormTargetX) { - npc.velocity.X = npc.velocity.X + acceleration; + npc.velocity.X = npc.velocity.X + wormAccel; } else if (npc.velocity.X > wormTargetX) { - npc.velocity.X = npc.velocity.X - acceleration; + npc.velocity.X = npc.velocity.X - wormAccel; } } else if (npc.velocity.Y > 4f) { if (npc.velocity.X < 0f) { - npc.velocity.X = npc.velocity.X + acceleration * 0.9f; + npc.velocity.X = npc.velocity.X + wormAccel * 0.9f; } else { - npc.velocity.X = npc.velocity.X - acceleration * 0.9f; + npc.velocity.X = npc.velocity.X - wormAccel * 0.9f; } } } @@ -4891,7 +4891,7 @@ namespace CalamityMod.NPCs bool shouldSwoopDown = false; if (npc.type == NPCID.WyvernHead) { - if (((npc.velocity.X > 0f && wormTargetX < 0f) || (npc.velocity.X < 0f && wormTargetX > 0f) || (npc.velocity.Y > 0f && wormTargetY < 0f) || (npc.velocity.Y < 0f && wormTargetY > 0f)) && Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y) > acceleration / 2f && wormTargetDist < 300f) + if (((npc.velocity.X > 0f && wormTargetX < 0f) || (npc.velocity.X < 0f && wormTargetX > 0f) || (npc.velocity.Y > 0f && wormTargetY < 0f) || (npc.velocity.Y < 0f && wormTargetY > 0f)) && Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y) > wormAccel / 2f && wormTargetDist < 300f) { shouldSwoopDown = true; @@ -4910,13 +4910,13 @@ namespace CalamityMod.NPCs npc.velocity.X = npc.velocity.X * 1.1f; } else if (npc.velocity.Y > -wormSpeed) - npc.velocity.Y = npc.velocity.Y - acceleration; + npc.velocity.Y = npc.velocity.Y - wormAccel; } } if (npc.type == NPCID.BloodEelHead) { - if (((npc.velocity.X > 0f && wormTargetX < 0f) || (npc.velocity.X < 0f && wormTargetX > 0f) || (npc.velocity.Y > 0f && wormTargetY < 0f) || (npc.velocity.Y < 0f && wormTargetY > 0f)) && Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y) > acceleration / 2f && wormTargetDist < 120f) + if (((npc.velocity.X > 0f && wormTargetX < 0f) || (npc.velocity.X < 0f && wormTargetX > 0f) || (npc.velocity.Y > 0f && wormTargetY < 0f) || (npc.velocity.Y < 0f && wormTargetY > 0f)) && Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y) > wormAccel / 2f && wormTargetDist < 120f) { shouldSwoopDown = true; if (Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y) < wormSpeed) @@ -4933,7 +4933,7 @@ namespace CalamityMod.NPCs npc.velocity.X *= 1.1f; } else if (npc.velocity.Y > 0f - wormSpeed) - npc.velocity.Y -= acceleration; + npc.velocity.Y -= wormAccel; } } @@ -4942,59 +4942,59 @@ namespace CalamityMod.NPCs if ((npc.velocity.X > 0f && wormTargetX > 0f) || (npc.velocity.X < 0f && wormTargetX < 0f) || (npc.velocity.Y > 0f && wormTargetY > 0f) || (npc.velocity.Y < 0f && wormTargetY < 0f)) { if (npc.velocity.X < wormTargetX) - npc.velocity.X = npc.velocity.X + acceleration; + npc.velocity.X = npc.velocity.X + wormAccel; else if (npc.velocity.X > wormTargetX) - npc.velocity.X = npc.velocity.X - acceleration; + npc.velocity.X = npc.velocity.X - wormAccel; if (npc.velocity.Y < wormTargetY) - npc.velocity.Y = npc.velocity.Y + acceleration; + npc.velocity.Y = npc.velocity.Y + wormAccel; else if (npc.velocity.Y > wormTargetY) - npc.velocity.Y = npc.velocity.Y - acceleration; + npc.velocity.Y = npc.velocity.Y - wormAccel; if ((double)Math.Abs(wormTargetY) < (double)wormSpeed * 0.2 && ((npc.velocity.X > 0f && wormTargetX < 0f) || (npc.velocity.X < 0f && wormTargetX > 0f))) { if (npc.velocity.Y > 0f) - npc.velocity.Y = npc.velocity.Y + acceleration * 2f; + npc.velocity.Y = npc.velocity.Y + wormAccel * 2f; else - npc.velocity.Y = npc.velocity.Y - acceleration * 2f; + npc.velocity.Y = npc.velocity.Y - wormAccel * 2f; } if ((double)Math.Abs(wormTargetX) < (double)wormSpeed * 0.2 && ((npc.velocity.Y > 0f && wormTargetY < 0f) || (npc.velocity.Y < 0f && wormTargetY > 0f))) { if (npc.velocity.X > 0f) - npc.velocity.X = npc.velocity.X + acceleration * 2f; + npc.velocity.X = npc.velocity.X + wormAccel * 2f; else - npc.velocity.X = npc.velocity.X - acceleration * 2f; + npc.velocity.X = npc.velocity.X - wormAccel * 2f; } } else if (absoluteTargetX > absoluteTargetY) { if (npc.velocity.X < wormTargetX) - npc.velocity.X = npc.velocity.X + acceleration * 1.1f; + npc.velocity.X = npc.velocity.X + wormAccel * 1.1f; else if (npc.velocity.X > wormTargetX) - npc.velocity.X = npc.velocity.X - acceleration * 1.1f; + npc.velocity.X = npc.velocity.X - wormAccel * 1.1f; if ((double)(Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < (double)wormSpeed * 0.5) { if (npc.velocity.Y > 0f) - npc.velocity.Y = npc.velocity.Y + acceleration; + npc.velocity.Y = npc.velocity.Y + wormAccel; else - npc.velocity.Y = npc.velocity.Y - acceleration; + npc.velocity.Y = npc.velocity.Y - wormAccel; } } else { if (npc.velocity.Y < wormTargetY) - npc.velocity.Y = npc.velocity.Y + acceleration * 1.1f; + npc.velocity.Y = npc.velocity.Y + wormAccel * 1.1f; else if (npc.velocity.Y > wormTargetY) - npc.velocity.Y = npc.velocity.Y - acceleration * 1.1f; + npc.velocity.Y = npc.velocity.Y - wormAccel * 1.1f; if ((double)(Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < (double)wormSpeed * 0.5) { if (npc.velocity.X > 0f) - npc.velocity.X = npc.velocity.X + acceleration; + npc.velocity.X = npc.velocity.X + wormAccel; else - npc.velocity.X = npc.velocity.X - acceleration; + npc.velocity.X = npc.velocity.X - wormAccel; } } } diff --git a/NPCs/Crags/SoulSlurper.cs b/NPCs/Crags/SoulSlurper.cs index f2701316d0..4647877849 100644 --- a/NPCs/Crags/SoulSlurper.cs +++ b/NPCs/Crags/SoulSlurper.cs @@ -271,7 +271,7 @@ namespace CalamityMod.NPCs.Crags for (int j = 1; j < afterimageAmt; j++) { Color glowmaskAfterimageColor = redGlow; - glowmaskAfterimageColor = Color.Lerp(glowmaskAfterimageColor, color36, amount9); + glowmaskAfterimageColor = Color.Lerp(glowmaskAfterimageColor, Color.White, 0.5f); glowmaskAfterimageColor *= (float)(afterimageAmt - j) / 15f; Vector2 glowmaskAfterimagePos = NPC.oldPos[j] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; glowmaskAfterimagePos -= new Vector2((float)texture.Width, (float)(texture.Height)) * NPC.scale / 2f; diff --git a/NPCs/NormalNPCs/ProfanedEnergyLantern.cs b/NPCs/NormalNPCs/ProfanedEnergyLantern.cs index da3f3e7445..e68b2d29f5 100644 --- a/NPCs/NormalNPCs/ProfanedEnergyLantern.cs +++ b/NPCs/NormalNPCs/ProfanedEnergyLantern.cs @@ -92,11 +92,11 @@ namespace CalamityMod.NPCs.NormalNPCs float targetDistance = (float)Math.Sqrt((double)(targetXDist * targetXDist + targetYDist * targetYDist)); float baseXPos = Main.npc[energyBase].position.X + (float)(Main.npc[energyBase].width / 2); float baseYPos = Main.npc[energyBase].position.Y + (float)(Main.npc[energyBase].height / 2); - Vector2 basePosition = new Vector2(baseXPos, baseYPos); + Vector2 baseCurrentPos = new Vector2(baseXPos, baseYPos); float basePosition = baseXPos + NPC.ai[0]; float newLanternPos = baseYPos + NPC.ai[1]; - float baseXDist = basePosition - basePosition.X; - float baseYDist = newLanternPos - basePosition.Y; + float baseXDist = basePosition - baseCurrentPos.X; + float baseYDist = newLanternPos - baseCurrentPos.Y; float baseDistance = (float)Math.Sqrt((double)(baseXDist * baseXDist + baseYDist * baseYDist)); baseDistance = lanternSpeed / baseDistance; baseXDist *= baseDistance; diff --git a/NPCs/NormalNPCs/ShockstormShuttle.cs b/NPCs/NormalNPCs/ShockstormShuttle.cs index 12e5f9cdc6..ea56e034a8 100644 --- a/NPCs/NormalNPCs/ShockstormShuttle.cs +++ b/NPCs/NormalNPCs/ShockstormShuttle.cs @@ -298,7 +298,7 @@ namespace CalamityMod.NPCs.NormalNPCs float pixelsUpAmt2 = (float)(upwardsMovement * 16); if (pixelsUpAmt2 < 170f) { - targetingCenter2.Y -= num1594 - pixelsUpAmt2; + targetingCenter2.Y -= 170f - pixelsUpAmt2; } if (targetingCenter2.Length() < 70f) { diff --git a/World/CustomDungeon.cs b/World/CustomDungeon.cs index b1b87e3d92..553be3097f 100644 --- a/World/CustomDungeon.cs +++ b/World/CustomDungeon.cs @@ -1701,10 +1701,10 @@ namespace CalamityMod.World { double num = (double)(2000 * Main.maxTilesX) / 4200.0; int brickType = 1 + (int)((double)Main.maxTilesX / 4200.0); - int wallType = 1 + (int)((double)Main.maxTilesX / 4200.0); + int backWallType = 1 + (int)((double)Main.maxTilesX / 4200.0); for (int i = 0; (double)i < num; i++) { - if (brickType > 0 || wallType > 0) + if (brickType > 0 || backWallType > 0) i--; int num4 = WorldGen.genRand.Next(GenVars.dMinX, GenVars.dMaxX); @@ -1755,7 +1755,7 @@ namespace CalamityMod.World int num15 = 22; int num16 = 24; int num17 = 30; - switch (wallType) + switch (backWallType) { case 8: style = 14; @@ -1913,7 +1913,7 @@ namespace CalamityMod.World if ((double)num6 < (double)num19 * 1.75) num18 = -1; - if (brickType > 0 || wallType > 0) + if (brickType > 0 || backWallType > 0) { if (brickType > 0) { @@ -1921,11 +1921,11 @@ namespace CalamityMod.World if (Main.tile[num7, j].TileType == 355) brickType--; } - else if (wallType > 0) + else if (backWallType > 0) { WorldGen.PlaceTile(num7, j, 354, mute: true); if (Main.tile[num7, j].TileType == 354) - wallType--; + backWallType--; } continue; @@ -2078,7 +2078,7 @@ namespace CalamityMod.World double brickType = num; Vector2D zero2 = Vector2D.Zero; Vector2D zero3 = Vector2D.Zero; - int wallType = 1; + int newWallType = 1; Vector2D vector2D = default(Vector2D); vector2D.X = i; @@ -2119,7 +2119,7 @@ namespace CalamityMod.World bool flag10 = false; for (int num6 = j; num6 > j - num5; num6--) { - if (Main.tile[i, num6].WallType == wallType) + if (Main.tile[i, num6].WallType == newWallType) { if (flag10) { @@ -2136,7 +2136,7 @@ namespace CalamityMod.World flag10 = false; for (int k = j; k < j + num5; k++) { - if (Main.tile[i, k].WallType == wallType) + if (Main.tile[i, k].WallType == newWallType) { if (flag10) { @@ -2153,7 +2153,7 @@ namespace CalamityMod.World flag10 = false; for (int num7 = i; num7 > i - num5; num7--) { - if (Main.tile[num7, j].WallType == wallType) + if (Main.tile[num7, j].WallType == newWallType) { if (flag10) { @@ -2170,7 +2170,7 @@ namespace CalamityMod.World flag10 = false; for (int l = i; l < i + num5; l++) { - if (Main.tile[l, j].WallType == wallType) + if (Main.tile[l, j].WallType == newWallType) { if (flag10) { @@ -2186,7 +2186,7 @@ namespace CalamityMod.World if (!flag8 && !flag9 && !flag6 && !flag7) { - wallType = (WorldGen.genRand.NextBool() ? 1 : (-1)); + newWallType = (WorldGen.genRand.NextBool() ? 1 : (-1)); if (WorldGen.genRand.NextBool()) flag5 = true; } @@ -2201,21 +2201,21 @@ namespace CalamityMod.World switch (num8) { case 0: - wallType = -1; + newWallType = -1; break; case 1: - wallType = 1; + newWallType = 1; break; default: flag5 = true; - wallType = ((num8 != 2) ? 1 : (-1)); + newWallType = ((num8 != 2) ? 1 : (-1)); break; } } } else { - wallType = (WorldGen.genRand.NextBool() ? 1 : (-1)); + newWallType = (WorldGen.genRand.NextBool() ? 1 : (-1)); if (WorldGen.genRand.NextBool()) flag5 = true; } @@ -2227,11 +2227,11 @@ namespace CalamityMod.World if (flag5) { zero2.Y = 0.0; - zero2.X = wallType; + zero2.X = newWallType; zero3.Y = 0.0; - zero3.X = -wallType; + zero3.X = -newWallType; zero.Y = 0.0; - zero.X = wallType; + zero.X = newWallType; if (WorldGen.genRand.Next(3) == 0) { if (WorldGen.genRand.NextBool()) @@ -2243,12 +2243,12 @@ namespace CalamityMod.World else { num += 1.0; - zero.Y = wallType; + zero.Y = newWallType; zero.X = 0.0; zero2.X = 0.0; - zero2.Y = wallType; + zero2.Y = newWallType; zero3.X = 0.0; - zero3.Y = -wallType; + zero3.Y = -newWallType; if (WorldGen.genRand.Next(3) != 0) { flag3 = true; @@ -2287,11 +2287,11 @@ namespace CalamityMod.World { if (vector2D.X > (double)(LastMaxTilesX - 200)) { - wallType = -1; + newWallType = -1; zero2.Y = 0.0; - zero2.X = wallType; + zero2.X = newWallType; zero.Y = 0.0; - zero.X = wallType; + zero.X = newWallType; if (WorldGen.genRand.Next(3) == 0) { if (WorldGen.genRand.NextBool()) @@ -2302,11 +2302,11 @@ namespace CalamityMod.World } else if (vector2D.X < 200.0) { - wallType = 1; + newWallType = 1; zero2.Y = 0.0; - zero2.X = wallType; + zero2.X = newWallType; zero.Y = 0.0; - zero.X = wallType; + zero.X = newWallType; if (WorldGen.genRand.Next(3) == 0) { if (WorldGen.genRand.NextBool()) @@ -2317,12 +2317,12 @@ namespace CalamityMod.World } else if (vector2D.Y > (double)(LastMaxTilesY - 300)) { - wallType = -1; + newWallType = -1; num += 1.0; - zero.Y = wallType; + zero.Y = newWallType; zero.X = 0.0; zero2.X = 0.0; - zero2.Y = wallType; + zero2.Y = newWallType; if (WorldGen.genRand.NextBool()) { if (WorldGen.genRand.NextBool()) @@ -2333,12 +2333,12 @@ namespace CalamityMod.World } else if (flag11) { - wallType = 1; + newWallType = 1; num += 1.0; - zero.Y = wallType; + zero.Y = newWallType; zero.X = 0.0; zero2.X = 0.0; - zero2.Y = wallType; + zero2.Y = newWallType; if (WorldGen.genRand.Next(3) != 0) { flag3 = true; @@ -2357,11 +2357,11 @@ namespace CalamityMod.World } else if (vector2D.X < (double)(Main.maxTilesX / 2) && vector2D.X > (double)Main.maxTilesX * 0.25) { - wallType = -1; + newWallType = -1; zero2.Y = 0.0; - zero2.X = wallType; + zero2.X = newWallType; zero.Y = 0.0; - zero.X = wallType; + zero.X = newWallType; if (WorldGen.genRand.Next(3) == 0) { if (WorldGen.genRand.NextBool()) @@ -2372,11 +2372,11 @@ namespace CalamityMod.World } else if (vector2D.X > (double)(Main.maxTilesX / 2) && vector2D.X < (double)Main.maxTilesX * 0.75) { - wallType = 1; + newWallType = 1; zero2.Y = 0.0; - zero2.X = wallType; + zero2.X = newWallType; zero.Y = 0.0; - zero.X = wallType; + zero.X = newWallType; if (WorldGen.genRand.Next(3) == 0) { if (WorldGen.genRand.NextBool()) @@ -2463,7 +2463,7 @@ namespace CalamityMod.World { for (int num15 = num12 + 1; num15 < num13 - 1; num15++) { - Main.tile[num14, num15].WallType = (ushort)wallType; + Main.tile[num14, num15].WallType = (ushort)newWallType; } } @@ -2498,7 +2498,7 @@ namespace CalamityMod.World Main.tile[num17, num18].Clear(TileDataType.Slope); if (flag) { - if (Main.tile[num17, num18].HasTile || Main.tile[num17, num18].WallType != wallType) + if (Main.tile[num17, num18].HasTile || Main.tile[num17, num18].WallType != newWallType) { Main.tile[num17, num18].Get().HasTile = true; Main.tile[num17, num18].TileType = GenVars.crackedType; @@ -2510,7 +2510,7 @@ namespace CalamityMod.World } Main.tile[num17, num18].Clear(TileDataType.Slope); - Main.tile[num17, num18].WallType = (ushort)wallType; + Main.tile[num17, num18].WallType = (ushort)newWallType; } } From ef2ed44294d15557f95571966ef3035af69a2a76 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 4 Nov 2023 01:29:08 -0400 Subject: [PATCH 59/95] Blood Orb resprite --- Items/Materials/BloodOrb.cs | 6 ++++-- Items/Materials/BloodOrb.png | Bin 297 -> 588 bytes Items/Weapons/Ranged/TheStorm.cs | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Items/Materials/BloodOrb.cs b/Items/Materials/BloodOrb.cs index a0619ff5dc..2bedbb99a0 100644 --- a/Items/Materials/BloodOrb.cs +++ b/Items/Materials/BloodOrb.cs @@ -1,4 +1,5 @@ using Terraria; +using Terraria.DataStructures; using Terraria.ModLoader; using Terraria.ID; @@ -10,12 +11,13 @@ namespace CalamityMod.Items.Materials public override void SetStaticDefaults() { Item.ResearchUnlockCount = 100; + Main.RegisterItemAnimation(Type, new DrawAnimationVertical(6, 4)); } public override void SetDefaults() { - Item.width = 18; - Item.height = 18; + Item.width = 16; + Item.height = 28; Item.maxStack = 9999; Item.value = Item.sellPrice(silver: 1, copper: 20); Item.rare = ItemRarityID.Blue; diff --git a/Items/Materials/BloodOrb.png b/Items/Materials/BloodOrb.png index c1d024d4a70ec7a565849c4042b9daed7833c8fa..f78d4d5b4cfa271ce13bd5be6a01ccc25f9f4a8a 100644 GIT binary patch literal 588 zcmV-S0<-;zP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0pUqRK~z{r?U=Dk z12GiFU)oYvH>ZLHK~Qv->Y`h55MA7K(n+X;o2Vci9SUw8our$qL!Ih>plgNV(8<}_ zJ-$t$51M@ zrvQ7@!JYw>+Ebusp`&Itt$dP|-(UBO9PL+PJuB}3>Hth19dc~cx*T`ujz`#204}M> zN;a}>?ys&ab8NKap0P5puK=71!Ag+t2g6u*3f^+ELM!Sv-ndc_n;^OyQH$~(wdnRm z4WFxF1MHuHemADVS&s80>tTF#03{bx=Dxl%NUR`zj9KvB=)G|m?~Pxi=Z(!k?$y~d z(K8|oAiehkRAehBD-!Pqo3zEzdL0-ixC#WfIVy59VgC#O&ceAn8?)fO(R<@ClkAOW zsscgtI4y5PMc(%vJriRJ0F;XyQl&Z+Gt3%}OEExmGI_XF?`>L9i+ z?~UFYM={CXhzi81S4&GA^?x?)DFAp9y^9y_qb_t;2KE&I{G<6K51rP6(PP~y@b2sx aBSfDV5F>y^O_^E%0000IlYup~v9?TWz>kRuMhX{{8z>rk@(;HQZ1#T}FL_wVnVb$vye tz^>C9)Y4TPXLu(#N$iw=W)#HB#9(gJ*S=xDZ6na{44$rjF6*2UngEEScM|{r diff --git a/Items/Weapons/Ranged/TheStorm.cs b/Items/Weapons/Ranged/TheStorm.cs index 6d19f5283b..b64410d8be 100644 --- a/Items/Weapons/Ranged/TheStorm.cs +++ b/Items/Weapons/Ranged/TheStorm.cs @@ -15,6 +15,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { + ItemID.Sets.AnimatesAsSoul[Type] = true; Main.RegisterItemAnimation(Type, new DrawAnimationVertical(5, 9)); } public override void SetDefaults() From 0ab4933901315ae6d223d55a2a7ba8930ad53f21 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Sat, 4 Nov 2023 10:49:53 -0500 Subject: [PATCH 60/95] Remade the metaball system entirely (#4) * Remade the metaball system entirely * Rename additive metaball shader registration --- CalamityMod.cs | 9 +- Effects/CalamityShaders.cs | 21 +- .../AdditiveMetaballEdgeShader.fx} | 19 +- .../Metaballs/AdditiveMetaballEdgeShader.xnb | Bin 0 -> 2888 bytes Effects/Metaballs/MetaballEdgeShader.fx | 59 ++++++ Effects/Metaballs/MetaballEdgeShader.xnb | Bin 0 -> 2400 bytes .../AdditiveFusableParticleEdgeShader.xnb | Bin 3448 -> 0 bytes .../BaseFusableParticleEdgeShader.fx | 78 ------- .../BaseFusableParticleEdgeShader.xnb | Bin 4648 -> 0 bytes ExtraTextures/BasicCircle.png | Bin 0 -> 383 bytes .../GruesomeEminence_Ghost_Layer1.png | Bin .../GruesomeEminence_Ghost_Layer2.png | Bin .../GruesomeEminence_Ghost_Layer3.png | Bin .../GruesomeEminence_Ghost_Layer4.png | Bin .../GruesomeEminence_Ghost_Layer5.png | Bin Graphics/Metaballs/GruesomeMetaball.cs | 144 +++++++++++++ Graphics/Metaballs/Metaball.cs | 151 +++++++++++++ Graphics/Metaballs/MetaballDrawLayer.cs | 9 + Graphics/Metaballs/MetaballManager.cs | 135 ++++++++++++ Graphics/Metaballs/PaintParticleSets.cs | 132 ++++++++++++ Graphics/Metaballs/RancorLavaMetaball.cs | 121 +++++++++++ Graphics/Metaballs/StreamGougeLayer.png | Bin 0 -> 3160 bytes Graphics/Metaballs/StreamGougeMetaball.cs | 103 +++++++++ Graphics/Metaballs/VoidGeneratorMetaball.cs | 69 ++++++ ILEditing/MechanicILChanges.cs | 34 ++- ModSupport/ModCalls.cs | 19 +- NPCs/AcidRain/Orthocera.cs | 9 +- Particles/Metaballs/BaseFusableParticleSet.cs | 114 ---------- Particles/Metaballs/FusableParticleManager.cs | 199 ------------------ .../Metaballs/GruesomeEminenceParticleSet.cs | 97 --------- Particles/Metaballs/PaintParticleSets.cs | 71 ------- .../Metaballs/RancorGroundLavaParticleSet.cs | 51 ----- Particles/Metaballs/RancorLavaParticleSet.cs | 50 ----- Particles/Metaballs/StreamGougeLayer.png | Bin 1986 -> 0 bytes Particles/Metaballs/StreamGougeParticleSet.cs | 61 ------ .../Metaballs/VoidGeneratorParticleSet.cs | 62 ------ Projectiles/Magic/RancorLargeCinder.cs | 5 +- Projectiles/Magic/RancorLaserbeam.cs | 8 +- Projectiles/Magic/SmallSpirit.cs | 9 +- Projectiles/Magic/SpiritCongregation.cs | 79 ++++--- Projectiles/Magic/SpiritDust.cs | 5 +- Projectiles/Melee/StreamGougePortal.cs | 13 +- Projectiles/Ranged/SpeedBlasterShot.cs | 19 +- Projectiles/Typeless/VoidFieldGenerator.cs | 12 +- Systems/EntityUpdateInterceptionSystem.cs | 14 -- Utilities/ProjectileUtils.cs | 34 ++- 46 files changed, 1082 insertions(+), 933 deletions(-) rename Effects/{ParticleFusion/AdditiveFusableParticleEdgeShader.fx => Metaballs/AdditiveMetaballEdgeShader.fx} (76%) create mode 100644 Effects/Metaballs/AdditiveMetaballEdgeShader.xnb create mode 100644 Effects/Metaballs/MetaballEdgeShader.fx create mode 100644 Effects/Metaballs/MetaballEdgeShader.xnb delete mode 100644 Effects/ParticleFusion/AdditiveFusableParticleEdgeShader.xnb delete mode 100644 Effects/ParticleFusion/BaseFusableParticleEdgeShader.fx delete mode 100644 Effects/ParticleFusion/BaseFusableParticleEdgeShader.xnb create mode 100644 ExtraTextures/BasicCircle.png rename {Particles => Graphics}/Metaballs/GruesomeEminence_Ghost_Layer1.png (100%) rename {Particles => Graphics}/Metaballs/GruesomeEminence_Ghost_Layer2.png (100%) rename {Particles => Graphics}/Metaballs/GruesomeEminence_Ghost_Layer3.png (100%) rename {Particles => Graphics}/Metaballs/GruesomeEminence_Ghost_Layer4.png (100%) rename {Particles => Graphics}/Metaballs/GruesomeEminence_Ghost_Layer5.png (100%) create mode 100644 Graphics/Metaballs/GruesomeMetaball.cs create mode 100644 Graphics/Metaballs/Metaball.cs create mode 100644 Graphics/Metaballs/MetaballDrawLayer.cs create mode 100644 Graphics/Metaballs/MetaballManager.cs create mode 100644 Graphics/Metaballs/PaintParticleSets.cs create mode 100644 Graphics/Metaballs/RancorLavaMetaball.cs create mode 100644 Graphics/Metaballs/StreamGougeLayer.png create mode 100644 Graphics/Metaballs/StreamGougeMetaball.cs create mode 100644 Graphics/Metaballs/VoidGeneratorMetaball.cs delete mode 100644 Particles/Metaballs/BaseFusableParticleSet.cs delete mode 100644 Particles/Metaballs/FusableParticleManager.cs delete mode 100644 Particles/Metaballs/GruesomeEminenceParticleSet.cs delete mode 100644 Particles/Metaballs/PaintParticleSets.cs delete mode 100644 Particles/Metaballs/RancorGroundLavaParticleSet.cs delete mode 100644 Particles/Metaballs/RancorLavaParticleSet.cs delete mode 100644 Particles/Metaballs/StreamGougeLayer.png delete mode 100644 Particles/Metaballs/StreamGougeParticleSet.cs delete mode 100644 Particles/Metaballs/VoidGeneratorParticleSet.cs diff --git a/CalamityMod.cs b/CalamityMod.cs index f5340244a9..6a16cd4e08 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -49,7 +49,6 @@ using CalamityMod.NPCs.StormWeaver; using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.NPCs.Yharon; using CalamityMod.Particles; -using CalamityMod.Particles.Metaballs; using CalamityMod.Projectiles; using CalamityMod.Projectiles.BaseProjectiles; using CalamityMod.Schematics; @@ -345,7 +344,6 @@ namespace CalamityMod // However, render targets and certain other graphical objects can only be created on the main thread. Main.QueueMainThreadAction(() => { - FusableParticleManager.LoadParticleRenderSets(); Main.OnPreDraw += PrepareRenderTargets; }); @@ -376,7 +374,7 @@ namespace CalamityMod GameShaders.Hair.BindShader(ModContent.ItemType(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(0, 255, 171), ((float)player.Calamity().adrenaline / (float)player.Calamity().adrenalineMax)))); GameShaders.Hair.BindShader(ModContent.ItemType(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => Color.Lerp(player.hairColor, new Color(255, 83, 48), ((float)player.Calamity().rage / (float)player.Calamity().rageMax)))); GameShaders.Hair.BindShader(ModContent.ItemType(), new LegacyHairShaderData().UseLegacyMethod((Player player, Color newColor, ref bool lighting) => - { + { float flightTimeInterpolant = player.wingTime / player.wingTimeMax; if (player.mount.Active) flightTimeInterpolant = 1f; @@ -449,7 +447,6 @@ namespace CalamityMod Main.QueueMainThreadAction(() => { - FusableParticleManager.UnloadParticleRenderSets(); Main.OnPreDraw -= PrepareRenderTargets; }); @@ -499,7 +496,6 @@ namespace CalamityMod public static void PrepareRenderTargets(GameTime gameTime) { - FusableParticleManager.PrepareFusableParticleTargets(); DeathAshParticle.PrepareRenderTargets(); FluidFieldManager.Update(); } @@ -517,7 +513,8 @@ namespace CalamityMod saveMethodInfo.Invoke(null, new object[] { cfg }); else Instance.Logger.Error("TML ConfigManager.Save reflection failed. Method signature has changed. Notify Calamity Devs if you see this in your log."); - } catch + } + catch { Instance.Logger.Error("An error occurred while manually saving Calamity mod configuration. This may be due to a complex mod conflict. It is safe to ignore this error."); } diff --git a/Effects/CalamityShaders.cs b/Effects/CalamityShaders.cs index 83114d8232..62b0bfff95 100644 --- a/Effects/CalamityShaders.cs +++ b/Effects/CalamityShaders.cs @@ -1,5 +1,4 @@ using CalamityMod.Skies; -using Iced.Intel; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; using Terraria; @@ -124,14 +123,14 @@ namespace CalamityMod.Effects // Used by Devourer of Gods. Renders the portal that he escapes through at the end of phase 1. internal static Effect DoGPortalShader; - // Fusable particles. See the FusableParticleManager for comments on how this system works. - // These shaders are leveraged to render the results of the fusable particle simulation to the screen. + // Metaballs. See the MetaballManager class for comments on how this system works. + // These shaders are leveraged to render the results of the metaball simulation to the screen. // The "Base" shader draws the particles themselves. // The "Additive" shader actually FUSES the particles into their blobby mess. // // Backing textures vary. The primary use of this system is Gruesome Eminence. - internal static Effect BaseFusableParticleEdgeShader; - internal static Effect AdditiveFusableParticleEdgeShader; + internal static Effect MetaballEdgeShader; + internal static Effect AdditiveMetaballEdgeShader; // Used to render the results of Navier-Stokes fluid simulations. internal static Effect FluidShaders; @@ -178,7 +177,7 @@ namespace CalamityMod.Effects internal static Effect CircularGradientWithEdge; internal static Effect WavyOpacity; #endregion - + // // All below shaders were added by Amber // Authorship goes to Toasty @@ -187,7 +186,7 @@ namespace CalamityMod.Effects #region Amber's Shaders internal static Effect PrimitiveClearShader; #endregion - + // Shorthand to register a loaded shader in Terraria's graphics engine // All shaders registered this way are accessible under GameShaders.Misc // They will use the prefix described above @@ -340,11 +339,11 @@ namespace CalamityMod.Effects RegisterMiscShader(DoGPortalShader, "ScreenPass", "DoGPortal"); // These two shaders are often (but not always) used together. - BaseFusableParticleEdgeShader = LoadShader("ParticleFusion/BaseFusableParticleEdgeShader"); - RegisterMiscShader(BaseFusableParticleEdgeShader, "ParticlePass", "BaseFusableParticleEdge"); + MetaballEdgeShader = LoadShader("Metaballs/MetaballEdgeShader"); + RegisterMiscShader(MetaballEdgeShader, "ParticlePass", "MetaballEdge"); - AdditiveFusableParticleEdgeShader = LoadShader("ParticleFusion/AdditiveFusableParticleEdgeShader"); - RegisterMiscShader(AdditiveFusableParticleEdgeShader, "ParticlePass", "AdditiveFusableParticleEdge"); + AdditiveMetaballEdgeShader = LoadShader("Metaballs/AdditiveMetaballEdgeShader"); + RegisterMiscShader(AdditiveMetaballEdgeShader, "ParticlePass", "AdditiveMetaballEdge"); // This shader is not registered with the game but is invoked directly to render the results of fluid simulation. FluidShaders = LoadShader("FluidShaders"); diff --git a/Effects/ParticleFusion/AdditiveFusableParticleEdgeShader.fx b/Effects/Metaballs/AdditiveMetaballEdgeShader.fx similarity index 76% rename from Effects/ParticleFusion/AdditiveFusableParticleEdgeShader.fx rename to Effects/Metaballs/AdditiveMetaballEdgeShader.fx index b7c98d0961..039e453228 100644 --- a/Effects/ParticleFusion/AdditiveFusableParticleEdgeShader.fx +++ b/Effects/Metaballs/AdditiveMetaballEdgeShader.fx @@ -12,25 +12,16 @@ float uDirection; float3 uLightSource; float2 uImageSize0; float2 uImageSize1; -float edgeBorderSize; -bool borderShouldBeSolid; -float3 edgeBorderColor; -float2 screenArea; -float2 renderTargetArea; -float2 screenMoveOffset; -float2 generalBackgroundOffset; -bool invertedScreen; -float2 upscaleFactor; float4 uShaderSpecificData; +float2 screenArea; +float2 layerOffset; +float2 singleFrameScreenOffset; + float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0 { float2 originalCoords = coords; - if (invertedScreen) - coords.y = 1 - coords.y; - - // Account for screen movements. Not doing this causes the scene to move based on that. - coords += screenMoveOffset / renderTargetArea; + coords += layerOffset + singleFrameScreenOffset; float2 offset = 3 / screenArea; float4 color = tex2D(uImage0, coords); diff --git a/Effects/Metaballs/AdditiveMetaballEdgeShader.xnb b/Effects/Metaballs/AdditiveMetaballEdgeShader.xnb new file mode 100644 index 0000000000000000000000000000000000000000..504c6ffb0f535585bd9306cc25dc0189231a108e GIT binary patch literal 2888 zcmb_eF>E766rHsb&c_+$Bq%5%u}}pmvYe10AG$y;&V@u6Vr(B63F)-A8ON)0ykWho zyC4b|6ciLeP*V6Liqlb$f`TFi1qBiXlvkVth07FIQh9lAcE_HJE)ha}XLjEE^Z(5M ze`a>md~fZ}w6%Fj2PL-LP=I)sk*llg^F| z=Iyhr-wvGpw&(Wd?GI$o^Zf40QlZG-yj_kuVHC)fu8hLK>CD^J=vK#b-;oCm|F-O| zl$I9VR_T^p*pbV{<>l7|#Tq;-#P63LA7559c~}?Y(d<-$F)RpY6FPq8fTFEEXIB=5 zwpksICSYQ-AhJ+dXrW=Fb%sh@0Ext290nErU3b;DlAt^L_QN56`<+Yak0Nb0oRXNK?T7*$^CeAT^AamKXI(ZBYY zoVgRj=d3!uz&Pt|-oE<2biJ16t~;SKUU!ZGq;fh|)~4qMQg*Ke(wXG<@i{&`A06ia zt06sLo!{X(KCFrI*>1IZa(GO(`{ z7GE!1SzatGmX?;pDE>iIYuD>mrnxbSSI05^hH0te`YI+%*uMfd(K6|}JHY%le6DoK z**Z*h1Er&-5I?0l^B(Z+%Di;^FnL0ZyZQZT+q3V+lXHf5|4Tjcs7HOv3?|)DrPA@5 zx>5X!C|9-`=J(k2|Nn7r^{hEZ@f%{JSt;||lo6}8KK|^};|o3RRXTyzS)zDZ=cavV z!f!j}^tiU=IB`Z)2ilLE?>&n4*O=>Je7qLNbqwsEHa<;f2*()rW5^7Ix9WW%rn6#Z z0QG9^&yU^|qW>1Kc!?o_;07I~_)z3#7$deW3;pm2O>x{JaM4Fx_s}vpm*6+ZGdQ7Y zjD8vDE$D%j9ZnlDTQ)lx8?1p_Vg|OuzQ_#~$6FioOn3%7V{qiq&!!xC;xF+>umk#W z4eFGS!Icj 0) by ensuring all of the edge checks fail. + float alphaOffset = (1 - any(baseColor.a)); + + // Check if there are any empty pixels nearby. If there are, that means this pixel is at an edge, and should be colored accordingly. + float left = tex2D(metaballContents, convertFromScreenCoords(convertToScreenCoords(coords) + float2(-2, 0))).a + alphaOffset; + float right = tex2D(metaballContents, convertFromScreenCoords(convertToScreenCoords(coords) + float2(2, 0))).a + alphaOffset; + float top = tex2D(metaballContents, convertFromScreenCoords(convertToScreenCoords(coords) + float2(0, -2))).a + alphaOffset; + float bottom = tex2D(metaballContents, convertFromScreenCoords(convertToScreenCoords(coords) + float2(0, 2))).a + alphaOffset; + + // Use step instead of branching in order to determine whether neighboring pixels are invisible. + float leftHasNoAlpha = step(left, 0); + float rightHasNoAlpha = step(right, 0); + float topHasNoAlpha = step(top, 0); + float bottomHasNoAlpha = step(bottom, 0); + + // Use addition instead of the OR boolean operator to get a 0-1 value for whether an edge is invisible. + // The equivalent for AND would be multiplication. + float conditionOpacityFactor = 1 - saturate(leftHasNoAlpha + rightHasNoAlpha + topHasNoAlpha + bottomHasNoAlpha); + + // Calculate layer colors. + float4 layerColor = tex2D(overlayTexture, (coords + layerOffset + singleFrameScreenOffset) * screenSize / layerSize); + float4 defaultColor = layerColor * tex2D(metaballContents, coords) * sampleColor; + + // Lastly, use the aforementioned condition to switch between the colors. If conditionOpacityFactor is 1, the default color is + // zeroed out and the edge is toggled, and vice versa. + return (defaultColor * conditionOpacityFactor) + (edgeColor * sampleColor * (1 - conditionOpacityFactor)); +} +technique Technique1 +{ + pass ParticlePass + { + PixelShader = compile ps_2_0 PixelShaderFunction(); + } +} \ No newline at end of file diff --git a/Effects/Metaballs/MetaballEdgeShader.xnb b/Effects/Metaballs/MetaballEdgeShader.xnb new file mode 100644 index 0000000000000000000000000000000000000000..6ee03aac55f5a2019ab6d968069c0a70f010b8c1 GIT binary patch literal 2400 zcmb7E&u<$=6n?w@k(3&_PP;8y(YA2*MX+qWjQwHY z936C8;j;C)2*Qr_P%!v|ZVB;{)6-7SH#HLM`p@gkK2(RAxTF|NXd7%lI=Y2Q_ z#1VmXnZ^10e|!qs=YG2#ifEeK&7=?P%6&*dHc8=lV*in-_^uz&{i*MR6nQ?!Yw!s> z-XmAYqfnP6Cb8L#`^E9n@;X4x38GHR6*VUed5!zi5Um5R^JQ185-k9;Kl^e_o;jA5 zGL*X-VBWLn>#bvm)^FsY znQ=Uccd63&V3W_@N9+R|FENH#71%gm6IJr^0E2Ts#W3*}*!Bko+y25(XUC*7=u$vn zmO**C!eoer*~BmH`?j>@&e>+~dpI=YE-DAL%lW4~i_>?@5!L?8x^Rbv!(o;R;P6k$ z+`YN5p1L0|J5opC!_vbQntoQSo7-<$cdPZPRX^Y_j#cpwk2)@tTXyMP`_@{?F0Gf# zG@Qg=P;L88-7uS5lX!LdKE6e2Y~wQ~--kigH_&fmaCMw}4PzJM2t%L$lf*W=pSpju zo`7;rQuQUho^hk&S1)Q37f@6EUOEWpr$zTYZJWdK794CuB(wrNB7B Fe*xFPfDZrw literal 0 HcmV?d00001 diff --git a/Effects/ParticleFusion/AdditiveFusableParticleEdgeShader.xnb b/Effects/ParticleFusion/AdditiveFusableParticleEdgeShader.xnb deleted file mode 100644 index ca8ec969bea57f161c2d1399c11a6f886625b6b5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3448 zcmb_ezi%8x6n=Yl$b}djkP8Y+oM;G=bvhdxIZ_Oc&oK#Hi1A&(RMBQ{&bRV;_t@J_ zVwB>9C@5TjprA-`ky1o4MUW^EO5r~MDJfG#f+7Wlixer5m+#H)>^;slAjGq0_kC~P z_kPUI?Ct6Y3)hZV*IyvAzP2v7PT+U^Mp#_+?BY^jZ>Vd2uwE?tUZ}jVc(&0{PPn4% zx(X%=hk3sn*zKn4bS4TPsi5Qf-rRJt#D5coa?}c=K+Sn73In?}QCN@iJuc*nonkmi9yh$w9!x5qf$DiImpUWPM-u&c+=em66PR7|(4zAj z_L?e@@tMzN6Q%DnNkcGM7@_bnHesTp08!a*`2l5|JHp{04%Z%4mE(JLJJ?Lf?8ovr zx#=tC=fQFeBf8kO9XH%0`aL%OBgO&q(jUu&95zsfs@ z!80|3k_qqCe$M`0h}XyKS)aRt$Ev9TY9{<#qiU1izSXvJ z+=lBc+M%s|xh4@pb9i4b+d=3$EwyZSI@lG&�!HrssYdsY!}?9XJsrC3q8+;rZNtFR^V0W zp}y?BbswKEIjfSL~*x6T++*urHIBZpnc z`Dz$-4F3J&mMqNNz@24azi;zw@|VmHUd`|BFpd1huid#kb-6^@w?pCN${U4qm1?Ds zZ0thW-)Orn6%Ac;`)GT6+tO>q5f2ve-rMK9?;UkOyzu&e zS(6d0N%g#}NNmNdR%zRdU!!v6d`*5!N&f$@=jRWLxfj1jORJS~9u5|jPMEdjXJn29 ze`~P}&ZkE}e~U3MN6Q7~u^0~PY~%PWCgxzQWVX*6oHuoG+%#9uofSzQ=!!FG=*?j}At_z?T`P;USG-XC&u{a@Rs42-39P08U^o3m-0_~j0u%;Q?v zrhNp~F@TxFIoWrZ?%o3KVXd>gu=VggjDEP@OBmE;%rz6;)pZ}m+VDI`U3?2`o%=Dd XS=T)wM?ZF~ZM?2{CW!T<%g^#p3HzmO diff --git a/Effects/ParticleFusion/BaseFusableParticleEdgeShader.fx b/Effects/ParticleFusion/BaseFusableParticleEdgeShader.fx deleted file mode 100644 index e4155db9b9..0000000000 --- a/Effects/ParticleFusion/BaseFusableParticleEdgeShader.fx +++ /dev/null @@ -1,78 +0,0 @@ -sampler uImage0 : register(s0); -sampler uImage1 : register(s1); -float3 uColor; -float3 uSecondaryColor; -float uOpacity; -float uSaturation; -float uRotation; -float uTime; -float4 uSourceRect; -float2 uWorldPosition; -float uDirection; -float3 uLightSource; -float2 uImageSize0; -float2 uImageSize1; -float edgeBorderSize; -bool borderShouldBeSolid; -float3 edgeBorderColor; -float2 screenArea; -float2 renderTargetArea; -float2 screenMoveOffset; -float2 generalBackgroundOffset; -bool invertedScreen; -float2 upscaleFactor; -float4 uShaderSpecificData; - -float4 PixelShaderFunction(float4 sampleColor : TEXCOORD, float2 coords : TEXCOORD0) : COLOR0 -{ - float2 originalCoords = coords; - if (invertedScreen) - coords.y = 1 - coords.y; - - // Account for screen movements. Not doing this causes the scene to move based on that. - coords += screenMoveOffset / renderTargetArea; - - float4 color = tex2D(uImage0, coords); - - // Determine how much downscaling is required to reasonably zoom in on things. - float downscaleFactor = float2(5, 5) / upscaleFactor / max(renderTargetArea.x, renderTargetArea.y) / 2; - float2 backgroundCoords = frac((renderTargetArea * (originalCoords + generalBackgroundOffset * upscaleFactor) + uWorldPosition) * downscaleFactor); - float4 backgroundColor = tex2D(uImage1, backgroundCoords); - - // Equivalent to edgeBorderSize pixels in both the X and Y direction. - float2 edgeOffset = float2(edgeBorderSize, edgeBorderSize) / renderTargetArea; - - // Check if the cardinal directions are not intersecting with any other active parts of the render target. - // If one of them isn't, that means that a border should be rendered. - float4 aboveColor = tex2D(uImage0, coords + float2(0, edgeOffset.y)); - float4 belowColor = tex2D(uImage0, coords - float2(0, edgeOffset.y)); - float4 leftColor = tex2D(uImage0, coords + float2(edgeOffset.x, 0)); - float4 rightColor = tex2D(uImage0, coords - float2(edgeOffset.x, 0)); - - // Invert color check thresholds based on whether the border should be solid when drawing. - float checkThreshold = 0.02; - if (!borderShouldBeSolid) - checkThreshold = 0.95; - - // If any cardinal color is sufficiently close to transparency choose an edge border color. - // Opacity multipliers ensure that this does not affect completely invisible areas of the render target. - if (aboveColor.r < checkThreshold || belowColor.r < checkThreshold || leftColor.r < checkThreshold || rightColor.r < checkThreshold) - { - float borderOpacity = color.a; - - // Use binary opacity if the border should be solid when drawing. - if (borderOpacity > 0 && borderShouldBeSolid) - borderOpacity = 1; - - return float4(edgeBorderColor, 1) * borderOpacity; - } - - return backgroundColor; -} -technique Technique1 -{ - pass ParticlePass - { - PixelShader = compile ps_2_0 PixelShaderFunction(); - } -} \ No newline at end of file diff --git a/Effects/ParticleFusion/BaseFusableParticleEdgeShader.xnb b/Effects/ParticleFusion/BaseFusableParticleEdgeShader.xnb deleted file mode 100644 index c544bbed0156d0904749d1f394781059b3466c5d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4648 zcmdT{J#1T56u!@KQnv{tK!!ph;enw@k>!L0rKnZYBu!h9(hxh40jYX@zK$Pp{KE5l z{bg_^28IqGI(BfS4pjpvNDLh+wIc%(j2$u*DFZ`=I&`dJzVANY=Nl)10u#r%zUQ3# zoqNtb=l(d0A532C6o+0F!ur}e<2t@q^@>4ev0`Ute0xP+^!(+_lvfF4CCHp87Nrx+ zOS>Tbq4ZwplfJ!La-Hf>`XlLAU9WO4jxyF8Sh3(uEb=Y4rO z?=8#9(ecp{r#OCI4j1HDc5Lh&L9%ME2=Pnz)BAl&jJ~Y>jjf5!h(CZXi8dIC@plSb zczVTNl3AfK6Y*%ov@pY>11bwGFfdwYsKh=9;gnbQd=cB+F#x;SF!nGf9j{Wb{mYRt zaioo?Q{VK@M%s@So?W#aH@Hk$<9jp!IuqYRe9lIO?Eqr&mu*bB` z`U~4cdyX+YHf+o_F%Pn^Bqu!|hmL+)>+RPG0miiHhkQQ5m%OlCn3OrM>=xqq@`jy` z8747tueN-)_9}f`H*DMU!TeVpU&_jHU)rr4KKu(C9Btvt3f7jl{UsShmMz=oe`6c@ zJL6rDXN$$ER7Y2@X`CCfN$s&7gnmg@ByOQe+g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|cS$q_6l{UqLW_@Tm__l^QO zlG|#ghV#t+H}e{6p7W_=hchRvn4_mM%Wrz)5|MUA_F~h?%^{l`Zzvl`abz~0bWmBa zj*YpoW8ZnL2(eSwr!>UHx3vIVCg!04u4McK`qY literal 0 HcmV?d00001 diff --git a/Particles/Metaballs/GruesomeEminence_Ghost_Layer1.png b/Graphics/Metaballs/GruesomeEminence_Ghost_Layer1.png similarity index 100% rename from Particles/Metaballs/GruesomeEminence_Ghost_Layer1.png rename to Graphics/Metaballs/GruesomeEminence_Ghost_Layer1.png diff --git a/Particles/Metaballs/GruesomeEminence_Ghost_Layer2.png b/Graphics/Metaballs/GruesomeEminence_Ghost_Layer2.png similarity index 100% rename from Particles/Metaballs/GruesomeEminence_Ghost_Layer2.png rename to Graphics/Metaballs/GruesomeEminence_Ghost_Layer2.png diff --git a/Particles/Metaballs/GruesomeEminence_Ghost_Layer3.png b/Graphics/Metaballs/GruesomeEminence_Ghost_Layer3.png similarity index 100% rename from Particles/Metaballs/GruesomeEminence_Ghost_Layer3.png rename to Graphics/Metaballs/GruesomeEminence_Ghost_Layer3.png diff --git a/Particles/Metaballs/GruesomeEminence_Ghost_Layer4.png b/Graphics/Metaballs/GruesomeEminence_Ghost_Layer4.png similarity index 100% rename from Particles/Metaballs/GruesomeEminence_Ghost_Layer4.png rename to Graphics/Metaballs/GruesomeEminence_Ghost_Layer4.png diff --git a/Particles/Metaballs/GruesomeEminence_Ghost_Layer5.png b/Graphics/Metaballs/GruesomeEminence_Ghost_Layer5.png similarity index 100% rename from Particles/Metaballs/GruesomeEminence_Ghost_Layer5.png rename to Graphics/Metaballs/GruesomeEminence_Ghost_Layer5.png diff --git a/Graphics/Metaballs/GruesomeMetaball.cs b/Graphics/Metaballs/GruesomeMetaball.cs new file mode 100644 index 0000000000..e991b5bf5e --- /dev/null +++ b/Graphics/Metaballs/GruesomeMetaball.cs @@ -0,0 +1,144 @@ +using CalamityMod.Graphics.Metaballs; +using CalamityMod.Projectiles.Magic; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System; +using System.Collections.Generic; +using System.Linq; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Graphics.Metaballs +{ + public class GruesomeMetaball : Metaball + { + public class GruesomeParticle + { + public float Size; + + public Vector2 Velocity; + + public Vector2 Center; + + public GruesomeParticle(Vector2 center, Vector2 velocity, float size) + { + Center = center; + Velocity = velocity; + Size = size; + } + + public void Update() + { + Size *= 0.94f; + Center += Velocity; + Velocity *= 0.96f; + } + } + + private static List> layerAssets; + + public static List Particles + { + get; + private set; + } = new(); + + // Check if there are any extraneous particles or if the Gruesome Eminence projectile is present when deciding if this particle should be drawn. + public override bool AnythingToDraw => Particles.Any() || CalamityUtils.AnyProjectiles(ModContent.ProjectileType()); + + public override IEnumerable Layers + { + get + { + for (int i = 0; i < layerAssets.Count; i++) + yield return layerAssets[i].Value; + } + } + + public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles; + + public override Color EdgeColor => new(61, 6, 2); + + public override void Load() + { + if (Main.netMode == NetmodeID.Server) + return; + + // Load layer assets. + layerAssets = new(); + + for (int i = 1; i <= 5; i++) + layerAssets.Add(ModContent.Request($"CalamityMod/Graphics/Metaballs/GruesomeEminence_Ghost_Layer{i}", AssetRequestMode.ImmediateLoad)); + } + + public override void ClearInstances() => Particles.Clear(); + + public override void Update() + { + // Update all particle instances. + // Once sufficiently small, they vanish. + for (int i = 0; i < Particles.Count; i++) + Particles[i].Update(); + Particles.RemoveAll(p => p.Size <= 2.5f); + } + + public static void SpawnParticle(Vector2 position, Vector2 velocity, float size) => + Particles.Add(new(position, velocity, size)); + + public override Vector2 CalculateManualOffsetForLayer(int layerIndex) + { + switch (layerIndex) + { + // Background. + case 0: + return Vector2.UnitX * Main.GlobalTimeWrappedHourly * 0.03f; + + // Gaseous skulls. + case 1: + Vector2 offset = Vector2.One * (float)Math.Cos(Main.GlobalTimeWrappedHourly * 0.041f) * 2f; + offset = offset.RotatedBy((float)Math.Cos(Main.GlobalTimeWrappedHourly * 0.08f) * 0.97f); + return offset; + + // Spooky faces 1. + case 2: + offset = (Main.GlobalTimeWrappedHourly * 2.02f).ToRotationVector2() * 0.036f; + offset.Y += (float)Math.Cos(Main.GlobalTimeWrappedHourly * 0.161f) * 0.5f + 0.5f; + return offset; + + // Spooky faces 2. + case 3: + offset = Vector2.UnitX * Main.GlobalTimeWrappedHourly * -0.04f + (Main.GlobalTimeWrappedHourly * 1.89f).ToRotationVector2() * 0.03f; + offset.Y += CalamityUtils.PerlinNoise2D(Main.GlobalTimeWrappedHourly * 0.187f, Main.GlobalTimeWrappedHourly * 0.193f, 2, 466920161) * 0.025f; + return offset; + + // Spooky faces 3. + case 4: + offset = Vector2.UnitX * Main.GlobalTimeWrappedHourly * 0.037f + (Main.GlobalTimeWrappedHourly * 1.77f).ToRotationVector2() * 0.04725f; + offset.Y += CalamityUtils.PerlinNoise2D(Main.GlobalTimeWrappedHourly * 0.187f, Main.GlobalTimeWrappedHourly * 0.193f, 2, 577215664) * 0.05f; + return offset; + } + + return Vector2.Zero; + } + + public override void DrawInstances() + { + Texture2D tex = ModContent.Request("CalamityMod/ExtraTextures/BasicCircle").Value; + + // Draw all particles. + foreach (GruesomeParticle particle in Particles) + { + Vector2 drawPosition = particle.Center - Main.screenPosition; + Vector2 origin = tex.Size() * 0.5f; + Vector2 scale = Vector2.One * particle.Size / tex.Size(); + Main.spriteBatch.Draw(tex, drawPosition, null, Color.White, 0f, origin, scale, 0, 0f); + } + + // Draw gruesome eminence ghost heads. + foreach (Projectile eminence in CalamityUtils.AllProjectilesByID(ModContent.ProjectileType())) + eminence.ModProjectile().DrawHeadForMetaball(); + } + } +} diff --git a/Graphics/Metaballs/Metaball.cs b/Graphics/Metaballs/Metaball.cs new file mode 100644 index 0000000000..0ad632f8ae --- /dev/null +++ b/Graphics/Metaballs/Metaball.cs @@ -0,0 +1,151 @@ +using System.Collections.Generic; +using System.Linq; +using CalamityMod.Effects; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Graphics.Metaballs +{ + public abstract class Metaball : ModType + { + internal List LayerTargets = new(); + + ///

+ /// Required utility that is used to determine whether this metaball has anything to draw.

+ /// This exists for efficiency, ensuring that as few operations are executed as possible when not required. + ///
+ public abstract bool AnythingToDraw + { + get; + } + + /// + /// The collection of all textures to draw on top of the metaball contents. + /// + public abstract IEnumerable Layers + { + get; + } + + /// + /// The draw layer in which metaballs should be drawn. + /// + public abstract MetaballDrawLayer DrawContext + { + get; + } + + /// + /// The color that metaballs should draw at the edge between air and particle contents. + /// + public abstract Color EdgeColor + { + get; + } + + /// + /// Whether the layer overlay contents from should be fixed to the screen.

+ /// When true, the texture will be statically drawn to the screen with no respect for world position. + ///
+ public virtual bool FixedToScreen => false; + + /// + /// Optionally overridable method for clearing particle instances as necessary. This is used automatically in contexts such as world unloads. + /// + public virtual void ClearInstances() { } + + /// + /// Optionally overridable method that can be used to update the metaball set. This can be useful for over-time update effects or for keeping special data particle types all updated. + /// + public virtual void Update() { } + + /// + /// Optionally overridable method that can be used to make layers offset when drawn, to allow for layer-specific animations. Defaults to , aka no animation. + /// + public virtual Vector2 CalculateManualOffsetForLayer(int layerIndex) => Vector2.Zero; + + /// + /// Optionally overridable method that allows for preparations prior to the drawing of the individual raw metaball instances (Not the final result).

+ /// An example of this could be having the metaball particles drawn with . + ///
+ /// Shorthand parameter for . + public virtual void PrepareSpriteBatch(SpriteBatch spriteBatch) { } + + /// + /// Optionally overridable method that defines for preparations for the render target. Defaults to using the typical texture overlay behavior. + /// + /// The layer index that should be prepared for. + public virtual void PrepareShaderForTarget(int layerIndex) + { + // Store the graphics device and shader in easy to use local variables. + var metaballShader = CalamityShaders.MetaballEdgeShader; + var gd = Main.instance.GraphicsDevice; + + // Fetch the layer texture. This is the texture that will be overlayed over the greyscale contents on the screen. + Texture2D layerTexture = Layers.ElementAt(layerIndex); + + // Calculate the layer scroll offset. This is used to ensure that the texture contents of the given metaball have parallax, rather than being static over the screen + // regardless of world position. + // This may be toggled off optionally by the metaball. + Vector2 screenSize = new(Main.screenWidth, Main.screenHeight); + Vector2 layerScrollOffset = Main.screenPosition / screenSize + CalculateManualOffsetForLayer(layerIndex); + if (FixedToScreen) + layerScrollOffset = Vector2.Zero; + + // Supply shader parameter values. + metaballShader.Parameters["layerSize"]?.SetValue(layerTexture.Size()); + metaballShader.Parameters["screenSize"]?.SetValue(screenSize); + metaballShader.Parameters["layerOffset"]?.SetValue(layerScrollOffset); + metaballShader.Parameters["edgeColor"]?.SetValue(EdgeColor.ToVector4()); + metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue((Main.screenLastPosition - Main.screenPosition) / screenSize); + + // Supply the metaball's layer texture to the graphics device so that the shader can read it. + gd.Textures[1] = layerTexture; + gd.SamplerStates[1] = SamplerState.LinearWrap; + + // Apply the metaball shader. + metaballShader.CurrentTechnique.Passes[0].Apply(); + } + + /// + /// Required overridable that is intended to draw all metaball instances. + /// + public abstract void DrawInstances(); + + protected sealed override void Register() + { + // Register this metaball mod TML's inbuilt ModType handlers. + ModTypeLookup.Register(this); + + // Store this metaball instance in the personalized manager so that it can be kept track of for rendering purposes. + if (!MetaballManager.metaballs.Contains(this)) + MetaballManager.metaballs.Add(this); + + // Disallow render target creation on servers. + if (Main.netMode == NetmodeID.Server) + return; + + // Generate render targets. + Main.QueueMainThreadAction(() => + { + // Load render targets. + int layerCount = Layers.Count(); + for (int i = 0; i < layerCount; i++) + LayerTargets.Add(new(true, ManagedRenderTarget.CreateScreenSizedTarget)); + }); + } + + /// + /// Disposes of all unmanaged GPU resources used up by the . This is called automatically on mod unload.

+ /// It is your responsibility to recreate layer targets later if you call this method manually. + ///
+ public void Dispose() + { + for (int i = 0; i < LayerTargets.Count; i++) + LayerTargets[i]?.Dispose(); + } + } +} diff --git a/Graphics/Metaballs/MetaballDrawLayer.cs b/Graphics/Metaballs/MetaballDrawLayer.cs new file mode 100644 index 0000000000..d061aabe61 --- /dev/null +++ b/Graphics/Metaballs/MetaballDrawLayer.cs @@ -0,0 +1,9 @@ +namespace CalamityMod.Graphics.Metaballs +{ + public enum MetaballDrawLayer + { + BeforeNPCs, + BeforeProjectiles, + AfterProjectiles, + } +} diff --git a/Graphics/Metaballs/MetaballManager.cs b/Graphics/Metaballs/MetaballManager.cs new file mode 100644 index 0000000000..832785925e --- /dev/null +++ b/Graphics/Metaballs/MetaballManager.cs @@ -0,0 +1,135 @@ +using System.Collections.Generic; +using System.Linq; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Graphics.Metaballs +{ + public class MetaballManager : ModSystem + { + internal static readonly List metaballs = new(); + + public override void OnModLoad() + { + // Prepare event subscribers. + RenderTargetManager.RenderTargetUpdateLoopEvent += PrepareMetaballTargets; + On_Main.DrawProjectiles += DrawMetaballsAfterProjectiles; + On_Main.DrawNPCs += DrawMetaballsBeforeNPCs; + } + + public override void OnModUnload() + { + // Clear all unmanaged metaball target resources on the GPU on mod unload. + Main.QueueMainThreadAction(() => + { + foreach (Metaball metaball in metaballs) + metaball?.Dispose(); + }); + } + + public override void OnWorldUnload() + { + foreach (Metaball metaball in metaballs) + metaball.ClearInstances(); + } + + private void PrepareMetaballTargets() + { + // Get a list of all metaballs currently in use. + var activeMetaballs = metaballs.Where(m => m.AnythingToDraw); + + // Don't bother wasting resources if metaballs are not in use at the moment. + if (!activeMetaballs.Any()) + return; + + // Prepare the sprite batch for drawing. Metaballs may restart the sprite batch via PrepareSpriteBatch if their implementation requires it. + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.Default, Main.Rasterizer, null, Matrix.Identity); + + var gd = Main.instance.GraphicsDevice; + foreach (Metaball metaball in activeMetaballs) + { + // Update the metaball collection. + if (!Main.gamePaused) + metaball.Update(); + + // Prepare the sprite batch in accordance to the needs of the metaball instance. By default this does nothing, + metaball.PrepareSpriteBatch(Main.spriteBatch); + + // Draw the raw contents of the metaball to each of its render targets. + foreach (ManagedRenderTarget target in metaball.LayerTargets) + { + gd.SetRenderTarget(target); + gd.Clear(Color.Transparent); + metaball.DrawInstances(); + + // Flush metaball contents to its render target and reset the sprite batch for the next iteration. + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.Default, Main.Rasterizer, null, Matrix.Identity); + } + } + + // Return to the backbuffer and end the sprite batch. + gd.SetRenderTarget(null); + Main.spriteBatch.End(); + } + + private void DrawMetaballsAfterProjectiles(On_Main.orig_DrawProjectiles orig, Main self) + { + if (AnyActiveMetaballsAtLayer(MetaballDrawLayer.BeforeProjectiles)) + { + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointWrap, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + DrawMetaballs(MetaballDrawLayer.BeforeProjectiles); + Main.spriteBatch.End(); + } + + orig(self); + + if (AnyActiveMetaballsAtLayer(MetaballDrawLayer.AfterProjectiles)) + { + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointWrap, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + DrawMetaballs(MetaballDrawLayer.AfterProjectiles); + Main.spriteBatch.End(); + } + } + + private void DrawMetaballsBeforeNPCs(On_Main.orig_DrawNPCs orig, Main self, bool behindTiles) + { + if (!behindTiles && AnyActiveMetaballsAtLayer(MetaballDrawLayer.BeforeNPCs)) + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointWrap, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + DrawMetaballs(MetaballDrawLayer.BeforeNPCs); + Main.spriteBatch.ExitShaderRegion(); + } + orig(self, behindTiles); + } + + /// + /// Checks if a metaball of a given layering type is currently in use. This is used to minimize needless restarts when there is nothing to draw. + /// + /// The metaball layer type to check against. + internal static bool AnyActiveMetaballsAtLayer(MetaballDrawLayer layerType) => + metaballs.Any(m => m.AnythingToDraw && m.DrawContext == layerType); + + /// + /// Draws all metaballs of a given . Used for layer ordering reasons. + /// + /// The layer type to draw with. + public static void DrawMetaballs(MetaballDrawLayer layerType) + { + foreach (Metaball metaball in metaballs.Where(m => m.DrawContext == layerType && m.AnythingToDraw)) + { + for (int i = 0; i < metaball.LayerTargets.Count; i++) + { + // Prepare shaders for the given layer target. + metaball.PrepareShaderForTarget(i); + + // Draw the metaball's raw contents with the shader. + Main.spriteBatch.Draw(metaball.LayerTargets[i], Main.screenLastPosition - Main.screenPosition, Color.White); + } + } + } + } +} diff --git a/Graphics/Metaballs/PaintParticleSets.cs b/Graphics/Metaballs/PaintParticleSets.cs new file mode 100644 index 0000000000..bfe0fc2cc7 --- /dev/null +++ b/Graphics/Metaballs/PaintParticleSets.cs @@ -0,0 +1,132 @@ +using CalamityMod.Effects; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.Collections.Generic; +using System.Linq; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Graphics.Metaballs +{ + public class CyanPaint : PaintMetaball + { + public override Color EdgeColor => Color.Cyan * 0.7f; + } + + public class BluePaint : PaintMetaball + { + public override Color EdgeColor => Color.Blue * 0.7f; + } + + public class MagentaPaint : PaintMetaball + { + public override Color EdgeColor => Color.Magenta * 0.7f; + } + + public class LimePaint : PaintMetaball + { + public override Color EdgeColor => Color.Lime * 0.7f; + } + + public class YellowPaint : PaintMetaball + { + public override Color EdgeColor => Color.Yellow * 0.7f; + } + + public abstract class PaintMetaball : Metaball + { + public class PaintParticle + { + public float Size; + + public Vector2 Center; + + public PaintParticle(Vector2 center, float size) + { + Center = center; + Size = size; + } + + public void Update() + { + Size = MathHelper.Clamp(Size - 0.1f, 0f, 200f) * 0.997f; + if (Size < 20f) + Size = Size * 0.8f - 1f; + } + } + + // This list is personalized between the various subclasses. + public List Particles + { + get; + private set; + } = new(); + + public override bool AnythingToDraw => Particles.Any(); + + public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles; + + public override IEnumerable Layers + { + get + { + yield return ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value; + } + } + + public override void ClearInstances() => Particles.Clear(); + + public override void PrepareShaderForTarget(int layerIndex) + { + // Store the shader in an easy to use local variable. + var metaballShader = CalamityShaders.AdditiveMetaballEdgeShader; + + // Calculate the layer scroll offset. This is used to ensure that the texture contents of the given metaball have parallax, rather than being static over the screen + // regardless of world position. + Vector2 screenSize = new(Main.screenWidth, Main.screenHeight); + + // Supply shader parameter values. + metaballShader.Parameters["screenArea"]?.SetValue(screenSize); + metaballShader.Parameters["layerOffset"]?.SetValue(Vector2.Zero); + metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero); + + // Apply the metaball shader. + metaballShader.CurrentTechnique.Passes[0].Apply(); + } + + public void SpawnParticle(Vector2 position, float size) => + Particles.Add(new(position, size)); + + public override void Update() + { + // Update all particle instances. + // Once sufficiently small, they vanish. + for (int i = 0; i < Particles.Count; i++) + Particles[i].Update(); + Particles.RemoveAll(p => p.Size <= 3f); + } + + public override void PrepareSpriteBatch(SpriteBatch spriteBatch) + { + // Draw with additive blending. + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Additive, SamplerState.PointClamp, DepthStencilState.Default, Main.Rasterizer, null, Matrix.Identity); + } + + public override void DrawInstances() + { + Texture2D tex = ModContent.Request("CalamityMod/ExtraTextures/SmallGreyscaleCircle").Value; + + // Draw all particles. + foreach (PaintParticle particle in Particles) + { + Vector2 drawPosition = particle.Center - Main.screenPosition; + Vector2 origin = tex.Size() * 0.5f; + Vector2 scale = Vector2.One * particle.Size / tex.Size(); + Color paintColor = Color.Lerp(EdgeColor, new Color(0f, 0f, 1f), Utils.GetLerpValue(50f, 100f, particle.Size, true) * 0.1f) * 1.2f; + + Main.spriteBatch.Draw(tex, drawPosition, null, paintColor, 0f, origin, scale, 0, 0f); + } + } + } +} diff --git a/Graphics/Metaballs/RancorLavaMetaball.cs b/Graphics/Metaballs/RancorLavaMetaball.cs new file mode 100644 index 0000000000..60882cf578 --- /dev/null +++ b/Graphics/Metaballs/RancorLavaMetaball.cs @@ -0,0 +1,121 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.ModLoader; +using Terraria; +using System.Collections.Generic; +using System.Linq; +using CalamityMod.Effects; +using System; + +namespace CalamityMod.Graphics.Metaballs +{ + // CONSIDER -- Dominic 01NOV2023 This really should not be a metaball. Some sort of separately drawn fire effect would be far more suitable, and overall less awkward. + // However, for consistency with the previous effect, I'll leave it as is. + public class RancorLavaMetaball : Metaball + { + public class LavaParticle + { + public int Time; + + public float Size; + + public Vector2 Center; + + public LavaParticle(Vector2 center, float size) + { + Center = center; + Size = size; + } + + public void Update() + { + Time++; + Size = MathHelper.Clamp(Size - 0.24f, 0f, 200f) * 0.9956f; + if (Size < 15f) + Size = Size * 0.95f - 0.9f; + } + } + + public static List Particles + { + get; + private set; + } = new(); + + public override bool AnythingToDraw => Particles.Any(); + + public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles; + + public override IEnumerable Layers + { + get + { + yield return ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value; + } + } + + public override Color EdgeColor => new(255, 56, 3); + + public override void ClearInstances() => Particles.Clear(); + + public override void PrepareShaderForTarget(int layerIndex) + { + // Store the shader in an easy to use local variable. + var metaballShader = CalamityShaders.AdditiveMetaballEdgeShader; + + // Calculate the layer scroll offset. This is used to ensure that the texture contents of the given metaball have parallax, rather than being static over the screen + // regardless of world position. + Vector2 screenSize = new(Main.screenWidth, Main.screenHeight); + + // Supply shader parameter values. + metaballShader.Parameters["screenArea"]?.SetValue(screenSize); + metaballShader.Parameters["layerOffset"]?.SetValue(Vector2.Zero); + metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero); + + // Apply the metaball shader. + metaballShader.CurrentTechnique.Passes[0].Apply(); + } + + public static void SpawnParticle(Vector2 position, float size) => + Particles.Add(new(position, size)); + + public override void Update() + { + // Update all particle instances. + // Once sufficiently small, they vanish. + for (int i = 0; i < Particles.Count; i++) + Particles[i].Update(); + Particles.RemoveAll(p => p.Size <= 3f); + } + + public override void PrepareSpriteBatch(SpriteBatch spriteBatch) + { + // Draw with additive blending. + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Additive, SamplerState.PointClamp, DepthStencilState.Default, Main.Rasterizer, null, Matrix.Identity); + } + + public override void DrawInstances() + { + Texture2D tex = ModContent.Request("CalamityMod/ExtraTextures/SmallGreyscaleCircle").Value; + + // Draw all particles. + foreach (LavaParticle particle in Particles) + { + Vector2 drawPosition = particle.Center - Main.screenPosition; + Vector2 origin = tex.Size() * 0.5f; + Vector2 scale = Vector2.One * particle.Size / tex.Size(); + Color lavaColor = EdgeColor * 1.2f; + + // Make the lava color vary slightly based on position, to make the effect less monotonous. + lavaColor.B = (byte)(lavaColor.B + (int)(MathF.Cos(particle.Center.Y * 0.015f + Main.GlobalTimeWrappedHourly * 0.1f) * 3f)); + + // Make the lava color bright for the first few frames of its existence. + float brightnessInterpolant = Utils.GetLerpValue(10f, 2f, particle.Time, true) * 0.67f; + lavaColor = Color.Lerp(lavaColor, Color.Wheat, brightnessInterpolant); + + Main.spriteBatch.Draw(tex, drawPosition, null, lavaColor, 0f, origin, scale, 0, 0f); + } + } + } +} diff --git a/Graphics/Metaballs/StreamGougeLayer.png b/Graphics/Metaballs/StreamGougeLayer.png new file mode 100644 index 0000000000000000000000000000000000000000..826907fa0f2b51d9471ea33528ea1177eb1ec8f3 GIT binary patch literal 3160 zcmV-e45#ynP)Px#1ZP1_K>z@;j|==^1po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EzcNkPT2) zFNG4jR=i_kAtS97%`&5?Visip<~0el?INNl90&(FAU6wBEyyos}Iq$Qu` z33S!=;I_BMibm{BnbtNEx2ltzo!;Ov-Lej~R99L|N6z$WoqM7{GapL8LL?)IU z-iVfoi`9pgtRQn-)RA+sMku~zBpz5y3lxvEZy-mwMrB@oY$GE6=lcE=7AY?uU9v;A zvR|{MP%e_+K5lqeWe#s7{|cANagb0H$>ydg2xv~pMh${W5#M06HL}YhM(SUyQv-Gb ziW#M5M6KS}_fLiP1i&yr@-&t)QXX2uTDSx7o(_WP)+nF?@rDru0Ro@w$(Uh)Pq;PdA%UsO}7$}Sn21vD>BT*byRM%2g_k0@dwaoP*L2t`ye85qgk zm?m_)>FJ5|rKlO}JBk=coDXb-KB39Xh=F)Y{NX{_gVF{H8YAs3S>sGobXv(seld$6 zk#PA0)7xge(4i=ym5@6gPUz6eX6(=GXoMi3`2;jBVh=zf;qnQl{}4v|s)E#WClt+`XyfokP=z)OI!150m$xx8({HM#?vTGMTkQUSpgX=1!-R7q<2T(a zVLu7GSx4&$v95jD$c!@{=1Uk6)SOAK)Q0TFgJ#}zik(_jq0io8!dW&JGBUG5a+oER ztk`9LwqhRm|~l=O&HWRkUWMFsyawJgeph{G|xBZ48;&^(q4>+3;s8#>>%wB zsvs56{FfUs_Lii30SSi?2UNCUAbBqqGO}-F{= LayerAsset + { + get; + private set; + } + + public static List Particles + { + get; + private set; + } = new(); + + public override bool AnythingToDraw => Particles.Any(); + + public override IEnumerable Layers + { + get + { + yield return LayerAsset.Value; + } + } + + public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles; + + public override Color EdgeColor => Color.Lerp(Color.DarkBlue, Color.Black, 0.75f); + + public override void Load() + { + if (Main.netMode == NetmodeID.Server) + return; + + // Load the layer asset wrapper. + LayerAsset = ModContent.Request($"CalamityMod/Graphics/Metaballs/StreamGougeLayer", AssetRequestMode.ImmediateLoad); + } + + public override void Update() + { + // Update all particle instances. + // Once sufficiently small, they vanish. + for (int i = 0; i < Particles.Count; i++) + Particles[i].Update(); + Particles.RemoveAll(p => p.Size <= 2f); + } + + public static void SpawnParticle(Vector2 position, Vector2 velocity, float size) => + Particles.Add(new(position, velocity, size)); + + // Make the texture scroll. + public override Vector2 CalculateManualOffsetForLayer(int layerIndex) + { + return Vector2.UnitX * Main.GlobalTimeWrappedHourly * 0.037f; + } + + public override void DrawInstances() + { + Texture2D tex = ModContent.Request("CalamityMod/ExtraTextures/BasicCircle").Value; + + foreach (CosmicParticle particle in Particles) + { + Vector2 drawPosition = particle.Center - Main.screenPosition; + Vector2 origin = tex.Size() * 0.5f; + Vector2 scale = Vector2.One * particle.Size / tex.Size(); + Main.spriteBatch.Draw(tex, drawPosition, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0f); + } + } + } +} diff --git a/Graphics/Metaballs/VoidGeneratorMetaball.cs b/Graphics/Metaballs/VoidGeneratorMetaball.cs new file mode 100644 index 0000000000..69029411f3 --- /dev/null +++ b/Graphics/Metaballs/VoidGeneratorMetaball.cs @@ -0,0 +1,69 @@ +using System.Collections.Generic; +using System.Linq; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; +using static CalamityMod.Graphics.Metaballs.StreamGougeMetaball; + +namespace CalamityMod.Graphics.Metaballs +{ + public class VoidGeneratorMetaball : Metaball + { + public static List Particles + { + get; + private set; + } = new(); + + public override bool AnythingToDraw => Particles.Any(); + + public override IEnumerable Layers + { + get + { + yield return LayerAsset.Value; + } + } + + public override MetaballDrawLayer DrawContext => MetaballDrawLayer.BeforeProjectiles; + + public override Color EdgeColor => Color.Lerp(Color.Purple, Color.Black, 0.75f); + + public override void Update() + { + // Update all particle instances. + // Once sufficiently small, they vanish. + for (int i = 0; i < Particles.Count; i++) + Particles[i].Update(); + Particles.RemoveAll(p => p.Size <= 2f); + } + + public static CosmicParticle SpawnParticle(Vector2 position, Vector2 velocity, float size) + { + CosmicParticle particle = new(position, velocity, size); + Particles.Add(particle); + + return particle; + } + + // Make the texture scroll. + public override Vector2 CalculateManualOffsetForLayer(int layerIndex) + { + return Vector2.UnitX * Main.GlobalTimeWrappedHourly * 0.037f; + } + + public override void DrawInstances() + { + Texture2D tex = ModContent.Request("CalamityMod/ExtraTextures/BasicCircle").Value; + + foreach (CosmicParticle particle in Particles) + { + Vector2 drawPosition = particle.Center - Main.screenPosition; + Vector2 origin = tex.Size() * 0.5f; + Vector2 scale = Vector2.One * particle.Size / tex.Size(); + Main.spriteBatch.Draw(tex, drawPosition, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0f); + } + } + } +} diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs index e847402fc2..b8652d9518 100644 --- a/ILEditing/MechanicILChanges.cs +++ b/ILEditing/MechanicILChanges.cs @@ -16,7 +16,6 @@ using CalamityMod.NPCs.AstrumAureus; using CalamityMod.NPCs.Crabulon; using CalamityMod.NPCs.Ravager; using CalamityMod.Particles; -using CalamityMod.Particles.Metaballs; using CalamityMod.Projectiles; using CalamityMod.Projectiles.Typeless; using CalamityMod.Systems; @@ -261,7 +260,7 @@ namespace CalamityMod.ILEditing self.dashTime = 15; return; } - + dashing = true; self.dashTime = 0; self.timeSinceLastDashStarted = 0; @@ -707,7 +706,6 @@ namespace CalamityMod.ILEditing private static void DrawFusableParticles(Terraria.On_Main.orig_SortDrawCacheWorms orig, Main self) { DeathAshParticle.DrawAll(); - FusableParticleManager.RenderAllFusableParticles(); if (Main.LocalPlayer.dye.Any(dyeItem => dyeItem.type == ModContent.ItemType())) Main.LocalPlayer.Calamity().ProfanedMoonlightAuroraDrawer?.Draw(Main.LocalPlayer.Center - Main.screenPosition, false, Main.GameViewMatrix.TransformationMatrix, Matrix.Identity); @@ -739,23 +737,23 @@ namespace CalamityMod.ILEditing Main.tileBatch.Draw(liquidTexture, position, liquidSize, colors, default(Vector2), 1f, SpriteEffects.None); return; } - + Texture2D slopeTexture = SelectLavaTexture(liquidType == 1 ? CustomLavaManagement.LavaSlopeTexture : TextureAssets.LiquidSlope[liquidType].Value, LiquidTileType.Slope); liquidSize.X += 18 * (slope - 1); switch (slope) { - case 1: - Main.tileBatch.Draw(slopeTexture, position, liquidSize, colors, Vector2.Zero, 1f, SpriteEffects.None); - break; - case 2: - Main.tileBatch.Draw(slopeTexture, position, liquidSize, colors, Vector2.Zero, 1f, SpriteEffects.None); - break; - case 3: - Main.tileBatch.Draw(slopeTexture, position, liquidSize, colors, Vector2.Zero, 1f, SpriteEffects.None); - break; - case 4: - Main.tileBatch.Draw(slopeTexture, position, liquidSize, colors, Vector2.Zero, 1f, SpriteEffects.None); - break; + case 1: + Main.tileBatch.Draw(slopeTexture, position, liquidSize, colors, Vector2.Zero, 1f, SpriteEffects.None); + break; + case 2: + Main.tileBatch.Draw(slopeTexture, position, liquidSize, colors, Vector2.Zero, 1f, SpriteEffects.None); + break; + case 3: + Main.tileBatch.Draw(slopeTexture, position, liquidSize, colors, Vector2.Zero, 1f, SpriteEffects.None); + break; + case 4: + Main.tileBatch.Draw(slopeTexture, position, liquidSize, colors, Vector2.Zero, 1f, SpriteEffects.None); + break; } } @@ -797,7 +795,7 @@ namespace CalamityMod.ILEditing { initialColor = SelectLavaQuadColor(initialTexture, ref initialColor, liquidType == 1); - if (liquidType == ModContent.Find("CalamityMod/SunkenSeaWater").Slot || + if (liquidType == ModContent.Find("CalamityMod/SunkenSeaWater").Slot || liquidType == ModContent.Find("CalamityMod/SulphuricWater").Slot || liquidType == ModContent.Find("CalamityMod/SulphuricDepthsWater").Slot || liquidType == ModContent.Find("CalamityMod/UpperAbyssWater").Slot || @@ -923,7 +921,7 @@ namespace CalamityMod.ILEditing return; Tile above = CalamityUtils.ParanoidTileRetrieval(x, y - 1); - if (!Main.gamePaused && !above.HasTile && above.LiquidAmount <= 0 && Main.rand.NextBool(9) && + if (!Main.gamePaused && !above.HasTile && above.LiquidAmount <= 0 && Main.rand.NextBool(9) && Main.waterStyle == SulphuricWater.Type) { MediumMistParticle acidFoam = new(new(x * 16f + Main.rand.NextFloat(16f), y * 16f + 8f), -Vector2.UnitY.RotatedByRandom(0.67f) * Main.rand.NextFloat(1f, 2.4f), Color.LightSeaGreen, Color.White, 0.16f, 128f, 0.02f); diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs index cb8ed88f68..e2e1e2b93d 100644 --- a/ModSupport/ModCalls.cs +++ b/ModSupport/ModCalls.cs @@ -8,7 +8,6 @@ using CalamityMod.ExtraJumps; using CalamityMod.Items; using CalamityMod.NPCs; using CalamityMod.Particles; -using CalamityMod.Particles.Metaballs; using CalamityMod.Systems; using CalamityMod.UI; using CalamityMod.UI.CalamitasEnchants; @@ -579,13 +578,13 @@ namespace CalamityMod public static float AddMaxStealth(Player p, float add) => p is null ? 0f : (p.Calamity().rogueStealthMax += add); public static bool CanStealthStrike(Player p) => p?.Calamity()?.StealthStrikeAvailable() ?? false; - + public static void SetStealthProjectile(Projectile projectile, bool enabled) { if (projectile != null) projectile.Calamity().stealthStrike = enabled; } - + public static bool GetStealthProjectile(Projectile projectile) => projectile?.Calamity()?.stealthStrike ?? false; #endregion @@ -924,7 +923,7 @@ namespace CalamityMod #endregion #region Summoner Cross Class Nerf Disabling - public static bool SetSummonerNerfDisabledByMinion(int type, bool disableNerf) + public static bool SetSummonerNerfDisabledByMinion(int type, bool disableNerf) { if (disableNerf && !CalamityLists.DisabledSummonerNerfMinions.Contains(type)) { @@ -1098,7 +1097,7 @@ namespace CalamityMod case "AddDifficultyToUI": if (args.Length < 2) return new ArgumentException("ERROR: Not enough arguements provided"); - + if (args[1] is not DifficultyMode mode) return new ArgumentException("ERROR: A class inheriting from 'DifficultyMode' must be provided."); AddCustomDifficulty(mode); @@ -1112,7 +1111,7 @@ namespace CalamityMod case "GetAbyssLightStrength": if (args.Length < 2) return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); - if(!isValidPlayerArg(args[1])) + if (!isValidPlayerArg(args[1])) return new ArgumentException("ERROR: The argument to \"GetLightStrength\" must be a Player or an int."); return GetLightStrength(castPlayer(args[1])); @@ -1153,7 +1152,7 @@ namespace CalamityMod case "GetWearingRogueArmor": if (args.Length < 2) return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); - if(!isValidPlayerArg(args[1])) + if (!isValidPlayerArg(args[1])) return new ArgumentException("ERROR: The argument to \"GetRogueArmor\" must be a Player or an int."); return GetWearingRogueArmor(castPlayer(args[1])); @@ -1181,7 +1180,7 @@ namespace CalamityMod case "GetWearingPostMoonLordSummonerArmor": if (args.Length < 2) return new ArgumentNullException("ERROR: Must specify a Player object (or int index of a Player)."); - if(!isValidPlayerArg(args[1])) + if (!isValidPlayerArg(args[1])) return new ArgumentException("ERROR: The argument to \"GetPostMoonLordSummonerArmor\" must be a Player or an int."); return GetWearingPostMLSummonerArmor(castPlayer(args[1])); @@ -1716,7 +1715,7 @@ namespace CalamityMod case "CanFirePointBlank": case "CanFirePointBlankShots": if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify an Item object (or int index of an Item in the Main.item array).");; + return new ArgumentNullException("ERROR: Must specify an Item object (or int index of an Item in the Main.item array)."); ; if (!isValidItemArg(args[1])) return new ArgumentException("ERROR: The first argument to \"CanFirePointBlank\" must be an Item or an int."); return CanFirePointBlank(castItem(args[1])); @@ -1924,8 +1923,6 @@ namespace CalamityMod return new ArgumentNullException("ERROR: Must specify a Mod instance to load particles from."); GeneralParticleHandler.LoadModParticleInstances(args[1] as Mod); - FusableParticleManager.ExtraModsToLoadSetsFrom.Add(args[1] as Mod); - FusableParticleManager.LoadParticleRenderSets(); return null; case "RegisterModCooldowns": diff --git a/NPCs/AcidRain/Orthocera.cs b/NPCs/AcidRain/Orthocera.cs index 48db750c06..8b36b27fd9 100644 --- a/NPCs/AcidRain/Orthocera.cs +++ b/NPCs/AcidRain/Orthocera.cs @@ -3,13 +3,12 @@ using System.IO; using CalamityMod.BiomeManagers; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Dusts; +using CalamityMod.Graphics.Metaballs; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Banners; using CalamityMod.Items.Weapons.Summon; -using CalamityMod.Particles.Metaballs; using CalamityMod.Projectiles.Enemy; using CalamityMod.Projectiles.Magic; -using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; using Terraria.GameContent.Bestiary; @@ -76,9 +75,9 @@ namespace CalamityMod.NPCs.AcidRain public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { - new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Orthocera") + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Orthocera") }); } @@ -212,7 +211,7 @@ namespace CalamityMod.NPCs.AcidRain if (NPC.Calamity().newAI[0] % 5 == 0 && Main.netMode != NetmodeID.MultiplayerClient) { Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Bottom, Main.rand.NextVector2Circular(4f, 8f), ModContent.ProjectileType(), 0, 0f, Main.myPlayer); - FusableParticleManager.GetParticleSetByType().SpawnParticle(NPC.Bottom + Main.rand.NextVector2Circular(10f, 10f), 135f); + RancorLavaMetaball.SpawnParticle(NPC.Bottom + Main.rand.NextVector2Circular(10f, 10f), 135f); } if (NPC.Calamity().newAI[0] % 30 == 0 && Main.netMode != NetmodeID.MultiplayerClient) { diff --git a/Particles/Metaballs/BaseFusableParticleSet.cs b/Particles/Metaballs/BaseFusableParticleSet.cs deleted file mode 100644 index a7ae1e7c6d..0000000000 --- a/Particles/Metaballs/BaseFusableParticleSet.cs +++ /dev/null @@ -1,114 +0,0 @@ -using CalamityMod.Graphics; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; -using System.Collections.Generic; -using Terraria; -using Terraria.DataStructures; -using Terraria.ID; - -namespace CalamityMod.Particles.Metaballs -{ - public abstract class BaseFusableParticleSet - { - public class FusableParticleRenderCollection - { - public BaseFusableParticleSet ParticleSet; - public List BackgroundTargets; - public FusableParticleRenderCollection(BaseFusableParticleSet set, List backgroundTargets) - { - ParticleSet = set; - BackgroundTargets = backgroundTargets; - } - } - - public class FusableParticle - { - public Vector2 Center; - public float Size; - public Vector2 TopLeft => Center + new Vector2(-1f, -1f) * Size * 0.5f; - public Vector2 TopRight => Center + new Vector2(1f, -1f) * Size * 0.5f; - public Vector2 BottomLeft => Center + new Vector2(-1f, 1f) * Size * 0.5f; - public Vector2 BottomRight => Center + new Vector2(1f, 1f) * Size * 0.5f; - - public FusableParticle(Vector2 center, float size) - { - Center = center; - Size = size; - } - } - - public int LayerCount - { - get - { - // Not doing this will result in inevitable crashes down the line as the graphics engine fails. - if (BackgroundShaders.Count != BackgroundTextures.Count) - throw new InvalidOperationException("The number of texture maps and shaders are not equivalent."); - - return BackgroundShaders.Count; - } - } - - internal List DrawDataBuffer = new(); - - public List Particles = new(); - - public FusableParticleRenderCollection RenderCollection => FusableParticleManager.GetParticleRenderCollectionByType(GetType()); - - public List GetBackgroundTargets => RenderCollection.BackgroundTargets; - - public void PrepareSpecialDrawingForNextFrame(params DrawData[] drawContents) => DrawDataBuffer.AddRange(drawContents); - public virtual float BorderSize => 0f; - public virtual bool BorderShouldBeSolid => false; - public virtual Color BorderColor => Color.Transparent; - public virtual void PrepareOptionalShaderData(Effect effect, int index) { } - public abstract List BackgroundShaders { get; } - public abstract List BackgroundTextures { get; } - public abstract FusableParticle SpawnParticle(Vector2 center, float sizeStrength); - public abstract void UpdateBehavior(FusableParticle particle); - public abstract void DrawParticles(); - - /// - /// Temporarily moves from the backbuffer to a specialized render target, draws all particles, and caches the resulting render target for drawing later. - /// - internal void PrepareRenderTargetForDrawing() - { - // Don't bother doing anything if this method is called serverside. - if (Main.netMode == NetmodeID.Server) - return; - - // Don't bother doing anything if the set has no particles to render at the moment, for the sake of optimization. - if (Particles.Count <= 0) - return; - - // Go through each background render target in the set and clear the entire thing to use a base of transparent pixels. - foreach (ManagedRenderTarget backgroundTarget in GetBackgroundTargets) - { - Main.instance.GraphicsDevice.SetRenderTarget(backgroundTarget.Target); - Main.instance.GraphicsDevice.Clear(Color.Transparent); - - // Clear away any particles that shouldn't exist anymore. - Particles.RemoveAll(p => p.Size <= 5f); - - // Prepare the sprite batch for specialized drawing in prepration that the graphics device will draw to new render targets. - Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.EffectMatrix); - - // Draw the surviving particles. - DrawParticles(); - - // Draw all special contents in the draw buffer before clearing it. - foreach (DrawData drawData in DrawDataBuffer) - drawData.Draw(Main.spriteBatch); - - Main.spriteBatch.End(); - } - - // Clear the special draw data buffer. - DrawDataBuffer.Clear(); - - // Return to using the backbuffer after done drawing everything to the background targets. - Main.instance.GraphicsDevice.SetRenderTarget(null); - } - } -} diff --git a/Particles/Metaballs/FusableParticleManager.cs b/Particles/Metaballs/FusableParticleManager.cs deleted file mode 100644 index 738c032a89..0000000000 --- a/Particles/Metaballs/FusableParticleManager.cs +++ /dev/null @@ -1,199 +0,0 @@ -using CalamityMod.Graphics; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using static CalamityMod.Particles.Metaballs.BaseFusableParticleSet; - -namespace CalamityMod.Particles.Metaballs -{ - // NOTE: A lot of the functionalities within this system cannot under really any circumstance be used serverside. - // This system is entirely visual. However, servers do not have drawing capabilities, nor even a proper GraphicsDevice - // instance. This system utilizes many things that require both of these things, such as shaders and render targets. - // As such, it is littered with many netMode checks. While some may be overprotective in their nature it is critical that - // failsafes exist there, as visual failures tend to result in engine crashes, which will kill a lot of MP servers. - // If someone other than me for any reason attempts to notably expand upon this system you must keep this in mind. -Dominic - - // TODO -- This can be made into a ModSystem. Its main thread load dependency with render targets is safe to put in OnModLoad. - public static class FusableParticleManager - { - internal static List ParticleSets = new(); - internal static List ExtraModsToLoadSetsFrom = new(); - internal static List ParticleSetTypes = new(); - internal static bool HasBeenFormallyDefined = false; - - /// - /// Loads all render sets. - /// - internal static void LoadParticleRenderSets() - { - // Don't attempt to prepare anything serverside. - if (Main.netMode == NetmodeID.Server) - return; - - ParticleSets = new(); - ParticleSetTypes = new(); - ExtraModsToLoadSetsFrom = new(); - HasBeenFormallyDefined = true; - - FindParticleSetTypesInMod(CalamityMod.Instance); - foreach (Mod m in ExtraModsToLoadSetsFrom) - FindParticleSetTypesInMod(m); - - foreach (Type t in ParticleSetTypes) - CreateParticleSetOfType(t); - } - - internal static void FindParticleSetTypesInMod(Mod mod) - { - // Look through every type in the mod, and check if it's derived from BaseFusableParticleSet. - // If it is, create a default instance of said particle and save it. - foreach (Type type in mod.Code.GetTypes()) - { - // Don't load abstract classes; they cannot have instances. - if (type.IsAbstract) - continue; - - if (type.IsSubclassOf(typeof(BaseFusableParticleSet))) - ParticleSetTypes.Add(type); - } - } - - internal static void CreateParticleSetOfType(Type t) - { - BaseFusableParticleSet instance = Activator.CreateInstance(t) as BaseFusableParticleSet; - List backgroundTargets = new List(); - - // Only generate render targets to use if this isn't called serverside. - if (Main.netMode != NetmodeID.Server) - { - for (int i = 0; i < instance.LayerCount; i++) - backgroundTargets.Add(new ManagedRenderTarget(true, ManagedRenderTarget.CreateScreenSizedTarget)); - } - - FusableParticleRenderCollection particleRenderCollection = new FusableParticleRenderCollection(instance, backgroundTargets); - ParticleSets.Add(particleRenderCollection); - } - - internal static void CreateParticleSetOfType() where T : BaseFusableParticleSet => - CreateParticleSetOfType(typeof(T)); - - /// - /// Unloads all render sets. - /// - internal static void UnloadParticleRenderSets() - { - foreach (FusableParticleRenderCollection particleRenderSet in ParticleSets) - particleRenderSet.ParticleSet = null; - - HasBeenFormallyDefined = false; - ParticleSets = null; - ExtraModsToLoadSetsFrom = null; - ParticleSetTypes = null; - } - - /// - /// Prepares the render targets of each cached instance in advance. - /// - internal static void PrepareFusableParticleTargets() - { - // Don't attempt to prepare anything serverside, if the particle sets are unloaded, or if on the menu. - if (Main.netMode == NetmodeID.Server || ParticleSets is null || Main.gameMenu) - return; - - // Prepare the render target for all fusable particles. - for (int i = 0; i < ParticleSets.Count; i++) - ParticleSets[i].ParticleSet.PrepareRenderTargetForDrawing(); - } - - /// - /// Renders each cached instance with its connecting shader. - /// - internal static void RenderAllFusableParticles() - { - // Don't attempt to render anything serverside or on the menu. - if (Main.netMode == NetmodeID.Server || Main.gameMenu) - return; - - for (int i = 0; i < ParticleSets.Count; i++) - { - BaseFusableParticleSet particleSet = ParticleSets[i].ParticleSet; - - // Don't bother rendering if the set has no particles to render at the moment, for the sake of optimization. - if (particleSet.Particles.Count <= 0) - continue; - - List backgroundTargets = particleSet.GetBackgroundTargets; - - // Restart the sprite batch. This must be done with an immediate sort mode since a shader is going to be applied. - Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - for (int j = 0; j < particleSet.LayerCount; j++) - { - Effect shader = particleSet.BackgroundShaders[j]; - Texture2D backgroundTexture = particleSet.BackgroundTextures[j]; - - // Draw the current target with the specified shader. - shader.Parameters["edgeBorderSize"].SetValue(particleSet.BorderSize); - shader.Parameters["borderShouldBeSolid"].SetValue(particleSet.BorderShouldBeSolid); - shader.Parameters["edgeBorderColor"].SetValue(particleSet.BorderColor.ToVector3()); - shader.Parameters["screenArea"].SetValue(new Vector2(Main.screenWidth, Main.screenHeight) / Main.GameViewMatrix.Zoom); - shader.Parameters["screenMoveOffset"].SetValue(Main.screenPosition - Main.screenLastPosition); - shader.Parameters["uWorldPosition"].SetValue(Main.screenPosition); - shader.Parameters["renderTargetArea"].SetValue(new Vector2(backgroundTargets[j].Width, backgroundTargets[j].Height)); - shader.Parameters["invertedScreen"].SetValue(Main.LocalPlayer.gravDir == -1f); - shader.Parameters["upscaleFactor"].SetValue(Vector2.One); - shader.Parameters["generalBackgroundOffset"].SetValue(Vector2.Zero); - - // Prepare the background texture for loading. - Main.graphics.GraphicsDevice.Textures[1] = backgroundTexture; - shader.Parameters["uImageSize1"].SetValue(backgroundTexture.Size()); - - // Do any optional shader operations prior to applying the shader. - particleSet.PrepareOptionalShaderData(shader, j); - - // Apply the shader. This is what is used to connect separated blobs together. - shader.CurrentTechnique.Passes[0].Apply(); - - // And draw the particle set's render target with said shader. - Main.spriteBatch.Draw(backgroundTargets[j].Target, Vector2.Zero, Color.White); - } - - Main.spriteBatch.End(); - } - } - - /// - /// Obtains the instance from a given if it is a . - /// - /// The type to check. - internal static FusableParticleRenderCollection GetParticleRenderCollectionByType(Type type) - { - if (Main.netMode == NetmodeID.Server) - return null; - - return ParticleSets.First(s => s.ParticleSet.GetType() == type); - } - - /// - /// Obtains the cached singleton instance of a given . - /// - /// The type to check. - public static T GetParticleSetByType() where T : BaseFusableParticleSet - { - if (Main.netMode == NetmodeID.Server) - return null; - - // Reload particle sets if they are completely unloaded for some reason. - if (ParticleSets.Count <= 0) - LoadParticleRenderSets(); - - return ParticleSets.First(s => s.ParticleSet.GetType() == typeof(T)).ParticleSet as T; - } - } -} diff --git a/Particles/Metaballs/GruesomeEminenceParticleSet.cs b/Particles/Metaballs/GruesomeEminenceParticleSet.cs deleted file mode 100644 index f72b74a650..0000000000 --- a/Particles/Metaballs/GruesomeEminenceParticleSet.cs +++ /dev/null @@ -1,97 +0,0 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; -using System.Collections.Generic; -using System.Linq; -using Terraria; -using Terraria.Graphics.Shaders; -using Terraria.ModLoader; - -namespace CalamityMod.Particles.Metaballs -{ - public class GruesomeEminenceParticleSet : BaseFusableParticleSet - { - public override float BorderSize => 3f; - public override bool BorderShouldBeSolid => false; - public override Color BorderColor => Color.Lerp(Color.Fuchsia, Color.Black, 0.55f) * 0.85f; - - public override List BackgroundShaders => new() - { - GameShaders.Misc["CalamityMod:BaseFusableParticleEdge"].Shader, - GameShaders.Misc["CalamityMod:BaseFusableParticleEdge"].Shader, - GameShaders.Misc["CalamityMod:BaseFusableParticleEdge"].Shader, - GameShaders.Misc["CalamityMod:BaseFusableParticleEdge"].Shader, - GameShaders.Misc["CalamityMod:BaseFusableParticleEdge"].Shader, - }; - public override List BackgroundTextures => new() - { - ModContent.Request("CalamityMod/Particles/Metaballs/GruesomeEminence_Ghost_Layer1").Value, - ModContent.Request("CalamityMod/Particles/Metaballs/GruesomeEminence_Ghost_Layer2").Value, - ModContent.Request("CalamityMod/Particles/Metaballs/GruesomeEminence_Ghost_Layer3").Value, - ModContent.Request("CalamityMod/Particles/Metaballs/GruesomeEminence_Ghost_Layer4").Value, - ModContent.Request("CalamityMod/Particles/Metaballs/GruesomeEminence_Ghost_Layer5").Value, - }; - public override FusableParticle SpawnParticle(Vector2 center, float sizeStrength) - { - Particles.Add(new FusableParticle(center, sizeStrength)); - return Particles.Last(); - } - - public override void UpdateBehavior(FusableParticle particle) - { - particle.Size = MathHelper.Clamp(particle.Size - 2.5f, 0f, 400f) * 0.97f; - } - - public override void PrepareOptionalShaderData(Effect effect, int index) - { - switch (index) - { - // Background. - case 0: - Vector2 offset = Vector2.UnitX * Main.GlobalTimeWrappedHourly * 0.03f; - effect.Parameters["generalBackgroundOffset"].SetValue(offset); - break; - - // Gaseous skulls. - case 1: - offset = Vector2.One * (float)Math.Cos(Main.GlobalTimeWrappedHourly * 0.041f) * 2f; - offset = offset.RotatedBy((float)Math.Cos(Main.GlobalTimeWrappedHourly * 0.08f) * 0.97f); - effect.Parameters["generalBackgroundOffset"].SetValue(offset); - break; - - // Spooky faces 1. - case 2: - offset = (Main.GlobalTimeWrappedHourly * 2.02f).ToRotationVector2() * 0.036f; - offset.Y += (float)Math.Cos(Main.GlobalTimeWrappedHourly * 0.161f) * 0.5f + 0.5f; - effect.Parameters["generalBackgroundOffset"].SetValue(offset); - break; - - // Spooky faces 2. - case 3: - offset = Vector2.UnitX * Main.GlobalTimeWrappedHourly * -0.04f + (Main.GlobalTimeWrappedHourly * 1.89f).ToRotationVector2() * 0.03f; - offset.Y += CalamityUtils.PerlinNoise2D(Main.GlobalTimeWrappedHourly * 0.187f, Main.GlobalTimeWrappedHourly * 0.193f, 2, 466920161) * 0.025f; - effect.Parameters["generalBackgroundOffset"].SetValue(offset); - break; - - // Spooky faces 3. - case 4: - offset = Vector2.UnitX * Main.GlobalTimeWrappedHourly * 0.037f + (Main.GlobalTimeWrappedHourly * 1.77f).ToRotationVector2() * 0.04725f; - offset.Y += CalamityUtils.PerlinNoise2D(Main.GlobalTimeWrappedHourly * 0.187f, Main.GlobalTimeWrappedHourly * 0.193f, 2, 577215664) * 0.05f; - effect.Parameters["generalBackgroundOffset"].SetValue(offset); - break; - } - } - - public override void DrawParticles() - { - Texture2D fusableParticleBase = ModContent.Request("CalamityMod/Particles/Metaballs/FusableParticleBase").Value; - foreach (FusableParticle particle in Particles) - { - Vector2 drawPosition = particle.Center - Main.screenPosition; - Vector2 origin = fusableParticleBase.Size() * 0.5f; - Vector2 scale = Vector2.One * particle.Size / fusableParticleBase.Size(); - Main.spriteBatch.Draw(fusableParticleBase, drawPosition, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0f); - } - } - } -} diff --git a/Particles/Metaballs/PaintParticleSets.cs b/Particles/Metaballs/PaintParticleSets.cs deleted file mode 100644 index bd65882d69..0000000000 --- a/Particles/Metaballs/PaintParticleSets.cs +++ /dev/null @@ -1,71 +0,0 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System.Collections.Generic; -using System.Linq; -using Terraria; -using Terraria.Graphics.Shaders; -using Terraria.ModLoader; - -namespace CalamityMod.Particles.Metaballs -{ - public class CyanPaint : PaintParticleSet - { - public override Color BorderColor => Color.Cyan * 0.7f; - } - public class BluePaint : PaintParticleSet - { - public override Color BorderColor => Color.Blue * 0.7f; - } - public class MagentaPaint : PaintParticleSet - { - public override Color BorderColor => Color.Magenta * 0.7f; - } - public class LimePaint : PaintParticleSet - { - public override Color BorderColor => Color.Lime * 0.7f; - } - public class YellowPaint : PaintParticleSet - { - public override Color BorderColor => Color.Yellow * 0.7f; - } - - public abstract class PaintParticleSet : BaseFusableParticleSet - { - public override float BorderSize => 12f; - public override bool BorderShouldBeSolid => false; - - public override List BackgroundShaders => new() - { - GameShaders.Misc["CalamityMod:AdditiveFusableParticleEdge"].Shader, - }; - public override List BackgroundTextures => new() - { - ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value, - }; - public override FusableParticle SpawnParticle(Vector2 center, float sizeStrength) - { - Particles.Add(new FusableParticle(center, sizeStrength)); - return Particles.Last(); - } - - public override void UpdateBehavior(FusableParticle particle) - { - particle.Size = MathHelper.Clamp(particle.Size - 0.1f, 0f, 200f) * 0.997f; - if (particle.Size < 20f) - particle.Size = particle.Size * 0.8f - 1f; - } - - public override void DrawParticles() - { - Texture2D fusableParticleBase = ModContent.Request("CalamityMod/Particles/Metaballs/FusableParticleBase").Value; - foreach (FusableParticle particle in Particles) - { - Vector2 drawPosition = particle.Center - Main.screenPosition; - Vector2 origin = fusableParticleBase.Size() * 0.5f; - Vector2 scale = Vector2.One * particle.Size / fusableParticleBase.Size(); - Color drawColor = Color.Lerp(BorderColor, new Color(0f, 0f, 1f), Utils.GetLerpValue(50f, 100f, particle.Size, true) * 0.1f) * 1.2f; - Main.spriteBatch.Draw(fusableParticleBase, drawPosition, null, drawColor, 0f, origin, scale, SpriteEffects.None, 0f); - } - } - } -} diff --git a/Particles/Metaballs/RancorGroundLavaParticleSet.cs b/Particles/Metaballs/RancorGroundLavaParticleSet.cs deleted file mode 100644 index 0675a3b6c7..0000000000 --- a/Particles/Metaballs/RancorGroundLavaParticleSet.cs +++ /dev/null @@ -1,51 +0,0 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System.Collections.Generic; -using System.Linq; -using Terraria; -using Terraria.Graphics.Shaders; -using Terraria.ModLoader; - -namespace CalamityMod.Particles.Metaballs -{ - public class RancorGroundLavaParticleSet : BaseFusableParticleSet - { - public override float BorderSize => 18f; - public override bool BorderShouldBeSolid => false; - public override Color BorderColor => Color.Lerp(Color.Yellow, Color.Red, 0.85f) * 0.85f; - - public override List BackgroundShaders => new() - { - GameShaders.Misc["CalamityMod:AdditiveFusableParticleEdge"].Shader, - }; - public override List BackgroundTextures => new() - { - ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value, - }; - public override FusableParticle SpawnParticle(Vector2 center, float sizeStrength) - { - Particles.Add(new FusableParticle(center, sizeStrength)); - return Particles.Last(); - } - - public override void UpdateBehavior(FusableParticle particle) - { - particle.Size = MathHelper.Clamp(particle.Size - 0.15f, 0f, 200f) * 0.997f; - if (particle.Size < 20f) - particle.Size = particle.Size * 0.95f - 0.9f; - } - - public override void DrawParticles() - { - Texture2D fusableParticleBase = ModContent.Request("CalamityMod/Particles/Metaballs/FusableParticleBase").Value; - foreach (FusableParticle particle in Particles) - { - Vector2 drawPosition = particle.Center - Main.screenPosition; - Vector2 origin = fusableParticleBase.Size() * 0.5f; - Vector2 scale = Vector2.One * particle.Size / fusableParticleBase.Size() * new Vector2(1f, 0.5f); - Color drawColor = Color.Lerp(BorderColor, new Color(0f, 0f, 1f), Utils.GetLerpValue(120f, 135f, particle.Size, true) * 0.1f) * 1.4f; - Main.spriteBatch.Draw(fusableParticleBase, drawPosition, null, drawColor, 0f, origin, scale, SpriteEffects.None, 0f); - } - } - } -} diff --git a/Particles/Metaballs/RancorLavaParticleSet.cs b/Particles/Metaballs/RancorLavaParticleSet.cs deleted file mode 100644 index 9b4431a2e1..0000000000 --- a/Particles/Metaballs/RancorLavaParticleSet.cs +++ /dev/null @@ -1,50 +0,0 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System.Collections.Generic; -using System.Linq; -using Terraria; -using Terraria.Graphics.Shaders; -using Terraria.ModLoader; - -namespace CalamityMod.Particles.Metaballs -{ - public class RancorLavaParticleSet : BaseFusableParticleSet - { - public override float BorderSize => 18f; - public override bool BorderShouldBeSolid => false; - public override Color BorderColor => Color.Lerp(Color.Yellow, Color.Red, 0.85f) * 0.85f; - - public override List BackgroundShaders => new() - { - GameShaders.Misc["CalamityMod:AdditiveFusableParticleEdge"].Shader, - }; - public override List BackgroundTextures => new() - { - ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value, - }; - public override FusableParticle SpawnParticle(Vector2 center, float sizeStrength) - { - Particles.Add(new FusableParticle(center, sizeStrength)); - return Particles.Last(); - } - - public override void UpdateBehavior(FusableParticle particle) - { - particle.Size = MathHelper.Clamp(particle.Size - 0.24f, 0f, 200f) * 0.9956f; - if (particle.Size < 15f) - particle.Size = particle.Size * 0.95f - 0.9f; - } - - public override void DrawParticles() - { - Texture2D fusableParticleBase = ModContent.Request("CalamityMod/Particles/Metaballs/FusableParticleBase").Value; - foreach (FusableParticle particle in Particles) - { - Vector2 drawPosition = particle.Center - Main.screenPosition; - Vector2 origin = fusableParticleBase.Size() * 0.5f; - Vector2 scale = Vector2.One * particle.Size / fusableParticleBase.Size(); - Main.spriteBatch.Draw(fusableParticleBase, drawPosition, null, BorderColor * 1.2f, 0f, origin, scale, SpriteEffects.None, 0f); - } - } - } -} diff --git a/Particles/Metaballs/StreamGougeLayer.png b/Particles/Metaballs/StreamGougeLayer.png deleted file mode 100644 index 773929e3606413ed04d13ae5a4fff9f11fb63ce4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1986 zcmV;z2R-Px#1ZP1_K>z@;j|==^1poj5MNmvsMH&+;9~U!RI-EUQk(odZ`p5qp6D%zkKMp*g z4QQFk|L+ZFm}dXcCzq?4RIvPQ%Ky5~((%!)*~&>XfSC;q|Bj9#7d06j{p0`u010qN zS#tmY4#NNd4#NS*Z>VGd00#z1L_t(&L*<#>cH1}-gk>vhMRFvK?aaLYqi$7oHP8S- zOPR~vFDE2W-HjsnPxAp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DYNtnx-lt=ku=C2F{peyXQ7(^S)Tle4B&7;U>xqEd?e+8H z;{zuBuOUoA>P@FgOhvVomS`*s9Y;140k^|dCSS*5!cp}?+e|`kGyw~@3J~(VVUXyT zKk(%~KoAL@30zWbsOLj4g<>LZHkbVI&s~#GQ<=nh990#$Y$BteQo3BP$1;!j{zKd* zxx-Y`*o|}{f2>~N?>{7HpuShMPAqTqcGPco_1RsK-(nJb-g;2c1ltB8eAH1A?U4Hc_l^i9d^M&JIFW07Y z+D&;jsY#6Kakz;TVn@BNOd8*q@RJcdauKkKoMl#?JMT^bj^s%JC}x0XU)`tekh7Gy zTY*~VQLq8{8E?Ab6sUH@kyQvWnUp_>+SCr9*C{~UFE}uVvdfz-P7>#UCrl`fPju^P zlEEghSv-J859%Rs99T%KZgd3PD763+@$h1(>nRqD^{q!l-0Cyo&hq#o>mbKc;qesP zzQuJM3j9MG>j#&%aj`)eLhjg0^L3F^|cl{A3ttBygDj z{=iti=Tuhv3OKqVx0r9)v&$O;_#c_cj>q6KcHP6RUM?Y&zgI+7Vb8*0F)P{imrp7K zp`}?`qzxLl_aM1wGO? U9)J-2VE_OC07*qoM6N<$g7XTr_5c6? diff --git a/Particles/Metaballs/StreamGougeParticleSet.cs b/Particles/Metaballs/StreamGougeParticleSet.cs deleted file mode 100644 index 08af896b55..0000000000 --- a/Particles/Metaballs/StreamGougeParticleSet.cs +++ /dev/null @@ -1,61 +0,0 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System.Collections.Generic; -using System.Linq; -using Terraria; -using Terraria.Graphics.Shaders; -using Terraria.ModLoader; - -namespace CalamityMod.Particles.Metaballs -{ - public class StreamGougeParticleSet : BaseFusableParticleSet - { - public override float BorderSize => 3f; - public override bool BorderShouldBeSolid => false; - public override Color BorderColor => Color.Lerp(Color.DarkBlue, Color.Black, 0.75f) * 0.85f; - - public override List BackgroundShaders => new() - { - GameShaders.Misc["CalamityMod:BaseFusableParticleEdge"].Shader, - }; - public override List BackgroundTextures => new() - { - ModContent.Request("CalamityMod/Particles/Metaballs/StreamGougeLayer").Value, - }; - public override FusableParticle SpawnParticle(Vector2 center, float sizeStrength) - { - Particles.Add(new FusableParticle(center, sizeStrength)); - return Particles.Last(); - } - - public override void UpdateBehavior(FusableParticle particle) - { - particle.Size = MathHelper.Clamp(particle.Size - 1f, 0f, 200f) * 0.98f; - } - - public override void PrepareOptionalShaderData(Effect effect, int index) - { - switch (index) - { - // Background. - case 0: - Vector2 offset = Vector2.UnitX * Main.GlobalTimeWrappedHourly * 0.045f; - effect.Parameters["generalBackgroundOffset"].SetValue(offset); - effect.Parameters["upscaleFactor"].SetValue(Vector2.One * -0.3f); - break; - } - } - - public override void DrawParticles() - { - Texture2D fusableParticleBase = ModContent.Request("CalamityMod/Particles/Metaballs/FusableParticleBase").Value; - foreach (FusableParticle particle in Particles) - { - Vector2 drawPosition = particle.Center - Main.screenPosition; - Vector2 origin = fusableParticleBase.Size() * 0.5f; - Vector2 scale = Vector2.One * particle.Size / fusableParticleBase.Size(); - Main.spriteBatch.Draw(fusableParticleBase, drawPosition, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0f); - } - } - } -} diff --git a/Particles/Metaballs/VoidGeneratorParticleSet.cs b/Particles/Metaballs/VoidGeneratorParticleSet.cs deleted file mode 100644 index 9e01ec5462..0000000000 --- a/Particles/Metaballs/VoidGeneratorParticleSet.cs +++ /dev/null @@ -1,62 +0,0 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System.Collections.Generic; -using System.Linq; -using Terraria; -using Terraria.Graphics.Shaders; -using Terraria.ModLoader; - -namespace CalamityMod.Particles.Metaballs -{ - //This is basically just the Stream Gouge set but purple - public class VoidGeneratorParticleSet : BaseFusableParticleSet - { - public override float BorderSize => 3f; - public override bool BorderShouldBeSolid => false; - public override Color BorderColor => Color.Lerp(Color.Purple, Color.Black, 0.75f) * 0.85f; - - public override List BackgroundShaders => new List() - { - GameShaders.Misc["CalamityMod:BaseFusableParticleEdge"].Shader, - }; - public override List BackgroundTextures => new List() - { - ModContent.Request("CalamityMod/Particles/Metaballs/StreamGougeLayer").Value, - }; - public override FusableParticle SpawnParticle(Vector2 center, float sizeStrength) - { - Particles.Add(new FusableParticle(center, sizeStrength)); - return Particles.Last(); - } - - public override void UpdateBehavior(FusableParticle particle) - { - particle.Size = MathHelper.Clamp(particle.Size - 1f, 0f, 200f) * 0.98f; - } - - public override void PrepareOptionalShaderData(Effect effect, int index) - { - switch (index) - { - // Background. - case 0: - Vector2 offset = Vector2.UnitX * Main.GlobalTimeWrappedHourly * 0.045f; - effect.Parameters["generalBackgroundOffset"].SetValue(offset); - effect.Parameters["upscaleFactor"].SetValue(Vector2.One * -0.3f); - break; - } - } - - public override void DrawParticles() - { - Texture2D fusableParticleBase = ModContent.Request("CalamityMod/Particles/Metaballs/FusableParticleBase").Value; - foreach (FusableParticle particle in Particles) - { - Vector2 drawPosition = particle.Center - Main.screenPosition; - Vector2 origin = fusableParticleBase.Size() * 0.5f; - Vector2 scale = Vector2.One * particle.Size / fusableParticleBase.Size(); - Main.spriteBatch.Draw(fusableParticleBase, drawPosition, null, Color.White, 0f, origin, scale, SpriteEffects.None, 0f); - } - } - } -} diff --git a/Projectiles/Magic/RancorLargeCinder.cs b/Projectiles/Magic/RancorLargeCinder.cs index 61adef419b..45e9a59036 100644 --- a/Projectiles/Magic/RancorLargeCinder.cs +++ b/Projectiles/Magic/RancorLargeCinder.cs @@ -1,5 +1,4 @@ -using CalamityMod.Particles; -using CalamityMod.Particles.Metaballs; +using CalamityMod.Graphics.Metaballs; using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; @@ -45,7 +44,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.velocity.Y += 0.04f; // Create lava particles. - FusableParticleManager.GetParticleSetByType().SpawnParticle(Projectile.Center + Main.rand.NextVector2Circular(6f, 6f), Projectile.scale * 36f); + RancorLavaMetaball.SpawnParticle(Projectile.Center + Main.rand.NextVector2Circular(6f, 6f), Projectile.scale * 36f); Time++; } diff --git a/Projectiles/Magic/RancorLaserbeam.cs b/Projectiles/Magic/RancorLaserbeam.cs index e0b5d5cf70..86ab25cc1b 100644 --- a/Projectiles/Magic/RancorLaserbeam.cs +++ b/Projectiles/Magic/RancorLaserbeam.cs @@ -1,6 +1,5 @@ using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Particles; -using CalamityMod.Particles.Metaballs; +using CalamityMod.Graphics.Metaballs; using CalamityMod.World; using Microsoft.Xna.Framework; using System; @@ -147,7 +146,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.NewProjectile(Projectile.GetSource_FromThis(), endOfLaser, cinderVelocity, type, damage, 0f, Projectile.owner); } - FusableParticleManager.GetParticleSetByType().SpawnParticle(endOfLaser + Main.rand.NextVector2Circular(10f, 10f) + Projectile.velocity * 40f, 135f); + RancorLavaMetaball.SpawnParticle(endOfLaser + Main.rand.NextVector2Circular(10f, 10f) + Projectile.velocity * 40f, 135f); } private float PrimitiveWidthFunction(float completionRatio) => Projectile.scale * 20f; @@ -163,8 +162,7 @@ namespace CalamityMod.Projectiles.Magic public override bool PreDraw(ref Color lightColor) { - if (RayDrawer is null) - RayDrawer = new PrimitiveTrail(PrimitiveWidthFunction, PrimitiveColorFunction, specialShader: GameShaders.Misc["CalamityMod:Flame"]); + RayDrawer ??= new PrimitiveTrail(PrimitiveWidthFunction, PrimitiveColorFunction, specialShader: GameShaders.Misc["CalamityMod:Flame"]); GameShaders.Misc["CalamityMod:Flame"].UseImage1("Images/Misc/Perlin"); diff --git a/Projectiles/Magic/SmallSpirit.cs b/Projectiles/Magic/SmallSpirit.cs index fb9abe07fd..3c24b7b56c 100644 --- a/Projectiles/Magic/SmallSpirit.cs +++ b/Projectiles/Magic/SmallSpirit.cs @@ -1,5 +1,4 @@ -using CalamityMod.Particles; -using CalamityMod.Particles.Metaballs; +using CalamityMod.Graphics.Metaballs; using Microsoft.Xna.Framework; using System; using Terraria; @@ -49,7 +48,7 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { - float radius = MathHelper.SmoothStep(84f, 44f, (float)Math.Sqrt(1f - Projectile.timeLeft / 360f)); + float radius = MathHelper.SmoothStep(67f, 32f, (float)Math.Sqrt(1f - Projectile.timeLeft / 360f)); // Handle frames. Projectile.frameCounter++; @@ -68,7 +67,7 @@ namespace CalamityMod.Projectiles.Magic { Projectile.hostile = false; - radius += 54f; + radius += 36f; target = ProjectileOwner; flySpeed = 29f; @@ -109,7 +108,7 @@ namespace CalamityMod.Projectiles.Magic // Emit particles. Vector2 spawnPosition = Projectile.Center + Main.rand.NextVector2Circular(5f, 5f) * radius / 130f; - FusableParticleManager.GetParticleSetByType()?.SpawnParticle(spawnPosition, radius); + GruesomeMetaball.SpawnParticle(spawnPosition, Main.rand.NextVector2Circular(6f, 6f), radius); } public override Color? GetAlpha(Color lightColor) => Color.White * Projectile.Opacity; diff --git a/Projectiles/Magic/SpiritCongregation.cs b/Projectiles/Magic/SpiritCongregation.cs index ac81c8ca39..48ffe84e32 100644 --- a/Projectiles/Magic/SpiritCongregation.cs +++ b/Projectiles/Magic/SpiritCongregation.cs @@ -1,15 +1,13 @@ -using CalamityMod.Particles; -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using System.IO; using Terraria; -using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; -using CalamityMod.Particles.Metaballs; -using Terraria.DataStructures; +using System.Collections.Generic; +using CalamityMod.Graphics.Metaballs; namespace CalamityMod.Projectiles.Magic { @@ -62,6 +60,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 12; Projectile.timeLeft = 90000; + Projectile.hide = true; } public override void SendExtraAI(BinaryWriter writer) @@ -229,8 +228,8 @@ namespace CalamityMod.Projectiles.Magic particleSize += (Projectile.oldPosition - Projectile.position).Length() * 4.2f; // Place a hard limit on particle sizes. - if (particleSize > 500f) - particleSize = 500f; + if (particleSize > 210f) + particleSize = 210f; // Make particles shrink when dying. particleSize *= MathHelper.Lerp(1f, 0.5f, Utils.GetLerpValue(0f, 35f, DeathCounter, true)); @@ -240,12 +239,15 @@ namespace CalamityMod.Projectiles.Magic { // Summon a base particle. Vector2 spawnPosition = Projectile.Center + Main.rand.NextVector2Circular(1f, 1f) * particleSize / 26f; - FusableParticleManager.GetParticleSetByType()?.SpawnParticle(spawnPosition, particleSize); + GruesomeMetaball.SpawnParticle(spawnPosition, Main.rand.NextVector2Circular(4.4f, 4.4f), particleSize); // And an "ahead" particle that spawns based on current movement. // This causes the "head" of the overall thing to have bumps when moving. spawnPosition += Projectile.velocity.RotatedByRandom(1.38f) * particleSize / 105f; - FusableParticleManager.GetParticleSetByType()?.SpawnParticle(spawnPosition, particleSize * 0.4f); + GruesomeMetaball.SpawnParticle(spawnPosition, Main.rand.NextVector2Circular(i * 1.5f + 7f, i * 1.5f + 7f), particleSize * 0.3f); + + // Make particle sizes exponentially decrease across loop iterations. + particleSize *= 0.9f; } // Release gas projectiles randomly. This does not happen when dying. @@ -263,41 +265,56 @@ namespace CalamityMod.Projectiles.Magic Projectile.frame = Projectile.frameCounter / 5 % maxFrame; } + public override void DrawBehind(int index, List behindNPCsAndTiles, List behindNPCs, List behindProjectiles, List overPlayers, List overWiresUI) + { + // Ensure that the teeth draw over the metaballs. + overPlayers.Add(index); + } + public override bool PreDraw(ref Color lightColor) { - int maxFrame = CurrentPower <= LargeMouthPowerLowerBound ? 6 : 9; Texture2D texture = ModContent.Request(Texture).Value; - Texture2D backTexture = ModContent.Request("CalamityMod/Projectiles/Magic/SpiritCongregationBack").Value; - Texture2D auraTexture = ModContent.Request("CalamityMod/Projectiles/Magic/SpiritCongregationAura").Value; if (CurrentPower > LargeMouthPowerLowerBound) - { texture = ModContent.Request("CalamityMod/Projectiles/Magic/SpiritCongregationBig").Value; - backTexture = ModContent.Request("CalamityMod/Projectiles/Magic/SpiritCongregationBackBig").Value; - auraTexture = ModContent.Request("CalamityMod/Projectiles/Magic/SpiritCongregationAuraBig").Value; - } - - float offsetFactor = Projectile.scale * ((CongregationDiameter - 54f) / 90f + 1.5f); - offsetFactor *= texture.Width / 90f; - Vector2 drawPosition = Projectile.Center - Main.screenPosition + Projectile.rotation.ToRotationVector2() * offsetFactor * 15f; - Rectangle frame = texture.Frame(1, maxFrame, 0, Projectile.frame); - Vector2 origin = frame.Size() * 0.5f; - SpriteEffects direction = Math.Cos(Projectile.rotation) > 0f ? SpriteEffects.None : SpriteEffects.FlipVertically; - DrawData backTextureDraw = new(backTexture, drawPosition, frame, Color.White, Projectile.rotation, origin, Projectile.scale, direction, 0); - DrawData auraTextureDraw = new(auraTexture, drawPosition, frame, Color.White, Projectile.rotation, origin, Projectile.scale, direction, 0); - FusableParticleManager.GetParticleSetByType()?.PrepareSpecialDrawingForNextFrame(backTextureDraw, auraTextureDraw); - Main.EntitySpriteDraw(texture, drawPosition, frame, Color.White, Projectile.rotation, origin, Projectile.scale, direction, 0); + DrawHead(texture); return false; } - // Damage scales up over time as it grows + public void DrawHead(Texture2D texture, float scaleFactor = 1f) + { + int maxFrame = CurrentPower <= LargeMouthPowerLowerBound ? 6 : 9; + float offsetFactor = Projectile.scale * ((CongregationDiameter - 54f) / 90f + 1.5f); + offsetFactor *= texture.Width / 90f; + + Vector2 drawPosition = Projectile.Center - Main.screenPosition + Projectile.rotation.ToRotationVector2() * offsetFactor * 15f; + Rectangle frame = texture.Frame(1, maxFrame, 0, Projectile.frame); + Vector2 origin = frame.Size() * 0.5f; + SpriteEffects direction = MathF.Cos(Projectile.rotation) > 0f ? SpriteEffects.None : SpriteEffects.FlipVertically; + + Main.EntitySpriteDraw(texture, drawPosition, frame, Color.White, Projectile.rotation, origin, Projectile.scale * scaleFactor, direction, 0); + } + + public void DrawHeadForMetaball() + { + Texture2D backTexture = ModContent.Request("CalamityMod/Projectiles/Magic/SpiritCongregationBack").Value; + if (CurrentPower > LargeMouthPowerLowerBound) + backTexture = ModContent.Request("CalamityMod/Projectiles/Magic/SpiritCongregationBackBig").Value; + + DrawHead(backTexture, 1.04f); + } + + // Damage scales up over time as it grows. public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) { float damageFactor = 0.25f + 0.75f * CurrentPower; int fullPowerDamage; - if (Main.masterMode) fullPowerDamage = 540; - else if (Main.expertMode) fullPowerDamage = 450; - else fullPowerDamage = 360; + if (Main.masterMode) + fullPowerDamage = 540; + else if (Main.expertMode) + fullPowerDamage = 450; + else + fullPowerDamage = 360; modifiers.SourceDamage *= 0f; modifiers.SourceDamage.Flat += (int)(damageFactor * fullPowerDamage); diff --git a/Projectiles/Magic/SpiritDust.cs b/Projectiles/Magic/SpiritDust.cs index 97a8ee4f20..0d01bdc4b7 100644 --- a/Projectiles/Magic/SpiritDust.cs +++ b/Projectiles/Magic/SpiritDust.cs @@ -1,4 +1,4 @@ -using CalamityMod.Particles.Metaballs; +using CalamityMod.Graphics.Metaballs; using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; @@ -8,6 +8,7 @@ namespace CalamityMod.Projectiles.Magic public class SpiritDust : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Magic"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public override void SetDefaults() @@ -24,7 +25,7 @@ namespace CalamityMod.Projectiles.Magic { float radius = MathHelper.SmoothStep(80f, 48f, 1f - Projectile.timeLeft / 90f); Vector2 spawnPosition = Projectile.Center + Main.rand.NextVector2Circular(5f, 5f) * radius / 130f; - FusableParticleManager.GetParticleSetByType()?.SpawnParticle(spawnPosition, radius); + GruesomeMetaball.SpawnParticle(spawnPosition, Main.rand.NextVector2Circular(3f, 3f), radius); } } } diff --git a/Projectiles/Melee/StreamGougePortal.cs b/Projectiles/Melee/StreamGougePortal.cs index 3312c33872..b7b02a5d1c 100644 --- a/Projectiles/Melee/StreamGougePortal.cs +++ b/Projectiles/Melee/StreamGougePortal.cs @@ -7,14 +7,15 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; -using CalamityMod.Particles.Metaballs; +using CalamityMod.Graphics.Metaballs; namespace CalamityMod.Projectiles.Melee { public class StreamGougePortal : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; - public static readonly SoundStyle SpawnSound = new SoundStyle("CalamityMod/Sounds/Custom/SwiftSlice") + + public static readonly SoundStyle SpawnSound = new("CalamityMod/Sounds/Custom/SwiftSlice") { PitchVariance = 0.1f }; @@ -43,7 +44,8 @@ namespace CalamityMod.Projectiles.Melee // Play a slice sound when spawning. if (Projectile.localAI[0] == 0f) { - SoundEngine.PlaySound(SpawnSound, Projectile.Center); + float volume = Utils.Remap(Main.LocalPlayer.Distance(Projectile.Center), 600f, 100f, 0.12f, 0.5f); + SoundEngine.PlaySound(SpawnSound with { Volume = volume }, Projectile.Center); Projectile.localAI[0] = 1f; } @@ -106,11 +108,12 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i < 20; i++) { Vector2 spawnPosition = target.Center + Main.rand.NextVector2Circular(30f, 30f); - FusableParticleManager.GetParticleSetByType()?.SpawnParticle(spawnPosition, 60f); + StreamGougeMetaball.SpawnParticle(spawnPosition, Main.rand.NextVector2Circular(3f, 3f), 60f); float scale = MathHelper.Lerp(24f, 64f, CalamityUtils.Convert01To010(i / 19f)); spawnPosition = target.Center + Projectile.velocity.SafeNormalize(Vector2.UnitY) * MathHelper.Lerp(-40f, 90f, i / 19f); - FusableParticleManager.GetParticleSetByType()?.SpawnParticle(spawnPosition, scale); + Vector2 particleVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedByRandom(0.23f) * Main.rand.NextFloat(2.5f, 9f); + StreamGougeMetaball.SpawnParticle(spawnPosition, particleVelocity, scale); } } diff --git a/Projectiles/Ranged/SpeedBlasterShot.cs b/Projectiles/Ranged/SpeedBlasterShot.cs index 712f695693..40755b24cf 100644 --- a/Projectiles/Ranged/SpeedBlasterShot.cs +++ b/Projectiles/Ranged/SpeedBlasterShot.cs @@ -1,9 +1,6 @@ -using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Graphics.Metaballs; using CalamityMod.Particles; -using CalamityMod.Particles.Metaballs; using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; using System.Linq; using Terraria; using Terraria.Audio; @@ -140,7 +137,7 @@ namespace CalamityMod.Projectiles.Ranged { if (!DashShot) SoundEngine.PlaySound(ShotImpact, Projectile.position); - + for (int i = 0; i <= 8; i++) { Dust dust = Dust.NewDustPerfect(Projectile.position, 192, Projectile.velocity.RotatedByRandom(MathHelper.ToRadians(20f)) * Main.rand.NextFloat(0.05f, 0.3f), 0, default, Main.rand.NextFloat(0.6f, 1.2f)); @@ -154,23 +151,23 @@ namespace CalamityMod.Projectiles.Ranged { Vector2 paintPos = Projectile.Center + Main.rand.NextVector2Circular(12f, 12f) + (Projectile.velocity.SafeNormalize(Vector2.UnitY)).RotatedByRandom(MathHelper.ToRadians(30f)) * Main.rand.NextFloat(4f, 20f); float paintSize = Main.rand.NextFloat(60f, 100f); - switch(Projectile.ai[0]) + switch (Projectile.ai[0]) { case 0: default: - FusableParticleManager.GetParticleSetByType()?.SpawnParticle(paintPos, paintSize); + ModContent.GetInstance().SpawnParticle(paintPos, paintSize); break; case 1: - FusableParticleManager.GetParticleSetByType()?.SpawnParticle(paintPos, paintSize); + ModContent.GetInstance().SpawnParticle(paintPos, paintSize); break; case 2: - FusableParticleManager.GetParticleSetByType()?.SpawnParticle(paintPos, paintSize); + ModContent.GetInstance().SpawnParticle(paintPos, paintSize); break; case 3: - FusableParticleManager.GetParticleSetByType()?.SpawnParticle(paintPos, paintSize); + ModContent.GetInstance().SpawnParticle(paintPos, paintSize); break; case 4: - FusableParticleManager.GetParticleSetByType()?.SpawnParticle(paintPos, paintSize); + ModContent.GetInstance().SpawnParticle(paintPos, paintSize); break; } } diff --git a/Projectiles/Typeless/VoidFieldGenerator.cs b/Projectiles/Typeless/VoidFieldGenerator.cs index 50350b04b1..caa0c96e8e 100644 --- a/Projectiles/Typeless/VoidFieldGenerator.cs +++ b/Projectiles/Typeless/VoidFieldGenerator.cs @@ -1,10 +1,10 @@ using CalamityMod.CalPlayer; -using CalamityMod.Particles.Metaballs; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; +using CalamityMod.Graphics.Metaballs; namespace CalamityMod.Projectiles.Typeless { @@ -12,7 +12,7 @@ namespace CalamityMod.Projectiles.Typeless { public new string LocalizationCategory => "Projectiles.Typeless"; public bool start = true; - public BaseFusableParticleSet.FusableParticle voidaura; + public StreamGougeMetaball.CosmicParticle VoidAura; public override void SetDefaults() { @@ -78,14 +78,14 @@ namespace CalamityMod.Projectiles.Typeless } } - if (voidaura == null) + if (VoidAura == null) { - voidaura = FusableParticleManager.GetParticleSetByType()?.SpawnParticle(Projectile.Center, 500); + VoidAura = VoidGeneratorMetaball.SpawnParticle(Projectile.Center, Vector2.Zero, 120f); } else { - voidaura.Center = Projectile.Center; - voidaura.Size = 500; + VoidAura.Center = Projectile.Center; + VoidAura.Size = 120f; } } public override bool? CanCutTiles() => false; diff --git a/Systems/EntityUpdateInterceptionSystem.cs b/Systems/EntityUpdateInterceptionSystem.cs index f3634046bc..98a14899e8 100644 --- a/Systems/EntityUpdateInterceptionSystem.cs +++ b/Systems/EntityUpdateInterceptionSystem.cs @@ -1,6 +1,5 @@ using CalamityMod.NPCs; using CalamityMod.Particles; -using CalamityMod.Particles.Metaballs; using CalamityMod.TileEntities; using Terraria; using Terraria.ModLoader; @@ -9,19 +8,6 @@ namespace CalamityMod.Systems { public class EntityUpdateInterceptionSystem : ModSystem { - #region Fusable Particle Updating - public override void PostUpdateProjectiles() - { - // Update all fusable particles. - // These are really only visual and as such don't really need any complex netcode. - foreach (BaseFusableParticleSet.FusableParticleRenderCollection particleSet in FusableParticleManager.ParticleSets) - { - foreach (BaseFusableParticleSet.FusableParticle particle in particleSet.ParticleSet.Particles) - particleSet.ParticleSet.UpdateBehavior(particle); - } - } - #endregion - #region Ash Drawing public override void PostUpdateDusts() => DeathAshParticle.UpdateAll(); #endregion Ash Drawing diff --git a/Utilities/ProjectileUtils.cs b/Utilities/ProjectileUtils.cs index 46a8140139..53a6444f8c 100644 --- a/Utilities/ProjectileUtils.cs +++ b/Utilities/ProjectileUtils.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Linq; using CalamityMod.Projectiles.Magic; using CalamityMod.Projectiles.Melee.Yoyos; -using CalamityMod.Projectiles.Ranged; using CalamityMod.Projectiles.Rogue; using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; @@ -19,7 +18,36 @@ namespace CalamityMod { public static partial class CalamityUtils { - public static int CountProjectiles(int Type) => Main.projectile.Count(proj => proj.type == Type && proj.active); + public static bool AnyProjectiles(int projectileID) + { + // Efficiently loop through all projectiles, using a specially designed continue continue that attempts to minimize the amount of OR + // checks per iteration. + for (int i = 0; i < Main.maxProjectiles; i++) + { + Projectile p = Main.projectile[i]; + if (p.type != projectileID || !p.active) + continue; + + return true; + } + + return false; + } + + public static IEnumerable AllProjectilesByID(int projectileID) + { + // This uses the same efficient loop idea as AnyProjectiles. + for (int i = 0; i < Main.maxProjectiles; i++) + { + Projectile p = Main.projectile[i]; + if (p.type != projectileID || !p.active) + continue; + + yield return p; + } + } + + public static int CountProjectiles(int projectileID) => Main.projectile.Count(proj => proj.type == projectileID && proj.active); public static int CountHookProj() => Main.projectile.Count(proj => Main.projHook[proj.type] && proj.ai[0] == 2f && proj.active && proj.owner == Main.myPlayer); @@ -157,7 +185,7 @@ namespace CalamityMod public static Vector2 SuperhomeTowardsTarget(this Projectile projectile, NPC target, float homingSpeed, float inertia, float predictionStrength = 1f) { if (predictionStrength < 0.01f) { predictionStrength = 0.01f; } - Vector2 idealVelocity = CalculatePredictiveAimToTarget(projectile.Center, target, homingSpeed/predictionStrength) * predictionStrength; + Vector2 idealVelocity = CalculatePredictiveAimToTarget(projectile.Center, target, homingSpeed / predictionStrength) * predictionStrength; return (projectile.velocity * (inertia - 1f) + idealVelocity) / inertia; } #endregion From 928106d3cc96689cfc88e4eaf542ed89895414a6 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 4 Nov 2023 12:45:41 -0400 Subject: [PATCH 61/95] Funkit Cirrus resprites EXCEPT candle tiles --- Buffs/Alcohol/BloodyMaryBuff.png | Bin 694 -> 674 bytes Buffs/Alcohol/CinnamonRollBuff.png | Bin 628 -> 674 bytes Buffs/Alcohol/FireballBuff.png | Bin 634 -> 680 bytes Buffs/Alcohol/MoscowMuleBuff.png | Bin 776 -> 812 bytes Buffs/Alcohol/TequilaBuff.png | Bin 665 -> 686 bytes Buffs/Alcohol/TequilaSunriseBuff.png | Bin 682 -> 741 bytes Buffs/Alcohol/Trippy.png | Bin 683 -> 723 bytes Buffs/Alcohol/VodkaBuff.png | Bin 671 -> 674 bytes Buffs/Placeables/CirrusBlueCandleBuff.png | Bin 490 -> 575 bytes Buffs/Placeables/CirrusPinkCandleBuff.png | Bin 570 -> 562 bytes Buffs/Placeables/CirrusPurpleCandleBuff.png | Bin 591 -> 535 bytes Buffs/Placeables/CirrusYellowCandleBuff.png | Bin 550 -> 587 bytes Items/Placeables/Furniture/ResilientCandle.cs | 4 ++-- Items/Placeables/Furniture/ResilientCandle.png | Bin 683 -> 585 bytes Items/Placeables/Furniture/SpitefulCandle.cs | 4 ++-- Items/Placeables/Furniture/SpitefulCandle.png | Bin 784 -> 670 bytes Items/Placeables/Furniture/VigorousCandle.cs | 4 ++-- Items/Placeables/Furniture/VigorousCandle.png | Bin 697 -> 603 bytes Items/Placeables/Furniture/WeightlessCandle.cs | 4 ++-- Items/Placeables/Furniture/WeightlessCandle.png | Bin 704 -> 589 bytes Items/Potions/Alcohol/BloodyMary.png | Bin 467 -> 472 bytes Items/Potions/Alcohol/CinnamonRoll.png | Bin 386 -> 454 bytes Items/Potions/Alcohol/Fireball.png | Bin 404 -> 533 bytes Items/Potions/Alcohol/MoscowMule.png | Bin 878 -> 818 bytes Items/Potions/Alcohol/OddMushroom.cs | 4 ++-- Items/Potions/Alcohol/OddMushroom.png | Bin 759 -> 897 bytes Items/Potions/Alcohol/Tequila.png | Bin 501 -> 485 bytes Items/Potions/Alcohol/TequilaSunrise.png | Bin 460 -> 504 bytes Items/Potions/Alcohol/Vodka.png | Bin 489 -> 435 bytes 29 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Buffs/Alcohol/BloodyMaryBuff.png b/Buffs/Alcohol/BloodyMaryBuff.png index 9f9d34bf27301fdbc3740e0fe9a2de52d5bde566..46cf3a0b57af7b828e93195822d30f7bfeb0de9e 100644 GIT binary patch delta 651 zcmV;60(AYh1)>FzBYy&ENkl%zxV(&RK0kd(K##WMKXQ zOJI8K6R>UfhNY*{VT)_Byz&ZC$rFfZXPkNS*#0XoblA%AJ;y*cY6D>Z1Dy?>tuHkuuHRTvs-tE@!1z^jA< zMbNzjXp~8upkQ$9>UpIIJr#?gNYvJfkjZS@r$u)Ypwo%)VJWX)0QOwF3uF?WSpm6D zB&XIeKIl&XxdMW0vnhE3ff;zxcO#Vh>Q7(>^nuCqD%sQ0H%bSD8iiXN&$sh#(Fx7h+@Via}%kKUhVNZybl9|Uz@$rHdE lsPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi z!vFvd!vV){sAK>D0!v9mK~z{r)s|046j2<<-?*bhhQxvkO1K0OtIHCI$OieZlaNpo zMP7p-!b{LiIuwDOl%PX+izqK`nn~p$Dk@k5i>wyL!l)4xT7MGyD{Z?@z3=b+ruL!a z$$k5QAD_3o!_NDC=gph3#9w^njRNPcz_5hKS)lXg=n<)afrkBRR7}4&u13WC*EuyJ z+HN<%lgFOGO!Xpt&t#XTVe=B;&f|xouudlR0X|xL4i3Hh2}inQe1B8jR#@lR#Tod_=Cg33bvt}*^f}C(e}75Ie4hOTa{`Y$F2J#|J+S!+ z^!CQ#^^$Ikz~Ra*@c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b_C|@H-vf7d+rzT zS$}v#rhjX~n^1TD{G10Uo&tjtp>IcLs+&;l9UmS8?QOvu8An^z_!M|)!7w=57yNyr z;f*NYSeAQ$;wcdA$KS)rN2dM&?QJiBuEBt}H8r8q|5+C9`it>vNuG0;0`AJfTxnXm zH!NHZKl84@t+$}J`9!j?bKQeY&(O$rt_Cn?u~1??N{f zM}htwUx6#%{t0R~J^(g-{qlcG6d6wKNMFaBV^g{D#Z@5MolYLDx^BUo@zbr<39jj{ jPT~rsK(znozvF)aJtOt41#Gn~00000NkvXXu0mjfoIY_0 diff --git a/Buffs/Alcohol/TequilaBuff.png b/Buffs/Alcohol/TequilaBuff.png index c005b88c923d851133f8701240ccf351a229d041..a6c233e3d1055a2f2ac91b7ec738e38100a57668 100644 GIT binary patch delta 663 zcmV;I0%-l21+E2k7&$UD3(WSur&_fWPt0@Se z$jeDX#Lrwl4Hg#@vIEom(|f_Rj2Z`3JDjlOs>T^g{lHV7kB+631C{AR%X>YYG;B zg_Z`ufa5~z~o`{;0Xbki{K$~2O^@W#Rq1r+i??2UtL%YQ;J4& zfcZxm*wDoBa|d4tz}yQ9iS)OSxDE1vqyaPC9Iz4|aeoPzQZW7Q8l(=;p4SEDUwsJ) zk^2mnP}HGw25$(UyY$J^mtY|t7l_X{Or40L#Lm$Qg-DDPrXG~gisZxLO!*oWdiW=TkiHtkL#SX^FF97P_T z^XnyQU4QWW+jp>%g3F7+^shijE&KQRFEC&GgcFz^@DPBv2Vg$_bo>k0Wqi;ONavmj z=FhyJ4yJLH_0|j!pMezt37F5nTYQ5EJ%`Dl(gPj>@HB8E@Cb_2U~z>ah{S<~7)%IV x{eMShm=u_1xdGwB)D4<6015#Z7@56e06$N&=@7te&L98)002ovPDHLkV1lU~G1344 delta 641 zcmV-{0)G9j1(^kqBYyw^b5ch_0Itp)=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi z!vFvd!vV){sAK>D0xn5JK~z{r)s#(0R8bViUrvY{H3n41#moprg1nMFYN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ZLyLeGgEebcF-LlIyAPPG7vB|JZ>0SKmOEhXf?)k? zsk-$lr(;~C=BMlAXU|?>o^5&{;{bpE=YPjP0a)(Zx1g7IApigX07*qoM6N<$g6la| A_5c6? delta 659 zcmV;E0&M-|1*!#*BYyw^b5ch_0Itp)=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi z!vFvd!vV){sAK>D0zXMaK~z{r)s|mKQ&Akpf4Y$oGQ@|5N=g`(4SSHxiIwK7Qrs{q z3Ibn5@Im%gJt#q;53aoh5e!EZMkM-D522Nb8a?!HxKd#zDSs%)SVM<2=Fazb&z-wA zm@j(vfghi9+1>6rUw-$Toa$^LtnyG4A-F zK4QLvZ18<+1)Pr6wa>763CNW@TFYQF{+A1I<;*>}v@HNr3+w$&_LazK9;89N1m2u` zCSMD{CL%!-ePJ@dgikV(2WaegeKu z2fSOp9y$UK1b@OZ0f~A&;H!EhMAa=PVM)P@26(KGXDqqgTnrBdA&UFC2adY9`@8cv z$+xpJu=)weeW1(M2%kAt1?PX`ZY`O^ZAr$(SBWO{_kX_rDO+A=O#(Y6;0eD&eVY4@ zGVml;ENZqL<-Kk}8AQ11%egW|y#ypOiNU{wGH^deRaj!EUoi`cMiQTi+9m3}1?jl4 z!RNl~Hblf5+zxK>hDtr*DY&+<6E>snTaYow^~#X3_I{L^?CF71A?^Y1bBKanR`^f! zA1s-UvVXOeEa?Fw0l#xp$iPx`Kp!!^qkJY@^uB^6nx^R^#%&irnM`0)OHC-Yya_v| znqYMj2xuRLC_E`Pbs}3`J}hV4IRF11vD^8-pP7*#Pv8ybI&4PW1SE3h=`i<*`TqEY tZ6{>{Yk;qn>;Vaq*hBE_eNKRA3s~OI15DS|VGIBO002ovPDHLkV1jrSE=~Xd diff --git a/Buffs/Alcohol/Trippy.png b/Buffs/Alcohol/Trippy.png index 641781ec778d67273e9904bb96af83a7273f6a2c..7efc1b9c5d5d4f2c94836479658b02d5d823cfb7 100644 GIT binary patch delta 699 zcmV;s0!00*1=9tPB!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@u(Kfy?JGrGqB~U@k(Ze?0#H7J72zDVP>B(gV|BG0|YUud^FWGdzJ%q>_Ut1YUjk z2zI>8i$7rc;|oZf!+gG2X)jp3t+X9Xiz783Qf@wnrcQF0x>>)6Xo*NF^PXLSC z9xMRUFkL`nn0wWA;5bMQUrcBl0nyk z!pBuB4xJFVckT+I^SFJd7LV#-vq~-J4NC)gafi)2R z%O79Be66?SRfmHo1QtuCqeL9DBpaCD%rGBJfAfLFIZV+9Xc}Nxat$nWP53WF>N!jW zgof3EFn`g%&wqiL+9#aA^xz2rn2$dlhr}r#Gz6+{LRvog?`J|hu?9lDdHM{(fRb+@ z4JL+lXCbxXuRut<0_I~B#Ymh14*_`3=tkfXBzG||5OO&z#9*4x)&F;dw4Pz|EH@y0 ln7Toe29T?=k=Z*206#FSZNta>KmY&$07*qoLPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi z!vFvd!vV){sAK>D0yIfPK~z{r)s|mKQ&Akpx9raza)~fu{ZY(hNBBehId*#+%-snEX`(Ig6o(HS!>6MW+}`;SKYxiH#X@3j09&7Da52npK=9Rk z!_vU&${H*)zp_a;(mSc&lxxd|@Z-2X1Gbk(v6IEK6HaF*Nio#SRb*cnOC^aDbt=lq z_&4USfqY;X@7%ASb#=u${I>NXcGBg|;8#{BHhvAbHelsqIDGspmIemXdbK<0xZjEw zUjzLOFMpK^lmwUKP|qP;y}2Hbrv|XERDThzFI|Jv-tTzuQ!kbVa*?^;3csuzuI<@} z&1oPJ=~nV&-{`a5zhfm9qzN}<=E9E#-Ha1+8xZ7K6+_mD;Qaq=sKg#=mL~LXBiDdH i6Y~hyUf>2ip5H1&^uIb0-0%PZ002ovPDHLkU;%>PKQs>j diff --git a/Buffs/Placeables/CirrusBlueCandleBuff.png b/Buffs/Placeables/CirrusBlueCandleBuff.png index 49bd55dfe6236b23284675bd78dd6d18b06eeb96..a73721ff8f6d797261e96e391bebc8485c53ed5e 100644 GIT binary patch delta 551 zcmV+?0@(fP1HS~2BYy%0NklH){02x>$*PunxPf672S@@PDof=umiy49oirMQY?A`mC14 zPV8ZTdEzB46X!W#Ps6FbhZeu$A$L4ZHIQoL#GaiRxjrNO>xA4^LBLH0)T=POLctV2ZOr#~ubV-t_@;Kr=xV+(!KXs^3 z^a&h_B4p4PDAmDPq)TydkuDaTgt}H8x@ZS|h1TKn1@1FvGBpSOmh0uNNxtv?_y1pl zFscCn9=e?=W=I&-0sxqsnt`M4+n;}IM}MnUzv%qU1thJ}Ub+MG z{6XbpcYVd`*DHb5rxLPwzMc7iwVO|?ug~$v0j?pHUu+n~`o^k!uet;PIB0eN0F{RA z#ObmbN8&_p@NSL!Y&9?^*zW`{5YC@7;7*^(_-pG2b+Ae>*Y4QwJ2?RsJ|Ynp@e* z(~OqD=npSXtn1gYIbU$?^YF(3jZ!K>Y#LR>7*PlE@V^?ipKPVB>UZ{$y~d0k&Wq)K zdUEo|0dhMshhwb?F6G=Eni<*WuF{hc@y`LGwZNsEyGlbdXHiObz*!A7BNEMYdM+TW z1zdZLDgUb>Ni$-?*Kt2{o>o83<0-gavA>K+=?(<{{_FS$ai5=U#{EK^00000NkvXX Hu0mjfSl8v` diff --git a/Buffs/Placeables/CirrusPinkCandleBuff.png b/Buffs/Placeables/CirrusPinkCandleBuff.png index 93720eb840e90e33db4fb9d1026da2731f4640ee..c299a08857c56dde27c69513da7627f30ab58fa8 100644 GIT binary patch delta 538 zcmV+#0_FX>1hNE>BYy$;NklT8Jnblz5rDFUhWVNtatN&Fs9H*_-!v zvwLSn+P_A7*q4#je9Ayy9@XU`%`SxbM>Z>I(e;Fq-l#k&et#kNuK2o>-WyXOD?Y3E zUzcU^M>83*<|y!UdoCTp`1$5V>AYGR5kI-MrQo__=g$O+Eq*GYndM3GQDkswQ~b~s z7*g7F9GFi{xFPmLwRESacJ*VsNr|)O%p248ggFYZ_Rxa4j*lmXN%6ON7p9JRBFDA_ zz$rFI0Xkys@qg?0uio&_b|J;rQWuT8VSQeT%u|5Q^tDQ@eoN^3=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pleCandleBuff.png index b0eccec1a3b851753b77ae9e65c9bff694eb8a98..3ff18f000a55bb2143f7554f15f6f7876822e822 100644 GIT binary patch delta 510 zcmV*B1A0o6~x9M2zF{? zVQC)VEG?|GRgeghC$P~%2!^DH1}>EluT<~_G}*oHju|ge1aoUMGylxF^Zz@$n`|cj z`;6U@c-j6cV1-O!-;;QZx_qlZ~>$a|L;Al)Phu zYbBVWy`^oF*R$r10)vIy_Rp=h%gz`RmE3R8CKgSL6ZGB8J(hu}^83*v>T zIfFM}pG2O(Jq5lqx4pt#?V{Ie5vFH+LK7oIF;a4sdPVQ$XJXLEH8m z%|u86Wxxk1!41f4xvPL?PNy)00d?fDFeTn8t{e9nV1RXR2J{Wcx##uMMD#46M6+sN zKa^XX$cs-~VU)T8_Hnn}$e+2Q-+u|r+Nmq>1ykOfJMLwb6951J07*qoM6N<$g5W9k ANdN!< delta 567 zcmV-70?7TB1kVJJBYy%GNklp19Hrem8f{ z++TA(_ndR@Bx98-03UZYk2yn)RjLU<$60RLP6==fu>1E2Yk#eyw)6eOiK~^{fqmNX zL!D%;`5q5}H{Xtej`zR9kl3qUZ@a*Up9erru4w*bR}$FMJ&_Q&qz^j7^1v+sRtD`C z-|fBzz{cZ00Q8K83-oti1zJhSW1aczo)M`xe+2X6A>ifD)O+qFQc_WDc*RG+N9$=d zerE=Nn@{?HoPWsj=YwF~dNZ7N?gR?!!1H1A;8kr6fKQFxpnq%sHIRG$uh+gGDE9^9 zUe45joP-o#9Z4*MIDZM`mxlGrL*;60GO zv-d9~DLw*{Dx=rL+wcXX%IQgv#fHY|MdTF^0sqeTcLIkeFQgbLrFMHNM&!9-YO>4r znSN&T;xHkgGxwEBXYS?4$zw0Qg5|l7t#c=kT=;*-{{a~ayU`;3%1i(N002ovPDHLk FV1n)J9;^TW diff --git a/Buffs/Placeables/CirrusYellowCandleBuff.png b/Buffs/Placeables/CirrusYellowCandleBuff.png index 691d19958dd574a0a4c91c0cd2801278def58276..2ac39e16dde188e9095ecfba192ddbabdf87954c 100644 GIT binary patch delta 563 zcmV-30?hrU1j_`FBYy%CNkleqdO=LJ=y3%vp!|{wP59mWvvjWuDCpxS)0KVelRDoxmxYOS&0)2;#2;ZKr^U z+4I>YDOf>jTz^Bp%4@xt*l-jaq4R+3xn799Ugg{E-sdy)_wsR)4&Y%=2FXTk-0Ow{wZLypI8q!dz~45JZCfN=FZ?{gc7#)b0_d!e-yCHsesgWBIaGt zs(^Y2&~FjOC;SMy+k3HTV-I*c$o4Q3<7;?diN#_?}EmK-dBA8R>&hgNhz-OXcs|vUcpJ-~;bGw=^9NNWo`myyZ(~7{1AUfr&$;L0 zKF|AgZnRKL0Qk7S*P@SDC?*lWgMJ>Gh6rc@TsD8>TK8gg|9|se7rre{dHuW2pUKm1 z9ruANFr)`D7v>*N0#HxJQWwsw{P6l#ky<0&rR+K3C?FeJ=FQC*fL8g1w=ga|0^q|} zr-W=PhNbby8-G=IiX46V;_VZT0$H%kdqIo^DI!I4?eU-OHarDnyZSvH@cOCqm6ggO z0Po)&dhf$gK!0(pFP8Ved~*!I@x`})+W7f|+vn>01^{uP3c%L6i<-)GAepdJ3r0tr z`)0*`w6mSML4N%T=;ni7%)_k(f|$=O?Rw*9i9c_4Zxn#$rt9Y?d~X+XDPwDZ5S{|U z>A^D4WkM3C&by_=x{Gr$w+Ocy{;Hk;5Eq^ST`v~I^nWaIS==g=&q$q?vAsEkqku)n z_6AbowCs;(*<8rFA%&wrZo}E$RxM>P)rhGl(*UfsYlMZhxiVj^k^TV#S0J+%2+H+V ziC*)p&2`TZf~khLqCiY66u-GU&a)_u`+r8lz!ivw9}WX>eRKVP{vH1T++eLvzj5oR Q00000Ne4wvM6N<$f|7CuuK)l5 diff --git a/Items/Placeables/Furniture/ResilientCandle.cs b/Items/Placeables/Furniture/ResilientCandle.cs index f490abe505..87c79ac75d 100644 --- a/Items/Placeables/Furniture/ResilientCandle.cs +++ b/Items/Placeables/Furniture/ResilientCandle.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Items.Placeables.Furniture public new string LocalizationCategory => "Items.Placeables"; public override void SetDefaults() { - Item.width = 28; - Item.height = 40; + Item.width = 26; + Item.height = 34; Item.maxStack = 9999; Item.useTurn = true; Item.autoReuse = true; diff --git a/Items/Placeables/Furniture/ResilientCandle.png b/Items/Placeables/Furniture/ResilientCandle.png index d05ce51406c216c3df7705f2f8278b6add5abee8..29c5480f8cd2d04a08b3fe4979678a698c841eb7 100644 GIT binary patch literal 585 zcmV-P0=E5$P)+b)mRAAxTUHe45)5*{wF9DyLsYyB$zFAlzRW~@J+;Tc9 z@A?y%ReQVmB*?W-gieMA45fCl-E)gwMgC@v8u$*>fH zgH}rgpfM*MkiUey^B@&DdifIY*zF78YWRflogkpFM0%TKhC80aRgy4CnYlnwD1;P> z&aof6khe z))(oFR}pD;e~)mUJjpmURw)U;DlKgGe(4&xc8PlW>Zs{CO7HHYMDX9S^XXT_M8C@S zO1ng-7x%;ppKxM~?Pa7X1)^Od-W;EhucykzC-TbyFlSn4?>{=NZz{&+pHNt$pYt8} zymw*ySHwFFp46gHzz X^vaJRS3WIm00000NkvXXu0mjfmck5W literal 683 zcmV;c0#yBpP)tG=eq@8=6Y7&&fhcUW+#;yVrTorocD!-#qR)=bra|bIyJD-BB0{sy@?X znT8dljCl$mZVdpiro?3btO^&OMt14q)uKVESQ3DF-&X}NpZ@|tm9JU>yqeAe5TCQ- z%Zd4dT^!uHndA%d7Syv0dhJ{@K zRR3tOuZw;QAk=aMfbQGdv;;yr@b)kOjST?>F#S5I#l8RZ4)B6d$ePruK^bSoVLU@+XH*_+!tR3R_m#X2;}E<|nskT{zvI>96pjmOjcK3_B#?y+Er z)RP)&Wb&ll^#LvL=Cx-4JYMVt;N@5q03&xF6-_)mV|Qs=a4WD>Tki-vkA}4;5;dmR zmXz?&{w{6Y8@&QR;(i41a<{0Nu&?8!^$3Ib-1-x)35P!1)5ell "Items.Placeables"; public override void SetDefaults() { - Item.width = 28; - Item.height = 40; + Item.width = 26; + Item.height = 42; Item.maxStack = 9999; Item.useTurn = true; Item.autoReuse = true; diff --git a/Items/Placeables/Furniture/SpitefulCandle.png b/Items/Placeables/Furniture/SpitefulCandle.png index 2c512cef6cecaa45babd3e1ab1ffd520c29d42fc..48403fea341cf327eb94d2e5e4e84432209fd4cc 100644 GIT binary patch literal 670 zcmV;P0%84$P)2}in`K`K)Hk(*qEAh;4YZKD1L7Y-5T$0~H= zLTo6-h%2cm;cZGnNSawW>2vNg`X29i2Z}S!VxIfF=jG1xoA=z0z{B3bjCJ~1TzC^W zQ+`;d*VkFkS8wFo_^*9}!s}%Ji|qOk>6AOM7-q_Pcz)jZUpec&zCp|Sxceh zM^<A~qSjXu zz^u&?mEWv()2K~GlBzpuS6zte9xg+-*1tm8?=D*OTP!TR!;vwfz<6s5PzF10t6%>7 zhgqPNV^4&q`SC^F`{+r?*=&DHV#zL1mz6Q1?7fc3g8dCVgeE6n3r|z*9<2OQ$ys+Y ziXc1tpK85;M4b;9&QqP8eNjKL%Z0a+>OD^u4Zf*fn$f52V-e=AMyL~s<||C$W~7JG z3H9}Sy?LS)TkZFuuzdA&Y8vwmePy39qU`gX_q<@R49VJ~>iHB3-x5jVi)+HuB;D)h zqkAV{eQxgnzhRz;38=4PZR!EVf~!o07*qoM6N<$ Ef}RRNj{pDw literal 784 zcmV+r1MmEaP)DeeMk z^NK(tNtC2O{Kx_kVP1)tsijC7mebM#I!?Z5I|9 z)&_vm^NSil;7ODLP*ygp0c`#C4S?AA7y!QXOahSGt;R>$4Z4=vVAH0Mo!$QtfSfDY zN`HRQZvgrmJ{bUMW`BRfp!C!1CX5I|MLFSj4#2j;WDOwoXbJ$qwow3*y)Gb>L#rZ> zQ0ku?0x)YN0I)@y0wBJ6^uNYgcf!Aww9-11)w;L6UIaGz0ch!((EwVzW&miK-VDIx z#JKH*&JnuYNdRR06mN>`EMdP0ju-%6^*bWKB$JZWTO1VrDGSjWz-aV>;wOpMze*)p zX08{2p}rmiU^qAegvhM2uFHx^Hvo062_^TLxnA)U`+5K;2(4t5HMJI(3B@ulRRWNM z$Yn?LY0+^t0E9?mn#7awSNRMGk*pI zNhWptVJQIj-^2p2uXr~A{wg2fB;k=$70Mk+9iHzFk6K3FizgKOvacP0*U#$!CwGgT ziDF&#wpl!i^Axl4jCYl&tN9&gbw}Z8Z>DkE>Nj{YLXD z1Ay6rAHo#dtONUDUj7~cbbZ_aC@(*zILNBBDsisUw*B$Q4#jS4d<8&ydXjTz8hHmm zh*Zi-ypkl5lqA!2hfdyM-xg9HPaFVaW8ZE6W-KL-Cr&ftly=9yE&c#&OxL|Vxtj+7 O0000 "Items.Placeables"; public override void SetDefaults() { - Item.width = 28; - Item.height = 40; + Item.width = 26; + Item.height = 38; Item.maxStack = 9999; Item.useTurn = true; Item.autoReuse = true; diff --git a/Items/Placeables/Furniture/VigorousCandle.png b/Items/Placeables/Furniture/VigorousCandle.png index fb18c15f400bfd051da9a2ad9aeef46e1a834969..ca1f8a3523b0a5f4d0d791465d78db78fddfd7e0 100644 GIT binary patch literal 603 zcmV-h0;K(kP)574)xv^-kRmR1k4S}y#KJ&gF$n{)NDLB*2qG~^3xP-ICXd*EL~I@rQiCL^B7sVeyU%Db z1sUeiL>=CIqR{*qtqn-zgjmb?tRxEk;(kPUQq*zY{~aGt6hQfF%?!jkqj50T0w7*bCp6I7PvAq>;LrCIXR zP2H>xv%P;xhl}1l(lz%Et)()eIFQs>3n@Xc;FUBz-$p8bG`Pw>?PDI_H!1|JwK}5H zzzu~!0+3|ZI1rBO!W?<;$t5Y~F$C`wT3=jf9c4t8u97DD4;#zd=%>pAPY6ev+TXxD zjAvsLhom619>QhD($6~!3UsVw=O|5VrafuPVzW39SRcItm-+I(}^N0>@ zwJcFFb3%ArZdN&exMJSOm`AjAq3u*axOdi6x-*N2p? z-JZoVIzws9|JEoYqNiUtCHB0+)KUtalcC)~nG)gJ>T*=5quT?jAN#$mulxzC6R{ZY pX0mR8c6GUqkU&0QRP90C@B18vt7}r2xFhPTRgvzoB658zI}~vF%fL?<4>}1FKyC{Ablp>Dt`okKe$P0zua*G$eU{EL&a>k-&`$Dd&`v@ zn_G_oP!gO4VDLh(W8y1`G>|tIQ+Sv!#OO*=gZW2W~J+EScxU?KrYs2xZh{4Uw2~flpCzZT|wuBpYK0$ysm#eymam) z07EzK0)@uEGZ>H8DDm2=2_@EVCsG^(uGoNbPE4|J>0s%+^vlzVg|tRJs}|fZ4J+Ew0*Fc ziS^5J?Vh5~-x)8Q+T6ZJxRk fsie}b?QHQ2{p!kULlo}x00000NkvXXu0mjfe5Ofu diff --git a/Items/Placeables/Furniture/WeightlessCandle.cs b/Items/Placeables/Furniture/WeightlessCandle.cs index 437f6f7bbc..76d6f8db0c 100644 --- a/Items/Placeables/Furniture/WeightlessCandle.cs +++ b/Items/Placeables/Furniture/WeightlessCandle.cs @@ -10,8 +10,8 @@ namespace CalamityMod.Items.Placeables.Furniture public new string LocalizationCategory => "Items.Placeables"; public override void SetDefaults() { - Item.width = 28; - Item.height = 40; + Item.width = 26; + Item.height = 36; Item.maxStack = 9999; Item.useTurn = true; Item.autoReuse = true; diff --git a/Items/Placeables/Furniture/WeightlessCandle.png b/Items/Placeables/Furniture/WeightlessCandle.png index c0168bcadaefc93c9786e086a4c3e04e85bca0d0..bf005cfb9520be097e2715f0cf72347730b2b702 100644 GIT binary patch literal 589 zcmV-T0PzcIp4Nq9Lc9w)wbKOND(Jp`lD(sWYl{yCM`PSEgvK%@Gw(R<&2x2t}{uwAJ6N z`^EQ-rL)BcYBko@unLUNSY$|=Bf^Znmm_MPru42#r|wDj4b-88V%OS&u1lV?eh@zG zYwuUNYL+)ogz4KKV`x%bkA|535cSlozP+}(wCCga+($`C%RZuXpu5C}QtgQt)A`~n z)5&vv-LTFtgndNnF3bE#Lg#jj<$o${B$5^dp-lf&n8Y(`Ceuy)`HdxiA&e0@ z@P0JAF-PZy$E}|U{LT72atgw&L;W@(VJ@#OsH>1Gu$1`|7SoURj?mc-4MOO0u^fS{ bH?~Ia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SbWW)&tSUa$q~32AOWhoaPS)lFAu>1f`x#^GDIva)t*CRmjM!n=vt`mWegX> zatb`Xp*w*9pY|?<)e*3;LwC@H?~l=iQ211LApoxrZHs)6J!k*`002ovPDHLkV1hEO B##R6T delta 454 zcmV;%0XhEI1JeVL7k?ZG1^@s6VcMTy00001b5ch_0Itp)=>Px#1ZP1_K>z@;j|==^ z1poj532;bRa{vGi!vFvd!vV){sAK>D0cc4?K~zXfV`QKZaA}MEhcdx{2})B9;B=v6 zkS2=F%=dnR=_eQNf%U*#CKW0Lq8Og7eg>xL=Rym2b+8LE3xDOo{3Aypb}wCb4ot&b z_Vp6P~vKj%$j6X(3h~FbxY^>btOo0pddWHD|yAFc9Po38VE7 zz!by(tB_cPfkPK-!1VUbx4<;*U8uxT^Ra8^K`<0h!8Bc-!Y&CDik>U{tc#q$&gNA_zjBD zfe^!QFouCwfBt|mESd7A46$VX*=s#fx1N3uY_L_BIJ`4l~Lh?2X wG|vy53q?gmA%TPj-o1VeWkCR)T*$xx09{CXgP=?@%>V!Z07*qoM6N<$g3Y$JXaE2J diff --git a/Items/Potions/Alcohol/CinnamonRoll.png b/Items/Potions/Alcohol/CinnamonRoll.png index e6c6fb511c8987a339999cc841ed422487614050..66f03882a4e5c1d82bb4df9fe9e8577c7001dcff 100644 GIT binary patch literal 454 zcmV;%0XhDOP)eB00cVH{2+=UWyLN=FoQ&biA41{m9yZKfl92M)B<)fy1L-J8WfjP%|&oi(Zfp6 z$`0%Zhlp4(ePG36FpcgKm`kbVBAj6abIH4hcTilmmVp5rX6P=Xnv39J1oJB_mh>zw z!9qgvDljQ94Rhh86^{pcBrOVBx@a#CQS!)x|}X{xyh zBi6)KmB2PA8vCL+;@hXIVE)V7_rNr|i)rVg!w1iTZFKk52Gh7)@}7kgEdS)`CooMr z7unhyqqqd-La-o^5QH)W|9poDfoa;g2*ny82j)UpY+XA30<7fz``;)^Y3CxC&9L+Y zE};Bf@v9PJ}^!FFgpJVQZ(^DgB0W9qQYRCFbH`q6ruCyU(v`# wFl!EMH~?nqSen9w!1R^lr&0Lm9IAy80RJU;c!7nPmjD0&07*qoM6N<$g6c@jV*mgE literal 386 zcmV-|0e$|7P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0T)R`K~zXfW8{}m z{Lg>{KEAlm2xa00Oi-G90J0g~c6@+r8{z&T)vuKM5eA6$E9HKK0hnztKW^Cb0?cQ$ z76(xb{+x_paq8Rn;rTr<9|kt=eF>%mTqLMuV~wmJ*rv(91;G5Z`__W#1MbdX8XZt> z<31a1u#Mj=2wJiJ4498AKTh_B#5475Bm_SH gdJd+^w2^@U0RIYF7m|S6w*UYD07*qoM6N<$g0PdIY5)KL diff --git a/Items/Potions/Alcohol/Fireball.png b/Items/Potions/Alcohol/Fireball.png index 58a484de0e57e931f67a016754616a4caa423252..48ba41816bc9c41168a642bbcb2c3d4a8a67dd91 100644 GIT binary patch literal 533 zcmV+w0_y#VP)4! zJ?-ISgEgQ;50i85G4F_*=H_C)^PM|$zRx-LF*auUt%X8$Qwr#Ltp=FUG+XOu}f!25ybJiWWgIJ?-OMTwriZ~;I zG%h!Xs7##Dx&!_08;a$6!+>*v0YLo=HL9;K5L_zgkk(3yJwo2P1JwDw8oStUWdY}b zu~US>k2-FJO1K|*{umv}b3p4|Nsoa7IU#S3S=^!6#XF?{F#}EtuR9lwOu1scTvew=Nv z_tQ~Rk*z)fvr-y@li7aD8?fEv*(@s=aQ>M4{?vmKYz}oTKZPX&?)Nikhc_GU;!bGD zk&awo;=H!i&f?#?%rDclA3^(?-r{6bZzB;b#eNe@~E=`vA*o%fg z6*b>}YR@<*oyfWDxxXd%vh0H@OgX#Ga-}*lJgwUkP|MrX$$Eu9)Ttq-x98+7tp`(t zR~_aTn^FJ48ff4xwOI+jUd?=+Fso*HUFGRx42PEQ(`qo>*id8tYQ^p5zY!Y~Eh8A% u5>y$i8lHNe%5`DSzn8FGknO~liH(d5&p#)LbQ}jVfWXt$&t;ucLK6TAyP?kj diff --git a/Items/Potions/Alcohol/MoscowMule.png b/Items/Potions/Alcohol/MoscowMule.png index 602654af71bcfa894eaf3c32103486d75739431f..9a3a129c084ede31330e0fd25bd93d4bb8e54a79 100644 GIT binary patch delta 808 zcmV+@1K0fS2C@c_7k?lK1^@s6b9#F80008{NklWKa&;*y!{y z&F3^NO3{K|3YHr|k{;NAi?|lFH&z=AK&g)t<{pV!;3NH4jA)8 zMMp~4qS&f}bfACeGq9zp7rD$clH^HM%aO{WBs{&bSmJ*B zI`H^ZOp15+{eP5r;d{~lU?6C?EG6hfxdX|b^jy@k*XacAayKnhsP?1h4dPjYPk`Qz zXTWbMHejQD8<3AqO?HTJGb(q$m>>6cE7ronnQ3#83v$o+tQ1d8bAVT7h_%GIuXW~0 zCv0nf$oS7c1C%?EOc{-JHE15Xbd4bipI*5r@e{r_iGL?H2;~e?d0mx@AtD^16UrU1 z+&fc)ica0Sg9^FY*O%^=ILjZ=cR?%?MabXP1>|m+oc#`7WZMiJjE?~;_w5Ao;qwR3 zRPKPW2F%LedT*dYo(trTqN9lS_S~cxU`19MustFixZM>54@YBI_0Pj`IDNUkTpFj| zf#8Q>QGbzFD5}*w;GAPkccQnaU#h(QrMU37W{X>s{MdmCFC25?Aj) z$&P$fRO=SXxys9`&mvCF{#M`syNQLft5&o-C@X&-%TCqo*8}CLV`hWOIAWy{d{2cJ>FG9faco@4wxdWE- zhxcQD=IZzP@iK9*cZY-%WqDRqOzub#``p(TMm!!DNGZx^prwfgG3A2+uTMUj{88n}dO|J(Gb2 zqy&hifS7@Sc>yB>GmvHki7jA)%PK5jhO?DG3a_~tP6kpknJ)ezK$;081_XjYtWghT z06B~;`}nJafpmbUi(^Ox=aI>_-pq~yZI>ksZm_5<=vc(!#FKHvEr|0Gdy2zi_L_U@x?e&^~xh(A=Hm8o~4!`q?e>pD&GKOCLb_D`NGm>DyQ)bMRf z*;Dt;`NnUjj^)`_N6*)-IBdbrt~p~TLyO{*FNL9OO*eiQ9=W_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;Sa$+EVEKTxgCqbpl2S8VIH zgo`H!EYDY8T7qZTdop@_d5m($mpV7te(##Omde13uc;Ne`TkRCMQ(q7m0FGLT+o?X z5soXL(L9r52j*F7jaGNuNv#NG=d2vJT;H|G5^967ME5Rkx8!&=TOOk$+c(+1GOK?} zYBk~+1vNV~{K0b9L}RV0+2R_-I;zP?+te0U}rQ`GEqDV|ZC z85q~DKG|;x80)w`Vad3uqk)d6idVBxdp2n~`t6Hl@p?T*G0AwAhc`okXZGxy=cyIx zUfY&hk>VRo`K!0@>1s5}_?Bnz$k@}=id^nkms$}FW7IPVt!q?G!NGk?Esu^bv4qX{ zhb%FgXA+7(GcBJz-}W)nw|kYPQXL$zymsTACFptHaTo+O3578_<%@IqLEY@x=(7EEW^ z{$Hcm>^XGL(yKkr<9+Mt3y&>zv}oON^wjZHLK^B$7og$3~;Avf;Fl)etK{n zYFy7RpHZ(@VnA0*%=vj{xjr>so;M|Vc(tgjB+%8A{@)4mOhS3bQOqi8Kx+@P3cpl6 plh8UdQy$(EP&|`R5TljKPafNfZb?Cgx&QzG07*qoM6N<$f&kDZY~cU^ diff --git a/Items/Potions/Alcohol/Tequila.png b/Items/Potions/Alcohol/Tequila.png index 6c5178cae7b19ece4eb7a21dd8be68186d3adbc3..8ef6726cd6977f7e6d9ab3b5a5563d8dafb83a45 100644 GIT binary patch literal 485 zcmV5oK=BXER1h8M;|})ot%py*!svd7sioKj18)FE7{L5q;A#i< zX4V|k&_@poioF0&i7=aCp(|wX3}&kBJ_M#=v4Nf>tF?moLCHk2oY2zCigf8_{WsUBK9Gt_RLlY~qj<#`EnVx+N(5FI@6q{;!viyhE`I zSe}3T4mMGq0pbFf4Jg(EIWQX;K0|DV>7&>M@KQNX7gEBY=XaP(tQjD=55}K#`8HTD b#V!BPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0g6dPK~zXfV`Lxz z=DG9zhcdyS?|~thzH;**UcF3En(6?jtuU8*$4P?uD_1*#X&9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Vdc03IS^eCA+P QdjJ3c07*qoM6N<$f>TMj@&Et; delta 476 zcmV<20VDpi1L*^h7k?%Q1^@s6^tY;t00001b5ch_0Itp)=>Px#1ZP1_K>z@;j|==^ z1poj532;bRa{vGi!vFvd!vV){sAK>D0e(qDK~zXfV`M-BVG?Tpp-eDX_2L$W8W3QD z(j)^6)2cP>!8U5KOM>|uU!DWg=r)sWBZkJ?AD)BpwVx1-3x810Mi>D35ri-B{{drk zKz$owe*FCD3mBsV>e-0PPw0U9e$;5`1!G)*Y#ZU}PtU{}oJLD4CW86letKX!uWk~U zKDK8)n7(x8C|D2m{YVIq??;&5qNDP_0);t&U>XKiZn^|zK|ps$KA0xkMiw4EK`0Xy zz-+ovQw*lzfPV)!Sva#S}=_c4l{lL)8yMIDJcfF z(LcTnEC93d{;S7e8Xat0*afC3w~?0*k_fe=Ou#hT^;HXCT2%m&ayIioNQWp2BtZ9AvP)TN`vWFjNicY{p+W|H2F3{X$F|hguwIXuP78q From 9664f2f96ff71fd0083a005c72a7e2fecbdb086e Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 4 Nov 2023 15:51:52 -0400 Subject: [PATCH 62/95] Haunted Scroll, Unholy Core resprites --- Items/Materials/UnholyCore.cs | 4 ++-- Items/Materials/UnholyCore.png | Bin 631 -> 608 bytes Items/Weapons/Summon/HauntedScroll.cs | 10 ++++++++-- Items/Weapons/Summon/HauntedScroll.png | Bin 522 -> 1210 bytes 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Items/Materials/UnholyCore.cs b/Items/Materials/UnholyCore.cs index 34b8c96da5..4962d54429 100644 --- a/Items/Materials/UnholyCore.cs +++ b/Items/Materials/UnholyCore.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Items.Materials public override void SetDefaults() { - Item.width = 15; - Item.height = 12; + Item.width = 26; + Item.height = 46; Item.maxStack = 9999; Item.value = Item.sellPrice(silver: 80); Item.rare = ItemRarityID.Pink; diff --git a/Items/Materials/UnholyCore.png b/Items/Materials/UnholyCore.png index d13404b0e272043fc96753be4119ded0959e2589..a69a956e27f303a267d8a2698d485a520607402f 100644 GIT binary patch delta 596 zcmV-a0;~P^1mFaa7k@4Y1^@s6HlYc100001b5ch_0Itp)=>Px#1ZP1_K>z@;j|==^ z1poj6@JU2LR9HvlmOV?uP!xt!rHf1BXRQ=#Ne2b7f+z@f&_B=)Iyj4y;NmDa=<4d^ zu8Y4wLqa9DRDRLNXgV?Au*xKx3|1e*F{)b8 z$7rEHP8AWpw-S2`^^#?)1|i2}%)|oPV}NC|gZ#cvRx%!B3so6LDH# zCcg1t%Is8<5(d#`Zgf~Wp~RjSoDrV)xDwoBvsk8-0TWEs%{@=`MsCvE3`@-aR(_un z>j?Pm4NzwUL^H7mI1dwm^#YVVVWmBS38oO>JbGcp;*>9M@07=9gTF0000Px%F-b&0R7i=%mcMQj zK@i4&YcBp5hd2R3LM%m*L82lwA)-M1Yj_V{0MSt)(a=)!0yOXlAVpNzO+p(Y1hSoA zDG>1CobB@+#oox?<&HGy?yL4@cW3t7nfY!Nr{Ko&bs2^UOMetV<8bGnesZS;`d?5B z)l0DxSBgsj)Mm~A&>D?HfDcdZ1F-e{EdU#5OA6pi&j+A+(vJ0)8Y2hm?&orO1#sm5 zjx4hwz@w!(W8<5xH2@wqIw3%N^h*Kcof!az{>bo~DkA_kORE4hPult;gXOBu@!@e7NVDqJ&({I)9TfsRD9i)!`sV=vA8&60@NB0Az{|&X zVjV3$eFeZq{VD+a?XLiggFr!=IdY?1_}*AsB1Y0jNoc+M1We`1g6s8lfSm5b^ceZU z*f89kF9WdK?E&!q^LN8Oy1AkkMvR1+;6ioL_!j@EYJZ(k|I$xu`2c|3fj*I~47b+x z$**lUfl0M}JJL5G{Ub=9QKeWmCZwMP!puf_)y#=75~QyTc8)}&T+cNY3PY(r!HcLm z_dGKvHq!sYmYo6seSZ+bgqe*brUKE(=@^jFn<0dW#@Tl+Re5p2tg`)smN9RuKbbQU z*y^3cuw+uK0DmjNbPUMi%^;CWIsJ;+^STDZf^wAJq0i=e{YX(NwoeroD7_rnhNPG4 z6heUdN)4D)o$d3-amO%b$0!L&)mh9J6o5Az80#}*^aq2R002ovPDHLk FV1n61CvE@$ diff --git a/Items/Weapons/Summon/HauntedScroll.cs b/Items/Weapons/Summon/HauntedScroll.cs index 5a5c76d627..65d293808f 100644 --- a/Items/Weapons/Summon/HauntedScroll.cs +++ b/Items/Weapons/Summon/HauntedScroll.cs @@ -10,12 +10,18 @@ namespace CalamityMod.Items.Weapons.Summon public class HauntedScroll : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Summon"; + public override void SetStaticDefaults() + { + ItemID.Sets.AnimatesAsSoul[Type] = true; + Main.RegisterItemAnimation(Type, new DrawAnimationVertical(6, 6)); + } + public override void SetDefaults() { Item.damage = 25; Item.mana = 10; - Item.width = 52; - Item.height = 52; + Item.width = 36; + Item.height = 48; Item.useTime = Item.useAnimation = 24; Item.useStyle = ItemUseStyleID.HoldUp; Item.noMelee = true; diff --git a/Items/Weapons/Summon/HauntedScroll.png b/Items/Weapons/Summon/HauntedScroll.png index f6199e1553854af4ce6ba5b7980c5701dbb47729..8ddebbd5cc2e42ad835fde5b932f4850c463a907 100644 GIT binary patch delta 1189 zcmV;W1X}xw1iA^378n5_2nGNE0Nm!$IsgCw0drDELIAGL9O;oE6MqSCNLh0L01m?d z01m?e$8V@)000C}NkldRzU@Ei0#|Bw+@? z*yjC5BrPyBacxqv{S8?&{X@IbsLg$umvn*I`2G5c=l@(hhA=zlZ(WxJljBzoY@j2`M8hFauyH!TEpui+BtHm~sJw zFofOy!t9)6Ld6X=fUIMSh}#e$q~)Y5v2QhAPO7_7Tgzq7KbFoh1VT-5FC(Pm2wsOu zyoEHhLW6i$>d+HG=j~;!Ix|_5@fj*>#?>euyF4IYXJ5v?46rY=X4sc$X21~pGNoXM zeVM^&h<|;V;+-M(WttgShmt#xb%=eLW&vvourIUN-QNO(?8^dRUq)I&`n39<*c8qX zA%qapWSVwjbnWD2-^W1p&eV(E-*P4zHCBB?Wln`DE>rOuDtqUlSX1#CDr?5JL!i2! zF9R+^?8|(!ll;tchWPn1z`o3yVPB@1!M@DkG=IdtO!3YT`!dZ8tV7tV*q3P*u%-a} zG7C((fI;?U0kAJ4gb+eVOf>yGRN{oWf$A zvwwg!1=yEaV9EsyvM&pOeHkHykmaNmdsz;9TJW75xtEd3(X^+m#M!%I?`36inXyI| zz30WX4ztzKjq;2qA=Y62WI`*IP*0H&Y++ zzIFKC&&uL6NkbNEth$ESmjRav_GJKu`1vvzVqd12Va>2F)68IBW^fu}U#56xh<%x6 z2G*hE4rCo-U#3~WngZ<0EHLE)2HBSdP^G@CR{IMI20z%~J~^@g0000z@;j|==^1poj50drDELIAGL z9O(c603c&XQcVB=dL{q>fP?@5`Tzg`fam}Kbua(`>RI+y?e7jT@qQ9J+u00v@9 zM??Vs0RI60puMM)00044NkllDnHttz5Rm zK{=3uuK-R!^UrFQ|3QH6*;c zPrkT#b`xsS-;4+cg)0E2h7;O4<{J{^)XB4@P8OC6uXkp6rk=0X%j_NlaQR#@{7pU9 z754y~g=8c%)%<|gOb~nbTV{XlEp=nQZ@DS|JL=?NG2c)SK?WN&Bm93u!e5y(&d?{1 zC2*hJ{7z{A000tnMObu2SV=}YPjYExZggREX>V=-F@#v`?*IS*07*qoM6N<$f+fw} A0{{R3 From 179d86e218754513859a66fd5a55e6d7bf1b58f2 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 4 Nov 2023 15:57:14 -0400 Subject: [PATCH 63/95] Corrupt and Crimson Flask resprites --- Items/Accessories/CorruptFlask.png | Bin 771 -> 850 bytes Items/Accessories/CrimsonFlask.png | Bin 801 -> 892 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/Items/Accessories/CorruptFlask.png b/Items/Accessories/CorruptFlask.png index 373c8d6896a199b05276de870c195a19cd9bc8be..55856d02fbf168967d6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Iq z3=N9+{eKysu;_?B)OXW(ctm_J@OOf0|GWa$0C2}$RdrMXF9#0LRBWY|Eb0Ih2zR`r z`>#`9$-dbY%%K44K==MK-G8}vgzVhUE$QeN)B$S%bdGsU@%0M@pcMaZfD-*pqI;fB z|B#f(E8toHJV(GB_n`nzgQ{=9bJ2+}#VJsB0DtX=1j3`IMfRh|<3Kob)iK6>^p;u$ ztN{R0o{XFsVy$D0c__)VAM@HeU=095Vak-R<2l4*uT{Vr03cI+nxQvTDZ_h1tW))f z%Ff6&092ij>i+;3^G>N`1*`$k<$~$y`0xJ*Odacz5A(kPnrC_^Z>_!O00000NkvXX Jt^`70f&jH4a3lZ# From f2d54968fb137ada1f66e466303e821156d7bf18 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sat, 4 Nov 2023 18:57:23 -0400 Subject: [PATCH 64/95] Ported Blood Boiler and Dragon's Breath to Dom's Metaballs V2. Hopefully. --- Graphics/Metaballs/BloodBoilerMetaball.cs | 100 ++++++++++++++++ Graphics/Metaballs/DragonsBreathMetaball.cs | 110 ++++++++++++++++++ Graphics/Metaballs/GruesomeMetaball.cs | 7 +- .../Metaballs/MetaballBase.png | Bin .../Metaballs/MetaballMessy.png | Bin ...PaintParticleSets.cs => PaintMetaballs.cs} | 0 .../Metaballs/BloodBoilerParticleSets.cs | 58 --------- .../Metaballs/DragonsBreathParticleSets.cs | 62 ---------- Projectiles/Ranged/BloodBoilerFire.cs | 13 +-- Projectiles/Ranged/DragonsBreathFlames.cs | 24 ++-- 10 files changed, 230 insertions(+), 144 deletions(-) create mode 100644 Graphics/Metaballs/BloodBoilerMetaball.cs create mode 100644 Graphics/Metaballs/DragonsBreathMetaball.cs rename Particles/Metaballs/FusableParticleBase.png => Graphics/Metaballs/MetaballBase.png (100%) rename Particles/Metaballs/FusableParticleMessy.png => Graphics/Metaballs/MetaballMessy.png (100%) rename Graphics/Metaballs/{PaintParticleSets.cs => PaintMetaballs.cs} (100%) delete mode 100644 Particles/Metaballs/BloodBoilerParticleSets.cs delete mode 100644 Particles/Metaballs/DragonsBreathParticleSets.cs diff --git a/Graphics/Metaballs/BloodBoilerMetaball.cs b/Graphics/Metaballs/BloodBoilerMetaball.cs new file mode 100644 index 0000000000..a8bf95bb78 --- /dev/null +++ b/Graphics/Metaballs/BloodBoilerMetaball.cs @@ -0,0 +1,100 @@ +using System.Collections.Generic; +using System.Linq; +using CalamityMod.Effects; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Graphics.Metaballs +{ + public abstract class BloodBoilerMetaball : Metaball + { + public class BloodBoilerParticle + { + public Vector2 Center; + public float Size; + + public BloodBoilerParticle(Vector2 center, float size) + { + Center = center; + Size = size; + } + + public void Update() + { + // Always slowly shrink the particles. + Size = MathHelper.Clamp(Size - 0.1f, 0f, 200f) * 0.91f; + + // Once sufficiently small, the particles very rapidly shrink. + if (Size < 20f) + Size = Size * 0.8f - 1f; + } + } + + public static List Particles + { + get; + private set; + } = new(); + + public override bool AnythingToDraw => Particles.Any(); + + public override IEnumerable Layers + { + get + { + yield return ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value; + } + } + + public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles; + + public override Color EdgeColor => Color.DarkRed * 0.8f; + + public override void Update() + { + // Update all particle instances. + // Once sufficiently small, they vanish. + for (int i = 0; i < Particles.Count; i++) + Particles[i].Update(); + Particles.RemoveAll(p => p.Size <= 2f); + } + + // Copied from Rancor Lava metaballs, since these need to be additive metaballs. + public override void PrepareShaderForTarget(int layerIndex) + { + // Store the shader in an easy to use local variable. + var metaballShader = CalamityShaders.AdditiveMetaballEdgeShader; + + // Calculate the layer scroll offset. This is used to ensure that the texture contents of the given metaball have parallax, rather than being static over the screen + // regardless of world position. + Vector2 screenSize = new(Main.screenWidth, Main.screenHeight); + + // Supply shader parameter values. + metaballShader.Parameters["screenArea"]?.SetValue(screenSize); + metaballShader.Parameters["layerOffset"]?.SetValue(Vector2.Zero); + metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero); + + // Apply the metaball shader. + metaballShader.CurrentTechnique.Passes[0].Apply(); + } + + public static void SpawnParticle(Vector2 position, float size) => Particles.Add(new(position, size)); + + public override void DrawInstances() + { + float opacity = 0.65f; + Texture2D tex = ModContent.Request("CalamityMod/Graphics/Metaballs/MetaballBase").Value; + + foreach (BloodBoilerParticle particle in Particles) + { + Vector2 drawPosition = particle.Center - Main.screenPosition; + var origin = tex.Size() * 0.5f; + Vector2 scale = Vector2.One * particle.Size / tex.Size(); + Color drawColor = Color.Lerp(EdgeColor, new Color(0f, 0f, 1f), Utils.GetLerpValue(50f, 100f, particle.Size, true) * 0.1f) * 1.2f; + Main.spriteBatch.Draw(tex, drawPosition, null, drawColor * opacity, 0f, origin, scale, SpriteEffects.None, 0f); + } + } + } +} diff --git a/Graphics/Metaballs/DragonsBreathMetaball.cs b/Graphics/Metaballs/DragonsBreathMetaball.cs new file mode 100644 index 0000000000..5b012ca773 --- /dev/null +++ b/Graphics/Metaballs/DragonsBreathMetaball.cs @@ -0,0 +1,110 @@ +using System.Collections.Generic; +using System.Linq; +using CalamityMod.Effects; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Graphics.Metaballs +{ + public class DragonsBreathFlameMetaball : DragonsBreathMetaball + { + public override Color EdgeColor => (Main.rand.NextBool() ? Color.OrangeRed : Color.DarkOrange) * 0.8f; + } + public class DragonsBreathBeamMetaball : DragonsBreathMetaball + { + public override Color EdgeColor => (Main.rand.NextBool() ? Color.Orange : Color.OrangeRed) * 0.7f; + } + + public abstract class DragonsBreathMetaball : Metaball + { + // Identical behavior to Blood Boiler particles + public class DragonsBreathParticle + { + public Vector2 Center; + public float Size; + + public DragonsBreathParticle(Vector2 center, float size) + { + Center = center; + Size = size; + } + + public void Update() + { + // Always slowly shrink the particles. + Size = MathHelper.Clamp(Size - 0.1f, 0f, 200f) * 0.91f; + + // Once sufficiently small, the particles very rapidly shrink. + if (Size < 20f) + Size = Size * 0.8f - 1f; + } + } + + public List Particles + { + get; + private set; + } = new(); + + public override bool AnythingToDraw => Particles.Any(); + + public override IEnumerable Layers + { + get + { + yield return ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value; + } + } + + public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles; + + // Edge color is defined in subclasses + + public override void Update() + { + // Update all particle instances. + // Once sufficiently small, they vanish. + for (int i = 0; i < Particles.Count; i++) + Particles[i].Update(); + Particles.RemoveAll(p => p.Size <= 2f); + } + + // Copied from Rancor Lava metaballs, since these need to be additive metaballs. + public override void PrepareShaderForTarget(int layerIndex) + { + // Store the shader in an easy to use local variable. + var metaballShader = CalamityShaders.AdditiveMetaballEdgeShader; + + // Calculate the layer scroll offset. This is used to ensure that the texture contents of the given metaball have parallax, rather than being static over the screen + // regardless of world position. + Vector2 screenSize = new(Main.screenWidth, Main.screenHeight); + + // Supply shader parameter values. + metaballShader.Parameters["screenArea"]?.SetValue(screenSize); + metaballShader.Parameters["layerOffset"]?.SetValue(Vector2.Zero); + metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero); + + // Apply the metaball shader. + metaballShader.CurrentTechnique.Passes[0].Apply(); + } + + public void SpawnParticle(Vector2 position, float size) => Particles.Add(new(position, size)); + + public override void DrawInstances() + { + float opacity = 0.65f; + Texture2D tex = ModContent.Request("CalamityMod/Graphics/Metaballs/MetaballMessy").Value; + + foreach (DragonsBreathParticle particle in Particles) + { + Vector2 drawPosition = particle.Center - Main.screenPosition; + var origin = tex.Size() * 0.5f; + Vector2 scale = Vector2.One * particle.Size / tex.Size(); + Color drawColor = Color.Lerp(EdgeColor, new Color(0f, 0f, 1f), Utils.GetLerpValue(50f, 100f, particle.Size, true) * 0.1f) * 1.2f; + Main.spriteBatch.Draw(tex, drawPosition, null, drawColor * opacity, 0f, origin, scale, SpriteEffects.None, 0f); + } + } + } +} diff --git a/Graphics/Metaballs/GruesomeMetaball.cs b/Graphics/Metaballs/GruesomeMetaball.cs index e991b5bf5e..f1d273a344 100644 --- a/Graphics/Metaballs/GruesomeMetaball.cs +++ b/Graphics/Metaballs/GruesomeMetaball.cs @@ -1,11 +1,10 @@ -using CalamityMod.Graphics.Metaballs; +using System; +using System.Collections.Generic; +using System.Linq; using CalamityMod.Projectiles.Magic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; -using System; -using System.Collections.Generic; -using System.Linq; using Terraria; using Terraria.ID; using Terraria.ModLoader; diff --git a/Particles/Metaballs/FusableParticleBase.png b/Graphics/Metaballs/MetaballBase.png similarity index 100% rename from Particles/Metaballs/FusableParticleBase.png rename to Graphics/Metaballs/MetaballBase.png diff --git a/Particles/Metaballs/FusableParticleMessy.png b/Graphics/Metaballs/MetaballMessy.png similarity index 100% rename from Particles/Metaballs/FusableParticleMessy.png rename to Graphics/Metaballs/MetaballMessy.png diff --git a/Graphics/Metaballs/PaintParticleSets.cs b/Graphics/Metaballs/PaintMetaballs.cs similarity index 100% rename from Graphics/Metaballs/PaintParticleSets.cs rename to Graphics/Metaballs/PaintMetaballs.cs diff --git a/Particles/Metaballs/BloodBoilerParticleSets.cs b/Particles/Metaballs/BloodBoilerParticleSets.cs deleted file mode 100644 index 6bc8bef4d5..0000000000 --- a/Particles/Metaballs/BloodBoilerParticleSets.cs +++ /dev/null @@ -1,58 +0,0 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; -using System.Collections.Generic; -using System.Linq; -using Terraria; -using Terraria.Graphics.Shaders; -using Terraria.ModLoader; - -namespace CalamityMod.Particles.Metaballs -{ - public class Blood : BloodBoilerParticleSets - { - public override Color BorderColor => Color.DarkRed * 0.8f; - } - - public abstract class BloodBoilerParticleSets : BaseFusableParticleSet - { - public override float BorderSize => 12f; - public override bool BorderShouldBeSolid => false; - - private float opacity; - public override List BackgroundShaders => new() - { - GameShaders.Misc["CalamityMod:AdditiveFusableParticleEdge"].Shader, - }; - public override List BackgroundTextures => new() - { - ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value, - }; - public override FusableParticle SpawnParticle(Vector2 center, float sizeStrength) - { - Particles.Add(new FusableParticle(center, sizeStrength)); - return Particles.Last(); - } - - public override void UpdateBehavior(FusableParticle particle) - { - opacity = 0.65f; - particle.Size = MathHelper.Clamp(particle.Size - 0.1f, 0f, 200f) * 0.91f; - if (particle.Size < 20f) - particle.Size = particle.Size * 0.8f - 1f; - } - - public override void DrawParticles() - { - Texture2D fusableParticleBase = ModContent.Request("CalamityMod/Particles/Metaballs/FusableParticleBase").Value; - foreach (FusableParticle particle in Particles) - { - Vector2 drawPosition = particle.Center - Main.screenPosition; - Vector2 origin = fusableParticleBase.Size() * 0.5f; - Vector2 scale = Vector2.One * particle.Size / fusableParticleBase.Size(); - Color drawColor = Color.Lerp(BorderColor, new Color(0f, 0f, 1f), Utils.GetLerpValue(50f, 100f, particle.Size, true) * 0.1f) * 1.2f; - Main.spriteBatch.Draw(fusableParticleBase, drawPosition, null, drawColor * opacity, 0f, origin, scale, SpriteEffects.None, 0f); - } - } - } -} diff --git a/Particles/Metaballs/DragonsBreathParticleSets.cs b/Particles/Metaballs/DragonsBreathParticleSets.cs deleted file mode 100644 index b453eca15d..0000000000 --- a/Particles/Metaballs/DragonsBreathParticleSets.cs +++ /dev/null @@ -1,62 +0,0 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; -using System.Collections.Generic; -using System.Linq; -using Terraria; -using Terraria.Graphics.Shaders; -using Terraria.ModLoader; - -namespace CalamityMod.Particles.Metaballs -{ - public class DragonFlames : DragonsBreathParticleSets - { - public override Color BorderColor => (Main.rand.NextBool() ? Color.OrangeRed : Color.DarkOrange) * 0.8f; - } - public class DragonBeam : DragonsBreathParticleSets - { - public override Color BorderColor => (Main.rand.NextBool() ? Color.Orange : Color.OrangeRed) * 0.7f; - } - - public abstract class DragonsBreathParticleSets : BaseFusableParticleSet - { - public override float BorderSize => 12f; - public override bool BorderShouldBeSolid => false; - - private float opacity; - public override List BackgroundShaders => new() - { - GameShaders.Misc["CalamityMod:AdditiveFusableParticleEdge"].Shader, - }; - public override List BackgroundTextures => new() - { - ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value, - }; - public override FusableParticle SpawnParticle(Vector2 center, float sizeStrength) - { - Particles.Add(new FusableParticle(center, sizeStrength)); - return Particles.Last(); - } - - public override void UpdateBehavior(FusableParticle particle) - { - opacity = 0.65f; - particle.Size = MathHelper.Clamp(particle.Size - 0.1f, 0f, 200f) * 0.91f; - if (particle.Size < 20f) - particle.Size = particle.Size * 0.8f - 1f; - } - - public override void DrawParticles() - { - Texture2D fusableParticleBase = ModContent.Request("CalamityMod/Particles/Metaballs/FusableParticleMessy").Value; - foreach (FusableParticle particle in Particles) - { - Vector2 drawPosition = particle.Center - Main.screenPosition; - Vector2 origin = fusableParticleBase.Size() * 0.5f; - Vector2 scale = Vector2.One * particle.Size / fusableParticleBase.Size(); - Color drawColor = Color.Lerp(BorderColor, new Color(0f, 0f, 1f), Utils.GetLerpValue(50f, 100f, particle.Size, true) * 0.1f) * 1.2f; - Main.spriteBatch.Draw(fusableParticleBase, drawPosition, null, drawColor * opacity, 0f, origin, scale, SpriteEffects.None, 0f); - } - } - } -} diff --git a/Projectiles/Ranged/BloodBoilerFire.cs b/Projectiles/Ranged/BloodBoilerFire.cs index d34aba2910..e2c04c97aa 100644 --- a/Projectiles/Ranged/BloodBoilerFire.cs +++ b/Projectiles/Ranged/BloodBoilerFire.cs @@ -1,13 +1,12 @@ -using CalamityMod.Buffs.DamageOverTime; +using System; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Graphics.Metaballs; +using CalamityMod.Particles; using Microsoft.Xna.Framework; -using System; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; -using Terraria.Audio; -using Microsoft.Xna.Framework.Graphics; -using CalamityMod.Particles; -using CalamityMod.Particles.Metaballs; namespace CalamityMod.Projectiles.Ranged { @@ -59,7 +58,7 @@ namespace CalamityMod.Projectiles.Ranged } if (Projectile.timeLeft < 296) // The main visual of the projectile and the blood mist it produces before turning around { - FusableParticleManager.GetParticleSetByType()?.SpawnParticle(Projectile.Center, particleSize * 2); + BloodBoilerMetaball.SpawnParticle(Projectile.Center, particleSize * 2); if (Main.rand.NextBool(6) && Projectile.ai[1] == 0f) { diff --git a/Projectiles/Ranged/DragonsBreathFlames.cs b/Projectiles/Ranged/DragonsBreathFlames.cs index bfdd85ba14..b824555d8d 100644 --- a/Projectiles/Ranged/DragonsBreathFlames.cs +++ b/Projectiles/Ranged/DragonsBreathFlames.cs @@ -1,17 +1,11 @@ -using CalamityMod.Projectiles.Typeless; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Graphics.Metaballs; +using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using CalamityMod.Buffs.DamageOverTime; -using Microsoft.Xna.Framework.Graphics; -using System; -using Terraria.Graphics.Effects; -using Terraria.DataStructures; -using CalamityMod.Particles; using Terraria.Audio; -using CalamityMod.Particles.Metaballs; -using CalamityMod.Items.Weapons.Ranged; +using Terraria.ModLoader; namespace CalamityMod.Projectiles.Ranged { @@ -93,7 +87,9 @@ namespace CalamityMod.Projectiles.Ranged GeneralParticleHandler.SpawnParticle(spark); } if (targetDist < 1400f) - FusableParticleManager.GetParticleSetByType()?.SpawnParticle(Projectile.Center, Time * Main.rand.NextFloat(0.85f, 0.95f)); + { + ModContent.GetInstance().SpawnParticle(Projectile.Center, Time * Main.rand.NextFloat(0.85f, 0.95f)); + } Projectile.velocity *= 1.01f; } if (Projectile.ai[0] == 1) //Welding Mode @@ -112,7 +108,9 @@ namespace CalamityMod.Projectiles.Ranged dust2.velocity = new Vector2(0, Main.rand.NextFloat(-1, -13)); } if (targetDist < 1400f) - FusableParticleManager.GetParticleSetByType()?.SpawnParticle(Projectile.Center, beamWidth * 45 + bbbBONUSbeamSizeWOAHH); + { + ModContent.GetInstance().SpawnParticle(Projectile.Center, beamWidth * 45 + bbbBONUSbeamSizeWOAHH); + } } if (Time == 11) { From 86225c122b606cb4e185006f413b1e854419cd6f Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sat, 4 Nov 2023 22:54:52 -0400 Subject: [PATCH 65/95] Add donor to list (they specifically requested a name change) --- CalamityLists.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CalamityLists.cs b/CalamityLists.cs index dbbe15a55a..88fd707329 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -713,7 +713,8 @@ namespace CalamityMod "Spirit Shield", "Briny_Coffee", "_Skeggy_", - "just akkolite" + "just akkolite", + "J.U.N.E.S", }; projectileDestroyExceptionList = new List() From 96c7ce7c9373c694ada8b889545397e05c268b3d Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sun, 5 Nov 2023 00:33:47 -0400 Subject: [PATCH 66/95] Fixed Blood Boiler and Dragon's Breath visuals with new metaballs --- Graphics/Metaballs/BloodBoilerMetaball.cs | 14 +++++---- Graphics/Metaballs/DragonsBreathMetaball.cs | 33 ++++++++++++++++----- 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/Graphics/Metaballs/BloodBoilerMetaball.cs b/Graphics/Metaballs/BloodBoilerMetaball.cs index a8bf95bb78..1a4d4a7942 100644 --- a/Graphics/Metaballs/BloodBoilerMetaball.cs +++ b/Graphics/Metaballs/BloodBoilerMetaball.cs @@ -8,7 +8,7 @@ using Terraria.ModLoader; namespace CalamityMod.Graphics.Metaballs { - public abstract class BloodBoilerMetaball : Metaball + public class BloodBoilerMetaball : Metaball { public class BloodBoilerParticle { @@ -84,16 +84,20 @@ namespace CalamityMod.Graphics.Metaballs public override void DrawInstances() { - float opacity = 0.65f; - Texture2D tex = ModContent.Request("CalamityMod/Graphics/Metaballs/MetaballBase").Value; + float pureRedIntensity = 0.15f; + float opacity = 0.25f; + Texture2D tex = ModContent.Request("CalamityMod/ExtraTextures/SmallGreyscaleCircle").Value; foreach (BloodBoilerParticle particle in Particles) { Vector2 drawPosition = particle.Center - Main.screenPosition; var origin = tex.Size() * 0.5f; Vector2 scale = Vector2.One * particle.Size / tex.Size(); - Color drawColor = Color.Lerp(EdgeColor, new Color(0f, 0f, 1f), Utils.GetLerpValue(50f, 100f, particle.Size, true) * 0.1f) * 1.2f; - Main.spriteBatch.Draw(tex, drawPosition, null, drawColor * opacity, 0f, origin, scale, SpriteEffects.None, 0f); + + float pureRedInterpolant = Utils.GetLerpValue(25f, 60f, particle.Size, true) * pureRedIntensity; + Color drawColor = Color.Lerp(EdgeColor, Color.Red, pureRedInterpolant).MultiplyRGBA(new Color(1f, 1f, 1f, opacity)); + + Main.spriteBatch.Draw(tex, drawPosition, null, drawColor, 0f, origin, scale, SpriteEffects.None, 0f); } } } diff --git a/Graphics/Metaballs/DragonsBreathMetaball.cs b/Graphics/Metaballs/DragonsBreathMetaball.cs index 5b012ca773..6cdfe916a3 100644 --- a/Graphics/Metaballs/DragonsBreathMetaball.cs +++ b/Graphics/Metaballs/DragonsBreathMetaball.cs @@ -10,11 +10,21 @@ namespace CalamityMod.Graphics.Metaballs { public class DragonsBreathFlameMetaball : DragonsBreathMetaball { - public override Color EdgeColor => (Main.rand.NextBool() ? Color.OrangeRed : Color.DarkOrange) * 0.8f; + // OrangeRed is FF4500 + // new Color(0xFF, 0x3A, 0x0A); + public override Color EdgeColor => Main.rand.NextBool() ? Color.OrangeRed : Color.DarkOrange * 0.65f; + + // Flame metaballs never turn white + public override void DrawInstances() => DrawInstancesInternal(0.03f, -1f); } public class DragonsBreathBeamMetaball : DragonsBreathMetaball { - public override Color EdgeColor => (Main.rand.NextBool() ? Color.Orange : Color.OrangeRed) * 0.7f; + private static float whiteSizeThreshold = 72f; + + public override Color EdgeColor => Main.rand.NextBool() ? Color.Orange : Color.OrangeRed; + + // Laser metaballs very suddenly turn white at a specific size + public override void DrawInstances() => DrawInstancesInternal(0.4f, whiteSizeThreshold); } public abstract class DragonsBreathMetaball : Metaball @@ -60,8 +70,6 @@ namespace CalamityMod.Graphics.Metaballs public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles; - // Edge color is defined in subclasses - public override void Update() { // Update all particle instances. @@ -92,9 +100,9 @@ namespace CalamityMod.Graphics.Metaballs public void SpawnParticle(Vector2 position, float size) => Particles.Add(new(position, size)); - public override void DrawInstances() + internal void DrawInstancesInternal(float opacity, float whiteSizeThreshold) { - float opacity = 0.65f; + float pureWhiteIntensity = 0.16f; Texture2D tex = ModContent.Request("CalamityMod/Graphics/Metaballs/MetaballMessy").Value; foreach (DragonsBreathParticle particle in Particles) @@ -102,8 +110,17 @@ namespace CalamityMod.Graphics.Metaballs Vector2 drawPosition = particle.Center - Main.screenPosition; var origin = tex.Size() * 0.5f; Vector2 scale = Vector2.One * particle.Size / tex.Size(); - Color drawColor = Color.Lerp(EdgeColor, new Color(0f, 0f, 1f), Utils.GetLerpValue(50f, 100f, particle.Size, true) * 0.1f) * 1.2f; - Main.spriteBatch.Draw(tex, drawPosition, null, drawColor * opacity, 0f, origin, scale, SpriteEffects.None, 0f); + + Color drawColor; + if (whiteSizeThreshold >= 0f) + { + float pureWhiteInterpolant = Utils.GetLerpValue(0.8f * whiteSizeThreshold, whiteSizeThreshold, particle.Size, true) * pureWhiteIntensity; + drawColor = Color.Lerp(EdgeColor, Color.White, pureWhiteInterpolant) * opacity; + } + else + drawColor = Color.Lerp(EdgeColor, new Color(0xE0, 0x70, 0x10), Utils.GetLerpValue(60f, 100f, particle.Size, true) * 0.2f); + + Main.spriteBatch.Draw(tex, drawPosition, null, drawColor, 0f, origin, scale, SpriteEffects.None, 0f); } } } From 35e7b6416c3b40974c67453ca699818b957e932a Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sun, 5 Nov 2023 00:40:23 -0400 Subject: [PATCH 67/95] Add Skeleton Merchant name Mr. Bones for donor --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 9c7039f3fc..d59b915056 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -181,6 +181,7 @@ namespace CalamityMod.NPCs { "Sans Undertale", // <@!145379091648872450> (shayy) "Papyrus Undertale", // <@!262663471189983242> (nycro) + "Mr. Bones", // <@!359215912856977408> (jaybones.) }; private static readonly string[] SteampunkerNames = { From 2bedc44646c0c083394a63db5f4477aa500bbcd0 Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 4 Nov 2023 22:53:40 -0700 Subject: [PATCH 68/95] Levi Amber and Slag Pauldron buffs Levi amber dash velocity increased to 20% and reduced dash delay by 33% but no longer gives dr while dashing. Slag Pauldron gives 10% dr while dashing instead of 5% and inflicts armor crunch instead of brimstone flames when you directly hit with the dash effect. --- CalPlayer/CalamityPlayerMiscEffects.cs | 12 +++++++----- .../en-US/Mods.CalamityMod.Items.Accessories.hjson | 7 ++++--- Projectiles/Typeless/LeviAmberDash.cs | 4 ++-- Projectiles/Typeless/PauldronDash.cs | 2 +- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index ae559e4657..51eb6e0cfa 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -229,12 +229,14 @@ namespace CalamityMod.CalPlayer if (lAmbergris) { + if (Player.miscCounter % 3 == 2 && Player.dashDelay > 0) // Reduced dash cooldown by 33% + Player.dashDelay--; + if (Player.dashDelay == -1)// TODO: prevent working with special dashes, this was inconsitent with my old solution so I didn't keep it. not huge deal) { - Player.endurance += 0.05f; if (!HasIncreasedDashFirstFrame) { - Player.velocity.X *= 1.15f; + Player.velocity.X *= 1.2f; Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType(), 75, 20f, Player.whoAmI); HasIncreasedDashFirstFrame = true; } @@ -255,10 +257,10 @@ namespace CalamityMod.CalPlayer { float sparkscale = (Player.velocity.X * Player.direction * 0.07f); Vector2 SparkVelocity1 = Player.velocity.RotatedBy(Player.direction * 2, default) * 0.1f - Player.velocity / 2f; - SparkParticle spark = new SparkParticle(Player.Center + Player.velocity.RotatedBy(2f * Player.direction) * 1.5f, SparkVelocity1, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkTurquoise : Color.DodgerBlue); + LineParticle spark = new LineParticle(Player.Center + Player.velocity.RotatedBy(2f * Player.direction) * 1.5f, SparkVelocity1, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkTurquoise : Color.DodgerBlue); GeneralParticleHandler.SpawnParticle(spark); Vector2 SparkVelocity2 = Player.velocity.RotatedBy(Player.direction * -2, default) * 0.1f - Player.velocity / 2f; - SparkParticle spark2 = new SparkParticle(Player.Center + Player.velocity.RotatedBy(-2f * Player.direction) * 1.5f, SparkVelocity2, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkTurquoise : Color.DodgerBlue); + LineParticle spark2 = new LineParticle(Player.Center + Player.velocity.RotatedBy(-2f * Player.direction) * 1.5f, SparkVelocity2, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkTurquoise : Color.DodgerBlue); GeneralParticleHandler.SpawnParticle(spark2); } if (Player.miscCounter % 4 == 0 && Player.velocity != Vector2.Zero) //every other frame spawn the hitbox @@ -272,7 +274,7 @@ namespace CalamityMod.CalPlayer { if (Player.dashDelay == -1)// TODO: prevent working with special dashes, this was inconsitent with my old solution so I didn't keep it. not huge deal) { - Player.endurance += 0.05f; + Player.endurance += 0.1f; if (!HasReducedDashFirstFrame) // Dash isn't reduced, this is used to determine the first frame of dashing { SoundEngine.PlaySound(SoundID.DD2_BetsyFireballImpact with { Volume = 0.4f , PitchVariance = 0.4f }, Player.Center); diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index ad85e536f2..a03ae15555 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1001,8 +1001,8 @@ LeviathanAmbergris: { DisplayName: Leviathan Ambergris Tooltip: ''' - 15% increased dash velocity - You gain 5% damage reduction while dashing + 20% increased dash velocity + Delay after dashing is reduced by 33% Your dashes are empowered by water, knocking back and damaging nearby enemies with viscous currents ''' } @@ -1543,7 +1543,8 @@ SlagsplitterPauldron: { DisplayName: Slagsplitter Pauldron Tooltip: ''' - You gain 5% damage reduction while dashing + You gain 10% damage reduction while dashing + Enemies you dash through are afflicted with Armor Crunch Your dashes are empowered by fire, shredding enemies near you with violent explosions ''' } diff --git a/Projectiles/Typeless/LeviAmberDash.cs b/Projectiles/Typeless/LeviAmberDash.cs index 5ea69efa18..af40656994 100644 --- a/Projectiles/Typeless/LeviAmberDash.cs +++ b/Projectiles/Typeless/LeviAmberDash.cs @@ -40,8 +40,8 @@ namespace CalamityMod.Projectiles.Typeless target.velocity.X += 4.2f * Owner.direction; } target.AddBuff(BuffID.Wet, 300); - target.AddBuff(ModContent.BuffType(), 60); - SoundEngine.PlaySound(SoundID.Item85 with { Volume = 0.6f, PitchVariance = 0.4f }, Projectile.Center); + target.AddBuff(ModContent.BuffType(), 180); + SoundEngine.PlaySound(SoundID.Item85 with { Volume = 0.4f, PitchVariance = 0.4f }, Projectile.Center); for (int i = 0; i < 3; ++i) { int bloodLifetime = Main.rand.Next(20, 26); diff --git a/Projectiles/Typeless/PauldronDash.cs b/Projectiles/Typeless/PauldronDash.cs index 6ea9a1883e..6a17b3d5f8 100644 --- a/Projectiles/Typeless/PauldronDash.cs +++ b/Projectiles/Typeless/PauldronDash.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Typeless public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { target.AddBuff(BuffID.OnFire3, 240); - target.AddBuff(ModContent.BuffType(), 240); + target.AddBuff(ModContent.BuffType(), 300); SoundEngine.PlaySound(SoundID.DD2_ExplosiveTrapExplode with { Volume = 0.6f, PitchVariance = 0.4f }, Projectile.Center); for (int i = 0; i <= 8; i++) From 6ce8066b8627704d8e42f0a814d66967d0c2d362 Mon Sep 17 00:00:00 2001 From: Xyk Date: Sun, 5 Nov 2023 12:40:18 -0800 Subject: [PATCH 69/95] Dead Sun's Wind goop changed the visual for dead suns wind --- Particles/AltLineParticle.cs | 51 ++++++++++++++++++++++++++++++++ Particles/GenericBloom.cs | 6 ++-- Projectiles/Ranged/CosmicFire.cs | 27 +++++++++++++++-- 3 files changed, 79 insertions(+), 5 deletions(-) create mode 100644 Particles/AltLineParticle.cs diff --git a/Particles/AltLineParticle.cs b/Particles/AltLineParticle.cs new file mode 100644 index 0000000000..5dfd32e142 --- /dev/null +++ b/Particles/AltLineParticle.cs @@ -0,0 +1,51 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Particles +{ + public class AltLineParticle : Particle + { + public Color InitialColor; + public bool AffectedByGravity; + public override bool SetLifetime => true; + public override bool UseCustomDraw => true; + public override bool UseAdditiveBlend => false; + + public override string Texture => "CalamityMod/Particles/DrainLine"; + + public AltLineParticle(Vector2 relativePosition, Vector2 velocity, bool affectedByGravity, int lifetime, float scale, Color color) + { + Position = relativePosition; + Velocity = velocity; + AffectedByGravity = affectedByGravity; + Scale = scale; + Lifetime = lifetime; + Color = InitialColor = color; + } + + public override void Update() + { + Scale *= 0.95f; + Color = Color.Lerp(InitialColor, Color.Transparent, (float)Math.Pow(LifetimeCompletion, 3D)); + Velocity *= 0.95f; + if (Velocity.Length() < 12f && AffectedByGravity) + { + Velocity.X *= 0.94f; + Velocity.Y += 0.25f; + } + Rotation = Velocity.ToRotation() + MathHelper.PiOver2; + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + Vector2 scale = new Vector2(0.5f, 1.6f) * Scale; + Texture2D texture = ModContent.Request(Texture).Value; + + spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color, Rotation, texture.Size() * 0.5f, scale, 0, 0f); + spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color, Rotation, texture.Size() * 0.5f, scale * new Vector2(0.45f, 1f), 0, 0f); + } + } +} diff --git a/Particles/GenericBloom.cs b/Particles/GenericBloom.cs index 9cd4d2b52b..52ca597791 100644 --- a/Particles/GenericBloom.cs +++ b/Particles/GenericBloom.cs @@ -9,14 +9,15 @@ namespace CalamityMod.Particles public class GenericBloom : Particle { public override string Texture => "CalamityMod/Particles/Light"; - public override bool UseAdditiveBlend => true; + public bool UseAltVisual = true; + public override bool UseAdditiveBlend => UseAltVisual; public override bool SetLifetime => true; private float opacity; private Color BaseColor; private bool ProduceLight; - public GenericBloom(Vector2 position, Vector2 velocity, Color color, float scale, int lifeTime, bool produceLight = true) + public GenericBloom(Vector2 position, Vector2 velocity, Color color, float scale, int lifeTime, bool produceLight = true, bool AddativeBlend = true) { Position = position; Velocity = velocity; @@ -25,6 +26,7 @@ namespace CalamityMod.Particles Lifetime = lifeTime; Rotation = Main.rand.NextFloat(MathHelper.TwoPi); ProduceLight = produceLight; + UseAltVisual = AddativeBlend; } public override void Update() diff --git a/Projectiles/Ranged/CosmicFire.cs b/Projectiles/Ranged/CosmicFire.cs index 41a452a74d..a8b5839d7e 100644 --- a/Projectiles/Ranged/CosmicFire.cs +++ b/Projectiles/Ranged/CosmicFire.cs @@ -41,11 +41,23 @@ namespace CalamityMod.Projectiles.Ranged AltSparkParticle spark = new AltSparkParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 20, 2.3f, Color.Black); GeneralParticleHandler.SpawnParticle(spark); } - if (Projectile.timeLeft % 2 == 0 && Time > 12f && targetDist < 1400f) + if (Time > 12f && targetDist < 1400f) { - SparkParticle spark2 = new SparkParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 20, 0.9f, InnerColor); + Particle orb = new GenericBloom(Projectile.Center + Main.rand.NextVector2Circular(10, 10), Projectile.velocity * Main.rand.NextFloat(0.05f, 0.5f), Color.Black, Main.rand.NextFloat(0.2f, 0.45f), Main.rand.Next(12, 16), true, false); + GeneralParticleHandler.SpawnParticle(orb); + } + + if (Projectile.timeLeft % 3 == 0 && Time > 12f && targetDist < 1400f) + { + LineParticle spark2 = new LineParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 20, 1.7f, InnerColor); GeneralParticleHandler.SpawnParticle(spark2); } + if (Time > 12f && targetDist < 1400f) + { + Particle orb2 = new GenericBloom(Projectile.Center + Main.rand.NextVector2Circular(5, 5), Projectile.velocity * Main.rand.NextFloat(0.05f, 0.5f), InnerColor, Main.rand.NextFloat(0.05f, 0.3f), Main.rand.Next(12, 16), true); + GeneralParticleHandler.SpawnParticle(orb2); + } + if (Time == 7f) { for (int i = 0; i <= 18; i++) @@ -82,6 +94,16 @@ namespace CalamityMod.Projectiles.Ranged public override bool OnTileCollide(Vector2 oldVelocity) { Projectile.timeLeft = 15 * Projectile.MaxUpdates; + float numberOflines = 5; + float rotFactorlines = 360f / numberOflines; + for (int i = 0; i < numberOflines; i++) + { + float rot = MathHelper.ToRadians(i * rotFactorlines); + Vector2 offset = new Vector2(Main.rand.NextFloat(1, 3.1f), 0).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f)); + Vector2 velOffset = new Vector2(Main.rand.NextFloat(1, 3.1f), 0).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f)); + AltSparkParticle spark = new AltSparkParticle(Projectile.Center + offset, velOffset, false, 20, Main.rand.NextFloat(1.9f, 2.3f), Color.Black); + GeneralParticleHandler.SpawnParticle(spark); + } float numberOfDusts = 25; float rotFactor = 360f / numberOfDusts; for (int i = 0; i < numberOfDusts; i++) @@ -98,7 +120,6 @@ namespace CalamityMod.Projectiles.Ranged Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, InnerColor, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0.1f, 0.9f - (BounceHits * 0.25f), 25); GeneralParticleHandler.SpawnParticle(pulse); Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.MediumSpringGreen, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0.05f, 0.75f - (BounceHits * 0.25f), 25); - GeneralParticleHandler.SpawnParticle(pulse2); if (BounceHits == 0f) SoundEngine.PlaySound(DeadSunsWind.Ricochet, Projectile.Center); From 08f37c9a29c52932e4741ca7239b7dea0e4c4bb2 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sun, 5 Nov 2023 15:08:24 -0500 Subject: [PATCH 70/95] Fix Dragoon Drizzlefish hold position --- Items/Fishing/BrimstoneCragCatches/DragoonDrizzlefish.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Items/Fishing/BrimstoneCragCatches/DragoonDrizzlefish.cs b/Items/Fishing/BrimstoneCragCatches/DragoonDrizzlefish.cs index 4f38fc9cfe..6b0a40d1e4 100644 --- a/Items/Fishing/BrimstoneCragCatches/DragoonDrizzlefish.cs +++ b/Items/Fishing/BrimstoneCragCatches/DragoonDrizzlefish.cs @@ -1,17 +1,13 @@ using System.Collections.Generic; using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Items.Weapons.Ranged; using CalamityMod.NPCs.NormalNPCs; using CalamityMod.Projectiles.Ranged; -using CalamityMod.Sounds; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using Terraria.ModLoader.IO; -using static Humanizer.In; namespace CalamityMod.Items.Fishing.BrimstoneCragCatches { @@ -66,8 +62,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches return true; } - //so it looks normal when holding - public override Vector2? HoldoutOrigin() => new Vector2(2, 2); + public override Vector2? HoldoutOrigin() => new Vector2(7, 7); public override bool AltFunctionUse(Player player) => Main.zenithWorld ? true : false; public override bool CanConsumeAmmo(Item ammo, Player player) From 46e99408a6574a874ed182b4c285a95d2033417c Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sun, 5 Nov 2023 15:10:28 -0500 Subject: [PATCH 71/95] improve Shadethrower tooltip --- Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index cbaed287b0..2b5d0a77b7 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -1045,7 +1045,7 @@ Shadethrower: { DisplayName: Shadethrower Tooltip: ''' - Spews short-ranged clouds of pure darkness + Spits clouds of shade which afflict enemies with brain rot Uses gel for ammo ''' } From 9ddc98b351584db145d01a518fd06b76c3ba5b94 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sun, 5 Nov 2023 15:15:59 -0500 Subject: [PATCH 72/95] Improved Meowthrower tooltip --- .../en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 2b5d0a77b7..3f66adb6a2 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -716,8 +716,8 @@ Meowthrower: { DisplayName: Meowthrower Tooltip: ''' - Purrifies your foes with pink and blue smokes - Occasionally unleashes homing feline creatures + Cooks your foes to purrfection with catty smoke + Occasionally launches homing feline entities Uses gel for ammo ''' } From 3b76ba59e595a1b26a5045be01ccfb911517a9b2 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sun, 5 Nov 2023 15:19:22 -0500 Subject: [PATCH 73/95] Improved Overloaded Blaster tooltip --- .../en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 3f66adb6a2..5d7ab0f69b 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -833,9 +833,9 @@ OverloadedBlaster: { DisplayName: Overloaded Blaster Tooltip: ''' - Fires a spread of shimmering slime that slows down and becomes overloaded when it stops - Overloaded slime doesn't pierce, but deals double damage - The slime bounces off of walls at high-velocity + Converts gel into a spread of energized slime pearls that overload when they come to a stop + Overloaded slime pearls deal double damage but no longer pierce + Slime pearls bounce off of walls at very high speed Uses gel for ammo 25% chance to save ammo ''' From 322f49ab8b408fbde3c82fa53740c3ea862734c6 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sun, 5 Nov 2023 15:21:15 -0500 Subject: [PATCH 74/95] Improved Aurora Blazer tooltip --- Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 5d7ab0f69b..d01584c86a 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -115,7 +115,7 @@ AuroraBlazer: { DisplayName: Aurora Blazer Tooltip: ''' - Spews stellar dusts that travel in star-shaped patterns + Spews a nebula stream which forms a star shaped pattern Uses gel for ammo ''' } From b99e049ee31ea7094ac2e661be6e9faaec87d837 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sun, 5 Nov 2023 15:36:23 -0500 Subject: [PATCH 75/95] fix vanilla flamethrowers not hitting reliably. Elf Melter nerfed to compensate --- Items/CalamityGlobalItemTweaks.cs | 2 +- Projectiles/CalamityGlobalProjectileTweaks.cs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index d2bb6cff2e..2fd416ead4 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -93,7 +93,7 @@ namespace CalamityMod.Items { ItemID.DemonScythe, Do(AutoReuse, DamageExact(33)) }, { ItemID.DyeTradersScimitar, Do(AutoReuse, UseTurn, DamageExact(24)) }, // Exotic Scimitar { ItemID.ElectrosphereLauncher, Do(DamageRatio(1.1f)) }, - { ItemID.ElfMelter, Do(DamageExact(94), ShootSpeedDelta(+3f)) }, + { ItemID.ElfMelter, Do(DamageExact(62), ShootSpeedDelta(+3f)) }, { ItemID.EmeraldStaff, Do(DamageExact(27)) }, { ItemID.EmpressBlade, Do(AutoReuse, DamageExact(60), UseExact(20)) }, // Terraprisma { ItemID.EnchantedBoomerang, Do(DamageExact(24)) }, diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index 89a94b6ce3..8c4f31c9be 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -139,7 +139,6 @@ namespace CalamityMod.Projectiles { ProjectileID.FairyQueenRangedItemShot, Do(PiercingExact(7), ExtraUpdatesExact(1)) }, // Eventide Convert { ProjectileID.FlaironBubble, Do(ExtraUpdatesExact(1), TimeLeftExact(400)) }, { ProjectileID.Flamarang, Do(ExtraUpdatesExact(2)) }, - { ProjectileID.Flames, Do(IDStaticIFrames(10)) }, // Flamethrower + Elf Melter { ProjectileID.FlamingJack, Do(ExtraUpdatesExact(1)) }, { ProjectileID.FlowerPetal, Do(MaxUpdatesExact(4), LocalIFrames(10)) }, // Orichalcum armor { ProjectileID.FlowerPow, Do(ExtraUpdatesExact(1)) }, From 768a64270fb732a048e1d69e98a5d95b349ae4ad Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sun, 5 Nov 2023 15:37:50 -0500 Subject: [PATCH 76/95] Improved Blight Spewer tooltip --- Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index d01584c86a..8b04ff600d 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -144,7 +144,8 @@ BlightSpewer: { DisplayName: Blight Spewer Tooltip: ''' - Spews toxic clouds of nanomachines that stick to tiles and lock onto enemies they hit + Fires clouds of plague nanomachines that stick to tiles + Nanomachines aggressively lock onto nearby enemies 40% chance to save ammo ''' } From f8ad74438f85aeba1e8ced8d9867342fbb6c4133 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sun, 5 Nov 2023 15:43:22 -0500 Subject: [PATCH 77/95] Improve Blood Boiler tooltip --- Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 8b04ff600d..1d0598e838 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -163,7 +163,7 @@ BloodBoiler: { DisplayName: Blood Boiler Tooltip: ''' - Fires a dual stream of lifestealing bloodfire that returns to you + Fires twin streams of life stealing bloodfire that returns to you Uses your health as ammo ''' } From 4a88b2d3056cb161e0227666d26864f4a5c5bffd Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sun, 5 Nov 2023 16:34:23 -0500 Subject: [PATCH 78/95] Improved Pristine Fury tooltip --- .../en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 1d0598e838..ccf8c50343 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -937,7 +937,7 @@ PristineFury: { Tooltip: ''' Fires an intense helix of flames that explode into a column of smoke - Press to disperse short-ranged mists of pure heat + Press to disperse intense clouds of profaned heat Uses gel for ammo ''' } @@ -1116,7 +1116,7 @@ SpeedBlaster: { Tooltip: ''' Rapidly fires phosphorescent paintball shots - to eject a powerful glob which propels you while moving + Press to eject a powerful glob which propels you while moving This ability has a cooldown of {0} seconds While under cooldown, you fire more rapidly with greater accuracy ''' From 18724364a9cf97f5dd358c13dc7ae6426ba0cbc1 Mon Sep 17 00:00:00 2001 From: Xyk Date: Mon, 6 Nov 2023 01:17:12 -0800 Subject: [PATCH 79/95] Photo Updates Reworked Photo, no tooltip yet, more possible changes incoming --- Buffs/DamageOverTime/MiracleBlight.cs | 4 +- CalPlayer/CalamityPlayer.cs | 2 + CalPlayer/CalamityPlayerMiscEffects.cs | 2 + Graphics/Metaballs/PhotoMetaball.cs | 122 ++++++++++++++++++ Graphics/Metaballs/PhotoMetaball2.cs | 123 ++++++++++++++++++ Graphics/Metaballs/PhotoMetaball3.cs | 116 +++++++++++++++++ Graphics/Metaballs/PhotoMetaball4.cs | 117 +++++++++++++++++ Items/Weapons/Ranged/Photoviscerator.cs | 11 +- Projectiles/Ranged/ExoFire.cs | 113 +++++++---------- Projectiles/Ranged/ExoFlare.cs | 103 --------------- Projectiles/Ranged/ExoFlareCluster.cs | 127 ++++++++++++------- Projectiles/Ranged/ExoLight.cs | 120 ++++++++---------- Projectiles/Ranged/ExoSpark.cs | 72 ----------- Projectiles/Ranged/ExoSpark.png | Bin 742 -> 0 bytes Projectiles/Ranged/PhotovisceratorHoldout.cs | 112 ++++++++++++++-- Sounds/Item/PhotoHitSound.ogg | Bin 0 -> 5218 bytes Sounds/Item/PhotoUseSound.ogg | Bin 0 -> 13273 bytes 17 files changed, 773 insertions(+), 371 deletions(-) create mode 100644 Graphics/Metaballs/PhotoMetaball.cs create mode 100644 Graphics/Metaballs/PhotoMetaball2.cs create mode 100644 Graphics/Metaballs/PhotoMetaball3.cs create mode 100644 Graphics/Metaballs/PhotoMetaball4.cs delete mode 100644 Projectiles/Ranged/ExoFlare.cs delete mode 100644 Projectiles/Ranged/ExoSpark.cs delete mode 100644 Projectiles/Ranged/ExoSpark.png create mode 100644 Sounds/Item/PhotoHitSound.ogg create mode 100644 Sounds/Item/PhotoUseSound.ogg diff --git a/Buffs/DamageOverTime/MiracleBlight.cs b/Buffs/DamageOverTime/MiracleBlight.cs index f295731167..1078cd708f 100644 --- a/Buffs/DamageOverTime/MiracleBlight.cs +++ b/Buffs/DamageOverTime/MiracleBlight.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Buffs.DamageOverTime var sparkColor = Main.rand.Next(4) switch { - 0 => Color.DarkRed, + 0 => Color.Red, 1 => Color.MediumTurquoise, 2 => Color.Orange, _ => Color.LawnGreen, @@ -75,7 +75,7 @@ namespace CalamityMod.Buffs.DamageOverTime Vector2 npcSize = npc.Center + new Vector2(Main.rand.NextFloat(-npc.width / 2, npc.width / 2), Main.rand.NextFloat(-npc.height / 2, npc.height / 2)); var sparkColor = Main.rand.Next(4) switch { - 0 => Color.DarkRed, + 0 => Color.Red, 1 => Color.MediumTurquoise, 2 => Color.Orange, _ => Color.LawnGreen, diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index e3b9750c83..8114f319a8 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -182,6 +182,8 @@ namespace CalamityMod.CalPlayer public int deadSunCounter = 6; public int DragonsBreathAudioCooldown = 0; public int DragonsBreathAudioCooldown2 = 0; + public int PhotoAudioCooldown = 0; + public int PhotoTimer = 90; public bool sBlasterDashActivated = false; public int Holyhammer = 0; public int PHAThammer = 0; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 2af531cd2c..91c7312ac2 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1289,6 +1289,8 @@ namespace CalamityMod.CalPlayer DragonsBreathAudioCooldown--; if (DragonsBreathAudioCooldown2 > 0) DragonsBreathAudioCooldown2--; + if (PhotoAudioCooldown > 0) + PhotoAudioCooldown--; if (fullRageSoundCountdownTimer > 0) --fullRageSoundCountdownTimer; if (plagueTaintedSMGDroneCooldown > 0) diff --git a/Graphics/Metaballs/PhotoMetaball.cs b/Graphics/Metaballs/PhotoMetaball.cs new file mode 100644 index 0000000000..528537a831 --- /dev/null +++ b/Graphics/Metaballs/PhotoMetaball.cs @@ -0,0 +1,122 @@ +using System.Collections.Generic; +using System.Linq; +using CalamityMod.Effects; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Graphics.Metaballs +{ + public class PhotoMetaball : Metaball + { + public class PhotoParticle + { + public Vector2 Center; + public float Size; + public int Time = 0; + public float OrginSize; + + public PhotoParticle(Vector2 center, float size) + { + Center = center; + Size = size; + } + + public void Update() + { + Time++; + if (Time == 1) + OrginSize = Size; + // Always slowly shrink the particles. + Size = MathHelper.Clamp(Size - 0.8f, 0f, 1000f) * 0.96f; + + // Once sufficiently small, the particles very rapidly shrink. + if (Size < OrginSize * 0.15f) + Size = 2; + } + } + + public static List Particles + { + get; + private set; + } = new(); + + public override bool AnythingToDraw => Particles.Any(); + + public override IEnumerable Layers + { + get + { + yield return ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value; + } + } + + public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles; + + public Color sparkColor; + public int Time = 0; + public override Color EdgeColor => sparkColor; + + public override void Update() + { + Time++; + // Update all particle instances. + // Once sufficiently small, they vanish. + for (int i = 0; i < Particles.Count; i++) + Particles[i].Update(); + Particles.RemoveAll(p => p.Size <= 2f); + if (Time % 10 == 0) + { + sparkColor = Main.rand.Next(4) switch + { + 0 => Color.Red, + 1 => Color.MediumTurquoise, + 2 => Color.Orange, + _ => Color.LawnGreen, + }; + } + } + + // Copied from Rancor Lava metaballs, since these need to be additive metaballs. + public override void PrepareShaderForTarget(int layerIndex) + { + // Store the shader in an easy to use local variable. + var metaballShader = CalamityShaders.AdditiveMetaballEdgeShader; + + // Calculate the layer scroll offset. This is used to ensure that the texture contents of the given metaball have parallax, rather than being static over the screen + // regardless of world position. + Vector2 screenSize = new(Main.screenWidth, Main.screenHeight); + + // Supply shader parameter values. + metaballShader.Parameters["screenArea"]?.SetValue(screenSize); + metaballShader.Parameters["layerOffset"]?.SetValue(Vector2.Zero); + metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero); + + // Apply the metaball shader. + metaballShader.CurrentTechnique.Passes[0].Apply(); + } + + public static void SpawnParticle(Vector2 position, float size) => Particles.Add(new(position, size)); + + public override void DrawInstances() + { + float opacity = 1f; + Texture2D tex = ModContent.Request("CalamityMod/Graphics/Metaballs/MetaballMessy").Value; + + foreach (PhotoParticle particle in Particles) + { + Vector2 drawPosition = particle.Center - Main.screenPosition; + var origin = tex.Size() * 0.5f; + Vector2 scale = Vector2.One * particle.Size / tex.Size(); + + float Interpolant = Utils.GetLerpValue(25f, 60f, particle.Size * 0.6f, true); + Color drawColor = Color.Lerp(EdgeColor, Color.White * 0.9f, Interpolant).MultiplyRGBA(new Color(1f, 1f, 1f, opacity)); + + Main.spriteBatch.Draw(tex, drawPosition, null, drawColor, 0f, origin, scale, SpriteEffects.None, 0f); + } + } + } +} diff --git a/Graphics/Metaballs/PhotoMetaball2.cs b/Graphics/Metaballs/PhotoMetaball2.cs new file mode 100644 index 0000000000..98a189e8cf --- /dev/null +++ b/Graphics/Metaballs/PhotoMetaball2.cs @@ -0,0 +1,123 @@ +using System.Collections.Generic; +using System.Linq; +using CalamityMod.Effects; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Graphics.Metaballs +{ + public class PhotoMetaball2 : Metaball + { + public class PhotoParticle2 + { + public Vector2 Center; + public float Size; + public int Time = 0; + public float OrginSize; + + public PhotoParticle2(Vector2 center, float size) + { + Center = center; + Size = size; + } + + public void Update() + { + Time++; + if (Time == 1) + OrginSize = Size; + // Always slowly shrink the particles. + Size = MathHelper.Clamp(Size - 0.8f, 0f, 1000f) * 0.96f; + + // Once sufficiently small, the particles very rapidly shrink. + if (Size < OrginSize * 0.15f) + Size = 2; + } + } + + public static List Particles + { + get; + private set; + } = new(); + + public override bool AnythingToDraw => Particles.Any(); + + public override IEnumerable Layers + { + get + { + yield return ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value; + } + } + + public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles; + + public Color sparkColor; + public int Time; + public override Color EdgeColor => sparkColor * 5; + + public override void Update() + { + Time++; + // Update all particle instances. + // Once sufficiently small, they vanish. + for (int i = 0; i < Particles.Count; i++) + Particles[i].Update(); + Particles.RemoveAll(p => p.Size <= 2f); + if (Time % 8 == 0) + { + sparkColor = Main.rand.Next(4) switch + { + 0 => Color.DarkRed, + 1 => Color.MediumTurquoise, + 2 => Color.Orange, + _ => Color.LawnGreen, + }; + } + + } + + // Copied from Rancor Lava metaballs, since these need to be additive metaballs. + public override void PrepareShaderForTarget(int layerIndex) + { + // Store the shader in an easy to use local variable. + var metaballShader = CalamityShaders.AdditiveMetaballEdgeShader; + + // Calculate the layer scroll offset. This is used to ensure that the texture contents of the given metaball have parallax, rather than being static over the screen + // regardless of world position. + Vector2 screenSize = new(Main.screenWidth, Main.screenHeight); + + // Supply shader parameter values. + metaballShader.Parameters["screenArea"]?.SetValue(screenSize); + metaballShader.Parameters["layerOffset"]?.SetValue(Vector2.Zero); + metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero); + + // Apply the metaball shader. + metaballShader.CurrentTechnique.Passes[0].Apply(); + } + + public static void SpawnParticle(Vector2 position, float size) => Particles.Add(new(position, size)); + + public override void DrawInstances() + { + float opacity = 1f; + Texture2D tex = ModContent.Request("CalamityMod/Graphics/Metaballs/MetaballMessy").Value; + + foreach (PhotoParticle2 particle in Particles) + { + Vector2 drawPosition = particle.Center - Main.screenPosition; + var origin = tex.Size() * 0.5f; + Vector2 scale = Vector2.One * particle.Size / tex.Size(); + + float Interpolant = Utils.GetLerpValue(25f, 60f, particle.Size * 0.6f, true); + Color drawColor = Color.Lerp(Color.White, EdgeColor, Interpolant).MultiplyRGBA(new Color(1f, 1f, 1f, opacity)); + + Main.spriteBatch.Draw(tex, drawPosition, null, drawColor, 0f, origin, scale, SpriteEffects.None, 0f); + } + } + } +} diff --git a/Graphics/Metaballs/PhotoMetaball3.cs b/Graphics/Metaballs/PhotoMetaball3.cs new file mode 100644 index 0000000000..95f2645dfc --- /dev/null +++ b/Graphics/Metaballs/PhotoMetaball3.cs @@ -0,0 +1,116 @@ +using System.Collections.Generic; +using System.Linq; +using CalamityMod.Effects; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Graphics.Metaballs +{ + public class PhotoMetaball3 : Metaball + { + public class PhotoParticle3 + { + public Vector2 Center; + public float Size; + public int Time = 0; + + public PhotoParticle3(Vector2 center, float size) + { + Center = center; + Size = size; + } + + public void Update() + { + Time++; + if (Time >= 6) + Size = 2; + } + } + + public static List Particles + { + get; + private set; + } = new(); + + public override bool AnythingToDraw => Particles.Any(); + + public override IEnumerable Layers + { + get + { + yield return ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value; + } + } + + public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles; + + public Color sparkColor; + public int Time = 0; + public override Color EdgeColor => sparkColor; + + public override void Update() + { + Time++; + // Update all particle instances. + // Once sufficiently small, they vanish. + for (int i = 0; i < Particles.Count; i++) + Particles[i].Update(); + Particles.RemoveAll(p => p.Size <= 2f); + + if (Time % 10 == 0) + { + sparkColor = Main.rand.Next(4) switch + { + 0 => Color.Red, + 1 => Color.MediumTurquoise, + 2 => Color.Orange, + _ => Color.LawnGreen, + }; + } + } + + // Copied from Rancor Lava metaballs, since these need to be additive metaballs. + public override void PrepareShaderForTarget(int layerIndex) + { + // Store the shader in an easy to use local variable. + var metaballShader = CalamityShaders.AdditiveMetaballEdgeShader; + + // Calculate the layer scroll offset. This is used to ensure that the texture contents of the given metaball have parallax, rather than being static over the screen + // regardless of world position. + Vector2 screenSize = new(Main.screenWidth, Main.screenHeight); + + // Supply shader parameter values. + metaballShader.Parameters["screenArea"]?.SetValue(screenSize); + metaballShader.Parameters["layerOffset"]?.SetValue(Vector2.Zero); + metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero); + + // Apply the metaball shader. + metaballShader.CurrentTechnique.Passes[0].Apply(); + } + + public static void SpawnParticle(Vector2 position, float size) => Particles.Add(new(position, size)); + + public override void DrawInstances() + { + float opacity = 1f; + Texture2D tex = ModContent.Request("CalamityMod/Graphics/Metaballs/MetaballMessy").Value; + + foreach (PhotoParticle3 particle in Particles) + { + Vector2 drawPosition = particle.Center - Main.screenPosition; + var origin = tex.Size() * 0.5f; + Vector2 scale = Vector2.One * particle.Size / tex.Size(); + + float Interpolant = Utils.GetLerpValue(25f, 60f, particle.Size * 0.6f, true); + Color drawColor = Color.Lerp(EdgeColor, Color.White * 0.9f, Interpolant).MultiplyRGBA(new Color(1f, 1f, 1f, opacity)); + + Main.spriteBatch.Draw(tex, drawPosition, null, drawColor, 0f, origin, scale, SpriteEffects.None, 0f); + } + } + } +} diff --git a/Graphics/Metaballs/PhotoMetaball4.cs b/Graphics/Metaballs/PhotoMetaball4.cs new file mode 100644 index 0000000000..8aa4e991a5 --- /dev/null +++ b/Graphics/Metaballs/PhotoMetaball4.cs @@ -0,0 +1,117 @@ +using System.Collections.Generic; +using System.Linq; +using CalamityMod.Effects; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Graphics.Metaballs +{ + public class PhotoMetaball4 : Metaball + { + public class PhotoParticle4 + { + public Vector2 Center; + public float Size; + public int Time = 0; + + public PhotoParticle4(Vector2 center, float size) + { + Center = center; + Size = size; + } + + public void Update() + { + Time++; + if (Time >= 6) + Size = 2; + } + } + + public static List Particles + { + get; + private set; + } = new(); + + public override bool AnythingToDraw => Particles.Any(); + + public override IEnumerable Layers + { + get + { + yield return ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value; + } + } + + public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles; + + public Color sparkColor; + public int Time; + public override Color EdgeColor => sparkColor * 5; + + public override void Update() + { + Time++; + // Update all particle instances. + // Once sufficiently small, they vanish. + for (int i = 0; i < Particles.Count; i++) + Particles[i].Update(); + Particles.RemoveAll(p => p.Size <= 2f); + + if (Time % 8 == 0) + { + sparkColor = Main.rand.Next(4) switch + { + 0 => Color.Red, + 1 => Color.MediumTurquoise, + 2 => Color.Orange, + _ => Color.LawnGreen, + }; + } + + } + + // Copied from Rancor Lava metaballs, since these need to be additive metaballs. + public override void PrepareShaderForTarget(int layerIndex) + { + // Store the shader in an easy to use local variable. + var metaballShader = CalamityShaders.AdditiveMetaballEdgeShader; + + // Calculate the layer scroll offset. This is used to ensure that the texture contents of the given metaball have parallax, rather than being static over the screen + // regardless of world position. + Vector2 screenSize = new(Main.screenWidth, Main.screenHeight); + + // Supply shader parameter values. + metaballShader.Parameters["screenArea"]?.SetValue(screenSize); + metaballShader.Parameters["layerOffset"]?.SetValue(Vector2.Zero); + metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero); + + // Apply the metaball shader. + metaballShader.CurrentTechnique.Passes[0].Apply(); + } + + public static void SpawnParticle(Vector2 position, float size) => Particles.Add(new(position, size)); + + public override void DrawInstances() + { + float opacity = 1f; + Texture2D tex = ModContent.Request("CalamityMod/Graphics/Metaballs/MetaballMessy").Value; + + foreach (PhotoParticle4 particle in Particles) + { + Vector2 drawPosition = particle.Center - Main.screenPosition; + var origin = tex.Size() * 0.5f; + Vector2 scale = Vector2.One * particle.Size / tex.Size(); + + float Interpolant = Utils.GetLerpValue(25f, 60f, particle.Size * 0.6f, true); + Color drawColor = Color.Lerp(Color.White, EdgeColor, Interpolant).MultiplyRGBA(new Color(1f, 1f, 1f, opacity)); + + Main.spriteBatch.Draw(tex, drawPosition, null, drawColor, 0f, origin, scale, SpriteEffects.None, 0f); + } + } + } +} diff --git a/Items/Weapons/Ranged/Photoviscerator.cs b/Items/Weapons/Ranged/Photoviscerator.cs index 055439d817..3f54f61e48 100644 --- a/Items/Weapons/Ranged/Photoviscerator.cs +++ b/Items/Weapons/Ranged/Photoviscerator.cs @@ -5,6 +5,7 @@ using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using System.Linq; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -13,22 +14,24 @@ namespace CalamityMod.Items.Weapons.Ranged { public class Photoviscerator : ModItem, ILocalizedModType { + public static readonly SoundStyle UseSound = new("CalamityMod/Sounds/Item/PhotoUseSound") { Volume = 0.55f }; + public static readonly SoundStyle HitSound = new("CalamityMod/Sounds/Item/PhotoHitSound") { Volume = 0.45f }; public new string LocalizationCategory => "Items.Weapons.Ranged"; // Left-click stats public static float AmmoNotConsumeChance = 0.95f; - public static int LightBombCooldown = 15; + public static int LightBombCooldown = 10; // Right-click stats public static float RightClickVelocityMult = 2.5f; - public static int RightClickCooldown = 30; + public static int RightClickCooldown = 20; public override void SetDefaults() { Item.width = 208; Item.height = 66; - Item.damage = 130; + Item.damage = 118; Item.DamageType = DamageClass.Ranged; Item.useTime = Item.useAnimation = LightBombCooldown; Item.shootSpeed = 6f; @@ -80,7 +83,7 @@ namespace CalamityMod.Items.Weapons.Ranged { CreateRecipe(). AddIngredient(). - AddIngredient(). + AddIngredient(). AddIngredient(). AddIngredient(). AddTile(). diff --git a/Projectiles/Ranged/ExoFire.cs b/Projectiles/Ranged/ExoFire.cs index 5933dc2459..132847db21 100644 --- a/Projectiles/Ranged/ExoFire.cs +++ b/Projectiles/Ranged/ExoFire.cs @@ -1,8 +1,12 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Graphics.Metaballs; +using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; +using Terraria.Audio; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Ranged @@ -11,90 +15,69 @@ namespace CalamityMod.Projectiles.Ranged public class ExoFire : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; - public override string Texture => "CalamityMod/Projectiles/Magic/RancorFog"; - - public ref float ColorType => ref Projectile.ai[0]; - public ref float ScaleFactor => ref Projectile.ai[1]; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public ref float LightPower => ref Projectile.ai[2]; - public float FogRot = 0f; + public Color sparkColor; + public int Time = 0; + public ref int audioCooldown => ref Main.player[Projectile.owner].Calamity().PhotoAudioCooldown; + public ref int PhotoTimer => ref Main.player[Projectile.owner].Calamity().PhotoTimer; public override void SetDefaults() { - Projectile.width = Projectile.height = 150; + Projectile.width = Projectile.height = 30; Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = -1; - Projectile.MaxUpdates = 3; - Projectile.timeLeft = 180; - Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 5; + Projectile.MaxUpdates = 180; + Projectile.timeLeft = 240; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; } public override void AI() { - // Slightly random fog scale/rotation - if (FogRot == 0f) + sparkColor = Main.rand.Next(4) switch { - Projectile.scale = Main.rand.NextFloat(0.75f, 0.8f); - FogRot = Main.rand.NextFloat(MathHelper.ToRadians(60f)); + 0 => Color.Red, + 1 => Color.MediumTurquoise, + 2 => Color.Orange, + _ => Color.LawnGreen, + }; + Time++; + Lighting.AddLight(Projectile.Center, Color.White.ToVector3() * 0.2f); + Player Owner = Main.player[Projectile.owner]; + float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); //used for some drawing prevention for when it's offscreen since it makes a fuck load of particles + if (targetDist < 1400f) + { + if (PhotoTimer == 0) + PhotoMetaball3.SpawnParticle(Projectile.Center + Owner.velocity, 42 - Time * 0.165f); + if (PhotoTimer == 1) + PhotoMetaball3.SpawnParticle(Projectile.Center + Owner.velocity, (37 - Time * (PhotoTimer == 0 ? 0.165f : 0.088f)) - PhotoTimer * 0.2f + (PhotoTimer == 1 ? 20 : 0)); ; + + PhotoMetaball4.SpawnParticle(Projectile.Center + Owner.velocity, (37 - Time * (PhotoTimer == 0 ? 0.165f : 0.088f)) - PhotoTimer * 0.2f + (PhotoTimer == 1 ? 20 : 0)); + } + if ( Main.rand.NextBool(35) && targetDist < 1400f && Time > 5) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center, 263, new Vector2(0, -5).RotatedByRandom(0.05f) * Main.rand.NextFloat(0.3f, 1.6f)); + dust.noGravity = true; + dust.scale = Main.rand.NextFloat(0.3f, 1f); + dust.color = sparkColor; + } + } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + target.AddBuff(ModContent.BuffType(), 300); + if (audioCooldown == 0) + { + SoundEngine.PlaySound(Photoviscerator.HitSound, target.Center); + audioCooldown = 6; } - ColorType += Main.rand.NextFloat(0.02f, 0.06f); - ScaleFactor += 0.015f; - ScaleFactor = MathHelper.Clamp(ScaleFactor, 0f, Projectile.scale); - Lighting.AddLight(Projectile.Center, CloudColor(ColorType % 3f).ToVector3() * ScaleFactor); - Projectile.rotation = Projectile.velocity.ToRotation() + FogRot; - - Projectile.Opacity = Utils.GetLerpValue(0f, 12f, Projectile.timeLeft, true); - if (Projectile.timeLeft < 60) - Projectile.velocity *= 0.99f; - - // Calculate light power. This checks below the position of the fog to check if this fog is underground. - // Without this, it may render over the fullblack that the game renders for obscured tiles. - float lightPowerBelow = Lighting.GetColor((int)Projectile.Center.X / 16, (int)Projectile.Center.Y / 16 + 6).ToVector3().Length() / (float)Math.Sqrt(3D); - LightPower = MathHelper.Lerp(LightPower, lightPowerBelow, 0.15f); } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width * ScaleFactor * 0.5f, targetHitbox); - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 300); public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 300); - public override bool PreDraw(ref Color lightColor) - { - Main.spriteBatch.SetBlendState(BlendState.Additive); - - Texture2D texture = ModContent.Request(Texture).Value; - Vector2 drawPosition = Projectile.Center - Main.screenPosition; - float opacity = Utils.GetLerpValue(0f, 0.08f, LightPower, true) * Projectile.Opacity * 0.6f; - Color drawColor = CloudColor(ColorType % 3f) * opacity; - Main.EntitySpriteDraw(texture, drawPosition, null, drawColor, Projectile.rotation, texture.Size() * 0.5f, ScaleFactor, SpriteEffects.None); - - Main.spriteBatch.SetBlendState(BlendState.AlphaBlend); - return false; - } - - public static Color CloudColor(float type) - { - type = MathHelper.Clamp(type, 0f, 3f); - Color cloud = Color.White; - - // Cycles with these 3 colors - Color Purple = new Color(220, 120, 255); - Color Green = new Color(120, 255, 120); - Color Yellow = new Color(255, 255, 120); - - if (type >= 2f) - cloud = Color.Lerp(Green, Yellow, type - 2f); - else if (type >= 1f) - cloud = Color.Lerp(Purple, Green, type - 1f); - else - cloud = Color.Lerp(Yellow, Purple, type); - - return cloud; - } } } diff --git a/Projectiles/Ranged/ExoFlare.cs b/Projectiles/Ranged/ExoFlare.cs deleted file mode 100644 index 1f4fcb94ae..0000000000 --- a/Projectiles/Ranged/ExoFlare.cs +++ /dev/null @@ -1,103 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Ranged -{ - // Photoviscerator right click split projectile (attached flares to the flare cluster) - public class ExoFlare : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Ranged"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - public float OffsetSpeed - { - get => Projectile.ai[0]; - set => Projectile.ai[0] = value; - } - public float OffsetRotation - { - get => Projectile.ai[1]; - set => Projectile.ai[1] = value; - } - public override void SetStaticDefaults() - { - ProjectileID.Sets.TrailingMode[Projectile.type] = 0; - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 24; - } - - public override void SetDefaults() - { - Projectile.width = Projectile.height = 24; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.DamageType = DamageClass.Ranged; - Projectile.penetrate = -1; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 16; - Projectile.timeLeft = 160; - } - public override void AI() - { - if (Projectile.localAI[0] == 0f) - { - OffsetRotation = Main.rand.NextFloat(MathHelper.TwoPi); - OffsetSpeed = Main.rand.NextFloat(MathHelper.ToRadians(2.5f), MathHelper.ToRadians(4f)) * Main.rand.NextBool().ToDirectionInt(); - Projectile.localAI[0] = 1f; - } - - // Ensure that the owner projectile index is a valid one. - if (!Main.projectile.IndexInRange((int)Projectile.localAI[1])) - { - Projectile.Kill(); - return; - } - - Projectile owner = Main.projectile[(int)Projectile.localAI[1]]; - - // Ensure the owner is the correct projectile. - if (owner.type != ModContent.ProjectileType()) - Projectile.Kill(); - - // Movement around the owner. - Projectile.Center = owner.Center + OffsetRotation.ToRotationVector2() * MathF.Cos(OffsetRotation * 0.3f) * owner.Size * 0.5f; - Projectile.rotation = (Projectile.position - Projectile.oldPos[1]).ToRotation(); - OffsetRotation += OffsetSpeed; - } - - public override bool PreDraw(ref Color lightColor) - { - Texture2D lightTexture = ModContent.Request("CalamityMod/ExtraTextures/SmallGreyscaleCircle").Value; - for (int i = 0; i < Projectile.oldPos.Length; i++) - { - float colorInterpolation = MathF.Cos(Projectile.timeLeft / 16f + Main.GlobalTimeWrappedHourly / 20f + i / (float)Projectile.oldPos.Length * MathHelper.Pi) * 0.5f + 0.5f; - Color color = Color.Lerp(Color.LightGreen, Color.LightPink, colorInterpolation) * 0.4f; - color.A = 0; - Vector2 drawPosition = Projectile.oldPos[i] + lightTexture.Size() * 0.5f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY) + new Vector2(-25f, -25f); - Color outerColor = color; - Color innerColor = color * 0.5f; - float intensity = 0.9f + 0.15f * MathF.Cos(Main.GlobalTimeWrappedHourly % 60f * MathHelper.TwoPi); - - // Become smaller the futher along the old positions we are. - intensity *= MathHelper.Lerp(0.15f, 1f, 1f - i / (float)Projectile.oldPos.Length); - - Vector2 outerScale = new Vector2(1.65f) * intensity; - Vector2 innerScale = new Vector2(1.65f) * intensity * 0.7f; - outerColor *= intensity; - innerColor *= intensity; - Main.EntitySpriteDraw(lightTexture, drawPosition, null, outerColor, 0f, lightTexture.Size() * 0.5f, outerScale * 0.6f, SpriteEffects.None, 0); - Main.EntitySpriteDraw(lightTexture, drawPosition, null, innerColor, 0f, lightTexture.Size() * 0.5f, innerScale * 0.6f, SpriteEffects.None, 0); - } - return false; - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 600); - - public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 600); - } -} diff --git a/Projectiles/Ranged/ExoFlareCluster.cs b/Projectiles/Ranged/ExoFlareCluster.cs index c6489e9582..adb0333236 100644 --- a/Projectiles/Ranged/ExoFlareCluster.cs +++ b/Projectiles/Ranged/ExoFlareCluster.cs @@ -1,8 +1,12 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Graphics.Metaballs; +using CalamityMod.Items.Weapons.Ranged; +using Terraria.Audio; namespace CalamityMod.Projectiles.Ranged { @@ -12,8 +16,10 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - public const float MinDistanceFromTarget = 45f; - public const float MaxDistanceFromTarget = 350f; + public int Time = 0; + public Color sparkColor; + public bool PostTileHit = false; + public ref int audioCooldown => ref Main.player[Projectile.owner].Calamity().PhotoAudioCooldown; public override void SetStaticDefaults() { ProjectileID.Sets.NeedsUUID[Projectile.type] = true; @@ -24,61 +30,92 @@ namespace CalamityMod.Projectiles.Ranged Projectile.width = Projectile.height = 50; Projectile.friendly = true; Projectile.ignoreWater = true; - Projectile.tileCollide = false; + Projectile.tileCollide = true; Projectile.DamageType = DamageClass.Ranged; - Projectile.penetrate = -1; + Projectile.penetrate = 20; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = -1; - Projectile.timeLeft = 180; + Projectile.localNPCHitCooldown = 6; + Projectile.extraUpdates = 1; + Projectile.timeLeft = 300; } public override void AI() { - // localAI[0] is used by the sticky AI method, so use localAI[1] to spawn the flares. - if (Projectile.localAI[1] == 0f) + Time++; + sparkColor = Main.rand.Next(4) switch { - if (Main.netMode != NetmodeID.Server) - { - int projID = ModContent.ProjectileType(); - int flareDamage = (int)(0.6f * Projectile.damage); - float flareKB = Projectile.knockBack; - for (int i = 0; i < 4; i++) - { - Projectile p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, projID, flareDamage, flareKB, Projectile.owner); - p.localAI[1] = Projectile.GetByUUID(Projectile.owner, Projectile.whoAmI); - } - } - Projectile.localAI[1] = 1f; - } - - if (Projectile.ai[0] == 0f) - { - NPC potentialTarget = Projectile.Center.ClosestNPCAt(MaxDistanceFromTarget, true, true); - if (potentialTarget != null) - { - if (Projectile.Distance(potentialTarget.Center) > MinDistanceFromTarget) - { - float angleOffset = Projectile.AngleTo(potentialTarget.Center) - Projectile.velocity.ToRotation(); - angleOffset = MathHelper.WrapAngle(angleOffset); - Projectile.velocity = Projectile.velocity.RotatedBy(MathHelper.Clamp(angleOffset, -0.1f, 0.1f)); - } - } - } - Projectile.StickyProjAI(5); + 0 => Color.Red, + 1 => Color.MediumTurquoise, + 2 => Color.Orange, + _ => Color.LawnGreen, + }; + PhotoMetaball.SpawnParticle(Projectile.Center, 90); + PhotoMetaball2.SpawnParticle(Projectile.Center, 85); + CalamityUtils.HomeInOnNPC(Projectile, false, 600f, 12f, 20f); } - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(4); - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - if (Projectile.width == 50) - { - int width = (int)MathHelper.Min(target.Hitbox.Width, 60); - int height = (int)MathHelper.Min(target.Hitbox.Height, 60); - Projectile.ExpandHitboxBy(width, height); - } target.AddBuff(ModContent.BuffType(), 600); - } + float numberOflines = 2; + float rotFactorlines = 360f / numberOflines; + for (int i = 0; i < numberOflines; i++) + { + float rot = MathHelper.ToRadians(i * rotFactorlines); + Vector2 offset = (Vector2.UnitX * Main.rand.NextFloat(0.2f, 3.1f)).RotatedBy(rot + Main.rand.NextFloat(0.1f, 5.1f)); + Vector2 velOffset = (Vector2.UnitX * Main.rand.NextFloat(0.2f, 3.1f)).RotatedBy(rot + Main.rand.NextFloat(0.1f, 5.1f)); + SparkParticle spark = new SparkParticle(Projectile.Center + offset, velOffset * Main.rand.NextFloat(3.5f, 6.5f), true, 95, Main.rand.NextFloat(0.3f, 0.8f), Color.White); + GeneralParticleHandler.SpawnParticle(spark); + float rot2 = MathHelper.ToRadians(i * rotFactorlines); + Vector2 offset2 = (Vector2.UnitX * Main.rand.NextFloat(0.2f, 3.1f)).RotatedBy(rot2 + Main.rand.NextFloat(0.1f, 5.1f)); + Vector2 velOffset2 = (Vector2.UnitX * Main.rand.NextFloat(0.2f, 3.1f)).RotatedBy(rot2 + Main.rand.NextFloat(0.1f, 5.1f)); + + SquishyLightParticle exoEnergy = new(Projectile.Center + offset2, velOffset2 * Main.rand.NextFloat(0.5f, 2.5f), 0.5f, sparkColor, 35); + GeneralParticleHandler.SpawnParticle(exoEnergy); + } + if (audioCooldown == 0) + { + SoundEngine.PlaySound(Photoviscerator.HitSound, target.Center); + audioCooldown = 6; + } + } + public override bool OnTileCollide(Vector2 oldVelocity) + { + SoundEngine.PlaySound(DeadSunsWind.Ricochet with { Volume = 1.2f }, Projectile.Center); + if (!PostTileHit) + { + float numberOflines = 25; + float rotFactorlines = 360f / numberOflines; + for (int i = 0; i < numberOflines; i++) + { + sparkColor = Main.rand.Next(4) switch + { + 0 => Color.Red, + 1 => Color.MediumTurquoise, + 2 => Color.Orange, + _ => Color.LawnGreen, + }; + + float rot2 = MathHelper.ToRadians(i * rotFactorlines); + Vector2 offset2 = (Vector2.UnitX * Main.rand.NextFloat(0.2f, 3.1f)).RotatedBy(rot2 * Main.rand.NextFloat(1.1f, 9.1f)); + Vector2 velOffset2 = (Vector2.UnitX * Main.rand.NextFloat(0.2f, 3.1f)).RotatedBy(rot2 * Main.rand.NextFloat(1.1f, 9.1f)); + + SquishyLightParticle exoEnergy = new(Projectile.Center + offset2, velOffset2 * Main.rand.NextFloat(0.2f, 1.9f), 0.5f, sparkColor, 40); + GeneralParticleHandler.SpawnParticle(exoEnergy); + } + PostTileHit = true; + } + + if (Projectile.velocity.X != oldVelocity.X) + { + Projectile.velocity.X = -oldVelocity.X; + } + if (Projectile.velocity.Y != oldVelocity.Y) + { + Projectile.velocity.Y = -oldVelocity.Y; + } + return false; + } public override void OnHitPlayer(Player target, Player.HurtInfo info) { target.AddBuff(ModContent.BuffType(), 600); diff --git a/Projectiles/Ranged/ExoLight.cs b/Projectiles/Ranged/ExoLight.cs index ae8e01d17a..a3af7aece4 100644 --- a/Projectiles/Ranged/ExoLight.cs +++ b/Projectiles/Ranged/ExoLight.cs @@ -8,6 +8,8 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using Terraria.Audio; +using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Graphics.Metaballs; namespace CalamityMod.Projectiles.Ranged { @@ -15,14 +17,15 @@ namespace CalamityMod.Projectiles.Ranged public class ExoLight : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Ranged"; - public override string Texture => "CalamityMod/ExtraTextures/SmallGreyscaleCircle"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public Vector2 InitialCenter; public Vector2 Destination; + public Vector2 NPCDestination; public const float MaxRadius = 90f; public ref float YDirection => ref Projectile.ai[0]; public ref float Time => ref Projectile.ai[1]; - + public Color sparkColor; public override void SetStaticDefaults() { ProjectileID.Sets.TrailingMode[Projectile.type] = 0; @@ -31,13 +34,15 @@ namespace CalamityMod.Projectiles.Ranged public override void SetDefaults() { - Projectile.width = Projectile.height = 40; + Projectile.width = Projectile.height = 20; Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = 1; - Projectile.timeLeft = 300; + Projectile.timeLeft = 210; Projectile.alpha = 127; + Projectile.extraUpdates = 1; + Projectile.tileCollide = false; } public override void SendExtraAI(BinaryWriter writer) @@ -52,16 +57,31 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { + PhotoMetaball.SpawnParticle(Projectile.Center, 54); + PhotoMetaball2.SpawnParticle(Projectile.Center, 50); + + sparkColor = Main.rand.Next(4) switch + { + 0 => Color.Red, + 1 => Color.MediumTurquoise, + 2 => Color.Orange, + _ => Color.LawnGreen, + }; + Lighting.AddLight(Projectile.Center, Color.DarkSlateGray.ToVector3()); - Projectile.alpha = (int)MathHelper.Lerp(255, 127, Utils.GetLerpValue(0f, 25f, Time, true)); Projectile.scale = MathHelper.Lerp(0.001f, 1f, Utils.GetLerpValue(0f, 25f, Time, true)); if (Projectile.localAI[0] == 0f) { + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].CanBeChasedBy(Projectile.GetSource_FromThis(), false)) + NPCDestination = Main.npc[i].Center + Main.npc[i].velocity * 5f; + } InitialCenter = Projectile.Center; Projectile.localAI[0] = 1f; if (Main.myPlayer == Projectile.owner) { - Destination = Main.MouseWorld; + Destination = NPCDestination; Projectile.netUpdate = true; } } @@ -72,7 +92,7 @@ namespace CalamityMod.Projectiles.Ranged if (Time <= 60f) { Projectile.Center = Vector2.Lerp(InitialCenter, Destination, Time / 60f); - Projectile.Center += (Vector2.UnitY * MathF.Sin(Time / 60f * MathHelper.TwoPi) * 75f * YDirection).RotatedBy(Projectile.velocity.ToRotation()); + Projectile.Center += (Vector2.UnitY * MathF.Sin(Time / 70f * MathHelper.TwoPi) * 75f * YDirection).RotatedBy(Projectile.velocity.ToRotation()); } else if (Time < 120f) { @@ -93,76 +113,36 @@ namespace CalamityMod.Projectiles.Ranged Time++; } - public override Color? GetAlpha(Color lightColor) - { - return CalamityUtils.MulticolorLerp(Time / 60f % 1f, new Color[] - { - Color.PaleGreen, - Color.Violet, - Color.SlateGray - }) * Projectile.Opacity; - } - public override bool PreDraw(ref Color lightColor) - { - Texture2D lightTexture = ModContent.Request(Texture).Value; - for (int i = 0; i < Projectile.oldPos.Length; i++) - { - float colorInterpolation = MathF.Cos(Projectile.timeLeft / 16f + Main.GlobalTimeWrappedHourly / 20f + i / (float)Projectile.oldPos.Length * MathHelper.Pi) * 0.5f + 0.5f; - Color color = CalamityUtils.MulticolorLerp(MathHelper.Clamp(colorInterpolation, 0f, 0.99f), new Color[] - { - Color.PaleGreen, - Color.Violet, - Color.SlateGray - }) * Projectile.Opacity; - color.A = 0; - Vector2 drawPosition = Projectile.oldPos[i] + lightTexture.Size() * 0.5f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY) + new Vector2(-15f, -15f); - Color outerColor = color; - Color innerColor = color * 0.5f; - float intensity = 0.9f + 0.15f * MathF.Cos(Main.GlobalTimeWrappedHourly % 60f * MathHelper.TwoPi); - - // Become smaller the futher along the old positions we are. - intensity *= MathHelper.Lerp(0.15f, 1f, 1f - i / (float)Projectile.oldPos.Length); - - Vector2 outerScale = new Vector2(1.25f) * intensity; - Vector2 innerScale = new Vector2(1.25f) * intensity * 0.7f; - outerColor *= intensity * Projectile.scale; - innerColor *= intensity * Projectile.scale; - Main.EntitySpriteDraw(lightTexture, drawPosition, null, outerColor, 0f, lightTexture.Size() * 0.5f, outerScale * 0.6f, SpriteEffects.None, 0); - Main.EntitySpriteDraw(lightTexture, drawPosition, null, innerColor, 0f, lightTexture.Size() * 0.5f, innerScale * 0.6f, SpriteEffects.None, 0); - } - return false; - } - public override void OnKill(int timeLeft) { - SoundEngine.PlaySound(SoundID.Item14, Projectile.Center); - if (Main.netMode != NetmodeID.MultiplayerClient) + float scaleBonus = Time >= 120f ? Main.rand.NextFloat(3.4f, 4.2f) : Main.rand.NextFloat(0.8f, 1.6f); + SoundEngine.PlaySound(DeadSunsWind.Explosion with { Volume = 0.7f}, Projectile.Center); + float numberOfDusts = Time >= 120f ? 30 : 20; + float rotFactor = 360f / numberOfDusts; + for (int i = 0; i < numberOfDusts; i++) { - int projID = ModContent.ProjectileType(); - for (int i = 0; i < 3; i++) + sparkColor = Main.rand.Next(4) switch { - Vector2 vel = Vector2.UnitY.RotatedByRandom(MathHelper.TwoPi) * 16f; - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, vel, projID, Projectile.damage, Projectile.knockBack * 0.3f, Projectile.owner); - } + 0 => Color.Red, + 1 => Color.MediumTurquoise, + 2 => Color.Orange, + _ => Color.LawnGreen, + }; - // If the explosion happens naturally, there's instead only 1 giant explosion instead of 2 separate ones - if (Time >= 120f && YDirection == 1) - return; + float rot = MathHelper.ToRadians(i * rotFactor); + Vector2 offset = (Vector2.UnitX * Main.rand.NextFloat(0.2f, 3.1f)).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f)); + Vector2 velOffset = (Vector2.UnitX * Main.rand.NextFloat(0.2f, 3.1f)).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f)); - float scaleBonus = Time >= 120f ? Main.rand.NextFloat(2.4f, 3.2f) : Main.rand.NextFloat(0.8f, 1.6f); - Projectile.scale = 4.5f * scaleBonus; - Particle pinkBoom = new DetailedExplosion(Projectile.Center, Vector2.Zero, Color.Violet, Vector2.One, Main.rand.NextFloat(0f, MathHelper.TwoPi), 0f, 0.5f * scaleBonus, 12); - GeneralParticleHandler.SpawnParticle(pinkBoom); - Particle greenBoom = new DetailedExplosion(Projectile.Center, Vector2.Zero, Color.PaleGreen, Vector2.One, Main.rand.NextFloat(0f, MathHelper.TwoPi), 0f, 0.4f * scaleBonus, 12); - GeneralParticleHandler.SpawnParticle(greenBoom); - - // we should probably have a generic util to do this whole thing - Projectile.maxPenetrate = -1; - Projectile.penetrate = -1; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; - Projectile.Damage(); + SquishyLightParticle exoEnergy = new(Projectile.Center + offset, velOffset * (Main.rand.NextFloat(0.5f, 3.5f) + scaleBonus * 0.65f), Time >= 120f ? 0.7f : 0.5f, sparkColor, Time >= 120f ? 50 : 35); + GeneralParticleHandler.SpawnParticle(exoEnergy); } + Projectile.scale = 6.5f * scaleBonus; + // we should probably have a generic util to do this whole thing + Projectile.maxPenetrate = -1; + Projectile.penetrate = -1; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; + Projectile.Damage(); } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width * Projectile.scale * 0.5f, targetHitbox); diff --git a/Projectiles/Ranged/ExoSpark.cs b/Projectiles/Ranged/ExoSpark.cs deleted file mode 100644 index e4d0dab0c7..0000000000 --- a/Projectiles/Ranged/ExoSpark.cs +++ /dev/null @@ -1,72 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Ranged -{ - // Photoviscerator left click splitting homing projectile - public class ExoSpark : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Ranged"; - public static readonly int[] FrameToDustIDTable = new int[] - { - 107, - 234, - 269, - }; - public const float HomingInertia = 10f; - public const float MaxTargetDistance = 750f; - public override void SetStaticDefaults() - { - Main.projFrames[Projectile.type] = 3; - } - - public override void SetDefaults() - { - Projectile.width = 28; - Projectile.height = 14; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.DamageType = DamageClass.Ranged; - Projectile.penetrate = 1; - Projectile.timeLeft = 180; - } - - public override void AI() - { - if (Projectile.localAI[0] == 0f) - { - Projectile.frame = Main.rand.Next(3); - Projectile.localAI[0] = 1f; - Projectile.netUpdate = true; - } - NPC potentialTarget = Projectile.Center.ClosestNPCAt(MaxTargetDistance); - if (potentialTarget != null) - Projectile.velocity = (Projectile.velocity * (HomingInertia - 1) + Projectile.SafeDirectionTo(potentialTarget.Center) * 16f) / HomingInertia; - - Projectile.rotation = Projectile.velocity.ToRotation(); - if (!Main.dedServ) - { - GenerateCircularDust(); - } - } - - public void GenerateCircularDust() - { - for (int i = 0; i < 12; i++) - { - float angle = i / 12f * MathHelper.TwoPi; - Vector2 spawnPosition = Projectile.Center + angle.ToRotationVector2().RotatedBy(Projectile.rotation) * new Vector2(10f, 6f); - Dust dust = Dust.NewDustPerfect(spawnPosition, FrameToDustIDTable[Projectile.frame]); - dust.velocity = Vector2.Zero; - dust.scale = 0.5f; - dust.noGravity = true; - } - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 180); - - public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 180); - } -} diff --git a/Projectiles/Ranged/ExoSpark.png b/Projectiles/Ranged/ExoSpark.png deleted file mode 100644 index eb696c6909b6af338f165a41fd495bf4918bef1f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 742 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0((hBK~z{r-IrfT zQ&AkpkDE**PxYdE>P1^m_Rv#U zP!AE&V=s|2ivEx}Mo5qkGneM%e((7W&aYj^2<{nu9`-%w-2FM9^E*3tD-#Z6Vr{ae z;_C>?7Q^UNa-rOlwQ}$J20o)~+d(UY2ahiDmmxR1VP3&ZZzb;Gx!%TFD@6QsKgNm3 z$_lP87_G`U84~UrI@OBIh>wZa$TQ(?BlEqkk^eq7>=hOVy4qw1B!7ZleKqg-C<>1|1Op32w#D6vkrOp zSQsXePc!y=1bY!=$jwUUq$x!9%_Z4lnB%gcLS}@1!$P~3ZkFDa7Ww zJ0%-iPnYt6gQ&Kz`xI-D@2ca|1QcI~}vsc?rHvej- zzlMarsRl{Ab!c$}Gn)-QLI0w+5B=>&PFW#RKS!07AQM9WE|r<1*t-NbD1_^V|2sl# Y0xW*kId(raZvX%Q07*qoM6N<$g5bPg$^ZZW diff --git a/Projectiles/Ranged/PhotovisceratorHoldout.cs b/Projectiles/Ranged/PhotovisceratorHoldout.cs index 4b255cc215..df5342ed9a 100644 --- a/Projectiles/Ranged/PhotovisceratorHoldout.cs +++ b/Projectiles/Ranged/PhotovisceratorHoldout.cs @@ -1,6 +1,8 @@ using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Particles; using Microsoft.Xna.Framework; +using Mono.Cecil; +using ReLogic.Utilities; using System; using Terraria; using Terraria.Audio; @@ -19,6 +21,10 @@ namespace CalamityMod.Projectiles.Ranged public bool OwnerCanShoot => (Owner.channel || Owner.Calamity().mouseRight) && !Owner.noItems && !Owner.CCed; public ref float ShootTimer => ref Projectile.ai[0]; public ref float ForcedLifespan => ref Projectile.ai[1]; + public Color sparkColor; + public int Time = 0; + public ref int PhotoTimer => ref Main.player[Projectile.owner].Calamity().PhotoTimer; + public SlotId PhotoUseSound; public override void SetDefaults() { @@ -32,6 +38,27 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { + Time++; + if (PhotoTimer > 0) + PhotoTimer--; + + sparkColor = Main.rand.Next(4) switch + { + 0 => Color.Red, + 1 => Color.MediumTurquoise, + 2 => Color.Orange, + _ => Color.LawnGreen, + }; + + if (Owner.Calamity().mouseRight) + { + if (SoundEngine.TryGetActiveSound(PhotoUseSound, out var Sound2)) + Sound2?.Stop(); + } + + if (SoundEngine.TryGetActiveSound(PhotoUseSound, out var Sound) && Sound.IsPlaying) + Sound.Position = Projectile.Center; + Vector2 armPosition = Owner.RotatedRelativePoint(Owner.MountedCenter, true); UpdateProjectileHeldVariables(armPosition); ManipulatePlayerVariables(); @@ -46,9 +73,9 @@ namespace CalamityMod.Projectiles.Ranged if (Main.rand.NextBool(4)) { Vector2 flameAngle = -Vector2.UnitY.RotatedBy(Projectile.rotation + MathHelper.ToRadians(Main.rand.NextFloat(270f, 300f) * Projectile.spriteDirection)); - SquishyLightParticle exoEnergy = new(flamePosition - verticalOffset * 26f, flameAngle * Main.rand.NextFloat(0.4f, 1.6f), 0.25f, energyColor, 20); + SquishyLightParticle exoEnergy = new(flamePosition - verticalOffset * 26f, flameAngle * Main.rand.NextFloat(0.8f, 3.6f), 0.25f, energyColor, 20); GeneralParticleHandler.SpawnParticle(exoEnergy); - SquishyLightParticle exoEnergy2 = new(armPosition - verticalOffset * 22f, flameAngle * Main.rand.NextFloat(0.3f, 1.2f), 0.2f, energyColor, 12); + SquishyLightParticle exoEnergy2 = new(armPosition - verticalOffset * 22f, flameAngle * Main.rand.NextFloat(0.7f, 3.2f), 0.2f, energyColor, 12); GeneralParticleHandler.SpawnParticle(exoEnergy2); } @@ -95,19 +122,59 @@ namespace CalamityMod.Projectiles.Ranged public void LeftClickAttack(Vector2 armPosition, Vector2 verticalOffset) { + if (Time == 1 || Time % 59 == 0) + { + PhotoUseSound = SoundEngine.PlaySound(Photoviscerator.UseSound, Projectile.Center); + } + + if (SoundEngine.TryGetActiveSound(PhotoUseSound, out var Sound3)) + Sound3.Pitch = 0 - (PhotoTimer * 0.002f); + // Consume ammo and retrieve projectile stats; has a chance to not consume ammo Owner.PickAmmo(Owner.ActiveItem(), out _, out float shootSpeed, out int damage, out float knockback, out _, Main.rand.NextFloat() <= AmmoNotConsumeChance); var source = Projectile.GetSource_FromThis(); - Vector2 position = armPosition + Projectile.velocity * 48f - verticalOffset * 10f; + Vector2 position = armPosition + Projectile.velocity * 55f - verticalOffset * 10f; Vector2 velocity = Projectile.velocity * shootSpeed; + + if (PhotoTimer == 1) + { + for (int i = 0; i < 30; i++) + { + sparkColor = Main.rand.Next(4) switch + { + 0 => Color.Red, + 1 => Color.MediumTurquoise, + 2 => Color.Orange, + _ => Color.LawnGreen, + }; + SquishyLightParticle exoEnergy = new(position, (Projectile.velocity * 3).RotatedByRandom(0.4f) * Main.rand.NextFloat(0.3f, 1.6f), 0.9f, sparkColor, 60); + GeneralParticleHandler.SpawnParticle(exoEnergy); + } + SoundEngine.PlaySound(DeadSunsWind.Shoot with { Volume = 1.9f}, Owner.MountedCenter); + } + + Dust dust = Dust.NewDustPerfect(position, 263, (Projectile.velocity * 10).RotatedByRandom(0.6f) * Main.rand.NextFloat(0.3f, 1.6f)); + dust.noGravity = true; + dust.scale = Main.rand.NextFloat(1.3f, 1.8f) - PhotoTimer * 0.02f; + dust.color = sparkColor; + Dust dust2 = Dust.NewDustPerfect(position, 263, (Projectile.velocity * 15).RotatedByRandom(0.25f) * Main.rand.NextFloat(0.3f, 1.6f)); + dust2.noGravity = true; + dust2.scale = Main.rand.NextFloat(1.3f, 1.8f) - PhotoTimer * 0.02f; + dust2.color = sparkColor; + if (Main.rand.NextBool()) + { + MediumMistParticle smoke = new MediumMistParticle(position + Main.rand.NextVector2Circular(5, 5), (Projectile.velocity * 15).RotatedByRandom(0.15f) * Main.rand.NextFloat(0.5f, 2.1f), sparkColor, Color.White, Main.rand.NextFloat(1.8f, 2.9f) - PhotoTimer * 0.026f, 160, Main.rand.NextFloat(-3f, 3f)); + GeneralParticleHandler.SpawnParticle(smoke); + MediumMistParticle smoke2 = new MediumMistParticle(position + Main.rand.NextVector2Circular(5, 5), (Projectile.velocity * 18).RotatedByRandom(0.05f) * Main.rand.NextFloat(1.8f, 3.1f), sparkColor, Color.White, Main.rand.NextFloat(0.8f, 1.9f) - PhotoTimer * 0.02f, 160, Main.rand.NextFloat(-3f, 3f)); + GeneralParticleHandler.SpawnParticle(smoke2); + } // Main fire stream - SoundEngine.PlaySound(SoundID.Item34, Owner.MountedCenter); - Projectile.NewProjectile(source, position, velocity, ProjectileType(), damage, knockback, Projectile.owner, Main.rand.NextFloat(0f, 3f)); + Projectile.NewProjectile(source, position, velocity.RotatedByRandom(0.005f), ProjectileType(), (int)(damage * (1 - PhotoTimer / 59.9f)), knockback, Projectile.owner, Main.rand.NextFloat(0f, 3f)); // Shoots light bombs every once in a while, rate of which equals to the item's use time - if (ShootTimer >= Owner.ActiveItem().useTime) + if (ShootTimer >= Owner.ActiveItem().useTime * 10 && PhotoTimer == 0) { ShootTimer = 0f; @@ -119,11 +186,13 @@ namespace CalamityMod.Projectiles.Ranged Projectile.NewProjectile(source, bombPos, bombVel, ProjectileType(), damage, knockback, Projectile.owner, yDirection); } + SoundEngine.PlaySound(HalleysInferno.Hit, Owner.MountedCenter); } } public void RightClickAttack(Vector2 armPosition, Vector2 verticalOffset) { + // Multiplied by the ratio of attack speed gained from modifiers ShootTimer = (RightClickCooldown * Owner.ActiveItem().useTime / (float)LightBombCooldown) - 1f; ForcedLifespan = ShootTimer; @@ -132,11 +201,28 @@ namespace CalamityMod.Projectiles.Ranged Owner.PickAmmo(Owner.ActiveItem(), out _, out float shootSpeed, out int damage, out float knockback, out _); var source = Projectile.GetSource_FromThis(); - Vector2 position = armPosition + Projectile.velocity * 140f + verticalOffset * 6f; + Vector2 position = armPosition + Projectile.velocity * 55f - verticalOffset * 10f; Vector2 velocity = Projectile.velocity * shootSpeed * RightClickVelocityMult; - - SoundEngine.PlaySound(SoundID.Item34, Owner.MountedCenter); - Projectile.NewProjectile(source, position, velocity, ProjectileType(), damage, knockback, Projectile.owner); + for (int i = 0; i <= 15; i++) + { + sparkColor = Main.rand.Next(4) switch + { + 0 => Color.Red, + 1 => Color.MediumTurquoise, + 2 => Color.Orange, + _ => Color.LawnGreen, + }; + DirectionalPulseRing pulse = new DirectionalPulseRing(position, (Projectile.velocity * 10).RotatedByRandom(0.6f) * Main.rand.NextFloat(0.3f, 1.6f), sparkColor, new Vector2(1, 1), 0, Main.rand.NextFloat(0.2f, 0.35f), 0f, 40); + GeneralParticleHandler.SpawnParticle(pulse); + DirectionalPulseRing pulse2 = new DirectionalPulseRing(position, (Projectile.velocity * 10).RotatedByRandom(0.1f) * Main.rand.NextFloat(0.8f, 3.1f), sparkColor, new Vector2(1, 1), 0, Main.rand.NextFloat(0.2f, 0.35f), 0f, 40); + GeneralParticleHandler.SpawnParticle(pulse2); + Dust dust = Dust.NewDustPerfect(position, 263, (Projectile.velocity * 10).RotatedByRandom(0.6f) * Main.rand.NextFloat(0.3f, 1.6f)); + dust.noGravity = true; + dust.scale = Main.rand.NextFloat(1.3f, 1.8f); + dust.color = sparkColor; + } + SoundEngine.PlaySound(HalleysInferno.Shoot, Owner.MountedCenter); + Projectile.NewProjectile(source, position, velocity, ProjectileType(), (int)(damage * 1.2f), knockback, Projectile.owner); } public void UpdateProjectileHeldVariables(Vector2 armPosition) @@ -173,5 +259,11 @@ namespace CalamityMod.Projectiles.Ranged public override bool ShouldUpdatePosition() => false; public override bool? CanDamage() => false; + public override void OnKill(int timeLeft) + { + if (SoundEngine.TryGetActiveSound(PhotoUseSound, out var Sound)) + Sound?.Stop(); + PhotoTimer = 90; + } } } diff --git a/Sounds/Item/PhotoHitSound.ogg b/Sounds/Item/PhotoHitSound.ogg new file mode 100644 index 0000000000000000000000000000000000000000..97f0ff847c22ec7dec7aa26665979ed0d68c54dc GIT binary patch literal 5218 zcmai130PCd7QQIE0RjXJH0q5);YP3ogBmI=i>L`iB_s%;R7nUBmLOTQwxU!5MTLkM z5o4@u0YQR_fI{n1HGs$_NRVp9jYV;3s|8zZeRC7r`ue`F?|yUVn>%OboH^(G=iD=E z6B5Fq8PMCOFVQgY!fH&7<{E8I6LAG%bjoN&?b{_=jP!%EMr+ZXe?90~yMldW8 z!Yf1JaEUZdkOl-egC&9M7_d8+A1e{VoA@F)RUni~_=q2w;$;D-D*{--e&8hD4Di9C zu|k9W+?RPHa428mCWd*5d|on~CY8YJ1fPE%3$xO;02ZvY1imB@3_RheG$~8U<-_+g z6)+?1b3sZV|bW`#10jEwY4-9#Y^#A&HUCI*8bfk6>QkU1ceLt$-ZZvh*E zun@G-1+m^APeas-QunRJiq+^y>$R&`u}h2R<&j(e>|jcq0|XgEneGNZ6YaRU#2h^6z9NX) ziB&3*CFxknPD}50I4jiqQN{i>zK@QT%Y7faH}nS1@@(j%hmr>(cy;GYW44LAsbi|Q zorPWx7@Q^0)F}=dXpXYaMJkI$fR#Zl7|H}{LaX-SX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c23uiy@+kN><&(83`0?7W{b)J#se#+0{DLjg+GolLb3m* zgJLl8HCCGKjzOr?vKRW=3ps>>yl~rT)&h8#$+eTf-B>x7-6IicrfeZ-!x==2rT`22s0O$FeJ*^zrBaC9`ZmQk c1@?QDR8fCc4oD#eGwov9HQAn8#sNhC56R&Bv;Y7A literal 0 HcmV?d00001 From 3fdf33ce1f84b9f5be1f68a358fddcdf392acdb3 Mon Sep 17 00:00:00 2001 From: Xyk Date: Mon, 6 Nov 2023 16:49:34 -0800 Subject: [PATCH 80/95] Visual flamethrower changes Dead Suns wind particle reduction for performance and color change and to fit the sprite a bit more and not step on nanoblack's vibes quite as hard Miracle blight made slightly less intense and added some white Fixed the Metaballs on Blood boiler and Dragon's Breath the best I can. --- Buffs/DamageOverTime/MiracleBlight.cs | 40 +++--- Graphics/Metaballs/BloodBoilerMetaball.cs | 6 +- Graphics/Metaballs/BloodBoilerMetaball2.cs | 104 +++++++++++++++ Graphics/Metaballs/DragonsBreathMetaball.cs | 10 +- Graphics/Metaballs/DragonsBreathMetaball2.cs | 127 +++++++++++++++++++ Items/Weapons/Ranged/DragonsBreath.cs | 8 +- Projectiles/Ranged/BloodBoilerFire.cs | 3 +- Projectiles/Ranged/CosmicFire.cs | 32 ++--- Projectiles/Ranged/DeadSunExplosion.cs | 14 +- Projectiles/Ranged/DragonsBreathFlames.cs | 62 ++++----- Projectiles/Ranged/DragonsBreathMag.cs | 7 +- Projectiles/Ranged/PhotovisceratorHoldout.cs | 2 +- 12 files changed, 327 insertions(+), 88 deletions(-) create mode 100644 Graphics/Metaballs/BloodBoilerMetaball2.cs create mode 100644 Graphics/Metaballs/DragonsBreathMetaball2.cs diff --git a/Buffs/DamageOverTime/MiracleBlight.cs b/Buffs/DamageOverTime/MiracleBlight.cs index 1078cd708f..55f3f790de 100644 --- a/Buffs/DamageOverTime/MiracleBlight.cs +++ b/Buffs/DamageOverTime/MiracleBlight.cs @@ -41,31 +41,29 @@ namespace CalamityMod.Buffs.DamageOverTime 2 => Color.Orange, _ => Color.LawnGreen, }; - DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Calamity().RandomDebuffVisualSpot, Vector2.Zero, sparkColor, new Vector2(1, 1), 0, Main.rand.NextFloat(0.09f, 0.17f), 0f, 25); - GeneralParticleHandler.SpawnParticle(pulse); + + if (Main.rand.NextBool(2)) + { + DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Calamity().RandomDebuffVisualSpot, Vector2.Zero, Main.rand.NextBool(3) ? Color.White : sparkColor, new Vector2(1, 1), 0, Main.rand.NextFloat(0.09f, 0.17f), 0f, 25); + GeneralParticleHandler.SpawnParticle(pulse); + } float numberOfDusts = 3f; float rotFactor = 360f / numberOfDusts; - if (Player.miscCounter % 4 == 0) + if (Player.miscCounter % 5 == 0) { for (int i = 0; i < numberOfDusts; i++) { - var DustType = Main.rand.Next(4) switch - { - 0 => 219, - 1 => 220, - 2 => 226, - _ => 222, - }; float rot = MathHelper.ToRadians(i * rotFactor); Vector2 offset = new Vector2(0.3f, 0).RotatedBy(rot * Main.rand.NextFloat(0.2f, 0.3f)); Vector2 velOffset = CalamityUtils.RandomVelocity(100f, 70f, 150f, 0.04f); - Dust dust = Dust.NewDustPerfect(Player.Calamity().RandomDebuffVisualSpot + offset, DustType, new Vector2(velOffset.X, velOffset.Y)); + Dust dust = Dust.NewDustPerfect(Player.Calamity().RandomDebuffVisualSpot + offset, 278, new Vector2(velOffset.X, velOffset.Y)); dust.noGravity = true; dust.velocity = velOffset; velOffset *= 10; dust.position = Player.Center - velOffset; dust.scale = Main.rand.NextFloat(0.7f, 0.8f); + dust.color = Main.rand.NextBool(3) ? Color.White : sparkColor; } } } @@ -80,31 +78,29 @@ namespace CalamityMod.Buffs.DamageOverTime 2 => Color.Orange, _ => Color.LawnGreen, }; - DirectionalPulseRing pulse = new DirectionalPulseRing(npcSize, Vector2.Zero, sparkColor, new Vector2(1, 1), 0, 0.18f + (0.0000007f * npc.width * npc.height), 0f, 25); - GeneralParticleHandler.SpawnParticle(pulse); + + if (Main.rand.NextBool(2)) + { + DirectionalPulseRing pulse = new DirectionalPulseRing(npcSize, Vector2.Zero, Main.rand.NextBool(3) ? Color.White : sparkColor, new Vector2(1, 1), 0, 0.18f + (0.0000007f * npc.width * npc.height), 0f, 30); + GeneralParticleHandler.SpawnParticle(pulse); + } float numberOfDusts = 2f; float rotFactor = 360f / numberOfDusts; - if (Main.rand.NextBool(3)) + if (Main.rand.NextBool(5)) { for (int i = 0; i < numberOfDusts; i++) { - var DustType = Main.rand.Next(4) switch - { - 0 => 219, - 1 => 220, - 2 => 226, - _ => 222, - }; float rot = MathHelper.ToRadians(i * rotFactor); Vector2 offset = new Vector2(0.3f, 0).RotatedBy(rot * Main.rand.NextFloat(0.2f, 0.3f)); Vector2 velOffset = CalamityUtils.RandomVelocity(100f, 70f, 150f, 0.04f); - Dust dust = Dust.NewDustPerfect(npc.Center + offset, DustType, new Vector2(velOffset.X, velOffset.Y)); + Dust dust = Dust.NewDustPerfect(npc.Center + offset, 278, new Vector2(velOffset.X, velOffset.Y)); dust.noGravity = true; dust.velocity = velOffset; velOffset *= 10 + (0.0003f * npc.width * npc.height); dust.position = npc.Center - velOffset; dust.scale = Main.rand.NextFloat(0.7f, 0.8f); + dust.color = Main.rand.NextBool(3) ? Color.White : sparkColor; } } } diff --git a/Graphics/Metaballs/BloodBoilerMetaball.cs b/Graphics/Metaballs/BloodBoilerMetaball.cs index 1a4d4a7942..d5d29fd0c8 100644 --- a/Graphics/Metaballs/BloodBoilerMetaball.cs +++ b/Graphics/Metaballs/BloodBoilerMetaball.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Graphics.Metaballs public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles; - public override Color EdgeColor => Color.DarkRed * 0.8f; + public override Color EdgeColor => Color.DarkRed; public override void Update() { @@ -85,7 +85,7 @@ namespace CalamityMod.Graphics.Metaballs public override void DrawInstances() { float pureRedIntensity = 0.15f; - float opacity = 0.25f; + float opacity = 0.5f; Texture2D tex = ModContent.Request("CalamityMod/ExtraTextures/SmallGreyscaleCircle").Value; foreach (BloodBoilerParticle particle in Particles) @@ -95,7 +95,7 @@ namespace CalamityMod.Graphics.Metaballs Vector2 scale = Vector2.One * particle.Size / tex.Size(); float pureRedInterpolant = Utils.GetLerpValue(25f, 60f, particle.Size, true) * pureRedIntensity; - Color drawColor = Color.Lerp(EdgeColor, Color.Red, pureRedInterpolant).MultiplyRGBA(new Color(1f, 1f, 1f, opacity)); + Color drawColor = Color.Lerp(EdgeColor, Color.DarkRed, pureRedInterpolant).MultiplyRGBA(new Color(1f, 1f, 1f, opacity)); Main.spriteBatch.Draw(tex, drawPosition, null, drawColor, 0f, origin, scale, SpriteEffects.None, 0f); } diff --git a/Graphics/Metaballs/BloodBoilerMetaball2.cs b/Graphics/Metaballs/BloodBoilerMetaball2.cs new file mode 100644 index 0000000000..873604126a --- /dev/null +++ b/Graphics/Metaballs/BloodBoilerMetaball2.cs @@ -0,0 +1,104 @@ +using System.Collections.Generic; +using System.Linq; +using CalamityMod.Effects; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Graphics.Metaballs +{ + public class BloodBoilerMetaball2 : Metaball + { + public class BloodBoilerParticle2 + { + public Vector2 Center; + public float Size; + + public BloodBoilerParticle2(Vector2 center, float size) + { + Center = center; + Size = size; + } + + public void Update() + { + // Always slowly shrink the particles. + Size = MathHelper.Clamp(Size - 0.1f, 0f, 200f) * 0.91f; + + // Once sufficiently small, the particles very rapidly shrink. + if (Size < 20f) + Size = Size * 0.8f - 1f; + } + } + + public static List Particles + { + get; + private set; + } = new(); + + public override bool AnythingToDraw => Particles.Any(); + + public override IEnumerable Layers + { + get + { + yield return ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value; + } + } + + public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles; + + public override Color EdgeColor => Color.DarkRed; + + public override void Update() + { + // Update all particle instances. + // Once sufficiently small, they vanish. + for (int i = 0; i < Particles.Count; i++) + Particles[i].Update(); + Particles.RemoveAll(p => p.Size <= 2f); + } + + // Copied from Rancor Lava metaballs, since these need to be additive metaballs. + public override void PrepareShaderForTarget(int layerIndex) + { + // Store the shader in an easy to use local variable. + var metaballShader = CalamityShaders.AdditiveMetaballEdgeShader; + + // Calculate the layer scroll offset. This is used to ensure that the texture contents of the given metaball have parallax, rather than being static over the screen + // regardless of world position. + Vector2 screenSize = new(Main.screenWidth, Main.screenHeight); + + // Supply shader parameter values. + metaballShader.Parameters["screenArea"]?.SetValue(screenSize); + metaballShader.Parameters["layerOffset"]?.SetValue(Vector2.Zero); + metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero); + + // Apply the metaball shader. + metaballShader.CurrentTechnique.Passes[0].Apply(); + } + + public static void SpawnParticle(Vector2 position, float size) => Particles.Add(new(position, size)); + + public override void DrawInstances() + { + float pureRedIntensity = 0.15f; + float opacity = 0.3f; + Texture2D tex = ModContent.Request("CalamityMod/ExtraTextures/SmallGreyscaleCircle").Value; + + foreach (BloodBoilerParticle2 particle in Particles) + { + Vector2 drawPosition = particle.Center - Main.screenPosition; + var origin = tex.Size() * 0.5f; + Vector2 scale = Vector2.One * particle.Size / tex.Size(); + + float pureRedInterpolant = Utils.GetLerpValue(25f, 60f, particle.Size, true) * pureRedIntensity; + Color drawColor = Color.Lerp(EdgeColor, Color.DarkRed, pureRedInterpolant).MultiplyRGBA(new Color(1f, 1f, 1f, opacity)); + + Main.spriteBatch.Draw(tex, drawPosition, null, drawColor, 0f, origin, scale, SpriteEffects.None, 0f); + } + } + } +} diff --git a/Graphics/Metaballs/DragonsBreathMetaball.cs b/Graphics/Metaballs/DragonsBreathMetaball.cs index 6cdfe916a3..e041506bb2 100644 --- a/Graphics/Metaballs/DragonsBreathMetaball.cs +++ b/Graphics/Metaballs/DragonsBreathMetaball.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Graphics.Metaballs { // OrangeRed is FF4500 // new Color(0xFF, 0x3A, 0x0A); - public override Color EdgeColor => Main.rand.NextBool() ? Color.OrangeRed : Color.DarkOrange * 0.65f; + public override Color EdgeColor => Color.Orange; // Flame metaballs never turn white public override void DrawInstances() => DrawInstancesInternal(0.03f, -1f); @@ -21,7 +21,7 @@ namespace CalamityMod.Graphics.Metaballs { private static float whiteSizeThreshold = 72f; - public override Color EdgeColor => Main.rand.NextBool() ? Color.Orange : Color.OrangeRed; + public override Color EdgeColor => Color.Orange; // Laser metaballs very suddenly turn white at a specific size public override void DrawInstances() => DrawInstancesInternal(0.4f, whiteSizeThreshold); @@ -47,7 +47,7 @@ namespace CalamityMod.Graphics.Metaballs Size = MathHelper.Clamp(Size - 0.1f, 0f, 200f) * 0.91f; // Once sufficiently small, the particles very rapidly shrink. - if (Size < 20f) + if (Size < 5f) Size = Size * 0.8f - 1f; } } @@ -115,10 +115,10 @@ namespace CalamityMod.Graphics.Metaballs if (whiteSizeThreshold >= 0f) { float pureWhiteInterpolant = Utils.GetLerpValue(0.8f * whiteSizeThreshold, whiteSizeThreshold, particle.Size, true) * pureWhiteIntensity; - drawColor = Color.Lerp(EdgeColor, Color.White, pureWhiteInterpolant) * opacity; + drawColor = Color.Lerp(EdgeColor, Color.DarkOrange, pureWhiteInterpolant) * opacity; } else - drawColor = Color.Lerp(EdgeColor, new Color(0xE0, 0x70, 0x10), Utils.GetLerpValue(60f, 100f, particle.Size, true) * 0.2f); + drawColor = Color.Lerp(EdgeColor, new Color(0xE0, 0x70, 0x10), Utils.GetLerpValue(60f, 100f, particle.Size, true) * 0.75f); Main.spriteBatch.Draw(tex, drawPosition, null, drawColor, 0f, origin, scale, SpriteEffects.None, 0f); } diff --git a/Graphics/Metaballs/DragonsBreathMetaball2.cs b/Graphics/Metaballs/DragonsBreathMetaball2.cs new file mode 100644 index 0000000000..c07f13e894 --- /dev/null +++ b/Graphics/Metaballs/DragonsBreathMetaball2.cs @@ -0,0 +1,127 @@ +using System.Collections.Generic; +using System.Linq; +using CalamityMod.Effects; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Graphics.Metaballs +{ + public class DragonsBreathFlameMetaball2 : DragonsBreathMetaball + { + // OrangeRed is FF4500 + // new Color(0xFF, 0x3A, 0x0A); + public override Color EdgeColor => Color.OrangeRed; + + // Flame metaballs never turn white + public override void DrawInstances() => DrawInstancesInternal(0.03f, -1f); + } + public class DragonsBreathBeamMetaball2 : DragonsBreathMetaball2 + { + private static float whiteSizeThreshold = 72f; + + public override Color EdgeColor => Color.OrangeRed * 1.2f; + + // Laser metaballs very suddenly turn white at a specific size + public override void DrawInstances() => DrawInstancesInternal(0.4f, whiteSizeThreshold); + } + + public abstract class DragonsBreathMetaball2 : Metaball + { + // Identical behavior to Blood Boiler particles + public class DragonsBreathParticle2 + { + public Vector2 Center; + public float Size; + + public DragonsBreathParticle2(Vector2 center, float size) + { + Center = center; + Size = size; + } + + public void Update() + { + // Always slowly shrink the particles. + Size = MathHelper.Clamp(Size - 0.1f, 0f, 200f) * 0.91f; + + // Once sufficiently small, the particles very rapidly shrink. + if (Size < 20f) + Size = Size * 0.8f - 1f; + } + } + + public List Particles + { + get; + private set; + } = new(); + + public override bool AnythingToDraw => Particles.Any(); + + public override IEnumerable Layers + { + get + { + yield return ModContent.Request("CalamityMod/Projectiles/InvisibleProj").Value; + } + } + + public override MetaballDrawLayer DrawContext => MetaballDrawLayer.AfterProjectiles; + + public override void Update() + { + // Update all particle instances. + // Once sufficiently small, they vanish. + for (int i = 0; i < Particles.Count; i++) + Particles[i].Update(); + Particles.RemoveAll(p => p.Size <= 2f); + } + + // Copied from Rancor Lava metaballs, since these need to be additive metaballs. + public override void PrepareShaderForTarget(int layerIndex) + { + // Store the shader in an easy to use local variable. + var metaballShader = CalamityShaders.AdditiveMetaballEdgeShader; + + // Calculate the layer scroll offset. This is used to ensure that the texture contents of the given metaball have parallax, rather than being static over the screen + // regardless of world position. + Vector2 screenSize = new(Main.screenWidth, Main.screenHeight); + + // Supply shader parameter values. + metaballShader.Parameters["screenArea"]?.SetValue(screenSize); + metaballShader.Parameters["layerOffset"]?.SetValue(Vector2.Zero); + metaballShader.Parameters["singleFrameScreenOffset"]?.SetValue(Vector2.Zero); + + // Apply the metaball shader. + metaballShader.CurrentTechnique.Passes[0].Apply(); + } + + public void SpawnParticle(Vector2 position, float size) => Particles.Add(new(position, size)); + + internal void DrawInstancesInternal(float opacity, float whiteSizeThreshold) + { + float pureWhiteIntensity = 0.16f; + Texture2D tex = ModContent.Request("CalamityMod/Graphics/Metaballs/MetaballMessy").Value; + + foreach (DragonsBreathParticle2 particle in Particles) + { + Vector2 drawPosition = particle.Center - Main.screenPosition; + var origin = tex.Size() * 0.5f; + Vector2 scale = Vector2.One * particle.Size / tex.Size(); + + Color drawColor; + if (whiteSizeThreshold >= 0f) + { + float pureWhiteInterpolant = Utils.GetLerpValue(0.8f * whiteSizeThreshold, whiteSizeThreshold, particle.Size, true) * pureWhiteIntensity; + drawColor = Color.Lerp(EdgeColor, Color.White, pureWhiteInterpolant) * opacity; + } + else + drawColor = Color.Lerp(EdgeColor, Color.DarkOrange, Utils.GetLerpValue(60f, 100f, particle.Size, true) * 0.3f); + + Main.spriteBatch.Draw(tex, drawPosition, null, drawColor, 0f, origin, scale, SpriteEffects.None, 0f); + } + } + } +} diff --git a/Items/Weapons/Ranged/DragonsBreath.cs b/Items/Weapons/Ranged/DragonsBreath.cs index e8918c0e10..e2877d9aca 100644 --- a/Items/Weapons/Ranged/DragonsBreath.cs +++ b/Items/Weapons/Ranged/DragonsBreath.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Items.Weapons.Ranged } public override bool CanConsumeAmmo(Item ammo, Player player) => !StrongShotMode && Main.rand.NextFloat() > 0.80f; - public override Vector2? HoldoutOffset() => new Vector2(0, 10.5f); + public override Vector2? HoldoutOffset() => new Vector2(18, 10.5f); public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { @@ -81,6 +81,8 @@ namespace CalamityMod.Items.Weapons.Ranged BetweenShotsPause = 0; Item.reuseDelay = BetweenShotsPause; StrongShotMode = true; + DragonsBreathSetUseTime = 2; + DragonsBreathSetUseAnimation = 2; SoundEngine.PlaySound(ScorchedEarth.ShootSound, player.Center); } } @@ -106,7 +108,9 @@ namespace CalamityMod.Items.Weapons.Ranged WeldingShots = 50; WeldSound?.Stop(); StrongShotMode = false; - } + DragonsBreathSetUseTime = 5; + DragonsBreathSetUseAnimation = 9; + } } return false; } diff --git a/Projectiles/Ranged/BloodBoilerFire.cs b/Projectiles/Ranged/BloodBoilerFire.cs index e2c04c97aa..9696e970b2 100644 --- a/Projectiles/Ranged/BloodBoilerFire.cs +++ b/Projectiles/Ranged/BloodBoilerFire.cs @@ -58,7 +58,8 @@ namespace CalamityMod.Projectiles.Ranged } if (Projectile.timeLeft < 296) // The main visual of the projectile and the blood mist it produces before turning around { - BloodBoilerMetaball.SpawnParticle(Projectile.Center, particleSize * 2); + BloodBoilerMetaball2.SpawnParticle(Projectile.Center, particleSize * 2.3f); + BloodBoilerMetaball.SpawnParticle(Projectile.Center, particleSize * 1.7f); if (Main.rand.NextBool(6) && Projectile.ai[1] == 0f) { diff --git a/Projectiles/Ranged/CosmicFire.cs b/Projectiles/Ranged/CosmicFire.cs index a8b5839d7e..3f2b021786 100644 --- a/Projectiles/Ranged/CosmicFire.cs +++ b/Projectiles/Ranged/CosmicFire.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Ranged public ref float Time => ref Projectile.ai[0]; public ref float BounceHits => ref Projectile.ai[1]; - public Color InnerColor = Color.Turquoise; + public Color InnerColor = Color.LightGreen; public override void SetDefaults() { @@ -38,23 +38,23 @@ namespace CalamityMod.Projectiles.Ranged float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); //used for some drawing prevention for when it's offscreen since it makes a fuck load of particles if (Projectile.timeLeft % 3 == 0 && Time > 12f && targetDist < 1400f) { - AltSparkParticle spark = new AltSparkParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 20, 2.3f, Color.Black); + AltSparkParticle spark = new AltSparkParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 17, 2.3f, Color.Black); GeneralParticleHandler.SpawnParticle(spark); } - if (Time > 12f && targetDist < 1400f) + if (Main.rand.NextBool(3) && Time > 12f && targetDist < 1400f) { - Particle orb = new GenericBloom(Projectile.Center + Main.rand.NextVector2Circular(10, 10), Projectile.velocity * Main.rand.NextFloat(0.05f, 0.5f), Color.Black, Main.rand.NextFloat(0.2f, 0.45f), Main.rand.Next(12, 16), true, false); + Particle orb = new GenericBloom(Projectile.Center + Main.rand.NextVector2Circular(10, 10), Projectile.velocity * Main.rand.NextFloat(0.05f, 0.5f), Color.Black, Main.rand.NextFloat(0.2f, 0.45f), Main.rand.Next(9, 12), true, false); GeneralParticleHandler.SpawnParticle(orb); } if (Projectile.timeLeft % 3 == 0 && Time > 12f && targetDist < 1400f) { - LineParticle spark2 = new LineParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 20, 1.7f, InnerColor); + LineParticle spark2 = new LineParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 17, 1.7f, InnerColor); GeneralParticleHandler.SpawnParticle(spark2); } - if (Time > 12f && targetDist < 1400f) + if (Main.rand.NextBool(3) && Time > 12f && targetDist < 1400f) { - Particle orb2 = new GenericBloom(Projectile.Center + Main.rand.NextVector2Circular(5, 5), Projectile.velocity * Main.rand.NextFloat(0.05f, 0.5f), InnerColor, Main.rand.NextFloat(0.05f, 0.3f), Main.rand.Next(12, 16), true); + Particle orb2 = new GenericBloom(Projectile.Center + Main.rand.NextVector2Circular(5, 5), Projectile.velocity * Main.rand.NextFloat(0.05f, 0.5f), InnerColor, Main.rand.NextFloat(0.05f, 0.3f), Main.rand.Next(9, 12), true); GeneralParticleHandler.SpawnParticle(orb2); } @@ -62,21 +62,22 @@ namespace CalamityMod.Projectiles.Ranged { for (int i = 0; i <= 18; i++) { - Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 191 : Main.rand.NextBool(4) ? 229 : 156, Projectile.velocity); + int dustStyle = Main.rand.NextBool() ? 66 : 263; + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 191 : dustStyle, Projectile.velocity); dust.scale = Main.rand.NextFloat(1.5f, 2.3f); dust.velocity = Projectile.velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.3f, 2.1f); dust.noGravity = true; + dust.color = dust.type == dustStyle ? InnerColor : default; } } if (BounceHits > 0f) { - for (int i = 0; i <= 2; i++) - { - Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(4) ? 229 : 156, -Projectile.velocity); - dust.scale = Main.rand.NextFloat(0.7f, 1.3f); - dust.velocity = -Projectile.velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.3f, 1.7f); - dust.noGravity = true; - } + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(6) ? 278 : 263, -Projectile.velocity); + dust.scale = dust.type == 278 ? Main.rand.NextFloat(0.3f, 0.6f) : Main.rand.NextFloat(0.6f, 1.4f); + dust.velocity = -Projectile.velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.3f, 1.7f); + dust.noGravity = true; + dust.color = InnerColor; + CalamityUtils.HomeInOnNPC(Projectile, false, 600f, 12f, 20f); } } @@ -119,7 +120,6 @@ namespace CalamityMod.Projectiles.Ranged } Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, InnerColor, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0.1f, 0.9f - (BounceHits * 0.25f), 25); GeneralParticleHandler.SpawnParticle(pulse); - Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.MediumSpringGreen, new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0.05f, 0.75f - (BounceHits * 0.25f), 25); if (BounceHits == 0f) SoundEngine.PlaySound(DeadSunsWind.Ricochet, Projectile.Center); diff --git a/Projectiles/Ranged/DeadSunExplosion.cs b/Projectiles/Ranged/DeadSunExplosion.cs index d25f4923bd..9b8f99b9ea 100644 --- a/Projectiles/Ranged/DeadSunExplosion.cs +++ b/Projectiles/Ranged/DeadSunExplosion.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Ranged public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public Player Owner => Main.player[Projectile.owner]; public ref float ExplosionRadius => ref Projectile.ai[0]; - public Color color1 = Color.Turquoise; - public Color color2 = Color.Indigo; + public Color color1 = Color.LightGreen; + public Color color2 = Color.Black; public override void SetDefaults() { //These shouldn't matter because its circular @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Ranged GeneralParticleHandler.SpawnParticle(explosion3); Particle orb = new GenericBloom(Projectile.Center, Projectile.velocity, color1, ExplosionRadius * 0.0085f + 0.05f, 10, true); GeneralParticleHandler.SpawnParticle(orb); - Particle orb2 = new GenericBloom(Projectile.Center, Projectile.velocity, color2, ExplosionRadius * 0.006f + 0.05f, 10, true); + Particle orb2 = new GenericBloom(Projectile.Center, Projectile.velocity, color2, ExplosionRadius * 0.006f + 0.05f, 10, true, true); GeneralParticleHandler.SpawnParticle(orb2); float numberOfDusts = ExplosionRadius * 0.1f + 10; float rotFactor = 360f / numberOfDusts; @@ -50,11 +50,11 @@ namespace CalamityMod.Projectiles.Ranged float rot = MathHelper.ToRadians(i * rotFactor); Vector2 offset = (Vector2.UnitX * Main.rand.NextFloat(ExplosionRadius * 0.2f, 3.1f)).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f)); Vector2 velOffset = (Vector2.UnitX * Main.rand.NextFloat(ExplosionRadius * 0.2f, 3.1f)).RotatedBy(rot * Main.rand.NextFloat(1.1f, 9.1f)); - Dust dust = Dust.NewDustPerfect(Projectile.Center + offset, Main.rand.NextBool(4) ? 229 : Projectile.ai[1] == 5 ? 226 : 156, velOffset); - dust.noGravity = dust.type == 226? false : true; - dust.color = dust.type == 226 ? color1 : default; + Dust dust = Dust.NewDustPerfect(Projectile.Center + offset, Main.rand.NextBool(4) ? 263 : Projectile.ai[1] == 5 ? 278 : 66, velOffset); + dust.noGravity = dust.type == 278? false : true; + dust.color = color1; dust.velocity = velOffset; - dust.scale = dust.type == 226 ? Main.rand.NextFloat(0.7f, 1.3f) : Main.rand.NextFloat(1.6f, 2.2f); + dust.scale = dust.type == 278 ? Main.rand.NextFloat(0.7f, 1.3f) : Main.rand.NextFloat(1.6f, 2.2f); } } diff --git a/Projectiles/Ranged/DragonsBreathFlames.cs b/Projectiles/Ranged/DragonsBreathFlames.cs index b824555d8d..8317d628c5 100644 --- a/Projectiles/Ranged/DragonsBreathFlames.cs +++ b/Projectiles/Ranged/DragonsBreathFlames.cs @@ -17,8 +17,9 @@ namespace CalamityMod.Projectiles.Ranged public int Time = 0; public float beamWidth = 1.1f; public bool beamsize = false; - public float bbbBONUSbeamSizeWOAHH = 60; + public float bbbBONUSbeamSizeWOAHH = 50; public bool postHit = false; + public int beamWeldBloomReduction = 0; public ref int audioCooldown => ref Main.player[Projectile.owner].Calamity().DragonsBreathAudioCooldown; public override void SetDefaults() @@ -29,7 +30,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.DamageType = DamageClass.Ranged; Projectile.ignoreWater = true; Projectile.tileCollide = false; - Projectile.extraUpdates = 5; + Projectile.extraUpdates = 6; Projectile.penetrate = -1; Projectile.timeLeft = 500; Projectile.usesLocalNPCImmunity = true; @@ -54,7 +55,7 @@ namespace CalamityMod.Projectiles.Ranged Time++; if (Projectile.ai[0] == 0) //Fireball Mode { - if (Time == 14) + if (Time == 16) { for (int i = 0; i <= 7; i++) { @@ -83,12 +84,13 @@ namespace CalamityMod.Projectiles.Ranged } if (Time % 5 == 0 && Time > 35f && targetDist < 1400f) { - SparkParticle spark = new SparkParticle(Projectile.Center + Main.rand.NextVector2Circular(1 + (Time * 0.3f), 1 + (Time * 0.3f)), -Projectile.velocity * 0.5f, false, 15, Main.rand.NextFloat(0.3f, 0.5f), Main.rand.NextBool() ? Color.DarkOrange : Color.OrangeRed); + SparkParticle spark = new SparkParticle(Projectile.Center + Main.rand.NextVector2Circular(1 + (Time * 0.3f), 1 + (Time * 0.3f)), -Projectile.velocity * 0.5f, false, 15, Main.rand.NextFloat(0.4f, 0.7f), Main.rand.NextBool() ? Color.DarkOrange : Color.OrangeRed); GeneralParticleHandler.SpawnParticle(spark); } if (targetDist < 1400f) { - ModContent.GetInstance().SpawnParticle(Projectile.Center, Time * Main.rand.NextFloat(0.85f, 0.95f)); + ModContent.GetInstance().SpawnParticle(Projectile.Center, Time * 0.9f); + ModContent.GetInstance().SpawnParticle(Projectile.Center + Projectile.velocity, Time * 0.85f); } Projectile.velocity *= 1.01f; } @@ -96,9 +98,9 @@ namespace CalamityMod.Projectiles.Ranged { if (bbbBONUSbeamSizeWOAHH > 0) bbbBONUSbeamSizeWOAHH -= 0.65f; - Projectile.extraUpdates = 15; + Projectile.extraUpdates = 170; - if (Time > 11) + if (Time > 13) { Dust dust2 = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(8, 8), Main.rand.NextBool(3) ? 162 : 259); dust2.scale = Main.rand.NextFloat(0.3f, 0.5f); @@ -109,10 +111,11 @@ namespace CalamityMod.Projectiles.Ranged } if (targetDist < 1400f) { + ModContent.GetInstance().SpawnParticle(Projectile.Center, beamWidth * 46 + bbbBONUSbeamSizeWOAHH); ModContent.GetInstance().SpawnParticle(Projectile.Center, beamWidth * 45 + bbbBONUSbeamSizeWOAHH); } } - if (Time == 11) + if (Time == 13) { for (int i = 0; i <= 4; i++) { @@ -135,46 +138,45 @@ namespace CalamityMod.Projectiles.Ranged { if (Projectile.ai[0] == 1) { - if (!postHit) + if (beamWeldBloomReduction < 3) { if (audioCooldown == 0) { SoundEngine.PlaySound(DragonsBreath.WeldingBurn, Projectile.Center); audioCooldown = 12; } - float OrbSize = Main.rand.NextFloat(0.5f, 0.8f); + float OrbSize = Main.rand.NextFloat(0.5f, 0.8f) - beamWeldBloomReduction * 0.14f; Particle orb = new GenericBloom(target.Center, Vector2.Zero, Color.OrangeRed, OrbSize + 0.6f, 8, true); GeneralParticleHandler.SpawnParticle(orb); Particle orb2 = new GenericBloom(target.Center, Vector2.Zero, Color.White, OrbSize + 0.2f, 8, true); GeneralParticleHandler.SpawnParticle(orb2); - for (int i = 0; i < 3; i++) + if (!postHit) { - Vector2 SpawnPosition = target.Center + Main.rand.NextVector2Circular(target.width, target.height) * 0.04f; - Vector2 splatterDirection = (Projectile.Center - SpawnPosition).SafeNormalize(Vector2.UnitY); - int sparkLifetime = Main.rand.Next(22, 36); - float sparkScale = Main.rand.NextFloat(0.8f, 1.3f); - Color sparkColor = Main.rand.NextBool(4) ? Color.OrangeRed : Color.Orange; - Vector2 sparkVelocity = splatterDirection.RotatedByRandom(0.6f) * Main.rand.NextFloat(12f, 25f); - SparkParticle spark = new SparkParticle(target.Center, sparkVelocity, true, sparkLifetime, sparkScale, sparkColor); - GeneralParticleHandler.SpawnParticle(spark); + for (int i = 0; i < 3; i++) + { + Vector2 SpawnPosition = target.Center + Main.rand.NextVector2Circular(target.width, target.height) * 0.04f; + Vector2 splatterDirection = (Projectile.Center - SpawnPosition).SafeNormalize(Vector2.UnitY); + int sparkLifetime = Main.rand.Next(22, 36); + float sparkScale = Main.rand.NextFloat(0.8f, 1.3f); + Color sparkColor = Main.rand.NextBool(4) ? Color.OrangeRed : Color.Orange; + Vector2 sparkVelocity = splatterDirection.RotatedByRandom(0.6f) * Main.rand.NextFloat(12f, 25f); + SparkParticle spark = new SparkParticle(target.Center, sparkVelocity, true, sparkLifetime, sparkScale, sparkColor); + GeneralParticleHandler.SpawnParticle(spark); + } + postHit = true; } - postHit = true; + beamWeldBloomReduction++; } target.AddBuff(ModContent.BuffType(), 420); } else if (!postHit) { - for (int i = 0; i <= 3; i++) + for (int i = 0; i <= 6; i++) { - Vector2 dustyVelocity = new Vector2(0, -3.5f); - Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 293 : 174); - dust.scale = Main.rand.NextFloat(0.8f, 1.75f); - dust.velocity = dustyVelocity.RotatedByRandom(0.6f) * Main.rand.NextFloat(0.3f, 0.8f); - dust.noGravity = false; - Dust dust2 = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 293 : 174); - dust2.scale = Main.rand.NextFloat(1.1f, 1.9f); - dust2.velocity = dustyVelocity.RotatedByRandom(0.07f) * Main.rand.NextFloat(0.8f, 2.1f); - dust2.noGravity = false; + Dust dust = Dust.NewDustPerfect(Projectile.position - Projectile.velocity * 0.5f, Main.rand.NextBool(3) ? 293 : 174, Projectile.velocity.RotatedByRandom(MathHelper.ToRadians(15f)) * Main.rand.NextFloat(0.5f, 3.5f), 0, default, Main.rand.NextFloat(1.6f, 2.3f)); + dust.noGravity = true; + Dust dust2 = Dust.NewDustPerfect(Projectile.position - Projectile.velocity * 0.5f, Main.rand.NextBool(3) ? 293 : 174, Projectile.velocity.RotatedByRandom(MathHelper.ToRadians(5f)) * Main.rand.NextFloat(0.8f, 5.8f), 0, default, Main.rand.NextFloat(1.6f, 2.3f)); + dust2.noGravity = true; } postHit = true; } diff --git a/Projectiles/Ranged/DragonsBreathMag.cs b/Projectiles/Ranged/DragonsBreathMag.cs index 250f8cdd37..0908d58da1 100644 --- a/Projectiles/Ranged/DragonsBreathMag.cs +++ b/Projectiles/Ranged/DragonsBreathMag.cs @@ -44,6 +44,7 @@ namespace CalamityMod.Projectiles.Ranged } public override void AI() { + Projectile.extraUpdates = 0; Time++; Player Owner = Main.player[Projectile.owner]; if (!TouchedGrass) @@ -64,11 +65,15 @@ namespace CalamityMod.Projectiles.Ranged { if (Main.zenithWorld) { - for (int i = 0; i <= 40; i++) + for (int i = 0; i <= 30; i++) { SparkParticle spark1 = new SparkParticle(Projectile.Center, new Vector2(4, 4).RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 2.8f), false, 45, 1.4f, Main.rand.NextBool(4) ? Color.Orange : Color.OrangeRed); GeneralParticleHandler.SpawnParticle(spark1); } + Particle explosion = new DetailedExplosion(Projectile.Center, Vector2.Zero, Color.DarkOrange, Vector2.One, Main.rand.NextFloat(-5, 5), 0f, 2.8f, 33); + GeneralParticleHandler.SpawnParticle(explosion); + Particle explosion2 = new DetailedExplosion(Projectile.Center, Vector2.Zero, Color.OrangeRed, Vector2.One, Main.rand.NextFloat(-5, 5), 0f, 3f, 33, false); + GeneralParticleHandler.SpawnParticle(explosion2); } target.AddBuff(ModContent.BuffType(), 20); } diff --git a/Projectiles/Ranged/PhotovisceratorHoldout.cs b/Projectiles/Ranged/PhotovisceratorHoldout.cs index df5342ed9a..05976bce42 100644 --- a/Projectiles/Ranged/PhotovisceratorHoldout.cs +++ b/Projectiles/Ranged/PhotovisceratorHoldout.cs @@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.Ranged public void LeftClickAttack(Vector2 armPosition, Vector2 verticalOffset) { - if (Time == 1 || Time % 59 == 0) + if (Time == 1 || Time % 55 == 0) { PhotoUseSound = SoundEngine.PlaySound(Photoviscerator.UseSound, Projectile.Center); } From a885f17416d914cb0c59bb9b86eb350b6c073462 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 6 Nov 2023 22:21:28 -0500 Subject: [PATCH 81/95] Merchants named Morshu drop Gel, Rope and Bombs on death. --- NPCs/CalamityGlobalNPCLoot.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 87a1085474..20316021c8 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -846,6 +846,16 @@ namespace CalamityMod.NPCs hardmode.Add(ModContent.ItemType()); break; + // Merchant + // 20-30 Gel, 30-50 Rope & 10-15 Bombs @ 100% IF named "Morshu" + case NPCID.Merchant: + LeadingConditionRule morshuLCR = new LeadingConditionRule(DropHelper.If((info) => info.npc.GivenName == "Morshu", false)); + morshuLCR.Add(ItemID.Gel, 1, 20, 30, true); // lamp oil? + morshuLCR.Add(ItemID.Rope, 1, 30, 50, true); // rope? + morshuLCR.Add(ItemID.Bomb, 1, 10, 15, true); // bombs? you want it? + npcLoot.Add(morshuLCR); // it's yours, my friend + break; + // Angler // Golden Fishing Rod @ 100% IF fed to a Trasher // OTHERWISE, From 1725796f5238615e11ae2a18f92ccdd860e2121b Mon Sep 17 00:00:00 2001 From: Xyk Date: Mon, 6 Nov 2023 21:24:09 -0800 Subject: [PATCH 82/95] Miracle blight updated visual --- Buffs/DamageOverTime/MiracleBlight.cs | 51 +++++++++++---------------- 1 file changed, 21 insertions(+), 30 deletions(-) diff --git a/Buffs/DamageOverTime/MiracleBlight.cs b/Buffs/DamageOverTime/MiracleBlight.cs index 55f3f790de..1fee9f02c9 100644 --- a/Buffs/DamageOverTime/MiracleBlight.cs +++ b/Buffs/DamageOverTime/MiracleBlight.cs @@ -44,27 +44,21 @@ namespace CalamityMod.Buffs.DamageOverTime if (Main.rand.NextBool(2)) { - DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Calamity().RandomDebuffVisualSpot, Vector2.Zero, Main.rand.NextBool(3) ? Color.White : sparkColor, new Vector2(1, 1), 0, Main.rand.NextFloat(0.09f, 0.17f), 0f, 25); - GeneralParticleHandler.SpawnParticle(pulse); + Dust dust = Dust.NewDustPerfect(Player.Calamity().RandomDebuffVisualSpot, 278, CalamityUtils.RandomVelocity(100f, 70f, 150f, 0.04f)); + dust.noGravity = true; + dust.scale = Main.rand.NextFloat(0.7f, 0.85f); + dust.color = sparkColor * 0.45f; } - float numberOfDusts = 3f; + float numberOfDusts = 1f; float rotFactor = 360f / numberOfDusts; - if (Player.miscCounter % 5 == 0) + for (int i = 0; i < numberOfDusts; i++) { - for (int i = 0; i < numberOfDusts; i++) - { - float rot = MathHelper.ToRadians(i * rotFactor); - Vector2 offset = new Vector2(0.3f, 0).RotatedBy(rot * Main.rand.NextFloat(0.2f, 0.3f)); - Vector2 velOffset = CalamityUtils.RandomVelocity(100f, 70f, 150f, 0.04f); - Dust dust = Dust.NewDustPerfect(Player.Calamity().RandomDebuffVisualSpot + offset, 278, new Vector2(velOffset.X, velOffset.Y)); - dust.noGravity = true; - dust.velocity = velOffset; - velOffset *= 10; - dust.position = Player.Center - velOffset; - dust.scale = Main.rand.NextFloat(0.7f, 0.8f); - dust.color = Main.rand.NextBool(3) ? Color.White : sparkColor; - } + float rot = MathHelper.ToRadians(i * rotFactor); + Vector2 velOffset = CalamityUtils.RandomVelocity(100f, 70f, 150f, 0.04f); + velOffset *= Main.rand.NextFloat(2, 13); + SquishyLightParticle exoEnergy = new(Player.Center + Player.velocity * 3 + velOffset * 1.5f, -velOffset * 0.25f, 0.3f, sparkColor, 8); + GeneralParticleHandler.SpawnParticle(exoEnergy); } } @@ -79,28 +73,25 @@ namespace CalamityMod.Buffs.DamageOverTime _ => Color.LawnGreen, }; - if (Main.rand.NextBool(2)) + if (Main.rand.NextBool(3)) { - DirectionalPulseRing pulse = new DirectionalPulseRing(npcSize, Vector2.Zero, Main.rand.NextBool(3) ? Color.White : sparkColor, new Vector2(1, 1), 0, 0.18f + (0.0000007f * npc.width * npc.height), 0f, 30); - GeneralParticleHandler.SpawnParticle(pulse); + Dust dust = Dust.NewDustPerfect(npcSize, 278, CalamityUtils.RandomVelocity(100f, 70f, 150f, 0.04f)); + dust.noGravity = true; + dust.scale = Main.rand.NextFloat(0.7f, 0.85f) + (0.0000007f * npc.width * npc.height); + dust.color = sparkColor * 0.45f; } - float numberOfDusts = 2f; + float numberOfDusts = 1f; float rotFactor = 360f / numberOfDusts; - if (Main.rand.NextBool(5)) + if (Main.rand.NextBool()) { for (int i = 0; i < numberOfDusts; i++) { float rot = MathHelper.ToRadians(i * rotFactor); - Vector2 offset = new Vector2(0.3f, 0).RotatedBy(rot * Main.rand.NextFloat(0.2f, 0.3f)); Vector2 velOffset = CalamityUtils.RandomVelocity(100f, 70f, 150f, 0.04f); - Dust dust = Dust.NewDustPerfect(npc.Center + offset, 278, new Vector2(velOffset.X, velOffset.Y)); - dust.noGravity = true; - dust.velocity = velOffset; - velOffset *= 10 + (0.0003f * npc.width * npc.height); - dust.position = npc.Center - velOffset; - dust.scale = Main.rand.NextFloat(0.7f, 0.8f); - dust.color = Main.rand.NextBool(3) ? Color.White : sparkColor; + velOffset *= Main.rand.NextFloat(1, 9) + (0.0002f * npc.width * npc.height); + SquishyLightParticle exoEnergy = new(npc.Center + npc.velocity * 3 + velOffset * 1.5f, -velOffset * 0.25f, 0.3f, sparkColor, 8); + GeneralParticleHandler.SpawnParticle(exoEnergy); } } } From 08512b80b2a0870e6dbbfd31a0f9fe1733af9af5 Mon Sep 17 00:00:00 2001 From: Xyk Date: Mon, 6 Nov 2023 23:55:54 -0800 Subject: [PATCH 83/95] Havocs Breath and elf melter range increase (small) Havocs breath now works like a shotgun flamethrower --- Items/CalamityGlobalItemTweaks.cs | 2 +- Items/Weapons/Ranged/HavocsBreath.cs | 15 +++++++++++++-- .../Mods.CalamityMod.Items.Weapons.Ranged.hjson | 2 +- Projectiles/Ranged/BrimstoneFireFriendly.cs | 11 ++++++----- Projectiles/Ranged/ExoFlareCluster.cs | 4 ++-- 5 files changed, 23 insertions(+), 11 deletions(-) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 2fd416ead4..42f94f8953 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -93,7 +93,7 @@ namespace CalamityMod.Items { ItemID.DemonScythe, Do(AutoReuse, DamageExact(33)) }, { ItemID.DyeTradersScimitar, Do(AutoReuse, UseTurn, DamageExact(24)) }, // Exotic Scimitar { ItemID.ElectrosphereLauncher, Do(DamageRatio(1.1f)) }, - { ItemID.ElfMelter, Do(DamageExact(62), ShootSpeedDelta(+3f)) }, + { ItemID.ElfMelter, Do(DamageExact(62), ShootSpeedDelta(+5f)) }, { ItemID.EmeraldStaff, Do(DamageExact(27)) }, { ItemID.EmpressBlade, Do(AutoReuse, DamageExact(60), UseExact(20)) }, // Terraprisma { ItemID.EnchantedBoomerang, Do(DamageExact(24)) }, diff --git a/Items/Weapons/Ranged/HavocsBreath.cs b/Items/Weapons/Ranged/HavocsBreath.cs index 24ef2416fa..dd8addabd2 100644 --- a/Items/Weapons/Ranged/HavocsBreath.cs +++ b/Items/Weapons/Ranged/HavocsBreath.cs @@ -1,6 +1,7 @@ using CalamityMod.Projectiles.Ranged; using Microsoft.Xna.Framework; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -12,12 +13,13 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public override void SetDefaults() { - Item.damage = 67; + Item.damage = 60; Item.DamageType = DamageClass.Ranged; Item.width = 50; Item.height = 18; Item.useTime = 5; - Item.useAnimation = 30; + Item.useAnimation = 35; + Item.reuseDelay = 20; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 1.5f; @@ -32,5 +34,14 @@ namespace CalamityMod.Items.Weapons.Ranged } public override Vector2? HoldoutOffset() => new Vector2(-10, 0); + + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + for (int i = 0; i <= 2; i++) + { + Projectile.NewProjectile(source, position + velocity * 4f, velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.9f, 1.25f), type, damage , knockback, player.whoAmI); + } + return false; + } } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index ccf8c50343..36ea78440e 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -580,7 +580,7 @@ HavocsBreath: { DisplayName: Havoc's Breath Tooltip: ''' - Fires scorching brimstone fire + Fires a cone of scorching brimstone fire Uses gel for ammo ''' } diff --git a/Projectiles/Ranged/BrimstoneFireFriendly.cs b/Projectiles/Ranged/BrimstoneFireFriendly.cs index e6cfdccb05..8271e32a81 100644 --- a/Projectiles/Ranged/BrimstoneFireFriendly.cs +++ b/Projectiles/Ranged/BrimstoneFireFriendly.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Ranged public new string LocalizationCategory => "Projectiles.Ranged"; public override string Texture => "CalamityMod/Projectiles/FireProj"; - public static int Lifetime => 90; + public static int Lifetime => 60; public static int Fadetime => 80; public ref float Time => ref Projectile.ai[0]; public int MistType = -1; @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.MaxUpdates = 3; Projectile.timeLeft = Lifetime; Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 8; + Projectile.idStaticNPCHitCooldown = 6; } public override void AI() @@ -85,12 +85,13 @@ namespace CalamityMod.Projectiles.Ranged target.AddBuff(ModContent.BuffType(), 240); // Gas up the enemy - int smokeCount = 4 + (int)MathHelper.Clamp(target.width * 0.1f, 0f, 20f); + int smokeCount = 3 + (int)MathHelper.Clamp(target.width * 0.1f, 0f, 20f); for (int i = 0; i < smokeCount; i++) { + bool Smoketype = Main.rand.NextBool(); Vector2 smokePos = target.Center + Main.rand.NextVector2Circular(target.width * 0.5f, target.height * 0.5f); - Vector2 smokeVel = Vector2.UnitY * Main.rand.NextFloat(-2.4f, -0.8f) * MathHelper.Clamp(target.height * 0.1f, 1f, 10f); - Particle smoke = new MediumMistParticle(smokePos, smokeVel, new Color(255, 50, 50), Color.DimGray, Main.rand.NextFloat(1f, 2f), 245 - Main.rand.Next(50), 0.1f); + Vector2 smokeVel = Vector2.UnitY * (Smoketype ? Main.rand.NextFloat(-0.8f, -2f) : Main.rand.NextFloat(-1.2f, -0.2f)) * MathHelper.Clamp(target.height * 0.1f, 1f, 10f); + Particle smoke = new MediumMistParticle(smokePos, smokeVel, new Color(255, 50, 50), Color.DimGray, Smoketype ? Main.rand.NextFloat(0.4f, 0.75f) : Main.rand.NextFloat(1.5f, 2f), 220 - Main.rand.Next(50), 0.1f); GeneralParticleHandler.SpawnParticle(smoke); } } diff --git a/Projectiles/Ranged/ExoFlareCluster.cs b/Projectiles/Ranged/ExoFlareCluster.cs index adb0333236..516b68c5a6 100644 --- a/Projectiles/Ranged/ExoFlareCluster.cs +++ b/Projectiles/Ranged/ExoFlareCluster.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Ranged }; PhotoMetaball.SpawnParticle(Projectile.Center, 90); PhotoMetaball2.SpawnParticle(Projectile.Center, 85); - CalamityUtils.HomeInOnNPC(Projectile, false, 600f, 12f, 20f); + CalamityUtils.HomeInOnNPC(Projectile, true, 600f, 12f, 20f); } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { @@ -81,9 +81,9 @@ namespace CalamityMod.Projectiles.Ranged } public override bool OnTileCollide(Vector2 oldVelocity) { - SoundEngine.PlaySound(DeadSunsWind.Ricochet with { Volume = 1.2f }, Projectile.Center); if (!PostTileHit) { + SoundEngine.PlaySound(DeadSunsWind.Ricochet with { Volume = 1.2f }, Projectile.Center); float numberOflines = 25; float rotFactorlines = 360f / numberOflines; for (int i = 0; i < numberOflines; i++) From 79e650329b523917b2c64d47fe848a6de01402ae Mon Sep 17 00:00:00 2001 From: HaguriHat Date: Tue, 7 Nov 2023 23:07:37 -0300 Subject: [PATCH 84/95] Fixed a small typo on the Mechs Lore Item Draedon was misnamed as "Dreadon" --- Localization/en-US/Mods.CalamityMod.Items.Lore.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Lore.hjson b/Localization/en-US/Mods.CalamityMod.Items.Lore.hjson index 7698133d95..795e1dbee6 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Lore.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Lore.hjson @@ -407,7 +407,7 @@ LoreMechs: { These unwieldy beasts of steel were the experiments of Draedon, my former colleague and prodigious engineer. His intent was to fuel a war machine with soul energy, allowing it to fight with purpose and zeal. The creations were a success, perhaps too much of one as the souls continued to express their own free will. - Dreadon was displeased with the results. However these were my soldiers with their loyalty forged anew in iron. + Draedon was displeased with the results. However these were my soldiers with their loyalty forged anew in iron. I dismissed them from duty, yet they linger here still. Scouring the land for evidence of the divine. Unfortunately for you that puts you in their crosshairs. Give them a battle worth dying in. ''' From 1aa4169d959aed25c7ae4edc642059c756ab6592 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Tue, 7 Nov 2023 21:35:03 -0800 Subject: [PATCH 85/95] boss rush is no longer hardcoded to end with scal --- Events/BossRushEvent.cs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Events/BossRushEvent.cs b/Events/BossRushEvent.cs index 286fb4bede..9b420d00f5 100644 --- a/Events/BossRushEvent.cs +++ b/Events/BossRushEvent.cs @@ -442,13 +442,6 @@ namespace CalamityMod.Events { CalamityUtils.KillAllHostileProjectiles(); HostileProjectileKillCounter = 3; - - // Mark Boss Rush as complete - DownedBossSystem.downedBossRush = true; - CalamityNetcode.SyncWorld(); - - if (Main.netMode != NetmodeID.MultiplayerClient) - Projectile.NewProjectile(Source, npc.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Main.myPlayer); } }; } @@ -744,7 +737,19 @@ namespace CalamityMod.Events HostileProjectileKillCounter = 3; if (BossDeathEffects.ContainsKey(npc.type)) + { BossDeathEffects[npc.type].Invoke(npc); + } + + if (npc.type == Bosses[Bosses.Count -1].EntityID) + { + // Mark Boss Rush as complete + DownedBossSystem.downedBossRush = true; + CalamityNetcode.SyncWorld(); + + if (Main.netMode != NetmodeID.MultiplayerClient) + Projectile.NewProjectile(Source, npc.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Main.myPlayer); + } } // Sync the stage and progress of Boss Rush whenever a relevant boss dies. From 11ab1c8db2006a3a599b5456d75a16191103c097 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Tue, 7 Nov 2023 22:19:27 -0800 Subject: [PATCH 86/95] removed luminite planet debug text --- World/Planets/LuminitePlanet.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/World/Planets/LuminitePlanet.cs b/World/Planets/LuminitePlanet.cs index b4a5b1d977..41ab36fe85 100644 --- a/World/Planets/LuminitePlanet.cs +++ b/World/Planets/LuminitePlanet.cs @@ -23,7 +23,6 @@ namespace CalamityMod.World.Planets var config = WorldGenConfiguration.FromEmbeddedPath("Terraria.GameContent.WorldBuilding.Configuration.json"); int totalPlanetoidsToGenerate = Main.maxTilesX / 1200 + 2; - Main.NewText("Tiles total: " + Main.maxTilesX); for (int i = 0; i < totalPlanetoidsToGenerate; i++) { for (int tries = 0; tries < 15000; tries++) @@ -39,7 +38,6 @@ namespace CalamityMod.World.Planets if (config.CreateBiome().Place(planetoidOrigin, GenVars.structures)) break; } - Main.NewText("Success"); } } } From 8912d0aa1c4f4b173a1e6b89bafd702b2c2bdac8 Mon Sep 17 00:00:00 2001 From: HaguriHat Date: Wed, 8 Nov 2023 19:59:24 -0300 Subject: [PATCH 87/95] Small typo fix on Perfs Lore Item --- Localization/en-US/Mods.CalamityMod.Items.Lore.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Lore.hjson b/Localization/en-US/Mods.CalamityMod.Items.Lore.hjson index 795e1dbee6..b08c49fe33 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Lore.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Lore.hjson @@ -430,7 +430,7 @@ LorePerforators: { DisplayName: The Perforators and Their Hive Lore: ''' - These creatures were unique. They wielded the slain Gods' power are purely as possible, veins flowing with spilt ichor. + These creatures were unique. They wielded the slain Gods' power as purely as possible, veins flowing with spilt ichor. All that exists in the Crimson is truly the divine turned inside out; their gore now glistens with perverse treachery for all to bear witness. The mire reeks of centuries of vile manipulation and callous domination of the hapless. Judgment has long passed and only extinction is left waiting. From 8a736dd9bf575198f6e1e324a804654c3839212b Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 8 Nov 2023 22:51:29 -0500 Subject: [PATCH 88/95] Cirrus Candle resprites --- Tiles/Furniture/BlueCandle.cs | 6 +++--- Tiles/Furniture/BlueCandle.png | Bin 793 -> 478 bytes Tiles/Furniture/PinkCandle.cs | 6 +++--- Tiles/Furniture/PinkCandle.png | Bin 809 -> 476 bytes Tiles/Furniture/PurpleCandle.cs | 6 +++--- Tiles/Furniture/PurpleCandle.png | Bin 297 -> 526 bytes Tiles/Furniture/YellowCandle.cs | 6 +++--- Tiles/Furniture/YellowCandle.png | Bin 712 -> 555 bytes 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Tiles/Furniture/BlueCandle.cs b/Tiles/Furniture/BlueCandle.cs index d9a694883b..e174008003 100644 --- a/Tiles/Furniture/BlueCandle.cs +++ b/Tiles/Furniture/BlueCandle.cs @@ -17,12 +17,12 @@ namespace CalamityMod.Tiles.Furniture Main.tileLighted[Type] = true; Main.tileFrameImportant[Type] = true; Main.tileLavaDeath[Type] = true; - TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); TileObjectData.addTile(Type); AdjTiles = new int[] { TileID.Candles }; AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch); AddMapEntry(new Color(238, 145, 105), CalamityUtils.GetItemName()); - AnimationFrameHeight = 34; + AnimationFrameHeight = 18; } public override void AnimateTile(ref int frame, ref int frameCounter) @@ -30,7 +30,7 @@ namespace CalamityMod.Tiles.Furniture frameCounter++; if (frameCounter >= 6) { - frame = (frame + 1) % 6; + frame = (frame + 1) % 5; frameCounter = 0; } } diff --git a/Tiles/Furniture/BlueCandle.png b/Tiles/Furniture/BlueCandle.png index db4aea46c88c1ad53f5c796b4694b6cf772dd3fd..5fe20f8f8bc62d4ec95308398b2999a0d228fbc1 100644 GIT binary patch delta 465 zcmbQqc8__2czqNH8v_HwMuThFK#H+A$lZxy-8q?;Kn_c~qpu@Ss-OE$A}f&3S>O>_ z%)r2R7=#&*=dVZsY4CJ$42f`0mMA#DvGifW$M66DJAOI3xctB$Iq^^)(-RGxUcr10 zW`}dsSp(iM?fJ*d=#=QRk-I>u;OYPK{}p)ZpFU!l(%zW;Dr$r7rAJN)jrR`)CCvKz z*4TiT**|_C^W}d2vrL!G^WL$vvp&_^uz{O>_kqi&(ox~gjrd72Miwc?bGFIYgG4_Z#1-8u#a2fp1u1~7KWpG5-kf-&c6lP`BaGIumaD6 zrQB!k|Ej;Hm0)+*E0yPRV(J3LxWoNHH`_+?L2-Dc`_w z_7w9X#&y@EkLor2?hfc|;SM;@YS3`c?NVaO@z+A9yx`XGraAon#K3kTS8|7)Fpq%N z%nWfh&T~Zx|9;BnB+N?tdMKl_ zMbSX9kW*>>z^e#F59&>nS}0Y73SI=gds7eViE>VH~YH~||kaPI(oo%78G zta&h5@Y9iuZt&@gpVsO@$FSppyKphsMZM3>rr+mU-5iUaJ!r4M3$_k0p2r){cjlWa z_%FGi7oP%fXy$yR;nc2*1Msp`0l?c>v*SVXa&p;RXoR<--bX=QT)lH2fRksYjfP95 zvUY#(+7&w{jvveZ2EF!fmh`R02~}E*qIBhQJA?|G8+7TS2pH9uROtu z2W~Lq?A(OjQWuY`t_R6f&=G^hOSk&#firRR6adxLm2J(+J-heXc@jl!Eby?oX*78A zQKgQ?57zj=HMDH}7bZY1iYu(n1>=)AJQVGj{n;2)V}GL~ON)h756l=A^1D4w%w=;u zRgi-9KnO($1%yyQ2u0+}L@3&5e5?94OUrTXA8f<6e|(^I_Sc#@U&-DsPM8!2geg`^ z>qad0JTL~K@!~oF-3TTH>wyr85DEyPfDp>gP**-sHuHn#-p0xY#vKdm9+)a{+FPF= z90>Mb`+pA6dkj?H?mpgfnfP`vv@jnS^&EhO*7Ko{f{IIg&q4Oz7q3Wi>D`0%;;dio zP)4hH*gfK36i#aeK0Nck3Mq0)!+IcuB7}kv3J9U>47FBb!&wZ?ChQ$L{{4e)O7s3f zCm-mFg%4C`J?JMNs3^CMh69~va>5kfSDw+S!+!u|_wUp4e}4Y~Ky~G{9S@S15Q-2A z2%&%w3PkfkBo`>9fDe*aD50oxtCIzD!C3e}b7dr>^Fo^vIt5azw@%DzvNsoky6|>W zwfr~L&m&p$zzrjmM)9`a^4N{wD0l$t#o5%nu?V3Ep&*0;LMQ-#0A(&zV5gPvqW}N^ N00>D%PDHLkV1g;Fb2I<| diff --git a/Tiles/Furniture/PinkCandle.cs b/Tiles/Furniture/PinkCandle.cs index 7c7c674b71..fd4a947066 100644 --- a/Tiles/Furniture/PinkCandle.cs +++ b/Tiles/Furniture/PinkCandle.cs @@ -17,12 +17,12 @@ namespace CalamityMod.Tiles.Furniture Main.tileLighted[Type] = true; Main.tileFrameImportant[Type] = true; Main.tileLavaDeath[Type] = true; - TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); TileObjectData.addTile(Type); AdjTiles = new int[] { TileID.Candles }; AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch); AddMapEntry(new Color(238, 145, 105), CalamityUtils.GetItemName()); - AnimationFrameHeight = 34; + AnimationFrameHeight = 18; } public override void AnimateTile(ref int frame, ref int frameCounter) @@ -30,7 +30,7 @@ namespace CalamityMod.Tiles.Furniture frameCounter++; if (frameCounter >= 6) { - frame = (frame + 1) % 6; + frame = (frame + 1) % 5; frameCounter = 0; } } diff --git a/Tiles/Furniture/PinkCandle.png b/Tiles/Furniture/PinkCandle.png index a74d8acee84b3381917df82a0791b0c6987c63b4..e22cef9737c4bfd03d1ee94e1643b226451f5f91 100644 GIT binary patch delta 463 zcmV;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--git a/Tiles/Furniture/PurpleCandle.cs b/Tiles/Furniture/PurpleCandle.cs index 99e312788f..232603c410 100644 --- a/Tiles/Furniture/PurpleCandle.cs +++ b/Tiles/Furniture/PurpleCandle.cs @@ -17,12 +17,12 @@ namespace CalamityMod.Tiles.Furniture Main.tileLighted[Type] = true; Main.tileFrameImportant[Type] = true; Main.tileLavaDeath[Type] = true; - TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); TileObjectData.addTile(Type); AdjTiles = new int[] { TileID.Candles }; AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch); AddMapEntry(new Color(238, 145, 105), CalamityUtils.GetItemName()); - AnimationFrameHeight = 34; + AnimationFrameHeight = 18; } public override void AnimateTile(ref int frame, ref int frameCounter) @@ -30,7 +30,7 @@ namespace CalamityMod.Tiles.Furniture frameCounter++; if (frameCounter >= 6) { - frame = (frame + 1) % 6; + frame = (frame + 1) % 5; frameCounter = 0; } } diff --git a/Tiles/Furniture/PurpleCandle.png b/Tiles/Furniture/PurpleCandle.png index e8c72dee6dbbb2bdf01bade9664f0f14d06b583e..41e2f749a3ee5f3ef41dfb83bf8c9c66a75951b1 100644 GIT binary patch delta 513 zcmV+c0{;D}0*(Zb7k^p^1^@s6u`t$a00001b5ch_0Itp)=>Px#1ZP1_K>z@;j|==^ z1poj532;bRa{vGi!vFvd!vV){sAK>D0i#JoK~z{r?U%hv!$2H{lVW%42SU5}MM2!e zf{s$q#Yx?q92{H}bns6Qg$nw2=pb|wiencQm!OEP4kjR0>wn_nVC3GrU$jYMl)JQo z_ds}(G`)KX*O#l&c1&T9gUu(Gc{1IFYd>Y@8D7}##&;9AlE9=H=kqDtAe_rUIFMO0 z8$O6H!A9|1oN;#d$D2lyPay2!9={`zF?<4l5ik_ZY14EU(t=! z0z%h$*j`Ef9!dDuyE8&v0%Cpj6iEuRW4I=$Bjf8t!g}9G#?2IDPA3A-GUOBJM$(P+ zC-DBUL^V$s@+(m|up1+2$3h&I>ahAwB&d-He>26OfN-lNoJ`eesm*!q8lmpMly^KCF4ioe*3e^00000NkvXXu0mjf DeXZso delta 283 zcmeBUS;;g(y#5RaGXn#I@5RgPKuRvaC&U#x;Tb-biSQ-k*`^She4NP_W%EfwU1gJ zSmt^qMQyM8PWF(hPQT0Xj2$WrGC?cco}|_c*yH zTwcd@xNG&Evog#+&B(~Q=fZ|2H||S27a8WBp11tP$^apwunV=UwyeLqA|2B&{6C(u eW`S1?gNU(+e5;FK!$+X&89ZJ6T-G@yGywpXvV1oH diff --git a/Tiles/Furniture/YellowCandle.cs b/Tiles/Furniture/YellowCandle.cs index 1df561d340..54779eadf4 100644 --- a/Tiles/Furniture/YellowCandle.cs +++ b/Tiles/Furniture/YellowCandle.cs @@ -15,11 +15,11 @@ namespace CalamityMod.Tiles.Furniture Main.tileLighted[Type] = true; Main.tileFrameImportant[Type] = true; Main.tileLavaDeath[Type] = true; - TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2); + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); TileObjectData.addTile(Type); AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch); AddMapEntry(new Color(238, 145, 105), CalamityUtils.GetItemName()); - AnimationFrameHeight = 34; + AnimationFrameHeight = 18; } public override void AnimateTile(ref int frame, ref int frameCounter) @@ -27,7 +27,7 @@ namespace CalamityMod.Tiles.Furniture frameCounter++; if (frameCounter >= 6) { - frame = (frame + 1) % 6; + frame = (frame + 1) % 5; frameCounter = 0; } } diff --git a/Tiles/Furniture/YellowCandle.png b/Tiles/Furniture/YellowCandle.png index 3bc79d5a42bf76e4a312c679625f9f6bb259933c..74f2a263aa4587a0b9f9bd65f4b6af6ccef719c3 100644 GIT binary patch delta 543 zcmV+)0^t3~1*-&*7k^p^1^@s6u`t$a00001b5ch_0Itp)=>Px#1ZP1_K>z@;j|==^ z1poj532;bRa{vGi!vFvd!vV){sAK>D0l-N_K~z{r?U=tx!%!H-QwM1`5kUhYT2U7f z1UErk)lO}F0Q(9qE<#5~pFkhLwo_YuflhAH!7A22h_xW%mVa&)PI4~hi?LvC$}@5wFS;Y+O8NqB1YOUr%l6eRL@>bJib^Yq`SRd#l>J_q$e(>rtNHP@i2V#()B zp9A6)^FAkEM;FjSHU}k_^$PCQ=b*i}hm{u&?lFGPw4gK96)5+hbL~LWwVEaehqjHC z7iXt&VRO>e#(!rQN*-R_ackT)U44Gj0eR@)#V??GUduxt!-sNVr$G9_1UFlIj3 z$%OA7eGbA_Boin5P?Ja|k$xkxgZNRkKv?%Ok!0V%PJbox9;j7hHA=#|Hhm75h0Fog zzwF8+`Wz7UN~v-cWA;do=Sxsx63HaePa->rpFk~yF|-aPe$*axdVM@2lSm>v6B2n3 z)ND*;z9$m%)@BlEL=q`}R5cR$))w~th(!Ju)T}af&nji8%!A>5$&$U1#K~o#`ZLia hQgDKiOBf`}`UVP9Vcz$F&RhTh002ovPDHLkV1jk_@Xr7M delta 701 zcmV;u0z&<(1jq%D7k|tM1^@s6dJiKt0007yNklCbWJAb2RWE^;h4;=ttW@gp^>^(Y~IN;^fH~?F=Z}nsxglA#;=4oe#C+`=W z@rirS5OL5I59~a6EEaj3=qR^?>Jzm523H%m%5~rk@7V#so4HT%r*Wb-ZmP*#iK^A0 z=KHQ4sl<68uHtVd(-?@llXuW$Bvb46151n6Jz;A7UVjj`2g(sjm@$~yjGVJ)njA}H zru+`BKmQ59<)Q9W1Fk&%4Je^RrG%n{BI2O>1WG8X)uEPuecQ-mn zrDgJ9E6fLR0!ttjXM+3=PCfhvz{JV5sh$T)C`u@xgyM2kJzyxI{1;Co)jtqQb4RLv zkR^ek)qhn1gwoN*hRs1ss)pj2*{ Date: Wed, 8 Nov 2023 21:00:57 -0800 Subject: [PATCH 89/95] Pristine Fury visual change uses more oranges and beam are a bit smaller, lots of small visual changes but everything is mechanically identical No changes were made to secondary fire --- Items/Weapons/Ranged/PristineFury.cs | 16 ++++++++-- Projectiles/Ranged/PristineFire.cs | 45 ++++++++++++++++++++-------- 2 files changed, 46 insertions(+), 15 deletions(-) diff --git a/Items/Weapons/Ranged/PristineFury.cs b/Items/Weapons/Ranged/PristineFury.cs index 92b3e04119..5d7a5297f2 100644 --- a/Items/Weapons/Ranged/PristineFury.cs +++ b/Items/Weapons/Ranged/PristineFury.cs @@ -1,4 +1,5 @@ -using CalamityMod.Projectiles.Ranged; +using CalamityMod.Particles; +using CalamityMod.Projectiles.Ranged; using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -15,6 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged public int frameCounter = 0; public int frame = 0; public static int BaseDamage = 70; + public bool Trail = true; public override void SetStaticDefaults() { @@ -61,7 +63,17 @@ namespace CalamityMod.Items.Weapons.Ranged } } else - Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); + { + Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, Trail ? 1 : 0); + Trail = !Trail; + for (int i = 0; i <= 2; i++) + { + Dust dust = Dust.NewDustPerfect(position + velocity * 3f + new Vector2(0, -3), 158, velocity.RotatedBy(0.25f * player.direction).RotatedByRandom(0.35f) * Main.rand.NextFloat(0.5f, 2.5f), 0, default, Main.rand.NextFloat(1.6f, 2f)); + dust.noGravity = true; + } + CritSpark spark = new CritSpark(position + velocity * 3f + new Vector2(0, -3), velocity.RotatedBy(0.25f * player.direction).RotatedByRandom(0.25f) * Main.rand.NextFloat(0.2f, 1.8f), Main.rand.NextBool() ? Color.DarkOrange : Color.OrangeRed, Color.OrangeRed, 0.9f, 18, 2f, 1.9f); + GeneralParticleHandler.SpawnParticle(spark); + } return false; } diff --git a/Projectiles/Ranged/PristineFire.cs b/Projectiles/Ranged/PristineFire.cs index 6af51601ef..66e34181a0 100644 --- a/Projectiles/Ranged/PristineFire.cs +++ b/Projectiles/Ranged/PristineFire.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; using CalamityMod.Particles; using Microsoft.Xna.Framework; @@ -25,6 +25,7 @@ namespace CalamityMod.Projectiles.Ranged ProjectileID.Sets.TrailingMode[Type] = 2; } + public float smokeOpa = 0.25f; public override void SetDefaults() { Projectile.width = Projectile.height = 6; @@ -38,13 +39,19 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { - Projectile.rotation = Projectile.velocity.ToRotation(); - Lighting.AddLight(Projectile.Center, 1f, 1f, 0.25f); + if (Projectile.timeLeft < 118) + { + if (smokeOpa > 0) + smokeOpa -= 0.02f; - // Light smoke - Color smokeColor = new Color(255, Main.rand.Next(160, 230 + 1), 100, 100); - Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, smokeColor, 16, Main.rand.NextFloat(0.6f, 1.2f), 0.2f, glowing: true); - GeneralParticleHandler.SpawnParticle(smoke); + Lighting.AddLight(Projectile.Center, 1f, 1f, 0.25f); + + // Light smoke + Color smokeColor = new Color(255, Main.rand.Next(160, 230 + 1), 100, 100); + Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity.RotatedByRandom(smokeOpa * 10) * (Main.rand.NextFloat(0.4f, 0.65f) - smokeOpa), smokeColor, 16, Main.rand.NextFloat(0.6f, 1.2f), 0.2f + smokeOpa, glowing: true); + GeneralParticleHandler.SpawnParticle(smoke); + } + Projectile.rotation = Projectile.velocity.ToRotation(); } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 240); @@ -57,19 +64,31 @@ namespace CalamityMod.Projectiles.Ranged Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 10; Projectile.Damage(); + + LineParticle spark = new LineParticle(Projectile.Center, -Projectile.velocity.RotatedBy(Main.rand.NextFloat(0.23f, 0.56f)) * Main.rand.NextFloat(0.4f, 2.5f), false, 8, 1.2f, Main.rand.NextBool() ? Color.Orange : Color.DarkOrange); + GeneralParticleHandler.SpawnParticle(spark); + LineParticle spark2 = new LineParticle(Projectile.Center, -Projectile.velocity.RotatedBy(Main.rand.NextFloat(-0.23f, -0.56f)) * Main.rand.NextFloat(0.4f, 2.5f), false, 8, 1.2f, Main.rand.NextBool() ? Color.Orange : Color.DarkOrange); + GeneralParticleHandler.SpawnParticle(spark2); - // Big poofy column - for (int i = 0; i < 10; i++) + for (int i = 0; i <= 3; i++) { + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool() ? 169 : 158, new Vector2(5, 5).RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 1.5f), 0, default, Main.rand.NextFloat(1.6f, 2.2f)); + dust.noGravity = true; + dust.fadeIn = 0.5f; + } + // Big poofy column + for (int i = 0; i < 7; i++) + { + float velMulti = Main.rand.NextFloat(0.1f, 1.8f); Vector2 smokePos = Projectile.Center + Main.rand.NextVector2Circular(32f, 32f); - Vector2 smokeVel = Vector2.UnitY * Main.rand.NextFloat(-24f, -4f); - Particle smoke = new MediumMistParticle(smokePos, smokeVel, new Color(255, 220, 100), Color.Black, Main.rand.NextFloat(0.6f, 1.6f), 225 - Main.rand.Next(60), 0.1f); + Vector2 smokeVel = Vector2.UnitY * Main.rand.NextFloat(-12f, -8f) * velMulti; + Particle smoke = new MediumMistParticle(smokePos, smokeVel, Main.rand.NextBool() ? Color.Orange : Color.DarkOrange, Color.Black, Main.rand.NextFloat(0.7f, 1.9f) - velMulti, 225 - Main.rand.Next(60), 0.1f); GeneralParticleHandler.SpawnParticle(smoke); } } - public float HelixTrailWidthFunction(float completionRatio) => Utils.GetLerpValue(1f, 0.4f, completionRatio, true) * 2.5f; - public Color HelixTrailColorFunction(float completionRatio) => new Color(255, 220, 100) * (1f - completionRatio); + public float HelixTrailWidthFunction(float completionRatio) => Utils.GetLerpValue(1f, 0.4f, completionRatio, true) * 1.5f; + public Color HelixTrailColorFunction(float completionRatio) => Projectile.timeLeft < 105 ? Projectile.ai[0] == 1 ? Color.DarkOrange * (1f - completionRatio) : Color.Orange * (1f - completionRatio) : Color.Transparent; public override bool PreDraw(ref Color lightColor) { From 7563336b9118da1d01d488fb95a58989e29855a8 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 9 Nov 2023 11:37:45 -0500 Subject: [PATCH 90/95] Fixed all instances of defining DrawYOffset before copying tile data from a template. --- Tiles/Abyss/AbyssAmbient/MassiveRarePearl.cs | 15 ++---- Tiles/Abyss/AbyssAmbient/PirateCrate.cs | 38 +++++++-------- Tiles/Abyss/AbyssalPots.cs | 48 +++++++++---------- Tiles/Abyss/SteamGeyser.cs | 3 +- .../Rubblemaker/Abyss/MassiveRarePearlEcho.cs | 7 ++- .../Rubblemaker/SunkenSea/MediumCoralEcho.cs | 3 +- .../SunkenSea/SmallWideCoralEcho.cs | 12 ++--- Tiles/SunkenSea/MediumCoral.cs | 3 +- Tiles/SunkenSea/SmallWideCoral.cs | 10 +--- 9 files changed, 57 insertions(+), 82 deletions(-) diff --git a/Tiles/Abyss/AbyssAmbient/MassiveRarePearl.cs b/Tiles/Abyss/AbyssAmbient/MassiveRarePearl.cs index de8a52d827..6d4267dfa0 100644 --- a/Tiles/Abyss/AbyssAmbient/MassiveRarePearl.cs +++ b/Tiles/Abyss/AbyssAmbient/MassiveRarePearl.cs @@ -1,14 +1,9 @@ -using CalamityMod.Projectiles.Environment; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework; using Terraria; -using Terraria.Audio; -using Terraria.ID; using Terraria.DataStructures; -using Terraria.Enums; +using Terraria.ID; using Terraria.ModLoader; using Terraria.ObjectData; -using System; namespace CalamityMod.Tiles.Abyss.AbyssAmbient { @@ -20,8 +15,8 @@ namespace CalamityMod.Tiles.Abyss.AbyssAmbient Main.tileLavaDeath[Type] = true; Main.tileWaterDeath[Type] = false; Main.tileNoAttach[Type] = true; - TileObjectData.newTile.DrawYOffset = 2; TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.DrawYOffset = 2; TileObjectData.addTile(Type); AddMapEntry(new Color(106, 80, 102)); DustType = 33; @@ -30,9 +25,9 @@ namespace CalamityMod.Tiles.Abyss.AbyssAmbient } public override void KillMultiTile(int i, int j, int frameX, int frameY) - { + { if (Main.rand.NextBool(5)) - Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 32, ItemID.PinkPearl); + Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 32, ItemID.PinkPearl); else Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 32, ItemID.WhitePearl); } diff --git a/Tiles/Abyss/AbyssAmbient/PirateCrate.cs b/Tiles/Abyss/AbyssAmbient/PirateCrate.cs index 65c3282f0c..23d9edf593 100644 --- a/Tiles/Abyss/AbyssAmbient/PirateCrate.cs +++ b/Tiles/Abyss/AbyssAmbient/PirateCrate.cs @@ -1,15 +1,11 @@ -using CalamityMod.Projectiles.Environment; -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; -using Terraria.ID; using Terraria.DataStructures; -using Terraria.Enums; -using Terraria.Localization; +using Terraria.ID; using Terraria.ModLoader; using Terraria.ObjectData; -using System; namespace CalamityMod.Tiles.Abyss.AbyssAmbient { @@ -22,8 +18,8 @@ namespace CalamityMod.Tiles.Abyss.AbyssAmbient Main.tileLavaDeath[Type] = true; Main.tileWaterDeath[Type] = false; Main.tileNoAttach[Type] = true; - TileObjectData.newTile.DrawYOffset = 2; TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; TileObjectData.addTile(Type); AddMapEntry(new Color(97, 69, 52), CalamityUtils.GetText("Tiles.PirateCrate")); DustType = DustID.WoodFurniture; @@ -33,11 +29,11 @@ namespace CalamityMod.Tiles.Abyss.AbyssAmbient } public override void KillMultiTile(int i, int j, int frameX, int frameY) - { + { //explode when broken (troll!) //also instakill players in for the worthy Vector2 spawnPosition = new(i * 16f + 24f, j * 16f - 4f); - Projectile.NewProjectile(new EntitySource_WorldEvent(), spawnPosition.X, spawnPosition.Y, 0, 0, ProjectileID.Explosives, Main.getGoodWorld ? 99999 : 130, 0f); + Projectile.NewProjectile(new EntitySource_WorldEvent(), spawnPosition.X, spawnPosition.Y, 0, 0, ProjectileID.Explosives, Main.getGoodWorld ? 99999 : 130, 0f); } public override void NumDust(int i, int j, bool fail, ref int num) @@ -48,10 +44,10 @@ namespace CalamityMod.Tiles.Abyss.AbyssAmbient public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { Tile tile = Framing.GetTileSafely(i, j); - Texture2D tex = ModContent.Request("CalamityMod/Tiles/Abyss/AbyssAmbient/PirateCrate1Glow").Value; - Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange, Main.offScreenRange); + Texture2D tex = ModContent.Request("CalamityMod/Tiles/Abyss/AbyssAmbient/PirateCrate1Glow").Value; + Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange, Main.offScreenRange); - spriteBatch.Draw(tex, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White); + spriteBatch.Draw(tex, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White); } } @@ -60,10 +56,10 @@ namespace CalamityMod.Tiles.Abyss.AbyssAmbient public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { Tile tile = Framing.GetTileSafely(i, j); - Texture2D tex = ModContent.Request("CalamityMod/Tiles/Abyss/AbyssAmbient/PirateCrate2Glow").Value; - Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange, Main.offScreenRange); + Texture2D tex = ModContent.Request("CalamityMod/Tiles/Abyss/AbyssAmbient/PirateCrate2Glow").Value; + Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange, Main.offScreenRange); - spriteBatch.Draw(tex, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White); + spriteBatch.Draw(tex, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White); } } @@ -72,10 +68,10 @@ namespace CalamityMod.Tiles.Abyss.AbyssAmbient public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { Tile tile = Framing.GetTileSafely(i, j); - Texture2D tex = ModContent.Request("CalamityMod/Tiles/Abyss/AbyssAmbient/PirateCrate3Glow").Value; - Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange, Main.offScreenRange); + Texture2D tex = ModContent.Request("CalamityMod/Tiles/Abyss/AbyssAmbient/PirateCrate3Glow").Value; + Vector2 zero = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange, Main.offScreenRange); - spriteBatch.Draw(tex, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White); + spriteBatch.Draw(tex, new Vector2(i * 16, j * 16 + 2) - Main.screenPosition + zero, new Rectangle(tile.TileFrameX, tile.TileFrameY, 16, 16), Color.White); } } @@ -88,8 +84,8 @@ namespace CalamityMod.Tiles.Abyss.AbyssAmbient Main.tileLavaDeath[Type] = true; Main.tileWaterDeath[Type] = false; Main.tileNoAttach[Type] = true; - TileObjectData.newTile.DrawYOffset = 2; TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; TileObjectData.addTile(Type); AddMapEntry(new Color(97, 69, 52), CalamityUtils.GetText("Tiles.PirateCrate")); DustType = DustID.WoodFurniture; @@ -99,9 +95,9 @@ namespace CalamityMod.Tiles.Abyss.AbyssAmbient } public override void KillMultiTile(int i, int j, int frameX, int frameY) - { + { if (Main.rand.NextBool()) - Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 32, ItemID.GoldCoin, Main.rand.Next(1, 2)); + Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 32, ItemID.GoldCoin, Main.rand.Next(1, 2)); Item.NewItem(new EntitySource_TileBreak(i, j), i * 16, j * 16, 32, 32, ItemID.SilverCoin, Main.rand.Next(45, 75)); } diff --git a/Tiles/Abyss/AbyssalPots.cs b/Tiles/Abyss/AbyssalPots.cs index 15ad3b67e2..5b54a5cdf0 100644 --- a/Tiles/Abyss/AbyssalPots.cs +++ b/Tiles/Abyss/AbyssalPots.cs @@ -1,6 +1,6 @@ -using CalamityMod.Items.TreasureBags.MiscGrabBags; +using System.Collections.Generic; +using CalamityMod.Items.TreasureBags.MiscGrabBags; using Microsoft.Xna.Framework; -using System.Collections.Generic; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -21,8 +21,8 @@ namespace CalamityMod.Tiles.Abyss Main.tileSpelunker[Type] = true; Main.tileCut[Type] = true; - TileObjectData.newTile.DrawYOffset = 2; TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; TileObjectData.addTile(Type); AddMapEntry(new Color(47, 79, 79), Language.GetText("MapObject.Pot")); // dark slate gray DustType = 29; @@ -35,28 +35,28 @@ namespace CalamityMod.Tiles.Abyss if (tileAtPosition.TileFrameX % 36 == 0 && tileAtPosition.TileFrameY % 36 == 0) { if (Main.netMode != NetmodeID.Server) - { - int goreAmt = Main.rand.Next(1, 2 + 1); - for (int k = 0; k < goreAmt; k++) - { - Gore.NewGore(new EntitySource_TileBreak(i, j), new Vector2(i, j) * 16, Main.rand.NextVector2CircularEdge(3f, 3f), Mod.Find("AbyssPotGore1").Type); - Gore.NewGore(new EntitySource_TileBreak(i, j), new Vector2(i, j) * 16, Main.rand.NextVector2CircularEdge(3f, 3f), Mod.Find("AbyssPotGore2").Type); - } - } + { + int goreAmt = Main.rand.Next(1, 2 + 1); + for (int k = 0; k < goreAmt; k++) + { + Gore.NewGore(new EntitySource_TileBreak(i, j), new Vector2(i, j) * 16, Main.rand.NextVector2CircularEdge(3f, 3f), Mod.Find("AbyssPotGore1").Type); + Gore.NewGore(new EntitySource_TileBreak(i, j), new Vector2(i, j) * 16, Main.rand.NextVector2CircularEdge(3f, 3f), Mod.Find("AbyssPotGore2").Type); + } + } - // 1 in 400 for a Coin Portal - if (Player.GetClosestRollLuck(i, j, 400) == 0f) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - Projectile.NewProjectile(new EntitySource_TileBreak(i, j), i * 16 + 16, j * 16 + 16, 0f, -12f, ProjectileID.CoinPortal, 0, 0f, Main.myPlayer); - } - // Followed by a 1 in 4 for a bomb in For The Worthy worlds - else if (Main.getGoodWorld && Main.rand.NextBool(4)) - Projectile.NewProjectile(new EntitySource_TileBreak(i, j), i * 16 + 16, j * 16 + 8, (float)Main.rand.Next(-100, 101) * 0.002f, 0f, ProjectileID.Bomb, 0, 0f, Player.FindClosest(new Vector2(i * 16, j * 16), 16, 16)); - else - yield return new Item(ModContent.ItemType()); - } - } + // 1 in 400 for a Coin Portal + if (Player.GetClosestRollLuck(i, j, 400) == 0f) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + Projectile.NewProjectile(new EntitySource_TileBreak(i, j), i * 16 + 16, j * 16 + 16, 0f, -12f, ProjectileID.CoinPortal, 0, 0f, Main.myPlayer); + } + // Followed by a 1 in 4 for a bomb in For The Worthy worlds + else if (Main.getGoodWorld && Main.rand.NextBool(4)) + Projectile.NewProjectile(new EntitySource_TileBreak(i, j), i * 16 + 16, j * 16 + 8, (float)Main.rand.Next(-100, 101) * 0.002f, 0f, ProjectileID.Bomb, 0, 0f, Player.FindClosest(new Vector2(i * 16, j * 16), 16, 16)); + else + yield return new Item(ModContent.ItemType()); + } + } public override bool CreateDust(int i, int j, ref int type) { diff --git a/Tiles/Abyss/SteamGeyser.cs b/Tiles/Abyss/SteamGeyser.cs index 62dd12742a..c745770cd0 100644 --- a/Tiles/Abyss/SteamGeyser.cs +++ b/Tiles/Abyss/SteamGeyser.cs @@ -4,7 +4,6 @@ using CalamityMod.Projectiles.Environment; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; -using Terraria.Localization; using Terraria.ModLoader; using Terraria.ObjectData; @@ -19,8 +18,8 @@ namespace CalamityMod.Tiles.Abyss { Main.tileFrameImportant[Type] = true; Main.tileNoAttach[Type] = true; - TileObjectData.newTile.DrawYOffset = 2; TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; TileObjectData.addTile(Type); AddMapEntry(new Color(103, 65, 64), CalamityUtils.GetText($"{LocalizationCategory}.SteamGeyser.MapEntry")); DustType = (int)CalamityDusts.SulfurousSeaAcid; diff --git a/Tiles/Rubblemaker/Abyss/MassiveRarePearlEcho.cs b/Tiles/Rubblemaker/Abyss/MassiveRarePearlEcho.cs index cc9bb319fe..9a12c0cc2e 100644 --- a/Tiles/Rubblemaker/Abyss/MassiveRarePearlEcho.cs +++ b/Tiles/Rubblemaker/Abyss/MassiveRarePearlEcho.cs @@ -1,9 +1,8 @@ using Microsoft.Xna.Framework; using Terraria; -using Terraria.ID; -using Terraria.DataStructures; -using Terraria.ModLoader; using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; using Terraria.ObjectData; namespace CalamityMod.Tiles.Rubblemaker.Abyss @@ -17,8 +16,8 @@ namespace CalamityMod.Tiles.Rubblemaker.Abyss Main.tileLavaDeath[Type] = true; Main.tileWaterDeath[Type] = false; Main.tileNoAttach[Type] = true; - TileObjectData.newTile.DrawYOffset = 2; TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.DrawYOffset = 2; TileObjectData.addTile(Type); AddMapEntry(new Color(106, 80, 102)); DustType = 33; diff --git a/Tiles/Rubblemaker/SunkenSea/MediumCoralEcho.cs b/Tiles/Rubblemaker/SunkenSea/MediumCoralEcho.cs index cd95f01c3f..2583c0c2f7 100644 --- a/Tiles/Rubblemaker/SunkenSea/MediumCoralEcho.cs +++ b/Tiles/Rubblemaker/SunkenSea/MediumCoralEcho.cs @@ -1,6 +1,5 @@ using Microsoft.Xna.Framework; using Terraria; -using Terraria.Audio; using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; @@ -17,8 +16,8 @@ namespace CalamityMod.Tiles.Rubblemaker.SunkenSea Main.tileLavaDeath[Type] = true; Main.tileWaterDeath[Type] = false; Main.tileNoAttach[Type] = true; - TileObjectData.newTile.DrawYOffset = 2; TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; TileObjectData.addTile(Type); AddMapEntry(new Color(233, 132, 58)); DustType = DustID.Coralstone; diff --git a/Tiles/Rubblemaker/SunkenSea/SmallWideCoralEcho.cs b/Tiles/Rubblemaker/SunkenSea/SmallWideCoralEcho.cs index 5ee30cd7be..61a47c4125 100644 --- a/Tiles/Rubblemaker/SunkenSea/SmallWideCoralEcho.cs +++ b/Tiles/Rubblemaker/SunkenSea/SmallWideCoralEcho.cs @@ -1,15 +1,9 @@ -using CalamityMod.Projectiles.Environment; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework; using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.DataStructures; -using Terraria.Enums; using Terraria.GameContent; +using Terraria.ID; using Terraria.ModLoader; using Terraria.ObjectData; -using System; namespace CalamityMod.Tiles.Rubblemaker.SunkenSea { @@ -22,8 +16,8 @@ namespace CalamityMod.Tiles.Rubblemaker.SunkenSea Main.tileLavaDeath[Type] = true; Main.tileWaterDeath[Type] = false; Main.tileNoAttach[Type] = true; - TileObjectData.newTile.DrawYOffset = 2; TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.DrawYOffset = 2; TileObjectData.addTile(Type); AddMapEntry(new Color(137, 154, 71)); DustType = DustID.Coralstone; diff --git a/Tiles/SunkenSea/MediumCoral.cs b/Tiles/SunkenSea/MediumCoral.cs index 90399e6c3f..0b81d79d94 100644 --- a/Tiles/SunkenSea/MediumCoral.cs +++ b/Tiles/SunkenSea/MediumCoral.cs @@ -1,6 +1,5 @@ using Microsoft.Xna.Framework; using Terraria; -using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; using Terraria.ObjectData; @@ -15,8 +14,8 @@ namespace CalamityMod.Tiles.SunkenSea Main.tileLavaDeath[Type] = true; Main.tileWaterDeath[Type] = false; Main.tileNoAttach[Type] = true; - TileObjectData.newTile.DrawYOffset = 2; TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.DrawYOffset = 2; TileObjectData.addTile(Type); AddMapEntry(new Color(233, 132, 58)); DustType = DustID.Coralstone; diff --git a/Tiles/SunkenSea/SmallWideCoral.cs b/Tiles/SunkenSea/SmallWideCoral.cs index 45408576e0..f0c524f145 100644 --- a/Tiles/SunkenSea/SmallWideCoral.cs +++ b/Tiles/SunkenSea/SmallWideCoral.cs @@ -1,14 +1,8 @@ -using CalamityMod.Projectiles.Environment; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework; using Terraria; -using Terraria.Audio; using Terraria.ID; -using Terraria.DataStructures; -using Terraria.Enums; using Terraria.ModLoader; using Terraria.ObjectData; -using System; namespace CalamityMod.Tiles.SunkenSea { @@ -20,8 +14,8 @@ namespace CalamityMod.Tiles.SunkenSea Main.tileLavaDeath[Type] = true; Main.tileWaterDeath[Type] = false; Main.tileNoAttach[Type] = true; - TileObjectData.newTile.DrawYOffset = 2; TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.DrawYOffset = 2; TileObjectData.addTile(Type); AddMapEntry(new Color(137, 154, 71)); DustType = DustID.Coralstone; From 4c888bba5bac52ff51b4866cd29db222286fd7e4 Mon Sep 17 00:00:00 2001 From: JavyzTaken <36089970+JavyzTaken@users.noreply.github.com> Date: Thu, 9 Nov 2023 22:56:07 +0100 Subject: [PATCH 91/95] Several bugfixes. (#5) * Several bugfixes: -Desert Prowler and Wulfrum set bonuses now work correctly with the vanilla "Activate Set Bonuses" setting, that allows you to choose whether to activate them by doubletapping up or down. Related bug report: https://discord.com/channels/225030931008847874/1158173634280558744 -Fixed Cryogen's shield counting towards NPC limit and despawning offscreen. Related bug report: https://discord.com/channels/225030931008847874/1166534631458345080 -Fixed Calamity spear projectiles lingering into chained switched item uses. Related bug report: https://discord.com/channels/225030931008847874/1165360766539538432 -Made sure every On_ and IL_ hook is unloaded manually, since testing has verified TML's auto-unloading does not work consistently and properly. --------- Co-authored-by: Jack --- Items/Armor/DesertProwler/DesertProwlerSet.cs | 5 +++-- Items/Armor/Wulfrum/WulfrumSet.cs | 7 ++++--- Items/BaseItems/HeldOnlyItem.cs | 1 - Items/Materials/WulfrumMetalScrap.cs | 1 + .../en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson | 4 ++-- NPCs/Cryogen/CryogenShield.cs | 3 +++ Projectiles/BaseProjectiles/BaseSpearProjectile.cs | 5 +++-- 7 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Items/Armor/DesertProwler/DesertProwlerSet.cs b/Items/Armor/DesertProwler/DesertProwlerSet.cs index c65a5bc236..36bb5313e7 100644 --- a/Items/Armor/DesertProwler/DesertProwlerSet.cs +++ b/Items/Armor/DesertProwler/DesertProwlerSet.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Items.Armor.DesertProwler private void ActivateSetBonus(Terraria.On_Player.orig_KeyDoubleTap orig, Player player, int keyDir) { - if (keyDir == 0 && HasArmorSet(player) && !player.mount.Active) + if (keyDir == (Main.ReversedUpDownArmorSetBonuses ? 1 : 0) && HasArmorSet(player) && !player.mount.Active) { // The set bonus can only be activated if the player does not have the cooldown. if (!player.Calamity().cooldowns.TryGetValue(SandsmokeBomb.ID, out CooldownInstance cd)) @@ -166,7 +166,8 @@ namespace CalamityMod.Items.Armor.DesertProwler if (setBonusIndex != -1) { - TooltipLine setBonus1 = new TooltipLine(item.Mod, "CalamityMod:SetBonus1", CalamityUtils.GetTextValueFromModItem("AbilityBrief")); + string dir = Main.ReversedUpDownArmorSetBonuses ? "UP" : "DOWN"; + TooltipLine setBonus1 = new TooltipLine(item.Mod, "CalamityMod:SetBonus1", CalamityUtils.GetTextFromModItem("AbilityBrief").Format(dir)); setBonus1.OverrideColor = Color.Lerp(new Color(255, 229, 156), new Color(233, 225, 198), 0.5f + 0.5f * (float)Math.Sin(Main.GlobalTimeWrappedHourly * 3f)); tooltips.Insert(setBonusIndex + 1, setBonus1); diff --git a/Items/Armor/Wulfrum/WulfrumSet.cs b/Items/Armor/Wulfrum/WulfrumSet.cs index 4329df01e5..bcfb75ee28 100644 --- a/Items/Armor/Wulfrum/WulfrumSet.cs +++ b/Items/Armor/Wulfrum/WulfrumSet.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Items.Armor.Wulfrum private void ActivateSetBonus(Terraria.On_Player.orig_KeyDoubleTap orig, Player player, int keyDir) { - if (keyDir == 0 && HasArmorSet(player) && !player.mount.Active) + if (keyDir == (Main.ReversedUpDownArmorSetBonuses ? 1 : 0) && HasArmorSet(player) && !player.mount.Active) { //Only activate if no cooldown & available scrap. if (player.Calamity().cooldowns.TryGetValue(WulfrumBastion.ID, out CooldownInstance cd)) @@ -84,7 +84,7 @@ namespace CalamityMod.Items.Armor.Wulfrum else if (player.HasItem(ModContent.ItemType())) { player.ConsumeItem(ModContent.ItemType()); - //I Thiiiinnnk there's no need to add mp syncing packets sicne cooldowns get auto synced right. + //I Thiiiinnnk there's no need to add mp syncing packets since cooldowns get auto synced right. player.AddCooldown(WulfrumBastion.ID, BastionCooldown + BastionTime); //Though do i need to sync that or is the player inventory auto synced? DummyCannon.SetDefaults(ItemType()); @@ -228,7 +228,8 @@ namespace CalamityMod.Items.Armor.Wulfrum if (setBonusIndex != -1) { - TooltipLine setBonus1 = new TooltipLine(item.Mod, "CalamityMod:SetBonus1", CalamityUtils.GetTextValueFromModItem("AbilityBrief")); + string dir = Main.ReversedUpDownArmorSetBonuses ? "UP" : "DOWN"; + TooltipLine setBonus1 = new TooltipLine(item.Mod, "CalamityMod:SetBonus1", CalamityUtils.GetTextFromModItem("AbilityBrief").Format(dir)); setBonus1.OverrideColor = Color.Lerp(new Color(194, 255, 67), new Color(112, 244, 244), 0.5f + 0.5f * (float)Math.Sin(Main.GlobalTimeWrappedHourly * 3f)); tooltips.Insert(setBonusIndex + 1, setBonus1); diff --git a/Items/BaseItems/HeldOnlyItem.cs b/Items/BaseItems/HeldOnlyItem.cs index 5acf595f35..80ddb78e85 100644 --- a/Items/BaseItems/HeldOnlyItem.cs +++ b/Items/BaseItems/HeldOnlyItem.cs @@ -22,7 +22,6 @@ namespace CalamityMod.Items.BaseItems Terraria.UI.On_ItemSlot.LeftClick_ItemArray_int_int += LockMouseToSpecialItem; Terraria.UI.On_ItemSlot.Draw_SpriteBatch_ItemArray_int_int_Vector2_Color += DrawSpecial; } - private void DrawSpecial(Terraria.UI.On_ItemSlot.orig_Draw_SpriteBatch_ItemArray_int_int_Vector2_Color orig, SpriteBatch sb, Item[] inv, int context, int slot, Vector2 position, Color color) { if (inv[slot].ModItem is HeldOnlyItem && !(inv[slot].ModItem as HeldOnlyItem).VisibleInUI) diff --git a/Items/Materials/WulfrumMetalScrap.cs b/Items/Materials/WulfrumMetalScrap.cs index 0cd885b9fe..5752684df2 100644 --- a/Items/Materials/WulfrumMetalScrap.cs +++ b/Items/Materials/WulfrumMetalScrap.cs @@ -68,6 +68,7 @@ namespace CalamityMod.Items.Materials } public override void Load() => Terraria.On_Item.CanFillEmptyAmmoSlot += AvoidDefaultingToAmmoSlot; + private bool AvoidDefaultingToAmmoSlot(Terraria.On_Item.orig_CanFillEmptyAmmoSlot orig, Item self) { if (self.type == Type) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson index cad61ccd6c..37fa7981d0 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson @@ -59,7 +59,7 @@ DesertProwlerHat: { DisplayName: Desert Prowler Hat Tooltip: 4% increased ranged critical strike chance and 20% chance to not consume ammo SetBonus: Ranged attacks deal an extra {0} flat damage - AbilityBrief: Sandsmoke Bomb - Double tap DOWN to shroud yourself in a small cloud of sand + AbilityBrief: Sandsmoke Bomb - Double tap {0} to shroud yourself in a small cloud of sand AbilityDescription: ''' While the sand cloud is active, gain increased mobility but heavily reduced defense @@ -296,7 +296,7 @@ WulfrumHat: { Comes equipped with hair extensions ''' SetBonus: +1 max minion - AbilityBrief: Wulfrum Bastion - Double tap DOWN while dismounted to equip wulfrum power armor + AbilityBrief: Wulfrum Bastion - Double tap {0} while dismounted to equip wulfrum power armor AbilityDescription: ''' While the armor is active, you can only use the integrated fusion cannon, but your defensive stats are increased diff --git a/NPCs/Cryogen/CryogenShield.cs b/NPCs/Cryogen/CryogenShield.cs index b751db94af..14829471a0 100644 --- a/NPCs/Cryogen/CryogenShield.cs +++ b/NPCs/Cryogen/CryogenShield.cs @@ -16,6 +16,9 @@ namespace CalamityMod.NPCs.Cryogen { public static readonly SoundStyle BreakSound = new("CalamityMod/Sounds/NPCKilled/CryogenShieldBreak"); + //Don't count towards NPC limit and don't despawn offscreen. + public override bool CheckActive() => false; + public override void SetStaticDefaults() { this.HideFromBestiary(); diff --git a/Projectiles/BaseProjectiles/BaseSpearProjectile.cs b/Projectiles/BaseProjectiles/BaseSpearProjectile.cs index f4bbf765b8..40219fe0b0 100644 --- a/Projectiles/BaseProjectiles/BaseSpearProjectile.cs +++ b/Projectiles/BaseProjectiles/BaseSpearProjectile.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; @@ -66,7 +66,8 @@ namespace CalamityMod.Projectiles.BaseProjectiles } // If at the end of the animation, kill the projectile. - if (player.itemAnimation == 0) + //Checking if == 0 is too late, lets the projectile linger into chained item uses. + if (player.itemAnimation <= 1) Projectile.Kill(); Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2 + MathHelper.PiOver4; From 633ec00c3b700b36524468fe1068deb97adb2141 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 10 Nov 2023 12:29:18 -0500 Subject: [PATCH 92/95] Polterplasm resprite --- Items/Materials/Polterplasm.cs | 6 +++--- Items/Materials/Polterplasm.png | Bin 15664 -> 1391 bytes 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Items/Materials/Polterplasm.cs b/Items/Materials/Polterplasm.cs index b976bece02..6a55c5c4f0 100644 --- a/Items/Materials/Polterplasm.cs +++ b/Items/Materials/Polterplasm.cs @@ -14,15 +14,15 @@ namespace CalamityMod.Items.Materials public override void SetStaticDefaults() { Item.ResearchUnlockCount = 25; - Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 5)); + Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 6)); ItemID.Sets.AnimatesAsSoul[Type] = true; ItemID.Sets.SortingPriorityMaterials[Type] = 110; } public override void SetDefaults() { - Item.width = 12; - Item.height = 12; + Item.width = 24; + Item.height = 52; Item.maxStack = 9999; Item.value = Item.sellPrice(gold: 1); Item.rare = ItemRarityID.Purple; diff --git a/Items/Materials/Polterplasm.png b/Items/Materials/Polterplasm.png index e80d69386db85cc5517519b026549532f44e1c2d..eacff5f4f7d94180447a840ca64cf550eb80c060 100644 GIT binary patch literal 1391 zcmV-#1(5oQP)Px)DM>^@RCt{2ojr_AK@`W&v#X#Xq1cVY(mk;XrD#^`Ba|DJMg%oB(QG3jY7`ok zD2b1jMwALGbgV>n3!BhT__&Ju{%`mG?>q0z-Itwnhxs+@&Ye5=oH=vm<9KsNBy~EW z8Gnr(EY@C+|9&0x?53s?HN}*I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zH}$T3!{f?#Z-_jbhqrglq==!Oai4od)^;zaHas8lT^IlAivN@kXe{l9tr%1ib(rc_ z?&*86Pu_;Dw^XKieg7F(S?k{|p=U)fv6J{IM1Q7BdUBM}*C*v!<*Td Date: Fri, 10 Nov 2023 13:10:32 -0500 Subject: [PATCH 93/95] fix duplicate CheckActive (we fixed this bug ourselves before Javyz did) --- NPCs/Cryogen/CryogenShield.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/NPCs/Cryogen/CryogenShield.cs b/NPCs/Cryogen/CryogenShield.cs index 14829471a0..4c07fcb1a8 100644 --- a/NPCs/Cryogen/CryogenShield.cs +++ b/NPCs/Cryogen/CryogenShield.cs @@ -1,5 +1,4 @@ -using System; -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Events; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -16,9 +15,6 @@ namespace CalamityMod.NPCs.Cryogen { public static readonly SoundStyle BreakSound = new("CalamityMod/Sounds/NPCKilled/CryogenShieldBreak"); - //Don't count towards NPC limit and don't despawn offscreen. - public override bool CheckActive() => false; - public override void SetStaticDefaults() { this.HideFromBestiary(); @@ -159,6 +155,7 @@ namespace CalamityMod.NPCs.Cryogen } } + // Don't count towards NPC limit and don't despawn offscreen. public override bool CheckActive() => false; public override void HitEffect(NPC.HitInfo hit) From 09268562dca29c1ebac8a8cc6531529dc1dbf5b7 Mon Sep 17 00:00:00 2001 From: Xyk Date: Fri, 10 Nov 2023 14:54:01 -0800 Subject: [PATCH 94/95] Terra Flameburster and Elemental Eruption Reworked both weapons charge up and then fire a stream of flames I did not balance these ones so they could be fucked up majorly in either direction --- Buffs/DamageOverTime/ElementalMix.cs | 23 ++- Items/Weapons/Ranged/ElementalEruption.cs | 53 ++----- Items/Weapons/Ranged/TerraFlameburster.cs | 40 ++--- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 7 +- .../Ranged/ElementalEruptionHouldout.cs | 141 ++++++++++++++++++ Projectiles/Ranged/ElementalFire.cs | 47 +++++- Projectiles/Ranged/ElementalFlare.cs | 2 +- Projectiles/Ranged/TerraFire.cs | 40 ++++- .../Ranged/TerraFlamebursterHouldout.cs | 128 ++++++++++++++++ Projectiles/Ranged/TerraFlare.cs | 11 +- 10 files changed, 388 insertions(+), 104 deletions(-) create mode 100644 Projectiles/Ranged/ElementalEruptionHouldout.cs create mode 100644 Projectiles/Ranged/TerraFlamebursterHouldout.cs diff --git a/Buffs/DamageOverTime/ElementalMix.cs b/Buffs/DamageOverTime/ElementalMix.cs index 1113e7b68f..d206bffc57 100644 --- a/Buffs/DamageOverTime/ElementalMix.cs +++ b/Buffs/DamageOverTime/ElementalMix.cs @@ -46,11 +46,11 @@ namespace CalamityMod.Buffs.DamageOverTime GeneralParticleHandler.SpawnParticle(new TechyHoloysquareParticle(player.Calamity().RandomDebuffVisualSpot, speed, Main.rand.NextFloat(1.2f, 1.8f), effectcolor, Main.rand.Next(8, 14))); - int dustType = Main.rand.NextBool() ? 91 : 247; + int dustType = Main.rand.NextBool() ? 66 : 247; Dust dust = Dust.NewDustPerfect(player.Calamity().RandomDebuffVisualSpot, dustType); - dust.scale = (dustType == 91 ? 1.4f : 1.2f); - dust.velocity = (dustType == 247 ? Vector2.Zero : new Vector2(0, Main.rand.NextFloat(-1.5f, 4f)) - player.velocity / 2); - dust.noGravity = Main.rand.NextBool(4) && dustType == 91 ? false : true; + dust.scale = (dustType == 66 ? 1.4f : 1.2f); + dust.velocity = Vector2.Zero + new Vector2(Main.rand.NextFloat(-1, 1), Main.rand.NextFloat(4f, 8f)) - player.velocity / 2; + dust.noGravity = true; dust.alpha = Main.rand.Next(90, 150); dust.color = effectcolor; } @@ -71,12 +71,11 @@ namespace CalamityMod.Buffs.DamageOverTime GeneralParticleHandler.SpawnParticle(new TechyHoloysquareParticle(npcSize, speed, Main.rand.NextFloat(1.2f, 3.1f), effectcolor, Main.rand.Next(8, 14))); - int dustType = Main.rand.NextBool() ? 91 : 247; + int dustType = Main.rand.NextBool() ? 66 : 247; Dust dust = Dust.NewDustPerfect(npcSize, dustType); - dust.scale = (dustType == 91 ? 1.4f : 1.2f); - dust.velocity = (dustType == 247 ? Vector2.Zero : new Vector2(0, Main.rand.NextFloat(-1.5f, 4f)) - npc.velocity / 2); - dust.noGravity = Main.rand.NextBool(4) && dustType == 91 ? false : true; - dust.velocity = Vector2.Zero; + dust.scale = (dustType == 66 ? 1.4f : 1.2f); + dust.noGravity = true; + dust.velocity = Vector2.Zero + new Vector2(Main.rand.NextFloat(-2, 2), Main.rand.NextFloat(2f, 4f)) - npc.velocity / 2; dust.alpha = Main.rand.Next(90, 150); dust.color = effectcolor; } @@ -90,11 +89,11 @@ namespace CalamityMod.Buffs.DamageOverTime _ => Color.Violet, }; Vector2 npcSize = npc.Center + new Vector2(Main.rand.NextFloat(-npc.width / 2, npc.width / 2), Main.rand.NextFloat(-npc.height / 2, npc.height / 2)); - int dustType = Main.rand.NextBool() ? 91 : 247; + int dustType = Main.rand.NextBool() ? 66 : 247; Dust dust = Dust.NewDustPerfect(npcSize, dustType); - dust.scale = (dustType == 91 ? 0.9f : 1.4f); + dust.scale = (dustType == 66 ? 0.9f : 1.4f); dust.noGravity = true; - dust.velocity = Vector2.Zero; + dust.velocity = Vector2.Zero + new Vector2(Main.rand.NextFloat(-2, 2), Main.rand.NextFloat(2f, 4f)); dust.alpha = Main.rand.Next(35, 90); dust.color = effectcolor; } diff --git a/Items/Weapons/Ranged/ElementalEruption.cs b/Items/Weapons/Ranged/ElementalEruption.cs index 8c05014746..9fb00ce050 100644 --- a/Items/Weapons/Ranged/ElementalEruption.cs +++ b/Items/Weapons/Ranged/ElementalEruption.cs @@ -21,65 +21,33 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - Item.damage = 77; + Item.damage = 83; Item.DamageType = DamageClass.Ranged; Item.width = 64; Item.height = 34; - Item.useAnimation = Item.useTime = 30; + Item.useAnimation = Item.useTime = 6; Item.useStyle = ItemUseStyleID.Shoot; + Item.noUseGraphic = true; Item.noMelee = true; Item.knockBack = 3.5f; Item.UseSound = SoundID.Item34; Item.value = CalamityGlobalItem.Rarity11BuyPrice; Item.rare = ItemRarityID.Purple; Item.autoReuse = true; - Item.shoot = ModContent.ProjectileType(); + Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 9f; Item.useAmmo = AmmoID.Gel; - Item.consumeAmmoOnFirstShotOnly = true; + Item.channel = true; } - public override bool AltFunctionUse(Player player) => true; - public override Vector2? HoldoutOffset() => new Vector2(-10, 0); - - // Left click functions as clockwork with bursts of three (adjust for rounding) - public override float UseTimeMultiplier(Player player) => player.altFunctionUse == 2 ? 1f : 0.34f; - + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; + + // Spawning the holdout cannot consume ammo + public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - // Right-click: fires a small cluster of 3 sticky, non-homing flares - if (player.altFunctionUse == 2f) - { - Vector2 newPos = position + velocity.SafeNormalize(Vector2.UnitX) * 48f; - for (int i = 0; i < 3; i++) - { - newPos += Main.rand.NextVector2Circular(24f, 24f); - Projectile flare = Projectile.NewProjectileDirect(source, newPos, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI, ai2: 1f); - flare.penetrate = -1; - flare.usesLocalNPCImmunity = true; - flare.localNPCHitCooldown = 30; - } - return false; - } - - // Left-click - // Fires a pair of homing rainbow flares - FlareCounter++; - if (FlareCounter >= 3) - { - FlareCounter = 0; - Vector2 newPos = position + velocity.SafeNormalize(Vector2.UnitX) * 36f; - Projectile.NewProjectile(source, newPos, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI, velocity.Length(), -1f); - Projectile.NewProjectile(source, newPos, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI, velocity.Length(), 1f); - } - - // Fires three flames, random colors and spread - for (int i = 0; i < 3; i++) - { - Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(8f)); - Projectile.NewProjectile(source, position, newVel, type, damage, knockback, player.whoAmI, Main.rand.NextFloat()); - } + Projectile.NewProjectile(source, position, Vector2.Zero, type, 0, 0f, player.whoAmI); return false; } @@ -87,7 +55,6 @@ namespace CalamityMod.Items.Weapons.Ranged { CreateRecipe(). AddIngredient(). - AddIngredient(). AddIngredient(ItemID.LunarBar, 5). AddIngredient(5). AddIngredient(5). diff --git a/Items/Weapons/Ranged/TerraFlameburster.cs b/Items/Weapons/Ranged/TerraFlameburster.cs index fa044f3619..34b7099f26 100644 --- a/Items/Weapons/Ranged/TerraFlameburster.cs +++ b/Items/Weapons/Ranged/TerraFlameburster.cs @@ -13,51 +13,37 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public int FlareCounter = 0; + public int TerraUseTime = 8; public override void SetDefaults() { - Item.damage = 55; + Item.damage = 58; Item.DamageType = DamageClass.Ranged; Item.width = 68; Item.height = 22; - Item.useTime = 8; - Item.useAnimation = 32; + Item.useTime = TerraUseTime; + Item.useAnimation = TerraUseTime; Item.useStyle = ItemUseStyleID.Shoot; + Item.noUseGraphic = true; Item.noMelee = true; Item.knockBack = 3.25f; - Item.UseSound = SoundID.Item34; Item.value = CalamityGlobalItem.Rarity9BuyPrice; Item.rare = ItemRarityID.Yellow; Item.autoReuse = true; - Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 8f; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 10f; Item.useAmmo = AmmoID.Gel; - Item.consumeAmmoOnFirstShotOnly = true; + Item.channel = true; } public override Vector2? HoldoutOffset() => new Vector2(-10, 0); - + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; + + // Spawning the holdout cannot consume ammo + public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - // Fires a pair of homing terra flares - FlareCounter++; - if (FlareCounter >= 4) - { - FlareCounter = 0; - Vector2 newPos = position + velocity.SafeNormalize(Vector2.UnitX) * 36f; - float randAngle = Main.rand.NextFloat(8f, 15f); - Vector2 newVel = velocity.RotatedBy(MathHelper.ToRadians(randAngle)) * 1.5f; - Projectile.NewProjectile(source, newPos, newVel, ModContent.ProjectileType(), damage, knockback, player.whoAmI); - newVel = velocity.RotatedBy(MathHelper.ToRadians(-randAngle)) * 1.5f; - Projectile.NewProjectile(source, newPos, newVel, ModContent.ProjectileType(), damage, knockback, player.whoAmI); - } - - // Fires two flames, green and blue, slightly randomly spread - for (int i = 0; i < 2; i++) - { - Vector2 newVel = velocity.RotatedByRandom(MathHelper.ToRadians(6f)); - Projectile.NewProjectile(source, position, newVel, type, damage, knockback, player.whoAmI, i); - } + Projectile.NewProjectile(source, position, Vector2.Zero, type, 0, 0f, player.whoAmI); return false; } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 36ea78440e..b2c0fa900c 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -440,9 +440,9 @@ ElementalEruption: { DisplayName: Elemental Eruption Tooltip: ''' - Spews rainbow flames and pairs of high-energy homing flares - Press to fire a dense cluster of sticky flares + Charge and then spew rainbow flames and pairs of high-energy homing flares Uses gel for ammo + 70% chance to save ammo ''' } @@ -1212,8 +1212,9 @@ TerraFlameburster: { DisplayName: Terra Flameburster Tooltip: ''' - Spews high-energy flames and pairs of homing flares + Charge and then spew high-energy flames and pairs of homing flares Uses gel for ammo + 50% chance to save ammo ''' } diff --git a/Projectiles/Ranged/ElementalEruptionHouldout.cs b/Projectiles/Ranged/ElementalEruptionHouldout.cs new file mode 100644 index 0000000000..4ad18da7a5 --- /dev/null +++ b/Projectiles/Ranged/ElementalEruptionHouldout.cs @@ -0,0 +1,141 @@ +using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Particles; +using log4net.Core; +using Microsoft.Xna.Framework; +using Mono.Cecil; +using ReLogic.Utilities; +using System; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Ranged +{ + public class ElementalEruptionHoldout : ModProjectile + { + // Take the name and texture from the weapon + public override LocalizedText DisplayName => CalamityUtils.GetItemName(); + public override string Texture => "CalamityMod/Items/Weapons/Ranged/ElementalEruption"; + private Player Owner => Main.player[Projectile.owner]; + private ref float ShotsFired => ref Projectile.ai[1]; + private ref float ShootTimer => ref Projectile.ai[2]; + private ref int ShotDelay => ref Owner.ActiveItem().useTime; // 6 + public int ShotCooldown; + public int FireBlobs = 0; + private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; + + public override void SetDefaults() + { + Projectile.width = 64; + Projectile.height = 34; + Projectile.friendly = true; + Projectile.tileCollide = false; + Projectile.DamageType = DamageClass.Ranged; + Projectile.ignoreWater = true; + } + + public override void AI() + { + if (Owner.dead || ShotsFired >= 24) // destroy the holdout if the player dies or is out of shots + { + Projectile.Kill(); + return; + } + + Vector2 armPosition = Owner.RotatedRelativePoint(Owner.MountedCenter, true); + Vector2 tipPosition = armPosition + Projectile.velocity * Projectile.width * 0.8f; + + // Kill if the owner stops channeling or otherwise cannot use the weapon. + if (!OwnerCanShoot) + { + Projectile.Kill(); + } + else + { + var effectcolor = Main.rand.Next(4) switch + { + 0 => Color.DeepSkyBlue, + 1 => Color.MediumSpringGreen, + 2 => Color.DarkOrange, + _ => Color.Violet, + }; + + // While channeled, keep refreshing the projectile lifespan + Projectile.timeLeft = 2; + + ShootTimer++; + if (ShootTimer >= 60) + { + if (ShotCooldown == 0) + { + SoundEngine.PlaySound(SoundID.Item34, Projectile.Center); + Owner.PickAmmo(Owner.ActiveItem(), out _, out float shootSpeed, out int damage, out float knockback, out _, Main.rand.NextFloat() < 0.70f); + for (int i = 0; i < 2; i++) + { + Projectile.NewProjectile(Projectile.GetSource_FromThis(), tipPosition, (Projectile.velocity * 10).RotatedByRandom(0.12f), ModContent.ProjectileType(), damage, knockback, Projectile.owner); + } + ShotsFired++; + ShotCooldown = ShotDelay; + if (FireBlobs == 0) + { + Vector2 newVel = (Projectile.velocity * 9); + Vector2 newPos = tipPosition + Projectile.velocity.SafeNormalize(Vector2.UnitX) * 36f; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), newPos, newVel, ModContent.ProjectileType(), damage, knockback, Projectile.owner, newVel.Length(), -1f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), newPos, newVel, ModContent.ProjectileType(), damage, knockback, Projectile.owner, newVel.Length(), 1f); + FireBlobs = 3; + } + else + FireBlobs--; + } + else + ShotCooldown--; + } + else + { + if (ShootTimer == 1) + SoundEngine.PlaySound(SoundID.Item73 with { Volume = 0.7f}, Projectile.Center); + ShotsFired = 0; + for (int i = 0; i < 2; i++) + { + int dustType = Main.rand.NextBool() ? 66 : 247; + float rotMulti = Main.rand.NextFloat(0.3f, 1f); + Dust dust = Dust.NewDustPerfect(tipPosition, dustType); + dust.scale = Main.rand.NextFloat(1.2f, 1.8f) * (ShootTimer * 0.025f) - rotMulti * 0.1f; + dust.noGravity = true; + dust.velocity = new Vector2(0, -2).RotatedByRandom(rotMulti * 0.3f) * (Main.rand.NextFloat(1f, 3.2f) - rotMulti) * (ShootTimer * 0.025f); + dust.alpha = Main.rand.Next(90, 150); + dust.color = effectcolor; + } + } + + } + UpdateProjectileHeldVariables(armPosition); + ManipulatePlayerVariables(); + } + + private void UpdateProjectileHeldVariables(Vector2 armPosition) + { + if (Main.myPlayer == Projectile.owner) + { + float interpolant = Utils.GetLerpValue(5f, 25f, Projectile.Distance(Main.MouseWorld), true); + Vector2 oldVelocity = Projectile.velocity; + Projectile.velocity = Vector2.Lerp(Projectile.velocity, Projectile.SafeDirectionTo(Main.MouseWorld), interpolant); + } + Projectile.Center = armPosition + Projectile.velocity * 20; + Projectile.rotation = Projectile.velocity.ToRotation() + (Projectile.spriteDirection == -1 ? MathHelper.Pi : 0f); + Projectile.spriteDirection = Projectile.direction; + } + + private void ManipulatePlayerVariables() + { + Owner.ChangeDir(Projectile.direction); + Owner.heldProj = Projectile.whoAmI; + Owner.itemTime = 2; + Owner.itemAnimation = 2; + Owner.itemRotation = (Projectile.velocity * Projectile.direction).ToRotation(); + } + public override bool? CanDamage() => false; + } +} diff --git a/Projectiles/Ranged/ElementalFire.cs b/Projectiles/Ranged/ElementalFire.cs index c4ea55c70b..3e99af8777 100644 --- a/Projectiles/Ranged/ElementalFire.cs +++ b/Projectiles/Ranged/ElementalFire.cs @@ -23,29 +23,64 @@ namespace CalamityMod.Projectiles.Ranged Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; - Projectile.penetrate = -1; + Projectile.penetrate = 5; Projectile.MaxUpdates = 4; Projectile.timeLeft = Lifetime; // 24 effectively - Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 8; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; } public override void AI() { + var effectcolor = Main.rand.Next(4) switch + { + 0 => Color.DeepSkyBlue, + 1 => Color.MediumSpringGreen, + 2 => Color.DarkOrange, + _ => Color.Violet, + }; + Time++; ColorType += 0.02f; // Determines particle size as well as hitbox - if (Time >= 5f) + if (Time >= 1f) Projectile.scale = 1.8f * Utils.GetLerpValue(5f, 30f, Time, true); else return; // Helps position it at the tip + if (Time == 1) + { + for (int i = 0; i < 12; i++) + { + float rotMulti = Main.rand.NextFloat(0.7f, 1.1f); + int dustType = Main.rand.NextBool() ? 66 : 247; + Dust dust = Dust.NewDustPerfect(Projectile.Center, dustType); + dust.scale = Main.rand.NextFloat(1.8f, 2.5f) - rotMulti; + dust.noGravity = true; + dust.velocity = Projectile.velocity.RotatedByRandom(0.5f * rotMulti) * Main.rand.NextFloat(0.5f, 1.8f) * rotMulti; + dust.alpha = Main.rand.Next(90, 150); + dust.color = effectcolor; + } + } + + if (Time > 9) + { + float dustArea = Main.rand.NextFloat(0.1f, 1.7f); + int dustType = Main.rand.NextBool() ? 66 : 247; + Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(9, 9) + Projectile.velocity * Main.rand.NextFloat(-1.8f, 1.8f), dustType); + dust.scale = (1.8f - dustArea) * 0.65f; + dust.noGravity = true; + dust.velocity = new Vector2(4, 4).RotatedByRandom(100) * dustArea; + dust.alpha = Main.rand.Next(90, 150); + dust.color = effectcolor; + } + // Rainbow smokes of increasing opacity float smokeRot = MathHelper.ToRadians(3f); // *Rate of rotation per frame, not a constant rotation float hue = 0.5f * (ColorType % 1f) + 0.5f * Utils.GetLerpValue(30f, Lifetime, Time, true) * MathF.Sin(Main.GlobalTimeWrappedHourly * 5f); - Color smokeColor = Main.hslToRgb(hue, 1f, 0.8f); - Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, smokeColor, 12, Projectile.scale * Main.rand.NextFloat(0.6f, 1.2f), 0.3f, smokeRot, true, required: true); + Color smokeColor = Main.hslToRgb(hue, 1f, 0.7f); + Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, smokeColor, 12, Projectile.scale * Main.rand.NextFloat(0.6f, 1.2f), 0.45f, smokeRot, true, required: true); GeneralParticleHandler.SpawnParticle(smoke); // Overlay the glow on top, which is on the brighter side diff --git a/Projectiles/Ranged/ElementalFlare.cs b/Projectiles/Ranged/ElementalFlare.cs index 3e32e4f807..5adc2f48d7 100644 --- a/Projectiles/Ranged/ElementalFlare.cs +++ b/Projectiles/Ranged/ElementalFlare.cs @@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Ranged float hue = 0.5f + 0.5f * i / (float)Projectile.oldPos.Length * MathF.Sin(Main.GlobalTimeWrappedHourly * 5f); Color color = Main.hslToRgb(hue, 1f, 0.6f); Vector2 drawPosition = Projectile.oldPos[i] + lightTexture.Size() * 0.5f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY) + new Vector2(-15f, -15f); - Color outerColor = color; + Color outerColor = color * 2f; Color innerColor = Color.Lerp(color, Color.White, 0.2f) * 0.5f; float intensity = 0.9f + 0.15f * MathF.Cos(Main.GlobalTimeWrappedHourly % 60f * MathHelper.TwoPi); diff --git a/Projectiles/Ranged/TerraFire.cs b/Projectiles/Ranged/TerraFire.cs index 3e8c266019..ea49e162a7 100644 --- a/Projectiles/Ranged/TerraFire.cs +++ b/Projectiles/Ranged/TerraFire.cs @@ -22,19 +22,33 @@ namespace CalamityMod.Projectiles.Ranged Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; - Projectile.penetrate = -1; - Projectile.MaxUpdates = 4; + Projectile.penetrate = 4; + Projectile.MaxUpdates = 5; Projectile.timeLeft = Lifetime; // 24 effectively - Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 8; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; } public override void AI() { Time++; + if (Time == 1) + { + MediumMistParticle smoke2 = new MediumMistParticle(Projectile.Center + Main.rand.NextVector2Circular(5, 5), (Projectile.velocity * 1f).RotatedByRandom(0.15f) * Main.rand.NextFloat(0.2f, 2.1f), Color.Lime, Color.Turquoise, Main.rand.NextFloat(0.8f, 1.9f), 180, Main.rand.NextFloat(-3f, 3f)); + GeneralParticleHandler.SpawnParticle(smoke2); + MediumMistParticle smoke3 = new MediumMistParticle(Projectile.Center + Main.rand.NextVector2Circular(5, 5), (Projectile.velocity * 2).RotatedByRandom(0.05f) * Main.rand.NextFloat(0.2f, 2.1f), Color.Lime, Color.Turquoise, Main.rand.NextFloat(0.4f, 1.1f), 180, Main.rand.NextFloat(-3f, 3f)); + GeneralParticleHandler.SpawnParticle(smoke3); + for (int i = 0; i < 9; i++) + { + Dust dust2 = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(5) ? 135 : 107); + dust2.noGravity = true; + dust2.velocity = Projectile.velocity.RotatedByRandom(0.7f) * Main.rand.NextFloat(0.3f, 2.9f); + dust2.scale = Main.rand.NextFloat(1.3f, 2.1f); + } + } // Determines particle size as well as hitbox - if (Time >= 6f) + if (Time >= 1f) Projectile.scale = 1.8f * Utils.GetLerpValue(6f, 30f, Time, true); else return; // Helps position it at the tip @@ -42,9 +56,21 @@ namespace CalamityMod.Projectiles.Ranged // Main smokes shifting between green to green-blue and back float smokeRot = MathHelper.ToRadians(3f); // *Rate of rotation per frame, not a constant rotation float colorValue = CalamityUtils.Convert01To010(Utils.GetLerpValue(30f, Lifetime, Time, true)); - Color smokeColor = BlueFire ? Color.Lerp(Color.Cyan, Color.Aquamarine, colorValue) : Color.Lerp(Color.Lime, Color.SpringGreen, colorValue); - Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, smokeColor, 12, Projectile.scale * Main.rand.NextFloat(0.6f, 1.2f), 0.3f, smokeRot, true, required: true); + Color smokeColor = Color.Lerp(Color.Lime, Color.Turquoise, colorValue); + Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * 0.5f, smokeColor, 18, Projectile.scale * Main.rand.NextFloat(0.6f, 1.2f), 0.4f, smokeRot, true, required: true); GeneralParticleHandler.SpawnParticle(smoke); + + if (Time > 4) + { + for (int i = 0; i < 2; i++) + { + float dustArea = Main.rand.NextFloat(0.1f, 1.7f); + Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(9, 9) + Projectile.velocity * Main.rand.NextFloat(-1.8f, 1.8f), Main.rand.NextBool(5) ? 135 : 107); + dust.noGravity = true; + dust.velocity = new Vector2(6, 6).RotatedByRandom(100) * dustArea; + dust.scale = (1.8f - dustArea) * 0.65f; + } + } // Overlay a gold glow on top if (Main.rand.NextBool(5)) diff --git a/Projectiles/Ranged/TerraFlamebursterHouldout.cs b/Projectiles/Ranged/TerraFlamebursterHouldout.cs new file mode 100644 index 0000000000..68ba520f27 --- /dev/null +++ b/Projectiles/Ranged/TerraFlamebursterHouldout.cs @@ -0,0 +1,128 @@ +using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Particles; +using log4net.Core; +using Microsoft.Xna.Framework; +using Mono.Cecil; +using ReLogic.Utilities; +using System; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Ranged +{ + public class TerraFlamebursterHoldout : ModProjectile + { + // Take the name and texture from the weapon + public override LocalizedText DisplayName => CalamityUtils.GetItemName(); + public override string Texture => "CalamityMod/Items/Weapons/Ranged/TerraFlameburster"; + private Player Owner => Main.player[Projectile.owner]; + private ref float ShotsFired => ref Projectile.ai[1]; + private ref float ShootTimer => ref Projectile.ai[2]; + private ref int ShotDelay => ref Owner.ActiveItem().useTime; // 8 + public int ShotCooldown; + public int FireBlobs = 0; + private bool OwnerCanShoot => Owner.channel && !Owner.noItems && !Owner.CCed; + + public override void SetDefaults() + { + Projectile.width = 68; + Projectile.height = 26; + Projectile.friendly = true; + Projectile.tileCollide = false; + Projectile.DamageType = DamageClass.Ranged; + Projectile.ignoreWater = true; + } + + public override void AI() + { + if (Owner.dead || ShotsFired >= 16) // destroy the holdout if the player dies or is out of shots + { + Projectile.Kill(); + return; + } + + Vector2 armPosition = Owner.RotatedRelativePoint(Owner.MountedCenter, true); + Vector2 tipPosition = armPosition + Projectile.velocity * Projectile.width * 0.8f; + + // Kill if the owner stops channeling or otherwise cannot use the weapon. + if (!OwnerCanShoot) + { + Projectile.Kill(); + } + else + { + // While channeled, keep refreshing the projectile lifespan + Projectile.timeLeft = 2; + + ShootTimer++; + if (ShootTimer >= 60) + { + if (ShotCooldown == 0) + { + SoundEngine.PlaySound(SoundID.Item34, Projectile.Center); + Owner.PickAmmo(Owner.ActiveItem(), out _, out float shootSpeed, out int damage, out float knockback, out _, Main.rand.NextBool(2) ? true : false); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), tipPosition, (Projectile.velocity * 9).RotatedByRandom(0.08f), ModContent.ProjectileType(), damage, knockback, Projectile.owner); + ShotsFired++; + ShotCooldown = ShotDelay; + if (FireBlobs == 0) + { + float randAngle = Main.rand.NextFloat(8f, 15f); + Vector2 newVel = (Projectile.velocity * 9).RotatedBy(MathHelper.ToRadians(randAngle)) * 2f; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), tipPosition, newVel, ModContent.ProjectileType(), damage, knockback, Projectile.owner); + newVel = (Projectile.velocity * 9).RotatedBy(MathHelper.ToRadians(-randAngle)) * 2f; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), tipPosition, newVel, ModContent.ProjectileType(), damage, knockback, Projectile.owner); + FireBlobs = 3; + } + else + FireBlobs--; + } + else + ShotCooldown--; + } + else + { + if (ShootTimer == 1) + SoundEngine.PlaySound(SoundID.Item73 with { Volume = 0.7f}, Projectile.Center); + ShotsFired = 0; + for (int i = 0; i < 2; i++) + { + float rotMulti = Main.rand.NextFloat(0.3f, 1f); + Dust dust2 = Dust.NewDustPerfect(tipPosition, Main.rand.NextBool(5) ? 135 : 107); + dust2.noGravity = true; + dust2.velocity = new Vector2(0, -2).RotatedByRandom(rotMulti * 0.3f) * (Main.rand.NextFloat(1f, 2.9f) - rotMulti); + dust2.scale = Main.rand.NextFloat(1.2f, 1.8f) * (ShootTimer * 0.015f); + } + } + + } + UpdateProjectileHeldVariables(armPosition); + ManipulatePlayerVariables(); + } + + private void UpdateProjectileHeldVariables(Vector2 armPosition) + { + if (Main.myPlayer == Projectile.owner) + { + float interpolant = Utils.GetLerpValue(5f, 25f, Projectile.Distance(Main.MouseWorld), true); + Vector2 oldVelocity = Projectile.velocity; + Projectile.velocity = Vector2.Lerp(Projectile.velocity, Projectile.SafeDirectionTo(Main.MouseWorld), interpolant); + } + Projectile.Center = armPosition + Projectile.velocity * 20; + Projectile.rotation = Projectile.velocity.ToRotation() + (Projectile.spriteDirection == -1 ? MathHelper.Pi : 0f); + Projectile.spriteDirection = Projectile.direction; + } + + private void ManipulatePlayerVariables() + { + Owner.ChangeDir(Projectile.direction); + Owner.heldProj = Projectile.whoAmI; + Owner.itemTime = 2; + Owner.itemAnimation = 2; + Owner.itemRotation = (Projectile.velocity * Projectile.direction).ToRotation(); + } + public override bool? CanDamage() => false; + } +} diff --git a/Projectiles/Ranged/TerraFlare.cs b/Projectiles/Ranged/TerraFlare.cs index ac151cb371..9bbfe20c28 100644 --- a/Projectiles/Ranged/TerraFlare.cs +++ b/Projectiles/Ranged/TerraFlare.cs @@ -29,18 +29,19 @@ namespace CalamityMod.Projectiles.Ranged Projectile.MaxUpdates = 2; Projectile.timeLeft = 90 * Projectile.MaxUpdates; Projectile.DamageType = DamageClass.Ranged; + Projectile.tileCollide = false; } - public override void AI() => CalamityUtils.HomeInOnNPC(Projectile, false, 640f, 15f, 20f); + public override void AI() => CalamityUtils.HomeInOnNPC(Projectile, true, 640f, 15f, 20f); public override void OnKill(int timeLeft) { // Circular spread of clouds for (int i = 0; i < 8; i++) { - Vector2 smokeVel = Main.rand.NextVector2Circular(16f, 16f); - Color smokeColor = Main.rand.NextBool() ? Color.Lime : Color.Cyan; - Particle smoke = new MediumMistParticle(Projectile.Center, smokeVel, smokeColor, Color.Black, Main.rand.NextFloat(0.6f, 1.6f), 200 - Main.rand.Next(60), 0.1f); + Vector2 smokeVel = Main.rand.NextVector2Circular(8f, 8f); + Color smokeColor = Main.rand.NextBool() ? Color.Lime : Color.Turquoise; + Particle smoke = new MediumMistParticle(Projectile.Center, smokeVel, smokeColor, Color.Black, Main.rand.NextFloat(0.4f, 0.8f), 200 - Main.rand.Next(60), 0.1f); GeneralParticleHandler.SpawnParticle(smoke); } } @@ -51,7 +52,7 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < Projectile.oldPos.Length; i++) { float colorInterpolation = MathF.Cos(Projectile.timeLeft / 16f + Main.GlobalTimeWrappedHourly / 20f + i / (float)Projectile.oldPos.Length * MathHelper.Pi) * 0.5f + 0.5f; - Color color = Color.Lerp(Color.Lime, Color.Cyan, colorInterpolation); + Color color = Color.Lerp(Color.Lime, Color.Turquoise, colorInterpolation); Vector2 drawPosition = Projectile.oldPos[i] + lightTexture.Size() * 0.5f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY) + new Vector2(-15f, -15f); Color outerColor = color; Color innerColor = Color.Lerp(color, Color.Gold, 0.8f) * 0.5f; From 70019b3b3c68838643bc52985a5cef26c5a99f3a Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 10 Nov 2023 17:55:19 -0500 Subject: [PATCH 95/95] Icicle Staff resprite --- Items/Weapons/Magic/IcicleStaff.cs | 4 ++-- Items/Weapons/Magic/IcicleStaff.png | Bin 728 -> 571 bytes Projectiles/Magic/IcicleStaffProj.png | Bin 345 -> 389 bytes 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Magic/IcicleStaff.cs b/Items/Weapons/Magic/IcicleStaff.cs index 9a9f8d0d2e..9b0d61e081 100644 --- a/Items/Weapons/Magic/IcicleStaff.cs +++ b/Items/Weapons/Magic/IcicleStaff.cs @@ -21,8 +21,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.damage = 10; Item.DamageType = DamageClass.Magic; Item.mana = 6; - Item.width = 44; - Item.height = 44; + Item.width = 38; + Item.height = 42; Item.useTime = 7; Item.useAnimation = 14; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Items/Weapons/Magic/IcicleStaff.png b/Items/Weapons/Magic/IcicleStaff.png index 3d0dfd3b9a772fbab5a82af5e918d82507355f2e..0fbbbae95f5709a9dca956ae99640aac1d4ca6fc 100644 GIT binary patch literal 571 zcmV-B0>u4^P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0nkZAK~z{r?Uqj{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$NjEhwVK=h6XM4K)4S==vW!wEbCF!Q-BfMR* zq42O#X$NXYRG0q=>$O3(ob`&V$ajSQR}Y(D?RLr8Mv)cyj8q ztXE`3z9Zam^lSovFR#-kSe3q8ZO|yPBL5K`H!%?(SJ7( z3E6Vs2mr;|Ctj`1QNAN=MB?L)|2Q5vl`sIlzfS{=O9frNBm4&-{RuQ6wi1W{0000< KMNUMnLSTZK7*R0* diff --git a/Projectiles/Magic/IcicleStaffProj.png b/Projectiles/Magic/IcicleStaffProj.png index 00b1ef9ae15d560c54e547eee515abab8e630072..c1e15cae9a20015fcfa8b3e8be9775318f245d9b 100644 GIT binary patch literal 389 zcmeAS@N?(olHy`uVBq!ia0vp^0zj<5!3HFyJAa%3QjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`ISV`@iy0XB4ude`@%$AjKn+r!E{-7{-pMHr%*W*J{$J>`=E0l3AQ4-i zfLS>V=DcaeufJ#*+>dqS@;Th_b4zx@ulLV#6QrIAor-lhkyf(d^Fd>S*tt7-e1hLF zP2y$PDR6V@m2$=t{RZ_y%o_cy8omay2Vz3Ezh$1$wv@dq_5jn;hY9C$XPjN}up!U* zYLJp2vx6RE;)JsXw>L7r+Wp|-+w24%odt0^2b@gZg81gh-Eh9*D8hU=mqT^=D%NH1 zjUAF0*)qhr4Hz~_rde}jc%5oAL~Ac!Oi2)>pb&B_fRMWrU=8cpluC z@mPv&k;IvUDryUAbq+M#nyH<@Q>1uis)9qccte&-#M&0#fHzD#;tLvQ9GUvyMgwEY h|7M0(y@Uh?hC3=rAGTXW9s&j(gQu&X%Q~loCII?YkTw7S literal 345 zcmV-f0jB31k0fiHbfO%^rn<$U1Od_CrZwT rS%9EI1)MVSWGr002ovPDHLkV1fVut9*&_