From 847876976ece737ef01ae908866472dbe3d5787d Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 14 Apr 2020 19:57:31 -0400 Subject: [PATCH 1/5] burning sea nerf --- Projectiles/Magic/BrimstoneFireball.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Projectiles/Magic/BrimstoneFireball.cs b/Projectiles/Magic/BrimstoneFireball.cs index c8a151e9b3..0d6960cbe4 100644 --- a/Projectiles/Magic/BrimstoneFireball.cs +++ b/Projectiles/Magic/BrimstoneFireball.cs @@ -2,6 +2,7 @@ using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Magic { @@ -20,7 +21,7 @@ namespace CalamityMod.Projectiles.Magic projectile.magic = true; projectile.aiStyle = 1; projectile.penetrate = 4; - aiType = 277; + aiType = ProjectileID.ThornBall; projectile.timeLeft = 300; } @@ -32,7 +33,7 @@ namespace CalamityMod.Projectiles.Magic projectile.Kill(); if (projectile.owner == Main.myPlayer) { - int num251 = Main.rand.Next(3, 5); + int num251 = Main.rand.Next(2, 4); for (int num252 = 0; num252 < num251; num252++) { Vector2 value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, -51)); @@ -42,7 +43,7 @@ namespace CalamityMod.Projectiles.Magic } value15.Normalize(); value15 *= (float)Main.rand.Next(70, 101) * 0.1f; - Projectile.NewProjectile(projectile.oldPosition.X + (float)(projectile.width / 2), projectile.oldPosition.Y + (float)(projectile.height / 2), value15.X, value15.Y, ModContent.ProjectileType(), (int)((double)projectile.damage * 1.35), 0f, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.oldPosition.X + (float)(projectile.width / 2), projectile.oldPosition.Y + (float)(projectile.height / 2), value15.X, value15.Y, ModContent.ProjectileType(), projectile.damage, 0f, projectile.owner, 0f, 0f); } } } From 20c602b7fb44ec179bbd860a83336142845b2d66 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 14 Apr 2020 20:14:26 -0400 Subject: [PATCH 2/5] brimrose staff buff --- Items/Weapons/Magic/BrimroseStaff.cs | 2 +- Projectiles/Magic/BrimstoneBeam.cs | 4 ++-- Projectiles/Magic/BrimstoneBeam2.cs | 4 ++-- Projectiles/Magic/BrimstoneBeam3.cs | 4 ++-- Projectiles/Magic/BrimstoneBeam4.cs | 4 ++-- Projectiles/Magic/BrimstoneBeam5.cs | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Items/Weapons/Magic/BrimroseStaff.cs b/Items/Weapons/Magic/BrimroseStaff.cs index de9b9be6f6..b1a73679a3 100644 --- a/Items/Weapons/Magic/BrimroseStaff.cs +++ b/Items/Weapons/Magic/BrimroseStaff.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 17; + item.damage = 20; item.magic = true; item.mana = 14; item.width = 36; diff --git a/Projectiles/Magic/BrimstoneBeam.cs b/Projectiles/Magic/BrimstoneBeam.cs index 9263a572e1..fd570d8ff0 100644 --- a/Projectiles/Magic/BrimstoneBeam.cs +++ b/Projectiles/Magic/BrimstoneBeam.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Magic projectile.magic = true; projectile.penetrate = 1; projectile.extraUpdates = 100; - projectile.timeLeft = 20; + projectile.timeLeft = 30; } public override void Kill(int timeLeft) @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Magic for (int i = 0; i < numProj; i++) { Vector2 perturbedSpeed = new Vector2(projectile.velocity.X, projectile.velocity.Y).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType(), (int)(double)projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Magic/BrimstoneBeam2.cs b/Projectiles/Magic/BrimstoneBeam2.cs index 0d18335d51..af4528083c 100644 --- a/Projectiles/Magic/BrimstoneBeam2.cs +++ b/Projectiles/Magic/BrimstoneBeam2.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Magic projectile.magic = true; projectile.penetrate = 1; projectile.extraUpdates = 100; - projectile.timeLeft = 20; + projectile.timeLeft = 30; } public override void Kill(int timeLeft) @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Magic for (int i = 0; i < numProj; i++) { Vector2 perturbedSpeed = new Vector2(projectile.velocity.X, projectile.velocity.Y).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType(), (int)(double)projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Magic/BrimstoneBeam3.cs b/Projectiles/Magic/BrimstoneBeam3.cs index 82b374b414..a54104a93b 100644 --- a/Projectiles/Magic/BrimstoneBeam3.cs +++ b/Projectiles/Magic/BrimstoneBeam3.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Magic projectile.magic = true; projectile.penetrate = -1; projectile.extraUpdates = 100; - projectile.timeLeft = 20; + projectile.timeLeft = 30; } public override void Kill(int timeLeft) @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Magic for (int i = 0; i < numProj; i++) { Vector2 perturbedSpeed = new Vector2(projectile.velocity.X, projectile.velocity.Y).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType(), (int)(double)projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Magic/BrimstoneBeam4.cs b/Projectiles/Magic/BrimstoneBeam4.cs index a6eeff2746..6cec726c04 100644 --- a/Projectiles/Magic/BrimstoneBeam4.cs +++ b/Projectiles/Magic/BrimstoneBeam4.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Magic projectile.magic = true; projectile.penetrate = 1; projectile.extraUpdates = 100; - projectile.timeLeft = 20; + projectile.timeLeft = 30; } public override void Kill(int timeLeft) @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Magic for (int i = 0; i < numProj; i++) { Vector2 perturbedSpeed = new Vector2(projectile.velocity.X, projectile.velocity.Y).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType(), (int)(double)projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Magic/BrimstoneBeam5.cs b/Projectiles/Magic/BrimstoneBeam5.cs index 9d34bc60a5..c8d4210a07 100644 --- a/Projectiles/Magic/BrimstoneBeam5.cs +++ b/Projectiles/Magic/BrimstoneBeam5.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Magic projectile.magic = true; projectile.penetrate = 1; projectile.extraUpdates = 100; - projectile.timeLeft = 20; + projectile.timeLeft = 30; } public override void AI() From 39a4fc422812fd8b2c7c8f458cbec4d783c139ad Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 14 Apr 2020 21:03:28 -0400 Subject: [PATCH 3/5] igneous exaltation tweak --- Items/CalamityGlobalItem.cs | 2 +- Projectiles/Summon/IgneousBlade.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 894bd95359..2fc595c24f 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -698,7 +698,7 @@ namespace CalamityMod.Items if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType() && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].localAI[1] == 0f) { Main.projectile[i].rotation = MathHelper.PiOver2 + MathHelper.PiOver4; - Main.projectile[i].velocity = Main.projectile[i].DirectionTo(Main.MouseWorld) * 16f; + Main.projectile[i].velocity = Main.projectile[i].DirectionTo(Main.MouseWorld) * 22f; Main.projectile[i].rotation += Main.projectile[i].velocity.ToRotation(); Main.projectile[i].ai[0] = 180f; (Main.projectile[i].modProjectile as IgneousBlade).Firing = true; diff --git a/Projectiles/Summon/IgneousBlade.cs b/Projectiles/Summon/IgneousBlade.cs index 96ab9f1300..45bd0759f1 100644 --- a/Projectiles/Summon/IgneousBlade.cs +++ b/Projectiles/Summon/IgneousBlade.cs @@ -86,7 +86,7 @@ namespace CalamityMod.Projectiles.Summon else { if (projectile.penetrate == -1) //limit penetration for worm memes - projectile.penetrate = 4; + projectile.penetrate = 3; projectile.ai[0]--; if (projectile.ai[0] == 1) From 87f051f42efd587c2616487c9746c2cc3dcff926 Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 14 Apr 2020 21:18:46 -0500 Subject: [PATCH 4/5] Placed sulph sand doesn't spawn water --- Items/Placeables/SulphurousSand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Placeables/SulphurousSand.cs b/Items/Placeables/SulphurousSand.cs index 4603a35257..19e3dc5f45 100644 --- a/Items/Placeables/SulphurousSand.cs +++ b/Items/Placeables/SulphurousSand.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Placeables public override void SetDefaults() { - item.createTile = ModContent.TileType(); + item.createTile = ModContent.TileType(); item.useStyle = 1; item.useTurn = true; item.useAnimation = 15; From 37c1dc7a2bbffd13e923ea37cef50fd99de692fe Mon Sep 17 00:00:00 2001 From: DominicKarma42 <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 14 Apr 2020 23:08:37 -0500 Subject: [PATCH 5/5] Mechworm loses segments instead of dying when a minion slot is lost --- Projectiles/Summon/MechwormBody.cs | 17 ----------------- Projectiles/Summon/MechwormBody2.cs | 17 ----------------- Projectiles/Summon/MechwormHead.cs | 17 ----------------- Projectiles/Summon/MechwormTail.cs | 25 ++++++++++++++++++++++--- 4 files changed, 22 insertions(+), 54 deletions(-) diff --git a/Projectiles/Summon/MechwormBody.cs b/Projectiles/Summon/MechwormBody.cs index 8f4b173ffc..5c9a8e48a9 100644 --- a/Projectiles/Summon/MechwormBody.cs +++ b/Projectiles/Summon/MechwormBody.cs @@ -9,9 +9,6 @@ namespace CalamityMod.Projectiles.Summon { public class MechwormBody : ModProjectile { - private int playerMinionSlots = 0; - private bool runCheck = true; - public override void SetStaticDefaults() { DisplayName.SetDefault("Mechworm"); @@ -40,25 +37,11 @@ namespace CalamityMod.Projectiles.Summon { Lighting.AddLight((int)((projectile.position.X + (float)(projectile.width / 2)) / 16f), (int)((projectile.position.Y + (float)(projectile.height / 2)) / 16f), 0.15f, 0.01f, 0.15f); Player player9 = Main.player[projectile.owner]; - if (player9.maxMinions > playerMinionSlots) - { - playerMinionSlots = player9.maxMinions; - } - if (runCheck) - { - runCheck = false; - playerMinionSlots = player9.maxMinions; - } CalamityPlayer modPlayer = player9.Calamity(); if ((int)Main.time % 120 == 0) { projectile.netUpdate = true; } - if (!player9.active || player9.maxMinions < playerMinionSlots) - { - projectile.active = false; - return; - } int num1051 = 10; if (player9.dead) { diff --git a/Projectiles/Summon/MechwormBody2.cs b/Projectiles/Summon/MechwormBody2.cs index 13d9371b4e..6b30adefa0 100644 --- a/Projectiles/Summon/MechwormBody2.cs +++ b/Projectiles/Summon/MechwormBody2.cs @@ -9,9 +9,6 @@ namespace CalamityMod.Projectiles.Summon { public class MechwormBody2 : ModProjectile { - private int playerMinionSlots = 0; - private bool runCheck = true; - public override void SetStaticDefaults() { DisplayName.SetDefault("Mechworm"); @@ -40,25 +37,11 @@ namespace CalamityMod.Projectiles.Summon { Lighting.AddLight((int)((projectile.position.X + (float)(projectile.width / 2)) / 16f), (int)((projectile.position.Y + (float)(projectile.height / 2)) / 16f), 0.15f, 0.01f, 0.15f); Player player9 = Main.player[projectile.owner]; - if (player9.maxMinions > playerMinionSlots) - { - playerMinionSlots = player9.maxMinions; - } - if (runCheck) - { - runCheck = false; - playerMinionSlots = player9.maxMinions; - } CalamityPlayer modPlayer = player9.Calamity(); if ((int)Main.time % 120 == 0) { projectile.netUpdate = true; } - if (!player9.active || player9.maxMinions < playerMinionSlots) - { - projectile.active = false; - return; - } int num1051 = 10; if (player9.dead) { diff --git a/Projectiles/Summon/MechwormHead.cs b/Projectiles/Summon/MechwormHead.cs index aeb975b2ce..94229ff581 100644 --- a/Projectiles/Summon/MechwormHead.cs +++ b/Projectiles/Summon/MechwormHead.cs @@ -11,9 +11,6 @@ namespace CalamityMod.Projectiles.Summon public class MechwormHead : ModProjectile { private int dust = 3; - private int playerMinionSlots = 0; - private bool runCheck = true; - public override void SetStaticDefaults() { DisplayName.SetDefault("Mechworm"); @@ -54,26 +51,12 @@ namespace CalamityMod.Projectiles.Summon } dust--; } - if (player9.maxMinions > playerMinionSlots) - { - playerMinionSlots = player9.maxMinions; - } - if (runCheck) - { - runCheck = false; - playerMinionSlots = player9.maxMinions; - } CalamityPlayer modPlayer = player9.Calamity(); player9.AddBuff(ModContent.BuffType(), 3600); if ((int)Main.time % 120 == 0) { projectile.netUpdate = true; } - if (!player9.active || player9.maxMinions < playerMinionSlots) - { - projectile.active = false; - return; - } int num1051 = 30; if (player9.dead) { diff --git a/Projectiles/Summon/MechwormTail.cs b/Projectiles/Summon/MechwormTail.cs index 3684de995d..a1a56f8c25 100644 --- a/Projectiles/Summon/MechwormTail.cs +++ b/Projectiles/Summon/MechwormTail.cs @@ -54,10 +54,30 @@ namespace CalamityMod.Projectiles.Summon { projectile.netUpdate = true; } + int byUUID = Projectile.GetByUUID(projectile.owner, (int)projectile.ai[0]); if (!player9.active || player9.maxMinions < playerMinionSlots) { - projectile.active = false; - return; + int lostSlots = playerMinionSlots - player9.maxMinions; + while (lostSlots > 0) + { + Projectile ahead = Main.projectile[byUUID]; + // Each body slot is actually 0.5 slots. Kill two segments to lose 1 "true" slot. + for (int i = 0; i < 2; i++) + { + if (ahead.type != ModContent.ProjectileType()) + { + projectile.localAI[1] = ahead.localAI[1]; + } + projectile.ai[0] = ahead.ai[0]; + projectile.ai[1] = 1f; + projectile.netUpdate = true; + ahead.Kill(); + byUUID = Projectile.GetByUUID(projectile.owner, (int)projectile.ai[0]); + ahead = Main.projectile[byUUID]; + } + lostSlots--; + } + playerMinionSlots = player9.maxMinions; } int num1051 = 10; if (player9.dead) @@ -77,7 +97,6 @@ namespace CalamityMod.Projectiles.Summon float num1064; float scaleFactor17; float scaleFactor18; - int byUUID = Projectile.GetByUUID(projectile.owner, (int)projectile.ai[0]); if (byUUID >= 0 && Main.projectile[byUUID].active && (Main.projectile[byUUID].type == ModContent.ProjectileType() || Main.projectile[byUUID].type == ModContent.ProjectileType() || Main.projectile[byUUID].type == ModContent.ProjectileType()))