diff --git a/Balancing/BalancingChangesManager.cs b/Balancing/BalancingChangesManager.cs index 1e5a5fe8b1..0b603d9b1e 100644 --- a/Balancing/BalancingChangesManager.cs +++ b/Balancing/BalancingChangesManager.cs @@ -97,23 +97,23 @@ namespace CalamityMod.Balancing NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), ResistTrueMelee(0.8f))); #endregion - #region Brain of Cthulhu: Creepers - // 50% resist to true melee. - NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.Creeper, Do(ResistTrueMelee(0.5f)))); - - // 50% resist to Demon Scythe. - NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.Creeper, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.DemonScythe)))); - #endregion - #region Eater of Worlds - // 50% resist to true melee. - NPCSpecificBalancingChanges.AddRange(Bundle(EaterOfWorldsIDList.List, Do(ResistTrueMelee(0.5f)))); - // 50% resist to Demon Scythe. NPCSpecificBalancingChanges.AddRange(Bundle(EaterOfWorldsIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.DemonScythe)))); // 40% resist to Sky Glaze. NPCSpecificBalancingChanges.AddRange(Bundle(EaterOfWorldsIDList.List, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType())))); + + // 25% resist to true melee. + NPCSpecificBalancingChanges.AddRange(Bundle(EaterOfWorldsIDList.List, Do(ResistTrueMelee(0.75f)))); + #endregion + + #region Brain of Cthulhu: Creepers + // 50% resist to Demon Scythe. + NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.Creeper, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.DemonScythe)))); + + // 25% resist to true melee. + NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.Creeper, Do(ResistTrueMelee(0.75f)))); #endregion #region The Perforators diff --git a/Buffs/CalamityGlobalBuff.cs b/Buffs/CalamityGlobalBuff.cs index f893df6689..4b5ab5dba9 100644 --- a/Buffs/CalamityGlobalBuff.cs +++ b/Buffs/CalamityGlobalBuff.cs @@ -115,6 +115,19 @@ namespace CalamityMod.Buffs else if (type == BuffID.Rabies) { player.GetDamage() -= 0.2f; + + // Reimplementation of random debuff infliction; now occurs on a consistent timer and with a different debuff list + if (player.buffTime[buffIndex] % 600 == 300) + { + int debuffType = Main.rand.Next(4) switch + { + 0 => BuffID.Weak, + 1 => BuffID.Bleeding, + 2 => BuffID.Darkness, + _ => BuffID.BrokenArmor, + }; + player.AddBuff(debuffType, Main.rand.Next(90, 211)); + } } else if (type == BuffID.Werewolf) { @@ -151,15 +164,6 @@ namespace CalamityMod.Buffs npc.DelBuff(buffIndex); buffIndex--; } - else if (type == BuffID.Slow) - { - if (npc.Calamity().slowed < npc.buffTime[buffIndex]) - npc.Calamity().slowed = npc.buffTime[buffIndex]; - if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0) - npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().slowed; - npc.DelBuff(buffIndex); - buffIndex--; - } if (type == BuffID.Electrified) { if (npc.Calamity().electrified < npc.buffTime[buffIndex]) @@ -251,6 +255,10 @@ namespace CalamityMod.Buffs tip = tip.Replace("45", "22.5"); break; + case BuffID.Rabies: + tip = CalamityUtils.GetTextValue("Vanilla.BuffDescription.Rabies"); + break; + case BuffID.SugarRush: tip = tip.Replace("20", "10"); break; diff --git a/Buffs/Potions/ShadowBuff.png b/Buffs/Potions/ShadowBuff.png index ed4141070a..bb0b1ed058 100644 Binary files a/Buffs/Potions/ShadowBuff.png and b/Buffs/Potions/ShadowBuff.png differ diff --git a/Buffs/StatBuffs/AquaticHeartBuff.cs b/Buffs/StatBuffs/AquaticHeartBuff.cs index 344acacd15..d57b5c79f9 100644 --- a/Buffs/StatBuffs/AquaticHeartBuff.cs +++ b/Buffs/StatBuffs/AquaticHeartBuff.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Buffs.StatBuffs { player.breath = player.breathMax + 3; } - if (Main.myPlayer == player.whoAmI && player.wet && NPC.downedBoss3) + if (Main.myPlayer == player.whoAmI && player.Calamity().countsAsAnyWet && NPC.downedBoss3) { player.AddBuff(ModContent.BuffType(), 360); } diff --git a/Buffs/StatDebuffs/GlacialState.cs b/Buffs/StatDebuffs/GlacialState.cs index ffbb2a810b..f87ac9805c 100644 --- a/Buffs/StatDebuffs/GlacialState.cs +++ b/Buffs/StatDebuffs/GlacialState.cs @@ -18,11 +18,6 @@ namespace CalamityMod.Buffs.StatDebuffs BuffID.Sets.LongerExpertDebuff[Type] = true; } - public override void Update(Player player, ref int buffIndex) - { - player.Calamity().gState = true; - } - public override void Update(NPC npc, ref int buffIndex) { if (npc.Calamity().gState < npc.buffTime[buffIndex]) @@ -32,20 +27,5 @@ namespace CalamityMod.Buffs.StatDebuffs npc.DelBuff(buffIndex); buffIndex--; } - - internal static void DrawEffects(PlayerDrawSet drawInfo) - { - Player Player = drawInfo.drawPlayer; - - if (Main.rand.NextBool(4)) - { - Dust d = Dust.NewDustDirect(Player.Center - 10 * Vector2.One, 20, 20, DustID.IcyMerman); - d.noGravity = Main.rand.NextBool(); - d.noLight = false; - d.velocity *= 0.2f; - d.velocity.Y -= Main.rand.NextFloat(0.4f, 0.6f); - d.scale = Main.rand.NextFloat(0.4f, 0.7f); - } - } } } diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 13d9a47315..03f19ef7d3 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -176,6 +176,8 @@ namespace CalamityMod.CalPlayer public int momentumCapacitorTime = 0; /// A multiplier on the player's movement speed applied while using Momentum Capacitor. public float momentumCapacitorBoost = 0f; + + public bool countsAsAnyWet => (Player.armor[0].type == ItemID.FishBowl || Player.wetCount > 0 || Player.wet || Player.honeyWet || Player.lavaWet); #endregion #region Speedrun Timer @@ -199,7 +201,6 @@ namespace CalamityMod.CalPlayer #region External variables -- Not used by Calamity, only via Mod.Call or reflection public int externalAbyssLight = 0; - public float externalBreathLossMultBoost = 0f; public float externalBreathTickBoost = 0f; public float externalFlightTimeMultBoost = 0f; @@ -278,6 +279,8 @@ namespace CalamityMod.CalPlayer public int evilSmasherBoost = 0; /// Cooldown variable for spawning Plague Tainted SMG's drones from left-click bullets. public int plagueTaintedSMGDroneCooldown = 0; + /// Cooldown variable which prevents using Firestorm Cannon or Spectralstorm Cannon during their overheat periods. + public int flareGunOverheat = 0; /// /// If true, this player's Brittle Star Staff minions are in their orbiting mode.
/// While in this mode, they orbit around the player, do not break on hits, and increase defense. @@ -661,8 +664,6 @@ namespace CalamityMod.CalPlayer #endregion #region Abyss - /// The amount of breath lost on each tick while in the Abyss. - public float abyssBreathLossStat = 0; /// The rate at which breath is lost while in the Abyss. public float abyssBreathLossRateStat = 0; /// The rate at which health is decreased after running out of breath while in the Abyss. @@ -1265,7 +1266,6 @@ namespace CalamityMod.CalPlayer public bool pFlames = false; public bool hFlames = false; public bool hInferno = false; - public bool gState = false; public bool bBlood = false; public bool brainRot = false; public bool heavybleeding = false; @@ -2004,7 +2004,6 @@ namespace CalamityMod.CalPlayer Player.statLifeMax2 += 45; int percentMaxLifeIncrease = 0; - // Blood Pact and Chalice of the Blood God stack their HP bonuses if you want to equip both if (bloodPact) percentMaxLifeIncrease += 25; @@ -2044,7 +2043,6 @@ namespace CalamityMod.CalPlayer DashID = string.Empty; externalAbyssLight = 0; - externalBreathLossMultBoost = 0f; externalBreathTickBoost = 0f; externalFlightTimeMultBoost = 0f; externalRageEnabled = externalAdrenalineEnabled = null; @@ -2483,7 +2481,6 @@ namespace CalamityMod.CalPlayer pFlames = false; hFlames = false; hInferno = false; - gState = false; bBlood = false; brainRot = false; heavybleeding = false; @@ -2905,7 +2902,6 @@ namespace CalamityMod.CalPlayer demonSwordKillMode = false; externalAbyssLight = 0; - externalBreathLossMultBoost = 0f; externalBreathTickBoost = 0f; externalFlightTimeMultBoost = 0f; externalColdImmunity = externalHeatImmunity = false; @@ -2952,7 +2948,6 @@ namespace CalamityMod.CalPlayer pFlames = false; hFlames = false; hInferno = false; - gState = false; bBlood = false; brainRot = false; heavybleeding = false; @@ -3243,6 +3238,7 @@ namespace CalamityMod.CalPlayer ascendantTrail = false; evilSmasherBoost = 0; burningSeaBurnOut = 0; + flareGunOverheat = 0; hellbornShots = 0; searedPanCounter = 0; searedPanTimer = 0; diff --git a/CalPlayer/CalamityPlayerDrawEffects.cs b/CalPlayer/CalamityPlayerDrawEffects.cs index b5470a17e4..636e5136a1 100644 --- a/CalPlayer/CalamityPlayerDrawEffects.cs +++ b/CalPlayer/CalamityPlayerDrawEffects.cs @@ -230,15 +230,6 @@ namespace CalamityMod.CalPlayer if (calamityPlayer.eutrophication && drawInfo.shadow == 0f) Eutrophication.DrawEffects(drawInfo); - if (calamityPlayer.gState && drawInfo.shadow == 0f) - { - // These lines cannot be moved to Glacial State's own file - r *= 0.13f; - g *= 0.66f; - - GlacialState.DrawEffects(drawInfo); - } - if (calamityPlayer.gsInferno && drawInfo.shadow == 0f) GodSlayerInferno.DrawEffects(drawInfo); diff --git a/CalPlayer/CalamityPlayerFishing.cs b/CalPlayer/CalamityPlayerFishing.cs index c965b451ff..a87dd8a9fb 100644 --- a/CalPlayer/CalamityPlayerFishing.cs +++ b/CalPlayer/CalamityPlayerFishing.cs @@ -370,7 +370,7 @@ namespace CalamityMod.CalPlayer if (ZoneAbyss || ZoneSulphur) canSulphurFish = true; - Item item = Player.ActiveItem(); + Item item = Player.HeldItem; if (!canSulphurFish || item.fishingPole <= 0 || item.holdStyle != 1) fishingLevel = -1; diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index fa96a6410f..dc24b3fd02 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -2702,15 +2702,20 @@ namespace CalamityMod.CalPlayer } if (inkBomb && !abyssalMirror && !eclipseMirror) { - var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType())); - if (Player.whoAmI == Main.myPlayer && !Player.HasCooldown(Cooldowns.InkBomb.ID)) + if (Player.whoAmI == Main.myPlayer) { - Player.AddCooldown(Cooldowns.InkBomb.ID, CalamityUtils.SecondsToFrames(20)); - rogueStealth += 0.5f; + if (!Player.HasCooldown(Cooldowns.InkBomb.ID)) + { + Player.AddCooldown(Cooldowns.InkBomb.ID, CalamityUtils.SecondsToFrames(20)); + rogueStealth += 0.5f; + SoundEngine.PlaySound(SoundID.NPCDeath28 with { Volume = 2f }, Player.Center); + } + + var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType())); + SoundEngine.PlaySound(SoundID.Item1, Player.Center); for (int i = 0; i < 3; i++) { - SoundEngine.PlaySound(SoundID.Item61, Player.Center); - int ink = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, Main.rand.NextFloat(-3f, 3f), Main.rand.NextFloat(-0f, -4f), ModContent.ProjectileType(), 0, 0, Player.whoAmI); + int ink = Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Vector2.One.RotatedByRandom(MathHelper.TwoPi) * 2f, ModContent.ProjectileType(), 0, 0, Player.whoAmI); if (ink.WithinBounds(Main.maxProjectiles)) Main.projectile[ink].DamageType = DamageClass.Generic; } diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 65019aed05..3263c66296 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -766,47 +766,6 @@ namespace CalamityMod.CalPlayer } #endregion - // Life regen soft cap. - if (Player.statLife < actualMaxLife) - { - // The soft cap doesn't apply if the player is not moving and not using a weapon while having any of the following: - // Shiny Stone, Cosmic Freeze buff from the Cosmic Discharge, Demonshade Armor, Regenator, or The Camper. - int baseLifeRegenBoost = 4; - bool noLifeRegenCap = (Player.shinyStone || cFreeze || shadeRegen || camper || regenator) && - Player.StandingStill() && Player.itemAnimation == 0; - - if (!noLifeRegenCap) - { - // Calculate the % of HP the player has left. - float maxLifeRatio = Player.statLife / (float)actualMaxLife; - - // Calculate the ratio of the player's current max life relative to the starting HP of 100. - // This makes the soft cap far less harsh at lower amounts of max life. - // Ranges from 20 (at 100 max life) to 4 (at 500 max life) to 2 (at 1000 max life) to 1 (at greater than 2000 max life). - int lifeRegenSoftCapMax = 20; - int lifeRegenSoftCapMin = (int)Math.Round(100f / actualMaxLife * lifeRegenSoftCapMax); - - // The soft cap for life regen which ranges from 20 (at less than 5% HP) to 1 (at greater than or equal to 95% HP). - // This value is capped at a min and max amount. - int lifeRegenSoftCap = (int)MathHelper.Clamp((int)Math.Round((1f - maxLifeRatio) * lifeRegenSoftCapMax), lifeRegenSoftCapMin, lifeRegenSoftCapMax); - - // If life regen is greater than the calculated soft cap, reduce it. - if (Player.lifeRegen - baseLifeRegenBoost > lifeRegenSoftCap) - { - // The scalar used to calculate how much the life regen stat should be reduced by. - // Ranges from 1 (at 0% HP) to 2 (at 100% HP). - float lifeRegenScalar = 1f + maxLifeRatio; - - // Calculate the amount of life regen the player should get according to the soft cap and their current % HP remaining. - // The higher the player's % HP remaining the less life regen they get and vice versa. - int defLifeRegen = (int)((Player.lifeRegen - baseLifeRegenBoost) / lifeRegenScalar); - - // Set the player's life regen to the scaled amount. - Player.lifeRegen = baseLifeRegenBoost + defLifeRegen; - } - } - } - if (regenator) // Gives special regen of it's own, but disables all regular life regen { if (Player.miscCounter % 7 == 0 && Player.statLife < (int)(Player.statLifeMax2 * 0.5f)) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index ab4c0fe82c..ba800637b8 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -479,13 +479,17 @@ namespace CalamityMod.CalPlayer IsFirstDashFrame = false; else IsFirstDashFrame = true; - + // THIS MUST BE NEAR THE END OF PostUpdateMiscEffects SO ALL OTHER RUN SPEED IS DONE FIRST. DO NOT PUT ANY RUN SPEED AFTER THIS - + // Multiplies movement speed by 1.5x so that you don't feel like a snail in the early game. // This applies to movement speed boosts as well as base speed to ensure they are actually worth their listed value compared to base speed + // // Disabled while Overhaul is enabled, because Overhaul does very similar things to make movement more snappy - if (ExternalMods.overhaul is null && CalamityServerConfig.Instance.FasterBaseSpeed) + // 22JUN2025: Ozzatron: Disabled while Remnants is enabled, because Remnants has its own move speed reworks. + + bool ignoreSpeedConfig = ExternalMods.overhaul is not null || ExternalMods.remnants is not null; + if (!ignoreSpeedConfig && CalamityServerConfig.Instance.FasterBaseSpeed) Player.moveSpeed *= BalancingConstants.DefaultMoveSpeedBoost; // This is used to increase horizontal velocity based on the player's movement speed stat. @@ -2012,7 +2016,7 @@ namespace CalamityMod.CalPlayer SyncCooldownRemoval(Main.dedServ, expiredCooldowns); // Grant the player 5 seconds of immunity to immobilizing debuffs after an immobilizing debuff wears off. - if (Player.stoned || Player.frozen || Player.webbed || gState) + if (Player.stoned || Player.frozen || Player.webbed) { ImmobilityDebuffImmunityTimer = ImmobilityDebuffImmunityTimerMax; } @@ -2022,7 +2026,6 @@ namespace CalamityMod.CalPlayer Player.buffImmune[BuffID.Stoned] = true; Player.buffImmune[BuffID.Frozen] = true; Player.buffImmune[BuffID.Webbed] = true; - Player.buffImmune[ModContent.BuffType()] = true; } if (arsenalCooldown > 0) @@ -2047,6 +2050,8 @@ namespace CalamityMod.CalPlayer --fullRageSoundCountdownTimer; if (plagueTaintedSMGDroneCooldown > 0) plagueTaintedSMGDroneCooldown--; + if (flareGunOverheat > 0) + flareGunOverheat--; if (momentumCapacitorTime > 0) --momentumCapacitorTime; if (phantomicHeartRegen > 0 && phantomicHeartRegen < 1000) @@ -2621,7 +2626,6 @@ namespace CalamityMod.CalPlayer Player.buffImmune[BuffID.Frozen] = true; Player.buffImmune[BuffID.Chilled] = true; - Player.buffImmune[ModContent.BuffType()] = true; } // Cosmic Discharge Cosmic Freeze buff, gives surrounding enemies the Glacial State debuff @@ -2734,23 +2738,19 @@ namespace CalamityMod.CalPlayer // Plagued Fuel Pack and Blunder Booster effects if (jetPackDash > 0 && Player.whoAmI == Main.myPlayer) { - int velocityAmt = blunderBooster ? 35 : 25; - int velocityMult = jetPackDash > 1 ? velocityAmt : 5; - Player.velocity = new Vector2(jetPackDirection, -1) * velocityMult; + int velocityMult = (int)((blunderBooster ? 35 : 25) * Utils.GetLerpValue(-4, 5, jetPackDash, true)); + Player.velocity = new Vector2(jetPackDirection, -1f) * velocityMult; if (blunderBooster) { - int lightningCount = Main.rand.Next(5, 7); + int lightningCount = 4; var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType())); for (int i = 0; i < lightningCount; i++) { - Vector2 lightningVel = new Vector2(Main.rand.NextFloat(-1, 1), Main.rand.NextFloat(-1, 1)); - lightningVel.Normalize(); - lightningVel *= Main.rand.NextFloat(1f, 2f); - int damage = (int)Player.GetTotalDamage().ApplyTo(30); + Vector2 lightningVel = Player.velocity.SafeNormalize(Vector2.UnitX).RotatedByRandom(0.3f) * Main.rand.NextFloat(7f, 10f); + int damage = (int)Player.GetTotalDamage().ApplyTo(35); int projectile = Projectile.NewProjectile(source, Player.Center, lightningVel, ModContent.ProjectileType(), damage, 0, Player.whoAmI, Main.rand.Next(2), 0f); - Main.projectile[projectile].timeLeft = Main.rand.Next(180, 240); if (projectile.WithinBounds(Main.maxProjectiles)) Main.projectile[projectile].DamageType = DamageClass.Generic; } @@ -2765,17 +2765,14 @@ namespace CalamityMod.CalPlayer } else if (plaguedFuelPack) { - int numClouds = Main.rand.Next(8, 10); + int numClouds = 3; var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType())); for (int i = 0; i < numClouds; i++) { - Vector2 cloudVelocity = new Vector2(Main.rand.NextFloat(-1, 1), Main.rand.NextFloat(-1, 1)); - cloudVelocity.Normalize(); - cloudVelocity *= Main.rand.NextFloat(0f, 1f); - int damage = (int)Player.GetTotalDamage().ApplyTo(20); + Vector2 cloudVelocity = Player.velocity.SafeNormalize(Vector2.UnitX).RotatedByRandom(0.3f) * Main.rand.NextFloat(5f, 7f); + int damage = (int)Player.GetTotalDamage().ApplyTo(30); int projectile = Projectile.NewProjectile(source, Player.Center, cloudVelocity, ModContent.ProjectileType(), damage, 0, Player.whoAmI, 0, 0); - Main.projectile[projectile].timeLeft = Main.rand.Next(180, 240); if (projectile.WithinBounds(Main.maxProjectiles)) Main.projectile[projectile].DamageType = DamageClass.Generic; } @@ -2955,36 +2952,7 @@ namespace CalamityMod.CalPlayer } // Breath lost while at zero breath - double breathLoss = Main.remixWorld ? (point.Y < abyssLevel1 ? 50D * depthRatioFromAbyssLayer1 : 0D) : (point.Y > abyssLevel1 ? 50D * depthRatioFromAbyssLayer1 : 0D); - - // Breath Loss Multiplier, depending on gear - // 27AUG2024: Ozzatron: fixed this being subtractive like mining speed. now doesn't stack exponentially - // It is now a multiplier for the time it takes to lose any unit amount of breath - double breathLossTimeMult = 1D + - (Player.gills ? 0.2 : 0D) + // 1.2 - (oceanCrest ? 0.2 : 0D) + // 1.2 - (victideSet ? 0.2 : 0D) + // 1.2 - (Player.accDivingHelm ? 0.25 : 0D) + // 1.25 - (Player.arcticDivingGear ? 0.25 : 0D) + // 1.25 - (aquaticEmblem ? 0.25 : 0D) + // 1.25 - (Player.accMerman ? 0.3 : 0D) + // 1.3 - (reaverExplore ? 0.3 : 0D) + // 1.3 - ((aquaticHeart && NPC.downedBoss3) ? 0.3 : 0D) + // 1.3 - (abyssalDivingSuit ? 0.3 : 0D) + // 1.3 - externalBreathLossMultBoost; - - // Invert the breath loss time multiplier, to get the multiplier for the speed at which breath is actually lost - double breathLossMult = 1D / breathLossTimeMult; - - // Limit the multiplier to 5% - if (breathLossMult < 0.05) - breathLossMult = 0.05; - - // Reduce breath lost while at zero breath, depending on gear - breathLoss *= breathLossTimeMult; - - // Record the final breath loss for the stat meter - abyssBreathLossStat = (float)breathLoss; + double breathLoss = Main.remixWorld ? (point.Y < abyssLevel1 ? 1D : 0D) : (point.Y > abyssLevel1 ? 1D : 0D); // Defense loss int defenseLoss = (int)(120D * depthRatio); @@ -3005,24 +2973,8 @@ namespace CalamityMod.CalPlayer // Record the final defense reduction for the stat meter abyssDefenseLossStat = defenseLoss; - // Bleed effect based on abyss layer - if (ZoneAbyssLayer4) - { - Player.bleed = true; - } - else if (ZoneAbyssLayer3) - { - if (!abyssalDivingSuit) - Player.bleed = true; - } - else if (ZoneAbyssLayer2) - { - if (!depthCharm) - Player.bleed = true; - } - // Ticks (frames) until breath is deducted from the breath meter - double tick = 12D * (1D - depthRatio); + double tick = 10D * (1D - depthRatio); // Prevent 0 if (tick < 1D) @@ -3030,16 +2982,16 @@ namespace CalamityMod.CalPlayer // Tick (frame) multiplier, depending on gear double tickMult = 1D + - (Player.gills ? 4D : 0D) + // 5 - (oceanCrest ? 4D : 0D) + // 5 - (Player.ignoreWater ? 5D : 0D) + // 10 - (Player.accDivingHelm ? 10D : 0D) + // 20 - (Player.arcticDivingGear ? 10D : 0D) + // 30 - (aquaticEmblem ? 10D : 0D) + // 40 - (Player.accMerman ? 15D : 0D) + // 55 - (victideSet ? 5D : 0D) + // 60 - ((aquaticHeart && NPC.downedBoss3) ? 15D : 0D) + // 75 - (abyssalDivingSuit ? 15D : 0D) + // 90 + (Player.gills ? 2D : 0D) + + (oceanCrest ? 2D : 0D) + + (Player.ignoreWater ? 3D : 0D) + + (Player.accDivingHelm ? 5D : 0D) + + (Player.arcticDivingGear ? 5D : 0D) + + (aquaticEmblem ? 5D : 0D) + + (Player.accMerman ? 8D : 0D) + + (victideSet ? 2D : 0D) + + ((aquaticHeart && NPC.downedBoss3) ? 8D : 0D) + + (abyssalDivingSuit ? 8D : 0D) + externalBreathTickBoost; // Limit the multiplier to 50 @@ -3053,6 +3005,8 @@ namespace CalamityMod.CalPlayer abyssBreathLossRateStat = (float)tick; float resistanceSlowdownFactor = 1f; + if (hPressure) + resistanceSlowdownFactor -= abyssalDivingSuit ? 0.2f : 0.5f; // Reduce breath over ticks (frames) abyssBreathCD++; @@ -3065,9 +3019,6 @@ namespace CalamityMod.CalPlayer if (Player.breath > 0) { Player.breath -= (int)(cDepth && !depthCharm ? breathLoss + 1D : breathLoss); - - if (hPressure) - resistanceSlowdownFactor -= (int)(!abyssalDivingSuit ? 1.2f : 0.5f); } } @@ -3083,8 +3034,8 @@ namespace CalamityMod.CalPlayer // Resistance to life loss at zero breath int lifeLossAtZeroBreathResist = 0 + - (depthCharm ? 3 : 0) + - (abyssalDivingSuit ? 6 : 0); + (depthCharm ? 4 : 0) + + (abyssalDivingSuit ? 5 : 0); // Reduce life loss, depending on gear lifeLossAtZeroBreath -= lifeLossAtZeroBreathResist; @@ -3208,7 +3159,7 @@ namespace CalamityMod.CalPlayer // Aquatic Emblem bonus if (aquaticEmblem) { - if (Player.IsUnderwater() && Player.wet && !Player.lavaWet && !Player.honeyWet && + if (countsAsAnyWet && !Player.lavaWet && !Player.honeyWet && !Player.mount.Active) { if (aquaticBoost > 0f) @@ -3363,12 +3314,12 @@ namespace CalamityMod.CalPlayer if (AdamantiteSet) Player.statDefense += AdamantiteSetDefenseBoost; - // Warmth makes Chilled, Frozen, and Glacial State tick down 3x as fast + // Warmth makes Chilled and Frozen tick down 3x as fast if (Player.HasBuff(BuffID.Warmth)) { for (int b = 0; b < Player.MaxBuffs; b++) { - if (Player.buffType[b] == BuffID.Chilled || Player.buffType[b] == BuffID.Frozen || Player.buffType[b] == ModContent.BuffType()) + if (Player.buffType[b] == BuffID.Chilled || Player.buffType[b] == BuffID.Frozen) { if (Player.buffTime[b] > 3) { @@ -3733,11 +3684,7 @@ namespace CalamityMod.CalPlayer } if (tarraSet) - { - if (!tarraMelee) - Player.calmed = true; Player.lifeMagnet = true; - } if (wDeath && !laudanum && !purity) Player.GetDamage() -= 0.2f; @@ -3761,14 +3708,6 @@ namespace CalamityMod.CalPlayer Player.statDefense -= RemsRevenge.WitherDefenseReduction; } - if (gState) - { - Player.velocity.X *= 0.5f; - Player.velocity.Y += 0.05f; - if (Player.velocity.Y > 15f) - Player.velocity.Y = 15f; - } - if (eutrophication && !purity) Player.velocity = Vector2.Zero; diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 31b9ec0761..eb8b41f072 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -103,7 +103,7 @@ namespace CalamityMod.CalPlayer break; case ItemID.FieryGreatsword: - target.AddBuff(BuffID.OnFire3, 180); + target.AddBuff(BuffID.OnFire3, 90); break; case ItemID.IceSickle: @@ -138,7 +138,7 @@ namespace CalamityMod.CalPlayer ItemLifesteal(target, item, damageDone); ItemOnHit(item, damageDone, target.Center, hit.Crit, target.IsAnEnemy(false, true), targetIsDummy); - NPCDebuffs(target, item.CountsAsClass(), item.CountsAsClass(), item.CountsAsClass(), item.CountsAsClass(), item.CountsAsClass(), item.CountsAsClass()); + NPCDebuffs(target, item.CountsAsClass(), item.CountsAsClass(), item.CountsAsClass(), item.CountsAsClass(), item.CountsAsClass(), item.CountsAsClass(), hit.Crit); // Ursa Sergeant slash cooldown is reset on kill if (ursaSergeant && target.life <= 0 && target.realLife == -1) @@ -608,7 +608,7 @@ namespace CalamityMod.CalPlayer ProjLifesteal(target, proj, damageDone, hit.Crit); ProjOnHit(proj, target.Center, hit.Crit, target.IsAnEnemy(false), targetIsDummy); - NPCDebuffs(target, proj.CountsAsClass(), proj.CountsAsClass(), proj.CountsAsClass(), proj.CountsAsClass(), proj.CountsAsClass(), proj.CountsAsClass(), true, proj.noEnchantments); + NPCDebuffs(target, proj.CountsAsClass(), proj.CountsAsClass(), proj.CountsAsClass(), proj.CountsAsClass(), proj.CountsAsClass(), proj.CountsAsClass(), hit.Crit, true, proj.noEnchantments); // Shattered Community tracks all damage dealt with Rage Mode (ignoring dummies). if (targetIsDummy) @@ -838,8 +838,9 @@ namespace CalamityMod.CalPlayer if (dynamoStemCells && MiniSwarmerCooldown <= 0 && proj.CountsAsClass()) { MiniSwarmerCooldown = DynamoStemCells.MiniSwarmerCooldown; - - Vector2 velocity = proj.velocity.SafeNormalize(Vector2.UnitY) * 19; + Vector2 directionToMouse = Main.MouseWorld - Player.Center; + directionToMouse.Normalize(); + Vector2 velocity = directionToMouse * 19; int MiniSwamerDamage = (int)Player.GetTotalDamage().ApplyTo(DynamoStemCells.MiniSwamerDamage); Projectile.NewProjectile(source, Player.Center, velocity, ProjectileType(), MiniSwamerDamage, 2f, proj.owner); } @@ -1148,9 +1149,9 @@ namespace CalamityMod.CalPlayer Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType(), damage, proj.knockBack, proj.owner, 1f, 0f); SoundEngine.PlaySound(SoundID.Item14, proj.Center); - for (int dustexplode = 0; dustexplode < 180; dustexplode++) + for (int dustexplode = 0; dustexplode < 120; dustexplode++) { - Vector2 dustd = Vector2.One.RotatedBy(MathHelper.ToRadians(dustexplode * 2)) * 1.7f; + Vector2 dustd = Vector2.One.RotatedBy(MathHelper.ToRadians(dustexplode * 3)) * 1.7f; Dust dust = Dust.NewDustPerfect(proj.Center, Main.rand.NextBool() ? DustType() : DustType(), dustd, Alpha: 100); dust.noGravity = true; } @@ -1200,7 +1201,7 @@ namespace CalamityMod.CalPlayer #endregion #region Debuffs - public void NPCDebuffs(NPC target, bool melee, bool ranged, bool magic, bool summon, bool rogue, bool whip, bool proj = false, bool noFlask = false) + public void NPCDebuffs(NPC target, bool melee, bool ranged, bool magic, bool summon, bool rogue, bool whip, bool crit, bool proj = false, bool noFlask = false) { if (melee && !noFlask) // Prevents Deep Sea Dumbell from snagging true melee debuff memes { @@ -1307,7 +1308,7 @@ namespace CalamityMod.CalPlayer target.AddBuff(BuffType(), 180); if (sulphurSet) target.AddBuff(BuffID.Poisoned, 60); - if (ilSpark && Player.IsUnderwater()) + if (ilSpark && Player.Calamity().countsAsAnyWet) { int duration = 60; target.AddBuff(BuffType(), duration); @@ -1322,7 +1323,11 @@ namespace CalamityMod.CalPlayer } if (vexation) { - target.AddBuff(BuffID.Venom, 120, false); + target.AddBuff(BuffID.Venom, 120, false); + } + if (snowRuffianSet && ranged && crit) + { + target.AddBuff(BuffID.Frostburn, 300, false); } } #endregion diff --git a/DataStructures/NPCStats.cs b/DataStructures/NPCStats.cs index 3a407276d4..dde90afc67 100644 --- a/DataStructures/NPCStats.cs +++ b/DataStructures/NPCStats.cs @@ -72,11 +72,10 @@ namespace CalamityMod int normalDamage = contactDamage[0]; int expertDamage = contactDamage[1] == -1 ? -1 : (int)Math.Round(contactDamage[1] / damageAdjustment); int revengeanceDamage = contactDamage[2] == -1 ? -1 : (int)Math.Round(contactDamage[2] / damageAdjustment); - int deathDamage = contactDamage[3] == -1 ? -1 : (int)Math.Round(contactDamage[3] / damageAdjustment); - int masterDamage = contactDamage[4] == -1 ? -1 : (int)Math.Round(contactDamage[4] / damageAdjustment); + int masterDamage = contactDamage[3] == -1 ? -1 : (int)Math.Round(contactDamage[3] / damageAdjustment); // If the assigned value would be -1, don't actually assign it. This allows for conditionally disabling the system. - int damageToUse = Main.masterMode ? masterDamage : CalamityWorld.death ? deathDamage : CalamityWorld.revenge ? revengeanceDamage : Main.expertMode ? expertDamage : normalDamage; + int damageToUse = Main.masterMode ? masterDamage : CalamityWorld.revenge ? revengeanceDamage : Main.expertMode ? expertDamage : normalDamage; if (damageToUse != -1) npc.damage = damageToUse; } @@ -95,10 +94,9 @@ namespace CalamityMod int normalDamage = (int)Math.Round(projectileDamage[0] / damageAdjustment); int expertDamage = (int)Math.Round(projectileDamage[1] / damageAdjustment); int revengeanceDamage = (int)Math.Round(projectileDamage[2] / damageAdjustment); - int deathDamage = (int)Math.Round(projectileDamage[3] / damageAdjustment); - int masterDamage = (int)Math.Round(projectileDamage[4] / damageAdjustment); + int masterDamage = (int)Math.Round(projectileDamage[3] / damageAdjustment); - int damageToUse = Main.masterMode ? masterDamage : CalamityWorld.death ? deathDamage : CalamityWorld.revenge ? revengeanceDamage : Main.expertMode ? expertDamage : normalDamage; + int damageToUse = Main.masterMode ? masterDamage : CalamityWorld.revenge ? revengeanceDamage : Main.expertMode ? expertDamage : normalDamage; return damageToUse; } @@ -117,10 +115,9 @@ namespace CalamityMod int normalDamage = (int)Math.Round(projectileDamage[0] / damageAdjustment); int expertDamage = (int)Math.Round(projectileDamage[1] / damageAdjustment); int revengeanceDamage = (int)Math.Round(projectileDamage[2] / damageAdjustment); - int deathDamage = (int)Math.Round(projectileDamage[3] / damageAdjustment); - int masterDamage = (int)Math.Round(projectileDamage[4] / damageAdjustment); + int masterDamage = (int)Math.Round(projectileDamage[3] / damageAdjustment); - int damageToUse = Main.masterMode ? masterDamage : CalamityWorld.death ? deathDamage : CalamityWorld.revenge ? revengeanceDamage : Main.expertMode ? expertDamage : normalDamage; + int damageToUse = Main.masterMode ? masterDamage : CalamityWorld.revenge ? revengeanceDamage : Main.expertMode ? expertDamage : normalDamage; return damageToUse; } @@ -131,8 +128,7 @@ namespace CalamityMod { bool exists = EnemyStats.ProjectileDamageValues.TryGetValue(new Tuple(npc.type, projType), out int[] projectileDamage); return !exists ? 1 // Base case for safety, in case the array is not initialized yet. - : Main.masterMode ? projectileDamage[4] - : CalamityWorld.death ? projectileDamage[3] + : Main.masterMode ? projectileDamage[3] : CalamityWorld.revenge ? projectileDamage[2] : Main.expertMode ? projectileDamage[1] : projectileDamage[0]; @@ -293,558 +289,543 @@ namespace CalamityMod EnemyStats.ContactDamageValues = new SortedDictionary { - { NPCID.KingSlime, new int[] { 40, 64, 80, 96, 144 } }, - { ModContent.NPCType(), new int[] { 30, 44, 60, 76, 114 } }, + { NPCID.KingSlime, new int[] { 40, 64, 80, 144 } }, + { ModContent.NPCType(), new int[] { 30, 44, 60, 114 } }, - { ModContent.NPCType(), new int[] { 45, 66, 88, 110, 165 } }, - { ModContent.NPCType(), new int[] { 24, 32, 40, 48, 72 } }, - { ModContent.NPCType(), new int[] { 18, 24, 30, 36, 54 } }, - { ModContent.NPCType(), new int[] { 30, 44, 60, 76, 114 } }, - { ModContent.NPCType(), new int[] { 21, 28, 32, 36, 63 } }, - { ModContent.NPCType(), new int[] { 12, 16, 20, 24, 36 } }, - { ModContent.NPCType(), new int[] { 30, 44, 60, 76, 114 } }, - { ModContent.NPCType(), new int[] { 21, 28, 32, 36, 63 } }, - { ModContent.NPCType(), new int[] { 12, 16, 20, 24, 36 } }, + { ModContent.NPCType(), new int[] { 45, 66, 88, 165 } }, + { ModContent.NPCType(), new int[] { 24, 32, 40, 72 } }, + { ModContent.NPCType(), new int[] { 18, 24, 30, 54 } }, + { ModContent.NPCType(), new int[] { 30, 44, 60, 114 } }, + { ModContent.NPCType(), new int[] { 21, 28, 32, 63 } }, + { ModContent.NPCType(), new int[] { 12, 16, 20, 36 } }, + { ModContent.NPCType(), new int[] { 30, 44, 60, 114 } }, + { ModContent.NPCType(), new int[] { 21, 28, 32, 63 } }, + { ModContent.NPCType(), new int[] { 12, 16, 20, 36 } }, { NPCID.EyeofCthulhu, new int[] { 24, // 36 in phase 2 30, // 45 in phase 2 40, // 48 in phase 2, 56 in phase 3 - 50, // 60 in phase 2, 70 in phase 3 75 } }, // Vanilla: 113 in phase 2; Rev+: 90 in phase 2, 105 in phase 3 - { NPCID.ServantofCthulhu, new int[] { 18, 24, 30, 36, 54 } }, - { ModContent.NPCType(), new int[] { 20, 26, 34, 42, 63 } }, // In phase 2: 26, 34, 44, 55, 82 + { NPCID.ServantofCthulhu, new int[] { 18, 24, 30, 54 } }, - { ModContent.NPCType(), new int[] { 40, 64, 80, 96, 144 } }, - { ModContent.NPCType(), new int[] { 25, 50, 62, 74, 111 } }, + { ModContent.NPCType(), new int[] { 40, 64, 80, 144 } }, + { ModContent.NPCType(), new int[] { 25, 50, 62, 111 } }, - { NPCID.EaterofWorldsHead, new int[] { 38, 55, 77, 99, 165 } }, - { NPCID.EaterofWorldsBody, new int[] { 18, 24, 32, 40, 60 } }, - { NPCID.EaterofWorldsTail, new int[] { 12, 16, 24, 32, 48 } }, - { NPCID.VileSpitEaterOfWorlds, new int[] { -1, 64, 64, 64, 96 } }, + { NPCID.EaterofWorldsHead, new int[] { 38, 55, 77, 165 } }, + { NPCID.EaterofWorldsBody, new int[] { 18, 24, 32, 60 } }, + { NPCID.EaterofWorldsTail, new int[] { 12, 16, 24, 48 } }, + { NPCID.VileSpitEaterOfWorlds, new int[] { -1, 64, 64, 96 } }, - { NPCID.BrainofCthulhu, new int[] { 36, 54, 81, 108, 162 } }, - { NPCID.Creeper, new int[] { 24, 36, 66, 96, 144 } }, + { NPCID.BrainofCthulhu, new int[] { 36, 54, 81, 162 } }, + { NPCID.Creeper, new int[] { 24, 36, 66, 144 } }, - { ModContent.NPCType(), new int[] { 42, 63, 81, 99, 162 } }, - { ModContent.NPCType(), new int[] { 30, 50, 62, 74, 111 } }, + { ModContent.NPCType(), new int[] { 42, 63, 81, 162 } }, + { ModContent.NPCType(), new int[] { 30, 50, 62, 111 } }, - { ModContent.NPCType(), new int[] { 36, 54, 63, 72, 108 } }, - { ModContent.NPCType(), new int[] { 54, 90, 108, 126, 189 } }, - { ModContent.NPCType(), new int[] { 28, 48, 56, 64, 96 } }, - { ModContent.NPCType(), new int[] { 22, 36, 42, 48, 72 } }, - { ModContent.NPCType(), new int[] { 42, 70, 84, 98, 147 } }, - { ModContent.NPCType(), new int[] { 24, 42, 50, 58, 87 } }, - { ModContent.NPCType(), new int[] { 18, 28, 34, 40, 60 } }, - { ModContent.NPCType(), new int[] { 36, 60, 72, 84, 126 } }, - { ModContent.NPCType(), new int[] { 20, 36, 42, 48, 72 } }, - { ModContent.NPCType(), new int[] { 14, 20, 26, 32, 48 } }, + { ModContent.NPCType(), new int[] { 36, 54, 63, 108 } }, + { ModContent.NPCType(), new int[] { 54, 90, 108, 189 } }, + { ModContent.NPCType(), new int[] { 28, 48, 56, 96 } }, + { ModContent.NPCType(), new int[] { 22, 36, 42, 72 } }, + { ModContent.NPCType(), new int[] { 42, 70, 84, 147 } }, + { ModContent.NPCType(), new int[] { 24, 42, 50, 87 } }, + { ModContent.NPCType(), new int[] { 18, 28, 34, 60 } }, + { ModContent.NPCType(), new int[] { 36, 60, 72, 126 } }, + { ModContent.NPCType(), new int[] { 20, 36, 42, 72 } }, + { ModContent.NPCType(), new int[] { 14, 20, 26, 48 } }, - { NPCID.QueenBee, new int[] { 36, 54, 81, 108, 162 } }, - { NPCID.Bee, new int[] { 20, 24, 48, 72, 108 } }, - { NPCID.BeeSmall, new int[] { 15, 18, 36, 54, 81 } }, + { NPCID.QueenBee, new int[] { 36, 54, 81, 162 } }, + { NPCID.Bee, new int[] { 20, 24, 48, 108 } }, + { NPCID.BeeSmall, new int[] { 15, 18, 36, 81 } }, { NPCID.SkeletronHead, new int[] { 42, // 55 while spinning 77, // 100 while spinning 88, // 114 while spinning - 99, // 128 while spinning 165 } }, // 215 while spinning - { NPCID.SkeletronHand, new int[] { 32, 44, 77, 110, 165 } }, + { NPCID.SkeletronHand, new int[] { 32, 44, 77, 165 } }, - { NPCID.Deerclops, new int[] { 20, 40, 50, 60, 90 } }, + { NPCID.Deerclops, new int[] { 20, 40, 50, 90 } }, - { ModContent.NPCType(), new int[] { 48, 80, 96, 112, 168 } }, - { ModContent.NPCType(), new int[] { 54, 90, 108, 126, 189 } }, - { ModContent.NPCType(), new int[] { 48, 80, 96, 112, 168 } }, - { ModContent.NPCType(), new int[] { 60, 100, 120, 140, 210 } }, - { ModContent.NPCType(), new int[] { 54, 90, 108, 126, 189 } }, - { ModContent.NPCType(), new int[] { 36, 60, 72, 84, 126 } }, - { ModContent.NPCType(), new int[] { 24, 40, 48, 56, 84 } }, - { ModContent.NPCType(), new int[] { 42, 70, 84, 98, 147 } }, - { ModContent.NPCType(), new int[] { 30, 50, 60, 70, 105 } }, + { ModContent.NPCType(), new int[] { 48, 80, 96, 168 } }, + { ModContent.NPCType(), new int[] { 54, 90, 108, 189 } }, + { ModContent.NPCType(), new int[] { 48, 80, 96, 168 } }, + { ModContent.NPCType(), new int[] { 60, 100, 120, 210 } }, + { ModContent.NPCType(), new int[] { 54, 90, 108, 189 } }, + { ModContent.NPCType(), new int[] { 36, 60, 72, 126 } }, + { ModContent.NPCType(), new int[] { 24, 40, 48, 84 } }, + { ModContent.NPCType(), new int[] { 42, 70, 84, 147 } }, + { ModContent.NPCType(), new int[] { 30, 50, 60, 105 } }, - { NPCID.WallofFlesh, new int[] { 100, 150, 180, 210, 315 } }, - { NPCID.WallofFleshEye, new int[] { 100, 150, 180, 210, 315 } }, + { NPCID.WallofFlesh, new int[] { 100, 150, 180, 315 } }, + { NPCID.WallofFleshEye, new int[] { 100, 150, 180, 315 } }, { NPCID.TheHungry, new int[] { 30, // Ranges from 30 to 75 depending on WoF life 60, // Ranges from 60 to 150 depending on WoF life 60, // Ranges from 60 to 150 depending on WoF life - 60, // Ranges from 60 to 150 depending on WoF life 90 } }, // Ranges from 90 to 225 depending on WoF life - { NPCID.TheHungryII, new int[] { 30, 60, 74, 88, 132 } }, - { NPCID.LeechHead, new int[] { 26, 52, 62, 72, 108 } }, - { NPCID.LeechBody, new int[] { 22, 44, 52, 60, 90 } }, - { NPCID.LeechTail, new int[] { 18, 36, 42, 48, 72 } }, + { NPCID.TheHungryII, new int[] { 30, 60, 74, 132 } }, + { NPCID.LeechHead, new int[] { 26, 52, 62, 108 } }, + { NPCID.LeechBody, new int[] { 22, 44, 52, 90 } }, + { NPCID.LeechTail, new int[] { 18, 36, 42, 72 } }, - { NPCID.QueenSlimeBoss, new int[] { 80, 120, 150, 180, 270 } }, - { NPCID.QueenSlimeMinionBlue, new int[] { 60, 80, 100, 120, 180 } }, - { NPCID.QueenSlimeMinionPink, new int[] { 60, 80, 100, 120, 180 } }, - { NPCID.QueenSlimeMinionPurple, new int[] { 70, 100, 120, 140, 210 } }, + { NPCID.QueenSlimeBoss, new int[] { 80, 120, 150, 270 } }, + { NPCID.QueenSlimeMinionBlue, new int[] { 60, 80, 100, 180 } }, + { NPCID.QueenSlimeMinionPink, new int[] { 60, 80, 100, 180 } }, + { NPCID.QueenSlimeMinionPurple, new int[] { 70, 100, 120, 210 } }, - { ModContent.NPCType(), new int[] { 90, 138, 161, 184, 276 } }, - { ModContent.NPCType(), new int[] { 80, 120, 138, 156, 240 } }, + { ModContent.NPCType(), new int[] { 90, 138, 161, 276 } }, + { ModContent.NPCType(), new int[] { 80, 120, 138, 240 } }, { NPCID.Spazmatism, new int[] { 70, // 105 in phase 2 102, // 153 in phase 2 119, // 178 in phase 2 - 136, // 204 in phase 2 204 } }, // 306 in phase 2 { NPCID.Retinazer, new int[] { 55, // 83 in phase 2 85, // 127 in phase 2 102, // 153 in phase 2 - 119, // 178 in phase 2 153 } }, // 229 in phase 2 - { ModContent.NPCType(), new int[] { 110, 176, 187, 198, 330 } }, - { ModContent.NPCType(), new int[] { 75, 112, 136, 160, 240 } }, - { ModContent.NPCType(), new int[] { 70, 104, 112, 120, 192 } }, - { ModContent.NPCType(), new int[] { 65, 96, 104, 112, 168 } }, + { ModContent.NPCType(), new int[] { 110, 176, 187, 330 } }, + { ModContent.NPCType(), new int[] { 75, 112, 136, 240 } }, + { ModContent.NPCType(), new int[] { 70, 104, 112, 192 } }, + { ModContent.NPCType(), new int[] { 65, 96, 104, 168 } }, - { NPCID.TheDestroyer, new int[] { 140, 280, 300, 320, 480 } }, - { NPCID.TheDestroyerBody, new int[] { 70, 102, 136, 170, 255 } }, - { NPCID.TheDestroyerTail, new int[] { 45, 68, 102, 136, 204 } }, + { NPCID.TheDestroyer, new int[] { 140, 280, 300, 480 } }, + { NPCID.TheDestroyerBody, new int[] { 70, 102, 136, 255 } }, + { NPCID.TheDestroyerTail, new int[] { 45, 68, 102, 204 } }, - { ModContent.NPCType(), new int[] { 75, 112, 136, 160, 240 } }, + { ModContent.NPCType(), new int[] { 75, 112, 136, 240 } }, { NPCID.SkeletronPrime, new int[] { 50, // 100 while spinning 85, // 170 while spinning 102, // 204 while spinning - 119, // 238 while spinning 153 } }, // 306 while spinning - { NPCID.PrimeVice, new int[] { 70, 102, 136, 170, 255 } }, - { NPCID.PrimeSaw, new int[] { 70, 102, 136, 170, 255 } }, - { NPCID.PrimeCannon, new int[] { 30, 51, 68, 85, 102 } }, - { NPCID.PrimeLaser, new int[] { 30, 51, 68, 85, 102 } }, + { NPCID.PrimeVice, new int[] { 70, 102, 136, 255 } }, + { NPCID.PrimeSaw, new int[] { 70, 102, 136, 255 } }, + { NPCID.PrimeCannon, new int[] { 30, 51, 68, 102 } }, + { NPCID.PrimeLaser, new int[] { 30, 51, 68, 102 } }, - { ModContent.NPCType(), new int[] { 95, 144, 168, 192, 288 } }, - { ModContent.NPCType(), new int[] { 80, 120, 138, 156, 240 } }, - { ModContent.NPCType(), new int[] { 85, 130, 150, 170, 255 } }, + { ModContent.NPCType(), new int[] { 95, 144, 168, 288 } }, + { ModContent.NPCType(), new int[] { 80, 120, 138, 240 } }, + { ModContent.NPCType(), new int[] { 85, 130, 150, 255 } }, { NPCID.Plantera, new int[] { 70, // 98 in phase 2 100, // 140 in phase 2 138, // 193 in phase 2 - 176, // 246 in phase 2 276 } }, // 386 in phase 2 - { NPCID.PlanterasTentacle, new int[] { 90, 138, 161, 184, 276 } }, - { ModContent.NPCType(), new int[] { 90, 138, 161, 184, 276 } }, - { NPCID.Spore, new int[] { 90, 140, 160, 180, 270 } }, + { NPCID.PlanterasTentacle, new int[] { 90, 138, 161, 276 } }, + { ModContent.NPCType(), new int[] { 90, 138, 161, 276 } }, + { NPCID.Spore, new int[] { 90, 140, 160, 270 } }, { NPCID.HallowBoss, new int[] { 80, // 120 during charge 110, // 165 during charge 143, // 215 during charge - 176, // 264 during charge 264 } }, // 396 during charge - { ModContent.NPCType(), new int[] { 140, 216, 240, 264, 414 } }, + { ModContent.NPCType(), new int[] { 140, 216, 240, 414 } }, { ModContent.NPCType(), new int[] { 75, // 113 during charge 112, // 168 during charge 136, // 204 during charge - 160, // 240 during charge 240 } }, // 360 during charge - { ModContent.NPCType(), new int[] { 70, 110, 126, 142, 210 } }, - { NPCID.DetonatingBubble, new int[] { 100, 150, 180, 210, 315 } }, - { ModContent.NPCType(), new int[] { 90, 140, 160, 180, 270 } }, + { ModContent.NPCType(), new int[] { 70, 110, 126, 210 } }, + { NPCID.DetonatingBubble, new int[] { 100, 150, 180, 315 } }, + { ModContent.NPCType(), new int[] { 90, 140, 160, 270 } }, - { ModContent.NPCType(), new int[] { 145, 220, 242, 264, 429 } }, - { ModContent.NPCType(), new int[] { 75, 112, 128, 144, 225 } }, + { ModContent.NPCType(), new int[] { 145, 220, 242, 429 } }, + { ModContent.NPCType(), new int[] { 75, 112, 128, 225 } }, - { NPCID.Golem, new int[] { 95, 144, 176, 208, 312 } }, - { NPCID.GolemHead, new int[] { 85, 128, 144, 160, 240 } }, - { NPCID.GolemFistLeft, new int[] { 75, 112, 144, 176, 264 } }, - { NPCID.GolemFistRight, new int[] { 75, 112, 144, 176, 264 } }, + { NPCID.Golem, new int[] { 95, 144, 176, 312 } }, + { NPCID.GolemHead, new int[] { 85, 128, 144, 240 } }, + { NPCID.GolemFistLeft, new int[] { 75, 112, 144, 264 } }, + { NPCID.GolemFistRight, new int[] { 75, 112, 144, 264 } }, - { ModContent.NPCType(), new int[] { 120, 180, 216, 252, 378 } }, - { ModContent.NPCType(), new int[] { 120, 180, 210, 240, 360 } }, - { ModContent.NPCType(), new int[] { 130, 200, 240, 280, 420 } }, + { ModContent.NPCType(), new int[] { 120, 180, 216, 378 } }, + { ModContent.NPCType(), new int[] { 120, 180, 210, 360 } }, + { ModContent.NPCType(), new int[] { 130, 200, 240, 420 } }, { NPCID.DukeFishron, new int[] { 100, // 120 in phase 2 140, // 202 in phase 2, 185 in phase 3 168, // 242 in phase 2, 222 in phase 3 - 196, // 282 in phase 2, 259 in phase 3 294 } }, // 423 in phase 2, 388 in phase 3 - { NPCID.Sharkron, new int[] { 100, 150, 180, 210, 315 } }, - { NPCID.Sharkron2, new int[] { 120, 180, 210, 240, 360 } }, + { NPCID.Sharkron, new int[] { 100, 150, 180, 315 } }, + { NPCID.Sharkron2, new int[] { 120, 180, 210, 360 } }, - { ModContent.NPCType(), new int[] { 130, 192, 224, 256, 384 } }, - { ModContent.NPCType(), new int[] { 105, 160, 180, 200, 315 } }, - { ModContent.NPCType(), new int[] { 105, 160, 180, 200, 315 } }, - { ModContent.NPCType(), new int[] { 130, 192, 224, 256, 390 } }, - { ModContent.NPCType(), new int[] { 105, 160, 192, 224, 336 } }, + { ModContent.NPCType(), new int[] { 130, 192, 224, 384 } }, + { ModContent.NPCType(), new int[] { 105, 160, 180, 315 } }, + { ModContent.NPCType(), new int[] { 105, 160, 180, 315 } }, + { ModContent.NPCType(), new int[] { 130, 192, 224, 390 } }, + { ModContent.NPCType(), new int[] { 105, 160, 192, 336 } }, - { NPCID.CultistDragonHead, new int[] { 120, 180, 210, 240, 360 } }, - { NPCID.CultistDragonBody1, new int[] { 60, 90, 105, 120, 180 } }, - { NPCID.CultistDragonBody2, new int[] { 60, 90, 105, 120, 180 } }, - { NPCID.CultistDragonBody3, new int[] { 60, 90, 105, 120, 180 } }, - { NPCID.CultistDragonBody4, new int[] { 60, 90, 105, 120, 180 } }, - { NPCID.CultistDragonTail, new int[] { 60, 90, 105, 120, 180 } }, - { NPCID.AncientCultistSquidhead, new int[] { 120, 180, 210, 240, 360 } }, - { NPCID.AncientLight, new int[] { 120, 180, 210, 240, 360 } }, + { NPCID.CultistDragonHead, new int[] { 120, 180, 210, 360 } }, + { NPCID.CultistDragonBody1, new int[] { 60, 90, 105, 180 } }, + { NPCID.CultistDragonBody2, new int[] { 60, 90, 105, 180 } }, + { NPCID.CultistDragonBody3, new int[] { 60, 90, 105, 180 } }, + { NPCID.CultistDragonBody4, new int[] { 60, 90, 105, 180 } }, + { NPCID.CultistDragonTail, new int[] { 60, 90, 105, 180 } }, + { NPCID.AncientCultistSquidhead, new int[] { 120, 180, 210, 360 } }, + { NPCID.AncientLight, new int[] { 120, 180, 210, 360 } }, - { ModContent.NPCType(), new int[] { 160, 240, 268, 296, 480 } }, - { ModContent.NPCType(), new int[] { 105, 160, 192, 224, 336 } }, - { ModContent.NPCType(), new int[] { 85, 128, 160, 192, 288 } }, + { ModContent.NPCType(), new int[] { 160, 240, 268, 480 } }, + { ModContent.NPCType(), new int[] { 105, 160, 192, 336 } }, + { ModContent.NPCType(), new int[] { 85, 128, 160, 288 } }, - { ModContent.NPCType(), new int[] { 150, 224, 256, 288, 444 } }, - { ModContent.NPCType(), new int[] { 160, 240, 264, 288, 405 } }, - { ModContent.NPCType(), new int[] { 100, 200, 220, 240, 300 } }, - { ModContent.NPCType(), new int[] { 100, 200, 220, 232, 300 } }, + { ModContent.NPCType(), new int[] { 150, 224, 256, 444 } }, + { ModContent.NPCType(), new int[] { 160, 240, 264, 405 } }, + { ModContent.NPCType(), new int[] { 100, 200, 220, 300 } }, + { ModContent.NPCType(), new int[] { 100, 200, 220, 300 } }, - { ModContent.NPCType(), new int[] { 170, 256, 288, 320, 504 } }, - { ModContent.NPCType(), new int[] { 145, 220, 242, 264, 435 } }, + { ModContent.NPCType(), new int[] { 170, 256, 288, 504 } }, + { ModContent.NPCType(), new int[] { 145, 220, 242, 435 } }, - { ModContent.NPCType(), new int[] { 240, 360, 396, 432, 720 } }, - { ModContent.NPCType(), new int[] { 175, 260, 288, 316, 525 } }, + { ModContent.NPCType(), new int[] { 240, 360, 396, 720 } }, + { ModContent.NPCType(), new int[] { 175, 260, 288, 525 } }, - { ModContent.NPCType(), new int[] { 240, 360, 396, 432, 720 } }, - { ModContent.NPCType(), new int[] { 125, 192, 224, 256, 372 } }, - { ModContent.NPCType(), new int[] { 105, 160, 192, 224, 312 } }, + { ModContent.NPCType(), new int[] { 240, 360, 396, 720 } }, + { ModContent.NPCType(), new int[] { 125, 192, 224, 372 } }, + { ModContent.NPCType(), new int[] { 105, 160, 192, 312 } }, - { ModContent.NPCType(), new int[] { 210, 315, 351, 387, 621 } }, - { ModContent.NPCType(), new int[] { 175, 260, 288, 316, 525 } }, - { ModContent.NPCType(), new int[] { 190, 280, 300, 320, 570 } }, + { ModContent.NPCType(), new int[] { 210, 315, 351, 621 } }, + { ModContent.NPCType(), new int[] { 175, 260, 288, 525 } }, + { ModContent.NPCType(), new int[] { 190, 280, 300, 570 } }, { ModContent.NPCType(), new int[] { 160, // 192 in phase 2, 224 in phase 3 240, // 288 in phase 2, 336 in phase 3 264, // 317 in phase 2, 370 in phase 3 - 288, // 346 in phase 2, 403 in phase 3 480 } }, // 576 in phase 2, 672 in phase 3 - { ModContent.NPCType(), new int[] { 224, 336, 370, 403, 672 } }, + { ModContent.NPCType(), new int[] { 224, 336, 370, 672 } }, { ModContent.NPCType(), new int[] { 192, // 211 in phase 2, 230 in phase 3 288, // 317 in phase 2, 346 in phase 3 324, // 356 in phase 2, 389 in phase 3 - 360, // 396 in phase 2, 432 in phase 3 567 } }, // 624 in phase 2, 680 in phase 3 - { ModContent.NPCType(), new int[] { 192, 288, 328, 368, 576 } }, - { ModContent.NPCType(), new int[] { 192, 288, 328, 368, 576 } }, + { ModContent.NPCType(), new int[] { 192, 288, 328, 576 } }, + { ModContent.NPCType(), new int[] { 192, 288, 328, 576 } }, - { ModContent.NPCType(), new int[] { 470, 700, 750, 800, 1410 } }, - { ModContent.NPCType(), new int[] { 250, 374, 425, 476, 714 } }, - { ModContent.NPCType(), new int[] { 204, 306, 340, 374, 612 } }, - { ModContent.NPCType(), new int[] { 240, 360, 396, 432, 720 } }, - { ModContent.NPCType(), new int[] { 175, 260, 290, 320, 525 } }, - { ModContent.NPCType(), new int[] { 135, 200, 230, 260, 405 } }, + { ModContent.NPCType(), new int[] { 470, 700, 750, 1410 } }, + { ModContent.NPCType(), new int[] { 250, 374, 425, 714 } }, + { ModContent.NPCType(), new int[] { 204, 306, 340, 612 } }, + { ModContent.NPCType(), new int[] { 240, 360, 396, 720 } }, + { ModContent.NPCType(), new int[] { 175, 260, 290, 525 } }, + { ModContent.NPCType(), new int[] { 135, 200, 230, 405 } }, - { ModContent.NPCType(), new int[] { 300, 448, 480, 512, 900 } }, + { ModContent.NPCType(), new int[] { 300, 448, 480, 900 } }, - { ModContent.NPCType(), new int[] { 340, 512, 544, 576, 1020 } }, + { ModContent.NPCType(), new int[] { 340, 512, 544, 1020 } }, - { ModContent.NPCType(), new int[] { 340, 512, 544, 576, 1020 } }, - { ModContent.NPCType(), new int[] { 320, 480, 512, 544, 960 } }, + { ModContent.NPCType(), new int[] { 340, 512, 544, 1020 } }, + { ModContent.NPCType(), new int[] { 320, 480, 512, 960 } }, - { ModContent.NPCType(), new int[] { 375, 560, 592, 624, 1116 } }, - { ModContent.NPCType(), new int[] { 320, 480, 512, 544, 960 } }, - { ModContent.NPCType(), new int[] { 320, 480, 512, 544, 960 } }, - { ModContent.NPCType(), new int[] { 270, 400, 424, 448, 804 } }, + { ModContent.NPCType(), new int[] { 375, 560, 592, 1116 } }, + { ModContent.NPCType(), new int[] { 320, 480, 512, 960 } }, + { ModContent.NPCType(), new int[] { 320, 480, 512, 960 } }, + { ModContent.NPCType(), new int[] { 270, 400, 424, 804 } }, - { ModContent.NPCType(), new int[] { 535, 800, 850, 900, 1596 } } + { ModContent.NPCType(), new int[] { 535, 800, 850, 1596 } } }; EnemyStats.ProjectileDamageValues = new SortedDictionary, int[]> { - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 26, 36, 44, 52, 84 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 26, 36, 44, 84 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 26, 36, 44, 52, 84 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 26, 36, 44, 52, 84 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 26, 36, 44, 84 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 26, 36, 44, 84 } }, - { new Tuple(NPCID.EyeofCthulhu, ProjectileID.BloodNautilusShot), new int[] { 26, 44, 60, 76, 114 } }, - { new Tuple(ModContent.NPCType(), ProjectileID.BloodShot), new int[] { 26, 36, 44, 52, 84 } }, + { new Tuple(NPCID.EyeofCthulhu, ProjectileID.BloodNautilusShot), new int[] { 26, 44, 60, 114 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 32, 48, 60, 72, 108 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 32, 48, 60, 72, 108 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 32, 48, 60, 72, 108 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 32, 48, 60, 108 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 32, 48, 60, 108 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 32, 48, 60, 108 } }, - { new Tuple(NPCID.EaterofWorldsHead, ProjectileID.CursedFlameHostile), new int[] { 26, 44, 60, 76, 114 } }, - { new Tuple(NPCID.EaterofWorldsHead, ModContent.ProjectileType()), new int[] { 26, 36, 44, 52, 84 } }, + { new Tuple(NPCID.EaterofWorldsHead, ProjectileID.CursedFlameHostile), new int[] { 26, 44, 60, 114 } }, + { new Tuple(NPCID.EaterofWorldsHead, ModContent.ProjectileType()), new int[] { 26, 36, 44, 84 } }, - { new Tuple(NPCID.BrainofCthulhu, ProjectileID.BloodNautilusShot), new int[] { 36, 56, 68, 80, 120 } }, - { new Tuple(NPCID.BrainofCthulhu, ProjectileID.BloodShot), new int[] { 26, 44, 60, 76, 114 } }, - { new Tuple(NPCID.Creeper, ProjectileID.BloodShot), new int[] { 26, 44, 60, 76, 114 } }, + { new Tuple(NPCID.BrainofCthulhu, ProjectileID.BloodNautilusShot), new int[] { 36, 56, 68, 120 } }, + { new Tuple(NPCID.BrainofCthulhu, ProjectileID.BloodShot), new int[] { 26, 44, 60, 114 } }, + { new Tuple(NPCID.Creeper, ProjectileID.BloodShot), new int[] { 26, 44, 60, 114 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 30, 48, 60, 72, 108 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 30, 48, 60, 72, 108 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 30, 48, 60, 108 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 30, 48, 60, 108 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 22, 36, 44, 52, 84 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 22, 36, 44, 84 } }, - { new Tuple(NPCID.QueenBee, ProjectileID.QueenBeeStinger), new int[] { 22, 44, 64, 84, 126 } }, - { new Tuple(NPCID.QueenBee, ModContent.ProjectileType()), new int[] { 46, 72, 84, 96, 144 } }, // Beenade Bees: 122 (death mode-exclusive) + { new Tuple(NPCID.QueenBee, ProjectileID.QueenBeeStinger), new int[] { 22, 44, 64, 126 } }, + { new Tuple(NPCID.QueenBee, ModContent.ProjectileType()), new int[] { 46, 72, 84, 144 } }, // Beenade Bees: 122 (death mode-exclusive) - { new Tuple(NPCID.SkeletronHead, ProjectileID.Skull), new int[] { 46, 72, 84, 96, 144 } }, - { new Tuple(NPCID.SkeletronHead, ProjectileID.Shadowflames), new int[] { 36, 72, 88, 104, 156 } }, - { new Tuple(NPCID.SkeletronHand, ProjectileID.Skull), new int[] { 36, 56, 68, 80, 120 } }, + { new Tuple(NPCID.SkeletronHead, ProjectileID.Skull), new int[] { 46, 72, 84, 144 } }, + { new Tuple(NPCID.SkeletronHead, ProjectileID.Shadowflames), new int[] { 36, 72, 88, 156 } }, + { new Tuple(NPCID.SkeletronHand, ProjectileID.Skull), new int[] { 36, 56, 68, 120 } }, - { new Tuple(NPCID.Deerclops, ProjectileID.DeerclopsIceSpike), new int[] { 26, 52, 76, 100, 150 } }, - { new Tuple(NPCID.Deerclops, ProjectileID.DeerclopsRangedProjectile), new int[] { 36, 72, 88, 104, 156 } }, - { new Tuple(NPCID.Deerclops, ProjectileID.InsanityShadowHostile), new int[] { 20, 40, 60, 80, 120 } }, + { new Tuple(NPCID.Deerclops, ProjectileID.DeerclopsIceSpike), new int[] { 26, 52, 76, 150 } }, + { new Tuple(NPCID.Deerclops, ProjectileID.DeerclopsRangedProjectile), new int[] { 36, 72, 88, 156 } }, + { new Tuple(NPCID.Deerclops, ProjectileID.InsanityShadowHostile), new int[] { 20, 40, 60, 120 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 42, 68, 84, 100, 150 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 38, 60, 76, 92, 138 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 42, 68, 84, 100, 150 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 38, 60, 76, 92, 138 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 42, 68, 84, 100, 150 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 38, 60, 76, 92, 138 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 34, 52, 68, 80, 120 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 80, 120 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 24, 48, 60, 72, 108 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 42, 68, 84, 150 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 38, 60, 76, 138 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 42, 68, 84, 150 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 38, 60, 76, 138 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 42, 68, 84, 150 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 38, 60, 76, 138 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 34, 52, 68, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 36, 56, 68, 120 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 24, 48, 60, 108 } }, - { new Tuple(NPCID.WallofFleshEye, ProjectileID.EyeLaser), new int[] { 36, 72, 88, 104, 156 } }, - { new Tuple(NPCID.WallofFlesh, ProjectileID.DemonSickle), new int[] { 52, 92, 112, 132, 198 } }, - { new Tuple(NPCID.WallofFlesh, ProjectileID.Fireball), new int[] { 36, 72, 88, 104, 156 } }, + { new Tuple(NPCID.WallofFleshEye, ProjectileID.EyeLaser), new int[] { 36, 72, 88, 156 } }, + { new Tuple(NPCID.WallofFlesh, ProjectileID.DemonSickle), new int[] { 52, 92, 112, 198 } }, + { new Tuple(NPCID.WallofFlesh, ProjectileID.Fireball), new int[] { 36, 72, 88, 156 } }, - { new Tuple(NPCID.QueenSlimeBoss, ProjectileID.QueenSlimeGelAttack), new int[] { 60, 120, 136, 152, 228 } }, - { new Tuple(NPCID.QueenSlimeBoss, ProjectileID.QueenSlimeSmash), new int[] { 80, 160, 188, 216, 324 } }, - { new Tuple(NPCID.QueenSlimeBoss, ProjectileID.QueenSlimeMinionBlueSpike), new int[] { 52, 92, 112, 132, 198 } }, - { new Tuple(NPCID.QueenSlimeMinionBlue, ProjectileID.QueenSlimeMinionBlueSpike), new int[] { 52, 92, 112, 132, 198 } }, - { new Tuple(NPCID.QueenSlimeMinionPink, ProjectileID.QueenSlimeMinionPinkBall), new int[] { 52, 92, 112, 132, 198 } }, + { new Tuple(NPCID.QueenSlimeBoss, ProjectileID.QueenSlimeGelAttack), new int[] { 60, 120, 136, 228 } }, + { new Tuple(NPCID.QueenSlimeBoss, ProjectileID.QueenSlimeSmash), new int[] { 80, 160, 188, 324 } }, + { new Tuple(NPCID.QueenSlimeBoss, ProjectileID.QueenSlimeMinionBlueSpike), new int[] { 52, 92, 112, 198 } }, + { new Tuple(NPCID.QueenSlimeMinionBlue, ProjectileID.QueenSlimeMinionBlueSpike), new int[] { 52, 92, 112, 198 } }, + { new Tuple(NPCID.QueenSlimeMinionPink, ProjectileID.QueenSlimeMinionPinkBall), new int[] { 52, 92, 112, 198 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 52, 92, 112, 132, 198 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 120, 136, 152, 228 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 60, 100, 120, 140, 210 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 52, 92, 112, 132, 198 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 52, 92, 112, 198 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 120, 136, 228 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 60, 100, 120, 210 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 52, 92, 112, 198 } }, - { new Tuple(NPCID.Retinazer, ProjectileID.EyeLaser), new int[] { 40, 92, 116, 140, 210 } }, + { new Tuple(NPCID.Retinazer, ProjectileID.EyeLaser), new int[] { 40, 92, 116, 210 } }, { new Tuple(NPCID.Retinazer, ProjectileID.DeathLaser), new int[] { 50, // 38 in rapid fire 108, // 81 in rapid fire 132, // 99 in rapid fire - 156, // 117 in rapid fire 234 } }, // 176 in rapid fire - { new Tuple(NPCID.Retinazer, ModContent.ProjectileType()), new int[] { 70, 120, 136, 152, 228 } }, - { new Tuple(NPCID.Spazmatism, ProjectileID.CursedFlameHostile), new int[] { 50, 100, 120, 140, 210 } }, - { new Tuple(NPCID.Spazmatism, ModContent.ProjectileType()), new int[] { 60, 120, 148, 176, 264 } }, - { new Tuple(NPCID.Spazmatism, ModContent.ProjectileType()), new int[] { 70, 120, 148, 176, 264 } }, - { new Tuple(NPCID.Spazmatism, ModContent.ProjectileType()), new int[] { 60, 100, 128, 156, 234 } }, + { new Tuple(NPCID.Retinazer, ModContent.ProjectileType()), new int[] { 70, 120, 136, 228 } }, + { new Tuple(NPCID.Spazmatism, ProjectileID.CursedFlameHostile), new int[] { 50, 100, 120, 210 } }, + { new Tuple(NPCID.Spazmatism, ModContent.ProjectileType()), new int[] { 60, 120, 148, 264 } }, + { new Tuple(NPCID.Spazmatism, ModContent.ProjectileType()), new int[] { 70, 120, 148, 264 } }, + { new Tuple(NPCID.Spazmatism, ModContent.ProjectileType()), new int[] { 60, 100, 128, 234 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 60, 100, 120, 140, 210 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 120, 136, 152, 228 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 66, 112, 128, 144, 216 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 60, 100, 120, 210 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 120, 136, 228 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 66, 112, 128, 216 } }, - { new Tuple(NPCID.TheDestroyer, ProjectileID.DeathLaser), new int[] { 44, 96, 116, 136, 204 } }, - { new Tuple(NPCID.TheDestroyer, ModContent.ProjectileType()), new int[] { 46, 108, 128, 148, 222 } }, - { new Tuple(NPCID.TheDestroyer, ModContent.ProjectileType()), new int[] { 48, 116, 136, 156, 234 } }, - { new Tuple(NPCID.TheDestroyerBody, ProjectileID.DeathLaser), new int[] { 44, 96, 116, 136, 204 } }, - { new Tuple(NPCID.TheDestroyerBody, ModContent.ProjectileType()), new int[] { 46, 108, 128, 148, 222 } }, - { new Tuple(NPCID.TheDestroyerBody, ModContent.ProjectileType()), new int[] { 48, 116, 136, 156, 234 } }, - { new Tuple(NPCID.Probe, ProjectileID.PinkLaser), new int[] { 50, 88, 100, 112, 168 } }, + { new Tuple(NPCID.TheDestroyer, ProjectileID.DeathLaser), new int[] { 44, 96, 116, 204 } }, + { new Tuple(NPCID.TheDestroyer, ModContent.ProjectileType()), new int[] { 46, 108, 128, 222 } }, + { new Tuple(NPCID.TheDestroyer, ModContent.ProjectileType()), new int[] { 48, 116, 136, 234 } }, + { new Tuple(NPCID.TheDestroyerBody, ProjectileID.DeathLaser), new int[] { 44, 96, 116, 204 } }, + { new Tuple(NPCID.TheDestroyerBody, ModContent.ProjectileType()), new int[] { 46, 108, 128, 222 } }, + { new Tuple(NPCID.TheDestroyerBody, ModContent.ProjectileType()), new int[] { 48, 116, 136, 234 } }, + { new Tuple(NPCID.Probe, ProjectileID.PinkLaser), new int[] { 50, 88, 100, 168 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 112, 128, 144, 216 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 200, 240, 280, 420 } }, // Split shots: 72, 120, 144, 168, 252 - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 112, 128, 144, 216 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 112, 128, 216 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 200, 240, 420 } }, // Split shots: 72, 120, 144, 252 + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 112, 128, 216 } }, - { new Tuple(NPCID.SkeletronPrime, ProjectileID.Skull), new int[] { 50, 108, 124, 140, 210 } }, - { new Tuple(NPCID.SkeletronPrime, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 140, 210 } }, - { new Tuple(NPCID.SkeletronPrime, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 176, 264 } }, - { new Tuple(NPCID.PrimeCannon, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 176, 264 } }, - { new Tuple(NPCID.PrimeCannon, ProjectileID.BombSkeletronPrime), new int[] { 80, 160, 0, 0, 300 } }, - { new Tuple(NPCID.PrimeLaser, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 140, 210 } }, + { new Tuple(NPCID.SkeletronPrime, ProjectileID.Skull), new int[] { 50, 108, 124, 210 } }, + { new Tuple(NPCID.SkeletronPrime, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 210 } }, + { new Tuple(NPCID.SkeletronPrime, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 264 } }, + { new Tuple(NPCID.PrimeCannon, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 264 } }, + { new Tuple(NPCID.PrimeCannon, ProjectileID.BombSkeletronPrime), new int[] { 80, 160, 0, 300 } }, + { new Tuple(NPCID.PrimeLaser, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 210 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 112, 128, 144, 216 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 112, 128, 144, 216 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 112, 128, 144, 216 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 112, 128, 216 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 112, 128, 216 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 112, 128, 216 } }, - { new Tuple(NPCID.Plantera, ProjectileID.SeedPlantera), new int[] { 52, 96, 128, 160, 240 } }, - { new Tuple(NPCID.Plantera, ProjectileID.PoisonSeedPlantera), new int[] { 62, 116, 144, 172, 258 } }, - { new Tuple(NPCID.Plantera, ProjectileID.ThornBall), new int[] { 72, 132, 160, 188, 282 } }, - { new Tuple(NPCID.Plantera, ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, - { new Tuple(NPCID.Plantera, ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, + { new Tuple(NPCID.Plantera, ProjectileID.SeedPlantera), new int[] { 52, 96, 128, 240 } }, + { new Tuple(NPCID.Plantera, ProjectileID.PoisonSeedPlantera), new int[] { 62, 116, 144, 258 } }, + { new Tuple(NPCID.Plantera, ProjectileID.ThornBall), new int[] { 72, 132, 160, 282 } }, + { new Tuple(NPCID.Plantera, ModContent.ProjectileType()), new int[] { 80, 140, 160, 270 } }, + { new Tuple(NPCID.Plantera, ModContent.ProjectileType()), new int[] { 80, 140, 160, 270 } }, - { new Tuple(NPCID.HallowBoss, ProjectileID.HallowBossRainbowStreak), new int[] { 100, 152, 172, 192, 300 } }, - { new Tuple(NPCID.HallowBoss, ProjectileID.FairyQueenSunDance), new int[] { 120, 180, 204, 228, 360 } }, - { new Tuple(NPCID.HallowBoss, ProjectileID.HallowBossLastingRainbow), new int[] { 100, 152, 172, 192, 300 } }, - { new Tuple(NPCID.HallowBoss, ProjectileID.FairyQueenLance), new int[] { 130, 196, 216, 236, 390 } }, + { new Tuple(NPCID.HallowBoss, ProjectileID.HallowBossRainbowStreak), new int[] { 100, 152, 172, 300 } }, + { new Tuple(NPCID.HallowBoss, ProjectileID.FairyQueenSunDance), new int[] { 120, 180, 204, 360 } }, + { new Tuple(NPCID.HallowBoss, ProjectileID.HallowBossLastingRainbow), new int[] { 100, 152, 172, 300 } }, + { new Tuple(NPCID.HallowBoss, ProjectileID.FairyQueenLance), new int[] { 130, 196, 216, 390 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 100, 172, 208, 244, 366 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 180, 270 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 84, 148, 172, 196, 294 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 88, 156, 184, 212, 318 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 100, 172, 208, 366 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 80, 140, 160, 270 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 84, 148, 172, 294 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 88, 156, 184, 318 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 88, 156, 184, 212, 318 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 100, 172, 208, 244, 366 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 88, 156, 184, 212, 318 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 88, 156, 184, 318 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 100, 172, 208, 366 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 88, 156, 184, 318 } }, - { new Tuple(NPCID.Golem, ProjectileID.Fireball), new int[] { 60, 120, 140, 180, 270 } }, - { new Tuple(NPCID.Golem, ProjectileID.EyeBeam), new int[] { 80, 140, 172, 204, 306 } }, - { new Tuple(NPCID.GolemHead, ProjectileID.Fireball), new int[] { 60, 120, 140, 180, 270 } }, - { new Tuple(NPCID.GolemHead, ProjectileID.EyeBeam), new int[] { 80, 140, 172, 204, 306 } }, - { new Tuple(NPCID.GolemFistLeft, ProjectileID.InfernoHostileBolt), new int[] { 88, 156, 184, 212, 318 } }, - { new Tuple(NPCID.GolemFistRight, ProjectileID.InfernoHostileBolt), new int[] { 88, 156, 184, 212, 318 } }, - { new Tuple(NPCID.GolemHeadFree, ProjectileID.Fireball), new int[] { 60, 120, 140, 180, 270 } }, - { new Tuple(NPCID.GolemHeadFree, ProjectileID.EyeBeam), new int[] { 80, 140, 172, 204, 306 } }, - { new Tuple(NPCID.GolemHeadFree, ProjectileID.InfernoHostileBolt), new int[] { 88, 156, 184, 212, 318 } }, + { new Tuple(NPCID.Golem, ProjectileID.Fireball), new int[] { 60, 120, 140, 270 } }, + { new Tuple(NPCID.Golem, ProjectileID.EyeBeam), new int[] { 80, 140, 172, 306 } }, + { new Tuple(NPCID.GolemHead, ProjectileID.Fireball), new int[] { 60, 120, 140, 270 } }, + { new Tuple(NPCID.GolemHead, ProjectileID.EyeBeam), new int[] { 80, 140, 172, 306 } }, + { new Tuple(NPCID.GolemFistLeft, ProjectileID.InfernoHostileBolt), new int[] { 88, 156, 184, 318 } }, + { new Tuple(NPCID.GolemFistRight, ProjectileID.InfernoHostileBolt), new int[] { 88, 156, 184, 318 } }, + { new Tuple(NPCID.GolemHeadFree, ProjectileID.Fireball), new int[] { 60, 120, 140, 270 } }, + { new Tuple(NPCID.GolemHeadFree, ProjectileID.EyeBeam), new int[] { 80, 140, 172, 306 } }, + { new Tuple(NPCID.GolemHeadFree, ProjectileID.InfernoHostileBolt), new int[] { 88, 156, 184, 318 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 88, 156, 184, 212, 318 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 88, 156, 184, 212, 318 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 192, 220, 248, 372 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 88, 156, 184, 318 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 88, 156, 184, 318 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 192, 220, 372 } }, - { new Tuple(NPCID.DukeFishron, ProjectileID.Sharknado), new int[] { 80, 100, 150, 200, 300 } }, - { new Tuple(NPCID.DukeFishron, ProjectileID.Cthulunado), new int[] { 160, 200, 232, 264, 480 } }, + { new Tuple(NPCID.DukeFishron, ProjectileID.Sharknado), new int[] { 80, 100, 150, 300 } }, + { new Tuple(NPCID.DukeFishron, ProjectileID.Cthulunado), new int[] { 160, 200, 232, 480 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 180, 208, 236, 360 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 180, 208, 236, 360 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 90, 144, 172, 200, 300 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 180, 208, 236, 360 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 90, 144, 172, 200, 300 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 180, 208, 360 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 180, 208, 360 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 90, 144, 172, 300 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 180, 208, 360 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 90, 144, 172, 300 } }, - { new Tuple(NPCID.CultistBoss, ProjectileID.CultistBossFireBall), new int[] { 88, 156, 184, 212, 318 } }, - { new Tuple(NPCID.CultistBoss, ProjectileID.CultistBossIceMist), new int[] { 120, 180, 208, 236, 360 } }, - { new Tuple(NPCID.CultistBoss, ProjectileID.CultistBossLightningOrb), new int[] { 120, 192, 220, 248, 372 } }, - { new Tuple(NPCID.CultistBossClone, ProjectileID.CultistBossFireBallClone), new int[] { 90, 144, 172, 200, 300 } }, - { new Tuple(NPCID.AncientDoom, ProjectileID.AncientDoomProjectile), new int[] { 88, 156, 184, 212, 318 } }, + { new Tuple(NPCID.CultistBoss, ProjectileID.CultistBossFireBall), new int[] { 88, 156, 184, 318 } }, + { new Tuple(NPCID.CultistBoss, ProjectileID.CultistBossIceMist), new int[] { 120, 180, 208, 360 } }, + { new Tuple(NPCID.CultistBoss, ProjectileID.CultistBossLightningOrb), new int[] { 120, 192, 220, 372 } }, + { new Tuple(NPCID.CultistBossClone, ProjectileID.CultistBossFireBallClone), new int[] { 90, 144, 172, 300 } }, + { new Tuple(NPCID.AncientDoom, ProjectileID.AncientDoomProjectile), new int[] { 88, 156, 184, 318 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 90, 152, 176, 200, 300 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 180, 208, 236, 360 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 100, 172, 192, 212, 318 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 90, 152, 176, 300 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 180, 208, 360 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 100, 172, 192, 318 } }, - { new Tuple(NPCID.MoonLordHead, ProjectileID.PhantasmalDeathray), new int[] { 200, 300, 380, 460, 690 } }, - { new Tuple(NPCID.MoonLordHead, ProjectileID.PhantasmalBolt), new int[] { 90, 120, 160, 200, 300 } }, - { new Tuple(NPCID.MoonLordHand, ProjectileID.PhantasmalEye), new int[] { 90, 120, 160, 200, 300 } }, - { new Tuple(NPCID.MoonLordHand, ProjectileID.PhantasmalSphere), new int[] { 120, 160, 220, 280, 420 } }, - { new Tuple(NPCID.MoonLordHand, ProjectileID.PhantasmalBolt), new int[] { 90, 120, 160, 200, 300 } }, - { new Tuple(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalBolt), new int[] { 100, 140, 180, 220, 330 } }, - { new Tuple(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalEye), new int[] { 100, 140, 180, 220, 330 } }, - { new Tuple(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalSphere), new int[] { 132, 176, 220, 264, 396 } }, - { new Tuple(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalDeathray), new int[] { 150, 200, 260, 320, 480 } }, + { new Tuple(NPCID.MoonLordHead, ProjectileID.PhantasmalDeathray), new int[] { 200, 300, 380, 690 } }, + { new Tuple(NPCID.MoonLordHead, ProjectileID.PhantasmalBolt), new int[] { 90, 120, 160, 300 } }, + { new Tuple(NPCID.MoonLordHand, ProjectileID.PhantasmalEye), new int[] { 90, 120, 160, 300 } }, + { new Tuple(NPCID.MoonLordHand, ProjectileID.PhantasmalSphere), new int[] { 120, 160, 220, 420 } }, + { new Tuple(NPCID.MoonLordHand, ProjectileID.PhantasmalBolt), new int[] { 90, 120, 160, 300 } }, + { new Tuple(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalBolt), new int[] { 100, 140, 180, 330 } }, + { new Tuple(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalEye), new int[] { 100, 140, 180, 330 } }, + { new Tuple(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalSphere), new int[] { 132, 176, 220, 396 } }, + { new Tuple(NPCID.MoonLordFreeEye, ProjectileID.PhantasmalDeathray), new int[] { 150, 200, 260, 480 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 268, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 268, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 268, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 192, 220, 248, 360 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 192, 220, 248, 360 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 160, 320, 352, 384, 480 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 268, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 105, 171, 189, 207, 315 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 228, 252, 276, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 105, 171, 189, 207, 315 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 268, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 192, 220, 248, 360 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 35, 50, 50, 0, 0 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 192, 220, 360 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 192, 220, 360 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 160, 320, 352, 480 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 105, 171, 189, 315 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 228, 252, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 105, 171, 189, 315 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 192, 220, 360 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 35, 50, 50, 0 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 268, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 200, 300, 332, 364, 600 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 200, 300, 332, 600 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 150, 264, 288, 312, 450 } }, // Split holy fire does: 113, 198, 216, 234, 338 - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 192, 220, 248, 360 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 192, 220, 248, 360 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 268, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 35, 50, 50, 0, 0 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 228, 252, 276, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 105, 171, 189, 207, 315 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 228, 252, 276, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 105, 171, 189, 207, 315 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 268, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 228, 252, 276, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 228, 252, 276, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 200, 400, 440, 480, 600 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 150, 264, 288, 450 } }, // Split holy fire does: 113, 198, 216, 338 + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 192, 220, 360 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 192, 220, 360 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 35, 50, 50, 0 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 228, 252, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 105, 171, 189, 315 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 228, 252, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 105, 171, 189, 315 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 228, 252, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 228, 252, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 200, 400, 440, 600 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 240, 264, 288, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 240, 264, 288, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 240, 264, 288, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 240, 264, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 240, 264, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 240, 264, 420 } }, - { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossLightningOrbArc), new int[] { 150, 264, 288, 312, 450 } }, - { new Tuple(ModContent.NPCType(), ProjectileID.FrostWave), new int[] { 150, 264, 288, 312, 450 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 160, 276, 304, 332, 480 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 240, 264, 288, 420 } }, - { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossLightningOrb), new int[] { 150, 264, 288, 312, 450 } }, + { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossLightningOrbArc), new int[] { 150, 264, 288, 450 } }, + { new Tuple(ModContent.NPCType(), ProjectileID.FrostWave), new int[] { 150, 264, 288, 450 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 160, 276, 304, 480 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 240, 264, 420 } }, + { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossLightningOrb), new int[] { 150, 264, 288, 450 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 240, 264, 288, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 240, 264, 288, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 240, 264, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 240, 264, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 240, 264, 288, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 150, 264, 288, 312, 450 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 150, 264, 288, 312, 450 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 160, 276, 304, 332, 480 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 240, 264, 288, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 170, 296, 324, 352, 510 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 150, 264, 288, 312, 450 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 240, 264, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 150, 264, 288, 450 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 150, 264, 288, 450 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 160, 276, 304, 480 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 240, 264, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 170, 296, 324, 510 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 150, 264, 288, 450 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 264, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 264, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 170, 296, 324, 352, 510 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 420, 460, 500, 840 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 170, 296, 324, 352, 510 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 180, 316, 348, 380, 540 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 170, 296, 324, 352, 510 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 170, 296, 324, 510 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 420, 460, 840 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 170, 296, 324, 510 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 180, 316, 348, 540 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 170, 296, 324, 510 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 180, 316, 348, 380, 540 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 200, 340, 376, 412, 600 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 180, 316, 348, 540 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 200, 340, 376, 600 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 300, 520, 548, 576, 900 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 220, 384, 424, 464, 660 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 488, 750 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 488, 750 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 488, 750 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 220, 384, 424, 464, 660 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 220, 384, 424, 464, 660 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 220, 384, 424, 464, 660 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 488, 750 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 300, 520, 548, 900 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 220, 384, 424, 660 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 750 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 750 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 750 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 220, 384, 424, 660 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 220, 384, 424, 660 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 220, 384, 424, 660 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 750 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 468, 484, 500, 840 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 468, 484, 500, 840 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 300, 508, 528, 548, 900 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 592, 624, 656, 1050 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 468, 484, 500, 840 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 488, 750 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 468, 484, 500, 840 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 488, 750 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 488, 750 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 468, 484, 500, 840 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 488, 750 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 468, 484, 500, 840 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 488, 750 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 468, 484, 840 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 468, 484, 840 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 300, 508, 528, 900 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 592, 624, 1050 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 468, 484, 840 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 750 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 468, 484, 840 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 750 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 750 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 468, 484, 840 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 750 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 468, 484, 840 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 250, 440, 464, 750 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 300, 508, 528, 548, 900 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 456, 720 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 456, 720 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 468, 484, 500, 840 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 300, 508, 528, 900 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 720 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 720 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 280, 468, 484, 840 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 592, 624, 656, 1050 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 456, 720 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 456, 720 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 456, 720 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 456, 720 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 592, 624, 1050 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 720 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 720 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 720 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 720 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 300, 508, 528, 548, 900 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 300, 508, 528, 548, 900 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 456, 720 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 456, 720 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 456, 720 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 608, 640, 672, 1200 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 300, 508, 528, 900 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 300, 508, 528, 900 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 720 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 720 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 240, 408, 432, 720 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 608, 640, 1200 } }, - { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossIceMist), new int[] { 400, 600, 632, 664, 1200 } }, - { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossLightningOrbArc), new int[] { 500, 752, 788, 824, 1500 } }, - { new Tuple(ModContent.NPCType(), ProjectileID.AncientDoomProjectile), new int[] { 400, 600, 632, 664, 1200 } }, - { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossFireBallClone), new int[] { 400, 600, 632, 664, 1200 } } + { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossIceMist), new int[] { 400, 600, 632, 1200 } }, + { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossLightningOrbArc), new int[] { 500, 752, 788, 1500 } }, + { new Tuple(ModContent.NPCType(), ProjectileID.AncientDoomProjectile), new int[] { 400, 600, 632, 1200 } }, + { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossFireBallClone), new int[] { 400, 600, 632, 1200 } } }; } diff --git a/Events/BossRushEvent.cs b/Events/BossRushEvent.cs index d39adecaea..339dbafa9f 100644 --- a/Events/BossRushEvent.cs +++ b/Events/BossRushEvent.cs @@ -164,7 +164,7 @@ namespace CalamityMod.Events ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType() }), - new Boss(NPCID.EyeofCthulhu, TimeChangeContext.Night, permittedNPCs: new int[] { NPCID.ServantofCthulhu, ModContent.NPCType() }), + new Boss(NPCID.EyeofCthulhu, TimeChangeContext.Night, permittedNPCs: new int[] { NPCID.ServantofCthulhu }), new Boss(ModContent.NPCType(), TimeChangeContext.Day, type => { diff --git a/ExtraTextures/Bestiary/SlimeGod_Bestiary.png b/ExtraTextures/Bestiary/SlimeGod_Bestiary.png deleted file mode 100644 index dbe7056e82..0000000000 Binary files a/ExtraTextures/Bestiary/SlimeGod_Bestiary.png and /dev/null differ diff --git a/Gores/BloodlettingServant1.png b/Gores/BloodlettingServant1.png deleted file mode 100644 index d7522171eb..0000000000 Binary files a/Gores/BloodlettingServant1.png and /dev/null differ diff --git a/Gores/BloodlettingServant2.png b/Gores/BloodlettingServant2.png deleted file mode 100644 index 391c59a4a7..0000000000 Binary files a/Gores/BloodlettingServant2.png and /dev/null differ diff --git a/Gores/BloodlettingServant3.png b/Gores/BloodlettingServant3.png deleted file mode 100644 index a4da81ae9f..0000000000 Binary files a/Gores/BloodlettingServant3.png and /dev/null differ diff --git a/Gores/BloodlettingServant4.png b/Gores/BloodlettingServant4.png deleted file mode 100644 index ddece78bac..0000000000 Binary files a/Gores/BloodlettingServant4.png and /dev/null differ diff --git a/Gores/SkeletronPrimes_RevMaster/ChadPrime1.png b/Gores/SkeletronPrimes_RevMaster/ChadPrime1.png deleted file mode 100644 index 07f2e01333..0000000000 Binary files a/Gores/SkeletronPrimes_RevMaster/ChadPrime1.png and /dev/null differ diff --git a/Gores/SkeletronPrimes_RevMaster/ChadPrime2.png b/Gores/SkeletronPrimes_RevMaster/ChadPrime2.png deleted file mode 100644 index 303ac4ccde..0000000000 Binary files a/Gores/SkeletronPrimes_RevMaster/ChadPrime2.png and /dev/null differ diff --git a/Gores/SkeletronPrimes_RevMaster/SkeletronPrime2_1.png b/Gores/SkeletronPrimes_RevMaster/SkeletronPrime2_1.png deleted file mode 100644 index 860fd8b8c2..0000000000 Binary files a/Gores/SkeletronPrimes_RevMaster/SkeletronPrime2_1.png and /dev/null differ diff --git a/Gores/SkeletronPrimes_RevMaster/SkeletronPrime2_2.png b/Gores/SkeletronPrimes_RevMaster/SkeletronPrime2_2.png deleted file mode 100644 index 613ee6e5e1..0000000000 Binary files a/Gores/SkeletronPrimes_RevMaster/SkeletronPrime2_2.png and /dev/null differ diff --git a/ILEditing/BalancingILChanges.cs b/ILEditing/BalancingILChanges.cs index 57e23bd6f3..20b45bc28c 100644 --- a/ILEditing/BalancingILChanges.cs +++ b/ILEditing/BalancingILChanges.cs @@ -79,17 +79,6 @@ namespace CalamityMod.ILEditing } cursor.Remove(); cursor.Emit(OpCodes.Ldc_R4, 0.5f); // Decrease to 0.5f. - - // CIT 22SEP2024: Removed the edit intended to decrease Frog Leg's jump speed boost, - // as it was not doing anything due to vanilla changing how Frog Leg's jump speed boost is applied. - - // Remove the jump height addition from the Werewolf buff (Moon Charm). - if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcI4(2))) - { - LogFailure("Jump Height Boost Fixes", "Could not locate Moon Charm jump height boost value."); - return; - } - cursor.Next.Operand = 0; } private const float VanillaBaseJumpSpeed = 5.01f; @@ -115,16 +104,12 @@ namespace CalamityMod.ILEditing private static void RunSpeedAdjustments(ILContext il) { var cursor = new ILCursor(il); - float asphaltTopSpeedMultiplier = 1.75f; // +75%. Vanilla is +250% + float asphaltTopSpeedMultiplier = 2.25f; // +125%. Vanilla is +250% float asphaltSlowdown = 1f; // Vanilla is 2f. This should actually make asphalt faster. - // Dunerider Boots multiply all run stats by 1.75f in vanilla - float duneRiderBootsMultiplier = 1.25f; // Change to 1.25f - // Multiplied by 0.6 on frozen slime, for +26% acceleration // Multiplied by 0.7 on ice, for +47% acceleration float iceSkateAcceleration = 2.1f; - float iceSkateTopSpeed = 1f; // no boost at all // // ASPHALT @@ -153,22 +138,6 @@ namespace CalamityMod.ILEditing cursor.Emit(OpCodes.Ldc_R4, asphaltSlowdown); } - // - // DUNERIDER BOOTS + SAND BLOCKS - // - { - // Find the multiplier for Dunerider Boots on Sand Blocks. - if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcR4(1.75f))) - { - LogFailure("Run Speed Adjustments", "Could not locate the Dunerdier Boots multiplier."); - return; - } - - // Massively reduce the increased speed of Dunerider Boots while on Sand Blocks. - cursor.Remove(); - cursor.Emit(OpCodes.Ldc_R4, duneRiderBootsMultiplier); - } - // // ICE SKATES + FROZEN SLIME BLOCKS // @@ -183,17 +152,6 @@ namespace CalamityMod.ILEditing // Massively reduce the acceleration bonus of Ice Skates on Frozen Slime Blocks. cursor.Remove(); cursor.Emit(OpCodes.Ldc_R4, iceSkateAcceleration); - - // Find the top speed multiplier of Ice Skates on Frozen Slime Blocks. - if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcR4(1.25f))) - { - LogFailure("Run Speed Adjustments", "Could not locate Ice Skates + Frozen Slime Block top speed multiplier."); - return; - } - - // Make Ice Skates give no top speed boost whatsoever on Frozen Slime Blocks. - cursor.Remove(); - cursor.Emit(OpCodes.Ldc_R4, iceSkateTopSpeed); } // @@ -210,17 +168,6 @@ namespace CalamityMod.ILEditing // Massively reduce the acceleration bonus of Ice Skates on Ice Blocks. cursor.Remove(); cursor.Emit(OpCodes.Ldc_R4, iceSkateAcceleration); - - // Find the top speed multiplier of Ice Skates on Ice Blocks. - if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcR4(1.25f))) - { - LogFailure("Run Speed Adjustments", "Could not locate Ice Skates + Ice Block top speed multiplier."); - return; - } - - // Make Ice Skates give no top speed boost whatsoever on Ice Blocks. - cursor.Remove(); - cursor.Emit(OpCodes.Ldc_R4, iceSkateTopSpeed); } } @@ -502,30 +449,13 @@ namespace CalamityMod.ILEditing #region UpdateBuffs Balancing Changes private static void UpdateBuffsBalancingChanges(ILContext il) { - // This IL edit accomplishes four things: - // 1. Nerf Sharpening Station's armor penetration boost from 12 to 5. - // 2. Nerf Beetle Scale Mail's set bonus Beetle Might melee speed from 10% per stack to 5%. - // 3. Nerf Nebula armor's Damage and Life Boosters (Mana Boosters are not handled in this method). - // 4. Remove the ability for Feral Bite to randomly inflict debuffs. + // This IL edit accomplishes three things: + // 1. Nerf Beetle Scale Mail's set bonus Beetle Might melee speed from 10% per stack to 5%. + // 2. Nerf Nebula armor's Damage and Life Boosters (Mana Boosters are not handled in this method). + // 3. Remove the vanilla implementation of Feral Bite inflicting random debuffs. var cursor = new ILCursor(il); - // First, find the code which applies Sharpened's armor penetration buff. - if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdcI4(BuffID.Sharpened))) - { - LogFailure("Sharpening Station Nerf", "Could not locate the Sharpened buff ID."); - return; - } - if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcR4(12f))) // The amount of armor penetration to grant. - { - LogFailure("Sharpening Station Nerf", "Could not locate the amount of armor penetration granted."); - return; - } - - // Replace the value entirely. - cursor.Remove(); - cursor.Emit(OpCodes.Ldc_R4, BalancingConstants.SharpeningStationArmorPenetration); - - // Next, move to Beetle Scale Mail's melee speed boost from Beetle Might buff. + // First, move to Beetle Scale Mail's melee speed boost from Beetle Might buff. if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdcI4(BuffID.BeetleMight1))) { LogFailure("Beetle Scale Mail Nerf", "Could not locate the Beetle Might buff ID."); @@ -581,7 +511,7 @@ namespace CalamityMod.ILEditing // There are multiple branches pointing to this instruction, so it cannot be removed. Instead, swap its value directly. cursor.Next.Operand = BalancingConstants.NebulaDamagePerBooster; - // Finally, removing Feral Bite's debuffs. + // Finally, removing Feral Bite's vanilla debuff infliction. // Find the random debuff duration multiplier for the debuffs inflicted by Feral Bite. if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdcR4(0.01f))) // The 0.01f random debuff duration multiplier. { @@ -590,6 +520,7 @@ namespace CalamityMod.ILEditing } // Remove and change to 0f, this makes the random debuffs from Feral Bite have 0 duration. + // Calamity reimplements a different version of this in CalamityGlobalBuff.Update cursor.Remove(); cursor.Emit(OpCodes.Ldc_R4, 0f); } diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index 72c78c0ed9..d4d1e7273f 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -66,11 +66,11 @@ namespace CalamityMod.ILEditing IL_Main.UpdateTime += PermitNighttimeTownNPCSpawning; On_Main.UpdateTime_SpawnTownNPCs += AlterTownNPCSpawnRate; On_NPC.ShouldEmpressBeEnraged += AllowEmpressToEnrageInBossRush; - On_NPC.DoDeathEvents += PreventVanillaBossDeathsInBossRush; + IL_NPC.DoDeathEvents += PreventVanillaBossDeathsInBossRush; IL_Player.CollectTaxes += MakeTaxCollectorUseful; // Mechanics / features - On_NPC.ApplyTileCollision += AllowTriggeredFallthrough; + On_NPC.ApplyTileCollision += AllowFusionFeederToDigThroughSand; IL_Player.ApplyEquipFunctional += ScopesRequireVisibilityToZoom; IL_Player.Hurt_PlayerDeathReason_int_int_refHurtInfo_bool_bool_int_bool_float_float_float += DodgeMechanicAdjustments; On_Player.PutHallowedArmorSetBonusOnCooldown += AddHolyProtectionCooldown; @@ -84,8 +84,6 @@ namespace CalamityMod.ILEditing On_Item.AffixName += IncorporateEnchantmentInAffix; On_Projectile.NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float_float += IncorporateExtraProjectileVariables; On_Player.ApplyDamageToNPC += ApplyOldFashionedDamageToMiscHits; - // TODO -- This should be unnecessary. There is now a TML hook for platform collision for ModNPCs. - On_NPC.Collision_DecideFallThroughPlatforms += EnableCalamityBossPlatformCollision; IL_Wiring.HitWireSingle += AddTwinklersToStatue; On_Player.UpdateItemDye += FindCalamityItemDyeShader; On_AWorldListItem.GetDifficulty += GetDifficultyOverride; diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs index 611592cad6..90bdf541aa 100644 --- a/ILEditing/MechanicILChanges.cs +++ b/ILEditing/MechanicILChanges.cs @@ -344,33 +344,51 @@ namespace CalamityMod.ILEditing #endregion #region Prevent Vanilla Bosses From Being Marked as Defeated in Boss Rush - private static void PreventVanillaBossDeathsInBossRush(On_NPC.orig_DoDeathEvents orig, NPC self, Player closestPlayer) + private static void PreventVanillaBossDeathsInBossRush(ILContext il) { - // Aside from setting the boss' downed bool, DoDeathEvents also handles the following tasks: - // Advancing Slime Rain, spawning Dungeon Spirits, advancing invasion kills, spawning Wall of Flesh's loot box, dropping boss potions and hearts, and sending the boss defeated message. - // The first three do not matter at all in Boss Rush. Wall of Flesh's loot box not spawning is also a positive, so that it doesn't clutter the Underworld. - // Dropping potions is worthless at this point, and Boss Rush is already a horribly balanced hellscape as is, so I'm not worried about hearts. - // As for the last one, well, if anyone actually notices that and cares about it, then I suppose we could make a more sophisticated IL edit. - if (BossRushEvent.BossRushActive) - return; + // GOAL: Prevent vanilla boss defeated flags from getting set during Boss Rush. + // All of this is handled within a switch case directly in the DoDeathEvents function. + // Thus, the objective here is to add a branch past the entire switch case if it is Boss Rush. + var cursor = new ILCursor(il); - orig(self, closestPlayer); + // Move to the point right before the switch case. + if (!cursor.TryGotoNext(MoveType.After, i => i.MatchCall("SpawnOnPlayer"))) + { + LogFailure("Prevent Vanilla Defeated Flags in Boss Rush", "Could not move to before the switch case."); + return; + } + + // Define a branch label, load the Boss Rush check, and create the branch if it is true. + var label = il.DefineLabel(); + cursor.Emit(OpCodes.Ldsfld, typeof(BossRushEvent).GetField("BossRushActive")); + cursor.Emit(OpCodes.Brtrue, label); + + // Move to after the switch case to place the label. + for (int i = 0; i < 2; i++) + { + if (!cursor.TryGotoNext(MoveType.After, i => i.MatchCall("SpawnBoss"))) + { + LogFailure("Prevent Vanilla Defeated Flags in Boss Rush", "Could not move to after the switch case."); + return; + } + } + if (!cursor.TryGotoNext(MoveType.AfterLabel, i => i.MatchLdarg0())) + { + LogFailure("Prevent Vanilla Defeated Flags in Boss Rush", "Could not move to after the switch case."); + return; + } + cursor.MarkLabel(label); } #endregion - #region Enabling of Triggered NPC Platform Fallthrough - // Why this isn't a mechanism provided by TML itself or vanilla itself is beyond me. - private static void AllowTriggeredFallthrough(On_NPC.orig_ApplyTileCollision orig, NPC self, bool fall, Vector2 cPosition, int cWidth, int cHeight) + #region Enabling of Fusion Feeder Sand Digging + private static void AllowFusionFeederToDigThroughSand(On_NPC.orig_ApplyTileCollision orig, NPC self, bool fall, Vector2 cPosition, int cWidth, int cHeight) { if (self.active && self.type == ModContent.NPCType()) { self.velocity = Collision.AdvancedTileCollision(TileID.Sets.ForAdvancedCollision.ForSandshark, cPosition, self.velocity, cWidth, cHeight, fall, fall, 1); return; } - var isNpcValid = self.TryGetGlobalNPC(out CalamityGlobalNPC npc); //why the fuck this errors is anybody's guess, it absolutely shouldn't and yet it does - if (isNpcValid && self.active && npc.ShouldFallThroughPlatforms) - fall = true; - orig(self, fall, cPosition, cWidth, cHeight); } #endregion @@ -516,18 +534,6 @@ namespace CalamityMod.ILEditing } #endregion - #region Platform Collision Checks for Grounded Bosses - private static bool EnableCalamityBossPlatformCollision(On_NPC.orig_Collision_DecideFallThroughPlatforms orig, NPC self) - { - if ((self.type == ModContent.NPCType() || self.type == ModContent.NPCType() || self.type == ModContent.NPCType() || - self.type == ModContent.NPCType() || self.type == ModContent.NPCType()) && - self.target >= 0 && Main.player[self.target].position.Y > self.position.Y + self.height) - return true; - - return orig(self); - } - #endregion - #region Incorporate Enchantments in Item Names private static string IncorporateEnchantmentInAffix(On_Item.orig_AffixName orig, Item self) { @@ -1483,88 +1489,28 @@ namespace CalamityMod.ILEditing #endregion #region Statue Additions - /// - /// Change the following code sequence in Wiring.HitWireSingle - /// num8 = (int) Utils.SelectRandom(Main.rand, new short[2] - /// { - /// 355, - /// 358 - /// }); - /// - /// to - /// - /// var arr = new short[2] - /// { - /// 355, - /// 358 - /// }); - /// arr = arr.ToList().Add(id).ToArray(); - /// num8 = Utils.SelectRandom(Main.rand, arr); - /// - /// - /// private static void AddTwinklersToStatue(ILContext il) { - // obtain a cursor positioned before the first instruction of the method - // the cursor is used for navigating and modifying the il - var c = new ILCursor(il); + // Allow Twinklers to be spawned by the Firefly Statue. + var cursor = new ILCursor(il); - // the exact location for this hook is very complex to search for due to the hook instructions not being unique, and buried deep in control flow - // switch statements are sometimes compiled to if-else chains, and debug builds litter the code with no-ops and redundant locals - - // in general you want to search using structure and function rather than numerical constants which may change across different versions or compile settings - // using local variable indices is almost always a bad idea - - // we can search for - // switch (*) - // case 54: - // Utils.SelectRandom * - - // in general you'd want to look for a specific switch variable, or perhaps the containing switch (type) { case 105: - // but the generated IL is really variable and hard to match in this case - - // we'll just use the fact that there are no other switch statements with case 54, followed by a SelectRandom - - ILLabel[] targets = null; - while (c.TryGotoNext(i => i.MatchSwitch(out targets))) + // Move to the method which randomly selects an NPC for the Statue to spawn. This is the second call of the method in this function. + for (int i = 0; i < 2; i++) { - // some optimising compilers generate a sub so that all the switch cases start at 0 - // ldc.i4.s 51 - // sub - // switch - int offset = 0; - if (c.Prev.MatchSub() && c.Prev.Previous.MatchLdcI4(out offset)) + if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchCall(typeof(Utils), nameof(Utils.SelectRandom)))) { - ; + LogFailure("Add Twinkler to Firefly Statue", "Could not move to the SelectRandom method."); + return; } - - // get the label for case 54: if it exists - int case54Index = 54 - offset; - if (case54Index < 0 || case54Index >= targets.Length || !(targets[case54Index] is ILLabel target)) - { - continue; - } - - // move the cursor to case 54: - c.GotoLabel(target); - // there's lots of extra checks we could add here to make sure we're at the right spot, such as not encountering any branching instructions - c.GotoNext(i => i.MatchCall(typeof(Utils), nameof(Utils.SelectRandom))); - - // goto next positions us before the instruction we searched for, so we can insert our array modifying code right here - c.EmitDelegate>(arr => - { - // resize the array and add our custom firefly - Array.Resize(ref arr, arr.Length + 1); - arr[arr.Length - 1] = (short)ModContent.NPCType(); - return arr; - }); - - // hook applied successfully - return; } - // couldn't find the right place to insert - throw new Exception("Hook location not found, switch(*) { case 54: ..."); + // Emit a delegate which resizes the array and adds Twinkler to it. + cursor.EmitDelegate>(arr => + { + Array.Resize(ref arr, arr.Length + 1); + arr[arr.Length - 1] = (short)ModContent.NPCType(); + return arr; + }); } #endregion diff --git a/Items/Accessories/InkBomb.cs b/Items/Accessories/InkBomb.cs index 6ed93531bb..955e945460 100644 --- a/Items/Accessories/InkBomb.cs +++ b/Items/Accessories/InkBomb.cs @@ -21,6 +21,9 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.inkBomb = true; + modPlayer.rogueStealthMax += 0.1f; + player.Calamity().stealthGenStandstill += 0.07f; + player.Calamity().stealthGenMoving += 0.07f; } } } diff --git a/Items/Accessories/ShieldoftheOcean.cs b/Items/Accessories/ShieldoftheOcean.cs index cacb484ead..798f0c4020 100644 --- a/Items/Accessories/ShieldoftheOcean.cs +++ b/Items/Accessories/ShieldoftheOcean.cs @@ -73,8 +73,10 @@ namespace CalamityMod.Items.Accessories continue; // Inflict Riptide on empowered parries. + //Doze - I gave all parry accessories long debuff infliction times due to the lack of weapons that inflict debuffs for a decent time, and the scarcity of using the parry + //Most common vanilla debuffs have a way to inflict them for 15, 20, or even 30 seconds if (empowered) - npc.AddBuff(ModContent.BuffType(), 300); + npc.AddBuff(ModContent.BuffType(), CalamityUtils.SecondsToFrames(15)); // If the NPC can be moved, violently shove them away. Make them susceptible to fall damage on empowered parries. // Otherwise, simply deal a large amount of damage to them if empowered. diff --git a/Items/Accessories/StatMeter.cs b/Items/Accessories/StatMeter.cs index 931dd0c47e..10edb5b418 100644 --- a/Items/Accessories/StatMeter.cs +++ b/Items/Accessories/StatMeter.cs @@ -223,7 +223,6 @@ namespace CalamityMod.Items.Accessories // Detailed Abyss stats only render if the player is in the Abyss. string stats4 = "\n" + (!modPlayer.ZoneAbyss ? this.GetLocalizedValue("AbyssStatsHidden") : this.GetLocalization("AbyssStats").Format( player.GetCurrentAbyssLightLevel(), - TwoPlaces(modPlayer.abyssBreathLossStat), TwoPlaces(modPlayer.abyssBreathLossRateStat), modPlayer.abyssLifeLostAtZeroBreathStat, modPlayer.abyssDefenseLossStat)); diff --git a/Items/Accessories/WarbanneroftheRighteous.cs b/Items/Accessories/WarbanneroftheRighteous.cs index cd6a16258e..04e2b9b36d 100644 --- a/Items/Accessories/WarbanneroftheRighteous.cs +++ b/Items/Accessories/WarbanneroftheRighteous.cs @@ -82,7 +82,7 @@ namespace CalamityMod.Items.Accessories float generousHitboxWidth = Math.Max(nPC.Hitbox.Width / 2f, nPC.Hitbox.Height / 2f) + 100; // Adds some room so max bonus isnt when you're ON the hitbox float intensity = Utils.Remap(Utils.Distance(player.Center, nPC.Center), MaxDistance + generousHitboxWidth, generousHitboxWidth, 1, 3, true); // We have to have this seperate from bonus, otherwise all effected enemies take damage based on the closest enemy - if (Utils.Distance(nPC.Center, player.Center) < MaxDistance + generousHitboxWidth && (nPC.IsAnEnemy(true, true, false) || nPC.type == ModContent.NPCType()) && nPC.CanBeChasedBy()) + if (Utils.Distance(nPC.Center, player.Center) < MaxDistance + generousHitboxWidth && (nPC.IsAnEnemy(true, true, false) || nPC.type == ModContent.NPCType()) && !nPC.dontTakeDamage) { float minDamageMult = 0.35f; int maxTargets = 25; diff --git a/Items/Armor/DesertProwler/DesertProwlerSet.cs b/Items/Armor/DesertProwler/DesertProwlerSet.cs index 7d7bcd3c06..b361e9b684 100644 --- a/Items/Armor/DesertProwler/DesertProwlerSet.cs +++ b/Items/Armor/DesertProwler/DesertProwlerSet.cs @@ -27,12 +27,11 @@ namespace CalamityMod.Items.Armor.DesertProwler public static readonly SoundStyle SmokeBombEndSound = new("CalamityMod/Sounds/Custom/AbilitySounds/DesertProwlerSmokeBombEnd"); public static readonly SoundStyle CDResetSound = new("CalamityMod/Sounds/Custom/AbilitySounds/DesertProwlerCDReset"); - public static int FlatDamageBonus = 1; public static int SmokeCooldown = 25 * 60; public static int SmokeDuration = 5 * 60; public static int LightsOutReset = (int)(1.5f * 60); public static int FreeCrit = 200; - public static int BonusDamageCap = 100; + public static int BonusDamageCap = 200; public static bool ShroudedInSmoke(Player player, out CooldownInstance cd) { @@ -78,8 +77,10 @@ namespace CalamityMod.Items.Armor.DesertProwler public override void UpdateArmorSet(Player player) { - player.setBonus = this.GetLocalization("SetBonus").Format(FlatDamageBonus); //More gets edited in elsewhere - player.GetDamage().Flat += FlatDamageBonus; + player.setBonus = this.GetLocalization("SetBonus").Format(); //More gets edited in elsewhere + player.Calamity().wearingRogueArmor = true; + player.Calamity().rogueStealthMax += 0.5f; + player.GetDamage() += 0.05f; DesertProwlerPlayer armorPlayer = player.GetModPlayer(); armorPlayer.desertProwlerSet = true; @@ -183,8 +184,7 @@ namespace CalamityMod.Items.Armor.DesertProwler public override void UpdateEquip(Player player) { - player.GetCritChance() += 4; - player.ammoCost80 = true; + player.GetCritChance() += 4; } public override void AddRecipes() @@ -227,7 +227,7 @@ namespace CalamityMod.Items.Armor.DesertProwler public override void UpdateEquip(Player player) { - player.GetCritChance() += 5; + player.GetCritChance() += 5; } public override void AddRecipes() @@ -381,7 +381,7 @@ namespace CalamityMod.Items.Armor.DesertProwler { if (projectile.damage > 0 && !Main.gameMenu) { - if (projectile.owner >= 0 && DesertProwlerHat.ShroudedInSmoke(Main.player[projectile.owner], out var cd) && projectile.DamageType.CountsAsClass(DamageClass.Ranged)) + if (projectile.owner >= 0 && DesertProwlerHat.ShroudedInSmoke(Main.player[projectile.owner], out var cd) && projectile.DamageType.CountsAsClass(RogueDamageClass.Instance)) { int critPool = DesertProwlerHat.FreeCrit; diff --git a/Items/Armor/FathomSwarmer/FathomSwarmerBoots.cs b/Items/Armor/FathomSwarmer/FathomSwarmerBoots.cs index 33257e3b8b..d31a61768d 100644 --- a/Items/Armor/FathomSwarmer/FathomSwarmerBoots.cs +++ b/Items/Armor/FathomSwarmer/FathomSwarmerBoots.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor.FathomSwarmer public override void UpdateEquip(Player player) { player.GetDamage() += 0.08f; - if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) + if (player.Calamity().countsAsAnyWet) { player.moveSpeed += 0.4f; } diff --git a/Items/Armor/FathomSwarmer/FathomSwarmerVisage.cs b/Items/Armor/FathomSwarmer/FathomSwarmerVisage.cs index 5902d4e52b..8a3ae47280 100644 --- a/Items/Armor/FathomSwarmer/FathomSwarmerVisage.cs +++ b/Items/Armor/FathomSwarmer/FathomSwarmerVisage.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Armor.FathomSwarmer player.spikedBoots = 2; player.maxMinions += 2; player.GetDamage() += 0.1f; - if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) + if (modPlayer.countsAsAnyWet) { player.GetDamage() += 0.2f; player.statDefense += 10; @@ -56,7 +56,7 @@ namespace CalamityMod.Items.Armor.FathomSwarmer player.breath = player.breathMax + 3; } modPlayer.fathomSwarmerVisage = true; - if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) + if (player.Calamity().countsAsAnyWet) { Lighting.AddLight((int)player.Center.X / 16, (int)player.Center.Y / 16, 0.3f, 0.9f, 1.35f); } diff --git a/Items/Armor/Fearmonger/FearmongerGreathelm.cs b/Items/Armor/Fearmonger/FearmongerGreathelm.cs index 27838ccc22..d384cb6fb5 100644 --- a/Items/Armor/Fearmonger/FearmongerGreathelm.cs +++ b/Items/Armor/Fearmonger/FearmongerGreathelm.cs @@ -67,7 +67,6 @@ namespace CalamityMod.Items.Armor.Fearmonger ModContent.BuffType(), BuffID.Chilled, BuffID.Frozen, - ModContent.BuffType(), }; for (var i = 0; i < immuneDebuffs.Length; ++i) player.buffImmune[immuneDebuffs[i]] = true; diff --git a/Items/Armor/Reaver/ReaverHeadExplore.cs b/Items/Armor/Reaver/ReaverHeadExplore.cs index 116c8e422e..1e99bdc685 100644 --- a/Items/Armor/Reaver/ReaverHeadExplore.cs +++ b/Items/Armor/Reaver/ReaverHeadExplore.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Armor.Reaver modPlayer.wearingRogueArmor = true; player.findTreasure = true; player.aggro -= 200; - if (player.IsUnderwater()) + if (player.Calamity().countsAsAnyWet) player.gills = true; if (player.whoAmI == Main.myPlayer) diff --git a/Items/Armor/SnowRuffian/SnowRuffianChestplate.cs b/Items/Armor/SnowRuffian/SnowRuffianChestplate.cs index c9cc263a73..67aa4cc310 100644 --- a/Items/Armor/SnowRuffian/SnowRuffianChestplate.cs +++ b/Items/Armor/SnowRuffian/SnowRuffianChestplate.cs @@ -35,18 +35,19 @@ namespace CalamityMod.Items.Armor.SnowRuffian Item.height = 18; Item.value = CalamityGlobalItem.RarityBlueBuyPrice; Item.rare = ItemRarityID.Blue; - Item.defense = 4; //9 + Item.defense = 5; //12 } public override void UpdateEquip(Player player) { - player.GetCritChance() += 3; + player.GetCritChance() += 4; } public override void AddRecipes() { CreateRecipe(). - AddRecipeGroup("AnySnowBlock", 60). + AddIngredient(ItemID.BorealWood, 20). + AddIngredient(ItemID.Silk, 6). AddIngredient(ItemID.FlinxFur, 2). AddTile(TileID.Anvils). Register(); diff --git a/Items/Armor/SnowRuffian/SnowRuffianGreaves.cs b/Items/Armor/SnowRuffian/SnowRuffianGreaves.cs index 5e4137d56e..d400b91e37 100644 --- a/Items/Armor/SnowRuffian/SnowRuffianGreaves.cs +++ b/Items/Armor/SnowRuffian/SnowRuffianGreaves.cs @@ -14,18 +14,19 @@ namespace CalamityMod.Items.Armor.SnowRuffian Item.height = 18; Item.value = CalamityGlobalItem.RarityBlueBuyPrice; Item.rare = ItemRarityID.Blue; - Item.defense = 3; //9 + Item.defense = 4; //12 } public override void UpdateEquip(Player player) { - player.moveSpeed += 0.05f; + player.moveSpeed += 0.1f; } public override void AddRecipes() { CreateRecipe(). - AddRecipeGroup("AnySnowBlock", 40). + AddIngredient(ItemID.BorealWood, 15). + AddIngredient(ItemID.Silk, 5). AddIngredient(ItemID.FlinxFur). AddTile(TileID.Anvils). Register(); diff --git a/Items/Armor/SnowRuffian/SnowRuffianMask.cs b/Items/Armor/SnowRuffian/SnowRuffianMask.cs index c05014c4cb..b3365ce50c 100644 --- a/Items/Armor/SnowRuffian/SnowRuffianMask.cs +++ b/Items/Armor/SnowRuffian/SnowRuffianMask.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Armor.SnowRuffian Item.height = 18; Item.value = CalamityGlobalItem.RarityBlueBuyPrice; Item.rare = ItemRarityID.Blue; - Item.defense = 2; //9 + Item.defense = 3; //12 } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -38,10 +38,9 @@ namespace CalamityMod.Items.Armor.SnowRuffian { var modPlayer = player.Calamity(); modPlayer.snowRuffianSet = true; - modPlayer.rogueStealthMax += 0.5f; + player.GetCritChance() += 4; + player.GetDamage() += 0.04f; player.setBonus = this.GetLocalizedValue("SetBonus"); - player.GetDamage() += 0.05f; - player.Calamity().wearingRogueArmor = true; if (player.controlJump) { @@ -62,13 +61,14 @@ namespace CalamityMod.Items.Armor.SnowRuffian public override void UpdateEquip(Player player) { - player.GetDamage() += 0.02f; + player.GetDamage() += 0.02f; } public override void AddRecipes() { CreateRecipe(). - AddRecipeGroup("AnySnowBlock", 20). + AddIngredient(ItemID.BorealWood, 10). + AddIngredient(ItemID.Silk, 4). AddIngredient(ItemID.FlinxFur). AddTile(TileID.Anvils). SortBeforeFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Armor/Sulphurous/SulphurousHelmet.cs b/Items/Armor/Sulphurous/SulphurousHelmet.cs index 2f3b5b0f9f..5f7dfb45c1 100644 --- a/Items/Armor/Sulphurous/SulphurousHelmet.cs +++ b/Items/Armor/Sulphurous/SulphurousHelmet.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Armor.Sulphurous { player.GetDamage() += 0.04f; player.GetCritChance() += 2; - if (player.IsUnderwater()) + if (player.Calamity().countsAsAnyWet) player.gills = true; } diff --git a/Items/Armor/Sulphurous/SulphurousLeggings.cs b/Items/Armor/Sulphurous/SulphurousLeggings.cs index ada7ef2a1b..ebca7b0c38 100644 --- a/Items/Armor/Sulphurous/SulphurousLeggings.cs +++ b/Items/Armor/Sulphurous/SulphurousLeggings.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor.Sulphurous public override void UpdateEquip(Player player) { - player.moveSpeed += Collision.DrownCollision(player.position, player.width, player.height, player.gravDir) ? 0.35f : 0.1f; + player.moveSpeed += player.Calamity().countsAsAnyWet ? 0.35f : 0.1f; } public override void AddRecipes() diff --git a/Items/Armor/Victide/VictideBreastplate.cs b/Items/Armor/Victide/VictideBreastplate.cs index 43e1c6649b..21d2e2b914 100644 --- a/Items/Armor/Victide/VictideBreastplate.cs +++ b/Items/Armor/Victide/VictideBreastplate.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Armor.Victide { player.endurance += 0.05f; player.GetCritChance() += 5; - if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) + if (player.Calamity().countsAsAnyWet) { player.statDefense += 5; player.endurance += 0.1f; diff --git a/Items/Armor/Victide/VictideGreaves.cs b/Items/Armor/Victide/VictideGreaves.cs index 6e96d6af32..395a2e977b 100644 --- a/Items/Armor/Victide/VictideGreaves.cs +++ b/Items/Armor/Victide/VictideGreaves.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Armor.Victide public override void UpdateEquip(Player player) { - player.moveSpeed += Collision.DrownCollision(player.position, player.width, player.height, player.gravDir) ? 0.3f : 0.08f; + player.moveSpeed += player.Calamity().countsAsAnyWet ? 0.3f : 0.08f; } public override void AddRecipes() diff --git a/Items/Armor/Victide/VictideHeadMagic.cs b/Items/Armor/Victide/VictideHeadMagic.cs index 87d322f52f..cd54798dff 100644 --- a/Items/Armor/Victide/VictideHeadMagic.cs +++ b/Items/Armor/Victide/VictideHeadMagic.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Armor.Victide var modPlayer = player.Calamity(); modPlayer.victideSet = true; player.ignoreWater = true; - if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) + if (player.Calamity().countsAsAnyWet) { player.GetDamage() += 0.1f; player.lifeRegen += 3; diff --git a/Items/Armor/Victide/VictideHeadMelee.cs b/Items/Armor/Victide/VictideHeadMelee.cs index 9c97518add..2ce93d2cfe 100644 --- a/Items/Armor/Victide/VictideHeadMelee.cs +++ b/Items/Armor/Victide/VictideHeadMelee.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Armor.Victide var modPlayer = player.Calamity(); modPlayer.victideSet = true; player.ignoreWater = true; - if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) + if (player.Calamity().countsAsAnyWet) { player.GetDamage() += 0.1f; player.lifeRegen += 3; diff --git a/Items/Armor/Victide/VictideHeadRanged.cs b/Items/Armor/Victide/VictideHeadRanged.cs index 068abd2914..414177b6e0 100644 --- a/Items/Armor/Victide/VictideHeadRanged.cs +++ b/Items/Armor/Victide/VictideHeadRanged.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Armor.Victide var modPlayer = player.Calamity(); modPlayer.victideSet = true; player.ignoreWater = true; - if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) + if (player.Calamity().countsAsAnyWet) { player.GetDamage() += 0.1f; player.lifeRegen += 3; diff --git a/Items/Armor/Victide/VictideHeadRogue.cs b/Items/Armor/Victide/VictideHeadRogue.cs index 1ebfa59ea6..f5a404f1b8 100644 --- a/Items/Armor/Victide/VictideHeadRogue.cs +++ b/Items/Armor/Victide/VictideHeadRogue.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Armor.Victide modPlayer.rogueStealthMax += 0.6f; modPlayer.wearingRogueArmor = true; player.ignoreWater = true; - if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) + if (player.Calamity().countsAsAnyWet) { player.GetDamage() += 0.1f; player.lifeRegen += 3; diff --git a/Items/Armor/Victide/VictideHeadSummon.cs b/Items/Armor/Victide/VictideHeadSummon.cs index 3d2d7683ce..36ed6cc02e 100644 --- a/Items/Armor/Victide/VictideHeadSummon.cs +++ b/Items/Armor/Victide/VictideHeadSummon.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Items.Armor.Victide } } player.ignoreWater = true; - if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) + if (player.Calamity().countsAsAnyWet) { player.GetDamage() += 0.1f; player.lifeRegen += 3; diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 6352984b55..0a726b09d4 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -26,12 +26,14 @@ namespace CalamityMod.Items internal static void LoadTweaks() { - // Various shorthands for items which receive very simple changes, such as setting one flag. + // Various shorthands for items which receive very simple changes, or are repeated multiple times. IItemTweak[] trueMelee = Do(TrueMelee); IItemTweak[] trueMeleeNoSpeed = Do(TrueMeleeNoSpeed); IItemTweak[] pointBlank = Do(PointBlank); IItemTweak[] autoReuse = Do(AutoReuse); IItemTweak[] nonConsumableBossSummon = Do(MaxStack(1), NotConsumable, UseTimeExact(10)); + IItemTweak[] phaseblade = Do(AutoReuse, UseTurn, DamageExact(36)); + IItemTweak[] phasesaber = Do(DamageExact(132)); // SORTING NOTES: // 1. Sort tweaks by categories first, then sort by the internal name in alphabetical order. Navigate through categories and names using the search function. @@ -59,8 +61,8 @@ namespace CalamityMod.Items { ItemID.BlizzardStaff, Do(DamageExact(41), ManaExact(7)) }, { ItemID.BloodyMachete, Do(AutoReuse, DamageExact(24)) }, { ItemID.Blowgun, Do(PointBlank, DamageExact(40), ShootSpeedExact(15f)) }, - { ItemID.BluePhaseblade, Do(AutoReuse, UseTurn, DamageExact(48)) }, - { ItemID.BluePhasesaber, Do(DamageExact(132)) }, + { ItemID.BluePhaseblade, phaseblade }, + { ItemID.BluePhasesaber, phasesaber }, { ItemID.BoneSword, Do(AutoReuse, UseTurn, DamageExact(25)) }, { ItemID.BookofSkulls, Do(DamageExact(27), ManaExact(13), ShootSpeedExact(5.5f)) }, { ItemID.BookStaff, Do(ManaExact(14)) }, // Tome of Infinite Wisdom @@ -100,7 +102,7 @@ namespace CalamityMod.Items { ItemID.DD2SquireDemonSword, Do(DamageExact(110), UseExact(25)) }, // Brand of the Inferno { ItemID.DeathSickle, Do(UseMeleeSpeed, DamageExact(82), ShootSpeedExact(15f)) }, { ItemID.DemonBow, Do(PointBlank, DamageExact(12), AutoReuse) }, - { ItemID.DemonScythe, Do(AutoReuse, DamageExact(33)) }, + { ItemID.DemonScythe, Do(AutoReuse, DamageExact(28)) }, { ItemID.DyeTradersScimitar, Do(AutoReuse, UseTurn, DamageExact(24)) }, // Exotic Scimitar { ItemID.ElectrosphereLauncher, Do(DamageExact(44)) }, { ItemID.ElfMelter, Do(ShootSpeedDelta(+5f)) }, @@ -113,7 +115,7 @@ namespace CalamityMod.Items { ItemID.FairyQueenMagicItem, Do(DamageExact(54)) }, // Nightglow { ItemID.FalconBlade, Do(UseTurn, UseExact(13)) }, { ItemID.FireworksLauncher, Do(DamageExact(50), UseExact(25)) }, // Celebration - { ItemID.Flamarang, Do(DamageExact(40)) }, + { ItemID.Flamarang, Do(DamageExact(37)) }, { ItemID.Flamelash, Do(DamageExact(40)) }, { ItemID.Flamethrower, Do(DamageExact(21), ShootSpeedDelta(+3f)) }, { ItemID.FlowerofFire, Do(AutoReuse, ManaExact(7), UseRatio(0.88f), DamageRatio(0.7f)) }, // Uses ratios due to remix seed @@ -126,8 +128,8 @@ namespace CalamityMod.Items { ItemID.GoldShortsword, Do(AutoReuse, TrueMelee, DamageExact(17)) }, { ItemID.GolemFist, Do(DamageExact(150)) }, { ItemID.Gradient, Do(AutoReuse, DamageExact(39)) }, - { ItemID.GreenPhaseblade, Do(AutoReuse, UseTurn, DamageExact(48)) }, - { ItemID.GreenPhasesaber, Do(DamageExact(132)) }, + { ItemID.GreenPhaseblade, phaseblade }, + { ItemID.GreenPhasesaber, phasesaber }, { ItemID.GrenadeLauncher, Do(DamageExact(112)) }, { ItemID.Gungnir, Do(AutoReuse, TrueMelee, DamageExact(144), ShootSpeedExact(7f)) }, { ItemID.HallowedRepeater, Do(PointBlank, UseExact(12)) }, @@ -166,7 +168,7 @@ namespace CalamityMod.Items { ItemID.MiniNukeI, Do(DamageExact(90)) }, { ItemID.MiniNukeII, Do(DamageExact(90)) }, { ItemID.Minishark, Do(PointBlank, DamageExact(4)) }, - { ItemID.MoltenFury, Do(PointBlank, UseExact(29), AutoReuse) }, + { ItemID.MoltenFury, Do(PointBlank, UseExact(28), AutoReuse) }, { ItemID.MonkStaffT1, Do(TrueMeleeNoSpeed, DamageExact(83)) }, // Sleepy Octopod { ItemID.MonkStaffT2, Do(AutoReuse, TrueMelee, DamageExact(90)) }, // Ghastly Glaive { ItemID.MonkStaffT3, Do(DamageExact(225)) }, // Sky Dragon's Fury @@ -181,8 +183,8 @@ namespace CalamityMod.Items { ItemID.NettleBurst, Do(ManaExact(10), DamageExact(70)) }, { ItemID.NightsEdge, Do(TrueMelee, DamageExact(45)) }, { ItemID.NorthPole, Do(AutoReuse, UseMeleeSpeed) }, - { ItemID.OrangePhaseblade, Do(AutoReuse, UseTurn, DamageExact(48)) }, - { ItemID.OrangePhasesaber, Do(DamageExact(132)) }, + { ItemID.OrangePhaseblade, phaseblade }, + { ItemID.OrangePhasesaber, phasesaber }, { ItemID.OrichalcumHalberd, Do(AutoReuse, TrueMelee, DamageExact(128), ShootSpeedExact(6f)) }, { ItemID.OrichalcumRepeater, Do(PointBlank, DamageExact(48)) }, { ItemID.OrichalcumSword, Do(UseTurn, DamageExact(175)) }, @@ -205,8 +207,8 @@ namespace CalamityMod.Items { ItemID.PrincessWeapon, Do(DamageExact(90)) }, // Resonance Scepter { ItemID.PsychoKnife, Do(UseTurn, UseExact(11), DamageExact(200)) }, { ItemID.PurpleClubberfish, Do(UseTurn, KnockbackExact(10f)) }, - { ItemID.PurplePhaseblade, Do(AutoReuse, UseTurn, DamageExact(48)) }, - { ItemID.PurplePhasesaber, Do(DamageExact(132)) }, + { ItemID.PurplePhaseblade, phaseblade }, + { ItemID.PurplePhasesaber, phasesaber }, { ItemID.PygmyStaff, Do(AutoReuse, UseExact(20), DamageExact(70)) }, { ItemID.QuadBarrelShotgun, Do(PointBlank, DamageExact(11)) }, { ItemID.RainbowGun, Do(DamageExact(60), ManaExact(40)) }, @@ -215,8 +217,8 @@ namespace CalamityMod.Items { ItemID.RavenStaff, Do(AutoReuse, UseExact(20), DamageExact(36)) }, { ItemID.RazorbladeTyphoon, Do(DamageExact(103)) }, { ItemID.Razorpine, Do(DamageExact(40)) }, - { ItemID.RedPhaseblade, Do(AutoReuse, UseTurn, DamageExact(48)) }, - { ItemID.RedPhasesaber, Do(DamageExact(132)) }, + { ItemID.RedPhaseblade, phaseblade }, + { ItemID.RedPhasesaber, phasesaber }, { ItemID.RedRyder, Do(PointBlank, DamageExact(24)) }, { ItemID.RedsYoyo, Do(AutoReuse, DamageExact(48)) }, // Red's Throw and Valkyrie Yoyo have the same stats { ItemID.RocketLauncher, Do(DamageExact(70)) }, @@ -238,12 +240,12 @@ namespace CalamityMod.Items { ItemID.SniperRifle, Do(PointBlank, DamageExact(215)) }, { ItemID.SolarEruption, Do(DamageExact(122)) }, { ItemID.SoulDrain, Do(DamageExact(38)) }, // Life Drain - { ItemID.SpaceGun, Do(DamageExact(25)) }, + { ItemID.SpaceGun, Do(DamageExact(23)) }, { ItemID.Spear, Do(AutoReuse, TrueMelee, DamageExact(14)) }, { ItemID.SpectreStaff, Do(DamageExact(78)) }, { ItemID.SpiritFlame, Do(UseExact(20), ManaExact(11), ShootSpeedExact(2f)) }, { ItemID.StaffofEarth, Do(DamageExact(150)) }, - { ItemID.StarCannon, Do(DamageExact(25)) }, + { ItemID.StarCannon, Do(DamageExact(25), UseExact(15)) }, { ItemID.StardustDragonStaff, Do(AutoReuse, DamageExact(20), UseExact(19)) }, { ItemID.StormTigerStaff, Do(AutoReuse, DamageExact(49), UseExact(20)) }, // Desert Tiger Staff { ItemID.StylistKilLaKillScissorsIWish, Do(AutoReuse, UseTurn, DamageExact(21)) }, // Stylish Scissors @@ -284,12 +286,12 @@ namespace CalamityMod.Items { ItemID.VenusMagnum, Do(PointBlank, DamageExact(65)) }, { ItemID.WaspGun, Do(UseExact(11), DamageExact(58)) }, { ItemID.WaterBolt, Do(DamageExact(23)) }, - { ItemID.WhitePhaseblade, Do(AutoReuse, UseTurn, DamageExact(48)) }, - { ItemID.WhitePhasesaber, Do(DamageExact(132)) }, + { ItemID.WhitePhaseblade, phaseblade }, + { ItemID.WhitePhasesaber, phasesaber }, { ItemID.WoodenBoomerang, Do(DamageExact(16), Value(Item.sellPrice(copper: 20))) }, { ItemID.Yelets, Do(AutoReuse, DamageExact(53)) }, - { ItemID.YellowPhaseblade, Do(AutoReuse, UseTurn, DamageExact(48)) }, - { ItemID.YellowPhasesaber, Do(DamageExact(132)) }, + { ItemID.YellowPhaseblade, phaseblade }, + { ItemID.YellowPhasesaber, phasesaber }, { ItemID.Zenith, Do(DamageExact(210)) }, { ItemID.ZombieArm, Do(AutoReuse, UseTurn, KnockbackExact(12f)) }, #endregion @@ -333,106 +335,99 @@ namespace CalamityMod.Items #region CATEGORY 3: Tool Balancing { ItemID.AcornAxe, Do(AxePower(100)) }, // Axe of Regrowth - { ItemID.AdamantiteChainsaw, Do(TrueMeleeNoSpeed, AxePower(90), UseTimeExact(4), TileBoostExact(+0), DamageExact(75)) }, - { ItemID.AdamantiteDrill, Do(TrueMeleeNoSpeed, PickPower(180), UseTimeExact(4), TileBoostExact(+1), DamageExact(32)) }, - { ItemID.AdamantitePickaxe, Do(PickPower(180), UseTimeExact(8), TileBoostExact(+1)) }, + { ItemID.AdamantiteChainsaw, Do(TrueMeleeNoSpeed, AxePower(90), TileBoostExact(+0), DamageExact(75)) }, + { ItemID.AdamantiteDrill, Do(TrueMeleeNoSpeed, TileBoostExact(+1), DamageExact(32)) }, + { ItemID.AdamantitePickaxe, Do(TileBoostExact(+1)) }, { ItemID.AdamantiteWaraxe, Do(AxePower(160), UseTimeExact(10), TileBoostExact(+1)) }, - { ItemID.BloodLustCluster, Do(AxePower(100), UseTimeExact(13), TileBoostExact(+0)) }, - { ItemID.BonePickaxe, Do(PickPower(55), UseTimeExact(6)) }, - { ItemID.BorealWoodHammer, Do(HammerPower(25), UseTimeExact(11), TileBoostExact(+0)) }, - { ItemID.ButchersChainsaw, Do(TrueMeleeNoSpeed, AxePower(150), UseTimeExact(3), TileBoostExact(+0)) }, + { ItemID.BloodLustCluster, Do(AxePower(100), UseTimeExact(13)) }, + { ItemID.BonePickaxe, Do(UseTimeExact(6)) }, + { ItemID.BorealWoodHammer, Do(HammerPower(25), UseTimeExact(11)) }, + { ItemID.ButchersChainsaw, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+0)) }, { ItemID.CactusPickaxe, Do(PickPower(34), UseTimeExact(9)) }, - { ItemID.CnadyCanePickaxe, Do(PickPower(55), UseTimeExact(9), TileBoostExact(+1)) }, // Candy Cane Pickaxe - { ItemID.ChlorophyteChainsaw, Do(TrueMeleeNoSpeed, AxePower(120), UseTimeExact(3), TileBoostExact(+0), DamageExact(112)) }, - { ItemID.ChlorophyteDrill, Do(TrueMeleeNoSpeed, PickPower(200), UseTimeExact(4), TileBoostExact(+2), DamageExact(43)) }, - { ItemID.ChlorophyteGreataxe, Do(AxePower(165), UseTimeExact(7), TileBoostExact(+2)) }, - { ItemID.ChlorophyteJackhammer, Do(TrueMeleeNoSpeed, HammerPower(90), UseTimeExact(5), TileBoostExact(+0)) }, - { ItemID.ChlorophytePickaxe, Do(PickPower(200), UseTimeExact(7), TileBoostExact(+2)) }, - { ItemID.ChlorophyteWarhammer, Do(HammerPower(90), UseTimeExact(8), TileBoostExact(+2)) }, - { ItemID.CobaltChainsaw, Do(TrueMeleeNoSpeed, AxePower(70), UseTimeExact(4), TileBoostExact(-1), DamageExact(51)) }, + { ItemID.CnadyCanePickaxe, Do(UseTimeExact(9), TileBoostExact(+1)) }, // Candy Cane Pickaxe + { ItemID.ChlorophyteChainsaw, Do(TrueMeleeNoSpeed, AxePower(120), UseTimeExact(3), DamageExact(112)) }, + { ItemID.ChlorophyteDrill, Do(TrueMeleeNoSpeed, TileBoostExact(+2), DamageExact(43)) }, + { ItemID.ChlorophyteGreataxe, Do(AxePower(165), TileBoostExact(+2)) }, + { ItemID.ChlorophyteJackhammer, Do(TrueMeleeNoSpeed, UseTimeExact(5)) }, + { ItemID.ChlorophytePickaxe, Do(TileBoostExact(+2)) }, + { ItemID.ChlorophyteWarhammer, Do(UseTimeExact(8), TileBoostExact(+2)) }, + { ItemID.CobaltChainsaw, Do(TrueMeleeNoSpeed, UseTimeExact(4), DamageExact(51)) }, { ItemID.CobaltDrill, Do(TrueMeleeNoSpeed, PickPower(130), UseTimeExact(5), DamageExact(21)) }, { ItemID.CobaltPickaxe, Do(PickPower(130), UseTimeExact(9)) }, - { ItemID.CobaltWaraxe, Do(AxePower(125), UseTimeExact(12), TileBoostExact(+0)) }, + { ItemID.CobaltWaraxe, Do(AxePower(125), UseTimeExact(12)) }, { ItemID.CopperAxe, Do(AxePower(50), UseTimeExact(16), TileBoostExact(+0)) }, - { ItemID.CopperHammer, Do(HammerPower(35), UseTimeExact(12), TileBoostExact(+0)) }, - { ItemID.CopperPickaxe, Do(PickPower(35), UseTimeExact(10), TileBoostExact(+0)) }, - { ItemID.DeathbringerPickaxe, Do(PickPower(70), UseTimeExact(10)) }, - { ItemID.Drax, Do(TrueMeleeNoSpeed, PickPower(200), AxePower(110), UseTimeExact(4), TileBoostExact(+1), DamageExact(80)) }, - { ItemID.EbonwoodHammer, Do(HammerPower(25), UseTimeExact(9), TileBoostExact(+0)) }, - { ItemID.FleshGrinder, Do(HammerPower(70), UseTimeExact(13), TileBoostExact(+0)) }, - { ItemID.GoldAxe, Do(AxePower(80), UseTimeExact(14), TileBoostExact(+0)) }, - { ItemID.GoldHammer, Do(HammerPower(60), UseTimeExact(9), TileBoostExact(+0)) }, - { ItemID.GoldPickaxe, Do(PickPower(55), UseTimeExact(9)) }, - { ItemID.Hammush, Do(HammerPower(85), UseTimeExact(10), TileBoostExact(+1)) }, - { ItemID.IronAxe, Do(AxePower(60), UseTimeExact(15), TileBoostExact(+0)) }, - { ItemID.IronHammer, Do(HammerPower(45), UseTimeExact(11), TileBoostExact(+0)) }, - { ItemID.IronPickaxe, Do(PickPower(40), UseTimeExact(8)) }, + { ItemID.CopperHammer, Do(UseTimeExact(12), TileBoostExact(+0)) }, + { ItemID.CopperPickaxe, Do(UseTimeExact(10), TileBoostExact(+0)) }, + { ItemID.DeathbringerPickaxe, Do(UseTimeExact(10)) }, + { ItemID.Drax, Do(TrueMeleeNoSpeed, TileBoostExact(+1), DamageExact(80)) }, + { ItemID.EbonwoodHammer, Do(HammerPower(25), UseTimeExact(9)) }, + { ItemID.FleshGrinder, Do(HammerPower(70), UseTimeExact(13)) }, + { ItemID.GoldAxe, Do(AxePower(80), UseTimeExact(14)) }, + { ItemID.GoldHammer, Do(HammerPower(60), UseTimeExact(9)) }, + { ItemID.GoldPickaxe, Do(UseTimeExact(9)) }, + { ItemID.Hammush, Do(UseTimeExact(10), TileBoostExact(+1)) }, + { ItemID.IronAxe, Do(AxePower(60), UseTimeExact(15)) }, + { ItemID.IronHammer, Do(HammerPower(45), UseTimeExact(11)) }, + { ItemID.IronPickaxe, Do(UseTimeExact(8)) }, { ItemID.LaserDrill, Do(PickPower(220), AxePower(120), UseTimeExact(4), DamageExact(54)) }, - { ItemID.LeadAxe, Do(AxePower(60), UseTimeExact(15), TileBoostExact(+0)) }, - { ItemID.LeadHammer, Do(HammerPower(45), UseTimeExact(11), TileBoostExact(+0)) }, + { ItemID.LeadAxe, Do(AxePower(60), UseTimeExact(15)) }, + { ItemID.LeadHammer, Do(HammerPower(45), UseTimeExact(11)) }, { ItemID.LeadPickaxe, Do(PickPower(40), UseTimeExact(8)) }, - { ItemID.LucyTheAxe, Do(AxePower(150), UseExact(13), TileBoostExact(+1)) }, - { ItemID.LunarHamaxeNebula, Do(HammerPower(100), AxePower(175), UseTimeExact(5), TileBoostExact(+4)) }, - { ItemID.LunarHamaxeSolar, Do(HammerPower(100), AxePower(175), UseTimeExact(5), TileBoostExact(+4)) }, - { ItemID.LunarHamaxeStardust, Do(HammerPower(100), AxePower(175), UseTimeExact(5), TileBoostExact(+4)) }, - { ItemID.LunarHamaxeVortex, Do(HammerPower(100), AxePower(175), UseTimeExact(5), TileBoostExact(+4)) }, - { ItemID.MeteorHamaxe, Do(HammerPower(70), AxePower(100), UseTimeExact(16), TileBoostExact(+0)) }, - { ItemID.MoltenHamaxe, Do(HammerPower(75), AxePower(125), UseTimeExact(14), TileBoostExact(+0)) }, - { ItemID.MoltenPickaxe, Do(PickPower(100), UseTimeExact(10)) }, - { ItemID.MythrilChainsaw, Do(TrueMeleeNoSpeed, AxePower(80), UseTimeExact(4), TileBoostExact(-1), DamageExact(63)) }, + { ItemID.LucyTheAxe, Do(UseExact(13), TileBoostExact(+1)) }, + { ItemID.LunarHamaxeNebula, Do(AxePower(175), UseTimeExact(5)) }, + { ItemID.LunarHamaxeSolar, Do(AxePower(175), UseTimeExact(5)) }, + { ItemID.LunarHamaxeStardust, Do(AxePower(175), UseTimeExact(5)) }, + { ItemID.LunarHamaxeVortex, Do(AxePower(175), UseTimeExact(5)) }, + { ItemID.MeteorHamaxe, Do(HammerPower(70)) }, + { ItemID.MoltenHamaxe, Do(HammerPower(75), AxePower(125)) }, + { ItemID.MoltenPickaxe, Do(UseTimeExact(10)) }, + { ItemID.MythrilChainsaw, Do(TrueMeleeNoSpeed, AxePower(80), UseTimeExact(4), DamageExact(63)) }, { ItemID.MythrilDrill, Do(TrueMeleeNoSpeed, PickPower(160), UseTimeExact(4), DamageExact(26)) }, { ItemID.MythrilPickaxe, Do(PickPower(160), UseTimeExact(8)) }, - { ItemID.MythrilWaraxe, Do(AxePower(140), UseTimeExact(11), TileBoostExact(+0)) }, - { ItemID.NebulaDrill, Do(TrueMeleeNoSpeed, PickPower(225), UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) }, - { ItemID.NebulaPickaxe, Do(PickPower(225), UseTimeExact(6), TileBoostExact(+4)) }, + { ItemID.MythrilWaraxe, Do(AxePower(140), UseTimeExact(11)) }, + { ItemID.NebulaDrill, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) }, { ItemID.NightmarePickaxe, Do(PickPower(66), UseTimeExact(9)) }, - { ItemID.OrichalcumChainsaw, Do(TrueMeleeNoSpeed, AxePower(80), UseTimeExact(4), TileBoostExact(-1), DamageExact(63)) }, + { ItemID.OrichalcumChainsaw, Do(TrueMeleeNoSpeed, AxePower(80), UseTimeExact(4), DamageExact(63)) }, { ItemID.OrichalcumDrill, Do(TrueMeleeNoSpeed, PickPower(160), UseTimeExact(4), DamageExact(26)) }, { ItemID.OrichalcumPickaxe, Do(PickPower(160), UseTimeExact(8)) }, - { ItemID.OrichalcumWaraxe, Do(AxePower(140), UseTimeExact(11), TileBoostExact(+0)) }, - { ItemID.PalladiumChainsaw, Do(TrueMeleeNoSpeed, AxePower(70), UseTimeExact(4), TileBoostExact(-1), DamageExact(51)) }, - { ItemID.PalladiumDrill, Do(TrueMeleeNoSpeed, PickPower(130), UseTimeExact(5), DamageExact(21)) }, - { ItemID.PalladiumPickaxe, Do(PickPower(130), UseTimeExact(9)) }, - { ItemID.PalladiumWaraxe, Do(AxePower(125), UseTimeExact(12), TileBoostExact(+0)) }, - { ItemID.PalmWoodHammer, Do(HammerPower(25), UseTimeExact(11), TileBoostExact(+0)) }, - { ItemID.PearlwoodHammer, Do(HammerPower(25), UseTimeExact(4), UseAnimationExact(20), DamageExact(36), TileBoostExact(+0)) }, - { ItemID.PickaxeAxe, Do(PickPower(200), AxePower(110), UseTimeExact(7), TileBoostExact(+1)) }, - { ItemID.Picksaw, Do(PickPower(210), AxePower(125), UseTimeExact(6), TileBoostExact(+1)) }, - { ItemID.PlatinumAxe, Do(AxePower(80), UseTimeExact(14), TileBoostExact(+0)) }, - { ItemID.PlatinumHammer, Do(HammerPower(60), UseTimeExact(9), TileBoostExact(+0)) }, + { ItemID.OrichalcumWaraxe, Do(AxePower(140), UseTimeExact(11)) }, + { ItemID.PalladiumChainsaw, Do(TrueMeleeNoSpeed, AxePower(70), UseTimeExact(4), DamageExact(51)) }, + { ItemID.PalladiumDrill, Do(TrueMeleeNoSpeed, UseTimeExact(5), DamageExact(21)) }, + { ItemID.PalladiumPickaxe, Do(UseTimeExact(9)) }, + { ItemID.PalladiumWaraxe, Do(AxePower(125)) }, + { ItemID.PalmWoodHammer, Do(HammerPower(25), UseTimeExact(11)) }, + { ItemID.PearlwoodHammer, Do(HammerPower(25), UseTimeExact(4), UseAnimationExact(20), DamageExact(36)) }, + { ItemID.PickaxeAxe, Do(TileBoostExact(+1)) }, + { ItemID.PlatinumAxe, Do(AxePower(80), UseTimeExact(14)) }, + { ItemID.PlatinumHammer, Do(HammerPower(60), UseTimeExact(9)) }, { ItemID.PlatinumPickaxe, Do(PickPower(55), UseTimeExact(9)) }, - { ItemID.Pwnhammer, Do(HammerPower(80), UseTimeExact(11), TileBoostExact(+1)) }, + { ItemID.Pwnhammer, Do(UseTimeExact(11), TileBoostExact(+1)) }, { ItemID.ReaverShark, Do(PickPower(65), UseTimeExact(16)) }, - { ItemID.RichMahoganyHammer, Do(HammerPower(25), UseTimeExact(10), TileBoostExact(+0)) }, - { ItemID.Rockfish, Do(HammerPower(50), UseTimeExact(10), TileBoostExact(+0)) }, - { ItemID.SawtoothShark, Do(TrueMeleeNoSpeed, AxePower(45), UseTimeExact(4), TileBoostExact(-1)) }, - { ItemID.ShadewoodHammer, Do(HammerPower(25), UseTimeExact(9), TileBoostExact(+0)) }, - { ItemID.ShroomiteDiggingClaw, Do(PickPower(200), AxePower(125), UseTimeExact(4), TileBoostExact(-1)) }, - { ItemID.SilverAxe, Do(AxePower(70), UseTimeExact(14), TileBoostExact(+0)) }, - { ItemID.SilverHammer, Do(HammerPower(55), UseTimeExact(10), TileBoostExact(+0)) }, - { ItemID.SilverPickaxe, Do(PickPower(50), UseTimeExact(11)) }, - { ItemID.SolarFlareDrill, Do(TrueMeleeNoSpeed, PickPower(225), UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) }, - { ItemID.SolarFlarePickaxe, Do(PickPower(225), UseTimeExact(6), TileBoostExact(+4)) }, - { ItemID.SpectreHamaxe, Do(HammerPower(90), AxePower(170), TileBoostExact(+4)) }, - { ItemID.SpectrePickaxe, Do(PickPower(200), TileBoostExact(+4)) }, - { ItemID.StardustDrill, Do(TrueMeleeNoSpeed, PickPower(225), UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) }, - { ItemID.StardustPickaxe, Do(PickPower(225), UseTimeExact(6), TileBoostExact(+4)) }, - { ItemID.TheAxe, Do(HammerPower(100), AxePower(175), UseTimeExact(7), TileBoostExact(+1)) }, - { ItemID.TheBreaker, Do(HammerPower(70), UseTimeExact(13), TileBoostExact(+0)) }, - { ItemID.TinAxe, Do(AxePower(50), UseTimeExact(16), TileBoostExact(+0)) }, - { ItemID.TinHammer, Do(HammerPower(35), UseTimeExact(12), TileBoostExact(+0)) }, - { ItemID.TinPickaxe, Do(PickPower(35), UseTimeExact(10), TileBoostExact(+0)) }, - { ItemID.TitaniumChainsaw, Do(TrueMeleeNoSpeed, AxePower(90), UseTimeExact(4), TileBoostExact(+0), DamageExact(75)) }, - { ItemID.TitaniumDrill, Do(TrueMeleeNoSpeed, PickPower(180), UseTimeExact(4), TileBoostExact(+1), DamageExact(32)) }, + { ItemID.RichMahoganyHammer, Do(HammerPower(25), UseTimeExact(10)) }, + { ItemID.Rockfish, Do(HammerPower(50), UseTimeExact(10)) }, + { ItemID.SawtoothShark, Do(TrueMeleeNoSpeed, AxePower(45)) }, + { ItemID.ShadewoodHammer, Do(HammerPower(25), UseTimeExact(9)) }, + { ItemID.SilverAxe, Do(AxePower(70), UseTimeExact(14)) }, + { ItemID.SilverHammer, Do(HammerPower(55), UseTimeExact(10)) }, + { ItemID.SilverPickaxe, Do(PickPower(50)) }, + { ItemID.SolarFlareDrill, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) }, + { ItemID.SpectreHamaxe, Do(AxePower(170), TileBoostExact(+4)) }, + { ItemID.SpectrePickaxe, Do(TileBoostExact(+4)) }, + { ItemID.StardustDrill, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) }, + { ItemID.TheBreaker, Do(HammerPower(70), UseTimeExact(13)) }, + { ItemID.TinAxe, Do(AxePower(50), UseTimeExact(16)) }, + { ItemID.TinHammer, Do(HammerPower(35), UseTimeExact(12)) }, + { ItemID.TinPickaxe, Do(UseTimeExact(10)) }, + { ItemID.TitaniumChainsaw, Do(TrueMeleeNoSpeed, AxePower(90), TileBoostExact(+0), DamageExact(75)) }, + { ItemID.TitaniumDrill, Do(TrueMeleeNoSpeed, PickPower(180), TileBoostExact(+1), DamageExact(32)) }, { ItemID.TitaniumPickaxe, Do(PickPower(180), UseTimeExact(8), TileBoostExact(+1)) }, { ItemID.TitaniumWaraxe, Do(AxePower(160), UseTimeExact(10), TileBoostExact(+1)) }, - { ItemID.TungstenAxe, Do(AxePower(70), UseTimeExact(14), TileBoostExact(+0)) }, - { ItemID.TungstenHammer, Do(HammerPower(55), UseTimeExact(10), TileBoostExact(+0)) }, - { ItemID.TungstenPickaxe, Do(PickPower(50), UseTimeExact(11)) }, - { ItemID.VortexDrill, Do(TrueMeleeNoSpeed, PickPower(225), UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) }, - { ItemID.VortexPickaxe, Do(PickPower(225), UseTimeExact(6), TileBoostExact(+4)) }, - { ItemID.WarAxeoftheNight, Do(AxePower(100), UseTimeExact(13), TileBoostExact(+0)) }, - { ItemID.WoodenHammer, Do(HammerPower(25), UseTimeExact(11), TileBoostExact(+0)) }, + { ItemID.TungstenAxe, Do(AxePower(70), UseTimeExact(14)) }, + { ItemID.TungstenHammer, Do(HammerPower(55), UseTimeExact(10)) }, + { ItemID.TungstenPickaxe, Do(UseTimeExact(11)) }, + { ItemID.VortexDrill, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) }, + { ItemID.WarAxeoftheNight, Do(AxePower(100), UseTimeExact(13)) }, + { ItemID.WoodenHammer, Do(UseTimeExact(11), TileBoostExact(+0)) }, #endregion #region CATEGORY 4: True Melee support diff --git a/Items/DisgustingMeat.cs b/Items/DisgustingMeat.cs index e383ac2bbe..9a635b1bec 100644 --- a/Items/DisgustingMeat.cs +++ b/Items/DisgustingMeat.cs @@ -22,26 +22,61 @@ namespace CalamityMod.Items public override bool AltFunctionUse(Player player) => true; public override bool? UseItem(Player player) { - var calPlayer = player.Calamity(); - if (player.altFunctionUse == 2) + if (player.ItemTimeIsZero) { - TryDropBoosterItem(player, ref calPlayer.rageBoostOne, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.rageBoostTwo, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.rageBoostThree, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.adrenalineBoostOne, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.adrenalineBoostTwo, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.adrenalineBoostThree, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.nimbleBounderBoost, ModContent.ItemType()); - } - else - { - TryDropBoosterItem(player, ref calPlayer.sTangerine, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.mFruit, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.tCloudberry, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.sStrawberry, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.cShard, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.eCore, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.pHeart, ModContent.ItemType()); + var calPlayer = player.Calamity(); + if (player.altFunctionUse == 2) + { + TryDropBoosterItem(player, ref calPlayer.rageBoostOne, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.rageBoostTwo, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.rageBoostThree, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.adrenalineBoostOne, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.adrenalineBoostTwo, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.adrenalineBoostThree, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.nimbleBounderBoost, ModContent.ItemType()); + } + else + { + if (calPlayer.sTangerine || calPlayer.mFruit || calPlayer.tCloudberry || calPlayer.sStrawberry) + { + TryDropBoosterItem(player, ref calPlayer.sTangerine, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.mFruit, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.tCloudberry, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.sStrawberry, ModContent.ItemType()); + } + else + { + for (int i = 0; i < player.ConsumedLifeFruit; i++) + { + int drop = Item.NewItem(player.GetSource_DropAsItem(), player.Hitbox, ItemID.LifeFruit); + Main.item[drop].noGrabDelay = 100; + } + player.ConsumedLifeFruit = 0; + for (int j = 0; j < player.ConsumedLifeCrystals; j++) + { + int drop = Item.NewItem(player.GetSource_DropAsItem(), player.Hitbox, ItemID.LifeCrystal); + Main.item[drop].noGrabDelay = 100; + } + player.ConsumedLifeCrystals = 0; + } + + if (calPlayer.cShard || calPlayer.eCore || calPlayer.pHeart) + { + TryDropBoosterItem(player, ref calPlayer.cShard, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.eCore, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.pHeart, ModContent.ItemType()); + } + else + { + for (int k = 0; k < player.ConsumedManaCrystals; k++) + { + int drop = Item.NewItem(player.GetSource_DropAsItem(), player.Hitbox, ItemID.ManaCrystal); + Main.item[drop].noGrabDelay = 100; + } + player.ConsumedManaCrystals = 0; + } + } + return true; } return null; diff --git a/Items/DraedonMisc/EncryptedSchematicJungle.cs b/Items/DraedonMisc/EncryptedSchematicJungle.cs index 21ea505af7..0f3fb5688e 100644 --- a/Items/DraedonMisc/EncryptedSchematicJungle.cs +++ b/Items/DraedonMisc/EncryptedSchematicJungle.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Items.DraedonMisc rangedDisplay.OverrideColor = new Color(236, 255, 31); list.Insert(insertIndex + 2, rangedDisplay); - int mageItem = ModContent.ItemType(); + int mageItem = ModContent.ItemType(); TooltipLine mageDisplay = new TooltipLine(this.Mod, "CalamityMod:MageDisplay", $"[i:{mageItem}] {CalamityUtils.GetItemName(mageItem)}"); mageDisplay.OverrideColor = new Color(255, 64, 31); list.Insert(insertIndex + 3, mageDisplay); diff --git a/Items/Mounts/OnyxExcavator.cs b/Items/Mounts/OnyxExcavator.cs index 402c49a00d..41bb443dd8 100644 --- a/Items/Mounts/OnyxExcavator.cs +++ b/Items/Mounts/OnyxExcavator.cs @@ -21,9 +21,9 @@ namespace CalamityMod.Items.Mounts MountData.buff = ModContent.BuffType(); // Horizontal movement - MountData.runSpeed = 5.5f; + MountData.runSpeed = 4.5f; MountData.swimSpeed = 0.5f; - MountData.acceleration = 0.2f; + MountData.acceleration = 0.1f; // Vertical movement MountData.fallDamage = 0f; diff --git a/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs b/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs index 3d465cc42d..16434f3339 100644 --- a/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs +++ b/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs @@ -52,7 +52,6 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings public static IList devList = new List() { "Altix", - "Angel", "apotofkoolaid", "AquaSG", "Atalya", @@ -90,6 +89,7 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings "Shayy", "Spider Prov", "StipulateVenus", + "Sunny", "Tobias", "Tomat", "Triangle", diff --git a/Items/VanillaArmorChanges/EskimoArmorSetChange.cs b/Items/VanillaArmorChanges/EskimoArmorSetChange.cs index 94f7ed96f4..57fb279073 100644 --- a/Items/VanillaArmorChanges/EskimoArmorSetChange.cs +++ b/Items/VanillaArmorChanges/EskimoArmorSetChange.cs @@ -32,7 +32,6 @@ namespace CalamityMod.Items.VanillaArmorChanges player.Calamity().eskimoSet = true; player.buffImmune[BuffID.Frostburn] = true; - player.buffImmune[ModContent.BuffType()] = true; } } } diff --git a/Items/Weapons/DraedonsArsenal/CountermeasureMitt.cs b/Items/Weapons/DraedonsArsenal/CountermeasureMitt.cs new file mode 100644 index 0000000000..f364289272 --- /dev/null +++ b/Items/Weapons/DraedonsArsenal/CountermeasureMitt.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using CalamityMod.CustomRecipes; +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.DraedonsArsenal; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.DraedonsArsenal +{ + [LegacyName("GatlingLaser")] + public class CountermeasureMitt : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal"; + public override void SetDefaults() + { + CalamityGlobalItem modItem = Item.Calamity(); + + Item.width = 54; + Item.height = 56; + Item.DamageType = DamageClass.Magic; + Item.mana = 3; + Item.damage = 45; + Item.knockBack = 4f; + Item.useAnimation = Item.useTime = 11; + Item.autoReuse = true; + + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.channel = true; + Item.noUseGraphic = true; + + Item.value = CalamityGlobalItem.RarityYellowBuyPrice; + Item.rare = ItemRarityID.Yellow; + + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 24f; + } + public override void ModifyTooltips(List tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 3); + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; + public override bool AltFunctionUse(Player player) => true; + public override void HoldItem(Player player) + { + if (Main.myPlayer == player.whoAmI) + player.Calamity().rightClickListener = true; + player.Calamity().mouseWorldListener = true; + } + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/DraedonsArsenal/CountermeasureMittGlow").Value); + } + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + float gunType = 0; + if (player.Calamity().mouseRight && player.whoAmI == Main.myPlayer && !Main.mapFullscreen && !Main.blockMouse && player.Calamity().arsenalCooldown <= 0) + gunType = 5; + Projectile holdout = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, type, damage, knockback, player.whoAmI, 0, 0, gunType); + + holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero); + return false; + } + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(15). + AddIngredient(15). + AddIngredient(5). + AddIngredient(10). + AddCondition(ArsenalTierGatedRecipe.ConstructRecipeCondition(3, out Func condition), condition). + AddTile(TileID.MythrilAnvil). + Register(); + } + } +} diff --git a/Items/Weapons/DraedonsArsenal/CountermeasureMitt.png b/Items/Weapons/DraedonsArsenal/CountermeasureMitt.png new file mode 100644 index 0000000000..ea23481c15 Binary files /dev/null and b/Items/Weapons/DraedonsArsenal/CountermeasureMitt.png differ diff --git a/Items/Weapons/DraedonsArsenal/CountermeasureMittGlow.png b/Items/Weapons/DraedonsArsenal/CountermeasureMittGlow.png new file mode 100644 index 0000000000..3c119c3088 Binary files /dev/null and b/Items/Weapons/DraedonsArsenal/CountermeasureMittGlow.png differ diff --git a/Items/Weapons/DraedonsArsenal/GatlingLaser.cs b/Items/Weapons/DraedonsArsenal/GatlingLaser.cs deleted file mode 100644 index 17fb58acf7..0000000000 --- a/Items/Weapons/DraedonsArsenal/GatlingLaser.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections.Generic; -using CalamityMod.CustomRecipes; -using CalamityMod.Items.Materials; -using CalamityMod.Projectiles.DraedonsArsenal; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Items.Weapons.DraedonsArsenal -{ - public class GatlingLaser : ModItem, ILocalizedModType - { - public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal"; - public static readonly SoundStyle FireSound = new("CalamityMod/Sounds/Item/GatlingLaserFireStart"); - public static readonly SoundStyle FireLoopSound = new("CalamityMod/Sounds/Item/GatlingLaserFireLoop"); - public static readonly SoundStyle FireEndSound = new("CalamityMod/Sounds/Item/GatlingLaserFireEnd"); - - - // This is the amount of charge consumed every time the holdout projectile fires a laser. - public const float HoldoutChargeUse = 0.0075f; - - public override void SetDefaults() - { - CalamityGlobalItem modItem = Item.Calamity(); - - Item.width = 43; - Item.height = 24; - Item.DamageType = DamageClass.Magic; - Item.damage = 43; - Item.knockBack = 1f; - Item.useTime = 2; - Item.useAnimation = 2; - Item.noUseGraphic = true; - Item.autoReuse = false; - Item.channel = true; - Item.mana = 4; - - Item.useStyle = ItemUseStyleID.Shoot; - Item.UseSound = FireSound; - Item.noMelee = true; - - Item.value = CalamityGlobalItem.RarityYellowBuyPrice; - Item.rare = ItemRarityID.Yellow; - - Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 24f; - - modItem.UsesCharge = true; - modItem.MaxCharge = 135f; - modItem.ChargePerUse = 0f; // This weapon is a holdout. Charge is consumed by the holdout projectile. - } - - public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; - - public override void ModifyTooltips(List tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 3); - - public override Vector2? HoldoutOffset() => new Vector2(-20, 0); - - public override void AddRecipes() - { - CreateRecipe(). - AddIngredient(15). - AddIngredient(15). - AddIngredient(5). - AddIngredient(10). - AddCondition(ArsenalTierGatedRecipe.ConstructRecipeCondition(3, out Func condition), condition). - AddTile(TileID.MythrilAnvil). - Register(); - } - } -} diff --git a/Items/Weapons/Magic/HellwingStaff.cs b/Items/Weapons/Magic/HellwingStaff.cs index 11717fe7c5..964464d8d0 100644 --- a/Items/Weapons/Magic/HellwingStaff.cs +++ b/Items/Weapons/Magic/HellwingStaff.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 70; Item.height = 60; - Item.damage = 22; + Item.damage = 21; Item.DamageType = DamageClass.Magic; Item.mana = 18; Item.useTime = 30; @@ -39,48 +39,18 @@ namespace CalamityMod.Items.Weapons.Magic public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float projSpeed = velocity.Length(); - Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true); - float mouseXDist = (float)Main.mouseX + Main.screenPosition.X + realPlayerPos.X; - float mouseYDist = (float)Main.mouseY + Main.screenPosition.Y + realPlayerPos.Y; - if (player.gravDir == -1f) - { - mouseYDist = Main.screenPosition.Y + (float)Main.screenHeight + (float)Main.mouseY + realPlayerPos.Y; - } - float mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); - if ((float.IsNaN(mouseXDist) && float.IsNaN(mouseYDist)) || (mouseXDist == 0f && mouseYDist == 0f)) - { - mouseXDist = (float)player.direction; - mouseYDist = 0f; - mouseDistance = projSpeed; - } - else - { - mouseDistance = projSpeed / mouseDistance; - } - for (int i = 0; i < 4; i++) { - realPlayerPos = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y); - realPlayerPos.X = (realPlayerPos.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - realPlayerPos.Y -= (float)(100 * i); - mouseXDist = (float)Main.mouseX + Main.screenPosition.X - realPlayerPos.X; - mouseYDist = (float)Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y; - if (mouseYDist < 0f) - { - mouseYDist *= -1f; - } - if (mouseYDist < 20f) - { - mouseYDist = 20f; - } - mouseDistance = (float)Math.Sqrt((double)(mouseXDist * mouseXDist + mouseYDist * mouseYDist)); - mouseDistance = projSpeed / mouseDistance; - mouseXDist *= mouseDistance; - mouseYDist *= mouseDistance; - float speedX4 = mouseXDist + (float)Main.rand.Next(-40, 41) * 0.02f; - float speedY5 = mouseYDist + (float)Main.rand.Next(-40, 41) * 0.02f; - Projectile.NewProjectile(source, realPlayerPos.X, realPlayerPos.Y, speedX4, speedY5, type, damage, knockback, player.whoAmI); + Vector2 realPlayerPos = new Vector2((player.MountedCenter.X + Main.mouseX + Main.screenPosition.X - player.position.X + player.Center.X) / 2f, player.MountedCenter.Y - (100f * i)); + + Vector2 mouseDist = new Vector2(Main.mouseX + Main.screenPosition.X - realPlayerPos.X, Math.Abs(Main.mouseY + Main.screenPosition.Y - realPlayerPos.Y)); + if (mouseDist.Y < 20f) + mouseDist.Y = 20f; + mouseDist = mouseDist.SafeNormalize(Vector2.UnitX) * velocity.Length(); + mouseDist.X += Main.rand.NextFloat(-0.4f, 0.4f); + mouseDist.Y += Main.rand.NextFloat(-0.4f, 0.4f); + + Projectile.NewProjectile(source, realPlayerPos, mouseDist, type, damage, knockback, player.whoAmI); } return false; } diff --git a/Items/Weapons/Magic/ShadowboltStaff.cs b/Items/Weapons/Magic/ShadowboltStaff.cs index c3c932f9a3..7ba0f2ac67 100644 --- a/Items/Weapons/Magic/ShadowboltStaff.cs +++ b/Items/Weapons/Magic/ShadowboltStaff.cs @@ -20,16 +20,17 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 58; Item.height = 56; - Item.damage = 205; + Item.damage = 285; Item.DamageType = DamageClass.Magic; - Item.mana = 10; - Item.useTime = 12; - Item.useAnimation = 12; + Item.mana = 15; + Item.useTime = 8; + Item.useAnimation = 24; + Item.reuseDelay = 30; + Item.useLimitPerAnimation = 3; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5f; Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice; - Item.UseSound = SoundID.Item72; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 5f; diff --git a/Items/Weapons/Magic/TheCauldron.cs b/Items/Weapons/Magic/TheCauldron.cs index d3b57adcb1..065b00b449 100644 --- a/Items/Weapons/Magic/TheCauldron.cs +++ b/Items/Weapons/Magic/TheCauldron.cs @@ -25,12 +25,11 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 46; Item.height = 46; - Item.damage = 59; + Item.damage = 56; Item.noMelee = true; Item.noUseGraphic = true; Item.useStyle = ItemUseStyleID.Swing; - Item.useAnimation = 60; - Item.useTime = 60; + Item.useTime = Item.useAnimation = 60; Item.knockBack = 8f; Item.mana = 18; Item.UseSound = SoundID.DD2_MonkStaffSwing; diff --git a/Items/Weapons/Melee/AbsoluteZero.cs b/Items/Weapons/Melee/AbsoluteZero.cs index de9f7969e6..1b9615ad9c 100644 --- a/Items/Weapons/Melee/AbsoluteZero.cs +++ b/Items/Weapons/Melee/AbsoluteZero.cs @@ -42,7 +42,6 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo) { target.AddBuff(BuffID.Frostburn2, 300); - target.AddBuff(ModContent.BuffType(), 60); var source = player.GetSource_ItemUse(Item); int p = Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), Item.damage, 12f, player.whoAmI); Main.projectile[p].Kill(); diff --git a/Items/Weapons/Melee/ArkoftheCosmos.cs b/Items/Weapons/Melee/ArkoftheCosmos.cs index 127c76be64..695c21e84c 100644 --- a/Items/Weapons/Melee/ArkoftheCosmos.cs +++ b/Items/Weapons/Melee/ArkoftheCosmos.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee public static float MaxThrowReach = 760; public static float SnapDamageMultiplier = 1.2f; //Extra damage from making the scissors snap - public static float MaxCharge = 15f; // Maximum charge value AKA how much charge you get from a parry + public static float MaxCharge = 16f; // Maximum charge value AKA how much charge you get from a parry public static float chargeDamageMultiplier = 1.35f; //Extra damage from charge public static float chainDamageMultiplier = 0.1f; public static float SnapBoltsDamageMultiplier = 0.1f; @@ -235,7 +235,7 @@ namespace CalamityMod.Items.Weapons.Melee var barBG = Request("CalamityMod/UI/MiscTextures/GenericBarBack").Value; var barFG = Request("CalamityMod/UI/MiscTextures/GenericBarFront").Value; - float barScale = 3f; + float barScale = 4f; Vector2 barOrigin = barBG.Size() * 0.5f; float yOffset = 50f; Vector2 drawPos = position + Vector2.UnitY * scale * (frame.Height - yOffset); diff --git a/Items/Weapons/Melee/BladecrestOathsword.cs b/Items/Weapons/Melee/BladecrestOathsword.cs index e88d676e19..ab15acffd1 100644 --- a/Items/Weapons/Melee/BladecrestOathsword.cs +++ b/Items/Weapons/Melee/BladecrestOathsword.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 56; Item.height = 56; - Item.damage = 50; + Item.damage = 42; Item.knockBack = 3f; Item.useTime = 53; Item.useAnimation = 53; diff --git a/Items/Weapons/Melee/Lacerator.cs b/Items/Weapons/Melee/Lacerator.cs index a23c35ba04..187f17e51e 100644 --- a/Items/Weapons/Melee/Lacerator.cs +++ b/Items/Weapons/Melee/Lacerator.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 30; Item.height = 26; Item.DamageType = DamageClass.MeleeNoSpeed; - Item.damage = 152; + Item.damage = 115; Item.knockBack = 7f; Item.useTime = 20; Item.useAnimation = 20; diff --git a/Items/Weapons/Melee/OldLordClaymore.cs b/Items/Weapons/Melee/OldLordClaymore.cs index 58a906a399..82d8b08a91 100644 --- a/Items/Weapons/Melee/OldLordClaymore.cs +++ b/Items/Weapons/Melee/OldLordClaymore.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 76; Item.height = 76; - Item.damage = 195; + Item.damage = 144; Item.DamageType = TrueMeleeDamageClass.Instance; Item.useAnimation = Item.useTime = 90; // Yes it's actually supposed to be this slow diff --git a/Items/Weapons/Melee/SmokingComet.cs b/Items/Weapons/Melee/SmokingComet.cs index 8fe6c66857..2373e4d3c0 100644 --- a/Items/Weapons/Melee/SmokingComet.cs +++ b/Items/Weapons/Melee/SmokingComet.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 36; Item.height = 40; Item.DamageType = DamageClass.MeleeNoSpeed; - Item.damage = 21; + Item.damage = 17; Item.knockBack = 1.5f; Item.useTime = 25; Item.useAnimation = 25; diff --git a/Items/Weapons/Melee/TaintedBlade.cs b/Items/Weapons/Melee/TaintedBlade.cs index 82b65ddff0..32159fd38c 100644 --- a/Items/Weapons/Melee/TaintedBlade.cs +++ b/Items/Weapons/Melee/TaintedBlade.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 46; Item.height = 46; - Item.damage = 60; + Item.damage = 48; Item.DamageType = DamageClass.Melee; Item.useTurn = true; Item.useAnimation = 27; diff --git a/Items/Weapons/Ranged/BloodBoiler.cs b/Items/Weapons/Ranged/BloodBoiler.cs index 3067ec1c17..35eabb4e58 100644 --- a/Items/Weapons/Ranged/BloodBoiler.cs +++ b/Items/Weapons/Ranged/BloodBoiler.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Ranged { Item.width = 60; Item.height = 30; - Item.damage = 135; + Item.damage = 120; Item.DamageType = DamageClass.Ranged; Item.useTime = 5; Item.useAnimation = 25; diff --git a/Items/Weapons/Ranged/ConferenceCall.cs b/Items/Weapons/Ranged/ConferenceCall.cs index a673f01eb8..550f6e4e1c 100644 --- a/Items/Weapons/Ranged/ConferenceCall.cs +++ b/Items/Weapons/Ranged/ConferenceCall.cs @@ -44,7 +44,6 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - int bulletAmt = 4; for (int index = 0; index < bulletAmt; ++index) { @@ -87,10 +86,12 @@ namespace CalamityMod.Items.Weapons.Ranged targetPosition.X = (targetPosition.X + player.Center.X) / 2f + Main.rand.Next(-200, 201); targetPosition.Y -= 100 * j; - Vector2 extraBulletVel = Vector2.Normalize(Main.npc[targets[j]].Center - targetPosition) * Item.shootSpeed; + // Create a dummy projectile to grab the number of max updates the bullet has for predictive aim use + Projectile dummy = new Projectile(); + dummy.SetDefaults(type); + Vector2 extraBulletVel = CalamityUtils.CalculatePredictiveAimToTargetMaxUpdates(targetPosition, Main.npc[targets[j]], Item.shootSpeed, dummy.MaxUpdates); int proj = Projectile.NewProjectile(source, targetPosition, extraBulletVel, type, extraBulletDamage, knockback, player.whoAmI); - Main.projectile[proj].extraUpdates += 14; Main.projectile[proj].tileCollide = false; Main.projectile[proj].timeLeft /= 2; } @@ -107,10 +108,12 @@ namespace CalamityMod.Items.Weapons.Ranged targetPosition.X = (targetPosition.X + player.Center.X) / 2f + Main.rand.Next(-200, 201); targetPosition.Y -= 100 * randomTarget; - Vector2 extraBulletVel = Vector2.Normalize(Main.npc[targets[randomTarget]].Center - targetPosition) * Item.shootSpeed; + // Create a dummy projectile to grab the number of max updates the bullet has for predictive aim use + Projectile dummy = new Projectile(); + dummy.SetDefaults(type); + Vector2 extraBulletVel = CalamityUtils.CalculatePredictiveAimToTargetMaxUpdates(targetPosition, Main.npc[targets[randomTarget]], Item.shootSpeed, dummy.MaxUpdates); int proj = Projectile.NewProjectile(source, targetPosition, extraBulletVel, type, extraBulletDamage, knockback, player.whoAmI); - Main.projectile[proj].extraUpdates += 14; Main.projectile[proj].tileCollide = false; Main.projectile[proj].timeLeft /= 2; } diff --git a/Items/Weapons/Ranged/FirestormCannon.cs b/Items/Weapons/Ranged/FirestormCannon.cs index 766db7e7b6..8bc279793b 100644 --- a/Items/Weapons/Ranged/FirestormCannon.cs +++ b/Items/Weapons/Ranged/FirestormCannon.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Projectiles.Ranged; +using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -9,10 +10,13 @@ namespace CalamityMod.Items.Weapons.Ranged public class FirestormCannon : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Ranged"; - public override void SetStaticDefaults() - { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; - } + + // This is intentionally stored on the item instead of the holdout to prevent swapping items to instantly reset the heat + // This could be theoretically exploited using multiple items, but the heat dissipates fast enough that I can't really care + public int BuiltUpHeat = 0; + public const int OverheatLevel = 480; + public const int OverheatCooldown = 180; + public const int OverheatDamage = 20; public override void SetDefaults() { @@ -20,71 +24,41 @@ namespace CalamityMod.Items.Weapons.Ranged Item.height = 28; Item.damage = 14; Item.DamageType = DamageClass.Ranged; - Item.useTime = 12; - Item.useAnimation = 12; + Item.useTime = Item.useAnimation = 11; + Item.knockBack = 1.5f; + Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; - Item.knockBack = 1.5f; + Item.channel = true; + Item.noUseGraphic = true; + Item.autoReuse = true; + Item.value = CalamityGlobalItem.RarityGreenBuyPrice; Item.rare = ItemRarityID.Green; - Item.UseSound = SoundID.Item11; - Item.autoReuse = true; - Item.shoot = ProjectileID.Flare; + Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 5.5f; Item.useAmmo = AmmoID.Flare; - Item.Calamity().canFirePointBlankShots = true; } - public override Vector2? HoldoutOffset() => new Vector2(-10, 0); - - public override bool CanConsumeAmmo(Item ammo, Player player) => Main.rand.Next(100) >= 70; - - public override bool AltFunctionUse(Player player) => true; - - public override float UseSpeedMultiplier(Player player) + public override void HoldItem(Player player) { - if (player.altFunctionUse == 2) - return 1 / 3f; - return 1f; + player.Calamity().rightClickListener = true; + // Heat decrements if: + // The holdout exists, the player is not firing, the player is not in overheat, and there is heat in the weapon + if (player.ownedProjectileCounts[Item.shoot] > 0 && !Main.mouseLeft && player.Calamity().flareGunOverheat == 0 && BuiltUpHeat > 0) + { + BuiltUpHeat -= player.miscCounter % 2 == 0 ? 3 : 2; + if (BuiltUpHeat < 0) + BuiltUpHeat = 0; + } } + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; + public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0; // Spawning the holdout cannot consume ammo public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - if (player.altFunctionUse == 2) - { - velocity *= 2f; - int flareAmt = Main.rand.Next(4, 6); - for (int index = 0; index < flareAmt; ++index) - { - float SpeedX = velocity.X + (float)Main.rand.Next(-50, 51) * 0.05f; - float SpeedY = velocity.Y + (float)Main.rand.Next(-50, 51) * 0.05f; - int flare = Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI); - if (flare.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[flare].penetrate = 1; - Main.projectile[flare].timeLeft = 600; - Main.projectile[flare].DamageType = DamageClass.Ranged; - } - } - return false; - } - else - { - int flareAmt = Main.rand.Next(1, 3); - for (int index = 0; index < flareAmt; ++index) - { - float SpeedX = velocity.X + (float)Main.rand.Next(-40, 41) * 0.05f; - float SpeedY = velocity.Y + (float)Main.rand.Next(-40, 41) * 0.05f; - int flare = Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI); - if (flare.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[flare].DamageType = DamageClass.Ranged; - Main.projectile[flare].timeLeft = 200; - Main.projectile[flare].penetrate = 3; - } - } - return false; - } + Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI); + return false; } public override void AddRecipes() diff --git a/Items/Weapons/Ranged/Fungicide.cs b/Items/Weapons/Ranged/Fungicide.cs index 830466446c..32d4028e9a 100644 --- a/Items/Weapons/Ranged/Fungicide.cs +++ b/Items/Weapons/Ranged/Fungicide.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Ranged { Item.width = 40; Item.height = 26; - Item.damage = 20; + Item.damage = 19; Item.DamageType = DamageClass.Ranged; Item.useTime = 22; Item.useAnimation = 22; diff --git a/Items/Weapons/Ranged/MagnaCannon.cs b/Items/Weapons/Ranged/MagnaCannon.cs index d31343d31b..891cb67dd6 100644 --- a/Items/Weapons/Ranged/MagnaCannon.cs +++ b/Items/Weapons/Ranged/MagnaCannon.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged public static readonly SoundStyle Fire = new("CalamityMod/Sounds/Item/MagnaCannonShot") { PitchVariance = 0.3f, Volume = 0.4f }; public static int AftershotCooldownFrames = 30; - public static int FullChargeFrames = 138; //126 frames is durration of charge sound + public static int FullChargeFrames = 138; //126 frames is duration of charge sound public new string LocalizationCategory => "Items.Weapons.Ranged"; @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Ranged { Item.width = 56; Item.height = 34; - Item.damage = 30; + Item.damage = 25; Item.DamageType = DamageClass.Ranged; Item.useAnimation = Item.useTime = AftershotCooldownFrames; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Items/Weapons/Ranged/OpalStriker.cs b/Items/Weapons/Ranged/OpalStriker.cs index e2abf396ac..e923ec174b 100644 --- a/Items/Weapons/Ranged/OpalStriker.cs +++ b/Items/Weapons/Ranged/OpalStriker.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged { Item.width = 48; Item.height = 24; - Item.damage = 33; + Item.damage = 30; Item.DamageType = DamageClass.Ranged; Item.useAnimation = Item.useTime = AftershotCooldownFrames; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Items/Weapons/Ranged/SpectralstormCannon.cs b/Items/Weapons/Ranged/SpectralstormCannon.cs index fc161fa028..fec1909da9 100644 --- a/Items/Weapons/Ranged/SpectralstormCannon.cs +++ b/Items/Weapons/Ranged/SpectralstormCannon.cs @@ -1,4 +1,5 @@ -using CalamityMod.Projectiles.Rogue; +using CalamityMod.Projectiles.Ranged; +using CalamityMod.Projectiles.Rogue; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -10,56 +11,53 @@ namespace CalamityMod.Items.Weapons.Ranged public class SpectralstormCannon : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Ranged"; + + // This is intentionally stored on the item instead of the holdout to prevent swapping items to instantly reset the heat + // This could be theoretically exploited using multiple items, but the heat dissipates fast enough that I can't really care + public int BuiltUpHeat = 0; + public const int OverheatLevel = 540; + public const int OverheatCooldown = 160; + public const int OverheatDamage = 50; + public override void SetDefaults() { Item.width = 66; Item.height = 26; - Item.damage = 48; + Item.damage = 82; Item.DamageType = DamageClass.Ranged; - Item.useTime = 4; - Item.useAnimation = 12; + Item.useTime = Item.useAnimation = 11; + Item.knockBack = 1.5f; + Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; - Item.knockBack = 1.5f; + Item.channel = true; + Item.noUseGraphic = true; + Item.autoReuse = true; + Item.value = CalamityGlobalItem.RarityRedBuyPrice; Item.rare = ItemRarityID.Red; - Item.UseSound = SoundID.Item11; - Item.autoReuse = true; - Item.shoot = ProjectileID.Flare; - Item.shootSpeed = 9.5f; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 10f; Item.useAmmo = AmmoID.Flare; - Item.Calamity().canFirePointBlankShots = true; } - public override Vector2? HoldoutOffset() => new Vector2(-10, 0); - - public override bool CanConsumeAmmo(Item ammo, Player player) + public override void HoldItem(Player player) { - if (Main.rand.Next(0, 100) < 70) - return false; - return true; + player.Calamity().rightClickListener = true; + // Heat decrements if: + // The holdout exists, the player is not firing, the player is not in overheat, and there is heat in the weapon + if (player.ownedProjectileCounts[Item.shoot] > 0 && !Main.mouseLeft && player.Calamity().flareGunOverheat == 0 && BuiltUpHeat > 0) + { + BuiltUpHeat -= 3; + if (BuiltUpHeat < 0) + BuiltUpHeat = 0; + } } - + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; + public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0; // Spawning the holdout cannot consume ammo public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - float SpeedX = velocity.X + (float)Main.rand.Next(-40, 41) * 0.05f; - float SpeedY = velocity.Y + (float)Main.rand.Next(-40, 41) * 0.05f; - int flare = Projectile.NewProjectile(source, position.X, position.Y, SpeedX, SpeedY, type, damage, knockback, player.whoAmI); - if (flare.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[flare].timeLeft = 200; - Main.projectile[flare].DamageType = DamageClass.Ranged; - } - - float SpeedX2 = velocity.X + (float)Main.rand.Next(-20, 21) * 0.05f; - float SpeedY2 = velocity.Y + (float)Main.rand.Next(-20, 21) * 0.05f; - int soul = Projectile.NewProjectile(source, position.X, position.Y, SpeedX2, SpeedY2, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 2f, 0f); - if (soul.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[soul].timeLeft = 600; - Main.projectile[soul].DamageType = DamageClass.Ranged; - Main.projectile[soul].frame = Main.rand.Next(4); - } + Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI); return false; } diff --git a/Items/Weapons/Rogue/FrostyFlare.cs b/Items/Weapons/Rogue/FrostyFlare.cs index 1226639a46..90ed3cab91 100644 --- a/Items/Weapons/Rogue/FrostyFlare.cs +++ b/Items/Weapons/Rogue/FrostyFlare.cs @@ -9,11 +9,6 @@ namespace CalamityMod.Items.Weapons.Rogue { public class FrostyFlare : RogueWeapon { - public override void SetStaticDefaults() - { - Item.ResearchUnlockCount = 99; - } - public override void SetDefaults() { Item.width = 10; @@ -27,12 +22,10 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(0, 0, 8, 0); + Item.value = CalamityGlobalItem.RarityLightPurpleBuyPrice; Item.rare = ItemRarityID.LightPurple; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 22f; - Item.maxStack = Item.CommonMaxStack; - Item.consumable = true; Item.DamageType = RogueDamageClass.Instance; } diff --git a/Items/Weapons/Rogue/InfernalKris.cs b/Items/Weapons/Rogue/InfernalKris.cs index 13ec831929..a253fb640c 100644 --- a/Items/Weapons/Rogue/InfernalKris.cs +++ b/Items/Weapons/Rogue/InfernalKris.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 32; Item.height = 38; - Item.damage = 23; + Item.damage = 21; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = 18; @@ -35,7 +35,10 @@ namespace CalamityMod.Items.Weapons.Rogue { int p = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 1f); if (p.WithinBounds(Main.maxProjectiles)) + { Main.projectile[p].Calamity().stealthStrike = true; + Main.projectile[p].penetrate = 1; + } return false; } return true; diff --git a/Items/Weapons/Rogue/KelvinCatalyst.cs b/Items/Weapons/Rogue/KelvinCatalyst.cs index dc3bf49211..cfcd7844f7 100644 --- a/Items/Weapons/Rogue/KelvinCatalyst.cs +++ b/Items/Weapons/Rogue/KelvinCatalyst.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void AddRecipes() { CreateRecipe(). - AddIngredient(100). + AddIngredient(). AddIngredient(). AddIngredient(). AddIngredient(). diff --git a/Items/Weapons/Rogue/MeteorFist.cs b/Items/Weapons/Rogue/MeteorFist.cs index 3fe824bcf6..514769e61b 100644 --- a/Items/Weapons/Rogue/MeteorFist.cs +++ b/Items/Weapons/Rogue/MeteorFist.cs @@ -13,9 +13,9 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 22; Item.height = 28; - Item.damage = 37; + Item.damage = 31; Item.DamageType = RogueDamageClass.Instance; - Item.useAnimation = Item.useTime = 28; + Item.useAnimation = Item.useTime = 25; Item.knockBack = 5.75f; Item.shootSpeed = 4f; @@ -31,8 +31,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.shoot = ModContent.ProjectileType(); } - public override float StealthDamageMultiplier => 1.15f; - public override void HoldItem(Player player) => player.Calamity().mouseWorldListener = true; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Rogue/Mycoroot.cs b/Items/Weapons/Rogue/Mycoroot.cs index 7adee86c42..ee618d77d6 100644 --- a/Items/Weapons/Rogue/Mycoroot.cs +++ b/Items/Weapons/Rogue/Mycoroot.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Items.Weapons.Rogue Item.damage = 12; Item.noMelee = true; Item.noUseGraphic = true; - Item.useTime = 5; - Item.useAnimation = 5; + Item.useTime = 6; + Item.useAnimation = 6; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 1.5f; Item.UseSound = SoundID.Item1; @@ -36,12 +36,9 @@ namespace CalamityMod.Items.Weapons.Rogue if (player.Calamity().StealthStrikeAvailable() && player.ownedProjectileCounts[ModContent.ProjectileType()] < 20 && stealth.WithinBounds(Main.maxProjectiles)) { Main.projectile[stealth].Calamity().stealthStrike = true; - int projAmt = Main.rand.Next(7, 11); - for (int i = 0; i < projAmt; i++) + for (int i = 0; i < 8; i++) { - int spore = Projectile.NewProjectile(source, player.Center, velocity, ModContent.ProjectileType(), (int)(damage * 0.5f), knockback, player.whoAmI); - if (spore.WithinBounds(Main.maxProjectiles)) - Main.projectile[spore].ai[1] = 1f; + int spore = Projectile.NewProjectile(source, player.Center, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 1f); } foreach (Player other in Main.ActivePlayers) { diff --git a/Items/Weapons/Rogue/SludgeSplotch.cs b/Items/Weapons/Rogue/SludgeSplotch.cs index d3f9b71e46..e90b104126 100644 --- a/Items/Weapons/Rogue/SludgeSplotch.cs +++ b/Items/Weapons/Rogue/SludgeSplotch.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 32; Item.height = 30; - Item.damage = 41; + Item.damage = 30; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = 18; diff --git a/Items/Weapons/Summon/FlarebatStaff.cs b/Items/Weapons/Summon/FlarebatStaff.cs index f94955710b..4ee88f1d16 100644 --- a/Items/Weapons/Summon/FlarebatStaff.cs +++ b/Items/Weapons/Summon/FlarebatStaff.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - Item.damage = 18; + Item.damage = 20; Item.DamageType = DamageClass.Summon; Item.shoot = ModContent.ProjectileType(); Item.knockBack = 1f; diff --git a/Items/Weapons/Summon/ScabRipper.cs b/Items/Weapons/Summon/ScabRipper.cs index 74d18a268c..9ddc38325c 100644 --- a/Items/Weapons/Summon/ScabRipper.cs +++ b/Items/Weapons/Summon/ScabRipper.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Summon { Item.width = 66; Item.height = 70; - Item.damage = 16; + Item.damage = 15; Item.mana = 10; Item.useAnimation = Item.useTime = 30; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Items/Weapons/Summon/VileFeeder.cs b/Items/Weapons/Summon/VileFeeder.cs index e584d973f4..db16a86ab9 100644 --- a/Items/Weapons/Summon/VileFeeder.cs +++ b/Items/Weapons/Summon/VileFeeder.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Summon { Item.width = 40; Item.height = 36; - Item.damage = 14; + Item.damage = 15; Item.DamageType = DamageClass.Summon; Item.shoot = ModContent.ProjectileType(); Item.knockBack = 0.5f; diff --git a/Localization/en-US/Mods.CalamityMod.Attunement.hjson b/Localization/en-US/Mods.CalamityMod.Attunement.hjson index a694250087..bb971a8498 100644 --- a/Localization/en-US/Mods.CalamityMod.Attunement.hjson +++ b/Localization/en-US/Mods.CalamityMod.Attunement.hjson @@ -138,7 +138,7 @@ PhoenixAttunement: { Swing the sword around you, accelerating over time The swirling nebula constantly emits homing cosmic bolts Release to hurl the sword toward the cursor alongside 6 gigantic cosmic bolts - The hurled sword erupts into a blazing flame pillar on enemy hits + The hurled sword erupts into a blazing tornado on enemy hits ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index ef1dc5d284..3ec585a1af 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -29,9 +29,8 @@ AbyssalDivingSuit: { The suit's armored plates increase damage reduction by 15% Wearing this suit grants 15% damage reduction for hits under 50 damage The suit can absorb up to 3 hits over 50 damage, and will take 3 minutes to regenerate - Reduces the damage caused by drowning in the abyss, and removes the bleed effect in the upper layers Grants the ability to swim, extends underwater breathing, emits light underwater, and improves mobility on ice - Provides a moderate amount of light and reduces breath loss in the abyss + Provides a moderate amount of light, reduces breath loss, and reduces damage caused by drowning in the abyss Abyss creatures are less likely to see you, mitigates the abyss' defense reduction, and lets you sink faster in liquids Grants immunity to the sulphurous waters and Crush Depth's increased breath loss Grants resistance to the increased breath loss caused by Hadopelagic Pressure @@ -596,7 +595,6 @@ DepthCharm: { Tooltip: ''' Reduces the damage caused by drowning in the abyss - Removes the bleed effect caused by the upper layers of the abyss Removes the increased breath loss of Crush Depth ''' } @@ -1001,8 +999,10 @@ InkBomb: { DisplayName: Ink Bomb Tooltip: ''' - Throws several ink bombs when hit that explode into ink - Gain a lot of stealth and confuse enemies when struck + +10 maximum stealth + Stealth generates 7% faster + Throws several ink bombs when hit that explode into ink and confuse enemies + Gain a lot of stealth when struck This effect has a 20 second cooldown before it can occur again ''' } @@ -1822,9 +1822,9 @@ StatMeter: { AbyssStats: ''' Abyss Light Strength: {0} - Breath Lost Per Tick: {1} | Breath Loss Rate: {2} - Life Lost Per Tick at Zero Breath: {3} - Defense Lost From Pressure: {4} + Breath Loss Rate: {1} + Life Lost Per Tick at Zero Breath: {2} + Defense Lost From Pressure: {3} ''' AbyssStatsHidden: Abyss stats are only displayed while in the Abyss } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson index 645abad5d7..70f81d51e7 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson @@ -423,9 +423,9 @@ GodSlayerChestplate: { ''' CommonSetBonus: ''' - Pressing {0} allows you to dash towards your cursor for 2.5 seconds + Pressing {0} allows you to dash towards your cursor for 2 seconds Enemies you dash through take massive damage - During the dash you are immune to most debuffs + During the dash you are immune to damage and most debuffs The dash has a {1} second cooldown ''' } @@ -617,7 +617,6 @@ TarragonBreastplate: { ''' CommonSetBonus: ''' - Reduces enemy spawn rates Increased heart pickup range Enemies have a chance to drop extra hearts on death ''' diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson index 19a3b8ddc3..cc6d91e9c8 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson @@ -61,13 +61,17 @@ AerospecLeggings: { DesertProwlerHat: { DisplayName: Desert Prowler Hat - Tooltip: 4% increased ranged critical strike chance and 20% chance to not consume ammo - SetBonus: Ranged attacks deal an extra {0} flat damage + Tooltip: 4% increased rogue critical strike chance + SetBonus: + ''' + 5% increased rogue damage + +50 maximum stealth + ''' AbilityBrief: Sandsmoke Bomb - Double tap {0} to shroud yourself in a small cloud of sand AbilityDescription: ''' While the sand cloud is active, gain increased mobility but heavily reduced defense - Using a ranged weapon instantly dispels the sand cloak, but guarantees a supercrit for {0}% damage + Using a rogue weapon instantly dispels the sand cloak, but guarantees a supercrit for {0}% damage The super crit applies only as long as the resulting hit wouldn't exceed {1} damage Landing the killing blow on an enemy with this shot shortens the ability's cooldown to {2} seconds ''' @@ -80,7 +84,7 @@ DesertProwlerPants: { DesertProwlerShirt: { DisplayName: Desert Prowler Shirt - Tooltip: 5% increased ranged critical strike chance + Tooltip: 5% increased rogue critical strike chance } MarniteArchitectHeadgear: { @@ -101,22 +105,22 @@ MarniteArchitectToga: { SnowRuffianChestplate: { DisplayName: Snow Ruffian Chestplate - Tooltip: 3% increased rogue critical strike chance + Tooltip: 4% increased ranged critical strike chance } SnowRuffianGreaves: { DisplayName: Snow Ruffian Greaves - Tooltip: 5% increased movement speed + Tooltip: 10% increased movement speed } SnowRuffianMask: { DisplayName: Snow Ruffian Mask - Tooltip: 2% increased rogue damage + Tooltip: 2% increased ranged damage SetBonus: ''' - 5% increased rogue damage - +50 maximum stealth + 4% increased ranged damage and critical strike chance You can glide to negate fall damage + Ranged critical strikes frostburn enemies ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson index 3700ac4fa9..e2b8cb8cd0 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson @@ -420,7 +420,7 @@ DisgustingMeat: { Tooltip: ''' Debug item, spawn and use to remove permanent upgrades - will remove health and mana upgrades + will remove health and mana upgrades, use with no Calamity upgrades to remove vanilla upgrades will remove rage and adrenaline upgrades, plus other miscellaneous boosters Removed boosters will be vomited out of you as items ''' diff --git a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson index cf192272c0..81e0d43461 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson @@ -4296,12 +4296,12 @@ WulfrumPanelWall: { } ChargedWulfrumWallMountedBulb: { - DisplayName: Mods.CalamityMod.Items.Placeables.ChargedWulfrumWallMountedBulb.DisplayName + DisplayName: Charged Wulfrum Wall Mounted Bulb Tooltip: "" } WulfrumWallMountedBulb: { - DisplayName: Mods.CalamityMod.Items.Placeables.WulfrumWallMountedBulb.DisplayName + DisplayName: Wulfrum Wall Mounted Bulb Tooltip: "" } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.DraedonsArsenal.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.DraedonsArsenal.hjson index 9b151deb0d..f44506b869 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.DraedonsArsenal.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.DraedonsArsenal.hjson @@ -10,6 +10,18 @@ AerialTracker: { ''' } +CountermeasureMitt: { + DisplayName: B-LSR: Countermeasure Mitt + Tooltip: + ''' + A precision welding glove with laser emitters in each fingertip + to focus all emitters into a short range palm blast that always critically strikes + Palm blasts have a cooldown which is significantly shorter if they miss + [c/1FFBFF:'Most battalions prefer to either spread attacks widely, or focus on a singular target.] + [c/1FFBFF:This glove caters to both, though it will never bridge the gap between their strategies.'] + ''' +} + GalvanizingGlaive: { DisplayName: Galvanizing Glaive Tooltip: @@ -21,15 +33,6 @@ GalvanizingGlaive: { ''' } -GatlingLaser: { - DisplayName: Gatling Laser - Tooltip: - ''' - Fires a rapid barrage of accelerated lasers to annihilate foes - [c/1FFBFF:'Developed to be used primarily by Yharim's fleet and base defense force.'] - ''' -} - GaussDagger: { DisplayName: Gauss Dagger Tooltip: diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index a7f7715998..c5e5658212 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -84,7 +84,7 @@ ArkoftheCosmos: { to snip out the scissor blades in front of you Hitting an enemy with it will parry them, granting you brief invulnerability You can also parry projectiles to make them deal 160 less damage for a short period - Parrying will empower the next 15 swings of the sword + Parrying will empower the next 16 swings of the sword ''' BlastInfo: Double with charges available to cause a Big Rip in spacetime and consume all charges } @@ -918,7 +918,7 @@ OldLordClaymore: { HoldShiftTooltip: ''' [c/df4420:A gift to outstanding Demons, a replica of the sword used by the greatest of all Demon Lords.] - [c/df4420:The prosperity he brought to their kind is unmatched even now that they alone rule the Undeworld.] + [c/df4420:The prosperity he brought to their kind is unmatched even now that they alone rule the Underworld.] ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 319dace1d7..e1616d6e28 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -453,9 +453,11 @@ FirestormCannon: { DisplayName: Firestorm Cannon Tooltip: ''' - Releases a constant stream of weaponized flares - Press to fire a condensed spread of flares + Fires a rapid barrage of flares that builds up a searing heat in the weapon + Firing for too long overheats the weapon, leaving it unusable for a short period + Press to put away the weapon, which preserves its heat 70% chance to save ammo + 'What could go wrong?' ''' } @@ -1154,8 +1156,13 @@ SpectralstormCannon: { DisplayName: Spectralstorm Cannon Tooltip: ''' - Fires a storm of lost souls and flares + Fires a barrage of spectral flares that builds up a searing heat in the weapon + While cooling down, heat-seeking phantoms are continuously released + Firing for too long overheats the weapon, leaving it unusable for a short period + However, triggering overheat releases a powerful burst of souls and resets heat + Press to put away the weapon, which preserves its heat 70% chance to save ammo + 'Ectoplasmic blast rated visor mandatory' ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 2037158363..be160ba56d 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -600,8 +600,8 @@ InfernalKris: { DisplayName: Infernal Kris Tooltip: ''' - Throws a burning dagger that starts spinning after travelling a short distance, inflicting additional damage while spinning - Stealth strikes cause the dagger to be engulfed in flames, exploding on contact with walls and enemies + Rapidly throws burning daggers + Stealth strikes engulf the dagger in flames, exploding when hitting walls and enemies ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Misc.hjson index 9ba745308c..2e8c552179 100644 --- a/Localization/en-US/Mods.CalamityMod.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Misc.hjson @@ -3,14 +3,11 @@ RecipeGroup: { HardmodeAnvil: "{$LegacyMisc.37} Hardmode Anvil" HardmodeForge: "{$LegacyMisc.37} Hardmode Forge" - AnyLargeGem: "{$LegacyMisc.37} Large Gem" AnyFood: "{$LegacyMisc.37} Food Item" AnyEvilBar: "{$LegacyMisc.37} Evil Bar" - AnyEvilPowder: "{$LegacyMisc.37} Evil Powder" Boss2Material: Shadow Scale or Tissue Sample CursedFlameIchor: Cursed Flame or Ichor AnyEvilWater: "{$LegacyMisc.37} Evil Water" - AnyEvilFlask: "{$LegacyMisc.37} Evil Flask" AnyEvilBlock: "{$LegacyMisc.37} Evil Block" AnyGoodBlock: "{$LegacyMisc.37} Good Block" LunarPickaxe: "{$LegacyMisc.37} Lunar Pickaxe" diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index ab4b81cc08..96f1f31200 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -147,7 +147,6 @@ AeroSlime.DisplayName: Aero Slime ArmoredDiggerHead.DisplayName: Armored Digger MechanizedSerpent: Mechanized Serpent AuroraSpirit.DisplayName: Aurora Spirit -BloodlettingServant.DisplayName: Bloodletting Servant BloomSlime.DisplayName: Bloom Slime Bohldohr.DisplayName: Bohldohr BucketZombie.DisplayName: "{$NPCName.Zombie}" diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson index 7947c1ccf2..b68715df12 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson @@ -63,9 +63,6 @@ FlareBomb.DisplayName: Flare Bomb FlareDust.DisplayName: Flare Dust FlareDust2.DisplayName: Flare Bomb Flarenado.DisplayName: Flarenado -FoveanatorEnergyBomb.DisplayName: Nebulous Energy Bomb -FoveanatorLaser.DisplayName: Nebulous Laser -FoveanatorFlamethrower.DisplayName: Nebulous Flames FrostMist.DisplayName: Frost Mist GooglyEye.DisplayName: Googly Eye GreatSandBlast.DisplayName: Great Sand Blast diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Misc.hjson index 8d9d17c9c7..b69ea992c0 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Misc.hjson @@ -8,7 +8,7 @@ AnomalysNanogunHoldout.DisplayName: The Anomaly's Nanogun AnomalysNanogunMPFBBoom.DisplayName: MPFB Explosion AnomalysNanogunMPFBDevastator.DisplayName: MPFB Devastator AnomalysNanogunPlasmaBeam.DisplayName: Plasma Beam -GatlingLaserShot.DisplayName: Gatling Laser +CountermeasurePalmBlast.DisplayName: Palm Blast GaussEnergy.DisplayName: Gauss Energy GaussFlux.DisplayName: Gauss Flux GaussPistolShot.DisplayName: Gauss Shot diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson index 5533381a9d..c6be216f3d 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson @@ -206,6 +206,7 @@ SicknessRound2.DisplayName: Round SlagRound.DisplayName: Slag Round SlimeBolt.DisplayName: Slime Bolt SparkSpreaderFire.DisplayName: Sparked Flames +SpectralFlare.DisplayName: Spectral Flare SpeedBlasterShot.DisplayName: Splatter Shot SporeBomb.DisplayName: Spore Bomb SproutingArrowMain.DisplayName: Sprouting Arrow diff --git a/Localization/en-US/Mods.CalamityMod.Status.Death.hjson b/Localization/en-US/Mods.CalamityMod.Status.Death.hjson index 60f47f43c5..693d421595 100644 --- a/Localization/en-US/Mods.CalamityMod.Status.Death.hjson +++ b/Localization/en-US/Mods.CalamityMod.Status.Death.hjson @@ -61,6 +61,7 @@ Dragonfire4: This was a fight {0} could not win. ElementalMix1: "{0} was reduced to technicolor confetti." ElementalMix2: "{0} was blasted apart by a harmonized elemental onslaught." ElementalMix3: "{0} was overwhelmed by elemental turbulence." +FlareGunOverheat: "{0}'s gun was simply too hot to handle." GodSlayerInferno1: "{0} imploded into nothingness." GodSlayerInferno2: "{0}'s body slipped into oblivion." GodSlayerInferno3: "{0} ceased being a part of our universe." diff --git a/Localization/en-US/Mods.CalamityMod.UI.hjson b/Localization/en-US/Mods.CalamityMod.UI.hjson index a3db5b2517..0400bd6112 100644 --- a/Localization/en-US/Mods.CalamityMod.UI.hjson +++ b/Localization/en-US/Mods.CalamityMod.UI.hjson @@ -32,8 +32,34 @@ CurrentlySelected: Currently Selected : {0} DifficultyClickText: "[c/919191:Click to select a difficulty mode]" ExpertDifficultyLock: "[c/919191:Higher difficulty modes can only be toggled in Expert Mode or above]" ChangingTheRules: "[c/919191:You cannot change the rules now!]" -NoDifficulty: None -NoDifficultyInfo: The classic Terraria experience, with no Calamity difficulty changes +Classic: Classic +ClassicEnabled: Classic Mode is enabled +ClassicInfo: Your Adventure Begins... A far more relaxed Terraria experience +Expert: Expert +ExpertEnabled: Expert Mode is enabled +ExpertShortInfo: "[c/b8860b:Fortune & Glory, Kid. For those looking for a more difficult vanilla experience]" +ExpertExpandedInfo: + ''' + [c/a87a07:Most bosses gain new attacks and more difficult attack patterns] + [c/a87a07:Most enemies have twice as much health, deal twice as much damage and receive 10% less knockback] + [c/a87a07:Certain enemies have new attacks, can inflict new debuffs or have a higher chance of inflicting debuffs they already had] + [c/a87a07:Enemies drop more loot, as well as having higher chances] + [c/a87a07:Players drop more of their coins on death] + ''' +ExpertActivate: Expert is active +ExpertDeactivate: Expert is not active +Master: Master +MasterEnabled: Master Mode is enabled +MasterShortInfo: "[c/00ad79:Game over man, game over! A tougher step up in stats from Expert Mode]" +MasterExpandedInfo: + ''' + [c/029c6d:Most enemies have even more health and knockback resistance added on from Expert Mode] + [c/029c6d:Bosses have new exclusive vanity rewards] + [c/029c6d:Players drop ALL their coins on death] + [c/029c6d:Players gain an additional accessory slot at the start of the game] + ''' +MasterActivate: Master is active +MasterDeactivate: Master is not active Revengeance: Revengeance RevengeanceEnabled: Revengeance Mode is enabled RevengeanceShortInfo: "[c/F54254:The intended Calamity experience! Can only be enabled in Expert Mode!]" @@ -55,7 +81,7 @@ DeathEnabled: Death Mode is enabled DeathShortInfo: "[c/C82DF7:A far more difficult challenge than Revengeance Mode! Can only be enabled in Master Mode!]" DeathExpandedInfo: ''' - [c/B834E0:All foes will pose a much larger threat with highly aggressive AIs and increased damage] + [c/B834E0:All foes will pose a much larger threat with highly aggressive AIs] [c/B834E0:Bosses have substantially harder AI changes. Enemies are even more numerous and can easily overwhelm you] [c/B834E0:Debuffs are especially lethal and the Abyss is significantly more dangerous] [c/E945FF:Vigilance and tenacity are crucial to survival] @@ -117,7 +143,7 @@ Cooldowns: { PrismaticLaser: Prismatic Laser Barrage Cooldown ProfanedSoulShieldDurability: Profaned Soul Shield Durability ProfanedSoulShieldRecharge: Profaned Soul Shield Recharge - RaiderBoost: Extra Critical Chance + RaidersBoost: Extra Critical Chance RelicOfResilienceCooldown: Relic of Resilience Cooldown RogueBooster: Rogue Booster Cooldown SandCloak: Sand Cloak Cooldown diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson index 718270c4af..f0b52b16a2 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson @@ -39,7 +39,7 @@ SetBonus: { ''' Multiplies all cold-based debuff damage by 1.25x Cold enemies will deal reduced contact damage to the player - Provides immunity to the Chilled, Frozen, Frostburn and Glacial State debuffs + Provides immunity to the Chilled, Frozen, and Frostburn debuffs ''' Rain: ''' diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index eb9bbf4fc6..3fbe79010e 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -27,7 +27,7 @@ AddedTooltip: { This grants +1.5 HP/s life regen and accelerates natural life regen Life drain stacks based on the number of enemies being hit ''' - WarmthPotion: Greatly reduces the duration of Chilled, Frozen, and Glacial State + WarmthPotion: Greatly reduces the duration of Chilled and Frozen HandWarmer: Provides a regeneration boost while wearing the Snow armor GoldenFishingRod: Its fishing line will never break // Step Stool @@ -295,7 +295,8 @@ BuffDescription: { BeetleMight: Melee damage and speed increase by {0}% and {1}% respectively ChaosState: Rod of Discord teleports are disabled LeafCrystal: Emits powerful life pulses at nearby enemies - WarmthExtra: Reduced durations of Chilled, Frozen, and Glacial State + Rabies: Decreased life regen, Causes status effects + WarmthExtra: Reduced durations of Chilled and Frozen WeaponImbueConfetti: All attacks cause confetti to appear WeaponImbueCursedFlames: Melee, Whip, and Rogue attacks inflict enemies with cursed flames WeaponImbueFire: Melee, Whip, and Rogue attacks set enemies on fire diff --git a/ModSupport/ExternalMods.cs b/ModSupport/ExternalMods.cs index 7518e201c1..f69d8d110d 100644 --- a/ModSupport/ExternalMods.cs +++ b/ModSupport/ExternalMods.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Terraria.ID; -using Terraria.ModLoader; +using Terraria.ModLoader; namespace CalamityMod { @@ -31,6 +25,7 @@ namespace CalamityMod internal static Mod magicStorage = null; internal static Mod overhaul = null; internal static Mod redemption = null; + internal static Mod remnants = null; internal static Mod soa = null; internal static Mod subworldLibrary = null; internal static Mod summonersAssociation = null; @@ -67,6 +62,8 @@ namespace CalamityMod ModLoader.TryGetMod("TerrariaOverhaul", out overhaul); redemption = null; ModLoader.TryGetMod("Redemption", out redemption); + remnants = null; + ModLoader.TryGetMod("Remnants", out remnants); soa = null; ModLoader.TryGetMod("SacredTools", out soa); subworldLibrary = null; @@ -97,6 +94,7 @@ namespace CalamityMod magicStorage = null; overhaul = null; redemption = null; + remnants = null; soa = null; subworldLibrary = null; summonersAssociation = null; diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs index bce9cbdf27..ebf1420994 100644 --- a/ModSupport/ModCalls.cs +++ b/ModSupport/ModCalls.cs @@ -671,12 +671,6 @@ namespace CalamityMod p.Calamity().externalAbyssLight += add; } - public static void AddBreathLossMult(Player p, float add) - { - if (p != null) - p.Calamity().externalBreathLossMultBoost += add; - } - public static void AddBreathTick(Player p, float add) { if (p != null) @@ -1271,21 +1265,6 @@ namespace CalamityMod AddAbyssLightStrength(castPlayer(args[1]), light); return null; - case "BreathMult": - case "BreathLossMult": - case "AddBreathMult": - case "AddBreathLossMult": - if (args.Length < 2) - return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and breath loss mult change as a float."); - if (args.Length < 3) - return new ArgumentNullException("ERROR: Must specify breath loss mult change as a float."); - if (!(args[2] is float breathLossMult)) - return new ArgumentException("ERROR: The second argument to \"AddBreathLossMult\" must be a float."); - if (!isValidPlayerArg(args[1])) - return new ArgumentException("ERROR: The first argument to \"AddBreathLossMult\" must be a Player or an int."); - AddBreathLossMult(castPlayer(args[1]), breathLossMult); - return null; - case "BreathTick": case "AbyssBreathTick": case "AddBreathTick": diff --git a/NPCs/Abyss/GiantSquid.cs b/NPCs/Abyss/GiantSquid.cs index 3a5ae03dcf..5446678168 100644 --- a/NPCs/Abyss/GiantSquid.cs +++ b/NPCs/Abyss/GiantSquid.cs @@ -2,6 +2,8 @@ using System.IO; using CalamityMod.BiomeManagers; using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Cooldowns; +using CalamityMod.Items.Accessories; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Banners; using CalamityMod.World; @@ -258,6 +260,7 @@ namespace CalamityMod.NPCs.Abyss { var postLevi = npcLoot.DefineConditionalDropSet(DropHelper.PostLevi()); npcLoot.Add(ItemDropRule.NormalvsExpert(ItemID.Blindfold, 100, 50)); + npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType(), 10, 5)); postLevi.Add(DropHelper.NormalVsExpertQuantity(ModContent.ItemType(), 2, 2, 4, 3, 6)); } diff --git a/NPCs/AcidRain/AcidEel.cs b/NPCs/AcidRain/AcidEel.cs index feba4c4c47..cf7c74ef66 100644 --- a/NPCs/AcidRain/AcidEel.cs +++ b/NPCs/AcidRain/AcidEel.cs @@ -103,9 +103,6 @@ namespace CalamityMod.NPCs.AcidRain { NPC.TargetClosest(false); - // Fall through platforms. - NPC.Calamity().ShouldFallThroughPlatforms = true; - // Play a slither sound from time to time. if (Main.rand.NextBool(480)) SoundEngine.PlaySound(SoundID.Zombie32, NPC.Center); @@ -169,6 +166,8 @@ namespace CalamityMod.NPCs.AcidRain NPC.velocity.X = (NPC.velocity.X * 24f + NPC.direction * swimSpeed) / 25f; } + public override bool? CanFallThroughPlatforms() => true; + public override void ModifyNPCLoot(NPCLoot npcLoot) { npcLoot.Add(ModContent.ItemType(), 2, 1, 3); diff --git a/NPCs/AquaticScourge/AquaticScourgeBody.cs b/NPCs/AquaticScourge/AquaticScourgeBody.cs index b7f421f08c..0e2dd6efac 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBody.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBody.cs @@ -168,7 +168,6 @@ namespace CalamityMod.NPCs.AquaticScourge NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; // Fire teeth diff --git a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs index 39a070170d..fb580c1f23 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs @@ -167,7 +167,6 @@ namespace CalamityMod.NPCs.AquaticScourge NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; // Kill body and tail diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index 37f7762972..b87098a280 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -306,7 +306,6 @@ namespace CalamityMod.NPCs.AquaticScourge NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; // Spawn segments diff --git a/NPCs/AquaticScourge/AquaticScourgeTail.cs b/NPCs/AquaticScourge/AquaticScourgeTail.cs index 2b49366863..4da7ca173c 100644 --- a/NPCs/AquaticScourge/AquaticScourgeTail.cs +++ b/NPCs/AquaticScourge/AquaticScourgeTail.cs @@ -165,7 +165,6 @@ namespace CalamityMod.NPCs.AquaticScourge NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; // Kill body and tail diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs index 1dff906636..0a9463a6f0 100644 --- a/NPCs/AstrumAureus/AstrumAureus.cs +++ b/NPCs/AstrumAureus/AstrumAureus.cs @@ -1083,6 +1083,7 @@ namespace CalamityMod.NPCs.AstrumAureus NPC.velocity.Y = maxFallSpeed; } } + public override bool? CanFallThroughPlatforms() => NPC.target >= 0 && Main.player[NPC.target].position.Y > NPC.position.Y + NPC.height; public override void FindFrame(int frameHeight) { diff --git a/NPCs/Bumblebirb/Dragonfolly.cs b/NPCs/Bumblebirb/Dragonfolly.cs index e7953a25ee..bc5889e23d 100644 --- a/NPCs/Bumblebirb/Dragonfolly.cs +++ b/NPCs/Bumblebirb/Dragonfolly.cs @@ -148,7 +148,6 @@ namespace CalamityMod.NPCs.Bumblebirb NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; // If target is outside the jungle for more than 5 seconds, enrage diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index b574036879..7516c3ad75 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -188,8 +188,6 @@ namespace CalamityMod.NPCs public float velocityPriorToPhaseSwap = 0f; public const float velocityPriorToPhaseSwapIncrement = 0.1f; - public bool ShouldFallThroughPlatforms; - /// Allows hostile NPCs to deal defense damage to the player, used mostly for hard-hitting bosses. public bool canBreakPlayerDefense = false; @@ -296,7 +294,6 @@ namespace CalamityMod.NPCs public int tSad = 0; public int eutrophication = 0; public int webbed = 0; - public int slowed = 0; public int electrified = 0; public int pearlAura = 0; /// @@ -556,8 +553,6 @@ namespace CalamityMod.NPCs myClone.velocityPriorToPhaseSwap = velocityPriorToPhaseSwap; - myClone.ShouldFallThroughPlatforms = ShouldFallThroughPlatforms; - myClone.canBreakPlayerDefense = canBreakPlayerDefense; myClone.miscDefenseLoss = miscDefenseLoss; @@ -593,7 +588,6 @@ namespace CalamityMod.NPCs myClone.tSad = tSad; myClone.eutrophication = eutrophication; myClone.webbed = webbed; - myClone.slowed = slowed; myClone.electrified = electrified; myClone.pearlAura = pearlAura; myClone.pearlAuraCounter = pearlAuraCounter; @@ -1655,8 +1649,6 @@ namespace CalamityMod.NPCs public override void SetDefaults(NPC npc) { - ShouldFallThroughPlatforms = false; - for (int i = 0; i < maxPlayerImmunities; i++) dashImmunityTime[i] = 0; @@ -1917,7 +1909,8 @@ namespace CalamityMod.NPCs } else if (npc.type <= NPCID.PrimeLaser && npc.type >= NPCID.PrimeCannon) { - npc.lifeMax = (int)Math.Round(npc.lifeMax * 0.55); + npc.lifeMax = (int)Math.Round(npc.lifeMax * 0.65); + npc.scale = 1.15f; } else if (npc.type == NPCID.Retinazer || npc.type == NPCID.Spazmatism) { @@ -5516,8 +5509,6 @@ namespace CalamityMod.NPCs eutrophication--; if (webbed > 0) webbed--; - if (slowed > 0) - slowed--; if (vaporfied > 0) vaporfied--; @@ -5897,9 +5888,6 @@ namespace CalamityMod.NPCs velocitySlownessFactor += baseSlownessFactor; } - if (slowed > 0) - velocitySlownessFactor += 0.05f; - if (tesla > 0) { float baseSlownessFactor = 0.05f; @@ -7374,11 +7362,6 @@ namespace CalamityMod.NPCs // If the doll is active, Voodoo Demons cannot spawn (via modded means). if (voodooDemonDollActive) pool.Remove(NPCID.VoodooDemon); - // Otherwise, if it's pre-Hardmode, provide a modded spawn entry that makes them much more common. - else if (!Main.hardMode && spawnInfo.Player.ZoneUnderworldHeight && !calamityBiomeZone) - { - pool[NPCID.VoodooDemon] = SpawnCondition.Underworld.Chance * 0.15f; - } } #endregion @@ -7647,21 +7630,6 @@ namespace CalamityMod.NPCs Dust.NewDustDirect(npc.position, npc.width, npc.height, DustID.Electric, Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f), 0, default, 0.35f); } } - if (slowed > 0) - { - if (Main.rand.Next(5) < 4) - { - int dust = Dust.NewDust(npc.position - new Vector2(2f, 2f), npc.width + 4, npc.height + 4, DustID.SpookyWood, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 225, default, 3f); - Main.dust[dust].noGravity = true; - Main.dust[dust].velocity *= 1.1f; - Main.dust[dust].velocity.Y += 0.25f; - if (Main.rand.NextBool()) - { - Main.dust[dust].noGravity = false; - Main.dust[dust].scale *= 0.5f; - } - } - } if (webbed > 0) { if (Main.rand.Next(5) < 4) @@ -7894,8 +7862,6 @@ namespace CalamityMod.NPCs currentDebuffs.Add(TextureAssets.Buff[BuffID.Confused].Value); if (npc.ichor) currentDebuffs.Add(TextureAssets.Buff[BuffID.Ichor].Value); - if (slowed > 0) - currentDebuffs.Add(TextureAssets.Buff[BuffID.Slow].Value); if (webbed > 0) currentDebuffs.Add(TextureAssets.Buff[BuffID.Webbed].Value); if (npc.midas) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index dbf3e92fce..e866e2769c 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -75,7 +75,6 @@ namespace CalamityMod.NPCs }; private static readonly string[] ArmsDealerNames = { - "Drifter", "Finchi", "Heniek", // <@!363404700445442050> (kazurgundu) "Fire", // <@!354362326947856384> (ultimatefirewaster) @@ -90,6 +89,7 @@ namespace CalamityMod.NPCs { "Joeseph Jostar", "Storm Havik", // <@!1013452363178197072> (fishnotduck) + "Magorfis Splunt the Greater Finklejim", // <@!147490809334333440> (eidolbyssus) }; private static readonly string[] CyborgNames = { @@ -192,7 +192,6 @@ namespace CalamityMod.NPCs }; private static readonly string[] PrincessNames = { - "Catalyst", // <@!156672312425316352> (xaqult) "Nyapano", // <@!120976656826368003> (nyapano) "Jade", // <@!187395834625785869> (verymasterninja) "Nyavi Aceso", // <@!270260920888852480> (navigator.) @@ -222,6 +221,7 @@ namespace CalamityMod.NPCs "Linn", // <@!277983612383526913> (duckycolors) "Eira", // <@!1166136068408623234> (taela_gemetha) "Kreutz", // <@!553445849149997056> (red_r_kreutz) + "Cathlyn", // <@!156672312425316352> (xaqult) }; private static readonly string[] StylistNames = { diff --git a/NPCs/CeaselessVoid/CeaselessVoid.cs b/NPCs/CeaselessVoid/CeaselessVoid.cs index fafff6489f..feb32e1d75 100644 --- a/NPCs/CeaselessVoid/CeaselessVoid.cs +++ b/NPCs/CeaselessVoid/CeaselessVoid.cs @@ -28,6 +28,7 @@ using Terraria.GameContent.ItemDropRules; using Terraria.ID; using Terraria.ModLoader; using static Terraria.ModLoader.ModContent; +using CalamityMod.UI; namespace CalamityMod.NPCs.CeaselessVoid { @@ -41,6 +42,8 @@ namespace CalamityMod.NPCs.CeaselessVoid public bool playedbuildsound = false; + public bool madeItToLocation = true; + public override void SetStaticDefaults() { Main.npcFrameCount[Type] = 6; @@ -222,7 +225,7 @@ namespace CalamityMod.NPCs.CeaselessVoid float projectileFireRateMultiplier = MathHelper.Lerp(0.5f, 1.5f, 1f - ((tileEnrageMult - 1f) / 0.5f)); // Decides whether Ceaseless moves closer to its target or not - float distanceRequiredToMove = (CalamityWorld.LegendaryMode || !anyDarkEnergies) ? 320f : bossRush ? 600f : 720f; + float distanceRequiredToMove = CalamityWorld.LegendaryMode ? 300f : 720f; bool move = Vector2.Distance(NPC.Center, player.Center) > distanceRequiredToMove || !Collision.CanHit(NPC.Center, 1, 1, player.Center, 1, 1); // Succ attack @@ -462,8 +465,11 @@ namespace CalamityMod.NPCs.CeaselessVoid { // Avoid cheap bullshit NPC.damage = 0; - if (move) + { + madeItToLocation = false; + } + if (!madeItToLocation) { Movement(false); } @@ -540,6 +546,13 @@ namespace CalamityMod.NPCs.CeaselessVoid acceleration *= 2f; } + if (!madeItToLocation) + { + + velocity *= 2f; + acceleration *= 5f; + } + if (CalamityWorld.LegendaryMode) { velocity *= 1.15f; @@ -551,7 +564,7 @@ namespace CalamityMod.NPCs.CeaselessVoid // Move between 8 different positions around the player, in order float maxDistance = 320f; Vector2 moveToOffset = succ ? Vector2.Zero : CalamityWorld.LegendaryMode ? new Vector2(0f, -maxDistance) : Vector2.Zero; - if (!succ && CalamityWorld.LegendaryMode) + if ((!succ && CalamityWorld.LegendaryMode) || !madeItToLocation) { // Move to a new location every few seconds calamityGlobalNPC.newAI[2] += 1f; @@ -564,37 +577,7 @@ namespace CalamityMod.NPCs.CeaselessVoid if (NPC.ai[0] > 7f) NPC.ai[0] = 0f; } - - switch ((int)NPC.ai[0]) - { - case 0: - break; - case 1: - moveToOffset.X = -maxDistance; - break; - case 2: - moveToOffset.X = -maxDistance; - moveToOffset.Y = 0f; - break; - case 3: - moveToOffset.X = -maxDistance; - moveToOffset.Y = maxDistance; - break; - case 4: - moveToOffset.Y = maxDistance; - break; - case 5: - moveToOffset.X = maxDistance; - moveToOffset.Y = maxDistance; - break; - case 6: - moveToOffset.X = maxDistance; - moveToOffset.Y = 0f; - break; - case 7: - moveToOffset.X = maxDistance; - break; - } + moveToOffset += new Vector2(maxDistance, 0).RotatedBy(NPC.ai[0] / 8f * MathHelper.TwoPi); } destination += moveToOffset; @@ -603,8 +586,12 @@ namespace CalamityMod.NPCs.CeaselessVoid Vector2 distanceFromDestination = destination - NPC.Center; // Movement - if (NPC.Distance(destination) > maxDistance || succ || !CalamityWorld.LegendaryMode) + if (NPC.Distance(destination) > maxDistance || succ || (!CalamityWorld.LegendaryMode && !madeItToLocation)) CalamityUtils.SmoothMovement(NPC, 0f, distanceFromDestination, velocity, acceleration, true); + if (NPC.Distance(destination) < 80) + { + madeItToLocation = true; + } } // Spawn more Dark Energies as the fight progresses @@ -631,6 +618,7 @@ namespace CalamityMod.NPCs.CeaselessVoid { if (phase4) { + madeItToLocation = false; for (int i = 0; i < darkEnergyAmt; i++) { for (int j = 0; j < 3; j++) @@ -641,6 +629,7 @@ namespace CalamityMod.NPCs.CeaselessVoid } else if (phase3) { + madeItToLocation = false; for (int i = 0; i < darkEnergyAmt; i++) { for (int j = 0; j < 3; j++) @@ -651,6 +640,7 @@ namespace CalamityMod.NPCs.CeaselessVoid } else { + madeItToLocation = false; for (int i = 0; i < darkEnergyAmt; i++) { for (int j = 0; j < 3; j++) diff --git a/NPCs/Crabulon/Crabulon.cs b/NPCs/Crabulon/Crabulon.cs index 4e6a2a0bc7..7b35903364 100644 --- a/NPCs/Crabulon/Crabulon.cs +++ b/NPCs/Crabulon/Crabulon.cs @@ -1003,6 +1003,7 @@ namespace CalamityMod.NPCs.Crabulon } } } + public override bool? CanFallThroughPlatforms() => NPC.target >= 0 && Main.player[NPC.target].position.Y > NPC.position.Y + NPC.height; // Can only hit the target if within certain distance public override bool CanHitPlayer(Player target, ref int cooldownSlot) diff --git a/NPCs/DraedonLabThings/RepairUnitCritter.cs b/NPCs/DraedonLabThings/RepairUnitCritter.cs index 9134f87a5f..767b505105 100644 --- a/NPCs/DraedonLabThings/RepairUnitCritter.cs +++ b/NPCs/DraedonLabThings/RepairUnitCritter.cs @@ -124,7 +124,6 @@ namespace CalamityMod.NPCs.DraedonLabThings Initialized = true; } - NPC.Calamity().ShouldFallThroughPlatforms = false; switch (CurrentState) { case BehaviorState.WalkAround: @@ -147,6 +146,7 @@ namespace CalamityMod.NPCs.DraedonLabThings } } } + public override bool? CanFallThroughPlatforms() => CurrentState == BehaviorState.WalkOnWalls; public void WalkAroundOnGround() { @@ -263,7 +263,6 @@ namespace CalamityMod.NPCs.DraedonLabThings { StuckCount = 0f; WantsToClimbOnSomeWall = false; - NPC.Calamity().ShouldFallThroughPlatforms = true; // Generate unusual movement patterns based on sines. float offsetAngle = CalamityUtils.AperiodicSin(Time / 360f, 0f, 1f) * 0.006f; diff --git a/NPCs/HiveMind/DarkHeart.cs b/NPCs/HiveMind/DarkHeart.cs index fa19aa7ce7..7bc1613875 100644 --- a/NPCs/HiveMind/DarkHeart.cs +++ b/NPCs/HiveMind/DarkHeart.cs @@ -73,6 +73,15 @@ namespace CalamityMod.NPCs.HiveMind if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) NPC.TargetClosest(); + // Despawn if Hive Mind isn't present + if (CalamityGlobalNPC.hiveMind == -1) + { + NPC.life = 0; + NPC.HitEffect(); + NPC.checkDead(); + NPC.active = false; + } + float velocity = CalamityWorld.LegendaryMode ? 10f : death ? 7f : revenge ? 6f : 4f; float acceleration = CalamityWorld.LegendaryMode ? 0.5f : death ? 0.35f : revenge ? 0.3f : 0.2f; float deceleration = CalamityWorld.LegendaryMode ? 0.9f : death ? 0.95f : revenge ? 0.96f : 0.98f; diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index 502ed02e56..4d73ca3def 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -55,7 +55,7 @@ namespace CalamityMod.NPCs.HiveMind // This block of values can be modified in SetDefaults() based on difficulty mode or something private int biomeEnrageTimer = CalamityGlobalNPC.biomeEnrageTimerMax; - private int burrowTimer = 420; + private int burrowTimer = 120; private int minimumDriftTime = 300; private int teleportRadius = 300; private int decelerationTime = 30; @@ -147,7 +147,7 @@ namespace CalamityMod.NPCs.HiveMind NPC.height = frameHeight_P1; NPC.defense = 8; - NPC.LifeMaxNERB(7700, 9200, 350000); + NPC.LifeMaxNERB(6150, 7350, 350000); NPC.aiStyle = -1; AIType = -1; NPC.knockBackResist = 0f; @@ -613,7 +613,7 @@ namespace CalamityMod.NPCs.HiveMind if (Main.netMode != NetmodeID.MultiplayerClient) { - int maxSpawns = bossRush ? 16 : death ? 8 : revenge ? 6 : expertMode ? Main.rand.Next(4, 6) : Main.rand.Next(3, 5); + int maxSpawns = bossRush ? 10 : death ? 5 : revenge ? 4 : expertMode ? Main.rand.Next(3, 5) : Main.rand.Next(2, 4); int maxDankSpawns = bossRush ? 4 : death ? Main.rand.Next(2, 4) : revenge ? 2 : expertMode ? Main.rand.Next(1, 3) : 1; for (int i = 0; i < maxSpawns; i++) @@ -743,8 +743,8 @@ namespace CalamityMod.NPCs.HiveMind { case 0: // Slowdrift - // Avoid cheap bullshit - NPC.damage = 0; + // Set damage + NPC.damage = NPC.defDamage; if (NPC.alpha > 0) { @@ -1289,13 +1289,6 @@ namespace CalamityMod.NPCs.HiveMind { if (Main.netMode != NetmodeID.MultiplayerClient) { - if (Main.rand.NextBool(15)) - { - int hiveBlobCount = NPC.CountNPCS(ModContent.NPCType()) + NPC.CountNPCS(ModContent.NPCType()); - if (hiveBlobCount < 3) - NPC.NewNPC(NPC.GetSource_FromThis(), (int)NPC.Center.X, (int)NPC.Center.Y, Main.rand.NextBool() ? ModContent.NPCType() : ModContent.NPCType()); - } - if (Main.rand.NextBool(30)) { if (NPC.CountNPCS(NPCID.EaterofSouls) < 2) diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index 61310b6b58..3aa8163835 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -228,7 +228,6 @@ namespace CalamityMod.NPCs.Leviathan NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; // Despawn diff --git a/NPCs/NormalNPCs/BloodlettingServant.cs b/NPCs/NormalNPCs/BloodlettingServant.cs deleted file mode 100644 index 21cbc7976d..0000000000 --- a/NPCs/NormalNPCs/BloodlettingServant.cs +++ /dev/null @@ -1,326 +0,0 @@ -using System; -using CalamityMod.Events; -using CalamityMod.Gores; -using CalamityMod.NPCs.VanillaNPCAIOverrides.RegularEnemies; -using CalamityMod.Projectiles.Boss; -using CalamityMod.World; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.GameContent; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.NPCs.NormalNPCs -{ - public class BloodlettingServant : ModNPC - { - private const float ChargeGateValue = 180f; - private const float ChargeTelegraphGateValue = 90f; - private const float ChargeDuration = 60f; - private const float ChargeDuration_Death = 50f; - - public override void SetStaticDefaults() - { - Main.npcFrameCount[Type] = 6; - NPCID.Sets.TrailingMode[Type] = 1; - NPCID.Sets.NPCBestiaryDrawModifiers bestiaryData = new NPCID.Sets.NPCBestiaryDrawModifiers() { Hide = true }; - NPCID.Sets.NPCBestiaryDrawOffset.Add(Type, bestiaryData); - } - - public override void SetDefaults() - { - NPC.aiStyle = -1; - AIType = -1; - NPC.GetNPCDamage(); - NPC.width = 44; - NPC.height = 30; - if (Main.tenthAnniversaryWorld) - NPC.scale *= 0.5f; - if (CalamityWorld.LegendaryMode) - NPC.scale *= 1.1f; - - NPC.defense = 5; - NPC.lifeMax = 96; - NPC.knockBackResist = 0f; - NPC.noGravity = true; - NPC.noTileCollide = true; - NPC.HitSound = SoundID.NPCHit1; - NPC.DeathSound = SoundID.NPCDeath1; - NPC.Calamity().VulnerableToCold = true; - NPC.Calamity().VulnerableToHeat = true; - NPC.Calamity().VulnerableToSickness = true; - } - - public override void AI() - { - Lighting.AddLight(NPC.Center, 0.3f, 0.3f, 0.3f); - - NPC.TargetClosest(); - Player target = Main.player[NPC.target]; - bool targetDead = target.dead; - - bool phase2 = NPC.life < NPC.lifeMax * 0.5; - float enrageScale = 1f + NPC.ai[2]; - - float enrageScaleMaxSpeedBonus = 2f * enrageScale; - float maxSpeedX = (phase2 ? (CalamityWorld.death ? 10f : 8f) : (CalamityWorld.death ? 8f : 6f)) + enrageScaleMaxSpeedBonus; - float maxSpeedY = (phase2 ? (CalamityWorld.death ? 8f : 6f) : (CalamityWorld.death ? 4f : 3f)) + enrageScaleMaxSpeedBonus; - float xAccel = maxSpeedX * 0.01f; - float xAccelBoost1 = maxSpeedX * 0.01f; - float xAccelBoost2 = maxSpeedX * 0.0075f; - float yAccel = maxSpeedY * 0.01f; - float yAccelBoost1 = maxSpeedY * 0.01f; - float yAccelBoost2 = maxSpeedY * 0.0075f; - - float chargeVelocity = 12f + enrageScaleMaxSpeedBonus * 2f; - bool attemptingToCharge = NPC.ai[0] >= ChargeGateValue; - bool farEnoughForCharge = NPC.Distance(target.Center) >= 320f; - bool closeEnoughForCharge = NPC.Distance(target.Center) < 480f; - bool charging = (attemptingToCharge && farEnoughForCharge && closeEnoughForCharge) || NPC.ai[1] > 0f; - - float projectileShootGateValue = CalamityWorld.death ? 180f : 270f; - if (CalamityWorld.LegendaryMode) - projectileShootGateValue *= 0.5f; - - Vector2 lookAt = target.Center - NPC.Center; - float rateOfRotation = charging ? 0f : 0.1f; - float chargeDuration = CalamityWorld.death ? ChargeDuration_Death : ChargeDuration; - NPC.Calamity().canBreakPlayerDefense = charging; - if (charging) - { - if (NPC.ai[1] == 0f) - { - SoundEngine.PlaySound(SoundID.NPCDeath9, NPC.Center); - NPC.velocity = lookAt.SafeNormalize(Vector2.UnitY) * chargeVelocity; - NPC.spriteDirection = lookAt.X < 0f ? -1 : 1; - NPC.rotation = NPC.velocity.ToRotation() + (lookAt.X < 0f ? MathHelper.Pi : 0f); - - NPC.ai[1] = 1f; - if (NPC.ai[3] > projectileShootGateValue * 0.5f) - NPC.ai[3] = projectileShootGateValue * 0.5f; - - NPC.ForceNetUpdate(); - } - - if (NPC.ai[1] < ChargeDuration + 1f) - { - NPC.ai[1] += 1f; - if (NPC.ai[1] > ChargeDuration + 1f - 10f) - NPC.velocity *= 0.8f; - - if (NPC.ai[1] >= ChargeDuration + 1f) - { - NPC.ai[0] = 0f; - NPC.ai[1] = 0f; - NPC.ForceNetUpdate(); - } - } - } - else - { - if (lookAt.X > 0f) - { - NPC.spriteDirection = 1; - NPC.rotation = lookAt.ToRotation(); - } - if (lookAt.X < 0f) - { - NPC.spriteDirection = -1; - NPC.rotation = lookAt.ToRotation() + MathHelper.Pi; - } - } - - if (phase2) - { - NPC.damage = (int)Math.Round(NPC.defDamage * 1.3); - - if (NPC.ai[0] < ChargeGateValue && !targetDead) - { - NPC.ai[0] += 1f; - if (NPC.ai[0] == ChargeGateValue) - NPC.ForceNetUpdate(); - } - } - else - NPC.damage = NPC.defDamage; - - if (targetDead) - { - NPC.velocity.Y -= 0.04f; - - if (NPC.timeLeft > 10) - NPC.timeLeft = 10; - } - else if (!attemptingToCharge) - { - DemonEyeAI.DemonEyeBatMovement(NPC, maxSpeedX, maxSpeedY, xAccel, xAccelBoost1, xAccelBoost2, yAccel, yAccelBoost1, yAccelBoost2); - - NPC.ai[3] += enrageScale; - bool shootProjectile = Collision.CanHitLine(NPC.Center, 1, 1, target.Center, 1, 1) && Vector2.Distance(NPC.Center, target.Center) > 240f; - if (NPC.ai[3] >= projectileShootGateValue && shootProjectile) - { - NPC.ai[3] = 0f; - float projectileSpeed = CalamityWorld.death ? 16f : 12f; - Vector2 projectileVelocity = NPC.SafeDirectionTo(target.Center) * projectileSpeed; - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int projType = ProjectileID.BloodShot; - int projDamage = NPC.GetProjectileDamage(projType); - int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + projectileVelocity.SafeNormalize(Vector2.UnitY) * 10f, projectileVelocity, projType, projDamage, 0f, Main.myPlayer); - Main.projectile[proj].timeLeft = 600; - } - - NPC.ForceNetUpdate(); - } - - float pushVelocity = 0.2f * enrageScale; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active) - { - if (i != NPC.whoAmI && Main.npc[i].type == NPC.type) - { - if (Vector2.Distance(NPC.Center, Main.npc[i].Center) < 48f * NPC.scale) - { - if (NPC.position.X < Main.npc[i].position.X) - NPC.velocity.X -= pushVelocity; - else - NPC.velocity.X += pushVelocity; - - if (NPC.position.Y < Main.npc[i].position.Y) - NPC.velocity.Y -= pushVelocity; - else - NPC.velocity.Y += pushVelocity; - } - } - } - } - } - else if (!charging) - { - Vector2 destination = target.Center + new Vector2(-280f * NPC.spriteDirection, -280f); - Vector2 desiredVelocity = NPC.SafeDirectionTo(destination, -Vector2.UnitY) * chargeVelocity; - NPC.SimpleFlyMovement(desiredVelocity, enrageScale); - } - - if (Main.rand.NextBool(20)) - { - Vector2 dustSpawnTopLeft = new Vector2(NPC.position.X, NPC.position.Y + NPC.height * 0.25f); - Dust blood = Dust.NewDustDirect(dustSpawnTopLeft, NPC.width, NPC.height / 2, DustID.Blood, NPC.velocity.X, 2f, 0, new Color(128, 0, 0, 255 - NPC.alpha), 1f); - blood.velocity.X *= 0.5f; - blood.velocity.Y *= 0.1f; - } - } - - public override void FindFrame(int frameHeight) - { - NPC.frameCounter += 1D; - if (NPC.life < NPC.lifeMax * 0.5) - { - if (NPC.frame.Y < frameHeight * 3) - NPC.frame.Y = frameHeight * 3; - if (NPC.frameCounter >= 8D) - { - NPC.frameCounter = 0D; - NPC.frame.Y += frameHeight; - if (NPC.frame.Y > frameHeight * 5) - NPC.frame.Y = frameHeight * 3; - } - } - else - { - if (NPC.frameCounter >= 8D) - { - NPC.frameCounter = 0D; - NPC.frame.Y += frameHeight; - if (NPC.frame.Y > frameHeight * 2) - NPC.frame.Y = 0; - } - } - } - - public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) - { - if (NPC.ai[0] >= ChargeTelegraphGateValue) - { - Texture2D npcTexture = TextureAssets.Npc[Type].Value; - Color originalColor = NPC.GetAlpha(drawColor); - Color newColor = new Color(192, 0, 0, 255 - NPC.alpha); - Vector2 drawPosition = NPC.Center - screenPos + new Vector2(0, NPC.gfxOffY); - Vector2 origin = NPC.frame.Size() / 2; - - SpriteEffects spriteEffects = SpriteEffects.None; - if (NPC.spriteDirection == 1) - spriteEffects = SpriteEffects.FlipHorizontally; - - float telegraphScalar = MathHelper.Clamp((NPC.ai[0] - ChargeTelegraphGateValue) / ChargeTelegraphGateValue, 0f, 1f); - Color telegraphColor = Color.Lerp(originalColor, newColor, telegraphScalar); - - if (CalamityClientConfig.Instance.Afterimages && NPC.ai[1] > 0f) - { - int afterimageAmount = 10; - int afterImageIncrement = 2; - for (int j = 0; j < afterimageAmount; j += afterImageIncrement) - { - Color afterimageColor = telegraphColor; - afterimageColor = Color.Lerp(afterimageColor, originalColor, 0.5f); - afterimageColor = NPC.GetAlpha(afterimageColor); - afterimageColor *= (afterimageAmount - j) / 15f; - Vector2 afterimagePos = NPC.oldPos[j] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2(npcTexture.Width, npcTexture.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; - afterimagePos += origin * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(npcTexture, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, origin, NPC.scale, spriteEffects, 0f); - } - } - - spriteBatch.Draw(npcTexture, drawPosition, NPC.frame, telegraphColor, NPC.rotation, origin, NPC.scale, spriteEffects, 0f); - - return false; - } - - return true; - } - - public override void HitEffect(NPC.HitInfo hit) - { - if (Main.dedServ) - return; - - if (NPC.life > 0) - { - for (int i = 0; i < hit.Damage / (double)NPC.lifeMax * 100; i++) - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f); - - if (NPC.life < NPC.lifeMax * 0.5f && NPC.localAI[0] == 0f) - { - NPC.localAI[0] = 1f; - Gore.NewGore(NPC.GetSource_FromThis(), NPC.Center, NPC.velocity, Mod.Find("BloodlettingServant1").Type); - for (int i = 0; i < 50; i++) - { - int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 2f * hit.HitDirection, -2f); - Main.dust[dust].scale = Main.rand.NextFloat(1.6f, 2.4f); - Main.dust[dust].velocity *= Main.rand.NextFloat(1.6f, 2.4f); - Main.dust[dust].color = new Color(128, 0, 0, 255 - NPC.alpha); - } - } - } - else - { - for (int i = 0; i < 100; i++) - { - int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 2f * hit.HitDirection, -2f); - Main.dust[dust].scale = Main.rand.NextFloat(1.6f, 2.4f); - Main.dust[dust].velocity *= Main.rand.NextFloat(1.6f, 2.4f); - Main.dust[dust].color = new Color(128, 0, 0, 255 - NPC.alpha); - } - for (int g = 2; g <= 4; g++) - { - Vector2 goreVel = NPC.velocity.RotatedByRandom(MathHelper.Pi); - Gore.NewGore(NPC.GetSource_Death(), NPC.Center, goreVel, Mod.Find("BloodlettingServant" + g).Type); - } - } - } - } -} diff --git a/NPCs/NormalNPCs/BloodlettingServant.png b/NPCs/NormalNPCs/BloodlettingServant.png deleted file mode 100644 index 5bb5258c6c..0000000000 Binary files a/NPCs/NormalNPCs/BloodlettingServant.png and /dev/null differ diff --git a/NPCs/NormalNPCs/ScornEater.cs b/NPCs/NormalNPCs/ScornEater.cs index 343fafa2b4..f7ad22012d 100644 --- a/NPCs/NormalNPCs/ScornEater.cs +++ b/NPCs/NormalNPCs/ScornEater.cs @@ -42,7 +42,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.defense = 38; NPC.DR_NERD(0.05f); NPC.lifeMax = 9000; - NPC.knockBackResist = 0.1f; + NPC.knockBackResist = 0f; AIType = -1; NPC.lavaImmune = true; NPC.value = Item.buyPrice(0, 0, 75, 0); @@ -79,8 +79,6 @@ namespace CalamityMod.NPCs.NormalNPCs if (NPC.velocity.Y == 0f) { - NPC.knockBackResist = 0f; - // Avoid cheap bullshit NPC.damage = 0; @@ -141,8 +139,6 @@ namespace CalamityMod.NPCs.NormalNPCs } else { - NPC.knockBackResist = 0.1f; - if (NPC.direction == 1 && NPC.velocity.X < 1f) { NPC.velocity.X += 0.1f; diff --git a/NPCs/Perforator/PerforatorBodyLarge.cs b/NPCs/Perforator/PerforatorBodyLarge.cs index cbc5e97425..db22520def 100644 --- a/NPCs/Perforator/PerforatorBodyLarge.cs +++ b/NPCs/Perforator/PerforatorBodyLarge.cs @@ -44,7 +44,7 @@ namespace CalamityMod.NPCs.Perforator NPC.height = 60; NPC.defense = 8; - NPC.LifeMaxNERB(2700, 3240, 80000); + NPC.LifeMaxNERB(2160, 2600, 80000); if (Main.zenithWorld) NPC.lifeMax *= 4; diff --git a/NPCs/Perforator/PerforatorBodyMedium.cs b/NPCs/Perforator/PerforatorBodyMedium.cs index 04b29437b1..afd7e863d3 100644 --- a/NPCs/Perforator/PerforatorBodyMedium.cs +++ b/NPCs/Perforator/PerforatorBodyMedium.cs @@ -42,7 +42,7 @@ namespace CalamityMod.NPCs.Perforator NPC.height = 40; NPC.defense = 6; - NPC.LifeMaxNERB(180, 216, 7000); + NPC.LifeMaxNERB(144, 172, 7000); if (Main.zenithWorld) NPC.lifeMax *= 4; diff --git a/NPCs/Perforator/PerforatorBodySmall.cs b/NPCs/Perforator/PerforatorBodySmall.cs index 0ef54560de..e4fb6bfe2c 100644 --- a/NPCs/Perforator/PerforatorBodySmall.cs +++ b/NPCs/Perforator/PerforatorBodySmall.cs @@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.Perforator NPC.height = 42; NPC.defense = 4; - NPC.LifeMaxNERB(1200, 1440, 50000); + NPC.LifeMaxNERB(960, 1152, 50000); if (Main.zenithWorld) NPC.lifeMax *= 4; diff --git a/NPCs/Perforator/PerforatorHeadLarge.cs b/NPCs/Perforator/PerforatorHeadLarge.cs index 600cdb43e7..079628ecca 100644 --- a/NPCs/Perforator/PerforatorHeadLarge.cs +++ b/NPCs/Perforator/PerforatorHeadLarge.cs @@ -58,7 +58,7 @@ namespace CalamityMod.NPCs.Perforator NPC.height = 84; NPC.defense = 4; - NPC.LifeMaxNERB(2700, 3240, 80000); + NPC.LifeMaxNERB(2160, 2600, 80000); if (Main.zenithWorld) NPC.lifeMax *= 4; diff --git a/NPCs/Perforator/PerforatorHeadMedium.cs b/NPCs/Perforator/PerforatorHeadMedium.cs index 2638f557a3..73444f1ff0 100644 --- a/NPCs/Perforator/PerforatorHeadMedium.cs +++ b/NPCs/Perforator/PerforatorHeadMedium.cs @@ -54,7 +54,7 @@ namespace CalamityMod.NPCs.Perforator NPC.height = 68; NPC.defense = 2; - NPC.LifeMaxNERB(180, 216, 7000); + NPC.LifeMaxNERB(144, 172, 7000); if (Main.zenithWorld) NPC.lifeMax *= 4; diff --git a/NPCs/Perforator/PerforatorHeadSmall.cs b/NPCs/Perforator/PerforatorHeadSmall.cs index b0120e825c..9f8fe4cd70 100644 --- a/NPCs/Perforator/PerforatorHeadSmall.cs +++ b/NPCs/Perforator/PerforatorHeadSmall.cs @@ -58,7 +58,7 @@ namespace CalamityMod.NPCs.Perforator NPC.width = 42; NPC.height = 62; - NPC.LifeMaxNERB(1200, 1440, 50000); + NPC.LifeMaxNERB(960, 1152, 50000); if (Main.zenithWorld) NPC.lifeMax *= 4; diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index 4b9461d401..ebbe684f05 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -71,7 +71,7 @@ namespace CalamityMod.NPCs.Perforator NPC.width = 110; NPC.height = 100; NPC.defense = 4; - NPC.LifeMaxNERB(6000, 7200, 270000); + NPC.LifeMaxNERB(4800, 5750, 270000); NPC.aiStyle = -1; AIType = -1; NPC.knockBackResist = 0f; @@ -155,7 +155,6 @@ namespace CalamityMod.NPCs.Perforator // Phases based on life percentage bool phase2 = lifeRatio < 0.7f; - bool phase3 = medium && revenge; // Enrage if ((!player.ZoneCrimson || (NPC.position.Y / 16f) < Main.worldSurface) && !bossRush) @@ -242,11 +241,6 @@ namespace CalamityMod.NPCs.Perforator else wormsAlive = 0; - // Do not spit from side mouth while the large worm is alive - // Death Mode ignores this - if (largeWormAlive && !death) - phase3 = false; - NPC.Calamity().DR = wormsAlive * 0.3f; if (NPC.ai[3] == 0f && NPC.life > 0) @@ -380,9 +374,7 @@ namespace CalamityMod.NPCs.Perforator if (blobVelocity.Y < 2f) blobVelocity.Y = 2f + blobVelocityYAdd; - // Fall a bit further or shorter depending on which blob it is - float fallFurtherDistance = 48f * (i - numBlobs / 2); - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + Vector2.UnitY * 50f, blobVelocity, type, damage, 0f, Main.myPlayer, 0f, player.Center.Y + fallFurtherDistance); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + Vector2.UnitY * 50f, blobVelocity, type, damage, 0f, Main.myPlayer, 0f, player.Center.Y); } } @@ -408,64 +400,6 @@ namespace CalamityMod.NPCs.Perforator return; } - // Side mouth starts spitting when it opens - if (phase3) - { - NPC.localAI[2] += 1f; - if (NPC.frame.Y / (TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type]) == 5 && NPC.localAI[2] >= 0f) - { - // Ensure it only spits once - // Spits half as much while the medium worm is alive - NPC.localAI[2] = mediumWormAlive ? -70f : -10f; - - Vector2 centerOffset = new Vector2(NPC.direction == 1 ? 52f : -52f, -4f); - Vector2 mouthLocation = NPC.Center + centerOffset; - Vector2 spitVelocity = (mouthLocation + (Vector2.UnitX * 100f * NPC.direction) - mouthLocation).SafeNormalize(Vector2.UnitY) * 6f; - - SoundEngine.PlaySound(SoundID.Item17, mouthLocation); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int maxProjectiles = 3; - Vector2 dustSpawnBox = new Vector2(12f, 12f); - Vector2 dustSpawnOffset = dustSpawnBox * 0.5f; - for (int i = 0; i < maxProjectiles; i++) - { - bool ichor = Main.rand.NextBool(); - int type = ichor ? ModContent.ProjectileType() : ModContent.ProjectileType(); - int damage = NPC.GetProjectileDamage(type); - Vector2 randomizedProjectileSpawnLocation = mouthLocation + Main.rand.NextVector2CircularEdge(4f, 4f); - Vector2 randomizedProjectileVelocity = spitVelocity + Main.rand.NextVector2CircularEdge(1.5f, 1.5f); - Projectile.NewProjectile(NPC.GetSource_FromAI(), randomizedProjectileSpawnLocation, randomizedProjectileVelocity, type, damage, 0f, Main.myPlayer, 0f, player.Center.Y); - - float dustSpeed = Main.rand.NextFloat(3.0f, 9.0f); - float angleRandom = 0.05f; - Vector2 dustVelocity = new Vector2(dustSpeed, 0.0f).RotatedBy(randomizedProjectileVelocity.ToRotation()); - dustVelocity = dustVelocity.RotatedBy(-angleRandom); - dustVelocity = dustVelocity.RotatedByRandom(2.0f * angleRandom); - - if (ichor) - { - for (int j = 0; j < 4; j++) - { - int ichorDust = Dust.NewDust(randomizedProjectileSpawnLocation - dustSpawnOffset, (int)dustSpawnBox.X, (int)dustSpawnBox.Y, DustID.Ichor); - Main.dust[ichorDust].velocity = dustVelocity; - } - } - else - { - for (int j = 0; j < 4; j++) - { - int bloodDust = Dust.NewDust(randomizedProjectileSpawnLocation - dustSpawnOffset, (int)dustSpawnBox.X, (int)dustSpawnBox.Y, DustID.Blood); - Main.dust[bloodDust].velocity = dustVelocity; - Main.dust[bloodDust].scale = 2f; - } - } - } - } - } - } - if (Main.netMode != NetmodeID.MultiplayerClient) { NPC.localAI[0] += 1f; @@ -474,24 +408,23 @@ namespace CalamityMod.NPCs.Perforator NPC.localAI[0] = 0f; SoundEngine.PlaySound(GeyserShoot, NPC.Center); - bool ichor = Main.rand.NextBool(); - int type = ichor ? ModContent.ProjectileType() : ModContent.ProjectileType(); - int damage = NPC.GetProjectileDamage(type); int numProj = death ? 16 : revenge ? 14 : expertMode ? 12 : 10; - if (phase3) - numProj = death ? 12 : revenge ? 10 : expertMode ? 8 : 6; if (CalamityWorld.LegendaryMode) numProj *= 2; int spread = 75; float velocity = 8f; Vector2 destination = wormsAlive > 0 ? player.Center : NPC.Center - Vector2.UnitY * 100f; - Vector2 projectileVelocity = new Vector2(Vector2.Normalize(destination - NPC.Center).X * velocity, -velocity); + Vector2 projectileVelocity = new Vector2(Utils.DirectionTo(NPC.Center, destination).X * velocity, -velocity); float rotation = MathHelper.ToRadians(spread); Vector2 dustSpawnBox = new Vector2(12f, 12f); Vector2 dustSpawnOffset = dustSpawnBox * 0.5f; for (int i = 0; i < numProj; i++) { + bool ichor = Main.rand.NextBool(); + int type = ichor ? ModContent.ProjectileType() : ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1))); Vector2 randomVelocity = new Vector2(Main.rand.NextFloat() - 0.5f, Main.rand.NextFloat() - 0.5f); Vector2 projectileSpawnLocation = NPC.Center + Vector2.Normalize(perturbedSpeed) * 50f; diff --git a/NPCs/Perforator/PerforatorTailLarge.cs b/NPCs/Perforator/PerforatorTailLarge.cs index 710b6bf4db..a3a538a28d 100644 --- a/NPCs/Perforator/PerforatorTailLarge.cs +++ b/NPCs/Perforator/PerforatorTailLarge.cs @@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.Perforator NPC.height = 78; NPC.defense = 12; - NPC.LifeMaxNERB(2700, 3240, 80000); + NPC.LifeMaxNERB(2160, 2600, 80000); if (Main.zenithWorld) NPC.lifeMax *= 4; diff --git a/NPCs/Perforator/PerforatorTailMedium.cs b/NPCs/Perforator/PerforatorTailMedium.cs index 1c83b3ec71..f1441e0896 100644 --- a/NPCs/Perforator/PerforatorTailMedium.cs +++ b/NPCs/Perforator/PerforatorTailMedium.cs @@ -42,7 +42,7 @@ namespace CalamityMod.NPCs.Perforator NPC.height = 50; NPC.defense = 10; - NPC.LifeMaxNERB(180, 216, 7000); + NPC.LifeMaxNERB(144, 172, 7000); if (Main.zenithWorld) NPC.lifeMax *= 4; diff --git a/NPCs/Perforator/PerforatorTailSmall.cs b/NPCs/Perforator/PerforatorTailSmall.cs index 433f7586b5..78e5b72c02 100644 --- a/NPCs/Perforator/PerforatorTailSmall.cs +++ b/NPCs/Perforator/PerforatorTailSmall.cs @@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.Perforator NPC.height = 34; NPC.defense = 8; - NPC.LifeMaxNERB(1200, 1440, 50000); + NPC.LifeMaxNERB(960, 1152, 50000); if (Main.zenithWorld) NPC.lifeMax *= 4; diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index ae0563d785..42ac3efb90 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -190,7 +190,6 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; // Light diff --git a/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs b/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs index 43b7bc4470..0fa397c0ba 100644 --- a/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs +++ b/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs @@ -344,7 +344,6 @@ namespace CalamityMod.NPCs.PrimordialWyrm NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; // Adjust opacity diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 617ab71868..90f1bbb7be 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -1388,7 +1388,7 @@ namespace CalamityMod.NPCs.Providence if (!Main.dedServ) { Player player2 = Main.LocalPlayer; - bool inLiquid = (player2.wet || player2.honeyWet) && !player2.lavaWet; + bool inLiquid = player.Calamity().countsAsAnyWet && !player2.lavaWet; if (!player2.dead && player2.active && Vector2.Distance(player2.Center, NPC.Center) < 2800f && !inLiquid) { diff --git a/NPCs/Ravager/FlamePillar.cs b/NPCs/Ravager/FlamePillar.cs index f02a4b6769..2d7125d06c 100644 --- a/NPCs/Ravager/FlamePillar.cs +++ b/NPCs/Ravager/FlamePillar.cs @@ -138,6 +138,7 @@ namespace CalamityMod.NPCs.Ravager } } } + public override bool? CanFallThroughPlatforms() => NPC.target >= 0 && Main.player[NPC.target].position.Y > NPC.position.Y + NPC.height; public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index 8920929cc7..a34a175a5a 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -850,6 +850,7 @@ namespace CalamityMod.NPCs.Ravager } } } + public override bool? CanFallThroughPlatforms() => NPC.target >= 0 && Main.player[NPC.target].position.Y > NPC.position.Y + NPC.height; public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { diff --git a/NPCs/Ravager/RockPillar.cs b/NPCs/Ravager/RockPillar.cs index d983350dde..2c52fdb9d8 100644 --- a/NPCs/Ravager/RockPillar.cs +++ b/NPCs/Ravager/RockPillar.cs @@ -135,7 +135,7 @@ namespace CalamityMod.NPCs.Ravager } } } - + public override bool? CanFallThroughPlatforms() => NPC.target >= 0 && Main.player[NPC.target].position.Y > NPC.position.Y + NPC.height; public override bool CheckActive() => false; public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo) diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index 42f3e8c2fa..ce90a162f8 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -60,7 +60,6 @@ namespace CalamityMod.NPCs.SlimeGod public static readonly SoundStyle ShotSound = new("CalamityMod/Sounds/Custom/SlimeGodShot", 2); public static readonly SoundStyle BigShotSound = new("CalamityMod/Sounds/Custom/SlimeGodBigShot", 2); - public static Asset ZenithSeedEyeTexture; public static Asset EyeTexture; public static Asset OverlayTexture; @@ -73,22 +72,10 @@ namespace CalamityMod.NPCs.SlimeGod public override void SetStaticDefaults() { NPCID.Sets.BossBestiaryPriority.Add(Type); - NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() - { - Scale = 0.5f, - PortraitScale = 0.6f, - CustomTexturePath = "CalamityMod/ExtraTextures/Bestiary/SlimeGod_Bestiary", - PortraitPositionXOverride = 40, - PortraitPositionYOverride = 40 - }; - value.Position.X += 65; - value.Position.Y += 35; - NPCID.Sets.NPCBestiaryDrawOffset[Type] = value; NPCID.Sets.MPAllowedEnemies[Type] = true; if (!Main.dedServ) { - ZenithSeedEyeTexture = ModContent.Request("CalamityMod/NPCs/SlimeGod/SlimeGodEyes", AssetRequestMode.AsyncLoad); EyeTexture = ModContent.Request("CalamityMod/NPCs/SlimeGod/ExtraTextures/SlimeGodCoreEye", AssetRequestMode.AsyncLoad); OverlayTexture = ModContent.Request("CalamityMod/NPCs/SlimeGod/ExtraTextures/SlimeGodCoreOverlay", AssetRequestMode.AsyncLoad); } @@ -636,10 +623,9 @@ namespace CalamityMod.NPCs.SlimeGod Texture2D texture = TextureAssets.Npc[Type].Value; Texture2D eyeTexture = EyeTexture.Value; Texture2D overlayTexture = OverlayTexture.Value; - Texture2D pog = ZenithSeedEyeTexture.Value; // Used for animating the eye - if (NPC.localAI[0] % 6f == 0f) + if (NPC.localAI[0] % 6f == 0f && !NPC.IsABestiaryIconDummy) { eyeFrameDrawn++; if (eyeFrameX == 0) @@ -703,9 +689,6 @@ namespace CalamityMod.NPCs.SlimeGod // Draw the overlay spriteBatch.Draw(overlayTexture, NPC.Center - screenPos + new Vector2(0f, NPC.gfxOffY), NPC.frame, drawColorAlpha, NPC.rotation, origin, NPC.scale, spriteEffects, 0f); - if (Main.zenithWorld) - spriteBatch.Draw(pog, NPC.Center - screenPos + new Vector2(0f, NPC.gfxOffY), NPC.frame, drawColorAlpha, NPC.rotation, origin, NPC.scale, spriteEffects, 0f); - return false; } diff --git a/NPCs/SlimeGod/SlimeGodEyes.png b/NPCs/SlimeGod/SlimeGodEyes.png deleted file mode 100644 index dda0f23656..0000000000 Binary files a/NPCs/SlimeGod/SlimeGodEyes.png and /dev/null differ diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index f82c52dc13..4df9d70e29 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -2063,6 +2063,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.dontTakeDamage = true; NPC.chaseable = false; NPC.damage = 0; + attackPause = 5; if (!canDespawn) NPC.velocity *= 0.95f; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/DeerclopsAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/DeerclopsAI.cs index ddaa634383..c4d0b9f78a 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/DeerclopsAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/DeerclopsAI.cs @@ -171,14 +171,14 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses bool useFrontIceSpikeAttack = Math.Abs(distanceFromTarget2.X) >= Math.Abs(distanceFromTarget2.Y) * distanceCheckMultiplier || distanceFromTarget2.Length() < 48f; bool useEitherIceSpikeAttack = distanceFromTarget2.Y <= (float)(100 + targetData.Height) && distanceFromTarget2.Y >= -200f; - // Can only use ice spikes a maximum of twice in a row before doing something else - float iceSpikeAttackLimit = 2f; + // Can only use ice spikes a maximum of three times in a row before doing something else + float iceSpikeAttackLimit = 3f; bool doNotUseIceSpikes = calamityGlobalNPC.newAI[1] >= iceSpikeAttackLimit; if (!doNotUseIceSpikes) { // Deerclops must be this close to its target on the X axis to do the ice spike attack // This distance increases at lower HP because the ice spikes get bigger - float iceSpikesDistanceGateValue = 120f + MathHelper.Lerp(0f, 120f, 1f - lifeRatio); + float iceSpikesDistanceGateValue = 120f + MathHelper.Lerp(0f, 60f, 1f - lifeRatio); if (Math.Abs(distanceFromTarget2.X) < iceSpikesDistanceGateValue && useEitherIceSpikeAttack && npc.velocity.Y == 0f && npc.localAI[1] >= 2f) { npc.velocity.X = 0f; @@ -206,9 +206,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } } - // Can only use rubble a maximum of thrice in a row before doing something else - // This also takes into account the ice spike limit - float rubbleAttackLimit = 3f; + // Can only use rubble and ice spikes a maximum of four times in a row before doing something else + float rubbleAttackLimit = 4f; bool doNotUseRubble = calamityGlobalNPC.newAI[1] >= rubbleAttackLimit; float rubbleGateValue = death ? 160f : 200f; if (!doNotUseRubble) @@ -408,16 +407,16 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.TargetClosest(); if (Main.netMode != NetmodeID.MultiplayerClient) { - int totalProjectiles = (death ? 11 : 9) + (int)MathHelper.Lerp(0f, 7f, 1f - lifeRatio); + int totalProjectiles = (death ? 20 : 16) + (int)MathHelper.Lerp(0f, 7f, 1f - lifeRatio); float velocityMultIncrement = ((totalProjectiles + 1) / (float)totalProjectiles) - 1f; - float randomRadialOffset = MathHelper.ToRadians(MathHelper.Lerp(0f, death ? 360f : 270f, 1f - lifeRatio)); + float randomRadialOffset = Main.rand.NextFloat(MathHelper.ToRadians(MathHelper.Lerp(0f, death ? 360f : 270f, 1f - lifeRatio))); float radians = MathHelper.TwoPi / totalProjectiles + randomRadialOffset; - float velocity = (death ? 10.5f : 8f) + MathHelper.Lerp(0f, 4f, 1f - lifeRatio); + float velocity = 12f + MathHelper.Lerp(0f, 4f, 1f - lifeRatio); Vector2 spinningPoint = new Vector2(0f, -velocity); for (int k = 0; k < totalProjectiles; k++) { Vector2 actualVelocity = spinningPoint.RotatedBy(radians * k); - float velocityMultiplier = 1f - k * velocityMultIncrement; + float velocityMultiplier = 1f - (k * velocityMultIncrement * 0.5f); Projectile.NewProjectile(npc.GetSource_FromAI(), Main.player[npc.target].Center + Vector2.Normalize(actualVelocity) * 550f, actualVelocity * velocityMultiplier * -1f, shadowHand, shadowHandDamage, 0f, Main.myPlayer); } } diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/EyeOfCthulhuAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/EyeOfCthulhuAI.cs index 71ffb3da2d..a7566146c1 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/EyeOfCthulhuAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/EyeOfCthulhuAI.cs @@ -338,16 +338,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses Vector2 servantSpawnCenter = npc.Center + servantSpawnVelocity.SafeNormalize(Vector2.UnitY) * ProjectileOffset; if (Main.netMode != NetmodeID.MultiplayerClient) { - int spawnType = NPCID.ServantofCthulhu; - if (death) - { - int maxBloodServants = 2; - bool spawnBloodServant = NPC.CountNPCS(ModContent.NPCType()) < maxBloodServants; - if (spawnBloodServant) - spawnType = ModContent.NPCType(); - } - - int servantSpawn = NPC.NewNPC(npc.GetSource_FromAI(), (int)servantSpawnCenter.X, (int)servantSpawnCenter.Y, spawnType, 0, 0f, 0f, enrageScale); + int servantSpawn = NPC.NewNPC(npc.GetSource_FromAI(), (int)servantSpawnCenter.X, (int)servantSpawnCenter.Y, NPCID.ServantofCthulhu, 0, 0f, 0f, enrageScale); Main.npc[servantSpawn].velocity.X = servantSpawnVelocity.X; Main.npc[servantSpawn].velocity.Y = servantSpawnVelocity.Y; @@ -759,39 +750,23 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses Vector2 servantSpawnVelocity = (Main.player[npc.target].Center - npc.Center).SafeNormalize(Vector2.UnitY) * servantAndProjectileVelocity; Vector2 servantSpawnCenter = npc.Center + servantSpawnVelocity.SafeNormalize(Vector2.UnitY) * ProjectileOffset; - int spawnType = NPCID.ServantofCthulhu; - bool spawnServant = false; float enrageScaleToPass = enrageScale; - if (death) - { - int maxBloodServants = 2; - bool spawnBloodServant = NPC.CountNPCS(ModContent.NPCType()) < maxBloodServants; - if (spawnBloodServant) - { - spawnType = ModContent.NPCType(); - spawnServant = true; - enrageScaleToPass += 0.5f; - } - else - { - int maxServants = death ? 1 : 2; - spawnServant = (penultimatePhaseDeath || finalPhaseRev) ? false : NPC.CountNPCS(NPCID.ServantofCthulhu) < maxServants; - } - } - else - { - int maxServants = death ? (finalPhaseDeath ? 1 : penultimatePhaseDeath ? 2 : 3) : (finalPhaseRev ? 2 : 4); - spawnServant = NPC.CountNPCS(NPCID.ServantofCthulhu) < maxServants; - } + int maxServants = death ? (finalPhaseDeath ? 1 : penultimatePhaseDeath ? 2 : 3) : (finalPhaseRev ? 2 : 4); + bool spawnServant = NPC.CountNPCS(NPCID.ServantofCthulhu) < maxServants; if (spawnServant) + { SoundEngine.PlaySound(SoundID.NPCDeath13, servantSpawnCenter); + for (int m = 0; m < 10; m++) + Dust.NewDust(servantSpawnCenter, 20, 20, DustID.Blood, servantSpawnVelocity.X * 0.4f, servantSpawnVelocity.Y * 0.4f, 0, default, 1f); + } + if (Main.netMode != NetmodeID.MultiplayerClient) { if (spawnServant) { - int eye = NPC.NewNPC(npc.GetSource_FromAI(), (int)servantSpawnCenter.X, (int)servantSpawnCenter.Y, spawnType, 0, 0f, 0f, enrageScaleToPass); + int eye = NPC.NewNPC(npc.GetSource_FromAI(), (int)servantSpawnCenter.X, (int)servantSpawnCenter.Y, NPCID.ServantofCthulhu, 0, 0f, 0f, enrageScaleToPass); Main.npc[eye].velocity.X = servantSpawnVelocity.X; Main.npc[eye].velocity.Y = servantSpawnVelocity.Y; @@ -821,12 +796,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } } } - - if (spawnServant) - { - for (int m = 0; m < 10; m++) - Dust.NewDust(servantSpawnCenter, 20, 20, DustID.Blood, servantSpawnVelocity.X * 0.4f, servantSpawnVelocity.Y * 0.4f, 0, default, 1f); - } } float requiredDistanceForHorizontalCharge = 160f; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs index 74f818940d..057044ce51 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs @@ -145,7 +145,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - npc.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; npc.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; // Always start in enemy spawning phase diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs index 2a2e1d23b3..e682c73553 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs @@ -149,7 +149,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - npc.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; npc.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; bool normalLaserRotation = npc.localAI[1] % 2f == 0f; diff --git a/Projectiles/Boss/IceBomb.cs b/Projectiles/Boss/IceBomb.cs index ce60e05cb7..4dc005054e 100644 --- a/Projectiles/Boss/IceBomb.cs +++ b/Projectiles/Boss/IceBomb.cs @@ -101,9 +101,6 @@ namespace CalamityMod.Projectiles.Boss { target.AddBuff(BuffID.Frostburn, 180, true); target.AddBuff(BuffID.Chilled, 90, true); - - if (!target.Calamity().gState) - target.AddBuff(ModContent.BuffType(), 60); } } } diff --git a/Projectiles/Boss/PermafrostColdheartIcicle.cs b/Projectiles/Boss/PermafrostColdheartIcicle.cs index f58b5d3119..808004ddb1 100644 --- a/Projectiles/Boss/PermafrostColdheartIcicle.cs +++ b/Projectiles/Boss/PermafrostColdheartIcicle.cs @@ -163,6 +163,6 @@ namespace CalamityMod.Projectiles.Boss // Prevent the crystals from utilizing velocity. Their movement is entirely dependant on Center setting. public override bool ShouldUpdatePosition() => false; - public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 300); + public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(BuffID.Frozen, 300); } } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 15a8d01f24..9a5de3394b 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -2096,7 +2096,7 @@ namespace CalamityMod.Projectiles float dustVelocityMultiplier = 0.75f; int numDust = 5; int numDust2 = 5; - int fadeInTime = 50; + int fadeInTime = 25; int fadeOutGateValue = death ? 90 : 65; float killGateValue = death ? 100f : 75f; int maxFrames = 5; @@ -2131,7 +2131,7 @@ namespace CalamityMod.Projectiles if (fadeIn) { - projectile.Opacity += 0.02f; + projectile.Opacity += 0.04f; if (projectile.Opacity > 1f) projectile.Opacity = 1f; @@ -3293,6 +3293,11 @@ namespace CalamityMod.Projectiles break; } + // Makes flares from Firestorm Cannon ignore gravity + // Spectralstorm Cannon uses a custom flare projectile + if (projectile.aiStyle == ProjAIStyleID.Flare && projectile.ai[2] == 1f && projectile.localAI[0] == 0f) + projectile.localAI[1]--; + // Jack O Lantern Launcher projectile tweak if (projectile.type == ProjectileID.JackOLantern) { @@ -4071,14 +4076,6 @@ namespace CalamityMod.Projectiles projectile.damage = 1; } - // Heat Ray damage falloff - if (projectile.type == ProjectileID.HeatRay && projectile.numHits > 0) - { - projectile.damage = (int)(projectile.damage * 0.9f); - if (projectile.damage < 1) - projectile.damage = 1; - } - // Stardust Wings buff the Stardust Guardian's damage if (player.wingsLogic == (int)VanillaWingID.WingsStardust && projectile.type == ProjectileID.StardustGuardian) modifiers.SourceDamage *= 2f; diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index 76a983fc1c..67f9855cab 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -162,7 +162,6 @@ namespace CalamityMod.Projectiles { ProjectileID.GoldenShowerFriendly, Do(PiercingExact(2), DefaultIDStaticIFrames) }, { ProjectileID.GreenCounterweight, counterweightTweaks }, { ProjectileID.Hamdrax, standardDrillTweaks }, // Drax (never internally renamed since 1.1) - { ProjectileID.HeatRay, Do(InfinitePiercing, IDStaticIFrames(6)) }, // Due to the weapon's fast use speed, the lasers need to give less than 10 iframes { ProjectileID.IceBoomerang, Do(ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, { ProjectileID.IceSickle, Do(ExtraUpdatesExact(1)) }, { ProjectileID.IchorBullet, Do(PointBlank, ExtraUpdatesDelta(+2), DefaultIDStaticIFrames) }, @@ -434,6 +433,7 @@ namespace CalamityMod.Projectiles {ProjectileID.Grenade, Do(DefaultIDStaticIFrames)}, {ProjectileID.HallowSpray, Do(DefaultIDStaticIFrames)}, {ProjectileID.HallowStar, Do(DefaultIDStaticIFrames)}, + {ProjectileID.HeatRay, Do(DefaultIDStaticIFrames)}, {ProjectileID.HolyWater, Do(DefaultIDStaticIFrames)}, {ProjectileID.HoneyBomb, Do(DefaultIDStaticIFrames)}, {ProjectileID.HoneyGrenade, Do(DefaultIDStaticIFrames)}, diff --git a/Projectiles/DraedonsArsenal/CountermeasureMittFinger.png b/Projectiles/DraedonsArsenal/CountermeasureMittFinger.png new file mode 100644 index 0000000000..4872bab1bc Binary files /dev/null and b/Projectiles/DraedonsArsenal/CountermeasureMittFinger.png differ diff --git a/Projectiles/DraedonsArsenal/CountermeasureMittFinger2.png b/Projectiles/DraedonsArsenal/CountermeasureMittFinger2.png new file mode 100644 index 0000000000..c5619e167a Binary files /dev/null and b/Projectiles/DraedonsArsenal/CountermeasureMittFinger2.png differ diff --git a/Projectiles/DraedonsArsenal/CountermeasureMittHoldout.cs b/Projectiles/DraedonsArsenal/CountermeasureMittHoldout.cs new file mode 100644 index 0000000000..2ee3ebc154 --- /dev/null +++ b/Projectiles/DraedonsArsenal/CountermeasureMittHoldout.cs @@ -0,0 +1,557 @@ +using System; +using System.Collections.Generic; +using CalamityMod.Cooldowns; +using CalamityMod.Dusts; +using CalamityMod.Items.Weapons.DraedonsArsenal; +using CalamityMod.NPCs; +using CalamityMod.Particles; +using CalamityMod.Projectiles.BaseProjectiles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Utilities; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; +using static Terraria.Player; + +namespace CalamityMod.Projectiles.DraedonsArsenal +{ + [PierceResistException] + public class CountermeasureMittHoldout : BaseGunHoldoutProjectile + { + public new string LocalizationCategory => "Projectiles.Misc"; + public override int AssociatedItemID => ModContent.ItemType(); + + public float offsetBase = 0; + public override float MaxOffsetLengthFromArm => offsetBase; + public override float RecoilResolveSpeed => 0.4f; + public override float OffsetXUpwards => 0f; + public override float BaseOffsetY => 0f; + public override float OffsetYDownwards => 0f; + public override float WeaponTurnSpeed => 0.5f; + public bool forcePalm => Projectile.ai[2] != 0; // If you're performing a palm blast or not + public ref float shootingTimer => ref Projectile.ai[0]; + public ref float fireRate => ref Projectile.ai[1]; + public int time = 0; + + // Finger lerps and rotations + #region Fingers + public float rotSpeed = 0; + public float f1l => 0.02f * rotSpeed; // Finger Lerp Speed + public float f1r = 0; // Finger Rotation + public float f1x = 0; // Finger Effects Multiplier + public float f1d = -0.95f; // Finger Aim Direction + public SlotId AudSlot1; // Finger Laser Audio Slot + public float f2l => 0.016f * rotSpeed; + public float f2r = 0; + public float f2x = 0; + public float f2d = -0.95f; + public SlotId AudSlot2; + public float f3l => 0.012f * rotSpeed; + public float f3r = 0; + public float f3x = 0; + public float f3d = -0.95f; + public SlotId AudSlot3; + public float f4l => 0.008f * rotSpeed; + public float f4r = 0; + public float f4x = 0; + public float f4d = -0.95f; + public SlotId AudSlot4; + public float f5l => 0.004f * rotSpeed; + public float f5r = 0; + public float f5x = 0; + public float f5d = -0.95f; + public SlotId AudSlot5; + #endregion + + public int palmAnimTime = 20; // Animation length for the palm attack + public int cooldownGiven = 400; // Arsenal Cooldown from the palm attack + public int attackTime = 100; // Attack cycle length + public int attackCycles = 0; + public bool failedManaCheck = false; + public bool canHit = false; + public float alteredRotationRot = 0.7f; // Alteration to the holdout rotation so it's not directly to the mouse, changes with the attack cycle + public float alteredRotation => Projectile.rotation + (f2r * alteredRotationRot * -Projectile.direction); + public Vector2 palmBlastPos => Owner.Center + alteredRotation.ToRotationVector2() * 55 * Projectile.scale; + public int palmManaCost => HeldItem.mana * 30; + public int hitTimer = 0; + public override void SetDefaults() + { + base.SetDefaults(); + Projectile.penetrate = -1; + Projectile.friendly = true; + Projectile.DamageType = DamageClass.Magic; + Projectile.tileCollide = false; + Projectile.ArmorPenetration = 55; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 5; + } + public override void KillHoldoutLogic() + { + + } + public override bool? CanDamage() => null; + public override bool? CanHitNPC(NPC target) + { + return (canHit ? null : false); + } + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (!canHit) return false; + float realRot = alteredRotation; + Vector2 handPos = Owner.GetBackHandPosition(CompositeArmStretchAmount.None, Owner.compositeBackArm.rotation) + (Owner.compositeBackArm.rotation + MathHelper.PiOver2).ToRotationVector2() * 9; + + // Every laser has collision for the single hitbox, so it works more like a large wide piercing single beam + float beamLength = 1500 * Projectile.scale; + float beamThickness = 20 * Projectile.scale; + float fingerLength = 6 * Projectile.scale; + float _ = float.NaN; + + bool colCheck = false; + + #region 5 Collision Line Checks + for (int t = 0; t < 5; t++) + { + float rot = t switch + { + 1 => f4r * Projectile.direction, + 2 => f3r * Projectile.direction, + 3 => f2r * Projectile.direction, + 4 => f1r * Projectile.direction, + _ => -f5r * 0.3f * Projectile.direction, + }; + float fx = t switch + { + 1 => f4x, 2 => f3x, 3 => f2x, 4 => f1x, _ => f5x, + }; + + Vector2 basePosition = handPos + alteredRotation.ToRotationVector2() * (t == 0 ? 2.5f : 3.3f) * Projectile.scale + (alteredRotation + rot).ToRotationVector2() * fingerLength + (alteredRotation + MathHelper.PiOver2 * -Projectile.direction).ToRotationVector2() * (t == 0 ? -3 : 3) * Projectile.scale; + if (fx > 0.2f) + colCheck = Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), basePosition, basePosition + (realRot + rot).ToRotationVector2() * (fingerLength + beamLength), beamThickness, ref _); + if (colCheck) + t = 5; + } + #endregion + + return (colCheck); + } + public void EndSounds() + { + if (SoundEngine.TryGetActiveSound(AudSlot1, out var s1)) + s1?.Stop(); + if (SoundEngine.TryGetActiveSound(AudSlot2, out var s2)) + s2?.Stop(); + if (SoundEngine.TryGetActiveSound(AudSlot3, out var s3)) + s3?.Stop(); + if (SoundEngine.TryGetActiveSound(AudSlot4, out var s4)) + s4?.Stop(); + if (SoundEngine.TryGetActiveSound(AudSlot5, out var s5)) + s5?.Stop(); + } + public override void HoldoutAI() + { + if (hitTimer > 0) + hitTimer--; + + Owner.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Full, (alteredRotation + MathHelper.PiOver2 * -Projectile.direction) + (Owner.direction == -1 ? MathHelper.Pi : 0)); + + Vector2 handPos = Owner.GetBackHandPosition(CompositeArmStretchAmount.None, Owner.compositeBackArm.rotation) + (Owner.compositeBackArm.rotation + MathHelper.PiOver2).ToRotationVector2() * 4; + float armRotation = (Utils.DirectionTo(Owner.Center, handPos).ToRotation() - MathHelper.PiOver2) * Owner.gravDir + (Owner.gravDir == -1 ? MathHelper.Pi : 0f); + Owner.SetCompositeArmFront(true, FrontArmStretch, armRotation + ExtraFrontArmRotation * Projectile.direction); + + // Below you see the sacrifice of coding 5 individual fingers + if (time == 0 && forcePalm) + { + rotSpeed = 7f; + alteredRotationRot = 0; + } + if (time == 1) + rotSpeed = 0; + + if (forcePalm) alteredRotationRot = MathHelper.Lerp(alteredRotationRot, 0, 0.1f); + else if (shootingTimer > -10) alteredRotationRot = MathHelper.Lerp(alteredRotationRot, 0.7f, 0.1f); + + #region The Price of 5 Fingers + float fxPower = 5; + if (!forcePalm) + { + if (shootingTimer == 10) f1d *= -1; + if (shootingTimer == 20) f2d *= -1; + if (shootingTimer == 30) f3d *= -1; + if (shootingTimer == 40) f4d *= -1; + if (shootingTimer == 50) f5d *= -1; + if (attackCycles == 0) + { + if (shootingTimer == 10) f1x = fxPower; + if (shootingTimer == 20) f2x = fxPower; + if (shootingTimer == 30) f3x = fxPower; + if (shootingTimer == 40) f4x = fxPower; + if (shootingTimer == 50) f5x = fxPower; + } + } + + f1r = MathHelper.Lerp(f1r, f1d, f1l * rotSpeed); + f2r = MathHelper.Lerp(f2r, f2d * 0.775f, f2l * rotSpeed); + f3r = MathHelper.Lerp(f3r, f3d * 0.55f, f3l * rotSpeed); + f4r = MathHelper.Lerp(f4r, f4d * 0.325f, f4l * rotSpeed); + f5r = MathHelper.Lerp(f5r, f5d * 2.3f - 2, f5l * 4 * rotSpeed); + + float goalValue = (canHit ? 1 : 0); + float lerpPower = (forcePalm ? 0.35f : canHit ? 0.2f : 0.25f); + f1x = MathHelper.Lerp(f1x, (f1x > 0.05f ? goalValue : 0), lerpPower); + f2x = MathHelper.Lerp(f2x, (f2x > 0.05f ? goalValue : 0), lerpPower); + f3x = MathHelper.Lerp(f3x, (f3x > 0.05f ? goalValue : 0), lerpPower); + f4x = MathHelper.Lerp(f4x, (f4x > 0.05f ? goalValue : 0), lerpPower); + f5x = MathHelper.Lerp(f5x, (f5x > 0.05f ? goalValue : 0), lerpPower); + + float sine = (float)Math.Sin(time * 0.2f / MathHelper.Pi) * 0.1f; + float maxVol = 0.4f; + float minPitch = -0.8f; + if (SoundEngine.TryGetActiveSound(AudSlot1, out var f1s) && f1s.IsPlaying) + { + f1s.Position = Projectile.Center; + f1s.Pitch = Utils.Remap(f1x, 0.7f, 1, 0f + minPitch, 0f) + sine; + f1s.Volume = Utils.Remap(f1x, 0, 1, 0f, maxVol) * 100; + } + else if (f1x > 1) + { + SoundStyle beam = new("CalamityMod/Sounds/Item/MittWelding/Weld1"); + AudSlot1 = SoundEngine.PlaySound(beam with { Volume = 0.01f, Pitch = 0, IsLooped = true }, Projectile.Center); + } + if (SoundEngine.TryGetActiveSound(AudSlot2, out var f2s) && f2s.IsPlaying) + { + f2s.Position = Projectile.Center; + f2s.Pitch = Utils.Remap(f2x, 0.7f, 1, 0.2f + minPitch, 0.2f) + sine; + f2s.Volume = Utils.Remap(f2x, 0, 1, 0f, maxVol) * 100; + } + else if (f2x > 1) + { + SoundStyle beam = new("CalamityMod/Sounds/Item/MittWelding/Weld2"); + AudSlot2 = SoundEngine.PlaySound(beam with { Volume = 0.01f, Pitch = 0, IsLooped = true }, Projectile.Center); + } + if (SoundEngine.TryGetActiveSound(AudSlot3, out var f3s) && f3s.IsPlaying) + { + f3s.Position = Projectile.Center; + f3s.Pitch = Utils.Remap(f3x, 0.7f, 1, 0.4f + minPitch, 0.4f) + sine; + f3s.Volume = Utils.Remap(f3x, 0, 1, 0f, maxVol) * 100; + } + else if (f3x > 1) + { + SoundStyle beam = new("CalamityMod/Sounds/Item/MittWelding/Weld3"); + AudSlot3 = SoundEngine.PlaySound(beam with { Volume = 0.01f, Pitch = 0, IsLooped = true }, Projectile.Center); + } + if (SoundEngine.TryGetActiveSound(AudSlot4, out var f4s) && f4s.IsPlaying) + { + f4s.Position = Projectile.Center; + f4s.Pitch = Utils.Remap(f4x, 0.7f, 1, 0.6f + minPitch, 0.6f) + sine; + f4s.Volume = Utils.Remap(f4x, 0, 1, 0f, maxVol) * 100; + } + else if (f4x > 1) + { + SoundStyle beam = new("CalamityMod/Sounds/Item/MittWelding/Weld4"); + AudSlot4 = SoundEngine.PlaySound(beam with { Volume = 0.01f, Pitch = 0, IsLooped = true }, Projectile.Center); + } + if (SoundEngine.TryGetActiveSound(AudSlot5, out var f5s) && f5s.IsPlaying) + { + f5s.Position = Projectile.Center; + f5s.Pitch = Utils.Remap(f5x, 0.7f, 1, 0.8f + minPitch, 0.8f) + sine; + f5s.Volume = Utils.Remap(f5x, 0, 1, 0f, maxVol) * 100; + } + else if (f5x > 1) + { + SoundStyle beam = new("CalamityMod/Sounds/Item/MittWelding/Weld5"); + AudSlot5 = SoundEngine.PlaySound(beam with { Volume = 0.01f, Pitch = 0, IsLooped = true }, Projectile.Center); + } + #endregion + + Lighting.AddLight(Projectile.Center, Color.Lerp(Effects.ArsenalEffects.ArsenalLaserColor, Color.White, 0.3f).ToVector3() * MathHelper.Clamp((f1x + f2x + f3x + f4x + f5x - 4f) * 2f, 0f, 0.7f)); + Projectile.scale = MathHelper.Lerp(Projectile.scale, 1, 0.1f); + + if (time == 0) + { + if (!forcePalm) + shootingTimer = -40; + if (Projectile.ai[2] != 0) + Projectile.ai[2] = palmAnimTime; + fireRate = attackTime; + OffsetLengthFromArm = offsetBase; + } + if (shootingTimer < 0) + { + canHit = false; + // Light cooldown before firing + if (rotSpeed > 0) + rotSpeed -= 0.05f; + + if (shootingTimer == -1 || forcePalm) + { + if ((!Main.mouseLeft && !forcePalm) || failedManaCheck) + { + EndSounds(); + Projectile.Kill(); + return; + } + + attackCycles = 0; + fireRate = attackTime; + } + + } + if (Owner.Calamity().mouseRight && Owner.Calamity().arsenalCooldown <= 0 && !forcePalm && !failedManaCheck) + { + Projectile.ai[2] = 5; + shootingTimer = 0; + } + if (forcePalm) + { + if (!Owner.CheckMana(HeldItem, palmManaCost, false, false)) + { + failedManaCheck = true; + SoundEngine.PlaySound(SoundID.MaxMana with { Pitch = -0.5f }, Projectile.Center); + Projectile.ai[2] = 0; + return; + } + rotSpeed = 5; + + f1d = -Math.Abs(f1d); f2d = -Math.Abs(f2d); f3d = -Math.Abs(f3d); f4d = -Math.Abs(f4d); f5d = -Math.Abs(f5d); + + if (shootingTimer <= palmAnimTime) + { + if (shootingTimer == 1) + { + SoundStyle aud = new("CalamityMod/Sounds/Item/MittReadyPalm"); + SoundEngine.PlaySound(aud with { Volume = 1f, Pitch = 0 }, Projectile.Center); + } + if (shootingTimer == (int)(palmAnimTime * 0.8f)) + { + SoundStyle aud = new("CalamityMod/Sounds/Item/MittThrust"); + SoundEngine.PlaySound(aud with { Volume = 1f, Pitch = 0 }, Projectile.Center); + } + if (shootingTimer == palmAnimTime) + { + Shoot(); + Projectile.ai[2] = 0; + shootingTimer = -30; + rotSpeed = 0; + } + Lighting.AddLight(palmBlastPos, Color.Lerp(Effects.ArsenalEffects.ArsenalLaserColor, Color.White, 0.3f).ToVector3() * (float)Math.Pow(Utils.GetLerpValue(0, palmAnimTime, shootingTimer), 2)); + } + if (shootingTimer > palmAnimTime * 0.8f) + Projectile.scale *= 1.25f; + canHit = false; + } + else if (shootingTimer >= 0) + { + if (!Main.mouseLeft) + shootingTimer = fireRate; + + if (shootingTimer < fireRate && !failedManaCheck) + { + canHit = true; + if (time % 3 == 0) + { + if (Owner.CheckMana(HeldItem, -1, true, false)) + { + if (rotSpeed < 1.1f) + rotSpeed += 0.1f; + } + else + { + SoundEngine.PlaySound(SoundID.MaxMana with { Pitch = -0.5f }, Projectile.Center); + failedManaCheck = true; + } + } + } + else + { + if (attackCycles < 1 && !failedManaCheck) + { + attackCycles++; + shootingTimer = 0; + } + else + shootingTimer = -30; + } + } + + time++; + shootingTimer++; + } + public void Shoot() + { + bool hitAnything = false; + bool oneFx = true; + float damageMult = 25; + foreach (NPC npc in Main.ActiveNPCs) + { + if (!npc.dontTakeDamage && (Main.zenithWorld || Utils.Distance(npc.Center, palmBlastPos) <= (80 + Math.Max(npc.width / 2, npc.height / 2)))) + { + hitAnything = true; + Vector2 pos = Vector2.Lerp(npc.Center, Projectile.Center, 0.35f); + Vector2 vel = Vector2.Lerp(Projectile.Center.DirectionTo(npc.Center), alteredRotation.ToRotationVector2(), 0.5f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), pos, vel, ModContent.ProjectileType(), (int)(Projectile.damage * damageMult), 0, Projectile.owner, 0, npc.whoAmI); + if (oneFx) + { + for (int i = 0; i < 25; i++) + { + Dust dust = Dust.NewDustPerfect(pos, Effects.ArsenalEffects.ArsenalLaserDust, vel.SafeNormalize(Vector2.UnitX).RotatedByRandom(0.4f) * Main.rand.NextFloat(10f, 35f), 0, default, Main.rand.NextFloat(1f, 1.8f)); + dust.noGravity = true; + dust.color = Effects.ArsenalEffects.ArsenalLaserColor; + dust.alpha = 100; + dust.fadeIn = 20; + } + for (int i = 0; i < 2; i++) + { + Particle pulse = new CustomSpark(pos, vel.SafeNormalize(Vector2.UnitX) * 1, "CalamityMod/Particles/HighResHollowCircleHardEdgeAlt", false, 20, 0.08f, Effects.ArsenalEffects.ArsenalLaserColor, new Vector2(2f, 0.7f), shrinkSpeed: -0.1f); + GeneralParticleHandler.SpawnParticle(pulse); + Particle pulse1 = new CustomSpark(pos, vel.SafeNormalize(Vector2.UnitX) * 15, "CalamityMod/Particles/HighResHollowCircleHardEdgeAlt", false, 18, 0.06f, Effects.ArsenalEffects.ArsenalLaserColor, new Vector2(2f, 0.7f), shrinkSpeed: -0.1f); + GeneralParticleHandler.SpawnParticle(pulse1); + Particle pulse2 = new CustomSpark(pos, vel.SafeNormalize(Vector2.UnitX) * 25, "CalamityMod/Particles/HighResHollowCircleHardEdgeAlt", false, 16, 0.04f, Effects.ArsenalEffects.ArsenalLaserColor, new Vector2(2f, 0.7f), shrinkSpeed: -0.1f); + GeneralParticleHandler.SpawnParticle(pulse2); + } + oneFx = false; + } + damageMult -= 6; + if (damageMult < 1) + damageMult = 1; + } + } + if (hitAnything && Owner.CheckMana(HeldItem, palmManaCost, true, false)) + { + Owner.Calamity().arsenalCooldown = cooldownGiven; + Owner.AddCooldown(ArsenalPower.ID, cooldownGiven); + + SoundStyle aud = new("CalamityMod/Sounds/Item/MittHit"); + for (int i = 0; i < 2; i++) + SoundEngine.PlaySound(aud with { Volume = 0.8f, Pitch = 0, MaxInstances = 2 }, Projectile.Center); + Owner.Calamity().GeneralScreenShakePower = 8f; + } + else + { + Owner.Calamity().arsenalCooldown = (int)(cooldownGiven / 10); + Owner.AddCooldown(ArsenalPower.ID, (int)(cooldownGiven / 10)); + + for (int i = 0; i < 15; i++) + { + Dust dust = Dust.NewDustPerfect(palmBlastPos, ModContent.DustType(), Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(4f, 7f), 0, default, Main.rand.NextFloat(0.7f, 0.85f)); + dust.noGravity = false; + dust.color = Effects.ArsenalEffects.ArsenalLaserColor; + } + for (int i = 0; i < 2; i++) + { + Particle bloom = new CustomSpark(palmBlastPos, Vector2.Zero, "CalamityMod/Particles/BloomCircle", false, 15, 0.5f, Effects.ArsenalEffects.ArsenalLaserColor, new Vector2(1f, 1f), true, true); + GeneralParticleHandler.SpawnParticle(bloom); + } + SoundStyle aud = new("CalamityMod/Sounds/Item/MittFail"); + SoundEngine.PlaySound(aud with { Volume = 1f, Pitch = 0 }, Projectile.Center); + } + } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + if (hitTimer == 0) + { + for (int i = 0; i < 3; i++) + { + Dust dust = Dust.NewDustPerfect(target.Center, Effects.ArsenalEffects.ArsenalLaserDust, Owner.Center.DirectionTo(target.Center).RotatedByRandom(0.3f) * Main.rand.NextFloat(9f, 13f), 0, default, Main.rand.NextFloat(0.6f, 1.1f)); + dust.noGravity = true; + dust.color = Effects.ArsenalEffects.ArsenalLaserColor; + dust.alpha = 100; + dust.fadeIn = 10; + } + hitTimer = Projectile.localNPCHitCooldown; + } + else + { + Dust dust = Dust.NewDustPerfect(target.Center, Effects.ArsenalEffects.ArsenalLaserDust, Owner.Center.DirectionTo(target.Center).RotatedByRandom(0.2f) * Main.rand.NextFloat(6f, 9f), 0, default, Main.rand.NextFloat(0.3f, 0.7f)); + dust.noGravity = true; + dust.color = Effects.ArsenalEffects.ArsenalLaserColor; + dust.alpha = 100; + dust.fadeIn = 10; + modifiers.SourceDamage *= 0.2f; + } + } + public override bool PreDraw(ref Color lightColor) + { + Vector2 handPos = Owner.GetBackHandPosition(CompositeArmStretchAmount.None, Owner.compositeBackArm.rotation) + (Owner.compositeBackArm.rotation + MathHelper.PiOver2).ToRotationVector2() * 9 * Projectile.scale; + Projectile.Center = handPos; + + if (time < 2) + return false; + + Texture2D texture = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/CountermeasureMittHoldout").Value; + + Texture2D finger = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/CountermeasureMittFinger2").Value; + Texture2D laser = ModContent.Request("CalamityMod/Particles/BloomLineFade").Value; + Texture2D laser2 = ModContent.Request("CalamityMod/Particles/BloomLineThick").Value; + Texture2D bloom = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; + Texture2D diamond = ModContent.Request("CalamityMod/Particles/SquareRotated").Value; + + Vector2 drawPosition = handPos - Main.screenPosition; + Vector2 vel = alteredRotation.ToRotationVector2(); + + float randSize = Main.rand.NextFloat(0.8f, 1.3f); + float fadeIn = (float)Math.Pow(Utils.GetLerpValue(0, palmAnimTime, shootingTimer), 2); + Color drawColor = Projectile.GetAlpha(lightColor); + float drawRotation = alteredRotation + (Projectile.direction == -1 ? MathHelper.Pi : 0f); + Vector2 rotationPoint = texture.Size() * 0.5f; + float exRot = (Projectile.direction == -1 ? MathHelper.PiOver2 : 0); + SpriteEffects flipSprite = Projectile.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + + float thrustCuttoff = palmAnimTime * 0.8f; + float pullBack = MathHelper.Lerp(0.2f, 1f, (float)Math.Pow(Utils.GetLerpValue(thrustCuttoff, 0, shootingTimer, true), 4)); + float pushOut = MathHelper.Lerp(0.2f, 1.5f, (float)Math.Pow(Utils.GetLerpValue(thrustCuttoff, palmAnimTime, shootingTimer, true), 5)); + float thrustMult = (float)(forcePalm ? (shootingTimer <= thrustCuttoff ? pullBack : pushOut) : 1); + Vector2 thrustAddition = vel * 10 * thrustMult - vel * 10; + + Main.EntitySpriteDraw(texture, drawPosition + thrustAddition, null, drawColor, drawRotation, rotationPoint, Projectile.scale, flipSprite); + + for (int i = 0; i < 5; i++) + { + float fingerLength = 3f * Projectile.scale; + Vector2 fingerScale = new Vector2(1f, 1f) * Projectile.scale; + Vector2 fingerOrgin = new Vector2(0, finger.Height / 2); + + float rot = i switch + { + 1 => f4r * Projectile.direction, + 2 => f3r * Projectile.direction, + 3 => f2r * Projectile.direction, + 4 => f1r * Projectile.direction, + _ => -f5r * 0.3f * Projectile.direction, + }; + float fx = i switch + { + 1 => f4x, 2 => f3x, 3 => f2x, 4 => f1x, _ => f5x, + }; + Color fingerColor = Color.Lerp(drawColor, Color.Black, (4 - i) * 0.2f); + if (i == 0) + { + fingerScale = new Vector2(0.9f, 1f) * Projectile.scale; + fingerLength = 1f * Projectile.scale; + fingerColor = drawColor; + } + + Vector2 basePosition = handPos + vel * (i == 0 ? 2.5f : 3.3f) * Projectile.scale + thrustAddition + (alteredRotation + rot).ToRotationVector2() * fingerLength + (alteredRotation + MathHelper.PiOver2 * -Projectile.direction).ToRotationVector2() * (i == 0 ? -3 : 3) * Projectile.scale; + Main.EntitySpriteDraw(finger, basePosition - Main.screenPosition, null, fingerColor, alteredRotation + rot, fingerOrgin, fingerScale, SpriteEffects.None); + + Vector2 velocity = (alteredRotation + rot).ToRotationVector2(); + Main.EntitySpriteDraw(laser, basePosition - Main.screenPosition + velocity * 545 * Projectile.scale, null, Effects.ArsenalEffects.ArsenalLaserColor with { A = 0 } * fx, velocity.ToRotation() + MathHelper.PiOver2, laser.Size() / 2, new Vector2(2.5f * randSize * fx, 55f) * Projectile.scale * 0.01f, SpriteEffects.FlipVertically); + Main.EntitySpriteDraw(laser2, basePosition - Main.screenPosition + velocity * 545 * Projectile.scale, null, Color.Lerp(Effects.ArsenalEffects.ArsenalLaserColor, Color.White, 0.3f) with { A = 0 } * fx, velocity.ToRotation() + MathHelper.PiOver2, laser2.Size() / 2, new Vector2(0.4f * Math.Min(fx, 1), 55f) * Projectile.scale * 0.01f, SpriteEffects.FlipVertically); + + for (int y = 0; y < 2; y++) + Main.EntitySpriteDraw(bloom, basePosition - Main.screenPosition + velocity * 7 * Projectile.scale, null, Color.Lerp(Effects.ArsenalEffects.ArsenalLaserColor, Color.White, y) with { A = 0 } * (fx - 1), velocity.ToRotation() + MathHelper.PiOver2, bloom.Size() / 2, new Vector2(2 + 0.05f * (fx + 25), 1) * Projectile.scale * MathHelper.Lerp(fx, 1, 0.7f) * (0.03f - 0.01f * y), SpriteEffects.FlipVertically); + } + if (forcePalm) + { + for (int y = 0; y < 8; y++) + Main.EntitySpriteDraw(bloom, palmBlastPos - Main.screenPosition + thrustAddition, null, Color.Lerp(Effects.ArsenalEffects.ArsenalLaserColor, Color.White, y * 0.1f) with { A = 0 } * fadeIn * 0.25f, alteredRotation, bloom.Size() / 2, new Vector2(1f, 1f) * Projectile.scale * (0.3f - 0.02f * y) * randSize, SpriteEffects.FlipVertically); + } + return false; + } + public override void DrawBehind(int index, List behindNPCsAndTiles, List behindNPCs, List behindProjectiles, List overPlayers, List overWiresUI) + { + behindNPCsAndTiles.Add(index); + } + } +} diff --git a/Projectiles/DraedonsArsenal/CountermeasureMittHoldout.png b/Projectiles/DraedonsArsenal/CountermeasureMittHoldout.png new file mode 100644 index 0000000000..389b6646b7 Binary files /dev/null and b/Projectiles/DraedonsArsenal/CountermeasureMittHoldout.png differ diff --git a/Projectiles/DraedonsArsenal/CountermeasurePalmBlast.cs b/Projectiles/DraedonsArsenal/CountermeasurePalmBlast.cs new file mode 100644 index 0000000000..fd31cc8a9b --- /dev/null +++ b/Projectiles/DraedonsArsenal/CountermeasurePalmBlast.cs @@ -0,0 +1,93 @@ +using System; +using CalamityMod.Dusts; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.DraedonsArsenal +{ + public class CountermeasurePalmBlast : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Misc"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public ref float time => ref Projectile.ai[0]; + public float fade => (float)Math.Pow(Utils.GetLerpValue(0, 13, Projectile.timeLeft, true), 4); + public bool onSpawn = true; + private NPC targeted = null; + public override void SetDefaults() + { + Projectile.width = 150; + Projectile.height = 150; + Projectile.friendly = true; + Projectile.DamageType = DamageClass.Magic; + Projectile.penetrate = -1; + Projectile.timeLeft = 15; + Projectile.tileCollide = false; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + } + + public override void AI() + { + Lighting.AddLight(Projectile.Center, Effects.ArsenalEffects.ArsenalLaserColor.ToVector3() * 0.5f); + Player Owner = Main.player[Projectile.owner]; + float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); + if (Projectile.ai[1] != -5) + targeted = Main.npc[(int)Projectile.ai[1]]; + if (targeted == null || !targeted.active) + { + targeted = Projectile.Center.ClosestNPCAt(150); + Projectile.ai[1] = -5; + } + if (time == 0) + { + Vector2 launchVel = Projectile.velocity.SafeNormalize(Vector2.UnitX); + float launchPower = 25; + targeted.MoveNPC(launchVel, launchPower, true); + + Particle bloom = new CustomSpark(Projectile.Center, Projectile.velocity.SafeNormalize(Vector2.UnitX) * 10, "CalamityMod/Particles/BloomCircle", false, 12, 0.7f, Effects.ArsenalEffects.ArsenalLaserColor, new Vector2(1f, 3f), true, true, shrinkSpeed: -0.5f, extraRotation: MathHelper.PiOver2); + GeneralParticleHandler.SpawnParticle(bloom); + } + time++; + } + + public override bool? CanHitNPC(NPC target) => (target == targeted) ? null : false; + + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + modifiers.SetCrit(); + Player Owner = Main.player[Projectile.owner]; + float critDamage = Math.Min(Owner.GetTotalCritChance(Projectile.DamageType) * 0.01f, 1f); + float minMult = 0.25f; + int hitsToMinMult = 7; + float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true); + modifiers.SourceDamage *= damageMult + critDamage; + + Vector2 launchVel = Projectile.velocity.SafeNormalize(Vector2.UnitX); + float launchPower = 40; + target.MoveNPC(launchVel, launchPower, true); + } + public override bool PreDraw(ref Color lightColor) + { + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; + Texture2D beam = ModContent.Request("CalamityMod/Particles/BloomLineFade").Value; + Texture2D bloom = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; + float completion = Utils.GetLerpValue(15, 0, time); + for (int i = 0; i < 6; i++) + { + Color orbColor = Color.Lerp(Effects.ArsenalEffects.ArsenalLaserColor, Color.White, i * 0.04f) with { A = 0 } * 0.8f; + float scale = Projectile.scale * (0.05f + i * 0.01f) * 3; + + Main.EntitySpriteDraw(beam, Projectile.Center - Main.screenPosition, null, orbColor, Projectile.rotation, new Vector2(beam.Width / 2, beam.Height), new Vector2(0.3f * fade, 2 * completion) * scale, SpriteEffects.None); + Main.EntitySpriteDraw(bloom, Projectile.Center - Main.screenPosition, null, orbColor, Projectile.rotation + MathHelper.PiOver2, bloom.Size() * 0.5f, new Vector2(0.5f, 1 + 2 * completion) * scale * 3 * fade, SpriteEffects.None); + } + + return false; + } + } +} diff --git a/Projectiles/DraedonsArsenal/GatlingLaserProj.cs b/Projectiles/DraedonsArsenal/GatlingLaserProj.cs deleted file mode 100644 index afe5e4399e..0000000000 --- a/Projectiles/DraedonsArsenal/GatlingLaserProj.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System; -using CalamityMod.Items; -using CalamityMod.Items.Weapons.DraedonsArsenal; -using Microsoft.Xna.Framework; -using ReLogic.Utilities; -using Terraria; -using Terraria.Audio; -using Terraria.Localization; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.DraedonsArsenal -{ - public class GatlingLaserProj : ModProjectile - { - public override LocalizedText DisplayName => CalamityUtils.GetItemName(); - private SlotId gatlingLaserLoopID; - private bool fireLasers = false; - - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 4; - } - - public override void SetDefaults() - { - Projectile.width = 24; - Projectile.height = 58; - Projectile.friendly = true; - Projectile.penetrate = -1; - Projectile.tileCollide = false; - Projectile.ignoreWater = true; - Projectile.DamageType = DamageClass.Magic; - } - - public override void AI() - { - Projectile.frameCounter++; - if (Projectile.frameCounter >= 13) - { - Projectile.frameCounter = 10; - Projectile.frame++; - if (Projectile.frame >= Main.projFrames[Type]) - Projectile.frame = 0; - } - - if (SoundEngine.TryGetActiveSound(gatlingLaserLoopID, out var ShootingSound) && ShootingSound.IsPlaying) - ShootingSound.Position = Projectile.Center; - Player player = Main.player[Projectile.owner]; - Vector2 playerRotation = player.RotatedRelativePoint(player.MountedCenter, true); - if (Projectile.type == ModContent.ProjectileType()) - { - if (Projectile.ai[0] < 5f) - Projectile.ai[0] += 1f; - - if (Projectile.ai[0] > 4f) - Projectile.ai[0] = 2f; - - // The Gatling Laser shoots every other frame (effective use time of 2). - int fireRate = 2; - Projectile.ai[1] += 1f; - bool shootThisFrame = false; - if (Projectile.ai[1] >= fireRate) - { - Projectile.ai[1] = 0f; - shootThisFrame = true; - } - - if (Projectile.soundDelay <= 0) - { - Projectile.soundDelay = fireRate * 6; - if (Projectile.ai[0] != 1f) - { - fireLasers = true; - Projectile.soundDelay *= 6; - gatlingLaserLoopID = SoundEngine.PlaySound(GatlingLaser.FireLoopSound, Projectile.Center); - } - } - if (shootThisFrame && Main.myPlayer == Projectile.owner && fireLasers) - { - Item gatling = player.ActiveItem(); - - // This grabs the weapon's current damage, taking current charge level into account. - int currentDamage = player.GetWeaponDamage(gatling); - - bool stillInUse = !player.CantUseHoldout(); - - // This both checks if the player has sufficient mana and consumes it if they do. - // If this is false, the Gatling Laser stops functioning. - bool hasMana = player.CheckMana(gatling, -1, true, false); - - // Checks if the Gatling Laser has sufficient charge to fire. If this is false, it stops functioning. - CalamityGlobalItem modItem = gatling.Calamity(); - bool hasCharge = modItem.Charge >= GatlingLaser.HoldoutChargeUse; - - if (stillInUse && hasMana && hasCharge) - { - float scaleFactor = player.ActiveItem().shootSpeed * Projectile.scale; - Vector2 laserDirection = playerRotation; - Vector2 aimDirection = Main.screenPosition + new Vector2(Main.mouseX, Main.mouseY) - laserDirection; - if (player.gravDir == -1f) - { - aimDirection.Y = Main.screenHeight - Main.mouseY + Main.screenPosition.Y - laserDirection.Y; - } - Vector2 projVelocity = Vector2.Normalize(aimDirection); - if (float.IsNaN(projVelocity.X) || float.IsNaN(projVelocity.Y)) - { - projVelocity = -Vector2.UnitY; - } - projVelocity *= scaleFactor; - if (projVelocity.X != Projectile.velocity.X || projVelocity.Y != Projectile.velocity.Y) - { - Projectile.netUpdate = true; - } - Projectile.velocity = projVelocity; - int type = ModContent.ProjectileType(); - float velocity = 3f; - laserDirection = Projectile.Center; - Vector2 spinningpoint = Vector2.Normalize(Projectile.velocity) * velocity; - - double spread = Math.PI / 32D; - spinningpoint = spinningpoint.RotatedBy(Main.rand.NextDouble() * 2D * spread - spread); - - if (float.IsNaN(spinningpoint.X) || float.IsNaN(spinningpoint.Y)) - { - spinningpoint = -Vector2.UnitY; - } - Vector2 projVelocitySpread = new Vector2(spinningpoint.X, spinningpoint.Y); - if (projVelocitySpread.Length() > 5f) - { - projVelocitySpread.Normalize(); - projVelocitySpread *= 5f; - } - float SpeedX = projVelocitySpread.X + Main.rand.Next(-1, 2) * 0.005f; - float SpeedY = projVelocitySpread.Y + Main.rand.Next(-1, 2) * 0.005f; - float ai0 = Projectile.ai[0] - 2f; // 0, 1, or 2 - - // Use charge when firing a laser. - modItem.Charge -= GatlingLaser.HoldoutChargeUse; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), laserDirection.X, laserDirection.Y, SpeedX, SpeedY, type, currentDamage, Projectile.knockBack, Projectile.owner, ai0, 0f); - } - else - { - ActiveSound result; - if (SoundEngine.TryGetActiveSound(gatlingLaserLoopID, out result)) - result.Stop(); - - SoundEngine.PlaySound(GatlingLaser.FireEndSound, Projectile.Center); - Projectile.Kill(); - } - } - } - Projectile.position = player.RotatedRelativePoint(player.MountedCenter, true) - Projectile.Size / 2f; - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; - Projectile.spriteDirection = Projectile.direction; - Projectile.timeLeft = 2; - player.ChangeDir(Projectile.direction); - player.heldProj = Projectile.whoAmI; - player.itemTime = 2; - player.itemAnimation = 2; - player.itemRotation = (float)Math.Atan2(Projectile.velocity.Y * Projectile.direction, Projectile.velocity.X * Projectile.direction); - } - - public override bool? CanDamage() => false; - } -} diff --git a/Projectiles/DraedonsArsenal/GatlingLaserProj.png b/Projectiles/DraedonsArsenal/GatlingLaserProj.png deleted file mode 100644 index c4b477bdc8..0000000000 Binary files a/Projectiles/DraedonsArsenal/GatlingLaserProj.png and /dev/null differ diff --git a/Projectiles/DraedonsArsenal/GatlingLaserShot.cs b/Projectiles/DraedonsArsenal/GatlingLaserShot.cs deleted file mode 100644 index f1292b9b35..0000000000 --- a/Projectiles/DraedonsArsenal/GatlingLaserShot.cs +++ /dev/null @@ -1,137 +0,0 @@ -using System; -using CalamityMod.Particles; -using Microsoft.Xna.Framework; -using ReLogic.Utilities; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.DraedonsArsenal -{ - public class GatlingLaserShot : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Misc"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - private int dust = 182; - private Player Owner => Main.player[Projectile.owner]; - - private int Time = 0; - - public override void SetDefaults() - { - Projectile.width = 2; - Projectile.height = 2; - Projectile.friendly = true; - Projectile.DamageType = DamageClass.Magic; - Projectile.penetrate = 1; - Projectile.extraUpdates = 100; - Projectile.timeLeft = 600; - } - - public override void AI() - { - Time++; - Lighting.AddLight(Projectile.Center, 0.2f, 0f, 0f); - if (Projectile.timeLeft % 11 == 0 && Time > 15 && Time < 460) - { - SparkParticle spark = new SparkParticle(Projectile.Center, Projectile.velocity * 0.01f, false, 6, 1.7f, Color.Red); - GeneralParticleHandler.SpawnParticle(spark); - } - if (Projectile.timeLeft % 4 == 0 && Time > 15 && Time < 460) - { - SparkParticle spark2 = new SparkParticle(Projectile.Center, Projectile.velocity * 0.01f, false, 6, 0.4f, Color.White); - GeneralParticleHandler.SpawnParticle(spark2); - } - } - - public override void OnKill(int timeLeft) - { - int height = 20; - Projectile.position = Projectile.Center; - Projectile.width = Projectile.height = height; - Projectile.Center = Projectile.position; - Projectile.damage = 0; - - LaserBurst(2.4f, 4.2f); // 60 dusts - - int inc; - for (int i = 0; i < 100; i = inc + 1) - { - int gatlingDust = Dust.NewDust(Projectile.Center, 6, 6, dust, 0f, 0f, 100, default, 1f); - float dustVelX = Main.dust[gatlingDust].velocity.X; - float dustVelY = Main.dust[gatlingDust].velocity.Y; - - if (dustVelX == 0f && dustVelY == 0f) - dustVelX = 1f; - - float dustVelocity = (float)Math.Sqrt(dustVelX * dustVelX + dustVelY * dustVelY); - dustVelocity = 4f / dustVelocity; - dustVelX *= dustVelocity; - dustVelY *= dustVelocity; - - Dust dust2 = Main.dust[gatlingDust]; - dust2.velocity *= 0.5f; - dust2.velocity.X = dust2.velocity.X + dustVelX; - dust2.velocity.Y = dust2.velocity.Y + dustVelY; - dust2.scale = 0.66f; - dust2.noGravity = true; - - inc = i; - } - } - - private void LaserBurst(float speed1, float speed2) - { - float angleRandom = 0.05f; - - int inc; - for (int j = 0; j < 4; j = inc + 1) - { - float dustSpeed = Main.rand.NextFloat(speed1, speed2); - Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(Projectile.velocity.ToRotation()); - dustVel = dustVel.RotatedBy(-angleRandom); - dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); - - int burstDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 200, default, 0.9f); - Main.dust[burstDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; - Main.dust[burstDust].noGravity = true; - - Dust dust2 = Main.dust[burstDust]; - dust2.velocity *= 3f; - dust2 = Main.dust[burstDust]; - - burstDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 100, default, 0.66f); - Main.dust[burstDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; - - dust2 = Main.dust[burstDust]; - dust2.velocity *= 2f; - - Main.dust[burstDust].noGravity = true; - Main.dust[burstDust].fadeIn = 1f; - Main.dust[burstDust].color = Color.Crimson * 0.5f; - - dust2 = Main.dust[burstDust]; - - inc = j; - } - for (int k = 0; k < 2; k = inc + 1) - { - float dustSpeed = Main.rand.NextFloat(speed1, speed2); - Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(Projectile.velocity.ToRotation()); - dustVel = dustVel.RotatedBy(-angleRandom); - dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); - - int moreBurstDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 0, default, 1.2f); - Main.dust[moreBurstDust].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f; - Main.dust[moreBurstDust].noGravity = true; - - Dust dust2 = Main.dust[moreBurstDust]; - dust2.velocity *= 0.5f; - dust2 = Main.dust[moreBurstDust]; - - inc = k; - } - } - } -} diff --git a/Projectiles/Magic/AstralachneaFang.cs b/Projectiles/Magic/AstralachneaFang.cs index cf5ed838f9..5619a355ec 100644 --- a/Projectiles/Magic/AstralachneaFang.cs +++ b/Projectiles/Magic/AstralachneaFang.cs @@ -49,7 +49,10 @@ namespace CalamityMod.Projectiles.Magic public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 180); + //Doze - I gave this long debuff infliction times due to the lack of weapons that inflict debuffs for a decent time + //Most common vanilla debuffs have a way to inflict them for 15, 20, or even 30 seconds + //Poison and Venom staff in vanilla do 30 seconds, so this should too as it's a spiritual successor to them. + target.AddBuff(ModContent.BuffType(), CalamityUtils.SecondsToFrames(30)); } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Magic/CauldronHoldout.cs b/Projectiles/Magic/CauldronHoldout.cs index 80d327c3ef..b499fdf008 100644 --- a/Projectiles/Magic/CauldronHoldout.cs +++ b/Projectiles/Magic/CauldronHoldout.cs @@ -75,11 +75,7 @@ namespace CalamityMod.Projectiles.Magic int projType = ModContent.ProjectileType(); int projDamage = Projectile.damage; float speedscale = 18f; - Vector2 shotSpeed = Vector2.Normalize(Projectile.velocity) * speedscale; - if (float.IsNaN(shotSpeed.X) || float.IsNaN(shotSpeed.Y)) - { - shotSpeed = -Vector2.UnitY; - } + Vector2 shotSpeed = Projectile.velocity.SafeNormalize(-Vector2.UnitY) * speedscale; Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, shotSpeed, projType, projDamage, Projectile.knockBack, player.whoAmI); for (int i = 0; i < 6; i++) diff --git a/Projectiles/Magic/CauldronProj.cs b/Projectiles/Magic/CauldronProj.cs index 21c716e995..a414b19b1c 100644 --- a/Projectiles/Magic/CauldronProj.cs +++ b/Projectiles/Magic/CauldronProj.cs @@ -98,8 +98,8 @@ namespace CalamityMod.Projectiles.Magic Main.EntitySpriteDraw(Glow.Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); return false; } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.OnFire3, 90); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.OnFire, 90); - public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(BuffID.OnFire3, 90); + public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(BuffID.OnFire, 90); } } diff --git a/Projectiles/Magic/CauldronProjSmall.cs b/Projectiles/Magic/CauldronProjSmall.cs index 1ae7f52f9a..20ae6b8292 100644 --- a/Projectiles/Magic/CauldronProjSmall.cs +++ b/Projectiles/Magic/CauldronProjSmall.cs @@ -58,13 +58,6 @@ namespace CalamityMod.Projectiles.Magic public override void OnKill(int timeLeft) { SoundEngine.PlaySound(SoundID.DD2_ExplosiveTrapExplode with { Pitch = 0.8f, Volume = 0.6f }, Projectile.Center); - Projectile.ExpandHitboxBy(46); - Projectile.maxPenetrate = -1; - Projectile.penetrate = -1; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; - Projectile.damage /= 2; - Projectile.Damage(); for (int i = 0; i < 10; i++) { int size = 10; @@ -86,8 +79,8 @@ namespace CalamityMod.Projectiles.Magic public override bool? CanDamage() => Projectile.velocity.Y < 0f ? false : null; - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.OnFire3, 90); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.OnFire, 90); - public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(BuffID.OnFire3, 90); + public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(BuffID.OnFire, 90); } } diff --git a/Projectiles/Magic/PlagueFang.cs b/Projectiles/Magic/PlagueFang.cs index 443df05763..adc787da24 100644 --- a/Projectiles/Magic/PlagueFang.cs +++ b/Projectiles/Magic/PlagueFang.cs @@ -78,7 +78,10 @@ namespace CalamityMod.Projectiles.Magic public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 180); + //Doze - I gave this long debuff infliction times due to the lack of weapons that inflict debuffs for a decent time + //Most common vanilla debuffs have a way to inflict them for 15, 20, or even 30 seconds + //Poison and Venom staff in vanilla do 30 seconds, so this should too as it's a spiritual successor to them. + target.AddBuff(ModContent.BuffType(), CalamityUtils.SecondsToFrames(30)); } } } diff --git a/Projectiles/Magic/Shadowbolt.cs b/Projectiles/Magic/Shadowbolt.cs index 1207adf6cd..d41828d09c 100644 --- a/Projectiles/Magic/Shadowbolt.cs +++ b/Projectiles/Magic/Shadowbolt.cs @@ -75,10 +75,10 @@ namespace CalamityMod.Projectiles.Magic if (reflectionTimer <= 0) { SoundStyle bounce = new("CalamityMod/Sounds/Item/ShadowboltReflect"); - SoundEngine.PlaySound(bounce with { Volume = 0.6f, Pitch = 0f }, platPosWall); + SoundEngine.PlaySound(bounce with { Volume = 0.6f, Pitch = Main.rand.NextFloat(-0.1f, 0.1f), MaxInstances = -1 }, platPosWall); for (int i = 0; i < Main.maxNPCs; i++) Projectile.localNPCImmunity[i] = 0; - Projectile.velocity = (targetCenter - platPosCenter).SafeNormalize(Vector2.UnitX) * 5; + Projectile.velocity = (targetCenter - platPosCenter).SafeNormalize(Vector2.UnitX) * 12; reflecting = false; hasReboundOffPlat = true; time = 10; @@ -121,13 +121,13 @@ namespace CalamityMod.Projectiles.Magic GeneralParticleHandler.SpawnParticle(blastRing); SoundStyle wall = new("CalamityMod/Sounds/Item/ShadowboltWallHit"); - SoundEngine.PlaySound(wall with { Volume = 0.5f, Pitch = 0f }, platPosWall); + SoundEngine.PlaySound(wall with { Volume = 0.5f, Pitch = 0f, MaxInstances = -1 }, platPosWall); reflecting = true; Projectile.extraUpdates = 0; } } - if (!hasReboundOffPlat && Projectile.numHits == 0 && !hasSetPlatSpawn && (Collision.SolidCollision(Projectile.Center, 20, 20) || time > 90)) + if (!hasReboundOffPlat && Projectile.numHits == 0 && !hasSetPlatSpawn && (Collision.SolidCollision(Projectile.Center, 20, 20) || time > 70)) { hasSetPlatSpawn = true; spawnPlat = true; @@ -151,6 +151,8 @@ namespace CalamityMod.Projectiles.Magic { if (time == 14) { + SoundEngine.PlaySound(SoundID.Item72 with { Volume = 0.8f, Pitch = Main.rand.NextFloat(-0.1f, 0.1f), MaxInstances = -1 }, Projectile.Center); + Projectile.velocity = Projectile.velocity.RotatedByRandom(0.15f); for (int i = 0; i < 2; i++) { Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Indigo, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 0.3f, 0.75f, 12, true); @@ -176,7 +178,7 @@ namespace CalamityMod.Projectiles.Magic } if (time > 22 && time % 3 == 0) { - Particle spark = new GlowSparkParticle(Projectile.Center - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 10, -Projectile.velocity * 0.1f, false, 18, 0.05f * (hasReboundOffPlat ? 1.1f : 0.5f), Color.Lerp(Color.Indigo, Color.Orchid, 0.25f), new Vector2(0.7f, 1f), true, false, 0.3f); + Particle spark = new GlowSparkParticle(Projectile.Center - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 10, -Projectile.velocity * 0.1f, false, 18, 0.05f * (hasReboundOffPlat ? 1.1f : 0.5f), Color.Lerp(Color.Indigo, Color.Orchid, 0.25f), new Vector2(0.7f, 2f), true, false, 0.3f); GeneralParticleHandler.SpawnParticle(spark); } if (time > 30 && Main.rand.NextBool(12)) diff --git a/Projectiles/Melee/ArkOfTheCosmos_ParryHoldout.cs b/Projectiles/Melee/ArkOfTheCosmos_ParryHoldout.cs index cf2aace6b5..ed61618cec 100644 --- a/Projectiles/Melee/ArkOfTheCosmos_ParryHoldout.cs +++ b/Projectiles/Melee/ArkOfTheCosmos_ParryHoldout.cs @@ -41,6 +41,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.noEnchantmentVisuals = true; Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 10; + Projectile.timeLeft = (int)MaxTime; } public override bool? CanDamage() => Timer <= ParryTime && AlreadyParried == 0f; @@ -108,7 +109,7 @@ namespace CalamityMod.Projectiles.Melee { if (!initialized) //Initialization { - Projectile.timeLeft = (int)MaxTime; + //Projectile.timeLeft = (int)MaxTime; SoundEngine.PlaySound(SoundID.Item84 with { Volume = SoundID.Item84.Volume * 0.3f }, Projectile.Center); // 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction diff --git a/Projectiles/Melee/ArkOfTheCosmos_SwungBlade.cs b/Projectiles/Melee/ArkOfTheCosmos_SwungBlade.cs index 65c5cce750..854b5d2c48 100644 --- a/Projectiles/Melee/ArkOfTheCosmos_SwungBlade.cs +++ b/Projectiles/Melee/ArkOfTheCosmos_SwungBlade.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using System.Linq; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Particles; using CalamityMod.Sounds; @@ -273,6 +274,15 @@ namespace CalamityMod.Projectiles.Melee float extraRotations = (direction.ToRotation() + MathHelper.PiOver4 > Projectile.velocity.ToRotation()) ? -MathHelper.TwoPi : 0f; Projectile.rotation = MathHelper.Lerp(Projectile.velocity.ToRotation(), direction.ToRotation() + extraRotations, orientateProperly); + if (ChanceMissed == 0f && Owner.controlUseTile && ThrowCompletion > 0.99f) + { + ArkoftheCosmos sword = (Owner.HeldItem.ModItem as ArkoftheCosmos); + Projectile parrier = Main.projectile.FirstOrDefault(p => p.active && p.owner == Owner.whoAmI && p.type == ProjectileType(), null); + if (sword is not null && parrier is null) + { + int parryID = Projectile.NewProjectile(Owner.GetSource_ItemUse(sword.Item), Owner.Center, Owner.DirectionTo(Projectile.Center), ModContent.ProjectileType(), 0, 0, Owner.whoAmI); + } + } } //Sharticles diff --git a/Projectiles/Melee/Galaxia_PhoenixsPride.cs b/Projectiles/Melee/Galaxia_PhoenixsPride.cs index c473cb8de7..0e9dd39a3d 100644 --- a/Projectiles/Melee/Galaxia_PhoenixsPride.cs +++ b/Projectiles/Melee/Galaxia_PhoenixsPride.cs @@ -263,8 +263,7 @@ namespace CalamityMod.Projectiles.Melee if (CurrentState == 1f && Main.myPlayer == Projectile.owner && !AnyProjectiles(ProjectileType())) { Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ProjectileType(), Projectile.damage, 0f, Projectile.owner, target.whoAmI); - if (proj.ModProjectile is PhoenixsPrideFirewall fire) - fire.Scale = MathHelper.Clamp(target.width / 100f, 0.3f, 1.25f); + (proj.ModProjectile as PhoenixsPrideFirewall).Scale = MathHelper.Clamp(target.width / 100f, 0.3f, 1.25f); } } diff --git a/Projectiles/Melee/Galaxia_PhoenixsPrideFirewall.cs b/Projectiles/Melee/Galaxia_PhoenixsPrideFirewall.cs index 2f4a52d81d..90f305fa35 100644 --- a/Projectiles/Melee/Galaxia_PhoenixsPrideFirewall.cs +++ b/Projectiles/Melee/Galaxia_PhoenixsPrideFirewall.cs @@ -1,8 +1,10 @@ using CalamityMod.CalPlayer; using CalamityMod.Graphics.Primitives; using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using System; using System.IO; using Terraria; using Terraria.Graphics.Shaders; @@ -11,11 +13,11 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee { - public class PhoenixsPrideFirewall : ModProjectile, ILocalizedModType + public class PhoenixsPrideFirewall : ModProjectile, ILocalizedModType, IPixelatedPrimitiveRenderer { public new string LocalizationCategory => "Projectiles.Melee"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - public const int TornadoHeight = 480; + public const int MaxTornadoHeight = 270; public float Scale; // Size of the firewall, scales with NPC width public float fadeOut = 0f; // Used to control the firewall fading in and out at the start and end of its lifespan @@ -32,7 +34,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.penetrate = -1; Projectile.alpha = 255; Projectile.scale = Scale; - Projectile.timeLeft = 150; + Projectile.timeLeft = 180; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = FourSeasonsGalaxia.PhoenixAttunement_FlamePillarLocalIFrames; } @@ -40,20 +42,30 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { // Constantly follow its target - // Die if the target is no longer active + // Immediately start fading away if the target is no longer active if (!Target.active) { - Projectile.Kill(); - return; + Projectile.velocity *= 0.975f; + if (Projectile.timeLeft > 15) + Projectile.timeLeft = 15; } else - Projectile.Center = Target.Center + Target.velocity; + Projectile.velocity = (Projectile.velocity * 13f + (Target.Center - Projectile.Center).SafeNormalize(Vector2.Zero) * 24f) / 14f; // Fade in and out at the start and end of its lifespan - if (Projectile.timeLeft > 145) - fadeOut += 0.15f; + if (Projectile.timeLeft > 170) + fadeOut += 0.1f; if (Projectile.timeLeft < 15) fadeOut -= 0.05f; + + // Some smoke on the base + if (Projectile.timeLeft % 3 == 0) + { + MediumMistParticle smoke = new(Projectile.Center, Main.rand.NextVector2Circular(6f, 6f), Color.Orange, Color.DarkOrange, 1.1f, 170f); + GeneralParticleHandler.SpawnParticle(smoke); + SquareParticle spark = new(Projectile.Center, -Vector2.UnitY.RotatedByRandom(MathHelper.PiOver2) * 8f, true, 20, 0.9f, Color.White); + GeneralParticleHandler.SpawnParticle(spark); + } } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) @@ -62,46 +74,29 @@ namespace CalamityMod.Projectiles.Melee return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Bottom, - Projectile.Bottom - Vector2.UnitY * TornadoHeight, + Projectile.Bottom - Vector2.UnitY * MaxTornadoHeight, 72, ref _); } - public float WidthFunction(float completionRatio) => 50f * Scale * (completionRatio > 0.4f ? 1f : completionRatio * 2.5f); - - public override bool PreDraw(ref Color lightColor) + public float WidthFunction(float completionRatio) => MathF.Max(50f * Scale * (MathF.Pow(1f - completionRatio, 2) * 2.75f), 0.35f); + public Color ColorFunction(float completionRatio) => Color.Orange * (completionRatio > 0.1f ? 1f : completionRatio * 10f); + public void RenderPixelatedPrimitives(SpriteBatch spritebatch, PixelationPrimitiveLayer layer) { - Main.spriteBatch.EnterShaderRegion(); - GameShaders.Misc["CalamityMod:Bordernado"].UseSaturation(-0.2f); GameShaders.Misc["CalamityMod:Bordernado"].UseOpacity(fadeOut); GameShaders.Misc["CalamityMod:Bordernado"].SetShaderTexture(ModContent.Request("Terraria/Images/Misc/Perlin")); - Vector2[] drawPoints = new Vector2[5]; - Vector2 upwardAscent = Vector2.UnitY * TornadoHeight; + Vector2[] drawPoints = new Vector2[7]; + Vector2 upwardAscent = Vector2.UnitY * MaxTornadoHeight * fadeOut; Vector2 bottom = Projectile.Center; Vector2 top = bottom - upwardAscent; + // Offset is intentionally applied here instead of with an offset function in PrimitiveSettings to make it a bit choppier for (int i = 0; i < drawPoints.Length - 1; i++) - drawPoints[i] = Vector2.Lerp(top, bottom, i / (float)(drawPoints.Length - 1)); + drawPoints[i] = Vector2.Lerp(top + Vector2.UnitX * (MathF.Sin(Main.GameUpdateCount * 0.15f + i) * i * 6f), bottom, i / (float)(drawPoints.Length - 1)); drawPoints[drawPoints.Length - 1] = bottom; - PrimitiveRenderer.RenderTrail(drawPoints, new(WidthFunction, (_) => Color.Orange, shader: GameShaders.Misc["CalamityMod:Bordernado"]), 80); - - Main.spriteBatch.ExitShaderRegion(); - - Texture2D vortexTexture = ModContent.Request("CalamityMod/Projectiles/Boss/OldDukeVortex").Value; - for (int i = 0; i < 90; i++) - { - float angle = MathHelper.TwoPi * i / (25f * Scale) + Main.GlobalTimeWrappedHourly * MathHelper.TwoPi; - Color drawColor = Color.White * 0.04f; - drawColor.A = 0; - Vector2 drawPosition = bottom + angle.ToRotationVector2() * 4f - Main.screenPosition; - - drawPosition += (angle + Main.GlobalTimeWrappedHourly * i / 16f).ToRotationVector2() * 6f; - Main.EntitySpriteDraw(vortexTexture, drawPosition, null, drawColor * fadeOut, angle + MathHelper.PiOver2, vortexTexture.Size() * 0.5f, 0.2f * Scale, SpriteEffects.None, 0); - } - - return false; + PrimitiveRenderer.RenderTrail(drawPoints, new(WidthFunction, ColorFunction, pixelate: true, shader: GameShaders.Misc["CalamityMod:Bordernado"]), 80); } } } diff --git a/Projectiles/Melee/HolyColliderHoldout.cs b/Projectiles/Melee/HolyColliderHoldout.cs index 1ae89b259a..0dba23aa5b 100644 --- a/Projectiles/Melee/HolyColliderHoldout.cs +++ b/Projectiles/Melee/HolyColliderHoldout.cs @@ -432,7 +432,7 @@ namespace CalamityMod.Projectiles.Melee } for (int i = 0; i < 4; i++) { - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), target.Center, (new Vector2(0, -35).RotatedBy(MathHelper.ToRadians(45f))).RotatedBy(MathHelper.ToRadians(90f) * i), ModContent.ProjectileType(), (int)(Projectile.damage * 0.1), Projectile.knockBack, Projectile.owner, 0, target.whoAmI); + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), target.Center, (new Vector2(0, -35).RotatedBy(MathHelper.ToRadians(45f))).RotatedBy(MathHelper.ToRadians(90f) * i), ModContent.ProjectileType(), (int)(Projectile.damage * 0.1), Projectile.knockBack, Projectile.owner, 0); } } } diff --git a/Projectiles/Melee/TerratomereHoldoutProj.cs b/Projectiles/Melee/TerratomereHoldoutProj.cs index 4be39fcdda..5cba182be3 100644 --- a/Projectiles/Melee/TerratomereHoldoutProj.cs +++ b/Projectiles/Melee/TerratomereHoldoutProj.cs @@ -315,7 +315,6 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitPlayer(Player target, Player.HurtInfo info) { - target.AddBuff(ModContent.BuffType(), Terratomere.TrueMeleeGlacialStateTime); OnHitHealEffect(info.Damage); } #endregion Hit Effects and Collision diff --git a/Projectiles/Melee/Yoyos/LaceratorYoyo.cs b/Projectiles/Melee/Yoyos/LaceratorYoyo.cs index 067878f5a1..8e5be19829 100644 --- a/Projectiles/Melee/Yoyos/LaceratorYoyo.cs +++ b/Projectiles/Melee/Yoyos/LaceratorYoyo.cs @@ -2,6 +2,7 @@ using System.Linq; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Items.Weapons.Melee; +using CalamityMod.NPCs; using CalamityMod.Projectiles.Healing; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -13,23 +14,17 @@ using CalamityMod.Particles; namespace CalamityMod.Projectiles.Melee.Yoyos { + // Although normally yoyos are automatically exempted from pierce resist, + // the damage logic for the buzzsaw briefly clobbers aiStyle, necessitating a manual pierce resist exception. + [PierceResistException] public class LaceratorYoyo : ModProjectile { public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public const int MaxUpdates = 3; - private static int CircleRes = 60; - private static int VertRes = 4; - private static int SpikeCount = 8; - - private float circleProgress = 0; - private float verticalProgress = 1; - private bool goingUp = false; public float chargeProgress = 0; - private bool sawHit = false; private bool spawnedBlood = false; - private int sawDir = 0; public override void SetStaticDefaults() @@ -63,6 +58,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos chargeProgress = 1; if (chargeProgress > 0) { + // Handles damage logic for the buzzsaw visual if (Main.player[Projectile.owner].miscCounter % 5 == 0 && Projectile.FinalExtraUpdate() && chargeProgress > 0.05f) { spawnedBlood = false; @@ -71,7 +67,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos Projectile.height = 196; Projectile.Center = Projectile.position; Projectile.originalDamage = Projectile.damage; - Projectile.damage = (int)(Projectile.damage * MathHelper.Lerp(0, 1f, chargeProgress)); + Projectile.damage = (int)(Projectile.damage * MathHelper.Lerp(0, 0.75f, chargeProgress)); sawHit = true; Projectile.usesIDStaticNPCImmunity = true; Projectile.aiStyle = -1; @@ -108,11 +104,10 @@ namespace CalamityMod.Projectiles.Melee.Yoyos { if (sawHit) { - target.AddBuff(ModContent.BuffType(), 60); Vector2 bloodpos = Projectile.Center + Projectile.DirectionTo(target.Center) * 84; if (!spawnedBlood && Main.rand.NextBool() && chargeProgress > 0.2f && target.Hitbox.Contains(bloodpos.ToPoint())) { - Projectile.NewProjectile(Projectile.GetSource_OnHit(target), bloodpos, Projectile.DirectionTo(target.Center).RotatedBy(sawDir * MathHelper.PiOver2 * 0.9f).RotatedByRandom(0.1f) * Main.rand.NextFloat(3f, 5f), ModContent.ProjectileType(), 1, 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_OnHit(target), bloodpos, Projectile.DirectionTo(target.Center).RotatedBy(sawDir * MathHelper.PiOver2 * 0.9f).RotatedByRandom(0.1f) * Main.rand.NextFloat(3f, 5f), ModContent.ProjectileType(), 4, 0f, Projectile.owner); spawnedBlood = true; } return; diff --git a/Projectiles/Ranged/BloodBoilerFire.cs b/Projectiles/Ranged/BloodBoilerFire.cs index 5a1869b20e..87e63d5d6e 100644 --- a/Projectiles/Ranged/BloodBoilerFire.cs +++ b/Projectiles/Ranged/BloodBoilerFire.cs @@ -198,7 +198,7 @@ namespace CalamityMod.Projectiles.Ranged { if (improvedHeal) { - BloodstoneHealOrb.Heal(player, 8); + BloodstoneHealOrb.Heal(player, 6); } Projectile.Kill(); diff --git a/Projectiles/Ranged/FirestormCannonHoldout.cs b/Projectiles/Ranged/FirestormCannonHoldout.cs new file mode 100644 index 0000000000..9b1b5d20bc --- /dev/null +++ b/Projectiles/Ranged/FirestormCannonHoldout.cs @@ -0,0 +1,164 @@ +using System; +using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Particles; +using CalamityMod.Projectiles.BaseProjectiles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Utilities; +using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.Graphics.Shaders; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Ranged +{ + public class FirestormCannonHoldout : BaseGunHoldoutProjectile + { + public override int AssociatedItemID => ModContent.ItemType(); + public override float MaxOffsetLengthFromArm => 16f; + public override float BaseOffsetY => -5f; + public override float OffsetYDownwards => 5f; + public override Vector2 GunTipPosition => Projectile.Center + Vector2.UnitX.RotatedBy(Projectile.rotation) * Projectile.width * 0.35f; + + public static readonly SoundStyle WarningSound = new SoundStyle("CalamityMod/Sounds/Item/FireImplosion") with { Volume = 0.75f }; + public static readonly SoundStyle OverheatSound = new("CalamityMod/Sounds/Item/HeliumFlashSteamRelease"); + public SlotId WarningSlot; + public ref float Timer => ref Projectile.ai[0]; + private int BuiltHeat => (Owner.ActiveItem().ModItem as FirestormCannon).BuiltUpHeat; + private bool displayOverheat = false; + private const int WarningTime = FirestormCannon.OverheatLevel - 100; + + public override void SetDefaults() + { + base.SetDefaults(); + Projectile.friendly = true; + Projectile.penetrate = -1; + Projectile.DamageType = DamageClass.Ranged; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 15; + } + public override void KillHoldoutLogic() + { + // What kills the holdout: + // Dead, CCed, Cursed, etc. + // Not holding the item + // Right-clicking (Can kill it early) (Does not work if in overheat state) + // Completely cooling while not firing + if (Owner.CantUseHoldout(false) || HeldItem.type != Owner.ActiveItem().type || + (Owner.Calamity().mouseRight && !displayOverheat) || (BuiltHeat == 0 && !Main.mouseLeft)) + { + if (SoundEngine.TryGetActiveSound(WarningSlot, out var warn)) + warn.Stop(); + + Projectile.Kill(); + } + } + + public override void HoldoutAI() + { + // Timer should only increment while firing and not overheated + if (Main.mouseLeft && Owner.Calamity().flareGunOverheat == 0) + Timer++; + else + Timer = 0; + + // Once holding the fire button down long enough, start actually firing + if (Timer >= 30) + { + // For some reason using ActiveItem() here breaks its functionality while being held on the cursor + (Owner.HeldItem.ModItem as FirestormCannon).BuiltUpHeat++; + + // Overheat yourself if you fire too long + if (BuiltHeat >= FirestormCannon.OverheatLevel) + { + WarningSlot = SoundEngine.PlaySound(OverheatSound, Owner.Center); + for (int e = 0; e < 7; e++) + { + Vector2 dustVel = -Projectile.rotation.ToRotationVector2().RotatedByRandom(MathHelper.Pi * 0.15f) * Main.rand.NextFloat(3.8f, 5.5f); + Dust dust = Dust.NewDustPerfect(Projectile.Center, DustID.Flare, dustVel, Scale: 1.5f); + dust.noGravity = true; + } + + // Overheat damage ignores defense and is undodgeable, also inflicts On Fire + Owner.Hurt(PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.FlareGunOverheat").ToNetworkText(Owner.name)), FirestormCannon.OverheatDamage, 1, dodgeable: false, scalingArmorPenetration: 1f, knockback: 0f); + Owner.AddBuff(BuffID.OnFire, FirestormCannon.OverheatCooldown); + Owner.Calamity().flareGunOverheat = FirestormCannon.OverheatCooldown; + displayOverheat = true; + return; + } + + // Play a warning sound + if (BuiltHeat == WarningTime) + { + WarningSlot = SoundEngine.PlaySound(WarningSound, Owner.Center); + } + + // Controls the escalating firing speed + float firingLerp = Utils.GetLerpValue(0, 90, Timer - 30, true); + int firingFrequency = (int)MathHelper.Lerp(HeldItem.useTime, HeldItem.useTime / 2, firingLerp); + // Actually fire shtuff + if (Timer % firingFrequency == 0) + { + SoundEngine.PlaySound(SoundID.Item11 with { Volume = 0.8f }, Owner.Center); + if (Main.myPlayer == Projectile.owner) + { + Owner.PickAmmo(HeldItem, out int flareType, out _, out _, out _, out _, Main.rand.Next(100) >= 70); + Vector2 velocity = Projectile.velocity.RotatedByRandom(MathHelper.Pi * 0.04f * (1f + firingLerp * 0.5f)) * Owner.ActiveItem().shootSpeed; + Projectile flare = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, velocity, flareType, Projectile.damage, Projectile.knockBack, Projectile.owner, 0f, 0f, 1f); + flare.penetrate = 3; + flare.MaxUpdates = 2; + flare.timeLeft = 600; + flare.DamageType = DamageClass.Ranged; + flare.usesIDStaticNPCImmunity = false; + flare.usesLocalNPCImmunity = true; + flare.localNPCHitCooldown = 30 * 2; + } + } + } + + // Reset overheat draw color once the heat passes below the warning indicator + if (BuiltHeat < WarningTime) + displayOverheat = false; + // Draw smoke effect while overheated + if (displayOverheat && Main.rand.NextBool(3)) + { + HeavySmokeParticle smoke = new(GunTipPosition, -Vector2.UnitY * 7.5f, Color.DarkGray, 25, 0.4f, 0.75f); + GeneralParticleHandler.SpawnParticle(smoke); + } + // Constantly move the warning sound on top of the player + if (SoundEngine.TryGetActiveSound(WarningSlot, out var warning) && warning.IsPlaying) + warning.Position = Projectile.Center; + } + + // Pan-searing mechanic; reduces heat a bit + public override bool? CanDamage() => BuiltHeat >= 120 && Owner.Calamity().flareGunOverheat == 0; + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + target.AddBuff(BuffID.OnFire, 300); + (Owner.HeldItem.ModItem as FirestormCannon).BuiltUpHeat -= 6; + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = TextureAssets.Projectile[Type].Value; + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + float drawRotation = Projectile.rotation + (Projectile.spriteDirection == -1 ? MathHelper.Pi : 0f); + Vector2 rotationPoint = texture.Size() * 0.5f; + SpriteEffects flipSprite = (Projectile.spriteDirection * Owner.gravDir == -1) ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + Color tintColor = displayOverheat ? Color.Black : + BuiltHeat >= WarningTime ? Color.Lerp(Color.Tomato, Color.White, MathF.Abs(MathF.Sin(Owner.miscCounter * MathHelper.Pi / 30f))) : Color.Tomato; + + CalamityUtils.EnterShaderRegion(Main.spriteBatch); + GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(Utils.GetLerpValue(0, WarningTime, BuiltHeat, true) * 0.45f); + GameShaders.Misc["CalamityMod:BasicTint"].UseColor(tintColor); + GameShaders.Misc["CalamityMod:BasicTint"].Apply(); + + Main.EntitySpriteDraw(texture, drawPosition, null, Projectile.GetAlpha(lightColor), drawRotation, rotationPoint, Projectile.scale * Owner.gravDir, flipSprite); + CalamityUtils.ExitShaderRegion(Main.spriteBatch); + return false; + } + } +} diff --git a/Projectiles/Ranged/HalleysComet.cs b/Projectiles/Ranged/HalleysComet.cs index be4ba1de28..1bed54d8eb 100644 --- a/Projectiles/Ranged/HalleysComet.cs +++ b/Projectiles/Ranged/HalleysComet.cs @@ -77,7 +77,10 @@ namespace CalamityMod.Projectiles.Ranged public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 450); + //Doze - I gave this long debuff infliction times due to the lack of weapons that inflict debuffs for a decent time + //Most common vanilla debuffs have a way to inflict them for 15, 20, or even 30 seconds + //Both Elf Melter and Flamethrower in vanilla do 20 seconds of their debuff. This is done to match. + target.AddBuff(ModContent.BuffType(), CalamityUtils.SecondsToFrames(20)); SoundEngine.PlaySound(HalleysInferno.Hit, Projectile.Center); // Dust emission on hit diff --git a/Projectiles/Ranged/SpectralFlare.cs b/Projectiles/Ranged/SpectralFlare.cs new file mode 100644 index 0000000000..d8e99defad --- /dev/null +++ b/Projectiles/Ranged/SpectralFlare.cs @@ -0,0 +1,88 @@ +using Microsoft.Xna.Framework; +using Terraria.ModLoader; +using Terraria; +using Terraria.ID; +using CalamityMod.Buffs.DamageOverTime; +using System; + +namespace CalamityMod.Projectiles.Ranged +{ + public class SpectralFlare : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Ranged"; + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 6; + Projectile.scale = 1.15f; + Projectile.friendly = true; + Projectile.DamageType = DamageClass.Ranged; + Projectile.netImportant = true; + Projectile.aiStyle = ProjAIStyleID.Flare; + Projectile.alpha = 255; + Projectile.penetrate = 3; + Projectile.MaxUpdates = 2; + Projectile.timeLeft = 600; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 30 * Projectile.MaxUpdates; + DrawOriginOffsetY = -10; + } + + public override bool PreAI() + { + if (Projectile.alpha > 0) + { + Projectile.alpha -= 80; + if (Projectile.alpha < 0) + Projectile.alpha = 0; + } + + float xVel = Projectile.ai[0]; + float yVel = Projectile.ai[1]; + if (xVel == 0f && yVel == 0f) + xVel = 1f; + float dist = MathF.Sqrt(xVel * xVel + yVel * yVel); + dist = 4f / dist; + xVel *= dist; + yVel *= dist; + + if (Projectile.alpha < 70) + { + Dust dust = Dust.NewDustDirect(Projectile.position - Vector2.UnitY * 2f, 7, 7, DustID.SpectreStaff, Projectile.velocity.X, Projectile.velocity.Y, Scale: 1.15f); + dust.noGravity = true; + dust.velocity *= 0.3f; + dust.position.X -= xVel; + dust.position.Y -= yVel; + dust.velocity.X -= xVel; + dust.velocity.Y -= yVel; + } + + if (Projectile.localAI[0] == 0f) + { + Projectile.ai[0] = Projectile.velocity.X; + Projectile.ai[1] = Projectile.velocity.Y; + + if (Projectile.localAI[1] == 1f) + { + Projectile.velocity.Y += 0.09f; + if (Projectile.velocity.Y > 16f) + Projectile.velocity.Y = 16f; + } + } + else + { + if (!Collision.SolidCollision(Projectile.position, Projectile.width, Projectile.height)) + { + Projectile.localAI[0] = 0f; + Projectile.localAI[1] = 1f; + } + + Projectile.damage = 0; + } + Projectile.rotation = MathF.Atan2(Projectile.ai[1], Projectile.ai[0]) + MathHelper.PiOver2; + + return false; + } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), Main.rand.NextBool(3) ? 600 : 300); + } +} diff --git a/Projectiles/Ranged/SpectralFlare.png b/Projectiles/Ranged/SpectralFlare.png new file mode 100644 index 0000000000..ecba14a897 Binary files /dev/null and b/Projectiles/Ranged/SpectralFlare.png differ diff --git a/Projectiles/Ranged/SpectralstormCannonHoldout.cs b/Projectiles/Ranged/SpectralstormCannonHoldout.cs new file mode 100644 index 0000000000..4f3e4e59d9 --- /dev/null +++ b/Projectiles/Ranged/SpectralstormCannonHoldout.cs @@ -0,0 +1,205 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Particles; +using CalamityMod.Projectiles.BaseProjectiles; +using CalamityMod.Projectiles.Rogue; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Utilities; +using System; +using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.Graphics.Shaders; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Ranged +{ + public class SpectralstormCannonHoldout : BaseGunHoldoutProjectile + { + public override int AssociatedItemID => ModContent.ItemType(); + public override float MaxOffsetLengthFromArm => 16f; + public override float BaseOffsetY => -5f; + public override float OffsetYDownwards => 5f; + public override Vector2 GunTipPosition => Projectile.Center + Vector2.UnitX.RotatedBy(Projectile.rotation) * Projectile.width * 0.35f; + + public static readonly SoundStyle OverheatSound = new SoundStyle("CalamityMod/Sounds/Custom/AbilitySounds/OmegaBlueAbility") with { Pitch = -0.5f }; + public SlotId WarningSlot; + public ref float Timer => ref Projectile.ai[0]; + public ref float SoulTimer => ref Projectile.ai[1]; + private int BuiltHeat => (Owner.ActiveItem().ModItem as SpectralstormCannon).BuiltUpHeat; + private bool displayOverheat = false; + private const int WarningTime = SpectralstormCannon.OverheatLevel - 100; + + public override void SetDefaults() + { + base.SetDefaults(); + Projectile.friendly = true; + Projectile.penetrate = -1; + Projectile.DamageType = DamageClass.Ranged; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 15; + } + public override void KillHoldoutLogic() + { + // What kills the holdout: + // Dead, CCed, Cursed, etc. + // Not holding the item + // Right-clicking (Can kill it early) (Does not work if in overheat state) + // Completely cooling while not firing + if (Owner.CantUseHoldout(false) || HeldItem.type != Owner.ActiveItem().type || + (Owner.Calamity().mouseRight && !displayOverheat) || (BuiltHeat == 0 && !Main.mouseLeft)) + { + if (SoundEngine.TryGetActiveSound(WarningSlot, out var warn)) + warn.Stop(); + + Projectile.Kill(); + } + } + + public override void HoldoutAI() + { + // Timer should only increment while firing and not overheated + if (Owner.Calamity().flareGunOverheat == 0) + { + if (Main.mouseLeft) + { + Timer++; + SoulTimer = 0; + } + else + { + Timer = 0; + SoulTimer++; + } + } + else + { + Timer = 0; + SoulTimer = 0; + } + + // Once holding the fire button down long enough, start actually firing + if (Timer >= 30) + { + // For some reason using ActiveItem() here breaks its functionality while being held on the cursor + (Owner.HeldItem.ModItem as SpectralstormCannon).BuiltUpHeat++; + + // Overheat yourself if you fire too long + if (BuiltHeat >= SpectralstormCannon.OverheatLevel) + { + WarningSlot = SoundEngine.PlaySound(OverheatSound, Owner.Center); + for (int e = 0; e < 7; e++) + { + Vector2 dustVel = -Projectile.rotation.ToRotationVector2().RotatedByRandom(MathHelper.Pi * 0.15f) * Main.rand.NextFloat(3.8f, 5.5f); + Dust dust = Dust.NewDustPerfect(Projectile.Center, DustID.Flare, dustVel, Scale: 1.5f); + dust.noGravity = true; + } + + // Overheat damage ignores defense and is undodgeable, also inflicts Nightwither + Owner.Hurt(PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.FlareGunOverheat").ToNetworkText(Owner.name)), SpectralstormCannon.OverheatDamage, 1, dodgeable: false, scalingArmorPenetration: 1f, knockback: 0f); + Owner.AddBuff(ModContent.BuffType(), SpectralstormCannon.OverheatCooldown); + Owner.Calamity().flareGunOverheat = SpectralstormCannon.OverheatCooldown; + displayOverheat = true; + // Spectralstorm Cannon's overheat immediately resets heat after triggered + (Owner.HeldItem.ModItem as SpectralstormCannon).BuiltUpHeat = 1; + + // Spawn a burst of souls on overheat + if (Main.myPlayer == Projectile.owner) + { + for (int i = 0; i < 25; i++) + { + Vector2 soulVel = Main.rand.NextVector2CircularEdge(1f, 1f) * Main.rand.NextFloat(4f, 7.5f); + Projectile soul = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center, soulVel, ModContent.ProjectileType(), (int)(Projectile.damage * 1.15f), 0f, Projectile.owner); + soul.timeLeft = 250; + soul.DamageType = DamageClass.Ranged; + soul.frame = Main.rand.Next(4); + } + } + return; + } + + // Play a warning sound + if (BuiltHeat == WarningTime) + { + WarningSlot = SoundEngine.PlaySound(FirestormCannonHoldout.WarningSound, Owner.Center); + } + + // Controls the escalating firing speed + float firingLerp = Utils.GetLerpValue(0, 90, Timer - 30, true); + int firingFrequency = (int)MathHelper.Lerp(HeldItem.useTime, HeldItem.useTime / 2, firingLerp); + // Actually fire shtuff + if (Timer % firingFrequency == 0) + { + SoundEngine.PlaySound(SoundID.Item11 with { Volume = 0.8f }, Owner.Center); + if (Main.myPlayer == Projectile.owner) + { + Owner.PickAmmo(HeldItem, out _, out _, out _, out _, out _, Main.rand.Next(100) >= 70); + Vector2 velocity = Projectile.velocity.RotatedByRandom(MathHelper.Pi * 0.015f * (1f + firingLerp * 0.25f)) * Owner.ActiveItem().shootSpeed; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), GunTipPosition, velocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + } + } + } + + // Fire souls while dissipating heat + if (SoulTimer % 8 == 4f) + { + if (SoulTimer % 16 == 4f) + SoundEngine.PlaySound(SoundID.Item103 with { Volume = 0.7f }, Owner.Center); + if (Main.myPlayer == Projectile.owner) + { + Vector2 velocity = Projectile.velocity.RotatedByRandom(MathHelper.Pi * 0.03f) * Owner.ActiveItem().shootSpeed * 0.8f; + Projectile soul = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, velocity, ModContent.ProjectileType(), Projectile.damage, 0f, Projectile.owner, 2f); + soul.DamageType = DamageClass.Ranged; + soul.frame = Main.rand.Next(4); + } + } + + // Reset overheat draw color once the overheat ends + if (Owner.Calamity().flareGunOverheat == 0) + displayOverheat = false; + // Draw smoke effect while overheated + if (displayOverheat && Main.rand.NextBool(3)) + { + HeavySmokeParticle smoke = new(GunTipPosition, -Vector2.UnitY * 7.5f, Color.DarkCyan, 25, 0.4f, 0.75f); + GeneralParticleHandler.SpawnParticle(smoke); + } + // Constantly move the warning sound on top of the player + if (SoundEngine.TryGetActiveSound(WarningSlot, out var warning) && warning.IsPlaying) + warning.Position = Projectile.Center; + } + + // Pan-searing mechanic; reduces heat a bit + public override bool? CanDamage() => BuiltHeat >= 120 && Owner.Calamity().flareGunOverheat == 0; + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + target.AddBuff(BuffID.OnFire3, 300); + (Owner.HeldItem.ModItem as SpectralstormCannon).BuiltUpHeat -= 6; + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = TextureAssets.Projectile[Type].Value; + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + float drawRotation = Projectile.rotation + (Projectile.spriteDirection == -1 ? MathHelper.Pi : 0f); + Vector2 rotationPoint = texture.Size() * 0.5f; + SpriteEffects flipSprite = (Projectile.spriteDirection * Owner.gravDir == -1) ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + Color tintColor = displayOverheat ? Color.Black : + BuiltHeat >= WarningTime ? Color.Lerp(Color.LightSalmon, Color.White, MathF.Abs(MathF.Sin(Owner.miscCounter * MathHelper.Pi / 30f))) : Color.LightSalmon; + float opacity = Utils.GetLerpValue(0, WarningTime, BuiltHeat, true); + + Projectile.DrawBackglow(Color.HotPink * opacity, 4f, null, null, (Projectile.spriteDirection * Owner.gravDir == -1) ? SpriteEffects.FlipVertically : SpriteEffects.None); + + CalamityUtils.EnterShaderRegion(Main.spriteBatch); + GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity((displayOverheat ? 1f : opacity) * 0.45f); + GameShaders.Misc["CalamityMod:BasicTint"].UseColor(tintColor); + GameShaders.Misc["CalamityMod:BasicTint"].Apply(); + + Main.EntitySpriteDraw(texture, drawPosition, null, Projectile.GetAlpha(lightColor), drawRotation, rotationPoint, Projectile.scale * Owner.gravDir, flipSprite); + CalamityUtils.ExitShaderRegion(Main.spriteBatch); + return false; + } + } +} diff --git a/Projectiles/Rogue/BloodsoakedCrashax.cs b/Projectiles/Rogue/BloodsoakedCrashax.cs index 090ef8dd38..c9bece2786 100644 --- a/Projectiles/Rogue/BloodsoakedCrashax.cs +++ b/Projectiles/Rogue/BloodsoakedCrashax.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Rogue else { // Gravity - Projectile.velocity.Y += 0.11f; + Projectile.velocity.Y += 0.07f; // Cap velocity. speed = Projectile.velocity.Length(); @@ -104,16 +104,14 @@ namespace CalamityMod.Projectiles.Rogue private void OnHitEffects(int damage) { - grind += 5; //THE GRIND NEVER STOPS - if (grind > 15) - grind = 15; // except when it's too much + grind += 6; //THE GRIND NEVER STOPS + if (grind > 18) + grind = 18; // except when it's too much if (Projectile.Calamity().stealthStrike && Projectile.owner == Main.myPlayer) //stealth strike attack { int projID = ModContent.ProjectileType(); - int bloodDamage = Projectile.damage; - float bloodKB = 1f; - int stealth = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.UnitX.RotatedByRandom(MathHelper.TwoPi)*4f, projID, bloodDamage, bloodKB, Projectile.owner, 1f, 0.85f + Main.rand.NextFloat() * 1.15f); + int stealth = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.UnitX.RotatedByRandom(MathHelper.Pi) * 4f, projID, (int)(Projectile.damage * 0.5f), 1f, Projectile.owner, 1f, 0.85f + Main.rand.NextFloat() * 1.15f); if (stealth.WithinBounds(Main.maxProjectiles)) { Main.projectile[stealth].DamageType = RogueDamageClass.Instance; @@ -127,7 +125,7 @@ namespace CalamityMod.Projectiles.Rogue float spreadAmount = MathHelper.ToRadians(360); for (var i = 0; i < orbAmount; i++) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.One.RotatedByRandom(spreadAmount) * 2f * Main.rand.NextFloat(0.75f, 1.25f), ModContent.ProjectileType(), 20, 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.One.RotatedByRandom(spreadAmount) * 2f * Main.rand.NextFloat(0.75f, 1.25f), ModContent.ProjectileType(), 10, 0f, Projectile.owner); } } diff --git a/Projectiles/Rogue/BlunderBoosterLightning.cs b/Projectiles/Rogue/BlunderBoosterLightning.cs index 29bd9d4098..a22183b817 100644 --- a/Projectiles/Rogue/BlunderBoosterLightning.cs +++ b/Projectiles/Rogue/BlunderBoosterLightning.cs @@ -14,6 +14,8 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public static int frameWidth = 12; public static int frameHeight = 26; + public int dir = 0; + public float intensity = 0; public override void SetStaticDefaults() { @@ -23,15 +25,17 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - Projectile.width = 10; - Projectile.height = 10; + Projectile.width = 40; + Projectile.height = 40; Projectile.friendly = true; Projectile.tileCollide = false; Projectile.penetrate = 1; - Projectile.timeLeft = 120; + Projectile.extraUpdates = 2; + Projectile.timeLeft = 290; Projectile.DamageType = RogueDamageClass.Instance; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 15; + Projectile.localNPCHitCooldown = -1; + Projectile.ArmorPenetration = 15; } public override void AI() @@ -49,43 +53,20 @@ namespace CalamityMod.Projectiles.Rogue Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; - if (Projectile.timeLeft < 55 && Projectile.ai[1] != 1f) - { - Projectile.tileCollide = true; - } - Projectile.ai[1]++; - if (Projectile.ai[1] >= 15f) - { - float minDist = 999f; - int index = -1; - foreach (NPC npc in Main.ActiveNPCs) - { - if (npc.CanBeChasedBy(Projectile, false)) - { - float dist = (Projectile.Center - npc.Center).Length(); - if (dist < minDist) - { - minDist = dist; - index = npc.whoAmI; - } - } - } - Vector2 velocityNew; - if (minDist < 999f && index != -1) - { - velocityNew = Main.npc[index].Center - Projectile.Center; - velocityNew.Normalize(); - velocityNew *= 2f; - Projectile.velocity += velocityNew; - if (Projectile.velocity.Length() > 10f) - { - Projectile.velocity.Normalize(); - Projectile.velocity *= 10f; - } - } + if (dir == 0) + { + Projectile.timeLeft -= Main.rand.Next(5, 20 + 1); + dir = Main.rand.NextBool() ? -1 : 1; + intensity = Main.rand.NextFloat(0.2f, 1.2f); } + + + if (Projectile.timeLeft < 190) + CalamityUtils.HomeInOnSelectedNPC(Projectile, Projectile.Center.ClosestNPCAt(1500), true, 0.65f * intensity, 8, 0.98f, 0.99f, true); + else + Projectile.velocity = Projectile.velocity.RotatedBy(0.04f * dir * intensity) * Main.rand.NextFloat(0.985f, 1f); } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) diff --git a/Projectiles/Rogue/DoomsdayDeviceProjectile.cs b/Projectiles/Rogue/DoomsdayDeviceProjectile.cs index 6788a60063..063e90bd0a 100644 --- a/Projectiles/Rogue/DoomsdayDeviceProjectile.cs +++ b/Projectiles/Rogue/DoomsdayDeviceProjectile.cs @@ -33,6 +33,8 @@ namespace CalamityMod.Projectiles.Rogue public int maxStealthHits = 5; // How many bounces the stealth strike has. This does not include the inital and final hit, so be sure to take those into account if you adjust this. public Color mainColor = Color.White; + public Color c1 = new Color(121, 240, 17); + public Color c2 = new Color(0, 208, 240); public NPC lastHitTarget; public override void SetDefaults() @@ -57,8 +59,8 @@ namespace CalamityMod.Projectiles.Rogue float rate = (Main.GlobalTimeWrappedHourly * 6); List eColors = new List() { - Color.Turquoise, - Color.Orchid + c1, + c2 }; int colorIndex = (int)(rate / 2 % eColors.Count); Color currentColor = eColors[colorIndex]; @@ -189,7 +191,7 @@ namespace CalamityMod.Projectiles.Rogue c.velocity = (MathHelper.TwoPi * i / 12f).ToRotationVector2().RotatedBy(Projectile.rotation) * 5.5f * (i % 2 == 0 ? 0.8f : 1f); c.scale = 0.7f * (i % 2 == 0 ? 2.2f : 1.8f); c.noGravity = true; - c.color = i % 2 == 0 ? Color.Turquoise : Color.Orchid; + c.color = i % 2 == 0 ? c1 : c2; c.noLightEmittence = true; } @@ -304,12 +306,12 @@ namespace CalamityMod.Projectiles.Rogue dust2.scale = Main.rand.NextFloat(1.5f, 1.7f) - Math.Abs(variance); dust2.velocity = (Projectile.velocity.SafeNormalize(Vector2.UnitX) * 5 * charge).RotatedBy(variance) * Main.rand.NextFloat(0.3f, 1f) * (1 - Math.Abs(variance)) * finalHitMult; dust2.noGravity = true; - dust2.color = Main.rand.NextBool() ? Color.Turquoise : Color.Orchid; + dust2.color = Main.rand.NextBool() ? c1 : c2; } - Particle pulse = new CustomSpark(Projectile.Center, -Projectile.velocity.SafeNormalize(Vector2.UnitX) * 3, "CalamityMod/Particles/HollowCircleSoftEdge", false, 14, 0.2f, Color.Turquoise * 0.85f, new Vector2(3f, 1f), extraRotation: MathHelper.ToRadians(90), shrinkSpeed: 0.9f); + Particle pulse = new CustomSpark(Projectile.Center, -Projectile.velocity.SafeNormalize(Vector2.UnitX) * 3, "CalamityMod/Particles/HollowCircleSoftEdge", false, 14, 0.2f, c1 * 0.85f, new Vector2(3f, 1f), extraRotation: MathHelper.ToRadians(90), shrinkSpeed: 0.9f); GeneralParticleHandler.SpawnParticle(pulse); - Particle pulse2 = new CustomSpark(Projectile.Center, -Projectile.velocity.SafeNormalize(Vector2.UnitX) * 2.5f, "CalamityMod/Particles/HollowCircleSoftEdge", false, 14, 0.175f * finalHitMult, Color.Orchid * 0.7f, new Vector2(2.5f, 2f), extraRotation: MathHelper.ToRadians(90), shrinkSpeed: 0.9f); + Particle pulse2 = new CustomSpark(Projectile.Center, -Projectile.velocity.SafeNormalize(Vector2.UnitX) * 2.5f, "CalamityMod/Particles/HollowCircleSoftEdge", false, 14, 0.175f * finalHitMult, c2 * 0.7f, new Vector2(2.5f, 2f), extraRotation: MathHelper.ToRadians(90), shrinkSpeed: 0.9f); GeneralParticleHandler.SpawnParticle(pulse2); Owner.Calamity().GeneralScreenShakePower = 3; @@ -357,7 +359,7 @@ namespace CalamityMod.Projectiles.Rogue dust2.scale = Main.rand.NextFloat(1.5f, 1.7f) - Math.Abs(variance); dust2.velocity = (launchDir * 5 * charge).RotatedBy(variance) * Main.rand.NextFloat(0.3f, 1f) * (1 - Math.Abs(variance)) * finalHitMult; dust2.noGravity = true; - dust2.color = Main.rand.NextBool() ? Color.Turquoise : Color.Orchid; + dust2.color = Main.rand.NextBool() ? c1 : c2; } if (hasReachedFullCharge) @@ -365,9 +367,9 @@ namespace CalamityMod.Projectiles.Rogue SoundStyle soundExtra = new("CalamityMod/Sounds/Item/DoomsdayDeviceImpact"); SoundEngine.PlaySound(soundExtra with { Volume = 1f, Pitch = 0.35f + extraPitch, MaxInstances = 6 }, Projectile.Center); - Particle pulse = new CustomSpark(Projectile.Center, -launchDir * 3, "CalamityMod/Particles/HollowCircleSoftEdge", false, 14, 0.4f * finalHitMult, Color.Turquoise * 0.85f, new Vector2(3f, 1f), extraRotation: MathHelper.ToRadians(90), shrinkSpeed: 0.9f); + Particle pulse = new CustomSpark(Projectile.Center, -launchDir * 3, "CalamityMod/Particles/HollowCircleSoftEdge", false, 14, 0.4f * finalHitMult, c1 * 0.85f, new Vector2(3f, 1f), extraRotation: MathHelper.ToRadians(90), shrinkSpeed: 0.9f); GeneralParticleHandler.SpawnParticle(pulse); - Particle pulse2 = new CustomSpark(Projectile.Center, -launchDir * 2.5f, "CalamityMod/Particles/HollowCircleSoftEdge", false, 14, 0.35f * finalHitMult, Color.Orchid * 0.7f, new Vector2(2.5f, 2f), extraRotation: MathHelper.ToRadians(90), shrinkSpeed: 0.9f); + Particle pulse2 = new CustomSpark(Projectile.Center, -launchDir * 2.5f, "CalamityMod/Particles/HollowCircleSoftEdge", false, 14, 0.35f * finalHitMult, c2 * 0.7f, new Vector2(2.5f, 2f), extraRotation: MathHelper.ToRadians(90), shrinkSpeed: 0.9f); GeneralParticleHandler.SpawnParticle(pulse2); } SoundStyle sound = new("CalamityMod/Sounds/Item/DoomsdayDeviceImpact"); diff --git a/Projectiles/Rogue/FrostyFlareProj.cs b/Projectiles/Rogue/FrostyFlareProj.cs index a405ddaa85..76c782b4e5 100644 --- a/Projectiles/Rogue/FrostyFlareProj.cs +++ b/Projectiles/Rogue/FrostyFlareProj.cs @@ -121,7 +121,6 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitPlayer(Player target, Player.HurtInfo info) { target.AddBuff(BuffID.Frostburn2, 180); - target.AddBuff(ModContent.BuffType(), 30); } public override bool? CanDamage() => Projectile.ai[0] == 0f ? null : false; diff --git a/Projectiles/Rogue/FrostyFlareStealth.cs b/Projectiles/Rogue/FrostyFlareStealth.cs index 33bc7eb8a3..5c4e1ebc5a 100644 --- a/Projectiles/Rogue/FrostyFlareStealth.cs +++ b/Projectiles/Rogue/FrostyFlareStealth.cs @@ -130,7 +130,6 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitPlayer(Player target, Player.HurtInfo info) { target.AddBuff(BuffID.Frostburn2, 180); - target.AddBuff(ModContent.BuffType(), 30); } public override bool? CanDamage() => Projectile.ai[0] == 0f ? null : false; diff --git a/Projectiles/Rogue/HypothermiaChunk.cs b/Projectiles/Rogue/HypothermiaChunk.cs index bdedfa919b..e1ee953a4b 100644 --- a/Projectiles/Rogue/HypothermiaChunk.cs +++ b/Projectiles/Rogue/HypothermiaChunk.cs @@ -82,7 +82,6 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitPlayer(Player target, Player.HurtInfo info) { target.AddBuff(ModContent.BuffType(), 300); - target.AddBuff(ModContent.BuffType(), 150); } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Rogue/IcebreakerHammer.cs b/Projectiles/Rogue/IcebreakerHammer.cs index 3ab30014a9..e079d036ad 100644 --- a/Projectiles/Rogue/IcebreakerHammer.cs +++ b/Projectiles/Rogue/IcebreakerHammer.cs @@ -90,19 +90,6 @@ namespace CalamityMod.Projectiles.Rogue int ice = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 1.5), Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f, 1f); if (ice.WithinBounds(Main.maxProjectiles)) Main.projectile[ice].DamageType = RogueDamageClass.Instance; - - int buffType = ModContent.BuffType(); - float radius = 112f; // 7 blocks - - foreach (Player player in Main.ActivePlayers) - { - Player owner = Main.player[Projectile.owner]; - if ((owner.team != player.team || player.team == 0) && player.hostile && owner.hostile && !player.dead && !player.buffImmune[buffType] && Vector2.Distance(Projectile.Center, player.Center) <= radius) - { - if (player.FindBuffIndex(buffType) == -1) - player.AddBuff(buffType, 60, false); - } - } } } } diff --git a/Projectiles/Rogue/InfernalKrisProjectile.cs b/Projectiles/Rogue/InfernalKrisProjectile.cs index ecc722a3bd..155ee6ef67 100644 --- a/Projectiles/Rogue/InfernalKrisProjectile.cs +++ b/Projectiles/Rogue/InfernalKrisProjectile.cs @@ -12,8 +12,7 @@ namespace CalamityMod.Projectiles.Rogue { public new string LocalizationCategory => "Projectiles.Rogue"; public override string Texture => "CalamityMod/Items/Weapons/Rogue/InfernalKris"; - - public static int spinTime = 280; + private bool hasSpawnedCinders = false; public override void SetStaticDefaults() { @@ -35,7 +34,7 @@ namespace CalamityMod.Projectiles.Rogue public override void AI() { - if (Projectile.timeLeft < spinTime) + if (Projectile.timeLeft < 280) { Projectile.rotation += 0.4f * Projectile.direction; @@ -56,59 +55,37 @@ namespace CalamityMod.Projectiles.Rogue } } - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - if (Projectile.timeLeft < spinTime) - { - modifiers.SourceDamage *= 1.75f; - } - } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { int debuffTime = 60 * (Projectile.Calamity().stealthStrike ? Main.rand.Next(4, 8) : Main.rand.Next(3, 6)); target.AddBuff(BuffID.OnFire, debuffTime); if (Projectile.Calamity().stealthStrike) - { - int sparkCount = Main.rand.Next(3, 7); - for (int i = 0; i < sparkCount; i++) - { - int sparkScatter = 1; - Vector2 sparkVelocity = new Vector2(Main.rand.NextFloat(-sparkScatter, sparkScatter), Main.rand.NextFloat(-sparkScatter - 2, sparkScatter + 2)); - - sparkVelocity.Normalize(); - sparkVelocity *= 3; - - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, sparkVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0); - } - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0); - SoundEngine.PlaySound(SoundID.Item74, Projectile.position); - } + StealthEffect(); } - public override void OnHitPlayer(Player target, Player.HurtInfo info) { int debuffTime = 60 * (Projectile.Calamity().stealthStrike ? Main.rand.Next(4, 8) : Main.rand.Next(3, 6)); target.AddBuff(BuffID.OnFire, debuffTime); if (Projectile.Calamity().stealthStrike) - { - int sparkCount = Main.rand.Next(3, 7); - for (int i = 0; i < sparkCount; i++) - { - int sparkScatter = 1; - Vector2 sparkVelocity = new Vector2(Main.rand.NextFloat(-sparkScatter, sparkScatter), Main.rand.NextFloat(-sparkScatter - 2, sparkScatter + 2)); - - sparkVelocity.Normalize(); - sparkVelocity *= 3; - - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, sparkVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0); - } - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0); - SoundEngine.PlaySound(SoundID.Item74, Projectile.position); - } + StealthEffect(); } + private void StealthEffect() + { + hasSpawnedCinders = true; + int sparkCount = Main.rand.Next(4, 5 + 1); + for (int i = 0; i < sparkCount; i++) + { + Vector2 sparkVelocity = Main.rand.NextVector2Circular(1f, 3f); + sparkVelocity = sparkVelocity.SafeNormalize(Vector2.UnitY) * 3f; + + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, sparkVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5f), 0, Projectile.owner, 0, 0); + } + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5f), 0, Projectile.owner, 0, 0); + SoundEngine.PlaySound(SoundID.Item74, Projectile.position); + } + public override bool PreDraw(ref Color lightColor) { @@ -167,13 +144,13 @@ namespace CalamityMod.Projectiles.Rogue public override void OnKill(int timeLeft) { - if (Projectile.Calamity().stealthStrike) + if (Projectile.Calamity().stealthStrike && !hasSpawnedCinders) { - int sparkCount = Main.rand.Next(3, 7); + int sparkCount = Main.rand.Next(4, 5+1); for (int i = 0; i < sparkCount; i++) { - int sparkScatter = 1; - Vector2 sparkVelocity = new Vector2(Main.rand.NextFloat(-sparkScatter, sparkScatter), Main.rand.NextFloat(-sparkScatter, sparkScatter)); + Vector2 sparkVelocity = Main.rand.NextVector2Circular(1f, 3f); + sparkVelocity = sparkVelocity.SafeNormalize(Vector2.UnitY) * 3f; if (Projectile.ai[0] != 0) { @@ -184,14 +161,9 @@ namespace CalamityMod.Projectiles.Rogue sparkVelocity.Y *= -1; } - sparkVelocity.X += Projectile.ai[0]; - sparkVelocity.Y += Projectile.ai[1]; - sparkVelocity.Normalize(); - sparkVelocity *= 3; - - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, sparkVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, sparkVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5f), 0, Projectile.owner, 0, 0); } - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), 0, Projectile.owner, 0, 0); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5f), 0, Projectile.owner, 0, 0); SoundEngine.PlaySound(SoundID.Item74, Projectile.position); } } diff --git a/Projectiles/Rogue/InfestedClawmerangProj.cs b/Projectiles/Rogue/InfestedClawmerangProj.cs index d7f2386bdb..e420a236a8 100644 --- a/Projectiles/Rogue/InfestedClawmerangProj.cs +++ b/Projectiles/Rogue/InfestedClawmerangProj.cs @@ -37,12 +37,8 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.timeLeft % 15 == 0 && Projectile.owner == Main.myPlayer) { - Vector2 vector62 = Main.player[Projectile.owner].Center - Projectile.Center; - Vector2 vector63 = vector62 * -1f; - vector63.Normalize(); - vector63 *= (float)Main.rand.Next(45, 65) * 0.1f; - vector63 = vector63.RotatedBy((Main.rand.NextDouble() - 0.5) * 1.5707963705062866, default); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, vector63.X, vector63.Y, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1), Projectile.knockBack * 0.2f, Projectile.owner, -10f, 0f); + Vector2 sporeVel = Utils.DirectionFrom(Projectile.Center, Main.player[Projectile.owner].Center).RotatedByRandom(MathHelper.Pi) * Main.rand.NextFloat(4.5f, 6.5f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, sporeVel, ModContent.ProjectileType(), (int)(Projectile.damage * 0.3f), 1f, Projectile.owner, -10f, 1f); } } } diff --git a/Projectiles/Rogue/InkBombProjectile.cs b/Projectiles/Rogue/InkBombProjectile.cs index 7f9f6b90cc..4163e97a2c 100644 --- a/Projectiles/Rogue/InkBombProjectile.cs +++ b/Projectiles/Rogue/InkBombProjectile.cs @@ -10,6 +10,7 @@ namespace CalamityMod.Projectiles.Rogue public class InkBombProjectile : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; + public static readonly SoundStyle Explode = new("CalamityMod/Sounds/Custom/PlantyMushMine", 3); public override void SetDefaults() { Projectile.width = 14; @@ -49,10 +50,10 @@ namespace CalamityMod.Projectiles.Rogue private void CreateInk() { Player player = Main.player[Projectile.owner]; - SoundEngine.PlaySound(SoundID.Item14, Projectile.position); - for (int i = 0; i < 20; i++) + SoundEngine.PlaySound(SoundID.NPCHit25, Projectile.Center); + for (int i = 0; i < 4; i++) { - int damage = (int)player.GetTotalDamage().ApplyTo(22); + int damage = (int)player.GetTotalDamage().ApplyTo(32); int inkID = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Main.rand.NextVector2Circular(2f, 2f), ModContent.ProjectileType(), damage, 7, Projectile.owner, Main.rand.Next(3) + 1); Main.projectile[inkID].timeLeft += Main.rand.Next(-15, 15 + 1); diff --git a/Projectiles/Rogue/InkCloud.cs b/Projectiles/Rogue/InkCloud.cs index b45ad2b89a..7313d4b6e1 100644 --- a/Projectiles/Rogue/InkCloud.cs +++ b/Projectiles/Rogue/InkCloud.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Projectiles.Rogue Projectile.tileCollide = true; Projectile.ignoreWater = true; Projectile.timeLeft = 100; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = -1; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 15; Projectile.DamageType = RogueDamageClass.Instance; } @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Rogue { if (!target.friendly) { - target.AddBuff(BuffID.Confused, 300); + target.AddBuff(BuffID.Confused, 60); } } public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(BuffID.Confused, 300); diff --git a/Projectiles/Rogue/LostSoulFriendly.cs b/Projectiles/Rogue/LostSoulFriendly.cs index 1976f6b70e..d0f71b3f6f 100644 --- a/Projectiles/Rogue/LostSoulFriendly.cs +++ b/Projectiles/Rogue/LostSoulFriendly.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Rogue // Reduce damage of projectiles if more than the cap are active public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { - if (!Projectile.CountsAsClass()) + if (Projectile.DamageType == DamageClass.Generic) { int cap = 10; float capDamageFactor = 0.05f; diff --git a/Projectiles/Rogue/PlaguedFuelPackCloud.cs b/Projectiles/Rogue/PlaguedFuelPackCloud.cs index 24e2dfa9d1..5c968220db 100644 --- a/Projectiles/Rogue/PlaguedFuelPackCloud.cs +++ b/Projectiles/Rogue/PlaguedFuelPackCloud.cs @@ -6,32 +6,42 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Rogue { - [PierceResistException] public class PlaguedFuelPackCloud : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; + public int dir = 0; + public float intensity = 0; + public override void SetStaticDefaults() + { + ProjectileID.Sets.CultistIsResistantTo[Type] = true; + } public override void SetDefaults() { Projectile.width = 28; Projectile.height = 24; Projectile.friendly = true; Projectile.alpha = 0; - Projectile.penetrate = -1; - Projectile.tileCollide = true; + Projectile.penetrate = 1; + Projectile.tileCollide = false; Projectile.ignoreWater = true; - Projectile.timeLeft = 120; + Projectile.timeLeft = 390; + Projectile.extraUpdates = 2; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 6; + Projectile.localNPCHitCooldown = -1; Projectile.DamageType = RogueDamageClass.Instance; - Projectile.ArmorPenetration = 5; + Projectile.ArmorPenetration = 10; } public override void AI() { if (Projectile.timeLeft < 50) Projectile.alpha += 5; - if (Projectile.timeLeft < 75) - Projectile.velocity *= 0.95f; + if (dir == 0) + { + Projectile.timeLeft -= Main.rand.Next(5, 20 + 1); + dir = Main.rand.NextBool() ? -1 : 1; + intensity = Main.rand.NextFloat(0.2f, 1.2f); + } if (Main.rand.NextBool(150)) { @@ -40,6 +50,11 @@ namespace CalamityMod.Projectiles.Rogue Main.dust[dust].velocity *= 1.2f; Main.dust[dust].velocity.Y -= 0.15f; } + + if (Projectile.timeLeft < 290) + CalamityUtils.HomeInOnSelectedNPC(Projectile, Projectile.Center.ClosestNPCAt(1000), true, 0.65f * intensity, 6, 0.98f, 0.995f, true); + else + Projectile.velocity = Projectile.velocity.RotatedBy(0.006f * dir * intensity) * Main.rand.NextFloat(0.985f, 1f); } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 240); diff --git a/Projectiles/Rogue/ValariBoomerang.cs b/Projectiles/Rogue/ValariBoomerang.cs index 9db3525406..3107b69692 100644 --- a/Projectiles/Rogue/ValariBoomerang.cs +++ b/Projectiles/Rogue/ValariBoomerang.cs @@ -198,8 +198,6 @@ namespace CalamityMod.Projectiles.Rogue { OnHitEffects(target); target.AddBuff(BuffID.Frostburn2, 120); - if (Projectile.Calamity().stealthStrike) - target.AddBuff(ModContent.BuffType(), 45); } public override bool OnTileCollide(Vector2 oldVelocity) diff --git a/Projectiles/Summon/BabyBloodCrawler.cs b/Projectiles/Summon/BabyBloodCrawler.cs index c3b33c47d2..489eb9a48c 100644 --- a/Projectiles/Summon/BabyBloodCrawler.cs +++ b/Projectiles/Summon/BabyBloodCrawler.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles.Summon public class BabyBloodCrawler : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Summon"; - public static int bloodCooldown = 0; + public int bloodCooldown = 0; public float dust = 0f; public override void SetStaticDefaults() @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.DamageType = DamageClass.Summon; Projectile.MaxUpdates = 2; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 33 * Projectile.MaxUpdates; + Projectile.localNPCHitCooldown = 30 * Projectile.MaxUpdates; } public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac) @@ -98,21 +98,16 @@ namespace CalamityMod.Projectiles.Summon public override bool OnTileCollide(Vector2 oldVelocity) => false; - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => OnHitEffects(target.Center); - - public override void OnHitPlayer(Player target, Player.HurtInfo info) => OnHitEffects(target.Center); - - private void OnHitEffects(Vector2 targetPos) + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => OnHitEffects(target); + public override void OnHitPlayer(Player target, Player.HurtInfo info) => OnHitEffects(target); + private void OnHitEffects(Entity target) { if (bloodCooldown == 0) { - bloodCooldown = 17; - int projAmt = 2; - var source = Projectile.GetSource_FromThis(); - for (int n = 0; n < projAmt; n++) - { - CalamityUtils.ProjectileRain(source, targetPos, 400f, 100f, 400f, 700f, 29f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack * Main.rand.NextFloat(0.7f, 1f), Projectile.owner); - } + bloodCooldown = 15; + Vector2 spawnPos = target.Center + Vector2.UnitX * Main.rand.NextFloat(-100f, 100f) - Vector2.UnitY * Main.rand.NextFloat(400f, 700f); + Vector2 velocity = CalamityUtils.CalculatePredictiveAimToTargetMaxUpdates(spawnPos, target, 25f, 2); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPos, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner); } } } diff --git a/Projectiles/Summon/BloodSpit.cs b/Projectiles/Summon/BloodSpit.cs index 89167493d4..d3784b56ab 100644 --- a/Projectiles/Summon/BloodSpit.cs +++ b/Projectiles/Summon/BloodSpit.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 6; Projectile.DamageType = DamageClass.Summon; - Projectile.Calamity().BloodstoneOrbValue = 20; //Bloodstone Orb lifesteal. May want to go back to regular lifesteal. + Projectile.Calamity().BloodstoneOrbValue = 12; //Bloodstone Orb lifesteal. May want to go back to regular lifesteal. } public override void AI() diff --git a/Projectiles/Summon/CalamarisLamentMinion.cs b/Projectiles/Summon/CalamarisLamentMinion.cs index dd9d517abe..057b2ccb67 100644 --- a/Projectiles/Summon/CalamarisLamentMinion.cs +++ b/Projectiles/Summon/CalamarisLamentMinion.cs @@ -54,13 +54,13 @@ namespace CalamityMod.Projectiles.Summon } else { - if (Main.rand.NextBool(600)) + if (Main.rand.NextBool(800)) { SoundStyle glubNoise = Main.rand.NextBool() ? SoundID.Zombie35 : SoundID.Zombie34; SoundStyle trollBirdChirpingSound = SoundID.Zombie16; - // 1/200th chance to do a bird chirping sound. - SoundEngine.PlaySound(Main.rand.NextBool(200) ? trollBirdChirpingSound : glubNoise, Projectile.Center); + // 1/2000th chance to do a bird chirping sound. + SoundEngine.PlaySound(Main.rand.NextBool(2000) ? trollBirdChirpingSound : glubNoise, Projectile.Center); } } diff --git a/Projectiles/Summon/CalamarisLamentProjectile.cs b/Projectiles/Summon/CalamarisLamentProjectile.cs index 56f317b73b..c4ad77518b 100644 --- a/Projectiles/Summon/CalamarisLamentProjectile.cs +++ b/Projectiles/Summon/CalamarisLamentProjectile.cs @@ -38,7 +38,10 @@ namespace CalamityMod.Projectiles.Summon Projectile.ignoreWater = true; Projectile.usesLocalNPCImmunity = true; } - + public override bool? CanHitNPC(NPC target) + { + return target.CanBeChasedBy() ? null : false; + } public override void AI() { if (TargetShot is not null && TargetShot.active) diff --git a/Projectiles/Summon/FlarebatMinion.cs b/Projectiles/Summon/FlarebatMinion.cs index 66e1a5b87b..5231d03c3b 100644 --- a/Projectiles/Summon/FlarebatMinion.cs +++ b/Projectiles/Summon/FlarebatMinion.cs @@ -76,6 +76,14 @@ namespace CalamityMod.Projectiles.Summon Projectile.ai[0]++; } + // Teleport to the owner if abnormally far away + if (!Projectile.WithinRange(Owner.Center, 2000f)) + { + Projectile.position = Owner.Center; + Projectile.velocity *= 0.3f; + Projectile.netUpdate = true; + } + CurrentBehavior.Invoke(); Projectile.rotation = Projectile.rotation.AngleTowards(MathHelper.ToRadians(Projectile.velocity.X * 3f), 0.2f); Projectile.spriteDirection = MathF.Sign(Projectile.velocity.X); @@ -118,14 +126,14 @@ namespace CalamityMod.Projectiles.Summon // The first stage is redirecting towards the target. if (!AttackState.HasFlag(AttackBehaviorFlags.HasDashed) && Vector2.Dot(Projectile.DirectionTo(Target.Center), Projectile.velocity.SafeNormalize(-Vector2.UnitY)) < 0.96f) { - Projectile.velocity = Projectile.velocity.ToRotation().AngleTowards(Projectile.DirectionTo(Target.Center).ToRotation(), 0.08f).ToRotationVector2() * - Utils.Remap(Projectile.DistanceSQ(Target.Center), 6400f, 0f, 12f, 0f); + Projectile.velocity = Projectile.velocity.ToRotation().AngleTowards(Projectile.DirectionTo(Target.Center).ToRotation(), 0.095f).ToRotationVector2() * + Utils.Remap(Projectile.DistanceSQ(Target.Center), 6400f, 0f, 14f, 0f); } // When it's whithin a distnce and it hasn't dashed yet, it'll dash. else if (!AttackState.HasFlag(AttackBehaviorFlags.HasDashed) && Projectile.DistanceSQ(Target.Center) < 57600f) { - Projectile.velocity = Projectile.DirectionTo(Target.Center) * 15f; + Projectile.velocity = Projectile.DirectionTo(Target.Center) * 19f; AttackState |= AttackBehaviorFlags.HasDashed; Projectile.netUpdate = true; @@ -162,8 +170,8 @@ namespace CalamityMod.Projectiles.Summon // When it has arrived to it at a distance, reset the state and start over. if (AttackState.HasFlag(AttackBehaviorFlags.IsReturningToOwner)) { - Projectile.velocity = Projectile.velocity.ToRotation().AngleTowards(Projectile.DirectionTo(IdlePosition).ToRotation(), 0.08f).ToRotationVector2() * - Utils.Remap(Projectile.DistanceSQ(IdlePosition), 6400f, 0f, 12f, 0f); + Projectile.velocity = Projectile.velocity.ToRotation().AngleTowards(Projectile.DirectionTo(IdlePosition).ToRotation(), 0.095f).ToRotationVector2() * + Utils.Remap(Projectile.DistanceSQ(IdlePosition), 6400f, 0f, 14f, 0f); if (Projectile.DistanceSQ(IdlePosition) < 6400f) { diff --git a/Projectiles/Summon/GhostFire.cs b/Projectiles/Summon/GhostFire.cs index d4f5d8136a..5517dc5ad6 100644 --- a/Projectiles/Summon/GhostFire.cs +++ b/Projectiles/Summon/GhostFire.cs @@ -36,7 +36,10 @@ namespace CalamityMod.Projectiles.Summon Projectile.DamageType = DamageClass.Summon; } public override bool? CanDamage() => ableToHit ? (bool?)null : false; - + public override bool? CanHitNPC(NPC target) + { + return target.CanBeChasedBy() ? null : false; + } public override void AI() { Player player = Main.player[Projectile.owner]; diff --git a/Projectiles/Summon/VileFeederSummon.cs b/Projectiles/Summon/VileFeederSummon.cs index d17ed5e292..d26e1ff4ed 100644 --- a/Projectiles/Summon/VileFeederSummon.cs +++ b/Projectiles/Summon/VileFeederSummon.cs @@ -146,20 +146,12 @@ namespace CalamityMod.Projectiles.Summon if (Projectile.owner == Main.myPlayer) { if (eaterCooldown > 0) - eaterCooldown -= Main.rand.Next(1, 3); + eaterCooldown--; if (eaterCooldown <= 0) { - int projNumber = Main.rand.Next(1, 3); - for (int index2 = 0; index2 < projNumber; index2++) - { - float xVector = (float)Main.rand.Next(-35, 36) * 0.02f; - float yVector = (float)Main.rand.Next(-35, 36) * 0.02f; - xVector *= 10f; - yVector *= 10f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X, Projectile.Center.Y, xVector, yVector, ModContent.ProjectileType(), (int)(Projectile.damage * 1.25f), Projectile.knockBack, Projectile.owner); - } - eaterCooldown = 80; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Main.rand.NextVector2Circular(7f, 7f), ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + eaterCooldown = Projectile.localNPCHitCooldown; } } } diff --git a/Projectiles/Turret/IceShot.cs b/Projectiles/Turret/IceShot.cs index bef1dc5cb2..8f970f9d8e 100644 --- a/Projectiles/Turret/IceShot.cs +++ b/Projectiles/Turret/IceShot.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Turret } public override void OnHitPlayer(Player target, Player.HurtInfo info) { - target.AddBuff(ModContent.BuffType(), 30); + target.AddBuff(BuffID.Frozen, 30); target.AddBuff(BuffID.Frostburn, 180); if (Projectile.hostile && Main.netMode == NetmodeID.MultiplayerClient) //hostile version pierces through players in multiplayer return; diff --git a/Projectiles/Typeless/BlazingStarThatDoesNotHeal.cs b/Projectiles/Typeless/BlazingStarThatDoesNotHeal.cs index c4e2de0393..3082837b88 100644 --- a/Projectiles/Typeless/BlazingStarThatDoesNotHeal.cs +++ b/Projectiles/Typeless/BlazingStarThatDoesNotHeal.cs @@ -101,6 +101,8 @@ namespace CalamityMod.Projectiles.Typeless } } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 60 * 5); + //Doze - I gave all parry accessories long debuff infliction times due to the lack of weapons that inflict debuffs for a decent time, and the scarcity of using the parry + //Most common vanilla debuffs have a way to inflict them for 15, 20, or even 30 seconds + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), CalamityUtils.SecondsToFrames(15)); } } diff --git a/Projectiles/Typeless/CryonicShield.cs b/Projectiles/Typeless/CryonicShield.cs index e3e6320565..78a369f2b2 100644 --- a/Projectiles/Typeless/CryonicShield.cs +++ b/Projectiles/Typeless/CryonicShield.cs @@ -83,10 +83,7 @@ namespace CalamityMod.Projectiles.Typeless Player player = Main.player[Projectile.owner]; CalamityPlayer modPlayer = player.Calamity(); if (!modPlayer.CryoStoneVanity) - { target.AddBuff(BuffID.Frostburn2, 180); - target.AddBuff(ModContent.BuffType(), 30); - } } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.Size.Length() * 0.5f, targetHitbox); diff --git a/Projectiles/Typeless/FlameLickedBarrage.cs b/Projectiles/Typeless/FlameLickedBarrage.cs index f94d416372..0169f45ec6 100644 --- a/Projectiles/Typeless/FlameLickedBarrage.cs +++ b/Projectiles/Typeless/FlameLickedBarrage.cs @@ -57,7 +57,9 @@ namespace CalamityMod.Projectiles.Typeless public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 90); + //Doze - I gave all parry accessories long debuff infliction times due to the lack of weapons that inflict debuffs for a decent time, and the scarcity of using the parry + //Most common vanilla debuffs have a way to inflict them for 15, 20, or even 30 seconds + target.AddBuff(ModContent.BuffType(), CalamityUtils.SecondsToFrames(15)); } public override void OnHitPlayer(Player target, Player.HurtInfo info) diff --git a/Projectiles/Typeless/FlameLickedHellblast.cs b/Projectiles/Typeless/FlameLickedHellblast.cs index 944ca206b1..3e2e579ae4 100644 --- a/Projectiles/Typeless/FlameLickedHellblast.cs +++ b/Projectiles/Typeless/FlameLickedHellblast.cs @@ -89,7 +89,9 @@ namespace CalamityMod.Projectiles.Typeless public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 90); + //Doze - I gave all parry accessories long debuff infliction times due to the lack of weapons that inflict debuffs for a decent time, and the scarcity of using the parry + //Most common vanilla debuffs have a way to inflict them for 15, 20, or even 30 seconds + target.AddBuff(ModContent.BuffType(), CalamityUtils.SecondsToFrames(15)); } public override void OnKill(int timeLeft) diff --git a/Projectiles/VanillaProjectileOverrides/ImpMinionAI.cs b/Projectiles/VanillaProjectileOverrides/ImpMinionAI.cs index b79ed81667..16c95c9c77 100644 --- a/Projectiles/VanillaProjectileOverrides/ImpMinionAI.cs +++ b/Projectiles/VanillaProjectileOverrides/ImpMinionAI.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.VanillaProjectileOverrides private static float EnemyDistanceDetection { get => Target is null ? MinEnemyDistanceDetection : MaxEnemyDistanceDetection; } - private const int FireRate = 75; + private const int FireRate = 60; private const float ProjectileVelocity = 20f; private static NPC Target { get; set; } @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.VanillaProjectileOverrides shootTimer += Main.rand.NextBool(20) ? 2 : 1; if (shootTimer >= FireRate && proj.owner == Main.myPlayer) { - Vector2 toTargetDirection = CalamityUtils.CalculatePredictiveAimToTarget(proj.Center, Target, ProjectileVelocity); + Vector2 toTargetDirection = Utils.DirectionTo(proj.Center, Target.Center) * ProjectileVelocity; Projectile fireball = Projectile.NewProjectileDirect(proj.GetSource_FromThis(), proj.Center, diff --git a/Sounds/Item/MittFail.ogg b/Sounds/Item/MittFail.ogg new file mode 100644 index 0000000000..b7f210727f Binary files /dev/null and b/Sounds/Item/MittFail.ogg differ diff --git a/Sounds/Item/MittHit.ogg b/Sounds/Item/MittHit.ogg new file mode 100644 index 0000000000..0faac84a5e Binary files /dev/null and b/Sounds/Item/MittHit.ogg differ diff --git a/Sounds/Item/MittReadyPalm.ogg b/Sounds/Item/MittReadyPalm.ogg new file mode 100644 index 0000000000..c786f75f8f Binary files /dev/null and b/Sounds/Item/MittReadyPalm.ogg differ diff --git a/Sounds/Item/MittThrust.ogg b/Sounds/Item/MittThrust.ogg new file mode 100644 index 0000000000..342b6df3a9 Binary files /dev/null and b/Sounds/Item/MittThrust.ogg differ diff --git a/Sounds/Item/MittWelding/Weld1.ogg b/Sounds/Item/MittWelding/Weld1.ogg new file mode 100644 index 0000000000..87a68dceac Binary files /dev/null and b/Sounds/Item/MittWelding/Weld1.ogg differ diff --git a/Sounds/Item/MittWelding/Weld2.ogg b/Sounds/Item/MittWelding/Weld2.ogg new file mode 100644 index 0000000000..87a68dceac Binary files /dev/null and b/Sounds/Item/MittWelding/Weld2.ogg differ diff --git a/Sounds/Item/MittWelding/Weld3.ogg b/Sounds/Item/MittWelding/Weld3.ogg new file mode 100644 index 0000000000..87a68dceac Binary files /dev/null and b/Sounds/Item/MittWelding/Weld3.ogg differ diff --git a/Sounds/Item/MittWelding/Weld4.ogg b/Sounds/Item/MittWelding/Weld4.ogg new file mode 100644 index 0000000000..87a68dceac Binary files /dev/null and b/Sounds/Item/MittWelding/Weld4.ogg differ diff --git a/Sounds/Item/MittWelding/Weld5.ogg b/Sounds/Item/MittWelding/Weld5.ogg new file mode 100644 index 0000000000..87a68dceac Binary files /dev/null and b/Sounds/Item/MittWelding/Weld5.ogg differ diff --git a/Systems/Collections/DonatorsNameList.cs b/Systems/Collections/DonatorsNameList.cs index 71971a7bf2..9ae253c576 100644 --- a/Systems/Collections/DonatorsNameList.cs +++ b/Systems/Collections/DonatorsNameList.cs @@ -517,7 +517,6 @@ namespace CalamityMod.Systems.Collections "Nanaki", "Natalie", "Nathan", - "Nathaniel", "Navigator", "Ne'er Dowell", "NEBULA", @@ -668,6 +667,7 @@ namespace CalamityMod.Systems.Collections "That Katsafaros", "The Buildmonger", "The Davester", + "The Evolution", // previously "Nathaniel" "The Goliath", "The Illustrious Sqouinchuousor", "The Infinity", diff --git a/Systems/Collections/MagicGunIDList.cs b/Systems/Collections/MagicGunIDList.cs index 12a5a0174e..b13da9e39b 100644 --- a/Systems/Collections/MagicGunIDList.cs +++ b/Systems/Collections/MagicGunIDList.cs @@ -24,7 +24,6 @@ namespace CalamityMod.Systems.Collections ItemType(), ItemType(), ItemType(), - ItemType(), ItemType(), ItemType(), ItemType(), diff --git a/Systems/Collections/NPCs/BossHPScalingList.cs b/Systems/Collections/NPCs/BossHPScalingList.cs index 9a7076e3ce..9fd9f5a0a4 100644 --- a/Systems/Collections/NPCs/BossHPScalingList.cs +++ b/Systems/Collections/NPCs/BossHPScalingList.cs @@ -99,7 +99,6 @@ namespace CalamityMod.Systems.Collections NPCType(), NPCType(), NPCType(), - NPCType(), NPCType(), NPCType(), NPCType(), diff --git a/Systems/Collections/NPCs/BossRushHPChangeDict.cs b/Systems/Collections/NPCs/BossRushHPChangeDict.cs index b12ce62bc1..61332ad1c5 100644 --- a/Systems/Collections/NPCs/BossRushHPChangeDict.cs +++ b/Systems/Collections/NPCs/BossRushHPChangeDict.cs @@ -32,7 +32,6 @@ namespace CalamityMod.Systems.Collections { NPCID.EyeofCthulhu, 450000 }, // 30 seconds { NPCID.ServantofCthulhu, 6000 }, - { NPCType(), 12000 }, { NPCID.EaterofWorldsHead, 10000 }, // 30 seconds + immunity timer at start { NPCID.EaterofWorldsBody, 10000 }, diff --git a/Systems/Collections/NPCs/EnemyImmunitiesList.cs b/Systems/Collections/NPCs/EnemyImmunitiesList.cs index 1bc99e3eac..87699925d8 100644 --- a/Systems/Collections/NPCs/EnemyImmunitiesList.cs +++ b/Systems/Collections/NPCs/EnemyImmunitiesList.cs @@ -42,7 +42,6 @@ namespace CalamityMod.Systems.Collections NPCType(), NPCType(), NPCID.EyeofCthulhu, - NPCType(), NPCID.EaterofWorldsHead, NPCID.EaterofWorldsBody, NPCID.EaterofWorldsTail, diff --git a/Systems/Collections/ProjectileDestroyExceptionsList.cs b/Systems/Collections/ProjectileDestroyExceptionsList.cs index 5992a004e2..7b2c882b31 100644 --- a/Systems/Collections/ProjectileDestroyExceptionsList.cs +++ b/Systems/Collections/ProjectileDestroyExceptionsList.cs @@ -45,6 +45,7 @@ namespace CalamityMod.Systems.Collections ProjectileType(), ProjectileType(), ProjectileType(), + ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), diff --git a/Systems/Mechanic/DifficultyModeSystem.cs b/Systems/Mechanic/DifficultyModeSystem.cs index 106dd9bdef..50325e99ac 100644 --- a/Systems/Mechanic/DifficultyModeSystem.cs +++ b/Systems/Mechanic/DifficultyModeSystem.cs @@ -1,9 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.CalPlayer; -using CalamityMod.Events; using CalamityMod.Items.Armor.Demonshade; using CalamityMod.UI.ModeIndicator; using CalamityMod.World; @@ -12,7 +9,6 @@ using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; using Terraria; using Terraria.Audio; -using Terraria.Graphics; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; @@ -33,7 +29,7 @@ namespace CalamityMod.Systems { MostAlternateDifficulties = 1; //Initialize base mod difficulties - Difficulties = new List() { new NoDifficulty(), new RevengeanceDifficulty(), new DeathDifficulty() }; + Difficulties = new List() { new NoDifficulty(), new ExpertDifficulty(), new MasterDifficulty(), new RevengeanceDifficulty(), new DeathDifficulty() }; CalculateDifficultyData(); } @@ -46,8 +42,6 @@ namespace CalamityMod.Systems // Makes the world automatically convert to Death if in Master, or out of Death if in Expert public override void PostUpdateWorld() { - if (!Main.expertMode) - ModeIndicatorUI.SwitchToDifficulty(NoDifficulty.Instance); if (Main.expertMode && !Main.masterMode && GetCurrentDifficulty == DeathDifficulty.Instance) ModeIndicatorUI.SwitchToDifficulty(RevengeanceDifficulty.Instance); if (Main.masterMode && GetCurrentDifficulty == RevengeanceDifficulty.Instance) @@ -141,6 +135,7 @@ namespace CalamityMod.Systems } public abstract Asset Texture { get; } + public abstract Asset TextureDisabled { get; } public virtual LocalizedText ExpandedDescription => LocalizedText.Empty; public float DifficultyScale; @@ -161,7 +156,7 @@ namespace CalamityMod.Systems /// public virtual bool RequiresDifficulty(DifficultyMode mode) => false; - public virtual int FavoredDifficultyAtTier(int tier) => 0; + public virtual int[] FavoredDifficultyAtTier(int tier) => [0]; } public class NoDifficulty : DifficultyMode @@ -169,7 +164,7 @@ namespace CalamityMod.Systems public override bool Enabled { get => true; - set { } + set => Main.GameMode = value == true ? GameModeID.Normal : GameModeID.Expert; } private Asset _texture; @@ -178,17 +173,28 @@ namespace CalamityMod.Systems get { if (_texture == null) - _texture = ModContent.Request("CalamityMod/UI/ModeIndicator/ModeIndicator_None"); + _texture = ModContent.Request("CalamityMod/UI/ModeIndicator/ModeIndicator_Classic"); return _texture; } } + private Asset _textureDisabled; + public override Asset TextureDisabled + { + get + { + if (_textureDisabled == null) + _textureDisabled = ModContent.Request("CalamityMod/UI/ModeIndicator/ModeIndicator_Classic_Off"); + + return _textureDisabled; + } + } public NoDifficulty() { DifficultyScale = 0; - Name = CalamityUtils.GetText("UI.NoDifficulty"); - ShortDescription = CalamityUtils.GetText("UI.NoDifficultyInfo"); + Name = CalamityUtils.GetText("UI.Classic"); + ShortDescription = CalamityUtils.GetText("UI.ClassicInfo"); ActivationTextKey = string.Empty; DeactivationTextKey = string.Empty; @@ -202,6 +208,120 @@ namespace CalamityMod.Systems public static NoDifficulty Instance { get; private set; } = null; } + public class ExpertDifficulty : DifficultyMode + { + public override bool Enabled + { + get => Main.expertMode; + set => Main.GameMode = value == true ? GameModeID.Expert : GameModeID.Normal; + } + + private Asset _texture; + public override Asset Texture + { + get + { + if (_texture == null) + _texture = ModContent.Request("CalamityMod/UI/ModeIndicator/ModeIndicator_Expert"); + + return _texture; + } + } + private Asset _textureDisabled; + public override Asset TextureDisabled + { + get + { + if (_textureDisabled == null) + _textureDisabled = ModContent.Request("CalamityMod/UI/ModeIndicator/ModeIndicator_Expert_Off"); + + return _textureDisabled; + } + } + + public override LocalizedText ExpandedDescription + { + get + { + return GetText("UI.ExpertExpandedInfo"); + } + } + + public ExpertDifficulty() + { + DifficultyScale = 0.1f; + Name = GetText("UI.Expert"); + ShortDescription = GetText("UI.ExpertShortInfo"); + + ActivationTextKey = "Mods.CalamityMod.UI.ExpertActivate"; + DeactivationTextKey = "Mods.CalamityMod.UI.ExpertDeactivate"; + + ActivationSound = SoundID.ForceRoarPitched; + + ChatTextColor = Color.DarkGoldenrod; + Instance = this; + } + + public static ExpertDifficulty Instance { get; private set; } = null; + } + + public class MasterDifficulty : DifficultyMode + { + public override bool Enabled + { + get => Main.masterMode; + set => Main.GameMode = value == true ? GameModeID.Master : GameModeID.Expert; + } + + private Asset _texture; + public override Asset Texture + { + get + { + if (_texture == null) + _texture = ModContent.Request("CalamityMod/UI/ModeIndicator/ModeIndicator_Master"); + + return _texture; + } + } + private Asset _textureDisabled; + public override Asset TextureDisabled + { + get + { + if (_textureDisabled == null) + _textureDisabled = ModContent.Request("CalamityMod/UI/ModeIndicator/ModeIndicator_Master_Off"); + + return _textureDisabled; + } + } + + public override LocalizedText ExpandedDescription + { + get + { + return GetText("UI.MasterExpandedInfo"); + } + } + + public MasterDifficulty() + { + DifficultyScale = 0.25f; + Name = GetText("UI.Master"); + ShortDescription = GetText("UI.MasterShortInfo"); + + ActivationTextKey = "Mods.CalamityMod.UI.MasterActivate"; + DeactivationTextKey = "Mods.CalamityMod.UI.MasterDeactivate"; + + ActivationSound = SoundID.NPCDeath10; + + ChatTextColor = Color.DarkOliveGreen; + Instance = this; + } + + public static MasterDifficulty Instance { get; private set; } = null; + } + public class RevengeanceDifficulty : DifficultyMode { public override bool Enabled @@ -221,6 +341,17 @@ namespace CalamityMod.Systems return _texture; } } + private Asset _textureDisabled; + public override Asset TextureDisabled + { + get + { + if (_textureDisabled == null) + _textureDisabled = ModContent.Request("CalamityMod/UI/ModeIndicator/ModeIndicator_Rev_Off"); + + return _textureDisabled; + } + } public override LocalizedText ExpandedDescription { @@ -269,6 +400,17 @@ namespace CalamityMod.Systems return _texture; } } + private Asset _textureDisabled; + public override Asset TextureDisabled + { + get + { + if (_textureDisabled == null) + _textureDisabled = ModContent.Request("CalamityMod/UI/ModeIndicator/ModeIndicator_Death_Off"); + + return _textureDisabled; + } + } public override LocalizedText ExpandedDescription => CalamityUtils.GetText("UI.DeathExpandedInfo"); @@ -287,17 +429,22 @@ namespace CalamityMod.Systems Instance = this; } - public override int FavoredDifficultyAtTier(int tier) + public override int[] FavoredDifficultyAtTier(int tier) { DifficultyMode[] tierList = DifficultyModeSystem.DifficultyTiers[tier]; + List difficulties = new List(); + for (int i = 0; i < tierList.Length; i++) { - if (tierList[i].Name == CalamityUtils.GetText("UI.Revengeance")) - return i; + if (tierList[i].Name == CalamityUtils.GetText("UI.Master") || tierList[i].Name == CalamityUtils.GetText("UI.Revengeance")) + difficulties.Add(i); } - return 0; + if (difficulties.Count <= 0) + difficulties.Add(0); + + return difficulties.ToArray(); } public static DeathDifficulty Instance { get; private set; } = null; } diff --git a/Systems/Mechanic/RecipeSystem.cs b/Systems/Mechanic/RecipeSystem.cs index 64d9163eba..61125a7147 100644 --- a/Systems/Mechanic/RecipeSystem.cs +++ b/Systems/Mechanic/RecipeSystem.cs @@ -35,10 +35,10 @@ namespace CalamityMod.Systems #endregion #region Recipe Group Definitions - public static int HardmodeAnvil, HardmodeForge, AnyLargeGem, AnyFood; + public static int HardmodeAnvil, HardmodeForge, AnyFood; public static int AnyCopperOre, AnySilverOre, AnyGoldOre, AnyEvilOre, AnyCobaltOre, AnyMythrilOre, AnyAdamantiteOre; public static int AnyCopperBar, AnySilverBar, AnyGoldBar, AnyEvilBar, AnyCobaltBar, AnyMythrilBar, AnyAdamantiteBar; - public static int AnyEvilPowder, Boss2Material, CursedFlameIchor, AnyEvilWater, AnyEvilFlask; + public static int Boss2Material, CursedFlameIchor, AnyEvilWater; public static int AnyStoneBlock, AnySnowBlock, AnyIceBlock, AnySiltBlock, AnyEvilBlock, AnyGoodBlock; public static int AnyWoodenSword, AnyHallowedHelmet, AnyHallowedPlatemail, AnyHallowedGreaves, AnyGoldCrown, LunarPickaxe, LunarHamaxe; public static int AnyManaFlower, AnyQuiver, AnyTombstone, AnyWings; @@ -87,19 +87,6 @@ namespace CalamityMod.Systems }); HardmodeForge = RecipeGroup.RegisterGroup("HardmodeForge", group); - // Large Gems (PvP tokens) - group = new RecipeGroup(() => CalamityUtils.GetTextValue("Misc.RecipeGroup.AnyLargeGem"), new int[] - { - ItemID.LargeAmber, - ItemID.LargeAmethyst, - ItemID.LargeDiamond, - ItemID.LargeEmerald, - ItemID.LargeRuby, - ItemID.LargeSapphire, - ItemID.LargeTopaz - }); - AnyLargeGem = RecipeGroup.RegisterGroup("AnyLargeGem", group); - // Food AnyFood = RecipeGroup.RegisterGroup("AnyFood", GetFoodItems()); } @@ -214,16 +201,8 @@ namespace CalamityMod.Systems private static void AddEvilBiomeItemRecipeGroups() { - // Vile and Vicious Powder - RecipeGroup group = new RecipeGroup(() => CalamityUtils.GetTextValue("Misc.RecipeGroup.AnyEvilPowder"), new int[] - { - ItemID.VilePowder, - ItemID.ViciousPowder - }); - AnyEvilPowder = RecipeGroup.RegisterGroup("AnyEvilPowder", group); - // Shadow Scale and Tissue Sample - group = new RecipeGroup(() => CalamityUtils.GetTextValue("Misc.RecipeGroup.Boss2Material"), new int[] + RecipeGroup group = new RecipeGroup(() => CalamityUtils.GetTextValue("Misc.RecipeGroup.Boss2Material"), new int[] { ItemID.ShadowScale, ItemID.TissueSample @@ -245,14 +224,6 @@ namespace CalamityMod.Systems ItemID.BloodWater }); AnyEvilWater = RecipeGroup.RegisterGroup("AnyEvilWater", group); - - // Flask of Cursed Flames and Flask of Ichor - group = new RecipeGroup(() => CalamityUtils.GetTextValue("Misc.RecipeGroup.AnyEvilFlask"), new int[] - { - ItemID.FlaskofCursedFlames, - ItemID.FlaskofIchor - }); - AnyEvilFlask = RecipeGroup.RegisterGroup("AnyEvilFlask", group); } private static void AddBiomeBlockRecipeGroups() diff --git a/UI/ModeIndicator/ModeIndicatorLock.png b/UI/ModeIndicator/ModeIndicatorLock.png index f440e5748d..ae7b9e6073 100644 Binary files a/UI/ModeIndicator/ModeIndicatorLock.png and b/UI/ModeIndicator/ModeIndicatorLock.png differ diff --git a/UI/ModeIndicator/ModeIndicatorOutline.png b/UI/ModeIndicator/ModeIndicatorOutline.png index d4f1f87ee3..8cfff31c70 100644 Binary files a/UI/ModeIndicator/ModeIndicatorOutline.png and b/UI/ModeIndicator/ModeIndicatorOutline.png differ diff --git a/UI/ModeIndicator/ModeIndicatorUI.cs b/UI/ModeIndicator/ModeIndicatorUI.cs index ddde388064..ffd2abdc62 100644 --- a/UI/ModeIndicator/ModeIndicatorUI.cs +++ b/UI/ModeIndicator/ModeIndicatorUI.cs @@ -1,17 +1,13 @@ using System; -using System.Collections.Generic; using System.Linq; -using System.Runtime.InteropServices; using System.Text.RegularExpressions; using CalamityMod.CalPlayer; using CalamityMod.Events; using CalamityMod.Systems; -using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; -using Terraria.GameInput; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; @@ -49,7 +45,7 @@ namespace CalamityMod.UI.ModeIndicator internal static int MenuAnimLength => MostAlternateDifficulties > 1 ? 60 : 40; private static int menuOpenTransitionTime = 0; private static DifficultyMode previouslyHoveredMode = null; - public static float WidthForTier(int alts) => (alts - 1) * 40f; + public static float WidthForTier(int alts) => (alts - 1) * 44f; private static void ClearVariables() { @@ -229,12 +225,7 @@ namespace CalamityMod.UI.ModeIndicator { locked = false; text = CalamityUtils.GetText("UI.DifficultyClickText"); - if (!Main.expertMode && GetCurrentDifficulty == Difficulties[0]) - { - locked = true; - text = CalamityUtils.GetText("UI.ExpertDifficultyLock"); - } - else if (CalamityPlayer.areThereAnyDamnBosses || BossRushEvent.BossRushActive) + if (CalamityPlayer.areThereAnyDamnBosses || BossRushEvent.BossRushActive) { locked = true; text = CalamityUtils.GetText("UI.ChangingTheRules"); @@ -303,7 +294,7 @@ namespace CalamityMod.UI.ModeIndicator public static void ManageHexIcons(SpriteBatch spriteBatch, out string text) { int tiers = DifficultyTiers.Count(); - float barLength = 60 * tiers * BarExpansionProgress; + float barLength = 68 * tiers * BarExpansionProgress; float progress = menuOpen ? 1 - menuOpenTransitionTime / (float)MenuAnimLength : menuOpenTransitionTime / (float)MenuAnimLength; Vector2 basePosition = DrawCenter + (barLength / (float)(tiers + 1f)) * Vector2.UnitY; @@ -322,7 +313,7 @@ namespace CalamityMod.UI.ModeIndicator for (int j = 0; j < modesAtTier; j++) { DifficultyMode mode = DifficultyTiers[i][j]; - Texture2D hexIcon = mode.Texture.Value; + Texture2D hexIcon = mode.Enabled ? mode.Texture.Value : mode.TextureDisabled.Value; Vector2 hexIconSize = hexIcon.Size(); // Get position. @@ -332,7 +323,7 @@ namespace CalamityMod.UI.ModeIndicator bool hovered = MouseScreenArea.Intersects(Utils.CenteredRectangle(iconPosition, hexIconSize)); - float usedOpacity = mode.Enabled ? 0.85f : 0.55f; + float usedOpacity = 0.85f; if (hovered) usedOpacity = MathHelper.Lerp(usedOpacity, 1f, 0.7f); @@ -355,10 +346,7 @@ namespace CalamityMod.UI.ModeIndicator text = GetDifficultyText(mode); - // Cannot switch to Death Mode if Master Mode isn't active. - // Cannot switch to Revengeance Mode if Master Mode is active. - bool cannotSwitchTo = (!Main.masterMode && mode == Difficulties[2]) || (Main.masterMode && mode == Difficulties[1]); - if (ClickingMouse && !cannotSwitchTo) + if (ClickingMouse) SwitchToDifficulty(mode); } } @@ -372,7 +360,7 @@ namespace CalamityMod.UI.ModeIndicator { Texture2D lockTexture = ModContent.Request("CalamityMod/UI/ModeIndicator/ModeIndicatorLock").Value; float rotationShift = lockClickTime == 0 ? 0f : (float)Math.Sin((1 - lockClickTime / (float)LockAnimLength) * MathHelper.TwoPi * 2f) * 0.5f * (lockClickTime / (float)LockAnimLength); - spriteBatch.Draw(lockTexture, DrawCenter + Vector2.UnitY * 12 * MainIconScale, null, Color.White, 0f + rotationShift, lockTexture.Size() * 0.5f, LockShakeScale * MainIconScale, SpriteEffects.None, 0f); + spriteBatch.Draw(lockTexture, DrawCenter + Vector2.UnitY * 24 * MainIconScale, null, Color.White, 0f + rotationShift, lockTexture.Size() * 0.5f, LockShakeScale * MainIconScale, SpriteEffects.None, 0f); } #endregion @@ -440,8 +428,11 @@ namespace CalamityMod.UI.ModeIndicator for (int j = 0; j < DifficultyTiers[i].Length; j++) DifficultyTiers[i][j].Enabled = false; - // Enable the one favored by the mode. - DifficultyTiers[i][mode.FavoredDifficultyAtTier(i)].Enabled = true; + // Enable the ones favored by the mode. + for (int j = 0; j < mode.FavoredDifficultyAtTier(i).Length; j++) + { + DifficultyTiers[i][mode.FavoredDifficultyAtTier(i)[j]].Enabled = true; + } } } diff --git a/UI/ModeIndicator/ModeIndicator_Classic.png b/UI/ModeIndicator/ModeIndicator_Classic.png new file mode 100644 index 0000000000..cec6bfee9b Binary files /dev/null and b/UI/ModeIndicator/ModeIndicator_Classic.png differ diff --git a/UI/ModeIndicator/ModeIndicator_Classic_Off.png b/UI/ModeIndicator/ModeIndicator_Classic_Off.png new file mode 100644 index 0000000000..ccf4bfccbc Binary files /dev/null and b/UI/ModeIndicator/ModeIndicator_Classic_Off.png differ diff --git a/UI/ModeIndicator/ModeIndicator_Death.png b/UI/ModeIndicator/ModeIndicator_Death.png index 5729ede7b4..3407bf8f8d 100644 Binary files a/UI/ModeIndicator/ModeIndicator_Death.png and b/UI/ModeIndicator/ModeIndicator_Death.png differ diff --git a/UI/ModeIndicator/ModeIndicator_Death_Off.png b/UI/ModeIndicator/ModeIndicator_Death_Off.png new file mode 100644 index 0000000000..2a3f7cc3d5 Binary files /dev/null and b/UI/ModeIndicator/ModeIndicator_Death_Off.png differ diff --git a/UI/ModeIndicator/ModeIndicator_Expert.png b/UI/ModeIndicator/ModeIndicator_Expert.png new file mode 100644 index 0000000000..7f16d0f576 Binary files /dev/null and b/UI/ModeIndicator/ModeIndicator_Expert.png differ diff --git a/UI/ModeIndicator/ModeIndicator_Expert_Off.png b/UI/ModeIndicator/ModeIndicator_Expert_Off.png new file mode 100644 index 0000000000..1ade0d9fd6 Binary files /dev/null and b/UI/ModeIndicator/ModeIndicator_Expert_Off.png differ diff --git a/UI/ModeIndicator/ModeIndicator_Master.png b/UI/ModeIndicator/ModeIndicator_Master.png new file mode 100644 index 0000000000..c69fcfaa6e Binary files /dev/null and b/UI/ModeIndicator/ModeIndicator_Master.png differ diff --git a/UI/ModeIndicator/ModeIndicator_Master_Off.png b/UI/ModeIndicator/ModeIndicator_Master_Off.png new file mode 100644 index 0000000000..91817fbfd1 Binary files /dev/null and b/UI/ModeIndicator/ModeIndicator_Master_Off.png differ diff --git a/UI/ModeIndicator/ModeIndicator_None.png b/UI/ModeIndicator/ModeIndicator_None.png deleted file mode 100644 index 58648ff4ed..0000000000 Binary files a/UI/ModeIndicator/ModeIndicator_None.png and /dev/null differ diff --git a/UI/ModeIndicator/ModeIndicator_Rev.png b/UI/ModeIndicator/ModeIndicator_Rev.png index 64eec475d7..5b21cfd0fa 100644 Binary files a/UI/ModeIndicator/ModeIndicator_Rev.png and b/UI/ModeIndicator/ModeIndicator_Rev.png differ diff --git a/UI/ModeIndicator/ModeIndicator_Rev_Off.png b/UI/ModeIndicator/ModeIndicator_Rev_Off.png new file mode 100644 index 0000000000..3f8cc887fa Binary files /dev/null and b/UI/ModeIndicator/ModeIndicator_Rev_Off.png differ