From ac43dddd63d505d50840e500be68974e70751401 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Fri, 6 Nov 2020 12:25:37 -0600 Subject: [PATCH 01/17] 1 - Fixed Provi rage and adrenaline bug. 2 - Increased how far the player has to be for the screen to turn black in the provi fight. 3 - Increased various true melee weapon sizes. 4 - Reduced Amidias' Trident projectile homing by 66%. 5 - Version bump. --- CalPlayer/CalamityPlayerMiscEffects.cs | 7 ++----- CalamityMod.cs | 4 ++-- Items/Tools/Grax.cs | 1 + Items/Weapons/Melee/AegisBlade.cs | 5 +++-- Items/Weapons/Melee/Aftershock.cs | 1 + Items/Weapons/Melee/AncientCrusher.cs | 5 +++-- Items/Weapons/Melee/Animus.cs | 1 + Items/Weapons/Melee/AstralBlade.cs | 5 +++-- Items/Weapons/Melee/Avalanche.cs | 5 +++-- Items/Weapons/Melee/BladeofEnmity.cs | 1 + Items/Weapons/Melee/CometQuasher.cs | 9 +++++---- Items/Weapons/Melee/Earth.cs | 5 +++-- Items/Weapons/Melee/EvilSmasher.cs | 5 +++-- Items/Weapons/Melee/Greentide.cs | 1 + Items/Weapons/Melee/HolyCollider.cs | 5 +++-- Items/Weapons/Melee/Mariana.cs | 1 + Items/Weapons/Melee/ProfanedSword.cs | 1 + Items/Weapons/Melee/StellarStriker.cs | 5 +++-- Items/Weapons/Melee/TerraEdge.cs | 5 +++-- Items/Weapons/Melee/Terracotta.cs | 5 +++-- Items/Weapons/Melee/TheEnforcer.cs | 5 +++-- Items/Weapons/Melee/TheLastMourning.cs | 1 + Items/Weapons/Melee/TheMutilator.cs | 1 + Items/Weapons/Melee/TitanArm.cs | 1 + NPCs/CalamityGlobalNPC.cs | 8 ++------ Projectiles/Melee/AmidiasWhirlpool.cs | 2 +- build.txt | 2 +- 27 files changed, 56 insertions(+), 41 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 42f1b2df8c..c1574da9f3 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -127,8 +127,8 @@ namespace CalamityMod.CalPlayer float aiTimer = Main.npc[CalamityGlobalNPC.holyBoss].ai[3]; float baseDistance = 2800f; - float shorterFlameCocoonDistance = 1000f; - float shorterSpearCocoonDistance = 1400f; + float shorterFlameCocoonDistance = CalamityWorld.death ? 600f : CalamityWorld.revenge ? 400f : Main.expertMode ? 200f : 0f; + float shorterSpearCocoonDistance = CalamityWorld.death ? 1000f : CalamityWorld.revenge ? 400f : Main.expertMode ? 200f : 0f; float shorterDistance = aiState == 2f ? shorterFlameCocoonDistance : shorterSpearCocoonDistance; float maxDistance = (aiState == 2f || aiState == 5f) ? baseDistance - MathHelper.Lerp(0f, shorterDistance, MathHelper.Clamp(aiTimer / 120f, 0f, 1f)) : baseDistance; @@ -137,9 +137,6 @@ namespace CalamityMod.CalPlayer if (!Main.player[Main.npc[CalamityGlobalNPC.holyBoss].target].Calamity().ZoneAbyss && !Main.player[Main.npc[CalamityGlobalNPC.holyBoss].target].headcovered) ScreenObstruction.screenObstruction = MathHelper.Lerp(ScreenObstruction.screenObstruction, 1f, intensityScalar); - - // Return to prevent running other darkness code - return; } } } diff --git a/CalamityMod.cs b/CalamityMod.cs index 16414ea458..cbb470ed1b 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -1338,8 +1338,8 @@ namespace CalamityMod float aiTimer = Main.npc[CalamityGlobalNPC.holyBoss].ai[3]; float baseDistance = 2800f; - float shorterFlameCocoonDistance = 1000f; - float shorterSpearCocoonDistance = 1400f; + float shorterFlameCocoonDistance = CalamityWorld.death ? 600f : CalamityWorld.revenge ? 400f : Main.expertMode ? 200f : 0f; + float shorterSpearCocoonDistance = CalamityWorld.death ? 1000f : CalamityWorld.revenge ? 400f : Main.expertMode ? 200f : 0f; float shorterDistance = aiState == 2f ? shorterFlameCocoonDistance : shorterSpearCocoonDistance; float maxDistance = (aiState == 2f || aiState == 5f) ? baseDistance - MathHelper.Lerp(0f, shorterDistance, MathHelper.Clamp(aiTimer / 120f, 0f, 1f)) : baseDistance; diff --git a/Items/Tools/Grax.cs b/Items/Tools/Grax.cs index 1bfe946de1..360c8d3549 100644 --- a/Items/Tools/Grax.cs +++ b/Items/Tools/Grax.cs @@ -17,6 +17,7 @@ namespace CalamityMod.Items.Tools { item.width = 62; item.height = 62; + item.scale = 1.5f; item.damage = 500; item.melee = true; item.useAnimation = 16; diff --git a/Items/Weapons/Melee/AegisBlade.cs b/Items/Weapons/Melee/AegisBlade.cs index 5419d91703..29848a0dd8 100644 --- a/Items/Weapons/Melee/AegisBlade.cs +++ b/Items/Weapons/Melee/AegisBlade.cs @@ -20,7 +20,9 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 58; - item.damage = 68; + item.height = 58; + item.scale = 1.5f; + item.damage = 68; item.melee = true; item.useAnimation = item.useTime = 15; item.useTurn = true; @@ -28,7 +30,6 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 4.25f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 58; item.rare = 7; item.value = Item.buyPrice(0, 60, 0, 0); item.shootSpeed = 14f; diff --git a/Items/Weapons/Melee/Aftershock.cs b/Items/Weapons/Melee/Aftershock.cs index 5cbf307cdd..0b74ce2ff5 100644 --- a/Items/Weapons/Melee/Aftershock.cs +++ b/Items/Weapons/Melee/Aftershock.cs @@ -22,6 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee item.melee = true; item.width = 54; item.height = 58; + item.scale = 1.5f; item.useTime = 28; item.useAnimation = 28; item.useTurn = true; diff --git a/Items/Weapons/Melee/AncientCrusher.cs b/Items/Weapons/Melee/AncientCrusher.cs index 4aa33271fa..041305787e 100644 --- a/Items/Weapons/Melee/AncientCrusher.cs +++ b/Items/Weapons/Melee/AncientCrusher.cs @@ -17,7 +17,9 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 62; - item.damage = 55; + item.height = 62; + item.scale = 1.5f; + item.damage = 55; item.melee = true; item.useAnimation = 30; item.useStyle = ItemUseStyleID.SwingThrow; @@ -26,7 +28,6 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 8f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 62; item.value = Item.buyPrice(0, 36, 0, 0); item.rare = 5; } diff --git a/Items/Weapons/Melee/Animus.cs b/Items/Weapons/Melee/Animus.cs index 47ecdb8f88..9aa0a4b94c 100644 --- a/Items/Weapons/Melee/Animus.cs +++ b/Items/Weapons/Melee/Animus.cs @@ -19,6 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee { item.width = 82; item.height = 84; + item.scale = 1.5f; item.damage = 4000; item.melee = true; item.useAnimation = 11; diff --git a/Items/Weapons/Melee/AstralBlade.cs b/Items/Weapons/Melee/AstralBlade.cs index b97cd7a446..f2da69941f 100644 --- a/Items/Weapons/Melee/AstralBlade.cs +++ b/Items/Weapons/Melee/AstralBlade.cs @@ -21,8 +21,9 @@ namespace CalamityMod.Items.Weapons.Melee item.damage = 95; item.crit += 25; item.melee = true; - item.width = 60; - item.height = 60; + item.width = 80; + item.height = 80; + item.scale = 1.5f; item.useTime = 9; item.useAnimation = 9; item.useTurn = true; diff --git a/Items/Weapons/Melee/Avalanche.cs b/Items/Weapons/Melee/Avalanche.cs index c5bfe28f4c..debf7b2db4 100644 --- a/Items/Weapons/Melee/Avalanche.cs +++ b/Items/Weapons/Melee/Avalanche.cs @@ -18,7 +18,9 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 64; - item.damage = 60; + item.height = 64; + item.scale = 1.5f; + item.damage = 60; item.melee = true; item.useAnimation = 30; item.useTime = 30; @@ -27,7 +29,6 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 7.25f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 64; item.value = Item.buyPrice(0, 36, 0, 0); item.rare = 5; } diff --git a/Items/Weapons/Melee/BladeofEnmity.cs b/Items/Weapons/Melee/BladeofEnmity.cs index c7ddba4fe2..7cb1f86660 100644 --- a/Items/Weapons/Melee/BladeofEnmity.cs +++ b/Items/Weapons/Melee/BladeofEnmity.cs @@ -17,6 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee { item.width = 60; item.height = 64; + item.scale = 1.5f; item.damage = 158; item.melee = true; item.useAnimation = 10; diff --git a/Items/Weapons/Melee/CometQuasher.cs b/Items/Weapons/Melee/CometQuasher.cs index 902a6676c3..6e30c51ef6 100644 --- a/Items/Weapons/Melee/CometQuasher.cs +++ b/Items/Weapons/Melee/CometQuasher.cs @@ -17,8 +17,10 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { - item.width = 54; - item.damage = 120; + item.width = 46; + item.height = 62; + item.scale = 1.5f; + item.damage = 120; item.melee = true; item.useAnimation = 22; item.useStyle = ItemUseStyleID.SwingThrow; @@ -27,7 +29,6 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 7.75f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 54; item.value = Item.buyPrice(0, 80, 0, 0); item.rare = 8; item.shootSpeed = 9f; @@ -81,7 +82,7 @@ namespace CalamityMod.Items.Weapons.Melee num79 *= num80; float num114 = num78; float num115 = num79 + (float)Main.rand.Next(-40, 41) * 0.02f; - int proj = Projectile.NewProjectile(vector2.X, vector2.Y, num114 * 0.75f, num115 * 0.75f, ModContent.ProjectileType(), (int)(item.damage * player.MeleeDamage() * 0.75f), knockback, player.whoAmI, 0f, 0.5f + (float)Main.rand.NextDouble() * 0.3f); + int proj = Projectile.NewProjectile(vector2.X, vector2.Y, num114 * 0.75f, num115 * 0.75f, ModContent.ProjectileType(), (int)(item.damage * player.MeleeDamage() * 0.5f), 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/Earth.cs b/Items/Weapons/Melee/Earth.cs index d523e08913..0d399602c1 100644 --- a/Items/Weapons/Melee/Earth.cs +++ b/Items/Weapons/Melee/Earth.cs @@ -25,7 +25,9 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 92; - item.damage = 840; + item.height = 104; + item.scale = 1.5f; + item.damage = 840; item.melee = true; item.useAnimation = 16; item.useStyle = ItemUseStyleID.SwingThrow; @@ -34,7 +36,6 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 9.5f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 104; item.value = Item.buyPrice(5, 0, 0, 0); item.rare = 10; item.Calamity().customRarity = CalamityRarity.Developer; diff --git a/Items/Weapons/Melee/EvilSmasher.cs b/Items/Weapons/Melee/EvilSmasher.cs index bb41ea3578..11bd9c0833 100644 --- a/Items/Weapons/Melee/EvilSmasher.cs +++ b/Items/Weapons/Melee/EvilSmasher.cs @@ -17,7 +17,9 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 62; - item.damage = 55; + item.height = 62; + item.scale = 2f; + item.damage = 55; item.melee = true; item.useAnimation = item.useTime = 30; item.useStyle = ItemUseStyleID.SwingThrow; @@ -25,7 +27,6 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 8f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 62; item.value = Item.buyPrice(0, 36, 0, 0); item.rare = 5; item.Calamity().customRarity = CalamityRarity.RareVariant; diff --git a/Items/Weapons/Melee/Greentide.cs b/Items/Weapons/Melee/Greentide.cs index 05d1284942..6569977637 100644 --- a/Items/Weapons/Melee/Greentide.cs +++ b/Items/Weapons/Melee/Greentide.cs @@ -21,6 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee item.melee = true; item.width = 62; item.height = 62; + item.scale = 1.5f; item.useTime = 24; item.useAnimation = 24; item.useTurn = true; diff --git a/Items/Weapons/Melee/HolyCollider.cs b/Items/Weapons/Melee/HolyCollider.cs index 6c2242bb99..875e6a1f63 100644 --- a/Items/Weapons/Melee/HolyCollider.cs +++ b/Items/Weapons/Melee/HolyCollider.cs @@ -18,7 +18,9 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 94; - item.damage = 400; + item.height = 80; + item.scale = 1.5f; + item.damage = 400; item.melee = true; item.useAnimation = 22; item.useStyle = ItemUseStyleID.SwingThrow; @@ -27,7 +29,6 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 7.75f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 80; item.value = Item.buyPrice(1, 20, 0, 0); item.rare = 10; item.shootSpeed = 10f; diff --git a/Items/Weapons/Melee/Mariana.cs b/Items/Weapons/Melee/Mariana.cs index 0d0c869f39..88a1d160db 100644 --- a/Items/Weapons/Melee/Mariana.cs +++ b/Items/Weapons/Melee/Mariana.cs @@ -22,6 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee item.damage = 90; item.width = 54; item.height = 62; + item.scale = 1.5f; item.melee = true; item.useAnimation = 24; item.useStyle = ItemUseStyleID.SwingThrow; diff --git a/Items/Weapons/Melee/ProfanedSword.cs b/Items/Weapons/Melee/ProfanedSword.cs index aceefd4f42..e853077e62 100644 --- a/Items/Weapons/Melee/ProfanedSword.cs +++ b/Items/Weapons/Melee/ProfanedSword.cs @@ -23,6 +23,7 @@ namespace CalamityMod.Items.Weapons.Melee item.damage = 75; item.melee = true; item.width = item.height = 52; + item.scale = 1.5f; item.useTime = 23; item.useAnimation = 23; item.useTurn = true; diff --git a/Items/Weapons/Melee/StellarStriker.cs b/Items/Weapons/Melee/StellarStriker.cs index ecd72572cd..21e8255558 100644 --- a/Items/Weapons/Melee/StellarStriker.cs +++ b/Items/Weapons/Melee/StellarStriker.cs @@ -17,7 +17,9 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 84; - item.damage = 640; + item.height = 90; + item.scale = 1.5f; + item.damage = 640; item.melee = true; item.useAnimation = 25; item.useStyle = ItemUseStyleID.SwingThrow; @@ -26,7 +28,6 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 7.75f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 90; item.value = Item.buyPrice(1, 20, 0, 0); item.rare = 10; item.shootSpeed = 12f; diff --git a/Items/Weapons/Melee/TerraEdge.cs b/Items/Weapons/Melee/TerraEdge.cs index d3451bfce9..f70bb4ba1a 100644 --- a/Items/Weapons/Melee/TerraEdge.cs +++ b/Items/Weapons/Melee/TerraEdge.cs @@ -19,7 +19,9 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 58; - item.damage = 112; + item.height = 58; + item.scale = 1.5f; + item.damage = 112; item.melee = true; item.useAnimation = 17; item.useStyle = ItemUseStyleID.SwingThrow; @@ -28,7 +30,6 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 6.25f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 58; item.value = Item.buyPrice(0, 80, 0, 0); item.rare = 8; item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Melee/Terracotta.cs b/Items/Weapons/Melee/Terracotta.cs index 8613959193..c87d88c788 100644 --- a/Items/Weapons/Melee/Terracotta.cs +++ b/Items/Weapons/Melee/Terracotta.cs @@ -19,7 +19,9 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 50; - item.damage = 125; + item.height = 62; + item.scale = 1.5f; + item.damage = 125; item.melee = true; item.useAnimation = 17; item.useTime = 17; @@ -28,7 +30,6 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 7f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 62; item.value = Item.buyPrice(0, 80, 0, 0); item.rare = 8; item.shootSpeed = 5f; diff --git a/Items/Weapons/Melee/TheEnforcer.cs b/Items/Weapons/Melee/TheEnforcer.cs index 01e7eebf04..fd2d511bcb 100644 --- a/Items/Weapons/Melee/TheEnforcer.cs +++ b/Items/Weapons/Melee/TheEnforcer.cs @@ -20,7 +20,9 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 100; - item.damage = 1900; + item.height = 100; + item.scale = 1.5f; + item.damage = 1900; item.melee = true; item.useAnimation = 17; item.useStyle = ItemUseStyleID.SwingThrow; @@ -29,7 +31,6 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 9f; item.UseSound = SoundID.Item20; item.autoReuse = true; - item.height = 100; item.value = Item.buyPrice(1, 80, 0, 0); item.rare = 10; item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Melee/TheLastMourning.cs b/Items/Weapons/Melee/TheLastMourning.cs index 70975ce34b..31495d54df 100644 --- a/Items/Weapons/Melee/TheLastMourning.cs +++ b/Items/Weapons/Melee/TheLastMourning.cs @@ -22,6 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee { item.width = 94; item.height = 94; + item.scale = 1.5f; item.melee = true; item.damage = BaseDamage; item.knockBack = 8.5f; diff --git a/Items/Weapons/Melee/TheMutilator.cs b/Items/Weapons/Melee/TheMutilator.cs index b0660650be..55de807630 100644 --- a/Items/Weapons/Melee/TheMutilator.cs +++ b/Items/Weapons/Melee/TheMutilator.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee { item.width = 90; item.height = 90; + item.scale = 1.5f; item.damage = 700; item.melee = true; item.useAnimation = 18; diff --git a/Items/Weapons/Melee/TitanArm.cs b/Items/Weapons/Melee/TitanArm.cs index cf31e4570f..60573b60d7 100644 --- a/Items/Weapons/Melee/TitanArm.cs +++ b/Items/Weapons/Melee/TitanArm.cs @@ -17,6 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee { item.width = 46; item.height = 58; + item.scale = 1.5f; item.damage = 60; item.crit += 96; //more knockback huehue item.melee = true; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 06b3447fc6..bf77740471 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3066,15 +3066,11 @@ namespace CalamityMod.NPCs }*/ // New resists - if (projectile.type == ProjectileType() || projectile.type == ProjectileType()) - { - damage = (int)(damage * 0.2); - } - else if (ProjectileID.Sets.StardustDragon[projectile.type] || projectile.type == ProjectileType() || projectile.type == ProjectileType()) + if (ProjectileID.Sets.StardustDragon[projectile.type] || projectile.type == ProjectileType() || projectile.type == ProjectileType()) { damage = (int)(damage * 0.25); } - else if (projectile.type == ProjectileID.DD2BetsyArrow || projectile.type == ProjectileType() || projectile.type == ProjectileType() || projectile.type == ProjectileType()) + else if (projectile.type == ProjectileType() || projectile.type == ProjectileType() || projectile.type == ProjectileID.DD2BetsyArrow || projectile.type == ProjectileType() || projectile.type == ProjectileType() || projectile.type == ProjectileType()) { damage = (int)(damage * 0.5); } diff --git a/Projectiles/Melee/AmidiasWhirlpool.cs b/Projectiles/Melee/AmidiasWhirlpool.cs index 6dc23c828d..b197c6f61c 100644 --- a/Projectiles/Melee/AmidiasWhirlpool.cs +++ b/Projectiles/Melee/AmidiasWhirlpool.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Melee int num3; projectile.rotation -= 0.104719758f; Vector2 vector145 = projectile.Center; - float num1015 = 300f; + float num1015 = 100f; bool flag59 = false; int num1016 = 0; if (projectile.ai[1] == 0f) diff --git a/build.txt b/build.txt index d530a48340..67d3720ef7 100644 --- a/build.txt +++ b/build.txt @@ -1,5 +1,5 @@ author = Fabsol and the Dev Team -version = 1.4.5.004 +version = 1.4.5.005 displayName = Calamity Mod (No Calamity Music) homepage = https://forums.terraria.org/index.php?threads/calamity-mod.44065/ buildIgnore = .vs\*, Properties\*, *.csproj, *.user, obj\*, bin\*, *.config, .git\*, LICENSE, README.md, .editorconfig, .gitignore, .gitattributes From 1bf3de0b06ffc444935519666faf030aa5fde1cb Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Mon, 9 Nov 2020 19:50:33 -0600 Subject: [PATCH 02/17] 1 - Reduced severity of boss rush i-frame curse from 5 seconds to 3 seconds. 2 - Provi darkness is now at max distance during all attacks while any guardian is alive. 3 - Elemental Quiver increases ranged damage by 15% instead of 10%. 4 - Increased Frequency Manipulator damage by 13 and made it throw the spear sooner. 5 - Increased Galvanizing Glaive damage by 16 and made the spear itself ignore more i-frames. 6 - Increased Gauss Dagger size by 50% and allowed the player to turn while using it. 7 - Decreased Gauss Pistol damage by 20 and made the projectile stay still for half the time. 8 - Increased Plasma Grenade damage by 1000 and gave it an impact sound. 9 - Increased Pulse Rifle damage by 2000. 10 - Increased Snake Eyes damage by 15 and made the leash distance longer. 11 - Decreased Taser damage by 6 and increased the velocity of it. 12 - Increased Tesla Cannon damage by 5000 and increased split beam damage by 10%. 13 - Tripled Wave Pounder damage. 14 - Reduced Shadowdrop Staff projectiles from 20 per use to 6 and reduced spread by 75%. 15 - Increased Ancient Crusher size by 50% again. 16 - Increased Astral Blade damage due to how dangerous it is to use at times. 17 - Gave Brimlance, Earthen Pike, Fulguration Halberd, Goldplume Spear, Hellion Flower Spear, Marnite Spear, Sausage Maker, Starnight Lance, Urchin Spear and Yateveo Bloom autoswing. 18 - Increased Earthen Pike, Majestic Guard and Fulguration Halberd size by 50%. 19 - Decreased Insidious Impaler damage by 40. 20 - Ultimus Cleaver explodes on hit now and increased size by 50%. 21 - Decreased Arterial Assault damage by 32. 22 - Onyxia onyx shard travels further. 23 - Increased God's Bellows range. 24 - Made SCal bullet hell 5 feel less rng with how full or empty it can sometimes feel. 25 - Reduced how often Supreme Catastrophe fires projectiles. 26 - Reduced how insane Old Duke is in Boss Rush. 27 - Reduced Rev+ Destroyer laser speed again from 14 to 12. 28 - Fixed a bug with Rev+ Destroyer flying phase lights where they'd show even when broken. 29 - Dark Energies resist piercing. 30 - Skeletron Head is now immune to all debuffs. 31 - Storm Weaver phase 2 resists Wave Pounder. 32 - Increased Volt Crasher Voltage Stream damage. 33 - Destroyer and Aquatic Scourge resist Volt Crasher. 34 - Gauss Rifle dust particles are smaller and the explosion no longer vanishes when tiles are near it, made the explosion pierce infinitely. 35 - Pole Warpers ignore more i-frames. 36 - Gave Pulse Dragon an extra update. 37 - Decreased Tracking Disk laser damage. 38 - Matter Modulator projectiles now deal a third of their damage if they haven't hit a tile yet to avoid confusion. 39 - Astral Pike stars now home in. 40 - Gilded Proboscis heals less often. 41 - Increased Goldplume Spear feather damage. 42 - Increased Avalanche ice shard damage. 43 - Gave Mourningstar an extra update and made it ignore more i-frames. 44 - True Caustic Edge projectiles no longer gain damage on tile collision. 45 - Version bump. --- CalPlayer/CalamityPlayer.cs | 2 +- CalPlayer/CalamityPlayerMiscEffects.cs | 19 ++++++- CalamityConfig.cs | 2 +- CalamityMod.cs | 19 ++++++- Items/Accessories/ElementalQuiver.cs | 4 +- Items/CalamityGlobalItem.cs | 8 +-- .../DraedonsArsenal/FrequencyManipulator.cs | 2 +- .../DraedonsArsenal/GalvanizingGlaive.cs | 3 +- Items/Weapons/DraedonsArsenal/GaussDagger.cs | 3 +- Items/Weapons/DraedonsArsenal/GaussPistol.cs | 2 +- .../Weapons/DraedonsArsenal/PlasmaGrenade.cs | 2 +- Items/Weapons/DraedonsArsenal/PulseRifle.cs | 2 +- Items/Weapons/DraedonsArsenal/SnakeEyes.cs | 2 +- Items/Weapons/DraedonsArsenal/Taser.cs | 2 +- Items/Weapons/DraedonsArsenal/TeslaCannon.cs | 2 +- Items/Weapons/DraedonsArsenal/WavePounder.cs | 2 +- Items/Weapons/Magic/ShadowdropStaff.cs | 6 +-- Items/Weapons/Melee/AncientCrusher.cs | 2 +- Items/Weapons/Melee/AstralBlade.cs | 2 +- Items/Weapons/Melee/Brimlance.cs | 6 ++- Items/Weapons/Melee/DiseasedPike.cs | 14 +---- Items/Weapons/Melee/EarthenPike.cs | 8 +-- Items/Weapons/Melee/ExsanguinationLance.cs | 14 +---- Items/Weapons/Melee/FulgurationHalberd.cs | 14 ++--- Items/Weapons/Melee/GildedProboscis.cs | 14 +---- Items/Weapons/Melee/GoldplumeSpear.cs | 6 ++- Items/Weapons/Melee/HellionFlowerSpear.cs | 6 ++- Items/Weapons/Melee/InsidiousImpaler.cs | 16 ++---- Items/Weapons/Melee/MajesticGuard.cs | 5 +- Items/Weapons/Melee/MarniteSpear.cs | 6 ++- Items/Weapons/Melee/Nadir.cs | 10 +--- Items/Weapons/Melee/SausageMaker.cs | 6 ++- Items/Weapons/Melee/SpatialLance.cs | 14 +---- Items/Weapons/Melee/StarnightLance.cs | 6 ++- Items/Weapons/Melee/StreamGouge.cs | 14 +---- Items/Weapons/Melee/TerraLance.cs | 14 +---- Items/Weapons/Melee/UltimusCleaver.cs | 51 ++++++++++++++++-- Items/Weapons/Melee/UrchinSpear.cs | 6 ++- Items/Weapons/Melee/YateveoBloom.cs | 11 ++-- Items/Weapons/Ranged/ArterialAssault.cs | 2 +- Items/Weapons/Ranged/Onyxia.cs | 3 +- Items/Weapons/Ranged/TheEmpyrean.cs | 2 +- NPCs/CalamityAI.cs | 8 +-- NPCs/CalamityGlobalAI.cs | 2 +- NPCs/CalamityGlobalNPC.cs | 40 +++++++------- NPCs/CeaselessVoid/DarkEnergy.cs | 9 ---- NPCs/CeaselessVoid/DarkEnergy2.cs | 9 ---- NPCs/CeaselessVoid/DarkEnergy3.cs | 9 ---- NPCs/SupremeCalamitas/SupremeCalamitas.cs | 2 +- NPCs/SupremeCalamitas/SupremeCatastrophe.cs | 2 +- Projectiles/Boss/DestroyerCursedLaser.cs | 2 +- Projectiles/Boss/DestroyerElectricLaser.cs | 2 +- Projectiles/CalamityGlobalProjectile.cs | 2 +- .../FrequencyManipulatorProjectile.cs | 2 +- .../GalvanizingGlaiveProjectile.cs | 2 +- .../DraedonsArsenal/GaussPistolShot.cs | 2 +- .../DraedonsArsenal/GaussRifleBlast.cs | 5 +- .../DraedonsArsenal/GaussRifleExplosion.cs | 7 +-- .../HydraulicVoltCrasherProjectile.cs | 5 +- .../PlasmaGrenadeProjectile.cs | 5 +- .../DraedonsArsenal/PoleWarperSummon.cs | 9 +++- .../DraedonsArsenal/PulseDragonProjectile.cs | 1 + Projectiles/DraedonsArsenal/PulseRifleShot.cs | 4 +- .../DraedonsArsenal/SnakeEyesSummon.cs | 13 ++++- .../DraedonsArsenal/StarSwallowerSummon.cs | 11 +++- Projectiles/DraedonsArsenal/TaserHook.cs | 7 ++- .../DraedonsArsenal/TeslaCannonShot.cs | 2 +- .../DraedonsArsenal/TrackingDiskProjectile.cs | 5 +- Projectiles/DraedonsArsenal/UnstableMatter.cs | 9 ++-- Projectiles/DraedonsArsenal/VoltageStream.cs | 6 +-- .../DraedonsArsenal/WavePounderBoom.cs | 7 +++ Projectiles/Melee/IceBombFriendly.cs | 7 ++- Projectiles/Melee/MourningstarFlail.cs | 9 ++-- Projectiles/Melee/Spears/AstralPikeProj.cs | 2 +- Projectiles/Melee/Spears/EarthenPikeSpear.cs | 1 + .../Melee/Spears/FulgurationHalberdProj.cs | 5 +- .../Melee/Spears/GildedProboscisProj.cs | 7 ++- .../Melee/Spears/GoldplumeSpearProjectile.cs | 2 +- .../Melee/Spears/InsidiousImpalerProj.cs | 2 +- .../Melee/TrueCausticEdgeProjectile.cs | 1 - Projectiles/Ranged/CorossiveFlames.cs | 4 -- Projectiles/Ranged/CosmicFire.cs | 6 +-- Projectiles/Typeless/AstralStar.cs | 3 ++ Projectiles/Typeless/UnstableSpark.cs | 4 -- Sounds/Item/PlasmaGrenadeExplosion.cs | 18 +++++++ Sounds/Item/PlasmaGrenadeExplosion.ogg | Bin 0 -> 17070 bytes build.txt | 2 +- 87 files changed, 331 insertions(+), 265 deletions(-) create mode 100644 Sounds/Item/PlasmaGrenadeExplosion.cs create mode 100644 Sounds/Item/PlasmaGrenadeExplosion.ogg diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 7ac0fbad50..3bc380a5b5 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -7896,7 +7896,7 @@ namespace CalamityMod.CalPlayer } if (BossRushEvent.BossRushActive && CalamityConfig.Instance.BossRushImmunityFrameCurse) { - bossRushImmunityFrameCurseTimer = 300 + player.immuneTime; + bossRushImmunityFrameCurseTimer = 180 + player.immuneTime; } if (damage > 25) { diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index c1574da9f3..9f3f598f6f 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -131,7 +131,24 @@ namespace CalamityMod.CalPlayer float shorterSpearCocoonDistance = CalamityWorld.death ? 1000f : CalamityWorld.revenge ? 400f : Main.expertMode ? 200f : 0f; float shorterDistance = aiState == 2f ? shorterFlameCocoonDistance : shorterSpearCocoonDistance; - float maxDistance = (aiState == 2f || aiState == 5f) ? baseDistance - MathHelper.Lerp(0f, shorterDistance, MathHelper.Clamp(aiTimer / 120f, 0f, 1f)) : baseDistance; + bool guardianAlive = false; + if (CalamityGlobalNPC.holyBossAttacker != -1) + { + if (Main.npc[CalamityGlobalNPC.holyBossAttacker].active) + guardianAlive = true; + } + if (CalamityGlobalNPC.holyBossDefender != -1) + { + if (Main.npc[CalamityGlobalNPC.holyBossDefender].active) + guardianAlive = true; + } + if (CalamityGlobalNPC.holyBossHealer != -1) + { + if (Main.npc[CalamityGlobalNPC.holyBossHealer].active) + guardianAlive = true; + } + + float maxDistance = guardianAlive ? baseDistance : (aiState == 2f || aiState == 5f) ? baseDistance - MathHelper.Lerp(0f, shorterDistance, MathHelper.Clamp(aiTimer / 120f, 0f, 1f)) : baseDistance; float drawDarknessDistance = maxDistance - 400f; float intensityScalar = MathHelper.Lerp(0f, 0.9f, MathHelper.Clamp((x - drawDarknessDistance) / 400f, 0f, 1f)); diff --git a/CalamityConfig.cs b/CalamityConfig.cs index f0b38ccf3d..86eda6b763 100644 --- a/CalamityConfig.cs +++ b/CalamityConfig.cs @@ -258,7 +258,7 @@ namespace CalamityMod [Label("Immunity Frame Curse")] [BackgroundColor(192, 54, 64, 192)] [DefaultValue(false)] - [Tooltip("During the Boss Rush, being hit twice within five seconds will cause instant death.\nThis effect ignores revives.")] + [Tooltip("During the Boss Rush, being hit twice within three seconds will cause instant death.\nThis effect ignores revives.")] public bool BossRushImmunityFrameCurse { get; set; } [Label("Xeroc Curse")] diff --git a/CalamityMod.cs b/CalamityMod.cs index cbb470ed1b..464591ab3f 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -1342,7 +1342,24 @@ namespace CalamityMod float shorterSpearCocoonDistance = CalamityWorld.death ? 1000f : CalamityWorld.revenge ? 400f : Main.expertMode ? 200f : 0f; float shorterDistance = aiState == 2f ? shorterFlameCocoonDistance : shorterSpearCocoonDistance; - float maxDistance = (aiState == 2f || aiState == 5f) ? baseDistance - MathHelper.Lerp(0f, shorterDistance, MathHelper.Clamp(aiTimer / 120f, 0f, 1f)) : baseDistance; + bool guardianAlive = false; + if (CalamityGlobalNPC.holyBossAttacker != -1) + { + if (Main.npc[CalamityGlobalNPC.holyBossAttacker].active) + guardianAlive = true; + } + if (CalamityGlobalNPC.holyBossDefender != -1) + { + if (Main.npc[CalamityGlobalNPC.holyBossDefender].active) + guardianAlive = true; + } + if (CalamityGlobalNPC.holyBossHealer != -1) + { + if (Main.npc[CalamityGlobalNPC.holyBossHealer].active) + guardianAlive = true; + } + + float maxDistance = guardianAlive ? baseDistance : (aiState == 2f || aiState == 5f) ? baseDistance - MathHelper.Lerp(0f, shorterDistance, MathHelper.Clamp(aiTimer / 120f, 0f, 1f)) : baseDistance; float drawDarknessDistance = maxDistance - 400f; float intensityScalar = MathHelper.Lerp(0f, 0.9f, MathHelper.Clamp((x - drawDarknessDistance) / 400f, 0f, 1f)); scale -= intensityScalar; diff --git a/Items/Accessories/ElementalQuiver.cs b/Items/Accessories/ElementalQuiver.cs index 436a162c75..be8033ab9b 100644 --- a/Items/Accessories/ElementalQuiver.cs +++ b/Items/Accessories/ElementalQuiver.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Accessories { DisplayName.SetDefault("Elemental Quiver"); Tooltip.SetDefault("Ranged projectiles have a chance to split\n" + - "10% increased ranged damage, 5% increased ranged critical strike chance, and 20% reduced ammo usage\n" + + "15% increased ranged damage, 5% increased ranged critical strike chance, and 20% reduced ammo usage\n" + "5 increased defense, 2 increased life regen, and 15% increased pick speed\n" + "Greatly increases arrow speed and grants a 20% chance to not consume arrows"); } @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.eQuiver = true; - player.rangedDamage += 0.1f; + player.rangedDamage += 0.15f; player.rangedCrit += 5; player.ammoCost80 = true; player.lifeRegen += 2; diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index de7826354c..4ee8b61c1f 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -261,16 +261,16 @@ namespace CalamityMod.Items if (player.whoAmI == Main.myPlayer) { if (item.melee) - Projectile.NewProjectile(position, velocity * 0.5f, ModContent.ProjectileType(), CalamityUtils.DamageSoftCap(newDamage * 0.4, 60), 0f, player.whoAmI); + Projectile.NewProjectile(position, velocity * 0.5f, ModContent.ProjectileType(), CalamityUtils.DamageSoftCap(newDamage * 0.6, 60), 0f, player.whoAmI); else if (rogue) - Projectile.NewProjectile(position, velocity, ModContent.ProjectileType(), CalamityUtils.DamageSoftCap(newDamage * 0.35, 50), 0f, player.whoAmI); + Projectile.NewProjectile(position, velocity, ModContent.ProjectileType(), CalamityUtils.DamageSoftCap(newDamage * 0.5, 50), 0f, player.whoAmI); else if (item.ranged) - Projectile.NewProjectile(position, velocity * 1.5f, ModContent.ProjectileType(), CalamityUtils.DamageSoftCap(newDamage * 0.275, 40), 0f, player.whoAmI); + Projectile.NewProjectile(position, velocity * 1.5f, ModContent.ProjectileType(), CalamityUtils.DamageSoftCap(newDamage * 0.4, 40), 0f, player.whoAmI); else if (item.magic) - Projectile.NewProjectile(position, velocity, ModContent.ProjectileType(), CalamityUtils.DamageSoftCap(newDamage * 0.525, 80), 0f, player.whoAmI); + Projectile.NewProjectile(position, velocity, ModContent.ProjectileType(), CalamityUtils.DamageSoftCap(newDamage * 0.8, 80), 0f, player.whoAmI); else if (item.summon && player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) Projectile.NewProjectile(position, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, player.whoAmI); diff --git a/Items/Weapons/DraedonsArsenal/FrequencyManipulator.cs b/Items/Weapons/DraedonsArsenal/FrequencyManipulator.cs index a551b39db6..00c8889fbe 100644 --- a/Items/Weapons/DraedonsArsenal/FrequencyManipulator.cs +++ b/Items/Weapons/DraedonsArsenal/FrequencyManipulator.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { CalamityGlobalItem modItem = item.Calamity(); - item.damage = 67; + item.damage = 80; modItem.rogue = true; item.noMelee = true; item.noUseGraphic = true; diff --git a/Items/Weapons/DraedonsArsenal/GalvanizingGlaive.cs b/Items/Weapons/DraedonsArsenal/GalvanizingGlaive.cs index 961fc9a277..a55146abb1 100644 --- a/Items/Weapons/DraedonsArsenal/GalvanizingGlaive.cs +++ b/Items/Weapons/DraedonsArsenal/GalvanizingGlaive.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.width = 56; item.height = 52; - item.damage = 84; + item.damage = 100; item.noMelee = true; item.noUseGraphic = true; item.channel = true; @@ -56,6 +56,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, swingOffset); return false; } + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); diff --git a/Items/Weapons/DraedonsArsenal/GaussDagger.cs b/Items/Weapons/DraedonsArsenal/GaussDagger.cs index f25b19912e..780a838702 100644 --- a/Items/Weapons/DraedonsArsenal/GaussDagger.cs +++ b/Items/Weapons/DraedonsArsenal/GaussDagger.cs @@ -24,10 +24,11 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.melee = true; item.width = 26; item.height = 26; + item.scale = 1.5f; item.useTime = 24; item.useAnimation = 24; item.useStyle = ItemUseStyleID.SwingThrow; - item.useTurn = false; + item.useTurn = true; item.knockBack = 7f; item.value = CalamityGlobalItem.Rarity3BuyPrice; diff --git a/Items/Weapons/DraedonsArsenal/GaussPistol.cs b/Items/Weapons/DraedonsArsenal/GaussPistol.cs index a953976c33..ff9b51e329 100644 --- a/Items/Weapons/DraedonsArsenal/GaussPistol.cs +++ b/Items/Weapons/DraedonsArsenal/GaussPistol.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.height = 22; item.magic = true; item.mana = 6; - item.damage = 130; + item.damage = 110; item.knockBack = 11f; item.useTime = item.useAnimation = 20; item.autoReuse = true; diff --git a/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs b/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs index 1b7b3b1ecc..3a40a34e13 100644 --- a/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs +++ b/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.width = 22; item.height = 28; - item.damage = 8572; + item.damage = 9572; item.noMelee = true; item.noUseGraphic = true; item.consumable = true; diff --git a/Items/Weapons/DraedonsArsenal/PulseRifle.cs b/Items/Weapons/DraedonsArsenal/PulseRifle.cs index 1fbe18dac1..a988bf5811 100644 --- a/Items/Weapons/DraedonsArsenal/PulseRifle.cs +++ b/Items/Weapons/DraedonsArsenal/PulseRifle.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { public class PulseRifle : ModItem { - private int BaseDamage = 6560; + private int BaseDamage = 8560; public override void SetStaticDefaults() { diff --git a/Items/Weapons/DraedonsArsenal/SnakeEyes.cs b/Items/Weapons/DraedonsArsenal/SnakeEyes.cs index f4bdd3859a..1cb501276d 100644 --- a/Items/Weapons/DraedonsArsenal/SnakeEyes.cs +++ b/Items/Weapons/DraedonsArsenal/SnakeEyes.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal CalamityGlobalItem modItem = item.Calamity(); item.shootSpeed = 10f; - item.damage = 40; + item.damage = 55; item.mana = 12; item.width = 38; item.height = 24; diff --git a/Items/Weapons/DraedonsArsenal/Taser.cs b/Items/Weapons/DraedonsArsenal/Taser.cs index fe5560b622..19f7a9c04a 100644 --- a/Items/Weapons/DraedonsArsenal/Taser.cs +++ b/Items/Weapons/DraedonsArsenal/Taser.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.width = 50; item.height = 26; item.ranged = true; - item.damage = 28; + item.damage = 22; item.knockBack = 0f; item.useTime = item.useAnimation = 28; item.autoReuse = true; diff --git a/Items/Weapons/DraedonsArsenal/TeslaCannon.cs b/Items/Weapons/DraedonsArsenal/TeslaCannon.cs index 47125edc7a..4943771a4a 100644 --- a/Items/Weapons/DraedonsArsenal/TeslaCannon.cs +++ b/Items/Weapons/DraedonsArsenal/TeslaCannon.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { public class TeslaCannon : ModItem { - private int BaseDamage = 10000; + private int BaseDamage = 15000; public override void SetStaticDefaults() { diff --git a/Items/Weapons/DraedonsArsenal/WavePounder.cs b/Items/Weapons/DraedonsArsenal/WavePounder.cs index d1084e1500..17a57f20e0 100644 --- a/Items/Weapons/DraedonsArsenal/WavePounder.cs +++ b/Items/Weapons/DraedonsArsenal/WavePounder.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { CalamityGlobalItem modItem = item.Calamity(); - item.damage = 34; + item.damage = 102; modItem.rogue = true; item.noMelee = true; item.noUseGraphic = true; diff --git a/Items/Weapons/Magic/ShadowdropStaff.cs b/Items/Weapons/Magic/ShadowdropStaff.cs index 296c86aa69..d229784ee4 100644 --- a/Items/Weapons/Magic/ShadowdropStaff.cs +++ b/Items/Weapons/Magic/ShadowdropStaff.cs @@ -75,7 +75,7 @@ namespace CalamityMod.Items.Weapons.Magic num80 = num72 / num80; } - int num107 = 10; + int num107 = 3; for (int num108 = 0; num108 < num107; num108++) { 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); @@ -95,8 +95,8 @@ namespace CalamityMod.Items.Weapons.Magic num80 = num72 / num80; num78 *= num80; num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-120, 121) * 0.02f; - float speedY5 = num79 + (float)Main.rand.Next(-120, 121) * 0.02f; + float speedX4 = num78 + (float)Main.rand.Next(-30, 31) * 0.02f; + float speedY5 = num79 + (float)Main.rand.Next(-30, 31) * 0.02f; Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(10)); } return false; diff --git a/Items/Weapons/Melee/AncientCrusher.cs b/Items/Weapons/Melee/AncientCrusher.cs index 041305787e..6c95b91503 100644 --- a/Items/Weapons/Melee/AncientCrusher.cs +++ b/Items/Weapons/Melee/AncientCrusher.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee { item.width = 62; item.height = 62; - item.scale = 1.5f; + item.scale = 2f; item.damage = 55; item.melee = true; item.useAnimation = 30; diff --git a/Items/Weapons/Melee/AstralBlade.cs b/Items/Weapons/Melee/AstralBlade.cs index f2da69941f..8eb06354a1 100644 --- a/Items/Weapons/Melee/AstralBlade.cs +++ b/Items/Weapons/Melee/AstralBlade.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { - item.damage = 95; + item.damage = 110; item.crit += 25; item.melee = true; item.width = 80; diff --git a/Items/Weapons/Melee/Brimlance.cs b/Items/Weapons/Melee/Brimlance.cs index b3f400c4b6..50af12bac7 100644 --- a/Items/Weapons/Melee/Brimlance.cs +++ b/Items/Weapons/Melee/Brimlance.cs @@ -26,12 +26,14 @@ namespace CalamityMod.Items.Weapons.Melee item.useTime = 19; item.knockBack = 7.5f; item.UseSound = SoundID.Item1; - item.autoReuse = false; + item.autoReuse = true; item.height = 56; item.value = Item.buyPrice(0, 36, 0, 0); item.rare = 5; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; } - } + + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; + } } diff --git a/Items/Weapons/Melee/DiseasedPike.cs b/Items/Weapons/Melee/DiseasedPike.cs index 2bf14a10a8..12fa1f55a6 100644 --- a/Items/Weapons/Melee/DiseasedPike.cs +++ b/Items/Weapons/Melee/DiseasedPike.cs @@ -34,16 +34,6 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 10f; } - public override bool CanUseItem(Player player) - { - for (int i = 0; i < 1000; ++i) - { - if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == item.shoot) - { - return false; - } - } - return true; - } - } + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; + } } diff --git a/Items/Weapons/Melee/EarthenPike.cs b/Items/Weapons/Melee/EarthenPike.cs index c805164c20..b8063b16c9 100644 --- a/Items/Weapons/Melee/EarthenPike.cs +++ b/Items/Weapons/Melee/EarthenPike.cs @@ -27,12 +27,14 @@ namespace CalamityMod.Items.Weapons.Melee item.useTime = 25; item.knockBack = 7f; item.UseSound = SoundID.Item1; - item.autoReuse = false; + item.autoReuse = true; item.height = 60; item.value = Item.buyPrice(0, 36, 0, 0); item.rare = 5; item.shoot = ModContent.ProjectileType(); - item.shootSpeed = 6f; + item.shootSpeed = 8f; } - } + + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; + } } diff --git a/Items/Weapons/Melee/ExsanguinationLance.cs b/Items/Weapons/Melee/ExsanguinationLance.cs index e0bd75f771..1384db9587 100644 --- a/Items/Weapons/Melee/ExsanguinationLance.cs +++ b/Items/Weapons/Melee/ExsanguinationLance.cs @@ -35,19 +35,9 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 8f; } - public override bool CanUseItem(Player player) - { - for (int i = 0; i < 1000; ++i) - { - if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == item.shoot) - { - return false; - } - } - return true; - } + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; - public override void AddRecipes() + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 10); diff --git a/Items/Weapons/Melee/FulgurationHalberd.cs b/Items/Weapons/Melee/FulgurationHalberd.cs index dec29f09b8..f17f2c2418 100644 --- a/Items/Weapons/Melee/FulgurationHalberd.cs +++ b/Items/Weapons/Melee/FulgurationHalberd.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee { item.width = 60; item.height = 64; + item.scale = 1.5f; item.damage = 53; item.melee = true; item.useAnimation = 22; @@ -31,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee item.autoReuse = true; item.value = Item.buyPrice(0, 36, 0, 0); item.rare = 5; - item.shootSpeed = 6f; + item.shootSpeed = 8f; } public override bool AltFunctionUse(Player player) @@ -46,21 +47,20 @@ namespace CalamityMod.Items.Weapons.Melee item.noMelee = true; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.HoldingOut; - item.autoReuse = false; item.shoot = ModContent.ProjectileType(); - } + return player.ownedProjectileCounts[item.shoot] <= 0; + } else { item.noMelee = false; item.noUseGraphic = false; item.useStyle = ItemUseStyleID.SwingThrow; - item.autoReuse = true; item.shoot = ProjectileID.None; - } - return base.CanUseItem(player); + return base.CanUseItem(player); + } } - public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, 0f); return false; diff --git a/Items/Weapons/Melee/GildedProboscis.cs b/Items/Weapons/Melee/GildedProboscis.cs index 4e275e09ff..1dceada2b2 100644 --- a/Items/Weapons/Melee/GildedProboscis.cs +++ b/Items/Weapons/Melee/GildedProboscis.cs @@ -36,16 +36,6 @@ namespace CalamityMod.Items.Weapons.Melee item.Calamity().customRarity = CalamityRarity.Turquoise; } - public override bool CanUseItem(Player player) - { - for (int i = 0; i < Main.maxProjectiles; ++i) - { - if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == item.shoot) - { - return false; - } - } - return true; - } - } + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; + } } diff --git a/Items/Weapons/Melee/GoldplumeSpear.cs b/Items/Weapons/Melee/GoldplumeSpear.cs index 9a521df477..216ca2b0bc 100644 --- a/Items/Weapons/Melee/GoldplumeSpear.cs +++ b/Items/Weapons/Melee/GoldplumeSpear.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee item.useTime = 23; item.knockBack = 5.75f; item.UseSound = SoundID.Item1; - item.autoReuse = false; + item.autoReuse = true; item.height = 54; item.value = Item.buyPrice(0, 4, 0, 0); item.rare = 3; @@ -35,7 +35,9 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 5f; } - public override void AddRecipes() + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; + + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 10); diff --git a/Items/Weapons/Melee/HellionFlowerSpear.cs b/Items/Weapons/Melee/HellionFlowerSpear.cs index bafef201d8..07f52348d2 100644 --- a/Items/Weapons/Melee/HellionFlowerSpear.cs +++ b/Items/Weapons/Melee/HellionFlowerSpear.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Melee item.useTime = 20; item.knockBack = 7.5f; item.UseSound = SoundID.Item1; - item.autoReuse = false; + item.autoReuse = true; item.height = 64; item.value = Item.buyPrice(0, 60, 0, 0); item.rare = 7; @@ -36,7 +36,9 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 8f; } - public override void AddRecipes() + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; + + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 12); diff --git a/Items/Weapons/Melee/InsidiousImpaler.cs b/Items/Weapons/Melee/InsidiousImpaler.cs index 1c6669f6f7..c9e30784dd 100644 --- a/Items/Weapons/Melee/InsidiousImpaler.cs +++ b/Items/Weapons/Melee/InsidiousImpaler.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 66; - item.damage = 390; + item.damage = 350; item.melee = true; item.noMelee = true; item.useTurn = true; @@ -35,16 +35,6 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 5f; } - public override bool CanUseItem(Player player) - { - for (int i = 0; i < Main.maxProjectiles; ++i) - { - if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == item.shoot) - { - return false; - } - } - return true; - } - } + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; + } } diff --git a/Items/Weapons/Melee/MajesticGuard.cs b/Items/Weapons/Melee/MajesticGuard.cs index 71889588be..097db304c8 100644 --- a/Items/Weapons/Melee/MajesticGuard.cs +++ b/Items/Weapons/Melee/MajesticGuard.cs @@ -16,7 +16,9 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 98; - item.damage = 60; + item.height = 98; + item.scale = 1.5f; + item.damage = 60; item.melee = true; item.useAnimation = 22; item.useStyle = ItemUseStyleID.SwingThrow; @@ -25,7 +27,6 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 7.5f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 98; item.value = Item.buyPrice(0, 36, 0, 0); item.rare = 5; } diff --git a/Items/Weapons/Melee/MarniteSpear.cs b/Items/Weapons/Melee/MarniteSpear.cs index 830da229cf..a239132583 100644 --- a/Items/Weapons/Melee/MarniteSpear.cs +++ b/Items/Weapons/Melee/MarniteSpear.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Melee item.useTime = 21; item.knockBack = 5.25f; item.UseSound = SoundID.Item1; - item.autoReuse = false; + item.autoReuse = true; item.height = 50; item.value = Item.buyPrice(0, 2, 0, 0); item.rare = 2; @@ -33,7 +33,9 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 5f; } - public override void AddRecipes() + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; + + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddRecipeGroup("AnyGoldBar", 5); diff --git a/Items/Weapons/Melee/Nadir.cs b/Items/Weapons/Melee/Nadir.cs index dda2c9cee2..70e9c9d161 100644 --- a/Items/Weapons/Melee/Nadir.cs +++ b/Items/Weapons/Melee/Nadir.cs @@ -43,15 +43,9 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = ShootSpeed; } - public override bool CanUseItem(Player player) - { - for (int i = 0; i < Main.projectile.Length; ++i) - if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == item.shoot) - return false; - return true; - } + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; - public override void AddRecipes() + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType()); diff --git a/Items/Weapons/Melee/SausageMaker.cs b/Items/Weapons/Melee/SausageMaker.cs index 03528cd944..3887697449 100644 --- a/Items/Weapons/Melee/SausageMaker.cs +++ b/Items/Weapons/Melee/SausageMaker.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee item.useTime = 20; item.knockBack = 6.25f; item.UseSound = SoundID.Item1; - item.autoReuse = false; + item.autoReuse = true; item.height = 42; item.value = Item.buyPrice(0, 4, 0, 0); item.rare = 3; @@ -35,7 +35,9 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 6f; } - public override void AddRecipes() + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; + + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 8); diff --git a/Items/Weapons/Melee/SpatialLance.cs b/Items/Weapons/Melee/SpatialLance.cs index ac33398c35..3af7fa4015 100644 --- a/Items/Weapons/Melee/SpatialLance.cs +++ b/Items/Weapons/Melee/SpatialLance.cs @@ -37,19 +37,9 @@ namespace CalamityMod.Items.Weapons.Melee item.Calamity().customRarity = CalamityRarity.Turquoise; } - public override bool CanUseItem(Player player) - { - for (int i = 0; i < 1000; ++i) - { - if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == item.shoot) - { - return false; - } - } - return true; - } + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; - public override void AddRecipes() + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType()); diff --git a/Items/Weapons/Melee/StarnightLance.cs b/Items/Weapons/Melee/StarnightLance.cs index 0d710c75aa..52b654659f 100644 --- a/Items/Weapons/Melee/StarnightLance.cs +++ b/Items/Weapons/Melee/StarnightLance.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee item.useTime = 23; item.knockBack = 6; item.UseSound = SoundID.Item1; - item.autoReuse = false; + item.autoReuse = true; item.height = 72; item.value = Item.buyPrice(0, 36, 0, 0); item.rare = 5; @@ -35,7 +35,9 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 6f; } - public override void AddRecipes() + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; + + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 12); diff --git a/Items/Weapons/Melee/StreamGouge.cs b/Items/Weapons/Melee/StreamGouge.cs index 4ab2194d10..e35d312743 100644 --- a/Items/Weapons/Melee/StreamGouge.cs +++ b/Items/Weapons/Melee/StreamGouge.cs @@ -45,19 +45,9 @@ namespace CalamityMod.Items.Weapons.Melee spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Items/Weapons/Melee/StreamGougeGlow"), item.Center - Main.screenPosition, null, Color.White, rotation, origin, 1f, SpriteEffects.None, 0f); } - public override bool CanUseItem(Player player) - { - for (int i = 0; i < 1000; ++i) - { - if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == item.shoot) - { - return false; - } - } - return true; - } + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; - public override void AddRecipes() + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 14); diff --git a/Items/Weapons/Melee/TerraLance.cs b/Items/Weapons/Melee/TerraLance.cs index 7355f241e1..0966f84546 100644 --- a/Items/Weapons/Melee/TerraLance.cs +++ b/Items/Weapons/Melee/TerraLance.cs @@ -35,19 +35,9 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 11f; } - public override bool CanUseItem(Player player) - { - for (int i = 0; i < 1000; ++i) - { - if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == item.shoot) - { - return false; - } - } - return true; - } + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; - public override void AddRecipes() + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.ChlorophytePartisan); diff --git a/Items/Weapons/Melee/UltimusCleaver.cs b/Items/Weapons/Melee/UltimusCleaver.cs index ed8d836c01..d96261fcb8 100644 --- a/Items/Weapons/Melee/UltimusCleaver.cs +++ b/Items/Weapons/Melee/UltimusCleaver.cs @@ -12,16 +12,18 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { DisplayName.SetDefault("Ultimus Cleaver"); - Tooltip.SetDefault("Launches damaging homing sparks"); + Tooltip.SetDefault("Launches damaging homing sparks and explodes on enemy hits"); } public override void SetDefaults() { item.damage = 130; item.melee = true; + item.useTurn = true; item.rare = 8; item.width = 72; item.height = 62; + item.scale = 1.5f; item.useTime = 20; item.useAnimation = 20; item.useStyle = ItemUseStyleID.SwingThrow; @@ -31,7 +33,50 @@ namespace CalamityMod.Items.Weapons.Melee item.UseSound = SoundID.Item1; } - public override void MeleeEffects(Player player, Rectangle hitbox) + public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(BuffID.OnFire, 600); + player.ApplyDamageToNPC(target, (int)(item.damage * (player.allDamage + player.meleeDamage - 1f)), 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(); + Main.PlaySound(SoundID.Item14, target.position); + int num3; + for (int num53 = 0; num53 < 40; num53 = num3 + 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]; + 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.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; + } + for (int num55 = 0; num55 < 20; num55 = num3 + 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]; + 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; + } + } + + public override void MeleeEffects(Player player, Rectangle hitbox) { if (player.whoAmI == Main.myPlayer) { @@ -97,7 +142,7 @@ namespace CalamityMod.Items.Weapons.Melee num342 *= (float)player.direction; num341 *= player.gravDir; Projectile.NewProjectile((float)(hitbox.X + hitbox.Width / 2) + num342, (float)(hitbox.Y + hitbox.Height / 2) + num341, - (float)player.direction * num340, num339 * player.gravDir, ModContent.ProjectileType(), (int)(item.damage * player.MeleeDamage() * 0.1f), 0f, player.whoAmI, 0f, 0f); + (float)player.direction * num340, num339 * player.gravDir, ModContent.ProjectileType(), (int)(item.damage * player.MeleeDamage() * 0.1), 0f, player.whoAmI, 0f, 0f); } } } diff --git a/Items/Weapons/Melee/UrchinSpear.cs b/Items/Weapons/Melee/UrchinSpear.cs index e251016645..091644aa9c 100644 --- a/Items/Weapons/Melee/UrchinSpear.cs +++ b/Items/Weapons/Melee/UrchinSpear.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee item.useTime = 25; item.knockBack = 5f; item.UseSound = SoundID.Item1; - item.autoReuse = false; + item.autoReuse = true; item.height = 56; item.value = Item.buyPrice(0, 2, 0, 0); item.rare = 2; @@ -35,7 +35,9 @@ namespace CalamityMod.Items.Weapons.Melee item.shootSpeed = 4f; } - public override void AddRecipes() + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; + + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType(), 4); diff --git a/Items/Weapons/Melee/YateveoBloom.cs b/Items/Weapons/Melee/YateveoBloom.cs index 5488338b04..0180c1efa4 100644 --- a/Items/Weapons/Melee/YateveoBloom.cs +++ b/Items/Weapons/Melee/YateveoBloom.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee item.melee = true; item.noMelee = true; item.channel = true; - item.autoReuse = false; + item.autoReuse = true; item.useTurn = true; item.useStyle = ItemUseStyleID.HoldingOut; @@ -58,19 +58,22 @@ namespace CalamityMod.Items.Weapons.Melee { item.damage = 20; item.channel = false; + item.autoReuse = true; item.useAnimation = 33; item.useTime = 33; item.shootSpeed = 4.5f; - } + return player.ownedProjectileCounts[item.shoot] <= 0; + } else { item.damage = BaseDamage; item.channel = true; + item.autoReuse = false; item.useAnimation = 22; item.useTime = 22; item.shootSpeed = ShootSpeed; - } - return base.CanUseItem(player); + return base.CanUseItem(player); + } } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Ranged/ArterialAssault.cs b/Items/Weapons/Ranged/ArterialAssault.cs index 9187796a49..48ecdba3e5 100644 --- a/Items/Weapons/Ranged/ArterialAssault.cs +++ b/Items/Weapons/Ranged/ArterialAssault.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 232; + item.damage = 200; item.ranged = true; item.width = 44; item.height = 100; diff --git a/Items/Weapons/Ranged/Onyxia.cs b/Items/Weapons/Ranged/Onyxia.cs index 0b693d6a52..90e3c091de 100644 --- a/Items/Weapons/Ranged/Onyxia.cs +++ b/Items/Weapons/Ranged/Onyxia.cs @@ -52,8 +52,7 @@ namespace CalamityMod.Items.Weapons.Ranged float shardKB = 2f * knockBack; float shardVelocityX = (speedX + (float)Main.rand.Next(-25, 26) * 0.05f) * 0.9f; float shardVelocityY = (speedY + (float)Main.rand.Next(-25, 26) * 0.05f) * 0.9f; - int onyx = Projectile.NewProjectile(position.X, position.Y, shardVelocityX, shardVelocityY, ProjectileID.BlackBolt, shardDamage, shardKB, player.whoAmI, 0f, 0f); - Main.projectile[onyx].timeLeft -= 20; + Projectile.NewProjectile(position.X, position.Y, shardVelocityX, shardVelocityY, ProjectileID.BlackBolt, shardDamage, shardKB, player.whoAmI, 0f, 0f); // Fire three symmetric pairs of bullets alongside it Vector2 baseVelocity = new Vector2(speedX, speedY); diff --git a/Items/Weapons/Ranged/TheEmpyrean.cs b/Items/Weapons/Ranged/TheEmpyrean.cs index 9581ff3ffa..a6a6fcf338 100644 --- a/Items/Weapons/Ranged/TheEmpyrean.cs +++ b/Items/Weapons/Ranged/TheEmpyrean.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.rare = 9; item.autoReuse = true; item.shoot = ModContent.ProjectileType(); - item.shootSpeed = 7.5f; + item.shootSpeed = 9f; item.useAmmo = AmmoID.Gel; } diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index a13c5ff2a4..e1f4ab3883 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -4669,11 +4669,11 @@ namespace CalamityMod.NPCs if (BossRushEvent.BossRushActive) { - idlePhaseTimer = 35; - idlePhaseAcceleration *= 1.1f; - idlePhaseVelocity *= 1.15f; + idlePhaseTimer = 45; + idlePhaseAcceleration *= 1.06f; + idlePhaseVelocity *= 1.12f; chargeTime -= 3; - chargeVelocity *= 1.25f; + chargeVelocity *= 1.15f; } if (calamityGlobalNPC.newAI[1] == 1f) diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index dd1d483335..d4f1ac75d2 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -4610,7 +4610,7 @@ namespace CalamityMod.NPCs if (Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height)) { // Laser speed - float projectileSpeed = npc.ai[2] == 0f ? 2f : 4f; + float projectileSpeed = npc.ai[2] == 0f ? 4f : 2f; projectileSpeed += enrageScale; if (phase2) projectileSpeed += 0.25f; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index bf77740471..ed37f1e70a 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -338,6 +338,13 @@ namespace CalamityMod.NPCs NPCID.TheDestroyerTail }; + public static List DarkEnergyIDs = new List + { + NPCType(), + NPCType(), + NPCType() + }; + public static List StormWeaverIDs = new List { NPCType(), @@ -838,7 +845,7 @@ namespace CalamityMod.NPCs npc.buffImmune[BuffID.Slow] = true; } - if (DestroyerIDs.Contains(npc.type) || (EaterofWorldsIDs.Contains(npc.type) && BossRushEvent.BossRushActive) || npc.type == NPCID.DD2EterniaCrystal || npc.townNPC || npc.type == NPCID.SpikeBall || npc.type == NPCID.BlazingWheel) + if (DestroyerIDs.Contains(npc.type) || npc.type == NPCID.SkeletronHead || (EaterofWorldsIDs.Contains(npc.type) && BossRushEvent.BossRushActive) || npc.type == NPCID.DD2EterniaCrystal || npc.townNPC || npc.type == NPCID.SpikeBall || npc.type == NPCID.BlazingWheel) { for (int k = 0; k < npc.buffImmune.Length; k++) { @@ -3051,21 +3058,6 @@ namespace CalamityMod.NPCs GrenadeResist(projectile, ref damage); PierceResistGlobal(projectile, ref damage); - // Old resists - /*if (projectile.type == ProjectileType()) - { - damage = (int)(damage * 0.1); - } - else if (projectile.type == ProjectileType()) - { - damage = (int)(damage * 0.2); - } - else if (projectile.type == player.beeType() || projectile.type == ProjectileType()) - { - damage = (int)(damage * 0.4); - }*/ - - // New resists if (ProjectileID.Sets.StardustDragon[projectile.type] || projectile.type == ProjectileType() || projectile.type == ProjectileType()) { damage = (int)(damage * 0.25); @@ -3083,7 +3075,7 @@ namespace CalamityMod.NPCs damage = (int)(damage * 0.75); } } - else if (CosmicGuardianIDs.Contains(npc.type)) + else if (CosmicGuardianIDs.Contains(npc.type) || DarkEnergyIDs.Contains(npc.type)) { GrenadeResist(projectile, ref damage); PierceResistGlobal(projectile, ref damage); @@ -3111,6 +3103,10 @@ namespace CalamityMod.NPCs { damage = (int)(damage * 0.5); } + else if (projectile.type == ProjectileType()) + { + damage = (int)(damage * 0.4); + } else if (ProjectileID.Sets.StardustDragon[projectile.type]) { damage = (int)(damage * 0.1); @@ -3129,6 +3125,10 @@ namespace CalamityMod.NPCs { damage = (int)(damage * 0.5); } + else if (projectile.type == ProjectileType()) + { + damage = (int)(damage * 0.45); + } else if (projectile.type == ProjectileType()) { damage = (int)(damage * 0.38); @@ -3147,6 +3147,10 @@ namespace CalamityMod.NPCs { damage = (int)(damage * 0.9); } + else if (projectile.type == ProjectileType()) + { + damage = (int)(damage * 0.75); + } if (projectile.type == ProjectileType() || projectile.type == ProjectileType() || projectile.type == ProjectileType()) { damage = (int)(damage * 0.5); @@ -4337,7 +4341,7 @@ namespace CalamityMod.NPCs } else if (DestroyerIDs.Contains(npc.type)) { - if (drawColor != Color.Black && ((newAI[3] >= 900f && npc.life / (float)npc.lifeMax < 0.5f) || (newAI[1] < 600f && newAI[1] > 60f))) + if (drawColor != Color.Black && npc.ai[2] == 0f && ((newAI[3] >= 900f && npc.life / (float)npc.lifeMax < 0.5f) || (newAI[1] < 600f && newAI[1] > 60f))) { Vector2 halfSize = npc.frame.Size() / 2; SpriteEffects spriteEffects = SpriteEffects.None; diff --git a/NPCs/CeaselessVoid/DarkEnergy.cs b/NPCs/CeaselessVoid/DarkEnergy.cs index a59d898176..4311df7117 100644 --- a/NPCs/CeaselessVoid/DarkEnergy.cs +++ b/NPCs/CeaselessVoid/DarkEnergy.cs @@ -300,15 +300,6 @@ namespace CalamityMod.NPCs.CeaselessVoid return CalamityGlobalNPC.voidBoss < 0 || !Main.npc[CalamityGlobalNPC.voidBoss].active; } - public override void OnHitByProjectile(Projectile projectile, int damage, float knockback, bool crit) - { - if (CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel1) - { - if (projectile.type == ModContent.ProjectileType()) - damage = (int)(damage * 0.9); - } - } - public override void OnHitPlayer(Player player, int damage, bool crit) { player.AddBuff(BuffID.VortexDebuff, 20, true); diff --git a/NPCs/CeaselessVoid/DarkEnergy2.cs b/NPCs/CeaselessVoid/DarkEnergy2.cs index bb92fd8049..7a719c6f4f 100644 --- a/NPCs/CeaselessVoid/DarkEnergy2.cs +++ b/NPCs/CeaselessVoid/DarkEnergy2.cs @@ -260,15 +260,6 @@ namespace CalamityMod.NPCs.CeaselessVoid return CalamityGlobalNPC.voidBoss < 0 || !Main.npc[CalamityGlobalNPC.voidBoss].active; } - public override void OnHitByProjectile(Projectile projectile, int damage, float knockback, bool crit) - { - if (CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel1) - { - if (projectile.type == ModContent.ProjectileType()) - damage = (int)(damage * 0.9); - } - } - public override void OnHitPlayer(Player player, int damage, bool crit) { player.AddBuff(BuffID.VortexDebuff, 20, true); diff --git a/NPCs/CeaselessVoid/DarkEnergy3.cs b/NPCs/CeaselessVoid/DarkEnergy3.cs index 3bfe0ba731..ef028c4376 100644 --- a/NPCs/CeaselessVoid/DarkEnergy3.cs +++ b/NPCs/CeaselessVoid/DarkEnergy3.cs @@ -288,15 +288,6 @@ namespace CalamityMod.NPCs.CeaselessVoid return CalamityGlobalNPC.voidBoss < 0 || !Main.npc[CalamityGlobalNPC.voidBoss].active; } - public override void OnHitByProjectile(Projectile projectile, int damage, float knockback, bool crit) - { - if (CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel1) - { - if (projectile.type == ModContent.ProjectileType()) - damage = (int)(damage * 0.9); - } - } - public override void OnHitPlayer(Player player, int damage, bool crit) { player.AddBuff(BuffID.VortexDebuff, 20, true); diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index 53c2008df0..102e2903a3 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -694,7 +694,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (bulletHellCounter2 % 30 == 0) //projectiles that move in wave pattern { - int random = Main.rand.Next(-1000, 1001); + int random = Main.rand.Next(-500, 501); Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + random, -5f * uDieLul, 0f, ModContent.ProjectileType(), waveDamage, 0f, Main.myPlayer, 0f, 0f); Projectile.NewProjectile(player.position.X - 1000f, player.position.Y - random, 5f * uDieLul, 0f, ModContent.ProjectileType(), waveDamage, 0f, Main.myPlayer, 0f, 0f); } diff --git a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs index 865fbb0d8a..71b91bf72a 100644 --- a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs +++ b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs @@ -157,7 +157,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas { npc.ai[1] += 1f; } - if (npc.ai[1] >= 30f) + if (npc.ai[1] >= 45f) { npc.ai[1] = 0f; Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SCalSounds/BrimstoneHellblastSound"), npc.Center); diff --git a/Projectiles/Boss/DestroyerCursedLaser.cs b/Projectiles/Boss/DestroyerCursedLaser.cs index e83a33b84f..415062837d 100644 --- a/Projectiles/Boss/DestroyerCursedLaser.cs +++ b/Projectiles/Boss/DestroyerCursedLaser.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Boss Main.PlaySound(SoundID.Item33, (int)projectile.position.X, (int)projectile.position.Y); projectile.localAI[1] = 1f; } - if (projectile.velocity.Length() < 14f) + if (projectile.velocity.Length() < 12f) { projectile.velocity *= 1.0025f; } diff --git a/Projectiles/Boss/DestroyerElectricLaser.cs b/Projectiles/Boss/DestroyerElectricLaser.cs index 9957185797..6949be76df 100644 --- a/Projectiles/Boss/DestroyerElectricLaser.cs +++ b/Projectiles/Boss/DestroyerElectricLaser.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Boss Main.PlaySound(SoundID.Item33, (int)projectile.position.X, (int)projectile.position.Y); projectile.localAI[1] = 1f; } - if (projectile.velocity.Length() < 14f) + if (projectile.velocity.Length() < 12f) { projectile.velocity *= 1.0025f; } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 48454e7014..d7e2d0aeb0 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -219,7 +219,7 @@ namespace CalamityMod.Projectiles projectile.localAI[1] = 1f; } - if (projectile.velocity.Length() < 14f) + if (projectile.velocity.Length() < 12f) projectile.velocity *= 1.0025f; return false; diff --git a/Projectiles/DraedonsArsenal/FrequencyManipulatorProjectile.cs b/Projectiles/DraedonsArsenal/FrequencyManipulatorProjectile.cs index 75d07d8d35..7c5807d6af 100644 --- a/Projectiles/DraedonsArsenal/FrequencyManipulatorProjectile.cs +++ b/Projectiles/DraedonsArsenal/FrequencyManipulatorProjectile.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal set => projectile.ai[0] = value; } public const int TotalSpins = 2; - public const float SpinTime = 60f; + public const float SpinTime = 30f; public override void SetStaticDefaults() { DisplayName.SetDefault("Frequency Manipulator"); diff --git a/Projectiles/DraedonsArsenal/GalvanizingGlaiveProjectile.cs b/Projectiles/DraedonsArsenal/GalvanizingGlaiveProjectile.cs index a3b25915a7..ba7f9217d7 100644 --- a/Projectiles/DraedonsArsenal/GalvanizingGlaiveProjectile.cs +++ b/Projectiles/DraedonsArsenal/GalvanizingGlaiveProjectile.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.ownerHitCheck = true; projectile.hide = true; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 8; + projectile.localNPCHitCooldown = 6; projectile.alpha = 255; } diff --git a/Projectiles/DraedonsArsenal/GaussPistolShot.cs b/Projectiles/DraedonsArsenal/GaussPistolShot.cs index 06ddbb9a08..6b40c900fc 100644 --- a/Projectiles/DraedonsArsenal/GaussPistolShot.cs +++ b/Projectiles/DraedonsArsenal/GaussPistolShot.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public const float MinEnergyParticleSpeed = 0.25f; public const float MaxEnergyParticleSpeed = 4f; public const float EnergyChargeRadiusRatio = 1.45f; - public const float ChargeTime = 60f; + public const float ChargeTime = 30f; public override void SetStaticDefaults() { DisplayName.SetDefault("Gauss Shot"); diff --git a/Projectiles/DraedonsArsenal/GaussRifleBlast.cs b/Projectiles/DraedonsArsenal/GaussRifleBlast.cs index 063519ea10..1854311c52 100644 --- a/Projectiles/DraedonsArsenal/GaussRifleBlast.cs +++ b/Projectiles/DraedonsArsenal/GaussRifleBlast.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Dust dust = Dust.NewDustPerfect(projectile.Center, 263); dust.velocity = angle.ToRotationVector2().RotatedByRandom(0.25f) * Main.rand.NextFloat(6f, 8f); dust.noGravity = true; - dust.scale = 2.1f; + dust.scale = 1.6f; } } // Ring dust. @@ -54,10 +54,11 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Dust dust = Dust.NewDustPerfect(projectile.Center + angle.ToRotationVector2() * radius, 226); dust.velocity = Vector2.Zero; dust.noGravity = true; - dust.scale = 2f; + dust.scale = 1.5f; } } } + public override void Kill(int timeLeft) { if (Main.myPlayer == projectile.owner) diff --git a/Projectiles/DraedonsArsenal/GaussRifleExplosion.cs b/Projectiles/DraedonsArsenal/GaussRifleExplosion.cs index fa749b237d..6e5a7acee8 100644 --- a/Projectiles/DraedonsArsenal/GaussRifleExplosion.cs +++ b/Projectiles/DraedonsArsenal/GaussRifleExplosion.cs @@ -22,8 +22,9 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.width = projectile.height = 500; projectile.friendly = true; projectile.ranged = true; - projectile.penetrate = 1; - projectile.timeLeft = 60; + projectile.tileCollide = false; + projectile.penetrate = -1; + projectile.timeLeft = 40; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 8; } @@ -41,7 +42,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal dust.velocity = dust.velocity.RotatedByRandom(0.4f); dust.velocity = dust.velocity.RotatedBy(Time / 60f * MathHelper.ToRadians(720f)); dust.velocity *= Main.rand.NextFloat(20f, 50f); - dust.scale = Main.rand.NextFloat(1.7f, 2.1f); + dust.scale = Main.rand.NextFloat(1.2f, 1.6f); dust.noGravity = true; } } diff --git a/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs b/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs index b19e22b415..7e3f51eeb4 100644 --- a/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs +++ b/Projectiles/DraedonsArsenal/HydraulicVoltCrasherProjectile.cs @@ -29,6 +29,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.melee = true; projectile.scale = 1.1f; } + public override void AI() { projectile.timeLeft = 60; @@ -112,6 +113,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.position -= projectile.velocity.ToRotation().ToRotationVector2() * 8f; projectile.velocity.X *= Main.rand.NextFloat(0.97f, 1.03f); } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/PlasmaBolt"), target.Center); @@ -139,6 +141,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } } } + public bool TryToSuperchargeNPC(NPC npc) { // Prevent supercharging an enemy twice. @@ -154,7 +157,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Projectile.NewProjectileDirect(npc.Center, Vector2.Zero, ModContent.ProjectileType(), - (int)(projectile.damage * 0.35), + (int)(projectile.damage * 0.8), 0f, projectile.owner, 0f, diff --git a/Projectiles/DraedonsArsenal/PlasmaGrenadeProjectile.cs b/Projectiles/DraedonsArsenal/PlasmaGrenadeProjectile.cs index ebdccbf200..0654a43412 100644 --- a/Projectiles/DraedonsArsenal/PlasmaGrenadeProjectile.cs +++ b/Projectiles/DraedonsArsenal/PlasmaGrenadeProjectile.cs @@ -12,8 +12,10 @@ namespace CalamityMod.Projectiles.DraedonsArsenal get => projectile.ai[0]; set => projectile.ai[0] = value; } + public const float FallAcceleration = 0.15f; public const float MaxFallSpeed = 12f; + public override void SetStaticDefaults() { DisplayName.SetDefault("Plasma Grenade"); @@ -54,7 +56,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override void Kill(int timeLeft) { - if (projectile.Calamity().stealthStrike) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/PlasmaGrenadeExplosion"), (int)projectile.position.X, (int)projectile.position.Y); + if (projectile.Calamity().stealthStrike) { if (Main.myPlayer == projectile.owner) { diff --git a/Projectiles/DraedonsArsenal/PoleWarperSummon.cs b/Projectiles/DraedonsArsenal/PoleWarperSummon.cs index 68d31b2395..b9800f1a88 100644 --- a/Projectiles/DraedonsArsenal/PoleWarperSummon.cs +++ b/Projectiles/DraedonsArsenal/PoleWarperSummon.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.minion = true; projectile.tileCollide = false; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 24; + projectile.localNPCHitCooldown = 12; } public override void AI() @@ -70,6 +70,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } Time++; } + public void Initialize(Player player) { projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage(); @@ -82,6 +83,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal dust.noGravity = true; } } + // While this projectile cannot attack, the projectiles it shoots derive from the damage. public void AdjustDamage(Player player) { @@ -93,6 +95,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.damage = trueDamage; } } + public void GrantBuffs(Player player) { bool isCorrectProjectile = projectile.type == ModContent.ProjectileType(); @@ -109,6 +112,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } } } + public void PlayerMovement(Player player) { Vector2 destination = player.Center + Vector2.UnitY.RotatedBy(Time / 16f + AngularOffset + (!North).ToInt() * MathHelper.Pi) * 180f; @@ -116,6 +120,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.velocity = projectile.velocity.SafeNormalize(Vector2.UnitY) * 10f; projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; } + public void NPCMovement(NPC npc) { for (int i = 0; i < Main.projectile.Length; i++) @@ -150,6 +155,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.rotation = projectile.AngleTo(npc.Center) + MathHelper.PiOver2; } } + public void RepelMovement() { // This does not incorporate attraction on purpose. Doing so causes the minions to very easily become distracted. @@ -173,6 +179,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } } } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, 1, 2); diff --git a/Projectiles/DraedonsArsenal/PulseDragonProjectile.cs b/Projectiles/DraedonsArsenal/PulseDragonProjectile.cs index d8209e7b8f..3e153fb70a 100644 --- a/Projectiles/DraedonsArsenal/PulseDragonProjectile.cs +++ b/Projectiles/DraedonsArsenal/PulseDragonProjectile.cs @@ -56,6 +56,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 4; projectile.tileCollide = true; + projectile.extraUpdates = 1; projectile.Calamity().hasInorganicEnemyHitBoost = true; projectile.Calamity().inorganicEnemyHitBoost = 0.003f; } diff --git a/Projectiles/DraedonsArsenal/PulseRifleShot.cs b/Projectiles/DraedonsArsenal/PulseRifleShot.cs index f070fcf5ee..2a797e3627 100644 --- a/Projectiles/DraedonsArsenal/PulseRifleShot.cs +++ b/Projectiles/DraedonsArsenal/PulseRifleShot.cs @@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal if (alreadyTargetedNPCType != Main.npc[i].whoAmI && projectile.Center.ManhattanDistance(Main.npc[i].Center) < 600f) { - Projectile.NewProjectile(projectile.Center, projectile.DirectionTo(Main.npc[i].Center) * 2f, projectile.type, projectile.damage / 2, 0f, projectile.owner, target.whoAmI, projectile.ai[1] + 1f); + Projectile.NewProjectile(projectile.Center, projectile.DirectionTo(Main.npc[i].Center) * 5f, projectile.type, projectile.damage / 2, 0f, projectile.owner, Main.npc[i].whoAmI, projectile.ai[1] + 1f); break; } } @@ -110,9 +110,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal if (!target.boss) { if (target.Inorganic()) - { damage += target.lifeMax / 250; - } } } diff --git a/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs b/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs index 2606621cc6..b65237fe32 100644 --- a/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs +++ b/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs @@ -13,13 +13,16 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public bool SufferingFromSeparationAnxiety = false; public Vector2 OldCenter; public Vector2 Destination; + public float Time { get => projectile.ai[0]; set => projectile.ai[0] = value; } + public float EyeOutwardness = 1f; public float EyeRotation = 0f; + public override void SetStaticDefaults() { DisplayName.SetDefault("Snake Eyes"); @@ -89,7 +92,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } NPCMovement(potentialTarget); } - if (!SufferingFromSeparationAnxiety && projectile.Distance(player.Center) > (potentialTarget is null ? 360f : 1500f)) + if (!SufferingFromSeparationAnxiety && projectile.Distance(player.Center) > (potentialTarget is null ? 360f : 1800f)) { SufferingFromSeparationAnxiety = true; projectile.netUpdate = true; @@ -105,6 +108,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } Time++; } + public void Initialize(Player player) { projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage(); @@ -118,6 +122,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal dust.noGravity = true; } } + // While this projectile cannot attack, the projectiles it shoots derive from the damage. public void AdjustDamage(Player player) { @@ -129,6 +134,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.damage = trueDamage; } } + public void GrantBuffs(Player player) { bool isCorrectProjectile = projectile.type == ModContent.ProjectileType(); @@ -145,6 +151,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } } } + public void PlayerMovement(Player player) { projectile.velocity = Vector2.Zero; @@ -170,6 +177,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } EyeOutwardness = MathHelper.Lerp(EyeOutwardness, 0f, 0.15f); } + public void NPCMovement(NPC npc) { projectile.velocity = Vector2.Zero; @@ -210,6 +218,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.Center = Vector2.SmoothStep(OldCenter, npc.Center + (new Vector2(300f) + projectile.Size * 0.5f) * offsetMultiplier, Time % 20f / 20f); } } + public void GenerateAfterimageDust() { for (int i = 1; i < projectile.oldPos.Length; i++) @@ -238,7 +247,9 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } } } + public override bool CanDamage() => false; + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, Color.White, 0, ProjectileID.Sets.TrailCacheLength[projectile.type]); diff --git a/Projectiles/DraedonsArsenal/StarSwallowerSummon.cs b/Projectiles/DraedonsArsenal/StarSwallowerSummon.cs index 76e76f03c7..73b122ed85 100644 --- a/Projectiles/DraedonsArsenal/StarSwallowerSummon.cs +++ b/Projectiles/DraedonsArsenal/StarSwallowerSummon.cs @@ -16,11 +16,13 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public float AcidShootTimer = 0f; public float AcidShootCooldown = 0f; public float FallThroughYPoint = 0f; + public bool ReleasingAcid { get => projectile.ai[0] != 0f; set => projectile.ai[0] = value.ToInt(); } + public override void SetStaticDefaults() { DisplayName.SetDefault("Pet Froge"); @@ -49,6 +51,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal writer.Write(AcidShootTimer); writer.Write(AcidShootCooldown); } + public override void ReceiveExtraAI(BinaryReader reader) { HopCooldown = reader.ReadSingle(); @@ -156,8 +159,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal player.MinionDamage()); projectile.damage = newDamage; } - } + public void HandleHop(Vector2 targetPosition) { if (HopCooldown <= 0f && projectile.oldPosition.Y == projectile.position.Y) @@ -179,6 +182,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal HopCooldown--; } } + public void PlayerSeparationAnxietyAI(Player player, ref int minimumFrame, ref int maximumFrame) { // If the player is extremely far away, don't bother homing. Just go to the player's location. @@ -226,6 +230,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal HandleHop(player.Center); } } + public void NPCTargetingAI(NPC potentialTarget) { HandleHop(potentialTarget.Center); @@ -270,6 +275,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal AcidShootCooldown--; projectile.velocity.X *= 0.8f; } + public void ManipulateFrames(int minimumFrame, int maximumFrame) { if (projectile.frame < minimumFrame) @@ -303,12 +309,15 @@ namespace CalamityMod.Projectiles.DraedonsArsenal 0f); return false; } + public override bool OnTileCollide(Vector2 oldVelocity) => false; + public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough) { fallThrough = projectile.Bottom.Y < FallThroughYPoint - 120f; return base.TileCollideStyle(ref width, ref height, ref fallThrough); } + public override bool CanDamage() => false; } } diff --git a/Projectiles/DraedonsArsenal/TaserHook.cs b/Projectiles/DraedonsArsenal/TaserHook.cs index 10a380270f..59940763fd 100644 --- a/Projectiles/DraedonsArsenal/TaserHook.cs +++ b/Projectiles/DraedonsArsenal/TaserHook.cs @@ -16,22 +16,27 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Electrocuting, ReelingBack } + public TaserAIState AIState { get => (TaserAIState)(int)projectile.ai[0]; set => projectile.ai[0] = (int)value; } + public float Time { get => projectile.ai[1]; set => projectile.ai[1] = value; } + public int ElectrocutionTarget { get => (int)projectile.localAI[0]; set => projectile.localAI[0] = value; } - public const float ReelbackSpeed = 7f; + + public const float ReelbackSpeed = 15f; + public override void SetStaticDefaults() { DisplayName.SetDefault("Taser"); diff --git a/Projectiles/DraedonsArsenal/TeslaCannonShot.cs b/Projectiles/DraedonsArsenal/TeslaCannonShot.cs index 8a2f39e008..63b99d023b 100644 --- a/Projectiles/DraedonsArsenal/TeslaCannonShot.cs +++ b/Projectiles/DraedonsArsenal/TeslaCannonShot.cs @@ -107,7 +107,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal if (projectile.Center.ManhattanDistance(Main.npc[i].Center) < num474) { - Projectile.NewProjectile(projectile.Center, projectile.DirectionTo(Main.npc[i].Center) * 2f, projectile.type, projectile.damage / 2, projectile.knockBack * 0.5f, projectile.owner, 0f, -1f); + Projectile.NewProjectile(projectile.Center, projectile.DirectionTo(Main.npc[i].Center) * 2f, projectile.type, (int)(projectile.damage * 0.6), projectile.knockBack * 0.6f, projectile.owner, 0f, -1f); projectile.ai[1] = 60f; diff --git a/Projectiles/DraedonsArsenal/TrackingDiskProjectile.cs b/Projectiles/DraedonsArsenal/TrackingDiskProjectile.cs index a831cd502c..9cc00ac852 100644 --- a/Projectiles/DraedonsArsenal/TrackingDiskProjectile.cs +++ b/Projectiles/DraedonsArsenal/TrackingDiskProjectile.cs @@ -18,16 +18,19 @@ namespace CalamityMod.Projectiles.DraedonsArsenal get => projectile.ai[0] == 1f; set => projectile.ai[0] = value.ToInt(); } + public float Time { get => projectile.ai[1]; set => projectile.ai[1] = value; } + public const int LaserFireRate = 20; public const int MaxLaserCountPerShot = 4; // This only applies to stealth strikes. public const float MaxTargetSearchDistance = 480f; public const float ReturnAcceleration = 0.15f; public const float ReturnMaxSpeed = 12f; + public override void SetStaticDefaults() { DisplayName.SetDefault("Tracking Disk"); @@ -74,7 +77,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.velocity.Y += Math.Sign(idealVelocity.Y - projectile.velocity.Y) * ReturnAcceleration; if (Time % LaserFireRate == 0f) - AttemptToFireLasers((int)(projectile.damage * 0.4)); + AttemptToFireLasers((int)(projectile.damage * 0.25)); if (Main.myPlayer == projectile.owner) { diff --git a/Projectiles/DraedonsArsenal/UnstableMatter.cs b/Projectiles/DraedonsArsenal/UnstableMatter.cs index cd00de0eaa..3196c455cb 100644 --- a/Projectiles/DraedonsArsenal/UnstableMatter.cs +++ b/Projectiles/DraedonsArsenal/UnstableMatter.cs @@ -12,11 +12,13 @@ namespace CalamityMod.Projectiles.DraedonsArsenal get => projectile.ai[0] == 1f; set => projectile.ai[0] = value.ToInt(); } + public float Time { get => projectile.ai[1]; set => projectile.ai[1] = value; } + public override void SetStaticDefaults() { DisplayName.SetDefault("Unstable Matter"); @@ -68,6 +70,9 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { + if (!HasCollidedWithATile) + damage /= 3; + damage += target.defense / 3; } @@ -81,7 +86,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal // And bounce off the tile. Or towards a nearby enemy, if there is one. NPC potentialTarget = projectile.Center.ClosestNPCAt(700f, false); if (potentialTarget != null) - projectile.velocity = projectile.DirectionTo(potentialTarget.Center); + projectile.velocity = projectile.DirectionTo(potentialTarget.Center); else { if (projectile.velocity.X != oldVelocity.X) @@ -97,7 +102,5 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } return true; } - - public override bool CanDamage() => HasCollidedWithATile; } } diff --git a/Projectiles/DraedonsArsenal/VoltageStream.cs b/Projectiles/DraedonsArsenal/VoltageStream.cs index 76cab78f27..6cc43f4438 100644 --- a/Projectiles/DraedonsArsenal/VoltageStream.cs +++ b/Projectiles/DraedonsArsenal/VoltageStream.cs @@ -14,11 +14,13 @@ namespace CalamityMod.Projectiles.DraedonsArsenal get => projectile.ai[0]; set => projectile.ai[0] = value; } + public NPC Target { get => Main.npc[(int)projectile.ai[1]]; set => projectile.ai[1] = value.whoAmI; } + public override void SetStaticDefaults() { DisplayName.SetDefault("Voltage Stream"); @@ -111,9 +113,5 @@ namespace CalamityMod.Projectiles.DraedonsArsenal { projectile.damage = (int)(projectile.damage * 0.75); } - - public override void Kill(int timeLeft) - { - } } } diff --git a/Projectiles/DraedonsArsenal/WavePounderBoom.cs b/Projectiles/DraedonsArsenal/WavePounderBoom.cs index c022f174e2..27eeca7a85 100644 --- a/Projectiles/DraedonsArsenal/WavePounderBoom.cs +++ b/Projectiles/DraedonsArsenal/WavePounderBoom.cs @@ -21,24 +21,29 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Position = position; } } + public class WavePounderBoom : ModProjectile { public ScreenShakeSpot CurrentSpot; + public float Radius { get => projectile.ai[0]; set => projectile.ai[0] = value; } + public float MaxRadius { get => projectile.ai[1]; set => projectile.ai[1] = value; } + public float InterpolationStep { get => projectile.localAI[1]; set => projectile.localAI[1] = value; } + public const int Lifetime = 60; public override void SetStaticDefaults() @@ -94,11 +99,13 @@ namespace CalamityMod.Projectiles.DraedonsArsenal projectile.scale = MathHelper.Lerp(1.2f, 5f, Utils.InverseLerp(Lifetime, 0f, projectile.timeLeft, true)); CalamityGlobalProjectile.ExpandHitboxBy(projectile, (int)(Radius * projectile.scale), (int)(Radius * projectile.scale)); } + public override void Kill(int timeLeft) { if (projectile.Calamity().stealthStrike) CalamityWorld.ScreenShakeSpots.Remove(Projectile.GetByUUID(projectile.owner, projectile.whoAmI)); // Remove the explosion associated with this projectile's UUID. } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { spriteBatch.End(); diff --git a/Projectiles/Melee/IceBombFriendly.cs b/Projectiles/Melee/IceBombFriendly.cs index 47e0d51738..8853e91e7e 100644 --- a/Projectiles/Melee/IceBombFriendly.cs +++ b/Projectiles/Melee/IceBombFriendly.cs @@ -27,8 +27,7 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - projectile.velocity.X *= 0.985f; - projectile.velocity.Y *= 0.985f; + projectile.velocity *= 0.985f; if (Main.rand.NextBool(5)) { Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 67, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); @@ -48,9 +47,9 @@ namespace CalamityMod.Projectiles.Melee for (i = 0; i < 2; i++) { offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i; - int projectile1 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ProjectileID.FrostShard, 30, 2f, projectile.owner, 0f, 0f); + int projectile1 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ProjectileID.FrostShard, (int)(projectile.damage * 0.5), 0f, projectile.owner, 0f, 0f); Main.projectile[projectile1].Calamity().forceMelee = true; - int projectile2 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ProjectileID.FrostShard, 30, 2f, projectile.owner, 0f, 0f); + int projectile2 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ProjectileID.FrostShard, (int)(projectile.damage * 0.5), 0f, projectile.owner, 0f, 0f); Main.projectile[projectile2].Calamity().forceMelee = true; } } diff --git a/Projectiles/Melee/MourningstarFlail.cs b/Projectiles/Melee/MourningstarFlail.cs index e108572efd..58d3a0702e 100644 --- a/Projectiles/Melee/MourningstarFlail.cs +++ b/Projectiles/Melee/MourningstarFlail.cs @@ -22,7 +22,8 @@ namespace CalamityMod.Projectiles.Melee projectile.melee = true; projectile.ignoreWater = true; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 10; + projectile.localNPCHitCooldown = 4; + projectile.extraUpdates = 1; } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) @@ -32,8 +33,10 @@ namespace CalamityMod.Projectiles.Melee // If it is to be rebalanced, consider replacing it with the FuckYou projectile (which does not mess with I-frames) if (projectile.localAI[1] <= 0f && projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ProjectileID.SolarWhipSwordExplosion, projectile.damage, knockback, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); - } + int proj = Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ProjectileID.SolarWhipSwordExplosion, projectile.damage, knockback, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); + Main.projectile[proj].usesLocalNPCImmunity = true; + Main.projectile[proj].localNPCHitCooldown = 4; + } projectile.localAI[1] = 4f; } } diff --git a/Projectiles/Melee/Spears/AstralPikeProj.cs b/Projectiles/Melee/Spears/AstralPikeProj.cs index 3dcb01869d..a1c85d6fa0 100644 --- a/Projectiles/Melee/Spears/AstralPikeProj.cs +++ b/Projectiles/Melee/Spears/AstralPikeProj.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Melee.Spears speedY = MathHelper.Clamp(speedY, -15f, 15f); if (projectile.owner == Main.myPlayer) { - int proj = Projectile.NewProjectile(spawnPosition.X, spawnPosition.Y, speedX, speedY, ModContent.ProjectileType(), (int)(projectile.damage * 0.2), 1f, projectile.owner); + int proj = Projectile.NewProjectile(spawnPosition.X, spawnPosition.Y, speedX, speedY, ModContent.ProjectileType(), (int)(projectile.damage * 0.4), 1f, projectile.owner, 3f, 0f); Main.projectile[proj].Calamity().forceMelee = true; } } diff --git a/Projectiles/Melee/Spears/EarthenPikeSpear.cs b/Projectiles/Melee/Spears/EarthenPikeSpear.cs index 940739a1db..a5889059b3 100644 --- a/Projectiles/Melee/Spears/EarthenPikeSpear.cs +++ b/Projectiles/Melee/Spears/EarthenPikeSpear.cs @@ -19,6 +19,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.melee = true; //Dictates whether projectile is a melee-class weapon. projectile.timeLeft = 90; projectile.height = 40; //The height of the .png file in pixels divided by 2. + projectile.scale = 1.5f; projectile.friendly = true; projectile.hostile = false; projectile.tileCollide = false; diff --git a/Projectiles/Melee/Spears/FulgurationHalberdProj.cs b/Projectiles/Melee/Spears/FulgurationHalberdProj.cs index 839d0b0979..91551c48ee 100644 --- a/Projectiles/Melee/Spears/FulgurationHalberdProj.cs +++ b/Projectiles/Melee/Spears/FulgurationHalberdProj.cs @@ -14,11 +14,12 @@ namespace CalamityMod.Projectiles.Melee.Spears public override void SetDefaults() { - projectile.width = 35; //The width of the .png file in pixels divided by 2. + projectile.width = 40; //The width of the .png file in pixels divided by 2. projectile.aiStyle = 19; projectile.melee = true; //Dictates whether projectile is a melee-class weapon. projectile.timeLeft = 90; - projectile.height = 33; //The height of the .png file in pixels divided by 2. + projectile.height = 40; //The height of the .png file in pixels divided by 2. + projectile.scale = 1.5f; projectile.friendly = true; projectile.hostile = false; projectile.tileCollide = false; diff --git a/Projectiles/Melee/Spears/GildedProboscisProj.cs b/Projectiles/Melee/Spears/GildedProboscisProj.cs index 1e94a744d9..b6490afd75 100644 --- a/Projectiles/Melee/Spears/GildedProboscisProj.cs +++ b/Projectiles/Melee/Spears/GildedProboscisProj.cs @@ -48,8 +48,11 @@ namespace CalamityMod.Projectiles.Melee.Spears return; Player player = Main.player[projectile.owner]; - player.statLife += 1; - player.HealEffect(1); + if (Main.rand.NextBool(2)) + { + player.statLife += 1; + player.HealEffect(1); + } } } } diff --git a/Projectiles/Melee/Spears/GoldplumeSpearProjectile.cs b/Projectiles/Melee/Spears/GoldplumeSpearProjectile.cs index 1df1536735..49bd3f8949 100644 --- a/Projectiles/Melee/Spears/GoldplumeSpearProjectile.cs +++ b/Projectiles/Melee/Spears/GoldplumeSpearProjectile.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Melee.Spears if (Main.myPlayer == projectile.owner) { Projectile.NewProjectile(projectile.Center.X + projectile.velocity.X, projectile.Center.Y + projectile.velocity.Y, - projectile.velocity.X, projectile.velocity.Y, ModContent.ProjectileType(), (int)(projectile.damage * 0.2), 0f, projectile.owner, 0f, 0f); + projectile.velocity.X, projectile.velocity.Y, ModContent.ProjectileType(), (int)(projectile.damage * 0.4), 0f, projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Melee/Spears/InsidiousImpalerProj.cs b/Projectiles/Melee/Spears/InsidiousImpalerProj.cs index 63ecb07dfc..33437ed157 100644 --- a/Projectiles/Melee/Spears/InsidiousImpalerProj.cs +++ b/Projectiles/Melee/Spears/InsidiousImpalerProj.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Melee.Spears public override Action EffectBeforeReelback => (proj) => { Projectile.NewProjectile(projectile.Center.X + projectile.velocity.X, projectile.Center.Y + projectile.velocity.Y, - projectile.velocity.X * 3.5f, projectile.velocity.Y * 3.5f, ModContent.ProjectileType(), (int)(projectile.damage * 0.5f), projectile.knockBack * 0.85f, projectile.owner, 0f, 0f); + projectile.velocity.X * 3.5f, projectile.velocity.Y * 3.5f, ModContent.ProjectileType(), (int)(projectile.damage * 0.5), projectile.knockBack * 0.85f, projectile.owner, 0f, 0f); }; public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Projectiles/Melee/TrueCausticEdgeProjectile.cs b/Projectiles/Melee/TrueCausticEdgeProjectile.cs index 2267713830..6df6fc0f28 100644 --- a/Projectiles/Melee/TrueCausticEdgeProjectile.cs +++ b/Projectiles/Melee/TrueCausticEdgeProjectile.cs @@ -49,7 +49,6 @@ namespace CalamityMod.Projectiles.Melee public override bool OnTileCollide(Vector2 oldVelocity) { - projectile.damage = (int)(projectile.damage * 1.25); projectile.penetrate--; if (projectile.penetrate <= 0) { diff --git a/Projectiles/Ranged/CorossiveFlames.cs b/Projectiles/Ranged/CorossiveFlames.cs index 7537988e86..2ee30e1520 100644 --- a/Projectiles/Ranged/CorossiveFlames.cs +++ b/Projectiles/Ranged/CorossiveFlames.cs @@ -26,10 +26,6 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { Lighting.AddLight(projectile.Center, 0f, 0.25f, 0f); - if (projectile.timeLeft > 90) - { - projectile.timeLeft = 90; - } if (projectile.ai[0] > 7f) { float num296 = 1f; diff --git a/Projectiles/Ranged/CosmicFire.cs b/Projectiles/Ranged/CosmicFire.cs index a55ec15ef8..763c0c4803 100644 --- a/Projectiles/Ranged/CosmicFire.cs +++ b/Projectiles/Ranged/CosmicFire.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Ranged projectile.ranged = true; projectile.penetrate = -1; projectile.extraUpdates = 3; - projectile.timeLeft = 90; + projectile.timeLeft = 100; } public override void AI() @@ -31,10 +31,6 @@ namespace CalamityMod.Projectiles.Ranged projectile.scale *= 1.01f; } Lighting.AddLight(projectile.Center, 0.25f, 0f, 0.1f); - if (projectile.timeLeft > 90) - { - projectile.timeLeft = 90; - } if (projectile.ai[0] > 7f) { float scalar = 1f; diff --git a/Projectiles/Typeless/AstralStar.cs b/Projectiles/Typeless/AstralStar.cs index 525c749cd1..82e8b0695d 100644 --- a/Projectiles/Typeless/AstralStar.cs +++ b/Projectiles/Typeless/AstralStar.cs @@ -32,6 +32,9 @@ namespace CalamityMod.Projectiles.Typeless public override void AI() { + if (projectile.ai[0] == 3f) + CalamityGlobalProjectile.HomeInOnNPC(projectile, true, 300f, 12f, 20); + if (projectile.ai[0] == 2f) { projectile.Calamity().rogue = true; diff --git a/Projectiles/Typeless/UnstableSpark.cs b/Projectiles/Typeless/UnstableSpark.cs index 96ccb95791..529d00478b 100644 --- a/Projectiles/Typeless/UnstableSpark.cs +++ b/Projectiles/Typeless/UnstableSpark.cs @@ -81,10 +81,6 @@ namespace CalamityMod.Projectiles.Typeless public override bool OnTileCollide(Vector2 oldVelocity) { - if (projectile.penetrate == 0) - { - projectile.Kill(); - } return false; } } diff --git a/Sounds/Item/PlasmaGrenadeExplosion.cs b/Sounds/Item/PlasmaGrenadeExplosion.cs new file mode 100644 index 0000000000..8d2a7939b7 --- /dev/null +++ b/Sounds/Item/PlasmaGrenadeExplosion.cs @@ -0,0 +1,18 @@ +using Microsoft.Xna.Framework.Audio; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Sounds.Item +{ + public class PlasmaGrenadeExplosion : ModSound + { + public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type) + { + soundInstance = sound.CreateInstance(); + soundInstance.Volume = volume * 1f; + soundInstance.Pan = pan; + Main.PlaySoundInstance(soundInstance); + return soundInstance; + } + } +} diff --git a/Sounds/Item/PlasmaGrenadeExplosion.ogg b/Sounds/Item/PlasmaGrenadeExplosion.ogg new file mode 100644 index 0000000000000000000000000000000000000000..782b24b685b30c0e2b16f11f19eb855ddc87887d GIT binary patch literal 17070 zcmaibV|ZOn*YJrNr?G9@ww;{#G`1SswvEPU)YxilyFru2Y{Q1%Y47`a-uM0W%{6;p zYcI{rnzd%umWrjN1^^Q9Z-Mvy2MAynoP;2TaCdYzv3B``f{?8KhZ4vO@fT==Q28VI z-||QD55+p4dmAP5?SGXZsDIQjfT=pxAFY^GoGnT1tWC83DkqgAWoKn$XJu#QAf;8Y zcd-8GZ0=(2;7SJ#W+wt48jcpO9>&h*LK=>44rZj%j?R|mq^i!2q-?CrtSDdxO?5E| z1!bU;xRkmOJ0Hd$jGU&Tl#s_q2Sal+b7N;yLsqu;V6>!|rj!u4F;*s4E+#fU2$+BR zMJ_I(1pyER04QB>>7`3uutQPt#Z~e42*syu&+x<*(Sixt74;{mToTDj3dAGzX@h1H zfq*{(5n`U0q0wS+WT8|-I>{k4LSQJ84~(<^gF_Yn&q<2U3QQG)BMRMP=rLL*I+HWrtMrfte|}WK~1n@f{I{er2SM4jyD}!w!Y!qKysy!8*Daf+!xD z9U{l|fFEip=864J8#lSsy$Jd4#Iw4kpA4<;$M-ocPX@&(z1ON(( zXrqg05m50P5CEe90IH}O=71TvgPafh;n6{y^?dH+xZT2U8ctla@nTAP*JWfQZ|_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)tY_+v1;tsDSz>4b6K$Q%P8P= z?3(>7+lJJ*-9y()i;E?SOtbaM{Fn-YBPapp+K(GTOSe-`tH&&)3K&Va=r1r Date: Fri, 30 Oct 2020 21:34:21 -0400 Subject: [PATCH 03/17] colors of a few other items --- Items/CalamityGlobalItem.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 4ee8b61c1f..23355f42f1 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1125,7 +1125,7 @@ namespace CalamityMod.Items break; case CalamityRarity.ItemSpecific: - // Uniquely colored developer weapons + // Uniquely colored developer items if (item.type == ModContent.ItemType()) tt2.overrideColor = new Color(Main.DiscoR, 100, 255); if (item.type == ModContent.ItemType()) @@ -1150,6 +1150,16 @@ namespace CalamityMod.Items tt2.overrideColor = new Color(129, 29, 149); if (item.type == ModContent.ItemType()) tt2.overrideColor = new Color(220, 20, 60); + if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) + tt2.overrideColor = new Color(227, 226, 180); + if (item.type == ModContent.ItemType()) + tt2.overrideColor = new Color(254, 253, 235); + if (item.type == ModContent.ItemType()) + tt2.overrideColor = new Color(207, 17, 117); + if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) + tt2.overrideColor = CalamityUtils.ColorSwap(new Color(154, 255, 151), new Color(228, 151, 255), 2f); + if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) + tt2.overrideColor = CalamityUtils.ColorSwap(new Color(255, 132, 22), new Color(221, 85, 7), 2f); if (item.type == ModContent.ItemType()) { if (Main.GlobalTime % 1f < 0.6f) From bc910b25ae334743eba156d2636f0bfce9106c32 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 30 Oct 2020 21:44:55 -0400 Subject: [PATCH 04/17] using directive --- Items/CalamityGlobalItem.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 23355f42f1..94bf74c881 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -2,6 +2,7 @@ using CalamityMod.Buffs.Potions; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.CalPlayer; using CalamityMod.Items.Accessories; +using CalamityMod.Items.Armor; using CalamityMod.Items.DifficultyItems; using CalamityMod.Items.Materials; using CalamityMod.Items.PermanentBoosters; From 2b882bb2e7d044e695998e1e34e1440433edd99e Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 30 Oct 2020 21:58:37 -0400 Subject: [PATCH 05/17] Declared the rarity to be item specific --- Items/Armor/DemonshadeBreastplate.cs | 2 +- Items/Armor/DemonshadeGreaves.cs | 2 +- Items/Armor/DemonshadeHelm.cs | 2 +- Items/Weapons/Melee/RoyalKnivesMelee.cs | 2 +- .../Melee/TriactisTruePaladinianMageHammerofMightMelee.cs | 2 +- Items/Weapons/Ranged/Contagion.cs | 2 +- Items/Weapons/Ranged/SomaPrime.cs | 2 +- Items/Weapons/Rogue/RoyalKnives.cs | 2 +- Items/Weapons/Rogue/TriactisTruePaladinianMageHammerofMight.cs | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Items/Armor/DemonshadeBreastplate.cs b/Items/Armor/DemonshadeBreastplate.cs index 1614e94852..f61bea8cd9 100644 --- a/Items/Armor/DemonshadeBreastplate.cs +++ b/Items/Armor/DemonshadeBreastplate.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(4, 0, 0, 0); item.defense = 50; - item.Calamity().customRarity = CalamityRarity.Developer; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/DemonshadeGreaves.cs b/Items/Armor/DemonshadeGreaves.cs index 246b10d6b0..4149f9ef56 100644 --- a/Items/Armor/DemonshadeGreaves.cs +++ b/Items/Armor/DemonshadeGreaves.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(3, 0, 0, 0); item.defense = 50; //15 - item.Calamity().customRarity = CalamityRarity.Developer; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/DemonshadeHelm.cs b/Items/Armor/DemonshadeHelm.cs index 3b0de642b0..77c94edcfd 100644 --- a/Items/Armor/DemonshadeHelm.cs +++ b/Items/Armor/DemonshadeHelm.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(5, 0, 0, 0); item.defense = 50; //15 - item.Calamity().customRarity = CalamityRarity.Developer; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Weapons/Melee/RoyalKnivesMelee.cs b/Items/Weapons/Melee/RoyalKnivesMelee.cs index fc6cabc9ce..a54dc4ae65 100644 --- a/Items/Weapons/Melee/RoyalKnivesMelee.cs +++ b/Items/Weapons/Melee/RoyalKnivesMelee.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 9f; - item.Calamity().customRarity = CalamityRarity.Developer; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/TriactisTruePaladinianMageHammerofMightMelee.cs b/Items/Weapons/Melee/TriactisTruePaladinianMageHammerofMightMelee.cs index 1cb1f1e4bd..ce64456628 100644 --- a/Items/Weapons/Melee/TriactisTruePaladinianMageHammerofMightMelee.cs +++ b/Items/Weapons/Melee/TriactisTruePaladinianMageHammerofMightMelee.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 25f; - item.Calamity().customRarity = CalamityRarity.Developer; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override void AddRecipes() diff --git a/Items/Weapons/Ranged/Contagion.cs b/Items/Weapons/Ranged/Contagion.cs index dab83756fe..d45276c2ed 100644 --- a/Items/Weapons/Ranged/Contagion.cs +++ b/Items/Weapons/Ranged/Contagion.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = ModContent.ProjectileType(); item.shootSpeed = 20f; item.useAmmo = AmmoID.Arrow; - item.Calamity().customRarity = CalamityRarity.Developer; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0; diff --git a/Items/Weapons/Ranged/SomaPrime.cs b/Items/Weapons/Ranged/SomaPrime.cs index 2d30871104..23fc80a795 100644 --- a/Items/Weapons/Ranged/SomaPrime.cs +++ b/Items/Weapons/Ranged/SomaPrime.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Ranged item.shoot = ModContent.ProjectileType(); item.shootSpeed = 30f; item.useAmmo = AmmoID.Bullet; - item.Calamity().customRarity = CalamityRarity.Developer; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Rogue/RoyalKnives.cs b/Items/Weapons/Rogue/RoyalKnives.cs index 03098ed750..abd66c9e20 100644 --- a/Items/Weapons/Rogue/RoyalKnives.cs +++ b/Items/Weapons/Rogue/RoyalKnives.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 9f; item.Calamity().rogue = true; - item.Calamity().customRarity = CalamityRarity.Developer; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Rogue/TriactisTruePaladinianMageHammerofMight.cs b/Items/Weapons/Rogue/TriactisTruePaladinianMageHammerofMight.cs index a55ae882c3..a7f0f096fc 100644 --- a/Items/Weapons/Rogue/TriactisTruePaladinianMageHammerofMight.cs +++ b/Items/Weapons/Rogue/TriactisTruePaladinianMageHammerofMight.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); item.shootSpeed = 25f; item.Calamity().rogue = true; - item.Calamity().customRarity = CalamityRarity.Developer; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) From 9f353f1d7610477ab7513e37904ec2e210707938 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 30 Oct 2020 22:12:44 -0400 Subject: [PATCH 06/17] increased the time interval for the colors on many of the weapons --- Items/CalamityGlobalItem.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 94bf74c881..57ef74e4c1 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1138,13 +1138,13 @@ namespace CalamityMod.Items if (item.type == ModContent.ItemType()) tt2.overrideColor = CalamityUtils.ColorSwap(new Color(255, 166, 0), new Color(25, 250, 25), 4f); //alternates between emerald green and amber (BanditHueh) if (item.type == ModContent.ItemType()) - tt2.overrideColor = CalamityUtils.ColorSwap(new Color(210, 0, 255), new Color(255, 248, 24), 2f); + tt2.overrideColor = CalamityUtils.ColorSwap(new Color(210, 0, 255), new Color(255, 248, 24), 4f); if (item.type == ModContent.ItemType()) - tt2.overrideColor = CalamityUtils.ColorSwap(new Color(131, 239, 255), new Color(36, 55, 230), 2f); + tt2.overrideColor = CalamityUtils.ColorSwap(new Color(131, 239, 255), new Color(36, 55, 230), 4f); if (item.type == ModContent.ItemType()) - tt2.overrideColor = CalamityUtils.ColorSwap(new Color(255, 69, 0), new Color(139, 0, 0), 2f); + tt2.overrideColor = CalamityUtils.ColorSwap(new Color(255, 69, 0), new Color(139, 0, 0), 4f); if (item.type == ModContent.ItemType()) - tt2.overrideColor = CalamityUtils.ColorSwap(new Color(191, 45, 71), new Color(185, 187, 253), 2f); + tt2.overrideColor = CalamityUtils.ColorSwap(new Color(191, 45, 71), new Color(185, 187, 253), 4f); if (item.type == ModContent.ItemType()) tt2.overrideColor = new Color(146, 0, 0); if (item.type == ModContent.ItemType()) @@ -1158,9 +1158,9 @@ namespace CalamityMod.Items if (item.type == ModContent.ItemType()) tt2.overrideColor = new Color(207, 17, 117); if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) - tt2.overrideColor = CalamityUtils.ColorSwap(new Color(154, 255, 151), new Color(228, 151, 255), 2f); + tt2.overrideColor = CalamityUtils.ColorSwap(new Color(154, 255, 151), new Color(228, 151, 255), 4f); if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) - tt2.overrideColor = CalamityUtils.ColorSwap(new Color(255, 132, 22), new Color(221, 85, 7), 2f); + tt2.overrideColor = CalamityUtils.ColorSwap(new Color(255, 132, 22), new Color(221, 85, 7), 4f); if (item.type == ModContent.ItemType()) { if (Main.GlobalTime % 1f < 0.6f) From 2ff21451af4b850a87deff507e06f23e73349f28 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 30 Oct 2020 23:02:00 -0400 Subject: [PATCH 07/17] Earth custom rarity --- Items/CalamityGlobalItem.cs | 18 +++++++++++++++++- Items/Weapons/Melee/Earth.cs | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 57ef74e4c1..31a1993ea9 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1158,7 +1158,7 @@ namespace CalamityMod.Items if (item.type == ModContent.ItemType()) tt2.overrideColor = new Color(207, 17, 117); if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) - tt2.overrideColor = CalamityUtils.ColorSwap(new Color(154, 255, 151), new Color(228, 151, 255), 4f); + tt2.overrideColor = CalamityUtils.ColorSwap(new Color(154, 255, 151), new Color(228, 151, 255), 4f); if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) tt2.overrideColor = CalamityUtils.ColorSwap(new Color(255, 132, 22), new Color(221, 85, 7), 4f); if (item.type == ModContent.ItemType()) @@ -1176,6 +1176,22 @@ namespace CalamityMod.Items tt2.overrideColor = Color.Lerp(Color.White, new Color(89, 229, 255), (Main.GlobalTime % 1f - 0.8f) / 0.2f); } } + if (item.type == ModContent.ItemType()) + { + List earthColors = new List() + { + new Color(255, 93, 143), + new Color(178, 247, 239), + new Color(171, 196, 255) + }; + if (tt2 != null) + { + int colorIndex = (int)(Main.GlobalTime / 2 % earthColors.Count); + Color currentColor = earthColors[colorIndex]; + Color nextColor = earthColors[(colorIndex + 1) % earthColors.Count]; + tt2.overrideColor = Color.Lerp(currentColor, nextColor, Main.GlobalTime % 2f > 1f ? 1f : Main.GlobalTime % 1f); + } + } // Uniquely colored legendary weapons and Yharim's Crystal if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) diff --git a/Items/Weapons/Melee/Earth.cs b/Items/Weapons/Melee/Earth.cs index 0d399602c1..ead74ee388 100644 --- a/Items/Weapons/Melee/Earth.cs +++ b/Items/Weapons/Melee/Earth.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Melee item.autoReuse = true; item.value = Item.buyPrice(5, 0, 0, 0); item.rare = 10; - item.Calamity().customRarity = CalamityRarity.Developer; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) From 6d06497510bd877eb52c6e811a15c7168c459512 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Fri, 30 Oct 2020 23:53:23 -0400 Subject: [PATCH 08/17] adjusted Earth's colors --- Items/CalamityGlobalItem.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 31a1993ea9..3ef2b9bf79 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1180,9 +1180,9 @@ namespace CalamityMod.Items { List earthColors = new List() { - new Color(255, 93, 143), - new Color(178, 247, 239), - new Color(171, 196, 255) + new Color(255, 99, 146), + new Color(255, 228, 94), + new Color(127, 200, 248) }; if (tt2 != null) { From b597126cd9238c03ebb06479075f8d2d81a59443 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 31 Oct 2020 08:46:24 -0400 Subject: [PATCH 09/17] Red Sun --- Items/CalamityGlobalItem.cs | 8 +++++--- Items/Weapons/Melee/RedSun.cs | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 3ef2b9bf79..b74c19de94 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1145,20 +1145,22 @@ namespace CalamityMod.Items tt2.overrideColor = CalamityUtils.ColorSwap(new Color(255, 69, 0), new Color(139, 0, 0), 4f); if (item.type == ModContent.ItemType()) tt2.overrideColor = CalamityUtils.ColorSwap(new Color(191, 45, 71), new Color(185, 187, 253), 4f); + if (item.type == ModContent.ItemType()) + tt2.overrideColor = CalamityUtils.ColorSwap(new Color(204, 86, 80), new Color(237, 69, 141), 4f); if (item.type == ModContent.ItemType()) tt2.overrideColor = new Color(146, 0, 0); if (item.type == ModContent.ItemType()) tt2.overrideColor = new Color(129, 29, 149); if (item.type == ModContent.ItemType()) tt2.overrideColor = new Color(220, 20, 60); - if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) - tt2.overrideColor = new Color(227, 226, 180); if (item.type == ModContent.ItemType()) tt2.overrideColor = new Color(254, 253, 235); if (item.type == ModContent.ItemType()) tt2.overrideColor = new Color(207, 17, 117); + if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) + tt2.overrideColor = new Color(227, 226, 180); if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) - tt2.overrideColor = CalamityUtils.ColorSwap(new Color(154, 255, 151), new Color(228, 151, 255), 4f); + tt2.overrideColor = CalamityUtils.ColorSwap(new Color(154, 255, 151), new Color(228, 151, 255), 4f); if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) tt2.overrideColor = CalamityUtils.ColorSwap(new Color(255, 132, 22), new Color(221, 85, 7), 4f); if (item.type == ModContent.ItemType()) diff --git a/Items/Weapons/Melee/RedSun.cs b/Items/Weapons/Melee/RedSun.cs index b82929fc9e..75580890fc 100644 --- a/Items/Weapons/Melee/RedSun.cs +++ b/Items/Weapons/Melee/RedSun.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Melee item.rare = 10; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 15f; - item.Calamity().customRarity = CalamityRarity.Developer; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; } public override void AddRecipes() From 4286cc3b277180497cec981d67f48b75b8913592 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Wed, 7 Oct 2020 22:23:18 -0500 Subject: [PATCH 10/17] Placeable rock. --- Items/Rock.cs | 9 +++++++++ Tiles/PlacedRock.cs | 40 ++++++++++++++++++++++++++++++++++++++++ Tiles/PlacedRock.png | Bin 0 -> 213 bytes 3 files changed, 49 insertions(+) create mode 100644 Tiles/PlacedRock.cs create mode 100644 Tiles/PlacedRock.png diff --git a/Items/Rock.cs b/Items/Rock.cs index 49c2aa5bf0..15d49b2633 100644 --- a/Items/Rock.cs +++ b/Items/Rock.cs @@ -1,4 +1,6 @@ +using CalamityMod.Tiles; using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items @@ -16,6 +18,13 @@ namespace CalamityMod.Items item.width = 20; item.height = 20; item.value = Item.buyPrice(0, 0, 0, 1); + item.createTile = ModContent.TileType(); + item.useStyle = ItemUseStyleID.SwingThrow; + item.useTurn = true; + item.useAnimation = 15; + item.useTime = 10; + item.autoReuse = true; + item.consumable = true; } } } diff --git a/Tiles/PlacedRock.cs b/Tiles/PlacedRock.cs new file mode 100644 index 0000000000..742922575a --- /dev/null +++ b/Tiles/PlacedRock.cs @@ -0,0 +1,40 @@ +using CalamityMod.Items; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles +{ + public class PlacedRock : ModTile + { + public override void SetDefaults() + { + Main.tileFrameImportant[Type] = true; + + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(Type); + + dustType = DustID.Stone; + drop = ModContent.ItemType(); + + AddMapEntry(new Color(83, 91, 102)); + } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + WorldGen.Check1x1(i, j, Type); + return true; + } + + public override void PlaceInWorld(int i, int j, Item item) + { + Main.tile[i, j].frameX = 0; + Main.tile[i, j].frameY = 0; + } + } +} diff --git a/Tiles/PlacedRock.png b/Tiles/PlacedRock.png new file mode 100644 index 0000000000000000000000000000000000000000..26f0ed28a15f9d79aab2d16ea8e345e63917db44 GIT binary patch literal 213 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G|s0G|+7AT23kJab-KaY2%^gTIlvZE$oNQ1FY$RBIr`Q4-`A{2u}s?ltd? z1d4GMctjR6Fz_7)VaDV6D^h@hMxHK?AsWF)PZ%;W2=E*YxETMgJ~>qS?q1!@&!37X uY&y+oJ7exoz6p2S4JI#;o4q{!08^kSYwGv?fpdYn89ZJ6T-G@yGywqGr9vM7 literal 0 HcmV?d00001 From 75416a692f27cf16fdd3c4c9e022ff94fc864524 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Wed, 7 Oct 2020 22:27:21 -0500 Subject: [PATCH 11/17] Adrenaline persists during BR now. --- CalPlayer/CalamityPlayerMiscEffects.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 9f3f598f6f..f185ba7328 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -289,9 +289,10 @@ namespace CalamityMod.CalPlayer else { - // If any boss is alive (or you are between DoG phases), you gain adrenaline smoothly. + // If any boss is alive (or you are between DoG phases or Boss Rush is active), you gain adrenaline smoothly. // EXCEPTION: Wall of Flesh is alive and you are not in hell. Then you don't get anything. - if ((CalamityPlayer.areThereAnyDamnBosses || CalamityWorld.DoGSecondStageCountdown > 0) && !wofAndNotHell) + if ((CalamityPlayer.areThereAnyDamnBosses || CalamityWorld.DoGSecondStageCountdown > 0 || BossRushEvent.BossRushActive) && + !wofAndNotHell) { int numAdrenBoosts = (modPlayer.adrenalineBoostOne ? 1 : 0) + From f29718f1f7d9002d5f3969e5b174bc92271f44be Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Wed, 7 Oct 2020 22:39:09 -0500 Subject: [PATCH 12/17] Boss fight slime rain spawn prevention --- ILEditing/ILChanges.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ILEditing/ILChanges.cs b/ILEditing/ILChanges.cs index 4147572b5e..0b8fcb0aec 100644 --- a/ILEditing/ILChanges.cs +++ b/ILEditing/ILChanges.cs @@ -68,10 +68,17 @@ namespace CalamityMod.ILEditing private static void LabDoorFixes() { + On.Terraria.NPC.SlimeRainSpawns += PreventBossSlimeRainSpawns; On.Terraria.Player.TileInteractionsUse += Player_TileInteractionsUse; On.Terraria.WorldGen.OpenDoor += LabDoorsOpen; On.Terraria.WorldGen.CloseDoor += LabDoorsClose; } + + private static void PreventBossSlimeRainSpawns(On.Terraria.NPC.orig_SlimeRainSpawns orig, int plr) + { + if (!Main.player[plr].Calamity().bossZen) + orig(plr); + } #endregion #region IL Editing Injection Functions From 5e80dd00e8c12af3e7a1106b75d01af13fd17109 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Wed, 7 Oct 2020 22:47:27 -0500 Subject: [PATCH 13/17] Moved the IL Edit to the correct method --- ILEditing/ILChanges.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ILEditing/ILChanges.cs b/ILEditing/ILChanges.cs index 0b8fcb0aec..a80c62f190 100644 --- a/ILEditing/ILChanges.cs +++ b/ILEditing/ILChanges.cs @@ -27,6 +27,7 @@ namespace CalamityMod.ILEditing /// public static void Initialize() { + On.Terraria.NPC.SlimeRainSpawns += PreventBossSlimeRainSpawns; ApplyLifeBytesChanges(); SlideDungeonOver(); LabDoorFixes(); @@ -68,7 +69,6 @@ namespace CalamityMod.ILEditing private static void LabDoorFixes() { - On.Terraria.NPC.SlimeRainSpawns += PreventBossSlimeRainSpawns; On.Terraria.Player.TileInteractionsUse += Player_TileInteractionsUse; On.Terraria.WorldGen.OpenDoor += LabDoorsOpen; On.Terraria.WorldGen.CloseDoor += LabDoorsClose; From b8a11d850dcf3618dc3800a37db1ba770f96b58c Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Thu, 8 Oct 2020 16:47:40 -0500 Subject: [PATCH 14/17] Town NPC spawn manipulation changes --- CalamityConfig.cs | 18 ++++++++++++++++++ ILEditing/ILChanges.cs | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/CalamityConfig.cs b/CalamityConfig.cs index 86eda6b763..02f132d1c7 100644 --- a/CalamityConfig.cs +++ b/CalamityConfig.cs @@ -128,6 +128,24 @@ namespace CalamityMod [Tooltip("Sets Reactive Boss DR to always be full strength, even if the boss has already been defeated.\nIf disabled, the effect is only 66% as powerful after the boss has been defeated.\n\nReactive Boss DR makes bosses smoothly take less damage if they are being killed very quickly.\nIn most cases, the system has no noticeable effect.")] public bool FullPowerReactiveBossDR { get; set; } + [Label("Let Town NPCs spawn at night.")] + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(false)] + [Tooltip("Allows you to determine if town NPCs (including the Old Man) can spawn at night.")] + public bool CanTownNPCsSpawnAtNight { get; set; } + + private const int MinTownNPCSpawnMultiplier = 1; + private const int MaxTownNPCSpawnMultiplier = 10; + + [Label("Town NPC Spawn Rate Multiplier")] + [BackgroundColor(192, 54, 64, 192)] + [Range(MinTownNPCSpawnMultiplier, MaxTownNPCSpawnMultiplier)] + [Increment(1)] + [DrawTicks] + [DefaultValue(MinTownNPCSpawnMultiplier)] + [Tooltip("Makes town NPCs spawn more quickly, the higher this value is.")] + public int TownNPCSpawnRateMultiplier { get; set; } + private const float MinBossHealthBoost = 0f; private const float MaxBossHealthBoost = 900f; diff --git a/ILEditing/ILChanges.cs b/ILEditing/ILChanges.cs index a80c62f190..b4056fd154 100644 --- a/ILEditing/ILChanges.cs +++ b/ILEditing/ILChanges.cs @@ -3,6 +3,7 @@ using Mono.Cecil.Cil; using MonoMod.Cil; using System; using System.Collections.Generic; +using System.Reflection; using Terraria; using Terraria.GameInput; using Terraria.ID; @@ -27,9 +28,13 @@ namespace CalamityMod.ILEditing /// public static void Initialize() { + var spawnTownNPCMethod = typeof(Main).GetMethod("UpdateTime_SpawnTownNPCs", BindingFlags.Static | BindingFlags.NonPublic); + cachedUpdateTime_SpawnTownNPCs = Delegate.CreateDelegate(typeof(Action), spawnTownNPCMethod) as Action; + On.Terraria.NPC.SlimeRainSpawns += PreventBossSlimeRainSpawns; ApplyLifeBytesChanges(); SlideDungeonOver(); + AlterTownNPCSpawnRate(); LabDoorFixes(); PreventStupidTreesNearOcean(); } @@ -79,6 +84,42 @@ namespace CalamityMod.ILEditing if (!Main.player[plr].Calamity().bossZen) orig(plr); } + + private static Action cachedUpdateTime_SpawnTownNPCs; + + private static void AlterTownNPCSpawnRate() + { + IL.Terraria.Main.UpdateTime += (il) => + { + // Don't do town NPC spawning at the end (after a !Main.dayTime return). + // Do it at the beginning in spite of time. + + var cursor = new ILCursor(il); + cursor.EmitDelegate(() => + { + // A cached delegate is used here instead of direct reflection for performance reasons + // since UpdateTime is called every frame. + if (Main.dayTime || CalamityConfig.Instance.CanTownNPCsSpawnAtNight) + cachedUpdateTime_SpawnTownNPCs(); + }); + + if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchCallOrCallvirt
("UpdateTime_SpawnTownNPCs"))) + { + CalamityMod.Instance.Logger.Warn("Town NPC spawn editing code failed."); + return; + } + + cursor.Emit(OpCodes.Ret); + }; + + On.Terraria.Main.UpdateTime_SpawnTownNPCs += (orig) => + { + int oldWorldRate = Main.worldRate; + Main.worldRate *= CalamityConfig.Instance.TownNPCSpawnRateMultiplier; + orig(); + Main.worldRate = oldWorldRate; + }; + } #endregion #region IL Editing Injection Functions From 6806693b105761198515bd0eb9f5318ff4bf4030 Mon Sep 17 00:00:00 2001 From: Dominic Date: Sun, 11 Oct 2020 02:56:50 -0500 Subject: [PATCH 15/17] Mode Indicator UI --- CalamityMod.cs | 7 ++++ ExtraTextures/UI/ModeIndicatorArea.png | Bin 0 -> 1124 bytes ExtraTextures/UI/ModeIndicatorArma.png | Bin 0 -> 527 bytes ExtraTextures/UI/ModeIndicatorDeath.png | Bin 0 -> 539 bytes ExtraTextures/UI/ModeIndicatorRev.png | Bin 0 -> 523 bytes ExtraTextures/UI/ModeIndicatorRune.png | Bin 0 -> 567 bytes UI/ModeIndicatorUI.cs | 47 ++++++++++++++++++++++++ 7 files changed, 54 insertions(+) create mode 100644 ExtraTextures/UI/ModeIndicatorArea.png create mode 100644 ExtraTextures/UI/ModeIndicatorArma.png create mode 100644 ExtraTextures/UI/ModeIndicatorDeath.png create mode 100644 ExtraTextures/UI/ModeIndicatorRev.png create mode 100644 ExtraTextures/UI/ModeIndicatorRune.png create mode 100644 UI/ModeIndicatorUI.cs diff --git a/CalamityMod.cs b/CalamityMod.cs index 464591ab3f..aad3d5b450 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -815,6 +815,13 @@ namespace CalamityMod return true; }, InterfaceScaleType.None)); + // Mode Indicator UI. + layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Mode Indicator UI", delegate () + { + ModeIndicatorUI.Draw(Main.spriteBatch); + return true; + }, InterfaceScaleType.UI)); + // Astral Arcanum overlay (if open) layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Astral Arcanum UI", delegate () { diff --git a/ExtraTextures/UI/ModeIndicatorArea.png b/ExtraTextures/UI/ModeIndicatorArea.png new file mode 100644 index 0000000000000000000000000000000000000000..701089c3ccdaa9e9c2109e739c44bc0a64782550 GIT binary patch literal 1124 zcmV-q1e^PbP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D1NlirK~#8N?VC+& z6hRP%cl`l=BxLm5B?E8SD?vUxXU zRnM0P>w%$XCo?^hs%Ls;YIcW{$z<>^xH?)scgJ7HM?;zIl?&4T_w;528?f>8iOij4 zcl(9RRrF;@7$J0Kgx7%4Xfe0r@%P*UHUo5JNEjisW`t$H>B*1WUb=EQx8URZ!`$Aw zvyxk&t>4uc5=ID(jerUF*4FZ8Ml%4cKYp0oy`5LN1)3qu+x>l+tEg*87$LZg(C!4; z1g`-WUPF$*9p`poX(6|D4GALz)d)6#GtZd-SPm=$R#%pDdvJJ^TMafu+b=Ko8WKhb zQzPmc@QKEN&1ai3SAjc5+(80l_@|uf7iDZ=gS73po^Q!q#Z4MRN(~7kgyCrEMm7Nk zXpsbL05S=%-R--pxdm*1g=WZycL%xUv55O+Lo{GW7$HoJxOTl7y>Y$9b(#&(&P8C2 zA#9L_mEqF;Vtd@@;Qr>z=jv(|MhJ680Axfv*El0U%Z%3qMmrAg{(*KJVFY0YB1Jw; z>D-!qj!2PDQ_9%vWMQpW+7Bii55V!__$|T+!5ky_oWgQ|zhgO{%Y1HH+XHXE8rpI5 z@)#qC+JQ)s<>-3Ac9>G8(!|TXlx~OpF=2$zI1n7+^o+sJ840Y%>vJZx^#J#;t*3$g zrLh6yLn4e2=B^qXT|V#l@Auaq$Xo^24S-gEus&-QE`BriX79DkRcOb}%j2p+6yHa1 zHJRCXR2kx}L3#}UsB!MTJZk{M)$=gIiD?9n0oFTAE5lraD zunYi*w6@$^rPgYkR{xqIQIBxqHUfB``Z!|@`o&!$s?%-v55fp1(?FyM&rTL8va^$h zwO%p-HvA23`?d%pgtlZ&T z#A^We7r*;#nc7A$mLY(jI&nY1caYjsWLpL>VT90{5scRmejCnoWdIXK2%QFs6 literal 0 HcmV?d00001 diff --git a/ExtraTextures/UI/ModeIndicatorArma.png b/ExtraTextures/UI/ModeIndicatorArma.png new file mode 100644 index 0000000000000000000000000000000000000000..d5e6ea594e2e8d084fc20206a7b516cd03f3080b GIT binary patch literal 527 zcmV+q0`UEbP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!T}$*G`xo>tW@%z2fXQ1AnBSs* zF-wcLP0VR`4@1t=*BGbhUrboeYd&fz(Z6^*w}v4b2Ns6N`&GDBJaBg!Z*0P(;XQ+$ z{$BI$6ts3=@*cc|UB5eh6%&?s+8ubyID|>TD#GQr6F5Gx3n#q^m|Pe~u+Q&$EM RA}s&_002ovPDHLkV1lY2=AZxo literal 0 HcmV?d00001 diff --git a/ExtraTextures/UI/ModeIndicatorDeath.png b/ExtraTextures/UI/ModeIndicatorDeath.png new file mode 100644 index 0000000000000000000000000000000000000000..5cb843a4e080579f791d11c58eb2009b32de7d4c GIT binary patch literal 539 zcmV+$0_6RPP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGizyJUazyWI3i3tDz0kBC#K~z{r)t5U@ z!cZ87!Aqh8UNEhbTq7nXUT`ta1~-hm8-G9(2Ny>d2NV4RZ0<%jiL-GLbubYFh)zPp z3xgzTFnxR8p(ix0i#tk>{7KTgZDl8v&s(^QiBasP%KNQPwBoTw{J~uo%0$*QT!o<78x)ws>>0}ab@E4MbNcJHrKyumuoUXTEG9=EA zib@bx@U~EZ)k#d)Lz&Hi0K6Rdg3p@$@Ik8y%Ww@4^%Jv~q`0&rW>ymCyJBX--gjSO z!sP7f##I(RoX^1QxxC7|H!;~?HGBDVx(83JY{Oe8oqONCiRJ58#_oDnF0tz`Hj)~{ zNM;OU^%{e(dE71P^my&D4wLL)FD&m)c5rvfeEz`XIHbYqtZKsKjd}w<>a*U7N2D3A+l&I3<)(H?fRd0pgTU d#-qeO-!DxV+$_Wl%tQbH002ovPDHLkV1l_K>=6I} literal 0 HcmV?d00001 diff --git a/ExtraTextures/UI/ModeIndicatorRev.png b/ExtraTextures/UI/ModeIndicatorRev.png new file mode 100644 index 0000000000000000000000000000000000000000..b1209d63f86704c7646f18937a37b308593b99cd GIT binary patch literal 523 zcmV+m0`&cfP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!2kdb!2!6DYwZ940ia1lK~z{r)t606 z0zn+cwHL61y%@XQbXUnBsIW_P4v#|jZheA2K*v5npP*a!z@v1IE=e7N4BhOOlD&9H zsMwfi=Ye);8NIaQ59Ar0S=`@$#+fzg`+i~+TzCD?3q0>8DVswvA@kqS8moroN?EqT z)T%Yv3eZ)+9OEd%PUjhE+l$CTK8I|!+DNruSAqD99cL|MxUsc~e0zCCF0T}jRS zd}y?gPBD*+8aKBvkG#ITLX!B5Z7U1o)lvx`@D7P5&E91N4pM2P%JHC&oR!zRvJ!+9 zysg)f<`@&sAq{uZpGY0&{b?jCz%@Y3H?CSKBx!6P%2t@-#gS|URJsG?_!)DKIcK_6 zt&TU&c;qh@CbSW#?}uf4RyE_FR>$WR}u)*-?r@Mcpc`<@$O?6Nls=a zkvyGfNqg?$wB+fu|M86^XITqr&dx<>-s|>|r&HniqA7p7QK#45S5TRZl|j;!#AmEN zWiHvdp(?;ril>s!@Tt=_)UDmp_IbB$Hh3J{&4N=(Ly#1FHa-=$`i(mwzI N002ovPDHLkV1l!9>_`9r literal 0 HcmV?d00001 diff --git a/ExtraTextures/UI/ModeIndicatorRune.png b/ExtraTextures/UI/ModeIndicatorRune.png new file mode 100644 index 0000000000000000000000000000000000000000..51a2ed08d5258278e95aeed20db9b06ee537d0b6 GIT binary patch literal 567 zcmV-70?7S|P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGizyJUazyWI3i3tDz0nAB6K~z{r)t668 z0zn*x#}qmU{zXGbU6l$13+oVci|`Wk1?uL#@6ZS6*4;|bxbA`_7@U~^1>t`;1dE>n2kgQz<$9=d6gei0*|;p zAu0h-!AiMIX&+;NHPl1TSO)h1u)i_Pz|DPz^8EOj^5~3@_qO;Lpc3x|{6%%yPLR0Xgb zVYf0e{Af3A@|0=xPeQK(GDe0n_BED~D*%iPWh^pg><1MF(bE%>enbEO002ovPDHLk FV1m3{0lfeK literal 0 HcmV?d00001 diff --git a/UI/ModeIndicatorUI.cs b/UI/ModeIndicatorUI.cs new file mode 100644 index 0000000000..23e7a31a24 --- /dev/null +++ b/UI/ModeIndicatorUI.cs @@ -0,0 +1,47 @@ +using CalamityMod.World; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.UI +{ + public class ModeIndicatorUI + { + public static readonly Vector2 OffsetToAreaCenter = new Vector2(0f, 4f); + public static Vector2 DifficultyIconOffset => new Vector2(0f, -16f); + public static Vector2 ArmageddonIconOffset => new Vector2(12f, 7f); + public static Vector2 DefiledRuneIconOffset => new Vector2(-12f, 7); + public static void Draw(SpriteBatch spriteBatch) + { + // The mode indicator should only be displayed when the inventory is open, to prevent obstruction. + if (!Main.playerInventory) + return; + + Texture2D outerAreaTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/UI/ModeIndicatorArea"); + Texture2D revengeanceIconTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/UI/ModeIndicatorRev"); + Texture2D deathIconTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/UI/ModeIndicatorDeath"); + Texture2D armageddonIconTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/UI/ModeIndicatorArma"); + + // CONSIDER: The defiled rune is scheduled to be removed. Possibly change the 3rd slot to occupy death instead of the + // death icon completely overtaking revengeance? + Texture2D defiledRuneIconTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/UI/ModeIndicatorRune"); + + Vector2 drawCenter = new Vector2(Main.screenWidth - 400f, 72f) + outerAreaTexture.Size() * 0.5f; + + spriteBatch.Draw(outerAreaTexture, drawCenter, null, Color.White, 0f, outerAreaTexture.Size() * 0.5f, 1f, SpriteEffects.None, 0f); + + if (CalamityWorld.revenge) + { + Texture2D difficultyIconToUse = CalamityWorld.death ? deathIconTexture : revengeanceIconTexture; + spriteBatch.Draw(difficultyIconToUse, drawCenter + DifficultyIconOffset, null, Color.White, 0f, revengeanceIconTexture.Size() * 0.5f, 0.9f, SpriteEffects.None, 0f); + } + + if (CalamityWorld.armageddon) + spriteBatch.Draw(armageddonIconTexture, drawCenter + ArmageddonIconOffset, null, Color.White, 0f, revengeanceIconTexture.Size() * 0.5f, 0.9f, SpriteEffects.None, 0f); + + if (CalamityWorld.defiled) + spriteBatch.Draw(defiledRuneIconTexture, drawCenter + DefiledRuneIconOffset, null, Color.White, 0f, revengeanceIconTexture.Size() * 0.5f, 0.9f, SpriteEffects.None, 0f); + } + } +} From 918f1465e81e2163a9a60e4e831776510d4aa361 Mon Sep 17 00:00:00 2001 From: Dominic Date: Fri, 16 Oct 2020 18:31:26 -0500 Subject: [PATCH 16/17] Water leeches aren't as annoying anymore --- Buffs/DamageOverTime/HeavyBleeding.cs | 20 ++++++++++++++++++++ Buffs/DamageOverTime/HeavyBleeding.png | Bin 0 -> 740 bytes CalPlayer/CalamityPlayer.cs | 15 +++++++++++---- CalPlayer/CalamityPlayerLifeRegen.cs | 15 ++++++++++++++- NPCs/AcidRain/WaterLeech.cs | 5 ++--- 5 files changed, 47 insertions(+), 8 deletions(-) create mode 100644 Buffs/DamageOverTime/HeavyBleeding.cs create mode 100644 Buffs/DamageOverTime/HeavyBleeding.png diff --git a/Buffs/DamageOverTime/HeavyBleeding.cs b/Buffs/DamageOverTime/HeavyBleeding.cs new file mode 100644 index 0000000000..e44fb8e344 --- /dev/null +++ b/Buffs/DamageOverTime/HeavyBleeding.cs @@ -0,0 +1,20 @@ +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.DamageOverTime +{ + public class HeavyBleeding : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Heavy Bleeding"); + Description.SetDefault("You're losing a lot of blood"); + Main.debuff[Type] = true; + Main.pvpBuff[Type] = true; + Main.buffNoSave[Type] = true; + longerExpertDebuff = false; + } + + public override void Update(Player player, ref int buffIndex) => player.Calamity().waterLeechBleeding = true; + } +} diff --git a/Buffs/DamageOverTime/HeavyBleeding.png b/Buffs/DamageOverTime/HeavyBleeding.png new file mode 100644 index 0000000000000000000000000000000000000000..26ea11ef6b33be0a4d82af8b95034cce1400865a GIT binary patch literal 740 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfvmUKs7M+SzC{oH>NSwWJ?9znhg z3{`3j3=J&|48MRv4KElNN(~qoUL`OvSj}Ky5HFasE6@fgArasc;tHgJ;Q!K&|3%@? zfedNZ|I6n6|NnpWvgtWM3C5BjzhDN3XE)M7oFs2|7k074j@LjAdx@v7EBg};VL@&E z&oewfgXHsz{6ZMdFDjn}k z5hW>!C8<`)MX5lF!N|bKK-a)R*U&P=(A>(z*viCQ+rYrez+mb8g@z~^a`RI%(<*Um zxN=Cc7pOr2WJ7U&T1k0gQ7S`5Nl8JmmA-yvZen^W5N9T5>*W`v?>R3!7pPVOq&6g@ zG&jl0$|XO!G&eP`#L6lFsI-{DaQXk;`am_}NNPMmrdU~dq-LgPlrR_@X?*$d1*k*} zQ%QJcN=XJ##f4~#N}vi!Bo)4yxv3?U1*r^RH|ZDTrQ2@`^Fy=AHw37P!O+yw+``n- zz{p&r`SMnv5K3@l6x3@i+cjV+7}xBXXm2Q-1f)78&qol`;+02~hS5C8xG literal 0 HcmV?d00001 diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 3bc380a5b5..2f1449c732 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -776,6 +776,7 @@ namespace CalamityMod.CalPlayer public bool vaporfied = false; public bool energyShellCooldown = false; public bool prismaticCooldown = false; + public bool waterLeechBleeding = false; #endregion #region Buff @@ -1792,6 +1793,7 @@ namespace CalamityMod.CalPlayer vaporfied = false; energyShellCooldown = false; prismaticCooldown = false; + waterLeechBleeding = false; revivify = false; trinketOfChiBuff = false; @@ -2137,11 +2139,12 @@ namespace CalamityMod.CalPlayer vaporfied = false; energyShellCooldown = false; prismaticCooldown = false; - #endregion + waterLeechBleeding = false; + #endregion - #region Rogue - // Stealth - rogueStealth = 0f; + #region Rogue + // Stealth + rogueStealth = 0f; rogueStealthMax = 0f; stealthAcceleration = 1f; @@ -4223,6 +4226,10 @@ namespace CalamityMod.CalPlayer { damageSource = PlayerDeathReason.ByCustomReason(player.name + " fell prey to their sins."); } + if (waterLeechBleeding && damage == 10.0 && hitDirection == 0 && damageSource.SourceOtherIndex == 8) + { + damageSource = PlayerDeathReason.ByCustomReason(player.name + " lost too much blood."); + } if (shadowflame && damage == 10.0 && hitDirection == 0 && damageSource.SourceOtherIndex == 8) { damageSource = PlayerDeathReason.ByCustomReason(player.name + "'s spirit was turned to ash."); diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 77ebb26d24..2385889ac0 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -202,7 +202,20 @@ namespace CalamityMod.CalPlayer lifeRegenLost += 16; } - if (modPlayer.pFlames) + if (modPlayer.waterLeechBleeding) + { + if (player.lifeRegen > 0) + player.lifeRegen = 0; + + player.lifeRegenTime = 0; + lifeRegenLost += 6; + if (CalamityWorld.downedAquaticScourge) + lifeRegenLost += 6; + if (CalamityWorld.downedPolterghast) + lifeRegenLost += 12; + } + + if (modPlayer.pFlames) { if (player.lifeRegen > 0) player.lifeRegen = 0; diff --git a/NPCs/AcidRain/WaterLeech.cs b/NPCs/AcidRain/WaterLeech.cs index dc30d15300..450a75e411 100644 --- a/NPCs/AcidRain/WaterLeech.cs +++ b/NPCs/AcidRain/WaterLeech.cs @@ -8,6 +8,7 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Buffs.StatDebuffs; using System.IO; +using CalamityMod.Buffs.DamageOverTime; namespace CalamityMod.NPCs.AcidRain { @@ -27,18 +28,15 @@ namespace CalamityMod.NPCs.AcidRain npc.width = 26; npc.height = 14; - npc.damage = 10; npc.lifeMax = 30; if (CalamityWorld.downedPolterghast) { - npc.damage = 60; npc.lifeMax = 2250; npc.defense = 10; } else if (CalamityWorld.downedAquaticScourge) { - npc.damage = 30; npc.lifeMax = 90; } @@ -120,6 +118,7 @@ namespace CalamityMod.NPCs.AcidRain if (npc.Distance(destination) < 45f) { player.AddBuff(BuffID.Bleeding, 180, true); + player.AddBuff(ModContent.BuffType(), 30, true); } else if (!npc.wet && npc.Distance(destination) > 85f) { From 57fd5c4f940b84f395b3a556a28ddb985010b8eb Mon Sep 17 00:00:00 2001 From: Dominic Date: Fri, 6 Nov 2020 20:34:17 -0600 Subject: [PATCH 17/17] Last Prism Beams don't die to SW segments --- CalamityLists.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CalamityLists.cs b/CalamityLists.cs index f94ca8d5ec..98ab5c2a9f 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -402,6 +402,7 @@ namespace CalamityMod ProjectileID.VortexBeater, ProjectileID.DD2PhoenixBow, ProjectileID.LastPrism, + ProjectileID.LastPrismLaser, ProjectileID.LaserMachinegun, ProjectileID.ChargedBlasterCannon, ProjectileID.MedusaHead, @@ -418,7 +419,10 @@ namespace CalamityMod ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), ModContent.ProjectileType(), + // ModContent.ProjectileType(), // TODO: ADD THE APOTHEOSIS WORM HERE LATER. IT IS IN A DIFFERENT BRANCH AS OF WRITING THIS. ModContent.ProjectileType(), ModContent.ProjectileType(),