From 31dcf9d215bda99f56e00a2c5cc95a5030cf9041 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Thu, 16 Dec 2021 16:17:56 -0600 Subject: [PATCH] 1 - Defiled Feather makes double jumps grant more jump speed. 2 - Fixed the Astrum Aureus and Crabulon collision issue. 3 - Brimstone Elemental has 20% more HP. 4 - Ares Plasma and Tesla Arms attack soon after Ares spawns and have offset attack timings. --- CalPlayer/CalamityPlayerMiscEffects.cs | 20 ++++++++++++++ Items/DifficultyItems/DefiledRune.cs | 2 +- Items/DifficultyItems/MLGRune.cs | 2 +- NPCs/AstrumAureus/AstrumAureus.cs | 2 +- NPCs/BrimstoneElemental/BrimstoneElemental.cs | 2 +- NPCs/Crabulon/CrabulonIdle.cs | 6 ++--- NPCs/ExoMechs/Ares/AresBody.cs | 6 +++++ NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs | 26 +++++++++++-------- NPCs/ExoMechs/Ares/AresTeslaCannon.cs | 25 ++++++++++-------- Projectiles/CalamityGlobalProjectile.cs | 9 ------- 10 files changed, 61 insertions(+), 39 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index f49483f406..764185129e 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -70,6 +70,26 @@ namespace CalamityMod.CalPlayer if (player.wingsLogic > 0) player.jumpSpeedBoost += 1.2f; + // Defiled jump boosts + if (modPlayer.noWings) + { + // 10% extra jump speed per extra jump + if (player.doubleJumpCloud) + player.jumpSpeedBoost += 0.5f; + + if (player.doubleJumpBlizzard) + player.jumpSpeedBoost += 0.5f; + + if (player.doubleJumpSandstorm) + player.jumpSpeedBoost += 0.5f; + + if (player.doubleJumpFart) + player.jumpSpeedBoost += 0.5f; + + if (player.doubleJumpSail) + player.jumpSpeedBoost += 0.5f; + } + // Decrease the counter on Fearmonger set turbo regeneration if (modPlayer.fearmongerRegenFrames > 0) modPlayer.fearmongerRegenFrames--; diff --git a/Items/DifficultyItems/DefiledRune.cs b/Items/DifficultyItems/DefiledRune.cs index 8f84cde8fb..d731b006fb 100644 --- a/Items/DifficultyItems/DefiledRune.cs +++ b/Items/DifficultyItems/DefiledRune.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.DifficultyItems { DisplayName.SetDefault("Defiled Feather"); Tooltip.SetDefault("It's a long way down from a mountain...\n" + - "Favorite this item to disable wings."); + "Favorite this item to disable wings but increase the effectiveness of double jumps."); Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(7, 8)); } diff --git a/Items/DifficultyItems/MLGRune.cs b/Items/DifficultyItems/MLGRune.cs index 51518c4897..7ff18f6cb8 100644 --- a/Items/DifficultyItems/MLGRune.cs +++ b/Items/DifficultyItems/MLGRune.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.DifficultyItems public override void SetStaticDefaults() { DisplayName.SetDefault("Demon Trophy"); - Tooltip.SetDefault("Boosts spawn rate by 1.25 times\n" + + Tooltip.SetDefault("Boosts spawn rate by 1.25x\n" + "Effects cannot be reversed"); } diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs index 2873d78a3a..dd01160fcf 100644 --- a/NPCs/AstrumAureus/AstrumAureus.cs +++ b/NPCs/AstrumAureus/AstrumAureus.cs @@ -43,7 +43,7 @@ namespace CalamityMod.NPCs.AstrumAureus npc.npcSlots = 15f; npc.GetNPCDamage(); npc.Calamity().canBreakPlayerDefense = true; - npc.width = 426; + npc.width = 374; npc.height = 374; npc.defense = 40; npc.DR_NERD(0.15f); diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index e43b6a59c2..e3ff82580a 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -38,7 +38,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental npc.height = 150; npc.defense = 15; npc.value = Item.buyPrice(0, 12, 0, 0); - npc.LifeMaxNERB(30000, 41000, 650000); + npc.LifeMaxNERB(36000, 49200, 780000); npc.DR_NERD(0.15f); if (CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive) { diff --git a/NPCs/Crabulon/CrabulonIdle.cs b/NPCs/Crabulon/CrabulonIdle.cs index 47ae6055e0..ce0dff11e3 100644 --- a/NPCs/Crabulon/CrabulonIdle.cs +++ b/NPCs/Crabulon/CrabulonIdle.cs @@ -37,7 +37,7 @@ namespace CalamityMod.NPCs.Crabulon npc.Calamity().canBreakPlayerDefense = true; npc.npcSlots = 14f; npc.GetNPCDamage(); - npc.width = 312; + npc.width = 196; npc.height = 196; npc.defense = 8; npc.LifeMaxNERB(3000, 4000, 1100000); @@ -230,15 +230,13 @@ namespace CalamityMod.NPCs.Crabulon if (Main.netMode != NetmodeID.Server) { if (!player.dead && player.active && (player.Center - npc.Center).Length() < 800f) - { player.AddBuff(ModContent.BuffType(), 2); - } } int sporeDust = Dust.NewDust(npc.position, npc.width, npc.height, 56, npc.velocity.X, npc.velocity.Y, 255, new Color(0, 80, 255, 80), 1.2f); Main.dust[sporeDust].noGravity = true; Main.dust[sporeDust].velocity *= 0.5f; npc.ai[1] += 1f; - if (npc.justHit || npc.ai[1] >= 600f) + if (npc.justHit) { npc.ai[0] = 1f; npc.ai[1] = 0f; diff --git a/NPCs/ExoMechs/Ares/AresBody.cs b/NPCs/ExoMechs/Ares/AresBody.cs index af0a9b8190..8b480e07a2 100644 --- a/NPCs/ExoMechs/Ares/AresBody.cs +++ b/NPCs/ExoMechs/Ares/AresBody.cs @@ -117,6 +117,10 @@ namespace CalamityMod.NPCs.ExoMechs.Ares // Max distance from the target before they are unable to hear sound telegraphs private const float soundDistance = 4800f; + // Timers for the Tesla and Plasma Arms so that they fire at the proper times when they spawn and enter new phases + public const float plasmaArmStartTimer = 260f; + public const float teslaArmStartTimer = 80f; + // Drawers for arm segments. public static PrimitiveTrail LightningDrawer; public static PrimitiveTrail LightningBackgroundDrawer; @@ -222,9 +226,11 @@ namespace CalamityMod.NPCs.ExoMechs.Ares break; case 1: lol = NPC.NewNPC((int)npc.position.X + (npc.width / 2), (int)npc.position.Y + (npc.height / 2), ModContent.NPCType(), npc.whoAmI); + Main.npc[lol].Calamity().newAI[1] = plasmaArmStartTimer; break; case 2: lol = NPC.NewNPC((int)npc.position.X + (npc.width / 2), (int)npc.position.Y + (npc.height / 2), ModContent.NPCType(), npc.whoAmI); + Main.npc[lol].Calamity().newAI[1] = teslaArmStartTimer; break; case 3: lol = NPC.NewNPC((int)npc.position.X + (npc.width / 2), (int)npc.position.Y + (npc.height / 2), ModContent.NPCType(), npc.whoAmI); diff --git a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs index 0aa45aaaea..d08a8b61f1 100644 --- a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs +++ b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs @@ -237,6 +237,19 @@ namespace CalamityMod.NPCs.ExoMechs.Ares else Lighting.AddLight(npc.Center, 0.1f * npc.Opacity, 0.25f * npc.Opacity, 0.05f * npc.Opacity); + // Gate values + bool fireMoreBolts = calamityGlobalNPC_Body.newAI[0] == (float)AresBody.Phase.Deathrays; + float plasmaBoltPhaseGateValue = fireMoreBolts ? 120f : 270f; + if (enraged) + plasmaBoltPhaseGateValue *= 0.1f; + else if (lastMechAlive) + plasmaBoltPhaseGateValue *= 0.4f; + else if (berserk) + plasmaBoltPhaseGateValue *= 0.7f; + + // Set attack timer to this when despawning or when Ares is coming out of deathray phase + float setTimerTo = (int)(plasmaBoltPhaseGateValue * 0.95f) - 1; + // Despawn if target is dead if (player.dead) { @@ -244,7 +257,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares if (player.dead) { AIState = (float)Phase.Nothing; - calamityGlobalNPC.newAI[1] = 0f; + calamityGlobalNPC.newAI[1] = setTimerTo; calamityGlobalNPC.newAI[2] = 0f; npc.dontTakeDamage = true; @@ -301,17 +314,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares // Distance where Ares Plasma Arm stops moving float movementDistanceGateValue = 50f; - // Gate values // Make plasma bolts split less if in deathray spiral phase and not the last mech alive, but fire more if in deathray spiral phase - bool fireMoreBolts = calamityGlobalNPC_Body.newAI[0] == (float)AresBody.Phase.Deathrays; bool boltsSplitLess = fireMoreBolts && !lastMechAlive; - float plasmaBoltPhaseGateValue = fireMoreBolts ? 120f : 270f; - if (enraged) - plasmaBoltPhaseGateValue *= 0.1f; - else if (lastMechAlive) - plasmaBoltPhaseGateValue *= 0.4f; - else if (berserk) - plasmaBoltPhaseGateValue *= 0.7f; // If Plasma Cannon can fire projectiles, cannot fire if too close to the target and in deathray spiral phase bool canFire = Vector2.Distance(npc.Center, player.Center) > 320f || calamityGlobalNPC_Body.newAI[0] != (float)AresBody.Phase.Deathrays; @@ -328,7 +332,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares if (doNotFire) { AIState = (float)Phase.Nothing; - calamityGlobalNPC.newAI[1] = 0f; + calamityGlobalNPC.newAI[1] = setTimerTo; calamityGlobalNPC.newAI[2] = 0f; } diff --git a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs index a34beedf9f..a2d2c176dc 100644 --- a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs +++ b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs @@ -238,6 +238,18 @@ namespace CalamityMod.NPCs.ExoMechs.Ares else Lighting.AddLight(npc.Center, 0.1f * npc.Opacity, 0.25f * npc.Opacity, 0.25f * npc.Opacity); + // Gate values + float teslaOrbPhaseGateValue = fireMoreOrbs ? 120f : 270f; + if (enraged) + teslaOrbPhaseGateValue *= 0.1f; + else if (lastMechAlive) + teslaOrbPhaseGateValue *= 0.4f; + else if (berserk) + teslaOrbPhaseGateValue *= 0.7f; + + // Set attack timer to this when despawning or when Ares is coming out of deathray phase + float setTimerTo = (int)(teslaOrbPhaseGateValue * 0.3f) - 1; + // Despawn if target is dead if (player.dead) { @@ -245,7 +257,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares if (player.dead) { AIState = (float)Phase.Nothing; - calamityGlobalNPC.newAI[1] = 0f; + calamityGlobalNPC.newAI[1] = setTimerTo; calamityGlobalNPC.newAI[2] = 0f; npc.dontTakeDamage = true; @@ -302,15 +314,6 @@ namespace CalamityMod.NPCs.ExoMechs.Ares // Distance where Ares Tesla Arm stops moving float movementDistanceGateValue = 50f; - // Gate values - float teslaOrbPhaseGateValue = fireMoreOrbs ? 120f : 270f; - if (enraged) - teslaOrbPhaseGateValue *= 0.1f; - else if (lastMechAlive) - teslaOrbPhaseGateValue *= 0.4f; - else if (berserk) - teslaOrbPhaseGateValue *= 0.7f; - // If Tesla Cannon can fire projectiles, cannot fire if too close to the target and in deathray spiral phase bool canFire = Vector2.Distance(npc.Center, player.Center) > 320f || calamityGlobalNPC_Body.newAI[0] != (float)AresBody.Phase.Deathrays; @@ -326,7 +329,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares if (doNotFire) { AIState = (float)Phase.Nothing; - calamityGlobalNPC.newAI[1] = 0f; + calamityGlobalNPC.newAI[1] = setTimerTo; calamityGlobalNPC.newAI[2] = 0f; } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index b94e45bcc7..40a38ad66b 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -76,9 +76,6 @@ namespace CalamityMod.Projectiles public bool stealthStrike = false; // Update all existing rogue weapons with this public bool momentumCapacitatorBoost = false; // Constant acceleration - // Iron Heart - public int ironHeartDamage = 0; - // Counters and Timers public int stealthStrikeHitCount = 0; @@ -1928,12 +1925,6 @@ namespace CalamityMod.Projectiles projectile.damage = defDamage + 15; } - // Iron Heart damage variable will scale with projectile.damage - if (CalamityWorld.ironHeart) - { - ironHeartDamage = 0; - } - if (projectile.modProjectile != null && projectile.modProjectile.mod.Name.Equals("CalamityMod")) goto SKIP_CALAMITY;